<< 10-08-2022 >>

00:01:09*krux02 quit (Quit: Leaving)
00:03:20FromDiscord<Bubblie> Hey leorize when you meant the type of the proc, did you mean whether it was void etc.?
00:04:01FromDiscord<leorize> the type of the proc is its signature
00:04:15FromDiscord<leorize> ie `proc(a: int, b: string)`
00:04:16FromDiscord<Bubblie> Signature?
00:04:34FromDiscord<Bubblie> Is signature its params?
00:05:08*emery quit (Ping timeout: 255 seconds)
00:08:44FromDiscord<!Patitotective> and return type
00:09:26FromDiscord<Bubblie> Ah so void in this case
00:22:15*ehmry joined #nim
00:29:23FromDiscord<leorize> void return type is the same as not specifying one in nim btw
00:50:55*joast quit (Quit: Leaving.)
01:14:13FromDiscord<Bubblie> In reply to @leorize "void return type is": Thanks! :)
01:15:37FromDiscord<Forest> Can anyone who understands futhark help us just, make it stop making numbered identifiers public?
01:15:52FromDiscord<Forest> The numbered identifiers being exported reaaaally fucks with the IDE lmao
01:15:54FromDiscord<!Patitotective> you could ping its creator, pmunch
01:16:01FromDiscord<Forest> Already did that yesterday
01:16:25FromDiscord<Forest> Also made a GitHub issue
01:16:37FromDiscord<Forest> Just really wanting to get rid of numbered identifiers being exported because it's annoying us-
01:17:36FromDiscord<Forest> I just don't understand in the code what the numbered identifier is, and what the clean identifier is, it doesn't make it obvious
01:31:03FromDiscord<Forest> Anyone? I've tried to go through it multiple times but yeah-
01:34:52FromDiscord<Elegantbeef> Manually going through is pretty much all you can do 😄
01:36:27FromDiscord<Forest> In the futhark GitHub repo
01:36:30FromDiscord<Forest> I just can't understand it sob
01:54:50FromDiscord<Bubblie> :reducedtoatoms:
01:54:52FromDiscord<Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=479a
01:55:10FromDiscord<Elegantbeef> Look up the type in the futhark file
01:56:11FromDiscord<Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=479b
01:56:32FromDiscord<Bubblie> this is what it looks like in the futhark file
01:56:55FromDiscord<Elegantbeef> `message: cstring` isnot `a2: ptr cuchar`
01:58:34FromDiscord<Bubblie> oh yeah I changed it to cstring cause ptr cuchar wasn't working
01:58:46FromDiscord<Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=479c
01:58:47FromDiscord<Bubblie> at least the error
01:58:51FromDiscord<Bubblie> is a bit different?
02:01:03FromDiscord<!Patitotective> are you assigning something to that procedure returns type? it has no type
02:01:15FromDiscord<Bubblie> can I send you what I have?
02:01:18FromDiscord<!Patitotective> (edit) "procedure returns type?" => "procedures result?"
02:01:23FromDiscord<!Patitotective> sure you can
02:01:29FromDiscord<Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=479e
02:01:41FromDiscord<Bubblie> that echo there is a placeholder
02:01:49FromDiscord<Bubblie> just so I know its at least working and prints something
02:02:02FromDiscord<!Patitotective> what is `instancerequestadapter`'s signature?
02:02:46FromDiscord<Elegantbeef> `instanceRequestAdapter` returns nothing
02:02:54FromDiscord<Elegantbeef> It's here↵(@Bubblie)
02:03:03FromDiscord<Bubblie> oh
02:03:04FromDiscord<Bubblie> what...
02:03:19FromDiscord<Bubblie> oh
02:03:20FromDiscord<Bubblie> my
02:03:21FromDiscord<Bubblie> god
02:03:30FromDiscord<Bubblie> :facepalm: I should quit coding
02:03:55FromDiscord<Bubblie> that
02:03:56FromDiscord<Bubblie> fixed it beef
02:04:16FromDiscord<!Patitotective> In reply to @Bubblie "<:facepalm:664295198318395392> I should": do crochet with me
02:04:33FromDiscord<Bubblie> LOL
02:04:37FromDiscord<Bubblie> Sounds wonderful 😭
02:05:05FromDiscord<Bubblie> thanks everyone, I am truly the smartest man alive (sarcasm)
02:05:08FromDiscord<Forest> sent a code paste, see https://play.nim-lang.org/#ix=479f
02:05:31FromDiscord<Forest> Is it safe to ignore it? Because binding file is generated anyway and passes `nim check`
02:05:49FromDiscord<Bubblie> at least now I gained some experience and to check for things properly 😭
02:06:38FromDiscord<Forest> Lmao
02:19:11*joast joined #nim
02:35:54FromDiscord<zhaozilong> https://i.imgflip.com/6pggbb.jpg
02:36:26FromDiscord<!Patitotective> In reply to @zhaozilong "https://i.imgflip.com/6pggbb.jpg": <@&371760044473319454>
02:40:43*ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
02:42:24FromDiscord<Prestige> Wat
02:43:23FromDiscord<zhaozilong> @Moderator ban me
02:47:32FromDiscord<j-james> annoying
02:48:33FromDiscord<zhaozilong> ooh oooh so annoying 🤓
02:49:17FromDiscord<Rika> LMAO
02:49:19FromDiscord<Elegantbeef> It's a real shame these people exist, really ruining the goodwill of matrix 😄
02:49:55FromDiscord<that_dude> Seems like we've been getting a lot of trash recently lol
02:50:12FromDiscord<Elegantbeef> The real shame is these are real people and arent spam bots
02:50:26FromDiscord<that_dude> Well That means I get to make fun of them even more
02:50:41FromDiscord<Elegantbeef> These people are getting paid to go through AI prevention tools to spam a shitty game URL
02:52:16FromDiscord<salt rock lamp> hi all, i was surprised to find that by translating a python program to nim, i actually got worse performance than python. does anyone have any profiling tips, or any suggestions about obvious performance improvements to the nim code? here is the code\: https://git.sr.ht/~wintershadows/polyglot-benchmarks/tree/master/item/running-stats-cli/implementations/nim/calc.nim which i am compiling with `nim compile --define:release --mm:o
02:52:36FromDiscord<Elegantbeef> Cracks knuckles
02:52:54FromDiscord<salt rock lamp> the equivalent python is here https://git.sr.ht/~wintershadows/polyglot-benchmarks/tree/master/item/running-stats-cli/implementations/python/calc.py
02:53:08FromDiscord<Elegantbeef> Nim's `lines` might be the culprit
02:53:34FromDiscord<flywind> In reply to @salt rock lamp "hi all, i was": What's the number?
02:53:39FromDiscord<salt rock lamp> interestingly on cpython 3.8 (or maybe 3.9?) on my older macbook pro x86, nim 1.6.0 was beating python handily. now on the m1 macbook cpython 3.10 is beating nim 1.6.6 by a significant and repeatable amount
02:53:49FromDiscord<Elegantbeef> `--threads:off`
02:54:06FromDiscord<Elegantbeef> Ok so you're doing a lot bad
02:54:27FromDiscord<salt rock lamp> i generated 30 million input lines for this task, python crunched it in 6.34s and nim did it in 7.59
02:54:31FromDiscord<salt rock lamp> lay it on me!
02:54:47FromDiscord<Elegantbeef> can we get the input?
02:54:55FromDiscord<that_dude> Is doing static things cheating?
02:54:58FromDiscord<salt rock lamp> i can give you a sample, i don't think you really want 30 million lines of numbers
02:55:07FromDiscord<flywind> How did you measure the time?
02:55:25FromDiscord<Rika> In reply to @salt rock lamp "i can give you": What if we did though
02:55:36FromDiscord<Elegantbeef> It's the `data-sample.txt`?
02:55:39FromDiscord<salt rock lamp> i just used `gtime`, i used to be using `hyperfine` but the error is +/- 0.1 seconds so it's not worth my time to run it over and over
02:55:42FromDiscord<salt rock lamp> yeah actually that's the sample input
02:55:43FromDiscord<zhaozilong> oooh oooh
02:55:55FromDiscord<flywind> In reply to @flywind "How did you measure": Probbaly echo is quit heavy
02:56:12FromDiscord<salt rock lamp> it just echos once at the end, i would hope that is +/- miliseconds at worst
02:56:16FromDiscord<salt rock lamp> i can upload the full data somewhere if you all want it
02:56:33FromDiscord<Elegantbeef> I got the data dont worry
02:57:01FromDiscord<zhaozilong> oooh oooh he's spamming admins admins
02:57:12FromDiscord<Elegantbeef> Oh fuck off
02:57:25FromDiscord<zhaozilong> ahahahaha
02:57:33FromDiscord<zhaozilong> that's what u all sound like
02:57:39FromDiscord<Elegantbeef> It's really not
02:57:43FromDiscord<zhaozilong> ooh ooh he's a spammer ban him 🤓
02:57:46FromDiscord<Prestige> Can someone make beef an admin
02:57:57FromDiscord<Elegantbeef> This is a programming language community not shitty game community
02:58:09FromDiscord<Elegantbeef> Go make your own matrix room if you want to have a shitty game community
02:58:12FromDiscord<zhaozilong> no
02:58:16FromDiscord<Elegantbeef> I mean they could prestige
02:58:17FromDiscord<zhaozilong> I will post it here
02:58:33FromDiscord<zhaozilong> "admins admins"
02:58:37*ehmry joined #nim
02:58:40FromDiscord<Prestige> Maybe I should take down his website so he'll shut up
02:58:44FromDiscord<salt rock lamp> i ignored them 😬 i dont even see placeholders for their messages. idk if all clients support that
02:58:50FromDiscord<zhaozilong> ban me im a spammer 🤓 dom96\:
02:59:04FromDiscord<zhaozilong> skiddosser↵(@Prestige)
02:59:06FromDiscord<zhaozilong> hahaha
02:59:11FromDiscord<salt rock lamp> @that_dude\: it's only cheating if it substantially changes the program semantics
02:59:15FromDiscord<zhaozilong> "omg hes spamming adminsss"
02:59:17FromDiscord<Elegantbeef> Damn that works well salt 😄
02:59:21FromDiscord<Prestige> Not exactly zhaozilong. Lol
02:59:34FromDiscord<Elegantbeef> I hate that you use stdin for this salt
02:59:51FromDiscord<zhaozilong> I'll wait for your gigamassive botnet
03:00:04FromDiscord<zhaozilong> bcc5b84c2b8c0351e0088651dcfa25a3.png https://media.discordapp.net/attachments/371759389889003532/1006758803464802364/bcc5b84c2b8c0351e0088651dcfa25a3.png
03:00:23FromDiscord<Elegantbeef> What's the correct ressult 99, 2, 0?
03:00:43FromDiscord<salt rock lamp> yeah i know you could read from a file and probably get a lot of mileage out of memmapping and stuff. the goal of this benchmark was as much testing the performance of "user friendly" language primitives as it was to try to just get the fastest program possible
03:00:50FromDiscord<salt rock lamp> i remain astounded at how fast cpython's float parser is
03:00:52FromDiscord<Elegantbeef> That's not why i hate it
03:00:54FromDiscord<Elegantbeef> It's annoying to run
03:00:56FromDiscord<zhaozilong> pleas admins why aren't the admins banning me
03:01:15FromDiscord<Elegantbeef> Give me the full data set
03:01:23FromDiscord<Elegantbeef> Didnt realize the text was a subsection
03:01:45FromDiscord<salt rock lamp> sent a code paste, see https://play.nim-lang.org/#ix=479n
03:01:51FromDiscord<zhaozilong> what the fuck is nim
03:02:07FromDiscord<Elegantbeef> That's pretty much identical to mine
03:02:08FromDiscord<Elegantbeef> What cpu do you have?
03:02:43FromDiscord<Elegantbeef> Wait that's not speed
03:02:44FromDiscord<Elegantbeef> thought that printed out the speed 😄
03:02:51FromDiscord<salt rock lamp> hah no, that's the actual output of the program, mean and standard deviation computed in a single pass
03:03:08FromDiscord<Elegantbeef> Ok well give me a bigger data set and how are you timing it
03:03:12FromDiscord<Elegantbeef> That takes like 1.1ms
03:03:36FromDiscord<Elegantbeef> I already see some improvements
03:04:03FromDiscord<zhaozilong> did you know there are more than 100 servers in matrix.org that have over 5000 users
03:04:26FromDiscord<salt rock lamp> let me see if i can compress this down to a reasonable size
03:04:34FromDiscord<Elegantbeef> ok
03:04:34FromDiscord<zhaozilong> spamming isn't all bad I'm gathering helpful statistics
03:04:37FromDiscord<salt rock lamp> i can also give you the data generating script but it's in Hy 😆
03:04:44FromDiscord<salt rock lamp> or i can generate a smaller one than 30m
03:05:02FromDiscord<Elegantbeef> Well give me something to bench this
03:05:32FromDiscord<zhaozilong> @impbox [ftsf]\: ban me ban me
03:07:03FromDiscord<salt rock lamp> https://files.catbox.moe/o9z7mt.gz here's 1m lines
03:07:42FromDiscord<salt rock lamp> i'm timing it with `gtime` which i don't know is a good idea or not (that's just `time` if you're on gnu/linux i think)
03:11:03FromDiscord<salt rock lamp> two assumptions you are allowed to make\:↵1. the input might include non-ascii junk data, but valid lines can only be ascii (including leading/trailing whitespace)↵2. numbers are only in decimal format, no scientific notation and no weird stuff like double prefix minus signs `--3.235` or prefix plus signs `+1.5`
03:11:18*arkurious quit (Quit: Leaving)
03:13:22FromDiscord<Elegantbeef> What's the correct output for the 1m lines?
03:14:05FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=479o
03:14:33FromDiscord<salt rock lamp> yep, was just about to post
03:15:46FromDiscord<salt rock lamp> does it matter what c compiler i use? or is that not likely to be an issue here?
03:15:54FromDiscord<Elegantbeef> It likely wont change much
03:16:01FromDiscord<Elegantbeef> the GC and not allocating as much is the big thing
03:17:17FromDiscord<salt rock lamp> makes sense, i'm curious how you'd go about that. i know that when i had tried this a while ago in lisp and scheme, people in those communities suggested that the gc's were not well-optimized for this kind of thing and that i was probably "thrashing the gc" as one person eloquently put it
03:17:40FromDiscord<zhaozilong> OOPS i farted
03:20:16FromDiscord<Elegantbeef> Well `line = strip(lineRaw)` copies a string
03:20:20FromDiscord<Elegantbeef> So it's not good for performance
03:20:35FromDiscord<Elegantbeef> I cut 40ms off with https://play.nim-lang.org/#ix=479p
03:20:40FromDiscord<Elegantbeef> went 140ms to 100ms
03:20:57FromDiscord<Elegantbeef> using `-d:release --gc:arc`
03:21:12FromDiscord<salt rock lamp> ah alright. i was trying to emulate python `float()` or c `strtod()` which ignores leading whitespace, and python ignores trailing whitespace while strtod doesn't even look at it
03:22:27FromDiscord<salt rock lamp> i see, you're just manually walking through the string then. as you can see in the python version, i don't even check if the line is blank until after i try parsing it, which allows me to avoid doing the expensive regex check so many times
03:23:03FromDiscord<Elegantbeef> Yea the issue is Nim's parse functions do not skip whitespace
03:23:26FromDiscord<Elegantbeef> You could use parseutils to make your own parseFloat that did skip whitespace
03:26:21FromDiscord<Prestige> I assume stripping whitespace would also do a copy
03:26:40FromDiscord<Elegantbeef> That's what i said
03:26:53FromDiscord<Prestige> Ah yeah, I didn't read up far enough
03:27:32FromDiscord<Elegantbeef> As such https://play.nim-lang.org/#ix=479q is about the same as the other method
03:28:45FromDiscord<Elegantbeef> Should be `line == " "`
03:28:47FromDiscord<!Patitotective> In reply to @Elegantbeef "As such https://play.nim-lang.org/#ix=479q is": why doesnt people sort imports by length? 💀
03:28:57FromDiscord<Elegantbeef> What?
03:29:22FromDiscord<Elegantbeef> Why the hell would i manually reformat an entire import order for no reason
03:29:39FromDiscord<!Patitotective> it will look nicer :p
03:29:46FromDiscord<Prestige> Dang this has been archived https://github.com/dylhack/matrix-nim-sdk are there any other matrix libs available?
03:29:56FromDiscord<Elegantbeef> Tandy has a fork of it prestige
03:30:00FromDiscord<!Patitotective> i may not program good but i want to make my code ordered
03:30:09FromDiscord<Elegantbeef> Tandy's fork is upstream practically now
03:30:23FromDiscord<Prestige> Thanks for the info
03:30:32FromDiscord<Elegantbeef> Aw shit i need to PR my macro in
03:30:56FromDiscord<Prestige> for the matrix sdk?
03:31:00FromDiscord<Elegantbeef> Yea
03:31:50FromDiscord<Prestige> I wanted to make a little cli matrix tool so I could view rooms, get notified of keywords as a daemon, etc
03:32:05FromDiscord<salt rock lamp> thanks Elegantbeef , i need to log off for now but feel free to post more stuff and @ me, i'll look at it tomorrow
03:33:04FromDiscord<Elegantbeef> Eh i'm mostly done the only thing we can really make faster is to replace `lines` with a slightly better iterator
03:33:18FromDiscord<Prestige> Why is lines slow?
03:33:28FromDiscord<salt rock lamp> ah okay. fyi i did also want to treat lines of only whitespace as "blank"
03:33:57FromDiscord<Elegantbeef> I mean your other implementation did that
03:34:12FromDiscord<Elegantbeef> The way to do it then would be to attempt to parse, then if it fails check if it's whitespace
03:34:19FromDiscord<salt rock lamp> it only did that because i stripped unconditionally first!
03:34:32FromDiscord<Elegantbeef> `line.allCharsInSet(WhiteSpace)`
03:34:38FromDiscord<salt rock lamp> that's what the python version does. i wasn't sure if there was a not-highly-verbose way to do it
03:34:40FromDiscord<salt rock lamp> ah great, let me try that
03:34:58FromDiscord<Elegantbeef> You could also do it in the parser and use an exception to propagate it's all whitespace
03:35:07FromDiscord<!Patitotective> In reply to @salt rock lamp "that's what the python": to make things less verbose move them to another module 😁
03:35:09FromDiscord<Elegantbeef> But yea presetige look at this fancy DSL 😄
03:35:11FromDiscord<Elegantbeef> https://github.com/beef331/matrix-nim-sdk/commit/bb6c790a69685236a6cfd1c8d0ac9851cfe840ed#diff-ed293695cfe0a1ec6acc3616843af198a0d57f919dd35b5ea94435d8362e9ba2R10-R34
03:35:38FromDiscord<Elegantbeef> Need to document it but yea it's a nice tool
03:35:41FromDiscord<Prestige> Oh that's pretty nice
03:37:06FromDiscord<salt rock lamp> sent a code paste, see https://play.nim-lang.org/#ix=479s
03:37:07FromDiscord<Elegantbeef> Yea
03:37:19FromDiscord<Elegantbeef> Going to slow it down quite a bit
03:37:28FromDiscord<Elegantbeef> But should still be faster
03:37:59FromDiscord<salt rock lamp> yeah it's also safe to assume that the performance should be optimized for "mostly valid" data
03:41:21FromDiscord<salt rock lamp> well now i'm down to 6.47s vs. python 6.24s
03:41:44FromDiscord<salt rock lamp> i also set `--threads:off` and switched from orc to arc. that made more of a difference than changing the whitespace detection thing though
03:41:55FromDiscord<salt rock lamp> the whitespace detection change itself was only a few 1/10ths of a second
03:42:06FromDiscord<salt rock lamp> anyway good night all, happy to get pings if you have other ideas
03:45:02FromDiscord<Elegantbeef> salt rock lamp\: https://play.nim-lang.org/#ix=479v might be faster but without using the large dataset + a profiler i'm just spitballing
03:47:23FromDiscord<denball> nim = python + rust
03:47:33FromDiscord<Elegantbeef> Kinda
03:47:37FromDiscord<Elegantbeef> More like pascal + rust 😄
03:57:15FromDiscord<Elegantbeef> Well thanks prestige got me to actually PR that macro 😄
03:57:41FromDiscord<Prestige> Hehe
03:59:15FromDiscord<Elegantbeef> I wrote that after I had seen the effort to make an endpoint, and just forgot about PRing it
03:59:39FromDiscord<Elegantbeef> So I guess when/if tandy accepts that PR, endpoints welcome
04:46:43FromDiscord<Bubblie> so I updated to 1.6.6 but now I have this error
04:46:44FromDiscord<Bubblie> https://hastebin.com/ovatugecop.apache
04:47:18FromDiscord<Elegantbeef> `where gcc.exe`?
04:47:19FromDiscord<Bubblie> not sure what I did 😓
04:47:47FromDiscord<Bubblie> In reply to @Elegantbeef "`where gcc.exe`?": I am not sure
04:47:57FromDiscord<Elegantbeef> What do you mean you're not sure
04:48:09FromDiscord<Elegantbeef> The shell doesnt say "I am not sure"
04:48:33FromDiscord<Bubblie> wait
04:48:33FromDiscord<Bubblie> OH
04:48:35FromDiscord<Bubblie> gimmie one sec
04:50:12FromDiscord<Bubblie> okay yeah 💀
04:50:28FromDiscord<Bubblie> got it now thank you! 😭
04:53:57FromDiscord<Prestige> Does `lent` only work with a certain gc?
04:54:25FromDiscord<flywind> It should work for refc too.
04:54:44FromDiscord<Bubblie> can I clear nimcache?
04:54:49FromDiscord<Prestige> Guess I'm just hitting a compiler bug
04:54:54FromDiscord<Bubblie> or am I allowed to without things breaking
04:56:50FromDiscord<le1039dxl12> https://i.imgflip.com/6pggbb.jpg
04:57:06FromDiscord<Prestige> More spam... <@&371760044473319454>
04:58:14FromDiscord<Elegantbeef> What's the error?↵(@Prestige)
04:59:04FromDiscord<Prestige> sent a code paste, see https://play.nim-lang.org/#ix=479G
05:00:10FromDiscord<Elegantbeef> `genTypeInfoV1(tyNil)` makes it seem like you have `lent nil`
05:01:04FromDiscord<Prestige> Hm I do actually
05:01:33FromDiscord<Prestige> Can you not lent a ref object because of that case?
05:01:44FromDiscord<Prestige> or does lent only really apply to stack objects
05:01:46FromDiscord<Elegantbeef> A lent ref object doesnt semantically make sense
05:02:24FromDiscord<Prestige> Well that simplifies things I suppose
05:02:38FromDiscord<huantian> but copying a pointer might take a lot of computational resources beef!
05:02:50FromDiscord<Elegantbeef> Lol huan
05:02:56FromDiscord<Prestige> Didn't know if it somehow prevented mutations to the object
05:03:04FromDiscord<Elegantbeef> It does
05:03:06FromDiscord<Prestige> Same for a seq
05:03:10FromDiscord<Elegantbeef> Well not `lent ref object` but `lent T`
05:03:43FromDiscord<Prestige> I believe seqs would be fine
05:03:58FromDiscord<Elegantbeef> Yea they're considered value types so it makes sense to `lent` them
05:04:28FromDiscord<Prestige> I wish a had a nice way to have extendable objects without making them ref object of RootObj
05:04:34FromDiscord<Elegantbeef> `ref`s are not considered value types so a lent one is a pointer to a pointer which isnt very useful
05:04:50FromDiscord<Elegantbeef> If you dont need to group them in a collection you dont need `ref`
05:04:59FromDiscord<Elegantbeef> `ref` only is needed if you want to group them
05:05:26FromDiscord<Prestige> Well they'll be stored in a seq frequently
05:05:36FromDiscord<Elegantbeef> Well then you need a ref regardless of language 😄
05:05:41FromDiscord<Elegantbeef> Unless you use a variant
05:06:12FromDiscord<Elegantbeef> dont come at me with JS/Python
05:06:16FromDiscord<Prestige> yeah, I would but I'd like the user of the api to be able to extend the functionality of the base type
05:06:45FromDiscord<huantian> I mean all python objects are mostly ref kinda
05:06:53FromDiscord<Elegantbeef> That's why i said "dont" 😄↵(@huantian)
05:07:23FromDiscord<Elegantbeef> In JS/Python you get this due to the fact all objects are indirected and you arent operating on the the same as Nim/C++/C/Rust/Zig/...
05:07:56FromDiscord<Elegantbeef> You want to have an extensible type you need to use a reference to indirect the size allocation, unless you make your seq/API for it
05:07:59FromDiscord<Prestige> Strange, I got rid of that lent and get the same error
05:08:06FromDiscord<Elegantbeef> But the downside of that seq is you'd have `O(1)`
05:08:07FromDiscord<Prestige> I still think it has something to do with repr
05:08:23FromDiscord<Elegantbeef> Is this in a macro?
05:08:58FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=479K
05:09:01FromDiscord<Prestige> ^ yep that's the cause
05:09:23FromDiscord<Elegantbeef> Why you're calling `repr` on a nil lit is beside me, but yea this is an issue of course
05:10:04FromDiscord<Prestige> Part of a testing framework to print values of objects when an assertion fails
05:12:34FromDiscord<Prestige> What's odd is, that block of code isn't even executed
05:12:41FromDiscord<Elegantbeef> Well yea
05:12:47FromDiscord<Elegantbeef> It's a compile time error in cgen
05:12:51FromDiscord<Prestige> Yeah
05:12:59FromDiscord<Prestige> unfortunate
05:13:03FromDiscord<Elegantbeef> You're attempting to generate a typedesc for `nil`
05:13:27FromDiscord<Elegantbeef> How you're getting a typeless`nil` doesnt make any sense
05:13:47FromDiscord<Prestige> `Takes any Nim variable and returns its string representation.`↵I feel like this case should be handled
05:13:58FromDiscord<Elegantbeef> what?
05:14:19FromDiscord<Prestige> Actually it works with orc
05:14:27FromDiscord<Prestige> That was a docstring from `repr`
05:14:37FromDiscord<Elegantbeef> But a niil literal isnt a variable
05:14:46FromDiscord<Elegantbeef> The error here is you're calling `repr(nil)`
05:15:08FromDiscord<Prestige> I'm giving it a variable that is equal to nil
05:15:10FromDiscord<flywind> > untyped is useful to make sure the replacement is done before any semantic checking/type resolution.↵Is it documented somewhere?
05:15:27FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=479L
05:15:38FromDiscord<Prestige> hm oh I see
05:16:01FromDiscord<Elegantbeef> It's not that something is equivalent to nil, it's that you're passing an untyped nil
05:16:03FromDiscord<Prestige> but curious that it works with orc
05:16:09FromDiscord<Elegantbeef> You found a bug
05:16:30FromDiscord<huantian> one man's bug is another man's feature
05:16:33FromDiscord<Prestige> Lol
05:16:41FromDiscord<Elegantbeef> Lol
05:16:46FromDiscord<Prestige> Where is the actual source code for repr, it's just "magic"
05:16:55FromDiscord<Elegantbeef> It's in the Nim compiler
05:17:02FromDiscord<Elegantbeef> `Magic` means "Compiler handles it"
05:17:24FromDiscord<Prestige> I guess I'm not looking at the compiler code then lol
05:17:41FromDiscord<Prestige> ah found it
05:18:27FromDiscord<huantian> wait is the bug that refc crashes the compiler or that orc doesn't crash the compiler
05:18:46FromDiscord<Prestige> The former
05:19:02FromDiscord<Prestige> A compiler crash is always a bug
05:19:09FromDiscord<Elegantbeef> I'd argue the compiler shouldnt be capable of giving the repr of an untyped `nil` but i'm an idiot
05:19:23FromDiscord<huantian> In reply to @flywind "> untyped is useful": there's a section with it in templates I think <https://nim-lang.org/docs/manual.html#templates-typed-vs-untyped-parameters>
05:19:39FromDiscord<huantian> In reply to @Elegantbeef "I'd argue the compiler": just have it say "you dum dum why you `repr`-ing `nil`"
05:20:00FromDiscord<Elegantbeef> I mean a niil literal doesnt match any type, why does it semantically pass
05:20:19FromDiscord<Prestige> I don't see why we shouldn't allow it, returning "nil" is fine
05:20:35FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=479M
05:20:36FromDiscord<Elegantbeef> There is no type to bind the `nil` to
05:21:07FromDiscord<huantian> Oh I think I see what you mean
05:21:13FromDiscord<Elegantbeef> `typeof(nil)` is not an type that can be instantiated
05:21:19FromDiscord<Elegantbeef> It's like having a `seq[void]`
05:21:37FromDiscord<Prestige> I don't see why that matters, I'm not trying to evaluate a type
05:21:38FromDiscord<Elegantbeef> There is no reason i can think of that the code compiles
05:21:52FromDiscord<Prestige> If I pass `nil` to a template, I'd like to still be able to repr it
05:21:56FromDiscord<Elegantbeef> `repr(nil)` shouldnt dispatch
05:22:06FromDiscord<Prestige> `template foo(a: untyped) = repr a` should work imo
05:22:29FromDiscord<Prestige> (and it does with arc and orc)
05:22:45FromDiscord<Elegantbeef> This should be a fucking error
05:22:48FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=479P
05:22:59FromDiscord<Elegantbeef> How do you specialize a procedure for `typeof(nil)`
05:23:24FromDiscord<Elegantbeef> `void` makes sense
05:23:30FromDiscord<Elegantbeef> `typeof(nil)` is.... what?
05:23:43FromDiscord<Prestige> Idk what your point is, I'm not trying to do `typeof(nil)` I just want a string representation of a `nil` value
05:23:59FromDiscord<Elegantbeef> no of an untyped `nil` literal
05:24:00FromDiscord<Prestige> just like how in my template above, you could do `foo(5)`
05:24:58FromDiscord<Elegantbeef> `repr(nil)` is a procedure which is specialised for `typeof(nil)` which I think is an implementation detail that is escaping
05:25:27FromDiscord<Elegantbeef> `typeof(nil)` is only supposed to be used for nil inference, and really shouldnt be able to get put through procedures
05:26:10FromDiscord<Prestige> I don't really care about the implementation details, just the description of the function
05:26:21FromDiscord<Prestige> https://play.nim-lang.org/#ix=479Q only fails with refc
05:26:27FromDiscord<Elegantbeef> I mean you do care about the implementationd etails, cause you want `repr(nil)` to work
05:26:49FromDiscord<Prestige> That doesn't make sense
05:26:50FromDiscord<Elegantbeef> That should be a compile time error since you cannot reason the type of `nil`
05:27:11FromDiscord<Prestige> I don't care about the type ...
05:27:21FromDiscord<Elegantbeef> We're going in circles
05:27:31FromDiscord<Elegantbeef> you want to call `repr` on a nil literal correct?
05:27:34FromDiscord<Prestige> I don't know why you keep bringing up the type
05:27:38FromDiscord<Prestige> Yes
05:27:50FromDiscord<Elegantbeef> Ok so that means the compiler must be able to dispatch on a nil literal?
05:28:15FromDiscord<Prestige> It means the compiler should print "nil" if I give `repr` a nil literal
05:28:28FromDiscord<Elegantbeef> That wasnt the question
05:28:31FromDiscord<Elegantbeef> I dont care what the procedure does
05:28:38FromDiscord<Prestige> Well that's all I care about
05:28:43FromDiscord<Elegantbeef> ...
05:29:52FromDiscord<Prestige> It's like the same reason `echo isNil(nil)` should return true, and not be a compiler error
05:30:06FromDiscord<Elegantbeef> No it should be a compiler error
05:30:14FromDiscord<Elegantbeef> Atleast to me
05:30:23FromDiscord<Prestige> Why do you want to handicap the compiler so much lol
05:30:30FromDiscord<Elegantbeef> It's an untyped `nil` literal
05:30:35FromDiscord<Prestige> Who cares?
05:30:40FromDiscord<Prestige> nil is nil
05:30:51FromDiscord<Elegantbeef> Passing an untyped nil literal to a procedure means the type is escaping the internals
05:31:11FromDiscord<Elegantbeef> `tyNil` is merely there for nil inference
05:31:17FromDiscord<Elegantbeef> It's not there to be used for anything
05:31:40FromDiscord<Elegantbeef> As such you're depending on an implementation detail for code to work
05:33:50FromDiscord<Prestige> I don't think it should be a compiler error for `isNil(nil)` to return true - like it doesn't matter that this literal doesn't have an assignable type, if you can evaluate if it's nil
05:34:07FromDiscord<Prestige> Should only be a compiler error if the compiler is unable to resolve the code
05:35:25FromDiscord<Elegantbeef> I dont think it should be an error either, in the case `isNil` checks that the type of the literal is `tyNil` and is a macro not a procedure 😄
05:45:05FromDiscord<Elegantbeef> The fun part is that `tyNil` is allowed to be instantiated but it's a nothing type
05:45:06FromDiscord<Elegantbeef> It's an untyped pointer for all intents and purposes
05:45:12FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=479S
05:45:34FromDiscord<Elegantbeef> I dont think it should be a valid type, but it seems to instantiate fine and dispatch fine
05:46:19FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=479U
05:46:30FromDiscord<Elegantbeef> It doesnt say the above is ambiguous
05:47:49FromDiscord<flywind> repr is hard; https://github.com/nim-lang/Nim/issues/20155
05:49:03FromDiscord<flywind> `template repr(x: distinct): string =` match `range[distinct]` and causes infinite loop.
05:59:22*rockcavera quit (Remote host closed the connection)
07:06:05FromDiscord<Shiba> so what if i wanted to make some changes to standard libary and then copy the files to my project , is it gonna use those files or the one that comes with nim lib
07:06:30FromDiscord<Elegantbeef> It'll import local first then stdlib
07:07:11FromDiscord<Elegantbeef> You can use `patchFile` if you want
07:07:14FromDiscord<Shiba> im gonna try to strip/remove stuff from them , and try
07:07:17FromDiscord<Shiba> see if its breaks
07:07:35FromDiscord<Shiba> In reply to @Elegantbeef "You can use `patchFile`": whats thas
07:07:38FromDiscord<Shiba> (edit) "thas" => "that?"
07:07:53FromDiscord<Elegantbeef> A wait to replace files for you entire project
07:08:38FromDiscord<Elegantbeef> way to\
07:12:38FromDiscord<tandy> owo
07:15:49FromDiscord<Elegantbeef> Hopefully that makes it more enjoyable to make matrix endpoints 😄
07:16:37FromDiscord<tandy> thanks beef
07:16:52FromDiscord<tandy> @Prestige\: what have you got planned?
07:17:05FromDiscord<Elegantbeef> Forgot to document that it creates a `type LoginRequestData = ...`
07:18:09FromDiscord<Prestige> tandy: I want to basically make a little cli tool that will let me read and send messages from my terminal
07:18:25FromDiscord<tandy> neat okay↵(@Prestige)
07:18:40FromDiscord<Prestige> And make a little daemon so I can notify-send if someone pings me
07:19:02FromDiscord<tandy> sounds doable
07:19:16FromDiscord<Elegantbeef> Why is that better than just a client though 😄
07:19:28FromDiscord<Elegantbeef> Do the terminal matrix clients not ping you?
07:20:06FromDiscord<Prestige> I never got them working
07:20:43FromDiscord<Prestige> Also I'd just like this workflow more
07:36:03*CyberTailor joined #nim
07:53:51madpropswhat's a toolkit that allows me to have a tree view where i can easily select/deselect files/directories at any level?
07:54:00madpropslike to select all relevant files for some operation
08:00:03madpropssomething like this https://stackoverflow.com/questions/42772848/qt-multiple-item-selection-from-a-list-of-files-and-folders
08:01:55madpropsmaybe i should look into qtcreator with c++ i guess, for this
08:02:02madpropsthe logic is simple anyway
08:04:22FromDiscord<Prestige> maybe something like ranger or vifm
08:15:54madpropsi like ranger but seems a bit too complicated
08:16:07madpropsfor this thing at least
08:16:17madpropsunless it has a dedicated mode for it that makes it easy
08:16:55madpropsi've never done qt stuff anyway, so new thing to learn
08:41:58FromDiscord<aph> hi beef, or pmunch up?
08:55:45*xet7 joined #nim
09:04:59*ixmpp joined #nim
10:08:03FromDiscord<EyeCon> In reply to @tandy "sounds doable": I was also about to write a very basic Matrix bot, to learn more about the protocol
10:08:17FromDiscord<EyeCon> What's the best starting point? Is your repo the most up-to-date one?
10:08:37FromDiscord<EyeCon> Or will you contribute back to the original one?
10:58:24*jmdaemon quit (Ping timeout: 268 seconds)
11:01:28*kenran joined #nim
11:19:27NimEventerNew Nimble package! simpleargs - Simple command line arguments parsing, see https://github.com/HTGenomeAnalysisUnit/nim-simpleargs
11:33:09FromDiscord<tandy> this, the og seems to be archived now, rip↵(@EyeCon)
11:33:36FromDiscord<tandy> there are some todos on my fork, so il need to get to that some day
11:34:14FromDiscord<EyeCon> OK, so if one would hypotetically contribute, yours would be the correct target
11:34:26FromDiscord<EyeCon> Thanks
11:35:09FromDiscord<EyeCon> The issues from the OG are still valid though, right?
11:35:18FromDiscord<EyeCon> Yours don't seem to have separate issues
11:56:04FromDiscord<Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=47bt
11:59:22FromDiscord<Generic> -1..1
12:00:21FromDiscord<Hamid_Bluri> I don't want 0
12:02:28FromDiscord<Hamid_Bluri> I think using `enum` is a good idea
12:02:49FromDiscord<Rika> Use enum yes
12:02:49NimEventerNew thread by Xflywind: The Nim team's latest efforts in mitigating the false postives on the Nim binaries, see https://forum.nim-lang.org/t/9358
12:10:24FromDiscord<tandy> yes \:)↵(@EyeCon)
12:10:55FromDiscord<tandy> once beefs new macro is in, it would be helpful to have some prs to move to the new endpoint definiton format↵(@EyeCon)
12:18:43FromDiscord<tandy> is there any way to see the c / cpp code when using those backends?
12:18:55FromDiscord<tandy> like how u can see the js code
12:19:14FromDiscord<leorize> you can look at the nimcache to get the files
12:53:02*CyberTailor quit (Remote host closed the connection)
12:55:06*CyberTailor joined #nim
13:33:06FromDiscord<aMOPel> Is there some way to access fields of objects with a string? like `obj["fieldname"]` in other languages? or what are you supposed to do with the keys from the `fieldPairs` iterator?
13:39:12FromDiscord<Rika> firstly, the string must be determinable on compile time
13:43:27*LaughingBubba joined #nim
13:44:45*LaughingBubba left #nim (#nim)
13:44:54FromDiscord<aMOPel> sent a code paste, see https://play.nim-lang.org/#ix=47ca
13:45:11*LaughingBubba joined #nim
13:45:46*LaughingBubba quit (Client Quit)
13:46:09FromDiscord<Forest> Is everything that is needed by the JS backend importable from places that aren't the compiler?
13:46:20FromDiscord<Forest> I wanna make a backend without modifying the actual compiler
13:49:08FromDiscord<Rika> In reply to @aMOPel "alright then maybe I": cant help today, kind of out of it
13:51:19FromDiscord<huantian> key should be known at compile time so you probably can use a macro or maybe template to access the value
13:52:01FromDiscord<Rika> key is a string so yes
13:52:55FromDiscord<Rika> you can likely write a template \`[]`(o: untyped; k: static string): untyped or something
14:09:22*LuxuryMode joined #nim
14:10:45*arkurious joined #nim
14:17:47FromDiscord<aMOPel> sent a code paste, see https://play.nim-lang.org/#ix=47co
14:22:10*rockcavera joined #nim
14:22:10*rockcavera quit (Changing host)
14:22:10*rockcavera joined #nim
14:27:18*kenran quit (Quit: WeeChat info:version)
14:39:20*gsalazar quit (Read error: Connection reset by peer)
14:39:32*gsalazar joined #nim
14:39:47FromDiscord<MegaIng> sent a code paste, see https://play.nim-lang.org/#ix=47cx
14:40:55FromDiscord<MegaIng> (edit) "https://play.nim-lang.org/#ix=47cx" => "https://play.nim-lang.org/#ix=47cy"
14:40:56FromDiscord<tandy> anyone know why this compiles on CI but not on my pc?
14:40:58FromDiscord<tandy> https://github.com/tandy-1000/simple-matrix-client/blob/3b3674157e6c815ffd73617727e1f97e9185b543/simple_matrix_client/client.nim#L32
15:11:49*def- quit (Quit: -)
15:15:45*gsalazar quit (Quit: Leaving)
15:16:01*gsalazar joined #nim
15:16:21FromDiscord<aMOPel> In reply to @MegaIng "Not sure if this": that works 👍 thank you
15:27:49FromDiscord<MegaIng> sent a code paste, see https://play.nim-lang.org/#ix=47d1
15:29:31FromDiscord<auxym> why do you need the leading zeros in a numeric literals? I assume they are parsed out early by the compiler anyways
15:29:35*def- joined #nim
15:29:51FromDiscord<MegaIng> I want to use that info to build up binary patterns to match against a bit stream
15:30:20FromDiscord<MegaIng> For that a syntax of the form `` `00 ss cccc` `` would IMO be quite nice
15:30:37FromDiscord<MegaIng> (edit) "nice" => "nice, with that pattern requiring 8bits"
15:30:55FromDiscord<MegaIng> But the `00` get's collapsed into a single `0`, which makes this unusable
15:33:38FromDiscord<MegaIng> I could use `"00" ss ccc` I guess
15:33:44FromDiscord<MegaIng> (edit) "ccc`" => "cccc`"
15:34:00FromDiscord<MegaIng> (edit) "I could use ... `"00"``" added "``" | "```"00" ss cccc` ... I" added "``"
15:35:11FromDiscord<auxym> i see. or use a comma separated list format.
15:35:38FromDiscord<MegaIng> That would still mean I have to use string literals
15:41:11FromDiscord<Forest> Can't you store it as hex?
15:41:18FromDiscord<Forest> 0x(hexval)
16:01:34FromDiscord<Phil> In reply to @aMOPel "Is there some way": There is, if you have the string at compile time , allows you to generate the code x.y , its useful for having checks.↵In your problem you know the fields at compiletime, this can work
16:02:11FromDiscord<Phil> I'll need to get home before I can start writing sth up properly
16:04:16FromDiscord<aMOPel> sent a code paste, see https://play.nim-lang.org/#ix=47df
16:04:43FromDiscord<Phil> Ah you already solved it, nevermind
16:05:16FromDiscord<Phil> Man tunnel gave me quite a connection blackout
16:06:21FromDiscord<Phil> Huh, so ident interprets a string into a symbol? Good to know
16:18:48FromDiscord<leorize> dot operators have terribad implementation, unfortunately
16:19:07FromDiscord<leorize> your issue might come down to differences in Nim version
16:19:34FromDiscord<tandy> on CI im using your github action to get nim devel, on my pc im using gitnim devel
16:19:41FromDiscord<tandy> crazy
16:22:06*tiorock joined #nim
16:22:06*tiorock quit (Changing host)
16:22:06*tiorock joined #nim
16:22:06*rockcavera quit (Killed (iridium.libera.chat (Nickname regained by services)))
16:22:06*tiorock is now known as rockcavera
16:24:02*tiorock joined #nim
16:24:02*tiorock quit (Changing host)
16:24:02*tiorock joined #nim
16:24:02*rockcavera quit (Killed (erbium.libera.chat (Nickname regained by services)))
16:24:02*tiorock is now known as rockcavera
17:11:36FromDiscord<creonico> Hello, I am interested in making a simple wayland compositor in nim and I wonder if there is a tool to generate nim bindings for the protocol and wlroots
17:21:29FromDiscord<leorize> https://github.com/PMunch/futhark \<- this should work well for that
17:32:16FromDiscord<tandy> there is already bindings to wlroots↵(@creonico)
17:32:55FromDiscord<tandy> https://github.com/j-james/nim-wlroots↵https://github.com/j-james/nim-wayland↵(@creonico)
17:34:22FromDiscord<j-james> the bindings are untested, though
17:34:40FromDiscord<j-james> so if you find any bugs or missing procedures please report them
17:38:40FromDiscord<gibson> How would I make a custom container that can work with Nim's `algorithm` module? In C++ the strategy would be to implement iterators for the custom container. Nim doesn't have interfaces so I can't say "this container can look like a seq" AFAIK. Would I have to create all the procs in `algorithm` for my specific container type?
17:39:04*LuxuryMode quit (Quit: Connection closed for inactivity)
17:42:03FromDiscord<j-james> what does the custom container look like?
17:52:01*neceve joined #nim
18:08:23FromDiscord<Forest> Wish there was a minimal working example for the JS backend... Welp time for cursed shit
18:08:54FromDiscord<spoon> uh oh
18:11:06FromDiscord<Forest> Oh yes 😎
18:11:23FromDiscord<Forest> First thing i need to do is isolate the Nim JS backend stuff into a compilable binary
18:11:40FromDiscord<Forest> Does Nim compiler stuff require the compiler to be installed too?
18:12:31FromDiscord<Forest> Working on making it so Nim can be compiled to any language you write a backend for by defining rules in a JSON format
18:12:46FromDiscord<Forest> Though maybe making it use callbacks is better
18:12:57FromDiscord<Forest> Yeah JSON is not gonna be even remotely flexible enough for this
18:21:25FromDiscord<EyeCon> Every sufficiently complicated config file schema eventually becomes a DSL/programming language
18:22:00FromDiscord<Forest> Lmao fair
18:22:02FromDiscord<Forest> https://github.com/nim-lang/Nim/blob/devel/compiler/jsgen.nim
18:22:04FromDiscord<Forest> Hm...
18:22:18FromDiscord<Forest> Doesn't rely on `jstypes`?
18:31:43FromDiscord<gibson> @j-james The custom container may be simply an `Object` that is storing data in a seq, internally, in addition to some other field values.
18:37:04FromDiscord<gibson> Would I need to make a `converter` ?.. just brainstorming.
18:48:57*jmdaemon joined #nim
18:55:38FromDiscord<Phil> converter? For the uninitiated, what are you trying to achieve?
18:59:05*derpydoo joined #nim
19:12:05FromDiscord<gibson> sent a code paste, see https://play.nim-lang.org/#ix=47dW
19:13:21FromDiscord<gibson> (edit) "https://play.nim-lang.org/#ix=47dW" => "https://paste.rs/riC"
19:13:52FromDiscord<gibson> (edit) "https://play.nim-lang.org/#ix=47e0" => "https://play.nim-lang.org/#ix=47dZ"
19:14:48Amun-Raiirc you have to implement `<`, `==`, … procs
19:15:46FromDiscord<Elegantbeef> Reverse works on `openArray` so you cannot just use reverse
19:15:52FromDiscord<gibson> But `reverse` only takes types of `openArray`
19:15:56FromDiscord<Phil> In reply to @gibson "<@180601887916163073> It's just a": I will admit I have very little knowledge this close to the metal (Haven't written a single line of code without some kind of mechanism cleaning up my memory for me and never ever cared about memory layout).↵At a glance, it's all openarrays so
19:16:16FromDiscord<Elegantbeef> You need to pass your sequence to it
19:16:51FromDiscord<Phil> Yeah pretty much that. The closest thing nim has to interfaces or the likes is concepts and I don't think algorithms was implemented with those yet when they're in general not out of the experimental section yet
19:17:06FromDiscord<Elegantbeef> you need to write your own `proc reverse(chunk: var Chunk32) = chunk.data.reverse`
19:17:54FromDiscord<gibson> That's what I was afraid of, that I'd have to implement my own for each proc I'd want available to the user, and they'll have to write each proc for use in another library, etc. etc.
19:18:20FromDiscord<Elegantbeef> This is why concepts are lovely
19:18:35FromDiscord<gibson> I'm still trying to learn how concepts would help me here.
19:18:57FromDiscord<Phil> Not for this specific usecase, the std/algorithm would need to work with concepts for that to function
19:20:03FromDiscord<Phil> If you wrote a wrapper that handled interaction with std/algorithm for all types that implement a specific concept you could make it work.
19:20:34FromDiscord<gibson> sent a code paste, see https://play.nim-lang.org/#ix=47e1
19:20:40FromDiscord<gibson> but openarray is not a good name here
19:22:19FromDiscord<gibson> Also, I think the new `Iterable` concept only applies to `iterators`, which are more like python's `generators`, and not necessary things like `seq`s or `array`s.
19:22:38FromDiscord<Phil> Not quite, a Concept is like an interface, it's more about what something can do rather than what it is
19:23:43FromDiscord<Phil> So yours I guess could be called the `AlgorithmIterator` (I have barely though 5 seconds about that name and not a deeper understanding of the lib to grasp whether that could just be called `Iterator` or not)
19:23:58FromDiscord<Phil> (edit) "`AlgorithmIterator`" => "`AlgorithmIterable`"
19:24:06FromDiscord<Phil> (edit) "`Iterator`" => "`Iteratable`"
19:24:13FromDiscord<Phil> (edit) "`Iteratable`" => "`Iterable`"
19:24:21*krux02 joined #nim
19:26:02FromDiscord<Elegantbeef> Eh actually a concept wouldnt work here
19:26:10FromDiscord<gibson> So probably the concept would validate/verify that my container has an iterator defined for it?
19:26:13FromDiscord<Elegantbeef> cause it means all types would have `data`
19:26:49FromDiscord<gibson> Or that my container would conform to using `[]`, `[]=`?
19:27:08FromDiscord<Elegantbeef> It'd ensure your concept had the require operations for sorting
19:27:59FromDiscord<Phil> For which there already is a concept of Comparable IIRC
19:28:02FromDiscord<Elegantbeef> So probably a `items` `[]` `[]=` `len` and `coll[int] is T`
19:28:38*MightyJoe quit (Ping timeout: 240 seconds)
19:28:48FromDiscord<Phil> Ohh alright or like that
19:28:51FromDiscord<gibson> That makes sense!
19:29:32*cyraxjoe joined #nim
19:29:54FromDiscord<gibson> Is there any reason such a contributed lib would not be entertained right now? (a rewrite of algorithm to use concepts)
19:30:28FromDiscord<gibson> Assuming someone volunteers and does the work / it sounds like something I could potentially do.
19:31:01FromDiscord<Phil> In reply to @gibson "Assuming someone volunteers and": Keep in mind that Concepts are still jumping around in the "Experimental" section of nim features
19:31:23FromDiscord<gibson> Ah okay, that's the reason.
19:33:34FromDiscord<Phil> Beef? Can concepts determine whether a user has defined a custom `new` constructor proc?
19:33:55FromDiscord<Elegantbeef> yes, but no
19:34:11FromDiscord<Phil> I would imagine the default `new(T)` proc gets in the way
19:41:54NimEventerNew post on r/nim by Ok_World__: First Nim project - qwatcher, see https://reddit.com/r/nim/comments/wl6ooo/first_nim_project_qwatcher/
19:49:23*neceve quit (Ping timeout: 268 seconds)
19:50:33FromDiscord<tandy> come to the nimskull matrix space↵(@Forest)
19:51:16FromDiscord<tandy> https://matrix.to/#/#nimworks:envs.net
19:51:22FromDiscord<Forest> No idea what that is, and i prefer Discord tbh but fair
19:51:36FromDiscord<Forest> I'm called Mythical-Forest-Collective btw on Matrix
19:52:23FromDiscord<tandy> its a hard fork of nim↵(@Forest)
19:52:27FromDiscord<Forest> In it now
19:52:54FromDiscord<Forest> In reply to @tandy "its a hard fork": Oh? Why? And is it still aiming to be compatible with existing Nim code, now and in the future?
19:53:03FromDiscord<Rika> yes
19:53:07FromDiscord<Rika> as much as it can
19:53:27FromDiscord<Forest> Sweet
19:53:49*gsalazar quit (Ping timeout: 252 seconds)
19:54:23FromDiscord<tandy> peep the readme, its a hard fork, so stuff will diverge, so compatibility is not guaranteed↵(@Forest)
19:54:51FromDiscord<tandy> but some of the main ideas behind it are reducing compiler tech debt, making it more of a community maintable / run project
19:55:01FromDiscord<Forest> That looks neat ngl
19:58:43FromDiscord<tandy> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1007014064809054238): peep the readme, its a hard fork, stuff will diverge, so compatibility is not guaranteed
20:12:53FromDiscord<Alea> Oh, they finally picked a name for nimskull?
20:13:28FromDiscord<Rika> huh they did
20:16:05FromDiscord<Alea> I hope they create a discord for it eventually, I'd love to see more discussion on it
20:22:17FromDiscord<Forest> Same, discord would be more ideal
20:22:37FromDiscord<Forest> Bleh issue is i want most pure Nim code to work-
20:23:01FromDiscord<Forest> Nimskull may be my best bet though so
20:31:36FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=47ee
20:32:18FromDiscord<haxscramper> have you imported `tables` in the `map.nim`?
20:32:37FromDiscord<jmgomez> yup
20:33:41FromDiscord<haxscramper> `$` might fail to compile with this error if you are trying to print something whose `$` implementation prints pointers
20:33:56FromDiscord<haxscramper> if `UScriptStructPtr` is of any indication
20:34:17FromDiscord<haxscramper> so you might have to define `$` for pointers to your data if it is acyclic
20:34:27FromDiscord<haxscramper> and then default `$` for objects might kick in
20:34:41FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=47ef
20:37:37FromDiscord<haxscramper> In that case, I can't say for sure, but I would bet it is either (1) default `$` cannot handle some types or (2) importing `tables` failed somewhere else. Try printing the table itself, printing keys, values used for the parametrization
20:37:39FromDiscord<haxscramper> etc.
20:38:33FromDiscord<jmgomez> I will just reimplemented it for my TMap instead of converting it into a table and then printing the table, did that because I thought it will be quickier
20:38:34FromDiscord<haxscramper> given your error and types I see in it I'd suggest going in this direction
20:38:35FromDiscord<jmgomez> thanks!
20:39:21FromDiscord<jmgomez> In reply to @haxscramper "In that case, I": (I did the second part already before attempting this)
20:41:32*wallabra_ joined #nim
20:43:02*wallabra quit (Ping timeout: 268 seconds)
20:43:16*wallabra_ is now known as wallabra
20:45:35FromDiscord<Jakraes> Hey guys, perhaps I'm not the only one having this problem but every single browser I use is signaling the nim 1.6.6 zip file as a virus
20:46:25FromDiscord<Elegantbeef> Yep antivirus thinks nim tooling is a virus
20:47:43FromDiscord<Jakraes> Yup, and windows doesn't even let me open the zip if I'm able to download it, weird stuff
20:53:57FromDiscord<!Patitotective> _don't use windows_
20:54:17NimEventerNew post on r/nim by Mibuna: How would I write a query language in Nim?, see https://reddit.com/r/nim/comments/wl8imw/how_would_i_write_a_query_language_in_nim/
21:00:20*derpydoo quit (Quit: derpydoo)
21:00:35FromDiscord<Jakraes> I think I'll use choosenim for the installation
21:00:39FromDiscord<Jakraes> Should work well enough
21:13:50FromDiscord<!Patitotective> In reply to @Jakraes "I think I'll use": it's the best ~~(even though it doesn't work for me 💀 )~~
21:14:33FromDiscord<Jakraes> I mean
21:14:42FromDiscord<Jakraes> It installs stuff easily but I think I messed up somewhere
21:14:50FromDiscord<Jakraes> I can't compile for windows lul
21:15:14FromDiscord<Jakraes> Just gives a file without the .exe
21:16:49FromDiscord<!Patitotective> In reply to @Jakraes "I can't compile for": how are you doing it?
21:17:03FromDiscord<Jakraes> nim c filename.nim
21:17:12FromDiscord<Jakraes> I'm also using nim c --os:Windows filename.nim
21:17:17FromDiscord<Jakraes> The latter gives me an error
21:17:39FromDiscord<Jakraes> Not related to the os flag, I'll try to see if I can work around it
21:18:41FromDiscord<!Patitotective> In reply to @Jakraes "nim c filename.nim": that should work, could you send the code you're compiling and the compiler output?
21:19:07FromDiscord<Jakraes> Nothing special
21:19:08FromDiscord<Jakraes> sent a code paste, see https://play.nim-lang.org/#ix=47ep
21:19:08FromDiscord<!Patitotective> In reply to @Jakraes "I'm also using nim": that's not how you use it, it compiles to windows automatically
21:19:22FromDiscord<Jakraes> That's what I thought as well but it isn't :/
21:19:24FromDiscord<!Patitotective> and the compiler output?
21:19:37FromDiscord<Jakraes> Just a file with no extention
21:20:02FromDiscord<!Patitotective> when you run `nim c filename.nim`, what is the output?
21:20:18FromDiscord<!Patitotective> terminal output
21:20:18FromDiscord<Jakraes> A file named filename
21:20:21FromDiscord<Jakraes> Ah
21:20:47FromDiscord<Jakraes> https://media.discordapp.net/attachments/371759389889003532/1007035807133093998/Screenshot_6.png
21:21:15FromDiscord<!Patitotective> seems like the output is `test`
21:21:19FromDiscord<Jakraes> Yup
21:21:20FromDiscord<!Patitotective> try to rename it and see if it runs
21:21:26FromDiscord<Jakraes> Instead of test.exe
21:22:36FromDiscord<domosokrat> @Jakraes\: looking the path you're in, I would say it's a wasm binary
21:22:48FromDiscord<Jakraes> Hmmmm it might be because of the directory actually
21:22:51FromDiscord<Jakraes> Yup
21:23:02FromDiscord<Jakraes> I was playing around with wasm, works outside of the directory
21:24:01FromDiscord<Jakraes> I guess that explains it :p Thank you guys for helping me out
21:25:56FromDiscord<dom96> In reply to @Patitotective "it's the best ~~(even": it doesn't? Why not?
21:26:12FromDiscord<domosokrat> you're welcom
21:26:34FromDiscord<dom96> In reply to @Jakraes "I think I'll use": sadly I've seen Windows Defender prevent a choosenim install
21:26:45FromDiscord<dom96> might work for you if you're using a different av though, who knows
21:27:10FromDiscord<dom96> I'd recommend using WSL :)
21:27:18FromDiscord<!Patitotective> In reply to @dom96 "it doesn't? Why not?": we have already been through this but iirc it's because my cpu is too old↵let me see if i can find the messages
21:27:30FromDiscord<Jakraes> Nim can get a bit weird on windows sometimes, it's always a bunch of work for me to install a new version but it's definitely worth it
21:27:36FromDiscord<Jakraes> Can't wait to switch to linux lul
21:27:40FromDiscord<dom96> In reply to @Patitotective "we have already been": oh, 32bit? is it?
21:30:16FromDiscord<!Patitotective> In reply to @dom96 "oh, 32bit? is it?": no but still quite old, see #nimble
21:31:08FromDiscord<dom96> huh, that's Nimble failing not choosenim
21:31:26FromDiscord<dom96> or not even Nimble, but how the nightlies are built from what I can see
21:31:46FromDiscord<!Patitotective> then let me try choosenim now lol
21:34:58FromDiscord<dom96> what you can do as a workaround is force choosenim not to use nightlies: `choosenim \#v1.6.6` should work
21:35:28FromDiscord<dom96> (this tells choosenim to grab Nim from git with the branch/tag name of "v1.6.6"
21:35:37FromDiscord<dom96> (edit) ""v1.6.6"" => ""v1.6.6")"
21:36:12FromDiscord<dom96> which means it will run `koch tools` and hopefully get you a non-SSE3 build
21:36:49FromDiscord<dom96> might also be worth creating an issue in https://github.com/nim-lang/nightlies
21:37:02FromDiscord<dom96> and/or ping @leorize :)
21:39:05FromDiscord<mersenne> How would I make a query language in Nim?
21:41:09FromDiscord<!Patitotective> wooops
21:41:11FromDiscord<!Patitotective> suddenly it works
21:41:22FromDiscord<!Patitotective> (edit) "suddenly it works ... " added "(choosenim)"
21:41:34FromDiscord<!Patitotective> maybe upgrading to ubuntu 22.04 did fix it
21:42:54FromDiscord<dom96> did it work without the `#v1.6.6`?
21:43:24FromDiscord<!Patitotective> yes
21:47:11*Guest77 joined #nim
21:47:52*Guest77 quit (Client Quit)
22:02:28FromDiscord<dom96> nice
22:09:01FromDiscord<!Patitotective> :]
22:25:44*CyberTailor quit (Remote host closed the connection)
22:26:01FromDiscord<leorize> if only nimble has the issue then it's likely coming from the linked openssl, our binaries come from https://github.com/JuliaBinaryWrappers/OpenSSL_jll.jl and maybe they're building with optimization targeting x86\_64-v2↵(@dom96)
22:27:22*CyberTailor joined #nim
22:28:26FromDiscord<Bubblie> can you use dlopen in nim?
22:29:35FromDiscord<leorize> yes, see https://nim-lang.org/docs/dynlib.html
22:29:43FromDiscord<Bubblie> thank you!
22:51:16FromDiscord<Tuatarian> If I turn off gc, can I still use stdlib modules?
22:54:58FromDiscord<Elegantbeef> Yes but gc'd memory will leak
22:55:14FromDiscord<Elegantbeef> Just use `arc` is the best for your sanity
22:55:32FromDiscord<Elegantbeef> It's a basic GC that's very low latency
22:58:27FromDiscord<Tuatarian> Right but let's say I want to avoid the refcount overhead
23:07:08FromDiscord<Forest> Why aren't changes in Nimskull planned to be included? (Like making the backend code cleaner)
23:11:21*oz` is now known as oz
23:15:42FromDiscord<!Patitotective> In reply to @Forest "Why aren't changes in": make a pr
23:16:30FromDiscord<Forest> Apparently they aren't really wanted by the community tho
23:16:55FromDiscord<!Patitotective> well, you can get a better answer in the forum or directly making a pr
23:17:30FromDiscord<dom96> In reply to @Forest "Apparently they aren't really": seems the "PRs welcome" messaging isn't getting through /j
23:17:51FromDiscord<Forest> Fair enough
23:19:01FromDiscord<!Patitotective> In reply to @dom96 "seems the "PRs welcome"": we should make an ai that sends "PRs welcome"
23:19:07FromDiscord<!Patitotective> oh, actually it already exists↵its called beef
23:19:31FromDiscord<Forest> Lmao
23:20:23FromDiscord<dom96> haha