00:00:11 | * | albe quit (Quit: The Lounge - https://thelounge.chat) |
00:03:08 | * | albe joined #nim |
00:30:55 | * | SchweinDeBurg joined #nim |
00:33:26 | * | albe3 joined #nim |
00:35:12 | * | albe quit (Ping timeout: 246 seconds) |
00:35:12 | * | albe3 is now known as albe |
00:46:02 | FromDiscord | <kiloneie> In reply to @treeform "I use it nearly": Man i really want to use your libs, but SDL3 is right around the corner... i will for sure give them a try here and there and to learn from them, great job! |
01:36:25 | * | SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev) |
02:05:02 | * | rockcavera quit (Remote host closed the connection) |
02:10:31 | casaca | ello, anyone using ladybird browser on unstable? The program launches but does nothing after entering a url |
02:12:48 | FromDiscord | <usawiniko> (probably something for #offtopic ?) |
02:47:22 | FromDiscord | <.bobbbob> does anyone know off the top of their head why a recursive function might seemingly duplicate work after it's done and return the wrong value? im losing my mind here |
02:59:32 | FromDiscord | <Nlits (Ping on reply)> In reply to @.bobbbob "does anyone know off": Context? |
03:04:29 | FromDiscord | <.bobbbob> sent a code paste, see https://play.nim-lang.org/#pasty=SDhsYKmx |
03:06:07 | FromDiscord | <.bobbbob> and yeah, making a copy of a table like that works, ive used it in other places, it's jank yeah I know |
03:07:04 | FromDiscord | <Nlits (Ping on reply)> In reply to @.bobbbob "and yeah, making a": Have you tried using deepCopy or shallowCopy instead of just assigning it? Does it work then? |
03:08:26 | FromDiscord | <.bobbbob> In reply to @nlits "Have you tried using": nope no difference |
03:09:03 | FromDiscord | <.bobbbob> it's not a compiler bug either, ive tried different versions |
03:11:18 | FromDiscord | <Nlits (Ping on reply)> In reply to @.bobbbob "nope no difference": Could you make a minimal reproducible example? For me, sometimes just making one can solve the problem, other times it is just helpful for others |
03:13:54 | FromDiscord | <morgan (ping with reply)> sent a code paste, see https://play.nim-lang.org/#pasty=MSrOeFcA |
03:15:10 | FromDiscord | <Nlits (Ping on reply)> In reply to @morganalyssa "so im trying to": Context or code please |
03:16:04 | FromDiscord | <morgan (ping with reply)> https://github.com/liquidev/aglet |
03:16:19 | FromDiscord | <morgan (ping with reply)> i have made zero changes to the code so far |
03:16:37 | FromDiscord | <.bobbbob> In reply to @nlits "Could you make a": yep you're right, I put the relevent code in a test file and it works there so it's definitly something external messing with it. again it's a func so that shouldn't happen, I'll look through the code and see if I can find the problem |
03:16:47 | FromDiscord | <demotomohiro> In reply to @morganalyssa "so im trying to": Probably defining `=destroy` right after the type section fix it. |
03:16:48 | FromDiscord | <morgan (ping with reply)> that's running the ttriangle test/example |
03:17:50 | FromDiscord | <morgan (ping with reply)> vscode search doesn't find anything searching for =destroy |
03:18:34 | FromDiscord | <morgan (ping with reply)> destroy pops up in one glfw proc |
03:18:53 | FromDiscord | <morgan (ping with reply)> (edit) "destroy" => "`destroy`" |
03:19:01 | FromDiscord | <morgan (ping with reply)> (edit) "=destroy" => "`=destroy`" |
03:19:31 | FromDiscord | <morgan (ping with reply)> github search also finds no `=destroy` |
03:20:28 | FromDiscord | <Elegantbeef> Does it use `new T, finalizer`? |
03:21:39 | FromDiscord | <Elegantbeef> https://github.com/liquidev/aglet/blob/5c3312982359f53d3ba8aaf05b9a927333289d71/src/aglet/mesh.nim#L320 yep it uses finalizers |
03:22:01 | FromDiscord | <morgan (ping with reply)> sent a code paste, see https://play.nim-lang.org/#pasty=PIwRqDYd |
03:29:01 | FromDiscord | <.bobbbob> In reply to @.bobbbob "yep you're right, I": well I knew it was something dumb, I changed the name of another function that calls it and forgot to change the name elsewhere |
03:32:50 | FromDiscord | <morgan (ping with reply)> ok so i think im gonna have to migrate all the finalizers over to destroy hooks manually since it looks like the automatic translation is failing somehow |
03:33:11 | FromDiscord | <morgan (ping with reply)> gotta figure out what the syntax of finalizers was |
03:34:32 | FromDiscord | <Elegantbeef> It's just `new` |
03:37:06 | FromDiscord | <Elegantbeef> The issue is `new` comes after a usage of Mesh |
03:37:51 | FromDiscord | <morgan (ping with reply)> so `new result do (args):` then stuff that goes in the =destroy hook? |
03:38:26 | FromDiscord | <morgan (ping with reply)> set =destroy for result to a proc with whatever lines? |
03:39:12 | FromDiscord | <Elegantbeef> It's just an overload of `new` which takes in a proc |
03:42:26 | FromDiscord | <morgan (ping with reply)> i see |
03:43:47 | FromDiscord | <morgan (ping with reply)> so im guessing there's multiple templates which are each setting the destroy hook that's the issue |
03:43:48 | FromDiscord | <morgan (ping with reply)> hm |
03:50:17 | FromDiscord | <Elegantbeef> Nope it's likely what I said |
03:55:45 | FromDiscord | <morgan (ping with reply)> well it's framebuffers not meshes |
03:56:43 | FromDiscord | <morgan (ping with reply)> but do you mean the buggy behavior of it? |
03:56:57 | FromDiscord | <morgan (ping with reply)> ill try moving them all over to =destroy |
03:58:22 | FromDiscord | <Elegantbeef> `=destroy`s do not work with `ref` |
03:58:37 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=PstuuuBs |
04:09:35 | * | SchweinDeBurg joined #nim |
04:20:00 | * | cnx quit (Ping timeout: 265 seconds) |
04:24:28 | * | cnx joined #nim |
04:44:23 | * | ntat joined #nim |
04:56:22 | FromDiscord | <morgan (ping with reply)> i get the same error for a generic there instead of generic of typeclass https://media.discordapp.net/attachments/371759389889003532/1293074487721590826/image.png?ex=67060cf6&is=6704bb76&hm=7bca0646287e113c48cd57ae4f45b008950097f65bda83ee970e159789bc5bf1& |
04:56:46 | FromDiscord | <Elegantbeef> What type is `RenderBuffer`? |
04:57:10 | FromDiscord | <morgan (ping with reply)> sent a code paste, see https://play.nim-lang.org/#pasty=QGWuHSwm |
04:57:20 | FromDiscord | <Elegantbeef> destructors do not work with refs |
04:57:26 | FromDiscord | <morgan (ping with reply)> oh |
04:58:34 | FromDiscord | <morgan (ping with reply)> then i have no clue the semantics of what i'm trying to replace |
04:59:04 | FromDiscord | <Elegantbeef> Make it an object |
04:59:22 | FromDiscord | <Elegantbeef> Then later on make a `RenderBuffer[T] = ref RenderBufferObj[T]` |
04:59:37 | FromDiscord | <Elegantbeef> Also disable `=copy` and `=dup` for `RenderBufferObj` |
05:00:53 | FromDiscord | <morgan (ping with reply)> i was hoping i wasn't gonna have to redo all this |
05:01:18 | FromDiscord | <morgan (ping with reply)> with all its finalizers and inheritance that i am not familiar with |
05:03:40 | FromDiscord | <morgan (ping with reply)> cos i already have to redo all the windowing code (and change it to you defining callbacks instead of you calling stuff) |
05:04:32 | FromDiscord | <morgan (ping with reply)> also i get an error with it as an object |
05:04:39 | FromDiscord | <morgan (ping with reply)> `cannot bind another '=destroy' to: Renderbuffer; previous declaration was here: `↵at the same line |
05:05:02 | FromDiscord | <Elegantbeef> You need to have the destructor defined before first usage in a procedure |
05:05:05 | FromDiscord | <Elegantbeef> Or forward declare it |
05:06:57 | FromDiscord | <morgan (ping with reply)> well i put it above that proc but i can move it up |
05:08:32 | FromDiscord | <morgan (ping with reply)> what i’m considering doing is kinda copy/paste rewrite, like get a small part of it working and move stuff over bit by bit, reworking it’s code as needed |
05:08:47 | FromDiscord | <morgan (ping with reply)> or just saying screw it and coming back to this later |
05:09:42 | FromDiscord | <morgan (ping with reply)> i was hoping this would be a relatively easy option to have a nicer to use more maintainable opengl option for my plugin framework |
05:10:39 | FromDiscord | <morgan (ping with reply)> but honestly at this point i’d rather just get the unrelated basics in and a simple triangle example, and setup the plumbing code in the framework, and work on other stuff |
05:11:00 | FromDiscord | <morgan (ping with reply)> i’ve been working on gui for like months and i’d like a break from it lol |
06:52:19 | FromDiscord | <xkonti> sent a code paste, see https://play.nim-lang.org/#pasty=xbtCCIFD |
06:55:13 | FromDiscord | <Robyn [She/Her]> In reply to @xkonti "Can someone shed some": try printing out the entire JSON spat out by Discord? |
07:01:37 | FromDiscord | <xkonti> sent a code paste, see https://play.nim-lang.org/#pasty=mEZZtBdV |
07:02:19 | FromDiscord | <xkonti> (edit) "https://play.nim-lang.org/#pasty=TbOKVghr" => "https://play.nim-lang.org/#pasty=jthhHgJG" |
07:03:05 | FromDiscord | <xkonti> (edit) "https://play.nim-lang.org/#pasty=tgDGQUHq" => "https://play.nim-lang.org/#pasty=dSXmgUFw" |
07:04:14 | FromDiscord | <Robyn [She/Her]> huh... no clue then |
07:09:49 | FromDiscord | <Elegantbeef> Seems like a nice dangling pointer |
07:10:45 | FromDiscord | <Elegantbeef> Where does that `decode` come from? |
08:16:26 | * | hyperl0gic joined #nim |
08:33:29 | * | redj quit (Quit: No Ping reply in 180 seconds.) |
08:35:03 | * | redj joined #nim |
08:49:19 | hyperl0gic | Hello all, I can't find the .nimble file details, how to set build options. Any suggestions on where to find the documentation? |
08:51:37 | FromDiscord | <solitudesf> most build options are set in nim.cfg/config.nims https://nim-lang.org/docs/nimc.html |
08:54:34 | * | ntat quit (Quit: Leaving) |
08:54:55 | hyperl0gic | Ok, finally found the docs, i'ts more of a dependency tool, not so much dependency and buildsystem as per other languages. |
09:01:42 | hyperl0gic | @solitudesf It worked! made a nim.cfg with the --d:ssl option in it, now I can just do a nimble run :) |
09:10:15 | * | beholders_eye joined #nim |
09:15:34 | * | PMunch joined #nim |
09:16:16 | FromDiscord | <spotlightkid> You can also define custom tasks in your nimble file and use `switch("passC", "...")` in them and at the end do `setCommand("compile", "src/foo.nim")`. |
09:16:53 | FromDiscord | <spotlightkid> Example\: https://github.com/SpotlightKid/nymph/blob/38dc236740becb999021d2999831054734d3d430/nymph.nimble#L67 |
09:23:05 | hyperl0gic | @spotlightkid thanks, that's basicly using Nim inside of the config file for more complex situations |
09:24:23 | FromDiscord | <spotlightkid> It's nims, not Nim. |
09:24:46 | FromDiscord | <spotlightkid> It's nims, not full Nim. |
09:24:59 | hyperl0gic | I'm of a junior/beginner Python level, since packaging sucks, I am searching for something that just builds .exe or executables in general. Nim script then? |
09:29:34 | hyperl0gic | Yeah, it's this subset of Nim: https://nim-lang.org/docs/nims.html |
09:40:15 | FromDiscord | <Phil> @ringabout Question about Prologues Story regarding session auth.↵Am I understanding it correctly that based on the docs essentially all middlewares provided for that purpose are "for debug purposes only"? |
09:40:57 | FromDiscord | <Phil> Except for the redis version I guess, the delineation of what's safe to use and what isn't in that part of the docs in my view is sort of up in the air |
09:41:02 | FromDiscord | <Phil> (I mean this: https://planety.github.io/prologue/session/) |
09:55:20 | FromDiscord | <ringabout> In reply to @isofruit "<@658563905425244160> Question about Prologues": I think you are right |
10:15:24 | * | beholders_eye quit (Ping timeout: 245 seconds) |
10:43:04 | * | Jason_Regimi is now known as anddam |
10:54:49 | hyperl0gic | It's correct that there is currently only 1 oauth library? https://nimble.directory/pkg/oauth |
11:05:06 | ehmry | hyperl0gic: just to warn you, nimble is the worst part of nim |
11:15:01 | PMunch | I don't get all the hate Nimble gets |
11:15:11 | PMunch | In my experience it just works |
11:19:46 | FromDiscord | <spotlightkid> Yeah, me too. The documentation could made a) easier to find and b) better structured and c) have better references to what is actually supported by Nims, but then Nims is poorly documented in the first place, and that's not nimble's fault. |
11:21:04 | PMunch | @spotlightkid, have you seen the new documentation? |
11:21:33 | hyperl0gic | Just take a look at CMake.. tried to make sense of it, just gave up. I'll probably manage. |
11:21:42 | FromDiscord | <spotlightkid> which one is that? |
11:22:08 | PMunch | @spotlightkid: https://nim-lang.github.io/nimble/index.html |
11:23:46 | hyperl0gic | I'm planning on using Nim to do some specific requests to MS Graph, so the recipe will involve at least oauth module, std/httpclient and c-blake/cligen for the CLI frondend. |
11:24:44 | FromDiscord | <spotlightkid> Yeah, sure. I use that a lot. But try to get there from https://nimble.directory/, which is probably most people's first point of contact with nimble \:) |
11:24:53 | hyperl0gic | The 'hardest' thing will be bending my brain to procedural programming. |
11:25:10 | PMunch | hyperl0gic, I've used the MS Planner and Outlook APIs from Nim |
11:25:32 | PMunch | Basically you just need the CLI flow and a browser to verify, it's super simple |
11:26:03 | hyperl0gic | @Pmunch, I've gotten even more power, a non-interactive flow via client-id/Client-secret :P |
11:26:06 | PMunch | @spotlightkid, ah yes.. Nimble.directory is run by federico who is no longer active in the community |
11:26:12 | PMunch | So it hasn't been updated in ages |
11:26:34 | PMunch | The community should probably create an official version |
11:26:48 | FromDiscord | <spotlightkid> These docs should also be linked on https://nim-lang.org/documentation.html, imho. |
11:27:15 | FromDiscord | <spotlightkid> thb, I use https://nimpkgs.dayl.in/ mostly. |
11:28:42 | FromDiscord | <spotlightkid> And put the link in the Github repo description of https://github.com/nim-lang/nimble too. |
11:30:43 | FromDiscord | <spotlightkid> That seems to be a recurring theme in the Nim ecosystem \:-(↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
11:33:23 | PMunch | Yeah we're working on increasing the bus factor for some of these projects |
11:49:23 | FromDiscord | <zumi.dxy> In reply to @spotlightkid "Yeah, me too. The": like the fact that on nimscript you need to use `cpFile` and not `copyFile`... |
11:50:17 | FromDiscord | <zumi.dxy> chatgpt ain't much of a help either...↵hey, that's an idea! to prevent AI "forgeries" program in an obscure language like ours... :p |
11:51:07 | FromDiscord | <zumi.dxy> In reply to @zumi.dxy "like the fact that": but to be the "PRs welcome" guy, I don't even know where to start when it comes to things like this |
11:51:29 | FromDiscord | <zumi.dxy> "Tips and tricks?" "Common pitfalls?" |
11:53:38 | FromDiscord | <zumi.dxy> for examples of using nimscript, I did manage to implement "reverse weaving" for documenting library examples: https://github.com/ZoomTen/jibby/blob/0035d9789eeb9e07c41a8f1db6a70e6a05f3547a/jibby.nimble#L40 |
11:54:09 | FromDiscord | <zumi.dxy> not the most effective but it does work |
11:54:28 | FromDiscord | <spotlightkid> > The documentation could made a) easier to find↵https://github.com/nim-lang/nimble/issues/1272 |
11:56:04 | * | ryuukk quit (Remote host closed the connection) |
12:00:43 | * | ryuukk joined #nim |
12:39:17 | FromDiscord | <nasuray> In reply to @spotlightkid "thb, I use https://nimpkgs.dayl.in/": Glad it's useful! |
12:50:14 | * | ntat joined #nim |
12:57:41 | hyperl0gic | Wow, antivirus applications still go completely berserk when using choosenim on Windows. The VM I was using just shutdown (Windows shut itself down). |
13:07:46 | * | xet7 joined #nim |
14:11:06 | * | ryuukk quit (Remote host closed the connection) |
14:12:38 | * | ryuukk joined #nim |
14:20:35 | * | hyperl0gic quit (Remote host closed the connection) |
14:20:53 | * | hyperl0gic joined #nim |
14:32:09 | FromDiscord | <kiloneie> i was unable to install choosenim even after disabling real time protection of W defender on a laptop with a very contacty screen problem. While on my pc, everything in windows defender is on, and yet no "virus" in the manual version, AND it installed properly... im not sure if i have some kind of weird settings on pc, but i dont remember any nor do i have any exclusions set |
14:39:54 | Amun-Ra | I installed nim on windows with scoop |
14:40:11 | Amun-Ra | winget never worked for me |
14:55:09 | * | hyperl0gic quit (Ping timeout: 256 seconds) |
15:32:07 | * | redj quit (Ping timeout: 272 seconds) |
15:37:31 | * | beholders_eye joined #nim |
15:54:37 | FromDiscord | <kiloneie> Winget seems to have problems with some programs. For me it cannot update OBS, and i believe VLC also. |
16:07:26 | Amun-Ra | winget wasn't able in my case even update package list |
16:07:57 | * | beholders_eye quit (Ping timeout: 246 seconds) |
16:09:01 | Amun-Ra | to* |
16:10:18 | Amun-Ra | all I got was a cryptic error message (as you get in case of ms tools) and I couldn't find a fix on the web |
16:30:24 | * | SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev) |
16:33:06 | * | SchweinDeBurg joined #nim |
16:40:35 | * | ntat quit (Quit: Leaving) |
16:52:42 | FromDiscord | <kiloneie> both winget and uniget gui have problems, but on the other hand linux package managers are also not perfect, especially on rolling release distros where doing a bunch of updates at once may end your system if you do not know how to prevent it or fix it. |
16:54:58 | * | SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev) |
17:11:13 | Amun-Ra | mhm, ubuntu, back then |
17:14:12 | Amun-Ra | that's something that never appears in debian during dist-upgrades; I have two such issues on debian unstable in last hmm… 10 years |
17:14:12 | Amun-Ra | but at least I could install a single package… ;) |
17:21:34 | Amun-Ra | I wanted to create appimage for my viwer written in nim… compiling appimagetool sucks as |
17:24:59 | FromDiscord | <odexine> i havent really had a problem with rolling releases but then again i know how to fix shit |
17:25:20 | Amun-Ra | same |
17:31:46 | FromDiscord | <nnsee> In reply to @kiloneie "both winget and uniget": i often hear people say this - but this has never happened to me, and i've upgraded some pretty ancient systems |
17:32:25 | FromDiscord | <nnsee> only issue that arch has every now and then is that the keychain package needs to be updated before anything else, but that's not exactly a hard problem |
17:32:42 | FromDiscord | <kiloneie> i have heard the same and didn't have the problem until i stopped updating regularly. Do it every few months and problems pile up like crazy |
17:33:06 | FromDiscord | <nnsee> i upgrade my gaming pc like maybe twice a year |
17:33:27 | FromDiscord | <kiloneie> idk but last time nvidia drivers died on me |
17:33:27 | FromDiscord | <nnsee> never had any issues 🤷 |
17:33:36 | FromDiscord | <nnsee> oh, nvidia... |
17:33:57 | FromDiscord | <kiloneie> i couldn't get them to work anymore regardless if i removed everything nvidia related |
17:34:21 | FromDiscord | <nnsee> i've got no clue about nvidia, i deliberately avoid using anything nvidia |
17:34:56 | FromDiscord | <nnsee> but, then, this seems less like a linux package manager issue and more like a manufacturer issue :p |
17:35:04 | FromDiscord | <kiloneie> well at the time i wanted something more than rx 580 so i pushed my budget all the way to 1070 ti, something amd could not match at the time at all |
17:35:11 | FromDiscord | <nnsee> anyways, this is getting a bit #offtopic |
17:35:50 | FromDiscord | <kiloneie> well last message on that, well i reinstalled endevaour OS, and then windows died on ANOTHER drive |
17:35:59 | FromDiscord | <odexine> In reply to @nnsee "only issue that arch": HAHAHAH iu fucking hate this |
17:36:36 | FromDiscord | <odexine> only problems ive had was with kde packages but nothing major otherwise |
17:37:36 | FromDiscord | <kiloneie> the thing is, if you don't know how to resolve these problems, it's a big problem, the package manager tells you nothing. And if it does tell you that it wants to delete one of the conflicting ones so that it resolves, it NEVER does that... |
17:37:54 | FromDiscord | <kiloneie> I know this is offtopic, but nobody is talking on topic at all |
17:38:11 | FromDiscord | <kiloneie> do we have less people active nowadays ? |
17:38:51 | FromDiscord | <aintea> Most people are too busy making revolutionary stuff using the best programming language (Nim) |
17:40:57 | FromDiscord | <odexine> In reply to @kiloneie "the thing is, if": not a lot of people are aware of this but iirc you have to check the arch news for packaging changes |
17:41:10 | FromDiscord | <odexine> https://archlinux.org/news/ |
17:41:37 | FromDiscord | <odexine> well not even just that |
17:42:29 | FromDiscord | <kiloneie> too much decentralization ... no nobody told me of that at all |
17:42:48 | FromDiscord | <kiloneie> i usually went to the distro's forums and endeavour's ones have really helpful people |
17:43:05 | FromDiscord | <kiloneie> just googling the problem is a mixed bag |
17:43:11 | FromDiscord | <Salako Dolapo> sent a long message, see https://pasty.ee/zRXnjTOU |
17:43:23 | FromDiscord | <kiloneie> eh ? |
17:43:27 | FromDiscord | <kiloneie> this a bot ? |
17:45:07 | FromDiscord | <odexine> of course |
17:45:28 | FromDiscord | <odexine> assume 99% of the messages sending a telegram link are from bots |
17:45:32 | FromDiscord | <odexine> <@&371760044473319454> |
17:47:31 | FromDiscord | <nnsee> i have none of these banks |
17:47:57 | FromDiscord | <nnsee> not even "any other local bank" since they're not local |
17:49:11 | FromDiscord | <odexine> id be surprised if there was any mention of my bank since its japanese |
17:52:09 | FromDiscord | <majortrips1763> Okay .. so how to recreate Duff's Device in Nim? ;P |
17:54:55 | Amun-Ra | ;) |
17:55:00 | FromDiscord | <fabric.input_output> In reply to @majortrips1763 "Okay .. so how": `{.emit: .}` |
17:55:31 | FromDiscord | <fabric.input_output> jk just make make a macro |
17:55:57 | FromDiscord | <majortrips1763> I have yet to delve into the AST Abyss |
17:56:11 | FromDiscord | <odexine> macro sure but basically you dont |
17:56:24 | FromDiscord | <fabric.input_output> In reply to @majortrips1763 "I have yet to": it's pretty shallow |
18:00:47 | FromDiscord | <double_spiral> is `nim_array.addr` the equivalent of passing an array into a function in c |
18:01:03 | FromDiscord | <double_spiral> if not what the correct way |
18:01:07 | * | Batzy_ joined #nim |
18:01:18 | FromDiscord | <double_spiral> Working with a c library that needs an array fyi |
18:03:10 | FromDiscord | <fabric.input_output> the `addr` of a nim `array` should work, you can also do `nim_array[0].addr` |
18:03:17 | * | Batzy quit (Ping timeout: 255 seconds) |
18:04:41 | FromDiscord | <nnsee> yes, i think i would do `addr(nim_array[0])` as well like fabricio said |
18:06:09 | FromDiscord | <nnsee> don't quote me on this, but i _think_ `nim_array` should be in scope for as long as your c function operates, lest it gets garbage collected |
18:06:18 | FromDiscord | <nnsee> someone can correct me if i'm wrong |
18:06:59 | FromDiscord | <fabric.input_output> yeah it's a value/stack type |
18:07:22 | FromDiscord | <fabric.input_output> careful of dangling pointers |
18:57:04 | * | coldfeet joined #nim |
19:30:07 | FromDiscord | <savantsupremellc> In reply to @demotomohiro "Recursively check each `NimNode`": oh ok yea that's what uh.... i want to make easier |
19:30:08 | FromDiscord | <savantsupremellc> is there a uh |
19:30:12 | FromDiscord | <savantsupremellc> any solutions for this or uh? |
19:30:22 | FromDiscord | <savantsupremellc> .... |
19:30:48 | FromDiscord | <savantsupremellc> i'm quite a beggining as i said previous but |
19:30:50 | FromDiscord | <savantsupremellc> as i understatnd it |
19:30:58 | FromDiscord | <savantsupremellc> ... that's quite a basic pattern that someone aught to have "simplified" into DSL |
19:30:58 | FromDiscord | <savantsupremellc> no? |
19:32:19 | FromDiscord | <savantsupremellc> well anyways |
19:32:22 | FromDiscord | <savantsupremellc> ill just go fuck myself |
19:32:27 | FromDiscord | <savantsupremellc> thanks again for the input |
19:46:46 | FromDiscord | <Robyn [She/Her]> ...? |
20:13:12 | FromDiscord | <michaelb.eth> In reply to @savantsupremellc "... that's quite a": Earlier you mentioned that you want to create DSLs↵↵Generally speaking, DSLs encapsulate incidental complexity, so in the balance you must absorb that complexity into your code when authoring the DSL, there’s no free lunch |
20:14:13 | FromDiscord | <michaelb.eth> except for this sandwich, which you can have for free↵ 🥪 |
20:26:26 | FromDiscord | <Robyn [She/Her]> they left |
20:31:39 | * | coldfeet quit (Remote host closed the connection) |
21:55:37 | FromDiscord | <eightbit_dboy> Anyone familiar with `futhark` able to help with this? https://media.discordapp.net/attachments/371759389889003532/1293330987060690977/image.png?ex=6706fbd8&is=6705aa58&hm=f0be214d9a18af793ad4597927846f5aa16e41b37bbab0fdfd4f0e6ec4d5d0d7& |
21:56:17 | FromDiscord | <eightbit_dboy> Here's the `create.nim` https://media.discordapp.net/attachments/371759389889003532/1293331157290582046/create.nim?ex=6706fc00&is=6705aa80&hm=09f3bfbcb78b2c427e393727e779f6e4ac0a4e2a8f6511c3371ae28f61d87a68& |
22:14:03 | FromDiscord | <abisxir> Today I heard about nimskull, is it the future nim? |
22:16:42 | FromDiscord | <nervecenter> In reply to @abisxir "Today I heard about": lolno |
22:16:51 | FromDiscord | <majortrips1763> sent a code paste, see https://play.nim-lang.org/#pasty=XKfDHSAl |
22:18:43 | FromDiscord | <nervecenter> In reply to @majortrips1763 "Okay ... I think": What is the period for? |
22:19:23 | FromDiscord | <nervecenter> sent a code paste, see https://play.nim-lang.org/#pasty=teesSajT |
22:19:28 | FromDiscord | <majortrips1763> In reply to @nervecenter "What is the period": Well, that explains the error .. but I am confused by the rest.. |
22:19:55 | FromDiscord | <majortrips1763> sent a code paste, see https://play.nim-lang.org/#pasty=poRLEvuD |
22:20:43 | FromDiscord | <majortrips1763> Having variable context change based on case and underscores is .. curiously non-intuitive |
22:20:58 | FromDiscord | <nervecenter> Seems like you found a very particular edge case for symbol normalization, but that's vanishlingly hard to encounter in the real world. |
22:21:47 | FromDiscord | <nervecenter> (I use Nim in production. I use 4-space snake_case, and import large libraries that use 2-space camelCase. Literally no issues with symbol collision so far.) |
22:22:25 | * | rockcavera joined #nim |
22:22:54 | FromDiscord | <nervecenter> The fact that you had to construct this case kind of illustrates the point. |
22:23:18 | FromDiscord | <majortrips1763> honestly, if you look at the simplest cases .. it is more shocking |
22:23:55 | FromDiscord | <majortrips1763> sent a code paste, see https://play.nim-lang.org/#pasty=vHVROFiH |
22:24:13 | FromDiscord | <nervecenter> Eh. Not really. The fact that I can call zippy's `openZipArchive()` with `open_zip_archive()` isn't too hard to wrap your head around. |
22:25:14 | FromDiscord | <nervecenter> Hot take, feel free to ignore: If you run into symbol collisions because of a mixing of underscores, caps, and backtick definitions, you or the library author should probably consider and interface redesign. |
22:25:25 | FromDiscord | <nervecenter> (edit) "and" => "an" |
22:25:49 | FromDiscord | <nervecenter> Types go a long way to adding lots of specificity to symbol definitions |
22:27:04 | FromDiscord | <majortrips1763> I hear what you are saying, but it is pretty wild regardless. Some of the ways the symbols are resolving are just confusing. |
22:28:09 | FromDiscord | <majortrips1763> It generally looks like the case of the first character during the declaration decides the mapping... |
22:28:20 | FromDiscord | <nervecenter> That's probably true |
22:28:33 | FromDiscord | <majortrips1763> so thisIsA and ThisIsA will resolve differently |
22:28:59 | FromDiscord | <majortrips1763> just a 1 character caps difference gives you a different symbol? |
22:32:44 | FromDiscord | <majortrips1763> sent a long message, see https://pasty.ee/BWXiSnmm |
22:35:34 | FromDiscord | <einjonas> what are magic? |
22:35:48 | FromDiscord | <einjonas> is there a list of implemented magics? |
22:40:59 | FromDiscord | <majortrips1763> In reply to @einjonas "is there a list": Nope, no list, just like .. random land mines of unexpected behavior that are "technically" hinted at with a wink and a nudge and a suggestion .. but if you wander off the path and smell the roses you might find out that they are actually pit vipers selling girl scout cookies and tea and telling you everything is fine on all days ending in `y` so long as you know the secret hand shake and |
22:43:11 | FromDiscord | <majortrips1763> sent a code paste, see https://play.nim-lang.org/#pasty=uVxqoAub |
22:44:13 | FromDiscord | <majortrips1763> sent a code paste, see https://play.nim-lang.org/#pasty=eXWwaQXw |
22:50:34 | FromDiscord | <Elegantbeef> They're features implemented in the compiler, if you look at the compiler source you can see a list of magics as an enum↵(@einjonas) |
22:51:02 | FromDiscord | <Elegantbeef> Nim is style insensitive you're not the first nor the last to act like the sky is falling |
22:51:17 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/blob/devel/compiler/ast.nim#L459 |
22:51:20 | FromDiscord | <Elegantbeef> For the magic |
22:51:24 | FromDiscord | <majortrips1763> sent a code paste, see https://play.nim-lang.org/#pasty=eMWRRNxZ |
22:51:51 | FromDiscord | <majortrips1763> (edit) "https://play.nim-lang.org/#pasty=tngGEVcm" => "https://play.nim-lang.org/#pasty=blKljejQ" |
22:52:14 | FromDiscord | <Elegantbeef> The reason style insensitivity exists is to make it so you can use whatever style you prefer |
22:52:33 | FromDiscord | <majortrips1763> Well, it isn't style insensitive is it? |
22:52:40 | FromDiscord | <Elegantbeef> It is |
22:52:48 | FromDiscord | <nervecenter> Seems like a kind of pedantic distinction |
22:52:52 | FromDiscord | <majortrips1763> It "mostly" is |
22:53:25 | FromDiscord | <nervecenter> Another opinion, stop worrying about it and make something |
22:53:37 | FromDiscord | <nervecenter> Advice that's worth what you paid for it |
22:58:01 | FromDiscord | <majortrips1763> It is worth noting that this behavior will impact identifier comparisons as well. It is a little weird because it can lead to a lot of confusion. |
22:58:23 | FromDiscord | <majortrips1763> https://nim-lang.org/docs/manual.html#lexical-analysis-identifier-equality |
22:59:01 | FromDiscord | <nervecenter> Can lead, or has led? Most people propose the hypothetical but there are as yet no examples. It's also very easy to force symbol module qualification if it ever is an issue. |
22:59:04 | FromDiscord | <majortrips1763> sent a code paste, see https://play.nim-lang.org/#pasty=ulfDuOsc |
23:00:01 | FromDiscord | <majortrips1763> In reply to @nervecenter "Can lead, or has": Honestly, you have equally failed to demonstrate that there are no such issues encountered. |
23:00:14 | FromDiscord | <majortrips1763> https://news.ycombinator.com/item?id=21393676 |
23:00:18 | FromDiscord | <nervecenter> I told you above that I have a production codebase with no issues. |
23:00:23 | FromDiscord | <majortrips1763> But since you asked, I went ahead and searched for it |
23:01:12 | FromDiscord | <majortrips1763> And since I am merely trying to understand some behavior and its implications, you could kindly please stop attacking anything. |
23:01:55 | FromDiscord | <nervecenter> I guess we just value different things 🤷 |
23:01:59 | FromDiscord | <Elegantbeef> Whilst it can be confusing it hardly is, if you want to prevent this behaviour you can use `--styleCheck:error` iirc |
23:03:33 | FromDiscord | <majortrips1763> In reply to @Elegantbeef "Whilst it can be": Honestly, my first shock was that the symbols are mangled at all. It also impacts how I might find said symbols from .S and .C |
23:03:42 | FromDiscord | <Elegantbeef> It does not |
23:04:00 | FromDiscord | <Elegantbeef> `importc` takes in a string parameter |
23:04:28 | FromDiscord | <Elegantbeef> for instance `proc myProc {.importc: "someCFunction".}` works just fine |
23:04:31 | FromDiscord | <majortrips1763> assuming that is the only way to interface into Nim |
23:04:45 | FromDiscord | <Elegantbeef> Nim has to mangle names regardless |
23:04:54 | FromDiscord | <Elegantbeef> You can `exportC` variables |
23:05:49 | FromDiscord | <Elegantbeef> Overloads, generics, and modules means you need to have symbol mangling |
23:06:00 | FromDiscord | <majortrips1763> I am pretty certain that at no point did I say it shouldn't do that .. my first statement in all of this was asking someone to explain it to me if they could, and I noted that it is non-intuitive .. all of the rest of the noise is being trying to defend those two statements while other people acted like I was insulting the cooking at a potluck. |
23:06:25 | FromDiscord | <majortrips1763> (edit) "being" => "me" |
23:07:16 | FromDiscord | <Elegantbeef> People often complain about the style insensitivity so people often respond to it in such a manner |
23:08:59 | FromDiscord | <majortrips1763> sent a long message, see https://pasty.ee/QzWmoSVw |
23:09:22 | FromDiscord | <Elegantbeef> Pascal originally had case insensitivity and it used to prefix with `T` this is an evolution of that |
23:09:45 | FromDiscord | <Elegantbeef> Nim does not have a clear object table |
23:09:49 | FromDiscord | <Elegantbeef> It has a symbol table |
23:09:58 | FromDiscord | <majortrips1763> Well, it seems to have 2 symbol tables |
23:10:02 | FromDiscord | <Elegantbeef> It does not |
23:10:14 | FromDiscord | <Elegantbeef> It has one symbol table, and the users are supposed to follow a convention |
23:10:36 | FromDiscord | <majortrips1763> Did you see the output of the code? |
23:10:39 | FromDiscord | <Elegantbeef> I should say each module has a symbol table, but there is no differentiated symbol table |
23:11:14 | FromDiscord | <Elegantbeef> Nothing in that example indicates two tables |
23:11:48 | FromDiscord | <Elegantbeef> Symbols are normalized to remove `_` and any casing after the first character |
23:12:30 | FromDiscord | <majortrips1763> speaking of pedantic distinctions |
23:13:01 | FromDiscord | <Elegantbeef> I mean saying there are two symbol tables implies logic like C where `struct T` and `T` are valid |
23:13:50 | FromDiscord | <majortrips1763> Yah, but functionally it is the same behavior isn't it? You could have a table where you store all symbols that were declared with the 1st char upper cased, and a second where they are normalized if the 1st char was lower cased. |
23:14:09 | FromDiscord | <Elegantbeef> You could, but to what end? |
23:14:35 | FromDiscord | <majortrips1763> I am saying that, in regards to the behavior observed, the implementation doesn't really matter. |
23:14:56 | FromDiscord | <Elegantbeef> Sure then there is no point in even mentioning a symbol table if the implementation does not matter 😄 |
23:15:06 | FromDiscord | <majortrips1763> It is kinda confusing either way really. Though I do appreciate the TObjectType reference. |
23:15:17 | FromDiscord | <Elegantbeef> The behaviour observed is one that the symbols are normalized which can be unintuitive |
23:15:44 | FromDiscord | <majortrips1763> Lol .. I am saying it is just as non-intuitive no matter how it is implemented. |
23:15:46 | FromDiscord | <Elegantbeef> It hardly ever actually is, the only time I've ran into a style sensitivity issue was using `bInd` since `bind` is a keyword |
23:16:24 | FromDiscord | <Elegantbeef> Right I don't think anyone can reasonably disagree that it 100% intuitive |
23:16:26 | FromDiscord | <majortrips1763> oof .. my brain would have used `bInd` as some of binary index or something similar. |
23:16:37 | FromDiscord | <Elegantbeef> I mean reasonably agree |
23:18:24 | FromDiscord | <majortrips1763> I take it leading underscores in the final linked symbols are up to the C compiler? |
23:18:39 | FromDiscord | <Elegantbeef> Nim does not allow leading underscores |
23:18:55 | FromDiscord | <Elegantbeef> Identifiers cannot start with `_` |
23:18:58 | FromDiscord | <Elegantbeef> Nor end with them |
23:19:00 | FromDiscord | <majortrips1763> Yah .. but the C compiler might add them |
23:19:07 | FromDiscord | <majortrips1763> and often does |
23:19:30 | FromDiscord | <Elegantbeef> I've never seen it in properly exported symbols |
23:19:40 | FromDiscord | <majortrips1763> https://stackoverflow.com/questions/2627511/why-do-c-compilers-prepend-underscores-to-external-names |
23:19:50 | FromDiscord | <majortrips1763> It is like .. a universal behavior going back to 1971 |
23:20:44 | FromDiscord | <Elegantbeef> Well then I'm just daft and tooling does not show it so I did not realise it existed |
23:21:27 | FromDiscord | <majortrips1763> Most of my .S files have to be wrapped with cpp that has a C_USYM() macro to make certain my symbols behave correctly wrt the compiler that is linking everything together. |
23:22:04 | FromDiscord | <majortrips1763> So like, when I am trying to call symbols created by some other compiler .. the sumbol tables matter |
23:22:10 | FromDiscord | <majortrips1763> (edit) "sumbol" => "symbol" |
23:23:58 | FromDiscord | <Elegantbeef> You really are supposed to `exportc` any variable that matters |
23:46:18 | FromDiscord | <majortrips1763> In reply to @Elegantbeef "You really are supposed": Thank you, I wasn't aware of that pragma. Though, from an ASM point of view .. it doesn't change the situation w/ the leading underscore. |