2025/11/12

Newest at the top

2025-11-12 12:42:19 +0100humasect(~humasect@dyn-192-249-132-90.nexicom.net) (Ping timeout: 256 seconds)
2025-11-12 12:37:17 +0100humasect(~humasect@dyn-192-249-132-90.nexicom.net) humasect
2025-11-12 12:36:33 +0100Pozyomka(~pyon@user/pyon) pyon
2025-11-12 12:36:26 +0100humasect(~humasect@dyn-192-249-132-90.nexicom.net) (Remote host closed the connection)
2025-11-12 12:35:05 +0100humasect(~humasect@dyn-192-249-132-90.nexicom.net) humasect
2025-11-12 12:34:45 +0100 <__monty__> bwe: Can you be a bit more specific because so far it just sounds like sequencing, no? `lexeme fooParser *> lexeme barParser *> lexeme abParser`
2025-11-12 12:30:26 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 256 seconds)
2025-11-12 12:28:32 +0100starving_drummer(~berke@user/Starving-Drummer:76786) Starving_Drummer
2025-11-12 12:28:19 +0100trickard_trickard
2025-11-12 12:28:07 +0100Googulator38(~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu)
2025-11-12 12:27:52 +0100Googulator38(~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) (Quit: Client closed)
2025-11-12 12:23:14 +0100 <merijn> bwe: What exactly are you trying to parse?
2025-11-12 12:22:58 +0100 <merijn> bwe: Yeah, `lookAhead` does what you described wanting, but the real question is "is what you want sensible for a parser" :p
2025-11-12 12:20:02 +0100Googulator38(~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu)
2025-11-12 12:19:47 +0100Googulator38(~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) (Quit: Client closed)
2025-11-12 12:19:02 +0100 <bwe> merijn: There is `lookAhead`. Though I feel right now I'm trying the wrong problem, I actually need to parse word for word and based on the list should decide whether I have simultaneous occurence of both: "foo bar A foo bar B" should extract "A" and "B"
2025-11-12 12:16:54 +0100 <merijn> Is there something like `lookahead`
2025-11-12 12:16:53 +0100 <bwe> merijn: It is. How do I feed the same input to two parsers (without resorting to call parseMaybe twice in a wrapper function that's no longer :: Parser ParsedResult)?
2025-11-12 12:15:38 +0100 <merijn> bwe: That sounds like the wrong question. Sounds like the real question is "how can I feed the same input to two parsers"?
2025-11-12 12:13:18 +0100 <bwe> (I am trying to write a parser that runs two parsers on the same input and it should return only if both parsers are successful)
2025-11-12 12:12:21 +0100 <bwe> `try` in Megaparsec backtracks on failure, how can I backtrack on succeeding? https://hackage.haskell.org/package/megaparsec-9.7.0/docs/Text-Megaparsec.html#v:try
2025-11-12 12:11:16 +0100acidjnk(~acidjnk@p200300d6e717198650058a5e82e156ef.dip0.t-ipconnect.de) acidjnk
2025-11-12 12:07:10 +0100xff0x(~xff0x@2405:6580:b080:900:bad6:34c9:62ae:89f7)
2025-11-12 12:03:29 +0100 <merijn> BS/LBS/T and M/IM/S/IS for Map, IntMap, Set, and IntSet from containers are all pretty widely used
2025-11-12 12:00:37 +0100 <haskellbridge> <Morj> I prefer a way like tоmsmeding said, and using ByteString, LazyByteString, Text instead of abbreviations
2025-11-12 12:00:33 +0100 <__monty__> So you litter your code with expletives instead?! : >
2025-11-12 12:00:11 +0100 <merijn> Fully written out qualification is for mad men
2025-11-12 11:59:54 +0100 <merijn> I always import ByteString/lazy ByteString as BS and LBS respectictively, T for Data.Text, etc.
2025-11-12 11:59:25 +0100 <merijn> Morj: I mean some modules are explicitly intended for qualified imports, but generally people use abbreviations
2025-11-12 11:58:06 +0100szkl(uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2025-11-12 11:56:11 +0100 <tomsmeding> Morj: HLS even manages to auto-add the qualified import sometimes if you write `Lazy.fromStrict`
2025-11-12 11:53:26 +0100Nachtgespenst(~user@user/siracusa) siracusa
2025-11-12 11:52:29 +0100 <haskellbridge> <Morj> Though you remind me that I wrote this piece of code yesterday: "mimeRender _ = Data.ByteString.Lazy.fromStrict . Data.Text.Encoding.encodeUtf8" - and then made HLS auto-add the qualified import, and it was nice
2025-11-12 11:51:31 +0100Enrico63(~Enrico63@2a0b:e541:10d0:0:9efc:e8ff:fe24:3213) (Quit: Client closed)
2025-11-12 11:51:06 +0100 <haskellbridge> <Morj> Actually a based opinion if he were writing rust
2025-11-12 11:48:48 +0100 <merijn> I guess we're still talking Henning's naming? He's a believer you should always use everything qualified and his naming scheme basically forces you too, but it also results in completely unreadable hackage docs >.>
2025-11-12 11:47:29 +0100 <haskellbridge> <Morj> Yeah, ocaml-style. I thought that maybe not because there are other datatype definitions in the same module
2025-11-12 11:46:27 +0100 <__monty__> Meant to be used fully qualified?
2025-11-12 11:40:45 +0100fp(~Thunderbi@130.233.70.206) fp
2025-11-12 11:30:49 +0100Googulator38(~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu)
2025-11-12 11:30:39 +0100Googulator38(~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) (Quit: Client closed)
2025-11-12 11:29:56 +0100merijn(~merijn@77.242.116.146) merijn
2025-11-12 11:28:24 +0100acidjnk(~acidjnk@p200300d6e71719864df0570ed0b0e3ba.dip0.t-ipconnect.de) (Read error: Connection reset by peer)
2025-11-12 11:25:51 +0100 <haskellbridge> <Morj> Nah, doesn't look like it
2025-11-12 11:25:25 +0100 <haskellbridge> <Morj> Maybe it's just ocaml-style!
2025-11-12 11:25:07 +0100trickard_(~trickard@cpe-62-98-47-163.wireline.com.au)
2025-11-12 11:24:25 +0100 <mauke> Enrico63: https://hackage.haskell.org/package/unique-logic-0.4.0.1/docs/doc-index.html count the number of classes named 'C' and types named 'T'
2025-11-12 11:18:01 +0100comerijn(~merijn@77.242.116.146) (Ping timeout: 264 seconds)
2025-11-12 11:15:37 +0100ubert1(~Thunderbi@178.165.182.105.wireless.dyn.drei.com) (Ping timeout: 264 seconds)
2025-11-12 11:14:29 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 256 seconds)