Logs: freenode/#haskell
| 2020-10-29 19:25:42 | <yahb> | tomsmeding: ; <interactive>:1:1: error: Variable not in scope: ifM :: (a0 -> Bool) -> (a1 -> a1) -> t |
| 2020-10-29 19:25:53 | <koz_> | texasmynsted: Try writing the type of such a thing. |
| 2020-10-29 19:25:57 | × | LKoen quits (~LKoen@81.255.219.130) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”) |
| 2020-10-29 19:26:02 | → | conal joins (~conal@64.71.133.70) |
| 2020-10-29 19:26:06 | <tomsmeding> | % :t let ifM p x y = p >>= \b -> if b then x else y in ifM (> 0) succ |
| 2020-10-29 19:26:07 | <yahb> | tomsmeding: (Ord a, Num a, Enum a) => (a -> a) -> a -> a |
| 2020-10-29 19:26:19 | <tomsmeding> | where ifM is the obvious thing, in various libraries |
| 2020-10-29 19:26:22 | <koz_> | Is your goal something like watIWant :: (Monad m) => (a -> b) -> (a -> Bool) -> m a -> m a |
| 2020-10-29 19:26:29 | → | fandi__ joins (~fandi@118.97.77.114) |
| 2020-10-29 19:26:34 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2020-10-29 19:26:37 | <koz_> | Sorry, slight error. |
| 2020-10-29 19:26:41 | <koz_> | Is your goal something like watIWant :: (Monad m) => (a -> a) -> (a -> Bool) -> m a -> m a |
| 2020-10-29 19:26:57 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 2020-10-29 19:26:57 | <koz_> | (Monad implies Functor, so no need to have that there) |
| 2020-10-29 19:27:04 | × | kish quits (~oracle@unaffiliated/oracle) (Remote host closed the connection) |
| 2020-10-29 19:27:17 | → | christo joins (~chris@81.96.113.213) |
| 2020-10-29 19:27:18 | texasmynsted | looking up ifM |
| 2020-10-29 19:27:52 | <tomsmeding> | texasmynsted: (probably want to write it yourself if you don't already include a library that has it) |
| 2020-10-29 19:28:40 | × | nineonine quits (~textual@216.81.48.202) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-10-29 19:29:06 | <tomsmeding> | this uses the trick that ((->) a) is a monad :p |
| 2020-10-29 19:29:11 | <tomsmeding> | which is not for the faint of heart |
| 2020-10-29 19:29:14 | <texasmynsted> | Okay. Fair enough. |
| 2020-10-29 19:29:24 | × | fandi_ quits (~fandi@125.160.217.204) (Ping timeout: 272 seconds) |
| 2020-10-29 19:29:51 | → | nineonine joins (~textual@216.81.48.202) |
| 2020-10-29 19:30:06 | → | conal joins (~conal@64.71.133.70) |
| 2020-10-29 19:30:14 | <dminuoso> | Rewriting almost half of a 2k lines code generator in one day. |
| 2020-10-29 19:30:28 | <dminuoso> | The type system has my back once again. :) |
| 2020-10-29 19:30:30 | <koz_> | dminuoso: #JustHaskellThings ? |
| 2020-10-29 19:30:51 | <dminuoso> | koz_: Hehe yeah. |
| 2020-10-29 19:31:25 | <koz_> | Meanwhile I'm in a special kind of parsing hell. |
| 2020-10-29 19:31:25 | × | chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer) |
| 2020-10-29 19:31:29 | → | ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) |
| 2020-10-29 19:31:41 | → | chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) |
| 2020-10-29 19:31:43 | <dminuoso> | Haha, my parser is one big blop of adhoc stateful shenanigans. |
| 2020-10-29 19:31:53 | <dminuoso> | megaparsec over State |
| 2020-10-29 19:31:54 | <koz_> | dminuoso: FUNNY YOU SHOULD MENTION THAT |
| 2020-10-29 19:31:56 | → | britva joins (~britva@2a02:aa13:7240:2980:1ce4:625f:f093:45ef) |
| 2020-10-29 19:32:13 | × | conal quits (~conal@64.71.133.70) (Read error: Connection reset by peer) |
| 2020-10-29 19:32:13 | <davean> | dminuoso: over state, interesting. |
| 2020-10-29 19:32:24 | jess-o-lantern | is now known as sandcat |
| 2020-10-29 19:32:37 | <koz_> | So you're in like StateT s Parser? |
| 2020-10-29 19:32:56 | <dminuoso> | type Parser = ParsecT Void String (S.State ParserState) |
| 2020-10-29 19:33:06 | <koz_> | Ah, OK, the other way around. |
| 2020-10-29 19:34:52 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2020-10-29 19:35:22 | <dminuoso> | davean: Yeah. Lets you do context-sensitive things easily, or do some adhoc hacks. |
| 2020-10-29 19:35:37 | × | dopplergange quits (~dop@titan.pathogen.is) (Ping timeout: 246 seconds) |
| 2020-10-29 19:35:48 | → | conal joins (~conal@64.71.133.70) |
| 2020-10-29 19:35:52 | <dminuoso> | Im doing so I can build up a data structure as Im parsing, avoiding the need to build into some kind of DSL + extra evalutaor |
| 2020-10-29 19:36:26 | × | ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 256 seconds) |
| 2020-10-29 19:36:40 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 2020-10-29 19:36:57 | → | thir joins (~thir@p200300f27f0b7e004c18ab60065ea01b.dip0.t-ipconnect.de) |
| 2020-10-29 19:37:14 | × | mastarija quits (~mastarija@93-138-85-169.adsl.net.t-com.hr) (Ping timeout: 264 seconds) |
| 2020-10-29 19:37:24 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 240 seconds) |
| 2020-10-29 19:37:43 | → | conal joins (~conal@64.71.133.70) |
| 2020-10-29 19:43:55 | × | u0_a298 quits (~user@47.206.148.226) (Remote host closed the connection) |
| 2020-10-29 19:44:16 | → | u0_a298 joins (~user@47.206.148.226) |
| 2020-10-29 19:45:21 | → | acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
| 2020-10-29 19:46:38 | → | avdb joins (~avdb@ip-62-235-189-214.dsl.scarlet.be) |
| 2020-10-29 19:47:44 | <avdb> | Sorry if this question already got asked a million times, but I'm looking for a vim plugin that offers only syntax highlighting? Error correction and stuff is really disturbing to me. |
| 2020-10-29 19:48:07 | × | ransom quits (~c4264035@c-73-243-2-10.hsd1.co.comcast.net) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-10-29 19:48:37 | <avdb> | Currently using VSCode only with the "Haskell Syntax Higlighting" plugin. |
| 2020-10-29 19:49:05 | <dminuoso> | neovim/haskell-vim ? |
| 2020-10-29 19:49:15 | <dminuoso> | err |
| 2020-10-29 19:49:18 | <dminuoso> | neovimhaskell/haskell-vim ? |
| 2020-10-29 19:49:25 | <maerwald> | yes |
| 2020-10-29 19:49:26 | → | nschoe joins (~quassel@2a01:e0a:3c4:c7b0:c945:6e87:b509:d89a) |
| 2020-10-29 19:49:28 | <maerwald> | neovimhaskell/haskell-vim |
| 2020-10-29 19:49:48 | <maerwald> | make sure to set g:haskell_indent_disable = 1 |
| 2020-10-29 19:49:58 | × | nineonine quits (~textual@216.81.48.202) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-10-29 19:50:03 | × | teardown quits (~user@gateway/tor-sasl/mrush) (Ping timeout: 240 seconds) |
| 2020-10-29 19:50:56 | <koz_> | How would I spell 'given parser p, try it, giving Nothing if it fails, and Just its result otherwise, eat whatever input remains either way' in attoparsec? |
| 2020-10-29 19:51:24 | × | kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection) |
| 2020-10-29 19:51:36 | <maerwald> | this sounds like a good exercise for monsterchrom's students |
| 2020-10-29 19:51:39 | <dminuoso> | % :t optional -- koz_ |
| 2020-10-29 19:51:39 | <yahb> | dminuoso: Alternative f => f a -> f (Maybe a) |
| 2020-10-29 19:52:08 | → | bartemius joins (~bartemius@109-252-20-20.nat.spd-mgts.ru) |
| 2020-10-29 19:52:09 | <dminuoso> | Dunno about attoparsec, you might have to disable backtracking |
| 2020-10-29 19:52:17 | <koz_> | dminuoso: That's why I'm asking. |
| 2020-10-29 19:52:28 | <avdb> | dminuoso: Is it also available for basic vim? Neo got too much features that I don't need. |
| 2020-10-29 19:52:35 | <maerwald> | avdb: yes |
| 2020-10-29 19:53:03 | <maerwald> | yes, neovim is "agile" |
| 2020-10-29 19:53:08 | <avdb> | Ah okay, thanks. Currently checking the github page. |
| 2020-10-29 19:53:30 | <maerwald> | I think ppl wrote better software before git |
| 2020-10-29 19:53:38 | <koz_> | I guess I could use count with a count of 1. |
| 2020-10-29 19:53:50 | <maerwald> | there was a time when a bad release was embarrassing |
| 2020-10-29 19:53:54 | <maerwald> | now with git, no one cares |
| 2020-10-29 19:54:10 | hackage | addy 0.1.0.1 - A full-featured library for parsing, validating, and rendering email addresses https://hackage.haskell.org/package/addy-0.1.0.1 (PeterJones) |
| 2020-10-29 19:54:30 | × | jakob_ quits (~textual@p200300f49f16220061022725fbc9d567.dip0.t-ipconnect.de) (Quit: My Laptop has gone to sleep. ZZZzzz…) |
| 2020-10-29 19:54:51 | → | kritzefitz joins (~kritzefit@212.86.56.80) |
| 2020-10-29 19:54:53 | × | kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection) |
| 2020-10-29 19:54:57 | <dminuoso> | koz_: It seems you cant disable backtracking on attoparsec mmm |
| 2020-10-29 19:55:03 | <ibloom> | Is there a good reason why Data.Vector and Data.Vector.Storable are different libraries and different types? |
| 2020-10-29 19:55:03 | <avdb> | maerwald: Do you mean it's better? To be honest I never checked the differences until now. |
| 2020-10-29 19:55:08 | <koz_> | Count with a count of 1 works well enough for me. |
| 2020-10-29 19:55:17 | <avdb> | I used neovim at first but for some reason I reverted back to classic vim. |
| 2020-10-29 19:55:27 | <maerwald> | avdb: no idea. It's broken on my keyboard layout, so I can't reasonably use neovim |
| 2020-10-29 19:55:29 | <koz_> | ibloom: Yes. Vector can store anything, Vector.Storable can only store... well, Storable instances. |
| 2020-10-29 19:55:47 | <koz_> | They're represented differently too - in particular, Storable Vectors are designed for passing to FFI. |
| 2020-10-29 19:55:50 | × | alp_ quits (~alp@2a01:e0a:58b:4920:9819:e541:8055:66cf) (Ping timeout: 264 seconds) |
| 2020-10-29 19:56:04 | → | p8m joins (p8m@gateway/vpn/protonvpn/p8m) |
All times are in UTC.