<< 08-10-2024 >>

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:02FromDiscord<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:31casacaello, anyone using ladybird browser on unstable? The program launches but does nothing after entering a url
02:12:48FromDiscord<usawiniko> (probably something for #offtopic ?)
02:47:22FromDiscord<.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:32FromDiscord<Nlits (Ping on reply)> In reply to @.bobbbob "does anyone know off": Context?
03:04:29FromDiscord<.bobbbob> sent a code paste, see https://play.nim-lang.org/#pasty=SDhsYKmx
03:06:07FromDiscord<.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:04FromDiscord<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:26FromDiscord<.bobbbob> In reply to @nlits "Have you tried using": nope no difference
03:09:03FromDiscord<.bobbbob> it's not a compiler bug either, ive tried different versions
03:11:18FromDiscord<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:54FromDiscord<morgan (ping with reply)> sent a code paste, see https://play.nim-lang.org/#pasty=MSrOeFcA
03:15:10FromDiscord<Nlits (Ping on reply)> In reply to @morganalyssa "so im trying to": Context or code please
03:16:04FromDiscord<morgan (ping with reply)> https://github.com/liquidev/aglet
03:16:19FromDiscord<morgan (ping with reply)> i have made zero changes to the code so far
03:16:37FromDiscord<.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:47FromDiscord<demotomohiro> In reply to @morganalyssa "so im trying to": Probably defining `=destroy` right after the type section fix it.
03:16:48FromDiscord<morgan (ping with reply)> that's running the ttriangle test/example
03:17:50FromDiscord<morgan (ping with reply)> vscode search doesn't find anything searching for =destroy
03:18:34FromDiscord<morgan (ping with reply)> destroy pops up in one glfw proc
03:18:53FromDiscord<morgan (ping with reply)> (edit) "destroy" => "`destroy`"
03:19:01FromDiscord<morgan (ping with reply)> (edit) "=destroy" => "`=destroy`"
03:19:31FromDiscord<morgan (ping with reply)> github search also finds no `=destroy`
03:20:28FromDiscord<Elegantbeef> Does it use `new T, finalizer`?
03:21:39FromDiscord<Elegantbeef> https://github.com/liquidev/aglet/blob/5c3312982359f53d3ba8aaf05b9a927333289d71/src/aglet/mesh.nim#L320 yep it uses finalizers
03:22:01FromDiscord<morgan (ping with reply)> sent a code paste, see https://play.nim-lang.org/#pasty=PIwRqDYd
03:29:01FromDiscord<.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:50FromDiscord<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:11FromDiscord<morgan (ping with reply)> gotta figure out what the syntax of finalizers was
03:34:32FromDiscord<Elegantbeef> It's just `new`
03:37:06FromDiscord<Elegantbeef> The issue is `new` comes after a usage of Mesh
03:37:51FromDiscord<morgan (ping with reply)> so `new result do (args):` then stuff that goes in the =destroy hook?
03:38:26FromDiscord<morgan (ping with reply)> set =destroy for result to a proc with whatever lines?
03:39:12FromDiscord<Elegantbeef> It's just an overload of `new` which takes in a proc
03:42:26FromDiscord<morgan (ping with reply)> i see
03:43:47FromDiscord<morgan (ping with reply)> so im guessing there's multiple templates which are each setting the destroy hook that's the issue
03:43:48FromDiscord<morgan (ping with reply)> hm
03:50:17FromDiscord<Elegantbeef> Nope it's likely what I said
03:55:45FromDiscord<morgan (ping with reply)> well it's framebuffers not meshes
03:56:43FromDiscord<morgan (ping with reply)> but do you mean the buggy behavior of it?
03:56:57FromDiscord<morgan (ping with reply)> ill try moving them all over to =destroy
03:58:22FromDiscord<Elegantbeef> `=destroy`s do not work with `ref`
03:58:37FromDiscord<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:22FromDiscord<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:46FromDiscord<Elegantbeef> What type is `RenderBuffer`?
04:57:10FromDiscord<morgan (ping with reply)> sent a code paste, see https://play.nim-lang.org/#pasty=QGWuHSwm
04:57:20FromDiscord<Elegantbeef> destructors do not work with refs
04:57:26FromDiscord<morgan (ping with reply)> oh
04:58:34FromDiscord<morgan (ping with reply)> then i have no clue the semantics of what i'm trying to replace
04:59:04FromDiscord<Elegantbeef> Make it an object
04:59:22FromDiscord<Elegantbeef> Then later on make a `RenderBuffer[T] = ref RenderBufferObj[T]`
04:59:37FromDiscord<Elegantbeef> Also disable `=copy` and `=dup` for `RenderBufferObj`
05:00:53FromDiscord<morgan (ping with reply)> i was hoping i wasn't gonna have to redo all this
05:01:18FromDiscord<morgan (ping with reply)> with all its finalizers and inheritance that i am not familiar with
05:03:40FromDiscord<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:32FromDiscord<morgan (ping with reply)> also i get an error with it as an object
05:04:39FromDiscord<morgan (ping with reply)> `cannot bind another '=destroy' to: Renderbuffer; previous declaration was here: `↵at the same line
05:05:02FromDiscord<Elegantbeef> You need to have the destructor defined before first usage in a procedure
05:05:05FromDiscord<Elegantbeef> Or forward declare it
05:06:57FromDiscord<morgan (ping with reply)> well i put it above that proc but i can move it up
05:08:32FromDiscord<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:47FromDiscord<morgan (ping with reply)> or just saying screw it and coming back to this later
05:09:42FromDiscord<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:39FromDiscord<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:00FromDiscord<morgan (ping with reply)> i’ve been working on gui for like months and i’d like a break from it lol
06:52:19FromDiscord<xkonti> sent a code paste, see https://play.nim-lang.org/#pasty=xbtCCIFD
06:55:13FromDiscord<Robyn [She/Her]> In reply to @xkonti "Can someone shed some": try printing out the entire JSON spat out by Discord?
07:01:37FromDiscord<xkonti> sent a code paste, see https://play.nim-lang.org/#pasty=mEZZtBdV
07:02:19FromDiscord<xkonti> (edit) "https://play.nim-lang.org/#pasty=TbOKVghr" => "https://play.nim-lang.org/#pasty=jthhHgJG"
07:03:05FromDiscord<xkonti> (edit) "https://play.nim-lang.org/#pasty=tgDGQUHq" => "https://play.nim-lang.org/#pasty=dSXmgUFw"
07:04:14FromDiscord<Robyn [She/Her]> huh... no clue then
07:09:49FromDiscord<Elegantbeef> Seems like a nice dangling pointer
07:10:45FromDiscord<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:19hyperl0gicHello all, I can't find the .nimble file details, how to set build options. Any suggestions on where to find the documentation?
08:51:37FromDiscord<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:55hyperl0gicOk, finally found the docs, i'ts more of a dependency tool, not so much dependency and buildsystem as per other languages.
09:01:42hyperl0gic@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:16FromDiscord<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:53FromDiscord<spotlightkid> Example\: https://github.com/SpotlightKid/nymph/blob/38dc236740becb999021d2999831054734d3d430/nymph.nimble#L67
09:23:05hyperl0gic@spotlightkid thanks, that's basicly using Nim inside of the config file for more complex situations
09:24:23FromDiscord<spotlightkid> It's nims, not Nim.
09:24:46FromDiscord<spotlightkid> It's nims, not full Nim.
09:24:59hyperl0gicI'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:34hyperl0gicYeah, it's this subset of Nim: https://nim-lang.org/docs/nims.html
09:40:15FromDiscord<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:57FromDiscord<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:02FromDiscord<Phil> (I mean this: https://planety.github.io/prologue/session/)
09:55:20FromDiscord<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:49hyperl0gicIt's correct that there is currently only 1 oauth library? https://nimble.directory/pkg/oauth
11:05:06ehmryhyperl0gic: just to warn you, nimble is the worst part of nim
11:15:01PMunchI don't get all the hate Nimble gets
11:15:11PMunchIn my experience it just works
11:19:46FromDiscord<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:04PMunch@spotlightkid, have you seen the new documentation?
11:21:33hyperl0gicJust take a look at CMake.. tried to make sense of it, just gave up. I'll probably manage.
11:21:42FromDiscord<spotlightkid> which one is that?
11:22:08PMunch@spotlightkid: https://nim-lang.github.io/nimble/index.html
11:23:46hyperl0gicI'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:44FromDiscord<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:53hyperl0gicThe 'hardest' thing will be bending my brain to procedural programming.
11:25:10PMunchhyperl0gic, I've used the MS Planner and Outlook APIs from Nim
11:25:32PMunchBasically you just need the CLI flow and a browser to verify, it's super simple
11:26:03hyperl0gic@Pmunch, I've gotten even more power, a non-interactive flow via client-id/Client-secret :P
11:26:06PMunch@spotlightkid, ah yes.. Nimble.directory is run by federico who is no longer active in the community
11:26:12PMunchSo it hasn't been updated in ages
11:26:34PMunchThe community should probably create an official version
11:26:48FromDiscord<spotlightkid> These docs should also be linked on https://nim-lang.org/documentation.html, imho.
11:27:15FromDiscord<spotlightkid> thb, I use https://nimpkgs.dayl.in/ mostly.
11:28:42FromDiscord<spotlightkid> And put the link in the Github repo description of https://github.com/nim-lang/nimble too.
11:30:43FromDiscord<spotlightkid> That seems to be a recurring theme in the Nim ecosystem \:-(↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
11:33:23PMunchYeah we're working on increasing the bus factor for some of these projects
11:49:23FromDiscord<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:17FromDiscord<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:07FromDiscord<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:29FromDiscord<zumi.dxy> "Tips and tricks?" "Common pitfalls?"
11:53:38FromDiscord<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:09FromDiscord<zumi.dxy> not the most effective but it does work
11:54:28FromDiscord<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:17FromDiscord<nasuray> In reply to @spotlightkid "thb, I use https://nimpkgs.dayl.in/": Glad it's useful!
12:50:14*ntat joined #nim
12:57:41hyperl0gicWow, 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:09FromDiscord<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:54Amun-RaI installed nim on windows with scoop
14:40:11Amun-Rawinget 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:37FromDiscord<kiloneie> Winget seems to have problems with some programs. For me it cannot update OBS, and i believe VLC also.
16:07:26Amun-Rawinget wasn't able in my case even update package list
16:07:57*beholders_eye quit (Ping timeout: 246 seconds)
16:09:01Amun-Rato*
16:10:18Amun-Raall 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:42FromDiscord<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:13Amun-Ramhm, ubuntu, back then
17:14:12Amun-Rathat'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:12Amun-Rabut at least I could install a single package… ;)
17:21:34Amun-RaI wanted to create appimage for my viwer written in nim… compiling appimagetool sucks as
17:24:59FromDiscord<odexine> i havent really had a problem with rolling releases but then again i know how to fix shit
17:25:20Amun-Rasame
17:31:46FromDiscord<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:25FromDiscord<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:42FromDiscord<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:06FromDiscord<nnsee> i upgrade my gaming pc like maybe twice a year
17:33:27FromDiscord<kiloneie> idk but last time nvidia drivers died on me
17:33:27FromDiscord<nnsee> never had any issues 🤷
17:33:36FromDiscord<nnsee> oh, nvidia...
17:33:57FromDiscord<kiloneie> i couldn't get them to work anymore regardless if i removed everything nvidia related
17:34:21FromDiscord<nnsee> i've got no clue about nvidia, i deliberately avoid using anything nvidia
17:34:56FromDiscord<nnsee> but, then, this seems less like a linux package manager issue and more like a manufacturer issue :p
17:35:04FromDiscord<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:11FromDiscord<nnsee> anyways, this is getting a bit #offtopic
17:35:50FromDiscord<kiloneie> well last message on that, well i reinstalled endevaour OS, and then windows died on ANOTHER drive
17:35:59FromDiscord<odexine> In reply to @nnsee "only issue that arch": HAHAHAH iu fucking hate this
17:36:36FromDiscord<odexine> only problems ive had was with kde packages but nothing major otherwise
17:37:36FromDiscord<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:54FromDiscord<kiloneie> I know this is offtopic, but nobody is talking on topic at all
17:38:11FromDiscord<kiloneie> do we have less people active nowadays ?
17:38:51FromDiscord<aintea> Most people are too busy making revolutionary stuff using the best programming language (Nim)
17:40:57FromDiscord<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:10FromDiscord<odexine> https://archlinux.org/news/
17:41:37FromDiscord<odexine> well not even just that
17:42:29FromDiscord<kiloneie> too much decentralization ... no nobody told me of that at all
17:42:48FromDiscord<kiloneie> i usually went to the distro's forums and endeavour's ones have really helpful people
17:43:05FromDiscord<kiloneie> just googling the problem is a mixed bag
17:43:11FromDiscord<Salako Dolapo> sent a long message, see https://pasty.ee/zRXnjTOU
17:43:23FromDiscord<kiloneie> eh ?
17:43:27FromDiscord<kiloneie> this a bot ?
17:45:07FromDiscord<odexine> of course
17:45:28FromDiscord<odexine> assume 99% of the messages sending a telegram link are from bots
17:45:32FromDiscord<odexine> <@&371760044473319454>
17:47:31FromDiscord<nnsee> i have none of these banks
17:47:57FromDiscord<nnsee> not even "any other local bank" since they're not local
17:49:11FromDiscord<odexine> id be surprised if there was any mention of my bank since its japanese
17:52:09FromDiscord<majortrips1763> Okay .. so how to recreate Duff's Device in Nim? ;P
17:54:55Amun-Ra;)
17:55:00FromDiscord<fabric.input_output> In reply to @majortrips1763 "Okay .. so how": `{.emit: .}`
17:55:31FromDiscord<fabric.input_output> jk just make make a macro
17:55:57FromDiscord<majortrips1763> I have yet to delve into the AST Abyss
17:56:11FromDiscord<odexine> macro sure but basically you dont
17:56:24FromDiscord<fabric.input_output> In reply to @majortrips1763 "I have yet to": it's pretty shallow
18:00:47FromDiscord<double_spiral> is `nim_array.addr` the equivalent of passing an array into a function in c
18:01:03FromDiscord<double_spiral> if not what the correct way
18:01:07*Batzy_ joined #nim
18:01:18FromDiscord<double_spiral> Working with a c library that needs an array fyi
18:03:10FromDiscord<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:41FromDiscord<nnsee> yes, i think i would do `addr(nim_array[0])` as well like fabricio said
18:06:09FromDiscord<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:18FromDiscord<nnsee> someone can correct me if i'm wrong
18:06:59FromDiscord<fabric.input_output> yeah it's a value/stack type
18:07:22FromDiscord<fabric.input_output> careful of dangling pointers
18:57:04*coldfeet joined #nim
19:30:07FromDiscord<savantsupremellc> In reply to @demotomohiro "Recursively check each `NimNode`": oh ok yea that's what uh.... i want to make easier
19:30:08FromDiscord<savantsupremellc> is there a uh
19:30:12FromDiscord<savantsupremellc> any solutions for this or uh?
19:30:22FromDiscord<savantsupremellc> ....
19:30:48FromDiscord<savantsupremellc> i'm quite a beggining as i said previous but
19:30:50FromDiscord<savantsupremellc> as i understatnd it
19:30:58FromDiscord<savantsupremellc> ... that's quite a basic pattern that someone aught to have "simplified" into DSL
19:30:58FromDiscord<savantsupremellc> no?
19:32:19FromDiscord<savantsupremellc> well anyways
19:32:22FromDiscord<savantsupremellc> ill just go fuck myself
19:32:27FromDiscord<savantsupremellc> thanks again for the input
19:46:46FromDiscord<Robyn [She/Her]> ...?
20:13:12FromDiscord<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:13FromDiscord<michaelb.eth> except for this sandwich, which you can have for free↵ 🥪
20:26:26FromDiscord<Robyn [She/Her]> they left
20:31:39*coldfeet quit (Remote host closed the connection)
21:55:37FromDiscord<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:17FromDiscord<eightbit_dboy> Here's the `create.nim` https://media.discordapp.net/attachments/371759389889003532/1293331157290582046/create.nim?ex=6706fc00&is=6705aa80&hm=09f3bfbcb78b2c427e393727e779f6e4ac0a4e2a8f6511c3371ae28f61d87a68&
22:14:03FromDiscord<abisxir> Today I heard about nimskull, is it the future nim?
22:16:42FromDiscord<nervecenter> In reply to @abisxir "Today I heard about": lolno
22:16:51FromDiscord<majortrips1763> sent a code paste, see https://play.nim-lang.org/#pasty=XKfDHSAl
22:18:43FromDiscord<nervecenter> In reply to @majortrips1763 "Okay ... I think": What is the period for?
22:19:23FromDiscord<nervecenter> sent a code paste, see https://play.nim-lang.org/#pasty=teesSajT
22:19:28FromDiscord<majortrips1763> In reply to @nervecenter "What is the period": Well, that explains the error .. but I am confused by the rest..
22:19:55FromDiscord<majortrips1763> sent a code paste, see https://play.nim-lang.org/#pasty=poRLEvuD
22:20:43FromDiscord<majortrips1763> Having variable context change based on case and underscores is .. curiously non-intuitive
22:20:58FromDiscord<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:47FromDiscord<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:54FromDiscord<nervecenter> The fact that you had to construct this case kind of illustrates the point.
22:23:18FromDiscord<majortrips1763> honestly, if you look at the simplest cases .. it is more shocking
22:23:55FromDiscord<majortrips1763> sent a code paste, see https://play.nim-lang.org/#pasty=vHVROFiH
22:24:13FromDiscord<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:14FromDiscord<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:25FromDiscord<nervecenter> (edit) "and" => "an"
22:25:49FromDiscord<nervecenter> Types go a long way to adding lots of specificity to symbol definitions
22:27:04FromDiscord<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:09FromDiscord<majortrips1763> It generally looks like the case of the first character during the declaration decides the mapping...
22:28:20FromDiscord<nervecenter> That's probably true
22:28:33FromDiscord<majortrips1763> so thisIsA and ThisIsA will resolve differently
22:28:59FromDiscord<majortrips1763> just a 1 character caps difference gives you a different symbol?
22:32:44FromDiscord<majortrips1763> sent a long message, see https://pasty.ee/BWXiSnmm
22:35:34FromDiscord<einjonas> what are magic?
22:35:48FromDiscord<einjonas> is there a list of implemented magics?
22:40:59FromDiscord<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:11FromDiscord<majortrips1763> sent a code paste, see https://play.nim-lang.org/#pasty=uVxqoAub
22:44:13FromDiscord<majortrips1763> sent a code paste, see https://play.nim-lang.org/#pasty=eXWwaQXw
22:50:34FromDiscord<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:02FromDiscord<Elegantbeef> Nim is style insensitive you're not the first nor the last to act like the sky is falling
22:51:17FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/blob/devel/compiler/ast.nim#L459
22:51:20FromDiscord<Elegantbeef> For the magic
22:51:24FromDiscord<majortrips1763> sent a code paste, see https://play.nim-lang.org/#pasty=eMWRRNxZ
22:51:51FromDiscord<majortrips1763> (edit) "https://play.nim-lang.org/#pasty=tngGEVcm" => "https://play.nim-lang.org/#pasty=blKljejQ"
22:52:14FromDiscord<Elegantbeef> The reason style insensitivity exists is to make it so you can use whatever style you prefer
22:52:33FromDiscord<majortrips1763> Well, it isn't style insensitive is it?
22:52:40FromDiscord<Elegantbeef> It is
22:52:48FromDiscord<nervecenter> Seems like a kind of pedantic distinction
22:52:52FromDiscord<majortrips1763> It "mostly" is
22:53:25FromDiscord<nervecenter> Another opinion, stop worrying about it and make something
22:53:37FromDiscord<nervecenter> Advice that's worth what you paid for it
22:58:01FromDiscord<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:23FromDiscord<majortrips1763> https://nim-lang.org/docs/manual.html#lexical-analysis-identifier-equality
22:59:01FromDiscord<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:04FromDiscord<majortrips1763> sent a code paste, see https://play.nim-lang.org/#pasty=ulfDuOsc
23:00:01FromDiscord<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:14FromDiscord<majortrips1763> https://news.ycombinator.com/item?id=21393676
23:00:18FromDiscord<nervecenter> I told you above that I have a production codebase with no issues.
23:00:23FromDiscord<majortrips1763> But since you asked, I went ahead and searched for it
23:01:12FromDiscord<majortrips1763> And since I am merely trying to understand some behavior and its implications, you could kindly please stop attacking anything.
23:01:55FromDiscord<nervecenter> I guess we just value different things 🤷
23:01:59FromDiscord<Elegantbeef> Whilst it can be confusing it hardly is, if you want to prevent this behaviour you can use `--styleCheck:error` iirc
23:03:33FromDiscord<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:42FromDiscord<Elegantbeef> It does not
23:04:00FromDiscord<Elegantbeef> `importc` takes in a string parameter
23:04:28FromDiscord<Elegantbeef> for instance `proc myProc {.importc: "someCFunction".}` works just fine
23:04:31FromDiscord<majortrips1763> assuming that is the only way to interface into Nim
23:04:45FromDiscord<Elegantbeef> Nim has to mangle names regardless
23:04:54FromDiscord<Elegantbeef> You can `exportC` variables
23:05:49FromDiscord<Elegantbeef> Overloads, generics, and modules means you need to have symbol mangling
23:06:00FromDiscord<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:25FromDiscord<majortrips1763> (edit) "being" => "me"
23:07:16FromDiscord<Elegantbeef> People often complain about the style insensitivity so people often respond to it in such a manner
23:08:59FromDiscord<majortrips1763> sent a long message, see https://pasty.ee/QzWmoSVw
23:09:22FromDiscord<Elegantbeef> Pascal originally had case insensitivity and it used to prefix with `T` this is an evolution of that
23:09:45FromDiscord<Elegantbeef> Nim does not have a clear object table
23:09:49FromDiscord<Elegantbeef> It has a symbol table
23:09:58FromDiscord<majortrips1763> Well, it seems to have 2 symbol tables
23:10:02FromDiscord<Elegantbeef> It does not
23:10:14FromDiscord<Elegantbeef> It has one symbol table, and the users are supposed to follow a convention
23:10:36FromDiscord<majortrips1763> Did you see the output of the code?
23:10:39FromDiscord<Elegantbeef> I should say each module has a symbol table, but there is no differentiated symbol table
23:11:14FromDiscord<Elegantbeef> Nothing in that example indicates two tables
23:11:48FromDiscord<Elegantbeef> Symbols are normalized to remove `_` and any casing after the first character
23:12:30FromDiscord<majortrips1763> speaking of pedantic distinctions
23:13:01FromDiscord<Elegantbeef> I mean saying there are two symbol tables implies logic like C where `struct T` and `T` are valid
23:13:50FromDiscord<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:09FromDiscord<Elegantbeef> You could, but to what end?
23:14:35FromDiscord<majortrips1763> I am saying that, in regards to the behavior observed, the implementation doesn't really matter.
23:14:56FromDiscord<Elegantbeef> Sure then there is no point in even mentioning a symbol table if the implementation does not matter 😄
23:15:06FromDiscord<majortrips1763> It is kinda confusing either way really. Though I do appreciate the TObjectType reference.
23:15:17FromDiscord<Elegantbeef> The behaviour observed is one that the symbols are normalized which can be unintuitive
23:15:44FromDiscord<majortrips1763> Lol .. I am saying it is just as non-intuitive no matter how it is implemented.
23:15:46FromDiscord<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:24FromDiscord<Elegantbeef> Right I don't think anyone can reasonably disagree that it 100% intuitive
23:16:26FromDiscord<majortrips1763> oof .. my brain would have used `bInd` as some of binary index or something similar.
23:16:37FromDiscord<Elegantbeef> I mean reasonably agree
23:18:24FromDiscord<majortrips1763> I take it leading underscores in the final linked symbols are up to the C compiler?
23:18:39FromDiscord<Elegantbeef> Nim does not allow leading underscores
23:18:55FromDiscord<Elegantbeef> Identifiers cannot start with `_`
23:18:58FromDiscord<Elegantbeef> Nor end with them
23:19:00FromDiscord<majortrips1763> Yah .. but the C compiler might add them
23:19:07FromDiscord<majortrips1763> and often does
23:19:30FromDiscord<Elegantbeef> I've never seen it in properly exported symbols
23:19:40FromDiscord<majortrips1763> https://stackoverflow.com/questions/2627511/why-do-c-compilers-prepend-underscores-to-external-names
23:19:50FromDiscord<majortrips1763> It is like .. a universal behavior going back to 1971
23:20:44FromDiscord<Elegantbeef> Well then I'm just daft and tooling does not show it so I did not realise it existed
23:21:27FromDiscord<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:04FromDiscord<majortrips1763> So like, when I am trying to call symbols created by some other compiler .. the sumbol tables matter
23:22:10FromDiscord<majortrips1763> (edit) "sumbol" => "symbol"
23:23:58FromDiscord<Elegantbeef> You really are supposed to `exportc` any variable that matters
23:46:18FromDiscord<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.