<< 23-01-2022 >>

00:02:40FromDiscord<ynfle> sent a code paste, see https://play.nim-lang.org/#ix=3Nbu
00:02:55FromDiscord<ynfle> ie. convert to NimNode to code generically?
00:05:40arkanoidI have "func itemBlob*(arr: MyArray, i: int): openArray[byte] =" that returns a view on a single item from a large buffer that contains blobs of different lengths, where I know the number of them. It works. Now I now I want to create a "itemBlobs" that returns a view with random access (openArray like) on the blobs. Basically what I want is an openArray[openarray[byte]], but how can I create it?
00:08:14FromDiscord<ynfle> I don't think you can
00:09:58arkanoidmmm, ok, bet way to get around this?
00:10:54arkanoidwhich funcs do I have to implement to make object iterable and randomly accessible in nim way?
00:12:31FromDiscord<ynfle> `items` iterator and `[]` if that's what you are referring to, though I don't think a view of a view is possible
00:14:47FromDiscord<ynfle> @ElegantBeef I'm basically asking if there is a way to manually get ther result of a `func` that is passed in to a macro at compile time
00:15:17arkanoidynfle, thanks
00:16:02FromDiscord<ynfle> I'm definitely thinking about this wrong
00:16:07FromDiscord<ynfle> Not sure in what way though
00:16:15FromDiscord<Elegantbeef> You have to run the code, so you'd need intermediate macros
00:16:28arkanoidynfle, and returning an openArray from an iterator?
00:17:13FromDiscord<ynfle> In reply to @Elegantbeef "You have to run": Can you give an example? Not sure what you mean. I tried `macro t(x: typed) = x` but that didn't work
00:17:48arkanoidnevermind, it works
00:17:56FromDiscord<ynfle> In reply to @arkanoid "<@757977788056600719>, and returning an": Ummm. Not sure. Don't use view types other than in routine params
00:18:17FromDiscord<Elegantbeef> I guess what i said wouldnt help, you need a `static T`
00:19:17FromDiscord<ynfle> `static NimNode` Doesn't work either
00:19:57FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3NbE
00:23:33FromDiscord<ynfle> sent a code paste, see https://play.nim-lang.org/#ix=3NbF
00:23:45FromDiscord<Elegantbeef> I'm just showing the value was got
00:23:51FromDiscord<ynfle> Ah
00:26:59FromDiscord<ynfle> sent a code paste, see https://play.nim-lang.org/#ix=3NbI
00:27:22FromDiscord<ynfle> In reply to @ynfle "It segfaults https://play.nim-lang.org/#ix=3NbH": nvm
00:27:39FromDiscord<Elegantbeef> Passing a NimNode to a macro is silly
00:27:58FromDiscord<ynfle> This is what I want to do https://play.nim-lang.org/#ix=3NbJ
00:31:01FromDiscord<ynfle> In reply to @Elegantbeef "Passing a NimNode to": The `func`s produce a NimNode though
00:32:53FromDiscord<Elegantbeef> Sure but why do you need to test what this procedure returns??
00:33:08FromDiscord<ynfle> To make sure my logic is correct
00:33:24FromDiscord<Elegantbeef> But why is an intermediate procedure exposed?
00:34:14FromDiscord<Elegantbeef> You dont need to test every procedure used to make a macro you should test the macro
00:36:33FromDiscord<ynfle> In reply to @Elegantbeef "You dont need to": I don't have a macro. I wrote out the generated nim code
00:36:37FromDiscord<ynfle> (edit) "In reply to @Elegantbeef "You dont need to": I don't have a macro. I wrote out the generated nim code ... " added "to a file"
00:37:01FromDiscord<Elegantbeef> Why
00:39:40FromDiscord<ynfle> In reply to @Elegantbeef "Why": Because I am writing a code generator
00:40:44FromDiscord<Elegantbeef> Well you're not going to be able to test the procs that return NimNdoes
00:50:17*noeontheend quit (Ping timeout: 240 seconds)
01:01:40arkanoidhow can I slice a string with openArray to make it return nothing/empty view? echo "abc".toOpenArray(1,1) returns ['b']
01:02:21*PMunch quit (Quit: leaving)
01:02:39FromDiscord<auxym> hey @ElegantBeef mind having a look at this? won't compile https://play.nim-lang.org/#ix=3NbX
01:04:16FromDiscord<auxym> I think using `when` instead of `if` for the check works though
01:04:19FromDiscord<Elegantbeef> `when`
01:04:20FromDiscord<Elegantbeef> Also just use a bool i guess
01:04:30arkanoidor better, "".toOpenArray(0,0) returns IndexDefect
01:04:34FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3NbZ
01:05:13FromDiscord<Elegantbeef> Also auxym today must be PR day
01:05:22FromDiscord<Elegantbeef> Have multiple PRs today 😛
01:05:35FromDiscord<auxym> happy PR day 😉
01:06:19FromDiscord<Elegantbeef> Can i also ask you to bump the Nimble version in a commit?
01:06:25FromDiscord<auxym> sure thing
01:11:11arkanoidnevermind, "".toOpenArray(0,-1) returns []. Looks like an hack
01:24:00FromDiscord<auxym> @ElegantBeef should I bump the minor, semver-style?
01:24:08FromDiscord<Elegantbeef> patch
01:24:25FromDiscord<auxym> k
01:26:00FromDiscord<Elegantbeef> I still have to actually run your code and question how we can get around the C files
01:26:45FromDiscord<auxym> I have a rough idea how to make it work, just a lot of work of reimplementing the descriptor-generating macros in nim
01:27:49FromDiscord<auxym> they are macros that generate byte comma-separated char literals, so you can use them to build up a static byte array
01:28:32FromDiscord<auxym> eg this https://github.com/hathach/tinyusb/blob/a59228207999329eb16fddbeb6286dfc36f4c0bd/src/class/hid/hid_device.h#L179
01:28:48FromDiscord<Elegantbeef> Yea i remember that
01:28:59FromDiscord<auxym> I don't think it's possible to `importc` macros like that right?
01:29:15FromDiscord<Elegantbeef> I'd rather not either way
01:29:52FromDiscord<auxym> yeah
01:30:26FromDiscord<auxym> so I thought they could be re-implemented as nim macros that generate a comma-separated list of `u8` literals... just sort of a pain to do
01:30:45FromDiscord<Elegantbeef> Well i just need to know what the hell it actually does 😛
01:32:17FromDiscord<Elegantbeef> I see a bunch of what we could use slices/ranges for and bitsets, but it's hard to read
01:33:27FromDiscord<auxym> most of it is here (`HID_REPORT_ITEM`) https://github.com/hathach/tinyusb/blob/master/src/class/hid/hid.h
01:34:18FromDiscord<auxym> then other strategy I guess would nim macros that generate object typedefs for the descriptors, that you can then cast to a byte array
01:34:31FromDiscord<auxym> But then you actually have to understand the USB spec, ha
01:35:31FromDiscord<Elegantbeef> I mean to make this in Nim someone probably has to 😛
01:36:55FromDiscord<auxym> well, or you could probably translate the tinyusb macros 1:1 and generate a list of int literals
01:37:19FromDiscord<Elegantbeef> Well we can generate the literals fine, the thing is doing it nicely and ergonomically 😛
01:38:01FromDiscord<auxym> you mean, more ergonomically than the C macros? 🙂
01:38:37arkanoidis there in stdlib a way to convert a openArray[byte] to a string? I just need to print it
01:40:27arkanoidjust found this, so I guess no: https://github.com/nim-lang/Nim/issues/14810
01:42:24FromDiscord<Elegantbeef> Yes
01:44:17FromDiscord<Elegantbeef> If you just need to print it iterate over the array writing each byte as a char and then write `'\n'` and flush
01:44:45FromDiscord<auxym> fwiw hid report descriptors are documented here, just not a fun read https://www.usb.org/sites/default/files/hid1_11.pdf
01:47:31FromDiscord<auxym> example the kb one, the bytes are shown on the left. https://media.discordapp.net/attachments/371759389889003532/934625359914233916/unknown.png
01:47:41FromDiscord<auxym> (edit) "left." => "right"
01:49:39FromDiscord<Bung> @ElegantBeef have you decide how to support multiple search paths?
01:49:40FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Nc6
01:53:12arkanoidEElegantbeef, thanks! I've implemented an openArray[byte] to string via copymem in the meanwhile
01:55:03FromDiscord<Elegantbeef> I mean i guess we can add yet another argument that is `searchPaths: seq[string] = @[]` but ugh
01:59:01*noeontheend joined #nim
02:00:25FromDiscord<Bung> so just provide the argument let user get nimble packages paths ?
02:00:45FromDiscord<Elegantbeef> Well Nimscripter doesnt care about nimble or compiler paths
02:06:12FromDiscord<duckbill> is it possible to have a reference to an element of an array? (without having to declare the object as ref object)↵why does this work [0], while this[1] dereferences the returned `Foo` ptr in the generated c code? ↵[0]: https://play.nim-lang.org/#ix=3Nce↵[1]: https://play.nim-lang.org/#ix=3Ncf
02:06:36FromDiscord<duckbill> (edit) "have" => "get"
02:07:30FromDiscord<Bung> okay, that's fine too, am ok with that
02:08:43arkanoidtrying to turn a seq[seq] into an openArray goes SIGSEGV: https://play.nim-lang.org/#ix=3Nch
02:09:32FromDiscord<Elegantbeef> Nim doesnt allow capturing of `var T` without the experimental views
02:09:53FromDiscord<Elegantbeef> It's an unsafe operation so if you want to hold onto a value in the array do `t = arr[index].addr`
02:09:54arkanoidthat is enabled
02:10:11*krux02 quit (Remote host closed the connection)
02:10:26FromDiscord<Elegantbeef> Talking to duckbill
02:11:07FromDiscord<Elegantbeef> Bung there is presently a PR that we're going to be waiting on before i support the change, so i apologise for the delay
02:11:46arkanoidoh, sorry
02:12:02FromDiscord<duckbill> so every time I want to mutate data in that kind of scenario I need to use ref objects?
02:12:27FromDiscord<Elegantbeef> Well Nim doesnt have a borrow checker by default so how else do you safely hold onto that pointer?
02:15:27FromDiscord<duckbill> I don't know :D you can get a pointer to most things in go and I'm trying to understand and learn how to structure things in nim
02:15:55FromDiscord<Elegantbeef> Well you can get a pointer
02:15:55FromDiscord<Elegantbeef> it's just "unsafe"
02:16:06FromDiscord<duckbill> yeah I understand the difference
02:16:06FromDiscord<Elegantbeef> Arkanoid why not do `va: lent seq[seq[int]] = a`
02:16:10FromDiscord<Elegantbeef> I dont get why you want to convert it to an open array
02:16:50arkanoidElegantbeef, because I want to experiment returning an openArray(openArray[byte])
02:17:17FromDiscord<Elegantbeef> I dont think that's supported
02:17:20FromDiscord<Elegantbeef> I could be wrong
02:17:34arkanoidyeah, want to try exactly that
02:17:42arkanoidand in the meanwhile I met that sigsegv
02:19:23FromDiscord<Elegantbeef> Atleast with views off `openArray[openArray[T]]` makes no sense
02:20:02arkanoidyeah, but it would make sense to iterate over a buffer of blobs
02:20:57arkanoidI've an iterator in place and a random accessor that returns openArray[byte] and they work, make it an openArray[openArray[byte]] would be the natural next step
02:28:35FromDiscord<Elegantbeef> @duckbill\: i will say that you dont need to use a ref everytime, you can also use unsafe things like the pointer or `std/decls`'s `byaddr`
02:30:12FromDiscord<Elegantbeef> You just should ensure it's technically safe and not just pretend safe
02:35:23FromDiscord<duckbill> I see. byaddr looks nice
02:36:15FromDiscord<duckbill> is there any point in having `var Foo` as the return type of a proc?
02:36:59FromDiscord<Elegantbeef> It returns a mutable reference
02:37:36FromDiscord<duckbill> but only if it is used immediately
02:37:41FromDiscord<Elegantbeef> You cannot safely capture it, but it doesnt change the ability to mutate
02:38:02FromDiscord<Elegantbeef> say you do `myThing.getThing.add(10)`
02:38:26FromDiscord<duckbill> okay neat, thanks for answering my questions :D
02:38:38FromDiscord<Elegantbeef> No problem
02:39:20FromDiscord<Elegantbeef> Worth noting you also can have iterators yield `var T` which does allow you to do `for x in arr.mitems: x = Foo()`
02:40:25FromDiscord<duckbill> that was actually my next question
02:55:06FromDiscord<Bung> In reply to @Elegantbeef "Bung there is presently": oh, I just checked that PR , nice one. dont be sorry, when I dont make progress on nim I move to js development.
03:44:25FromDiscord<kevin> I'm forgetting where I saw it but I remember Nim supports function local variables that persist in future function calls
03:44:42FromDiscord<kevin> Does anyone have a link or code snippet for such a function?
03:45:02FromDiscord<Elegantbeef> `var a {.global.} = 100`?
03:45:18FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#pragmas-global-pragma
03:45:50FromDiscord<kevin> Hmm... maybe?
03:46:05FromDiscord<kevin> For example, something in a function that keeps track of how many times that function has been run
03:46:17FromDiscord<Elegantbeef> Well it'd work
03:47:13FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Ncx
03:50:22*Nuc1eoN joined #nim
04:06:01*arkurious quit (Quit: Leaving)
04:06:01*supakeen quit (Quit: WeeChat 3.4)
04:09:27arkanoidis there a way to loop the types inside alieases like Positive or SomeInteger?
04:12:49*Colt joined #nim
04:21:29*Gustavo6046_ joined #nim
04:23:40*Gustavo6046_ quit (Client Quit)
04:23:54*Gustavo6046 joined #nim
04:58:57nrds<Prestige99> Is there a way to make a proc like `x+=` that will be recognized without having to do `+=`(x, 4) for example?
04:59:17nrds<Prestige99> like x += 4
05:00:06FromDiscord<Rika> \`+=\`?
05:00:11FromDiscord<Elegantbeef> make a template `x`
05:00:45FromDiscord<Rika> i dont see the solution
05:01:42nrds<Prestige99> this ones a little weird - it's for a vector that's part of a an object, but Vector itself already has a += proc
05:01:44FromDiscord<Elegantbeef> depending what you're doing make `obj.x` return the `var T`
05:02:17*noeontheend quit (Ping timeout: 240 seconds)
05:02:22nrds<Prestige99> I'll write an example, it's an issue of ambiguity
05:04:31FromDiscord<Rika> In reply to @nrds "<Prestige> this ones a": then youd need to distinguish the value being added
05:09:46nrds<Prestige99> dammit I wrote an example in the playground and clicked share to ix, and it replaced my code with some python script
05:10:03nrds<Prestige99> https://play.nim-lang.org/#ix=3xc6
05:10:34FromDiscord<geekrelief> In reply to @arkanoid "is there a way": You can create a macro that recursively calls `getImpl` on the typeclass.
05:11:12arkanoidgeekrelief, thanks!
05:11:50FromDiscord<geekrelief> In reply to @arkanoid "<@109484839480107008>, thanks!": https://play.nim-lang.org/#ix=3NcR to get you started
05:14:19nrds<Prestige99> maybe `x+=` syntax just isn't picked up eh
05:15:00FromDiscord<Elegantbeef> make a `x` accesor
05:15:26nrds<Prestige99> so I did that originally but
05:15:38nrds<Prestige99> there's a proc for that vector type, `+=`
05:16:17nrds<Prestige99> so if I do foo.x += something, it won't call the right proc
05:16:28nrds<Prestige99> and I see why, it's ambiguous which it should call
05:16:36FromDiscord<Elegantbeef> It's not
05:16:39FromDiscord<evoalg> In reply to @nrds "<Prestige> dammit I wrote": I've taken to copying the text into clipboard before sharing on playground, just so I don't lose all my hard work
05:16:51nrds<Prestige99> Yeah I should do that too lol
05:16:53nrds<Prestige99> unfortunate
05:17:06FromDiscord<evoalg> (when I remember)
05:20:37nrds<Prestige99> https://play.nim-lang.org/#ix=3NcT @Elegantbeef
05:21:09nrds<Prestige99> I essentially want to have `center=` invoked always
05:21:31nrds<Prestige99> Been trying a few different approaches unsuccessfully
05:22:30nrds<Prestige99> oh I left it out there hold on
05:23:15nrds<Prestige99> https://play.nim-lang.org/#ix=3NcU
05:23:48FromDiscord<Elegantbeef> yea you cannot override `+=` for a variable
05:23:56FromDiscord<Elegantbeef> Do the java `.add`
05:24:01FromDiscord<Rika> eww
05:24:21FromDiscord<huantian> java in my family friendly nim code?
05:24:27nrds<Prestige99> ^
05:24:36nrds<Prestige99> that's what I was trying to avoid haha
05:26:35FromDiscord<Elegantbeef> well the field doesnt have any special dispatch, so there isnt anything you can really do
05:27:27nrds<Prestige99> yeah maybe it's my only choice here
05:28:17nrds<Prestige99> or write some crazy macro
05:58:10*jmdaemon joined #nim
07:36:42FromDiscord<creikey> How can I pass a pointer of a sequence to a C library's function?
07:36:49FromDiscord<creikey> I'm having issues doing `indices[0].unsafeAddr` with a sequence in openlg
07:36:50FromDiscord<creikey> (edit) "openlg" => "opengl"
07:37:13FromDiscord<Elegantbeef> that's how you'd do it
07:37:22FromDiscord<creikey> ` glBufferData(GL_ARRAY_BUFFER, sizeof vertices, vertices[0].unsafeAddr, GL_STATIC_DRAW)`
07:37:27FromDiscord<Elegantbeef> What's the trouble incorrect data or typing?
07:37:29FromDiscord<creikey> oh does sizeof not work with sequences
07:37:38FromDiscord<Elegantbeef> verticies.len
07:37:40FromDiscord<creikey> that's what it is
07:37:41FromDiscord<creikey> yeah
07:37:43FromDiscord<creikey> 100%
07:37:45FromDiscord<Elegantbeef> `sizeof(seq) == 8`
07:37:46FromDiscord<creikey> renderdoc says it's 8 bytes
07:37:47FromDiscord<creikey> yeah
07:37:56FromDiscord<creikey> thanks
07:38:02FromDiscord<Elegantbeef> No problem
07:38:58FromDiscord<Elegantbeef> you will probably want to do `len sizeOf(typeof(veritices[0]))`
07:39:24FromDiscord<Elegantbeef> Although i guess you probably are only uploading fixed size arrays 😀
07:39:40FromDiscord<demotomohiro> `seq` is actually just a pointer to heap memory So sizeof(seq) returns 8.
07:39:51FromDiscord<Evrensel Kişilik> hi
07:39:58FromDiscord<Evrensel Kişilik> what is this language
07:40:05FromDiscord<Rika> What?
07:40:07FromDiscord<Elegantbeef> A system programming language
07:40:15FromDiscord<Evrensel Kişilik> https://tenor.com/view/cat-wow-surprise-shock-fear-gif-17912457
07:40:21FromDiscord<demotomohiro> And unsafeAddr will be deprecated in future.
07:40:48FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "A system programming language": sooooooo i installed it
07:41:02FromDiscord<Evrensel Kişilik> where is the simplest tutorial?
07:41:57FromDiscord<Elegantbeef> https://nim-lang.org/documentation.html a bunch of material here
07:42:29FromDiscord<Elegantbeef> There is also http://ssalewski.de/nimprogramming.html
07:43:56FromDiscord<Elegantbeef> Also @creikey if you want to steal some code https://github.com/beef331/truss3d/blob/master/src/truss3D/models.nim#L112-L239 has a fairly good API(assuming you're wanting to make meshes dynamically
07:44:05FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "https://nim-lang.org/documentation.html a bunch of": thank you
07:44:07FromDiscord<Evrensel Kişilik> buuuuuut
07:44:20FromDiscord<creikey> In reply to @Elegantbeef "you will probably want": yes
07:44:21FromDiscord<Evrensel Kişilik> `nim` command doesn't exist
07:44:33FromDiscord<Evrensel Kişilik> i did this
07:44:33FromDiscord<Elegantbeef> You then can pass iterators like so https://github.com/beef331/truss3d/blob/master/examples/shapes.nim#L43-L58
07:44:38FromDiscord<Elegantbeef> Are you on windows?
07:44:41FromDiscord<Evrensel Kişilik> sent a code paste, see https://play.nim-lang.org/#ix=3Ndj
07:44:41FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Are you on windows?": no
07:44:43FromDiscord<creikey> In reply to @Elegantbeef "Although i guess you": I'm generating a sequence of verticies and indices from a font atlas json then uploading it
07:44:45FromDiscord<Elegantbeef> Ah that's a no
07:45:00FromDiscord<creikey> In reply to @demotomohiro "`seq` is actually just": it's also the length right
07:45:07FromDiscord<creikey> I'd imagine 4 bytes for the memory pointer 4 bytes for the size
07:45:14FromDiscord<Elegantbeef> No
07:45:15FromDiscord<Evrensel Kişilik> @ElegantBeef you are a bot 😱
07:45:19FromDiscord<Elegantbeef> It's a pointer to `data, len, capacity`
07:45:22FromDiscord<Elegantbeef> I'm a matrix user
07:45:31FromDiscord<creikey> In reply to @Elegantbeef "It's a pointer to": 8/3 is irrational
07:45:36FromDiscord<creikey> (edit) "irrational" => "not an integer"
07:45:39FromDiscord<Evrensel Kişilik> where is my `nim` command?
07:45:47FromDiscord<Elegantbeef> It's a pointer to len, capacity, data
07:45:55FromDiscord<creikey> In reply to @demotomohiro "And unsafeAddr will be": oh do you do addr instead
07:45:59FromDiscord<Elegantbeef> so it's `sizeof` is 8
07:46:09FromDiscord<Elegantbeef> Yes `unsafeaddr` is a misnomer
07:46:13FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934715631989817364/unknown.png
07:46:14FromDiscord<Evrensel Kişilik> oh no
07:46:16FromDiscord<Evrensel Kişilik> i just saw this
07:46:18FromDiscord<Evrensel Kişilik> lol
07:46:20FromDiscord<creikey> In reply to @Elegantbeef "so it's `sizeof` is": I thought pointers were 4 bytes
07:46:32FromDiscord<Elegantbeef> No pointers are 8 bytes on 64bit
07:46:42FromDiscord<creikey> ah yeah
07:46:43FromDiscord<creikey> basics of computing
07:46:58FromDiscord<creikey> In reply to @Elegantbeef "It's a pointer to": so all of the metadata is on the heap
07:47:03FromDiscord<Elegantbeef> That's basically what a seq is
07:47:05FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Ndl
07:47:10FromDiscord<Elegantbeef> Might not be exact
07:47:13FromDiscord<Elegantbeef> But yea
07:47:47FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934716022974459934/unknown.png
07:47:49FromDiscord<Evrensel Kişilik> what is this?
07:47:52FromDiscord<demotomohiro> !eval sizeof(seq[int]), ", ", sizeof(pointer)
07:47:53NimBotCompile failed: /usercode/in.nim(1, 17) Error: invalid indentation
07:48:06FromDiscord<creikey> In reply to @Elegantbeef "Also <@180866243819995136> if you": thanks for the reference
07:48:17FromDiscord<demotomohiro> !eval echo sizeof(seq[int]), ", ", sizeof(pointer)
07:48:19NimBot8, 8
07:48:25FromDiscord<creikey> sent a code paste, see https://play.nim-lang.org/#ix=3Ndm
07:48:36FromDiscord<creikey> I've read over some the nim manual but somehow didn't catch that
07:48:40FromDiscord<creikey> (edit) "I've read over some ... the" added "of"
07:48:57FromDiscord<Rika> In reply to @Evrensel Kişilik "": Your file cannot have dashes in its name
07:49:06FromDiscord<Rika> It’s not a valid Nim module name
07:49:13FromDiscord<creikey> !eval echo seq[int].addr
07:49:14NimBotCompile failed: /usercode/in.nim(1, 9) Error: expression has no address; maybe use 'unsafeAddr'
07:49:36FromDiscord<creikey> shoot is it newSeq
07:49:40FromDiscord<Evrensel Kişilik> sooooooo lets try it
07:49:46FromDiscord<creikey> !eval echo newSeq[int]().addr
07:49:47NimBotCompile failed: /usercode/in.nim(1, 17) Error: expression has no address; maybe use 'unsafeAddr'
07:49:59FromDiscord<creikey> !eval echo newSeq[int]().unsafeAddr
07:50:00NimBotCompile failed: /usercode/in.nim(1, 17) Error: expression has no address
07:50:04FromDiscord<Evrensel Kişilik> how can i add ELF debug symbols at building?
07:50:18FromDiscord<Rika> They are included by default I believe
07:50:29FromDiscord<Rika> Ah wait no,
07:50:30FromDiscord<Evrensel Kişilik> In reply to @Rika "They are included by": ok thank you
07:50:38FromDiscord<Evrensel Kişilik> oh noooooooooooooooooo
07:50:46FromDiscord<Rika> --debugger:native perhaps
07:51:01FromDiscord<Evrensel Kişilik> is there a GDB-specific option?
07:51:20FromDiscord<Rika> Don’t think so, no
07:52:06FromDiscord<demotomohiro> If I remember correctly, `unsafeAddr` will be deprecated or just become alias of `addr` in next version. You might still need to use `unsafeAddr` to get address from immutable parameter in ver 1.6.2.
07:52:57FromDiscord<Evrensel Kişilik> In reply to @Rika "Don’t think so, no": thank you
07:52:59FromDiscord<Rika> In reply to @demotomohiro "If I remember correctly,": I assume the deprecation of that will be in 2.0
07:53:00FromDiscord<Evrensel Kişilik> it works
07:53:03FromDiscord<Elegantbeef> It will be deprecated due it being a misnomer
07:53:14FromDiscord<Evrensel Kişilik> give me a big project written in this language
07:53:15FromDiscord<creikey> In reply to @Rika "I assume the deprecation": yo wait there's a nim 2.0 coming out??
07:53:15FromDiscord<Elegantbeef> unsafeaddr is equally unsafe to addr
07:53:28FromDiscord<creikey> In reply to @Evrensel Kişilik "give me a big": come back in 3 months and I'll link you to mine
07:53:30FromDiscord<Elegantbeef> Aside from the compiler? 😛↵(@Evrensel Kişilik)
07:53:31FromDiscord<Rika> In reply to @creikey "yo wait there's a": Not any time soon but it’s planned
07:53:45FromDiscord<Elegantbeef> 2.0 is coming soon
07:53:46FromDiscord<Evrensel Kişilik> In reply to @creikey "come back in 3": ok
07:53:57FromDiscord<creikey> In reply to @Rika "Not any time soon": is it more or less overscoped than godo t4
07:53:58FromDiscord<creikey> (edit) "godo t4" => "godot 4"
07:54:00FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Aside from the compiler?": ummm maybe
07:54:14FromDiscord<Rika> In reply to @creikey "is it more or": I know as much as you do
07:54:19FromDiscord<Elegantbeef> I dont think there many "big projects" with open source
07:54:23FromDiscord<creikey> I remember 4 years ago when I wanted compute shaders in godot and they said "you'll be able to use them in the godot 4 vulkan rewrite releasing in just 6 months!"
07:54:30FromDiscord<Evrensel Kişilik> is this nim build that i installed has debug symbols?
07:54:39FromDiscord<Rika> In reply to @Evrensel Kişilik "is this nim build": The compiler? No
07:54:44FromDiscord<Rika> I believe not
07:54:52FromDiscord<Elegantbeef> No it should not be
07:54:53FromDiscord<Rika> You will need to build it with symbols yourself
07:55:01FromDiscord<Elegantbeef> @creikey\: read for yourself https://github.com/nim-lang/RFCs/issues/437
07:55:01FromDiscord<Evrensel Kişilik> In reply to @Rika "You will need to": oh nooooooooo
07:55:05FromDiscord<demotomohiro> If you want to debug Nim code with GDB, my old article might help.↵https://internet-of-tomohiro.netlify.app/nim/gdb.en.html
07:55:11FromDiscord<Evrensel Kişilik> In reply to @Rika "You will need to": does it take long time?
07:55:12FromDiscord<Rika> Don’t worry it won’t take half an hour to build
07:55:22FromDiscord<creikey> In reply to @Elegantbeef "<@180866243819995136>\: read for yourself": already know it's gonna be good with the quote at the top
07:55:26FromDiscord<Rika> Maybe 15 minutes if you’re on a slow processor
07:55:28FromDiscord<Elegantbeef> It's less than 1 minute for fresh compiler on my xeon1231v3
07:55:40FromDiscord<Elegantbeef> less than 2 minute\
07:56:05FromDiscord<Evrensel Kişilik> In reply to @Rika "Maybe 15 minutes if": i7 10750h
07:56:14FromDiscord<Evrensel Kişilik> but still big things take very long time
07:56:17FromDiscord<Rika> Should be quick then
07:56:19FromDiscord<Elegantbeef> You should be able to do it uncached for a few minutes
07:56:25FromDiscord<Rika> Sounds modern and beefy so
07:56:26FromDiscord<Elegantbeef> Cached will be quick depending on what you're changing
07:56:52FromDiscord<Evrensel Kişilik> what do you use for debugging?
07:57:00FromDiscord<Elegantbeef> I use `echo`
07:57:05FromDiscord<creikey> In reply to @Elegantbeef "<@180866243819995136>\: read for yourself": surprised LLVM isn't on here
07:57:07FromDiscord<Elegantbeef> I dont need breakpoint debugging in 99.99% of my code
07:57:16FromDiscord<Elegantbeef> Moving to LLVM isnt a very beneficial move
07:57:21FromDiscord<isofruitus> echo and testing out stuff in inim
07:57:27FromDiscord<creikey> proper compiler webassembly support would also be really nice
07:57:36FromDiscord<Elegantbeef> I mean emscripten works
07:57:43FromDiscord<Elegantbeef> It's one config away
07:57:44FromDiscord<creikey> don't you have to like override the build cache folder
07:57:49FromDiscord<Elegantbeef> No
07:57:50FromDiscord<creikey> and then compile that with emcc
07:57:57FromDiscord<Elegantbeef> https://forum.nim-lang.org/t/8827
07:58:01FromDiscord<Elegantbeef> It's a single nim config file
07:58:07FromDiscord<creikey> In reply to @Elegantbeef "https://forum.nim-lang.org/t/8827": this didn't hsow up on google
07:58:08FromDiscord<creikey> noooo
07:58:13FromDiscord<creikey> I just spent like
07:58:13FromDiscord<creikey> hours
07:58:19FromDiscord<creikey> getting it to work the old way
07:58:28FromDiscord<Elegantbeef> Treeform also has a tutorial
07:58:34FromDiscord<creikey> that's what I was lookoing at
07:58:36FromDiscord<creikey> (edit) "lookoing" => "looking"
07:58:49FromDiscord<Elegantbeef> That doesnt involve what you said
07:59:51FromDiscord<creikey> In reply to @Elegantbeef "That doesnt involve what": huh yeah just checked it again and it has a nim.cfg
07:59:52FromDiscord<Elegantbeef> Anywho there isnt much benefit there, there is the detatched NLVM project also
08:00:00FromDiscord<creikey> ` --nimcache:tmp # Store intermediate files close by in the ./tmp dir.
08:00:03FromDiscord<creikey> (edit) "dir." => "dir.`"
08:00:06FromDiscord<creikey> do you happen to know why it has this
08:00:32FromDiscord<Elegantbeef> I do not
08:01:02FromDiscord<Elegantbeef> I've only ever used wasm once for my NimVM in browser example
08:01:29FromDiscord<Elegantbeef> And in that case it was whatever impbox had made up
08:01:37FromDiscord<Elegantbeef> Which was based off treeforms tutorial
08:01:55FromDiscord<Evrensel Kişilik> In reply to @Rika "You will need to": looooks like standard library has debug symbols
08:02:03FromDiscord<Rika> ?
08:02:11FromDiscord<Elegantbeef> Well yea the stdlib is shipped as source
08:02:52FromDiscord<Elegantbeef> If you do `nim -v` you can see the flags it was built with
08:02:59FromDiscord<Elegantbeef> it should just be `-d: release`
08:03:01FromDiscord<Evrensel Kişilik> In reply to @Rika "?": https://media.discordapp.net/attachments/371759389889003532/934719858669666354/unknown.png
08:03:14FromDiscord<Evrensel Kişilik> im just trying compatibility
08:03:27FromDiscord<Evrensel Kişilik> loooks like everything is working well
08:03:41FromDiscord<Rika> Well yeah again the standard library is shipped in source code form
08:03:42FromDiscord<Evrensel Kişilik> (edit) "trying" => "testing"
08:04:18FromDiscord<Evrensel Kişilik> oh no
08:04:22FromDiscord<Elegantbeef> You can modify the stdlib and add more modules locally if you really wanted to, not that it's advisable
08:04:23FromDiscord<Evrensel Kişilik> there is a problem
08:04:30FromDiscord<Rika> Yes?
08:04:33FromDiscord<Rika> What’s the issue
08:04:53FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934720326217138206/unknown.png
08:04:57FromDiscord<Evrensel Kişilik> where is my main function?
08:05:11FromDiscord<Elegantbeef> The main function is the one generated to be C compliant
08:05:18FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934720434425983027/unknown.png
08:05:30FromDiscord<Elegantbeef> That's the main function
08:05:34FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "The main function is": soooooooooo i cant go here
08:05:41FromDiscord<demotomohiro> echoBinSafe = echo
08:05:54FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "That's the main function": yes i mean i can't go to this line in stack
08:06:53FromDiscord<Elegantbeef> I havent used a debugger much and have tried to debug top level code even less so i do not know
08:07:11madpropsi don't get debuggers
08:07:14madpropsi tried using one the other day
08:07:17madpropsit's so confusing
08:07:31FromDiscord<Evrensel Kişilik> In reply to @madprops "it's so confusing": ummmmm that's why im developing this debugger
08:07:34FromDiscord<Elegantbeef> I mean they're useful if something escapes you, but a vast majority of the time a simple echo works for me
08:08:02FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "I mean they're useful": oh no
08:08:14FromDiscord<Elegantbeef> What?
08:08:24FromDiscord<Evrensel Kişilik> i hope you are not writing a lexer without debugger
08:08:53FromDiscord<Elegantbeef> Who said I've written a lexer?
08:08:58FromDiscord<Evrensel Kişilik> this lang looks like more compatible with GDB than Rust
08:09:10FromDiscord<Elegantbeef> Well it uses C as an IR so it damn well should be 😛
08:09:15FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Who said I've written": then it's goood without a debugger
08:09:24FromDiscord<creikey> In reply to @Elegantbeef "Well it uses C": why does llvm exist when you can just do this
08:09:27FromDiscord<creikey> like what are the benefits
08:09:34FromDiscord<creikey> the llvm docs seem just so terrible to work through
08:09:53FromDiscord<Elegantbeef> Well in theory a platform dependant backend that only needs one compiler implemented 😀
08:09:58FromDiscord<Evrensel Kişilik> except i can't go to main function in stack
08:10:00FromDiscord<Evrensel Kişilik> it looks good
08:10:01FromDiscord<Evrensel Kişilik> lol
08:10:13FromDiscord<Elegantbeef> Well that's the hidden main
08:10:26FromDiscord<Evrensel Kişilik> at least pointer visualization is working xD
08:10:32FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Ndu
08:10:40FromDiscord<Elegantbeef> Though i dont see why you cannot step through main
08:10:44FromDiscord<Evrensel Kişilik> sent a code paste, see https://paste.rs/e7U
08:10:58FromDiscord<Elegantbeef> a "function" 😀
08:11:05FromDiscord<Rika> Just making a function then calling it
08:11:16FromDiscord<Elegantbeef> Also are you compatible with pretty printers?
08:11:22FromDiscord<Rika> Instead of having your code splattered on the code-floor
08:11:37FromDiscord<isofruitus> Making a function called main and having that be the only thing that gets called directly from global space is a pattern I've only seen in python so far
08:11:39madpropsthere is blood on the code-floor
08:11:46FromDiscord<creikey> sent a long message, see http://ix.io/3Ndw
08:11:55FromDiscord<Elegantbeef> Flatty could be good
08:12:09FromDiscord<Elegantbeef> Frosty aswell
08:12:22FromDiscord<creikey> (edit) "http://ix.io/3Ndw" => "http://ix.io/3Ndx"
08:12:25FromDiscord<Elegantbeef> Or "newFields/structs"
08:12:25FromDiscord<creikey> I like flatty made by treeform
08:12:28FromDiscord<Elegantbeef> Never mind
08:12:33FromDiscord<Elegantbeef> Both are not versioned
08:12:36FromDiscord<creikey> oh they aren't
08:12:49FromDiscord<Elegantbeef> You'd need your own versioning
08:12:50FromDiscord<creikey> still have no idea what the best way to do something like that is
08:13:01FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934722374794903562/unknown.png
08:13:02FromDiscord<Evrensel Kişilik> sent a code paste, see https://play.nim-lang.org/#ix=3Ndy
08:13:14FromDiscord<Rika> In reply to @creikey "oh yeah what's the": Hard to say I would say
08:13:28FromDiscord<Rika> Protobuf of course has its issues for your use case
08:13:32FromDiscord<Evrensel Kişilik> then we should use a pseudo-main thing
08:13:42FromDiscord<creikey> In reply to @Rika "Protobuf of course has": I was originally thinking capnproto just to go with something battle tested
08:13:46FromDiscord<creikey> and unlikely to randomly fail
08:13:50FromDiscord<creikey> in mysterious way
08:13:51FromDiscord<creikey> (edit) "way" => "ways"
08:13:57FromDiscord<Elegantbeef> It's not needed for code, but creating it will make it less odd
08:14:06FromDiscord<Elegantbeef> less odd for debuggers\
08:14:09FromDiscord<Rika> In reply to @creikey "I was originally thinking": Protobuf is just as battle tested afaik?
08:14:19FromDiscord<creikey> In reply to @Rika "Protobuf is just as": it is yeah it's made by the same guy I think
08:14:24FromDiscord<Elegantbeef> Protobuf is widely adopted
08:14:27FromDiscord<creikey> protobuf is just more complicated than capnproto
08:14:31FromDiscord<Elegantbeef> Protobuf is made by google 😛
08:14:47FromDiscord<Rika> In reply to @Elegantbeef "Protobuf is made by": More like “swallowed by Google”
08:15:13FromDiscord<Evrensel Kişilik> looooks like expression evaluation on mouse over is not working right now
08:15:14FromDiscord<Elegantbeef> Yea
08:15:16FromDiscord<creikey> I"m tempted to just sqlite it for saving then flatty for sending over the network
08:15:32arkanoidwhat is flatty?
08:15:39FromDiscord<creikey> nim serialization by treeform
08:15:42FromDiscord<Evrensel Kişilik> im sure it is about that the editor can't take names with types
08:15:44FromDiscord<Elegantbeef> A binary format library
08:15:48FromDiscord<Evrensel Kişilik> i can fix it quickly
08:15:50FromDiscord<Rika> In reply to @creikey "I"m tempted to just": That’s seriously cursed
08:16:03FromDiscord<Rika> Can’t you have two different systems for saving and sendingB
08:16:03FromDiscord<creikey> In reply to @Rika "That’s seriously cursed": why
08:16:03FromDiscord<Elegantbeef> Allows you to dump objects to a binary file
08:16:13FromDiscord<creikey> In reply to @Rika "Can’t you have two": yeah this is what I was thinking
08:16:23FromDiscord<creikey> to make sure that the saved data isn't lost use a reliable database
08:16:31FromDiscord<creikey> (edit) "to make sure that the saved data isn't lost use a reliable database ... " added "that's very tested"
08:16:40FromDiscord<creikey> and for the network use a convenient library because I can assume everybody's on the same version
08:18:01FromDiscord<creikey> like the saving and loading is going to be versioned
08:18:18FromDiscord<creikey> and I'm going to have to write a lot of converters as I update this with the designers I'm working wiht
08:18:19arkanoidthanks
08:18:28FromDiscord<Elegantbeef> Evrensel i do have to laugh at the "Hopefully you dont make a lexer without a debugger" comment since i dont use a debugger ever for working on semantic analysis
08:18:52FromDiscord<creikey> In reply to @Elegantbeef "Evrensel i do have": I thought lexers were mostly autogenerated nowadays
08:18:58FromDiscord<creikey> I wonder how interesting the nim compiler source is
08:19:06FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Evrensel i do have": what is that?
08:19:08FromDiscord<Elegantbeef> Interesting
08:19:12FromDiscord<creikey> In reply to @Elegantbeef "*Interesting*": yeah like
08:19:13FromDiscord<Rika> In reply to @creikey "why": I misinterpreted you lol
08:19:15FromDiscord<creikey> I'd imagine there's a lot of macros
08:19:22FromDiscord<Evrensel Kişilik> In reply to @creikey "I thought lexers were": im writing my own lexer
08:19:28FromDiscord<Rika> I thought you were sending the SQLite database over the network
08:19:33FromDiscord<creikey> In reply to @Evrensel Kişilik "im writing my own": respect
08:19:34FromDiscord<Rika> :brainlet:
08:19:35FromDiscord<Elegantbeef> There are no macros in the compiler
08:19:36FromDiscord<creikey> this is cursed
08:19:39FromDiscord<Elegantbeef> Intentionally so
08:19:43FromDiscord<creikey> In reply to @Rika "I thought you were": cursed
08:19:48FromDiscord<creikey> In reply to @Elegantbeef "Intentionally so": for bootstrapping?
08:19:49FromDiscord<Evrensel Kişilik> In reply to @creikey "respect": im a lexical analysing person xD
08:19:58FromDiscord<Rika> In reply to @creikey "cursed": That’s why I said it was cursed man lmao
08:20:06FromDiscord<Elegantbeef> To reduce complexity i believe
08:20:06FromDiscord<creikey> sqlite over the network is like
08:20:07FromDiscord<creikey> 💀
08:20:08FromDiscord<Evrensel Kişilik> sooooooooooooooo
08:20:19FromDiscord<Evrensel Kişilik> i can clearly say that my debugger is working well for nim debugging
08:20:21FromDiscord<Elegantbeef> Macros are complicated to work with, perhaps also boot strapping
08:20:36FromDiscord<Rika> Also I never thought I’d need a proper debugger for lexing? What’s special about it for it to need a debugger
08:20:41FromDiscord<Elegantbeef> Semantic analysis is the step after lexing/parsing in a compiler where most of the reasoning goes in
08:21:16FromDiscord<creikey> wow lot of files in the nim compiler
08:21:25FromDiscord<Elegantbeef> Yea and they're oddly sorted
08:21:31FromDiscord<creikey> the original nim compiler is writen in pascal??
08:21:40FromDiscord<creikey> so if you want to bootstrap you gotta bootstrap pascal
08:21:44FromDiscord<Elegantbeef> Yep
08:21:46FromDiscord<Rika> The sort is odd or it being sorted is odd?
08:21:51FromDiscord<creikey> wait
08:21:52FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934724601785765898/unknown.png
08:21:53FromDiscord<creikey> no you don't
08:21:55FromDiscord<Elegantbeef> It was writen in pascal and transpiled to Nim eventually
08:21:55FromDiscord<Elegantbeef> Nope
08:21:56FromDiscord<Evrensel Kişilik> is this GNU LibC?
08:21:57FromDiscord<creikey> nim translates to C
08:22:12FromDiscord<creikey> the compiler can just be compiled to C
08:22:21FromDiscord<Evrensel Kişilik> In reply to @creikey "the compiler can just": oh no
08:22:24FromDiscord<Rika> In reply to @Evrensel Kişilik "is this GNU LibC?": Yes Nim doesn’t generate static libraries
08:22:26FromDiscord<Rika> Well
08:22:28FromDiscord<Rika> It can
08:22:30FromDiscord<Rika> But not default
08:22:31FromDiscord<Elegantbeef> Probably↵(@Evrensel Kişilik)
08:22:34FromDiscord<demotomohiro> You can build Nim from source without pascal. You only need GCC.
08:22:37FromDiscord<Evrensel Kişilik> oh no
08:22:39FromDiscord<creikey> In reply to @demotomohiro "You can build Nim": yeah
08:22:44FromDiscord<creikey> is the C source hosted somewhere
08:22:45FromDiscord<Evrensel Kişilik> 😱
08:22:46FromDiscord<creikey> for that purpose
08:22:50FromDiscord<Rika> Hi
08:22:52FromDiscord<Rika> Oops
08:22:54FromDiscord<Rika> I mean yup
08:22:55FromDiscord<Elegantbeef> The bootstrap process is compile the C source then compile the recent Nim compiler using it↵(@creikey)
08:23:06FromDiscord<Rika> In reply to @Rika "I mean yup": Don’t ask how that happened
08:23:19FromDiscord<demotomohiro> https://github.com/nim-lang/csources_v1
08:23:26FromDiscord<Elegantbeef> There is a `nim-lang/csource` repo hosting the latest Nim version source required to boot trap
08:23:41FromDiscord<creikey> I see interesting
08:23:47FromDiscord<creikey> this is cool
08:23:57FromDiscord<Elegantbeef> Evrensel is going mad with C boostrapping? 😀
08:24:23FromDiscord<creikey> the sempass files in the compiler are really complicated
08:24:30FromDiscord<Elegantbeef> Fuck yea
08:24:40FromDiscord<creikey> I forgive the strange error messages
08:24:50FromDiscord<Elegantbeef> Eh i dont
08:25:12NimEventerNew post on r/nim by mavavilj: Most viable game (+ physics) engines for Nim in 2022?, see https://reddit.com/r/nim/comments/saoxvp/most_viable_game_physics_engines_for_nim_in_2022/
08:25:27FromDiscord<creikey> ue4 is such a mess to work with
08:25:35FromDiscord<creikey> I would say godot but not until godot 4
08:25:44FromDiscord<Elegantbeef> Especially with bindings that are deprecated in favour of godot 😜
08:25:44FromDiscord<creikey> if you don't want to deal with mobile gl renderer
08:26:01FromDiscord<creikey> if you're using godot nim doesn't make much sense anyways because gdscript is a lot like nim
08:26:24FromDiscord<creikey> you'd only use nim for stuff that needs to be super performant (relatively) and even then the new godot 4 gdscript engine is getting a JIT I think
08:26:26FromDiscord<creikey> or maybe in 4.1
08:26:54FromDiscord<Elegantbeef> Eh i dont think i can write gdscript, i'd just feel like i was writing a neutered nim
08:26:54FromDiscord<creikey> our machinery is really promising but it's ECS only and the C api is a bit obtuse
08:27:01FromDiscord<Evrensel Kişilik> oh damn
08:27:04FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934725913181057094/unknown.png
08:27:12FromDiscord<Evrensel Kişilik> this is working toooo
08:27:22FromDiscord<creikey> In reply to @Elegantbeef "Eh i dont think": I think the harder part would be getting used to surrendering control flow to the object oriented node tree model
08:27:29FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Eh i dont think": i love GDScript
08:27:29FromDiscord<creikey> with signals/notifications
08:27:39FromDiscord<Elegantbeef> You over estimate how much i use macros/templates 😛
08:27:49FromDiscord<Elegantbeef> under estimate even
08:27:59FromDiscord<Elegantbeef> Maybe i'll get basic logic sentence constructed eventually
08:28:23FromDiscord<isofruitus> Write a macro to construct one for you from your input
08:28:40FromDiscord<creikey> why are the functions in netty named so weirdly
08:28:41FromDiscord<Evrensel Kişilik> is there a linked-list in these sources?
08:28:48FromDiscord<creikey> var client = newReactor()↵var connection = client.connect("127.0.0.1", 2001)
08:28:57FromDiscord<Evrensel Kişilik> im going to test linked list visualizer thing
08:29:04FromDiscord<Elegantbeef> `import std/lists`
08:29:17FromDiscord<Elegantbeef> https://nim-lang.org/docs/lists.html got a bunch of examples you can test
08:29:28FromDiscord<Evrensel Kişilik> oh ok
08:29:38FromDiscord<Evrensel Kişilik> then let me try them
08:30:00FromDiscord<creikey> it seems like nim 2.0 is really tiny
08:30:02FromDiscord<creikey> like not that much changing
08:30:06FromDiscord<Rika> In reply to @creikey "var client = newReactor()": What’s weird?
08:30:15FromDiscord<creikey> other than orc
08:30:21FromDiscord<creikey> In reply to @Rika "What’s weird?": why is it called a reactor
08:30:28FromDiscord<Rika> In reply to @creikey "it seems like nim": Because pretty much only breaking changes are delegated to it so far
08:30:29FromDiscord<Elegantbeef> Well 2.0 will allow relatively large changes
08:30:31FromDiscord<Evrensel Kişilik> oh no
08:30:33FromDiscord<Evrensel Kişilik> oh nooooooooooooooooooo
08:30:39FromDiscord<Elegantbeef> So if you dislike a library API this is time to speak up
08:30:41FromDiscord<Evrensel Kişilik> this language is working on indentations
08:30:47FromDiscord<Evrensel Kişilik> i want to cry
08:30:53FromDiscord<creikey> In reply to @Elegantbeef "Well 2.0 will allow": yeah when I imagine big version increment of a language I think of like completely new syntax
08:30:56FromDiscord<Rika> In reply to @creikey "why is it called": Because I don’t know it’s standard, I had to deal with reactors in Twisted and AsyncIO in Python too
08:31:02FromDiscord<Elegantbeef> Oh god not someone that hate's whitespace saying "you're doing it wrong"
08:31:14FromDiscord<Evrensel Kişilik> damn
08:31:15FromDiscord<creikey> In reply to @Rika "Because I don’t know": oh is it called that in other places too
08:31:21FromDiscord<creikey> I don't have all that much experience with networking like that
08:31:22FromDiscord<Rika> In reply to @Evrensel Kişilik "this language is working": You just realised?
08:31:27FromDiscord<Elegantbeef> Well 2.0 just means "breaking changes allowed" so libraries can be changed alot↵(@creikey)
08:31:27FromDiscord<Evrensel Kişilik> `next` and `prev` what is this `std/lists` thing uses
08:31:28FromDiscord<Rika> In reply to @creikey "oh is it called": Yup
08:31:34FromDiscord<Evrensel Kişilik> it is good
08:31:40FromDiscord<Evrensel Kişilik> because it is default in my debugger
08:31:41FromDiscord<Evrensel Kişilik> lol
08:31:53FromDiscord<Elegantbeef> Oh so you're happy?
08:32:01FromDiscord<Rika> He is in some sense
08:32:35FromDiscord<creikey> sent a code paste, see https://play.nim-lang.org/#ix=3Ndz
08:32:35FromDiscord<Elegantbeef> Ahhhhh
08:32:45FromDiscord<Elegantbeef> That's a lot of nested arrays you got here
08:32:58FromDiscord<creikey> so I get whitespace being good for scoping
08:33:02FromDiscord<creikey> but why spaces instead of tabs
08:33:20FromDiscord<isofruitus> I thought python fought this war for us
08:33:20FromDiscord<Elegantbeef> Editor support/defaults arent great for tabs
08:33:29FromDiscord<SivadNai> nicer if you're on a smaller screen
08:33:37FromDiscord<Elegantbeef> Spaces are certainly the same size across editors regardless
08:33:43FromDiscord<creikey> In reply to @Elegantbeef "Editor support/defaults arent great": isn't this a problem with the editor not the language
08:33:44FromDiscord<Elegantbeef> Like github's editor defaults to 8 size tabs
08:33:50FromDiscord<creikey> In reply to @Elegantbeef "Like github's editor defaults": oh this is annoying
08:33:51FromDiscord<Rika> In reply to @creikey "but why spaces instead": Afaik Araq said it’s both because of preference and “mixing both is difficult to resolve”
08:33:53FromDiscord<creikey> I kinda get it
08:34:02FromDiscord<Elegantbeef> It is but the language had to choose one and spaces were the winner due to that
08:34:03FromDiscord<creikey> the github 8 size tab editor thing is major
08:34:03FromDiscord<Rika> So he just banned one over the other? I’m not too sure
08:34:25FromDiscord<Rika> In reply to @creikey "the github 8 size": You can change it with a query parameter
08:34:28FromDiscord<Rika> I don’t remember which
08:34:31FromDiscord<Evrensel Kişilik> oh no
08:34:42FromDiscord<Evrensel Kişilik> it works like a charm
08:34:45FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934727845320736808/unknown.png
08:34:50FromDiscord<Rika> ?ts=2
08:35:17FromDiscord<Rika> still isn’t a default though
08:35:23FromDiscord<creikey> In reply to @Rika "You can change it": defaults should be good defaults though
08:35:24FromDiscord<Rika> Gotta add it to each URL
08:35:30FromDiscord<creikey> spaces give you that control
08:35:30FromDiscord<creikey> I see
08:35:36FromDiscord<SivadNai> have you ever thought about deleting pink?
08:35:39FromDiscord<Evrensel Kişilik> what are these names?
08:35:56FromDiscord<Rika> Then again people argue that spaces are bad BECAUSE they’re consistent
08:35:58FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3NdB
08:36:16FromDiscord<Rika> In reply to @Evrensel Kişilik "what are these names?": Name mangling
08:36:16FromDiscord<Elegantbeef> Nim generates symbols but includes the module name and procedure name
08:36:21FromDiscord<creikey> In reply to @Rika "Then again people argue": the default no-messing-with state should be something good to read/look at
08:36:28FromDiscord<creikey> if you want to change something editors can always deal with different spaces
08:36:36FromDiscord<Evrensel Kişilik> tyObject_DoublyLinkedNodeObjfdadwg6ghuvaAjMb9bmDUHQ
08:36:41FromDiscord<Evrensel Kişilik> what is this name?
08:36:46FromDiscord<Elegantbeef> It's generated
08:36:55FromDiscord<Evrensel Kişilik> looks terrible
08:36:57FromDiscord<creikey> In reply to @Evrensel Kişilik "tyObject_DoublyLinkedNodeObj__fdadwg6ghuvaAjMb9bmDU": this is the name of my dog
08:36:57FromDiscord<Rika> In reply to @creikey "the default no-messing-with state": People argue it is against accessibility
08:36:59FromDiscord<Elegantbeef> Nim has generics and other things that do not map to C without stuff like that
08:37:05FromDiscord<Rika> No I don’t know what their arguments specifically are
08:37:20FromDiscord<Rika> In reply to @creikey "this is the name": Wow how do you call them when you don’t have time?
08:37:29FromDiscord<Elegantbeef> Doubly
08:37:34FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Nim has generics and": they are annoying
08:37:36FromDiscord<creikey> In reply to @Rika "Wow how do you": doubly
08:37:39FromDiscord<Evrensel Kişilik> looks very weird
08:37:52FromDiscord<Rika> In reply to @creikey "doubly": Doubly so
08:37:55FromDiscord<Elegantbeef> Well if you can solve name mangling to have good names feel free to contribute
08:37:59FromDiscord<creikey> In reply to @Evrensel Kişilik "looks very weird": I actually premangle my nim varibales
08:38:01FromDiscord<creikey> (edit) "varibales" => "variables"
08:38:14FromDiscord<Elegantbeef> No creikey you just write shit code 😛
08:38:16FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Well if you can": if it is written in C, i would like to contribute
08:38:17FromDiscord<creikey> `let tyObject_vertices_fjdlsjalf21jf89jdsalfjfldsaifjelijwlij3akldsfj = @[1]`
08:38:26FromDiscord<Elegantbeef> It's written in Nim
08:38:29FromDiscord<Elegantbeef> It's a self hosted compiler 😀
08:38:33FromDiscord<Rika> In reply to @creikey "I actually premangle my": I mangled ur mum OOOOOOOO
08:38:48FromDiscord<Evrensel Kişilik> i dont like nim language then
08:38:53FromDiscord<Elegantbeef> Ok
08:38:56FromDiscord<Rika> Okay
08:38:57FromDiscord<creikey> In reply to @Elegantbeef "No creikey you just": someday this won't be true
08:38:58FromDiscord<Rika> That’s fine
08:39:15FromDiscord<Rika> In reply to @creikey "someday this won't be": Make it tomorrow bro get em!!! Let’s gooooo!!!!!
08:39:17FromDiscord<Elegantbeef> Creikey why lie, I know i'll never write non shit code
08:39:27FromDiscord<Evrensel Kişilik> sooooooooooo
08:39:28FromDiscord<creikey> In reply to @Elegantbeef "Creikey why lie, I": I believe in a better future
08:39:34FromDiscord<Evrensel Kişilik> looks like auto arrays are working well
08:39:39FromDiscord<Evrensel Kişilik> but what about pointer arrays?
08:39:46FromDiscord<Rika> What are auto arrays
08:39:49FromDiscord<Evrensel Kişilik> give me a pointer array please
08:39:53FromDiscord<Elegantbeef> I think they mean static arrays?
08:39:58FromDiscord<Rika> What do you mean pointer array? A seq?
08:39:59FromDiscord<Elegantbeef> And dynamically allocated arraays?
08:40:01FromDiscord<Evrensel Kişilik> In reply to @Rika "What are auto arrays": arrays
08:40:04FromDiscord<Elegantbeef> `var a = @[10, 20, 30]`
08:40:10FromDiscord<Evrensel Kişilik> what is this thingy
08:40:14FromDiscord<Rika> Sequence
08:40:16FromDiscord<Elegantbeef> That's a sequence
08:40:16FromDiscord<Rika> Heap array
08:40:20FromDiscord<Rika> Dynamic array
08:40:30FromDiscord<creikey> is @ an operator?
08:40:33FromDiscord<creikey> or is it compiler build in
08:40:33FromDiscord<Rika> Yes
08:40:34FromDiscord<Evrensel Kişilik> ok then how a stack array looks like?
08:40:36FromDiscord<Rika> Operator
08:40:39FromDiscord<creikey> cool
08:40:42FromDiscord<Elegantbeef> It's an operator
08:40:45FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3NdD
08:40:49FromDiscord<Elegantbeef> \`var a = [1, 2, 3]
08:40:56FromDiscord<Rika> In reply to @Evrensel Kişilik "ok then how a": Remove the @ and that’s a stack array
08:41:07FromDiscord<isofruitus> The fact you can hide json this way was always mind-boggling to me
08:41:11FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934729466587004948/unknown.png
08:41:15FromDiscord<Evrensel Kişilik> what is this
08:41:22FromDiscord<Elegantbeef> `a` exists in scopep
08:41:35FromDiscord<Elegantbeef> or it's the editor extension lying
08:41:36FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "`a` exists in scopep": but i dont see that
08:41:45FromDiscord<Elegantbeef> what's line 11?
08:41:54FromDiscord<Evrensel Kişilik> damn
08:41:58FromDiscord<Evrensel Kişilik> it is right there
08:41:59FromDiscord<Evrensel Kişilik> lol
08:42:07FromDiscord<Rika> Lol
08:42:10FromDiscord<Elegantbeef> Damn editors always hiding stuff until we look
08:42:16FromDiscord<Evrensel Kişilik> sooooooooooooooo
08:42:17FromDiscord<Rika> Beef here being brutal Amman
08:42:20FromDiscord<Rika> Man
08:42:20FromDiscord<Evrensel Kişilik> give me an auto array pls
08:42:21FromDiscord<Elegantbeef> Grimy bastards I tell you
08:42:25FromDiscord<Rika> How did I type that
08:42:27FromDiscord<Rika> I don’t know
08:42:37FromDiscord<Elegantbeef> I dont know what `auto array` means
08:42:41FromDiscord<Elegantbeef> Is it a statically sized array?
08:42:41FromDiscord<creikey> In reply to @Elegantbeef "or it's the editor": does the vscode extension have its own nim parser in js or is there a nim language server
08:42:43FromDiscord<Rika> Me neither
08:42:45FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Is it a statically": no
08:42:45FromDiscord<creikey> or like nim check command
08:42:47FromDiscord<Elegantbeef> Dynamically allocated array?
08:42:50FromDiscord<Evrensel Kişilik> stack array
08:42:54FromDiscord<Rika> In reply to @creikey "does the vscode extension": Treesitter I assume?
08:42:56FromDiscord<Elegantbeef> `[1, 2, 3]`
08:42:58FromDiscord<Evrensel Kişilik> array in stack
08:43:06FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "`[1, 2, 3]`": let me try
08:43:09FromDiscord<Elegantbeef> yes `[1, 2, 3]`
08:43:21FromDiscord<Elegantbeef> It uses tree sitter for syntax highlighting
08:43:29FromDiscord<Elegantbeef> It uses nimsuggest for suggestions
08:43:36FromDiscord<Elegantbeef> Which is the Nim compiler with a few features disabled
08:43:47FromDiscord<Elegantbeef> and compiled with `-d:danger`
08:43:47FromDiscord<creikey> cool
08:44:08FromDiscord<Elegantbeef> You can use the compiler/VM as a library
08:44:12FromDiscord<Elegantbeef> Which is quite nifty
08:44:28FromDiscord<Elegantbeef> But suggest has hard coded support
08:44:31FromDiscord<Evrensel Kişilik> oho
08:44:33FromDiscord<creikey> In reply to @Elegantbeef "You can use the": this + tcc and you can make a built in nim editor
08:44:34FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934730316323647538/unknown.png
08:44:38FromDiscord<creikey> that or just nimscript
08:44:45FromDiscord<creikey> I've not had a good experience with nimscript though
08:44:47FromDiscord<Evrensel Kişilik> it is working for pointer arrays
08:44:55FromDiscord<Rika> Congrats
08:44:58FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934730418618511390/unknown.png
08:45:02FromDiscord<Elegantbeef> The NimVm is kinda slow
08:45:07FromDiscord<Evrensel Kişilik> but it is not working for stack arrays
08:45:08FromDiscord<Evrensel Kişilik> 😦
08:45:16FromDiscord<Elegantbeef> It's working?
08:45:22FromDiscord<Rika> In reply to @Evrensel Kişilik "": Isn’t it showing you the value right there though
08:45:31FromDiscord<Evrensel Kişilik> In reply to @Rika "Isn’t it showing you": ummmmmmmmmm
08:45:33FromDiscord<Evrensel Kişilik> i mean expanding
08:45:36FromDiscord<Elegantbeef> It shows that it has the value `{10, 20, 30}`
08:45:37FromDiscord<Evrensel Kişilik> in variable explorer thing
08:45:39FromDiscord<Elegantbeef> There isnt anything else there
08:45:42FromDiscord<Evrensel Kişilik> let me show you
08:45:42FromDiscord<Rika> There’s nothing to expand?
08:45:48FromDiscord<Rika> What should it have?
08:45:54FromDiscord<Elegantbeef> address?
08:46:03FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934730692649168896/145919690-e64ee60d-ea61-4df7-bd74-fe0262fe28ef.png
08:46:12FromDiscord<Rika> I see
08:46:15FromDiscord<Evrensel Kişilik> this is an auto array in C
08:46:16FromDiscord<Rika> Dunno the issue then
08:46:32FromDiscord<Rika> Maybe use characters and see if that expands
08:46:37FromDiscord<Evrensel Kişilik> i recently implemented auto array exploring
08:46:40FromDiscord<Elegantbeef> what about `['a', b', 'c']` or `cstring "abc"`
08:47:02FromDiscord<Phil> Wait a sec
08:47:03FromDiscord<Elegantbeef> Is this project on a public repo?
08:47:15FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934730994911703051/unknown.png
08:47:17FromDiscord<Phil> I'm looking through beef's "constructor" lib atm
08:47:19FromDiscord<Evrensel Kişilik> is this garbage collected?
08:47:26FromDiscord<Phil> `defaults` was not a pragma but a macro all long?
08:47:29FromDiscord<Phil> I've been lied to !
08:47:40FromDiscord<Elegantbeef> lol
08:47:47FromDiscord<Rika> Pragmas are macros
08:47:51FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Is this project on": the debugger?
08:47:51FromDiscord<Elegantbeef> Nim strings are GC'd
08:47:55FromDiscord<Elegantbeef> Yea
08:47:57FromDiscord<Phil> The plot thickens
08:47:58FromDiscord<Rika> Well not all but a lot can be macros
08:48:19FromDiscord<Rika> The async pragma in the asyncdispatch module is a macro
08:48:23FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Is this project on": yes here https://github.com/rohanrhu/gdb-frontend
08:48:25FromDiscord<Phil> Okay so effectively if I write a macro I can use it as a pragma. It might break everything if it wasn't written with that intention in mind, but I can
08:48:58FromDiscord<Elegantbeef> Yes
08:49:11FromDiscord<Elegantbeef> Macros afterall are user defined compiler passess
08:49:24FromDiscord<Rika> In reply to @Evrensel Kişilik "yes here https://github.com/rohanrhu/gdb-frontend": Oh YOU made this???
08:49:28FromDiscord<Rika> God damn
08:49:52FromDiscord<Evrensel Kişilik> In reply to @Rika "Oh YOU made this???": yes im just looking for other languages compatibility
08:49:56FromDiscord<Rika> I see
08:50:08FromDiscord<Evrensel Kişilik> 😱
08:50:11FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934731727555948605/unknown.png
08:50:24FromDiscord<Rika> ?
08:50:34FromDiscord<Evrensel Kişilik> it is being garbage collected after this line lol
08:50:40FromDiscord<Evrensel Kişilik> buuuuuuuuuuuuut
08:50:53FromDiscord<Rika> Not really, the default GC isn’t deterministic
08:51:37FromDiscord<Elegantbeef> So if the programmer of the macro wasn't cognisant they can attempt things that are invalid or write bad code
08:51:38FromDiscord<Elegantbeef> And let's be honest if it's my macro i probably missed an edge case
08:51:48FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934732135846260776/unknown.png
08:51:56FromDiscord<Evrensel Kişilik> we have to expand it to see string
08:52:07FromDiscord<Elegantbeef> And assaulting the languages as you go
08:52:23FromDiscord<Phil> Is there docs or examples on how runnable examples work in nim docs?
08:52:32FromDiscord<Evrensel Kişilik> soooooooooooo it is `string` type
08:52:48FromDiscord<Rika> Strings are just internally seqs yes
08:52:52FromDiscord<Evrensel Kişilik> is there a char array usage also?
08:53:02FromDiscord<Elegantbeef> `cstring"hello"`
08:53:10FromDiscord<Evrensel Kişilik> lemme tryyy
08:53:14FromDiscord<Rika> cstring is “compatible string” which is string compatible with char
08:53:35FromDiscord<Elegantbeef> literally look at any stdlib library and click the "source" button↵(@Phil)
08:53:42FromDiscord<Evrensel Kişilik> how to write that?
08:54:09FromDiscord<Elegantbeef> you can do `cstring(name)`
08:54:13FromDiscord<Elegantbeef> Or atleast it should work
08:54:43FromDiscord<Elegantbeef> Runnable examples are just a block of code that is ran on doc gen and included in examples
08:55:01FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "you can do `cstring(name)`": how?
08:55:09FromDiscord<Elegantbeef> @Phil\: here's an example https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/httpclient.nim#L589-L594
08:55:13FromDiscord<Elegantbeef> Just like so
08:55:20FromDiscord<Evrensel Kişilik> oh
08:55:25FromDiscord<Phil> In reply to @Elegantbeef "<@180601887916163073>\: here's an example": On it
08:55:34FromDiscord<Elegantbeef> `echo "Hi ", cstring(name), "!"`
08:55:45FromDiscord<Elegantbeef> That will convert it to a cstring before echoing
08:56:03FromDiscord<Elegantbeef> You can also do `var myConstCstring = cstring"Hello cruel world"`
08:56:17FromDiscord<Phil> I see there is a distinct preference for the 2-space gan
08:56:18FromDiscord<Phil> (edit) "gan" => "gang"
08:56:31FromDiscord<Elegantbeef> 2 space is the NEP1 standard
08:56:55FromDiscord<Phil> It is? Dangit, I maybe should start adding a rule to my autoformatter
08:56:58FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934733437561081906/unknown.png
08:57:02FromDiscord<Evrensel Kişilik> what is this? 😱
08:57:05FromDiscord<Phil> 4 space gang for clear separation so far
08:57:21FromDiscord<Evrensel Kişilik> what is SYNTETHIC pinter?
08:57:23FromDiscord<Evrensel Kişilik> oh damn
08:57:25FromDiscord<Elegantbeef> Nim's cstring is just a `char`
08:57:26FromDiscord<Rika> In reply to @Isofruit "4 space gang for": It’s just a standard
08:57:42FromDiscord<Evrensel Kişilik> is it garbage collected right now?
08:57:45FromDiscord<Rika> In reply to @Evrensel Kişilik "what is SYNTETHIC pinter?": Same, I don’t know what the fuck that shit is lmao
08:57:45FromDiscord<Evrensel Kişilik> i can't see its value
08:57:48FromDiscord<Elegantbeef> Nope
08:57:59FromDiscord<Evrensel Kişilik> In reply to @Rika "Same, I don’t know": why youuu don't know what that is?
08:58:07FromDiscord<Rika> http://stackoverflow.com/questions/11878719/ddg#11878780
08:58:10FromDiscord<Rika> Just googled
08:58:14FromDiscord<Rika> God bless SO
08:58:17FromDiscord<Evrensel Kişilik> oh no
08:58:31FromDiscord<Evrensel Kişilik> my cat is pushing is head to my mouth
08:58:37FromDiscord<Elegantbeef> you can do `var myDynamicCstring = cstring(name)`
08:58:50FromDiscord<Rika> In reply to @Evrensel Kişilik "my cat is pushing": Cute
08:58:52FromDiscord<Elegantbeef> That'll atleast give you a "normal" not from literal cstring
08:59:01FromDiscord<Evrensel Kişilik> In reply to @Rika "Cute": he is a crazy dumb
08:59:09FromDiscord<Rika> Cats are like that
08:59:15FromDiscord<Rika> Cute nonetheless
08:59:19FromDiscord<Evrensel Kişilik> sooooooooooooooo is it garbage collected?
08:59:24FromDiscord<Rika> Shouldn’t be
08:59:32FromDiscord<Evrensel Kişilik> why i see that then?
08:59:50FromDiscord<mratsim> cstring aren't garbage collected
09:00:03FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934734212785922078/unknown.png
09:00:06FromDiscord<Evrensel Kişilik> then why is this?
09:00:09FromDiscord<Elegantbeef> mratsim get with the class!
09:00:09FromDiscord<mratsim> Unless your C compiler has a garbage collector then
09:00:18FromDiscord<Evrensel Kişilik> im going to be crazy
09:00:25FromDiscord<Elegantbeef> well given that it's from literal it miight be optimizing it oddly
09:00:26FromDiscord<mratsim> NCSTRING is an objective C string?
09:00:42FromDiscord<Elegantbeef> No it's the Nim C alias
09:00:52FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "well given that it's": soooooooo let me try to see it on GDB shell
09:01:12FromDiscord<mratsim> C literals are literally just pointers to the .text section of the binary
09:01:30FromDiscord<mratsim> I'm not sure where you see in that screenshot garbage collection?
09:01:47FromDiscord<Elegantbeef> They thought cause the data wasnt there it was GC'd
09:01:54FromDiscord<Elegantbeef> But yea like we said no GC there
09:04:47FromDiscord<Evrensel Kişilik> sooooooooooo
09:07:56FromDiscord<Evrensel Kişilik> looks like synthetic pointer is a C++ thing which i don't like
09:07:57FromDiscord<Evrensel Kişilik> lol
09:08:35FromDiscord<Evrensel Kişilik> i had to understand that a thing named like "synthetic pointer" must be a C++ thing
09:09:14FromDiscord<Evrensel Kişilik> soooooo we are doing chemistry
09:10:13FromDiscord<Evrensel Kişilik> oh no
09:10:49FromDiscord<Rika> I don’t think it’s a C++ thing
09:10:55FromDiscord<Rika> Probably just not common in C
09:11:03FromDiscord<Evrensel Kişilik> In reply to @Rika "Probably just not common": oh no
09:11:13FromDiscord<Evrensel Kişilik> a pointer is a pointer
09:11:22FromDiscord<Elegantbeef> Well you're compiling to C so how could it be a C++ thing
09:11:33FromDiscord<Evrensel Kişilik> only C++ could make something like a "synthetic pointer"
09:11:49FromDiscord<Elegantbeef> But you arent targetting C++
09:11:55FromDiscord<Evrensel Kişilik> damn
09:11:59FromDiscord<Evrensel Kişilik> you are a bot
09:12:02FromDiscord<Evrensel Kişilik> i don't trust you
09:12:05FromDiscord<Elegantbeef> I'm not
09:12:13FromDiscord<Evrensel Kişilik> 😱
09:12:18FromDiscord<Elegantbeef> are you doing `nim c` or `nim cpp`?
09:12:42FromDiscord<Evrensel Kişilik> sent a code paste, see https://play.nim-lang.org/#ix=3NdK
09:12:42FromDiscord<Rika> Then you are using C
09:12:47FromDiscord<Elegantbeef> that uses C
09:12:47FromDiscord<Evrensel Kişilik> oh no
09:12:49FromDiscord<Evrensel Kişilik> ok
09:13:51FromDiscord<Evrensel Kişilik> oh no
09:13:58FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934737716480991243/unknown.png
09:14:02FromDiscord<Evrensel Kişilik> what is this?
09:14:30FromDiscord<Evrensel Kişilik> what are these sources for?
09:14:33FromDiscord<Elegantbeef> Code that requires the C++ backend
09:14:42FromDiscord<Evrensel Kişilik> why do i see this
09:14:50FromDiscord<Phil> ... beef? could it be that `constructor/defaults` impldefaults proc originally spit out `newSomeType()` and that was changed to `initSomeType()` ?
09:15:23FromDiscord<Evrensel Kişilik> theeeeeen
09:15:29FromDiscord<Evrensel Kişilik> it is not about code generating?
09:15:44FromDiscord<Elegantbeef> that's used for code gen on the C++ backend
09:15:51FromDiscord<Evrensel Kişilik> ok
09:15:51FromDiscord<Elegantbeef> `compile` by default uses `C`
09:16:00FromDiscord<Evrensel Kişilik> this bot knows soo much thing
09:16:02FromDiscord<Elegantbeef> Perhaps it does↵(@Phil)
09:16:15FromDiscord<Elegantbeef> This bot is a compiler contributor 😛
09:16:39FromDiscord<Evrensel Kişilik> i don't believe that an AI can write code
09:16:41FromDiscord<Evrensel Kişilik> no
09:16:51FromDiscord<Evrensel Kişilik> plssssss remove this bot
09:16:57FromDiscord<Elegantbeef> lol
09:17:09FromDiscord<Evrensel Kişilik> send SIGTERM to it
09:17:18FromDiscord<Elegantbeef> How many times does one have to say "I'm not a bot" before people will stop making the joke
09:17:23FromDiscord<Elegantbeef> Dont bully me i just make code!
09:17:25FromDiscord<Rika> Sending an assassin to beef right now
09:17:41FromDiscord<Rika> Also haven’t you seen GPL 3
09:17:44FromDiscord<Elegantbeef> Fuck if you make a donation to a dog charity i'd do it for you
09:17:47FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "How many times does": because you are tagged as a BOT
09:17:51FromDiscord<Phil> Mostly asking because it worked decently well to use `implDefaults(Character)` and then `newCharacter()`, which I thought to be a bug, then I tried out `initCharacter()` which should work as documented and got "yeah this proc doesn't exist" compiler errors
09:17:56FromDiscord<Rika> That motherfucker can make code
09:18:00FromDiscord<Elegantbeef> Cause i'm using the matrix bridge
09:18:17FromDiscord<Rika> In reply to @Elegantbeef "Fuck if you make": How much
09:18:27FromDiscord<Elegantbeef> Atleast 20 grand
09:18:35FromDiscord<Rika> Damn I’m 20 grand short
09:18:42FromDiscord<Elegantbeef> Aw shit too late
09:18:59FromDiscord<creikey> does anybody happen to know whether pixie flips images when they're loaded in
09:19:06FromDiscord<Rika> Why would itv
09:19:09FromDiscord<Rika> It?
09:19:15FromDiscord<creikey> it seems like (0,0) in uvs is in the upper left corner
09:19:16FromDiscord<Elegantbeef> No but opengl's UV Y is down
09:19:16FromDiscord<creikey> of this image
09:19:18FromDiscord<creikey> I've loaded in
09:19:26FromDiscord<creikey> In reply to @Elegantbeef "No but opengl's UV": I thought it's up
09:19:31FromDiscord<Elegantbeef> Nope
09:19:32FromDiscord<creikey> https://media.discordapp.net/attachments/371759389889003532/934739115742732328/unknown.png
09:19:38FromDiscord<creikey> is this diagram a lie
09:20:01FromDiscord<Elegantbeef> I could've sworn that UV Y is down in opengl
09:20:03FromDiscord<Elegantbeef> I could be wrong
09:20:08FromDiscord<Elegantbeef> I know it's opposite of other APIs
09:20:10FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934739271909249024/unknown.png
09:20:11FromDiscord<creikey> everything online says that's not true
09:20:17FromDiscord<Evrensel Kişilik> damn libraries are here
09:20:22FromDiscord<creikey> except the results I'm seeing are that I agree with you
09:20:30FromDiscord<Elegantbeef> Well then i'm an idiot
09:20:38FromDiscord<creikey> https://media.discordapp.net/attachments/371759389889003532/934739392164163674/unknown.png
09:20:40FromDiscord<creikey> like with these uvs
09:20:48FromDiscord<creikey> order is upper left, upper right, lower right, lower left
09:20:51FromDiscord<Rika> Isn’t top left naturally 00 in graphics though
09:20:54FromDiscord<Rika> Am I insane
09:21:00FromDiscord<creikey> In reply to @Rika "Isn’t top left naturally": in opengl supposedly it's bottom left
09:21:00FromDiscord<Elegantbeef> It's
09:21:05FromDiscord<creikey> but that's not what I'm seeing
09:21:07FromDiscord<Evrensel Kişilik> In reply to @creikey "": is this GDScript?
09:21:08FromDiscord<Elegantbeef> Opengl likes doing thing wrong
09:21:12FromDiscord<Evrensel Kişilik> i left Godot
09:21:14FromDiscord<creikey> In reply to @Evrensel Kişilik "is this GDScript?": no it's nim
09:21:19FromDiscord<Rika> I don’t know man graphics makes my brain feel soft
09:21:21FromDiscord<Evrensel Kişilik> In reply to @creikey "no it's nim": why?
09:21:28FromDiscord<Rika> In reply to @Evrensel Kişilik "why?": Why not?
09:21:35FromDiscord<Evrensel Kişilik> In reply to @Rika "Why not?": why not?
09:21:46FromDiscord<Rika> What?
09:21:59FromDiscord<Rika> Man okay sorry my brain will actually go mushy at this rate
09:22:14FromDiscord<creikey> In reply to @Evrensel Kişilik "why?": This project requires a custom renderer because it departs from how application UI is typically done and I want there to be high level enough constructs for designers/non rendering programmers to create UIs with it
09:22:27FromDiscord<Elegantbeef> @Phil\: do you have a reproduction of that `newObject` and `initObject` existing?
09:22:35FromDiscord<Evrensel Kişilik> In reply to @creikey "This project requires a": ok
09:22:39FromDiscord<Evrensel Kişilik> then
09:22:44FromDiscord<Elegantbeef> Also Nim goes brr
09:22:53FromDiscord<Evrensel Kişilik> i will make a list for supported languages with tiers
09:22:58FromDiscord<Phil> In reply to @Elegantbeef "<@180601887916163073>\: do you have": I'm experimenting right now to see where the heck my code produces this super strange behaviour
09:23:07FromDiscord<Evrensel Kişilik> nim language looks like well supported
09:23:11FromDiscord<Elegantbeef> Ok cool
09:23:16FromDiscord<Elegantbeef> If you find it make an issue and i'll look
09:23:20FromDiscord<Evrensel Kişilik> Rust debugging has some issues
09:23:39FromDiscord<Elegantbeef> The perks of using a well supported language as your IR
09:24:05FromDiscord<Evrensel Kişilik> Go debugging tooo is not good as C/C++
09:24:08FromDiscord<Evrensel Kişilik> and also
09:24:17FromDiscord<creikey> debugging is kinda overhyped
09:24:19FromDiscord<creikey> honestly
09:24:25FromDiscord<creikey> echo is so nice
09:24:34FromDiscord<Phil> Beef, what's in a tdef at index 2?
09:24:36FromDiscord<Evrensel Kişilik> i will add `std::vector` and `std::list` supports for C++
09:24:42FromDiscord<Evrensel Kişilik> but
09:24:55FromDiscord<Evrensel Kişilik> nim's `std/list` thing is working well
09:25:32FromDiscord<Elegantbeef> isofruit `dumptree` is your friend
09:25:35FromDiscord<Phil> Mostly asking because based on the `tdef` of the type using the macro it is decided on whether to make a `newSomeType` proc or `initSomeType` proc
09:26:00FromDiscord<Phil> I think that's what I#m reading at least
09:26:06FromDiscord<Evrensel Kişilik> oh no
09:26:07FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934740773151334461/unknown.png
09:26:15FromDiscord<Evrensel Kişilik> i see this value
09:26:33FromDiscord<Evrensel Kişilik> it is also NCSTRING
09:26:36FromDiscord<Evrensel Kişilik> hmmmmmmmmmmmmmmmmmmmm
09:26:54FromDiscord<Elegantbeef> Ah it's a `refTy` or `objectTy` i think
09:26:57FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934740982233178183/unknown.png
09:27:04FromDiscord<Evrensel Kişilik> what is the difference between these?
09:28:11FromDiscord<Elegantbeef> are you even using `cstr` after declaration?
09:28:49FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "are you even using": nooooooooo
09:28:58FromDiscord<Evrensel Kişilik> buut you told it is not garbage collected
09:29:00FromDiscord<Evrensel Kişilik> 😱
09:29:06FromDiscord<Evrensel Kişilik> i thought it maybe about that
09:29:29FromDiscord<Elegantbeef> I dont think it's Gc'd, just curious if it's "not used" optimization
09:29:42FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "I dont think it's": oh no
09:29:42FromDiscord<Elegantbeef> So just echo it out and see what chooches
09:30:01FromDiscord<Evrensel Kişilik> doing
09:30:39FromDiscord<Evrensel Kişilik> oh no
09:30:40FromDiscord<Phil> sent a code paste, see https://paste.rs/eFl
09:30:41FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934741924626190417/unknown.png
09:30:52FromDiscord<Elegantbeef> Lol 😀
09:30:58FromDiscord<Evrensel Kişilik> 😱
09:31:07FromDiscord<Elegantbeef> Ah it's inheritance that causes the issue
09:31:21FromDiscord<Evrensel Kişilik> soooooooooooooooooooooo
09:31:33FromDiscord<Evrensel Kişilik> i will make `string` type like this
09:31:59FromDiscord<Phil> In reply to @Elegantbeef "Ah it's inheritance that": does nim have an inherent "construct non-object types with newX() and object types with initX()" best practice?
09:32:11FromDiscord<Elegantbeef> Yes
09:32:25FromDiscord<Elegantbeef> `new` is for heap allocated objects
09:32:31FromDiscord<Elegantbeef> `init` is for value allocated objects
09:32:43FromDiscord<Elegantbeef> The edge case you hit is i dont check inheritance
09:33:14FromDiscord<Phil> I'm... looking forward to your update which will break my code?
09:33:26FromDiscord<Phil> Eh, not too much to refactor anyway
09:34:13FromDiscord<Phil> In reply to @Elegantbeef "The edge case you": I'll throw in an issue for you to save you the hassle
09:34:21FromDiscord<Elegantbeef> Thanks
09:34:59FromDiscord<creikey> man opengl sucks
09:35:04FromDiscord<Elegantbeef> I might refactor it a bit so you can emit `init(Type)` or `initType` procedures and possibly give a string name
09:35:08FromDiscord<Elegantbeef> Eh it works fine!
09:35:12FromDiscord<creikey> I had my orthographic projection with bottom being screen height and top being 0
09:35:14FromDiscord<creikey> for the longest time
09:35:16FromDiscord<creikey> y+ meaning down
09:35:22FromDiscord<creikey> so I have everything programmed like that
09:35:25FromDiscord<Elegantbeef> Lol so you flipped the world
09:35:29FromDiscord<creikey> yes
09:35:31FromDiscord<creikey> normal program
09:35:32FromDiscord<creikey> (edit) "program" => "programs"
09:35:36FromDiscord<creikey> (0,0) is the upper left
09:35:36FromDiscord<Elegantbeef> I think i have a similar issue with my game
09:35:40FromDiscord<creikey> and Y+ is down
09:35:43FromDiscord<creikey> trying to use some asymmetric images now
09:35:47FromDiscord<creikey> all the images are flipped!
09:35:50FromDiscord<creikey> not because the uvs are wrong
09:35:57FromDiscord<creikey> the vertices are flipped by the projectino!
09:35:58FromDiscord<Elegantbeef> I worked with what the camera showed so my x axis is mirrored
09:35:59FromDiscord<creikey> (edit) "projectino!" => "projection!"
09:36:11FromDiscord<creikey> I guess the right thing to do is undo the projection
09:36:13FromDiscord<creikey> bottom 0
09:36:16FromDiscord<creikey> top screen height
09:36:22FromDiscord<Elegantbeef> Yea that's proper
09:36:25FromDiscord<creikey> and then redo all the logic where I assumed the wrong thing
09:36:30FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934743383543533588/unknown.png
09:36:32FromDiscord<creikey> but the problem is every windowing library every has Y+ meaning down
09:36:34FromDiscord<Evrensel Kişilik> sooooooooo
09:36:37FromDiscord<creikey> so the mousedelta is - meansup
09:36:39FromDiscord<creikey> (edit) "meansup" => "means up"
09:36:43FromDiscord<creikey> same thing with the mouse's position
09:36:50FromDiscord<Evrensel Kişilik> i will add an exception for this
09:37:18FromDiscord<Elegantbeef> Sure but mouse positioning isnt a rendering problem
09:37:21FromDiscord<Evrensel Kişilik> for `NimStringDesc` it will show `.data` value instead of its address
09:37:55FromDiscord<Elegantbeef> You can use whatever positioning system you want as long as you pass it to opengl right
09:38:01FromDiscord<Evrensel Kişilik> let me know if you need other things about nim debugging
09:38:36FromDiscord<Elegantbeef> Well thanks for coming over here to test it, nice to see 😀
09:38:58FromDiscord<Elegantbeef> Does it support the gdb printers?
09:39:10FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Does it support the": pretty printers?
09:39:13FromDiscord<Elegantbeef> Cause nim has a gdb script, for making things a bit nicer
09:39:23FromDiscord<Elegantbeef> I think that's what they're called
09:39:33FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Cause nim has a": let me looooooook where is that?
09:39:47FromDiscord<Elegantbeef> should be in your Nim directory
09:39:55FromDiscord<Elegantbeef> called `nim-gdb.py`
09:40:03FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "I think that's what": you can still use them on terminal
09:40:12FromDiscord<Phil> In reply to @Elegantbeef "I might refactor it": I think it's a really good thing it uses the typedesc. That way you absolutely must have the type imported for initType() procs to work.↵↵an init(Type) proc would be pretty useful to me. I pretty much do exactly that for my models all the time:'↵`proc newModel(T: typedesc[User]): User = newUser()`
09:40:19FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "called `nim-gdb.py`": hmmmmmmm
09:40:22FromDiscord<Evrensel Kişilik> what does that do?
09:40:31FromDiscord<Elegantbeef> It's a gdb script
09:40:32FromDiscord<Phil> (edit) "work.↵↵an" => "work. It makes it obvious↵↵an"
09:40:35FromDiscord<Evrensel Kişilik> for what?
09:40:36FromDiscord<Elegantbeef> I dont know much there
09:40:41FromDiscord<Evrensel Kişilik> ummmmmm
09:40:49FromDiscord<Elegantbeef> I think it makes the output fit Nim and not raw data
09:40:52FromDiscord<Phil> (edit) "obvious↵↵an" => "obvious. With strings it becomes a bit less obvious and you might assume that compiler magic will do import or sth for you as needed.↵↵an"
09:41:05FromDiscord<Evrensel Kişilik> let me loook
09:41:13FromDiscord<Elegantbeef> Yea isofruit i need to support declaring that
09:41:55FromDiscord<Elegantbeef> It should just be `implDefaults(Type, {defExported, defTypedesc})`
09:41:57FromDiscord<Evrensel Kişilik> soooo if it is for exploring variables and arrays
09:42:01FromDiscord<Evrensel Kişilik> or something like that
09:42:12FromDiscord<Elegantbeef> I think so, i dont really know
09:42:17FromDiscord<Evrensel Kişilik> my debugger already has that stuff
09:42:19FromDiscord<Elegantbeef> I just know it exists and can clean up the gdb output a bit
09:42:20FromDiscord<Evrensel Kişilik> ummmmmm
09:42:22FromDiscord<Evrensel Kişilik> wait
09:42:39FromDiscord<Evrensel Kişilik> https://www.youtube.com/watch?v=4SezdE2Z130
09:42:43FromDiscord<Elegantbeef> Saying i dont know is overstating my lack of knowledge what it does
09:42:43FromDiscord<Evrensel Kişilik> here is a demonstration
09:43:48FromDiscord<Elegantbeef> Yea it's got pretty printing in it
09:43:52FromDiscord<Elegantbeef> Link if curious https://github.com/nim-lang/Nim/blob/devel/tools/nim-gdb.py
09:44:02FromDiscord<Evrensel Kişilik> if you need more Nim-specific things about Nim debugging let me know
09:44:10FromDiscord<Phil> in-built nim linter when
09:45:42FromDiscord<Evrensel Kişilik> oh
09:45:47FromDiscord<Evrensel Kişilik> i should try expressions
09:47:29FromDiscord<Elegantbeef> iso you lied to me! 😛
09:47:40FromDiscord<Elegantbeef> defaults works fine
09:48:02FromDiscord<Elegantbeef> `new` for `ref`. `init` for non-ref
09:48:36FromDiscord<Evrensel Kişilik> give me a nested array
09:48:49FromDiscord<Elegantbeef> You take an array and make another inside it
09:48:49FromDiscord<Evrensel Kişilik> nested structs are working well for nim
09:48:58FromDiscord<Evrensel Kişilik> how?
09:49:01FromDiscord<Phil> In reply to @Elegantbeef "iso you lied to": More out of non understanding than anything. The code I posted works exactly as described xP
09:49:17FromDiscord<Elegantbeef> `[[10, 20], [30, 40]]`
09:49:39FromDiscord<Elegantbeef> Doesnt seem to be a problem but yea do need that refactor anyway
09:50:21FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934746869240856606/unknown.png
09:50:24FromDiscord<Evrensel Kişilik> what is this?
09:50:45FromDiscord<Elegantbeef> A statically typed language being static
09:51:02FromDiscord<Evrensel Kişilik> then why im not using C
09:51:04FromDiscord<Evrensel Kişilik> 😱
09:51:31FromDiscord<Elegantbeef> Cause C isnt statically typed
09:51:42FromDiscord<Elegantbeef> It's a super weak type system
09:51:52FromDiscord<Evrensel Kişilik> oh nooooooooo
09:52:33FromDiscord<Elegantbeef> Indeed what's the point of types if they're arent strong
09:54:20FromDiscord<Evrensel Kişilik> oh no
09:54:22FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934747879141158973/unknown.png
09:54:42FromDiscord<Evrensel Kişilik> i should make this compatible with heap arrays
09:54:57FromDiscord<Evrensel Kişilik> soooooooo
09:55:06FromDiscord<Evrensel Kişilik> since it is not working for stack arrays toooo
09:55:23FromDiscord<Evrensel Kişilik> when i make it compatible with stack arrays
09:55:34FromDiscord<Evrensel Kişilik> we will be able to expand `ptr_arr2.data`
09:56:10FromDiscord<Evrensel Kişilik> sooooooooo i should add Nim support for this in backend
09:56:11FromDiscord<Evrensel Kişilik> damn
09:57:05FromDiscord<Elegantbeef> There are also bitsets which you 100% dont support
09:57:17FromDiscord<Elegantbeef> `var a = {'a', 'b', 'c'}`
09:57:46FromDiscord<Elegantbeef> I mean you'll get a nice array of values i guess, but not the nice printed values
09:58:08FromDiscord<Evrensel Kişilik> oh damn
10:00:23FromDiscord<Elegantbeef> Not that you can do much with the bitsets since the type information is loss in the C stage
10:02:43FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Not that you can": oh
10:02:45FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934749993020051496/unknown.png
10:03:00FromDiscord<Phil> I have actually never compiled a library before and am trying to compile constructor to see if that runs my runnableExamples. Do I just... nim c -r ?
10:03:17FromDiscord<Elegantbeef> `nim doc ./main.nim`
10:04:23FromDiscord<Evrensel Kişilik> i think it is about type resolving
10:04:44FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934750486723199037/unknown.png
10:04:53FromDiscord<Phil> In reply to @Elegantbeef "`nim doc ./main.nim`": so in constructor case nim doc /src/constructor/constructor.nim ?
10:05:07FromDiscord<Elegantbeef> should be
10:05:21FromDiscord<Elegantbeef> Might need `--project` flag
10:05:48FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934750759201935400/unknown.png
10:07:11FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934751106796494938/unknown.png
10:07:28FromDiscord<Evrensel Kişilik> this is the type of a pointer array
10:08:04FromDiscord<Evrensel Kişilik> soooo the type code `2` is an array
10:10:10FromDiscord<Evrensel Kişilik> there are interesting issues lol
10:10:48FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934752018726289439/unknown.png
10:11:10FromDiscord<Evrensel Kişilik> this is working fine
10:11:36FromDiscord<Evrensel Kişilik> oh no
10:13:47FromDiscord<Evrensel Kişilik> soooooooooooooooo
10:13:54FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934752799193989160/unknown.png
10:13:58FromDiscord<Evrensel Kişilik> the issue is this
10:14:45FromDiscord<Evrensel Kişilik> interestingly
10:15:02FromDiscord<Evrensel Kişilik> `heap_array.data` is a stack array
10:15:04FromDiscord<Evrensel Kişilik> lol
10:15:08FromDiscord<Evrensel Kişilik> this language is crazy
10:15:42*Gustavo6046 quit (Quit: Leaving)
10:17:17*jmdaemon quit (Ping timeout: 240 seconds)
10:19:25FromDiscord<Phil> What does `hasRequires` do in the defaults pragma?
10:20:23FromDiscord<Phil> (edit) "pragma?" => "pragma in constructor? @ElegantBeef ↵Stumbled over that when I checked the macro signature and went like "If I wanna write a doc comment for that I maybe should know what it is"
10:20:27FromDiscord<Phil> (edit) "is" => "is""
10:21:23FromDiscord<Phil> (edit) "is"" => "is".↵Or is that something that users of constructor shouldn't interact with?"
10:23:25FromDiscord<Elegantbeef> "hasRequires"?
10:24:04FromDiscord<Elegantbeef> seq is a generic type and you made it's internal data be an array afaict, it's not that crazy
10:24:34FromDiscord<Phil> `macro defaults(tdef: untyped, hasRequires: static bool = false): untyped =`
10:25:07FromDiscord<Elegantbeef> Fuck my lack of documentation
10:25:33FromDiscord<Phil> No worries, I'm on that 😄↵So anything I should write about or is this to be an eternal secret?
10:25:37FromDiscord<Elegantbeef> Oh it's if you want to force parameters to be passed
10:26:16FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/kp2
10:26:31FromDiscord<Elegantbeef> You cannot do `Awbject.init()`
10:26:36FromDiscord<Elegantbeef> You need to pass `z`
10:26:44FromDiscord<Evrensel Kişilik> can i disable GC?
10:26:51FromDiscord<Elegantbeef> `--gc:non`
10:26:57FromDiscord<Elegantbeef> `--gc:none`
10:26:59FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "`--gc:non`": 😱
10:27:29FromDiscord<Phil> Evrensel in a state of constant shock while staring at the nim language 😄
10:28:21FromDiscord<Elegantbeef> Apparently so
10:28:31FromDiscord<Elegantbeef> They're not even doing anything that weird
10:29:01FromDiscord<Elegantbeef> "`seq[array[int, 2]]` internally has statically sized arrays!!!!!"
10:31:18FromDiscord<Phil> is `--gc:none` where you go if you want to live memory dangerously?
10:31:31FromDiscord<Elegantbeef> I mean you dont need to disable the GC to do that but yes
10:31:46FromDiscord<Evrensel Kişilik> In reply to @Isofruit "is `--gc:none` where you": i asked it for debugging purposes
10:31:47FromDiscord<Evrensel Kişilik> because
10:32:05FromDiscord<Phil> In reply to @Evrensel Kişilik "i asked it for": I was just cracking a joke, no worries 😄
10:32:16FromDiscord<Elegantbeef> `--gc:none` really doesnt have many uses afaik
10:32:18FromDiscord<Evrensel Kişilik> you may need to see some variables that are garbage collected immediately
10:32:41FromDiscord<Phil> cracking shocking jokes at that
10:32:52FromDiscord<Elegantbeef> even in low footprints `--gc:arc` is pretty good
10:32:56FromDiscord<Evrensel Kişilik> im very busy right now
10:33:04FromDiscord<Evrensel Kişilik> but i will make my debugger more compatible with Nim
10:33:16FromDiscord<Evrensel Kişilik> did i like it? ummmm NOOOO
10:33:26FromDiscord<Evrensel Kişilik> but i will still do that
10:33:28FromDiscord<Evrensel Kişilik> xD
10:33:35FromDiscord<Phil> That would be pretty cool! I'm slowly getting into the territory where it could be pretty useful
10:33:38FromDiscord<Elegantbeef> It's what most have moved to for Nim + microcontroller, though i know exelotl still uses `none` for the GBA
10:34:02FromDiscord<Elegantbeef> So i take it you just loved rust?
10:34:15FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "So i take it": i hate Rust
10:34:21FromDiscord<Phil> Inim, you confuse me https://media.discordapp.net/attachments/371759389889003532/934757939942670387/Screenshot_from_2022-01-23_11-33-56.png
10:34:21FromDiscord<Evrensel Kişilik> also C++
10:34:29FromDiscord<Evrensel Kişilik> i love Go because it is not OOP
10:34:38FromDiscord<Evrensel Kişilik> don't say me OOP
10:34:41FromDiscord<Evrensel Kişilik> plsssssssssssss
10:34:47FromDiscord<Phil> No, I'll say something worse
10:34:53FromDiscord<Phil> java
10:35:02FromDiscord<Evrensel Kişilik> 😱
10:35:07FromDiscord<Evrensel Kişilik> In reply to @Isofruit "*java*": oh nooooooooooooooooooooooooooooooooooooo
10:35:45FromDiscord<Evrensel Kişilik> https://media.discordapp.net/attachments/371759389889003532/934758294222954546/5b4f049b3a976.png
10:36:24FromDiscord<Phil> I'm pretty sure you can also do something like `TRUE.equals(condition)`
10:37:00FromDiscord<Evrensel Kişilik> JAVA IS DUMB
10:37:06FromDiscord<Evrensel Kişilik> it is a social experiment
10:37:23FromDiscord<Elegantbeef> You say that like you cant in Nim iso 😛
10:37:28FromDiscord<Evrensel Kişilik> to see how could people be noooooobs
10:37:35FromDiscord<Phil> In reply to @Elegantbeef "You say that like": .... you can?
10:37:54FromDiscord<Evrensel Kişilik> next language is D
10:38:04FromDiscord<Elegantbeef> Damn Nim before D, Nim's finally made it
10:38:05FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Ne3
10:38:19FromDiscord<Phil> Oh right, you can act as if the first parameter were an object
10:38:35FromDiscord<Elegantbeef> MCS goes brr
10:38:40FromDiscord<Evrensel Kişilik> In reply to @Elegantbeef "Damn Nim before D,": you are lucky
10:38:43FromDiscord<Evrensel Kişilik> as community
10:38:46FromDiscord<Evrensel Kişilik> loool
10:39:20FromDiscord<Elegantbeef> I just liked the vocal screaming over normal things
10:39:23FromDiscord<Elegantbeef> Was a nice touch
10:39:25FromDiscord<Evrensel Kişilik> everyone tries to make C obsolete but they never can lol
10:39:57FromDiscord<Evrensel Kişilik> 😱
10:40:31FromDiscord<Evrensel Kişilik> btw i appreciate you for Nim
10:40:33FromDiscord<Phil> I'm getting the mild impression that setting the `hasRequires` value isn't possible, inim implodes the second I try
10:40:38FromDiscord<Evrensel Kişilik> dont get me wrooooooooooong
10:40:46FromDiscord<Evrensel Kişilik> i just fucking love C
10:41:30FromDiscord<Elegantbeef> I like having a type system that does something
10:42:13FromDiscord<Elegantbeef> Anyway i need to sleep now, so iso I await your PR 😉
10:42:30FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3Ne5
10:42:41FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3Ne6
10:42:59FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3Ne7
10:43:15FromDiscord<Phil> I'll refrain from writing doccoments about hasRequires for now ^^'
10:59:04FromDiscord<Rika> In reply to @Evrensel Kişilik "everyone tries to make": It’s pretty difficult to do so
11:49:23*krux02 joined #nim
12:30:41*yann-kaelig joined #nim
12:31:28yann-kaeligHello
12:33:43yann-kaeligWell, I'm still a noob, but during my search I cam across an interesting project: https://github.com/ocornut/imgui with binding for Nim: https://github.com/nimgl/imgui
12:41:02yann-kaeligI can not wait to test it ^^ but as a noob I have a lot of questions. First: installing nimgl/imgui through the official package manager of Nim. Is there a rule about where the module has to be installed ?
13:04:12FromDiscord<Hamid_Bluri> it has a section for installing guide:↵https://github.com/nimgl/imgui#nimble-direct-install
13:13:30FromDiscord<Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3NeS
13:14:13FromDiscord<Hamid_Bluri> why compiler complains about `let b = ...` bit not `let a = ...`
13:14:21FromDiscord<Hamid_Bluri> (edit) "bit" => "but"
13:14:52FromDiscord<Hamid_Bluri> (edit) "https://play.nim-lang.org/#ix=3NeS" => "https://play.nim-lang.org/#ix=3NeT"
13:20:03FromDiscord<gogolxdong (liuxiaodong)> Does Jester support ARC/ORC?
13:20:11yann-kaeligwell, I run nimble install https://github.com/nimgl/imgui.git, and I can see: Installing [email protected] Why the installed version is not the last available from the repo > v1.85 ? Where it has been installed ?
13:23:13FromDiscord<Rika> it says 1.84.2 but it is 1.85
13:23:19FromDiscord<Rika> the nimble file was not updated with the tag
13:23:45yann-kaeligyea, I used the --verbose option and I can see Downloading https://github.com/nimgl/imgui.git using git Cloning latest tagged version: 1.85 Verifying dependencies for [email protected] Installing [email protected]
13:24:19FromDiscord<Rika> i am not very sure on how to fix this without fucking with the repo a bit
13:24:34FromDiscord<Rika> just goes to show that this redundant information should not be in the nimble file...
13:33:04FromDiscord<eyecon> sent a code paste, see https://play.nim-lang.org/#ix=3NeY
13:33:16FromDiscord<eyecon> I just placed the dynamic definitions inside ()
13:33:31FromDiscord<eyecon> I dunno why it doesn't work without them
13:34:05FromDiscord<eyecon> `if true` is a code smell (for compile time there is `when`) but I assume this is a learning exercise
13:34:56yann-kaeligwell the code doesn't compile . https://github.com/nimgl/imgui#usage
13:35:59yann-kaelighttps://dpaste.com/GLEDVLD22
13:36:19FromDiscord<eyecon> Maybe try an earlier state, previous tag or something?
14:11:33*xet7 quit (Quit: Leaving)
14:25:01*xet7 joined #nim
14:47:45*arkurious joined #nim
15:10:30yann-kaeligOk, so the code is wrong and the correct example code is available here https://github.com/nimgl/nimgl/discussions/58?sort=top. But after that fix I still can not get the software to run: https://dpaste.com/AWXC9HDKN I found this thread https://github.com/nimgl/nimgl/discussions/58?sort=top#discussioncomment-226225 BUT in this case because imgui is a C++ projext, why not to build it using cpp ? So I run:
15:10:30yann-kaelig'nim cpp myprogram.nim but the build failed https://dpaste.com/CSEWTE2F4
15:10:44FromDiscord<eyecon> Is there any way to quickly construct a set with a set and some additional elements, a la :`lettersWithDot = Letters + '.'`?
15:11:18FromDiscord<Rika> have you tried doing that?
15:11:45FromDiscord<Rika> ah
15:11:46FromDiscord<Rika> okay
15:11:47FromDiscord<enthus1ast> `lettersWithDot = Letters + {'.'} `↵should work
15:11:53FromDiscord<Rika> or .incl()
15:11:56FromDiscord<eyecon> It does? Great, thanks
15:12:02FromDiscord<Rika> might be more efficient docs say
15:12:17FromDiscord<eyecon> But `.incl` modifies, right?
15:14:17FromDiscord<Rika> whichever is more appropriate for your usecase, yes it does modify
15:17:33FromDiscord<eyecon> Thanks
15:17:42yann-kaeligIt's a shame that I can not get from such a simple code something which is working. It's frustrating
15:19:29FromDiscord<Rika> the imgui bindings do not work for c++, only c (cimgui) afaik
15:19:43FromDiscord<Rika> you will need to use different bindings for c++ i assume
15:21:09FromDiscord<enthus1ast> the paste you send just shows a dll loading issue↵(<@709044657232936960_yann-kaelig=5b=49=52=43=5d>)
15:21:18FromDiscord<Valdar> IIRC, the NimGL/imgui works by wrapping the cimgui translation, but you need the correct dll for your OS
15:21:21FromDiscord<enthus1ast> put the dll next to you executbale
15:22:06yann-kaeligI'mn not on windows but I got the same error "could not load: cimgui.so"
15:23:44yann-kaeligthat why after I read the answer, my first idea was to build the program using cpp, but as Rika said it's not possible
15:24:07FromDiscord<Rika> what os
15:24:10FromDiscord<Rika> ubuntu?
15:24:15yann-kaeligLinux Gentoo
15:24:32FromDiscord<Rika> SHEERLUUUUCK
15:24:41FromDiscord<Rika> help this lad
15:27:07yann-kaelig:)
15:27:51yann-kaeligI want to be a programmer but I think it's going to take a decade :D
15:29:38FromDiscord<enthus1ast> yeah just get the dll somehow, either build is yourself or install it with your os tools (whatever this is on gentoo ;) )
15:31:59FromDiscord<Rika> In reply to @enthus1ast "yeah just get the": installing with the os tools involves building it yourself on gentoo xddd
15:32:34FromDiscord<enthus1ast> i can imagine that the gentoo installer is more streamlined that hands on self compilation
15:32:57*luis_ quit (Ping timeout: 240 seconds)
15:45:19yann-kaeligJust for my curiosity, why is it necessary to fork cimgui (the c-api for imgui ) to use it with Nim? There is no explanation of the purpose of the fork on the github page
15:46:21FromDiscord<Rika> ? theres a fork?
15:46:25FromDiscord<Rika> not sure
15:46:27FromDiscord<Recruit_main707> so that it doesnt break with changes to the main repo
15:46:59*PMunch joined #nim
15:47:07yann-kaelighttps://github.com/nimgl/cimgui
15:47:39*luis_ joined #nim
15:47:43FromDiscord<Recruit_main707> if the main repository changes something, the wrapper may not be compatible
15:57:00FromDiscord<Michal Maršálek> Hi, how can I make my template either return a code block or raise a compiletime exception? It feels like I might need a macro?
15:57:40FromDiscord<Michal Maršálek> But I don't know how to create such macro either, since I need it to take arguments that determine whter the excception should be raised or not.
15:57:59FromDiscord<Michal Maršálek> Something like this: https://play.nim-lang.org/#ix=3NfH
15:58:50FromDiscord<Michal Maršálek> I mean I can force a compile time error with this - the code doesn't parse..... but it's not exactly nice
15:59:20PMunchSomething like this? https://play.nim-lang.org/#ix=3NfK
16:00:05PMunchThey're not catchable though
16:01:00FromDiscord<Michal Maršálek> Yes that's what I needed
16:01:11PMunchOr you can do it like this if you want to make it catchable: https://play.nim-lang.org/#ix=3NfN
16:01:12FromDiscord<Michal Maršálek> It should be an unrecoverable error
16:01:17FromDiscord<Michal Maršálek> THank you
16:01:24PMunchAh, then {.error.} is what you want :)
16:01:33FromDiscord<Michal Maršálek> (edit) "error" => "error, I don't need to catch it"
16:02:06FromDiscord<Michal Maršálek> weird I swear I tried it with static before
16:02:28PMunchBut be careful with those though, so you don't end up in this situation: https://github.com/nim-lang/Nim/issues/19414
16:02:50PMunch@Michal_Maršálek, maybe it threw an error and you confused it for a parsing error? :P
16:03:33FromDiscord<exelotl> @enthus1ast @SkyVault heyyy can we talk about nim-tiled if you're both online?
16:03:51FromDiscord<enthus1ast> i'am
16:04:02FromDiscord<enthus1ast> i've forked it and patched it for my needs
16:04:22PMunchOh, you also wrote one of those? :)
16:04:22FromDiscord<Michal Maršálek> In reply to @PMunch "@Michal_Maršálek, maybe it threw": Yeah, metaprogramming stuff hey 😄 maybe
16:04:33FromDiscord<exelotl> and then I forked @enthus1ast's fork and patched it for my needs 😅
16:04:45FromDiscord<enthus1ast> haha
16:06:13yann-kaeligI understand. Well, I wonder now if it's a good idea to use these 'layers' to build a program. I need imgui binding which is not up2date with the upstream source code, I need a fork of cimgui. But will happen if one of these softwares is not maintain anymore. That a lot of 'layers' on which I have to base my software. This seems to be a recurring problem with the Nim wrappers I was able to find.
16:06:17PMunchWait, it's even made for SDL2?
16:06:38FromDiscord<exelotl> I'd like to PR it back into the main repo. It has some bugfixes, some new features, and some breaking changes (in particular - the tile data is now an array of TiledGid instead of int. And I'd like to make TiledObject a variant type rather than using inheritance)
16:07:08FromDiscord<exelotl> @SkyVault would you be ok with that?
16:07:34FromDiscord<enthus1ast> current variant type's are mostly unusable imho
16:07:45PMunchMy implementation by the way: https://github.com/PMunch/SDLGamelib/blob/master/gamelib/tilemap.nim
16:08:52FromDiscord<enthus1ast> but if its one of the few cases where they can work, the yeah why not
16:09:22FromDiscord<exelotl> In reply to @enthus1ast "current variant type's are": I think they're OK given that in nim-tiled the objects aren't intended to be extensible or mutable
16:09:50FromDiscord<enthus1ast> but i must say i try to avoid them until there is a solution or this RFC is implemented
16:11:17FromDiscord<enthus1ast> but prolly faster then inherited objects
16:23:35FromDiscord<exelotl> @enthus1ast which RFC btw?
16:24:37FromDiscord<enthus1ast> https://github.com/nim-lang/RFCs/issues/19↵↵https://github.com/nim-lang/RFCs/issues/368
16:26:37*adigitoleo quit (Remote host closed the connection)
16:27:19*adigitoleo joined #nim
16:30:16FromDiscord<exelotl> oh, heh I've never needed that yet
16:31:52FromDiscord<rishavs (Rishav Sharan)> sent a code paste, see https://play.nim-lang.org/#ix=3NfV
16:33:29FromDiscord<enthus1ast> a b↵ab c
16:34:22FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3NfW
16:34:40FromDiscord<rishavs (Rishav Sharan)> Thank yoU!
16:37:26*PMunch quit (Quit: Leaving)
16:52:01yann-kaeligwell, I built cimgui and I have the cimgui.so. I tried to build https://github.com/nimgl/imgui/blob/master/tests/tnull.nim as a test but I can not run it with an issue: https://dpaste.com/79TYQ68WT
17:01:43FromDiscord<Hamid_Bluri> In reply to @yann-kaelig "well, I built cimgui": I think you better open an issue in that repo
17:23:26*adigitoleo_ joined #nim
17:24:46*yann-kaelig left #nim (#nim)
17:25:12*adigitoleo quit (Ping timeout: 250 seconds)
17:40:51arkanoidAfter learning nim, it's difficult to like the sytax of other programming languages
18:02:05FromDiscord<Rika> Lol yes
18:04:54FromDiscord<tbrekalo> Why am not able to do this? https://media.discordapp.net/attachments/371759389889003532/934871327762956358/unknown.png
18:05:56FromDiscord<tbrekalo> it gives me `main.nim(9, 12) Error: cannot evaluate at compile time: idx`
18:08:12FromDiscord<tbrekalo> okay; the index must be compile time constant
18:11:07*neceve joined #nim
18:11:08FromDiscord<Rika> Tuple indices must be compile time resolvable yes
18:11:39*noeontheend joined #nim
18:16:42FromDiscord<tbrekalo> Guess I have to write a custom macro for something like this? https://media.discordapp.net/attachments/371759389889003532/934874298328436828/unknown.png
18:23:19FromDiscord<geekrelief> In reply to @tbrekalo "Guess I have to": Are you always going to pass in Vec3? Are you trying to generalize `zipAndOp`?
18:24:02FromDiscord<tbrekalo> In reply to @geekrelief "Are you always going": Always going to pass Vec3; but wanna make it generic so I get to toy with nim 🙂
18:25:47FromDiscord<geekrelief> hmm give me a minute to try something
18:26:01FromDiscord<geekrelief> I wrote a macro that might help
18:28:26FromDiscord<tbrekalo> ty 🙂
18:30:33FromDiscord<demotomohiro> How about to define Vec3 type as `type Vec3 = array[3, float3]` ?
18:31:31FromDiscord<geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3Nif
18:31:52FromDiscord<geekrelief> https://github.com/geekrelief/genit
18:32:21FromDiscord<tbrekalo> thanks; will take a look
18:32:45FromDiscord<tbrekalo> Realised I need a way of converting a string to nim node
18:33:14FromDiscord<geekrelief> In reply to @tbrekalo "Realised I need a": what do you mean? like a case statement?
18:33:58FromDiscord<tbrekalo> i pass a string to a macro and it makes `object.fieldName`, and I pass it: 'field name' as 'str'
18:35:03FromDiscord<geekrelief> sounds like you want to convert `fieldname:string` to an `ident(fieldname)`
18:37:06FromDiscord<geekrelief> Based on this sample, I have a couple of ideas to improve genit.
18:37:59FromDiscord<tbrekalo> so.. I am asking productive questions? 😆
18:38:52FromDiscord<geekrelief> hehe, I'm procrastinating. 🙂
18:39:01FromDiscord<geekrelief> but yeah at least it's productive
18:41:20FromDiscord<Phil> Boy, the orm really is the most painful part about the entire webdev story in nim atm.
18:42:02NimEventerNew post on r/nim by mavavilj: How can I understand what "bindings to" libraries really do?, see https://reddit.com/r/nim/comments/sb0it6/how_can_i_understand_what_bindings_to_libraries/
19:32:19*luis_ quit (Remote host closed the connection)
19:36:04*neurocyte0917090 joined #nim
19:46:08FromDiscord<tbrekalo> https://github.com/nim-lang/Nim/issues/19019 this still an active issue?
19:50:43FromDiscord<haxscramper> yes https://play.nim-lang.org/#ix=3Niz
19:51:33FromDiscord<tbrekalo> This type of stuff makes me sad 😦
20:13:17*noeontheend quit (Ping timeout: 240 seconds)
20:34:29*jjido joined #nim
20:35:56*jmdaemon joined #nim
20:47:05FromDiscord<auxym> sent a code paste, see https://paste.rs/dxu
20:47:21FromDiscord<auxym> sent a code paste, see https://play.nim-lang.org/#ix=3NiT
21:03:15*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
21:16:03*noeontheend joined #nim
21:23:17FromDiscord<auxym> nvm i'm an idiot
21:31:12*jjido joined #nim
21:35:57*noeontheend quit (Ping timeout: 240 seconds)
21:41:28*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
21:48:23*Gustavo6046 joined #nim
22:03:31*jjido joined #nim
22:08:05FromDiscord<ynfle> Why can't JsonNode be `const`?
22:10:32FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3Njh
22:11:08FromDiscord<Phil> I'm at the point where I solely want the type conversion
22:11:12FromDiscord<Phil> I don't even care about the SQL
22:11:44FromDiscord<enthus1ast> yes this is the idea of my weekend hack
22:12:15FromDiscord<Phil> Let me write the SQL myself, I've got some usecases there's literally no snowball's chance in hell the orm can cover (FTS5 in sqlite), but boy converting from sqlite3 output to types is agonizing
22:12:42FromDiscord<enthus1ast> yes
22:12:54FromDiscord<enthus1ast> if you like i opensource my hack for you, maybe you like it
22:13:46FromDiscord<Phil> In reply to @enthus1ast "yes this is the": I'll check it out, maybe use it and norm in parallel, norm for the default stuff and this for the complex queries, I'll need to think on that one, thank you very much for giving me a code example! I'll definitely check it out because I really need the ability to do some raw sql --> custom type and the prospect of writing that code by hand put me in a bit of a state of coding paralysis
22:14:02FromDiscord<enthus1ast> the good thing is that since its just a "sequence unpacker" it also works in non database context (eg csv parsing etc)
22:14:16*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
22:14:57*m5zs7k joined #nim
22:15:01FromDiscord<Phil> Oh wait, that was a usage example, would the actual code of your "to" function be available? I'd love to take a look at it on... err... looking at my timetable, tomorrow or sometime wednesday
22:15:31FromDiscord<ajusa> In reply to @Isofruit "I'll check it out,": BTW Norm doesn't hide the db connection from you, if you want you can directly write the complex stuff.
22:15:42FromDiscord<ajusa> Oh wait this is Isofruit you probably knew thay
22:15:47FromDiscord<ajusa> (edit) "thay" => "that"
22:15:54FromDiscord<enthus1ast> mom let me upload it do github (its in an awfull shape, was not planning to release it so soon
22:15:58FromDiscord<Phil> In reply to @ajusa "BTW Norm doesn't hide": Yeh, that I liked, but then I couldn't find a way to do the type conversion on a model without an id field
22:16:34FromDiscord<Phil> Since FTS5 tables are basically virtual tables without ID fields, being forced to use norm models when I want the select-output to be converted into a type for me kind of screws me
22:16:42FromDiscord<Phil> Because no id field means select proc errors out
22:17:32FromDiscord<Phil> In reply to @ajusa "Oh wait this is": Awww yeah, getting a reputation that I have like 5% of an idea of what I'm doing! 😄
22:18:31FromDiscord<enthus1ast> https://github.com/enthus1ast/nisane
22:18:42FromDiscord<enthus1ast> you just construct you query like normal
22:18:46FromDiscord<enthus1ast> then unpack it
22:19:26FromDiscord<enthus1ast> ref objects are not yet supported, since they ast is strange
22:19:36FromDiscord<enthus1ast> but objects, tuples, int, string, float are
22:21:20FromDiscord<Elegantbeef> I mean their AST isnt that strange, it's 1 extra node 😛
22:21:21FromDiscord<Phil> Seeing as it uses pretty decently sized macros and I have only really... let's say I've understood a one line macro so far and that's the extent of my knowledge, I've got a question concerning capabilities.↵I only spotted procs for toString, toInt, toChar etc., but no toBool, do you handle that without needing an extra proc or do you handle bools with "toInt" ?
22:21:24FromDiscord<enthus1ast> and the ct macro and ci macro just creates create table strings and insert strings out of a tyoe
22:21:59FromDiscord<Phil> (edit) "Seeing as it uses pretty decently sized macros and I have only really... let's say I've understood a one line macro so far and that's the extent of my knowledge, I've got a question concerning capabilities.↵I only spotted procs for toString, toInt, toChar etc., but no toBool, do you handle that without needing an extra proc or do you ... handlethem" added "treat bools as int and" | "bools" => "them"
22:22:22FromDiscord<enthus1ast> [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org)\: i found no way to get to the ACTUAL type definition, @mratsim was pointing me to a possible solution, but not yet doen
22:22:29FromDiscord<enthus1ast> no to bool is missing
22:22:47FromDiscord<Elegantbeef> you have the a type or value?
22:23:16FromDiscord<enthus1ast> both, for the to macro it must be a value for the create macros its a type (or even a value, should not change much)
22:23:51FromDiscord<Elegantbeef> if it's a value `getImpl` should suffice
22:23:59FromDiscord<Elegantbeef> If it's a type `getTypeImpl` should suffice
22:24:04FromDiscord<enthus1ast> nope its not
22:24:30FromDiscord<ynfle> Why can't JsonNode be const?
22:24:46FromDiscord<enthus1ast> could be that i have done something wrong, but found no way yet
22:24:57FromDiscord<Elegantbeef> It's a complex ref object is the only reason i can imagine
22:25:10FromDiscord<Phil> I'll give myself a ping here because I know not of how to bookmark a thing @Phil and then stare at the code some more and the debate around it when I am not about to go to sleep
22:25:15FromDiscord<Elegantbeef> Well can you give me an example of the object you're attempting to get the type information of?
22:25:22FromDiscord<Phil> (edit) "I'll give myself a ping here because I know not of how to bookmark a thing ... @Phil" added "in discord"
22:25:56FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3Njl
22:26:49FromDiscord<Phil> ... maybe I should make a package out of my db connection pool, it may be tiny but it's better than having to write it yourself
22:27:17FromDiscord<enthus1ast> i would love to have a sane orm without much magic
22:28:13FromDiscord<Phil> A proper ORM that includes dealing with DB migration and more I can't see at the moment, not when I consider where we are currently and the amount of work it takes to get to where we'd need to be
22:28:45FromDiscord<Phil> I'll set my sights lower to having something that just does the DB interface for DML for me and I deal myself with the DDL
22:29:03FromDiscord<Phil> (edit) "I'll set my sights lower to having something that just does the DB interface for DML for me ... and" added "(but does that well and flexibly)"
22:29:29FromDiscord<ajusa> In reply to @Isofruit "A proper ORM that": Norm technically has a migration manager. Personally I'd love to see more work being put into it rather than alternative libraries as Nim doesn't need more fragmentation. I also know that you've been making PRs 😄
22:31:08FromDiscord<ynfle> Can `const` be a `ref` type?
22:32:50FromDiscord<Phil> Kind of. Norm misses a couple things for me to consider letting it handle DML stuff:↵Support for views chief among them. That one in particular is a thing I have no idea how that could be implemented. I don't even have a good idea on how one could implement signals in norm. My current version relies on specifically named procs with a generic signature being within the calling context which is...suboptimal to say the least
22:32:55FromDiscord<Elegantbeef> enthus here you go https://play.nim-lang.org/#ix=3Njn
22:33:31FromDiscord<Elegantbeef> It can be but not complex ones iirc
22:33:40FromDiscord<enthus1ast> nice! Thanks
22:34:03FromDiscord<enthus1ast> i tried various combinations of getImpl getTypeImpl....
22:34:21FromDiscord<Elegantbeef> I guess i was wrong and no it cannot be ref objects
22:34:37FromDiscord<ynfle> In reply to @Elegantbeef "It can be but": Was that a reply to me?
22:35:13FromDiscord<Elegantbeef> It makes sense given you cannot serialize references
22:35:44FromDiscord<Elegantbeef> Well i mean you can serialize references but not to raw C
22:36:18FromDiscord<Elegantbeef> Yes
22:36:28FromDiscord<enthus1ast> i mean, types from a db are most often not that complex i guess
22:36:39FromDiscord<enthus1ast> depending what you mean with complex
22:36:41FromDiscord<Elegantbeef> I mean i was talking about constant references
22:36:45FromDiscord<Elegantbeef> Your stuff will always work
22:37:03FromDiscord<Elegantbeef> Many people have serializers that work on all objects
22:38:06FromDiscord<Elegantbeef> Depending on what you want you could use disruptek's `assume` package which has `typeit` allowing you to iterate fields of objects
22:38:26FromDiscord<Elegantbeef> https://github.com/disruptek/assume/blob/master/tests/typeit.nim#L102-L199 for example of it in use
22:52:11*adigitoleo_ is now known as adigitoleo
23:12:07FromDiscord<ynfle> What kind of error isError: expression '1.0'f64' is of type 'float64' and has to be used (or discarded)↵ echo testConvertToNimArg(%1.0)
23:12:31FromDiscord<ynfle> (edit) "What kind of error isError: expression '1.0'f64' is of type 'float64' and has to be used (or discarded)↵ echo testConvertToNimArg(%1.0)" => "sent a code paste, see https://play.nim-lang.org/#ix=3Njt"
23:12:39FromDiscord<ynfle> There is an echo there
23:12:44FromDiscord<ynfle> I'm very confused
23:15:17FromDiscord<Elegantbeef> What does `textConvertToNimArg` convert it into
23:15:17FromDiscord<Elegantbeef> My money is on an unhandled float
23:15:54FromDiscord<ynfle> It's a macro that generates the nimcode of `convertToNimArg`
23:16:27FromDiscord<enthus1ast> what return type does the macro has?
23:16:29FromDiscord<Elegantbeef> That doesnt answer the question
23:16:47FromDiscord<Elegantbeef> compile with `--expandMacro:testConvertToNimarg`
23:17:32FromDiscord<ynfle> It doesn't work
23:17:35FromDiscord<ynfle> I'll try
23:18:24FromDiscord<ynfle> Won't expand
23:18:58FromDiscord<Elegantbeef> Did you forget to import `std/json`?
23:19:29FromDiscord<Elegantbeef> There isnt much reason for it to error unless youre macro has a return type other than `: untyped`
23:19:46FromDiscord<ynfle> I didn't specify a return type
23:19:52FromDiscord<ynfle> Should I?
23:20:11FromDiscord<Elegantbeef> Put untyped on it and see if that changes
23:20:22FromDiscord<ynfle> That works
23:20:25FromDiscord<ynfle> Very confused
23:20:31FromDiscord<ynfle> Why should that work?
23:20:56FromDiscord<Elegantbeef> Cause without a return type on the macro it's an unhandled value
23:23:48FromDiscord<ynfle> Ah
23:23:52FromDiscord<ynfle> Good to know
23:30:06FromDiscord<ynfle> sent a code paste, see https://play.nim-lang.org/#ix=3Njy
23:30:11FromDiscord<ynfle> Says illegal ast
23:39:02FromDiscord<ynfle> Any easy way to debug `illformed AST`?
23:39:09*neceve quit (Ping timeout: 256 seconds)
23:40:43FromDiscord<Elegantbeef> Not really
23:44:23FromDiscord<ynfle> What does the location mean fo the error mean?
23:44:40FromDiscord<ynfle> THis is what I get
23:44:41FromDiscord<ynfle> sent a code paste, see https://play.nim-lang.org/#ix=3NjC
23:44:44FromDiscord<ynfle> (edit) "THis" => "Tgis"
23:44:48FromDiscord<ynfle> (edit) "Tgis" => "This"
23:45:01FromDiscord<ynfle> (edit)
23:45:13FromDiscord<Elegantbeef> The AST has something wrong with it
23:45:21FromDiscord<Elegantbeef> Cant say anything else
23:45:32FromDiscord<ynfle> Edited
23:45:33FromDiscord<ynfle> (edit) "https://play.nim-lang.org/#ix=3NjC" => "https://play.nim-lang.org/#ix=3NjD"
23:45:46FromDiscord<ynfle> It points to th ufcs call to gettypeimpl
23:45:49FromDiscord<Elegantbeef> You're missing the body of the for loop
23:46:21FromDiscord<ynfle> sent a code paste, see https://play.nim-lang.org/#ix=3NjE
23:47:13FromDiscord<Elegantbeef> I dont know what to say
23:47:13FromDiscord<Elegantbeef> why arent you using `genasts`
23:48:26FromDiscord<ynfle> Formal params doens't play nice
23:48:30FromDiscord<ynfle> At least with quote
23:48:40FromDiscord<ynfle> Didn't try genast
23:48:45FromDiscord<ynfle> I'm too old fashioned
23:49:00FromDiscord<Elegantbeef> Well you can use genast/quote do then add them manually
23:55:04FromDiscord<ynfle> sent a code paste, see https://play.nim-lang.org/#ix=3NjF
23:55:27FromDiscord<Elegantbeef> I dont know look at the AST of what you generated vs. manually created
23:58:01FromDiscord<ynfle> I switched to genast and still got the error
23:58:13FromDiscord<ynfle> I only get that error with expandMacros:
23:58:37FromDiscord<Elegantbeef> I mean you're generating invalid AST changing how you generate it isnt going to make it cleaner