Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 461 462 463 464 465 466 467 468 469 470 471 .. 5022
502,152 events total
2020-10-06 12:40:04 <maerwald> quazimod1: informally you could say: if your language is pure, the evaulation strategy shouldn't define its semantics
2020-10-06 12:40:16 <dminuoso> Habib: pretty-simple is rather a sort of "generic" implementation for anything that has a show instance
2020-10-06 12:40:34 <sm[m]> oh wow that's some great docs
2020-10-06 12:40:37 × cosimone quits (~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6) (Quit: Quit.)
2020-10-06 12:40:40 <dminuoso> think of it as a "parser" that reads the Haskell Report compliant deriving based Show instances, and then emits some prettyprinter code, layouts it, and renders it to string.
2020-10-06 12:40:50 <quazimod1> ski: ocaml's killing me
2020-10-06 12:40:51 <Habib> dminuoso: afaiu, pretty-simple just takes what show produces and goes through the string and aligns things based on braces and such
2020-10-06 12:40:59 <dminuoso> Habib: right, its very rigid
2020-10-06 12:41:02 <dminuoso> but your assessment is right
2020-10-06 12:41:06 <dminuoso> they are somewhat orthogonal
2020-10-06 12:41:08 <dminuoso> but not entirely unrelated
2020-10-06 12:41:15 <quazimod1> > informally you could say: if your language is pure, the evaulation strategy shouldn't define its semantics
2020-10-06 12:41:17 <lambdabot> <hint>:1:51: error: <hint>:1:51: error: parse error on input ‘,’
2020-10-06 12:41:19 <quazimod1> gonna have to do more reading
2020-10-06 12:41:22 <quazimod1> because i don't fully get that
2020-10-06 12:42:00 × todda7 quits (~torstein@athedsl-217541.home.otenet.gr) (Ping timeout: 272 seconds)
2020-10-06 12:42:11 × motherfsck quits (~motherfsc@unaffiliated/motherfsck) (Ping timeout: 240 seconds)
2020-10-06 12:42:28 <quazimod1> "Finally, we observe that call-by-name reasoning principles are unsound in compilers for monadic Haskell"
2020-10-06 12:42:29 <dminuoso> Habib: If you just want some ad-hoc "make show instances more readable" with no effort, use pretty-simple. If you want to generate user-facing output (regardless of whether thats html, markdown, text, whatever), prettyprinter is a great option. :)
2020-10-06 12:42:35 <ski> a pretty-printer is a case where laziness can be useful. in a strict language, you can make multiple passes through the data, passing back the top-level outputs from last pass as inputs. (this is basically what attribute-grammars do). with non-strictness, you can just "do a single pass" (syntactically, so less clutter), but you have to be a bit careful to make sure you don't access a late input prematurely
2020-10-06 12:42:39 <quazimod1> doesn't that mean that they found that strict is kinda unworkable for monadic haskell
2020-10-06 12:43:28 <Habib> dminuoso: okay, i understand that now, i think i was just expecting something more like pretty-simple as that was the comparison being made on the aelve guide
2020-10-06 12:44:05 <Habib> i still don't quite understand prettyprinter, but i don't want to dwell on that when it's not what i need anyway
2020-10-06 12:44:12 <maerwald> quazimod1: it bottoms out :p
2020-10-06 12:44:19 jonatanb joins (~jonatanb@79.184.190.239.ipv4.supernova.orange.pl)
2020-10-06 12:44:20 <quazimod1> i don't know what that means!!
2020-10-06 12:44:23 <dminuoso> Habib: prettyprinter is one of the finer libraries out there :)
2020-10-06 12:44:25 <quazimod1> lol
2020-10-06 12:44:31 <quazimod1> FP world is >so weird<
2020-10-06 12:44:38 <dminuoso> It has really good ergonomics, and makes writing output fun.
2020-10-06 12:44:49 <Habib> i get that impression, but for now, it's just gonna stay over my head i guess
2020-10-06 12:45:00 <dminuoso> Fair enough. Just dont be scared, it's very easy to use.
2020-10-06 12:45:03 × 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-06 12:45:15 <ski> quazimod1 : where was that quote from ?
2020-10-06 12:45:18 <maerwald> quazimod1: the paper explicitly says that semantics for different eval strategies are only equivalent if you ignore error/non-termination etc
2020-10-06 12:45:33 <maerwald> bc these will never be equivalent
2020-10-06 12:45:38 <quazimod1> ski: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.27.7800&rep=rep1&type=pdf
2020-10-06 12:45:41 <quazimod1> in the blurb
2020-10-06 12:46:01 <quazimod1> maerwald: that makes intuitive sense to me
2020-10-06 12:46:16 <quazimod1> wow haskell really is a research language isn't it
2020-10-06 12:46:26 <quazimod1> it's purpose is not commercial in the slightest
2020-10-06 12:46:57 <sm[m]> prettyprinter docs always are a bit opaque, even these; they sssume certain knowledge and jargon
2020-10-06 12:47:29 <lortabac> quazimod1: it's a research language that is also used commercially
2020-10-06 12:47:29 <maerwald> quazimod1: that's how it began... like your first date is exciting, but the truth settles soon enough
2020-10-06 12:47:38 <dminuoso> sm[m]: Doesn't any library?
2020-10-06 12:47:44 nbloomf joins (~nbloomf@2600:1700:83e0:1f40:f500:dc4c:283a:a1a5)
2020-10-06 12:47:47 <dminuoso> I mean it's much worse with most of eds libraries.
2020-10-06 12:48:10 <maerwald> it's already too widely used to make drastic backwards-incompatible changes
2020-10-06 12:48:14 <dminuoso> Can't even use the damn thing without getting confused by half a dozen ncatlab articles.
2020-10-06 12:48:18 <maerwald> we can't even get rid of String :)
2020-10-06 12:48:35 <sm[m]> many docs are better at defining their terms for a non CS student eg
2020-10-06 12:48:50 <Habib> dminuoso: let me try one last time for today :). the question in my mind about the way prettyprinter works is, i don't quite understand the separation between functions like vsep, pretty, <+>, nest, align - which all seem to suggest stuff to do layouting - and the layoutSimple, layoutPretty, etc. functions
2020-10-06 12:48:51 <dminuoso> lortabac: That surely can't be a bad thing. PHP was a *toy* language that is also used commercially now.
2020-10-06 12:49:01 <quazimod1> maerwald: seen unison language?
2020-10-06 12:49:02 <lortabac> dminuoso: :D
2020-10-06 12:49:05 <quazimod1> that thing gives me hope
2020-10-06 12:49:14 <sm[m]> it wouldn't be hard to give a better intro to pretty printing in plain English. It's probably out there somewhere
2020-10-06 12:49:30 <maerwald> quazimod1: never seen it
2020-10-06 12:49:43 <dminuoso> Habib: https://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf is a very nice read that might be easier than to dive into the implementation.
2020-10-06 12:49:47 <quazimod1> it's pretty schmick
2020-10-06 12:50:08 <quazimod1> some things in it are non strict
2020-10-06 12:50:23 <quazimod1> such as boolean expressions
2020-10-06 12:50:27 <Habib> dminuoso: cheers, i'll take a look at this tonight :_
2020-10-06 12:50:29 <Habib> :)
2020-10-06 12:50:31 <quazimod1> but then again i'm sure that's the case for many languages
2020-10-06 12:50:35 <quazimod1> ... all languages?
2020-10-06 12:50:46 <dminuoso> Habib: for me, it was just two bindings that instantly explained the entirety of prettyprinter to me
2020-10-06 12:51:26 <sm[m]> (Maybe that General workflow section is it ? I'll have to read on a big screen)
2020-10-06 12:51:27 <ski> quazimod1 : ah (looked at page 20, which talks about that). that quote is about intermediate representation, in conjunction with generating code to do update-in-place, inside a compiler. it doesn't apply at the user-level of the language
2020-10-06 12:51:39 <dminuoso> Habib: Staring at hardline and softline for just a minute made me understand what Doc was about. :)
2020-10-06 12:51:45 <kuribas> dminuoso: same for me, I have heared a lot of scary stories about lazyness causing, spaceleaks, but I never experienced it...
2020-10-06 12:52:12 <ski> maerwald : "only equivalent if you ignore error/non-termination etc" -- yes, because partiality and non-termination are effects :)
2020-10-06 12:52:16 <chreekat[m]1> I also bounced pretty hard off the division of paradigms in that pretty printer lineage
2020-10-06 12:52:18 <ski> (side-effects, in Haskell)
2020-10-06 12:52:18 <quazimod1> so what i'm getting is that I should use python for my quantitative finance program
2020-10-06 12:52:36 <dminuoso> quazimod1: If you feel more comfortable with that, go for it.
2020-10-06 12:52:44 <quazimod1> dminuoso: i want to burn python
2020-10-06 12:52:53 <quazimod1> the quintessential 'im not a programmer' language
2020-10-06 12:53:08 <quazimod1> fuck me the amount of garbage python code i've had to wade through
2020-10-06 12:53:09 <dminuoso> quazimod1: All Im saying is, dont let the lazyness distract you from picking the language. It shouldn't matter at all.
2020-10-06 12:53:15 <ski> dminuoso : "without getting confused by half a dozen ncatlab articles" -- haha :)
2020-10-06 12:53:47 <maerwald> quazimod1: is this about an actual business or some toy program
2020-10-06 12:54:39 <dminuoso> quazimod1: If you're not comfortable with Haskell, your main concerns should be "how long until you become comfortable enough to become productive" or "do you have good library support for what you intend to do", or "do you have the ability to hire/train people in the desired language if needed"
2020-10-06 12:54:54 <quazimod1> maerwald: it's a project that i'm starting but professionally i work as a consulting tech lead for startups & corporate innovation ventures, i've taken a lot of things into production and this will be no different
2020-10-06 12:55:11 <quazimod1> the only difference is that nothing i've done before was purely my choice, my team, or time sensitive
2020-10-06 12:55:27 <quazimod1> so we settled with the RoR/Djangos, the typescripts, etc
2020-10-06 12:55:33 cpressey joins (~cpressey@88.144.95.3)
2020-10-06 12:55:37 noirin joins (~noirin@185.103.96.135)
2020-10-06 12:55:47 <maerwald> quazimod1: doing a startup haskell project is very dangerous with little knowledge about the language imo and I'd advise against it
2020-10-06 12:55:58 <sm[m]> Haskell may not be the quickest or cheapest to production but it will be the cheapest over the long haul
2020-10-06 12:55:58 <quazimod1> and any time any data science/computation was needed someone would appear who wanted to do it in python, which everyone else was familiar with
2020-10-06 12:56:07 <dminuoso> I second what maerwald just said. :)
2020-10-06 12:56:28 <maerwald> Haskell is something you pick if you know what you're doing.
2020-10-06 12:56:34 × oxide quits (~lambda@unaffiliated/mclaren) (Ping timeout: 258 seconds)
2020-10-06 12:56:55 <kuribas> clojure when you don't...
2020-10-06 12:56:59 <maerwald> lel
2020-10-06 12:57:04 <quazimod1> i'm not worried about picking up and learning something, im' worried about having to fix another man's mistakes
2020-10-06 12:57:18 <sm[m]> bah that has never been my approach :)
2020-10-06 12:57:19 <kuribas> at least if you're confused about types
2020-10-06 12:57:21 <quazimod1> django & it's 'rest framework' are full of mistakes that you have to fix

All times are in UTC.