Logs on 2022-03-30 (liberachat/#haskell)
| 00:02:29 | → | alp joins (~alp@user/alp) |
| 00:09:24 | × | mvk quits (~mvk@2607:fea8:5cc3:7e00::7980) (Ping timeout: 240 seconds) |
| 00:19:27 | × | xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
| 00:20:17 | → | xkuru joins (~xkuru@user/xkuru) |
| 00:20:21 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 00:24:34 | × | xff0x quits (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) (Ping timeout: 246 seconds) |
| 00:25:19 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
| 00:26:51 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 00:29:19 | → | merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
| 00:33:22 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 260 seconds) |
| 00:34:36 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 00:34:51 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 00:39:09 | → | zebrag joins (~chris@user/zebrag) |
| 00:40:47 | × | xcmw quits (~textual@dyn-72-33-2-250.uwnet.wisc.edu) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 00:44:43 | → | k8yun joins (~k8yun@user/k8yun) |
| 00:46:47 | × | gurkenglas quits (~gurkengla@dslb-178-012-018-212.178.012.pools.vodafone-ip.de) (Ping timeout: 260 seconds) |
| 00:47:24 | <zebrag> | "The pioneer string-processing language SNOBOL (1962)" (https://en.wikipedia.org/wiki/Backtracking) |
| 00:47:48 | × | obfusk quits (~quassel@a82-161-150-56.adsl.xs4all.nl) (Ping timeout: 240 seconds) |
| 00:48:19 | → | obfusk joins (~quassel@77-172-60-123.fixed.kpn.net) |
| 00:49:26 | <zebrag> | Do you know why "continuation" would be used for backtracking? I mean "continuation" is often used in relation with backtracking sort of parsers. |
| 00:52:27 | <zebrag> | With monadic parsers, one of the important point is that list-monad can be used for backtracking. But I've never found why "continuation" is used in relation with parsers. |
| 00:52:56 | <abastro[m]> | Becuz monad is continuation with effects |
| 00:53:01 | <abastro[m]> | Or wait, what was the term |
| 00:53:24 | <zebrag> | I wait |
| 00:54:12 | <abastro[m]> | A monad is just submonad of continuation |
| 00:55:13 | <abastro[m]> | That is, if you have continuations and state, you can simulate any functional monad. |
| 00:55:45 | <c_wraith> | zebrag: continuations in parsers are mostly used for efficiency |
| 00:56:06 | <zebrag> | there is that too |
| 00:56:12 | <abastro[m]> | If you think about `a -> m b`, it is sort of continuation after `a` |
| 00:56:38 | <abastro[m]> | But yea continuation is efficient in that application too |
| 01:00:48 | <c_wraith> | like, you can find a non-continuation encoding of what most parser monads are doing, I'm sure. But they'll end up doing a lot more pattern matching on ADTs, which is a lot slower of an operation than just passing around extra parameters which function as continuations for the exceptional cases |
| 01:03:06 | → | xff0x joins (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) |
| 01:03:14 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 01:03:25 | <zebrag> | yes, looking into that |
| 01:03:35 | × | merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
| 01:03:36 | → | mud joins (~mud@user/kadoban) |
| 01:06:20 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Quit: WeeChat 3.4.1) |
| 01:07:37 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 01:07:38 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 01:10:29 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:16:34 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 01:16:36 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:20:48 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 01:20:48 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 01:20:48 | → | wroathe joins (~wroathe@user/wroathe) |
| 01:21:08 | × | DNH quits (~DNH@2a02:8108:1100:16d8:61e3:f551:d48e:e2b3) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 01:21:20 | → | neurocyte86 joins (~neurocyte@IP-094046070123.dynamic.medianet-world.de) |
| 01:21:20 | × | neurocyte86 quits (~neurocyte@IP-094046070123.dynamic.medianet-world.de) (Changing host) |
| 01:21:20 | → | neurocyte86 joins (~neurocyte@user/neurocyte) |
| 01:23:31 | × | neurocyte8 quits (~neurocyte@user/neurocyte) (Ping timeout: 256 seconds) |
| 01:23:31 | neurocyte86 | is now known as neurocyte8 |
| 01:28:37 | × | Chargen quits (~chargen@8.21.8.253) (Quit: Leaving) |
| 01:30:23 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 01:34:55 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 246 seconds) |
| 01:35:07 | × | alp quits (~alp@user/alp) (Ping timeout: 250 seconds) |
| 01:37:16 | → | Mxfromagna joins (~Mxfromagn@mob-5-90-109-174.net.vodafone.it) |
| 01:37:22 | → | chenqisu1 joins (~chenqisu1@183.217.200.168) |
| 01:39:09 | × | Mxfromagna quits (~Mxfromagn@mob-5-90-109-174.net.vodafone.it) (Client Quit) |
| 01:39:25 | <Axman6> | Is it fair to say that, at least in GHC, continuation passing basically lets you pass in a target for a goto? It's literally just a jump in the compiled code right? |
| 01:41:25 | × | ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection) |
| 01:42:37 | <abastro[m]> | I wonder if it works that way in GHC's STG |
| 01:43:39 | <Axman6> | I believe it does, a function call is just a jump to that function |
| 01:46:20 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 02:02:48 | × | Benzi-Junior quits (~BenziJuni@dsl-149-64-179.hive.is) (Quit: ZNC 1.8.2 - https://znc.in) |
| 02:03:37 | → | _xor joins (~xor@74.215.232.169) |
| 02:06:10 | × | nosewings quits (~ngpc@2603-8081-3e05-e2d0-ab92-d9c1-c016-553e.res6.spectrum.com) (Remote host closed the connection) |
| 02:06:49 | → | xcmw joins (~textual@dyn-72-33-2-250.uwnet.wisc.edu) |
| 02:10:56 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 02:10:56 | × | lumberjack123 quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Remote host closed the connection) |
| 02:11:40 | × | zyklotomic quits (~ethan@res380d-128-61-83-149.res.gatech.edu) (Ping timeout: 246 seconds) |
| 02:11:52 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 02:12:15 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 02:12:25 | × | _xor quits (~xor@74.215.232.169) (Quit: WeeChat 3.4.1) |
| 02:12:47 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 02:12:47 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 02:12:47 | → | wroathe joins (~wroathe@user/wroathe) |
| 02:13:40 | → | zyklotomic joins (~ethan@r4-128-61-93-8.res.gatech.edu) |
| 02:14:10 | → | alMalsamo joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 02:14:15 | alMalsamo | is now known as lumberjack123 |
| 02:19:55 | → | Guest|18 joins (~Guest|18@116.21.1.31) |
| 02:23:13 | <Guest|18> | :) |
| 02:23:21 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 02:24:15 | <Axman6> | We currently don't have any way to define types which contain an unpacked array of a known size do we? I'd love to be able to do data Tree n k v = Empty | Leaf k v | Node {-#UNPACK#-} (Vec n (Tree n k v)) |
| 02:25:15 | → | AlexNoo_ joins (~AlexNoo@178.34.151.158) |
| 02:27:24 | × | AlexZenon quits (~alzenon@94.233.240.35) (Ping timeout: 240 seconds) |
| 02:27:24 | × | Alex_test quits (~al_test@94.233.240.35) (Ping timeout: 240 seconds) |
| 02:28:06 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 272 seconds) |
| 02:28:37 | × | AlexNoo quits (~AlexNoo@94.233.240.35) (Ping timeout: 240 seconds) |
| 02:28:52 | × | xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
| 02:33:13 | <abastro[m]> | Unpacked array? What is that? |
| 02:33:17 | <abastro[m]> | Oh |
| 02:33:29 | <abastro[m]> | Like Vector.Unboxed but dependently sized? |
| 02:33:38 | → | Alex_test joins (~al_test@178.34.151.158) |
| 02:34:13 | → | AlexZenon joins (~alzenon@178.34.151.158) |
| 02:37:23 | × | dsrt^ quits (~dsrt@96-91-136-49-static.hfc.comcastbusiness.net) (Ping timeout: 260 seconds) |
| 02:38:53 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 02:38:53 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 02:38:53 | finn_elija | is now known as FinnElija |
| 02:45:19 | × | Typedfern quits (~Typedfern@220.red-83-56-165.dynamicip.rima-tde.net) (Ping timeout: 260 seconds) |
| 02:49:16 | × | raym quits (~raym@user/raym) (Quit: kernel update, rebooting...) |
| 02:49:59 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 256 seconds) |
| 02:50:52 | → | raym joins (~raym@user/raym) |
| 02:54:04 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 02:59:04 | → | slim joins (uid300876@id-300876.lymington.irccloud.com) |
| 02:59:44 | → | cdman joins (~dcm@27.2.218.248) |
| 02:59:44 | × | cdman quits (~dcm@27.2.218.248) (Changing host) |
| 02:59:44 | → | cdman joins (~dcm@user/dmc/x-4369397) |
| 02:59:51 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 02:59:59 | → | merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
| 03:01:58 | → | Typedfern joins (~Typedfern@73.red-83-57-140.dynamicip.rima-tde.net) |
| 03:05:16 | → | slim_ joins (uid300876@id-300876.lymington.irccloud.com) |
| 03:07:48 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 03:07:59 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 03:07:59 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 03:07:59 | → | wroathe joins (~wroathe@user/wroathe) |
| 03:13:42 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 272 seconds) |
| 03:17:43 | × | lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection) |
| 03:17:55 | → | lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) |
| 03:21:43 | → | mbuf joins (~Shakthi@136.185.73.48) |
| 03:25:57 | × | aeka quits (~aeka@user/hiruji) (Ping timeout: 240 seconds) |
| 03:27:58 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 03:28:33 | → | aeka joins (~aeka@user/hiruji) |
| 03:34:36 | × | merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds) |
| 03:56:12 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 268 seconds) |
| 03:58:47 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 03:59:57 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 04:00:23 | → | nate1 joins (~nate@98.45.167.61) |
| 04:00:24 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Read error: Connection reset by peer) |
| 04:00:53 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 04:02:31 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 256 seconds) |
| 04:02:51 | × | rawley quits (~rawley@216-197-141-102.nbfr.hsdb.sasknet.sk.ca) (Remote host closed the connection) |
| 04:03:10 | × | abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Quit: leaving) |
| 04:04:28 | → | notzmv joins (~zmv@user/notzmv) |
| 04:04:43 | × | nate1 quits (~nate@98.45.167.61) (Ping timeout: 246 seconds) |
| 04:06:40 | → | deadmarshal_ joins (~deadmarsh@95.38.118.21) |
| 04:08:10 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 04:09:11 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 04:09:41 | → | hgolden joins (~hgolden2@cpe-172-251-233-141.socal.res.rr.com) |
| 04:13:13 | × | whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 04:14:18 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
| 04:25:19 | → | vicfred joins (~vicfred@user/vicfred) |
| 04:30:25 | × | ystael quits (~ystael@user/ystael) (Read error: Connection reset by peer) |
| 04:34:03 | → | ystael joins (~ystael@user/ystael) |
| 04:37:04 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Quit: ChaiTRex) |
| 04:37:39 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 04:39:53 | × | bitmapper quits (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 04:48:08 | × | xcmw quits (~textual@dyn-72-33-2-250.uwnet.wisc.edu) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 04:51:02 | × | EsoAlgo quits (~EsoAlgo@152.70.142.52) (Quit: The Lounge - https://thelounge.chat) |
| 04:51:38 | → | benin joins (~benin@183.82.24.110) |
| 04:52:41 | → | EsoAlgo joins (~EsoAlgo@152.70.142.52) |
| 05:13:56 | <Axman6> | abastro[m]: not quite, more that the array itself would be unpackable into the structure, Tree 8 k v would have nodes that are smaller than Tree 16 k v because the array is like having another 8/16 fields in the constructor |
| 05:14:41 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 05:18:22 | <abastro[m]> | So basically vector without indirection? |
| 05:18:40 | <abastro[m]> | I thought unpacked data fields are for that |
| 05:18:49 | <Axman6> | yeah - whether the values inside are boxed or not is another consideration |
| 05:19:20 | → | danso joins (~danso@danso.ca) |
| 05:19:44 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 272 seconds) |
| 05:20:30 | <abastro[m]> | I guess encoding of the Vector library might be important then |
| 05:20:43 | <Axman6> | ideally you could have an unboxed array of unboxed values - similar to C's struct foo { size_t len; uint8_t vec[];} which allows the vec to hang off the end of the struct |
| 05:20:48 | × | Unicorn_Princess quits (~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Remote host closed the connection) |
| 05:20:50 | <abastro[m]> | I think I am heard of unboxed vector |
| 05:20:55 | <abastro[m]> | I mean |
| 05:21:01 | <abastro[m]> | Unpacked vector. |
| 05:22:46 | × | deadmarshal_ quits (~deadmarsh@95.38.118.21) (Ping timeout: 246 seconds) |
| 05:22:51 | <danso> | main = putStrLn "hello world" >> threadDelay 5000000 |
| 05:23:06 | <danso> | this trivial program outputs "hello world" then waits 5 seconds before exiting |
| 05:23:21 | <danso> | unless i redirect stdout from the shell. |
| 05:23:22 | <Axman6> | normal Vector is like struct vec {size_t len; object *[] vals;} (array of pointers to some object) with unboxed being like struct vec {size_t len; uint64_t[] vals;}, an array of values directly in the array |
| 05:23:45 | <danso> | if i run ./helloworld > output.txt, nothing is written to output.txt until the program terminates |
| 05:23:59 | <danso> | sorry if this is not exactly a haskell question, but i don't even know where to begin looking |
| 05:24:29 | <Axman6> | yeah that's a buffering question |
| 05:25:00 | <danso> | i haven't found any other language implementations that have this behaviour; only GHC |
| 05:25:04 | <Axman6> | you can change the BufferingMode on the stdout handle to something like line buffered (I can't remember what the other choices are) |
| 05:25:16 | <Axman6> | @hoogle BufferingMode |
| 05:25:16 | <lambdabot> | No results found |
| 05:25:17 | <monochrom> | Ugh, this happens in C too. |
| 05:25:21 | <Axman6> | @hoogle BufferMode |
| 05:25:21 | <lambdabot> | System.IO data BufferMode |
| 05:25:21 | <lambdabot> | GHC.IO.Handle data BufferMode |
| 05:25:21 | <lambdabot> | GHC.IO.Handle.Types data BufferMode |
| 05:26:21 | <monochrom> | In fact I have great fun teasing^W teaching my student if in C you have printf("hello") then fork, why you will eventually see "hello" twice. :) |
| 05:26:47 | <monochrom> | Pretty sure all languages do this. |
| 05:26:49 | <abastro[m]> | Oh, the point about size having to be known is prob problematic |
| 05:26:50 | <Axman6> | damn handles |
| 05:27:22 | <monochrom> | Either that or someone would have complained "such low I/O performance, please reinstate block buffering" |
| 05:27:33 | <danso> | interesting monochrom, i just tested and you are correct |
| 05:27:52 | <danso> | i only tested shell (dash) and python, both of which behaved the way i expected |
| 05:28:09 | <Axman6> | changing the buffering mode for handles used for logging is something you pretty commonly want |
| 05:28:38 | <monochrom> | The shell command "foo > file" contains a close(stdout). |
| 05:29:02 | <monochrom> | Especially when foo is an executable. |
| 05:30:30 | → | merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
| 05:32:32 | <danso> | thanks both, `hSetHandle stdout LineBuffering` was the fix i needed |
| 05:32:47 | <danso> | i'm going to have to dig deeper another time to learn more tho :^) |
| 05:32:58 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 05:33:13 | → | michalz joins (~michalz@185.246.204.107) |
| 05:33:27 | <abastro[m]> | I hate how my reply is somehow out of place because matrix bridge |
| 05:33:55 | <monochrom> | Come join the dark side ^W^W IRC >:) |
| 05:34:21 | <monochrom> | https://xkcd.com/1782/ |
| 05:34:27 | × | k8yun quits (~k8yun@user/k8yun) (Quit: Leaving) |
| 05:34:36 | <Axman6> | There are only two chat protocols, IRC and whatever the falvour of the week is |
| 05:35:32 | <Axman6> | particularly when we have such a nice Haskell IRC client in glirc, there's no excuse (thanks glguy! <3) |
| 05:35:56 | <abastro[m]> | Haha |
| 05:36:15 | <abastro[m]> | nice haskell irc client? |
| 05:36:20 | <abastro[m]> | Which one? |
| 05:36:34 | <Axman6> | glirc |
| 05:36:49 | <Axman6> | @hackage glirc |
| 05:36:50 | <lambdabot> | https://hackage.haskell.org/package/glirc |
| 05:37:29 | <abastro[m]> | > Greater Long Island Running Group |
| 05:37:31 | <lambdabot> | error: |
| 05:37:31 | <lambdabot> | • Data constructor not in scope: |
| 05:37:31 | <lambdabot> | Greater :: t0 -> t1 -> t2 -> t3 -> t |
| 05:37:38 | <abastro[m]> | https://www.glirc.org/ |
| 05:37:44 | <abastro[m]> | Hmm |
| 05:40:12 | → | dsrt^ joins (~dsrt@96-91-136-49-static.hfc.comcastbusiness.net) |
| 05:41:53 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 05:45:20 | → | Graham31415 joins (~Graham@user/Graham31415) |
| 05:48:01 | <abastro[m]> | Oh, so there was a package named `glirc` |
| 06:04:33 | × | merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
| 06:06:02 | <abastro[m]> | How do I automatically generate config file for glirc? |
| 06:08:07 | × | lumberjack123 quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Remote host closed the connection) |
| 06:08:13 | → | deadmarshal_ joins (~deadmarsh@95.38.118.21) |
| 06:08:20 | → | lumberjack123 joins (~alMalsamo@gateway/tor-sasl/almalsamo) |
| 06:08:23 | <Axman6> | I think I just copied one from the wiki on github - that's where all the docs are |
| 06:10:18 | <abastro[m]> | Personally I wish it were easier to use |
| 06:14:10 | <Graham31415> | operator associativity seems to always be explained by placing parentheses around an expression, as in (a+b)+c. I feel this is incomplete though. How should one interpret two operators of equal precendence, say opL with left associativity and opR with right associativity, in: a `opR` b `opL` c? |
| 06:14:36 | <Axman6> | as a parser error |
| 06:14:42 | → | ss- joins (~ss-@187.83.249.216.dyn.smithville.net) |
| 06:14:44 | <Graham31415> | So what is the non-parentheses explanation for operator associativity? |
| 06:15:43 | <jackdk> | % f <&> g >>> h |
| 06:15:43 | <yahb> | jackdk: ; <interactive>:14:1: error: Precedence parsing error cannot mix `<&>' [infixl 1] and `>>>' [infixr 1] in the same infix expression |
| 06:16:00 | <Axman6> | I feel like you've run into exactly the problem that definind precedence and associativity was built to solve, it's ambiguous, so what should the compiler do? |
| 06:16:39 | <Axman6> | it has to (consistently!) pick weither (a `opR` b) `opL c OR a `opR` (b `opL` c) |
| 06:16:43 | <Graham31415> | Thank you! Strangely, when operator associativity is explained this is never mentioned! |
| 06:16:44 | <Axman6> | either |
| 06:17:24 | <abastro[m]> | Due to the ambiguity of this situation, there is a school of thought that precedence is not ideal |
| 06:17:39 | <Axman6> | yeah I feel a lot of how this is taught is from the perspective of someone who's actually run into this problem before. If you haven't it's not obvious why you'd care |
| 06:17:57 | <Axman6> | need moar lisp or RPN |
| 06:17:59 | <abastro[m]> | Wait, I don't mean what I said |
| 06:18:01 | <ss-> | i'm trying to get profiling to work on a stack project I have, but I keep running into "Perhaps you haven't installed the profiling libraries for package `base-4.15.1.0`?". running stack build --profile with lts-19.1 after stack clean, stack clean --full, stack purge and nothing makes a difference. isn't stack supposed to know to reinstall |
| 06:18:01 | <ss-> | profiling versions or am I missing something here? do i have to delete the global ~/.stack to reset it? |
| 06:18:37 | <Graham31415> | I see that the common Haskell operators of a given precedence generally associate in the same direction, which makes much more sense now. |
| 06:18:49 | → | ProfSimm joins (~ProfSimm@87.227.196.109) |
| 06:20:05 | <Axman6> | yeah |
| 06:20:06 | <ephemient> | https://www.haskell.org/onlinereport/exps.html "Consecutive unparenthesized operators with the same precedence must both be either left or right associative to avoid a syntax error." |
| 06:21:27 | Graham31415 | adds the haskell report to his reading list |
| 06:22:41 | <abastro[m]> | I meant that ppl propose operators of same precedence to never mix together |
| 06:22:55 | <abastro[m]> | Like, not permitting `a + b + c`, instead always do `(a + b) + c` |
| 06:24:42 | <Axman6> | (+ a b c) |
| 06:24:53 | <abastro[m]> | a `opR` b `opL` c would also be similarly disallowed |
| 06:25:52 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 06:25:57 | <ephemient> | even if they're at different precedence levels? |
| 06:26:49 | → | califax joins (~califax@user/califx) |
| 06:27:22 | × | neurocyte8 quits (~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat) |
| 06:27:43 | → | mncheck joins (~mncheck@193.224.205.254) |
| 06:27:50 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 06:28:23 | → | neurocyte86 joins (~neurocyte@IP-094046070123.dynamic.medianet-world.de) |
| 06:28:24 | × | neurocyte86 quits (~neurocyte@IP-094046070123.dynamic.medianet-world.de) (Changing host) |
| 06:28:24 | → | neurocyte86 joins (~neurocyte@user/neurocyte) |
| 06:28:30 | <abastro[m]> | Oh, allowed if different precedence levels |
| 06:28:49 | <abastro[m]> | They'd like it only disallowed when same precedence levels, even for the same operator |
| 06:28:50 | <ephemient> | that's already how it works in Haskell then |
| 06:28:59 | <abastro[m]> | So no need to left/right specify? |
| 06:29:07 | <ephemient> | I mean no mixing left and right |
| 06:29:28 | <Axman6> | % :info (<$>) |
| 06:29:28 | <yahb> | Axman6: (<$>) :: Functor f => (a -> b) -> f a -> f b -- Defined in `Data.Functor'; infixl 4 <$> |
| 06:29:32 | <Axman6> | % :info (<*>) |
| 06:29:32 | <yahb> | Axman6: type Applicative :: (* -> *) -> Constraint; class Functor f => Applicative f where; ...; (<*>) :: f (a -> b) -> f a -> f b; ...; -- Defined in `GHC.Base'; infixl 4 <*> |
| 06:29:40 | <Axman6> | % :info (<&>) |
| 06:29:40 | <yahb> | Axman6: (<&>) :: Functor f => f a -> (a -> b) -> f b -- Defined in `Data.Functor'; infixl 1 <&> |
| 06:29:43 | <Axman6> | % :info (>>>) |
| 06:29:43 | <yahb> | Axman6: (>>>) :: forall {k} (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c -- Defined in `Control.Category'; infixr 1 >>> |
| 06:30:19 | <ephemient> | arithmetic is one thing, but having to parenthesize `a : b : c : _` would be pretty painful (fixity rules apply to pattern matching too) |
| 06:30:25 | × | ystael quits (~ystael@user/ystael) (Ping timeout: 256 seconds) |
| 06:30:48 | → | ystael joins (~ystael@user/ystael) |
| 06:32:53 | <abastro[m]> | I mean, yea they do propose `a : (b : (c : _))` being easier to understand |
| 06:34:25 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 06:35:24 | → | califax joins (~califax@user/califx) |
| 06:35:51 | <ephemient> | I suppose that is a consistent opinion at least... |
| 06:36:07 | × | shriekingnoise quits (~shrieking@201.231.16.156) (Quit: Quit) |
| 06:36:11 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 06:37:05 | → | odnes joins (~odnes@5-203-245-187.pat.nym.cosmote.net) |
| 06:37:06 | → | califax joins (~califax@user/califx) |
| 06:38:39 | × | ss- quits (~ss-@187.83.249.216.dyn.smithville.net) (Quit: Client closed) |
| 06:38:46 | × | euandreh quits (~euandreh@2804:14c:33:9fe5:9dda:4bff:cdb5:90b8) (Ping timeout: 260 seconds) |
| 06:38:53 | × | deadmarshal_ quits (~deadmarsh@95.38.118.21) (Ping timeout: 252 seconds) |
| 06:39:09 | <abastro[m]> | Yep |
| 06:39:35 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 260 seconds) |
| 06:40:56 | <abastro[m]> | Let me clarify after 10 minutes |
| 06:47:05 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 06:48:06 | → | califax joins (~califax@user/califx) |
| 06:50:39 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 06:50:52 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 06:52:15 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 06:52:25 | <abastro[m]> | Well those ppl usually do not think much about patterns |
| 06:52:45 | <abastro[m]> | However, I think they would be okay with `a : (b : (c : _))` |
| 06:52:48 | <abastro[m]> | In the end, wouldn |
| 06:53:09 | <abastro[m]> | Wouldn't it as readable as lisp anyway? |
| 06:53:14 | <abastro[m]> | (If you get used to it) |
| 06:54:47 | → | fendor joins (~fendor@178.165.199.73.wireless.dyn.drei.com) |
| 06:56:03 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 06:56:14 | → | acidjnk joins (~acidjnk@p200300d0c7049f58501b6673664ff2c4.dip0.t-ipconnect.de) |
| 06:59:41 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 07:05:52 | → | vysn joins (~vysn@user/vysn) |
| 07:06:30 | → | euandreh joins (~euandreh@191.181.59.160) |
| 07:14:59 | × | lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection) |
| 07:15:26 | → | merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
| 07:16:40 | → | Major_Biscuit joins (~MajorBisc@2a02:a461:129d:1:193d:75d8:745d:e91e) |
| 07:16:46 | × | Major_Biscuit quits (~MajorBisc@2a02:a461:129d:1:193d:75d8:745d:e91e) (Client Quit) |
| 07:21:49 | → | MajorBiscuit joins (~MajorBisc@c-001-013-026.client.tudelft.eduvpn.nl) |
| 07:23:53 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 07:25:50 | → | abastro joins (~abab9579@143.248.229.191) |
| 07:29:52 | → | Codaraxis_ joins (~Codaraxis@user/codaraxis) |
| 07:31:03 | → | lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) |
| 07:32:06 | × | rembo10 quits (~rembo10@main.remulis.com) (Quit: ZNC 1.8.2 - https://znc.in) |
| 07:33:00 | → | rembo10 joins (~rembo10@main.remulis.com) |
| 07:33:30 | → | jonathanx_ joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 07:33:36 | <abastro> | splits libera:#haskell libera:#haskell-offtopic |
| 07:33:39 | → | Inst joins (~Liam@2601:6c4:4080:3f80:d8aa:2d89:2452:a45) |
| 07:33:40 | <abastro> | Oh sorry |
| 07:33:48 | × | Codaraxis quits (~Codaraxis@user/codaraxis) (Ping timeout: 260 seconds) |
| 07:34:04 | <Inst> | yo |
| 07:34:18 | <Inst> | can CPS be used to make it so that a function takes one argument by default, but CPS allows it to take multiple functions? |
| 07:34:29 | <Inst> | as an example case, i have a library that hooks me into tinyfiledialogs |
| 07:34:37 | <Inst> | the problem is that invoking its functions are a pain |
| 07:35:07 | <abastro> | Guess that should depend on what you mean by "making functions take one argument" |
| 07:35:22 | <Inst> | well, all haskell functions only take one argument |
| 07:35:38 | <Inst> | but the idea is that, say, i have filepathfinder * |
| 07:36:08 | <Inst> | CPS would have it be defaultpath (filepathfinder *) ** |
| 07:36:32 | <Inst> | filepathfinder by default opens up a window, but the CPS version would allow me to pass an additional argument to filepathfinder |
| 07:36:52 | <Inst> | and the expression returned is a filepath |
| 07:36:58 | <abastro> | Hm, can you say the type of `filepathfinder` |
| 07:37:21 | → | lortabac joins (~lortabac@88.125.6.227) |
| 07:37:29 | <abastro> | Is it a library function? |
| 07:37:38 | <Inst> | IO FilePath |
| 07:37:50 | → | mikoto-chan joins (~mikoto-ch@213.177.151.239) |
| 07:37:52 | <Inst> | where FilePath = Text |
| 07:38:10 | <abastro> | `filepathfinder :: IO FilePath`? |
| 07:38:39 | → | dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be) |
| 07:40:25 | <Inst> | yeah |
| 07:40:29 | <abastro> | Simply that just takes no parameter though |
| 07:40:41 | <abastro> | In fact, such `filepathfinder` is not even a function |
| 07:40:42 | <Inst> | i guess, but defaultpath (filepathfinder) * |
| 07:40:47 | <Inst> | IO action |
| 07:41:05 | <Inst> | filepathFinder is a wrapper around a function that takes 4 arguments |
| 07:41:07 | <abastro> | All you can do with the action is just running it. |
| 07:41:29 | <abastro> | Eh, what do you now mean by "wrapper around a function taking 4 arguments" |
| 07:41:38 | <abastro> | Oh wait, is this about a FFI binding? |
| 07:41:41 | <Inst> | it invokes the function, but with arguments |
| 07:41:42 | <Inst> | yeah |
| 07:41:46 | <Inst> | as "" |
| 07:41:48 | <abastro> | So that the library does not expose enough arguments? |
| 07:41:56 | <Inst> | the library exposes tons of arguments |
| 07:42:15 | <abastro> | Uhm, I mean the haskell side of the library |
| 07:42:18 | <Inst> | i just want to be able to run filepathfinder by default, with the default arguments being "" :: Text |
| 07:42:32 | <Inst> | openFileDialog "" "" "" "" |
| 07:42:41 | <abastro> | Oh, now I see |
| 07:42:44 | <Inst> | filepathFinder = openFileDialog "" "" "" "" |
| 07:42:52 | <abastro> | So you want to call e.g. `openFileDialong "" "" "" ""` |
| 07:43:06 | <abastro> | but that's, you know, not easy to use - that is what you mean? |
| 07:43:12 | <Inst> | I want to see if I can set it up so a syntax of startingPath filepathFinder equals openFileDialog with the startingPath field filled out |
| 07:43:34 | <abastro> | In my case, I just write function for that |
| 07:43:35 | <Inst> | openFileDialog is in the lib, which has FFI built for it |
| 07:43:54 | <abastro> | Like, filepathfinder foo = openFileDialog "bar" "baz" foo "meh" |
| 07:43:57 | <Inst> | startingPath openFileDialog * is ergonomic enough |
| 07:44:28 | <abastro> | Then, use your `filepathfinder` afterwards |
| 07:44:33 | <Inst> | hmmm |
| 07:44:54 | <Inst> | trying to figure out how to get openFileDialog to work without any arguments, as well as with some arguments imposed on it by a larger function |
| 07:44:56 | <Inst> | it's not that hard, tbh |
| 07:45:04 | <Inst> | use pattern matching to check cases |
| 07:45:06 | <Inst> | but it's rather ugly |
| 07:46:39 | <abastro> | Wait, pattern matching? How does pattern matching work here? |
| 07:48:27 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 07:48:58 | <abastro> | Also, I wonder how much familiar you are with haskell |
| 07:49:31 | <Inst> | why? |
| 07:49:45 | × | troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 256 seconds) |
| 07:50:29 | <abastro> | I mean, are you fairly familiar with haskell, or are you an intermediate haskeller? |
| 07:50:56 | <Inst> | beginner / intermediate |
| 07:51:02 | <abastro> | Because it is a bit hard to understand what you want |
| 07:51:07 | <abastro> | Ah, so you are intermediate |
| 07:51:11 | <[exa]> | Inst: if I get it right, you're trying to have the filepathFinder work with varying number of arguments? |
| 07:51:14 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 07:51:15 | <Inst> | yeah |
| 07:51:44 | <Inst> | with the structure being used to have the function be fed as an argument to another function in order to have multiple arguments |
| 07:51:49 | <Inst> | by itself it has no arguments |
| 07:51:49 | → | cfricke joins (~cfricke@user/cfricke) |
| 07:51:55 | <abastro> | Oh. Perhaps I am just not good at reading |
| 07:52:39 | <abastro> | So, you mean you want to make it work for both `filepathfinder "foo"` and `filepathfinder "foo" "bar"`? |
| 07:52:54 | <[exa]> | Inst: yes that can be done except patternmatching alone is not sufficient (parameter count for patternmatching is completely static, no matter what you match) |
| 07:53:16 | <[exa]> | Inst: it can be done with a simple typeclass though that allows the typesystem to decide how many parameters the filepathfinder actually takes |
| 07:53:35 | <Inst> | i think it can be done via pattern matching |
| 07:53:54 | <Inst> | let shell1function = actualfunction "" "" "" "" |
| 07:53:58 | <abastro> | Well, pattern matching only works with specified types |
| 07:54:37 | <Inst> | then argumentfeeder arg, if it meets shell function, turns it into actualfunction "" arg "" "" |
| 07:54:40 | <abastro> | So you cannot have both `fn "foo" "bar"` and `fn "foo"` working with pattern matching. |
| 07:54:51 | <[exa]> | Inst: you can't patternmatch different counts of arguments (first the types won't match, and it's also forbidden explicitly for some reasonable reason) |
| 07:54:54 | <abastro> | Oh wait |
| 07:55:17 | <abastro> | Hm yea, that would not work without typeclass |
| 07:55:18 | <[exa]> | Inst: have a look at `printf` package where they do basically the same :] |
| 07:55:35 | <abastro> | Though there is another way to simulate these kinds of parameters |
| 07:56:17 | <abastro> | Like `someFunction def { foo = "foo", bar = "bar" }` |
| 07:56:33 | <Inst> | i could always dummy it out, like, force the function to include _ in the calling |
| 07:56:52 | <[exa]> | Inst: the other way is to have a monoid for argument types, like optparse-applicative does |
| 07:56:55 | <abastro> | And you define `def` like `def = FooRecord { foo = "", bar = "", baz = "", baq = "" }` |
| 07:57:07 | × | benin quits (~benin@183.82.24.110) (Ping timeout: 246 seconds) |
| 07:57:11 | <[exa]> | I'd say optparse is in fact very nice |
| 07:57:13 | <abastro> | Monoid also works well with arguments |
| 07:57:57 | × | slim_ quits (uid300876@id-300876.lymington.irccloud.com) () |
| 07:59:27 | <[exa]> | Inst: is there any "semantics" for the arguments/argument in your var-arg function? |
| 08:03:24 | <Andrew> | Anyone has a beginner-friendly guide for doing socket programming? |
| 08:03:33 | <Andrew> | Especially TCP |
| 08:03:52 | <[exa]> | Andrew: 1] brace for impact |
| 08:04:04 | → | troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua) |
| 08:04:11 | <abastro> | wh |
| 08:04:26 | <Andrew> | Well, I certainlly do have the flight data recorder |
| 08:05:00 | <Inst> | [exa] sort of |
| 08:05:03 | <Inst> | i'll have to look it up |
| 08:05:46 | → | zeenk joins (~zeenk@2a02:2f04:a313:d600:8d26:ec9f:3ff6:fc94) |
| 08:06:09 | → | Hemmo joins (Hemmo@eduroam-252-47.uta.fi) |
| 08:06:24 | <Andrew> | https://hackage.haskell.org/package/network-3.1.1.1/docs/Network-Socket.html, interesting |
| 08:06:38 | <[exa]> | Andrew: anyway I wanted to say that either it's super simple (you use haskell to abstract yourself from all the blocking&polling and use the TCP socket literally as a file handle or stdin/stdout), OR pretty complicated (you write the polling yourself and explode from the amount of possibilities the stuff can go wrong) |
| 08:07:15 | <Andrew> | Got it |
| 08:07:17 | <abastro> | Btw what is the role of optparse? I thought it was for parsing command arguments |
| 08:07:27 | <abastro> | Apparently it isn't, I guess |
| 08:08:38 | <[exa]> | the first approach is recommended; the only extra thing you need to know is that the TCP sockets have addresses instead of filenames (you can get them from hostnames using `getAddrInfo`), and you open the communication channels using `socket->bind->listen->accept` on the server side and `socket->connect` on the client side |
| 08:08:49 | → | alp joins (~alp@user/alp) |
| 08:10:06 | <Andrew> | [exa]: Thanks |
| 08:10:31 | <Andrew> | One of the other issues quite specific to me is that before, I've only looked at the mathematical and CS side of Haskell, I haven't looked at the practical side |
| 08:10:47 | <Andrew> | So what's happening here is I don't know how to debug issues with things like "I can't find this library" |
| 08:11:11 | <[exa]> | Andrew: btw it's pretty easy with haskell to make a tiny terminal server that people can connect to using telnet, for example this is a "painting server" I gave to students last time https://github.com/exaexa/hs21/blob/master/u3/paintserver.hs (they had to write the client for homework) |
| 08:11:42 | <abastro> | "Can't find library"? e.g. when setting up through cabal? |
| 08:11:47 | <[exa]> | Andrew: with simple technical questions usually just posting/pastebinning the error here (depending on length) will get you a quick solution :D |
| 08:11:52 | <Andrew> | https://hackage.haskell.org/package/network-3.1.1.1/docs/Network-Socket.html ... the server program on here, when I try to compiule it, says that variables gracefulClose and withFdSocket are not in scope |
| 08:11:59 | <Andrew> | k |
| 08:12:15 | × | tiferrei2000 quits (~tiferrei@user/tiferrei) (Ping timeout: 240 seconds) |
| 08:12:21 | <Andrew> | https://lib.andrewyu.org/public/echo-serv.hs |
| 08:12:47 | <Andrew> | and output: termbin.com/bie9l |
| 08:13:23 | <[exa]> | what's the version of network package you have installed? seems like the 2 functions are fairly new |
| 08:13:48 | <[exa]> | if you have cabal file around, make sure you explicitly depend on a version newer than 3.1 (see the notes in the docs there) |
| 08:13:48 | <Andrew> | ghc 8.10.4, not sure how I check any packages |
| 08:14:01 | → | cosimone joins (~user@93-44-187-176.ip98.fastwebnet.it) |
| 08:14:12 | × | Inst quits (~Liam@2601:6c4:4080:3f80:d8aa:2d89:2452:a45) (Ping timeout: 240 seconds) |
| 08:14:17 | Andrew | tries cabal install Network |
| 08:14:24 | <Andrew> | s/N/n/ |
| 08:14:31 | <Andrew> | Ok, I do need an update |
| 08:14:33 | <Andrew> | Thanks :) |
| 08:14:35 | <[exa]> | yes that might help |
| 08:14:44 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.4.1) |
| 08:14:56 | <[exa]> | `ghc-pkg describe somepackage` can help with checking the versions |
| 08:15:06 | <abastro> | IIRC using `cabal install` to install a library is not ideal |
| 08:15:14 | → | Midjak joins (~Midjak@82.66.147.146) |
| 08:15:25 | → | Inst joins (~Liam@2601:6c4:4080:3f80:e47a:f359:ed75:db12) |
| 08:15:40 | <abastro> | Usually better to handle package with .cabal file |
| 08:16:00 | <[exa]> | Andrew: you might need to add `cabal install --lib network` if you are installing them "globally". Managing the packages locally for each project is a bit better as abastro says |
| 08:16:01 | <Andrew> | abastro: That's what I expected to work, but why? |
| 08:16:07 | <Andrew> | Oh I do need --lib |
| 08:16:25 | → | desklamp[m] joins (~desklampm@2001:470:69fc:105::77b8) |
| 08:16:28 | → | tiferrei joins (~tiferrei@user/tiferrei) |
| 08:16:29 | <Andrew> | k |
| 08:17:04 | <Andrew> | k, thanks! Now at least I got the libraries worked out |
| 08:17:32 | <[exa]> | for starting "realistic programming", this is incredibly useful: https://wiki.haskell.org/How_to_write_a_Haskell_program |
| 08:18:04 | <Andrew> | Thank you! |
| 08:18:53 | <abastro> | The link includes `cabal sandbox init` tho.. |
| 08:19:08 | <abastro> | Or is it quite usable? |
| 08:19:09 | <[exa]> | Inst: about the arguments, the main question there is whether it's just a "bunch of strings" that is expandable infinitely, or each of them has a specified semantics (like 'from' and 'to' and 'username' or so), which should probably drive the actual API implementation |
| 08:19:36 | <Inst> | specified semantics |
| 08:19:45 | <abastro> | wow, sandbox in cabal. Interesting |
| 08:19:45 | <[exa]> | abastro: oh wow I didn't check all the way there, that might require an update |
| 08:19:49 | <merijn> | abastro: cabal sandbox is pretty much deprecated |
| 08:19:53 | <abastro> | Ouch |
| 08:19:54 | <[exa]> | yeah explicit sandboxes were a thing |
| 08:19:57 | <merijn> | abastro: It's completely obsolete |
| 08:19:57 | <abastro> | Yea, as expected.. |
| 08:20:04 | <abastro> | Does cabal always sandbox now? |
| 08:20:15 | <merijn> | abastro: Yes, no, maybe, depends on your point of view |
| 08:20:44 | <[exa]> | it uses nix-style builds, everything is sufficiently isolated by default so sandboxes are usually only required for technical reasons |
| 08:20:55 | <abastro> | Oh, so it was practically overhaul-ed |
| 08:20:59 | <[exa]> | hm, how do I edit the haskell wiki? just register and go? |
| 08:21:23 | <[exa]> | abastro: yes, afaik that was the bigest deal in updating from cabal 1 to 2 |
| 08:21:33 | <abastro> | https://cabal.readthedocs.io/en/3.6/getting-started.html might be better |
| 08:23:15 | × | tiferrei quits (~tiferrei@user/tiferrei) (Ping timeout: 240 seconds) |
| 08:25:00 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 08:25:19 | → | gurkenglas joins (~gurkengla@dslb-178-012-018-212.178.012.pools.vodafone-ip.de) |
| 08:27:11 | → | tiferrei joins (~tiferrei@user/tiferrei) |
| 08:28:35 | × | stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 240 seconds) |
| 08:29:06 | → | stiell_ joins (~stiell@gateway/tor-sasl/stiell) |
| 08:29:09 | <Andrew> | How do I turn ByteString into a String ([char])? |
| 08:29:15 | <Andrew> | s/c/C/ |
| 08:29:44 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds) |
| 08:30:32 | <abastro> | @hoogle ByteString -> String |
| 08:30:32 | <lambdabot> | Control.Lens.Internal.ByteString unpackStrict8 :: ByteString -> String |
| 08:30:32 | <lambdabot> | Control.Lens.Internal.ByteString unpackLazy8 :: ByteString -> String |
| 08:30:32 | <lambdabot> | Data.ByteString.Lazy.UTF8 toString :: ByteString -> String |
| 08:30:54 | <abastro> | Typically through `toString`, I guess. |
| 08:32:49 | <dminuoso> | Andrew: That action requires decoding. |
| 08:32:57 | <dminuoso> | ByteString is sadly poorly named |
| 08:33:07 | <abastro> | Oh wait |
| 08:33:08 | <dminuoso> | ByteBuffer might have been a better term |
| 08:33:16 | <abastro> | Duh I almost forgot that |
| 08:33:41 | <abastro> | I wonder what does `toString` do |
| 08:34:02 | <dminuoso> | Which toString? |
| 08:34:19 | → | `2jt joins (~jtomas@210.red-88-24-179.staticip.rima-tde.net) |
| 08:35:38 | <Inst> | @exa |
| 08:35:38 | <lambdabot> | Maybe you meant: vera eval |
| 08:35:42 | <Inst> | if you're still playing with me |
| 08:35:48 | <Inst> | i just realized what i wanted |
| 08:35:53 | <Inst> | which is basically record syntax for arguments |
| 08:35:56 | <Inst> | erm, functions |
| 08:36:22 | <abastro> | dminuoso: Data.ByteString.UTF8.toString I guess |
| 08:36:31 | <Inst> | by default, you run default arguments, but if you want to change any of the arguments, you invoke the function through a grabber, then the grabber changes the argument for you |
| 08:36:44 | <abastro> | dminuoso: The instance method of `IsString` |
| 08:36:47 | <Inst> | which is useful if someone added way too many arguments for the function to take |
| 08:38:47 | <abastro> | My unpopular opinion: Most libraries should take a record as single input instead of taking multiple inputs |
| 08:39:00 | <dminuoso> | Yes that is unpopular and a bad idea. |
| 08:39:26 | <dminuoso> | Otoh, there is some merit to that idea but not to avoid 1+ arguments |
| 08:40:13 | <dminuoso> | If you have a function `f :: ServerOpts -> T`, and not expose ServerOpts, but only a `defaultServerOpts` and field accessors, you can add fields without a) causing breakage and b) staying inside PVP minor versions |
| 08:42:59 | <Hemmo> | Hey! I have a unfinished function I am trying to get to work, but it gives a strange type error! I have a [string] as a parameter and when I try to load the file ghci complains about a type error?? It's a list of strings and not a string, but it still gives a Char error?? |
| 08:43:00 | <Hemmo> | https://paste.tomsmeding.com/2cbEeWdb |
| 08:43:04 | <Hemmo> | Heres the code |
| 08:43:39 | × | tafa quits (~tafa@user/tafa) (Quit: ZNC - https://znc.in) |
| 08:44:25 | × | jespada quits (~jespada@cpc121022-nmal24-2-0-cust171.19-2.cable.virginm.net) (Quit: Textual IRC Client: www.textualapp.com) |
| 08:44:39 | × | abastro quits (~abab9579@143.248.229.191) (Ping timeout: 260 seconds) |
| 08:45:01 | <abastro[m]> | dminuoso, why is it a bad idea? |
| 08:45:05 | → | tafa joins (~tafa@user/tafa) |
| 08:47:06 | <Guest|18> | tifa |
| 08:47:09 | <dminuoso> | abastro[m]: Well I guess it depends. Is if useful to carry it curried around? |
| 08:47:24 | <dminuoso> | But insisting it takes only 1 argument for the sake of taking 1 argument, thats just a poor design choice |
| 08:49:32 | → | abastro joins (~abab9579@143.248.229.191) |
| 08:50:22 | <abastro> | Oh, ofc for sake of having single argument, it is a bad idea. |
| 08:51:07 | <abastro> | However I also see many cases where benefit of currying doesn't apply |
| 08:51:07 | <Guest|18> | the function (String -> String -> Float) :-( |
| 08:51:41 | <abastro> | Especially when the two parameters have no specific reasonable order. |
| 08:52:02 | <abastro> | Having record as parameter also helps with readability of the function, since you can name the parameters |
| 08:54:20 | → | jespada joins (~jespada@cpc121022-nmal24-2-0-cust171.19-2.cable.virginm.net) |
| 08:55:40 | × | abastro quits (~abab9579@143.248.229.191) (Remote host closed the connection) |
| 08:56:28 | → | abastro joins (~abab9579@143.248.229.191) |
| 08:56:59 | × | lispy quits (~lispy@82.212.115.165) (Quit: Client closed) |
| 08:59:46 | × | Hemmo quits (Hemmo@eduroam-252-47.uta.fi) (Ping timeout: 246 seconds) |
| 09:00:25 | → | Hemmo joins (~Hemmo@91.221.67.198) |
| 09:16:57 | × | eL_Bart0 quits (eL_Bart0@dietunichtguten.org) (Ping timeout: 240 seconds) |
| 09:18:49 | <Hemmo> | Okay so I get the right elements on my list of lists now, but is there a way to make it work so my function would make a list for each element of X? So the X would iterate over the Y's and when it hops on to the second X it will have created a list of the first one? Function here: clusters :: (String -> String -> Float) -> Float -> [String] -> [[String]] |
| 09:18:49 | <Hemmo> | clusters f d ss = [x | x <- ss, y <- ss, (f x y <= d)] : [] |
| 09:19:38 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 09:19:38 | <Hemmo> | So now it returns one list inside a list whereas I would like it to return multiple lists inside a list |
| 09:20:08 | <Hemmo> | Also as a sidenote; is it somehow possible to create this recursively since I must iterate over the same elements each time until I reach the last one? |
| 09:20:58 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 09:21:08 | <abastro[m]> | So what you want is, like, for each y, make a list Ly that: Ly includes x when `f x y <= d` |
| 09:22:21 | × | abastro quits (~abab9579@143.248.229.191) (Ping timeout: 256 seconds) |
| 09:22:27 | <abastro[m]> | Right? |
| 09:22:42 | <Hemmo> | Uh for each X I would say |
| 09:22:49 | <Hemmo> | "For each string s in ss, the function clusters computes a "cluster", ie a list of similar strings in ss (strings that are at most distance d from the s). The list of strings similar to s should also contain s (if the distance function allows). " |
| 09:23:08 | <Guest|18> | [(f x y)| x <- ss, y <- ss, (f x y <= d)] ? |
| 09:23:52 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 09:25:00 | <Hemmo> | Also I wish to point out that I am not looking for straight up answers, but pointers on how to proceed ;D |
| 09:25:08 | → | kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be) |
| 09:26:11 | → | agumonkey joins (~user@88.163.231.79) |
| 09:26:20 | <kuribas> | How do you compose a natural transformation? |
| 09:26:34 | <kuribas> | type (~>) f g = forall a. f a -> g a |
| 09:26:59 | <kuribas> | but then "type F3 f g h = f ~> (g ~> h)" gives a kind error. |
| 09:28:19 | <[exa]> | kuribas: I guess it doesn't like the hidden forall in (g~>h) ? |
| 09:28:38 | <kuribas> | yeah |
| 09:28:50 | <abastro[m]> | Hemmo: so, is your X the `s` in the problem statement? |
| 09:29:28 | → | eL_Bart0 joins (eL_Bart0@dietunichtguten.org) |
| 09:30:07 | <kuribas> | [exa]: but it seems, if ~> works for any "a", then I should be able to partially apply the "a"? |
| 09:30:19 | → | DNH joins (~DNH@2a02:8108:1100:16d8:213d:84ff:7913:27a6) |
| 09:30:24 | <Hemmo> | Yes my X is the 's' |
| 09:30:53 | <[exa]> | Hemmo: btw re loading from files, the easiest way is to do something like: myStrings <- lines <$> readFile "myFile.txt" |
| 09:31:04 | <abastro[m]> | Hemmo: Then, you want to give list of y's, right? Because `y` is supposed to be the close one |
| 09:32:06 | <[exa]> | kuribas: you can tru writing the F3 with the explicit forall, but not sure it will work |
| 09:32:10 | <[exa]> | *try |
| 09:33:09 | <Hemmo> | abastro[m]: here's an example of what I am trying to accomplish: ss = ["aaabc", "aabdd", "a", "aa", "abdd", "bcbcb", "", "abcdefghij"] should return [[""],["a","aa"],["a","aa","aaabc"],["aa","aaabc","aabdd","bcbcb"],["aaabc","aabdd","abdd"],["aaabc","bcbcb"],["aabdd","abdd"],["abcdefghij"]] |
| 09:34:06 | <abastro[m]> | Well, Hemmo, we don't know which `f` function is applied there to get the result |
| 09:34:24 | <Hemmo> | Oh oh, let me share the full code to pastebin! |
| 09:34:39 | <abastro[m]> | But yea it seems like you need to list `y` instead of `x` |
| 09:35:04 | <Hemmo> | Oh yes |
| 09:35:08 | <Hemmo> | Now I got what you meant ;D |
| 09:35:12 | <abastro[m]> | <Hemmo> "clusters f d ss = [x | x <- ss..." <- In this code, you are listing x. Perhaps you'd want to list y, and somehow nest the list one level down |
| 09:35:14 | <Hemmo> | That's right, put the Y in the list |
| 09:35:52 | <Hemmo> | here's the full code too if you want to take a look; https://paste.tomsmeding.com/sooJbKaN |
| 09:36:10 | <abastro[m]> | Btw nesting the list is.. like |
| 09:36:10 | <abastro[m]> | `[[y | y <- ss, (put sth here)] | x <- ss]` |
| 09:36:44 | <abastro[m]> | Lisy comprehension's iteration comes at right side |
| 09:36:57 | <abastro[m]> | (Or, perhaps you could learn do notation here) |
| 09:37:18 | × | vicfred quits (~vicfred@user/vicfred) (Quit: Leaving) |
| 09:37:38 | × | kaph_ quits (~kaph@net-93-67-57-97.cust.vodafonedsl.it) (Read error: Connection reset by peer) |
| 09:38:54 | → | CiaoSen joins (~Jura@p200300c95735b0002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 09:39:59 | <kuribas> | [exa]: I suppose I'd need a type application and a type lambda. |
| 09:40:00 | <Hemmo> | Yeah I tried to do it the other way before; [x | [ x <- ss, y <- ss]] but that just gave errors ;D |
| 09:40:06 | <kuribas> | [exa]: the latter doesn't exist. |
| 09:40:18 | <Hemmo> | abastro[m]: got it to work now! thanks! |
| 09:40:37 | <[exa]> | kuribas: `forall` is the latter afaik |
| 09:40:49 | <[exa]> | except obvious limits |
| 09:40:55 | <kuribas> | hmm, you could put it in a newtype. |
| 09:41:29 | <abastro[m]> | Hemmo: congrats! |
| 09:41:44 | <Hemmo> | abastro[m]: cheers ;D |
| 09:41:48 | <abastro[m]> | kuribas: yea, if some typelevel stuff does not work, just make newtype. |
| 09:42:28 | × | xff0x quits (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) (Ping timeout: 246 seconds) |
| 09:42:57 | → | nice29 joins (~nice29@183.37.157.66) |
| 09:44:56 | <kuribas> | newtype TypeLambda f a = TypeLambda (f @a) |
| 09:45:11 | <kuribas> | That doesn't look legal... |
| 09:45:40 | <kuribas> | abastro[m]: s/make newtype/use idris |
| 09:45:49 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 09:46:11 | <abastro[m]> | Oh. I don't mean that one |
| 09:46:41 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 09:46:44 | <abastro[m]> | `newtype (~>) f g a = MkA (f a -> g a)` |
| 09:46:47 | × | fendor quits (~fendor@178.165.199.73.wireless.dyn.drei.com) (Remote host closed the connection) |
| 09:49:00 | × | nice29 quits (~nice29@183.37.157.66) (Quit: Connection closed) |
| 09:49:21 | → | kaph joins (~kaph@net-93-67-57-97.cust.vodafonedsl.it) |
| 09:51:23 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
| 09:51:30 | → | deadmarshal_ joins (~deadmarsh@95.38.118.21) |
| 10:00:01 | × | DNH quits (~DNH@2a02:8108:1100:16d8:213d:84ff:7913:27a6) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 10:01:53 | → | abastro joins (~abab9579@143.248.229.191) |
| 10:02:48 | → | nice29 joins (~nice29@183.37.157.66) |
| 10:02:51 | → | DNH joins (~DNH@2a02:8108:1100:16d8:213d:84ff:7913:27a6) |
| 10:03:45 | × | nice29 quits (~nice29@183.37.157.66) (Client Quit) |
| 10:04:12 | → | benin joins (~benin@183.82.176.175) |
| 10:07:03 | × | Hemmo quits (~Hemmo@91.221.67.198) (Remote host closed the connection) |
| 10:07:20 | → | Benzi-Junior joins (~BenziJuni@88-149-64-179.du.xdsl.is) |
| 10:10:20 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 10:10:28 | × | abastro quits (~abab9579@143.248.229.191) (Remote host closed the connection) |
| 10:10:45 | → | nice29 joins (~nice29@183.37.157.66) |
| 10:10:56 | → | abastro joins (~abab9579@143.248.229.191) |
| 10:15:21 | × | nice29 quits (~nice29@183.37.157.66) (Ping timeout: 245 seconds) |
| 10:16:34 | → | xff0x joins (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) |
| 10:18:09 | → | komikat joins (~komikat@157.47.55.13) |
| 10:20:53 | × | komikat quits (~komikat@157.47.55.13) (Read error: Connection reset by peer) |
| 10:23:33 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 260 seconds) |
| 10:26:16 | → | ccntrq joins (~Thunderbi@2a01:c23:8d1c:5b00:7bca:2599:a3ae:73a4) |
| 10:26:40 | → | oskar_greda joins (~oskar_gre@84.69.89.37) |
| 10:30:39 | × | lavaman quits (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection) |
| 10:30:49 | × | oskar_greda quits (~oskar_gre@84.69.89.37) (Client Quit) |
| 10:32:32 | × | benin quits (~benin@183.82.176.175) (Quit: The Lounge - https://thelounge.chat) |
| 10:35:16 | → | oskar_greda joins (~oskar_gre@84.69.89.37) |
| 10:37:24 | <oskar_greda> | Hey All, I work for MLabs - A remote Haskell consultancy, and we are growing rapidly in the Fintech/Blockchain space - I am looking for places to find solid Haskell devs, is anyone interested in having a chat about this? |
| 10:38:41 | × | DNH quits (~DNH@2a02:8108:1100:16d8:213d:84ff:7913:27a6) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 10:41:42 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 10:42:45 | → | DNH joins (~DNH@2a02:8108:1100:16d8:213d:84ff:7913:27a6) |
| 10:43:36 | × | Graham31415 quits (~Graham@user/Graham31415) (Read error: Connection reset by peer) |
| 10:44:33 | × | merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
| 10:45:14 | → | Graham31415 joins (~Graham@user/Graham31415) |
| 10:45:25 | <Andrew> | abastro[m]: yeah, Data.ByteString.UTF8.toString sounds correct |
| 10:45:29 | <Andrew> | I used fromByteString, not ideal |
| 10:47:07 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 10:52:26 | × | CiaoSen quits (~Jura@p200300c95735b0002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 10:52:41 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 11:11:37 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 11:15:27 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
| 11:19:22 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.4.1) |
| 11:21:42 | × | agumonkey quits (~user@88.163.231.79) (Remote host closed the connection) |
| 11:23:45 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 11:24:17 | × | dumptruckman quits (~dumptruck@45-79-173-88.ip.linodeusercontent.com) (Ping timeout: 240 seconds) |
| 11:26:16 | → | dumptruckman joins (~dumptruck@45-79-173-88.ip.linodeusercontent.com) |
| 11:27:02 | <juri_> | ugh. just had to debug a call to error, caused by a minor change in a different call to error. frustrating. |
| 11:27:31 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 11:32:11 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds) |
| 11:34:20 | → | dut joins (~dut@user/dut) |
| 11:35:10 | → | lavaman joins (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) |
| 11:40:46 | × | abastro quits (~abab9579@143.248.229.191) (Ping timeout: 245 seconds) |
| 11:41:11 | × | acidjnk quits (~acidjnk@p200300d0c7049f58501b6673664ff2c4.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
| 11:45:59 | → | xkuru joins (~xkuru@user/xkuru) |
| 11:47:10 | → | abastro joins (~abab9579@192.249.26.126) |
| 11:47:10 | → | razetime joins (~quassel@117.254.35.251) |
| 12:00:30 | → | Deide joins (~deide@user/deide) |
| 12:01:02 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 12:01:32 | × | MajorBiscuit quits (~MajorBisc@c-001-013-026.client.tudelft.eduvpn.nl) (Quit: WeeChat 3.4) |
| 12:01:41 | → | MajorBiscuit joins (~MajorBisc@c-001-013-026.client.tudelft.eduvpn.nl) |
| 12:01:57 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 12:04:48 | → | Guest7414 joins (~diego@151.67.153.91) |
| 12:07:07 | × | Inst quits (~Liam@2601:6c4:4080:3f80:e47a:f359:ed75:db12) (Ping timeout: 250 seconds) |
| 12:08:21 | → | Inst joins (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) |
| 12:14:06 | → | jgeerds joins (~jgeerds@d5364b87.access.ecotel.net) |
| 12:14:37 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 12:16:06 | × | cdman quits (~dcm@user/dmc/x-4369397) (Remote host closed the connection) |
| 12:16:23 | → | cdman joins (~dcm@27.2.218.248) |
| 12:16:23 | × | cdman quits (~dcm@27.2.218.248) (Changing host) |
| 12:16:23 | → | cdman joins (~dcm@user/dmc/x-4369397) |
| 12:20:18 | × | abastro quits (~abab9579@192.249.26.126) (Remote host closed the connection) |
| 12:20:31 | → | abastro joins (~abab9579@192.249.26.126) |
| 12:25:01 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 12:26:04 | → | boxscape_ joins (~boxscape_@p4ff0be5f.dip0.t-ipconnect.de) |
| 12:28:37 | → | Unicorn_Princess joins (~Unicorn_P@93-103-228-248.dynamic.t-2.net) |
| 12:32:07 | → | cfricke joins (~cfricke@user/cfricke) |
| 12:32:34 | × | chenqisu1 quits (~chenqisu1@183.217.200.168) (Quit: Leaving) |
| 12:33:17 | × | oskar_greda quits (~oskar_gre@84.69.89.37) (Quit: Client closed) |
| 12:33:30 | → | raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 12:34:50 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds) |
| 12:35:21 | AlexNoo_ | is now known as AlexNoo |
| 12:36:46 | <abastro[m]> | Lmao someone near me just said that Go is going to be big |
| 12:37:05 | <abastro[m]> | E.g. compared to rust, rust is not great at maintenance. Like what |
| 12:39:01 | <abastro[m]> | I dislike how many ppl are eager to follow the megacorps, esp google |
| 12:39:19 | <abastro[m]> | Wait, sorry, I thought this was # haskell-offtopic |
| 12:45:10 | × | razetime quits (~quassel@117.254.35.251) (Ping timeout: 246 seconds) |
| 12:48:02 | <kuribas> | abastro[m]: worse is the eagerness to work in financial speculation and ecologically unfriendly pyramid schemes. |
| 12:49:30 | <maerwald[m]> | *sigh* |
| 12:50:53 | × | jgeerds quits (~jgeerds@d5364b87.access.ecotel.net) (Ping timeout: 250 seconds) |
| 12:51:24 | <maerwald[m]> | abastro: Go is already *much* bigger than haskell. |
| 12:51:26 | <juri_> | ok haskel. what the heck. |
| 12:52:45 | <juri_> | https://paste.rs/MzV.patch |
| 12:53:10 | <juri_> | that change is enough to cause the error in noIntersection to be called. |
| 12:53:37 | <juri_> | If i didn't know better (this is haskell, right?) i'd swear this is a compiler error. |
| 12:55:07 | <kuribas> | maerwald[m]: yeah, so what? |
| 12:58:48 | <kuribas> | As long is it gets decent tooling, good enough libraries, I don't care how popular haskell is. |
| 13:00:11 | → | razetime joins (~quassel@117.254.35.196) |
| 13:00:42 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 13:02:41 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 13:02:54 | <maerwald> | kuribas: I didn't draw a conclusion |
| 13:03:16 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 13:03:24 | <maerwald> | except that popularity has little to do with language features |
| 13:03:27 | <exarkun> | There seems to be a sweet spot where it's just popular enough so that other smart people build those tools and libraries for you but not so popular that a lot of bad ideas get jammed in and ruin it, too. |
| 13:03:45 | <maerwald> | but I think Haskell community often thinks it's a race of features |
| 13:04:00 | <abastro> | I don't mean that it is race of features or anything |
| 13:04:11 | <abastro> | Just that it feels bad how Go is going dominant |
| 13:04:30 | <maerwald> | why? |
| 13:04:44 | <abastro> | Oh I think I am going to talk abt it in #haskell-offtopic |
| 13:04:46 | <maerwald> | I don't think they're attracting any Haskellers away |
| 13:04:52 | <maerwald> | rust is |
| 13:06:53 | × | lortabac quits (~lortabac@88.125.6.227) (Ping timeout: 260 seconds) |
| 13:07:09 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:8d5e:9f6:968:fb4b) |
| 13:08:10 | <abastro> | Hmm |
| 13:08:16 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 246 seconds) |
| 13:09:10 | <abastro> | I mean, Go vs Rust could change the entire programming ecosystem's direction |
| 13:09:21 | <maerwald> | Go and rust are not really competing imo |
| 13:09:57 | <abastro> | What I just heard kind of indicates that, tho I admit it could be exceptional |
| 13:10:04 | <abastro> | A company switching to Go from Rust |
| 13:10:19 | × | DNH quits (~DNH@2a02:8108:1100:16d8:213d:84ff:7913:27a6) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 13:10:20 | <maerwald> | yeah well, I also know a company that switched from Haskell to Go |
| 13:10:28 | <c_wraith> | if they can do that, they probably shouldn't used Rust in the first place. |
| 13:10:57 | <maerwald> | I just think those are probably rather business decisions, less so technical ones. These often come with the star team leaving the company |
| 13:10:59 | <abastro> | Oh, interesting |
| 13:11:16 | <abastro> | I see, so Rust is for places where it cannot afford Go? |
| 13:11:22 | <abastro> | Uh what is "cannot afford Go" hmm |
| 13:11:32 | <c_wraith> | Rust is for when circumstances preclude garbage collection. If you can switch to a language with garbage collection, you're paying a lot for something you don't need. |
| 13:11:37 | <abastro> | I mean, yea, it was because maintenance - Rust is harder to maintain, I guess |
| 13:11:53 | <abastro> | Hm doesn't go also have pointers? |
| 13:12:00 | <maerwald> | programmers think too much about technicalities. Those are only a small part of why a company might switch |
| 13:12:10 | <abastro> | Yep, I know |
| 13:12:37 | <abastro> | I mean, possibly Rust has less ppl working for it |
| 13:12:46 | <abastro> | Which is why they had to ditch rust |
| 13:13:22 | <juri_> | ease of hiring, willing to work for low pay, productive. pick two. |
| 13:13:47 | <maerwald> | one big part of Go's success is that the ecosystem has extremely good support for microservice architectures and a lot of clueless CTOs believe in that sort of thing |
| 13:15:21 | <tdammers> | juri_: or really just pick "productive" |
| 13:17:01 | <abastro> | Yeah, microservice architecture |
| 13:17:11 | → | DNH joins (~DNH@2a02:8108:1100:16d8:213d:84ff:7913:27a6) |
| 13:17:59 | <abastro> | Meh.. |
| 13:18:13 | <abastro> | Why are CTOs not great at tech itself |
| 13:18:16 | <juri_> | we microservice (13 microish services), but it's hard. each service has a library of types that is sometimes required in other services. |
| 13:18:33 | × | Inst quits (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 260 seconds) |
| 13:18:36 | <abastro> | Well they perhaps just design each microservice as crap |
| 13:18:46 | <abastro> | And patch problems in hard-coding manner |
| 13:18:46 | <juri_> | stack didn't like that very much, so we moved back to cabal. |
| 13:19:50 | <tdammers> | the problem with microservices is that you need a lot of infrastructure in place before you can even begin to implement actual features without fighting the architecture every step |
| 13:20:20 | <tdammers> | you pay a huge up-front cost, and whether it'll actually pay off is questionable |
| 13:20:27 | × | belphegor666 quits (~satan@user/belphegor666) (Ping timeout: 260 seconds) |
| 13:22:27 | → | belphegor666 joins (~satan@ip-046-223-003-068.um13.pools.vodafone-ip.de) |
| 13:22:29 | × | ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection) |
| 13:22:58 | <maerwald> | tdammers: only if you have massive scaling issues |
| 13:23:01 | <maerwald> | and most companies don't |
| 13:23:10 | <abastro> | Scaling issues? |
| 13:23:26 | <maerwald> | yes, microservices allow micro-managing scaling |
| 13:23:44 | <maerwald> | if you have one monolith and a tiny part of it needs more ram, well |
| 13:24:14 | <maerwald> | it's more of an optimization strategy than an architecture pattern |
| 13:24:20 | <tdammers> | indeed |
| 13:24:28 | <tdammers> | also, not just performance, but also decoupling deployments |
| 13:24:34 | → | merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
| 13:24:58 | <tdammers> | instead of taking the entire system down, installing new code, and then firing it up again, you upgrade each individual service whenever you have updates for it |
| 13:25:13 | <maerwald> | today people use it to facilitate team and sprint separation |
| 13:25:28 | <tdammers> | indeed, but that's kind of throwing the baby out with the bathwater |
| 13:25:45 | <juri_> | we have one big helm chart that covers all of the things, so you upgrade every time regardless. |
| 13:25:56 | <tdammers> | the proper answer to that problem is "librarize your components, and set up an internal supply chain" |
| 13:26:12 | <maerwald> | this one is great about microservices: https://www.youtube.com/watch?v=y8OnoxKotPQ xD |
| 13:26:29 | <tdammers> | you can have 30 teams working independently on 30 modules, and still ship the system as a monolith |
| 13:28:34 | <maerwald> | if you think that video is exaggarating... it is not. I've been in the middle of it xD |
| 13:28:45 | <maerwald> | took me 4 months to figure out it's not me who's insane |
| 13:29:20 | <remexre> | Is there a standard technique for deriving a structural editing structure (with multiple holes, etc) from a zipper? It "feels like" it should be easy, but I'm missing something in the translation from single-hole zippers to multi-hole |
| 13:30:05 | × | dextaa_ quits (~dextaa@user/dextaa) (Remote host closed the connection) |
| 13:30:09 | → | gaff joins (~gaff@49.207.210.61) |
| 13:30:18 | × | gaff quits (~gaff@49.207.210.61) (Client Quit) |
| 13:30:45 | <lortabac> | maerwald: that video describes my old job accurately :D |
| 13:31:00 | <maerwald> | oh, a fellow microservice veteran |
| 13:31:20 | → | dextaa_ joins (~dextaa@user/dextaa) |
| 13:31:21 | <geekosaur> | I feel like zipper doesn't work for dynamic editing structures? it's more for static ones. don't you want a rope instead? |
| 13:32:23 | <maerwald> | lortabac: at some point, they used microservice architecture to improve database queries... so one microservice would push data to another, that one would denormalize it for faster queries, etc. |
| 13:32:37 | <maerwald> | I mean... |
| 13:32:48 | <remexre> | geekosaur: what do you mean by static vs dynamic? I'm not quite actually making a text editor (i.e. this is an API, not a UI), so I probably don't actually want a rope I think? |
| 13:33:26 | <lortabac> | maerwald: haha reality is even worse than the video |
| 13:33:26 | <geekosaur> | zippers are good when you have a fixed number of foci. ropes seem like they'd be better if it's dynamic |
| 13:33:35 | <maerwald> | and you needed to be *very* careful to not accidentially create cycles in the microservice dependency graphs |
| 13:33:55 | <abastro> | Eww incredibly small microservice |
| 13:34:03 | <abastro> | Like how does the company manage to handle all that |
| 13:34:07 | <geekosaur> | *flashbacks to OLE* |
| 13:34:08 | <abastro> | By sheer manpower? |
| 13:34:11 | <maerwald> | yes |
| 13:34:15 | <juri_> | geekosaur: *triggered* |
| 13:34:28 | <abastro> | Oh god no |
| 13:34:33 | <lortabac> | yes, microservices needs a crazy amount of manpower |
| 13:34:43 | <maerwald> | and very smart engineers |
| 13:34:50 | <maerwald> | I'm not being sarcastic |
| 13:34:51 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 13:34:52 | <abastro> | And that is why they need to hire ppl at bargain price |
| 13:35:00 | <maerwald> | that stuff is really complicated |
| 13:35:39 | <lortabac> | to be honest there are some cases in which a network barrier between components is actually useful |
| 13:35:42 | <remexre> | geekosaur: what would a rope on a tree structure actually look like? |
| 13:36:02 | <abastro> | So.. handful of smart ppl, lots of coders just bashing at keyboard to make something vaguely close to "working" |
| 13:36:16 | <geekosaur> | mm, that's a good question |
| 13:36:32 | <lortabac> | however IMHO it should be a technical choice and not an imposed organizational thing |
| 13:36:33 | <maerwald> | abastro: I mean, that stuff was born from big companies. And then small companies thought they have the same problem like the big ones |
| 13:37:01 | <maerwald> | and programmers rarely question business value of tech decisions |
| 13:37:03 | <abastro[m]> | Oh noo |
| 13:37:07 | <maerwald> | so they just go one with what they know |
| 13:37:22 | <geekosaur> | guess you're looking at a tree where you can treat any part as an independent "root"? |
| 13:37:26 | <abastro[m]> | I hate when ppl just copy the megacorps |
| 13:37:33 | <abastro[m]> | "Because they succeeded" .. |
| 13:37:37 | <geekosaur> | but I'd need to know more about the API in question |
| 13:37:59 | <maerwald> | abastro[m]: that's what most CTOs do... read blog posts from google employees |
| 13:37:59 | <geekosaur> | treesshould actually be pretty good at that, though |
| 13:38:16 | <abastro[m]> | Wh |
| 13:38:26 | <abastro[m]> | "CTO" Yet just read employees |
| 13:38:32 | <geekosaur> | since the only realdifference between the actual root and your current "focus" is that one has a parent node |
| 13:38:56 | <abastro[m]> | I get that megacorps like microservices, their "micro" is still big |
| 13:39:03 | <abastro[m]> | But small companies.. |
| 13:39:04 | <abastro[m]> | Meh |
| 13:39:19 | → | Pickchea joins (~private@user/pickchea) |
| 13:39:48 | <maerwald> | anyway, we're disrupting someone asking actuall Haskell questions :p |
| 13:40:01 | <geekosaur> | the hard part in Haskell is you can't easily build nodes with actual parent pointers (you can tie the knot, but then you can't update easily) so moving through the tree is difficult without holding on to what amounts to the whole spine |
| 13:40:09 | <abastro[m]> | Ouch |
| 13:40:25 | <remexre> | geekosaur: yeah, that's why I was thinking of zippers |
| 13:40:43 | × | abastro quits (~abab9579@192.249.26.126) (Ping timeout: 260 seconds) |
| 13:41:21 | <remexre> | I'm basically trying to build a tactic engine for a simple PL |
| 13:41:39 | <geekosaur> | zipper on a tree just automates that part. but yes, multiple zippers then becomes a problem. I know tree zippers exist but don'tknow about multiple foci in that case |
| 13:41:54 | <abastro[m]> | (Posted continuing convo in #haskell-offtopic) |
| 13:41:58 | <geekosaur> | hypothetically it's just another differentiation |
| 13:42:26 | <geekosaur> | but practically what does that mean? :) |
| 13:42:33 | <remexre> | so I guess the API I want is something like, "navigate cursors around, replace the current subtree, rebuild the whole tree into a 'real tree' so semantic checks can happen" |
| 13:43:25 | × | jlamothe quits (~jlamothe@198.251.61.229) (Quit: leaving) |
| 13:44:35 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 13:44:35 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 13:44:35 | → | wroathe joins (~wroathe@user/wroathe) |
| 13:45:04 | → | zer0bitz joins (~zer0bitz@2001:2003:f750:a200:88a0:fb04:2d2:c434) |
| 13:45:08 | → | shriekingnoise joins (~shrieking@201.231.16.156) |
| 13:45:26 | <remexre> | augh, sry, afk |
| 13:46:31 | <geekosaur> | how many cursors will need to be around at any given time? and what happens if they overlap? |
| 13:47:00 | × | szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 13:47:08 | <abastro[m]> | Sounds like ConcurrentModificationException |
| 13:47:47 | → | acidjnk joins (~acidjnk@p200300d0c7049f58687650f0568aa4d7.dip0.t-ipconnect.de) |
| 13:48:23 | <geekosaur> | yeh, that'sthe next question, how many of these cursors are held by the same session |
| 13:49:42 | <geekosaur> | and is there a concept of splitting / joining cursors |
| 13:53:00 | → | abastro joins (~abab9579@192.249.26.126) |
| 13:54:35 | × | merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 250 seconds) |
| 13:54:53 | → | jlamothe joins (~jlamothe@198.251.61.229) |
| 13:56:26 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.4.1) |
| 13:57:54 | <remexre> | ok back, sorry about that |
| 13:58:09 | <remexre> | hm, yeah, hadn't thought about the overlapping case |
| 13:58:44 | <remexre> | maybe I could tweak it to having one cursor, but multiple holes, as long as I can efficiently find the holes? |
| 14:00:21 | <geekosaur> | well, that still depends on how you represent the zipper, which depends on how many holes |
| 14:01:49 | <geekosaur> | and may depend on how the tree itself is represented (i.e. can we get away with having null trees, or do we need to use Maybe?) |
| 14:02:36 | <remexre> | null trees? I've got it represented as a pattern functor, so it shouldn't be hard to do the MaybeFix f = Maybe (f (MaybeFix f)) thing |
| 14:02:45 | × | jonathanx_ quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection) |
| 14:04:58 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 246 seconds) |
| 14:06:22 | <geekosaur> | ok, I was thinking something that looked more like the traditional list zipper, only with a list of foci and intervening subtrees. but come to think of it, not sure that would work |
| 14:08:07 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 14:12:39 | → | Inst joins (~Liam@2601:6c4:4080:3f80:6050:16ec:fe01:4f97) |
| 14:12:45 | <Inst> | i'm busy being pissed off at record syntax |
| 14:12:57 | <Inst> | you know my dream is to have the Chinese government adopt Haskell, and rebrand it to Micius, after the ancient Chinese logician and militant pacifist Mozi |
| 14:13:09 | <Inst> | fork it as well |
| 14:13:18 | <Inst> | one of the first things that happen is that the record syntax system has to be replaced |
| 14:14:48 | <Inst> | Mozi is a very good name for a FP language, i.e, Mozi ran around defending cities from attackers (i.e, high security), was a logician and physicist a couple of centuries before Christ |
| 14:14:56 | <Inst> | and we'll put the keywords in Wenyanwen ;) |
| 14:15:06 | <Inst> | (classical Chinese, which is extremely terse) |
| 14:15:42 | <maerwald> | SJTUG teaches Haskell, no? |
| 14:20:20 | <geekosaur> | record syntax got reworked in 9.2 didn't it? although you really want lens (which fits well with the newer stuff) |
| 14:24:08 | <c_wraith> | except 9.2 also got RecordDotSyntax, which is a travesty of overloading the . character even more |
| 14:25:27 | <geekosaur> | tempting to reference the Go discussion here }:> |
| 14:27:38 | → | ProfSimm joins (~ProfSimm@87.227.196.109) |
| 14:29:43 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 14:34:01 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds) |
| 14:35:45 | → | odnes_ joins (~odnes@5-203-245-187.pat.nym.cosmote.net) |
| 14:36:36 | → | jinsun__ joins (~jinsun@user/jinsun) |
| 14:37:04 | × | odnes quits (~odnes@5-203-245-187.pat.nym.cosmote.net) (Read error: Connection reset by peer) |
| 14:37:20 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 14:37:27 | × | jinsun quits (~jinsun@user/jinsun) (Ping timeout: 260 seconds) |
| 14:38:30 | <Inst> | maerwald: Shanghai Jiaotong? |
| 14:38:34 | <Inst> | That's my Dad's alma |
| 14:38:49 | × | jinsun__ quits (~jinsun@user/jinsun) (Client Quit) |
| 14:39:09 | → | jinsun joins (~jinsun@user/jinsun) |
| 14:39:15 | <maerwald> | yes I think so |
| 14:40:11 | <Inst> | nice, and he won't overwatch me learning comp sci |
| 14:40:23 | × | ccntrq quits (~Thunderbi@2a01:c23:8d1c:5b00:7bca:2599:a3ae:73a4) (Quit: ccntrq) |
| 14:40:27 | → | ccntrq1 joins (~Thunderbi@dynamic-077-001-011-041.77.1.pool.telefonica.de) |
| 14:40:33 | <Inst> | how badly overloaded is . right now? |
| 14:40:53 | <Inst> | iirc it's the function composition operator, for f.g, \x -> f (g x) |
| 14:41:51 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 14:42:46 | ccntrq1 | is now known as ccntrq |
| 14:43:03 | <geekosaur> | function composition, module separator, module hierarchy separator, decimal point, series syntax (Foo(..), [f..g], etc.) |
| 14:43:17 | <geekosaur> | there's already a conflict between those |
| 14:43:35 | <geekosaur> | > [False..True] -- legal Haskell but misparsed by ghc |
| 14:43:37 | <lambdabot> | error: |
| 14:43:37 | <lambdabot> | Not in scope: ‘False..’ |
| 14:43:37 | <lambdabot> | No module named ‘False’ is imported.error: |
| 14:44:55 | <geekosaur> | it's a tricky one to get right, lexing has to know that False is not a module name so it doesn't treat it as one |
| 14:45:20 | <geekosaur> | RecordDotSyntax introduces the same conflict but with lowercase names |
| 14:45:57 | × | abastro quits (~abab9579@192.249.26.126) (Ping timeout: 250 seconds) |
| 14:46:36 | × | acidjnk quits (~acidjnk@p200300d0c7049f58687650f0568aa4d7.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
| 14:46:59 | × | anderson quits (~ande@user/anderson) (Quit: bye) |
| 14:46:59 | × | eldritch quits (~eldritch@user/eldritch) (Quit: bye) |
| 14:46:59 | × | glider quits (~glider@user/glider) (Quit: ZNC - https://znc.in) |
| 14:47:00 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:8d5e:9f6:968:fb4b) (Quit: WeeChat 2.8) |
| 14:47:23 | <geekosaur> | which requires feedback between the typechecker and lexing, or (ghc's solution) just treating any `x.y` as record dot and requiring spaces around the `.` to get composition |
| 14:48:25 | <abastro[m]> | That is quite clever solution actually |
| 14:49:05 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 14:51:40 | <tdammers> | I've been thinking about alternative record systems a bit, and even tried the one Purescript uses in production, and came to the conclusion that the status quo isn't actually too bad |
| 14:51:47 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.4.1) |
| 14:52:38 | <tdammers> | I think the best we could do without breaking compatibility would be some kind of syntax sugar for record updates, but then again, lenses already achieve that without changing or extending the core language, so there's that |
| 14:53:01 | <abastro[m]> | Status quo? |
| 14:53:10 | <tdammers> | Record syntax as it is in Haskell now. |
| 14:53:12 | <abastro[m]> | Oh existing records |
| 14:53:16 | <geekosaur> | "what already is", in Latin |
| 14:53:31 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5) |
| 14:53:41 | <abastro[m]> | What I am getting is that ppl dislike namespace pollution |
| 14:53:45 | <tdammers> | the beauty is that the "is" is implicit. Latin is great that way. |
| 14:53:54 | × | Guest7414 quits (~diego@151.67.153.91) (Quit: Leaving) |
| 14:54:12 | <tdammers> | abastro[m]: yes, that is a bit of a downside. But the alternative isn't that much better. |
| 14:54:18 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 14:54:30 | <abastro[m]> | Yea, possibly |
| 14:54:39 | <tdammers> | and if you can accept a "one exported record type per module" policy, then the problem largely goes away |
| 14:54:44 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds) |
| 14:54:55 | <tdammers> | I do this a lot in projects that require lots of record types |
| 14:55:11 | <abastro[m]> | One exported record per module? |
| 14:55:14 | <tdammers> | yes |
| 14:55:23 | <abastro[m]> | Hm, how do you avoid cyclic reference in modules |
| 14:55:26 | → | anderson joins (~ande@user/anderson) |
| 14:55:50 | <tdammers> | the kind of record types for which you would do this would not normally need cyclic references |
| 14:56:07 | × | raehik1 quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
| 14:56:14 | <abastro[m]> | I mean, functions involved with records |
| 14:56:35 | <tdammers> | you define the functions elsewhere. the "record module" only defines the record type itself. |
| 14:56:38 | <abastro[m]> | (Why do I feel like this is flexible Java classes, one record per file..) |
| 14:56:45 | <abastro[m]> | Oh |
| 14:56:46 | → | __monty__ joins (~toonn@user/toonn) |
| 14:56:47 | <abastro[m]> | Now I see. |
| 14:56:55 | <abastro[m]> | Makes quite a sense |
| 14:57:00 | → | jinsun__ joins (~jinsun@user/jinsun) |
| 14:57:01 | Lord_of_Life_ | is now known as Lord_of_Life |
| 14:57:12 | <abastro[m]> | Maybe ppl just do not like that approach |
| 14:57:18 | <tdammers> | e.g.: module Entities.User where data User = { username :: Text, password :: Hash, email :: EMailAddress } |
| 14:57:27 | <abastro[m]> | Perhaps because too many imports |
| 14:57:45 | <tdammers> | it's a pity you can't re-export qualified |
| 14:57:46 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 14:57:58 | <abastro[m]> | Now that |
| 14:57:59 | → | eldritch joins (~eldritch@user/eldritch) |
| 14:58:09 | <abastro[m]> | That is the prime pain point I found |
| 14:58:25 | geekosaur | shudders at the linker pain trying to support that would cause |
| 14:58:25 | <tdammers> | so if you want User and Page to be imported into different namespaces, you have to import them separately; you can't make a "God module" that imports all your different record types and re-exports each one into a separate namespace |
| 14:58:31 | <abastro[m]> | If that was solved, namespace pollution would not affect me anymore |
| 14:58:51 | → | merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
| 14:59:00 | <tdammers> | geekosaur: well, the problem is of course that GHC Haskell conflates "source file", "compilation unit", and "namespace", and conveniently assumes that those are the same thing |
| 14:59:06 | → | glider joins (~glider@user/glider) |
| 14:59:12 | <abastro[m]> | Yea tbh I like any kind of namespace |
| 14:59:24 | <tdammers> | (also "module") |
| 14:59:50 | <abastro[m]> | Haskell, avoid success at all costs, yet does not fix its namespace/compile unit issues |
| 15:00:06 | <tdammers> | if we could define namespaces independently from compilation unit boundaries, like in C++, then that would solve the issue (but also introduce new ones, so there's that) |
| 15:01:08 | × | jinsun quits (~jinsun@user/jinsun) (Ping timeout: 272 seconds) |
| 15:02:26 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net) |
| 15:03:24 | <abastro[m]> | Yep, honestly it would be great if haskell did not oversimplify this part |
| 15:03:35 | × | ccntrq quits (~Thunderbi@dynamic-077-001-011-041.77.1.pool.telefonica.de) (Quit: ccntrq) |
| 15:03:52 | → | ccntrq joins (~Thunderbi@dynamic-077-001-011-041.77.1.pool.telefonica.de) |
| 15:04:08 | <tdammers> | unfortunately, the module system as it is is difficult to extend / replace |
| 15:04:43 | × | merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
| 15:06:13 | × | razetime quits (~quassel@117.254.35.196) (Ping timeout: 240 seconds) |
| 15:06:39 | <geekosaur> | mm, now that I think about it, I wonder if that's actually true. the real name of anything is qualified by full module and package names; namespaces could be implemented by replacing the module part, conceivably |
| 15:07:29 | <geekosaur> | exceptthat would make the reexport collide with the original definition, hm |
| 15:07:48 | <geekosaur> | (which is why this is a problem to begin with) |
| 15:12:09 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 15:14:45 | → | razetime joins (~quassel@117.254.35.251) |
| 15:15:54 | → | raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 15:16:10 | <abastro[m]> | Reexport collide? |
| 15:16:37 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 15:17:13 | <abastro[m]> | Oh, so basically you can reexport named exports along with original name? |
| 15:17:24 | <abastro[m]> | Just that it would require both |
| 15:17:36 | <geekosaur> | no |
| 15:17:56 | <geekosaur> | I'm saying if a module tried to reexport qualified, the qualified name would conflict with the original at link time |
| 15:18:37 | <geekosaur> | therewould need to be a way to distinguish namespaced names from module names, and then you'd have to work specifically with one or the other even though they both refer to the same thing |
| 15:22:32 | → | ccntrq1 joins (~Thunderbi@2a01:c23:8d1c:5b00:e103:4fc:b5d9:b33d) |
| 15:24:37 | × | ccntrq quits (~Thunderbi@dynamic-077-001-011-041.77.1.pool.telefonica.de) (Ping timeout: 240 seconds) |
| 15:24:37 | ccntrq1 | is now known as ccntrq |
| 15:26:04 | <abastro[m]> | Oh, qualified conflict with original? |
| 15:26:07 | <abastro[m]> | Wait how |
| 15:26:28 | <geekosaur> | sigh |
| 15:26:31 | <geekosaur> | read back |
| 15:26:46 | <geekosaur> | [30 15:06:39] <geekosaur> mm, now that I think about it, I wonder if that's actually true. the real name of anything is qualified by full module and package names; namespaces could be implemented by replacing the module part, conceivably |
| 15:27:19 | <geekosaur> | I am talking about how one might add namespaces without breaking literally every existing library |
| 15:27:36 | <geekosaur> | except that it introduces a different problem |
| 15:29:56 | <abastro[m]> | Oh, sorry. I am not informed enough to understand that in one go. |
| 15:31:45 | × | cdman quits (~dcm@user/dmc/x-4369397) (Quit: Leaving) |
| 15:31:49 | → | merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
| 15:37:14 | × | merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds) |
| 15:38:03 | <Andrew> | Simple way to decode UTF-8 encoded ByteString replacing invalid stuff with U+FFFD rather than a Nothing value or an Exception? |
| 15:38:27 | × | dextaa_ quits (~dextaa@user/dextaa) (Remote host closed the connection) |
| 15:40:50 | <maerwald> | Andrew: is that a question? |
| 15:41:08 | <Andrew> | Yeah |
| 15:41:14 | <maerwald> | https://hackage.haskell.org/package/text-2.0/docs/Data-Text-Encoding.html#v:decodeUtf8With |
| 15:41:25 | <Andrew> | Thanks :P |
| 15:43:04 | × | razetime quits (~quassel@117.254.35.251) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 15:50:23 | → | dut_ joins (~dut@user/dut) |
| 15:52:28 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 15:53:31 | × | dut quits (~dut@user/dut) (Ping timeout: 260 seconds) |
| 15:55:25 | <Andrew> | What the heck is the Text type |
| 15:55:30 | <Andrew> | I want [Char] |
| 15:58:13 | × | Pickchea quits (~private@user/pickchea) (Ping timeout: 256 seconds) |
| 15:59:33 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 260 seconds) |
| 15:59:41 | <sm> | https://hackage.haskell.org/package/text-2.0/docs/Data-Text.html#v:unpack |
| 16:00:41 | × | lbseale quits (~ep1ctetus@user/ep1ctetus) (Read error: Connection reset by peer) |
| 16:01:52 | <maerwald> | Andrew: Text is a more efficient type than String |
| 16:02:05 | → | lbseale joins (~ep1ctetus@user/ep1ctetus) |
| 16:02:06 | → | razetime joins (~quassel@117.254.35.251) |
| 16:02:35 | <geekosaur> | most people who think they want [Char] probably want something mroe efficient than a singly linked list |
| 16:02:58 | <Andrew> | Okay, I'll look into that |
| 16:03:33 | × | gurkenglas quits (~gurkengla@dslb-178-012-018-212.178.012.pools.vodafone-ip.de) (Ping timeout: 256 seconds) |
| 16:04:17 | <Andrew> | I wonder if that' a good idea while parsing internet protocols such as Irc |
| 16:04:56 | <geekosaur> | IRC would be mostly ByteString, tbh |
| 16:05:22 | <geekosaur> | and more complicated because there isn't actually an encoding for anything except nicks, which aren't utf8 |
| 16:05:35 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Quit: ZNC - https://znc.in) |
| 16:05:38 | <Andrew> | hmm true |
| 16:05:47 | <geekosaur> | utf8 is a convention and not an especially widely used one; many clients attempt utf8 decode and fall back to latin-1 |
| 16:05:51 | <Andrew> | so i should just deal with ByteString everywhere? |
| 16:06:26 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 16:06:32 | <geekosaur> | probably |
| 16:06:37 | <Andrew> | k |
| 16:06:49 | <maerwald> | Don't use the Char8 module |
| 16:06:53 | Andrew | dislikes having so many text-like types and looks at https://hackage.haskell.org/package/monoid-subclasses-0.4.2/docs/Data-Monoid-Textual.html |
| 16:07:10 | → | gurkenglas joins (~gurkengla@dslb-178-012-018-212.178.012.pools.vodafone-ip.de) |
| 16:07:16 | <Andrew> | I just want a proper typeclass for everything that's text like |
| 16:07:48 | <maerwald> | we don't have, but there's IsString for converting from String to |
| 16:08:07 | <maerwald> | but it doesn't have any other useful typeclass functions |
| 16:08:20 | <tdammers> | There aren't that many text-like types, really |
| 16:08:35 | <tdammers> | ByteString, despite the name, is really just a byte array, not a text-like type |
| 16:08:45 | <maerwald> | tdammers: we have 3 bytestring like types |
| 16:08:48 | <Andrew> | Yes, I get that point |
| 16:09:08 | <Andrew> | Conversion is silly, we need proper typeclasses and polymorph |
| 16:09:09 | <maerwald> | it really is excessive |
| 16:09:40 | <tdammers> | and there's the lazy/strict distinction, but we really only have this because we can - other languages need more elaborate ceremony to give you lazy string / byte array processing |
| 16:09:45 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 16:10:00 | <tdammers> | I do agree that [Char] is silly |
| 16:10:00 | <maerwald> | streamly could solve that :p |
| 16:10:10 | <maerwald> | but it will never make it into base |
| 16:10:10 | × | dut_ quits (~dut@user/dut) (Ping timeout: 272 seconds) |
| 16:10:16 | <tdammers> | but explicit conversions between ByteString and Text are 100% a good thing |
| 16:11:15 | <Andrew> | I agree with the last point |
| 16:12:03 | <Andrew> | We might as well go into ghc and make [Char] more efficent... [Char] as of now isn't practical but it looks really sweet and "correct" |
| 16:13:12 | <geekosaur> | hard to make a linked list more efficient without breaking it |
| 16:13:42 | <tdammers> | yeah. [Char] might seem theoretically elegant, but for practical string munging, it's horrible |
| 16:13:57 | <tdammers> | the theoretical elegance is why it's the default, after all |
| 16:14:12 | <tdammers> | but that was long before Haskell got anywhere near being a viable industry language |
| 16:14:13 | → | merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
| 16:14:30 | <maerwald> | I think a linked list would be cool if the contents were graphemes |
| 16:15:07 | <tdammers> | you'd still have to deal with the massive memory overhead, cache trashing, and shlemiel-the-painter problems |
| 16:15:14 | <geekosaur> | wouldn't be enormously different from what we have now |
| 16:15:49 | × | ccntrq quits (~Thunderbi@2a01:c23:8d1c:5b00:e103:4fc:b5d9:b33d) (Remote host closed the connection) |
| 16:16:22 | <Zemyla> | Chars are 21 bits. You can fit three of them into a 64-bit word, along with an annotation bit that says whether there are 2 or 3 characters in that word. That makes them perfect for fingertrees. |
| 16:16:35 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 16:17:06 | <Zemyla> | Fingertrees also give you O(log n) split and concatenate. |
| 16:17:06 | → | Vajb joins (~Vajb@2001:999:62:aa00:7f5a:4f10:c894:3813) |
| 16:17:55 | <Andrew> | to me, haskell means elegance |
| 16:18:19 | <maerwald> | Zemyla: excellent... so all we need now is a tech proposal. And if you push long enough (say, 10 years), you might actually get it into base :D |
| 16:19:48 | <tdammers> | Andrew: that's nice, but to other people, haskell means "a language that I can ship to production" |
| 16:22:11 | Andrew | missed the Lisp machines |
| 16:24:00 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 16:26:22 | <Andrew> | Apparently they're before I was born, but lambda machines are just a great idea to me: why would we run beautiful functional code on (also beautiful, but inconsistent and incompatible) turing machines? |
| 16:26:25 | × | kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Quit: ERC (IRC client for Emacs 26.3)) |
| 16:26:36 | <Andrew> | I mean hs and lisp would be much more efficent, supposedly |
| 16:26:50 | <Andrew> | At least it gives me a warm fuzzy feeling of "correctness" |
| 16:29:09 | <monochrom> | IMO the most important reason is: It doesn't really matter. |
| 16:29:15 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 16:29:58 | <monochrom> | Then, the secondary reason is historical trajectory and networking effect and economy of scale that landed at von-Neumann hardware. |
| 16:31:33 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 16:31:43 | <Andrew> | "It doesn't really matter" ... I'm uncomfortable running functional code on imperatively-designed hardware |
| 16:31:47 | <monochrom> | If you're a C&C Red Alert fan, you might like to repeat its "go back in time, shake hand with Einstein, caused them to vanish, change history", except you s/Einstein/Turing/ so lambda calculus might have a better chance in the new time line. |
| 16:31:54 | <Andrew> | *designed-for-imperative |
| 16:32:41 | <monochrom> | Except that the same trope also says that whoever you think would have a better chance does not, there is always something else that comes up. |
| 16:33:04 | <maerwald> | correctness? pah |
| 16:33:10 | <monochrom> | Your comfort level doesn't matter, either. The computer doesn't care. |
| 16:36:44 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 252 seconds) |
| 16:38:52 | × | dfg quits (dfg@user/dfg) (Quit: I hate quit messages.) |
| 16:39:56 | × | odnes_ quits (~odnes@5-203-245-187.pat.nym.cosmote.net) (Ping timeout: 272 seconds) |
| 16:40:11 | → | dfg joins (~dfg@dfg.rocks) |
| 16:40:11 | × | dfg quits (~dfg@dfg.rocks) (Changing host) |
| 16:40:11 | → | dfg joins (~dfg@user/dfg) |
| 16:40:18 | × | DNH quits (~DNH@2a02:8108:1100:16d8:213d:84ff:7913:27a6) (Ping timeout: 260 seconds) |
| 16:43:13 | <sm> | everybody says [Char] is horribly inefficient without actually testing it, but it's not so clear cut. For the common case of small strings, IIRC it can be faster. It's also much easier to work with when getting started. |
| 16:43:53 | <sm> | s/when getting started// |
| 16:45:02 | <dsal> | Yeah, I use String a lot without it having any negative impact on my life. |
| 16:45:29 | <raehik1> | I'm trying to add a remote Cabal dependency to a non-Hackage pkg. Contains some C. When I add it as a dep to my separate project, Cabal fails and complains "include dir doesn't exist". But it builds fine by itself. |
| 16:46:38 | <raehik1> | I can fix it by adding the required header to install-includes. But I'm not sure why that fixes it & whether it's the right fix, since it's an internal-only header |
| 16:47:26 | <raehik1> | Same problem if you try "cabal install --lib". pkg I'm trying to use: https://github.com/keystone-engine/keystone/tree/master/bindings/haskell |
| 16:48:48 | × | merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds) |
| 16:50:51 | <raehik1> | any insights here? can't make a PR while I don't know why it fixes a (my) problem! Cabal docs don't talk about this interaction |
| 16:50:52 | → | econo joins (uid147250@user/econo) |
| 16:51:10 | → | briandaed joins (~root@109.95.142.93.r.toneticgroup.pl) |
| 16:53:12 | × | boxscape_ quits (~boxscape_@p4ff0be5f.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 16:53:27 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 16:54:44 | <sm> | https://www.okapi.wiki/design#motivation, "...born from the frustration..." - sign of a good project |
| 16:54:48 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 16:55:35 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 260 seconds) |
| 16:56:00 | <sm> | "a monadic HTTP parser". I wonder what this means in practice |
| 16:56:09 | × | MajorBiscuit quits (~MajorBisc@c-001-013-026.client.tudelft.eduvpn.nl) (Quit: WeeChat 3.4) |
| 16:57:42 | <Zemyla> | Should I add zipping traversals to lens? |
| 16:57:52 | <sm> | the examples look very nice, but similar to other haskell web frameworks. But "This means it can be used with all Applicative, Alternative, and Monad typeclass methods, plus other Haskell idioms like parser combinators.", maybe this is new |
| 16:58:45 | <sm> | raehik1 I think you'll have to share lots of details |
| 16:58:55 | <geekosaur> | yeh, my comment about Text vs. [Char] is as someone who has yet to make use oflarge enough String-s to justify Text |
| 16:59:16 | <geekosaur> | I just don't do a lot of Stringy stuff in Haskell |
| 17:01:46 | <Zemyla> | Odd. Stringy stuff is a lot of what I do in Haskell. Parser combinators make it easy. |
| 17:02:59 | <raehik1> | sm: right ofc. in that pkg, `cabal build` works, but `cabal install --lib` fails with an error "include dir not found". It is found when building regularly |
| 17:02:59 | × | Vajb quits (~Vajb@2001:999:62:aa00:7f5a:4f10:c894:3813) (Read error: Connection reset by peer) |
| 17:03:07 | <geekosaur> | maybe it'd be more correct to say I don't do a lot of Stringy stuff |
| 17:03:32 | <geekosaur> | raehik1, what does "cabal check" say? |
| 17:03:40 | <sm> | @where paste |
| 17:03:40 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
| 17:03:51 | <raehik1> | oh, I actually have the same problem on an older proj of mine! |
| 17:03:52 | × | razetime quits (~quassel@117.254.35.251) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 17:04:17 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 17:05:08 | <raehik1> | geekosaur: cabal check says nothing unusual: https://paste.tomsmeding.com/iPZFiJSp |
| 17:06:33 | <sm> | yes I think I get it.. okapi's handler code is more composable than most |
| 17:07:57 | <geekosaur> | interesting. normally it at least tries to catch things like required headers that aren't so marked. although that is admittedly harder for C than for Haskell |
| 17:09:51 | <raehik1> | here's the output of cabal install --lib -v https://paste.tomsmeding.com/kGWB3W91 |
| 17:10:03 | <sm> | oh yeah, and all the handlers (so far) have no arguments, they just parse. That's different |
| 17:10:55 | <geekosaur> | "Warning: 'include-dirs: src/include' directory does not exist." |
| 17:11:12 | <geekosaur> | line 191, during configuring |
| 17:11:35 | × | skandal quits (~skandal@user/szahid) (Quit: ZNC 1.8.2 - https://znc.in) |
| 17:12:42 | <raehik1> | Yeah. Don't understand why |
| 17:13:09 | <raehik1> | Cabal's generated sdists don't have the include dir (of that proj, or another one where include is in cbits) |
| 17:13:45 | <geekosaur> | this is c2hs blowing up, I see; it might have different expectations from normal C includes |
| 17:14:29 | <raehik1> | geekosaur: I'm reproducing the same issue on another project that uses hsc2hs https://github.com/raehik/lzo-hs |
| 17:14:38 | <raehik1> | I don't rly know how they differ tho |
| 17:15:40 | <geekosaur> | cbits/src/include isn't the same thing as src/include, looking at that package |
| 17:16:30 | <sclv> | yeah looks like that pkg needs to specify adding the include dir directly |
| 17:17:14 | <raehik1> | geekosaur: what do you mean? both projs seem to write the same thing in the cabal file |
| 17:17:23 | <sclv> | include dirs are for what gets passed as include flags not what goes in the sdist |
| 17:17:24 | <sclv> | ? |
| 17:17:38 | <raehik1> | sclv: yes that's what I'm thinking |
| 17:17:57 | <geekosaur> | yes, it translated to an -Isrc/include as sent to c2hs |
| 17:18:05 | <sclv> | i guess they never tested a normal sdist workflow |
| 17:18:21 | <ProfSimm> | If Haskell never computes ahead of time, just aggregates expressions, does that mean every time a function runs, there's a semantic "copy' of the expression tree of that function |
| 17:18:45 | <raehik1> | how should I get those files placed in the sdist? |
| 17:21:12 | <geekosaur> | ProfSimm, (a) nothing says it can't compute ahead of time, just that it must have the same outcome as not doing so. otherwise strictness analysis would be forbidden. (b) don't understand what you mean by «semantic "copy"». it's the expression tree itself, no copying needed. purity… |
| 17:21:55 | <geekosaur> | but then I rarely have any idea what you're on about; you seem to have some odd notions of how things work in general |
| 17:22:25 | <ProfSimm> | geekosaur: yes I do |
| 17:22:52 | <raehik1> | another Haskell lib using cbits puts all the headers in extra-source-files. so maybe that's the intended solution! but unexpected |
| 17:22:53 | <ProfSimm> | geekosaur: well we have an expression tree, one time you call the function it reduces one way, then another way |
| 17:24:13 | <geekosaur> | yes, but it's not substituting the parameter in directly; thatparameter is part of the expression tree (think: APPLY (LAM ...) BINDING ...) |
| 17:24:47 | <ProfSimm> | geekosaur: I was thinking substituting directly might be a neat way to have memoization |
| 17:24:59 | <ProfSimm> | geekosaur: what about partial application and reduction |
| 17:25:23 | <geekosaur> | partial application just means youget another (LAM ...) back |
| 17:27:09 | <geekosaur> | not sure what you intend here by reduction, unless you mean what happens when it's fully applied. in that case it still isn't necessarily "reduced", these things happen when the result is demanded |
| 17:28:49 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 17:28:53 | <geekosaur> | so you have a "thunk" which is an (APPLY (LAM ...) BINDING ...) waiting for something to demand the result. |
| 17:29:17 | → | napping joins (~brandon@65.128.43.198) |
| 17:29:21 | <geekosaur> | (in this case. a CAF can also be a thunk, it just isn't an APPLY) |
| 17:32:30 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 17:35:13 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 260 seconds) |
| 17:37:35 | <napping> | Does GHC put any useful build hashes into executables, which would be suitable for checking if a serialized Compact was made with the same executable? |
| 17:41:37 | <geekosaur> | portably extracting and using such would be an … adventure |
| 17:46:45 | <maerwald> | are there any tricks to match on deeply nested ASTs for a particular pattern? |
| 17:47:30 | <maerwald> | (SQL AST in this case) |
| 17:51:17 | <[exa]> | maerwald: by the "deeply nested AST" you mean basically a small "open" subtree or something more complicated? |
| 17:51:51 | <[exa]> | *by the _matching_ on deeply nested AST |
| 17:51:55 | <maerwald> | https://hackage.haskell.org/package/postgresql-syntax-0.4.0.2/docs/PostgresqlSyntax-Ast.html |
| 17:52:19 | <maerwald> | There are a thousand combinations you can see a table identifier, for example |
| 17:52:39 | <[exa]> | u u u uhhhhhhhhhhhh |
| 17:52:44 | <maerwald> | gg |
| 17:53:27 | × | mikoto-chan quits (~mikoto-ch@213.177.151.239) (Ping timeout: 260 seconds) |
| 17:53:59 | <[exa]> | ok well, probably depends on the complexity of the query |
| 17:54:11 | <maerwald> | the query can be arbitrarily complex :D |
| 17:54:32 | <[exa]> | the complexity of the match will then scale with the query complexity :D |
| 17:54:58 | <maerwald> | nah, I mean, at some point I'm exhaustive |
| 17:55:07 | <[exa]> | anyway, this is going to be ugly even with pretty advanced syb |
| 17:55:19 | → | mikoto-chan joins (~mikoto-ch@213.177.151.239) |
| 17:55:29 | <[exa]> | do you actually receive the SQL or you generate it? |
| 17:55:37 | × | Codaraxis_ quits (~Codaraxis@user/codaraxis) (Ping timeout: 246 seconds) |
| 17:55:53 | <maerwald> | receive |
| 17:56:01 | <maerwald> | and then manipulate |
| 17:56:08 | <[exa]> | ok that rules out the possibility to do on a sane-complexity IR |
| 17:56:13 | → | Macbethwin joins (~chargen@8.21.8.253) |
| 17:57:06 | <maerwald> | it is rather well-defined and not that complicated... replace a table identifier with a subquery and an alias |
| 17:57:27 | <maerwald> | in a from clause |
| 17:57:36 | <[exa]> | I'd just syb |
| 17:57:51 | <[exa]> | sounds reasonable in this case |
| 17:58:03 | × | mbuf quits (~Shakthi@136.185.73.48) (Quit: Leaving) |
| 17:59:16 | <maerwald> | the readme is empty and points to a non-existing website |
| 17:59:18 | <maerwald> | very good |
| 18:00:09 | <[exa]> | the main issue is that the SQL model here doesn't look like it consistently lists all possible places where the reference Ident can be a table name, this looks more like you'll just need to list them |
| 18:02:19 | × | deadmarshal_ quits (~deadmarsh@95.38.118.21) (Ping timeout: 260 seconds) |
| 18:02:45 | <[exa]> | like, IMO it looks like `gmapT` from the original SYB paper would do |
| 18:02:51 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 18:03:45 | × | alp quits (~alp@user/alp) (Ping timeout: 250 seconds) |
| 18:03:57 | <[exa]> | nowadays it's in uniplate afaik |
| 18:04:19 | → | hololeap_ joins (~hololeap@user/hololeap) |
| 18:04:55 | × | hololeap quits (~hololeap@user/hololeap) (Ping timeout: 240 seconds) |
| 18:07:14 | <maerwald> | your regular haskell lib: no documentation, just some academic papers that you have to search for manually |
| 18:07:45 | → | vicfred joins (~vicfred@user/vicfred) |
| 18:07:58 | <maerwald> | and people still debate why Haskell is not more popular :D |
| 18:09:16 | → | jgeerds joins (~jgeerds@d5364b87.access.ecotel.net) |
| 18:09:21 | → | hololeap joins (~hololeap@user/hololeap) |
| 18:09:29 | <sm> | not all libs are like that. What we need is much better discoverability of libs' doc level and general production-readiness, which will create positive pressure |
| 18:10:20 | <sm> | "hackage, show me only class A production-ready libraries!" |
| 18:10:40 | <maerwald> | that would be a rather short list mostly comprised of backend libs |
| 18:10:55 | × | hololeap_ quits (~hololeap@user/hololeap) (Ping timeout: 240 seconds) |
| 18:11:46 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 18:11:55 | <sm> | I'm not sure how short or long it is right now. That would start changing more quickly.. |
| 18:12:17 | <maerwald> | sm: https://github.com/haskellfoundation/stability/issues/7 |
| 18:13:55 | <sm> | thanks. I think in practice it may end up requiring a new hackage.. how's that going Hecate |
| 18:15:04 | <Hecate> | hello |
| 18:15:27 | <Hecate> | it's doing well I think |
| 18:15:33 | <Hecate> | considering I'm the only one on it :P |
| 18:16:30 | <maerwald> | sounds like an excellent burnout rate |
| 18:16:50 | <dminuoso> | 20:07:14 maerwald | your regular haskell lib: no documentation, just some academic papers that you have to search for manually |
| 18:17:12 | <dminuoso> | You forgot: You have type signatures, but with no description or explanation. |
| 18:17:27 | <maerwald> | yeah, types are self-explanatory, right? |
| 18:17:38 | <dminuoso> | I guess thats the thing, with some time spent they can be |
| 18:17:50 | <dminuoso> | Which results in unfortunate feedback loops |
| 18:18:10 | <sm> | Hecate: I think you posted a link recently, could you share again ? |
| 18:18:15 | <dminuoso> | If you're sufficiently advanced, types (even those of other peoples libraries) become self-explanatory. |
| 18:18:27 | <maerwald> | dminuoso: I don't think so :) |
| 18:18:48 | <geekosaur> | only some types are self-explanatory. |
| 18:18:51 | <dminuoso> | maerwald: My point rather is, this can easily train experienced Haskellers to not elaborate them, because they might feel they are self-explanatory. |
| 18:19:02 | <dminuoso> | Not that its a good idea. |
| 18:19:24 | <maerwald> | openFile :: FilePath -> IO Handle <-- I have a thousand questions about what this function does :) |
| 18:19:58 | <dminuoso> | You belong to the upper 10% to even know there's more to than just "well it opens a right, right" |
| 18:20:03 | <maerwald> | the reason I know what it does is because I read the entire implementation down to the windows IO manager |
| 18:20:12 | <dminuoso> | Note, the 10% are from my made up statistics. |
| 18:21:14 | <sm> | ah, https://dev.flora.pm |
| 18:22:18 | <sm> | showing only the class A production ready packages I see |
| 18:22:30 | → | unit73e joins (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) |
| 18:22:52 | <maerwald> | it looks like someone new a thing or two about CSS there |
| 18:22:56 | <maerwald> | *knew |
| 18:24:04 | <sm> | for pretty CSS you've pretty much got to pick a framework and learn that. (What's playground using ?) |
| 18:24:13 | <maerwald> | none |
| 18:24:32 | → | coot joins (~coot@213.134.190.95) |
| 18:24:44 | <sm> | flora is using tailwindcss it seems |
| 18:26:19 | <sm> | I see they call these "UI kits" |
| 18:26:56 | <sm> | The main difference between TailwindCSS and Bootstrap is that Tailwind CSS is not a UI kit. Unlike UI kits such as Bootstrap, Bulma, and Foundation, Tailwind CSS doesn’t have a default theme or built-in UI components. Instead, it comes with predesigned widgets you can use to build your site from scratch. Bootstrap is known for its responsiveness, whereas proponents of Tailwind CSS typically value the framework’s customizability. |
| 18:27:42 | <maerwald> | did you copy paste that? |
| 18:27:55 | <sm> | yup, from the internet |
| 18:28:02 | <maerwald> | amazing |
| 18:28:13 | × | epolanski quits (uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
| 18:28:40 | Macbethwin | is now known as Chargen |
| 18:28:44 | <sm> | whatever ui kit/css framework you pick, it must at minimum be responsive enough that your thing just works on big and small screens |
| 18:28:52 | <ario> | i've been meaning to give tailwind a try |
| 18:29:07 | × | vysn quits (~vysn@user/vysn) (Ping timeout: 250 seconds) |
| 18:29:10 | <maerwald> | sm: playground works on mobile I think |
| 18:30:12 | <sm> | maerwald: I haven't tried, but without a framework ensuring this it'll probably seem to work but you'll find problems sooner or later |
| 18:30:30 | <maerwald> | now I feel you're selling me tech :D |
| 18:31:26 | <sm> | well I am, this is a case where using some tech is justified IMHO |
| 18:31:46 | <maerwald> | I think tomsmeding is a fan of simplicity |
| 18:31:50 | <sm> | trying to make something (a) pretty and (b) looking right on all the wacky clients out there is a futile task |
| 18:32:03 | <sm> | by yourself with no framework, I mean |
| 18:34:08 | <tomsmeding> | maerwald: yes |
| 18:34:47 | <tomsmeding> | I'm not sure leaving responsiveness of a playground to a css framework is a good idea |
| 18:35:18 | <sm> | and when I say "framework", I'm thinking "include one tiny css file, *maybe* one js file, and enjoy massive benefits" |
| 18:35:27 | <tomsmeding> | it might work great for an article, but for this playground thing I'd not want to be at the mercy of the layout suggested by some framework |
| 18:35:52 | <tomsmeding> | the main pastebin site uses purecss, but that doesn't do too much responsiveness really |
| 18:35:58 | <tomsmeding> | though I guess it does some |
| 18:36:03 | <tomsmeding> | depending on what you call "responsive" |
| 18:36:59 | <sm> | these are lightweight things I'm talking about, not heavy handed. You use just the bits you want, usually #1 is a bit of magic to adjust layout when screens are small so you don't have to think about, implement, debug, support that yourself |
| 18:37:34 | <tomsmeding> | sm: what layout would you want to be adjusted how for the playground? |
| 18:37:41 | <sm> | so yes it's a tradeoff, just MHO that it's a good one but YMMV |
| 18:38:07 | → | alp joins (~alp@user/alp) |
| 18:38:11 | sm | tries it |
| 18:38:23 | <tomsmeding> | (I'm not against including tech, I'm just unwilling to introduce tech for the sake of it, or when there's a similarly decent solution without said tech) |
| 18:38:46 | → | Pickchea joins (~private@user/pickchea) |
| 18:39:26 | <hololeap> | have you guys tried using elm-ui? just curious |
| 18:39:30 | <sm> | well, look at it. On an iphone SE you can see "putStrLn" and that's about it |
| 18:39:39 | → | modnar joins (~modnar@shell.sonic.net) |
| 18:39:59 | <sm> | I think apps would typically replace a split screen with a full screen, or horizontal split in this case |
| 18:40:11 | <tomsmeding> | sm: right, that's what I was thinking as well |
| 18:40:25 | <tomsmeding> | and I'm damn sure a framework is not going to do that out of the box here for you |
| 18:40:26 | <sm> | and a good ui kit will do that sort of thing for you automatically |
| 18:40:29 | <maerwald> | we could use obelisk to build an app :D |
| 18:40:46 | <dminuoso> | Can we go back to GUI clients? Qt applications were *fine*, extremely snappy and have had nice animations for decades, oh and all the features are controllable by the software author. |
| 18:40:51 | <dminuoso> | Web has *none* of these. |
| 18:40:52 | <tomsmeding> | especially given that we want heights to be stable, scrolling output within the columns' containers, and a loading spinner that doesn't resize stuff |
| 18:41:02 | <tomsmeding> | dminuoso: yes lol |
| 18:41:17 | <tomsmeding> | except then nobody would use it, because if they need to install a local app for a playground, they could just as well run ghcup |
| 18:42:24 | <hololeap> | dminuoso: talking about types being self-explanitory: https://hackage.haskell.org/package/reflex-0.8.2.0/docs/Reflex-EventWriter-Base.html#v:sequenceDMapWithAdjustEventWriterTWith |
| 18:42:34 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 18:42:43 | <geekosaur> | winghci still needs a replacement (and a linux/osx port :) |
| 18:43:17 | <maerwald> | hololeap: I like the patch type lol |
| 18:44:01 | <dminuoso> | hololeap: It's self evident. Do you really want to display a lack of Haskellsauce by asking me to explain that type? |
| 18:44:03 | → | coot joins (~coot@213.134.190.95) |
| 18:44:25 | <sm> | tomsmeding: https://hackmd.io should be a decent example. On a small screen, they drop the split screen mode and you toggle between view/edit |
| 18:44:25 | → | merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
| 18:44:28 | <tomsmeding> | lol that type is funny |
| 18:45:02 | <maerwald> | the function name could be straight out of a Java library |
| 18:47:53 | <dminuoso> | hololeap: But yeah, that one is quite terrible. I recall one of the type safe SQL libraries having quite similar complicated types |
| 18:47:58 | <dminuoso> | I just dont recall which one that was |
| 18:48:25 | <dminuoso> | Ah I think it was beam |
| 18:48:57 | <dminuoso> | https://hackage.haskell.org/package/beam-core-0.9.2.1/docs/Database-Beam-Query.html#v:manyToMany_ |
| 18:49:34 | <dminuoso> | At that point, why not go all the way and specify the sql queries at the type level. It's beyond insanity already |
| 18:49:35 | <maerwald> | and you really want to give US dependent types? :) |
| 18:50:31 | → | Tuplanolla joins (~Tuplanoll@91-159-69-98.elisa-laajakaista.fi) |
| 18:52:27 | → | doyougnu joins (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) |
| 18:52:34 | <sm> | Hecate: did you rule out sqlite for flora ? |
| 18:54:13 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 18:54:49 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 18:57:45 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 18:59:47 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 19:03:20 | → | Codaraxis joins (~Codaraxis@user/codaraxis) |
| 19:05:51 | × | modnar quits (~modnar@shell.sonic.net) (Quit: No Ping reply in 180 seconds.) |
| 19:08:34 | → | modnar joins (~modnar@shell.sonic.net) |
| 19:10:52 | → | johnw joins (~johnw@2607:f6f0:3004:1:c8b4:50ff:fef8:6bf0) |
| 19:11:41 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 19:18:13 | × | merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds) |
| 19:18:53 | <Hecate> | sm: yes |
| 19:19:31 | <sm> | I'm interested to know the reason.. just because the postgres requirement shrinks the pool of potential contributors |
| 19:19:44 | <Hecate> | sm: search doesn't work yet but most UI elements should: https://dev.flora.pm/packages/@haskell/base/4.16.0.0 |
| 19:19:54 | <sm> | (and I have often thought of using sqlite for such apps) |
| 19:20:01 | × | dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.4.1) |
| 19:20:24 | <Hecate> | sm: yes but if it rules out the people who are comfortable with the SQLite type system it's okay |
| 19:20:25 | <sm> | ah, there's a package. I wasn't able to find any so thought it was empty |
| 19:20:27 | <Hecate> | https://twitter.com/mitchellsalad/status/1361022421021696003 |
| 19:20:42 | <Hecate> | sm: yeah I haven't implemented some UI elements |
| 19:20:51 | <Hecate> | https://dev.flora.pm/categories |
| 19:21:01 | <Hecate> | again, if you find something that doesn't work, it's normal |
| 19:21:07 | <Hecate> | it's not even an MVP |
| 19:22:31 | <Hecate> | sm: also it's pretty hard to have a read-replica with sqlite :-P |
| 19:22:52 | <Hecate> | and multiple applicative instances |
| 19:23:04 | <sm> | my current plan, should I ever be asked to make a scalable new web app, is to use persistent + sqlite at least for local dev with the option to switch to postgres in production |
| 19:23:28 | <sm> | I don't see sqlite's lesser type safety as an issue |
| 19:23:51 | <Hecate> | it's your right |
| 19:24:24 | <Hecate> | sm: It doesn't work |
| 19:24:44 | <Hecate> | because I can't test search locally then :P |
| 19:24:58 | <Hecate> | or I have to write in the subset of SQL that is supported by both Postgres and SQL |
| 19:25:01 | <Hecate> | *SQLite |
| 19:25:03 | <Hecate> | so no trigrams |
| 19:25:10 | <sm> | because with all the structure and guidance provided by the haskell layer, I can't see how I'd really screw up sqlite data in practice. Maybe I'm not seeing it |
| 19:26:34 | <sm> | Hecate: yes, I'd expect to be mostly using persistent / esqueleto for queries, and any lower-level ones would have to carefully be compatible with both dbs |
| 19:26:42 | <sm> | I saw you're using your own pg-entity ? |
| 19:26:47 | <Hecate> | yeah |
| 19:27:06 | <sm> | ah, https://hackage.haskell.org/package/pg-entity. Nice |
| 19:27:16 | <Hecate> | yup' |
| 19:27:24 | <Hecate> | although I ought to make a release |
| 19:28:23 | <Hecate> | sm: yeah so in the end I get no trigrams and no JSON operators |
| 19:28:37 | <Hecate> | I feel like I deserve a better experience than that :-P |
| 19:30:22 | <sm> | if I was building an industrial app I mightn't care about sqlite, but things like "a better hackage" really need to be good at onboarding contributors to succeed, I feel. Flora has gone another way for your reasons I know. But generally speaking I do think this is a pretty important aspect |
| 19:30:41 | <sm> | what are trigrams ? |
| 19:30:57 | <tomsmeding> | wha hat are tri rig igr gra ram ams |
| 19:31:07 | <sm> | does a hackage-like app really need such fancy features from the db ? |
| 19:32:12 | <tomsmeding> | I believe the common usage of trigrams in search is to break up the query into trigrams (as shown), then find all the trigrams in all the keywords, and return matches based on how many trigrams were found |
| 19:32:44 | <tomsmeding> | choice of 3 because (#{set of alphabetic characters})^3 is still manageable |
| 19:33:01 | <sm> | interesting tomsmeding, thanks |
| 19:33:39 | → | merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
| 19:35:50 | <Hecate> | sm: on the contrary, they are the less fancy way of doing search in the DB |
| 19:35:58 | <Hecate> | they're not FTS |
| 19:36:09 | <Hecate> | and most certainly not equivalent to ElasticSearch |
| 19:37:00 | <sm> | does hackage really need more than LIKE or ~ though ? |
| 19:37:38 | <Hecate> | it's a badly phrased question |
| 19:38:17 | <sm> | oops, how so ? |
| 19:38:17 | × | merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
| 19:38:41 | <Hecate> | what you're asking without knowing is "do we have machines powerful enough to allow the database to search through the whole dataset a high frequencies with an unoptimised technique" |
| 19:39:11 | <Hecate> | and that's part of what I try to avoid: Having ludicrous requirements for the hosts |
| 19:39:23 | <Hecate> | also sm, Flora is meant to be industrial |
| 19:39:57 | <Hecate> | This is why I'm thinking of having stuff like read-replicas, multiple application servers, ease of hosting, etc |
| 19:40:16 | <sm> | ok perhaps I'm being naive, but hackage searches.. package names ? And not that many. Isn't a dumb postgres search of those pretty fast ? And how many searches per second do you really need to support ? |
| 19:40:49 | <Hecate> | Hackage searches names, but apparently also synopsises and other fields |
| 19:41:20 | <Hecate> | sm: yeah it's not that many, around 16k |
| 19:41:52 | <Hecate> | also I have production experience with PostgreSQL |
| 19:41:59 | <Hecate> | I'm a member of the French PostgreSQL community |
| 19:42:02 | sm | too |
| 19:42:13 | <Hecate> | I have easy access to a support network that I know can deliver |
| 19:42:35 | <Hecate> | I don't have the resources to rebuild such a support network for 1 project |
| 19:42:36 | <geekosaur> | hackage searches every visible field in the index, from what I've seen |
| 19:42:44 | <sm> | I love postgres and manage it for work, but I know I won't set it up a postgres db on local machine for a quick contribution to a new FOSS project |
| 19:42:55 | <geekosaur> | (that is, hackage.org/packages/browse) |
| 19:43:13 | <Hecate> | sm: that being said I think I provide a docker-compose setup |
| 19:43:24 | <Hecate> | but again, if you don't want to install the toolchain of a project, it's okay |
| 19:43:25 | <maerwald> | Hecate: does pg-entity have parametrized queries? |
| 19:43:33 | <Hecate> | you can whisper in my ear instead :P |
| 19:43:38 | <sm> | docker neither (sorry :) |
| 19:43:45 | <sm> | yup, no worries |
| 19:43:51 | <Hecate> | maerwald: named parameters? nah it's using postgresql-simple under the hood |
| 19:43:57 | <Hecate> | and the hood is very much open |
| 19:44:01 | <Hecate> | so it's with '?' |
| 19:44:24 | <maerwald> | Hecate: https://github.com/haskellari/postgresql-simple/issues/58 |
| 19:45:16 | <Hecate> | if tdammers implements it and phadej accepts it, I'll support it :) |
| 19:45:46 | × | `2jt quits (~jtomas@210.red-88-24-179.staticip.rima-tde.net) (Remote host closed the connection) |
| 19:45:49 | <maerwald> | the point is rather that the absence is a security issue |
| 19:46:05 | <Hecate> | maerwald: you're making the good point to the wrong person |
| 19:46:14 | <Hecate> | I have no ability to influence the development of postgresql-simple |
| 19:46:25 | <Hecate> | but I agree |
| 19:46:28 | <Hecate> | but I can't do shit |
| 19:49:25 | <maerwald> | is it wired deeply into postgresql-simple? |
| 19:51:11 | <Hecate> | no idea I don't know the internals |
| 19:53:10 | <maerwald> | Hecate: man, you spelled Oleg wrong :p |
| 19:53:29 | <maerwald> | Oleg Grerus :( |
| 19:54:27 | <Hecate> | uh?? |
| 19:54:28 | <Hecate> | I did ? |
| 19:54:30 | <Hecate> | where? |
| 19:54:35 | <maerwald> | https://github.com/tchoutri/pg-entity#documentation |
| 19:55:24 | <Hecate> | fixed, thanks |
| 19:57:43 | × | doyougnu quits (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) (Ping timeout: 250 seconds) |
| 19:58:10 | <maerwald> | I miss the hackage bot. I feel I should have known about this package |
| 19:59:49 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 19:59:49 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 19:59:49 | → | wroathe joins (~wroathe@user/wroathe) |
| 20:01:04 | <sm> | I do too |
| 20:01:43 | <maerwald> | it wasn't really that noisy was it? |
| 20:02:42 | <sm> | not that noisy. Sometimes more than others. It had various limits. |
| 20:03:05 | <sm> | it does change the feel of the room a bit |
| 20:03:27 | <sm> | new more compact output could work better |
| 20:04:09 | → | haris joins (~haris@69.169.3.81) |
| 20:04:11 | <Hecate> | I have it on my Fediverse feed |
| 20:04:12 | <Hecate> | :P |
| 20:04:13 | <maerwald> | collect pkgs in interval of 5 minutes and print a paste if there are too many? |
| 20:04:22 | × | zmt00 quits (~zmt00@user/zmt00) (Read error: Connection reset by peer) |
| 20:05:47 | → | zmt00 joins (~zmt00@user/zmt00) |
| 20:05:48 | <sm> | * new packages uploaded: faktory, graphula, hspec-expectations-json, hspec-junit-formatter, ... |
| 20:06:16 | <geekosaur> | could even remove "uploaded" |
| 20:07:25 | <sm> | if anyone wants to revive the rss2irc-based one that I ran, I have pointers |
| 20:08:01 | <sm> | it could also just announce new packages, not updated ones |
| 20:08:23 | × | ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection) |
| 20:08:42 | → | ProfSimm joins (~ProfSimm@87.227.196.109) |
| 20:10:23 | <maerwald> | new packages and package takeovers :p |
| 20:10:41 | → | pavonia joins (~user@user/siracusa) |
| 20:12:00 | × | unit73e quits (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Quit: Leaving) |
| 20:12:26 | → | kenran joins (~kenran@200116b82bc26800d8fb2d8773389650.dip.versatel-1u1.de) |
| 20:13:19 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 20:13:55 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds) |
| 20:14:37 | Lord_of_Life_ | is now known as Lord_of_Life |
| 20:16:56 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 20:24:55 | × | Codaraxis quits (~Codaraxis@user/codaraxis) (Remote host closed the connection) |
| 20:25:21 | → | Codaraxis joins (~Codaraxis@user/codaraxis) |
| 20:28:02 | <dmj`> | question, is there a package that will convert all imports to be explicit (and rewrite all uses of types, functions to be qualified) in an entire codebase? |
| 20:28:25 | <dmj`> | asking for a friend |
| 20:29:40 | <maerwald> | HLS can at least do the first part, but converting to qualified use not I think |
| 20:29:57 | → | motherfsck joins (~motherfsc@user/motherfsck) |
| 20:30:13 | × | mikoto-chan quits (~mikoto-ch@213.177.151.239) (Ping timeout: 260 seconds) |
| 20:32:01 | <Hecate> | HLS can do the converting to qualified |
| 20:32:06 | <Hecate> | but you'll have to script it |
| 20:34:35 | → | acidjnk joins (~acidjnk@p200300d0c7049f58687650f0568aa4d7.dip0.t-ipconnect.de) |
| 20:34:57 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 20:36:47 | × | raehik1 quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
| 20:39:31 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 20:40:03 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
| 20:42:27 | × | briandaed quits (~root@109.95.142.93.r.toneticgroup.pl) (Ping timeout: 260 seconds) |
| 20:43:37 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 246 seconds) |
| 20:44:41 | → | raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 20:47:28 | <dmj`> | Hecate: does it just convert the import? or does it actually rewrite the usage sites as well |
| 20:48:04 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 20:54:43 | × | Codaraxis quits (~Codaraxis@user/codaraxis) (Remote host closed the connection) |
| 20:54:59 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 260 seconds) |
| 20:55:14 | → | Codaraxis joins (~Codaraxis@user/codaraxis) |
| 20:57:16 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 20:57:43 | → | SobiX joins (~SobiX@83.120.59.40) |
| 20:59:36 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 272 seconds) |
| 20:59:57 | ← | SobiX parts (~SobiX@83.120.59.40) () |
| 21:01:29 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 21:02:46 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 272 seconds) |
| 21:03:24 | <dmj`> | Hecate: I think this would be a cool standalone static analysis tool |
| 21:03:54 | → | InstX1 joins (~Liam@2601:6c4:4080:3f80:edd7:b0a0:789:3ae4) |
| 21:07:03 | × | Inst quits (~Liam@2601:6c4:4080:3f80:6050:16ec:fe01:4f97) (Ping timeout: 250 seconds) |
| 21:07:24 | <Hecate> | dmj`: you activate it on a call-site in particular actually |
| 21:07:26 | <Hecate> | but again |
| 21:07:34 | <Hecate> | that's the "interactive" usage |
| 21:07:41 | <Hecate> | idk about scripting |
| 21:09:56 | × | mon_aaraj quits (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 245 seconds) |
| 21:10:01 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Quit: ZNC - https://znc.in) |
| 21:10:48 | <monochrom> | dmj`: ghc -ddump-minimal-imports can help. |
| 21:11:02 | <InstX1> | what is it called |
| 21:11:02 | <monochrom> | It doesn't add "qualified" though. |
| 21:11:13 | <InstX1> | in haskell, when you create a record that's absorbed by a function interface? |
| 21:11:24 | <monochrom> | But it converts "import Data.List" to "import Data.List (sort)" for example. |
| 21:11:41 | <monochrom> | even adds "import Prelude (length)" |
| 21:12:01 | → | mon_aaraj joins (~MonAaraj@user/mon-aaraj/x-4416475) |
| 21:13:13 | <geekosaur> | InstX1, I don't understand your question. Can you show an example? |
| 21:13:31 | <InstX1> | umm, i defined a record via data |
| 21:13:35 | <InstX1> | then created a prototype of that record |
| 21:13:57 | <InstX1> | then i had a function interface for a bunch of functions that demanded complex arguments to be fed to them constantly |
| 21:14:07 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 21:14:08 | <InstX1> | the prototype basically set defaults |
| 21:14:32 | <InstX1> | so i called the functions via the function interface by feeding the function interface the record |
| 21:14:33 | <geekosaur> | oh.I don't think we have a specific name for that |
| 21:14:40 | <InstX1> | is that a bad design pattern? |
| 21:14:56 | <geekosaur> | it kinda serves the same purpose as a keyword interface to a function, though |
| 21:15:11 | <abastro[m]> | Function interface? |
| 21:15:21 | <geekosaur> | no, just we don't necessarily g;lorify our design patterns with names, or even with "design pattern" |
| 21:15:28 | <geekosaur> | it's just good coding style |
| 21:15:36 | <monochrom> | Generally we don't waste time coining names. But in this case I wouldn't mind hijacking "named parameters" and "default parameters". |
| 21:16:10 | <abastro[m]> | What does function interface mean here? |
| 21:16:11 | <InstX1> | there's a bunch of cool design patterns that deserve names, like tuple recursion of a list to be split |
| 21:16:22 | <dmj`> | monochrom: that's exactly what I go for, but I'd still need some kind of source rewriting tool, thinking about haskell-src-exts ... probably still good |
| 21:16:25 | <InstX1> | the function interface calls the underlying function and feeds it inputs to satisfy the arguments |
| 21:16:26 | <monochrom> | You can safely s/interface// :) |
| 21:16:32 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 21:16:39 | <InstX1> | i somehow think the underlying function was poorly designed |
| 21:16:55 | <InstX1> | returns a IO (Maybe [Text]) |
| 21:17:09 | <dmj`> | monochrom: -ddump-minimal-imports would give me a list of all types / functions that need to be prefixed ... then I just gotta parse that module body and adjust the usage sites |
| 21:17:28 | <geekosaur> | no, it's just a convenient way to pass arguments with defaults |
| 21:17:34 | <monochrom> | Yikes, that's a lot of yak shaving. |
| 21:18:15 | <InstX1> | can i ask another stupid question? |
| 21:18:22 | <InstX1> | is FP about dataflows? |
| 21:18:24 | <geekosaur> | and the defaults can differ (see for example how dynamicLog gets used in xmonad, starting with a default that you can pick from a list of predefined ones) |
| 21:18:46 | <monochrom> | It seems strange to universally make everything qualified, I guess that's why other people haven't implemented it. |
| 21:19:54 | <monochrom> | No FP is not about dataflows. Though they do overlap. |
| 21:19:55 | <dmj`> | monochrom: it is a tad odd, but this project has a /ton/ of types, and some modules have been duplicated with only slight modifications (releasing a new endpoint version) |
| 21:20:15 | Chargen | is now known as macbethwin |
| 21:21:47 | <abastro[m]> | So by function interface mean higher-order functions |
| 21:22:28 | <monochrom> | Arrow does scream like "I am a dataflow language" for example. But Arrow is still not all of FP. |
| 21:22:57 | <abastro[m]> | Arrow? |
| 21:23:26 | <abastro[m]> | Hm, do you mean using Arrow instead of Monad? |
| 21:23:28 | <monochrom> | Control.Arrow for starters. And then it gets better with the proc-do notation for Arrow. |
| 21:23:43 | <monochrom> | Oh Monad obviously exceeds dataflow. |
| 21:23:52 | <abastro[m]> | `proc-do`, I see |
| 21:24:16 | <abastro[m]> | Personally never tried Arrow programming |
| 21:24:18 | <geekosaur> | in fact Arrow is not very widely used these days |
| 21:24:37 | <geekosaur> | I don't often see it, beyond people using >>> or first |
| 21:25:07 | <monochrom> | And >>> was demoted to just Category so you don't need to know Arrow. :) |
| 21:25:30 | <geekosaur> | and first/second to Profunctor |
| 21:25:41 | <tomsmeding> | or Bifunctor |
| 21:25:50 | <tomsmeding> | (which is in base) |
| 21:25:59 | <abastro[m]> | > :t (>>>) |
| 21:26:00 | <lambdabot> | <hint>:1:1: error: parse error on input ‘:’ |
| 21:26:04 | <tomsmeding> | :t (>>>) |
| 21:26:06 | <lambdabot> | forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c |
| 21:26:11 | × | zer0bitz quits (~zer0bitz@2001:2003:f750:a200:88a0:fb04:2d2:c434) (Ping timeout: 245 seconds) |
| 21:26:12 | <tomsmeding> | forward function composition |
| 21:26:13 | <abastro[m]> | Oh |
| 21:26:20 | <monochrom> | Some greedy capitalist investment firm bought Arrow and split it into parts for sale >:) |
| 21:26:21 | <abastro[m]> | So.. reverse (.)? |
| 21:26:29 | <tomsmeding> | :t flip (.) |
| 21:26:30 | <lambdabot> | (a -> b) -> (b -> c) -> a -> c |
| 21:26:34 | <geekosaur> | % :t (>>>) @((->) _) |
| 21:26:34 | <yahb> | geekosaur: ; <interactive>:1:9: error:; * Couldn't match kind `*' with `* -> *'; Expected kind `* -> * -> *', but `(->) _' has kind `* -> *'; * In the type `((->) _)'; In the expression: (>>>) @((->) _) |
| 21:26:37 | <abastro[m]> | Wait wasn't that what `&` does? |
| 21:26:43 | <tomsmeding> | except generalised over -> like things |
| 21:26:51 | <geekosaur> | & is flipped ($) iirc? |
| 21:26:52 | <tomsmeding> | abastro[m]: (&) is to ($) as (>>>) is to (.) |
| 21:27:05 | <tomsmeding> | and (<<<) == (.) |
| 21:27:14 | <abastro[m]> | Duh me |
| 21:27:18 | <abastro[m]> | Now I see... |
| 21:27:36 | <abastro[m]> | How could I confuse (.) and ($) is out of mind to ke |
| 21:27:40 | <abastro[m]> | To me* |
| 21:28:32 | <abastro[m]> | Tbf, I heard Arrow is great if you also want to give some info about the "procedure" without consuming input |
| 21:28:42 | <geekosaur> | and to serious-ify monochrom's observation, the useful parts of Arrow went to Category, Profunctor, Bifunctor, and Applicative. much of the rest is ruined by `arr` being mandatory |
| 21:28:52 | <abastro[m]> | `a -> m b` cannot give you any info without consuming input `a` |
| 21:29:13 | <abastro[m]> | `Profunctor`? |
| 21:29:38 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 21:29:56 | <abastro[m]> | @hoogle Profunctor |
| 21:29:57 | <lambdabot> | Control.Lens.Combinators class Profunctor (p :: Type -> Type -> Type) |
| 21:29:57 | <lambdabot> | Control.Lens.Iso class Profunctor (p :: Type -> Type -> Type) |
| 21:29:57 | <lambdabot> | module Data.Profunctor |
| 21:30:53 | <abastro[m]> | Oh you don't mean base |
| 21:31:05 | <geekosaur> | no, I'd forgotten Profunctor wasn't in base yet |
| 21:31:13 | <abastro[m]> | I thought you mean Profunctor is in base |
| 21:31:17 | <abastro[m]> | Oh |
| 21:31:18 | <geekosaur> | (if ever) |
| 21:32:05 | <abastro[m]> | Btw it is interesting how Category has general type signature |
| 21:32:28 | <janus> | geekosaur: do you know if there is a monomorphic (&&&) somewhere? |
| 21:32:49 | <geekosaur> | I don't knowof one |
| 21:32:58 | <abastro[m]> | Perhaps generalized monad could be defined with it. |
| 21:33:57 | <geekosaur> | I think generalized monads have been defined with it. outside base, of course |
| 21:34:38 | <geekosaur> | there are several implementations of indexed monads on hackage iirc |
| 21:35:19 | <geekosaur> | whether they have a full CT monad definition somewhere I don't know |
| 21:36:18 | → | merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
| 21:36:35 | <abastro[m]> | Isn't CT monad simpler than indexed monads |
| 21:37:12 | × | cosimone quits (~user@93-44-187-176.ip98.fastwebnet.it) (Quit: ERC (IRC client for Emacs 27.1)) |
| 21:38:04 | <johnw> | given thata "CT monad" can be defined in multiple ways, I'm not sure how to understand that question |
| 21:38:44 | × | michalz quits (~michalz@185.246.204.107) (Remote host closed the connection) |
| 21:41:49 | <abastro[m]> | Ah I forgot that `pure` and `join` in CT monad requires natural transformation |
| 21:42:01 | × | alp quits (~alp@user/alp) (Ping timeout: 245 seconds) |
| 21:42:37 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 21:42:47 | × | kenran quits (~kenran@200116b82bc26800d8fb2d8773389650.dip.versatel-1u1.de) (Quit: WeeChat info:version) |
| 21:42:55 | × | wyrd quits (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 240 seconds) |
| 21:44:13 | <abastro[m]> | Perhaps one could get by with |
| 21:44:14 | <abastro[m]> | `pure :: cat a (m a)` |
| 21:44:14 | <abastro[m]> | `join :: cat (m (m a)) (m a)` |
| 21:45:07 | → | wyrd joins (~wyrd@gateway/tor-sasl/wyrd) |
| 21:47:21 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 21:48:44 | <johnw> | well, that's another way from that perspective |
| 21:49:04 | <johnw> | there's also: arrows of the Kleisli category, monoid objects in the category of endofunctors, and the operad-based definition |
| 21:49:29 | <dolio> | The important question is: what's the point? |
| 21:49:35 | <johnw> | the adjunction-composite definition isn't quite universal enough to established what a monad IS, more than one simply always exists in that case |
| 21:49:41 | × | Graham31415 quits (~Graham@user/Graham31415) (Read error: Connection reset by peer) |
| 21:50:54 | → | Graham31415 joins (~Graham@user/Graham31415) |
| 21:51:56 | <johnw> | dolio: seems oddly out of place for a discussion about CT monads :) |
| 21:52:40 | × | Midjak quits (~Midjak@82.66.147.146) (Quit: Leaving) |
| 21:55:44 | → | hololeap_ joins (~hololeap@user/hololeap) |
| 21:56:55 | × | hololeap quits (~hololeap@user/hololeap) (Ping timeout: 240 seconds) |
| 21:58:45 | <abastro[m]> | Oh, so other definitions exist |
| 21:59:06 | <abastro[m]> | Btw I think https://hackage.haskell.org/package/category does what I wanted, but it is somehow deprecated |
| 21:59:15 | <abastro[m]> | I wonder why.. |
| 22:01:11 | <dolio> | The point of the question in that regard is that there are significantly better systems to use if faithfully embedding category theory is your goal. |
| 22:01:31 | <geekosaur> | I suspect because Control.Category is in base now |
| 22:01:37 | × | polyphem quits (~rod@2a02:810d:840:8754:224e:f6ff:fe5e:bc17) (Ping timeout: 240 seconds) |
| 22:03:44 | → | polyphem joins (~rod@2a02:810d:840:8754:224e:f6ff:fe5e:bc17) |
| 22:04:34 | <johnw> | dolio: ah, yes indeed, Haskell is not a great choice; better than C++, but much worse than Agda |
| 22:04:40 | <abastro[m]> | Oh. I thought it at least lacks Higher order functors tho |
| 22:04:44 | <geekosaur> | hm, no, it doesn't have Category, just classes derived from it. nouseful info on why it's deprecated either (speaking of documentation…) |
| 22:05:04 | <abastro[m]> | Oh. |
| 22:05:52 | <abastro[m]> | Well tbh I was actually thinking about using Set as monad, but that is implemented in another package cleverly it seems. |
| 22:06:02 | <geekosaur> | that'd be an indexed monad |
| 22:06:14 | <geekosaur> | as I said earlier, there are several such packages |
| 22:06:39 | <abastro[m]> | Oh? Set as Indexed monad? |
| 22:06:58 | <geekosaur> | Set requires Ord, you need an indexed monad to support that |
| 22:07:34 | <geekosaur> | sadly that does not mean you can just use an indexed monad anywhere you'd use a Monad, including with `do` (except maybe in 9.2.x) |
| 22:07:49 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 22:08:15 | × | merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 22:08:34 | <abastro[m]> | I mean, I do not get how indexed monad is enough to provide the Ord instance |
| 22:08:36 | → | deadmarshal_ joins (~deadmarsh@95.38.115.112) |
| 22:09:05 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 22:09:19 | → | hololeap joins (~hololeap@user/hololeap) |
| 22:10:15 | × | hololeap_ quits (~hololeap@user/hololeap) (Ping timeout: 240 seconds) |
| 22:10:32 | × | Graham31415 quits (~Graham@user/Graham31415) (Quit: Lost terminal) |
| 22:11:36 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 22:11:59 | × | dcoutts_ quits (~duncan@host86-150-41-212.range86-150.btcentralplus.com) (Ping timeout: 260 seconds) |
| 22:12:11 | <abastro[m]> | How do you implement indexed monad instance for Set? |
| 22:12:52 | × | deadmarshal_ quits (~deadmarsh@95.38.115.112) (Ping timeout: 246 seconds) |
| 22:16:24 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 22:16:37 | <geekosaur> | looks like https://hackage.haskell.org/package/category-extras is where everything has moved (note that it'sa metapackage) |
| 22:16:50 | <geekosaur> | including what you were looking at earlier |
| 22:17:07 | <geekosaur> | anyway strictly speaking you want a parameterized monad, where the parameter here is Ord |
| 22:19:02 | <geekosaur> | this allows it to work even though the shape of the value may change (a value may move to a different part of a tree, which in turn may cause rebalancing; this is what bites Set and Map) |
| 22:19:28 | <geekosaur> | that said I don't know off the top of my head how you would defined a parameterized monad instance for Set |
| 22:20:17 | × | macbethwin quits (~chargen@8.21.8.253) (Quit: zzz) |
| 22:24:31 | → | nate1 joins (~nate@98.45.152.91) |
| 22:27:39 | × | shriekingnoise quits (~shrieking@201.231.16.156) (Quit: Quit) |
| 22:29:32 | × | nate1 quits (~nate@98.45.152.91) (Ping timeout: 272 seconds) |
| 22:29:39 | → | shriekingnoise joins (~shrieking@201.231.16.156) |
| 22:32:22 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 22:32:58 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 22:37:55 | <johnw> | I had always thought it need a restricted monad, which parameterized monads generalize (as they also generalize indexed monads) |
| 22:38:07 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
| 22:43:03 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 22:45:49 | × | Tuplanolla quits (~Tuplanoll@91-159-69-98.elisa-laajakaista.fi) (Quit: Leaving.) |
| 22:46:47 | × | InstX1 quits (~Liam@2601:6c4:4080:3f80:edd7:b0a0:789:3ae4) (Ping timeout: 256 seconds) |
| 22:49:03 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 22:53:52 | × | Pickchea quits (~private@user/pickchea) (Quit: Leaving) |
| 22:54:09 | × | haris quits (~haris@69.169.3.81) (Remote host closed the connection) |
| 22:55:17 | → | InstX1 joins (~Liam@2601:6c4:4080:3f80:49ba:58e8:9838:64ed) |
| 23:02:28 | × | InstX1 quits (~Liam@2601:6c4:4080:3f80:49ba:58e8:9838:64ed) (Ping timeout: 260 seconds) |
| 23:04:47 | × | zeenk quits (~zeenk@2a02:2f04:a313:d600:8d26:ec9f:3ff6:fc94) (Quit: Konversation terminated!) |
| 23:08:07 | → | lainon joins (~lainon@2601:7c0:c500:4d20::2253) |
| 23:10:43 | → | alp joins (~alp@user/alp) |
| 23:10:56 | → | InstX1 joins (~Liam@2601:6c4:4080:3f80:28f0:360e:9f80:acb) |
| 23:11:04 | × | lainon quits (~lainon@2601:7c0:c500:4d20::2253) (Client Quit) |
| 23:12:58 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 23:14:24 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 23:17:35 | × | tiferrei quits (~tiferrei@user/tiferrei) (Ping timeout: 240 seconds) |
| 23:19:39 | × | acidjnk quits (~acidjnk@p200300d0c7049f58687650f0568aa4d7.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 23:20:42 | → | tiferrei joins (~tiferrei@user/tiferrei) |
| 23:22:09 | × | zyklotomic quits (~ethan@r4-128-61-93-8.res.gatech.edu) (Ping timeout: 256 seconds) |
| 23:24:08 | → | zyklotomic joins (~ethan@r4-128-61-93-188.res.gatech.edu) |
| 23:27:33 | × | vicfred quits (~vicfred@user/vicfred) (Ping timeout: 260 seconds) |
| 23:28:56 | × | Cale quits (~cale@cpef48e38ee8583-cm30b7d4b3fc20.cpe.net.cable.rogers.com) (Remote host closed the connection) |
| 23:31:00 | → | Cale joins (~cale@cpef48e38ee8583-cm30b7d4b3fc20.cpe.net.cable.rogers.com) |
| 23:33:01 | → | Guest27 joins (~Guest27@2601:281:d47f:1590::6b90) |
| 23:35:23 | <Guest27> | I have a simple by-the-books N-queens solver. The first version has type |
| 23:35:23 | <Guest27> | `Integral a => a -> [[(a,a)]]` |
| 23:35:24 | <Guest27> | Changing this to |
| 23:35:24 | <Guest27> | `Int -> [(Int,Int)]` |
| 23:35:25 | <Guest27> | Makes it 2 orders of magnitude faster. Both versions are compiled with -O2. What exactly is going on? Is whatever concrete type satisfying the Integral constraint really that much slower than an Int? |
| 23:36:08 | <Axman6> | your code is probably defaulting to Integer for a if you haven't specified what type you're using |
| 23:36:26 | <monochrom> | Certainly a factor. It's Integer. Unlimited width. |
| 23:37:01 | <Guest27> | That's what I figured, but I'm curious why Integer is soooo much slower when it's dealing with numbers on the same scale as the Int |
| 23:37:26 | <monochrom> | Not to mention that naturally, also incurs one more layer of function calls. |
| 23:37:29 | <Axman6> | basically every operation needs to check if you have a small integer or a large integer |
| 23:37:40 | <Axman6> | @src Integer |
| 23:37:40 | <lambdabot> | data Integer = S# Int# |
| 23:37:40 | <lambdabot> | | J# Int# ByteArray# |
| 23:38:32 | <Guest27> | Huh, I didn't realize that would add up so much |
| 23:39:10 | <Axman6> | so things like plus are implemented as (S# i) + (S# j) = addIntOverFlowToIntegerIfTooBig# i j; (S# i) + (J# n arr) = addIntToBigInteger# i n arr; etc. (made up, but you should get the point) |
| 23:39:19 | <monochrom> | Heap allocation also adds GC pressure. |
| 23:39:42 | <Axman6> | when you specify it's just Int, then it can use registers for all the values |
| 23:40:26 | <Guest27> | Okay, that all makes sense. Thanks! |
| 23:41:02 | <Guest27> | Are there any situations where Int becomes boxed under your nose to watch out for? |
| 23:41:40 | <abastro[m]> | geekosaur: Oh, category-extras has lots of things. That said, it still lacks the categorical monad.. |
| 23:41:52 | <monochrom> | Just wait until you suffer Int overflow->wraparound and start complaining that safety is more important than performance. |
| 23:42:23 | <monochrom> | Maybe Int boxes Int. |
| 23:43:24 | <abastro[m]> | Safety is more important than performance? |
| 23:43:44 | <Guest27> | monochrom On the one hand safety is important. On the other hand I'm playing code golf with friends and need to **win** |
| 23:44:04 | <monochrom> | I am agnostic to that debate. Just stating that other people would kill each other over it. |
| 23:44:08 | <hpc> | abastro[m]: when my code does the wrong thing, i always want it to do lots of wrong things in rapid succession :D |
| 23:45:10 | <monochrom> | In fact stating that even the same person can flip-flop upon the slightest pretext of suffering whatever issue du jour. |
| 23:46:28 | <dolio> | Throwing exceptions is safe? |
| 23:46:52 | <monochrom> | I am agnostic to that debate, too. |
| 23:46:55 | <dolio> | And the mathematical behavior of Z/Z(2^64) is not safe? :þ |
| 23:47:13 | <Axman6> | According to the type system, throwing an exception will always give you the correct answer! |
| 23:47:28 | <geekosaur> | 63, as I was reminded the last time this came up :þ |
| 23:47:43 | <hpc> | whenever you encounter an error, all you have to do is fix it |
| 23:47:44 | <hpc> | > fix error |
| 23:47:46 | <lambdabot> | "*Exception: *Exception: *Exception: *Exception: *Exception: *Exception: *Ex... |
| 23:48:07 | × | InstX1 quits (~Liam@2601:6c4:4080:3f80:28f0:360e:9f80:acb) (Ping timeout: 260 seconds) |
| 23:48:31 | <monochrom> | hpc: I once compiled in C "int i = 0; while (i > 0) i *= 2;" with gcc -O2. The generated code was "label: jmp label". That is a perfect realization of your preference. >:) |
| 23:48:47 | <monochrom> | Although, one can argue s/wrong/right/ |
| 23:49:11 | <dolio> | Pretty sure it's 64. Negative numbers aren't included even though people usually start with the integers for some reason. |
| 23:49:13 | <monochrom> | err, s/i = 0/i = 1/ |
| 23:49:34 | <abastro[m]> | <hpc> "abastro: when my code does the..." <- That's the spirit |
| 23:49:53 | <hpc> | there's posts online of gcc optimizer solving the collatz conjecture |
| 23:50:10 | → | InstX1 joins (~Liam@2601:6c4:4080:3f80:85fa:fa6d:a3c9:394a) |
| 23:50:18 | <monochrom> | Oh haha. |
| 23:50:52 | <monochrom> | I guess the conjecture is a theorem when restricted to int input. |
| 23:50:54 | <geekosaur> | well, it *is* demonstrated for built-in types… |
| 23:51:00 | <geekosaur> | yeh, that |
| 23:51:58 | <monochrom> | It would take a while before a platform decides that int has 1000 bits or something. |
| 23:52:42 | → | yauhsien joins (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) |
| 23:52:45 | <abastro[m]> | Well if `int i = 0; while (i > 0) i *= 2;` indeed resulted in infinite loop, that would be a good meme material |
| 23:52:55 | <monochrom> | Now, does gcc also solve the Riemann hypothesis for double? >:) |
| 23:55:33 | <monochrom> | Also, 2^n = 0 for all sufficently large n, therefore Θ(2^n) = Θ(1), hence EXPTIME=P. Corollary: NP=P. |
| 23:55:45 | × | Guest27 quits (~Guest27@2601:281:d47f:1590::6b90) (Quit: Client closed) |
| 23:57:00 | <monochrom> | This is now known as dolio's Lemma. >:) |
| 23:57:06 | <geekosaur> | so now that you scared the OP away… |
| 23:57:06 | <abastro[m]> | XD |
| 23:57:10 | × | yauhsien quits (~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 246 seconds) |
| 23:57:24 | <dolio> | Nice. |
| 23:57:33 | <abastro[m]> | Who was OP? |
| 23:57:48 | <abastro[m]> | :O |
| 23:58:14 | <geekosaur> | Guest27, with the n-queens problem |
| 23:58:15 | × | slaydr quits (~slaydr@173.239.197.154) (Remote host closed the connection) |
| 23:58:53 | <geekosaur> | #haskell, where we slide offtopic at the slightest pretext. }:> |
| 23:59:04 | <abastro[m]> | Ahh.. welp |
| 23:59:47 | <abastro[m]> | I am worried on the impression they might have gotten.. |
All times are in UTC on 2022-03-30.