Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 379 380 381 382 383 384 385 386 387 388 389 .. 5022
502,152 events total
2020-10-03 02:47:05 <dsal> You can do *bizarre* stuff with Aeson lenses. One of the Advent of Code problems had me like, sum up all of the numbers in an arbitrarily complex JSON file. That's a half-liner.
2020-10-03 02:47:30 <cohn> fwiw, I'm coming from a Python background. Trying to switch some development over to Haskell for the safety and purity gains
2020-10-03 02:47:41 × theDon quits (~td@muedsl-82-207-238-055.citykom.de) (Ping timeout: 256 seconds)
2020-10-03 02:47:46 <cohn> plus, the Python GIL sucks. :D
2020-10-03 02:47:48 <dsal> Well, you're trying to learn haskell and lenses at the same time. That's also kind of a lot. heh
2020-10-03 02:47:56 <cohn> it is
2020-10-03 02:48:02 <dsal> Yeah, I burn every nearby thread with my haskell projects.
2020-10-03 02:49:10 theDon joins (~td@94.134.91.90)
2020-10-03 02:49:13 <cohn> I know the basics of Haskell so I can at least create the types for handling the JSON data
2020-10-03 02:49:47 <cohn> I completed the "Get Programming with Haskell" book by Will Kurt. Great read!
2020-10-03 02:49:49 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
2020-10-03 02:50:05 <cohn> wanted to take that knowledge and start doing useful things with Haskell.
2020-10-03 02:50:13 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Client Quit)
2020-10-03 02:51:13 <dsal> I don't know that one, but I like your style. :)
2020-10-03 02:51:49 <dsal> Haskell's been my goto language for a while now. I don't do heavy lens stuff much, so I stay a bit rusty there, but for blue collar stuff, it's pretty great.
2020-10-03 02:52:02 <dsal> I can pick up projects I've not looked at in months and drop a new feature in with little effort.
2020-10-03 02:52:32 <dsal> My biggest complaint is that it's often *too* little effort. Like, I sit down to write a bit of code and then once I figure out what I want to do, I'm done. Now I'm sad because my big project isn't.
2020-10-03 02:52:40 <cohn> that's not always easy to say with other languages
2020-10-03 02:53:21 <dsal> You'd *think* it'd be hard with haskell with some of the golf we do sometimes, but in practice, it just means the hard parts are in one place and well tested, and the easy parts are just kind of obvious.
2020-10-03 02:53:45 lagothrix is now known as Guest95125
2020-10-03 02:53:45 × Guest95125 quits (~lagothrix@unaffiliated/lagothrix) (Killed (tolkien.freenode.net (Nickname regained by services)))
2020-10-03 02:53:51 <dsal> For an egregious example, here's the code that honks the horn and flashes the lights in my car: https://github.com/dustin/tesla/blob/master/src/Tesla/Car/Command/Alerts.hs
2020-10-03 02:53:53 lagothrix joins (~lagothrix@unaffiliated/lagothrix)
2020-10-03 02:54:09 × dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 244 seconds)
2020-10-03 02:54:19 <dsal> https://dustin.github.io/tesla/Tesla-Car-Command-Alerts.html -- (there's a longstanding bug about not being able to document TH stuff better, unfortunately)
2020-10-03 02:54:30 <cohn> hah, nice
2020-10-03 02:54:36 <dolio> I don't know why anyone would think it'd be hard.
2020-10-03 02:54:58 <dolio> People haven't been developing functional programming for 50+ years to make programming harder.
2020-10-03 02:55:24 <dsal> Haskell is only for smart people who think they're better than everyone else.
2020-10-03 02:56:12 <dsal> Or at least people who *think* they're smart, but can't even explain monads to me like I'm five in six words or less without having me understand any further context.
2020-10-03 02:56:28 <cohn> xD
2020-10-03 02:57:09 <dsal> Imagine talking to a programmer who only knows like, BASIC. They want you to explain python metaclasses to them, but in terms of things they understand.
2020-10-03 02:57:17 <cohn> what's that saying: better to be quiet and have people think you're an idiot than open your mouth and remove all doubt
2020-10-03 02:57:20 <cohn> something like that.
2020-10-03 02:57:44 <dsal> Nah, go ahead and ask dumb questions. Better to have people think you're dumb than to just sit around being dumb. :)
2020-10-03 02:57:56 <cohn> yea, I probably couldn't explain stuff to a BASIC programmer
2020-10-03 02:58:03 <cohn> lol, true
2020-10-03 02:58:10 drbean joins (~drbean@TC210-63-209-38.static.apol.com.tw)
2020-10-03 02:58:32 <ski> @quote beyond.hope
2020-10-03 02:58:32 <lambdabot> EdsgerDijkstra says: "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of
2020-10-03 02:58:33 <lambdabot> regeneration."
2020-10-03 02:58:47 <cohn> I will say, everyone I've encountered in this channel has been incredibly helpful. I've learned quite a lot so far
2020-10-03 02:58:54 ski raises hand
2020-10-03 02:59:05 <ddellacosta> it's better to be loud and have people think you're an idiot than suffer in ignoranc.
2020-10-03 02:59:05 <cohn> heh
2020-10-03 02:59:11 <ddellacosta> *ignorance
2020-10-03 02:59:23 <dsal> It's a bit of the blub paradox. Everything the BASIC programmer knows is in terms of GOTO and GOSUB. Why do you need a function? It's just a fancy case of GOSUB. Same thing as you go up. I can't explain a functor to you if you don't have a concept of data structures or functions. Even if you've probably used them.
2020-10-03 02:59:43 HaskellYogi joins (~vivekrama@49.207.196.239)
2020-10-03 03:00:01 × johanna quits (~johanna@s91904426.blix.com) ()
2020-10-03 03:00:17 ski remembers `DEF FNAR(R)=PI*R^2'
2020-10-03 03:00:56 <ski> people have to take it in reasonable enough steps
2020-10-03 03:01:28 <dsal> Yeah, and some people believe that's incorrect and if they can't understand it in one, then it's a pointless waste of time.
2020-10-03 03:01:39 <monochrom> I need a function because GOSUB doesn't let me pass parameters or return values unless I set aside global variables for that and hope I don't make a mistake.
2020-10-03 03:01:43 <ski> not much you can do about it ..
2020-10-03 03:01:52 <cohn> dsal: you must read Paul Graham essays. ; )
2020-10-03 03:01:55 <dolio> monochrom: Just don't make mistakes.
2020-10-03 03:02:11 <dsal> I was trying to explain a trivial thing I did in a library using STM that was really exciting to me to someone once. She was like, "Can't you do that in java?" Which... yes, I could solve this problem in java, but it'd be an engineering feat for this one exact use case. I wrote the code without considering this use case.
2020-10-03 03:02:14 <dsal> cohn: heh, that one at least.
2020-10-03 03:02:18 <monochrom> And then if I desire a recursive function I'm screwed.
2020-10-03 03:02:39 <cohn> dsal: http://paulgraham.com/avg.html ?
2020-10-03 03:02:45 <ski> who needs dynamic allocation of variables ..
2020-10-03 03:02:51 <ski> cohn, yep
2020-10-03 03:03:32 <dsal> cohn: yeah, it at least helps the understanding. If you only know language X and are good at it, then it's all you need and it's hard to talk to you in terms of things that you can't possibly do that I feel like I require to solve my problems.
2020-10-03 03:03:56 <ski> you can call a subroutine by modifying the ending `jmp' instruction to jump back just after where you `jmp'ed to it
2020-10-03 03:04:12 <dsal> e.g., I've seen STM in other languages (e.g., C++, java, etc...), but they all look very hard to use correctly in a way that haskell is nearly impossible to use incorrectly.
2020-10-03 03:04:14 conal joins (~conal@64.71.133.70)
2020-10-03 03:04:25 <monochrom> So I was an exception to Dijsktra's quote. BASIC prepared me to be disappointed at BASIC and ready to receive Pascal as gospel.
2020-10-03 03:05:02 <dsal> monochrom is secretly working his students up to be Pascal programmers.
2020-10-03 03:05:38 <ski> i remember learning about C (and compilation), being amazed at the idea that there was a standardized format for functions, each function didn't have its own custom syntax ..
2020-10-03 03:05:43 <cohn> dsal: exactly. the blub paradox is one reason I set out to learn FP. Just so happens that Haskell is a general purpose language without all the damn parenthesis.
2020-10-03 03:05:48 <cohn> hehe
2020-10-03 03:06:13 × pjb quits (~t@2a01cb04063ec50074da2bfcb3222c7a.ipv6.abo.wanadoo.fr) (Ping timeout: 272 seconds)
2020-10-03 03:06:28 <dsal> Yeah, and once you learn about some of our tools, you'll be incredibly frustrated when you go to work and they don't let you use them.
2020-10-03 03:06:30 iqubic joins (~user@2601:602:9500:4870:709f:b119:f02e:2ee7)
2020-10-03 03:06:30 <cohn> err, s/parenthesis/parentheses/
2020-10-03 03:06:38 ski . o O ( "6. The more you know, the more you know." )
2020-10-03 03:06:53 Lord_of_Life_ joins (~Lord@unaffiliated/lord-of-life/x-0885362)
2020-10-03 03:07:03 <cohn> I'm already loving stack and the language server plugin for VS Code (yea, yea)
2020-10-03 03:07:08 <dsal> Or you see really bad translations of stuff. go shipped with a quickcheck library that is fundamentally broken because the language is lacking in several dimensions.
2020-10-03 03:07:20 <dsal> was the (yea, yea) for stack or VS? :)
2020-10-03 03:07:26 <dsal> We have our own subreligions.
2020-10-03 03:07:27 <cohn> hmm...
2020-10-03 03:07:47 <cohn> VS Code. I'd imagine most folks shun it in favor of Emacs
2020-10-03 03:07:51 <dsal> I like/use stack, but some people will fight.
2020-10-03 03:08:06 monochrom draws sword
2020-10-03 03:08:08 zebrag joins (~inkbottle@aaubervilliers-654-1-82-122.w86-212.abo.wanadoo.fr)
2020-10-03 03:08:17 <dsal> emacs is the one true religion, but we support alternative lifestyles
2020-10-03 03:08:21 <dolio> I mean, I don't care what other people use. I just want them to stop telling me to use their stuff.
2020-10-03 03:08:25 × inkbottle quits (~inkbottle@aaubervilliers-654-1-1-33.w83-200.abo.wanadoo.fr) (Ping timeout: 246 seconds)
2020-10-03 03:08:25 <cohn> I normally would too since I tend to associate anything from Redmond with pure evil, but I gotta say, VS Code is pretty nice
2020-10-03 03:08:32 <dolio> Or lying about the stuff I use.
2020-10-03 03:08:50 <dsal> cohn: You're talking like you're around my age. heh
2020-10-03 03:09:04 × Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 256 seconds)
2020-10-03 03:09:05 Lord_of_Life_ is now known as Lord_of_Life
2020-10-03 03:09:07 <dsal> It was kind of nice doing a fresh nixos install today and starting a project build without installing stack or ghc or anything.
2020-10-03 03:09:09 jedws joins (~jedws@121.209.139.222)
2020-10-03 03:09:16 <cohn> I might be
2020-10-03 03:09:39 <cohn> been doing this crap for ~ 30-ish years
2020-10-03 03:09:56 <cohn> wish I had found FP much sooner.
2020-10-03 03:10:01 <dsal> There are brilliant haskell brains at MS. Keeping some of those folks on the payroll at least makes me feel much better about them.

All times are in UTC.