Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→
Page 1 .. 507 508 509 510 511 512 513 514 515 516 517 .. 18004
1,800,340 events total
2021-06-17 09:50:59 <gentauro> 09:43 < kuribas> I am not saying reliable software engineering is not possible in mainstream language, I am just saying it is easier in haskell
2021-06-17 09:51:20 <gentauro> kuribas: what is your bullet-proof handle of `space-leaks` in Haskell? Could you please share. Thx
2021-06-17 09:51:42 <kuribas> gentauro: not writing them?
2021-06-17 09:52:13 <kuribas> gentauro: 1) don't use foldl, sum, product, ... 2) use strict accumulators.
2021-06-17 09:52:16 <gentauro> kuribas: you claim that `reliable software engineering` is easier in Haskell. I might differ in that opinion
2021-06-17 09:52:24 <gentauro> mostly cos of space/mem-leaks
2021-06-17 09:52:27 <Franciman> gentauro: yesp, but I was writing in another channel about fp without deependent types
2021-06-17 09:52:48 <kuribas> gentauro: "it depends"
2021-06-17 09:52:59 <gentauro> kuribas: you are stating the obvious
2021-06-17 09:53:19 <gentauro> the problem is when something becomes big, it's "very" difficult to see what is wrong
2021-06-17 09:53:33 <gentauro> the compiler doesn't help you …
2021-06-17 09:53:39 <kuribas> gentauro: handling data model rich transformations, doing a lot of parsing, etc.. I find it much easier in haskell.
2021-06-17 09:54:10 <gentauro> and in my own experience, I end up adding a lot of `seq`'s in the code until the space/mem-leak seems to dissapear
2021-06-17 09:54:20 <kuribas> gentauro: doing numerical computations, having complicated algorithms, not so much. But usually it's a mix.
2021-06-17 09:54:27 <gentauro> but it's "not easy". It's pretty annoying tbh
2021-06-17 09:54:29 Pickchea joins (~private@user/pickchea)
2021-06-17 09:54:46 <gentauro> 11:53 < kuribas> gentauro: handling data model rich transformations, doing a lot of parsing, etc.. I find it much easier in haskell
2021-06-17 09:54:51 <gentauro> I agree to some extend
2021-06-17 09:54:59 <kuribas> gentauro: I am a bug supporter of stateless services. Put your state in a database or redis or so...
2021-06-17 09:55:00 gentauro mostly parsing
2021-06-17 09:55:30 <kuribas> gentauro: the haskell GC is not optimal for having lot's of live memory
2021-06-17 09:55:46 <gentauro> kuribas: Haskell is not with lazy-IO
2021-06-17 09:55:53 gentauro having a lot of files "open"
2021-06-17 09:55:58 dhil joins (~dhil@195.213.192.47)
2021-06-17 09:56:04 gentauro unless you make that IO-operation strict
2021-06-17 09:56:17 <kuribas> gentauro: also, use a streaming abstraction, not lazy-IO
2021-06-17 09:56:26 <gentauro> I guess my point is, Haskell is not a language that you just "ship" if it compiles
2021-06-17 09:56:29 <kuribas> gentauro: avoid lists for bulk processing.
2021-06-17 09:56:39 <gentauro> you need to "stress" test it
2021-06-17 09:56:44 <juri_> gentauro: no languages are.
2021-06-17 09:57:09 <kuribas> gentauro: haskell is not a silver bullet. It requires you knowing what you are doing.
2021-06-17 09:57:19 <gentauro> kuribas: like every other language
2021-06-17 09:57:29 <juri_> hit your code with stan. it checks for space leaks.
2021-06-17 09:57:33 <gentauro> but, we shouldn't oversell it, as "easier"
2021-06-17 09:57:46 <gentauro> juri_: `stan`? linke pls
2021-06-17 09:57:51 <gentauro> s/linke/link/
2021-06-17 09:58:10 <juri_> https://github.com/kowainik/stan
2021-06-17 09:58:40 <juri_> I've been scrubbing my code for weeks, and am only about halfway through the things stan warned me about.
2021-06-17 09:58:53 krzesi joins (~szara@2a02:a31c:853b:b780:8f1:e5d7:b2c6:49bb)
2021-06-17 09:58:55 <gentauro> juri_: nice !!!
2021-06-17 09:58:57 <kuribas> gentauro: I haven't yet had any space leaks. But I am careful about the code I write.
2021-06-17 09:59:01 <gentauro> didn't knew that tool
2021-06-17 09:59:12 <kuribas> gentauro: if it needs to be fast, I inspect the core.
2021-06-17 09:59:13 × krzesi quits (~szara@2a02:a31c:853b:b780:8f1:e5d7:b2c6:49bb) (Client Quit)
2021-06-17 09:59:23 warnz joins (~warnz@2600:1700:77c0:5610:7144:467c:eae6:37e7)
2021-06-17 09:59:25 <juri_> stan, hlint, weeder... then ship. :P
2021-06-17 09:59:38 <gentauro> kuribas: and that's the reason I ask for you `bullet-proof` approach to write Haskell. "Sharing in caring" ;)
2021-06-17 09:59:39 <kuribas> gentauro: and I think it's a good design to go stateless. That also means your service can restart quicker.
2021-06-17 10:01:04 <kuribas> gentauro: ghc is not magical. Like any language, understanding what code does requires testing, inspection, bench-marking etc...
2021-06-17 10:01:09 <gentauro> kuribas: I mostly write "minimalist and modular" bin tools (Unix philosophy)
2021-06-17 10:01:40 <gentauro> sometimes I need `mem-state`
2021-06-17 10:02:28 <kuribas> but it is true that you trade higher level programming, more safe and declarative code, for a execution model that is harder to understand.
2021-06-17 10:02:39 × azeem quits (~azeem@dynamic-adsl-78-13-238-239.clienti.tiscali.it) (Read error: Connection reset by peer)
2021-06-17 10:03:29 azeem joins (~azeem@dynamic-adsl-78-13-238-239.clienti.tiscali.it)
2021-06-17 10:03:54 × warnz quits (~warnz@2600:1700:77c0:5610:7144:467c:eae6:37e7) (Ping timeout: 264 seconds)
2021-06-17 10:05:20 <kuribas> gentauro: can you show me an example where you needed a lot of work to avoid space leaks?
2021-06-17 10:05:43 <kuribas> like adding seq
2021-06-17 10:06:03 <gentauro> kuribas: sure http://blog.stermon.com/articles/2020/04/06/haskell-data-octet-nand-smaller-but-slower.html
2021-06-17 10:06:06 <gentauro> xD
2021-06-17 10:06:18 ddellacosta joins (~ddellacos@86.106.121.100)
2021-06-17 10:06:21 <gentauro> kuribas: just search for `seq`
2021-06-17 10:06:39 <gentauro> I'm gonna run the `stan` tool against that code
2021-06-17 10:06:57 <gentauro> I'm guessing that `stan` will probably "give up" xD
2021-06-17 10:07:41 × dunkeln quits (~dunkeln@94.129.65.28) (Ping timeout: 268 seconds)
2021-06-17 10:08:34 <kuribas> gentauro: that looks pretty contrived code
2021-06-17 10:09:20 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-06-17 10:09:25 <kuribas> "No arithmetic computations are done by the CPU as all operations are based on the NAND logic gate, which is implemented as a pattern matched function."
2021-06-17 10:09:36 <kuribas> That sounds hardly like something I would want in production code.
2021-06-17 10:09:39 <kuribas> more like an experiment.
2021-06-17 10:10:43 <gentauro> kuribas: do you have any exp with FHE?
2021-06-17 10:10:46 × dhil quits (~dhil@195.213.192.47) (Ping timeout: 268 seconds)
2021-06-17 10:10:51 <kuribas> no
2021-06-17 10:11:16 × ddellacosta quits (~ddellacos@86.106.121.100) (Ping timeout: 268 seconds)
2021-06-17 10:11:16 × Pickchea quits (~private@user/pickchea) (Ping timeout: 268 seconds)
2021-06-17 10:11:48 <gentauro> fair enough
2021-06-17 10:12:40 v01d4lph4 joins (~v01d4lph4@user/v01d4lph4)
2021-06-17 10:12:44 <kuribas> gentauro: that giant mapping function smells badly
2021-06-17 10:12:53 <Square> For your low user count app / not massive IO, my gut feeling is that Haskell does great. Ive had Haskell (2-player) game + site running for 3 years and not experienced any wierd issues. Its semi complicated in how has multiple WebSocket messaging channels etc.
2021-06-17 10:13:18 <Square> how it hase*
2021-06-17 10:14:11 × zeenk quits (~zeenk@188.26.30.39) (Read error: Connection reset by peer)
2021-06-17 10:14:14 benin0364 joins (~benin@183.82.204.241)
2021-06-17 10:14:33 <kuribas> indeed
2021-06-17 10:15:14 zeenk joins (~zeenk@188.26.30.39)
2021-06-17 10:15:42 × benin036 quits (~benin@183.82.205.245) (Ping timeout: 268 seconds)
2021-06-17 10:15:42 benin0364 is now known as benin036
2021-06-17 10:18:04 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:cded:c7cb:4d63:a64a)
2021-06-17 10:19:02 <gentauro> kuribas: if you can re-write the code, so it still use not arithmetic op's, I would <3 to see it :)
2021-06-17 10:19:53 <kuribas> gentauro: I don't need arbitrary restrictions in code I write.
2021-06-17 10:22:26 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:cded:c7cb:4d63:a64a) (Ping timeout: 252 seconds)
2021-06-17 10:24:25 <Square> gentauro, the page you linked makes chrome unhappy. Maybe because its long/big page.. ie http://blog.stermon.com/articles/2020/04/06/haskell-data-octet-nand-smaller-but-slower.html
2021-06-17 10:26:15 <gentauro> Square: indeed
2021-06-17 10:26:36 <gentauro> Square: if you open the v1, it will probably crash Chrome xD
2021-06-17 10:26:45 fizbin joins (~fizbin@c-68-83-100-68.hsd1.nj.comcast.net)
2021-06-17 10:26:55 <gentauro> http://blog.stermon.com/articles/2020/03/30/haskell-data-octet-safe-idiomatic-and-big.html xD
2021-06-17 10:27:06 <Square> no thanks =D
2021-06-17 10:28:15 <gentauro> xD
2021-06-17 10:28:28 × jneira quits (~jneira@212.8.115.226) (Quit: Client closed)
2021-06-17 10:29:53 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
2021-06-17 10:30:31 × fizbin quits (~fizbin@c-68-83-100-68.hsd1.nj.comcast.net) (Remote host closed the connection)
2021-06-17 10:30:42 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)

All times are in UTC.