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