Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 284 285 286 287 288 289 290 291 292 293 294 .. 5022
502,152 events total
2020-09-29 06:14:59 <fog> erm, not the whole of go obviously, just the async await stuff
2020-09-29 06:15:06 <fog> seemed pretty state of the art
2020-09-29 06:15:11 <gnumonik> Is there any way to use Control.Lens to update an element of a Data.Vector vector if it's present, and insert some other element if it's not? Or is that impossible because vectors aren't sufficiently maplike for a Control.Lens.At At instance?
2020-09-29 06:16:04 × polux2001 quits (~polux@51.15.169.172) (Quit: The Lounge - https://thelounge.github.io)
2020-09-29 06:16:10 <fog> what do you mean "if its present" - and "sufficently maplike" ?
2020-09-29 06:16:24 polux2001 joins (~polux@51.15.169.172)
2020-09-29 06:16:43 plutoniix joins (~q@175.176.222.7)
2020-09-29 06:16:48 jgt joins (~jgt@46.250.27.223.pool.breezein.net)
2020-09-29 06:17:20 <fog> im guessing you mean like Data.Map has a lookup key which is used by At
2020-09-29 06:17:38 <fog> so you want to lens to a specific position in the vector
2020-09-29 06:17:59 <fog> but then, what would it mean to have this "not be there"?
2020-09-29 06:18:05 <fog> arent vectors "full"?
2020-09-29 06:18:11 × unlink2 quits (~unlink2@p200300ebcf25bd0068eb9d9c94da2a17.dip0.t-ipconnect.de) (Remote host closed the connection)
2020-09-29 06:18:29 unlink2 joins (~unlink2@p200300ebcf25bd0068eb9d9c94da2a17.dip0.t-ipconnect.de)
2020-09-29 06:18:30 <gnumonik> er sorry, i meant an element at a given index in the vector. really i only care about the case where it's an empty vector
2020-09-29 06:19:23 <fog> hmm, i cant remember if vectors have fixed length... let me check the docs
2020-09-29 06:20:21 <fog> ah, no, they are specifcally supposed to support slicing, so i guess the empty vector is like the empty list, instead of like, a fixed length vector full of undefineds or something
2020-09-29 06:20:36 <fog> so im still not sure this "if its present" fits well with this
2020-09-29 06:20:45 <fog> do you just mean an out of bounds accessor?
2020-09-29 06:21:16 <fog> but then, i guess you couldnt have it "insert" at this position - basically thinking of it being listlike - so you would need all the values inbetween aswell
2020-09-29 06:21:38 <fog> basically, no, its not suffciently maplike to insert at an arbitrary out of bounds position
2020-09-29 06:21:43 × jgt quits (~jgt@46.250.27.223.pool.breezein.net) (Ping timeout: 256 seconds)
2020-09-29 06:22:46 × mu_ quits (~mu@unaffiliated/mu) (Read error: Connection reset by peer)
2020-09-29 06:23:08 × hiroaki quits (~hiroaki@ip4d176049.dynamic.kabel-deutschland.de) (Ping timeout: 272 seconds)
2020-09-29 06:23:17 <fog> i think you could be confusing it with something like memory addresses, where you would kind of malloc off a block, like the mutability of mvector
2020-09-29 06:23:27 mu_ joins (~mu@unaffiliated/mu)
2020-09-29 06:23:45 <fog> then you could have these presumably not containing any actual values. thats not how vectors work
2020-09-29 06:24:21 <fog> is it?
2020-09-29 06:25:56 jgt joins (~jgt@46.250.27.223.pool.breezein.net)
2020-09-29 06:26:19 <gnumonik> I just meant "empty" in the Data.Vector.empty sense I think? I dunno if those are empty in some deeper sense than V.null (V.empty) = True
2020-09-29 06:26:50 <fog> % null []
2020-09-29 06:26:51 <yahb> fog: True
2020-09-29 06:26:52 zacts joins (~zacts@dragora/developer/zacts)
2020-09-29 06:27:05 <fog> maybe you want https://hackage.haskell.org/package/array-0.5.4.0/docs/Data-Array.html
2020-09-29 06:28:31 <Xnuk> what is %
2020-09-29 06:28:50 <fog> > null []
2020-09-29 06:28:52 <lambdabot> True
2020-09-29 06:29:08 <fog> see how its either lambdabot or yahb that responds
2020-09-29 06:29:18 <fog> % is for messaging yahb
2020-09-29 06:29:19 <yahb> fog: ; <interactive>:133:1: error:; * Variable not in scope: is :: (t2 a0 -> (a0 -> f0 b0) -> f0 (t2 b0)) -> t0 -> t1 -> t; * Perhaps you meant one of these: `C.id' (imported from Control.Category), `id' (imported from Prelude), `iso' (imported from Control.Lens); <interactive>:133:8: error: Variable not in scope: messaging; <interactive>:133:18: error: Variable not in scope: yahb
2020-09-29 06:29:23 <fog> ...
2020-09-29 06:29:26 <Xnuk> awesome
2020-09-29 06:29:37 <Xnuk> > is for messaging lambdabot
2020-09-29 06:29:40 <lambdabot> error:
2020-09-29 06:29:40 <lambdabot> • Variable not in scope:
2020-09-29 06:29:40 <lambdabot> is :: (t2 a0 -> (a0 -> f0 b0) -> f0 (t2 b0)) -> t0 -> t1 -> t
2020-09-29 06:29:45 <fog> yes
2020-09-29 06:29:59 × alp quits (~alp@2a01:e0a:58b:4920:8dc4:6663:c8fb:d2c0) (Ping timeout: 272 seconds)
2020-09-29 06:30:07 <fog> yahb is sometimes better for supporting module imports and language extensions
2020-09-29 06:30:19 <fog> never quite sure when lambdabot is going to complain
2020-09-29 06:30:23 × jgt quits (~jgt@46.250.27.223.pool.breezein.net) (Ping timeout: 260 seconds)
2020-09-29 06:31:15 jonatanb joins (~jonatanb@83.24.231.247.ipv4.supernova.orange.pl)
2020-09-29 06:32:34 <fog> gnumonik: see; https://hackage.haskell.org/package/array-0.5.4.0/docs/Data-Array-MArray.html#g:3
2020-09-29 06:33:08 <fog> im guessing nobody online can answer about go or kotlin - ill return in a while
2020-09-29 06:33:08 × mu_ quits (~mu@unaffiliated/mu) (Read error: Connection reset by peer)
2020-09-29 06:33:18 mu__ joins (~mu@unaffiliated/mu)
2020-09-29 06:33:37 <gnumonik> I'll check it out, thanks. That might be overkill though. I read that "never use lists" article and converted a bunch of lists that will never hold more than a dozen elements into vectors because... I dunno
2020-09-29 06:33:43 × fog quits (a181460d@gateway/web/cgi-irc/kiwiirc.com/ip.161.129.70.13) (Quit: Connection closed)
2020-09-29 06:34:31 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Quit: Goodbye)
2020-09-29 06:34:57 filwisher joins (~filwisher@cpc76738-dals23-2-0-cust186.20-2.cable.virginm.net)
2020-09-29 06:35:04 jgt joins (~jgt@46.250.27.223.pool.breezein.net)
2020-09-29 06:35:08 thir joins (~thir@p200300f27f0fc60094e773283d7bf825.dip0.t-ipconnect.de)
2020-09-29 06:35:34 <Xnuk> https://hackage.haskell.org/package/async
2020-09-29 06:38:00 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-29 06:40:01 dhouthoo joins (~dhouthoo@ptr-eiv6509pb4ifhdr9lsd.18120a2.ip6.access.telenet.be)
2020-09-29 06:40:46 × jgt quits (~jgt@46.250.27.223.pool.breezein.net) (Ping timeout: 256 seconds)
2020-09-29 06:42:30 <hc> ah, the beautiful async package. :) multithreaded programming is one of the most enjoyable things to do in haskell imho
2020-09-29 06:42:47 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2020-09-29 06:42:47 × mu__ quits (~mu@unaffiliated/mu) (Read error: Connection reset by peer)
2020-09-29 06:43:17 mu_ joins (~mu@unaffiliated/mu)
2020-09-29 06:43:46 danvet_ joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
2020-09-29 06:43:49 × ph88^ quits (~ph88@ip5f5af71a.dynamic.kabel-deutschland.de) (Remote host closed the connection)
2020-09-29 06:44:19 jgt joins (~jgt@46.250.27.223.pool.breezein.net)
2020-09-29 06:44:27 × thir quits (~thir@p200300f27f0fc60094e773283d7bf825.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2020-09-29 06:48:27 × jgt quits (~jgt@46.250.27.223.pool.breezein.net) (Ping timeout: 240 seconds)
2020-09-29 06:50:21 fog joins (a1814696@gateway/web/cgi-irc/kiwiirc.com/ip.161.129.70.150)
2020-09-29 06:50:22 drbean joins (~drbean@TC210-63-209-154.static.apol.com.tw)
2020-09-29 06:50:48 <fog> hc: do you know how this compares to the "job" and "structured concurrency" notions from kotlin (discussed in the talk linked)
2020-09-29 06:51:06 m0rphism joins (~m0rphism@HSI-KBW-046-005-177-122.hsi8.kabel-badenwuerttemberg.de)
2020-09-29 06:51:28 <hc> fog: kotlin in based on the java vm, so I guess they'll be using some async/await concept?
2020-09-29 06:51:37 <fog> they have a fancy "launch" thing that somehow captures all of the scopes nicely and does error propagation in a way that is somehow good
2020-09-29 06:51:53 <hc> lemme check it
2020-09-29 06:51:56 <fog> hc: argh, i cant really summarise the talk very well...
2020-09-29 06:52:46 × polyrain quits (~polyrain@130.102.13.187) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-09-29 06:52:46 × mu_ quits (~mu@unaffiliated/mu) (Read error: Connection reset by peer)
2020-09-29 06:52:47 <fog> it was something to do with branching concurent substructures all being contained in the same kind of overall thread
2020-09-29 06:53:09 <fog> so that errors could not "leak from the context" or something...
2020-09-29 06:53:13 <hc> could you give me a link to the talk? i cannot find it in the backlog
2020-09-29 06:53:25 <fog> https://www.youtube.com/watch?v=Mj5P47F6nJg
2020-09-29 06:53:30 jgt joins (~jgt@46.250.27.223.pool.breezein.net)
2020-09-29 06:53:30 mu_ joins (~mu@unaffiliated/mu)
2020-09-29 06:53:39 <hc> thx
2020-09-29 06:53:45 <fog> "Roman Elizarov — Structured concurrency"
2020-09-29 06:54:22 <fog> i think it was something to do with "go considered harmful"
2020-09-29 06:54:26 <hc> having a look at it now
2020-09-29 06:54:29 <fog> ok
2020-09-29 06:54:47 × fog quits (a1814696@gateway/web/cgi-irc/kiwiirc.com/ip.161.129.70.150) (Client Quit)
2020-09-29 06:55:17 <hc> ah. "inspired by async/await". 2nd slide. so it cannot be good ;p
2020-09-29 06:55:19 UltimateNate joins (~UltimateN@185.189.112.19)
2020-09-29 06:55:49 × mu_ quits (~mu@unaffiliated/mu) (Client Quit)

All times are in UTC.