Logs: freenode/#haskell
| 2021-03-28 11:42:54 | × | berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 245 seconds) |
| 2021-03-28 11:43:24 | → | berberman joins (~berberman@unaffiliated/berberman) |
| 2021-03-28 11:44:10 | <romesrf> | i figured my problem out some other way |
| 2021-03-28 11:44:31 | <romesrf> | my question was far from good hahah, thank you curl, catMaybes was useful :) |
| 2021-03-28 11:45:40 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 2021-03-28 11:47:39 | × | jacks2 quits (~bc8134e3@217.29.117.252) (Quit: quit) |
| 2021-03-28 11:49:12 | × | xff0x quits (~xff0x@2001:1a81:5218:cc00:f32e:e077:cf40:ecd7) (Quit: xff0x) |
| 2021-03-28 11:50:04 | × | curl quits (5ce955fb@gateway/web/cgi-irc/kiwiirc.com/ip.92.233.85.251) (Quit: Connection closed) |
| 2021-03-28 11:52:13 | → | malumore joins (~malumore@151.62.119.109) |
| 2021-03-28 11:52:47 | <Uniaika> | maralorn: got your message from the 26th, thanks for the heads-up :) |
| 2021-03-28 11:52:47 | <siers> | ski, that sprunge.us ↑ is what I came up with. I was hoping this would theoretically give me faster code without branches if the code gets specialized |
| 2021-03-28 11:53:36 | <siers> | ski, but it seems that I'll just use a ADT and have branches. I know that it will be very guessable for the branch prediction |
| 2021-03-28 11:54:32 | → | stree joins (~stree@68.36.8.116) |
| 2021-03-28 11:55:48 | → | mouseghost joins (~draco@wikipedia/desperek) |
| 2021-03-28 11:56:04 | × | mrd quits (~mrd@debian/developer/mrd) (Remote host closed the connection) |
| 2021-03-28 12:00:09 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-03-28 12:01:46 | → | drbean_ joins (~drbean@TC210-63-209-56.static.apol.com.tw) |
| 2021-03-28 12:01:56 | × | geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 268 seconds) |
| 2021-03-28 12:04:05 | → | mrd joins (~mrd@45.61.147.211) |
| 2021-03-28 12:04:11 | × | mrd quits (~mrd@45.61.147.211) (Changing host) |
| 2021-03-28 12:04:11 | → | mrd joins (~mrd@debian/developer/mrd) |
| 2021-03-28 12:05:24 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 2021-03-28 12:05:28 | × | hexfive quits (~hexfive@50.35.83.177) (Quit: i must go. my people need me.) |
| 2021-03-28 12:05:46 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 2021-03-28 12:11:03 | × | lawid quits (~quassel@dslb-090-186-099-083.090.186.pools.vodafone-ip.de) (Read error: Connection reset by peer) |
| 2021-03-28 12:12:22 | <maerwald> | Another problem with the abstract filepath proposal I discovered: there's no way to write a sensible total IsString instance, since String can contain e.g. NUL, which is disallowed on both windows and unix. Can that instance really ignore this? |
| 2021-03-28 12:15:13 | <Uniaika> | IsString instance is a bad thing in this case |
| 2021-03-28 12:15:20 | <Uniaika> | (I many cases actually) |
| 2021-03-28 12:15:35 | <Uniaika> | koz_ has a nice alternative approach with quasi-quoters for ASCII text |
| 2021-03-28 12:15:38 | → | lawid joins (~quassel@dslb-084-059-133-060.084.059.pools.vodafone-ip.de) |
| 2021-03-28 12:17:20 | → | ixlun joins (~matthew@109.249.184.133) |
| 2021-03-28 12:17:51 | → | EyalSK joins (~EyalSK@2a10:8003:382:0:8c97:7234:8b62:78bd) |
| 2021-03-28 12:18:25 | → | shad0w_ joins (a0ca255a@160.202.37.90) |
| 2021-03-28 12:18:36 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 268 seconds) |
| 2021-03-28 12:25:02 | → | xff0x joins (~xff0x@2001:1a81:5218:cc00:1202:f6b4:5d5f:dc8c) |
| 2021-03-28 12:27:49 | → | jacks2 joins (~bc8134e3@217.29.117.252) |
| 2021-03-28 12:27:52 | → | JusTrying joins (63ea3fd6@cpe64777d649f83-cm64777d649f80.cpe.net.cable.rogers.com) |
| 2021-03-28 12:29:06 | → | toorevitimirp joins (~tooreviti@117.182.181.200) |
| 2021-03-28 12:30:21 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:f0bc:f236:90c7:a6f5) |
| 2021-03-28 12:32:24 | <JusTrying> | Learning Haskell and got an assignment to do. My execution always gets stuck on this bit: https://paste.tomsmeding.com/kDIv2Ior. I have evaluated the if statement separately and it works but not when its used to update the variable |
| 2021-03-28 12:33:25 | <mouseghost> | wah? |
| 2021-03-28 12:33:38 | <mouseghost> | haskell variables are immutable |
| 2021-03-28 12:34:36 | <JusTrying> | I see, so I simply cannot update the variable once assigned a value |
| 2021-03-28 12:34:40 | <JusTrying> | whats the best way around this |
| 2021-03-28 12:34:55 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:f0bc:f236:90c7:a6f5) (Ping timeout: 258 seconds) |
| 2021-03-28 12:35:04 | <L29Ah> | nonono, haskell variables are mutable |
| 2021-03-28 12:35:08 | <mouseghost> | oh D:? |
| 2021-03-28 12:35:10 | <mouseghost> | ma bad ;w; |
| 2021-03-28 12:35:11 | <L29Ah> | but that's a binding, not a variable |
| 2021-03-28 12:35:14 | <mouseghost> | oh |
| 2021-03-28 12:36:12 | <JusTrying> | is there any particular reason that bit of code would get stuck at exeuction? |
| 2021-03-28 12:36:22 | <JusTrying> | if i comment it out, everything else works fine |
| 2021-03-28 12:36:31 | <L29Ah> | the reason is that you made a recursion |
| 2021-03-28 12:36:43 | <L29Ah> | as you refered the binding itself in its definition |
| 2021-03-28 12:37:17 | <JusTrying> | hmm, so that causes it to evaluate all over again |
| 2021-03-28 12:37:38 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-98-245.w86-212.abo.wanadoo.fr) |
| 2021-03-28 12:37:52 | <JusTrying> | I learned that if statments have a separate scope so the best was to update variables is by using if statments for values |
| 2021-03-28 12:38:13 | <JusTrying> | but how do I make it so the value is not changed if the if statements is not true |
| 2021-03-28 12:39:04 | <shad0w_> | L29Ah: did you mean, immutable ? |
| 2021-03-28 12:39:06 | <L29Ah> | just name your bindings uniquely so you don't accidentally reference itself |
| 2021-03-28 12:39:17 | <L29Ah> | shad0w_: no |
| 2021-03-28 12:39:25 | <haskellstudent> | ok I finally figured out the mistery. I have to run the program with +RTS --disable-delayed-os-memory-return AND manually call performGC to get the memory back https://paste.tomsmeding.com/gvZwDLa4 |
| 2021-03-28 12:39:33 | <L29Ah> | shad0w_: a variable in haskell is called IORef, just to confuse people :) |
| 2021-03-28 12:40:00 | <shad0w_> | isn't IORef like a pointer ? |
| 2021-03-28 12:40:00 | <L29Ah> | and in the language itself there are no variables |
| 2021-03-28 12:40:30 | <JusTrying> | I will need to update variable based on if statements several times so having unique names would be a bit of a hassle |
| 2021-03-28 12:40:35 | <JusTrying> | bindings I meant |
| 2021-03-28 12:42:19 | <L29Ah> | JusTrying: on the other hand, if you do that, you won't have a same name for different values, so it won't confuse you |
| 2021-03-28 12:43:26 | <L29Ah> | shad0w_: yeah |
| 2021-03-28 12:43:53 | <L29Ah> | there's no variables that are passed by value by default |
| 2021-03-28 12:44:05 | <JusTrying> | my assignment is to evaluate a poker hand, my current elixir implementation evaluates each case (straight, flush e.t.c) 1 by 1 and each time updating the variable |
| 2021-03-28 12:44:08 | <JusTrying> | thats what I was trying to do |
| 2021-03-28 12:44:15 | <shad0w_> | im sure i read somewhere haskell variables are immutable. and ghci treats them special to make it easy think they are mutable ? |
| 2021-03-28 12:44:46 | <L29Ah> | > let a = 1 in let a = a in a |
| 2021-03-28 12:44:48 | <lambdabot> | *Exception: <<loop>> |
| 2021-03-28 12:45:02 | <L29Ah> | % let a = 1 in let a = a in a |
| 2021-03-28 12:45:07 | <yahb> | L29Ah: [Timed out] |
| 2021-03-28 12:45:17 | <L29Ah> | same in ghci |
| 2021-03-28 12:45:58 | <hpc> | ghci is like a giant do block in that respect - when you define the same variable on multiple lines the most recent one shadows the older ones |
| 2021-03-28 12:46:03 | → | LKoen joins (~LKoen@191.254.88.92.rev.sfr.net) |
| 2021-03-28 12:50:28 | → | coot joins (~coot@37.30.55.131.nat.umts.dynamic.t-mobile.pl) |
| 2021-03-28 12:50:32 | → | ADG1089 joins (~aditya@27.58.165.185) |
| 2021-03-28 12:52:55 | × | shad0w_ quits (a0ca255a@160.202.37.90) (Quit: Connection closed) |
| 2021-03-28 12:53:08 | × | _ashbreeze_ quits (~mark@64.85.214.234.reverse.socket.net) (Remote host closed the connection) |
| 2021-03-28 12:53:45 | × | Vadrigar_ quits (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) (Ping timeout: 268 seconds) |
| 2021-03-28 12:54:40 | → | _ashbreeze_ joins (~mark@64.85.214.234.reverse.socket.net) |
| 2021-03-28 12:57:03 | → | geekosaur joins (ae68c070@cpe-174-104-192-112.neo.res.rr.com) |
| 2021-03-28 12:58:10 | <maerwald> | Uniaika: yes, quasiquoters are a non-issue. But they don't solve the problem of user-input. |
| 2021-03-28 12:58:39 | <maerwald> | I guess it's ok to provide a fromString that returns Maybe |
| 2021-03-28 12:58:48 | <maerwald> | and for statically known thing refer ppl to quasiquoters |
| 2021-03-28 12:59:14 | <maerwald> | I use them heavily myself, but they increase compile-time and break hasktags |
| 2021-03-28 13:01:07 | <Uniaika> | I switched from hasktags some time ago |
| 2021-03-28 13:01:18 | <maerwald> | to? |
| 2021-03-28 13:01:18 | <Uniaika> | maerwald: ah okay, I thought the IsString instance was for user input |
| 2021-03-28 13:01:30 | <maerwald> | it is for that and overloadedstrings |
| 2021-03-28 13:01:36 | <Uniaika> | maerwald: I have fast-tags installed |
| 2021-03-28 13:01:50 | <maerwald> | most ppl prefer OverloadedStrings over quasiquoters |
| 2021-03-28 13:02:36 | <Uniaika> | maerwald: well, you need to make a choice between favouring what most people think they want, or have them use quasi-quoters and have them be safe |
| 2021-03-28 13:03:00 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 2021-03-28 13:03:09 | <maerwald> | TH is a plague :) so you have the choice between that and a partial instance |
All times are in UTC.