00:00:56disrupteklet x = internalErrorFlag()
00:01:07disrupteki remember araq chuckling to himself when he wrote line 550.
00:02:03saemJulius: yeah, I don't remember how that code works, guessing it uses the usage lookup and edits them. Easy fix there is to limit it to workspace folders only and that's correct enough. If you're curious this is what does it: https://github.com/saem/vscode-nim/blob/main/src/nimvscode/nimRename.nim
00:05:52*hmmm quit (Quit: WeeChat 3.0)
00:10:03ForumUpdaterBotNew thread by Aredirect: What is the best way to override a generic method?, see https://forum.nim-lang.org/t/7400
00:15:05FromDiscord<juliuskiesian> https://github.com/saem/vscode-nim/blob/main/src/nimvscode/nimRename.nim#L23 it's already limited to the workspace, right?
00:16:56FromDiscord<juliuskiesian> i need to get offline and take some rest, folks. see u soon.
00:19:36*jkiesian quit (Remote host closed the connection)
00:58:58*idf_ quit (Ping timeout: 246 seconds)
01:02:06*krux02 quit (Quit: Leaving)
01:03:49*Tanger joined #nim
02:15:25FromGitter<JohnAD> Just for fun, I'm live streaming some coding in 15 minutes on YouTube. https://youtu.be/G3VvB-Euvik I'm not *entirely* sure why I'd want to make a habit of it, but something to try.
02:16:07*antranigv quit (Quit: ZNC 1.8.2 - https://znc.in)
02:16:36*antranigv joined #nim
02:23:20FromGitter<JohnAD> (Specifically, I'm working on the decimal library that will possibly end up in the standard library for Nim.)
02:29:21FromDiscord<Quibono> Wohoo
03:01:24FromDiscord<exelotl> Man I'm so frustrated with `std/with`
03:01:33disruptekjust ignore it.
03:04:28*lritter quit (Ping timeout: 260 seconds)
03:04:40FromDiscord<ElegantBeef> `with ignored:`
03:05:05*lritter joined #nim
03:06:22FromDiscord<exelotl> I already spent a few evenings improving it and preparing a PR with my improvements.↵But the more I try to write about what I did, the more the cracks begin to show. 😩
03:07:42FromDiscord<exelotl> To fill in the cracks it needs a `typed` pass and that's a whoooole can of worms
03:09:52disruptekwhat have you done so far?
03:16:32FromDiscord<exelotl> changes: https://github.com/exelotl/Nim/commit/2eecda521ef8503581b36cb16259903c5638fe1a?branch=2eecda521ef8503581b36cb16259903c5638fe1a
03:16:41FromDiscord<exelotl> notes: https://pastebin.com/raw/Nj9cuyNV
03:17:49disruptekwhat i want is "replace the first argument of every call in the body, when that argument is of the same type; else leave it alone". if you don't want to do it, i don't mind writing it.
03:21:53FromDiscord<exelotl> How difficult is it to figure out whether a call is eligible for rewriting?
03:22:04disruptekit's the only hard part.
03:23:12disruptekbut if it doesn't do that, it's not worth importing. just my opinion.
03:28:11FromDiscord<exelotl> It also should handle fields right? like inc(x) becomes inc (pos.x) or if there happens to be a `proc inc(p: var Pos, n: int)` then it becomes pos.inc(pos.x)
03:29:55disruptekthe 2nd makes no sense to me; i personally don't care about the first.
03:31:33FromDiscord<exelotl> The use case that got me looking at this was like↵with entity: vel.x = 2
03:32:04FromDiscord<exelotl> It simply didn't understand that I wanted to do entity.vel.x = 2
03:32:20disruptekand neither do i.
03:32:33disrupteki certainly don't understand pos.inc(pos.x)
03:33:00disruptekbut don't worry about what i want.
03:33:08disrupteki can rarely use this shit anyway.
03:33:48saemOuch, this seems I'll considered
03:37:03FromDiscord<exelotl> disruptek: if you have time I'd like to see what you can come up with, I feel like anything would be less flimsy than the current `with` even if it's not exactly what I personally want
03:39:06FromDiscord<exelotl> I rly need to sleep tho
03:39:41saemI think it being treated as strictly an AST transform, as opposed to looking at symbol resolution and picking the best candidate is the issue.
03:40:44saemI mean with could just be aiming too low and you can't, without breaking things, aim higher.
03:41:52FromDiscord<ElegantBeef> @exelotl i've got some ideas to try to implement the fancy logic
03:42:01disruptekit's certainly aiming too low.
03:42:03saemOr due to the fact that it's be too easy to get spurious matches, there aren't particularly useful heuristics.
03:45:55disrupteki think i'm the wrong guy to design it. i can't think of too many cases where i wouldn't rather have explicit code. it's just something i reached for several times and could not make work the way i expected.
04:08:55FromDiscord<ElegantBeef> One thing i could see working ok is just having `with varIdent` replacing `_` with the identifier given, although not much better than just writing explictly
04:16:00*spiderstew joined #nim
04:17:36*spiderstew_ quit (Ping timeout: 264 seconds)
04:18:17*rockcavera quit (Remote host closed the connection)
04:26:35*xet7 quit (Remote host closed the connection)
04:30:26*xet7 joined #nim
04:31:53*xet7 quit (Remote host closed the connection)
04:33:35*xet7 joined #nim
04:33:53*a_chou joined #nim
04:39:16*lritter quit (Ping timeout: 240 seconds)
04:41:44FromGitter<JohnAD> Hmmm. OBS and YouTube showed a health stream. But now that it's done there is no sign that anything happened. Oh well; at least I got 90 more minutes of coding done.
04:43:56*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
04:56:09*a_chou quit (Remote host closed the connection)
05:03:46*pbb joined #nim
05:24:27saemI think with should work more like Kotlin's with.
05:40:48FromDiscord<ElegantBeef> saem what's kotlin do?
05:48:24FromDiscord<ElegantBeef> Ah yea similar to what i was proposing
05:48:49FromDiscord<Rika> honestly hate the idea of with
05:48:49saemThat explains it well, but the idea is to look determine what the most sensible thing to dispatch it against as opposed to simply set the first parameters on procs, or even fields
05:48:54saemYeah, I think so
05:49:02FromDiscord<Rika> makes it unclear what objects are being passed into procs
05:49:17FromDiscord<ElegantBeef> i prefer the `let` method
05:49:34disruptekthe what?
05:50:10saemI like all of them, but kotlin is different.
05:50:31FromDiscord<Rika> ill be fine with any of these if we could change the binding variable from `it` to anything else or so
05:51:05FromDiscord<Rika> which wouldnt be much different from just making a block and assigning something
05:56:08saemAnyhow the tricky bit in Nim is that there is no precedence difference between two procs where the their signatures only differs in the presence of the first parameter being the same as the thing you are "with"ing on.
06:02:39saemfoo(int) and foo(MyWithType, int)... which one should be called? I think the correct answer is the first one, but this also means that with blocks can easily break by introducing a proc anywhere else in scope. That's... ungood.
06:09:26FromDiscord<ElegantBeef> @Rika i mean i think the kotlin `.let` is the nicest, and i totally didnt make it https://play.nim-lang.org/#ix=2MwR
06:10:15FromDiscord<Rika> i didnt ask
06:10:18FromDiscord<Rika> disruptek did
06:10:47FromDiscord<ElegantBeef> I was responding to your "fine with any, but if you could rebind it"
06:11:18FromDiscord<Rika> any of these => let, with, etc
06:18:56FromDiscord<JSONBash> not sure if anyone has the time but I could use some help getting started on wrapping a C lib
06:38:51*waleee-cl quit (Quit: Connection closed for inactivity)
06:51:55*idf joined #nim
07:02:00*lritter joined #nim
07:13:40*narimiran joined #nim
07:22:01FromDiscord<enimatek> maybe wise to just ask questions about the wrapping that can be answered immediatly, chances of finding someone that is going to 'help' all the way through 'holding hands' are small i guess
07:24:55FromDiscord<JSONBash> yeah i thought that too, just didnt want to flood the general chat, and i think my questions need a bit of setup
07:24:59FromDiscord<JSONBash> but ill give that a go
07:31:13*Tanger quit (Read error: Connection reset by peer)
07:31:40*Tanger joined #nim
07:36:59*PMunch joined #nim
07:41:17*krux02 joined #nim
07:42:59PMunchHey Araq, after you told me that GC'ed data could be sent between threads yesterday I was wondering when the handoff happens. I had my small experiment with workstealing across threads based on closure iterators, but IIRC it worked by inspecting a memory region of other threads while they were running something and taking the closure iterators out of its array of scheduled tasks. I'm assuming this won't work since there is no "official" hand-off between the
07:50:23*tane joined #nim
08:15:10*habamax joined #nim
08:17:41FromDiscord<Varriount> If I recall correctly, the parameters passed to the thread when it first starts are deeply copied.
08:17:57PMunchNot with ARC
08:18:48PMunchhttps://forum.nim-lang.org/t/7397 <- try running this with the normal GC and ARC
08:55:33*Tanger quit (Quit: Leaving)
09:04:36AraqPMunch, I think it's broken. Problem is that Thread[T] should have been a Thread without T parametrization
09:05:50PMunchWell that wouldn't really be a factor here. All my threads where void IIRC
09:14:19*hoijui joined #nim
09:28:09*abm joined #nim
09:30:31*lritter quit (Remote host closed the connection)
09:31:04*leorize quit (Ping timeout: 268 seconds)
09:37:16*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:38:11*leorize joined #nim
09:38:32*Vladar joined #nim
09:38:58FromDiscord<Clyybber> Araq: When you review https://github.com/nim-lang/Nim/pull/16746/files?diff=unified&w=1 its probably best to use the ignore whitespace option as in this link
09:38:59disbot➥ 3Reboot of #16195
09:55:39*mbomba joined #nim
10:04:14*mbomba quit (Quit: WeeChat 3.0)
10:15:47*Vladar quit (Quit: Leaving)
10:18:55FromDiscord<SirJosh> sent a long message, see http://ix.io/2My3
10:23:52PMunchWell easiest is -d:danger
10:25:32*Northstrider[m] quit (Quit: killed)
10:26:50PMunchHmm, ARC doesn't seem to like options with reference types
10:26:58FromDiscord<SirJosh> that brings it down to about 1.7s
10:27:38*Northstrider[m] joined #nim
10:27:53FromDiscord<SirJosh> i actually chose `markAndSweep` from a version that didn't use `Option`, as it was faster than the reference counting stuff by a large margin
10:28:04FromDiscord<SirJosh> (edit) "from" => "based on the performance of" | "based on the performance ofa ... versionof" 03added "similar" | "asimilarversion ... that" 03added "of the code"
10:28:13FromDiscord<SirJosh> (edit) "reference counting stuff" => "default gc"
10:28:52PMunchCompiling with the C++ backend is also sometimes a speedup (this one does)
10:29:15PMunchYeah M&S is pretty fast
10:30:25PMunchUses a bit more memory than ARC though
10:30:37PMunchOr rather it doesn't have the same guarantees as ARC when it comes to memory consumption
10:31:29PMunch--passC:-flto also gives a small boost
10:33:37FromDiscord<SirJosh> oh yeah the -flto thing brings the variance of `time` down closer to a 1.5~1.7 range rather than a 1.7~1.8 range
10:34:45PMunchPre-computing people (and then switching to ARC) given a solid speedup: http://ix.io/2My9
10:35:09PMunchI'm compiling that with `nim cpp -d:danger --passC:-flto --gc:arc --passC:-static test`
10:36:02FromDiscord<SirJosh> having `people` be inside of the loop is part of the work that i don't want elided (including the two arrays created from the `string.split()`, and then the `map` following that)
10:36:16PMunchAh right
10:36:42FromDiscord<lqdev> speaking of ARC… i just compiled my interpreter with --gc:arc and it got about 2.5x faster
10:43:23Zevvthen your code is baaad
10:43:41Zevvreal men don't depend on heap memory!
10:45:03FromDiscord<lqdev> imagine not using seqs
10:45:08PMunch@SirJosh: http://ix.io/2wTY you can optimise your split procedure by pre-allocating the size of the sequence
10:45:09FromDiscord<lqdev> this post was made by sane people gang
10:45:45PMunch@SirJosh, compiled like this: `nim cpp -d:danger --passC:-flto --gc:markandsweep --passC:-static test`
10:48:58FromDiscord<SirJosh> ah sure yeah that seems reasonable enough to do
10:51:34FromDiscord<SirJosh> lol for some reason, compiling how you suggested is giving me `out of memory` errors (i have 32GB of ram)↵compiling with `-d:release` makes it not crash
10:53:16PMunchHmm, that is very strange
10:53:32PMunchWorks fine for me and I have 16GB :P
10:59:15*vicfred quit (Quit: Leaving)
11:01:26*Tanger joined #nim
11:02:01*Vladar joined #nim
11:04:27*hoijui quit (Ping timeout: 272 seconds)
11:05:15*hffqyd joined #nim
11:06:44*hffqyd quit (Client Quit)
11:08:22PMunchShould I report the Option/ARC issue? Or is this a known thing?
11:10:48FromDiscord<Clyybber> PMunch: Which issue?
11:11:08PMunchIn SirJosh's initial sample it was impossible to compile with ARC
11:11:36PMunchBecause it tried reading the `has` field of a reference Option (which just checks if its nil instead)
11:11:49PMunchThis was a C compiler error, not a Nim error
11:14:22PMunchSlightly more minified sample: http://ix.io/2Myi
11:14:59PMunchAnd this works: http://ix.io/2Myj
11:16:18*hoijui joined #nim
11:17:10FromDiscord<Clyybber> Thats not reported yet
11:18:26FromDiscord<Clyybber> very interesting that it only pops up with gc:arc tho
11:19:28PMunchI've seen similar issues with the default GC when using distinct types
11:20:31*Torro joined #nim
11:21:53FromDiscord<Clyybber> Oh, actually it looks similar to https://github.com/nim-lang/Nim/issues/14387
11:22:00disbot➥ 3Invalid C code generated when creating an Option out of deref'd value, which contains a reference to its own type, gotten from an Option which is None at compile time. ; snippet at 12https://play.nim-lang.org/#ix=2Mym
11:22:23FromDiscord<arnetheduck> @Araq https://github.com/nim-lang/Nim/blob/bd5ce5b351ec59d844dfdff462f23a2365fb1d61/lib/system/alloc.nim#L925 - why does the code cast the key to a pointer? the key is not a pointer, it's shifted from what I can tell: https://github.com/nim-lang/Nim/blob/bd5ce5b351ec59d844dfdff462f23a2365fb1d61/lib/system/alloc.nim#L346
11:22:38PMunchAh yes, that looks related
11:22:52FromDiscord<Clyybber> PMunch: although that one fails for refc too
11:23:07FromDiscord<Clyybber> But it's still very similar
11:23:15PMunchI'll create a new one and mention that one then
11:23:27FromDiscord<Clyybber> Sounds good
11:24:12FromDiscord<arnetheduck> not only is the key shifted inside the incl function, it's also turned into a pageindex first: https://github.com/nim-lang/Nim/blob/bd5ce5b351ec59d844dfdff462f23a2365fb1d61/lib/system/alloc.nim#L625
11:27:59disbot➥ 3ARC not playing nice with Option of ref type ; snippet at 12https://play.nim-lang.org/#ix=2Myp
11:33:42*hoijui quit (Ping timeout: 260 seconds)
11:46:29*PMunch quit (Quit: leaving)
11:57:46*narimiran quit (*.net *.split)
11:57:47*casaca quit (*.net *.split)
11:57:48*deepend quit (*.net *.split)
11:57:48*jken quit (*.net *.split)
11:57:48*lain quit (*.net *.split)
11:57:48*drewr quit (*.net *.split)
11:57:55*jken joined #nim
11:58:21*a_b_m joined #nim
11:58:25*casaca joined #nim
11:58:40*lain joined #nim
11:58:49*narimiran joined #nim
11:59:34*drewr joined #nim
12:00:08*deepend joined #nim
12:00:45*abm quit (Ping timeout: 256 seconds)
12:10:05FromGitter<gogolxdong> Is there any Homomorphic Encryption nimble package?
12:11:08FromDiscord<Clyybber> PMunch: Thanks, can you take a look at krux' review here https://github.com/nim-lang/Nim/pull/12655 ; I addressed the other one via githubs suggestion thingy
12:11:10disbot➥ 3Fix issue with fields trying to use wrong name ; snippet at 12https://play.nim-lang.org/#ix=2aYc
12:50:23FromDiscord<arnetheduck> actually, nevermind - incl is not used for the root, add is, which doesn't shift: https://github.com/nim-lang/Nim/blob/bd5ce5b351ec59d844dfdff462f23a2365fb1d61/lib/system/alloc.nim#L743
12:53:56*rockcavera joined #nim
13:03:03*cvoxel joined #nim
13:27:29*wasted_youth joined #nim
13:34:08FromDiscord<Clyybber> Araq: Can you take a look at https://github.com/nim-lang/Nim/pull/16746/files?diff=unified&w=1
13:34:10disbot➥ 3Reboot of #16195
13:36:39*cgfuh joined #nim
14:05:34*PMunch joined #nim
14:13:45Oddmongerhttps://play.nim-lang.org/#ix=2KJo : is this the best way to count the size of the biggest substring ?
14:14:12Oddmongeri know i could split the string in a seq and then iterate the seq, but must be slower
14:16:56*Vladar quit (Quit: Leaving)
14:18:39Oddmongeri've just had a look in parseutils, but didn't find something relevant
14:38:36PMunchOddmonger, is that the right URL?
14:38:45PMunchBecause that isn't counting anything..
14:39:14Oddmongeroh sorry, wrong link
14:40:07PrestigePMunch: I wanted to show you something, don't disappear for like 2 mins
14:40:45PrestigeI went to show you this yesterday and you disconnected as I was typing the message, lol
14:42:09PMunchOddmonger, I would tidy it up a bit, but yeah that should be about the fastest
14:42:26PMunchUnless you get into some SIMD trickery
14:43:27Oddmongerthank you. In fact, i think i will use the split function of strtools
14:43:43PMunchPrestige, oh that's pretty neat
14:43:47Oddmongerbecause what interest me is the rendered width of the longest substring
14:44:11Oddmongerso i have to precalc with ttf functions
14:45:08PMunchWell if you want rendered width you need to call your rendering library
14:46:04Oddmongeryes (sdl_ttf has functions for that)
14:49:00PMunchPrestige, unfortunately the rendering library I'm using doesn't support markdown :(
14:50:50PrestigeThat would be neat to add, but I like the library even if it didn't support md
14:52:46PMunchShould be able to do most of that (if not all) with notifishower :)
14:53:39PMunchMaybe I should add a switch to not run but only output the x/y/w/h of where it's going to go in case you want to do faux transparency or other effects
14:55:38leorize@mratsim you free?
15:01:33*l1x joined #nim
15:02:36l1xwhat should I read if I would like to create a project in Nim that has multiple threads and connections to a Postgres database (i found the pg driver). is channels the way to have IoC in Nim?
15:04:23*hoijui joined #nim
15:05:19PMunchChannels is a convenient way to communicate between threads
15:05:31PMunchNot sure how that relates to Inversion of Control
15:07:13l1xyes it does :)
15:07:22l1xgreat i read that chapter of the book than, thanks
15:07:53FromDiscord<mratsim> @leorize, I can listen but not code.
15:08:52leorizewhat is this `Alias` type in concepts-related errors?
15:09:23FromDiscord<mratsim> I don't remember.
15:09:44FromDiscord<mratsim> I think it's when you do "concept x, type T"
15:10:01FromDiscord<mratsim> or when you do "type T = auto" within the concept body
15:10:29FromDiscord<mratsim> I know that the semcheck has some error that throw "alias" in typedesc/auto proc.
15:10:37FromDiscord<mratsim> and there is a node called tyAlias iirc.
15:17:40*Vladar joined #nim
15:17:44leorizeso it's saying that my concepts didn't match
15:18:18leorizedue to `(fd == fd) is bool` not valid with `<Alias, Alias>`
15:19:24leorizeinterestingly, my `==`(a, b: FD) {.borrow.} was not in the list of overloads shown
15:34:39disruptekit's almost as if concepts don't work.
15:39:45Oddmongerif i have a file with lines like this:
15:39:55Oddmongerkey="a" value="foo"
15:40:33disruptekuse strscans to parse it. 😉
15:40:38Oddmongerwith the macro system of nim, is it possible to transform it to a table at compilation ?
15:41:19Oddmongerand does it worth the time , vs my usual method ? (awk in the makefile)
15:41:32FromDiscord<Rika> depends, are you sick of awk?
15:41:36leorizeif it gets rid of the makefile then its good
15:41:36disrupteki would personally rather write nim.
15:42:16Oddmongerwell i keep my makefile, because it serves for other things difficult to do with nimscript
15:42:36Oddmongerwith a macro, would the file be parsed at each compilation ?
15:42:39ozI have an issue with karax (native) where the input macro won't accept a `value` param/attribute
15:42:56*waleee-cl joined #nim
15:43:24FromDiscord<Rika> i dont see how it would work otherwise, oddmonger
15:43:25oz`value=` is not found... anyone had this? If not, I need to find a way to isolate it properly to make a failing test. :>
15:43:55Oddmonger@Rika : you mean it will be generated each time ?
15:44:27Oddmongeri was thinking of a checksum which would had prevented this
15:44:31FromDiscord<Rika> generate what? i thought you were parsing a file into a nim table
15:44:32Oddmongeronce the file is cached
15:44:56Oddmongerah, no the idea is to «include» a file in compilation chain
15:47:08Oddmongeror maybe using this good old Lua, til i'm ready for macross+
15:47:48FromDiscord<Rika> i heard macross was a good anime xddd
15:47:57FromDiscord<Rika> or was it an anime i dont know i dont really care
15:48:17Oddmongeryes an old anime
15:50:25Oddmongerbut if someone has a pointer (not null please) to a macro doing what i want (reading a file and generation some nim data structures) i'm interested
15:54:03disruptekdifficult to do with nimscript? you mean like getting the current directory?
15:54:03leorizeyou don't even need a macro
15:54:28disruptekjust write it as you would at runtime and the invoke it statically.
15:54:58disruptekit's almost like nimscript is a bad idea made worse by implementation.
15:55:20disrupteki dunno why i'm so salty today. it's the first time in weeks that i woke up to green CIs.
16:01:41Oddmongerinvoking statically ? What is that ?
16:01:56*hnOsmium0001 joined #nim
16:02:13leorizeconst Variable = expression()
16:02:34Oddmongerand as const is eval at compile time, that would do it ?
16:03:07Oddmongerfabulousmax , thank you!
16:05:41Oddmongerah… but i want to create a set from the strings i read…
16:05:59Oddmongerit's not just adding key and values in a table
16:06:48leorizeif whatever you're doing can be run at compile time, it can be put in consts
16:11:47*cvoxel quit (Ping timeout: 256 seconds)
16:26:20FromDiscord<Clyybber> leorize: Hmm, it literally says 'Alias' ?
16:26:58leorizeyep: https://github.com/alaviss/nim-sys/runs/1724119273#step:7:40
16:29:00*zedeus quit (Quit: zedeus)
16:29:14FromDiscord<Clyybber> tyAlias is used in "type A = B"
16:29:26FromDiscord<Clyybber> A is then tyAlias(B)
16:29:50FromDiscord<Clyybber> can you extract a repro?
16:30:09disruptekno point; concepts are on the chopping block.
16:30:49disruptekif you want defects, we have plenty to go around.
16:31:41FromDiscord<Clyybber> pls ignore disruptek for a moment
16:32:18FromDiscord<Clyybber> disruptek: the reason that concepts are "broken" is because we don't have good repros of the remaining issues
16:32:33disruptekit doesn't matter; the entire impl is getting replaced.
16:32:46FromDiscord<Clyybber> nothing is getting replaced
16:32:55disrupteki gave you a ridiculous quantity of problems and you did absolutely nothing with it.
16:33:06disrupteklet's not pretend here.
16:33:45FromDiscord<Clyybber> your repros are the exact opposite of minimal
16:34:06disruptekget used to it; the expert should be the one minimizing, not the user.
16:34:10FromDiscord<Clyybber> no
16:34:22disruptekwrite a fucking test once in awhile. we don't know enough about where the problem lies.
16:35:16FromDiscord<Clyybber> nobody is born an expert
16:35:33disruptekspeak for yourself.
16:35:37FromDiscord<Clyybber> and I cant rule out that its an issue on your side
16:36:11FromDiscord<Clyybber> so you should minimize until its clear that its a compiler issue
16:36:30disrupteklogic is pretty hard to refute.
16:41:48*jkiesian joined #nim
16:46:21FromDiscord<Clyybber> disruptek: Its a PITA to reproduce, even with that repro
16:46:27FromDiscord<Clyybber> I can't bootstrap nimph
16:46:43disruptekwhat does nimph have to do with it?
16:46:50disruptekalso, why can't you bootstrap nimph?
16:46:53FromDiscord<Clyybber> I need the deps
16:46:57disruptekso install them.
16:47:02FromDiscord<Clyybber> disruptek: Probably just on that old commit
16:47:20FromDiscord<Clyybber> disruptek: Yeah, you could also just not include them in the repro :p
16:47:21disrupteki forgot that compiler devs don't use packages.
16:47:40disrupteki think i left a bug in the repo.
16:47:53disruptekif you can tell me where it is, i'll know that you've at least /read/ the code.
16:48:05disruptekotherwise, there's nothing to talk about.
16:48:11FromDiscord<Clyybber> eh, nevermind, I'll minize it further
16:48:39FromDiscord<Clyybber> forgot to init the submodules :D
16:49:11*PMunch quit (Ping timeout: 256 seconds)
16:49:12*narimiran quit (Ping timeout: 256 seconds)
16:49:39*PMunch joined #nim
16:49:44*narimiran joined #nim
16:51:18FromDiscord<Clyybber> disruptek: This shit is trivial probably. At least for you who uses nimterop all the time; can't you make it easier for one to get your snippet running?
16:52:11disrupteki dunno. nimterop is dead code unless i fork it, and i don't really want to maintain it.
16:52:41disruptekit's not any easier for me to make it work. luckily, someone PR'd a nimble-free bootstrap that i now test in CI.
16:53:07FromDiscord<Clyybber> disruptek: Ok, I got it so far as to give me /tmp/nimph/testes/testes.nim(135, 10) Error: undeclared identifier: '_'
16:56:04disruptekcan repro.
16:57:03disruptekroll to testes 1.0.2
16:57:33leorizeI think I figured out how to reproduce my bug
16:58:17leorizeconcepts doesn't seem to work in cross-module generic instantiation
16:58:24leorizesigh, this is a lot of code to remove
16:59:22disruptekthat seems really hard to believe, honestly.
16:59:39leorizeso if I import sys/files, it fails
16:59:49leorizeif I import sys/files and sys/handles, it passes
17:00:37*leorize quit (Remote host closed the connection)
17:01:02*leorize joined #nim
17:01:24leorizeok removed my AnyFile typeclass and replaced it with AnyFile = File, removing the generic instantiation and it works
17:02:13leorizeconcepts having stupid binding rules is all I can think of now
17:09:12*jkiesian quit (Ping timeout: 264 seconds)
17:11:34*Torro quit (Quit: bye)
17:13:23*jkiesian joined #nim
17:20:58*l1x quit (Quit: Connection closed for inactivity)
17:26:54FromDiscord<konsumlamm> why do some stdlib modules have `when not defined(testing)` blocks?
17:28:09*madprops joined #nim
17:32:48leorize@Clyybber see #16755
17:32:57disbot12https://github.com/nim-lang/Nim/issues/16755 -- 3Concepts and cross-module generic binding madness ; snippet at 12https://play.nim-lang.org/#ix=2MAG
17:34:45FromDiscord<exelotl> I wonder when the 2020 survey results are coming out 👀
17:38:54*fputs joined #nim
17:48:41*jkiesian quit (Ping timeout: 256 seconds)
17:48:52*jkiesian joined #nim
17:50:08*natrys joined #nim
17:51:57*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
17:54:57*Lord_Nightmare joined #nim
17:55:28FromDiscord<Clyybber> leorize: Thanks
17:55:39FromDiscord<Clyybber> disruptek: How does testes do multiple failures?
17:59:39ForumUpdaterBotNew thread by Minidude22: Nim proc pointers, see https://forum.nim-lang.org/t/7401
18:13:16FromDiscord<mratsim> @leorize, I don't think its concept but you were eaten by the generic sandwich.
18:13:33FromDiscord<mratsim> solution is to always export what you import that involves generic proc.
18:14:33FromDiscord<mratsim> We totally need an emoji or a gif of a sandwich eating someone for this
18:14:48FromDiscord<mratsim> I lose time on this at least once per week.
18:24:16leorize[m]@mratsim: Handle[T] works fine being a normal generic. This is pure concept matching afaict
18:24:50FromDiscord<mratsim> ah,
18:26:53*xet7 quit (Remote host closed the connection)
18:28:55Oddmongercan a `set` be used to retrieve a string (or a enum value) from an index ?
18:29:38disruptekno idea what you're asking.
18:29:50Oddmongerit seems i can define things like a:HashSet[tuple[index:int,value:string]]
18:30:17disruptekthat's the use of a generic.
18:30:28Oddmongercan i use the variable like this : a.incl(10,"foo")
18:30:46disrupteka.incl (10, "foo) <-- note the space
18:31:00leorize[m]or double the parens
18:31:35Oddmongeranyway… that doesn't change anything for me
18:31:58leorize[m]you have to define a hashing proc for that type I believe
18:32:40Oddmongerok i was hoping fast retrieval with a set
18:39:27*antranigv quit (Ping timeout: 246 seconds)
18:46:55FromDiscord<19> https://play.nim-lang.org/#ix=2MuQ
18:47:05FromDiscord<19> what is the better way of writing this?
18:47:37FromDiscord<19> i made two extra seqs coz i cannot mutate the file inside the for loop
18:48:59FromDiscord<lqdev> leorize: tuples have a hash proc defined in the stdlib
18:49:57*hnOsmium0001 quit (Quit: Connection closed for inactivity)
18:50:02FromDiscord<Rika> Do the replace in the move file loop
18:50:12FromDiscord<Rika> Keep the preprocess seq
18:51:16FromDiscord<19> thanks!
18:53:36*vicfred joined #nim
18:53:46ForumUpdaterBotNew thread by Treeform: Print - a better echo. colors, pretty nesting, refs and cycles!, see https://forum.nim-lang.org/t/7402
19:04:18disruptekgitnim now emits dist changes like this:
19:04:20disruptek 3 days ago gram-0.3.2, skiplists-0.5.1
19:04:20disruptek 3 days ago point dist at 1.5.1 on 1.5.1 for nimble reasons
19:04:20disruptek 3 days ago polish the readme a little
19:04:20disruptek 26 hours ago balls-2.0.4
19:04:22disruptek 25 hours ago add ups-0.0.4
19:12:42*habamax quit (Ping timeout: 246 seconds)
19:20:07leorizedisruptek: balls only likes static strings as `name` for the `test` macro?
19:20:27disrupteki dunno, maybe?
19:21:19leorizeyea, I tried to construct a name at runtime and it doesn't like it
19:22:07disruptektests have to have names at compile-time so that we can name them in failure messages.
19:28:24disruptekwhat are you trying to do? you can use checkpoint or report for dynamic runtime output.
19:30:05leorizeI wanted to generate a message for this: https://github.com/alaviss/nim-sys/blob/master/tests/handles/tinherit.nim#L45-L46
19:30:18leorizeshowing the FD number
19:30:25leorizeand what exactly is being tested :P
19:31:40disruptekcheck takes an optional string to emit on failure, like assert.
19:31:56disruptekthe syntax for a block is slightly different `check "some things": ...`
19:33:00disrupteki'm curious what it looks like when it fails, though. the reveal-symbols feature is poorly tested because i wrote it for cps, where bindsym doesn't work. 🥴
19:33:56*LyndsySimon joined #nim
19:34:28*jkiesian quit (Ping timeout: 256 seconds)
19:49:08leorizeare you gonna make balls runner programmable?
19:49:42disrupteknot a crazy idea.
19:50:27disruptekthis is unfortunate. i'm not sure what to do about it, though.
19:51:21leorizeexplicitly pass --excessiveStackTrace:on, which will keep the full path
19:51:21disrupteki should put the matrix into a series of tables, too.
19:51:29disruptekahh, nice!
19:51:57disruptekdo i need to keep --stackTrace:on too?
19:52:29FromDiscord<tomck> Hello↵I'm using db_sqlite (https://nim-lang.org/docs/db_sqlite.html)↵Is there any way to execute compound queries, e.g. queries separated by `;`? I'm trying to batch insert 10k rows & inserting as separate queries is unworkably slow↵Currently if i execute a query separated by `;`, it just executes the first query & ignores the rest
19:52:40leorizedisruptek: you should not have to
19:57:34*antranigv joined #nim
20:00:29*jkiesian joined #nim
20:03:51FromDiscord<Avatarfighter> hello hello everyone
20:04:35disrupteksup fighter
20:04:42FromDiscord<Avatarfighter> what's new with you disruptek
20:05:12disruptekpolishing balls and gitnim.
20:05:28disruptekwhy aren't you writing more code?
20:05:35FromDiscord<Avatarfighter> atm ?
20:06:08FromDiscord<Avatarfighter> I'm getting ready to build the infrastructure for the hackathon im organizing, need to manage 5 people and figure out what we need
20:06:14disruptekPMunch: i would use your nancy if i could get my table in a string instead of delivering it directly to stdout.
20:06:59disruptekwhen i was wealthy, i used to eat a lot of pistachios.
20:08:36disruptekleorize: what would you write with runner-as-library?
20:10:12leorizerunner integrated with a coverage data collector
20:11:05leorizeand also a simple dependency system
20:11:26disruptektest deps?
20:12:35disrupteksomething i worked on with the author: .0.7
20:12:36leorizefor tinherit, there is this problem when you bring coverage in play: the self-execution will corrupt the profile data
20:13:54disruptekpoint is, we could discover the necessary reordering automatically when the actors change.
20:16:22*fputs quit (Remote host closed the connection)
20:19:59*jkiesian quit (Ping timeout: 256 seconds)
20:21:45leorizedisruptek: sounds kinda slow though
20:21:53disruptekit is.
20:23:57FromDiscord<Clyybber> disruptek: How does testes have multiple failures?
20:24:13FromDiscord<Clyybber> As in there are multiple lines failing with working lines in between
20:24:39FromDiscord<Clyybber> doesn't that mean that following lines can't depend on the previous?
20:25:08FromDiscord<Clyybber> so how do you do: var i = 1
20:25:10FromDiscord<Clyybber> echo i
20:25:31disruptekit knows that it cannot scope var i = 1.
20:25:37FromDiscord<Clyybber> ah
20:25:49disrupteka future version will just try: var i = 1; try: echo i; ...
20:25:59FromDiscord<Clyybber> oh yeah I guess `when compiles(var i = 1): var i = 1` works too
20:26:01disrupteki have a ticket i just haven't gotten around to it.
20:26:11giacowhy can't I extract value from an UncheckedArray[uint8] using [] ?
20:26:12FromDiscord<Clyybber> the above should work too
20:26:35FromDiscord<Clyybber> oh, thats what you meant
20:26:47FromDiscord<Clyybber> giaco: I think you want a ptr UncheckedArray
20:27:03giacoyes, I mean ptr UncheckedArray[uint8]
20:27:14FromDiscord<Clyybber> hmm, should work, do you have a snippet?
20:27:36giacoit says: type mismatch: got <ptr uint8, uint64>
20:28:13FromDiscord<Clyybber> are you doing someUncheckedArray[0] = ...
20:28:28giaconot writing, reading
20:28:46FromDiscord<Clyybber> hmm, then your someCheckedArray is not an unchecked array
20:29:10FromDiscord<Clyybber> do you use addr on the same line?
20:29:45FromDiscord<Clyybber> or can you send the line pls?
20:30:17*leorize quit (Ping timeout: 268 seconds)
20:30:19FromDiscord<Clyybber> disruptek: How can I make nimterop not spam during compilation?
20:30:26disrupteki dunno.
20:30:27giacolet me first check if it works with horrible_workaround^TM
20:31:01*leorize joined #nim
20:31:21FromDiscord<lqdev> giaco: you're indexing a ptr uint8, not a ptr UncheckedArray[uint8]
20:31:26giacoyeah I've found the problem. It is between monitor and chair
20:31:47FromDiscord<Clyybber> heh
20:33:34FromDiscord<Clyybber> disruptek: what is git_oid ?
20:33:47disruptekit just produces the oid for the git object in question.
20:33:58FromDiscord<Clyybber> I mean where is it defined
20:34:08FromDiscord<Clyybber> I want to get rid of gittyup for the testcase
20:34:10FromDiscord<Clyybber> ugh
20:34:19disruptekwhat testcase?
20:34:24FromDiscord<Clyybber> groups.nim
20:34:37disruptekomg are you still looking at that?
20:34:41FromDiscord<Clyybber> I'm trying to minimze it
20:34:54FromDiscord<Clyybber> nah, I was doing something else in the meantime
20:35:07FromDiscord<Clyybber> disruptek: Because I can't investigate it in its curretn state?
20:35:17disruptekjust remove the code.
20:35:24disrupteknone of the test depends upon it, obs.
20:35:27disruptekobvs, too.
20:35:35FromDiscord<Clyybber> if I remove gittyup it fails
20:36:15FromDiscord<Clyybber> oh, GitGroup isn't used in that part
20:37:46FromDiscord<Clyybber> to make testes fail I do -d:release right?
20:37:54FromDiscord<Clyybber> now it needs bytes2human :/
20:38:16disrupteki replaced it in balls.
20:38:31FromDiscord<Clyybber> I did init testes submodules fwiw
20:38:44disruptekthen add it to your fucking path.
20:39:03disruptekit's ridiculous that i have to hold the hands of compiler devs every time a package rears its ugly head.
20:39:03FromDiscord<Clyybber> ah, found it
20:39:04FromDiscord<Clyybber> yaeh
20:39:22disruptekif you hate it so much, help make it better.
20:40:50*jkiesian joined #nim
20:40:55FromDiscord<Clyybber> calm down, I just didn't see it
20:41:11disrupteki know, chucklehead.
20:41:40FromDiscord<Clyybber> hanging is not what the testcase is supposed to demonstrate right?
20:42:08FromDiscord<Clyybber> maybe it just takes its time, but its compiling for more than 30secs now with -d:release
20:42:08disruptekthat's a documented misbehavior, yes.
20:42:16disruptekgive it awhile.
20:42:25FromDiscord<Clyybber> of what part? testes or concepts?
20:42:39disruptekconcepts; see the nimph-2.0 pull comments.
20:42:57FromDiscord<Clyybber> but then why would it compile so fast when not using release
20:43:42disruptekdunno, it's /your/ compiler.
20:44:57disruptekjust take testes out. it adds nothing here.
20:45:00FromDiscord<Clyybber> does testes do something funky with release?
20:45:01FromDiscord<Clyybber> yeah
20:45:39FromDiscord<Clyybber> heh, it recurses infinitely during rendering
20:45:40FromDiscord<Clyybber> lol
20:46:30FromDiscord<treeform> @disruptek, do you have like a pretty print echo/dump library? Like https://github.com/treeform/print ?
20:47:11FromDiscord<treeform> Good, I am glad I am not reimplementing this you already done!
20:47:19FromDiscord<treeform> things
20:47:34disruptekwhat i need is syntax highlighting on the console.
20:48:41FromDiscord<Clyybber> I would not want a pretty print library from disruptek
20:48:42FromDiscord<treeform> Thats what I do?
20:48:49FromDiscord<Clyybber> imagine your screen full of emojis
20:48:56FromDiscord<Clyybber> :p
20:51:46FromDiscord<Clyybber> disruptek: heh, it hangs without testes too
20:52:06FromDiscord<Clyybber> two bugs for the price of one
20:52:38disruptekas i said in nimph-2.0 pr...
20:53:44FromDiscord<Clyybber> you encountered that issue yourself?
20:54:10disruptekfwiw, this is code from august. 🤷
20:54:18disruptekdunno how current the bugs are. 😉
21:08:33*jkiesian quit (Ping timeout: 246 seconds)
21:14:30PMunchdisruptek, my nancy?
21:15:05PMunchOh right, that's what I called my table library thing :P
21:18:23*leorize quit (Ping timeout: 268 seconds)
21:20:38*PMunch quit (Ping timeout: 256 seconds)
21:21:37*narimiran quit (Ping timeout: 265 seconds)
21:33:47*leorize joined #nim
21:43:18*NimBot joined #nim
21:50:17*sirn quit (Ping timeout: 260 seconds)
21:50:52*kwilczynski quit (Ping timeout: 260 seconds)
21:51:11*sirn joined #nim
21:53:34*kwilczynski joined #nim
22:02:55*LyndsySimon quit (Quit: Connection closed for inactivity)
22:09:52FromDiscord<Clyybber> disruptek: actually fails without release too
22:09:56FromDiscord<Clyybber> as in hang
22:10:30*natrys quit (Ping timeout: 246 seconds)
22:16:24*jkiesian joined #nim