Logs: freenode/#haskell
| 2020-11-25 14:07:41 | <tdammers> | haskell *is* an imperative language /me runs away |
| 2020-11-25 14:07:41 | → | hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net) |
| 2020-11-25 14:07:43 | <maerwald> | at this point, I barely care about language paradigms anymore. The problem is that ADTs are still not a standard for all languages |
| 2020-11-25 14:07:54 | × | lassulus quits (~lassulus@NixOS/user/lassulus) (Ping timeout: 256 seconds) |
| 2020-11-25 14:08:00 | <tdammers> | anyway, if you want to know what haskell is good at, look at where it's used |
| 2020-11-25 14:08:01 | hackage | vulkan 3.7, VulkanMemoryAllocator 0.3.10 (jophish): https://qbin.io/feof-nathan-jj0i |
| 2020-11-25 14:08:09 | → | elliott__ joins (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) |
| 2020-11-25 14:08:16 | × | coot quits (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 240 seconds) |
| 2020-11-25 14:08:16 | coot_ | is now known as coot |
| 2020-11-25 14:08:21 | <maerwald> | I'd pick any language that has a reasonable ecosystem and ADTs |
| 2020-11-25 14:08:25 | <maerwald> | the rest is details |
| 2020-11-25 14:09:15 | <honigkuchen> | abstract data type? |
| 2020-11-25 14:09:19 | <maerwald> | algebraic |
| 2020-11-25 14:09:22 | <honigkuchen> | ah |
| 2020-11-25 14:09:35 | <tdammers> | fintech, insurance, military, intelligence, economics, spam filtering, compiler research... generally, problem domains with a high degree of intrinsic complexity and a strong desire for static reasoning |
| 2020-11-25 14:10:11 | <maerwald> | fintech is more like high-speed anarchy, where haskell shines, because it's harder to constantly break your codebase |
| 2020-11-25 14:10:12 | → | Kaivo joins (~Kaivo@104-200-86-99.mc.derytele.com) |
| 2020-11-25 14:10:37 | <tdammers> | I think HFT is a domain where C++ still rules |
| 2020-11-25 14:10:42 | <honigkuchen> | what is intrinsic complexity |
| 2020-11-25 14:10:45 | <n0042> | Haskell has been kind of a learning curve coming from a mostly C background, but it's quickly become one of my favorite languages to use. |
| 2020-11-25 14:10:48 | <maerwald> | if there's something worse than agile, it's fintech :p |
| 2020-11-25 14:11:08 | <tdammers> | intrinsic complexity is complexity that is inherent to the problem itself, rather than being introduced by the mechanics of the tools you use to solve it |
| 2020-11-25 14:11:22 | <maerwald> | as opposed to accidential complexity |
| 2020-11-25 14:11:26 | <tdammers> | yes |
| 2020-11-25 14:11:32 | <maerwald> | there's papers and blog posts about this distinction |
| 2020-11-25 14:11:49 | <honigkuchen> | agile is a way of leading your team and fintech is a industry branch? how to compare those? |
| 2020-11-25 14:12:35 | <ski> | @quote is.the.world's.best |
| 2020-11-25 14:12:35 | <lambdabot> | SPJ says: Haskell is the world's best imperative language. |
| 2020-11-25 14:12:39 | <honigkuchen> | so a calculator has intrinsic complexity |
| 2020-11-25 14:12:41 | <maerwald> | honigkuchen: I'm just talking about my PTSD |
| 2020-11-25 14:12:57 | → | lassulus joins (~lassulus@NixOS/user/lassulus) |
| 2020-11-25 14:13:05 | <honigkuchen> | but an editor maybe not |
| 2020-11-25 14:13:05 | <ski> | maerwald : "The problem is that ADTs are still not a standard for all languages" -- it seems some other more mainstream languages are slowly gaining them |
| 2020-11-25 14:13:41 | <honigkuchen> | https://en.wikipedia.org/wiki/PTSD_(disambiguation) |
| 2020-11-25 14:13:45 | <yushyin> | e.g. java |
| 2020-11-25 14:13:47 | <tdammers> | like, suppose you're writing a scheduling application for a logistics company. the routing and scheduling algorithms are fairly complex; no matter which language or tools you use, the problem will remain a complex one. that's the intrinsic complexity of the problem domain. now you build a frontend for that application, but the framework you pick doesn't quite get you the design you want, so you add all sorts |
| 2020-11-25 14:13:50 | <tdammers> | of quirks and workarounds to make it look like you want, and then more kludges to cover the edge cases that arise from that. that's accidental complexity. |
| 2020-11-25 14:14:12 | <honigkuchen> | ADTs seem to be cool and interesting, but what practical about them |
| 2020-11-25 14:14:26 | <tdammers> | in fact, centering things on a screen in HTML/CSS is a textbook example of accidental complexity |
| 2020-11-25 14:14:41 | <n0042> | Yay geometry |
| 2020-11-25 14:15:08 | <tdammers> | top = (screen.h - element.h) / 2 |
| 2020-11-25 14:15:13 | <tdammers> | that's all the complexity there is |
| 2020-11-25 14:15:37 | <tdammers> | but if you want to do it with CSS, it becomes A LOT more complex. that's all accidental complexity |
| 2020-11-25 14:15:38 | × | pjb quits (~t@2a01cb04063ec500710c4d3951adc2aa.ipv6.abo.wanadoo.fr) (Ping timeout: 264 seconds) |
| 2020-11-25 14:15:40 | <maerwald> | Depending on the problem, the Haskell itself can also be accidential complexity. |
| 2020-11-25 14:15:49 | <tdammers> | oh yes, very much |
| 2020-11-25 14:16:26 | <tdammers> | for example, when you need deterministic memory allocations - Haskell makes that really difficult, even though the problem itself is not intrinsically complex (call malloc() to get a chunk of memory, and free() to release it) |
| 2020-11-25 14:16:50 | <maerwald> | StrictData and pray the leaks go away |
| 2020-11-25 14:17:40 | <tdammers> | StrictData doesn't guarantee deterministic deallocation |
| 2020-11-25 14:17:59 | <maerwald> | yeah |
| 2020-11-25 14:18:01 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection) |
| 2020-11-25 14:18:07 | <maerwald> | so you pray |
| 2020-11-25 14:18:09 | <maerwald> | :D |
| 2020-11-25 14:18:16 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 2020-11-25 14:18:54 | <n0042> | I have been having a heck of a time coming around to the way Haskell does I/O, but the rest of the language is so nice that it's made it worth the effort. It's complex but I get why it's complex. |
| 2020-11-25 14:18:58 | × | hseg quits (~gesh@IGLD-84-228-238-117.inter.net.il) (Ping timeout: 246 seconds) |
| 2020-11-25 14:19:10 | <honigkuchen> | is there one great example of a very special particular task, in that haskell code is hugely much faster written, than an imperative code |
| 2020-11-25 14:20:00 | → | adm joins (~adm@43.229.88.197) |
| 2020-11-25 14:20:10 | <maerwald> | honigkuchen: yeah, quicksort, except it doesn't have the same properties :P |
| 2020-11-25 14:20:22 | <honigkuchen> | great |
| 2020-11-25 14:20:31 | <n0042> | Most of the benefits are about safety rather than speed, right? |
| 2020-11-25 14:20:43 | <merijn> | honigkuchen: My summary is: Getting started writing a simple project in Haskell is probably about 1.5-2x harder the same in Python. Writing a complex project in Haskell is about 10-100x easier than in Python :) |
| 2020-11-25 14:20:56 | <maerwald> | that's about right |
| 2020-11-25 14:21:12 | <merijn> | n0042: tbh, "just putting IO everywhere" is still nicer than many other languages :p |
| 2020-11-25 14:21:20 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 2020-11-25 14:21:24 | <maerwald> | if you don't intend to maintain your code much, picking haskell is a weird choice |
| 2020-11-25 14:21:40 | <maerwald> | that's where it becomes useful |
| 2020-11-25 14:21:48 | <merijn> | n0042: Haskell is also much faster than Python/Ruby/PHP, tbh |
| 2020-11-25 14:22:14 | <merijn> | n0042: JS might be comparable, but only because google has thrown tens of thousands of man-years at V8 :p |
| 2020-11-25 14:22:26 | <merijn> | And even then only if you write careful JS |
| 2020-11-25 14:22:28 | <honigkuchen> | has haskell also an interpreter |
| 2020-11-25 14:22:32 | <honigkuchen> | or only an compiler |
| 2020-11-25 14:22:40 | <maerwald> | but these days ppl have different approaches with dealing with complexity... they see the language is too dumb to handle large codebases, so they think: let's split the code and do microservices |
| 2020-11-25 14:22:44 | <n0042> | It has an interpreter |
| 2020-11-25 14:22:52 | <n0042> | GHCi |
| 2020-11-25 14:22:53 | <maerwald> | I haven't really seen microservices in haskell, because what's the point |
| 2020-11-25 14:22:58 | <honigkuchen> | so it is both? |
| 2020-11-25 14:23:09 | <merijn> | honigkuchen: GHC comes with ghci which is a interpreter. It's not really great for writing code in, but you can quickly load and play with small code examples |
| 2020-11-25 14:23:36 | <merijn> | n0042: What difficulties have you been having with IO, btw? |
| 2020-11-25 14:23:49 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@171.5.161.165) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-11-25 14:23:56 | <honigkuchen> | there are not much programs that its languages comes with both, interpreter and compiler, right? |
| 2020-11-25 14:24:17 | <merijn> | Well, someone wrote a C and C++ interpreter too, so... :p |
| 2020-11-25 14:24:45 | <n0042> | honigkuchen: Many languages are not so black and white. Python is an interpreted language but it keeps compiled versions of what you write so that ti can be run faster next time (.pyc files) |
| 2020-11-25 14:25:13 | <maerwald> | writing fast python code is definitely possible, but requires crazy knowledge of the internals |
| 2020-11-25 14:25:30 | <maerwald> | And the code afterwards isn't really intuitive stuff |
| 2020-11-25 14:25:38 | <n0042> | Similarly, GHCi seems to pre-compile files that you load with `:l` even though it interprets what you write into the REPL |
| 2020-11-25 14:26:05 | → | hseg joins (~gesh@IGLD-84-228-238-117.inter.net.il) |
| 2020-11-25 14:26:10 | <merijn> | n0042: It compiles to bytecode, not full compilation |
| 2020-11-25 14:26:21 | <merijn> | n0042: (which it also does for what you write in the REPL) |
| 2020-11-25 14:26:26 | <n0042> | That makes sense |
| 2020-11-25 14:26:28 | → | c0c0 joins (~coco@212-51-146-87.fiber7.init7.net) |
| 2020-11-25 14:26:37 | <honigkuchen> | you all always compare haskell always with python, but I never told that I use python most, and I do |
| 2020-11-25 14:27:05 | <merijn> | honigkuchen: It's one of the most common languages (together with JS), but I don't know JS :p |
| 2020-11-25 14:27:06 | <maerwald> | https://github.com/pkgcore/pkgcore is an example of a non-trivial optimised python application |
| 2020-11-25 14:27:25 | <maerwald> | so yes, you can do large projects in python too |
| 2020-11-25 14:27:56 | <maerwald> | but requires much more discipline |
| 2020-11-25 14:28:01 | <tdammers> | something being possible at all in a language is hardly an interesting metric, because pretty much anything can be done in any general-purpose language if you're thick-headed enough |
| 2020-11-25 14:28:05 | → | f-a joins (~f-a@151.68.209.164) |
| 2020-11-25 14:28:05 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood) |
| 2020-11-25 14:28:15 | <maerwald> | tdammers: aren't we? =) |
All times are in UTC.