Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-14 17:35:55 mmohammadi9812 joins (~mmohammad@185.186.245.158)
2020-11-14 17:36:01 <Feuermagier> merijn, since i didn't know that there's a difference, now i'm concerned
2020-11-14 17:36:26 <merijn> Feuermagier: difference is "everything in A that is not in B"
2020-11-14 17:36:33 <Feuermagier> yes
2020-11-14 17:36:41 <merijn> Feuermagier: Symmetric difference is "everything in A *and* B that is not in both"
2020-11-14 17:36:45 <Feuermagier> whats left / symmetric then?
2020-11-14 17:37:13 son0p joins (~son0p@186.159.4.142)
2020-11-14 17:37:19 <julm> julm: there you'll also find that I've initiated a CLI tool and a Purescript Web client
2020-11-14 17:37:30 <merijn> > let symmetricDiff xs ys = (xs \\ ys) ++ (ys \\ xs) in symmetricDiff [1..10] [5 .. 15]
2020-11-14 17:37:32 <lambdabot> [1,2,3,4,11,12,13,14,15]
2020-11-14 17:37:35 <hekkaidekapus> Feuermagier: left: first container; right: the second.
2020-11-14 17:37:41 <julm> s/julm/orion/
2020-11-14 17:37:50 <merijn> As opposed to
2020-11-14 17:38:03 <merijn> > [1..10] \\ [5 .. 15]
2020-11-14 17:38:07 <lambdabot> [1,2,3,4]
2020-11-14 17:39:21 <orion> julm: Thank you for the information!
2020-11-14 17:40:16 <julm> orion: however I've not worked on all this in 2020, the MJ lib is quite mature, the Helios-C lib is beta, the CLI is working but would need a refresh, the Purescript only implements cryptographic functions
2020-11-14 17:40:19 × dabura quits (~pablo@aftr-62-216-208-95.dynamic.mnet-online.de) (Quit: leaving)
2020-11-14 17:40:31 × mmohammadi9812 quits (~mmohammad@185.186.245.158) (Ping timeout: 256 seconds)
2020-11-14 17:41:23 <orion> julm: This link on the hjudgement package README does not appear to be working: http://libgen.io/book/index.php?md5=BF67AA4298C1CE7633187546AA53E01D
2020-11-14 17:41:59 britva joins (~britva@2a02:aa13:7240:2980:bc4b:509a:98e6:5bb0)
2020-11-14 17:42:00 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2020-11-14 17:42:06 <orion> This too leads to a 404: https://www.lamsade.dauphine.fr/sites/default/IMG/pdf/cahier_377.pdf
2020-11-14 17:42:31 <Uniaika> orion: it's libgen.is nowadays
2020-11-14 17:42:31 <julm> yeah, libgen is dead, try https://sourcephile.fr/recherches/Jugement_Majoritaire/2011_-_Balinski_et_Laraki_-_Majority%20Judgment_-_Measuring%2C_Ranking%2C_and_Electing.MIT_Press.pdf
2020-11-14 17:42:33 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2020-11-14 17:42:33 mmohammadi9812 joins (~mmohammad@2.178.173.138)
2020-11-14 17:42:36 <dsal> Feuermagier: it's better not to think of "a lot of operators". They're just functions.
2020-11-14 17:42:48 vacm joins (~vacwm@70.23.92.191)
2020-11-14 17:42:49 <merijn> :t difference
2020-11-14 17:42:50 <lambdabot> error:
2020-11-14 17:42:50 <lambdabot> • Variable not in scope: difference
2020-11-14 17:42:50 <lambdabot> • Perhaps you meant one of these:
2020-11-14 17:43:02 <merijn> aww...there's no named version for lists?
2020-11-14 17:44:04 <dsal> Occasionally you'll want to make a function you use a lot and give it a convenient name. If it doesn't have letters, it's infix by default, but you can apply any binary function infix or prefix.
2020-11-14 17:44:20 × FreeBirdLjj quits (~freebirdl@101.228.42.108) (Remote host closed the connection)
2020-11-14 17:44:26 <merijn> dsal: eh
2020-11-14 17:44:39 <merijn> dsal: You can apply non-binary functions infix and/or as operator too :p
2020-11-14 17:44:54 <dsal> > (\\) [1..10] [5..15]
2020-11-14 17:44:57 <lambdabot> [1,2,3,4]
2020-11-14 17:45:12 <merijn> dsal: I mean that you can use ternary functions as operator too
2020-11-14 17:45:23 <merijn> (or anything else, really)
2020-11-14 17:45:43 × HaskellYogi quits (~vivekrama@49.207.205.17) (Ping timeout: 260 seconds)
2020-11-14 17:46:41 × HarveyPwca quits (~HarveyPwc@c-98-220-98-201.hsd1.il.comcast.net) (Quit: Leaving)
2020-11-14 17:47:04 <dsal> Some folks try to learn Haskell by learning the exceptions to rules before rules. It's a uphill battle. I'm just coming in from the other angle. Operators don't exist, but there are a couple ways to call your function.
2020-11-14 17:47:10 zule1 joins (~zule@188.126.89.41)
2020-11-14 17:47:37 <merijn> operators aren't even exceptions to the rules...they're literally defined in the rules >.>
2020-11-14 17:48:00 <merijn> An operator is just "any function whose name consists entirely of operator symbols"
2020-11-14 17:48:18 <dsal> They're just functions is my point. Not another thing.
2020-11-14 17:48:30 hackage witch 0.0.0.2 - Convert values from one type into another. https://hackage.haskell.org/package/witch-0.0.0.2 (fozworth)
2020-11-14 17:48:35 <merijn> dsal: Except when they're constructors ;)
2020-11-14 17:48:41 alp joins (~alp@2a01:e0a:58b:4920:d66:dc23:5051:7cda)
2020-11-14 17:49:02 <merijn> (although, I suppose, you could argue constructors are merely a subset of functions...)
2020-11-14 17:49:33 <dsal> Haha. Yeah. The more stuff that feels the same, the easier it all gets for me.
2020-11-14 17:50:16 × avdb quits (~avdb@ip-62-235-188-19.dsl.scarlet.be) (Quit: avdb)
2020-11-14 17:50:31 avdb joins (~avdb@ip-62-235-188-19.dsl.scarlet.be)
2020-11-14 17:50:35 <dsal> I like that + isn't special. Even in, like c++ where you can overload operators, + still feels special.
2020-11-14 17:50:46 × pjb quits (~t@2a01cb04063ec500886d37c8211c68f4.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
2020-11-14 17:50:48 × britva quits (~britva@2a02:aa13:7240:2980:bc4b:509a:98e6:5bb0) (Quit: This computer has gone to sleep)
2020-11-14 17:50:54 <merijn> operator overloading in C++ is a nightmare
2020-11-14 17:51:13 hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net)
2020-11-14 17:51:17 <dsal> I've abused Num horribly, but only in lambdabot
2020-11-14 17:51:32 <merijn> tbf, + doesn't even have to involve Num
2020-11-14 17:51:43 <merijn> > let 2 + 2 = 5 in 2 + 2
2020-11-14 17:51:45 <lambdabot> 5
2020-11-14 17:52:00 jakalx joins (~jakalx@base.jakalx.net)
2020-11-14 17:52:07 britva joins (~britva@2a02:aa13:7240:2980:bc4b:509a:98e6:5bb0)
2020-11-14 17:52:10 <dsal> Haha. Yeah. You just proved Haskell is a terrible language.
2020-11-14 17:52:25 elliott__ joins (~elliott@pool-108-51-141-12.washdc.fios.verizon.net)
2020-11-14 17:52:42 <monochrom> It's gospel to me.
2020-11-14 17:53:04 <merijn> monochrom: Lambda calculus is gospel, Haskell is apocrypha :p
2020-11-14 17:53:19 <dsal> Any language that doesn't let you say 2+2=5 is restricting the way you're thinking.
2020-11-14 17:53:27 <Rembane> merijn: Why does that let-expression work?
2020-11-14 17:53:37 <hyperisco> that's why I prefer Ruby
2020-11-14 17:53:48 <merijn> Rembane: It's define a new + function with a partial pattern
2020-11-14 17:53:49 <monochrom> (+) being just another user-definable value name, therefore shadowable user-definable value name, means fewer things are second class in Haskell than in other languages.
2020-11-14 17:53:52 <merijn> > let 2 + 2 = 5 in 2 + 3
2020-11-14 17:53:54 <lambdabot> *Exception: <interactive>:3:5-13: Non-exhaustive patterns in function +
2020-11-14 17:54:01 hackage flatbuffers 0.3.0.0 - Haskell implementation of the FlatBuffers protocol. https://hackage.haskell.org/package/flatbuffers-0.3.0.0 (dcastro)
2020-11-14 17:54:19 <merijn> Rembane: Note the non-exhaustive pattern error :)
2020-11-14 17:55:02 × jlamothe quits (~jlamothe@198.251.55.207) (Ping timeout: 256 seconds)
2020-11-14 17:55:04 <Rembane> merijn: I completely missed that error. That's really nice! :D
2020-11-14 17:55:04 <monochrom> There is no tenable philosophical reason to insist "alphabetical identifiers are user-definable, punctuation identifiers aren't" or "prefix is, infix isn't", apart from 1970 parsing couldn't handle it.
2020-11-14 17:55:34 <dsal> > let _ + _ = "five" in 2 + 2
2020-11-14 17:55:36 <lambdabot> "five"
2020-11-14 17:55:58 × tsrt^ quits (tsrt@ip98-184-89-2.mc.at.cox.net) ()
2020-11-14 17:56:41 <Rembane> ^^ I once saw two of my friends hacking away at something in ghci, and when one of them went to get candy or something the other one wrote let (-) = (+) in the repl and cleared the screen, hilarity ensued.
2020-11-14 17:57:05 shah^ joins (shah@ip98-184-89-2.mc.at.cox.net)
2020-11-14 17:57:45 <monochrom> I came from an older background, seeing all kinds of privileges that the language/compiler reserves for themselves and denying the user. So I enjoy these liberations a lot.
2020-11-14 17:58:40 <dsal> Yeah, it's crazy how many things are just for smart language creators.
2020-11-14 17:58:41 <hpc> Rembane: i once defined microwave numbers, where the value of a number is based on how many seconds it would be if you typed those digits in a microwave
2020-11-14 17:58:42 <julm> orion: for the second link: https://sourcephile.fr/recherches/Jugement_Majoritaire/2017-02_-_Balinski_et_Laraki_-_Majority_Judgment_vs_Majority_Rule.LAMSADE_377.pdf
2020-11-14 17:58:50 <hpc> so 160 == 200, 199 > 200, etc
2020-11-14 17:59:09 <monochrom> Let's start with BASIC. There, even procedure/function names are not user-definable. They give you SIN() then you have SIN(). They give you PRINT then you have PRINT. You wanna write your own version? You're stuck with GOSUB, no name, only a line number, and no parameter, no return value, no nothing.
2020-11-14 17:59:57 <monochrom> Then let's move on to Pascal. There, functions/procedures are mostly liberated, except writeln(), you could not have defined this polymorphic procedure yourself.
2020-11-14 18:00:03 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
2020-11-14 18:00:19 <monochrom> It's for that reason I really admire Haskell's type class.
2020-11-14 18:00:36 <orion> julm: Thank you.
2020-11-14 18:00:38 × jakalx quits (~jakalx@base.jakalx.net) (Ping timeout: 264 seconds)
2020-11-14 18:01:47 <merijn> ugh

All times are in UTC.