Post Atj7OZiUVGqmPyUHT6 by [email protected] | |
More posts by [email protected] | |
Post #AtehRggteey5Tbj2h6 by [email protected] | |
0 likes, 0 repeats | |
#BabelOfCode 2024Week 7Language: HaskellConfidence level: Medium lowPREV WEEK: … | |
Post #AtehRgp3ALURstXYP2 by [email protected] | |
0 likes, 0 repeats | |
I am not sure whether the reason I previously failed Haskell is1. Because it… | |
Post #AtehRgvmlIsUDmgvtw by [email protected] | |
0 likes, 0 repeats | |
@mcc the overcautious approach this language has towards causally chained opera… | |
Post #AtehkD3y2DXn5bLg2K by [email protected] | |
0 likes, 0 repeats | |
@mcc of course doing it like this always glues things together that do not rela… | |
Post #AtfPh45NLrSMMSJmca by [email protected] | |
0 likes, 0 repeats | |
Question: The Haskell 2010 documentation describes its basic I/O functions, som… | |
Post #AtfPh4C6woqOhLTA7U by [email protected] | |
0 likes, 0 repeats | |
In the Haskell docshttps://wiki.haskell.org/Haskell_in_5_stepsIt states this is… | |
Post #AtfPh4JuTp5B5X7OHA by [email protected] | |
0 likes, 0 repeats | |
I run the given ghc --make command. It leaves some crap in src/. Say I do not w… | |
Post #AtfPh4Pa8jcTN7lv7I by [email protected] | |
0 likes, 0 repeats | |
Welp, after 25+ years of trying, I have written my first working Haskell progra… | |
Post #AtfPh4WJjh0Vi0vIcC by [email protected] | |
0 likes, 0 repeats | |
I am trying to switch my program to Cabal-driven builds. This is one of the que… | |
Post #AtfPh4cLNHpO0hk70a by [email protected] | |
0 likes, 0 repeats | |
I am attempting to call "openFile" on the first command line argument… | |
Post #AtfPh4jmvbmaNnE3c0 by [email protected] | |
0 likes, 0 repeats | |
Answer to my previous question was I naively took the first suggestion from hls… | |
Post #AtfPh4poZCbSgU2s0O by [email protected] | |
0 likes, 0 repeats | |
Haskell people, please help me.There are 3 image attachments to this post, show… | |
Post #AtfPh4wCBThv0H1xx2 by [email protected] | |
0 likes, 0 repeats | |
Another cursed question.See attachment 1. This code compiles.Reading the docume… | |
Post #AtfPh52vmR5xLABLRw by [email protected] | |
0 likes, 0 repeats | |
My problem can be explained if when I put dependency "megaparsec ^>=9.7… | |
Post #AtfPh59fNOTzg3Kiwq by [email protected] | |
0 likes, 0 repeats | |
I never solved the space1 problem but worked around it with a solution from @dy… | |
Post #AtfPh5H6viRC38ofYG by [email protected] | |
0 likes, 0 repeats | |
I went from OCaml to Rust and coming back to Functional Land, one thing I'm… | |
Post #AtfPh5N8ZJG4LpdTwe by [email protected] | |
0 likes, 0 repeats | |
I've been having extensive problems in my program using the symbol "sp… | |
Post #AtfPh5TsAGe6gimrRY by [email protected] | |
0 likes, 0 repeats | |
One more question (I think this question might be outright goofy).Is there a sp… | |
Post #AtfPh5bfhGst4uR5bE by [email protected] | |
0 likes, 0 repeats | |
Haskell Programmers Will Literally Write Multiparagraph Comments Instead Of Jus… | |
Post #AtfPh5i3JXzLOhQBXs by [email protected] | |
0 likes, 0 repeats | |
So the answer to my last question was to use "parse"/"runParser&… | |
Post #AtfPh5omuVNNjaZZ2m by [email protected] | |
0 likes, 0 repeats | |
Alright. Thanks for the explanations y'all. I am now correctly parsing my i… | |
Post #AtfPh63g19HmTlXSFc by [email protected] | |
0 likes, 0 repeats | |
I will say. I could have done *this entire 50 line Haskell program* in the foll… | |
Post #AtfPj91bxU5wG8Y6AC by [email protected] | |
0 likes, 0 repeats | |
@mcc love perl's "or die" | |
Post #AtfPj98LYRTyb1hTf6 by [email protected] | |
0 likes, 1 repeats | |
@Norgg @mcc i think `or die` might technically also work in php, but it wouldn&… | |
Post #Atgi3Nmyli5mApSsZU by [email protected] | |
0 likes, 0 repeats | |
@Norgg <Larry Wall> THEN PERISH | |
Post #Atgi3NumIiKYZ176jA by [email protected] | |
0 likes, 0 repeats | |
@mcc @Norgg that'll be when you use autodie https://metacpan.org/pod/autodie | |
Post #Atgi7J44H99EgCKSRc by [email protected] | |
0 likes, 0 repeats | |
@mcc haskell is never going to compete with perl on concision. but you might fe… | |
Post #Atgi7JAns6XH15TpwW by [email protected] | |
0 likes, 0 repeats | |
@dysfun Honestly, I *don't* feel confident about the megaparsec version the… | |
Post #Atgi7JGTX14ZIg8Mme by [email protected] | |
0 likes, 0 repeats | |
@mcc sure, but you already know rust and ocaml much better than you know haskel… | |
Post #Atgi7ptaD9MwVEg3BQ by [email protected] | |
0 likes, 0 repeats | |
@mcc you can replace that with a case. you've just handled a case with mona… | |
Post #Atgi7q0fmn2YrDziEa by [email protected] | |
0 likes, 0 repeats | |
@mcc (that would be like `inFiles <- getArgs; case inFiles of ...`) | |
Post #Atgi8yjmp2igDPdjGq by [email protected] | |
0 likes, 0 repeats | |
@mcc would now be a good time to point out how very blessed you are by megapars… | |
Post #Atgi9CnUY40BoxTszQ by [email protected] | |
0 likes, 0 repeats | |
@dysfun Yes, in fact this is why I'm using megaparsec and not something els… | |
Post #Atgi9ZelYfgkiYZk5A by [email protected] | |
0 likes, 0 repeats | |
@mcc monads have a way of running them that varies depending on the monad. in t… | |
Post #Atgi9vN8osf84GUyfI by [email protected] | |
0 likes, 0 repeats | |
@mcc i'm guessing L.skipSome is a`LineParser ()`, thus you must sequence it… | |
Post #Atgi9vTASTU0MxJn3g by [email protected] | |
0 likes, 0 repeats | |
@dysfun But can't I assign the monad to a let if I do not then *call it*? | |
Post #Atgi9vZC64Isfe8bS4 by [email protected] | |
0 likes, 0 repeats | |
@dysfun That is, I don't want to invoke it on that line. I just want to def… | |
Post #Atgi9verkyqAxEn8IC by [email protected] | |
0 likes, 0 repeats | |
@mcc oh i see. yes, you can do that.L.decimal is a `Parser Int`. the rule is th… | |
Post #Atgi9vkXPtNTEpRf8K by [email protected] | |
0 likes, 0 repeats | |
@dysfun This is a very clear response, thank you. | |
Post #Atgi9vpr67dBVJvuQC by [email protected] | |
0 likes, 0 repeats | |
@mcc return is a function btw, not a keyword. it is an alias of `pure`, which i… | |
Post #Atgi9vvsjiS3o0kioa by [email protected] | |
0 likes, 0 repeats | |
@mcc as for the other thing, i'm a bit out of haskell these days, but maybe… | |
Post #Atgi9w1YOczM5bPFei by [email protected] | |
0 likes, 0 repeats | |
@dysfun okay. so if I Monad there, it won't care the value is thrown away, … | |
Post #Atgi9w7a2DoEOIE436 by [email protected] | |
0 likes, 0 repeats | |
@mcc if the value is `()` | |
Post #Atgi9wCtiS3wemiJKy by [email protected] | |
0 likes, 0 repeats | |
@dysfun I'm pretty sure the value is a value tho, not () | |
Post #Atgi9wIvM2soxTX7jM by [email protected] | |
0 likes, 0 repeats | |
@mcc oh, in which case nevermind. | |
Post #Atj7OZiUVGqmPyUHT6 by [email protected] | |
0 likes, 0 repeats | |
The Haskell documentation is clearly written for humans to read— *some* human… | |
Post #Atj7OZpa4uWOlxnwWG by [email protected] | |
0 likes, 0 repeats | |
Haskell syntax question: Is there a thing I can do to convince GHC that when I … | |
Post #Atj7OZvxhBcr5kn2Su by [email protected] | |
0 likes, 0 repeats | |
I've reached the part of the puzzle that inspired me to write this in Haske… | |
Post #Atj7Oa2hI90tQdwPxo by [email protected] | |
0 likes, 0 repeats | |
(Okay functional fans, THIS is the point where you can reply to object I'm … | |
Post #Atj7Oa9Qt6OvlX5nSi by [email protected] | |
0 likes, 0 repeats | |
Anyway, the Amb monad, as offered by the "nondeterminism" package¹:h… | |
Post #Atj7OaHaOmvIAouJAe by [email protected] | |
0 likes, 0 repeats | |
@mcc "Amb" means "with" in Catalan so I keep reading your p… | |
Post #Atj7OaNG3hSaSPYq0m by [email protected] | |
0 likes, 0 repeats | |
@cford Interesting! It's supposed to be short for "Ambiguous". | |
Post #Atj7OaTdfyZ2mCXvxQ by [email protected] | |
0 likes, 0 repeats | |
@mcc @cford I’ve also seen it referred to as the “angelic operator”, as a… | |
Post #Atj7ObRY5EUDm0ZmL2 by [email protected] | |
0 likes, 0 repeats | |
So here's a test program with Amb. You can probably read it without knowing… | |
Post #Atj7OcQsPDXiqDGkvg by [email protected] | |
0 likes, 0 repeats | |
Then I try to make it *marginally* more complex and I run facefirst into the wa… | |
Post #Atj7OdrV5iQxH4jX4C by [email protected] | |
0 likes, 0 repeats | |
(Note: If my current mental model of the syntax is correct, this actually isn&#… | |
Post #Atj7Oep3WI4YFmb5tY by [email protected] | |
0 likes, 0 repeats | |
If I am compiling a Haskell 2010 program in GHC 9.6.7 on an AMD64 machine, and … | |
Post #Atj7OfmFyBQZDOINAe by [email protected] | |
0 likes, 0 repeats | |
Come use Haskell: Once you can get it to work at all, time travel is free! But … | |
Post #Atj7OgoQ7ckiQOJcBM by [email protected] | |
0 likes, 0 repeats | |
I was really expecting to milk 5-6 more posts out of the process of learning to… | |
Post #Atj7OhlcZW6jO00tSS by [email protected] | |
0 likes, 0 repeats | |
Say I want to count the decimal digits in a Haskell Integer (ie, the bignum typ… | |
Post #Atj7Oi6XJkq0Qrnb3g by [email protected] | |
0 likes, 0 repeats | |
It seems like if you're already using any kind of bignum type (which Intege… | |
Post #Atj7OjMAf6wEJe7b4C by [email protected] | |
0 likes, 0 repeats | |
Part 2, which is usually supposed to be a gotcha¹, took about 6 lines of code.… | |
Post #Atj7OkYyB0lo3d7Kee by [email protected] | |
0 likes, 0 repeats | |
To wrap up: Using Haskell was a powerful argument in favor of *a Haskell-like l… | |
Post #Atj7OlSyolZarLK3xQ by [email protected] | |
0 likes, 0 repeats | |
I, in the aspect of Eris, shall now throw a golden ball of discord into the gar… | |
Post #Atj7OlntZ0IruD6lYe by [email protected] | |
0 likes, 0 repeats | |
Gonna be honest these questions created remarkably little discord among the Mas… | |
Post #AtpBR4OMzNxwttHSAS by [email protected] | |
0 likes, 0 repeats | |
@mark @mcc my supervisor has a habit of writing out “alpha”, “beta” etc… | |
Post #AtpBS4v8Vf10pT5Uqe by [email protected] | |
0 likes, 0 repeats | |
@mark @mcc I feel like I'll never be truly comfortable dealing with mathema… | |
Post #AtpBSEawXanwpjiVlI by [email protected] | |
0 likes, 0 repeats | |
@mark oh, you have two-letter-variable-names, but they’re… all… of the fo… | |
Post #AtpBSGgKmWIzJ2FqRU by [email protected] | |
0 likes, 0 repeats | |
@stilescrisis @mark @mcc suddenly I am back in fluid mechanics class, trying to… | |
Post #AtpBURSrf8kHKLzUgq by [email protected] | |
0 likes, 0 repeats | |
@ChateauErin @stilescrisis @mark @mcc epsilon and e, and the silly joy of writi… | |
Post #AvlUCbDDtb1iRd4U4W by [email protected] | |
0 likes, 0 repeats | |
@mcc It looks like `space1` is exported by `Text.Megaparsec.Char` and not `Text… |