2023/04/23

2023-04-23 00:07:19 +0200jargon(~jargon@174-22-213-236.phnx.qwest.net)
2023-04-23 00:08:50 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2023-04-23 00:12:30 +0200ub(~Thunderbi@p200300ecdf2ac3fa8554dfc0f1bb4f50.dip0.t-ipconnect.de)
2023-04-23 00:12:40 +0200ubert(~Thunderbi@84.140.143.11) (Ping timeout: 265 seconds)
2023-04-23 00:12:41 +0200ububert
2023-04-23 00:18:54 +0200alexherbo2(~alexherbo@2a02-842a-8180-4601-21ff-3860-e26e-dd6f.rev.sfr.net)
2023-04-23 00:29:47 +0200jmdaemon(~jmdaemon@user/jmdaemon)
2023-04-23 00:29:52 +0200gurkenglas(~gurkengla@dynamic-046-114-178-072.46.114.pool.telefonica.de) (Ping timeout: 248 seconds)
2023-04-23 00:32:46 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 255 seconds)
2023-04-23 00:46:41 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl)
2023-04-23 00:48:01 +0200gurkenglas(~gurkengla@dynamic-046-114-178-101.46.114.pool.telefonica.de)
2023-04-23 00:50:01 +0200smallville7123_(~JScript@cpe-172-193-72-46.qld.foxtel.net.au)
2023-04-23 00:52:34 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds)
2023-04-23 00:52:45 +0200JScript(~JScript@103.137.12.206) (Ping timeout: 240 seconds)
2023-04-23 01:01:41 +0200ubert(~Thunderbi@p200300ecdf2ac3fa8554dfc0f1bb4f50.dip0.t-ipconnect.de) (Remote host closed the connection)
2023-04-23 01:01:49 +0200ub(~Thunderbi@p548c8f0b.dip0.t-ipconnect.de)
2023-04-23 01:04:07 +0200unit73e(~emanuel@2001:818:e8dd:7c00:656:e5ff:fe72:9d36) (Remote host closed the connection)
2023-04-23 01:04:07 +0200ububert
2023-04-23 01:12:15 +0200smallville7123_(~JScript@cpe-172-193-72-46.qld.foxtel.net.au) (Read error: Connection reset by peer)
2023-04-23 01:12:42 +0200JScript(~JScript@144.48.39.182)
2023-04-23 01:16:01 +0200Me-me(~Me-me@146.102.215.218.dyn.iprimus.net.au)
2023-04-23 01:16:07 +0200Me-me(~Me-me@146.102.215.218.dyn.iprimus.net.au) (Changing host)
2023-04-23 01:16:07 +0200Me-me(~Me-me@user/me-me)
2023-04-23 01:18:53 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-04-23 01:18:54 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-04-23 01:18:54 +0200wroathe(~wroathe@user/wroathe)
2023-04-23 01:30:08 +0200acidjnk(~acidjnk@p200300d6e715c4732d0e415c422b1d76.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2023-04-23 01:31:53 +0200Feuermagier(~Feuermagi@user/feuermagier)
2023-04-23 01:35:22 +0200nate1(~nate@98.45.169.16)
2023-04-23 01:40:34 +0200nate1(~nate@98.45.169.16) (Ping timeout: 276 seconds)
2023-04-23 01:41:53 +0200hiredman(~hiredman@frontier1.downey.family) (Quit: Lost terminal)
2023-04-23 01:43:14 +0200harveypwca(~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67)
2023-04-23 01:47:44 +0200mauke_(~mauke@user/mauke)
2023-04-23 01:49:22 +0200mauke(~mauke@user/mauke) (Ping timeout: 252 seconds)
2023-04-23 01:49:22 +0200mauke_mauke
2023-04-23 01:51:48 +0200hiredman(~hiredman@frontier1.downey.family)
2023-04-23 01:55:30 +0200Feuermagier(~Feuermagi@user/feuermagier) (Quit: Leaving)
2023-04-23 02:00:45 +0200ryantrinkle(~ryantrink@140.174.253.180) (Ping timeout: 240 seconds)
2023-04-23 02:01:53 +0200ryantrinkle(~ryantrink@140.174.253.180)
2023-04-23 02:01:58 +0200califax(~califax@user/califx) (Remote host closed the connection)
2023-04-23 02:04:06 +0200califax(~califax@user/califx)
2023-04-23 02:06:11 +0200madjestic(~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 264 seconds)
2023-04-23 02:07:19 +0200heraldo(~heraldo@user/heraldo) (Quit: heraldo)
2023-04-23 02:08:12 +0200Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2023-04-23 02:09:37 +0200masterbuilder(~masterbui@user/masterbuilder) (Quit: leaving)
2023-04-23 02:09:49 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 276 seconds)
2023-04-23 02:09:49 +0200Lord_of_Life_Lord_of_Life
2023-04-23 02:10:34 +0200masterbuilder(~masterbui@user/masterbuilder)
2023-04-23 02:20:40 +0200waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 252 seconds)
2023-04-23 02:28:09 +0200madjestic(~madjestic@88-159-247-120.fixed.kpn.net)
2023-04-23 02:31:33 +0200opticblast(~Thunderbi@172.58.85.88) (Ping timeout: 255 seconds)
2023-04-23 02:42:30 +0200jero98772(~jero98772@2800:484:1d84:9000::2) (Ping timeout: 265 seconds)
2023-04-23 02:44:03 +0200Tuplanolla(~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) (Quit: Leaving.)
2023-04-23 02:49:09 +0200merijn(~merijn@145.90.225.7)
2023-04-23 02:53:35 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2023-04-23 02:53:48 +0200jero98772(~jero98772@2800:484:1d84:9000::2)
2023-04-23 03:10:52 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2023-04-23 03:16:59 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2023-04-23 03:22:37 +0200merijn(~merijn@145.90.225.7) (Ping timeout: 265 seconds)
2023-04-23 03:26:36 +0200slack1256(~slack1256@186.11.20.9)
2023-04-23 03:30:32 +0200dontdieych(~alarm@132.226.169.184)
2023-04-23 03:32:27 +0200 <dontdieych> Q for sqlite-simple 'execute_' function, it does not support multiple 'CREATE TABLE ...' statements that seperated by ';' string?
2023-04-23 03:34:18 +0200 <dontdieych> execute_ conn "CREATE TABLE a ... ; CREATE TABLE b ... ;"
2023-04-23 03:36:21 +0200 <dontdieych> I have sql file that working good with 'sqlite3 test.db < test.sql' but does not working with 'execute_ conn " ... " '. no error message.
2023-04-23 03:40:24 +0200tosyl(~user@103.206.114.87)
2023-04-23 03:45:52 +0200 <slack1256> dontdieych: I don't recall exactly how the 'execute_' function was implemented. But you can side-steep the problem using `traverse` as `traverse_ (execute_ conn) [stmt1, stmt2, stmt3]` where the statement are each a single SQL statement.
2023-04-23 03:49:12 +0200 <slack1256> I am doing a game using Yampa, but I am new to game development. Is it OK to redraw the whole screen each update? Does it affect if the game is 3D or 2D? Do GPUs help with this use case?
2023-04-23 03:49:29 +0200 <slack1256> Sorry, I will ask that on #haskell-offtopic.
2023-04-23 03:51:49 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2023-04-23 03:59:05 +0200 <sm> slack1256: try #haskell-game:matrix.org
2023-04-23 03:59:22 +0200 <slack1256> sm: Thanks!
2023-04-23 04:03:32 +0200accord(uid568320@id-568320.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2023-04-23 04:04:43 +0200 <dontdieych> slack1256: thanks. :D
2023-04-23 04:07:16 +0200slac63304(~slack1256@186.11.108.135)
2023-04-23 04:10:04 +0200slack1256(~slack1256@186.11.20.9) (Ping timeout: 276 seconds)
2023-04-23 04:12:47 +0200jero98772(~jero98772@2800:484:1d84:9000::2) (Ping timeout: 264 seconds)
2023-04-23 04:13:07 +0200Guest26(~Guest26@85.249.45.137) (Quit: Connection closed)
2023-04-23 04:15:01 +0200opticblast(~Thunderbi@172.58.85.88)
2023-04-23 04:15:17 +0200finsternis(~X@23.226.237.192) (Read error: Connection reset by peer)
2023-04-23 04:19:25 +0200madjestic(~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 240 seconds)
2023-04-23 04:24:25 +0200ubert(~Thunderbi@p548c8f0b.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2023-04-23 04:25:42 +0200ubert(~Thunderbi@p548c93d4.dip0.t-ipconnect.de)
2023-04-23 04:39:45 +0200slac63304(~slack1256@186.11.108.135) (Ping timeout: 240 seconds)
2023-04-23 04:40:16 +0200bratwurst(~dfadsva@2604:3d09:207f:f650::708a)
2023-04-23 04:40:41 +0200terrorjack(~terrorjac@2a01:4f8:c17:87f8::) (Quit: The Lounge - https://thelounge.chat)
2023-04-23 04:41:41 +0200terrorjack(~terrorjac@2a01:4f8:c17:87f8::)
2023-04-23 04:46:13 +0200dontdieych(~alarm@132.226.169.184) (Quit: WeeChat 3.8)
2023-04-23 04:49:15 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 255 seconds)
2023-04-23 04:56:00 +0200bratwurst(~dfadsva@2604:3d09:207f:f650::708a) (Ping timeout: 248 seconds)
2023-04-23 04:59:08 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds)
2023-04-23 05:00:25 +0200td_(~td@i5387093E.versanet.de) (Ping timeout: 240 seconds)
2023-04-23 05:01:23 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2023-04-23 05:02:08 +0200jero98772(~jero98772@2800:484:1d84:9000::3)
2023-04-23 05:02:32 +0200td_(~td@i5387093F.versanet.de)
2023-04-23 05:07:20 +0200Inst_Inst
2023-04-23 05:07:32 +0200 <Inst> What's the exact difference between an eDSL/DSL and a framework?
2023-04-23 05:13:34 +0200 <Inst> the stack exchange definition is that eDSL / DSL has the ability to create a custom syntax, whereas a framework is trapped in its parent language's syntax
2023-04-23 05:15:25 +0200nate1(~nate@98.45.169.16)
2023-04-23 05:16:17 +0200dontdieych(~alarm@132.226.169.184)
2023-04-23 05:18:00 +0200 <c_wraith> an eDSL is specifically embedded in the host language. So that might be a distinction from DSL, but not eDSL
2023-04-23 05:19:15 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl)
2023-04-23 05:19:55 +0200jero98772(~jero98772@2800:484:1d84:9000::3) (Remote host closed the connection)
2023-04-23 05:24:39 +0200dontdieych(~alarm@132.226.169.184) (Quit: WeeChat 3.8)
2023-04-23 05:24:56 +0200dontdieych(~alarm@132.226.169.184)
2023-04-23 05:27:45 +0200xff0x(~xff0x@ai098135.d.east.v6connect.net) (Ping timeout: 240 seconds)
2023-04-23 05:27:46 +0200dontdieych(~alarm@132.226.169.184) (Client Quit)
2023-04-23 05:28:04 +0200dontdieych(~alarm@132.226.169.184)
2023-04-23 05:29:35 +0200Guest86(~Guest86@85.249.45.137)
2023-04-23 05:29:40 +0200 <Guest86> @pl bitXor a b = boolXor (toBool a) (toBool b)
2023-04-23 05:29:40 +0200 <lambdabot> bitXor = (. toBool) . boolXor . toBool
2023-04-23 05:29:49 +0200xff0x(~xff0x@178.255.149.135)
2023-04-23 05:30:16 +0200 <Guest86> i dont understand those dots
2023-04-23 05:30:25 +0200 <Guest86> particularly the one in brackets
2023-04-23 05:30:48 +0200 <Guest86> why does it apply function to first arg
2023-04-23 05:31:00 +0200 <Guest86> how does this work
2023-04-23 05:32:57 +0200 <sm> (E)DSLs feel like you are given a language, you are free to (and required to) express many things.
2023-04-23 05:32:57 +0200 <sm> Frameworks provide more structure/guide rails, less freedom and (if they are a good fit) probably less work.
2023-04-23 05:34:11 +0200 <Guest86> i am a noob
2023-04-23 05:34:12 +0200 <Guest86> we didn't even do lambda calculus at school
2023-04-23 05:34:12 +0200 <Guest86> can anybody please explain?
2023-04-23 05:36:45 +0200xff0x(~xff0x@178.255.149.135) (Ping timeout: 240 seconds)
2023-04-23 05:37:59 +0200 <sm> hi Guest86. The dots here mean "function application". The bot has compressed this code to "point free" style, which is very compact but hard for a beginner to read. Sometimes reading the dot as "after" helps.
2023-04-23 05:39:02 +0200xff0x(~xff0x@2405:6580:b080:900:696f:4e84:b735:2ed6)
2023-04-23 05:39:07 +0200 <sm> I don't understand this particular code either, it's not human readable
2023-04-23 05:41:37 +0200use-value(~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Remote host closed the connection)
2023-04-23 05:41:56 +0200use-value(~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf)
2023-04-23 05:43:56 +0200 <Guest86> sm I know what point free means, thank you. I have heard that point free is sometimes considered cleaner and easier to read, so maybe it is. I think dot in brackets is a common trick and if you know it, then pointfree is far more readable
2023-04-23 05:44:07 +0200 <probie> Guest86: ((. toBool) . boolXor . toBool) a b => ((. toBool) . boolXor) (toBool a) b => (. toBool) (boolXor (toBool a)) b => (boolXor (toBool a) . toBool) b => boolXor (toBool a) (toBool b)
2023-04-23 05:45:28 +0200 <sm> yes, sometimes it is
2023-04-23 05:46:03 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2023-04-23 05:46:09 +0200 <probie> `(# x) y` becomes `(y # x)` where `#` is some arbitrary function made up of symbols, or one in alphanumeric characters surrounded by backticks
2023-04-23 05:46:50 +0200 <Guest86> but why?
2023-04-23 05:47:05 +0200 <Guest86> it is just blowing my mind
2023-04-23 05:49:22 +0200 <probie> See https://www.haskell.org/onlinereport/haskell2010/haskellch3.html#x8-300003.5 As a "right section" it's just defined that way
2023-04-23 05:49:46 +0200 <Guest86> sm i found that to make the code cleaner you often need to give lambdabot a function body without the function name
2023-04-23 05:50:32 +0200 <sm> "(call the function expression that follows, on the result of calling toBool on the next (*ie second*) argument) after calling boolXor after calling toBool on the next (*ie first*) argument"
2023-04-23 05:50:57 +0200jero98772(~jero98772@2800:484:1d84:9000::3)
2023-04-23 05:51:15 +0200 <Guest86> does application read parameters right to left?
2023-04-23 05:51:45 +0200 <sm> B . A applies A, then applies B
2023-04-23 05:52:41 +0200 <Guest86> @pl (a `rem` 2) (b `rem` 2) + (xor (a `div` 2) (b `div` 2)) * 2
2023-04-23 05:52:41 +0200 <lambdabot> (a `rem` 2) (b `rem` 2) + xor (a `div` 2) (b `div` 2) * 2
2023-04-23 05:53:13 +0200 <Guest86> @pl bitXor (a `rem` 2) (b `rem` 2) + (xor (a `div` 2) (b `div` 2)) * 2
2023-04-23 05:53:13 +0200 <lambdabot> bitXor (a `rem` 2) (b `rem` 2) + xor (a `div` 2) (b `div` 2) * 2
2023-04-23 05:53:57 +0200 <sm> so does B $ A <arg>.
2023-04-23 05:53:57 +0200 <sm> You can write it in the other direction with &: <arg> & A & B
2023-04-23 05:54:04 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl) (Ping timeout: 276 seconds)
2023-04-23 05:54:15 +0200 <Guest86> yes, thank you @sm
2023-04-23 05:55:40 +0200 <ski> bitXor a b = boolXor (toBool a) (toBool b)
2023-04-23 05:56:14 +0200 <ski> = (boolXor (toBool a)) (toBool b)
2023-04-23 05:56:25 +0200 <ski> = (boolXor (toBool a) . toBool) b
2023-04-23 05:56:39 +0200 <ski> bitXor a = boolXor (toBool a) . toBool
2023-04-23 05:57:05 +0200 <ski> = (. toBool) (boolXor (toBool a))
2023-04-23 05:57:20 +0200 <ski> = ((. toBool) . boolXor . toBool) a
2023-04-23 05:57:36 +0200 <ski> bitXor = (. toBool) . boolXor . toBool
2023-04-23 05:58:17 +0200 <ski> that's how you derive this pointless definition of `bitXor'
2023-04-23 05:59:23 +0200 <ski> this uses the definition of `(.)', that `f (g x)' is equal to `(f . g) x', and also uses "function extensionality", that if `f x = g x' (for all `x'), then `f = g'
2023-04-23 06:01:14 +0200 <ski> also uses that `x # y' means the same as `(# y) x' (as well as `(x #) y', and `(#) x y'), for any infix operator `#' (`.' in the above example with `bitXor'). and that `f x y' means `(f x) y' (function application syntax in Haskell is "left associative")
2023-04-23 06:01:34 +0200 <ski> Guest86 ^
2023-04-23 06:02:17 +0200 <ski> for your second example, i think you need to say somethine like fooBar a b = (a `rem` 2) (b `rem` 2) + (xor (a `div` 2) (b `div` 2)) * 2
2023-04-23 06:02:37 +0200 <ski> (but i think lambdabot's pointless answer is probably going to be rather unreadable)
2023-04-23 06:03:17 +0200 <sm> another english translation: The three functions separated by . are called on after the other, right to left. But the first one, by being a section with the operator . on the left, gets itself called by, instead of calling, the rest.
2023-04-23 06:09:36 +0200tosyl(~user@103.206.114.87) (Ping timeout: 248 seconds)
2023-04-23 06:12:02 +0200tosyl(~user@103.206.114.124)
2023-04-23 06:14:14 +0200msavoritias(cb716af6b3@irc.cheogram.com) (Ping timeout: 252 seconds)
2023-04-23 06:17:00 +0200slack1256(~slack1256@186.11.108.135)
2023-04-23 06:17:27 +0200 <Guest86> @pl (head $ tail list) `xor` (head list) : (xorEncodeWorker $ tail list)
2023-04-23 06:17:27 +0200 <lambdabot> head (tail list) `xor` head list : xorEncodeWorker (tail list)
2023-04-23 06:18:15 +0200 <Guest86> xorEncodeWorker list = head (tail list) `xor` head list : xorEncodeWorker (tail list)
2023-04-23 06:18:21 +0200 <Guest86> @pl xorEncodeWorker list = head (tail list) `xor` head list : xorEncodeWorker (tail list)
2023-04-23 06:18:21 +0200 <lambdabot> xorEncodeWorker = fix (ap ((:) . ap (xor . head . tail) head) . (. tail))
2023-04-23 06:18:25 +0200nate1(~nate@98.45.169.16) (Ping timeout: 240 seconds)
2023-04-23 06:18:48 +0200 <Guest86> does function `fis` exist or i need to define it myself?
2023-04-23 06:18:53 +0200alexherbo2(~alexherbo@2a02-842a-8180-4601-21ff-3860-e26e-dd6f.rev.sfr.net) (Ping timeout: 260 seconds)
2023-04-23 06:18:54 +0200 <Guest86> does function `fix` exist or i need to define it myself?
2023-04-23 06:20:49 +0200jero98772(~jero98772@2800:484:1d84:9000::3) (Remote host closed the connection)
2023-04-23 06:21:04 +0200 <slack1256> It is on Data.Function .
2023-04-23 06:21:22 +0200 <slack1256> Guest86: ^
2023-04-23 06:23:57 +0200 <ski> @index fix
2023-04-23 06:23:57 +0200 <lambdabot> Data.Function, Control.Monad.Fix
2023-04-23 06:26:49 +0200 <Guest86> guys
2023-04-23 06:26:49 +0200 <Guest86> this definition gives me an infinite type error
2023-04-23 06:26:50 +0200 <Guest86> `xorDecodeWorker res [] = res`
2023-04-23 06:26:50 +0200 <Guest86> how can i return a parameter then?
2023-04-23 06:30:42 +0200 <ski> @let xorDecodeWorker res [] = res
2023-04-23 06:30:44 +0200 <lambdabot> Defined.
2023-04-23 06:30:50 +0200 <ski> not type error here
2023-04-23 06:31:14 +0200 <ski> > xorDecodeWorker [2,3,5,7] []
2023-04-23 06:31:16 +0200 <lambdabot> [2,3,5,7]
2023-04-23 06:31:39 +0200 <ski> > xorDecodeWorker [1,3,4,7] [0,1,1,2]
2023-04-23 06:31:41 +0200 <lambdabot> *Exception: /tmp/mueval8-0.hs:177:1-28: Non-exhaustive patterns in function ...
2023-04-23 06:31:59 +0200 <ski> .. but it doesn't handle the case when the second list is non-empty
2023-04-23 06:32:21 +0200 <Guest86> i have another line of this function but compiler gave me the error there
2023-04-23 06:32:30 +0200 <Guest86> *on the line that i sent you
2023-04-23 06:32:37 +0200 <Guest86> not on another one
2023-04-23 06:32:38 +0200 <ski> Guest86 : i suspect there's some other defining equations for `xorDecodeWorker' that you didn't show us
2023-04-23 06:32:43 +0200 <ski> no
2023-04-23 06:32:59 +0200 <Guest86> yes there are
2023-04-23 06:33:07 +0200 <ski> the implementation may have *discovered* the error on that defining equation. but that doesn't mean that the error is *located* there
2023-04-23 06:33:21 +0200 <Guest86> `xorDecodeWorker res list = xorDecodeWorker (res : [(last res) `xor` (head list)]) (tail list)`
2023-04-23 06:33:35 +0200 <ski> in fact, most likely, the error is located *nowhere*, but arises as an *inconsistency* between two (or more) locations in your source
2023-04-23 06:33:59 +0200 <Guest86> @let xorDecodeWorker res list = xorDecodeWorker (res : [(last res) `xor` (head list)]) (tail list)
2023-04-23 06:34:00 +0200 <ski> perhaps you means `++' rather than `:' ?
2023-04-23 06:34:00 +0200 <lambdabot> /sandbox/tmp/.L.hs:179:29: error:
2023-04-23 06:34:01 +0200 <lambdabot> • Occurs check: cannot construct the infinite type: a ~ [a]
2023-04-23 06:34:01 +0200 <lambdabot> • In the expression: (last res) `xor` (head list)
2023-04-23 06:34:23 +0200 <Guest86> oh lol
2023-04-23 06:34:29 +0200 <Guest86> ski yes i do :)
2023-04-23 06:34:32 +0200 <Guest86> thank you!
2023-04-23 06:34:35 +0200phma(phma@2001:5b0:211f:5218:9152:3e57:9d1f:30e6) (Read error: Connection reset by peer)
2023-04-23 06:34:36 +0200 <ski> nw :)
2023-04-23 06:35:01 +0200 <ski> also .. repeatedly adding stuff to the end of a list is (needlessly) inefficient
2023-04-23 06:35:53 +0200 <ski> in your case, it may be better to *not* use an accumulator
2023-04-23 06:35:54 +0200 <Guest86> how else do i loop through a list?
2023-04-23 06:36:11 +0200 <ski> alternatively .. add stuff to the front of the list, and reverse the list, *once*, in the end
2023-04-23 06:36:16 +0200 <ski> that'd be moer efficient
2023-04-23 06:36:49 +0200 <Guest86> how will it be more efficient
2023-04-23 06:36:54 +0200 <Guest86> i dont understand it
2023-04-23 06:38:03 +0200 <ski> if you do `((as ++ bs) ++ cs) ++ ds', then this has to first traverse `as' to compute `as ++ bs'. this traversal basically copies `as', putting `bs' at the end. then, it needs to traverse `as ++ bs', which, effectively, traverses `as' again, and also `bs'. then (effectively) `as' is traversed a third time, and `bs' a second time (and `cs' the first time)
2023-04-23 06:38:45 +0200 <ski> while if you do `as ++ (bs ++ (cs ++ ds))', then the lists `as',`bs',`cs' will only be traversed once. linear time, instead of the former, which is quadratic
2023-04-23 06:39:09 +0200 <ski> the former is "left-associated use of `++'", while the latter is "right-associated use of `++'"
2023-04-23 06:40:12 +0200 <ski> when you replace the accumulator `res' with `res ++ stuff' as the new accumulator, then that gives rise to shapes like `((as ++ bs) ++ cs) ++ ds'. if you instead did `stuff ++ res', then it would become like `as ++ (bs ++ (cs ++ ds))' instead
2023-04-23 06:40:22 +0200rf(~rf@2605:59c8:1604:2210:5f25:9811:549b:cf83) (Remote host closed the connection)
2023-04-23 06:40:40 +0200 <Guest86> is using a colon (:) to add elements to the front of a lits efficient?
2023-04-23 06:40:43 +0200 <ski> but since you get the list in the opposite order, you need to `reverse' it (once) at the end
2023-04-23 06:40:46 +0200 <ski> yes
2023-04-23 06:40:57 +0200 <ski> `[x] ++ xs' is the same as `x : xs'
2023-04-23 06:41:22 +0200 <Guest86> thank you!
2023-04-23 06:41:29 +0200 <Guest86> @pl xorDecodeWorker ((head res) `xor` (head list) : res) (tail list)
2023-04-23 06:41:29 +0200 <lambdabot> xorDecodeWorker (head res `xor` head list : res) (tail list)
2023-04-23 06:41:59 +0200 <ski> don't forget to add the `reverse' (in the base case, or in the caller (the wrapper) of the worker)
2023-04-23 06:42:34 +0200 <Guest86> thank you so much!!!
2023-04-23 06:42:36 +0200 <ski> .. but also note that in this case, i think not accumulating at all would be nicer (and just as efficient, if not more, in some use cases)
2023-04-23 06:43:38 +0200 <Guest86> i am rewriting the python algorithm to haskell and the algorithm encodes & decodes with accumulation
2023-04-23 06:44:06 +0200 <ski> yea .. but it's good to learn how to spot when to not accumulate, and how to do that, as well
2023-04-23 06:44:27 +0200 <Guest86> and i dont know how to do that
2023-04-23 06:44:44 +0200 <Guest86> can you please tech me?
2023-04-23 06:44:53 +0200 <Guest86> s/tech/teach/
2023-04-23 06:45:18 +0200 <ski> well, let's take a different example
2023-04-23 06:46:11 +0200 <ski> let's say we want `runningSum [2,3,5,7] = [2,2 + 3,2 + 3 + 5,2 + 3 + 5 + 7] = [2,5,10,17]'
2023-04-23 06:47:20 +0200 <ski> oh, i guess i should call this `runningSums', since it computes a list of all running sums
2023-04-23 06:47:40 +0200 <ski> if you're thinking iteratively, you might think you need to keep track of two things (apart from the current list you're looking at), namely (a) the current running sum; and (b) the list of the previous running sums
2023-04-23 06:47:47 +0200 <ski> Guest86 : does this sound reasonable to you ?
2023-04-23 06:47:56 +0200 <Guest86> yes
2023-04-23 06:48:05 +0200 <ski> so, we might start with something like
2023-04-23 06:48:35 +0200 <ski> runningSums = runningSumsAcc 0 []
2023-04-23 06:48:37 +0200 <ski> where
2023-04-23 06:48:54 +0200 <ski> runningSumsAcc accSum accSums list = ...
2023-04-23 06:49:01 +0200 <ski> makes sense ?
2023-04-23 06:49:40 +0200 <ski> (we could say `runningSums list = runningSumsAcc 0 [] list' as the first defining equation, if we wanted to. but the above is shorter, and avoids naming that list)
2023-04-23 06:51:11 +0200 <Guest86> or
2023-04-23 06:51:11 +0200 <Guest86> runningSums numlist result counter = runningSums numlist (sum (numlist!!0..counter) : result) (counter+1)
2023-04-23 06:51:36 +0200 <ski> yea .. but using `!!' on lists is inefficientn
2023-04-23 06:51:41 +0200 <Guest86> @let runningSums numlist result counter = runningSums numlist (sum (numlist!!0..counter) : result) (counter+1)
2023-04-23 06:51:41 +0200 <lambdabot> Parse failed: Parse error: ..
2023-04-23 06:51:47 +0200 <Guest86> what
2023-04-23 06:51:56 +0200 <ski> > [0 .. 7]
2023-04-23 06:51:57 +0200 <lambdabot> [0,1,2,3,4,5,6,7]
2023-04-23 06:52:11 +0200 <Guest86> so haskell does not have slices?
2023-04-23 06:52:36 +0200 <Guest86> then i will go with your example
2023-04-23 06:52:42 +0200phma(phma@2001:5b0:2143:c788:d2b8:a200:d590:bdcb)
2023-04-23 06:52:47 +0200 <ski> > [[2,3,5,7,11,13,17,19] !! i | i <- [3 .. 5]]
2023-04-23 06:52:49 +0200 <lambdabot> [7,11,13]
2023-04-23 06:53:40 +0200 <ski> > (take (5-3+1) . drop 3) [2,3,5,7,11,13,17,19]
2023-04-23 06:53:42 +0200 <lambdabot> [7,11,13]
2023-04-23 06:54:13 +0200 <ski> .. anyway
2023-04-23 06:54:40 +0200 <ski> we need one case for the empty list, and one for non-empty lists
2023-04-23 06:55:15 +0200 <ski> since we intend to add stuff to the front of the `accSums' list (since that's more efficient), it'll end up in the wrong order, and so we need to `reverse' it in the end (base case)
2023-04-23 06:55:19 +0200 <ski> that gives us
2023-04-23 06:55:40 +0200 <ski> runningSumsAcc accSum accSums [ ] = reverse accSums
2023-04-23 06:56:30 +0200 <ski> in the non-empty case, we have some list `x:xs', so we need to add `x' to the accumulating (/running) sum, `accSum', and also add the (new) sum in front of `accSums'
2023-04-23 06:57:03 +0200 <ski> runningSumsAcc accSum accSums (x:xs) = runningSumsAcc accSum' (accSum' : accSums) xs
2023-04-23 06:57:07 +0200 <ski> where
2023-04-23 06:57:13 +0200 <ski> accSums' = accSum + x
2023-04-23 06:57:20 +0200 <ski> Guest86 : makes sense ?
2023-04-23 06:57:23 +0200 <Inst> c_wraith: it turns out that in mainstream programming, framework mania was a thing
2023-04-23 06:57:36 +0200 <Guest86> ski yes it does
2023-04-23 06:57:46 +0200 <Inst> then you add it to, was it Gabriella Gonzalez or perhaps Alexis King who proposed it, that the future of programming is a bunch of eDSLs
2023-04-23 06:58:06 +0200 <Inst> and Gabriella Gonzalez brought up that Haskell (along with the rest of the FP languages is excellent for implementing eDSLs)
2023-04-23 06:58:14 +0200 <ski> Inst : iiuc, "frameworks" often involve you plugging your code "into" some loop or other that the framework provides, so the framework runs outside your code (rather than the other way around)
2023-04-23 06:58:32 +0200 <Inst> ski: it's the solution to my peeve of Haskell's IO code being a bit too verbose for my tastes
2023-04-23 06:58:40 +0200 <Inst> just get a framework, what's the problem
2023-04-23 06:58:48 +0200skidoesn't really follow
2023-04-23 06:59:10 +0200 <Inst> i mean that complaining about having too much IO code, or having difficulties managing separation of pure vs impure code
2023-04-23 06:59:15 +0200 <ski> Guest86 : ok. now consider if we try to make a "direct recursive solution", instead, practicing "recursive thinking", rather than "iterative thinking"
2023-04-23 06:59:18 +0200 <Inst> the solution for that is just to get a framework
2023-04-23 06:59:31 +0200 <ski> mhm
2023-04-23 06:59:35 +0200 <Guest86> yes
2023-04-23 06:59:38 +0200 <Guest86> but how
2023-04-23 06:59:47 +0200 <ski> Guest86 : so, we go back to `runninSums list'
2023-04-23 07:00:24 +0200 <ski> we have two cases, as usual (not always the right thing to do, when doing recursion on lists, but most commonly is), empty vs. non-empty
2023-04-23 07:00:31 +0200 <Inst> leaving, but leaving this here, which is relevant to my interests, but perhaps not yours: https://www.youtube.com/watch?v=O-z8hDXIQSg . Interestingly enough, they actually attempted Rust, starting with a Python project, couldn't grok it, then ran to Haskell instead and their project worked.
2023-04-23 07:00:31 +0200 <ski> so, we have a code template looking like
2023-04-23 07:00:42 +0200 <ski> runningSums [ ] = ...
2023-04-23 07:00:53 +0200 <ski> runningSums (x:xs) = ..x..xs..
2023-04-23 07:01:32 +0200 <ski> (where the dots indicate code we have't written yet, that's yet to be filled in. the variable names in there indicate (suggest) that we may use those variables to fill in those "holes")
2023-04-23 07:02:36 +0200jmilan(~jmilan@195.242.182.249)
2023-04-23 07:03:52 +0200 <ski> Guest86 : now, the main thing, with recursive solutions, is "wishful thinking". we imagine that the function will work correctly, for *smaller* inputs (in out case, that means shorter lists). so we need to (a) divide the problem to solve up into smaller subproblem(s) (of the same kind); (b) trust that those subproblems will yield the correct answers; (c) put together those answers with our inputs (and
2023-04-23 07:03:58 +0200 <ski> previous local variables, if any), to compute the desired answer to the *current* problem
2023-04-23 07:04:04 +0200 <ski> it's good here to consider a particular case/example
2023-04-23 07:04:17 +0200 <ski> runningSums [2,3,5,7]
2023-04-23 07:04:21 +0200 <ski> this is the same as
2023-04-23 07:04:26 +0200 <ski> runningSums (2:[3,5,7])
2023-04-23 07:04:46 +0200 <ski> so `x' will become `2', and `xs' will become `[3,5,7]', in our template code above
2023-04-23 07:04:52 +0200 <ski> Guest86 : making sense, so far ?
2023-04-23 07:06:03 +0200 <Guest86> ye
2023-04-23 07:06:06 +0200 <ski> ok
2023-04-23 07:06:06 +0200 <Guest86> s
2023-04-23 07:06:18 +0200slack1256(~slack1256@186.11.108.135) (Remote host closed the connection)
2023-04-23 07:06:35 +0200 <ski> so, `xs' here (`[3,5,7]') is a "smaller" input than our "current" input, `[2,3,5,7]'
2023-04-23 07:07:00 +0200 <ski> so, `runningSums [3,5,7]' would therefore be a *subproblem* of the current problem (example) `runningSums [2,3,5,7]'
2023-04-23 07:07:18 +0200jmilan(~jmilan@195.242.182.249) (Ping timeout: 260 seconds)
2023-04-23 07:07:30 +0200 <ski> so, it's therefore relevant to ask if we could use the result from that subproblem, to get the desired result of the current problem
2023-04-23 07:07:37 +0200 <ski> well, we know that we *want* to get results
2023-04-23 07:07:38 +0200 <Guest86> so like this?
2023-04-23 07:07:39 +0200 <Guest86> runningSums' (x:[]) res = ((head res) + (x)):res
2023-04-23 07:07:40 +0200 <Guest86> runningSums' (x:xs) res = runningSums' xs (((head res) + x):res)
2023-04-23 07:07:50 +0200 <ski> runningSum [2,3,5,7] = [2,5,10,17]
2023-04-23 07:07:52 +0200 <ski> as well as
2023-04-23 07:08:11 +0200 <ski> runningSum [3,5,7] = [3,8,15]
2023-04-23 07:09:08 +0200 <ski> hm, looks like you're still thinking in terms of an extra accumulator argument
2023-04-23 07:09:18 +0200 <Guest86> excuse me but can we use pattern matching to get init and last of the list?
2023-04-23 07:09:24 +0200 <ski> while i'm talking about making ado, *without* any extra argument
2023-04-23 07:09:31 +0200 <ski> not really
2023-04-23 07:09:41 +0200 <ski> @src init
2023-04-23 07:09:41 +0200 <lambdabot> init [x] = []
2023-04-23 07:09:41 +0200 <lambdabot> init (x:xs) = x : init xs
2023-04-23 07:09:41 +0200 <lambdabot> init [] = error "Prelude.init: empty list"
2023-04-23 07:09:45 +0200 <ski> @src last
2023-04-23 07:09:45 +0200 <lambdabot> last [x] = x
2023-04-23 07:09:45 +0200 <lambdabot> last (_:xs) = last xs
2023-04-23 07:09:45 +0200 <lambdabot> last [] = error "Prelude.last: empty list"
2023-04-23 07:10:02 +0200 <ski> these are defined by pattern-matching, and (necessarily) must traverse the whole list
2023-04-23 07:10:24 +0200 <ski> you can access the head directly, and also the tail
2023-04-23 07:10:42 +0200 <ski> because lists are single linked lists, linked from the start towards the end
2023-04-23 07:11:43 +0200 <ski> something like your runningSums' probably would work, btw .. but it's still using accumulators, which isn't was i was attempting to go for, here
2023-04-23 07:12:03 +0200 <ski> Guest86 : should i continue ?
2023-04-23 07:12:42 +0200 <ski> (oh, and `x:[]' can of course be written more shortly as `[x]', as those `init' and `last' definitions do it)
2023-04-23 07:13:35 +0200 <ski> (your runningSums' also has code duplication, repeated code .. generally, it's a nice idea to try to avoid that ("DRY","Don't Repeat Yourself"))
2023-04-23 07:15:17 +0200 <ski> (`init' and `last' are also examples of not using the pattern of empty-vs-nonempty when traversing lists, but rather, in this case, singleton-vs-longer (empty case can be checked once, at the start))
2023-04-23 07:17:08 +0200trev(~trev@user/trev)
2023-04-23 07:17:35 +0200 <ski> (another somewhat common case is to look at two adjacent elements of the input list at the same time, like `foo (x0:x1:xs) = ..x0..x1..(foo (x1:xs))..', which can also be written `foo (x0:xs@(x1:_)) = ..x0..x1..(foo xs)..' .. `l@(h:t)' is a pattern that names the list `l', while simultaneously naming the head and tail `h' and `t')
2023-04-23 07:17:40 +0200skilooks at Guest86
2023-04-23 07:18:39 +0200skigoes for a cuppa tea
2023-04-23 07:24:45 +0200JSkilton(~JSkilton@149.19.169.187)
2023-04-23 07:32:53 +0200t0ngub1n(~t0ngub1n@85.249.45.137)
2023-04-23 07:36:27 +0200msavoritias(cb716af6b3@irc.cheogram.com)
2023-04-23 07:39:03 +0200 <t0ngub1n> hey @ski! it's me, guest86 under another account
2023-04-23 07:39:19 +0200 <t0ngub1n> sorry for being away for that lng
2023-04-23 07:39:24 +0200 <JSkilton> Hey jigaboo lover t0ngub1n
2023-04-23 07:39:37 +0200 <JSkilton> Mrs. Skilton gets her holes filled and satisified by Rush's Geddy Lee. Later, Geddy meets Jean Pierre Manikariza, her husband, and gets filled by his big black cock! Read all about it! https://pastebin.com/1ExdrDQA
2023-04-23 07:40:06 +0200 <t0ngub1n> what the
2023-04-23 07:40:26 +0200ChanServ+o geekosaur
2023-04-23 07:40:33 +0200 <t0ngub1n> first of all, they are not jigaboos
2023-04-23 07:40:34 +0200geekosaur+b *!*@149.19.169.187
2023-04-23 07:40:34 +0200JSkiltongeekosaur (JSkilton)
2023-04-23 07:46:55 +0200Feuermagier(~Feuermagi@user/feuermagier)
2023-04-23 07:49:07 +0200gnulinuxuser(~gnulinuxu@user/gnulinuxuser)
2023-04-23 07:50:07 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl)
2023-04-23 07:51:46 +0200rodox64(~rodox64@187.252.200.83)
2023-04-23 07:52:16 +0200geekosaur-o geekosaur
2023-04-23 07:52:30 +0200 <ski> (K-lined)
2023-04-23 07:52:49 +0200 <geekosaur> I just bet
2023-04-23 07:52:51 +0200 <ski> t0ngub1n : okay
2023-04-23 07:53:02 +0200 <geekosaur> I presume the pastebin link is a chrome 0day exploit
2023-04-23 07:53:23 +0200 <geekosaur> since we've had 2 in as many weeks
2023-04-23 07:54:03 +0200skiwas looking into it, in another channel, but the K-line preempted
2023-04-23 07:54:11 +0200 <Sauvin> yeah, we've had a few in a few different channels.
2023-04-23 07:54:25 +0200rodox64(~rodox64@187.252.200.83) ()
2023-04-23 07:55:01 +0200 <ski> t0ngub1n : do tell, if you'd like me to continue
2023-04-23 07:55:48 +0200 <t0ngub1n> yes i would
2023-04-23 07:55:50 +0200 <t0ngub1n> thank you
2023-04-23 07:56:08 +0200 <ski> well, okay
2023-04-23 07:56:25 +0200 <ski> so we were looking at
2023-04-23 07:56:31 +0200 <ski> runningSums [ ] = ...
2023-04-23 07:56:34 +0200 <ski> runningSums (x:xs) = ..x..xs..
2023-04-23 07:56:56 +0200 <ski> and obviously the running sums of the empty list is the empty list, so the base case is just
2023-04-23 07:56:59 +0200 <ski> runningSums [ ] = []
2023-04-23 07:57:20 +0200 <t0ngub1n> yes
2023-04-23 07:57:26 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2023-04-23 07:57:30 +0200 <ski> and, considering the example `runningSums [2,3,5,7]', the second defining equation would give us
2023-04-23 07:57:33 +0200 <ski> x = 2
2023-04-23 07:57:38 +0200 <ski> xs = [3,5,7]
2023-04-23 07:58:30 +0200 <ski> so that `runningSums [3,5,7]' (or `runningSums xs', in terms of the code of the second defining equation) would seem like a reasonable subproblem to investigate whether it might help to achieve the solution for our current problem
2023-04-23 07:58:46 +0200 <t0ngub1n> and if we run runningSums xs we get xs = 5,7
2023-04-23 07:58:49 +0200 <ski> the answer's we're looking to get for these two problems being
2023-04-23 07:59:09 +0200 <ski> runningSums [2,3,5,7] = [2,5,10,17]
2023-04-23 07:59:24 +0200 <ski> runningSums [3,5,7] = [3, 8,15]
2023-04-23 07:59:49 +0200 <t0ngub1n> and we can create the third case
2023-04-23 07:59:54 +0200 <ski> t0ngub1n : yes .. but, it's generally not that helpful to try to "trace out" the recursion further "steps down"
2023-04-23 08:00:06 +0200 <t0ngub1n> runningSums (x:y:[])
2023-04-23 08:00:44 +0200 <ski> instead, we should just trust that if we take `runningSumS xs' as a recursive call (with `xs = [3,5,7]' in our example), that that will do its thing, however it wants to, computing the correct desired answer, which would be `[3,8,15]'
2023-04-23 08:01:05 +0200 <ski> there's no need for a third defining equation, here
2023-04-23 08:02:10 +0200 <ski> so, atm, we're looking how to bridge the gap from the answer to the subproblem, being `[3,8,15]', to the desired answer to the current problem, being `[2,5,10,17]', possibly also using `x = 2' and `xs = [3,5,7]' in that bridging
2023-04-23 08:02:19 +0200 <ski> t0ngub1n : is the question clear ?
2023-04-23 08:02:31 +0200 <t0ngub1n> yes
2023-04-23 08:02:33 +0200 <ski> ok
2023-04-23 08:02:38 +0200 <t0ngub1n> working on it rn
2023-04-23 08:02:40 +0200 <ski> well, we might notice that
2023-04-23 08:03:49 +0200 <ski> [5,10,17] = [2 + 3,2 + 8,2 + 15]
2023-04-23 08:04:04 +0200 <ski> which is pretty close to `[3,8,15]'
2023-04-23 08:04:54 +0200 <ski> and if we add `x = 2' on front of that (former) list, we'll get the desired answer `[2,5,10,17]'
2023-04-23 08:08:16 +0200euandreh(~Thunderbi@189.6.18.7) (Ping timeout: 265 seconds)
2023-04-23 08:08:30 +0200skilooks at t0ngub1n
2023-04-23 08:08:57 +0200 <t0ngub1n> i dont get how we get [5,10,17]
2023-04-23 08:09:02 +0200 <t0ngub1n> trying to figure it out
2023-04-23 08:10:00 +0200 <ski> you try to connect `runningSums [2,3,5,7]' (current problem (example)) to `runningSums [3,5,7]' (subproblem)
2023-04-23 08:11:13 +0200 <ski> the latter is `[3,8,15]', and the former is `[2,5,10,17]', which happens to be `[2,2 + 3,2 + 8,2 + 15]', or `2 : [2 + 3,2 + 8,2 + 15]' .. you could further massage that one, to make it contain `[3,8,15]' exactly as a part
2023-04-23 08:11:30 +0200jmilan(~jmilan@195.242.182.249)
2023-04-23 08:11:42 +0200 <ski> (.. you could use a list comprehension, or you could use a call to the `Prelude' function `map')
2023-04-23 08:12:31 +0200ryantrinkle(~ryantrink@140.174.253.180) (Ping timeout: 276 seconds)
2023-04-23 08:12:38 +0200use-value(~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Remote host closed the connection)
2023-04-23 08:13:19 +0200use-value(~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf)
2023-04-23 08:13:37 +0200 <t0ngub1n> does `map` return a list or a map?
2023-04-23 08:13:42 +0200 <ski> a list
2023-04-23 08:13:52 +0200 <ski> > map (^ 2) [2,3,5,7]
2023-04-23 08:13:53 +0200 <lambdabot> [4,9,25,49]
2023-04-23 08:14:02 +0200 <t0ngub1n> ty
2023-04-23 08:15:12 +0200 <ski> (i guess it's called `map', since it "maps" the input function over each of the elements of the given list, collecting the results into a result list)
2023-04-23 08:15:58 +0200 <t0ngub1n> the python3 map returns a special map type
2023-04-23 08:16:03 +0200 <t0ngub1n> that is why i was confused
2023-04-23 08:16:08 +0200 <t0ngub1n> python2 does not
2023-04-23 08:16:58 +0200 <ski> .. i could go on, trying to explain how one can think, to finish the second (recursive) defining equation of `runningSums' here. but it seemed like you were maybe thinking on your own a little about how to do that, and i wouldn't like to spoil that for you, if you'd like to try for a bit
2023-04-23 08:17:14 +0200 <ski> .. but if you want, i could go on with my explanation
2023-04-23 08:17:54 +0200 <ski> (there's also a `Map' type in Haskell .. but you need to import the `Data.Map' module for that .. and there's no reason to do so, for this example problem)
2023-04-23 08:19:01 +0200 <t0ngub1n> runningSums [] = []
2023-04-23 08:19:01 +0200 <t0ngub1n> runningSums (x:y:[]) = [x, x + y]
2023-04-23 08:19:01 +0200 <t0ngub1n> runningSums (x:xs) = x : (map (+x) $ runningSums xs)
2023-04-23 08:19:24 +0200 <t0ngub1n> it works
2023-04-23 08:19:47 +0200 <ski> yea, that looks okay
2023-04-23 08:19:55 +0200 <mauke> do you need the second line?
2023-04-23 08:19:56 +0200 <t0ngub1n> or maybe that
2023-04-23 08:19:56 +0200 <t0ngub1n> runningSums [] = []
2023-04-23 08:19:56 +0200 <t0ngub1n> runningSums (x:[]) = [x]
2023-04-23 08:19:56 +0200 <t0ngub1n> runningSums (x:xs) = x : (map (+x) $ runningSums xs)
2023-04-23 08:20:25 +0200 <ski> the `$' is unnecessary, if you wrap the recursive call in brackets .. and then the brackets around the `$' application is unnecessary
2023-04-23 08:20:50 +0200 <mauke> consider what the third line does if xs = []
2023-04-23 08:21:07 +0200 <t0ngub1n> it goes to a second line
2023-04-23 08:21:20 +0200 <t0ngub1n> where xs is []
2023-04-23 08:21:36 +0200 <mauke> my point is that the second line isn't needed
2023-04-23 08:21:55 +0200 <ski> the middle defining equation follows from the other two, yes
2023-04-23 08:22:23 +0200 <ski> runningSums [ ] = []
2023-04-23 08:22:25 +0200 <t0ngub1n> oh, yes it is not needed
2023-04-23 08:22:26 +0200 <ski> runningSums (x:xs) = x : map (+x) (runningSums xs)
2023-04-23 08:22:45 +0200 <t0ngub1n> and if i remove the brackets around $ call then i get a type error
2023-04-23 08:23:31 +0200 <mauke> did you also remove the $ ?
2023-04-23 08:23:34 +0200 <ski> you should always be on the look-out for simplifying definitions like this. often this can require you to consider cases that would otherwise feel "useless" .. but they're not useless, since they can help with reducing repetition in code, while also making it more general, and more simple to understand
2023-04-23 08:23:54 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds)
2023-04-23 08:23:57 +0200 <ski> t0ngub1n : "if you wrap the recursive call in brackets"
2023-04-23 08:24:34 +0200 <t0ngub1n> still type error
2023-04-23 08:24:43 +0200 <ski> show code ?
2023-04-23 08:24:53 +0200 <mauke> what ski meant: if you wrap the recursive call in brackets, as in (runningSums xs), or x : (map (+x) $ (runningSums xs)) as a whole, then the $ is unnecessary
2023-04-23 08:25:04 +0200 <t0ngub1n> ill show error
2023-04-23 08:25:08 +0200 <mauke> i.e. you could write x : (map (+x) (runningSums xs)) instead
2023-04-23 08:25:28 +0200 <mauke> and then the outer brackets are unnecessary, as in x : map (+x) (runningSums xs)
2023-04-23 08:25:42 +0200 <t0ngub1n> main.hs:23:22: error:
2023-04-23 08:25:42 +0200 <t0ngub1n> • Couldn't match expected type ‘[Int] -> [Int]’
2023-04-23 08:25:42 +0200 <t0ngub1n> with actual type ‘[Int]’
2023-04-23 08:25:42 +0200 <t0ngub1n> • The first argument of ($) takes one argument,
2023-04-23 08:25:42 +0200 <t0ngub1n> but its type ‘[Int]’ has none
2023-04-23 08:25:43 +0200 <t0ngub1n> In the expression: x : map (+ x) $ runningSums xs
2023-04-23 08:25:45 +0200 <t0ngub1n> In an equation for ‘runningSums’:
2023-04-23 08:25:47 +0200 <t0ngub1n> runningSums (x : xs) = x : map (+ x) (runningSums xs)
2023-04-23 08:25:49 +0200 <t0ngub1n> |
2023-04-23 08:25:51 +0200 <t0ngub1n> 23 | runningSums (x:xs) = x : map (+x) (runningSums xs)
2023-04-23 08:25:59 +0200 <t0ngub1n> lol complier glitch out
2023-04-23 08:26:03 +0200 <t0ngub1n> no $ in there
2023-04-23 08:26:04 +0200 <ski> t0ngub1n : "<mauke> did you also remove the $ ?"
2023-04-23 08:26:12 +0200 <t0ngub1n> yes
2023-04-23 08:26:18 +0200 <mauke> that error message is inconsistent
2023-04-23 08:26:22 +0200 <t0ngub1n> yes it is
2023-04-23 08:26:30 +0200 <mauke> <t0ngub1n> In the expression: x : map (+ x) $ runningSums xs
2023-04-23 08:26:35 +0200 <mauke> here with $
2023-04-23 08:26:44 +0200 <mauke> <t0ngub1n> runningSums (x : xs) = x : map (+ x) (runningSums xs)
2023-04-23 08:26:46 +0200 <mauke> here without $
2023-04-23 08:30:00 +0200ryantrinkle(~ryantrink@140.174.255.47)
2023-04-23 08:30:30 +0200skistill wonders how t0ngub1n's code looks like
2023-04-23 08:39:02 +0200 <t0ngub1n> runningSums :: [Int] -> [Int]
2023-04-23 08:39:02 +0200 <t0ngub1n> runningSums [] = []
2023-04-23 08:39:03 +0200 <t0ngub1n> runningSums (x:xs) = x : map (+ x) (runningSums xs)
2023-04-23 08:41:05 +0200Guest86(~Guest86@85.249.45.137) (Quit: Client closed)
2023-04-23 08:41:32 +0200 <t0ngub1n> @pl runningSums (x:xs) = x : map (+ x) (runningSums xs)
2023-04-23 08:41:33 +0200 <lambdabot> runningSums = fix ((`ap` tail) . (. head) . liftM2 (.) (:) . flip ((.) . map . (+)))
2023-04-23 08:42:01 +0200 <t0ngub1n> @unpl runningSums = fix ((`ap` tail) . (. head) . liftM2 (.) (:) . flip ((.) . map . (+)))
2023-04-23 08:42:01 +0200 <lambdabot> runningSums = fix (\ x b0 -> (tail >>= \ x2 -> return ((\ a0 -> return (\ x3 -> ((:)) a0 (map ((+) a0) (x x3))) a0) (head b0) x2)) b0)
2023-04-23 08:42:19 +0200 <t0ngub1n> @unpl runningSums (x:xs) = x : map (+ x) (runningSums xs)
2023-04-23 08:42:19 +0200 <lambdabot> runningSums (x : xs) = x : map (\ a0 -> a0 + x) (runningSums xs)
2023-04-23 08:42:44 +0200 <t0ngub1n> @help
2023-04-23 08:42:44 +0200 <lambdabot> help <command>. Ask for help for <command>. Try 'list' for all commands
2023-04-23 08:42:48 +0200 <t0ngub1n> @list
2023-04-23 08:42:48 +0200 <lambdabot> What module? Try @listmodules for some ideas.
2023-04-23 08:42:57 +0200 <t0ngub1n> @listmodules
2023-04-23 08:42:57 +0200 <lambdabot> activity base bf check compose dice dict djinn dummy elite eval filter free fresh haddock help hoogle instances irc karma localtime metar more oeis offlineRC pl pointful poll pretty quote search
2023-04-23 08:42:57 +0200 <lambdabot> seen slap source spell system tell ticker todo topic type undo unlambda unmtl version where
2023-04-23 08:43:16 +0200 <t0ngub1n> @list pl
2023-04-23 08:43:16 +0200 <lambdabot> pl provides: pointless pl pl-resume
2023-04-23 08:43:26 +0200 <t0ngub1n> @hellp @pointless
2023-04-23 08:43:26 +0200 <lambdabot> help <command>. Ask for help for <command>. Try 'list' for all commands
2023-04-23 08:43:32 +0200 <t0ngub1n> @help pointless
2023-04-23 08:43:32 +0200 <lambdabot> pointless <expr>. Play with pointfree code.
2023-04-23 08:43:50 +0200 <t0ngub1n> @pointless fix ((`ap` tail) . (. head) . liftM2 (.) (:) . flip ((.) . map . (+)))
2023-04-23 08:43:50 +0200 <lambdabot> fix ((`ap` tail) . (. head) . liftM2 (.) (:) . flip ((.) . map . (+)))
2023-04-23 08:44:05 +0200 <t0ngub1n> pointless is same as pl
2023-04-23 08:44:11 +0200 <ski> yes
2023-04-23 08:44:27 +0200 <ski> you can also play with lambdabot in a private message window
2023-04-23 08:44:36 +0200Angelz(Angelz@2605:6400:30:fc15:9bd1:2217:41cd:bb15) (Ping timeout: 264 seconds)
2023-04-23 08:44:37 +0200 <t0ngub1n> irc has pm?
2023-04-23 08:44:47 +0200 <ski> /query lambdabot
2023-04-23 08:44:57 +0200terrorjack(~terrorjac@2a01:4f8:c17:87f8::) (Quit: The Lounge - https://thelounge.chat)
2023-04-23 08:45:21 +0200 <ski> or, if you wish
2023-04-23 08:45:23 +0200 <t0ngub1n> what is ctcp version
2023-04-23 08:45:43 +0200 <ski> /msg lambdabot @help pointless
2023-04-23 08:45:56 +0200 <ski> that's just be checking which IRC client you were using
2023-04-23 08:45:58 +0200 <ski> try
2023-04-23 08:45:58 +0200terrorjack(~terrorjac@2a01:4f8:c17:87f8::)
2023-04-23 08:46:05 +0200 <ski> /ctcp ski version
2023-04-23 08:46:08 +0200tosyl(~user@103.206.114.124) (Quit: WeeChat 3.8)
2023-04-23 08:47:00 +0200 <ski> iirc, HexChat will, for some reason, not actually open a new window with `/msg', until the person (or bot) you messaged responds .. `/query' may open a window directly (if it works in HexChat, i don't recall)
2023-04-23 08:47:27 +0200 <ski> you may need to check your "server window" in HexChat, to see the response to the CTCP command
2023-04-23 08:48:35 +0200terrorjack(~terrorjac@2a01:4f8:c17:87f8::) (Client Quit)
2023-04-23 08:49:27 +0200vglfr(~vglfr@37.73.137.157)
2023-04-23 08:49:36 +0200terrorjack(~terrorjac@2a01:4f8:c17:87f8::)
2023-04-23 08:50:03 +0200terrorjack(~terrorjac@2a01:4f8:c17:87f8::) (Client Quit)
2023-04-23 08:52:58 +0200terrorjack(~terrorjac@2a01:4f8:c17:87f8::)
2023-04-23 08:53:32 +0200gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2023-04-23 08:56:18 +0200vglfr(~vglfr@37.73.137.157) (Ping timeout: 255 seconds)
2023-04-23 08:57:02 +0200 <tomsmeding> ski: dunno about hexchat, but weechat does the same thing (not open a window on /msg), which is why I always use /query :p
2023-04-23 08:58:33 +0200 <ski> Irssi does open on `/msg' :)
2023-04-23 09:00:27 +0200cheater_(~Username@user/cheater)
2023-04-23 09:01:41 +0200gemmaro(~user@240f:74:d1f0:1:ba1:e787:c9e:b1dc)
2023-04-23 09:02:10 +0200euandreh(~Thunderbi@189.6.18.7)
2023-04-23 09:02:24 +0200cheater(~Username@user/cheater) (Ping timeout: 265 seconds)
2023-04-23 09:02:32 +0200cheater_cheater
2023-04-23 09:08:03 +0200jmilan(~jmilan@195.242.182.249) (Ping timeout: 260 seconds)
2023-04-23 09:12:36 +0200acidjnk(~acidjnk@p200300d6e715c473f858042c3d1c8888.dip0.t-ipconnect.de)
2023-04-23 09:13:37 +0200acidjnk_new(~acidjnk@p200300d6e715c4737980016e154edc96.dip0.t-ipconnect.de)
2023-04-23 09:13:49 +0200Angelz(Angelz@Angelz.oddprotocol.org)
2023-04-23 09:17:31 +0200acidjnk(~acidjnk@p200300d6e715c473f858042c3d1c8888.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2023-04-23 09:23:18 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 255 seconds)
2023-04-23 09:24:57 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2023-04-23 09:40:57 +0200hugo(znc@verdigris.lysator.liu.se) (Ping timeout: 256 seconds)
2023-04-23 09:44:17 +0200CiaoSen(~Jura@p200300c9572790002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2023-04-23 09:47:47 +0200t0ngub1n(~t0ngub1n@85.249.45.137) (Remote host closed the connection)
2023-04-23 09:51:09 +0200hugo(znc@verdigris.lysator.liu.se)
2023-04-23 09:56:09 +0200JScript(~JScript@144.48.39.182) (Ping timeout: 255 seconds)
2023-04-23 09:57:12 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl)
2023-04-23 10:05:28 +0200 <gnulinuxuser> please ban me
2023-04-23 10:07:02 +0200 <ski> why would you ask for that ?
2023-04-23 10:09:53 +0200CiaoSen(~Jura@p200300c9572790002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Quit: CiaoSen)
2023-04-23 10:14:11 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
2023-04-23 10:16:12 +0200nate1(~nate@98.45.169.16)
2023-04-23 10:20:54 +0200nate1(~nate@98.45.169.16) (Ping timeout: 255 seconds)
2023-04-23 10:23:05 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 240 seconds)
2023-04-23 10:24:05 +0200tabemann__(~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) (Remote host closed the connection)
2023-04-23 10:24:34 +0200tabemann__(~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net)
2023-04-23 10:25:33 +0200 <probie> ski: So that one can claim that they were banned from #haskell, I'd guess
2023-04-23 10:28:49 +0200 <probie> s/one/they/
2023-04-23 10:28:58 +0200econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2023-04-23 10:30:06 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
2023-04-23 10:32:35 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2023-04-23 10:35:51 +0200vglfr(~vglfr@37.73.137.157)
2023-04-23 10:36:12 +0200gmg(~user@user/gehmehgeh)
2023-04-23 10:36:29 +0200gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8)
2023-04-23 10:40:06 +0200gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2023-04-23 10:47:39 +0200jargon(~jargon@174-22-213-236.phnx.qwest.net) (Remote host closed the connection)
2023-04-23 10:57:05 +0200gemmaro(~user@240f:74:d1f0:1:ba1:e787:c9e:b1dc) (Read error: Connection reset by peer)
2023-04-23 10:57:19 +0200gemmaro(~user@240f:74:d1f0:1:ba1:e787:c9e:b1dc)
2023-04-23 10:58:35 +0200alexherbo2(~alexherbo@2a02-842a-8180-4601-acc1-abab-ab34-357a.rev.sfr.net)
2023-04-23 10:59:12 +0200JScript(~JScript@144.48.39.180)
2023-04-23 11:00:45 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
2023-04-23 11:04:06 +0200razetime(~quassel@117.193.2.76)
2023-04-23 11:05:03 +0200razetime1(~Thunderbi@117.193.2.76)
2023-04-23 11:08:48 +0200razetime1(~Thunderbi@117.193.2.76) (Client Quit)
2023-04-23 11:13:15 +0200acidjnk_new(~acidjnk@p200300d6e715c4737980016e154edc96.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2023-04-23 11:15:00 +0200Tuplanolla(~Tuplanoll@91-159-68-236.elisa-laajakaista.fi)
2023-04-23 11:21:19 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2023-04-23 11:33:02 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2023-04-23 11:37:24 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 255 seconds)
2023-04-23 11:41:51 +0200emmanuelux_(~emmanuelu@user/emmanuelux) (Quit: au revoir)
2023-04-23 11:54:42 +0200user3(~user@103.206.114.86)
2023-04-23 11:55:02 +0200ub(~Thunderbi@p200300ecdf42b778af98fce2bbb311c4.dip0.t-ipconnect.de)
2023-04-23 11:56:18 +0200ubert(~Thunderbi@p548c93d4.dip0.t-ipconnect.de) (Ping timeout: 255 seconds)
2023-04-23 11:56:18 +0200ububert
2023-04-23 11:56:46 +0200user3tosyl
2023-04-23 11:58:43 +0200alexherbo2(~alexherbo@2a02-842a-8180-4601-acc1-abab-ab34-357a.rev.sfr.net) (Remote host closed the connection)
2023-04-23 11:59:38 +0200alexherbo2(~alexherbo@2a02-842a-8180-4601-acc1-abab-ab34-357a.rev.sfr.net)
2023-04-23 12:08:37 +0200 <jade[m]> What are your guys' opinions on a language which is similar and transpiles to haskell and is then fed into ghc?
2023-04-23 12:08:46 +0200 <jade[m]> Essentially just an alternative haskell frontend
2023-04-23 12:11:20 +0200 <darkling> There's a long and slightly awkward history of doing that with various languages. C++ into C with cfront, for example. LFE compiles Lisp into Erlang. There's a couple of hundred languages that compile to JavaScript. So... why not? Go for it. :)
2023-04-23 12:11:20 +0200madjestic(~madjestic@88-159-247-120.fixed.kpn.net)
2023-04-23 12:12:27 +0200 <jade[m]> thanks!
2023-04-23 12:13:00 +0200 <jade[m]> I guess I could also aim for core, though I doubt my ability to do so
2023-04-23 12:13:40 +0200 <ski> Liskell compiled (thin layer) into Haskell
2023-04-23 12:14:04 +0200 <ski> @where Liskell
2023-04-23 12:14:04 +0200 <lambdabot> a SExp syntax for Haskell, by therp : <http://clemens.endorphin.org/liskell> (broken),<https://web.archive.org/web/20081105133119/http://clemens.endorphin.org/liskell>,<http://clemens.endorphin.org/
2023-04-23 12:14:04 +0200 <lambdabot> ILC07-Liskell-draft.pdf>,<https://web.archive.org/web/20120609122549/http://www.liskell.org/>
2023-04-23 12:15:21 +0200 <jade[m]> This could be a good starting point, thanks a lot
2023-04-23 12:16:11 +0200 <jade[m]> I think this could be a good project for me, because I'm interested in designing languages, though do not feel like I have the low-level understanding to build a full compiler
2023-04-23 12:18:00 +0200 <geekosaur> older versions of agda and idris transpiled to haskell
2023-04-23 12:19:49 +0200 <darkling> My first language, I didn't even get as far as transpiling. I just wrote an interpreter. :)
2023-04-23 12:19:54 +0200 <juri_> I do DSL construction, but do not compile into haskell.
2023-04-23 12:20:23 +0200 <jade[m]> do you write full compilers or do you transpile to something else
2023-04-23 12:20:44 +0200 <geekosaur> back in the 1990s I did a fair amount of transpiling random stuff into C, although it was generally designed for embedding. (for example, a database report generator)
2023-04-23 12:20:52 +0200 <jade[m]> in this setting I consider things like LLVM or JVM bytecode part of a "full compiler"
2023-04-23 12:21:21 +0200 <juri_> i have an interpreter engine. at the end, it spits out a blurb of haskell that is equivalent to the output of the interpreted language...
2023-04-23 12:22:56 +0200harveypwca(~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
2023-04-23 12:23:40 +0200 <jade[m]> interesting
2023-04-23 12:23:44 +0200skitwitches
2023-04-23 12:26:04 +0200 <juri_> jade[m]: don't get too excited. i'm (ab)using a modelling language to model 3d objects, then (ab)using show on the resulting off-to-the-rendering-engine tree to generate the library calls to the modelling library.
2023-04-23 12:27:14 +0200 <juri_> it's more result-inspection than useful-utility, but it's handy for writing DSL, then dropping the resulting haskell into the golden test suite.
2023-04-23 12:28:52 +0200 <tomsmeding> geekosaur: as far as I know agda still transpiles to haskell
2023-04-23 12:29:20 +0200 <geekosaur> I was under the impression that, while that's still an option, they also have native backends these days
2023-04-23 12:29:45 +0200 <tomsmeding> geekosaur: https://agda.readthedocs.io/en/v2.6.3/tools/compilers.html
2023-04-23 12:30:06 +0200 <tomsmeding> for idris I think you're completely correct, though I'm not too familiar
2023-04-23 12:31:06 +0200 <tomsmeding> (incidentally, the haskell that agda outputs is damn ugly)
2023-04-23 12:31:17 +0200 <probie> I think for modern idris the preferred backend generates code for chez scheme
2023-04-23 12:32:23 +0200 <geekosaur> well, yes, it would be. ghc's typechecker can't prove dependent types directly so there's a lot of unsafeCoerce
2023-04-23 12:32:59 +0200tosyl(~user@103.206.114.86) (Quit: WeeChat 3.8)
2023-04-23 12:33:00 +0200 <tomsmeding> geekosaur: not just a lot, they just indiscriminately put it everywhere
2023-04-23 12:33:05 +0200 <tomsmeding> like around every ast node
2023-04-23 12:33:36 +0200 <tomsmeding> I believe they avoid ambiguous type errors by just putting Any everywhere too
2023-04-23 12:33:51 +0200 <tomsmeding> it's like a dynamically typed language :p
2023-04-23 12:34:09 +0200 <tomsmeding> in that light I guess compiling to a scheme as probie says would be a more fitting choice
2023-04-23 12:34:32 +0200 <tomsmeding> compiler is still optimised for functional structures, but doesn't assume any kind of sensible typing
2023-04-23 12:36:06 +0200emmanuelux(~emmanuelu@user/emmanuelux)
2023-04-23 12:44:56 +0200ski. o O ( <https://idris2.readthedocs.io/en/latest/updates/updates.html#chez-scheme-target>,<https://idris2.readthedocs.io/en/latest/backends/chez.html> )
2023-04-23 12:49:16 +0200acidjnk(~acidjnk@p200300d6e715c47369d8c20d85ea1b87.dip0.t-ipconnect.de)
2023-04-23 12:52:56 +0200nate1(~nate@98.45.169.16)
2023-04-23 12:56:29 +0200emmanuelux_(~emmanuelu@user/emmanuelux)
2023-04-23 12:57:14 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl)
2023-04-23 12:57:57 +0200nate1(~nate@98.45.169.16) (Ping timeout: 255 seconds)
2023-04-23 12:58:33 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2023-04-23 12:59:24 +0200emmanuelux(~emmanuelu@user/emmanuelux) (Ping timeout: 252 seconds)
2023-04-23 13:01:29 +0200ubert(~Thunderbi@p200300ecdf42b778af98fce2bbb311c4.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2023-04-23 13:01:49 +0200ubert(~Thunderbi@p548c93d4.dip0.t-ipconnect.de)
2023-04-23 13:08:45 +0200drdo(~drdo@bl14-14-164.dsl.telepac.pt) (Ping timeout: 255 seconds)
2023-04-23 13:10:08 +0200gnulinuxuser(~gnulinuxu@user/gnulinuxuser) (Ping timeout: 260 seconds)
2023-04-23 13:11:00 +0200vglfr(~vglfr@37.73.137.157) (Ping timeout: 255 seconds)
2023-04-23 13:11:41 +0200drdo(~drdo@bl14-14-164.dsl.telepac.pt)
2023-04-23 13:16:02 +0200ubert(~Thunderbi@p548c93d4.dip0.t-ipconnect.de) (Quit: ubert)
2023-04-23 13:16:28 +0200ubert(~Thunderbi@p200300ecdf42b778af98fce2bbb311c4.dip0.t-ipconnect.de)
2023-04-23 13:18:44 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2023-04-23 13:20:53 +0200accord(uid568320@id-568320.hampstead.irccloud.com)
2023-04-23 13:25:04 +0200ubert(~Thunderbi@p200300ecdf42b778af98fce2bbb311c4.dip0.t-ipconnect.de) (Quit: ubert)
2023-04-23 13:31:17 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds)
2023-04-23 13:33:08 +0200 <eldritchcookie[m> is there any easy way of making a graphical program, more specifically i want to make a program with the functionality of GCS and maptool
2023-04-23 13:34:54 +0200 <eldritchcookie[m> sorry that still is too unspecific, is there any graphical framwork with dockable resizable panels on which i can draw?
2023-04-23 13:35:02 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2023-04-23 13:35:03 +0200 <MangoIV[m]> <tomsmeding> "geekosaur: not just a lot..." <- Afaiu it’s gotten a lot better since agda2hs https://github.com/agda/agda2hs
2023-04-23 13:36:53 +0200 <tomsmeding> MangoIV[m]: agda2hs definitely produces much better code -- that is its entire purpose -- but it compiles only a subset of agda
2023-04-23 13:38:10 +0200sudden(~cat@user/sudden) (Ping timeout: 276 seconds)
2023-04-23 13:38:45 +0200pyook(~puke@user/puke) (Ping timeout: 240 seconds)
2023-04-23 13:39:21 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 255 seconds)
2023-04-23 13:39:44 +0200sudden(~cat@user/sudden)
2023-04-23 13:40:46 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.)
2023-04-23 13:42:09 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2023-04-23 13:44:32 +0200acidjnk(~acidjnk@p200300d6e715c47369d8c20d85ea1b87.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2023-04-23 13:48:27 +0200polyphem(~polyphem@ip-109-43-51-100.web.vodafone.de)
2023-04-23 13:56:54 +0200krei-se(~krei-se@p57af2733.dip0.t-ipconnect.de) (Ping timeout: 255 seconds)
2023-04-23 13:57:22 +0200krei-se(~krei-se@31.6.30.164)
2023-04-23 14:01:23 +0200travv0(sid293381@user/travv0) (Quit: Connection closed for inactivity)
2023-04-23 14:03:55 +0200razetime(~quassel@117.193.2.76) (Remote host closed the connection)
2023-04-23 14:07:40 +0200krei-se-(~krei-se@p57af2733.dip0.t-ipconnect.de)
2023-04-23 14:08:04 +0200krei-se(~krei-se@31.6.30.164) (Ping timeout: 276 seconds)
2023-04-23 14:08:11 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 248 seconds)
2023-04-23 14:14:18 +0200acidjnk(~acidjnk@p200300d6e715c4732184a4a065abaaf4.dip0.t-ipconnect.de)
2023-04-23 14:14:54 +0200gurkenglas(~gurkengla@dynamic-046-114-178-101.46.114.pool.telefonica.de) (Remote host closed the connection)
2023-04-23 14:19:56 +0200gurkenglas(~gurkengla@dynamic-046-114-178-101.46.114.pool.telefonica.de)
2023-04-23 14:29:34 +0200gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8)
2023-04-23 14:30:49 +0200jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 276 seconds)
2023-04-23 14:41:50 +0200gemmaro(~user@240f:74:d1f0:1:ba1:e787:c9e:b1dc) (Remote host closed the connection)
2023-04-23 14:47:03 +0200madjestic(~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 265 seconds)
2023-04-23 14:48:33 +0200gemmaro(~user@240f:74:d1f0:1:ba1:e787:c9e:b1dc)
2023-04-23 14:52:43 +0200__monty__(~toonn@user/toonn)
2023-04-23 14:52:49 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2023-04-23 14:53:27 +0200coot(~coot@213.134.170.228)
2023-04-23 14:54:30 +0200pavonia(~user@user/siracusa)
2023-04-23 15:03:59 +0200polyphem(~polyphem@ip-109-43-51-100.web.vodafone.de) (Ping timeout: 246 seconds)
2023-04-23 15:05:04 +0200acidjnk(~acidjnk@p200300d6e715c4732184a4a065abaaf4.dip0.t-ipconnect.de) (Ping timeout: 248 seconds)
2023-04-23 15:06:41 +0200Me-me(~Me-me@user/me-me) (Quit: Going offline, see ya! (www.adiirc.com))
2023-04-23 15:27:49 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl)
2023-04-23 15:32:34 +0200drdo(~drdo@bl14-14-164.dsl.telepac.pt) (Ping timeout: 276 seconds)
2023-04-23 15:36:54 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2023-04-23 15:38:00 +0200m5zs7k(aquares@web10.mydevil.net) (Ping timeout: 264 seconds)
2023-04-23 15:39:39 +0200myme(~myme@2a01:799:d60:e400:f221:398f:f55f:27f9) (Ping timeout: 256 seconds)
2023-04-23 15:40:16 +0200myme(~myme@2a01:799:d60:e400:d3f8:a1c2:97a0:2fb)
2023-04-23 15:41:18 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 255 seconds)
2023-04-23 15:43:45 +0200m5zs7k(aquares@web10.mydevil.net)
2023-04-23 15:58:04 +0200aeroplane(~user@user/aeroplane)
2023-04-23 15:58:45 +0200gurkenglas(~gurkengla@dynamic-046-114-178-101.46.114.pool.telefonica.de) (Ping timeout: 240 seconds)
2023-04-23 16:01:10 +0200madjestic(~madjestic@88-159-247-120.fixed.kpn.net)
2023-04-23 16:02:28 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl) (Ping timeout: 276 seconds)
2023-04-23 16:05:44 +0200gurkenglas(~gurkengla@dynamic-046-114-178-101.46.114.pool.telefonica.de)
2023-04-23 16:16:54 +0200ritsu[m](~ritsumido@2001:470:69fc:105::3:4a21)
2023-04-23 16:18:10 +0200jero98772(~jero98772@2800:484:1d84:9000::3)
2023-04-23 16:30:38 +0200titibandit(~titibandi@user/titibandit)
2023-04-23 16:38:29 +0200gmg(~user@user/gehmehgeh) (Remote host closed the connection)
2023-04-23 16:38:29 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2023-04-23 16:38:30 +0200califax(~califax@user/califx) (Read error: Connection reset by peer)
2023-04-23 16:38:30 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Read error: Connection reset by peer)
2023-04-23 16:38:45 +0200califax(~califax@user/califx)
2023-04-23 16:38:55 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2023-04-23 16:38:59 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2023-04-23 16:39:15 +0200gmg(~user@user/gehmehgeh)
2023-04-23 16:40:50 +0200titibandit(~titibandi@user/titibandit) (Ping timeout: 260 seconds)
2023-04-23 16:43:53 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2023-04-23 16:44:01 +0200 <hammond> this string = "\x0304" doesn't seem to be the same as this string = "\x03" ++"04"
2023-04-23 16:44:48 +0200 <geekosaur> correct
2023-04-23 16:45:12 +0200 <geekosaur> remember that Haskell strings are Unicode codepoints, \x0304 is a valid codepoint
2023-04-23 16:45:22 +0200 <geekosaur> \x03\&04 will do what you want
2023-04-23 16:45:37 +0200 <hammond> ok
2023-04-23 16:50:00 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2023-04-23 16:54:26 +0200nate1(~nate@98.45.169.16)
2023-04-23 16:59:25 +0200nate1(~nate@98.45.169.16) (Ping timeout: 250 seconds)
2023-04-23 17:07:02 +0200 <eldritchcookie[m> hello is there a library for opening a file/URL in the default program?
2023-04-23 17:07:16 +0200 <eldritchcookie[m> ideally in a crossplatform way?
2023-04-23 17:09:11 +0200jle`(~jle`@cpe-23-240-75-236.socal.res.rr.com) (Ping timeout: 256 seconds)
2023-04-23 17:09:23 +0200xff0x(~xff0x@2405:6580:b080:900:696f:4e84:b735:2ed6) (Ping timeout: 250 seconds)
2023-04-23 17:11:07 +0200jle`(~jle`@cpe-23-240-75-236.socal.res.rr.com)
2023-04-23 17:11:10 +0200xff0x(~xff0x@ai098135.d.east.v6connect.net)
2023-04-23 17:12:31 +0200gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c)
2023-04-23 17:13:44 +0200dh97(~dh97@2405:201:d02b:48f3:d9ee:cb54:6fa0:b6ac)
2023-04-23 17:14:01 +0200tubogram447(~tubogram@user/tubogram)
2023-04-23 17:14:05 +0200unit73e(~emanuel@2001:818:e8dd:7c00:656:e5ff:fe72:9d36)
2023-04-23 17:14:51 +0200tubogram44(~tubogram@user/tubogram) (Ping timeout: 240 seconds)
2023-04-23 17:14:51 +0200tubogram447tubogram44
2023-04-23 17:16:46 +0200 <dh97> Hey, is there any way to have multiple versions of the same library installed at the same time in Haskell? I am using ormolu for formatting in two separate repos, which use two different ormolu versions. Right now, I have to keep installing the right version every time I am running the formatter.
2023-04-23 17:17:44 +0200 <geekosaur> cabal and stack both manage that, but for executables it's more likely to be painful because cabal/stack can't automanage those
2023-04-23 17:18:11 +0200 <eldritchcookie[m> i use nix and it works
2023-04-23 17:18:19 +0200 <geekosaur> that said you should be able to install while within the project and it should install the specified version into the project instead of globally (use build, not install)
2023-04-23 17:18:21 +0200 <unit73e> hello, and also interesting. maven and pals don't support that
2023-04-23 17:18:28 +0200 <unit73e> never even occured to me
2023-04-23 17:18:33 +0200 <geekosaur> (ad cabal/stack run)
2023-04-23 17:19:58 +0200gemmaro(~user@240f:74:d1f0:1:ba1:e787:c9e:b1dc) (Remote host closed the connection)
2023-04-23 17:20:15 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2023-04-23 17:20:25 +0200 <dh97> Ormolu version is currently not specified in those repos's stack files, since those are dev dependencies. I install ormolu globally and use that.
2023-04-23 17:22:47 +0200 <unit73e> but in that case, since it's a standalone app, isn't that more of an OS problem?
2023-04-23 17:22:49 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2023-04-23 17:23:08 +0200 <unit73e> though you're installing ormolu with stack?
2023-04-23 17:24:20 +0200 <unit73e> nix can have multiple versions of the same app, but that's uncommon
2023-04-23 17:24:41 +0200 <dh97> Yes I'm using `stack install ormolu`.
2023-04-23 17:24:49 +0200 <dh97> I would actually like something like how Node does it. We can specify a dev dependency version and if inside that folder that version gets installed. But I'm not sure how to do that with stack.
2023-04-23 17:25:11 +0200 <unit73e> yeah in that case geekosaur suggestion is problably the best, install it locally in your project
2023-04-23 17:25:23 +0200 <unit73e> which is what npm does
2023-04-23 17:26:00 +0200 <unit73e> your problem is more how the text editor you're using figures which ormolu to use?
2023-04-23 17:29:50 +0200 <dh97> I'm not using any text editor to format. I run ormolu in the command line to format.
2023-04-23 17:30:57 +0200vorpuni(~pvorp@2a01:e0a:1cd:ea70:afe3:506e:aa0:19a1)
2023-04-23 17:30:57 +0200dh97(~dh97@2405:201:d02b:48f3:d9ee:cb54:6fa0:b6ac) (Read error: Connection reset by peer)
2023-04-23 17:31:32 +0200dh97(~dh97@2405:201:d02b:48f3:d9ee:cb54:6fa0:b6ac)
2023-04-23 17:32:14 +0200 <dh97> geekosaur can you elaborate on how I can install locally? Do I need to add ormolu to the cabal file?
2023-04-23 17:33:02 +0200 <unit73e> ok, in that case, you could install the binary were you want, it doesn't have to be in $HOME/.local/bin, and maybe have some sort of script to put in PATH just to make things easier
2023-04-23 17:33:14 +0200 <unit73e> or have a custom command in stack to do it for you
2023-04-23 17:33:44 +0200bgs(~bgs@212-85-160-171.dynamic.telemach.net)
2023-04-23 17:33:55 +0200 <unit73e> in npm you can specify command very generically, you could try that
2023-04-23 17:33:58 +0200 <unit73e> but with stack
2023-04-23 17:34:51 +0200 <monochrom> Playing with PATH is what nix does. :)
2023-04-23 17:34:53 +0200 <geekosaur> if this is stack I'm not entirely sure but I think that if you run the install in the project dir it installs into the project's bin and you can use stack exec to run the local one
2023-04-23 17:35:07 +0200 <geekosaur> I'm not a stack user though
2023-04-23 17:35:11 +0200 <monochrom> <-- did play with PATH for a little while.
2023-04-23 17:35:36 +0200 <unit73e> nix is indeed designed for these usecases
2023-04-23 17:35:51 +0200 <dh97> Ok makes sense. So I can put multiple versions of ormolu in different folders and use aliases to call them. That could solve my problem.
2023-04-23 17:36:13 +0200 <unit73e> yup
2023-04-23 17:36:59 +0200 <dh97> I don't have any experience with nix but would like to learn more. Can you recommed some resources about using haskell with nix.
2023-04-23 17:37:09 +0200 <maerwald> lol
2023-04-23 17:38:32 +0200 <unit73e> dh97, nix is a package manager that allows you to specify your instalation declaratively
2023-04-23 17:38:41 +0200 <unit73e> and you can see all that
2023-04-23 17:38:44 +0200 <unit73e> in nixos official page
2023-04-23 17:38:46 +0200 <eldritchcookie[m> oh sure https://nixos.org/learn.html is quite a good source
2023-04-23 17:39:16 +0200 <dh97> Thanks I'll go through it.
2023-04-23 17:39:38 +0200 <unit73e> it's very different from other linux OS but since you already know haskell that helps a lot understanding what's going on
2023-04-23 17:40:45 +0200 <unit73e> in fact I'm still on arch and should switch to nixos lol but I'm still in lazy mode
2023-04-23 17:40:54 +0200 <unit73e> and I lose the "arch btw" rights
2023-04-23 17:42:25 +0200nate1(~nate@98.45.169.16)
2023-04-23 17:47:25 +0200nate1(~nate@98.45.169.16) (Ping timeout: 240 seconds)
2023-04-23 17:49:22 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2023-04-23 17:51:26 +0200dh97(~dh97@2405:201:d02b:48f3:d9ee:cb54:6fa0:b6ac) (Read error: Connection reset by peer)
2023-04-23 17:58:43 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl)
2023-04-23 17:59:29 +0200wroathe(~wroathe@50.205.197.50)
2023-04-23 17:59:29 +0200wroathe(~wroathe@50.205.197.50) (Changing host)
2023-04-23 17:59:29 +0200wroathe(~wroathe@user/wroathe)
2023-04-23 17:59:48 +0200eggplantade(~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net)
2023-04-23 18:00:09 +0200ritsu[m](~ritsumido@2001:470:69fc:105::3:4a21) ()
2023-04-23 18:00:40 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Quit: Leaving)
2023-04-23 18:07:25 +0200wroathe(~wroathe@user/wroathe) (Quit: leaving)
2023-04-23 18:08:40 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2023-04-23 18:11:23 +0200ddellacosta(~ddellacos@143.244.47.84) (Quit: WeeChat 3.8)
2023-04-23 18:11:27 +0200econo(uid147250@user/econo)
2023-04-23 18:11:33 +0200perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.8)
2023-04-23 18:12:23 +0200ddellacosta(~ddellacos@143.244.47.84)
2023-04-23 18:14:11 +0200wroathe(~wroathe@50.205.197.50)
2023-04-23 18:14:12 +0200wroathe(~wroathe@50.205.197.50) (Changing host)
2023-04-23 18:14:12 +0200wroathe(~wroathe@user/wroathe)
2023-04-23 18:18:20 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2023-04-23 18:23:04 +0200ratapaca(~ratapaca@98.40.240.33)
2023-04-23 18:32:18 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds)
2023-04-23 18:37:53 +0200wroathe(~wroathe@user/wroathe) (Quit: leaving)
2023-04-23 18:48:13 +0200perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
2023-04-23 18:53:42 +0200alexherbo2(~alexherbo@2a02-842a-8180-4601-acc1-abab-ab34-357a.rev.sfr.net) (Remote host closed the connection)
2023-04-23 18:54:54 +0200perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.8)
2023-04-23 18:56:50 +0200perrierjouet(~perrier-j@modemcable048.127-56-74.mc.videotron.ca)
2023-04-23 19:01:15 +0200dh97(~dh97@2405:201:d02b:48f3:d9ee:cb54:6fa0:b6ac)
2023-04-23 19:01:54 +0200Lycurgus(~juan@user/Lycurgus)
2023-04-23 19:02:09 +0200 <dh97> Storing the ormolu bins in separate folders worked. Wrote a bash function to add the correct ormolu version for that repo.
2023-04-23 19:04:31 +0200accord(uid568320@id-568320.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2023-04-23 19:13:06 +0200Lycurgus(~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz)
2023-04-23 19:13:42 +0200ratapaca(~ratapaca@98.40.240.33) (Ping timeout: 255 seconds)
2023-04-23 19:14:10 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl)
2023-04-23 19:15:01 +0200wroathe(~wroathe@50.205.197.50)
2023-04-23 19:15:01 +0200wroathe(~wroathe@50.205.197.50) (Changing host)
2023-04-23 19:15:01 +0200wroathe(~wroathe@user/wroathe)
2023-04-23 19:15:47 +0200wroathe(~wroathe@user/wroathe) (Client Quit)
2023-04-23 19:22:27 +0200dh97(~dh97@2405:201:d02b:48f3:d9ee:cb54:6fa0:b6ac) (Quit: Quit)
2023-04-23 19:25:06 +0200dsrt^(~dsrt@c-76-105-96-13.hsd1.ga.comcast.net) (Remote host closed the connection)
2023-04-23 19:28:14 +0200jero98772(~jero98772@2800:484:1d84:9000::3) (Ping timeout: 246 seconds)
2023-04-23 19:30:19 +0200madjestic(~madjestic@88-159-247-120.fixed.kpn.net) (Quit: Lost terminal)
2023-04-23 19:33:34 +0200bontaq(~user@ool-45779b84.dyn.optonline.net)
2023-04-23 19:34:15 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2023-04-23 19:36:34 +0200vorpuni(~pvorp@2a01:e0a:1cd:ea70:afe3:506e:aa0:19a1) (Read error: Connection reset by peer)
2023-04-23 19:37:54 +0200rf(~rf@2605:59c8:1604:2210:6e18:f30:3bf:df23)
2023-04-23 19:39:56 +0200jero98772(~jero98772@2800:484:1d84:9000::3)
2023-04-23 19:52:49 +0200waleee(~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7)
2023-04-23 20:01:02 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl)
2023-04-23 20:08:46 +0200coot(~coot@213.134.170.228) (Quit: coot)
2023-04-23 20:17:42 +0200alexherbo2(~alexherbo@2a02-842a-8180-4601-acc1-abab-ab34-357a.rev.sfr.net)
2023-04-23 20:25:15 +0200gurkenglas(~gurkengla@dynamic-046-114-178-101.46.114.pool.telefonica.de) (Ping timeout: 255 seconds)
2023-04-23 20:27:41 +0200Sgeo(~Sgeo@user/sgeo)
2023-04-23 20:32:42 +0200shailangsa_(~shailangs@host165-120-169-78.range165-120.btcentralplus.com) (Remote host closed the connection)
2023-04-23 20:33:18 +0200gurkenglas(~gurkengla@46.114.178.101)
2023-04-23 20:34:23 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds)
2023-04-23 20:36:01 +0200michalz(~michalz@185.246.207.217)
2023-04-23 20:38:35 +0200jero98772(~jero98772@2800:484:1d84:9000::3) (Ping timeout: 264 seconds)
2023-04-23 20:43:42 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Ping timeout: 255 seconds)
2023-04-23 20:44:00 +0200maanitou(~maanitou@87-49-146-189-mobile.dk.customer.tdc.net)
2023-04-23 20:47:38 +0200vglfr(~vglfr@37.73.65.155)
2023-04-23 20:50:14 +0200jero98772(~jero98772@2800:484:1d84:9000::3)
2023-04-23 20:52:36 +0200 <jade[m]> https://github.com/tc39/proposal-pipeline-operator
2023-04-23 20:52:44 +0200 <Hecate> encore ?
2023-04-23 20:52:47 +0200jade[m]uploaded an image: (55KiB) < https://libera.ems.host/_matrix/media/v3/download/matrix.org/xKaLFZBgvgmGrRdftVnTPbeU/image_proxy.… >
2023-04-23 20:52:55 +0200 <Hecate> did it change stage?
2023-04-23 20:53:01 +0200 <Hecate> jade[m]: hahaha
2023-04-23 20:54:14 +0200 <jade[m]> just saw it somewhere else and it reminded me of that meme
2023-04-23 20:54:24 +0200 <Hecate> yeah definitely
2023-04-23 20:56:26 +0200vglfr(~vglfr@37.73.65.155) (Ping timeout: 252 seconds)
2023-04-23 21:01:37 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2023-04-23 21:03:57 +0200mc47(~mc47@xmonad/TheMC47)
2023-04-23 21:15:07 +0200shailangsa(~shailangs@host165-120-169-78.range165-120.btcentralplus.com)
2023-04-23 21:21:37 +0200xstill_xstill
2023-04-23 21:24:41 +0200 <[exa]> I took a brief look at the survey the're referring to and last year a whole whopping amount of 2 respondents dared to say js missing monads
2023-04-23 21:25:02 +0200 <[exa]> in 2030 they'll be missing the tutorials
2023-04-23 21:31:20 +0200 <jade[m]> <[exa]> "I took a brief look at the..." <- The question is in what sense they are missing
2023-04-23 21:31:40 +0200acidjnk(~acidjnk@p54ad56b7.dip0.t-ipconnect.de)
2023-04-23 21:31:57 +0200 <jade[m]> because you can construct monads easily, the question is whether a general monad typeclass could be compiler enforced
2023-04-23 21:32:14 +0200 <jade[m]> which would require a whole remodel of the type system to allow for introspective type parameters
2023-04-23 21:33:18 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2023-04-23 21:33:33 +0200 <tomsmeding> jade[m]: you can construct a monad, in some sense, easily, but what you don't get is the nice syntax (i.e. do-notation)
2023-04-23 21:33:55 +0200 <tomsmeding> so you simply get overloaded methods, not even (>>=), just .bind(), not an actual "overloaded semicolon"
2023-04-23 21:34:08 +0200 <jade[m]> that's true, but also that's not what monads are about imo
2023-04-23 21:34:28 +0200 <tomsmeding> but they are a pain to use without the syntax
2023-04-23 21:34:42 +0200 <tomsmeding> in a functional language you need them, so we would perhaps accept the pain
2023-04-23 21:34:44 +0200 <jade[m]> the idea is that you have an abstraction over flatmaps
2023-04-23 21:34:54 +0200 <tomsmeding> but in an imperative language you don't need them, so people will not accept the pain
2023-04-23 21:34:57 +0200 <jade[m]> and do-notation is just a way to simplify that
2023-04-23 21:35:18 +0200 <tomsmeding> with explicit .bind() you're programming with "Okay I'm using a monad now because I really need to"
2023-04-23 21:35:30 +0200 <tomsmeding> with do-notation you're just writing statements
2023-04-23 21:35:51 +0200 <tomsmeding> semantically all apples are apples, but syntax matters
2023-04-23 21:35:59 +0200 <int-e> [exa]: that's the kind of reply where you want to ask the respondent what the problem is that they expect to be solved by that feature
2023-04-23 21:36:23 +0200 <tomsmeding> not enough burritos
2023-04-23 21:37:23 +0200 <int-e> (Don't get me wrong, monads are great... but as tomsmeding points out, a large part of this comes down to having a pleasant syntax for them.)
2023-04-23 21:39:02 +0200sphynx(~xnyhps@2a02:2770:3:0:216:3eff:fe67:3288) (Quit: brb)
2023-04-23 21:40:14 +0200jmdaemon(~jmdaemon@user/jmdaemon)
2023-04-23 21:40:48 +0200 <tomsmeding> int-e: there's another reason why that question would be a good one: in haskell, the monads that I use are mostly 1. the classical transformers (Reader, Except, State, WriteR), which are for state management; and 2. STM/ST/IO, which are for IO management
2023-04-23 21:41:04 +0200 <tomsmeding> neither are useful in JS where both use cases are readily fulfilled by native mutation constructs
2023-04-23 21:41:16 +0200 <tomsmeding> what monads are left
2023-04-23 21:41:20 +0200wroathe(~wroathe@50.205.197.50)
2023-04-23 21:41:20 +0200wroathe(~wroathe@50.205.197.50) (Changing host)
2023-04-23 21:41:20 +0200wroathe(~wroathe@user/wroathe)
2023-04-23 21:41:41 +0200wroathe(~wroathe@user/wroathe) (Client Quit)
2023-04-23 21:41:48 +0200 <int-e> I use [a] a lot for fun stuff.
2023-04-23 21:41:52 +0200 <tomsmeding> exactly how many flatmaps do you have in a JS program, how many of those are on different types, and how often do you chain more than 2 of them that calling .flatMap twice is such a bother
2023-04-23 21:42:15 +0200wroathe(~wroathe@50.205.197.50)
2023-04-23 21:42:16 +0200wroathe(~wroathe@50.205.197.50) (Changing host)
2023-04-23 21:42:16 +0200wroathe(~wroathe@user/wroathe)
2023-04-23 21:42:20 +0200 <tomsmeding> int-e: that's true
2023-04-23 21:42:57 +0200 <probie> The one "monad" I use in JS introduced a special syntax so I didn't need to keep going `.then`
2023-04-23 21:43:07 +0200 <tomsmeding> await?
2023-04-23 21:43:11 +0200 <probie> yes
2023-04-23 21:43:16 +0200 <tomsmeding> right
2023-04-23 21:44:11 +0200nate1(~nate@98.45.169.16)
2023-04-23 21:45:05 +0200 <[exa]> oh noes my naive bad evening joke spawned a discussion
2023-04-23 21:45:32 +0200 <int-e> [exa]: It's not a bad one, is it?
2023-04-23 21:45:36 +0200 <int-e> No need for regrets.
2023-04-23 21:45:48 +0200 <int-e> Or cause.
2023-04-23 21:45:50 +0200 <[exa]> not at all bad, sure, it's just a really interesting pain point
2023-04-23 21:47:43 +0200 <[exa]> I was literally starting to wonder how much would it cost to have some simple reconfigurable syntax preprocessor that everyone can use to express their stuff neatly, possibly shutting down 90% of such language-extension discussions and compiler update havoc
2023-04-23 21:48:05 +0200 <tomsmeding> [exa]: is that about haskell or about js
2023-04-23 21:48:27 +0200jero98772(~jero98772@2800:484:1d84:9000::3) (Ping timeout: 250 seconds)
2023-04-23 21:48:41 +0200 <[exa]> good question, more like generic
2023-04-23 21:49:09 +0200sphynx(~xnyhps@2a02:2770:3:0:216:3eff:fe67:3288)
2023-04-23 21:49:12 +0200 <[exa]> nvm, it's offtopic, sorry. :]
2023-04-23 21:49:13 +0200 <int-e> There's M4 :-P
2023-04-23 21:49:25 +0200nate1(~nate@98.45.169.16) (Ping timeout: 260 seconds)
2023-04-23 21:49:29 +0200 <tomsmeding> with the venerable 'dnl' comment marker
2023-04-23 21:49:31 +0200 <[exa]> b b but.. _neater_
2023-04-23 21:49:32 +0200 <int-e> (realistically, it'll always have to be tied to a particular language.)
2023-04-23 21:50:20 +0200emmanuelux_(~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
2023-04-23 21:51:09 +0200emmanuelux_(~emmanuelu@user/emmanuelux)
2023-04-23 21:51:17 +0200machinedgod(~machinedg@d198-53-218-113.abhsia.telus.net)
2023-04-23 21:51:20 +0200 <[exa]> let's move to #-offtopic
2023-04-23 21:51:23 +0200 <ncf> under what circumstances exactly is the <<loop>> exception thrown? i don't think i've ever seen it in real life, just learned it was a thing
2023-04-23 21:52:07 +0200 <ncf> NonTermination i guess
2023-04-23 21:52:46 +0200 <tomsmeding> ncf: compile 'main = let x = x in x `seq` return ()'
2023-04-23 21:52:59 +0200 <tomsmeding> ghci loops, the executable prints <<loop>>
2023-04-23 21:53:25 +0200 <ncf> hm maybe i don't compile non-terminating code often enough
2023-04-23 21:53:40 +0200 <[exa]> weird, my ghci loops without consuming any CPU time
2023-04-23 21:53:44 +0200 <[exa]> what's that magic
2023-04-23 21:54:01 +0200 <ncf> well it's not like that builds any new thunks
2023-04-23 21:54:15 +0200 <ncf> oh, CPU
2023-04-23 21:55:07 +0200 <tomsmeding> cute, never noticed that before; I wonder what it's doing
2023-04-23 21:59:54 +0200 <c_wraith> [exa]: that means that the main thread has blocked. In a case when you're searching for <<loop>>, it's blocked because it's noticed the thunk it needs the result of is currently being evaluated.
2023-04-23 22:00:57 +0200 <c_wraith> [exa]: If a different thread was working on it, the waiting thread would be woken when the value become available. In the case where the same thread is working and waiting on it, the garbage collector is supposed to notice that and kill the thread.
2023-04-23 22:01:15 +0200jero98772(~jero98772@2800:484:1d84:9000::3)
2023-04-23 22:01:18 +0200 <c_wraith> ... at least in the threaded runtime, which ghci uses.
2023-04-23 22:01:25 +0200aeroplane(~user@user/aeroplane) (Ping timeout: 240 seconds)
2023-04-23 22:01:33 +0200 <geekosaur> …but gc never runs because it's not allocating…
2023-04-23 22:01:42 +0200 <c_wraith> in the single-threaded runtime, it doesn't need the GC to solve it, because it knows no other thread will come along
2023-04-23 22:02:15 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl)
2023-04-23 22:02:42 +0200 <c_wraith> you can find some command line parameters to tell the GC to run when the program is idle for long enough. Those might trigger a <<loop>> after a sufficient wait.
2023-04-23 22:03:35 +0200 <[exa]> c_wraith: oh wow nice, thanks
2023-04-23 22:03:44 +0200 <tomsmeding> TIL
2023-04-23 22:09:00 +0200milia(~milia@user/milia)
2023-04-23 22:10:39 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2023-04-23 22:12:16 +0200titibandit(~titibandi@user/titibandit)
2023-04-23 22:13:48 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht)
2023-04-23 22:18:51 +0200trev(~trev@user/trev) (Quit: trev)
2023-04-23 22:27:12 +0200maanitou(~maanitou@87-49-146-189-mobile.dk.customer.tdc.net) (Ping timeout: 255 seconds)
2023-04-23 22:28:17 +0200 <c_wraith> you know, the timeout used to trigger in ghci. it doesn't anymore. I wonder if that's intentional...
2023-04-23 22:33:47 +0200 <c_wraith> Hmm. even calling performMajorGC isn't causing a <<loop>> in ghci now. I wonder what's going on there...
2023-04-23 22:34:50 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds)
2023-04-23 22:34:52 +0200biberu(~biberu@user/biberu) (Read error: Connection reset by peer)
2023-04-23 22:36:39 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds)
2023-04-23 22:41:44 +0200titibandit(~titibandi@user/titibandit) (Remote host closed the connection)
2023-04-23 22:44:10 +0200a6a45081-2b83(~aditya@2600:1700:8fd0:3660::48)
2023-04-23 22:48:08 +0200biberu(~biberu@user/biberu)
2023-04-23 22:49:22 +0200czy(~user@host-140-25.ilcub310.champaign.il.us.clients.pavlovmedia.net) (Remote host closed the connection)
2023-04-23 22:49:39 +0200 <c_wraith> hah, ok. Finally got it to <<loop>>. Just had to 1) forkIO the action to block. 2) not keep that ThreadId around. 3) allocate and stop using a lot of junk. 4) call performMajorGC. I suspect some extra heuristics have been added that I'm not aware of
2023-04-23 22:50:56 +0200gnalzo(~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8)
2023-04-23 22:58:36 +0200jero98772(~jero98772@2800:484:1d84:9000::3) (Ping timeout: 265 seconds)
2023-04-23 23:02:42 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2023-04-23 23:02:51 +0200mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2023-04-23 23:05:49 +0200alexherbo2(~alexherbo@2a02-842a-8180-4601-acc1-abab-ab34-357a.rev.sfr.net) (Remote host closed the connection)
2023-04-23 23:09:29 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 250 seconds)
2023-04-23 23:11:21 +0200emmanuelux_(~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
2023-04-23 23:11:48 +0200jero98772(~jero98772@2800:484:1d84:9000::3)
2023-04-23 23:12:07 +0200emmanuelux_(~emmanuelu@user/emmanuelux)
2023-04-23 23:13:02 +0200accord(uid568320@id-568320.hampstead.irccloud.com)
2023-04-23 23:13:12 +0200lottaquestions(~nick@2607:fa49:503f:6d00:5c2:d038:28d6:c518)
2023-04-23 23:14:17 +0200jpds4(~jpds@gateway/tor-sasl/jpds)
2023-04-23 23:14:53 +0200jpds3(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 255 seconds)
2023-04-23 23:17:11 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl)
2023-04-23 23:22:31 +0200merijn(~merijn@c-001-001-006.client.esciencecenter.eduvpn.nl) (Ping timeout: 276 seconds)
2023-04-23 23:24:22 +0200bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2023-04-23 23:32:58 +0200zeenk(~zeenk@2a02:2f04:a20f:5200::7fe)
2023-04-23 23:35:25 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com)
2023-04-23 23:35:25 +0200wroathe(~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host)
2023-04-23 23:35:25 +0200wroathe(~wroathe@user/wroathe)
2023-04-23 23:38:09 +0200milia(~milia@user/milia) ()
2023-04-23 23:40:23 +0200Inst(~Inst@2601:6c4:4081:54f0:4cd2:14dd:a80c:8533) (Read error: Connection reset by peer)
2023-04-23 23:49:14 +0200drdo(~drdo@bl14-14-164.dsl.telepac.pt)
2023-04-23 23:52:07 +0200__monty__(~toonn@user/toonn) (Quit: leaving)