Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 427 428 429 430 431 432 433 434 435 436 437 .. 5022
502,152 events total
2020-10-05 14:54:53 <fog23> but what could that enable, and what would it lose?
2020-10-05 14:54:57 <Cheery> I just recently figured out dhall is really short distance away from a markup language.
2020-10-05 14:55:07 ryansmccoy joins (~ryansmcco@156.96.151.132)
2020-10-05 14:55:39 <fog23> sure, i get how the "idiomatic" code is easier to read and write
2020-10-05 14:55:45 mav1 joins (~mav@p5dd5a8a0.dip0.t-ipconnect.de)
2020-10-05 14:55:55 × jle` quits (~mstksg@unaffiliated/mstksg) (Ping timeout: 240 seconds)
2020-10-05 14:55:56 <fog23> but, everything i do is based on traversals
2020-10-05 14:56:12 <dminuoso> Well, people coming over to Haskell have the same exact problem.
2020-10-05 14:56:12 <fog23> i thought it was everything anyone *could* do
2020-10-05 14:56:33 <dminuoso> Everything they do is ad-hoc imperative manipulation of state, and they cant figure out how to translate the *idea* into something declarative
2020-10-05 14:56:55 <dminuoso> This is the same, just in reverse.
2020-10-05 14:56:55 <fog23> right, but thats more like just restating the point about idioms
2020-10-05 14:56:59 <fog23> yeah
2020-10-05 14:57:20 phaul joins (~phaul@ruby/staff/phaul)
2020-10-05 14:57:27 <fog23> i was trying to understand what we actually gain from the syntax built to facilitate lazy recursion
2020-10-05 14:57:27 <Cheery> if you think about things such as html, how is it deconstructed or constructed?
2020-10-05 14:57:35 × cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9)
2020-10-05 14:57:42 <Cheery> if you wanted to examine it from what it encodes usually.
2020-10-05 14:57:50 <fog23> idk! its top down evaluation right?
2020-10-05 14:58:08 hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-lsiqjycknfirtsck)
2020-10-05 14:58:09 <fog23> we have more of an AST right? like a "lambda tree" or something
2020-10-05 14:58:52 <fog23> like *everything* is made by functional binding and dereferencing, with no top down evaluation at all
2020-10-05 14:59:00 polyphem joins (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889)
2020-10-05 14:59:06 <fog23> i guess thats the main difference between imperative and functional programming...
2020-10-05 14:59:33 <fog23> so i cant really see how you could speak of "producers/consumers" in HTML
2020-10-05 14:59:47 <dminuoso> Well, formally that's the difference between call-by-value and call-by-name/need
2020-10-05 15:00:01 × Guest4175 quits (~luka@185.204.1.185) ()
2020-10-05 15:00:12 <fog23> to do with the top level let bindings?
2020-10-05 15:00:31 <fog23> i guess we do alot with precedence
2020-10-05 15:00:32 <dminuoso> Interestingly, in C++ the term "call-by-value" is grossly misunderstood, as people have introduced something called call-by-reference.
2020-10-05 15:00:42 × Kaivo quits (~Kaivo@104-200-86-99.mc.derytele.com) (Ping timeout: 265 seconds)
2020-10-05 15:00:43 <dminuoso> But that no longer is about evaluation semantics, but oh well.
2020-10-05 15:00:47 ddellacosta joins (~dd@86.106.121.168)
2020-10-05 15:01:07 <fog23> whats the upshot of these 3 different things?
2020-10-05 15:01:32 <fog23> call by name/value/reference...
2020-10-05 15:01:38 <dminuoso> Well, call-by-value just means to evaluate an argument before you enter the function
2020-10-05 15:01:46 <dminuoso> call-by-need/name does not
2020-10-05 15:01:47 <Cheery> fog23: producer outputs the html. For example template generators or website backends, etc...
2020-10-05 15:01:50 <fog23> "enter a function" ?
2020-10-05 15:01:50 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-05 15:01:51 <dolio> I think they say 'pass' instead of 'call'.
2020-10-05 15:02:06 alp joins (~alp@2a01:e0a:58b:4920:79a7:73ea:36f8:a1c9)
2020-10-05 15:02:09 <dminuoso> dolio: You'd lose on a google fight on this one.
2020-10-05 15:02:12 <Cheery> fog23: consumer is what reads and interprets html.
2020-10-05 15:02:13 <fog23> Cheery: why are you speaking about code generation though?
2020-10-05 15:02:34 <dminuoso> But you might be right that that's more common. Still, the phrase "call by reference" is used far too foten
2020-10-05 15:02:41 <Cheery> fog23: because if I want to describe a type, I'd like to describe it through how it's constructed and destroyed.
2020-10-05 15:02:46 <fog23> i still have no idea what they mean...
2020-10-05 15:02:54 Kaivo joins (~Kaivo@ec2-15-222-231-32.ca-central-1.compute.amazonaws.com)
2020-10-05 15:03:19 <fog23> Cheery: right, we have recursive datatypes, but thats no like, HTML
2020-10-05 15:03:20 conal joins (~conal@64.71.133.70)
2020-10-05 15:03:26 × jespada quits (~jespada@90.254.246.48) (Ping timeout: 256 seconds)
2020-10-05 15:04:07 <dolio> dminuoso: Well, if they did say 'pass', it could be excused, at least. :)
2020-10-05 15:04:14 <dminuoso> dolio: https://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_reference
2020-10-05 15:04:17 <dminuoso> There's an article entry even! :)
2020-10-05 15:04:29 xerox_ joins (~xerox@unaffiliated/xerox)
2020-10-05 15:04:45 <fog23> hmm, so its to do with making copies?
2020-10-05 15:04:51 <dolio> Well, you can't trust wikipedia.
2020-10-05 15:04:51 <fog23> so haskell we copy everything right?
2020-10-05 15:05:05 <fog23> thats just purity?
2020-10-05 15:05:07 jespada joins (~jespada@90.254.246.48)
2020-10-05 15:05:17 <fog23> i guess its since we hide the memory access
2020-10-05 15:05:38 <fog23> though Mutable vectors and mutable variables in ST or IO kind of get round that.
2020-10-05 15:05:44 AlterEgo- joins (~ladew@124-198-158-163.dynamic.caiway.nl)
2020-10-05 15:06:08 <dminuoso> fog23: My point is just, evaluation wise, there's call-by-value, call-by-need/name, call-by-future, perhaps Im forgetting something more exotic here. What's called "call-by-reference" is about copying/referencing. But that's not about evaluation.
2020-10-05 15:06:35 <fog23> seems basically like its "calling a method with an input variable, can change that variable, even if it is not returned as an output"
2020-10-05 15:07:08 <fog23> no wonder they have so much bugs
2020-10-05 15:07:10 <dminuoso> Well if we dig deep into C++, then reference have so much subtleties to them
2020-10-05 15:07:19 <dminuoso> It's very very complicated.
2020-10-05 15:07:31 <fog23> no i really dont care
2020-10-05 15:07:54 <fog23> this brief foray into c# was not something i wnat to do again in a hurry
2020-10-05 15:08:09 <fog23> it just left me completely dismayed at the state of reality
2020-10-05 15:08:35 <fog23> what a sad state the world is in - with all of these primitive evaluation strategies
2020-10-05 15:08:47 <fog23> but that industry would *enforce* them - ey gads
2020-10-05 15:09:08 <fog23> "you should learn our idom - then we will pay you". seems like some kind of cooked nepotism
2020-10-05 15:09:15 × albert_99 quits (~Albert@p200300e5ff0b5b425d211d042df94ce7.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
2020-10-05 15:09:16 <fog23> crooked*
2020-10-05 15:09:35 <fog23> idiom*
2020-10-05 15:11:45 otulp joins (~otulp@31.45.116.219)
2020-10-05 15:13:48 <fog23> oh, speaking of linked lists. can you have a doubly linked tree?
2020-10-05 15:14:03 <dolio> Yes.
2020-10-05 15:14:10 <fog23> if so there might be a way to have "upwards facing branches"
2020-10-05 15:14:15 <fog23> does that sound possible?
2020-10-05 15:14:33 <fog23> like, if you refer to the branches above as well as the branches below, because of the double link
2020-10-05 15:15:02 <fog23> so then you could put a *different* upper part of the tree as an upwards branch
2020-10-05 15:15:13 jiribenes_ joins (~Thunderbi@2a02:8308:101:f100:18b2:1950:2975:8c11)
2020-10-05 15:16:23 <fog23> or something like a "highway" reference, to a lower portion of the tree - though thats not a "doubly linked" idea. more like double link -> upwards reference -> multiple upwards references -> referring to "elsewhere upwards" -> refereeing to "elsewhere downwards"
2020-10-05 15:16:37 × conal quits (~conal@64.71.133.70) (Ping timeout: 256 seconds)
2020-10-05 15:16:43 <fog23> or is that completely impossible
2020-10-05 15:16:51 <fog23> what would be difficult about that?
2020-10-05 15:16:54 × jiribenes_ quits (~Thunderbi@2a02:8308:101:f100:18b2:1950:2975:8c11) (Client Quit)
2020-10-05 15:18:58 hackage prolude 0.0.0.1 - ITProTV's custom prelude https://hackage.haskell.org/package/prolude-0.0.0.1 (saramuse)
2020-10-05 15:19:10 × xff0x quits (~fox@2001:1a81:5300:fe00:1175:d8f5:8ada:f855) (Ping timeout: 244 seconds)
2020-10-05 15:19:30 zacts joins (~zacts@dragora/developer/zacts)
2020-10-05 15:19:42 Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
2020-10-05 15:20:28 xff0x joins (~fox@2001:1a81:5300:fe00:1175:d8f5:8ada:f855)
2020-10-05 15:20:42 <fog23> dolio: how would you write a doubly linked tree?
2020-10-05 15:21:28 conal joins (~conal@64.71.133.70)
2020-10-05 15:21:30 × mav1 quits (~mav@p5dd5a8a0.dip0.t-ipconnect.de) (Quit: WeeChat 2.9)
2020-10-05 15:22:11 <dolio> Just like a doubly linked list, except it's a tree. You have parent pointers in addition to child pointers.

All times are in UTC.