00:00:23 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "So then whatever does": Do you have an exemple so I can better undestand please? |
00:08:30 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#pasty=uFMmKOzX |
00:08:34 | FromDiscord | <Elegantbeef> Something like this should suffice |
00:08:57 | FromDiscord | <Elegantbeef> You need to explicitly do `addPointer` to extend the lifetime of `MyType` else it destroys at the end of the frame |
00:11:54 | FromDiscord | <Elegantbeef> Though the tilengine API sorta sucks from cursory look |
00:12:33 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "Though the tilengine API": Yeah it's a bit unsafe |
00:15:24 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#pasty=SGQPMpQL |
00:15:41 | FromDiscord | <Elegantbeef> Yes |
00:15:45 | FromDiscord | <Elegantbeef> `=wasMoved` explicitly disarms `=destroy` |
00:18:09 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=RbvGAmcu |
00:18:16 | FromDiscord | <Elegantbeef> Do not try this memory leak at home |
00:19:08 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#pasty=WaGXiijF |
00:19:55 | FromDiscord | <Elegantbeef> when you do `getMyType` in the example if you do not submit it back to tile engine it would be deleted |
00:20:19 | FromDiscord | <Elegantbeef> This is the issue with the tile engine api |
00:20:35 | FromDiscord | <Elegantbeef> It's not that it's unsafe it's that it infringes on life times 😄 |
00:21:56 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "It's not that it's": Yeah lifetimes are tricky on this engine↵You have to manage it by yourself |
00:22:52 | FromDiscord | <Elegantbeef> Yep which means you either have to do the above where you explicitly add back or you have no automatic management cause the API is poorly designed |
00:23:24 | FromDiscord | <System64 ~ Flandre Scarlet> In both cases it will look quite ugly |
00:23:51 | FromDiscord | <Elegantbeef> Well time to fork it 😄 |
00:24:19 | FromDiscord | <Elegantbeef> No longer use globals, pass in a `tileEngineState`! |
00:24:46 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "Well time to fork": the C language...↵I'm clearly not an expert in this language 🤣 |
00:25:12 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "No longer use globals,": Oh, the engine stores as globals? |
00:25:15 | FromDiscord | <Elegantbeef> I'm not even worried about the ugly code, it's just not correct code |
00:26:00 | FromDiscord | <Elegantbeef> Well yea you do not pass in a parameter that holds all your state |
00:26:11 | FromDiscord | <System64 ~ Flandre Scarlet> The right way is to have a root object that contains everything |
00:27:11 | FromDiscord | <System64 ~ Flandre Scarlet> like an Engine object that contains an array of layer objects, each layer contains a tilemap, a palette and so on |
00:30:24 | FromDiscord | <zumi.dxy> Globals but with extra steps |
00:42:27 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "Well yea you do": In fact I try to make my own engine in Nim↵layers are fairly trivial to do, but sprites... |
00:43:13 | FromDiscord | <Elegantbeef> a 2D renderer is not that difficult |
00:43:26 | FromDiscord | <Elegantbeef> It's work, but it's not the worst thing in the world |
00:44:46 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "It's work, but it's": Well, I don't really know how to optimize sprite rendering |
00:44:58 | FromDiscord | <System64 ~ Flandre Scarlet> especially when I do a scanline renderer |
00:45:37 | FromDiscord | <Elegantbeef> All in post processing! |
00:45:47 | FromDiscord | <System64 ~ Flandre Scarlet> wdym? |
00:46:19 | FromDiscord | <Elegantbeef> I'm mostly joking |
00:46:50 | FromDiscord | <System64 ~ Flandre Scarlet> Oh alright, sorry↵However the background renderer works fine |
00:46:53 | FromDiscord | <Elegantbeef> I'd just avoid doing scanline rendering myself |
00:47:05 | FromDiscord | <Elegantbeef> It's just extra work and cannot really be done well on the gpu |
00:47:40 | FromDiscord | <Elegantbeef> You can approximate a lot using shaders |
00:47:43 | FromDiscord | <Elegantbeef> Not everything, but a lot |
00:48:33 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "I'd just avoid doing": Tilengine uses the CPU |
00:48:50 | FromDiscord | <Elegantbeef> of course |
00:49:05 | FromDiscord | <Elegantbeef> Scan line rendering is not really possible to do on the gpu |
00:49:10 | FromDiscord | <System64 ~ Flandre Scarlet> and OpenGL... Is pain |
00:50:10 | FromDiscord | <Elegantbeef> Nah opengl isn't that bad |
00:50:42 | FromDiscord | <System64 ~ Flandre Scarlet> Raylib 👌 |
00:51:08 | FromDiscord | <Elegantbeef> Eh |
01:18:54 | * | coldfeet quit (Remote host closed the connection) |
01:46:01 | FromDiscord | <zumi.dxy> raylib seems alright but it is glfw-based |
01:54:40 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @zumi.dxy "raylib seems alright but": What's the problem with glfw? |
01:55:19 | FromDiscord | <polylokh_39446> I keep reading it as Games For Windows Live and I don't like that. |
01:55:49 | FromDiscord | <zumi.dxy> In reply to @sys64 "What's the problem with": i heard it has an sdl backend now |
01:55:59 | FromDiscord | <zumi.dxy> nothing wrong, practically |
02:00:09 | * | beholders_eye quit (Read error: Connection reset by peer) |
02:05:56 | * | beholders_eye joined #nim |
02:30:45 | * | beholders_eye quit (Read error: Connection reset by peer) |
02:36:38 | * | beholders_eye joined #nim |
02:58:46 | * | def- quit (Quit: -) |
02:59:33 | * | beholders_eye quit (Read error: Connection reset by peer) |
03:00:16 | * | def- joined #nim |
03:05:30 | * | beholders_eye joined #nim |
03:55:47 | * | beholders_eye quit (Read error: Connection reset by peer) |
04:01:26 | * | beholders_eye joined #nim |
04:07:35 | FromDiscord | <eightbit_dboy> Anyone recommend any good tutorials on wrapping C libraries for Nim? I wanna try wrapping GBDK so people can write GameBoy games in Nim. |
04:08:03 | FromDiscord | <eightbit_dboy> It would also require building with GBDK's CC. |
04:17:48 | FromDiscord | <treeform> In reply to @eightbit_dboy "Anyone recommend any good": Good Boy Galaxy is written in Nim: https://www.kickstarter.com/projects/penguinrik/goodboy-galaxy-exploration-platform-game-gba-pc-and-switch |
04:18:11 | FromDiscord | <treeform> https://exelo.tl/goodboy-demo-tooling.html |
04:18:12 | FromDiscord | <Elegantbeef> https://github.com/exelotl/natu |
04:18:42 | FromDiscord | <eightbit_dboy> In reply to @treeform "Good Boy Galaxy is": This is for GBA, GBDK is for GameBoy and GameBoy Color. |
04:18:51 | FromDiscord | <eightbit_dboy> It also targets SMS, GG, and a couple others. |
04:19:02 | FromDiscord | <treeform> Best tool for wrapper C libraries that I found recently is ChatGPT |
04:19:11 | FromDiscord | <eightbit_dboy> lol |
04:19:14 | FromDiscord | <treeform> (edit) "wrapper" => "wrapping" |
04:19:21 | FromDiscord | <eightbit_dboy> Fair. |
04:19:22 | FromDiscord | <Elegantbeef> Futhark exists |
04:19:30 | FromDiscord | <eightbit_dboy> Futhark? |
04:19:42 | FromDiscord | <Elegantbeef> Generates bindings from headers using libclang |
04:20:14 | FromDiscord | <treeform> A lot of times C libraries are very big, but you just need a small part. So I recommend just wrapping the small part. |
04:20:23 | FromDiscord | <treeform> We do this with Windy and Debby |
04:20:56 | FromDiscord | <eightbit_dboy> https://gbdk-2020.github.io/gbdk-2020/docs/api/dir_a9f896cff747ba031115e41245385c17.html |
04:21:03 | FromDiscord | <treeform> we wrap small part of win32, x11, wayland, and mac stuff (objc): https://github.com/treeform/windy/tree/master/src/windy/platforms |
04:21:12 | FromDiscord | <eightbit_dboy> It's not a large library. |
04:22:15 | FromDiscord | <treeform> For debby I wrap libmysql, libpq, and libsqlite3 https://github.com/treeform/debby/tree/master/src/debby |
04:22:41 | FromDiscord | <treeform> And Puppy (also just win32, curl and mac stuff) |
04:22:58 | FromDiscord | <treeform> https://github.com/treeform/puppy/tree/master/src/puppy/platforms |
04:23:03 | FromDiscord | <Elegantbeef> The issue with not using a compiler is that the bindings can be incorrectly typed, so there is a benefit for anything long lived |
04:23:13 | FromDiscord | <eightbit_dboy> I'm talking about just wrapping GBDK in general to make it available. |
04:23:27 | FromDiscord | <Elegantbeef> Yea you could use futhark or c2nim to get bindings |
04:23:27 | FromDiscord | <eightbit_dboy> Not for a specifically tailored purpose. |
04:23:40 | FromDiscord | <Elegantbeef> The former is automatic and works relatively well(though expects clang) |
04:23:43 | FromDiscord | <eightbit_dboy> Yeah, but are there any good tutorials you recommend? |
04:23:46 | FromDiscord | <Elegantbeef> The latter works less well but does work |
04:24:07 | FromDiscord | <eightbit_dboy> Because I was asking for tutorials. |
04:24:09 | FromDiscord | <Elegantbeef> Futhark is extraordinarily easy to use to get bindings |
04:24:31 | FromDiscord | <treeform> I found that C headers contains so much defines and strange stuff that automated wrapping never works well. |
04:24:50 | FromDiscord | <Elegantbeef> I mean that's why futhark works so well |
04:24:52 | FromDiscord | <Elegantbeef> It's quite literally a C compiler |
04:25:06 | FromDiscord | <Elegantbeef> It expects clang though |
04:25:17 | FromDiscord | <Elegantbeef> So any defines that do not work or expect clang fail |
04:25:33 | FromDiscord | <eightbit_dboy> Hmmm... |
04:25:44 | FromDiscord | <eightbit_dboy> Well, GBDK uses its own CC |
04:25:59 | FromDiscord | <Elegantbeef> Yea but how wild is the C? |
04:26:05 | * | lucasta quit (Quit: Leaving) |
04:26:11 | FromDiscord | <eightbit_dboy> Dunno |
04:26:20 | FromDiscord | <Elegantbeef> Does it do anything non standard that would break clang and friends |
04:26:25 | FromDiscord | <eightbit_dboy> https://gbdk-2020.github.io/gbdk-2020/docs/api/index.html |
04:26:57 | FromDiscord | <Elegantbeef> Or is it just a specialised compiler backend |
04:27:15 | FromDiscord | <eightbit_dboy> At any rate, do y'all recommend any tutorials, as I have been asking for tutorials on how to do this. |
04:27:18 | FromDiscord | <eightbit_dboy> (edit) "this." => "this?" |
04:27:36 | FromDiscord | <Elegantbeef> I do not really have any tutorials aside from the manual on `importc` |
04:27:53 | FromDiscord | <Elegantbeef> It's not that complicated to import code to Nim, match the types say `importc` add a `header` |
04:28:07 | FromDiscord | <eightbit_dboy> This? https://nim-lang.org/docs/manual.html#foreign-function-interface-importc-pragma |
04:28:14 | FromDiscord | <Elegantbeef> Yea |
04:28:37 | FromDiscord | <Elegantbeef> That and the header pragma |
04:28:38 | FromDiscord | <eightbit_dboy> https://tenor.com/view/samuel-l-jackson-shit-negro-pulp-fiction-thats-all-you-had-to-say-talking-on-the-phone-gif-10015334 |
04:29:14 | FromDiscord | <eightbit_dboy> Huh. It's not showing the actual gif. |
04:29:36 | FromDiscord | <Elegantbeef> No embeds here |
04:29:40 | FromDiscord | <eightbit_dboy> Ah. |
04:38:35 | * | def- quit (Quit: -) |
04:39:02 | * | def- joined #nim |
04:47:00 | * | beholders_eye quit (Ping timeout: 252 seconds) |
04:49:42 | * | def- quit (Quit: -) |
04:50:20 | * | def- joined #nim |
05:10:03 | * | def- quit (Quit: -) |
05:11:14 | * | def- joined #nim |
05:12:03 | FromDiscord | <drunkenalcoholic> sent a code paste, see https://play.nim-lang.org/#pasty=YVemyscJ |
05:13:15 | FromDiscord | <drunkenalcoholic> (edit) "https://play.nim-lang.org/#pasty=PqWaitLd" => "https://play.nim-lang.org/#pasty=ugDVWhrG" |
05:45:36 | * | def- quit (Quit: -) |
05:45:54 | * | def- joined #nim |
05:53:29 | * | ntat joined #nim |
05:55:37 | FromDiscord | <zumi.dxy> sent a long message, see https://pasty.ee/eeTuhakL |
05:56:58 | FromDiscord | <eightbit_dboy> In reply to @zumi.dxy "I think I can": Thanks! |
06:00:34 | FromDiscord | <zumi.dxy> sent a code paste, see https://play.nim-lang.org/#pasty=SOVBDQRU |
06:13:04 | * | def- quit (Quit: -) |
06:14:07 | * | def- joined #nim |
06:17:16 | * | lumidify quit (Quit: leaving) |
06:17:44 | * | def- quit (Client Quit) |
06:17:55 | * | def- joined #nim |
06:26:30 | * | SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev) |
06:26:54 | * | SchweinDeBurg joined #nim |
06:31:22 | * | def- quit (Quit: -) |
06:32:18 | * | def- joined #nim |
06:45:57 | FromDiscord | <aryzen> so... I've been wondering what the general consensus is for what 3D physics engine people enjoy using... I've seen Jolt as the new praised one, theres Bullet, NewtonDynamics, and PhysX too... Which one would be the best choice? (Consider that engine compatibility is not an obstacle, but also conside I'd prefer if there were C bindings so I can get easy interop with other languages) |
06:46:30 | FromDiscord | <aryzen> ... And a +1 would be if there are any other 2D physics providers than Box2D that are good for a generale use engine |
06:46:34 | FromDiscord | <aryzen> (edit) "generale" => "general" |
06:46:45 | FromDiscord | <aryzen> OOPS |
06:46:48 | FromDiscord | <aryzen> Wrong server |
06:46:50 | FromDiscord | <Elegantbeef> Chipmunk and Box2D are the two popular 2D ones |
06:47:16 | FromDiscord | <Elegantbeef> Jolt is the new 3D one that has a lot of eyes for going towards |
06:47:52 | FromDiscord | <aryzen> Thank you for answering though, despite my airheadedness |
06:48:02 | FromDiscord | <Elegantbeef> Hey I see the message on both servers! |
06:48:06 | FromDiscord | <Elegantbeef> I'm special |
06:48:50 | FromDiscord | <.lisuwu_> beef is everywhere |
06:49:08 | FromDiscord | <Elegantbeef> https://github.com/jrouwe/JoltPhysics?tab=readme-ov-file#bindings-for-other-languages jolt has two C bindings which means it's easy enough to use elsewhere |
06:50:50 | FromDiscord | <Elegantbeef> Otherwise bullet is popular choise |
06:50:52 | FromDiscord | <Elegantbeef> choice\ |
06:52:43 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=UnPLjLoL |
06:53:48 | FromDiscord | <Phil> This is rather chronos specific so if anyone has any clue that'd be neat 😅 |
06:58:55 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=safKnusg |
07:07:21 | * | coldfeet joined #nim |
07:11:17 | FromDiscord | <goerge_lsd> any reason +, - etc procs not implemented for tables, just for HashSet ? |
07:13:13 | FromDiscord | <polylokh_39446> tables have keys and values, and only keys are a set. What would these operators do with the values? |
07:13:40 | FromDiscord | <goerge_lsd> just ignore the values I guess |
07:13:56 | FromDiscord | <polylokh_39446> the whole point of tables is to have values, though. Otherwise you could have a set. |
07:15:20 | FromDiscord | <polylokh_39446> any answer would need to be explained, and the explanation would take longer to write and undertand than the code to implement that answer specifically where you want it. |
07:18:06 | FromDiscord | <goerge_lsd> I started with a set, then realised I need to store values associated with set elements.. and thus a table |
07:18:21 | * | def- quit (Quit: -) |
07:18:51 | FromDiscord | <goerge_lsd> and now this doesn't work anymore: ` let toAdd = curFilelist - prevFilelist ` |
07:19:09 | * | def- joined #nim |
07:21:43 | FromDiscord | <polylokh_39446> you can take a set of the keys of both of those tables and assign toAdd to their difference, or you can copy the first table into toAdd and subtract the entries found in the other table |
07:22:31 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=QJZwBSYI |
07:22:55 | FromDiscord | <goerge_lsd> sent a code paste, see https://play.nim-lang.org/#pasty=lxXNqsgV |
07:23:21 | FromDiscord | <Elegantbeef> Big old performance trap |
07:25:12 | FromDiscord | <Phil> LGTM george |
07:27:32 | FromDiscord | <Elegantbeef> No it does not look good phil |
07:28:45 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=opQcDnXF |
07:28:50 | FromDiscord | <Phil> It is simple and easy to look at. Unless this is a hot code path for optimization it's not worth the optimization |
07:28:50 | FromDiscord | <Elegantbeef> There we go that looks ok |
07:30:28 | FromDiscord | <polylokh_39446> tables have value semantics, `result = value1` accomplishes that first loop.↵the conditional on the second loop is a question you answered, that would have to be explained if this were general code. beef's already answered it differently there. |
07:31:35 | FromDiscord | <Elegantbeef> Copying a table like the above is faster than copying through getting key, then hashing |
07:31:36 | FromDiscord | <Elegantbeef> Whoops add ifs around the for loops 😄 |
07:32:09 | FromDiscord | <polylokh_39446> since the order can change, it's different even with the ifs |
07:32:44 | FromDiscord | <polylokh_39446> with george_lsd's version, the first table's keys always have their values in the result. |
07:38:09 | FromDiscord | <Elegantbeef> Yea a union of tables makes little sense, personally I read `a + b` on collections and assume it's doing `c[0] = a[0] + b[0]` |
07:46:40 | FromDiscord | <Phil> For me the problem is its always ambiguous |
07:46:58 | FromDiscord | <Phil> Are you summing up the values? Are you concatenating the collections? Who knows! Not me ! |
07:48:08 | FromDiscord | <Elegantbeef> Well you are not concatenating cause `&` is for concatenating in Nim 😛 |
07:48:20 | FromDiscord | <Elegantbeef> `+` is supposed to be commutative |
07:49:58 | FromDiscord | <Phil> I'd just nip it in the bud in the first place and use decent proc names |
07:50:47 | FromDiscord | <Phil> I like operator overloading, but more for singular types instead of collections |
07:52:23 | FromDiscord | <Elegantbeef> `@[10, 20, 30] & bleh` is fine! |
07:53:36 | FromDiscord | <Phil> ehhhhhhh. Like, I could bare reading it, I wouldn't code it myself |
08:01:01 | FromDiscord | <odexine> I just read like 5 of the messages here so sorry if I’m wrong but |
08:01:13 | FromDiscord | <odexine> Technically tables are unordered |
08:01:33 | FromDiscord | <odexine> So + as concatenation would be commutative |
08:01:41 | FromDiscord | <Elegantbeef> The values are not though |
08:01:51 | FromDiscord | <Elegantbeef> One of the value comes out on top |
08:02:08 | FromDiscord | <Elegantbeef> `{"a": "b"} + {"a": "c"}` |
08:02:10 | FromDiscord | <odexine> True |
08:02:48 | FromDiscord | <odexine> If the rule were different it could be twisted to make that commutative too |
08:03:10 | FromDiscord | <Elegantbeef> In what way? |
08:05:37 | FromDiscord | <odexine> If it were (naturally only in the case of ordinal values) that bigger values always overwrite smaller ones |
08:05:46 | FromDiscord | <odexine> For example only |
08:13:52 | * | redj quit (Remote host closed the connection) |
08:15:14 | * | redj joined #nim |
08:44:45 | FromDiscord | <aintea> Is there some PEP like thing in Nim ?↵For example should I use snake case or camel case ?↵How do I know if I need to `function(object)` or `object.function` or `object.function()` |
08:45:25 | FromDiscord | <zumi.dxy> https://nim-lang.org/docs/nep1.html |
08:45:37 | FromDiscord | <zumi.dxy> camelCase is preferred |
08:48:34 | FromDiscord | <aintea> I didn't remember how to say it, it is "style guide" |
08:48:35 | FromDiscord | <aintea> Thanks |
09:01:16 | FromDiscord | <rakgew> for the last question\: you can use either, as ucs (iirc\: unified call syntax) makes that possible. \:-D↵(@aintea) |
09:05:21 | FromDiscord | <Phil> TIL that "return" in macros will absolutely bite me in the ass |
09:05:32 | FromDiscord | <Phil> (edit) "TIL that "return" ... in" added "in quote-do" |
09:08:22 | FromDiscord | <Phil> Nevermind, it wasn't the return, still weird as all hell |
09:16:46 | * | disso_pch quit (Quit: Leaving) |
09:31:53 | * | gst joined #nim |
09:57:25 | * | lumidify joined #nim |
10:55:10 | * | def- quit (Quit: -) |
10:55:30 | * | def- joined #nim |
11:17:36 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=HevrDPPc |
11:17:55 | FromDiscord | <Phil> I would prefer to improve upon this because stacktrace info can be important |
11:24:50 | NimEventer | New thread by basow53698: How to create a type that accepts a function with any arguments?, see https://forum.nim-lang.org/t/11585 |
12:07:17 | * | xet7 joined #nim |
12:07:33 | * | rockcavera quit (Ping timeout: 252 seconds) |
12:13:39 | * | rockcavera joined #nim |
12:30:54 | * | beholders_eye joined #nim |
12:56:08 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=aeaKPpfI |
13:05:34 | * | ntat quit (Remote host closed the connection) |
13:05:52 | * | ntat joined #nim |
13:13:23 | FromDiscord | <demotomohiro> Check if child nodes of `typ` is a type and print error if it was not a type. |
13:21:26 | FromDiscord | <kreatoo> is there a way to list object variable names as a string? |
13:27:29 | FromDiscord | <demotomohiro> `local` proc lists can do similar similar thing but contains all local variable names.↵https://nim-lang.org/docs/system.html#locals |
13:28:01 | FromDiscord | <demotomohiro> (edit) removed "lists" |
13:28:10 | FromDiscord | <goerge_lsd> In reply to @kreatoo "is there a way": https://nim-lang.org/docs/iterators.html#fieldPairs.i%2CT |
13:51:33 | * | pbsds3 joined #nim |
13:51:46 | FromDiscord | <kreatoo> In reply to @goerge_lsd "https://nim-lang.org/docs/iterators.html#fieldPairs": works great, thanks |
14:04:10 | * | xet7 quit (Remote host closed the connection) |
14:12:25 | * | beholders_eye quit (Ping timeout: 268 seconds) |
14:18:32 | FromDiscord | <Robyn [She/Her]> Hey @odexine what are some concepts in functional programming you think that Nim could/would do well? |
14:21:24 | FromDiscord | <odexine> Not sure, that needs a bit of thought |
14:22:08 | FromDiscord | <Robyn [She/Her]> Fair enough, if you do get bored enough to think of it, lmk because I'm curious ehe |
14:23:05 | FromDiscord | <odexine> I’m not too sure what you mean actually |
14:23:20 | FromDiscord | <odexine> Like what would fit the philosophy? |
14:24:21 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=QUqIEaqx |
14:24:29 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#pasty=LuPIbpvP" => "https://play.nim-lang.org/#pasty=XytQVzYg" |
14:30:45 | FromDiscord | <Robyn [She/Her]> In reply to @odexine "Like what would fit": Yep |
14:32:25 | FromDiscord | <odexine> In reply to @isofruit "Does anyone understand why": It might be that Chronos is re-raising as future defect |
14:32:51 | FromDiscord | <Phil> Oh it is, I'm trying to understand why. There's nothing about this exception that makes it "unsolvable, program must crash" levels of bad |
14:33:41 | FromDiscord | <odexine> Might be the philosophy of the library. “Handle future errors where you await them, not at the loop” |
14:34:42 | FromDiscord | <Phil> The main issue I have with that is that now I either need to except `Exception` because as a lib author if this gets raised in an actor-thread I don't want it to nuke my actor, or I mandate `raises: []` in all async procs (which likely means in all procs) |
14:35:58 | FromDiscord | <odexine> Well defect problems apply (panics on means you’re dead anyway etc) |
14:36:38 | FromDiscord | <odexine> How would you mandate raises |
14:38:14 | FromDiscord | <Robyn [She/Her]> In reply to @odexine "It might be that": I am? 😛 |
14:39:02 | FromDiscord | <Robyn [She/Her]> Maybe `chronos` has a callback meant for handling errors with futures? |
14:42:25 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=kkTTPGdC |
14:42:44 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#pasty=jskFMfdA" => "https://play.nim-lang.org/#pasty=AmlgUhAs" |
14:42:52 | FromDiscord | <odexine> In reply to @isofruit "The *actual* usecase is": Cursed pragma syntax |
14:44:02 | FromDiscord | <Phil> Either way I would like to avoid this and just catch where the problem arises at runtime because you're not going to always know which problems you might have |
14:44:22 | FromDiscord | <Phil> And nuking the thread in that scenario I would like to avoid |
15:00:41 | FromDiscord | <dolfy0191> Hi there!↵Is there an async way of checking for keypress? Like press 'Q' to exit from an async server. |
15:02:30 | FromDiscord | <dolfy0191> Ctrl+C is not elegant |
15:03:34 | * | coldfeet quit (Remote host closed the connection) |
15:04:05 | FromDiscord | <Robyn [She/Her]> Not sure there's a built-in system for that in the stdlib but maybe std/selectors might be usable to implement that somehow? |
15:05:43 | FromDiscord | <Phil> That sounds like the kind of thing an application lib would do for you, in which case you'd be using whatever they provide.↵I can't imagine listening to events at a very low level is that easy given that likely every OS does these events differently |
15:07:07 | FromDiscord | <dolfy0191> In reply to @isofruit "That sounds like the": Yep. this is my concern. But I will look into this selectors lib. Thanks for the tip! |
15:10:35 | FromDiscord | <Robyn [She/Her]> In reply to @dolfy0191 "Yep. this is my": https://nim-lang.org/docs/selectors.html I will warn you it's a bit low level but it's a good lib |
15:10:49 | FromDiscord | <Robyn [She/Her]> (edit) "In reply to @dolfy0191 "Yep. this is my": https://nim-lang.org/docs/selectors.html I will warn you it's a bit low level ... but" added "compared to async" |
15:11:29 | FromDiscord | <dolfy0191> In reply to @chronos.vitaqua "https://nim-lang.org/docs/selectors.html I will war": Yes, I found it. Thanks for the tip! |
15:12:13 | FromDiscord | <Robyn [She/Her]> No worries! |
15:31:01 | * | FromDiscord quit (Remote host closed the connection) |
15:31:14 | * | FromDiscord joined #nim |
16:11:21 | * | beholders_eye joined #nim |
16:21:27 | * | kotrcka joined #nim |
16:21:42 | FromDiscord | <System64 ~ Flandre Scarlet> Is there a way to convert an hexadecimal string (#FFFFFFFF, 0xFFFFFFFF and stuff like that) to an int? |
16:33:53 | FromDiscord | <solitudesf> In reply to @sys64 "Is there a way": https://nim-lang.org/docs/strutils.html#fromHex%2Cstring |
16:46:53 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @solitudesf "https://nim-lang.org/docs/strutils.html#fromHex%2Cs": Thanks! |
16:47:18 | FromDiscord | <System64 ~ Flandre Scarlet> It starts to be quite versatile https://media.discordapp.net/attachments/371759389889003532/1238895218007474186/colors.nim?ex=6640f295&is=663fa115&hm=128d338ee31c0ffe350119d6bb889d3cea26282958f353de0864398f9546747f& |
16:50:35 | FromDiscord | <Robyn [She/Her]> @System64 ~ Flandre Scarlet why not build your code upon https://github.com/treeform/chroma ? |
16:52:23 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @chronos.vitaqua "<@380360389377916939> why not build": Looks good, but seems the colors are in float format↵And Tilengine uses RGBA with 8 bits values |
16:54:10 | FromDiscord | <Robyn [She/Her]> In reply to @sys64 "Looks good, but seems": There's a ColorRGBA type |
16:58:49 | * | fallback quit (Read error: Connection reset by peer) |
17:11:15 | * | xet7 joined #nim |
17:15:32 | * | xet7 quit (Remote host closed the connection) |
17:19:04 | * | fallback joined #nim |
17:29:28 | FromDiscord | <Phil> Okay, remaining problems for me are pretty much "How do I make sure that chronos empties its asyncdispatcher queue before I gracefully shut down a given thread" and "How to I deal with async exceptions" |
17:29:56 | FromDiscord | <Phil> Finger's crossed I'll get a response on the exception thing |
17:31:27 | FromDiscord | <ieltan> In reply to @isofruit "Okay, remaining problems for": for checking if the queue is empty, maybe `pendingFuturesCount()`? |
17:33:31 | FromDiscord | <ieltan> In reply to @isofruit "Finger's crossed I'll get": have you checked https://status-im.github.io/nim-chronos/error_handling.html ? |
17:34:25 | FromDiscord | <Phil> I have. However, looking through it I do not see a solid matter to "globally" catch exceptions raised by parts of the code executed on the dispatcher |
17:34:37 | FromDiscord | <Phil> (edit) "matter" => "way" |
17:34:45 | * | kotrcka quit (Remote host closed the connection) |
17:35:21 | FromDiscord | <Phil> The idea is that somebody may be raising an exception in an async proc. I want to allow them to do that. If that happens, well your message is not getting fully processed, I log the exception and that's that.↵I do not want to nuke the entire thread that this exception occurred on |
17:35:45 | FromDiscord | <Phil> Chronos appears to not have anything for that case I think, but I'll have to see. |
17:37:24 | FromDiscord | <Phil> In reply to @ieltan "for checking if the": Only available with `-d:chronosFutureTracking`, which appears to be for debugging mainly |
17:40:13 | * | beholders_eye quit (Ping timeout: 255 seconds) |
17:44:39 | * | coldfeet joined #nim |
17:50:21 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @chronos.vitaqua "There's a ColorRGBA type": The engine encodes colors in ABGR format |
17:52:34 | * | coldfeet quit (Remote host closed the connection) |
17:57:30 | FromDiscord | <Robyn [She/Her]> Can always make a distinct `ColorABGR` and then just borrow most of the procedures and reimplement the ones used to output the format |
18:00:30 | * | def- quit (Quit: -) |
18:00:34 | FromDiscord | <kreatoo> is there a way to get a variable by the variable name? |
18:00:48 | * | def- joined #nim |
18:03:25 | NimEventer | New thread by lou15b: Latest GCC version (14.1) breaks Nim's C backend, see https://forum.nim-lang.org/t/11587 |
18:08:59 | * | fallback quit (Read error: Connection reset by peer) |
18:14:05 | * | beholders_eye joined #nim |
18:16:12 | * | fallback joined #nim |
18:24:58 | FromDiscord | <nocturn9x> uhm |
18:25:06 | FromDiscord | <nocturn9x> I'm almost certainly doing something wrong but |
18:25:17 | FromDiscord | <nocturn9x> `dealloc(ptr)` doesn't seem to actually release the memory |
18:25:19 | FromDiscord | <nocturn9x> like, ever |
18:26:44 | FromDiscord | <nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=KquDRhVG |
18:26:55 | FromDiscord | <nocturn9x> (edit) "https://play.nim-lang.org/#pasty=WJoOYICi" => "https://play.nim-lang.org/#pasty=HiiKJxpz" |
18:27:52 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @chronos.vitaqua "Can always make a": Oh alright |
18:28:10 | FromDiscord | <Robyn [She/Her]> Yeah aha |
18:30:10 | FromDiscord | <nocturn9x> In reply to @nocturn9x "Code that does the": I tried calling the allocation code several times and have it allocate a 1GB table |
18:30:19 | FromDiscord | <nocturn9x> and it just keeps eating up more memory which is never released |
18:30:22 | FromDiscord | <nocturn9x> what is going on here? |
18:33:54 | FromDiscord | <nocturn9x> if I do `doAssert session.transpositionTable.isNil()` right after the dealloc, the assertion fails |
18:34:02 | FromDiscord | <nocturn9x> so do I just not get to free my memory? lol |
18:36:05 | FromDiscord | <Robyn [She/Her]> Doesn't Nim hold on to memory and not free it to the OS? |
18:36:17 | FromDiscord | <nocturn9x> _what_ |
18:36:26 | FromDiscord | <nocturn9x> it caused a memory leak of 40 gigabytes |
18:36:32 | FromDiscord | <nocturn9x> I don't think that's a feature |
18:36:53 | FromDiscord | <nocturn9x> also I'm using `-d:useMalloc` |
18:37:04 | FromDiscord | <Robyn [She/Her]> Ah |
18:37:14 | FromDiscord | <nocturn9x> and while the allocator almost certainly doesn't return memory to the OS right away, it should definitely not pile up 40+ gigabytes of garbage |
18:37:20 | FromDiscord | <Robyn [She/Her]> Are you using arc? See if orc fixes the problem |
18:37:28 | FromDiscord | <polylokh_39446> Robyn's talking about general knowledge of allocation, not something specific to Nim. There's a naive view that free() instantly releases memory to the OS. |
18:37:28 | FromDiscord | <nocturn9x> I'm using ARC, yes |
18:37:43 | FromDiscord | <nocturn9x> In reply to @polylokh_39446 "Robyn's talking about general": oh I know `free()` isn't instantaneous |
18:37:50 | FromDiscord | <Robyn [She/Her]> In reply to @polylokh_39446 "Robyn's talking about general": Ah, sorry then |
18:38:02 | FromDiscord | <nocturn9x> but if I do `alloc(1GB); free(1GB); alloc(1GB);` I should still only have 1GB in use |
18:38:05 | FromDiscord | <Robyn [She/Her]> I'm not knowledgeable on how allocators work at all so I'm just guessing |
18:38:06 | FromDiscord | <nocturn9x> here I have 2 |
18:38:37 | FromDiscord | <polylokh_39446> `session.transpositionTable.isNil()` is a bad test here because dealloc doesn't change the pointer that you have. |
18:38:49 | FromDiscord | <nocturn9x> gotcha |
18:39:19 | FromDiscord | <nocturn9x> ORC does not fix the problem |
18:39:24 | FromDiscord | <nocturn9x> I expected it, there's no cycles |
18:39:28 | FromDiscord | <nocturn9x> because there's no `ref`s |
18:39:31 | FromDiscord | <nocturn9x> but still, was worth a shot |
18:39:49 | FromDiscord | <nocturn9x> so how do I deallocate stuff? |
18:41:04 | FromDiscord | <polylokh_39446> a way that you might not only have 1GB in use after `alloc(1GB); free(1GB); alloc(1GB);` is if there are smaller allocations after the free. |
18:41:29 | FromDiscord | <nocturn9x> okay but here I'm talking about `dealloc()` doing actually nothing until OOM killer steps in |
18:41:36 | FromDiscord | <nocturn9x> it's the reason why I noticed in the first place |
18:41:41 | FromDiscord | <nocturn9x> you know, 40+ gigs of leaks |
18:41:53 | FromDiscord | <nocturn9x> (edit) "it's the reason why I noticed ... in" added "it" |
18:42:06 | FromDiscord | <polylokh_39446> in the scenario I just described, dealloc() still does something. It does something internal to the allocaator. |
18:42:12 | FromDiscord | <nocturn9x> I understand the allocator's free list might not be continuous |
18:42:18 | FromDiscord | <nocturn9x> but it's not an excuse for leaking 30 gigs |
18:42:33 | FromDiscord | <nocturn9x> malloc almost certainly doesn't do that |
18:42:40 | FromDiscord | <nocturn9x> I'm using mimalloc, for context |
18:42:47 | FromDiscord | <polylokh_39446> the allocator can't move your memory around to make all the free spaces large enough for the new allocation that never fits due to smaller allocations after the last free(). |
18:42:59 | FromDiscord | <nocturn9x> okay so it just leaks??? |
18:43:22 | FromDiscord | <nocturn9x> like do you see how that is a problem |
18:43:35 | FromDiscord | <polylokh_39446> that's malloc()'s interface. It doesn't control lifetimes or your pointers at all. You'd need a compacting GC |
18:43:48 | FromDiscord | <nocturn9x> that's not my point |
18:43:55 | FromDiscord | <nocturn9x> a memory allocator _should not leak_ |
18:44:04 | FromDiscord | <nocturn9x> allocation calls might take more times as it compacts the free list |
18:44:19 | FromDiscord | <nocturn9x> but "there is not enough free space" is not an excuse when it can just request more memory and then compact |
18:44:26 | FromDiscord | <nocturn9x> (edit) "times" => "time" |
18:44:33 | FromDiscord | <polylokh_39446> literally any malloc() implementation will leak in the scenario I described. There's no room for the 1GB allocation, it has to ask the OS for more information. |
18:44:40 | FromDiscord | <polylokh_39446> it can't compact |
18:44:48 | FromDiscord | <nocturn9x> and then it just won't release the free space in between? |
18:44:56 | * | krux02 joined #nim |
18:45:01 | FromDiscord | <nocturn9x> well that's colossally idiotic |
18:45:17 | FromDiscord | <polylokh_39446> if you have smaller allocations keeping the allocator's internal segments alive, it just has to keep them allocated. malloc() doesn't manage your memory, it's not a GC |
18:45:29 | FromDiscord | <Robyn [She/Her]> Won't more smaller allocations end up taking up the empty 1 GB space? |
18:45:33 | FromDiscord | <nocturn9x> In reply to @polylokh_39446 "it *can't* compact": wdym it can't? It has all the necessary metadata to do so and afaik there are allocators that do that |
18:46:10 | FromDiscord | <polylokh_39446> yeah smaller allocations can go in the mostly empty spaces. |
18:46:34 | FromDiscord | <nocturn9x> is there a way to force the allocator to just give the memory back to the OS |
18:46:48 | FromDiscord | <polylokh_39446> malloc can't control your pointers to change them after it moves memory, so it can't move memory. |
18:46:54 | FromDiscord | <Elegantbeef> Write your own allocator\ |
18:46:58 | FromDiscord | <nocturn9x> also, the actual thing that's taking space |
18:47:01 | FromDiscord | <nocturn9x> is a nim `seq` |
18:47:06 | FromDiscord | <Elegantbeef> Though when a page is empty it should be returned |
18:47:12 | FromDiscord | <nocturn9x> that's the container that's 1GB in size |
18:47:29 | FromDiscord | <nocturn9x> and `clear()` does `setLen(0)` |
18:47:34 | FromDiscord | <nocturn9x> does that not release the memory? |
18:47:43 | FromDiscord | <Elegantbeef> No |
18:47:46 | FromDiscord | <Elegantbeef> Nim explicitly does that enable memory reuse |
18:47:56 | FromDiscord | <Elegantbeef> `= @[]` will return memory |
18:48:00 | FromDiscord | <nocturn9x> well okay then I just need to assign an empty seq |
18:48:01 | FromDiscord | <nocturn9x> yeah |
18:48:09 | FromDiscord | <nocturn9x> easy enough fix |
19:01:05 | FromDiscord | <nocturn9x> well it's always good to know that the issue is you being stupid at least |
19:01:10 | FromDiscord | <nocturn9x> this time it was all my fault :P |
19:02:38 | FromDiscord | <xkonti> What are the rules for closing channels? "Nim by example" skips it completely:( |
19:02:52 | FromDiscord | <nocturn9x> ah, channels |
19:02:57 | FromDiscord | <nocturn9x> another of nim's wild beasts |
19:03:07 | FromDiscord | <nocturn9x> look at them funny and they'll blow up in your face, violently |
19:03:13 | FromDiscord | <nocturn9x> (edit) "another ... of" added "one" |
19:03:27 | FromDiscord | <Phil> In reply to @kreatoo "is there a way": You'd need to specify more what you mean. Generally if this is metaprogramming related the naswer is most of the time macro or sometimes template |
19:03:53 | FromDiscord | <nocturn9x> In reply to @kreatoo "is there a way": you mean like in Python you can do `globals()["foo"]`? |
19:04:04 | FromDiscord | <nocturn9x> I think in nim it's achievable with macros |
19:04:09 | FromDiscord | <polylokh_39446> <https://nim-lang.org/docs/system.html#example-passing-channels-safely> talks about `Channel[T]` if that's the one you mean. |
19:05:45 | FromDiscord | <Phil> Wait, are we on a crusade against malloc now? I skimmed over the convo |
19:05:56 | * | fallback quit (Read error: Connection reset by peer) |
19:06:02 | FromDiscord | <Phil> In reply to @nocturn9x "look at them funny": TBF channels never blew up on me |
19:06:11 | FromDiscord | <Phil> allocation related to moving memory absolutely did.↵But that's arc |
19:06:14 | FromDiscord | <Phil> (edit) "arc" => "arc/orc" |
19:06:27 | FromDiscord | <nocturn9x> you would expect a thing meant for thread communication to be safe from race conditions |
19:06:34 | FromDiscord | <nocturn9x> channels definitely _claim_ to be race-condition-free |
19:06:36 | FromDiscord | <Robyn [She/Her]> In reply to @nocturn9x "I think in nim": Only with static strings though, I believe |
19:06:37 | FromDiscord | <polylokh_39446> no, there was a side discussion about malloc. |
19:06:38 | FromDiscord | <nocturn9x> keyword claim |
19:06:44 | FromDiscord | <nocturn9x> In reply to @chronos.vitaqua "Only with static strings": yeah probably |
19:06:56 | FromDiscord | <Phil> In reply to @nocturn9x "channels definitely _claim_ to": Oh they are, (The threading ones, didn't test system.Channels but I assume they're similar) |
19:07:07 | FromDiscord | <nocturn9x> they are not afaik |
19:07:09 | FromDiscord | <Phil> But that doesn't automagically take care of the MM related issues |
19:07:15 | FromDiscord | <nocturn9x> TSAN doesn't like em |
19:07:20 | FromDiscord | <nocturn9x> we talked about this iirc |
19:07:21 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=bzclfOnN |
19:07:37 | FromDiscord | <Phil> Yeh, but I distinguish there: The channel code can't do too much here |
19:07:46 | FromDiscord | <nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=ZTDdBYRv |
19:07:50 | FromDiscord | <Phil> This is a MM problem in my eyes |
19:07:58 | FromDiscord | <Robyn [She/Her]> If they're all the same type, you should use a `Table` from `std/tables` though |
19:08:03 | FromDiscord | <nocturn9x> In reply to @chronos.vitaqua "If they're all the": this |
19:08:12 | FromDiscord | <Phil> Though I'm only medium knowledgeable in the field so take that with a grain of salt |
19:08:16 | FromDiscord | <nocturn9x> or if you will know the type at some point |
19:08:20 | FromDiscord | <nocturn9x> `cast` it |
19:08:22 | FromDiscord | <nocturn9x> (edit) "it" => "them" |
19:08:24 | FromDiscord | <Robyn [She/Her]> In reply to @nocturn9x "I have never actually": Macros are pretty easy, just a slight learning curve |
19:08:26 | FromDiscord | <nocturn9x> and store `pointer`s |
19:08:39 | FromDiscord | <Robyn [She/Her]> Yeah, this, but still would advise against doing this in general since unsafe |
19:08:39 | FromDiscord | <Phil> In reply to @nocturn9x "or if you will": Fun fact, I wrote a fairly decent Table-abstraction that allows storing pointers of vastly different types |
19:08:44 | FromDiscord | <Phil> By their types |
19:08:46 | FromDiscord | <nocturn9x> In reply to @chronos.vitaqua "Yeah, this, but still": yeah |
19:09:00 | FromDiscord | <nocturn9x> In reply to @isofruit "Fun fact, I wrote": oh? |
19:09:02 | FromDiscord | <nocturn9x> how? |
19:09:12 | FromDiscord | <Robyn [She/Her]> In reply to @isofruit "By their types": That's pretty easy though, no? |
19:09:12 | FromDiscord | <Phil> It's not even that complicated, one sec |
19:09:28 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=LnrUZEwl |
19:09:37 | FromDiscord | <Phil> In reply to @chronos.vitaqua "That's pretty easy though,": Yeh |
19:09:55 | FromDiscord | <nocturn9x> uh |
19:10:00 | FromDiscord | <nocturn9x> what does the borrow pragma do |
19:10:05 | FromDiscord | <nocturn9x> steal the impl of the type? |
19:10:10 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=qHmFEEOa |
19:10:10 | FromDiscord | <nocturn9x> shit I could've used that |
19:10:16 | FromDiscord | <Robyn [She/Her]> In reply to @nocturn9x "steal the impl of": Yep |
19:10:46 | FromDiscord | <nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=QLwwhKnd |
19:10:50 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=MxmQBqQU |
19:11:03 | FromDiscord | <Robyn [She/Her]> Fair |
19:11:05 | FromDiscord | <nocturn9x> that would've been useful to know |
19:11:09 | FromDiscord | <nocturn9x> upsie |
19:11:11 | FromDiscord | <Robyn [She/Her]> I used similar code for my event system |
19:11:19 | FromDiscord | <Phil> And it's kinda nice to be able to go `table[int]` and get a `MyType[int]` out |
19:11:23 | FromDiscord | <Robyn [She/Her]> https://github.com/Nimberite-Development/Pulse-Nim |
19:11:29 | FromDiscord | <Robyn [She/Her]> Specifically for listeners of objects though |
19:11:41 | FromDiscord | <nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=KkiMNdhB |
19:11:55 | FromDiscord | <nocturn9x> for local variables at least |
19:11:59 | FromDiscord | <Phil> In reply to @nocturn9x "is the global pragma": Dunno C enough. In this case per type invocation you're basically instantiating a new global variable |
19:12:15 | FromDiscord | <Phil> Since those new global variables all have different pointers, you get one specific type of pointer per type |
19:12:16 | FromDiscord | <nocturn9x> that's what `static` does for locals in C but I think it's not type specific |
19:12:22 | FromDiscord | <odexine> In reply to @nocturn9x "is the global pragma": p much |
19:12:33 | FromDiscord | <nocturn9x> neat |
19:13:00 | FromDiscord | <Phil> It's kind of a hack to get something unique per type since getting a unique identifier from a type is kinda difficult |
19:13:01 | FromDiscord | <polylokh_39446> what makes it type specific is that the global variable's defined in a generic function |
19:13:14 | FromDiscord | <nocturn9x> sent a code paste, see https://play.nim-lang.org/#pasty=diUSGPNH |
19:13:24 | FromDiscord | <Robyn [She/Her]> In reply to @isofruit "It's kind of a": `getTypeImpl` in stdlib? |
19:13:37 | FromDiscord | <nocturn9x> In reply to @polylokh_39446 "what makes it type": ah so the generic is instantiated only once so there's only one per type |
19:13:40 | FromDiscord | <Phil> Yes, ptr = pointer.↵It's just smarter to use `ptr someType` so you know more about what's behind the pointer |
19:13:42 | FromDiscord | <nocturn9x> (edit) "In reply to @polylokh_39446 "what makes it type": ah so the generic is instantiated only once ... so" added "per type" |
19:13:47 | FromDiscord | <nocturn9x> this would never work in my compiler |
19:14:03 | FromDiscord | <nocturn9x> since generics are parametrically polymorphic and typechecked and (currently) compiled once |
19:14:11 | FromDiscord | <Robyn [She/Her]> `getTypeInfo` |
19:14:14 | FromDiscord | <nocturn9x> I could definitely have the code generator specialize for different implementations though |
19:14:25 | FromDiscord | <Robyn [She/Her]> https://github.com/Nimberite-Development/Pulse-Nim/blob/main/src/pulse.nim#L62 |
19:14:44 | FromDiscord | <nocturn9x> In reply to @isofruit "Yes, ptr = pointer.": I always thought `pointer` was the only way of getting the C equivalent of `void` |
19:14:45 | FromDiscord | <Phil> In reply to @chronos.vitaqua "`getTypeImpl` in stdlib?": I no longer recall what the potential problem there was or not. I tried half a dozen things before beef suggested the global, that worked and is goot enough for my purposes. |
19:14:48 | FromDiscord | <nocturn9x> `ptr` is way nicer |
19:14:56 | FromDiscord | <nocturn9x> I vividly remember that not being allowed syntactically in the past |
19:15:00 | FromDiscord | <nocturn9x> did that change |
19:15:02 | * | fallback joined #nim |
19:15:14 | FromDiscord | <Phil> I've only been part of this community for... 2.5 years or so |
19:15:19 | FromDiscord | <Phil> Has been allowed ever since I've joined |
19:15:25 | FromDiscord | <Robyn [She/Her]> In reply to @nocturn9x "`ptr` is way nicer": `ptr` is a generic, iirc |
19:15:27 | FromDiscord | <Robyn [She/Her]> Is it not? |
19:15:31 | FromDiscord | <nocturn9x> I've been using Nim for... idk, 3-4 years? |
19:15:42 | FromDiscord | <polylokh_39446> `ptr` isn't a valid type on its own. |
19:15:47 | FromDiscord | <Robyn [She/Her]> Yeah thought so |
19:16:06 | FromDiscord | <odexine> `ptr` is not concrete |
19:16:11 | FromDiscord | <Phil> I will be honest, if it isn't that didn't occur to me so far as the implicit generics it created did the job for me every time |
19:16:55 | FromDiscord | <polylokh_39446> sent a code paste, see https://play.nim-lang.org/#pasty=rLypEugC |
19:17:15 | FromDiscord | <polylokh_39446> (edit) "https://play.nim-lang.org/#pasty=aAtFauwj" => "https://play.nim-lang.org/#pasty=tRKwZBmj" |
19:17:24 | FromDiscord | <Robyn [She/Her]> !eval var x: ptr |
19:17:26 | NimBot | Compile failed: /usercode/in.nim(1, 5) Error: invalid type: 'ptr' for var |
19:17:39 | FromDiscord | <Phil> So far it looked to me like ptr was just the short form of pointer with the added benefit you could specify `ptr T` |
19:17:55 | FromDiscord | <Robyn [She/Her]> !eval var x: pointer |
19:17:58 | NimBot | <no output> |
19:17:59 | FromDiscord | <Robyn [She/Her]> !eval var x: ptr void |
19:17:59 | FromDiscord | <polylokh_39446> it's a required benefit, though |
19:18:01 | NimBot | Compile failed: /usercode/in.nim(1, 8) Error: type 'ptr void' is not allowed |
19:18:21 | FromDiscord | <Robyn [She/Her]> Would've been nice to make `ptr void` valid though |
19:18:34 | FromDiscord | <Phil> ~~Anyway, I need chronos experts~~ |
19:18:51 | FromDiscord | <Robyn [She/Her]> ~~Why do you need an expert on me tho?~~ |
19:19:34 | FromDiscord | <Phil> ~~Because somebody squeezed you into a lib and I'm using that lib to make you do async work and I need the magic works to make you do your job correctly~~ |
19:19:52 | FromDiscord | <Robyn [She/Her]> It's called drugs :3 |
19:19:59 | FromDiscord | <odexine> In reply to @isofruit "So far it looked": `ptr` is a type class, like saying `ref` |
19:20:12 | FromDiscord | <Phil> Yeh, I gathered from the other posts so far 😄 |
19:20:16 | FromDiscord | <odexine> basically it's an implicit generic |
19:20:47 | FromDiscord | <odexine> In reply to @chronos.vitaqua "Would've been nice to": id say no, it's not obvious to a non-c user |
19:21:01 | FromDiscord | <odexine> then again in a sense pointer isnt but id say its better in some sense |
19:21:02 | FromDiscord | <Robyn [She/Her]> !eval var (x, y): (ptr typeof(nil), ptr nil) |
19:21:04 | NimBot | Compile failed: /usercode/in.nim(1, 12) Error: expected: '=', but got: ':' |
19:21:20 | FromDiscord | <Robyn [She/Her]> Oh |
19:21:26 | FromDiscord | <Robyn [She/Her]> !eval var x: ptr nil |
19:21:28 | NimBot | Compile failed: /usercode/in.nim(1, 12) Error: expected type, but got: nil |
19:21:31 | FromDiscord | <Robyn [She/Her]> !eval var x: ptr typeof(nil) |
19:21:33 | NimBot | Compile failed: /usercode/in.nim(1, 5) Error: invalid type: 'typeof(nil)' in this context: 'ptr typeof(nil)' for var |
19:21:40 | FromDiscord | <Robyn [She/Her]> Damn |
19:21:44 | FromDiscord | <Robyn [She/Her]> Oh well |
19:22:22 | FromDiscord | <Elegantbeef> Phil really out here misleading people |
19:22:38 | FromDiscord | <odexine> no better than you |
19:23:13 | FromDiscord | <Robyn [She/Her]> Lol Einstein's book |
19:25:13 | FromDiscord | <michaelb.eth> `object` can also be used as an implicit generic, right? |
19:25:21 | * | coldfeet joined #nim |
19:25:32 | FromDiscord | <michaelb.eth> or maybe I've misunderstood when I've seen that in the past |
19:25:35 | FromDiscord | <Elegantbeef> Yes most types can be |
19:25:52 | FromDiscord | <Elegantbeef> `distinct | tuple | enum | object | ref | ptr` is a valid typeclass |
19:26:06 | FromDiscord | <Elegantbeef> Whoops left out `set` and `range` but range is brokey |
19:27:36 | FromDiscord | <michaelb.eth> huh, bare `distinct` is kind of a weird one |
19:28:27 | FromDiscord | <Elegantbeef> Not really |
19:28:48 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=NFWzzvyl |
19:37:09 | FromDiscord | <kreatoo> sent a code paste, see https://play.nim-lang.org/#pasty=oeXyXpWF |
19:40:26 | FromDiscord | <Elegantbeef> Nope `bindsym` is wrong |
19:40:48 | FromDiscord | <Elegantbeef> Should be `(a: static string): untyped = ident(a)` |
19:44:12 | FromDiscord | <tsoj> How do I embed binary data into an executable? Using `staticRead` I run into this: `fatal error: translation unit is too large for Clang to process: ran out of source locations` (the data I want to embed is ~800 MB large). |
19:51:11 | * | beholders_eye quit (Ping timeout: 252 seconds) |
19:54:48 | FromDiscord | <Robyn [She/Her]> !eval type↵ A = distinct distinct string↵↵var b: A |
19:54:50 | NimBot | Compile failed: /usercode/in.nim(1, 23) Error: invalid indentation |
19:55:08 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=hPwzqiBc |
19:56:11 | FromDiscord | <Robyn [She/Her]> In reply to @tsoj "How do I embed": What if you break it up into chunks of data? |
20:03:32 | FromDiscord | <Elegantbeef> Or compress it using supersnappy |
20:20:08 | FromDiscord | <eightbit_dboy> sent a code paste, see https://play.nim-lang.org/#pasty=nsClcGgL |
20:21:03 | FromDiscord | <Elegantbeef> You're providing too many parameters |
20:22:33 | FromDiscord | <eightbit_dboy> Weird, that's how the skeleton this is based off of came. |
20:22:46 | FromDiscord | <eightbit_dboy> Here's the OG skeleton. https://media.discordapp.net/attachments/371759389889003532/1238949442175111228/sdl_skeleton.nim?ex=66412515&is=663fd395&hm=70bdb9122edb06b4153d3307c12a5b286f6f692118b9654a5c086a8677645b21& |
20:22:49 | FromDiscord | <eightbit_dboy> And it's worked before. |
20:22:50 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#pasty=PItUjEKI |
20:23:17 | FromDiscord | <System64 ~ Flandre Scarlet> (edit) "https://play.nim-lang.org/#pasty=EQzqJRwx" => "https://play.nim-lang.org/#pasty=HwgfRyVH" |
20:23:43 | FromDiscord | <eightbit_dboy> Yeah, it's the official sdl2 skeleton program from here: https://github.com/nim-lang/sdl2/blob/master/examples/sdl_skeleton.nim |
20:23:52 | FromDiscord | <eightbit_dboy> It also uses 3 arguments. |
20:28:20 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Or compress it using": Supersnapply? |
20:28:24 | FromDiscord | <Robyn [She/Her]> (edit) "Supersnapply?" => "Supersnappy?" |
20:28:34 | FromDiscord | <eightbit_dboy> Oh, the skeleton uses `createRenderer` |
20:30:06 | FromDiscord | <Robyn [She/Her]> Snappy is pretty nice, damn |
20:33:34 | * | coldfeet quit (Remote host closed the connection) |
20:34:36 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @chronos.vitaqua "Supersnappy?": This thing is very very good |
20:42:08 | * | SchweinDeBurg quit (Remote host closed the connection) |
20:46:17 | FromDiscord | <Robyn [She/Her]> I wonder how good it is for network compression |
20:47:40 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @chronos.vitaqua "I wonder how good": It is good! |
20:47:52 | FromDiscord | <System64 ~ Flandre Scarlet> Btw↵Is it normal I can't do this? https://media.discordapp.net/attachments/371759389889003532/1238955761573429382/image.png?ex=66412af8&is=663fd978&hm=31fed6360360a686bec3c51503abf1c4bcb597474eb69917c845b330b71f5bad& |
20:54:41 | * | ntat quit (Quit: Leaving) |
20:56:09 | FromDiscord | <Elegantbeef> Yes cause an openarray is not nullable |
20:56:11 | FromDiscord | <Elegantbeef> `table.len == 0` |
20:58:47 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "`table.len == 0`": Oh, thanks! |
20:59:24 | FromDiscord | <System64 ~ Flandre Scarlet> and is a normal array nullable? What about a seq? |
20:59:45 | FromDiscord | <Elegantbeef> Nope |
21:00:01 | FromDiscord | <Elegantbeef> Only `ref` `ptr` and `pointer` are nilable |
21:00:24 | FromDiscord | <System64 ~ Flandre Scarlet> Oh alright! |
21:03:34 | * | SchweinDeBurg joined #nim |
21:10:45 | FromDiscord | <demotomohiro> In reply to @michaelb.eth "`object` can also be": Here is a list of type classes: https://nim-lang.org/docs/manual.html#generics-type-classes |
21:11:46 | FromDiscord | <Robyn [She/Her]> The supersnappy impl seems like it could be made to work on the JS backend easily just by reusing the same code on the VM |
21:12:11 | FromDiscord | <Elegantbeef> Worth noting in Nim 2.0 you can even do `proc{.nimcall.}` for a typeclass of only nimcall procs 😄 |
21:12:23 | FromDiscord | <Elegantbeef> I'm sure guzba would welcom PRs |
21:12:44 | FromDiscord | <Robyn [She/Her]> Hm, might do that then |
21:13:44 | FromDiscord | <Robyn [She/Her]> Is there a way to do `when nimvm and defined(js): ... else: ...` |
21:13:55 | FromDiscord | <Robyn [She/Her]> Iirc `nimvm` is special so can't use it like that normally |
21:14:02 | FromDiscord | <Elegantbeef> Yep |
21:14:19 | FromDiscord | <Robyn [She/Her]> (edit) "and" => "or" |
21:14:23 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=hksrvFJN |
21:14:45 | FromDiscord | <Robyn [She/Her]> Any way to put that into a clean template? Assuming it's a no |
21:15:05 | FromDiscord | <Robyn [She/Her]> I really don't get why that was disallowed tbh |
21:15:19 | FromDiscord | <Elegantbeef> Cause `nimvm` needs to be compiled as does the `else` |
21:15:23 | FromDiscord | <Elegantbeef> Both branches need to exist |
21:15:45 | FromDiscord | <Robyn [She/Her]> Which typically when statements don't do? |
21:15:54 | FromDiscord | <Robyn [She/Her]> (edit) "when" => "`when`" |
21:16:04 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=zJixKSyX |
21:16:17 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=LvFsEVZv |
21:17:34 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=cBBKUGwm |
21:17:47 | FromDiscord | <Elegantbeef> Sure |
21:17:52 | FromDiscord | <Robyn [She/Her]> Looks a bit ugly and probably would be disallowed by Guzba though :P |
21:18:10 | FromDiscord | <Robyn [She/Her]> Oh well, no reason not to duplicate the code either way |
21:18:38 | FromDiscord | <Elegantbeef> > Which typically when statements don't do?↵Of course not |
21:19:16 | FromDiscord | <Robyn [She/Her]> Wait why not `when native: ... else: ...` with `native` being `defined(c) or defined(objc) or defined(cpp)`? |
21:19:34 | FromDiscord | <Robyn [She/Her]> Would `else` work in the VM and JS backend? |
21:19:47 | FromDiscord | <Elegantbeef> No cause `nimvm` is special |
21:19:58 | FromDiscord | <Elegantbeef> You need both branches semmed |
21:20:02 | FromDiscord | <Robyn [She/Her]> Unfortunate, oh well |
21:32:39 | * | krux02_ joined #nim |
21:35:35 | * | krux02 quit (Ping timeout: 272 seconds) |
21:39:07 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#pasty=cKWeFCmD |
21:39:18 | FromDiscord | <Elegantbeef> Using defer... shame |
21:39:36 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "Using defer... shame": What's the problem with defer? |
21:39:48 | FromDiscord | <Elegantbeef> It's just fugly destructors |
21:40:29 | FromDiscord | <System64 ~ Flandre Scarlet> It's easy for cleanup↵Anyways if I want really good code I have to make a game context |
21:40:51 | FromDiscord | <System64 ~ Flandre Scarlet> (edit) "easy" => "good" |
21:43:24 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=VDKXwANT |
21:43:45 | FromDiscord | <Elegantbeef> Yep template working as expected 😄 |
21:43:54 | * | Guest60 joined #nim |
21:44:02 | FromDiscord | <Robyn [She/Her]> How do I avoid that issue then? |
21:44:02 | FromDiscord | <Elegantbeef> also that `do` should be top level |
21:44:10 | FromDiscord | <Elegantbeef> not indented |
21:44:14 | FromDiscord | <Robyn [She/Her]> It is, just code got formatted weirdly when pasted |
21:44:22 | FromDiscord | <Robyn [She/Her]> They're the same level in the actual code |
21:44:32 | FromDiscord | <Robyn [She/Her]> (edit) "https://play.nim-lang.org/#pasty=BfFqDsAd" => "https://play.nim-lang.org/#pasty=WrwxJQnQ" |
21:44:37 | FromDiscord | <Elegantbeef> You need to make new symbols for the `let` |
21:44:39 | FromDiscord | <Robyn [She/Her]> (edit) "https://play.nim-lang.org/#pasty=dcxkenmv" => "https://play.nim-lang.org/#pasty=fUzrYzAZ" |
21:44:45 | FromDiscord | <Elegantbeef> you didn't change this to `typed` parameters did you? |
21:44:51 | FromDiscord | <Robyn [She/Her]> Nope, it's untyped |
21:45:13 | FromDiscord | <Elegantbeef> Yep well both branches get the same code so it sems once then sems again |
21:46:04 | FromDiscord | <Robyn [She/Her]> Ah... So then, how would I fix that? I don't want to have to type the code twice so... |
21:46:57 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#pasty=KIVBTHXN |
21:47:05 | FromDiscord | <Elegantbeef> Use a macro that replaces all declarations with a new ident |
21:47:08 | FromDiscord | <Elegantbeef> Or instead of a template try using a macro that does \`copyNimTree |
21:48:13 | FromDiscord | <Elegantbeef> Is it normal who knows we don't know your data types |
21:49:30 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "Is it normal who": Layer is just a distinct int32, and GVec2 is a type from Treeform's vmath library |
21:50:27 | FromDiscord | <Elegantbeef> and `setPosition` does? |
21:51:12 | FromDiscord | <System64 ~ Flandre Scarlet> setPosition uses a layer, and ints |
21:51:33 | FromDiscord | <System64 ~ Flandre Scarlet> Wait, what's Natural here? |
21:51:46 | FromDiscord | <System64 ~ Flandre Scarlet> any number including floats? |
21:52:12 | FromDiscord | <Robyn [She/Her]> In reply to @Elegantbeef "Use a macro that": Ugh... :| |
21:52:24 | FromDiscord | <polylokh_39446> In reply to @sys64 "Wait, what's Natural here?": probably <https://nim-lang.org/docs/system.html#Natural> |
21:52:49 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @polylokh_39446 "probably <https://nim-lang.org/docs/system.html#Nat": Oh, it's an Int |
21:53:08 | FromDiscord | <Robyn [She/Her]> I'll just copy and paste |
21:53:10 | FromDiscord | <System64 ~ Flandre Scarlet> I wonder if there is "SomeNumber" of something |
21:53:25 | FromDiscord | <System64 ~ Flandre Scarlet> Oh yeah it does |
21:54:11 | FromDiscord | <Elegantbeef> You probably didn't export the `position=` from an intermediate module |
21:54:35 | FromDiscord | <Elegantbeef> Plus you're showing a tooling error and not a compiler error |
21:55:12 | FromDiscord | <Robyn [She/Her]> That's still an issue when they share a name? Bruh |
21:55:20 | FromDiscord | <Robyn [She/Her]> I'll just edit the variable name for the JS code |
21:55:27 | FromDiscord | <Elegantbeef> What? |
21:56:09 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "You probably didn't export": Fixed |
21:56:47 | FromDiscord | <eightbit_dboy> What am I doing wrong, here? https://media.discordapp.net/attachments/371759389889003532/1238973100197150840/message.txt?ex=66413b1e&is=663fe99e&hm=b647d1bd0bc3bf2fa3cffe0e34ae75b9eb459c202ab69c3cfaf6fe723a9c6194& |
21:57:20 | FromDiscord | <System64 ~ Flandre Scarlet> Is using SomeNumber instead of a predefined type slower? |
21:58:05 | FromDiscord | <Elegantbeef> No it's a generic typeclass |
21:58:13 | FromDiscord | <System64 ~ Flandre Scarlet> Oh alright, nice |
22:00:32 | * | Guest60 quit (Quit: Client closed) |
22:06:57 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=vjkCytLA |
22:07:13 | FromDiscord | <Robyn [She/Her]> I am compiling with `-d:nodejs` if that even does anything |
22:07:36 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=znBoBWpY |
22:09:30 | FromDiscord | <Robyn [She/Her]> This is with NodeJS 21 |
22:10:36 | FromDiscord | <Robyn [She/Her]> Anyone able to test this with an older NodeJS version? |
22:22:04 | * | fallback quit (Quit: IRCNow and Forever!) |
22:49:39 | * | lucasta joined #nim |
22:49:41 | * | fallback joined #nim |
22:54:39 | FromDiscord | <sirius_3x> Hey can someone tell me where I can find the arm_neon.h file that is used for the SIMD instructions in Nim (this library: https://github.com/guzba/nimsimd/tree/master/src/nimsimd) , lol. |
22:59:55 | FromDiscord | <demotomohiro> In reply to @sirius_3x "Hey can someone tell": Isn't it shipped with your C compiler? |
23:01:40 | FromDiscord | <sirius_3x> In reply to @demotomohiro "Isn't it shipped with": Oh lmao, thanks, shouldve thought of that haha. |
23:07:03 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=JgBLkEsj |
23:09:09 | FromDiscord | <Robyn [She/Her]> You then register AST passes, and then once the file that defines the enum is created, it'll allow for errors in the parsing stage to be returned in an enum (so the `SemanticPass` type will be registered as `PSemanticPass` in the `PassesEnum`) |
23:22:31 | FromDiscord | <eightbit_dboy> sent a code paste, see https://play.nim-lang.org/#pasty=tHLoFoZu |
23:25:51 | FromDiscord | <eightbit_dboy> How do I set up that backend compiler? |
23:25:59 | FromDiscord | <System64 ~ Flandre Scarlet> https://github.com/johnnovak/koi↵Is this thing as featureful as Dear ImGUI? |
23:26:04 | FromDiscord | <eightbit_dboy> (edit) "compiler?" => "compiler for aarch64? I know I have it installed." |
23:27:43 | * | beholders_eye joined #nim |
23:30:07 | FromDiscord | <Robyn [She/Her]> In reply to @eightbit_dboy "I'm trying to cross-compile": Have you tried `--gcc.exe:arm-linux-gnueabihf-gcc` instead of `--arm64.linux.gcc.exe`? Probably won't change anything but just try it anyway, perhaps |
23:30:22 | FromDiscord | <eightbit_dboy> I'll try it |
23:31:48 | FromDiscord | <eightbit_dboy> sent a code paste, see https://play.nim-lang.org/#pasty=Agxnwjmi |
23:32:00 | FromDiscord | <eightbit_dboy> My prior post was only up to the first error. |
23:33:49 | FromDiscord | <Robyn [She/Her]> `gcc.e`? Also how about trying the same thing I told you before with the linker flag? `--gcc.linkerexe:arm-linux-gnuabihf-ld` |
23:34:24 | FromDiscord | <Robyn [She/Her]> The error is certainly odd though... |
23:34:36 | FromDiscord | <eightbit_dboy> ah shit, I backspaced too much, sec. |
23:34:39 | FromDiscord | <Robyn [She/Her]> It should be unrelated but I don't know |
23:35:07 | FromDiscord | <eightbit_dboy> sent a code paste, see https://play.nim-lang.org/#pasty=BvDcvPZW |
23:35:27 | FromDiscord | <eightbit_dboy> Hmm... 🤔 |
23:35:50 | FromDiscord | <eightbit_dboy> In reply to @chronos.vitaqua "`gcc.e`? Also how about": Yeah, I should try the linker one, too |
23:36:06 | FromDiscord | <Robyn [She/Her]> It is really odd, maybe make a bug report if you can't figure it out? This isn't my cup of tea unfortunately |
23:36:17 | FromDiscord | <Robyn [She/Her]> Though, you could try if Zig's crosscompiler would work for you |
23:36:38 | FromDiscord | <eightbit_dboy> sent a code paste, see https://play.nim-lang.org/#pasty=ebejkcdB |
23:36:47 | FromDiscord | <Robyn [She/Her]> Oh it did work, sweet! |
23:37:04 | FromDiscord | <Robyn [She/Her]> Oh wait |
23:37:17 | FromDiscord | <Robyn [She/Her]> Are you sure your GCC and LD installs are 64 bit ARM? |
23:37:32 | FromDiscord | <eightbit_dboy> sent a code paste, see https://play.nim-lang.org/#pasty=dNWgOOsx |
23:37:38 | FromDiscord | <eightbit_dboy> Looks like it. |
23:37:44 | FromDiscord | <Robyn [She/Her]> Hm, yeah it does |
23:37:51 | FromDiscord | <Robyn [She/Her]> Odd then, but at least it's working now :) |
23:37:52 | FromDiscord | <eightbit_dboy> Time to throw it up onto my RG35XX H |
23:38:02 | FromDiscord | <Robyn [She/Her]> Good luck :) |
23:38:26 | FromDiscord | <eightbit_dboy> Thanks! |