<< 25-01-2022 >>

00:11:24*yassernasc quit (Remote host closed the connection)
00:19:34*krux02 quit (Remote host closed the connection)
00:20:19*krux02 joined #nim
00:20:53FromDiscord<ynfle> Beef, can I ask you some questions about `sigmatch.typeRel`?
00:31:08FromDiscord<Elegantbeef> sure
00:33:37*noeontheend quit (Ping timeout: 240 seconds)
00:33:38FromDiscord<ynfle> It doesn't show up on the stacktrace
00:33:53FromDiscord<ynfle> Is that because it just returns the wrong result?
00:34:46FromDiscord<Elegantbeef> Yes it's doing the type comparisons for the calls, so it uses the return value
00:34:58FromDiscord<ynfle> It seems that the `typed` case return `isGeneric`. What is the "correct" return value? I think I need one that would say they are compatible types
00:36:22FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/blob/32d4bf352585a4fc4a6fa1bd24b270af087b0372/compiler/types.nim#L29-L43
00:36:43FromDiscord<Elegantbeef> I think the issue is in typerel it might be elsewhere
00:37:31FromDiscord<Elegantbeef> You'll need to investigate going up with the stack trace
00:37:56FromDiscord<Elegantbeef> I just assumed it came from there it might be in other places
00:38:04FromDiscord<Elegantbeef> You need to play detective to fix X doesnt work but should
00:39:52FromDiscord<ynfle> It seems it return none
00:39:58FromDiscord<ynfle> `isNone`
00:42:49FromDiscord<Elegantbeef> That's the process i take, use the stack trace to know where the problem goes and figure out why it thinks it's wrong
00:43:13FromDiscord<Elegantbeef> So then time for you to figure out why it does
00:43:17*Mister_Magister quit (Excess Flood)
00:43:37*Mister_Magister joined #nim
00:44:06FromDiscord<ynfle> Thanks man
00:44:16FromDiscord<ynfle> Thanks individual
00:44:19FromDiscord<ynfle> Sorry
00:46:25FromDiscord<ynfle> What does `aOrig` represent the candidate match?
00:46:30FromDiscord<ynfle> (edit) "represent" => "represent,"
00:46:41FromDiscord<Elegantbeef> The actual
00:48:03FromDiscord<Elegantbeef> you can `echo aOrig, " ", formal`
00:48:59FromDiscord<ynfle> I did
00:49:20FromDiscord<ynfle> It seems like it's a candidate sym when it's a nnkclosedsymchoice
00:51:11FromDiscord<ynfle> Ok. so varargs returns isnone, while typed itself return isgeneric
00:57:45*krux02 quit (Remote host closed the connection)
01:03:13FromDiscord<ynfle> What is a supposed to represent? More specifically `a.flags`?
01:04:02FromDiscord<Elegantbeef> those are type flags
01:04:08FromDiscord<Elegantbeef> You can read most of the flags
01:04:21FromDiscord<Elegantbeef> it holds a bunch of information for type
01:15:09FromDiscord<ynfle> What does `tfVarargs in a.flags` mean?
01:15:29FromDiscord<Elegantbeef> `a.flags` is a bitset so if `tfVarags in a.flags`
01:15:51FromDiscord<ynfle> What would it mean if tfVarargs is in a.flags?
01:16:21FromDiscord<Elegantbeef> `a` is a varargs i assume
01:17:15FromDiscord<Elegantbeef> Ah sorry that's C style varargs
01:17:24FromDiscord<Elegantbeef> The flags have documentation
01:17:24FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/blob/devel/compiler/ast.nim#L505
01:17:42FromDiscord<ynfle> No. It would have kind of tyVarargs if itself was varargs
01:18:03FromDiscord<ynfle> Can I import the compiler?
01:18:23FromDiscord<Elegantbeef> Yes the compiler can be used as a library
01:19:09FromDiscord<Elegantbeef> Not that it matters for this problem
01:19:28FromDiscord<ynfle> https://play.nim-lang.org/#ix=3NqV
01:19:52FromDiscord<Elegantbeef> Well yea it's not in path
01:19:55FromDiscord<ynfle> In reply to @Elegantbeef "Not that it matters": It help with debugging enum. nim-gdb.py isn't so helpful just gives the number not the string value
01:20:04FromDiscord<ynfle> In reply to @Elegantbeef "Well yea it's not": How do I get it in path
01:20:06FromDiscord<Elegantbeef> I mean just echo
01:20:17FromDiscord<Elegantbeef> echo works
01:21:41FromDiscord<ynfle> in gdb? How?
01:21:51FromDiscord<ynfle> echo aOrig.flags↵aOrig.flags
01:21:56FromDiscord<ynfle> This is what I get
01:21:58FromDiscord<Elegantbeef> I mean put an echo in the compiler
01:22:08FromDiscord<ynfle> RIght, but I have to recompile
01:22:14FromDiscord<ynfle> Either way I just installed using nimble
01:22:41FromDiscord<Elegantbeef> Yea but the recompile shouldnt be too long
01:22:56FromDiscord<ynfle> Ya but then i'd have to restart the debug session
01:22:59FromDiscord<Elegantbeef> `./koch temp c ./yourTestFile.nim`
01:23:20FromDiscord<Elegantbeef> Dont use a debugger
01:24:32FromDiscord<ynfle> Why? I find it helps alot
01:24:41FromDiscord<Elegantbeef> Not that i've often used a debugger anywhere, so i'm biased, there isnt any weird flow logic so printing values is more than enough
01:25:43FromDiscord<Elegantbeef> I can probably count on one hand the amount of times i've reached for a debugger 😀
01:25:50FromDiscord<ynfle> Nice
01:26:07FromDiscord<Elegantbeef> So my view is mostly swayed that thay're not overly needed
01:27:19FromDiscord<Elegantbeef> Nim's temp compiler takes like 10s t orecompile depending on what you're touching so it's bad but not horrendous to debug/test things ime
01:30:14FromDiscord<Valdar> I never use a debugger in Nim either. With echo and .repr , you can get pretty much any value you need.
01:30:34FromDiscord<ynfle> @Valdar for the compiler?
01:31:02FromDiscord<Elegantbeef> A wild valdar appears 😀
01:31:56FromDiscord<Valdar> Hey, I've appeared often 🙂
01:32:08FromDiscord<Valdar> sort of
01:33:59FromDiscord<Valdar> I just caught the tail end of the convo. I wasn't referring to the compiler specifically.
01:35:02FromDiscord<ynfle> Oh ok
01:35:20FromDiscord<ynfle> I agree about non compiler stuff, but the compiler is just too overwhelming
01:35:51FromDiscord<congusbongus> a debugger can be super useful especially in cases where the state is very hard to set up↵I've been trying to set up nim debugging, disappointed that it's not easy to set up
01:36:25FromDiscord<Elegantbeef> I'm not saying it's not useful, but i've never personally found the usage beneficial to understanding the compiler
01:36:38FromDiscord<ynfle> In reply to @congusbongus "a debugger can be": I actually had good success this time with vscode integration
01:36:42FromDiscord<Elegantbeef> Reading the little bit of comments and echoing the cases out is more than enough ime to understand it
01:37:55FromDiscord<Elegantbeef> It's a complex system. Just you're touching such a small surface area to fix these X doesnt work but should" you only need to print flags and kind
01:38:22FromDiscord<Elegantbeef> Atleast that's my view
01:41:08FromDiscord<Elegantbeef> And i know that's a shared debug process by multiple developers that work on the compiler
01:45:47FromDiscord<ynfle> Cause you guys know what's going on
01:46:01FromDiscord<Elegantbeef> I didnt know what was going on when i started
01:48:46FromDiscord<Elegantbeef> I will say if you want to have very noisey but filled of information view `import astalgo` and do `debug yourType`
01:49:08FromDiscord<Elegantbeef> Personally i find it absolutely useless but I do know some appreciate all the information being visible
01:49:53FromDiscord<ynfle> That's way to overwhelming
01:50:03FromDiscord<ynfle> Especially for such a hot path
01:50:25FromDiscord<Elegantbeef> You can limit to to a specific condition or file
01:51:36FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3NqX
01:52:34FromDiscord<ynfle> I couldn't get `conf`
01:52:42FromDiscord<ynfle> It's not a variable in scope
01:53:03FromDiscord<ynfle> and info isn't initialized
01:54:01FromDiscord<Elegantbeef> the TCandidate has `c` which is context which has `c.graph.config`
01:55:06FromDiscord<ynfle> and which info should I use
01:55:11FromDiscord<ynfle> aorig or f
01:55:33FromDiscord<Patitotective> is there some project working on _Qt_ bindings for _Nim_? or there is not?
01:55:41FromDiscord<Elegantbeef> doesnt matter in this case since they're in the same file
01:55:59FromDiscord<ynfle> In reply to @Elegantbeef "doesnt matter in this": Its nil sometimes
01:56:39FromDiscord<Rika> In reply to @Patitotective "is there some project": QML
01:57:46FromDiscord<ynfle> sent a code paste, see https://play.nim-lang.org/#ix=3NqY
01:57:57FromDiscord<Elegantbeef> Well i guess disregard me
01:58:00*Gustavo6046 joined #nim
01:58:14FromDiscord<Patitotective> In reply to @Rika "QML": i mean qt, not qt quick↵like pyqt or pyside
01:58:19FromDiscord<Rika> No
01:58:41FromDiscord<Patitotective> :(
02:06:30FromDiscord<ynfle> Sleep time
02:13:52FromDiscord<Patitotective> 🌃
02:21:41*neurocyte0917090 quit (Ping timeout: 256 seconds)
02:29:54*vicfred quit (Quit: Leaving)
02:52:31FromDiscord<evoalg> for me, `print` is so much more convenient than `echo` when debugging
02:53:43FromDiscord<Elegantbeef> the topic was more along writing debugging vs debugger debugging 😀
02:54:06FromDiscord<evoalg> yep 😉
02:54:42FromDiscord<evoalg> but it's just so good I had to mention it 😄
03:02:18*arkurious quit (Quit: Leaving)
04:18:36*rockcavera quit (Remote host closed the connection)
05:48:50FromDiscord<Elegantbeef> @SirOlaf\: Could i bother you to shoot me a diff one last time for that borrow stuff, want to take a shot it 🙂
06:37:02FromDiscord<Evrensel Kişilik> why is Android SDK this bad?
06:42:37*jmdaemon joined #nim
06:47:08*rienske joined #nim
07:15:23haakonIs there no way to return "lack of value" from a proc? Like `None` in Python or `null` in Java? It looks like the common thing is to make up an "empty" value within the return type, like the empty string. But this is not distinguishable from a legitimate value, so in other languages it would be bad practice. Hope I'm overlooking something
07:16:28FromDiscord<Elegantbeef> `std/options` or `ref T`
07:17:31haakonOh, there is an option type :-)
07:46:22PMunchBy the way, for reference or pointer types you can use nil
07:46:57haakonYeah I noticed that. Hadn't gotten that far into the tutorials yet :-P
07:47:22haakonNaively speaking, it does seem like more of the stdlib should do this instead of returning empty strings and whatnot (like the sqlite module)
07:49:25*Goodbye_Vincent quit (Quit: Ping timeout (120 seconds))
07:49:46*Goodbye_Vincent joined #nim
07:50:17FromDiscord<Elegantbeef> Well remember that Nim also has exceptions so some of that optional stuff is done through that
07:51:12haakonSure, but a lot seems to be done through sentinel values
07:51:50FromDiscord<Elegantbeef> Surprisingly most of what i use aside from `find` does not 😀
07:51:54Amun-Rahaakon: you can't return nil from proc foo(): string
07:51:59FromDiscord<Elegantbeef> Just an observation 😀
07:52:19haakonGood to hear, Elegantbeef :-)
07:52:36haakonAmun-Ra: yeah, it would affect the type signature
07:55:00FromDiscord<Elegantbeef> Perhaps it might be a valid change for Nim 2.0
07:55:17PMunchTo do what @Elegantbeef?
07:55:59FromDiscord<Elegantbeef> Introduce options instead of constant returns in places it makes sense
07:56:13PMunchAh right
07:57:52PMunchHmm, is there a way to get the name mangling table in Nim?
07:58:45FromDiscord<Elegantbeef> I dont think so
07:59:44PMunchHmm, that's annoying
08:00:06PMunchI want to wrap a C tool that outputs symbols to show the Nim symbols instead
08:00:34PMunchHmm, how does the GDB extension do it?
08:02:11FromDiscord<Elegantbeef> \Whistles whilst pointing in the sky"
08:04:09PMunchHmm, I guess that would be the frame define stuff
08:18:38PMunchHmm, or maybe not
08:26:03arkanoidApart from being runtime/compiletime are inline functions like templates?
08:27:36FromDiscord<Elegantbeef> They arent guaranteed to be inlined but for the most part yes
08:30:18PMunch{.inline.} is just giving a hint to the C compiler
08:30:30PMunchBut it's smart and will inline stuff anyways
08:31:23arkanoidThanks
09:03:17PMunchHmm, I could potentially grep the file and then look for the closest nimfr_ call
09:03:18Amun-Rathat works kind of 'inline' in C standard, it's just a hint
09:03:27PMunchIt's an ugly hack though
09:03:39PMunchAmun-Ra, it is 'inline from the C standard
09:05:37arkanoidIs there any difference between a byte and a char in nim?
09:05:56Amun-Rayes
09:06:03PMunchWell, they're different types
09:06:13FromDiscord<Elegantbeef> No
09:06:21PMunchThey're both stored the same though
09:06:23Amun-Ralet foo: byte = 'a'
09:06:25Amun-Ra¯\(ツ)/¯
09:06:27FromDiscord<Elegantbeef> They're both 8 bit
09:06:41PMunch!eval let foo: byte = 'a'
09:06:43NimBotCompile failed: /usercode/in.nim(1, 17) Error: type mismatch: got 'char' for ''a'' but expected 'byte = uint8'
09:06:45FromDiscord<Elegantbeef> A char is a distinct uint8 basically
09:06:54Amun-Raand that is a difference
09:06:58FromDiscord<Elegantbeef> I figured you were talking about internal representation
09:09:11arkanoidOk, but if I have to store binary data that *may* also be interpreted as string, is it better to handle it as a bytes or chars? I know I can reinterpret it at any time, but is just which one is known to be a better choice
09:09:45FromDiscord<Elegantbeef> i'd go with the string personally
09:10:07FromDiscord<vindaar> I'd go with `byte` to be honest. That's a more honest representation of what the data is you're dealing with, no?
09:10:25FromDiscord<Elegantbeef> Yea it's purely preference and how you manage it
09:10:25Amun-Raesp. if that's a part of some interop
09:10:26FromDiscord<vindaar> unless "may" refers to "can always be"
09:11:12FromDiscord<Rika> Well what exactly is this data
09:11:16FromDiscord<Elegantbeef> Remember you can always make your own types
09:12:49FromDiscord<Elegantbeef> Knowing arkanoid it's going to be apache arrow stuff
09:13:17FromDiscord<Elegantbeef> So it's going to be data stored inside a binary buffer
09:13:57*[R] quit (Ping timeout: 240 seconds)
09:14:28FromDiscord<Elegantbeef> I say data but i mean objects
09:14:33arkanoidYes, the physical layout is w "variable size binary", but the logical type inside can be utf8 or binary
09:14:43arkanoid*is always
09:17:37FromDiscord<Rika> The byte sequence then
09:17:55FromDiscord<Elegantbeef> byte is probably more descriptive than `uint8` or `char`
09:19:06arkanoidYup, thanks
09:20:15*yassernasc joined #nim
09:21:36*yassernasc left #nim (#nim)
09:31:10FromDiscord<mratsim> In reply to @arkanoid "Ok, but if I": If you don't use byte, I'll have to ban you: https://github.com/nim-lang/RFCs/issues/32
09:32:58FromDiscord<Elegantbeef> Lol
09:33:30FromDiscord<Elegantbeef> byte just makes the most sense when dealing with presently untyped data
09:34:11FromDiscord<Elegantbeef> I dont know if it's just my love of distincts but i feel i question whether instead of an alias it gets turned into a distinct 😛
09:36:06FromDiscord<Rika> Personally I wish Nim went with the Python distinction of representation and stringification
09:36:27FromDiscord<mratsim> pray tell
09:36:31FromDiscord<mratsim> I'm not aware of that
09:36:50FromDiscord<mratsim> `$` is stringification and `toHex` is representation no?
09:37:03FromDiscord<Rika> It’s no convention though
09:37:16FromDiscord<Rika> And in Python it’s for every type, standardised by repr and str
09:38:22FromDiscord<mratsim> oh
09:38:29FromDiscord<mratsim> I agree
09:40:07FromDiscord<mratsim> I can't believe there was a time where arrays didn't have `$`
09:40:13FromDiscord<Clonkk> A while ago I made a small package to convert between string / seq[byte] https://github.com/Clonkk/bytesequtils↵(<@709044657232936960_arkanoid=5b=49=52=43=5d>)
09:40:39FromDiscord<Elegantbeef> Oh boy copying data 😛
09:41:18FromDiscord<mratsim> @Clonkk, where is prepareMutation declared? https://github.com/Clonkk/bytesequtils/blob/main/src/bytesequtils.nim#L49
09:41:20FromDiscord<Evrensel Kişilik> 😱
09:41:23FromDiscord<Evrensel Kişilik> hruuuuuuuuuuuuuuuuuuuuuuuuu
09:41:39FromDiscord<Clonkk> system.nim ?↵(@mratsim)
09:41:41FromDiscord<Elegantbeef> It's a system procedure
09:41:42FromDiscord<Elegantbeef> https://nim-lang.org/docs/system.html#prepareMutation%2Cstring
09:42:32FromDiscord<mratsim> that's not true, if you do newString(len) it will automatically be \0 terminated: https://github.com/Clonkk/bytesequtils/blob/main/src/bytesequtils.nim#L54-L57
09:42:45FromDiscord<Evrensel Kişilik> In reply to @Clonkk "system.nim ? (<@570268431522201601>)": how can i setup this documentation thing on github.io?
09:43:03FromDiscord<Clonkk> Either manually or github action↵(@Evrensel Kişilik)
09:43:10FromDiscord<Evrensel Kişilik> In reply to @Clonkk "Either manually or github": 😱
09:43:14FromDiscord<Evrensel Kişilik> how?
09:43:22FromDiscord<Elegantbeef> `nim doc` generates nim docs
09:43:36FromDiscord<Evrensel Kişilik> i want to make a documentation thing for my debugger
09:43:37FromDiscord<mratsim> Thankfully the GC doesn't insult you when you do raw pointer casting between GC-ed types: https://github.com/Clonkk/bytesequtils/blob/main/src/bytesequtils.nim#L50
09:43:44FromDiscord<Elegantbeef> I did make an issue on nimble.directory since docs were not generated
09:44:12FromDiscord<Clonkk> Manually something like nimbledoc --proect src/myfile?nim --out\:docs/ and enable github pages on docs/ folder↵(@Evrensel Kişilik)
09:44:33FromDiscord<Evrensel Kişilik> In reply to @Clonkk "Manually something like nimbledoc": oh it is not a Nim thing
09:44:34FromDiscord<Clonkk> With github actions something like this https://github.com/SciNim/nimfftw3/blob/master/.github/workflows/docs.yml
09:44:50FromDiscord<Evrensel Kişilik> In reply to @Clonkk "Manually something like nimbledoc": i want to make a documentation thing for this https://github.com/rohanrhu/gdb-frontend
09:44:55FromDiscord<Clonkk> nimble doc is pretty much an alias for nim doc i think↵(@Evrensel Kişilik)
09:45:06FromDiscord<Clonkk> Then the result is static html file hosted on github
09:45:08FromDiscord<Evrensel Kişilik> In reply to @Clonkk "nimble doc is pretty": hmmmmmmmmmmmmmmmm
09:45:20FromDiscord<Elegantbeef> Nim has a doc generator built into it
09:45:32FromDiscord<Evrensel Kişilik> sooooooooooooooooooooooooo
09:45:37FromDiscord<Clonkk> Yeah it's unsafe and totally shouldn't be used for crypto or anything serious but if you just want so raw buffer passing between API it does the job↵(@mratsim)
09:45:46FromDiscord<Evrensel Kişilik> i will create a repo like "gdb-frontend-docs"
09:45:57FromDiscord<Evrensel Kişilik> and we will manage it with markdowns right?
09:45:58FromDiscord<Clonkk> I basically could have made the whole thing using `pointer`
09:46:09FromDiscord<Elegantbeef> Nim's doc gen uses RST
09:46:11FromDiscord<Evrensel Kişilik> Markdowns on Git repo
09:46:16FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Nim's doc gen uses": hmmmmmmmmmmmmmmmm
09:46:23FromDiscord<Evrensel Kişilik> what is that?
09:46:34FromDiscord<Elegantbeef> There are things like nimibook or nimib if you want to use MD with Nim code
09:46:39FromDiscord<enthus1ast> you can use the gh-pages branch
09:46:40FromDiscord<enthus1ast> https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site
09:46:44FromDiscord<mratsim> Last time someone did a seq[byte] -> string cast it was between a blob and an http endpoint and it crashed in the C lib :/
09:47:00FromDiscord<Clonkk> The main idea was just to be able to reconcile API that expects `seq[byte]` with API that expects `string`↵(@mratsim)
09:47:03FromDiscord<Elegantbeef> How to mis a nu;l char
09:47:06FromDiscord<Evrensel Kişilik> i want it to be manageable with Markdowns on Git
09:47:53FromDiscord<mratsim> In reply to @Clonkk "The main idea was": for that you can use `proc foo[T: byte:char](input: openarray[T])`↵↵For better or worse string decay in openarray[char]
09:48:01FromDiscord<Clonkk> Well yeah, It says so in the readme that it doesn't deal with null terminated stuff well and that you absolutly shouldn't interface thatwith cstring↵(@mratsim)
09:48:36FromDiscord<mratsim> in Arraymancer it's worse because I have to prefix `proc toTensor[T: not char](a: openarray[T]): Tensor[T]`
09:49:18FromDiscord<Evrensel Kişilik> soooooooooooooooooooooooooo
09:49:19FromDiscord<Evrensel Kişilik> https://github.com/rohanrhu/gdb-frontend-docs
09:49:22FromDiscord<Evrensel Kişilik> i made this
09:49:26FromDiscord<mratsim> https://github.com/mratsim/constantine/blob/master/constantine/hashes/h_sha256.nim#L350-L352↵this accepts string/seq[byte]
09:49:55FromDiscord<Clonkk> But you control your own API↵(@mratsim)
09:50:37FromDiscord<ynfle> Is there any way to print the current line and filename?
09:51:10FromDiscord<Clonkk> If you have a seq[byte] for a resizable buffer (which makes sense to use) and an API that expects a Nim string holding a buffer (so no null terminated issue) and you have no control over said API, well a dirty cast can help you
09:51:17FromDiscord<mratsim> In reply to @ynfle "Is there any way": instantiationInfo() in system.nim
09:51:20FromDiscord<Evrensel Kişilik> In reply to @ynfle "Is there any way": `LINE` and `FILE`
09:51:41FromDiscord<mratsim> In reply to @Evrensel Kişilik "`__LINE__` and `__FILE__`": that would give you the C line not the Nim line
09:51:49FromDiscord<mratsim> unless you compile with --debugger:native
09:52:04FromDiscord<mratsim> or --lineinfo and --linedir iirc
09:52:56FromDiscord<ynfle> In reply to @mratsim "instantiationInfo() in system.nim": It doens't seem to work. What should the index be?
09:53:10FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/mvB
09:53:31FromDiscord<Elegantbeef> Or are chararrays just not allowed?
09:53:31PMunch@Evrensel_Kişilik, ooh I've been looking for a nice Gdb frontend
09:53:49FromDiscord<Elegantbeef> Their frontend is pretty snazzy
09:54:17FromDiscord<Evrensel Kişilik> In reply to @PMunch "@Evrensel_Kişilik, ooh I've been": oh 😱
09:54:26FromDiscord<Evrensel Kişilik> im glad you found it finally xD
09:54:51FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Their frontend is pretty": thank youuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
09:55:10PMunchI mean I haven't tried it yet, but it looks neat
09:55:13FromDiscord<mratsim> you'll have cannot instantiate T I think no?
09:55:21PMunchI'll have to look into it next time I want to use GDB
09:55:39FromDiscord<ynfle> In reply to @Evrensel Kişilik "`__LINE__` and `__FILE__`": Says invalid token
09:55:41FromDiscord<Evrensel Kişilik> In reply to @PMunch "I'll have to look": sure feel free to suggest me new things
09:55:53FromDiscord<mratsim> In reply to @Elegantbeef "Not ideal i gues": we want string -> Tensor[string] not Tensor[char]
09:55:55FromDiscord<Evrensel Kişilik> In reply to @ynfle "Says invalid token": sure because they are C things xD
09:56:02PMunchA section on how to use it for Nim in the documentation? :D
09:56:13FromDiscord<ynfle> In reply to @Evrensel Kişilik "sure because they are": So it doesn't help me
09:56:14FromDiscord<Elegantbeef> Ah thought you just didnt want string in there↵(@mratsim)
09:56:22FromDiscord<mratsim> @ynfle see https://github.com/nim-lang/Nim/issues/11689
09:56:32FromDiscord<Evrensel Kişilik> In reply to @PMunch "A section on how": sure im planning to make documentation
09:56:45FromDiscord<Evrensel Kişilik> i just tried it for Nim debugging
09:56:49FromDiscord<Evrensel Kişilik> it is pretty compatible
09:57:54FromDiscord<Evrensel Kişilik> In reply to @ynfle "So it doesn't help": i don't think soo cuz you can write C in Nim
09:58:26FromDiscord<mratsim> In reply to @Evrensel Kişilik "i don't think soo": You can even write Cuda, OpenCL or Assembly
09:59:07FromDiscord<mratsim> Cuda: https://github.com/mratsim/Arraymancer/blob/master/src/arraymancer/tensor/private/p_kernels_interface_cuda.nim#L40-L71
09:59:47FromDiscord<Evrensel Kişilik> i still think C and preprocessor is the best for everything xD
09:59:47FromDiscord<mratsim> compile-time assembler: https://github.com/mratsim/constantine/blob/master/constantine/arithmetic/assembly/limbs_asm_mul_x86_adx_bmi2.nim#L73-L112
10:00:12FromDiscord<mratsim> In reply to @Evrensel Kişilik "i still think C": https://tenor.com/view/game-of-thrones-i-demand-a-trial-by-combat-tyrion-lannister-gif-16328126
10:00:19FromDiscord<Elegantbeef> Preprocessor sucks
10:00:31FromDiscord<Evrensel Kişilik> buuuuuuut im happy with being your debugger person xD i want to make it more usable for Nim debugging with special features
10:00:38FromDiscord<Elegantbeef> Do type introspection with preprocessor and i'll guarantee you'd prefer death
10:01:13FromDiscord<Elegantbeef> Can GDB even print out proper sets/enums/tagged unions?
10:01:39FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Can GDB even print": sooooo you can use ExpressionEvaluater thing
10:02:02FromDiscord<Elegantbeef> I know they get turned into C arrays, ints, and unions in C. Dont know if it can get the accurate representation in a Nim environment
10:02:45FromDiscord<Evrensel Kişilik> this is ExpressionEvaluater https://media.discordapp.net/attachments/371759389889003532/935474759922225162/connected-expressions.png
10:02:53FromDiscord<Evrensel Kişilik> expressions are connected in that
10:02:58FromDiscord<mratsim> my eyes, they burn
10:03:07FromDiscord<mratsim> I took an arrow in the knee
10:03:13FromDiscord<mratsim> so many arrows
10:03:24FromDiscord<mratsim> seems interesting though
10:03:28FromDiscord<Elegantbeef> Yea but i mean `var a = {true, false}` isnt going display as `{true, false}`
10:03:28FromDiscord<Evrensel Kişilik> In reply to @mratsim "so many arrows": you can turn off them
10:04:03FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Yea but i mean": soooooooo what is that? `{1, 0}`?
10:04:13FromDiscord<Elegantbeef> That'd be `0b11`
10:04:18FromDiscord<Elegantbeef> It's a bit set
10:04:20FromDiscord<Evrensel Kişilik> soooooooo
10:04:29FromDiscord<Evrensel Kişilik> is that an auto array?
10:04:32FromDiscord<Elegantbeef> It'd be the integer 3
10:04:34FromDiscord<Elegantbeef> No
10:04:39FromDiscord<Evrensel Kişilik> huh
10:04:39FromDiscord<Elegantbeef> It's a bitset
10:04:44FromDiscord<Evrensel Kişilik> i mean in C
10:04:45FromDiscord<mratsim> like C flags
10:04:45FromDiscord<Elegantbeef> You know C bitflags
10:04:50FromDiscord<Elegantbeef> Where you or constants togethers
10:04:54FromDiscord<Evrensel Kişilik> soooooooooo
10:05:00FromDiscord<Elegantbeef> It's an integer in this case
10:05:01FromDiscord<Evrensel Kişilik> idk what is that in Nim
10:05:07FromDiscord<Elegantbeef> For larger values it's an array of integers
10:05:15FromDiscord<mratsim> A = 0b1, B = 0b10, and you have A | B
10:05:25Amun-Rafor larger values you'd have to use hashset
10:05:25FromDiscord<mratsim> with A | B = 0b11
10:05:31FromDiscord<Tanguy> My Gameboy emulator based on C preprocessor for the instructions↵https://github.com/Menduist/gbmu/blob/master/instructions.c#L223↵https://github.com/Menduist/gbmu/blob/master/opcodes
10:05:44FromDiscord<Evrensel Kişilik> soooooo what is C source output of `var a = {true, false}`?
10:05:52FromDiscord<Elegantbeef> an integer
10:05:53FromDiscord<Elegantbeef> or byte
10:05:59FromDiscord<Elegantbeef> Whatever you want to call an 8bit integer
10:06:00FromDiscord<Evrensel Kişilik> can you type it?
10:06:06FromDiscord<Evrensel Kişilik> the C line
10:06:29FromDiscord<Evrensel Kişilik> gimme C
10:06:50FromDiscord<Evrensel Kişilik> i want to C only C
10:06:51FromDiscord<Evrensel Kişilik> 😱
10:06:58FromDiscord<haxscramper> this is a bitset literal
10:06:58FromDiscord<mratsim> In reply to @Tanguy "My Gameboy emulator based": Nim is prettier: https://github.com/mratsim/glyph/blob/master/glyph/snes/opcodes.nim#L16-L32 😉
10:07:06FromDiscord<haxscramper> bool is an enum
10:07:54FromDiscord<mratsim> In reply to @Evrensel Kişilik "can you type it?": do you know the mmap bitflags? https://github.com/mratsim/photon-jit/blob/master/photon_jit/photon_osalloc.nim#L15-L19
10:07:59FromDiscord<mratsim> it's similar to this
10:08:03*[R] joined #nim
10:08:12FromDiscord<mratsim> or chmod
10:08:23FromDiscord<mratsim> the base one are power of 2
10:08:37FromDiscord<mratsim> and 3 is ProtRead + ProtWrite
10:08:41FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/MAl
10:08:43Amun-Ramratsim: how does it perform when it comes to speed?
10:09:05FromDiscord<mratsim> In reply to @Amun-Ra "<@570268431522201601>: how does it": the emulator? Unfortunately I don't have 48 hours per day xD
10:09:11FromDiscord<Elegantbeef> Wait a minute
10:09:20FromDiscord<Evrensel Kişilik> sent a code paste, see https://play.nim-lang.org/#ix=3NsI
10:09:34FromDiscord<Elegantbeef> `N_LIB_PRIVATE tySet_tyBoolVaVACK0bpYmqIQ0mKcHfQQ atest_1 = 3;`
10:09:37FromDiscord<Elegantbeef> There you go
10:09:41FromDiscord<Elegantbeef> `typedef NU8 tySet_tyBoolVaVACK0bpYmqIQ0mKcHfQQ;`
10:09:44FromDiscord<Evrensel Kişilik> are these names unique in the universe?
10:09:52Amun-Ramratsim: I wrote Z80 emulator and used typical 256 case switch, that'll probably be converted to jump tables
10:09:53FromDiscord<mratsim> also speed for a snes meeh, but if you want to optimize a VM here are tricks: https://github.com/status-im/nimbus-eth1/wiki/Interpreter-optimization-resources
10:09:57FromDiscord<Evrensel Kişilik> it is impossible to be always unique 😱
10:09:59FromDiscord<Elegantbeef> They're generated from a language with generics
10:10:08FromDiscord<mratsim> In reply to @Amun-Ra "<@570268431522201601>: I wrote Z80": use computed gotos.
10:10:14FromDiscord<Evrensel Kişilik> you are using my dynamic library
10:10:18FromDiscord<Evrensel Kişilik> and oh
10:10:25FromDiscord<Evrensel Kişilik> names can conflict
10:10:38Amun-Ramratsim: mhm
10:10:40FromDiscord<Elegantbeef> Generating symbols is kinda required to map to C from Nim
10:10:40FromDiscord<Evrensel Kişilik> (edit) "can" => "may"
10:10:46FromDiscord<haxscramper> In reply to @Evrensel Kişilik "are these names unique": They use signature hash for the type IIRC
10:10:54FromDiscord<haxscramper> md5 digest of the symbol
10:10:56FromDiscord<Evrensel Kişilik> oh
10:11:00FromDiscord<Evrensel Kişilik> sooooo
10:11:12FromDiscord<Evrensel Kişilik> what if our symbols are longer than md5 hashes?
10:11:17Amun-Ramratsim: but your code gave me an idea for case optimizations with macros
10:11:27FromDiscord<Evrensel Kişilik> 😱 THEY WILL REPEAT 😱
10:11:28FromDiscord<haxscramper> they are not cryptographically secure in any case, but I doubt you can run into collisions
10:11:50FromDiscord<mratsim> In reply to @Evrensel Kişilik "😱 THEY WILL": it appends a _1 and _2 if there is a collision
10:11:51FromDiscord<Elegantbeef> Well it'll be fun the day someone does
10:12:01FromDiscord<mratsim> I did have collisions
10:12:06FromDiscord<Elegantbeef> Millions of lines of code compiled and no reported collisions yet
10:12:17FromDiscord<mratsim> because the compiler kept duplicating concept procs
10:12:20FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Millions of lines of": :BANNED:
10:12:45FromDiscord<mratsim> https://media.discordapp.net/attachments/371759389889003532/935477282573787136/79279951-783f1c80-7eaf-11ea-8d1a-0118f7e62bd8.png
10:12:53FromDiscord<Evrensel Kişilik> 😱 LEAVE ME ALONE I'M CRYING 😱
10:13:03FromDiscord<haxscramper> maybe using the name-based mangling would've been better, but in any case if there are identical symbols they will produce collisions of course
10:13:06FromDiscord<mratsim> @ElegantBeef : https://github.com/nim-lang/Nim/issues/13982
10:13:22FromDiscord<Elegantbeef> Shit you got me
10:13:48FromDiscord<Evrensel Kişilik> im crying
10:13:49FromDiscord<mratsim> 457 collisions https://media.discordapp.net/attachments/371759389889003532/935477553592958976/79350704-137bd480-7f38-11ea-8dfc-f3505c79fd17.png
10:14:00FromDiscord<Elegantbeef> Thought that's not the name mangling and more generating, no?
10:14:03FromDiscord<Evrensel Kişilik> 😱
10:14:28FromDiscord<haxscramper> the procs appear to be identical, right?
10:14:29FromDiscord<Evrensel Kişilik> why don't we give C names?
10:14:32FromDiscord<Evrensel Kişilik> 😱
10:14:42FromDiscord<Evrensel Kişilik> we can give PREFIXES
10:14:45FromDiscord<Evrensel Kişilik> oh no
10:14:47FromDiscord<haxscramper> wrt. to implementation
10:14:49FromDiscord<Evrensel Kişilik> oh nooooooooooooooooooooooooooooooooooooo
10:14:51FromDiscord<mratsim> In reply to @haxscramper "the procs appear to": they are, it's co-recursive concepts that caused this.
10:14:58FromDiscord<Evrensel Kişilik> allow us to give PREFIXES
10:15:12FromDiscord<mratsim> In reply to @Evrensel Kişilik "allow us to give": use {.exportc.} to set the name
10:15:20FromDiscord<Evrensel Kişilik> lemme add that feature to Nim
10:15:23FromDiscord<haxscramper> In reply to @Evrensel Kişilik "lemme add that feature": https://nim-lang.org/docs/manual.html#foreign-function-interface-exportc-pragma
10:15:23FromDiscord<Evrensel Kişilik> gimme the source
10:15:26FromDiscord<mratsim> use {.exportc:"my_pretty_C_name".}
10:15:29FromDiscord<haxscramper> `proc p(s: string) {.exportc: "prefix$1".} =`
10:16:01FromDiscord<Evrensel Kişilik> looooook im here for being your debugger person but you want me to add features to the language
10:16:05FromDiscord<Evrensel Kişilik> 😱
10:16:15FromDiscord<Evrensel Kişilik> In reply to @mratsim "use {.exportc:"my_pretty_C_name".}": what is this?
10:16:19FromDiscord<Evrensel Kişilik> is it prefix?
10:16:20Amun-Rathere' nimgdb
10:16:22FromDiscord<haxscramper> I bet the concept codegen replication was caused by broken generic cache that got triggered for each attempt to process concept
10:16:29FromDiscord<mratsim> In reply to @Evrensel Kişilik "what is this?": no it's completely replace
10:16:34FromDiscord<Evrensel Kişilik> 😱
10:16:37FromDiscord<haxscramper> that's my hypothesis at least
10:16:42FromDiscord<Evrensel Kişilik> soooooooooooooooo
10:16:44FromDiscord<Evrensel Kişilik> we need PREFIXES
10:16:47FromDiscord<mratsim> use $1 if you want to interpolate the proc name
10:17:12FromDiscord<mratsim> `{.exportc:"your_ad_here_$1".}`
10:17:13FromDiscord<Evrensel Kişilik> im gonna go to cry
10:17:16FromDiscord<Evrensel Kişilik> leave me alone
10:17:16FromDiscord<haxscramper> if you compile to C++ you can also use `--compileToNamespace=spc` if you want
10:17:45FromDiscord<Evrensel Kişilik> ALLOW ME TO SEND GIFS
10:17:45FromDiscord<Evrensel Kişilik> pls
10:17:49FromDiscord<Evrensel Kişilik> bots
10:17:52Amun-Rano
10:18:00FromDiscord<Evrensel Kişilik> In reply to @Amun-Ra "no": :BANNED:
10:18:25FromDiscord<Evrensel Kişilik> 😭
10:18:34FromDiscord<Elegantbeef> Anyway the point was more talking about sets 😀
10:18:35FromDiscord<Elegantbeef> Nim has ergonomic methods of creating bitsets which map into 8bit integers in C, using each bit as a flag just like bit flags. I dont know if GDB can support pretty printing that
10:18:46FromDiscord<mratsim> or 16-bit
10:19:04FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Nim has ergonomic methods": looooooooooooooooook i will add special things to debugger for Nim
10:19:12FromDiscord<mratsim> maybe the pascal extension can 😉
10:19:16FromDiscord<Evrensel Kişilik> but i need to list them first
10:20:46FromDiscord<Elegantbeef> Does nim's gdb script print sets nicely?
10:20:57FromDiscord<Elegantbeef> I'm a complete fool when it comes to debuggers
10:21:32FromDiscord<mratsim> I use backtrace and a lot of imagination
10:21:46FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Does nim's gdb script": you mean that to not handle them not as C things?
10:21:50FromDiscord<Evrensel Kişilik> instead Nim things
10:21:51FromDiscord<Evrensel Kişilik> ummmmmmmmmmmm
10:22:06FromDiscord<mratsim> set are special, the rest the repr matches C
10:22:08FromDiscord<Evrensel Kişilik> (edit) "not" => ""
10:22:17FromDiscord<Evrensel Kişilik> lemme check
10:22:19FromDiscord<Evrensel Kişilik> gimme code
10:22:29FromDiscord<Elegantbeef> `var a = {true, false}`
10:22:37FromDiscord<Elegantbeef> It's going to be `3`
10:22:37FromDiscord<mratsim> true false is a bad example
10:22:39FromDiscord<mratsim> use colors
10:22:57FromDiscord<Elegantbeef> `{'a'..'z'}`
10:23:02FromDiscord<Elegantbeef> Is that better mratsim
10:23:15FromDiscord<Rika> Where are the colours smh
10:23:19FromDiscord<mratsim> sent a code paste, see https://play.nim-lang.org/#ix=3NsK
10:23:25FromDiscord<haxscramper> @Evrensel Kişilik for quick testing of the genrated code you can run nim compiler with `nim c --stacktrace=off --gc=arc --linetrace=off --nimcache=cache file.nim` and it will generate relatively clean code in the `cache` directory
10:23:35FromDiscord<haxscramper> and then you can inspect how different types are represented
10:23:39FromDiscord<Evrensel Kişilik> In reply to @haxscramper "<@!359071052397281280> for quick testing": oh
10:23:40FromDiscord<mratsim> Red is assigned 0, Blue 1 and Green 3, and so the set will be 0b11 as internal repr
10:23:45FromDiscord<Elegantbeef> why not just `-c`
10:23:56FromDiscord<mratsim> (edit) "3," => "2,"
10:24:15FromDiscord<mratsim> and {Red, BLue, Green} will be 0b111
10:24:20FromDiscord<mratsim> (edit) "BLue," => "Blue,"
10:25:33FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3NsM
10:25:43FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/935480547118047232/unknown.png
10:25:46FromDiscord<Evrensel Kişilik> this
10:25:55FromDiscord<Evrensel Kişilik> what should this look like?
10:26:12FromDiscord<haxscramper> you can set specific values of the enum elements, this affects layout, you can also set `{.bitsize.}` for enum, it might also affect representation
10:27:02FromDiscord<Elegantbeef> It should look like `{Red, Blue}` ideally
10:27:26FromDiscord<Elegantbeef> `3` isnt a useful value for a collection of flags
10:27:28FromDiscord<haxscramper> there is an additional RTTI for the types IIRC in the genrated code
10:27:29FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "It should look like": soooooooooooooo
10:28:01FromDiscord<Evrensel Kişilik> you mean `{Red, Blue}` only?
10:28:05FromDiscord<Evrensel Kişilik> not expandable?
10:28:07FromDiscord<Elegantbeef> Yes
10:28:11FromDiscord<Evrensel Kişilik> ok
10:28:21FromDiscord<Evrensel Kişilik> let me looooook
10:28:28FromDiscord<Elegantbeef> It should be the set that it'd have been declared in Nim
10:29:26FromDiscord<Evrensel Kişilik> sooooooo since it is a C source actually, how could i understand it is a special Nim thing indeed?
10:29:54FromDiscord<Elegantbeef> Not a clue, there is apparently RTTI one can use
10:30:33FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Not a clue, there": what is RTII?
10:31:07FromDiscord<haxscramper> runtime type information, and no apparently it is not present for sets
10:31:29FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/935482001752997928/unknown.png
10:31:30FromDiscord<Elegantbeef> Ah nice 😀
10:31:36FromDiscord<Elegantbeef> So no can make them nice
10:31:43FromDiscord<Evrensel Kişilik> In reply to @haxscramper "runtime type information, and": how can i get that?
10:32:35FromDiscord<mratsim> I think it's fine to say that item 0, 1, 2, 12, 42 in the enum are present in the set.
10:32:41FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/935482296981655592/unknown.png
10:33:08FromDiscord<Evrensel Kişilik> soooooo
10:33:15FromDiscord<Elegantbeef> I guess printing it as binary or a group of which bits are on is the best one can do with what's given
10:33:17FromDiscord<Evrensel Kişilik> i need to get Nim-specific information about symbols
10:33:43FromDiscord<Evrensel Kişilik> is there something in memory
10:33:43FromDiscord<Evrensel Kişilik> or
10:33:56FromDiscord<Evrensel Kişilik> some file that includes these informations?
10:34:32FromDiscord<Evrensel Kişilik> soooo i could interpret them as Nim things
10:39:38FromDiscord<mratsim> nop, it's all optimized away so it can be fast
10:39:53FromDiscord<mratsim> but it's named tySet_tyEnum
10:40:05FromDiscord<Evrensel Kişilik> oh no
10:40:13FromDiscord<Evrensel Kişilik> 😱 THE NAME 😱
10:40:15FromDiscord<mratsim> unless they are renamed via {.exportc:....}
10:40:17FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/blob/devel/tools/nim-gdb.py#L413-L443
10:40:17FromDiscord<Elegantbeef> Supposedly the `nim-gdb.py` can support it
10:40:36FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "https://github.com/nim-lang/Nim/blob/devel/tools/ni": yes
10:40:40FromDiscord<Evrensel Kişilik> THE NAMEEEEEEEEE
10:40:52FromDiscord<Evrensel Kişilik> 😱
10:41:04FromDiscord<Evrensel Kişilik> then
10:41:09FromDiscord<Evrensel Kişilik> i will check names
10:41:11FromDiscord<Evrensel Kişilik> xd
10:41:22FromDiscord<Evrensel Kişilik> soooooooooooooooooooooooo
10:41:30FromDiscord<Evrensel Kişilik> you will see Nim things in evaluater
10:41:44FromDiscord<mratsim> :banana_dance:
10:41:58FromDiscord<Evrensel Kişilik> 😱
10:42:09FromDiscord<Evrensel Kişilik> GIMME GIFS
10:42:16FromDiscord<Evrensel Kişilik> BOTS
10:42:28FromDiscord<Elegantbeef> Bots are too dumb for that
10:42:39FromDiscord<mratsim> ElegantGIF
10:42:47FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Bots are too dumb": bad bots
10:42:49FromDiscord<Evrensel Kişilik> i dont love you
10:42:57FromDiscord<Elegantbeef> Good no one does
10:45:21FromDiscord<mratsim> mic drop
10:45:48FromDiscord<Evrensel Kişilik> soooooooooooooooooooooooooooooooooooo
10:45:53FromDiscord<Evrensel Kişilik> i will let you know when i do it
10:49:19FromDiscord<Phil> In reply to @Elegantbeef "Good no one does": I only love the things you create that save me work
10:49:34FromDiscord<Evrensel Kişilik> In reply to @Isofruit "I only love the": don't love it
10:49:35FromDiscord<Evrensel Kişilik> it is a bot
10:49:54FromDiscord<Phil> My love is free!
10:49:58FromDiscord<Phil> Viva la revolution!
10:50:43FromDiscord<Phil> Sidenote, the element client to access discord is alright, not sure I'd get used to it though
10:50:58FromDiscord<Evrensel Kişilik> In reply to @Isofruit "Sidenote, the element client": what is that?
10:51:27FromDiscord<isofruitus> This is that↵(@Evrensel Kişilik)
10:51:54FromDiscord<Phil> It's matrix's front end if I understood it in the 30 seconds I took to read over the webpage
10:51:55FromDiscord<Evrensel Kişilik> In reply to @isofruitus "This is that (<@359071052397281280>)": 😱 oh noooo i don't want more BOTS 😱
10:52:43FromDiscord<Evrensel Kişilik> how do they know Discord protocol?
10:52:48FromDiscord<Evrensel Kişilik> reverse engineering?
10:52:55arkanoidmycstring[^1] will be last char or null char?
10:53:35FromDiscord<Evrensel Kişilik> In reply to @arkanoid "mycstring[^1] will be last": if it is a `cstring` i think it must be a NULL char
10:54:18FromDiscord<Evrensel Kişilik> otherwise that syntatic sugar must be giving the last char
10:54:22FromDiscord<Evrensel Kişilik> before NULL char
10:54:24FromDiscord<Evrensel Kişilik> i have no idea
10:54:28FromDiscord<Evrensel Kişilik> i would make it like this
10:54:57FromDiscord<Phil> In reply to @Evrensel Kişilik "reverse engineering?": The power of love and computermagivs
10:54:59FromDiscord<Phil> (edit) "computermagivs" => "computermagics"
10:55:01FromDiscord<Phil> or sth
10:56:01arkanoidapparently csting type doesn't support backward index
10:56:49FromDiscord<mratsim> In reply to @arkanoid "apparently csting type doesn't": they can't since to know the length of a cstring you need to iterate first
10:57:01FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3NsS
10:57:08arkanoidyes, it makes sense, I just had to wrap my head around it
10:57:11FromDiscord<mratsim> the length isn't stored in the string.
10:57:17FromDiscord<Phil> In reply to @arkanoid "mycstring[^1] will be last": If you can tell me how to instantiate a cstring I can check in inim
10:57:21FromDiscord<mratsim> they are very inefficient.
10:57:38FromDiscord<mratsim> everyone is avoiding them everywhere except for printf xD
10:57:50FromDiscord<Evrensel Kişilik> sent a code paste, see https://play.nim-lang.org/#ix=3NsT
10:58:03FromDiscord<Evrensel Kişilik> gimme more 😱
10:58:06FromDiscord<Phil> If cstrings are that terrible, why do we even bother dealing with them? What are they good for? Efficient copying?
10:58:22arkanoidbecause C give you cstrings
10:58:47arkanoidand shitload of existing software uses null character to terminate string
10:59:21arkanoida lot of software that hates to iterate strings backwards efficiently
11:02:28PMunch@Phil, they're efficient in terms of memory usage if all you need to do is print them out to a terminal or something
11:03:21FromDiscord<Rika> Not by much
11:03:40PMunchI mean a Nim string like "Hello" is 8 bytes for the size, 8 bytes for the capacity of the underlying buffer, and 6 bytes for the null terminated string, that's 42 bytes of memory for storing 5 bytes of data
11:04:03PMunchA cstring would be 6 bytes of data
11:04:46PMunchThis doesn't matter a whole lot to us living in the gigabytes of ram and terabytes of hard-drive world, but to early programmers that would've been seen as a crazy amount of data to just throw awy
11:05:24FromDiscord<Phil> Makes sense. I mean for some small devices it might actually still make a difference
11:06:44PMunchDefinitely! I'm programming micro-controllers and there you count every single byte
11:07:30Amun-Rasmall string are often stored in registers as a value in some implementationss
11:07:47Amun-Rastrings*
11:08:28PMunchI've considered trying to implement alternative encodings in order to save bytes for those devices
11:08:39FromDiscord<Rika> Back then it sure mattered but it’s not great that it’s stil relied on now
11:08:45PMunchAmun-Ra, those would have to be some tiny strings
11:09:01PMunch@Rika, oh for sure, I was just giving some historical context
11:09:06Amun-RaPMunch: yes
11:09:41Amun-RaPMunch: gcc does this for strings up to 7 chars (storing it inside uint64_t)
11:11:20arkanoidmy nick won't fit :(
11:11:30arkanoidI feel fat
11:12:55FromDiscord<Phil> I feel your pain
11:13:51Amun-Raarkanoid: just wait for 128-bit cpus
11:14:07FromDiscord<Phil> ~~for another 50 years~~
11:16:02arkanoidbetter turn into a quantum nick
11:20:05*Gustavo6046 quit (Quit: Leaving)
11:26:37FromDiscord<mratsim> In reply to @PMunch "<@180601887916163073>, they're efficient in": their is no difference, a byte vs an int or an int32.
11:27:19FromDiscord<mratsim> and in the past lengths were stored in a byte anyway
11:27:59FromDiscord<Rika> ?
11:27:59FromDiscord<mratsim> In reply to @Amun-Ra "<@210739784761475072>: just wait for": 128-bit isn't really useful. We are only using ~48-bit for memory addressing nowadays.
11:44:02PMunch@mratsim, not sure I get what you're trying to say
11:44:42PMunchLength as a byte limits you to 256 character long strings though. Fine for log messages and such though
11:45:46*szahid quit (Quit: leaving)
12:00:03FromDiscord<ynfle> In reply to @mratsim "<@!767093711112241162> see https://github.com/nim-l": I don't get it. Doesn't work in regular procs?
12:00:49*jmdaemon quit (Ping timeout: 256 seconds)
12:01:55FromDiscord<Yardanico> no
12:03:16FromDiscord<ynfle> So is there any solution for regular procs? Can I emit c code `FILE` and `LINE` and have `--debuginfo` for the compiler?
12:04:27FromDiscord<mratsim> In reply to @PMunch "<@570268431522201601>, not sure I": that Pascal strings can be as space efficient as C string
12:04:40FromDiscord<mratsim> if you store lengthas a byte
12:04:50FromDiscord<mratsim> for microcontrollers
12:05:19FromDiscord<mratsim> and way faster because no need to iterate to fetch the length all the time
12:12:17PMunchSure, but if you never need to check length that serial send loop is now tracking and decrementing a pointer instead of just comparing the byte it just loaded from memory to null before sending it. So if the only thing you need to do is sending strings byte-by-byte C strings should still be faster/smaller
12:12:52PMunchWell, might depend on the CPU architecture
12:13:39PMunchMy point was just that keeping data small is still a concern in some domains
12:14:07PMunchAnd the domain that C strings was designed for is closer to that than to modern computers
12:15:40FromDiscord<mratsim> In reply to @PMunch "Sure, but if you": You often need to preallocate a buffer before sending anything, for that you need the length
12:17:25PMunchNot on the sender side? At least for AVR you just set a register to the byte you want to send and wait for another register to go to the "ready" state before assigning another byte.
12:17:30PMunchNo pre-allocation required
12:19:21*oddish joined #nim
12:27:38FromDiscord<claude> did anyone else know about this? does this differ for Nim across backends? https://media.discordapp.net/attachments/371759389889003532/935511227017351168/Screenshot_20220125_145804_org.mozilla.firefox.jpg https://media.discordapp.net/attachments/371759389889003532/935511227235463198/Screenshot_20220125_145156_org.mozilla.firefox.jpg
12:31:24FromDiscord<ynfle> That isn't in nim
12:33:15FromDiscord<ynfle> Can someone answer some questions about the internals of the compiler for me? I'm trying to do a bug fix
12:33:25PMunchI think he meant if you wrote the equivalent Nim code and compiled it for C and JS, would you see the same difference of output
12:36:54FromDiscord<ynfle> After testing, yes
12:43:51PMunchWell that's not great
12:45:58PMunchWhat is JS actually doing there though?
12:48:21PMunchIs it some kind of variable scoping rule?
12:49:40FromDiscord<ynfle> In reply to @PMunch "Is it some kind": Probably
13:08:35FromDiscord<ynfle> Any guidance on this bug would be much appreciated https://github.com/nim-lang/Nim/issues/19446
13:15:32*szahid joined #nim
13:30:00*keypey joined #nim
13:35:57*keypey quit (Quit: Leaving)
13:36:17*keypey joined #nim
14:16:57FromDiscord<Benjamin> Isn't it just that JS has different semantics for \`+=\`? I.e., looking up the value of the left-hand side before evaluating the right-hand side.
14:28:44FromDiscord<Evrensel Kişilik> Unity is making me crazy
14:28:49FromDiscord<Evrensel Kişilik> gimme Godot
14:30:22FromDiscord<Rika> there is a nim godot binding
14:31:14FromDiscord<hmmm> can we unity stuff on nim yet? 🤔
14:31:53FromDiscord<Evrensel Kişilik> In reply to @Rika "there is a nim": oh no im happy with GDScript
14:32:01FromDiscord<xflywind> And there is a plan rewrite binding to support godot 4.0; see https://discord.com/channels/371759389889003530/845770858470965258/897354249405616139
14:32:03FromDiscord<Rika> LOL
14:32:44FromDiscord<xflywind> (edit) "And there is a plan ... rewrite4.0" added "to" | "4.0;" => "4.0 (gdextension);"
14:33:19FromDiscord<hmmm> how can you be fine with that fake python noodle lang when you can use num 🧐
14:33:28FromDiscord<hmmm> nim
14:33:51FromDiscord<Evrensel Kişilik> In reply to @hmmm "can we unity stuff": C###################
14:34:46FromDiscord<mratsim> In reply to @hmmm "can we unity stuff": I remember Unreal Engine: https://github.com/pragmagic/nimue4
14:34:59FromDiscord<mratsim> and plenty of other engines
14:35:08FromDiscord<mratsim> it's like a competition to make game engine bindings in Nim
14:45:35*arkurious joined #nim
14:48:55FromDiscord<Phil> ~~Why can't we have a competition of making the perfect nim orm so that my life becomes easier~~
14:49:17PMunchYou bring the price money, I'll bring the competition
14:50:56PMunchOh well, gotta go
14:50:57*PMunch quit (Quit: leaving)
14:55:32*keypey quit (Quit: Leaving)
14:56:43FromDiscord<Phil> ... I'm willing to throw in 50-100€... which is basically nothing but I'm not rich yet
14:58:29FromDiscord<hmmm> I'll throw in a lemon flavoured ice cream 🍋
15:04:21FromDiscord<haolian9 (高浩亮)> hi all, i was reading nim for [python programmer](https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers#Sets), and i found the proc's naming convention changed to camel in nim 1.6.2 `to_table -> toTable`; does the doc needs an updation?
15:04:41FromDiscord<Rika> nim supports either convention
15:04:48FromDiscord<Rika> preferred is camel
15:04:59FromDiscord<Rika> i dont know if docs should reflect the preferred
15:09:29FromDiscord<enthus1ast> Imho they should
15:14:23FromDiscord<huantian> Having differing casing in the docs is probably just unnecessarily confusing
15:14:36FromDiscord<huantian> ~~or displeasing to the eye~~
15:18:51FromDiscord<xflywind> In official docs, camel cases are enforced. As for that wiki article which is managed by the community, snake cases are all over there, which are consistent with the Python version.
15:34:18FromDiscord<konsumlamm> In reply to @haolian9 (高浩亮) "hi all, i was": the naming convention didn't change in 1.6.2, it always was camelCase
15:38:17FromDiscord<haolian9 (高浩亮)> thank you, seems i just need to read more doc, like https://nim-lang.org/docs/nep1.html
15:57:23FromDiscord<ajusa> Nim's pretty close to hitting 2k open issues, big milestone coming up
16:02:29FromDiscord<huantian> Time to make up some bugs
16:08:49FromDiscord<konsumlamm> no need to make them up, just run all tests in the VM
16:18:32*kayabaNerve quit (Ping timeout: 240 seconds)
16:31:12FromDiscord<mratsim> There was a time, must have been prehistory, when we wanted to squash all bugs and go beyond 1k
16:31:26FromDiscord<mratsim> iirc it was 2018 and Nim had 1.1 or 1.2 open bugs.
16:50:18FromDiscord<Patitotective> Uuh, I'm tired of my parser, the comments sometimes not work, and when I fix them, the indentation stuff breaks 😭
16:50:43*rockcavera joined #nim
16:50:43*rockcavera quit (Changing host)
16:50:43*rockcavera joined #nim
16:53:26FromDiscord<leorize> maybe your parser is too complex \:p
16:53:59FromDiscord<Patitotective> In reply to @leorize "maybe your parser is": how do i simplify it? ;-;
16:54:15FromDiscord<leorize> how are you writing your parser?
16:54:20FromDiscord<Patitotective> _npeg_
16:54:31FromDiscord<Patitotective> `peg` macro
16:54:33FromDiscord<leorize> yea... that's a problem \:p
16:55:11FromDiscord<Patitotective> and some other `grammar` macros to parse strings and numbers
16:55:26FromDiscord<Patitotective> In reply to @leorize "yea... that's a problem": is there a better way?
16:55:40FromDiscord<leorize> I guess it really depends on how you're structuring your grammar
16:57:40FromDiscord<leorize> are you composing them from tokens?
16:58:18FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Nva
16:58:35FromDiscord<Patitotective> (edit) "https://play.nim-lang.org/#ix=3Nva" => "https://paste.rs/YnB"
16:59:10FromDiscord<Patitotective> I remove the code block captures
16:59:11FromDiscord<Patitotective> (edit) "remove" => "removed"
17:00:09FromDiscord<Patitotective> (edit) "https://play.nim-lang.org/#ix=3Nvf" => "https://play.nim-lang.org/#ix=3Nve"
17:00:25FromDiscord<Patitotective> `number` and `str` are the other `grammar`s
17:00:52FromDiscord<Patitotective> (edit) "other `grammar`s" => "`grammar` macros"
17:00:56FromDiscord<leorize> looks like your paser tokenize and try to make sense of them at the same time
17:02:00FromDiscord<Patitotective> So, I should only tokenize it?
17:02:07FromDiscord<Patitotective> (edit) "So, ... I" added "should" | removed "should"
17:02:12FromDiscord<leorize> maybe what you should be looking at is to first tokenize, then produce groupings of them, then interpret that
17:02:14FromDiscord<Patitotective> (edit) "it?" => "it in the `peg` macro?"
17:02:31FromDiscord<leorize> ie. `indent` can be a token
17:03:16FromDiscord<leorize> then you run your parser on the token stream to compress indent into semantic meaning
17:03:42FromDiscord<Patitotective> In reply to @leorize "maybe what you should": when you say produce groupings you mean objects? like nim nodes?
17:05:09FromDiscord<leorize> yea, things like that
17:05:14FromDiscord<leorize> nim nodes are very memory inefficient, but they are a good start
17:05:32FromDiscord<Patitotective> do you have any article or video about it? :p
17:05:47*PMunch joined #nim
17:06:45FromDiscord<Patitotective> https://www.youtube.com/watch?v=bxpc9Pp5pZM ? lol
17:09:11FromDiscord<leorize> https://craftinginterpreters.com/scanning.html
17:09:34FromDiscord<leorize> it's about writing a programming language but much of the stuff in here can be reused to parse any complex structured language
17:10:00FromDiscord<Patitotective> 👍
17:10:01FromDiscord<Patitotective> thanks
17:10:02FromDiscord<Patitotective> 🙃
17:10:20FromDiscord<leorize> you should only need the concepts from this and not the implementations
17:10:47FromDiscord<leorize> npeg is pretty capable of parsing just about anything, even custom token streams
17:12:19PMunchnpeg is a gem of library
17:18:52FromDiscord<eyecon> I'm a zealot for honeycomb, I find it much more intuitive
17:19:02FromDiscord<eyecon> Just wrote a duration parser in that
17:19:23FromDiscord<eyecon> In early stages for sure but I find the definitions readable
17:20:10FromDiscord<eyecon> sent a code paste, see https://play.nim-lang.org/#ix=3Nvn
17:23:25*vicfred joined #nim
17:24:51*kayabaNerve joined #nim
17:27:40*vicfred quit (Client Quit)
17:59:20Zevvyou guys should see Xpeg, that's even nicer
18:05:20Amun-Ranot to mention the jpeg
18:10:27*jmdaemon joined #nim
18:20:24FromDiscord<lpha3ch0> Can anyone help with good resources for learning concurrency in Nim? I looked at "Nim in Action" but it just wasn't enough.
18:22:47*neceve joined #nim
18:23:46Zevv ha
18:24:12Zevvaraq will have a talk at fosdem next week about just that subject, i believe
18:26:54*neurocyte0917090 joined #nim
18:32:32FromDiscord<Patitotective> In reply to @leorize "you should only need": actually the implementations look easier than _npeg_ hehe
18:36:15*NimEventer quit (Remote host closed the connection)
18:42:31*NimEventer joined #nim
18:42:37*NimEventer quit (Remote host closed the connection)
18:42:45*NimEventer joined #nim
18:45:35FromDiscord<gcao> sent a code paste, see https://play.nim-lang.org/#ix=3NvQ
18:47:18*NimEventer quit (Ping timeout: 250 seconds)
18:47:48*NimEventer joined #nim
18:50:58FromDiscord<mratsim> In reply to @Patitotective "So, should I only": separate the Lexer and the Parser
18:51:12FromDiscord<mratsim> that would be easier to debug and test.
18:52:06FromDiscord<mratsim> Then if you want to interleave them for efficiency of what not, you can use the great COBOL trick that accelerated their compilers by 70x more than 50 years ago: coroutines (or closure iterators in Nim).
18:53:29FromDiscord<mratsim> In reply to @gcao "hi how do I": yes
18:54:21FromDiscord<mratsim> In reply to @lpha3ch0 "Can anyone help with": Nim asyncdispatch is very similar to Python async/await
18:55:04FromDiscord<mratsim> Basically, when you call an async function, you are given a handle called a Future, that will allow you to retrieve the result.
18:55:28FromDiscord<lpha3ch0> In reply to @mratsim "Nim asyncdispatch is very": I never learned asyc programming in Python. As I said, I've only done concurrency in Golang, once, and just managed to make a simple example work.
18:55:30FromDiscord<mratsim> you do whatever, and at an appropriate place you `await` the future.
18:56:01FromDiscord<mratsim> or `waitFor` if you are in a normal function (not `async`).
18:56:14FromDiscord<gcao> In reply to @mratsim "yes": Thank you. But I'm getting error that indicates that what I passed in is not treated as a varargs.↵index 1 not in 0 .. 0
18:56:26FromDiscord<gcao> In my seq there are two values.
18:56:33FromDiscord<mratsim> what happens in the background when you wall await is that if it's still not ready, it will proceed with other stuff.
18:57:16FromDiscord<gcao> (edit) "values." => "values.↵BTW I'm actually passing in a slice of seq."
18:57:41FromDiscord<mratsim> In reply to @gcao "In my seq there": can you try with a seq[int] just to rule out your string being interpreted as a seq[char]
19:03:40FromDiscord<demotomohiro> @lpha3ch0 Here is tutorial to learn asyncnet: https://xmonader.github.io/nimdays/day15_tcprouter.html
19:09:12FromDiscord<lpha3ch0> In reply to @demotomohiro "<@275045322705862656> Here is tutorial": thank you
19:10:56*Figworm quit (Quit: Figworm)
19:11:57*krux02 joined #nim
19:16:16*unmatched-paren joined #nim
19:23:57*jmdaemon quit (Ping timeout: 256 seconds)
19:34:33FromDiscord<Shiba> what is incremental compiling
19:34:35FromDiscord<Shiba> (edit) "compiling" => "compiling?"
19:36:16FromDiscord<Patitotective> In reply to @mratsim "separate the Lexer and": hmmm, and should i use a library for the lexer?
19:36:39FromDiscord<Patitotective> or from scratch?
19:44:29unmatched-parenhello! i'm adding nim support to Guix, which builds packages from source in a chroot in /tmp. obviously, this means that I can't use libraries conventionally; i'll have to figure out how to vendor dependencies instead of downloading them from nimble (the chroot intentionally has no internet access.) but before i do that, i have to get nimble working, which means vendoring std. is there a flag or env var that can set the location o
19:44:29unmatched-parenlike the one that can set the search path for packages? (i understand from the manual that std and packages use separate search paths; correct me if i'm wrong.)
19:45:52FromDiscord<IsaacPaul> sent a code paste, see https://play.nim-lang.org/#ix=3Nw9
20:00:09*jmdaemon joined #nim
20:10:17FromDiscord<IsaacPaul> sent a code paste, see https://play.nim-lang.org/#ix=3Nwg
20:23:58*jjido joined #nim
20:27:41FromDiscord<IsaacPaul> sent a code paste, see https://play.nim-lang.org/#ix=3Nwo
20:28:42FromDiscord<mratsim> In reply to @IsaacPaul "Any way to do": np
20:28:47FromDiscord<mratsim> (edit) "np" => "no"
20:29:00FromDiscord<IsaacPaul> aw I was excited for a moment
20:29:44FromDiscord<mratsim> tbh if you use an {.inline.} proc the compiler will be able to do constant-folding at compile-time
20:30:01FromDiscord<IsaacPaul> ah good to know
20:30:40FromDiscord<mratsim> both Nim and GCC/LLVM
20:31:10FromDiscord<mratsim> here the costliest part is probably dereferencing the this.data pointer.
20:31:35FromDiscord<mratsim> the computation on the right hand side can be done while waiting for this dereference at the instruction level
20:40:45*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
20:51:33unmatched-parennvm, i've found it: --lib:foo
20:52:36*noeontheend joined #nim
20:59:57*Colt quit (Quit: Leaving)
21:01:25*jmdaemon quit (Ping timeout: 256 seconds)
21:08:37FromDiscord<ynfle> In reply to @IsaacPaul "Any way to do": Why don't you use `uint8` whose max is 255?
21:12:23FromDiscord<IsaacPaul> I'm still working on the api. That could work for major but not minor and revision https://gist.github.com/izackp/3f6e43b153a750410492b242bbc7fe5d
21:14:11FromDiscord<IsaacPaul> I gotta play around with it some more.
21:14:41FromDiscord<mratsim> In reply to @ynfle "Why don't you use": the issue is that how do you deal with overflow.
21:14:55FromDiscord<mratsim> it's like people saying unsigned integer should be used for length
21:15:22FromDiscord<mratsim> suddenly you can't write if `a < len-1` because what if lenth == 0
21:15:33FromDiscord<mratsim> (edit) "lenth" => "`length" | "0" => "0`"
21:17:27FromDiscord<IsaacPaul> yea that's the usual problem.
21:19:44*jmdaemon joined #nim
21:19:52FromDiscord<nekojes> Hey, I'm writing a .so in nim and I'm having trouble running tests with it? I'm getting `execution of an external program failed` cause my tests are also being compiled to a .so and can't run
21:20:46Amun-Rathen you need another thing to load that shared library and run
21:21:28Amun-Ranekojes: why do you need to have tests as shared libs?
21:21:42FromDiscord<nekojes> No I mean, I don't want them to be shared libs
21:21:51FromDiscord<xx_ns> In reply to @nekojes "Hey, I'm writing a": tests are run on the code, not on the compiled binary?
21:22:04FromDiscord<xx_ns> it doesn't matter if it's a linkable elf or what
21:23:08FromDiscord<nekojes> Guess I'm confused. I'm just not sure what I need to set in order to get tests to run on my library.
21:23:23FromDiscord<xx_ns> how are you currently trying to run your tests
21:23:28FromDiscord<mratsim> don't use --app:lib
21:23:40Amun-Ramhm
21:25:31FromDiscord<nekojes> But I need --app:lib to compile it to a library when I'm not testing? I'm also using nimterop to link in a .c file. If I remove the --app:lib then I get undefined references
21:26:40FromDiscord<mratsim> so you need a binary to link to that .so and calls your public API then.
21:26:48FromDiscord<mratsim> (edit) "calls" => "call"
21:27:17FromDiscord<mratsim> If you want to test from Nim you need to {.importc.} your public procedures.
21:27:54*unmatched-paren quit (Quit: ERC 5.4 (IRC client for GNU Emacs 28.0.90))
21:29:15Amun-Ratbh nimble should create binaries in tests/ and not shared libs in that case
21:31:04FromDiscord<nekojes> I think ideally I'd like it so when I'm not testing it compiles to a .so, but when I am testing it compiles otherwise, but in that case I'm not sure how to link the nimterop'd .c file
21:32:47FromDiscord<nekojes> and I'm not sure how to have it switch between --app:lib and not depending if I'm running `nimble test` or `nimble build`
21:35:07Amun-Rawill setting app type in config.nims in tests directory work?
21:35:30FromDiscord<mratsim> In reply to @nekojes "I think ideally I'd": {.compile:"foo.c".}
21:35:36FromDiscord<mratsim> (edit) "{.compile:"foo.c".}" => "`{.compile:"foo.c".}`"
21:36:09FromDiscord<nekojes> I have a `cCompile("foo.c")`
21:36:34FromDiscord<nekojes> in the nim file that the test is importing
22:05:54FromDiscord<nekojes> Looks like the pragma is working rather than cCompile. I mean, I'm getting a segfault but that's probably a different issue. Still not sure how to have it build a library when not testing tho?
22:48:57*noeontheend quit (Ping timeout: 240 seconds)
22:50:32*neceve quit (Ping timeout: 240 seconds)
22:56:31FromDiscord<nekojes> \o/ got it running. Besides the don't compile to library when testing bit
23:03:18*jjido joined #nim
23:08:05*jjido quit (Client Quit)
23:20:58arkanoidwhat's wrong with my "iterator items[T]" call syntax? https://play.nim-lang.org/#ix=3Nxa
23:21:09arkanoidthe typedesc version works nicely
23:21:49FromDiscord<Elegantbeef> `items[int]()`
23:21:57FromDiscord<Elegantbeef> You were not calling it
23:24:56arkanoidElegantbeef, ok, right, but now I have another question on same topic, let me prepare a minimal case
23:25:30arkanoidbut long story short: aa.items(openArray[byte]) works, but aa.items[:openArray[byte]]() doesn't
23:25:53FromDiscord<Elegantbeef> Well i await the min case
23:38:14arkanoidElegantbeef, here you have two different behaviors. I'm experiencing same issues in my code, where I'm actually dealing with real data and not using openArray[T].default
23:38:16arkanoidhttps://play.nim-lang.org/#ix=3Nxe
23:40:47*noeontheend joined #nim
23:42:09FromDiscord<Elegantbeef> Yea there is no `low` for `openArray[T]`
23:42:17FromDiscord<Elegantbeef> So give me one minute
23:42:35arkanoidI'm wrapping another minimal example using real data
23:42:43FromDiscord<Elegantbeef> Actually nvm there is no default 😀
23:43:37FromDiscord<Elegantbeef> Eh I see there is an issue so i'll see if i can get a work around for you
23:45:14FromDiscord<Elegantbeef> It's a generic issue afaict
23:50:37*noeontheend quit (Ping timeout: 240 seconds)
23:53:43FromDiscord<ynfle> Beef do you have a moment for the compiler bug from yesterday?
23:55:59FromDiscord<Elegantbeef> I seen the comment but i dont have much to say
23:56:27arkanoidElegantbeef, does your previous syntax fix apply here too? https://play.nim-lang.org/#ix=3Nxg
23:56:27FromDiscord<Elegantbeef> Trying to solve it as lazy as possible is the best, but depending on the case it doesnt work
23:56:49FromDiscord<Elegantbeef> Well it works but it shows a generic issue
23:57:14FromDiscord<Patitotective> In my parser should I start counting lines and columns from zero or from one? 🧐
23:57:29arkanoiddo you think I should open an issue about it?
23:58:42FromDiscord<Elegantbeef> Probably, though it's a generic sammich issue so probably will be fixed in eons
23:59:59arkanoidwell, yes :D but at least theres a minimal example to test against