<< 19-01-2024 >>

00:01:28*Onionhammer9 joined #nim
00:02:45*madprops_ joined #nim
00:05:31FromDiscord<Elegantbeef> There is no `=destroy` proc for that thype
00:05:33FromDiscord<Elegantbeef> type\
00:05:50FromDiscord<Elegantbeef> Ah nvm there is
00:09:11*redj_ joined #nim
00:09:48*redj quit (*.net *.split)
00:09:49*khazakar quit (*.net *.split)
00:09:49*madprops quit (*.net *.split)
00:09:49*Onionhammer quit (*.net *.split)
00:09:50*systemdsucks quit (*.net *.split)
00:09:52*Onionhammer9 is now known as Onionhammer
00:09:57*systemdsucks joined #nim
00:10:34*marcus quit (Remote host closed the connection)
00:12:19*marcus joined #nim
00:15:19*madprops_ is now known as madprops
00:15:19*madprops quit (Changing host)
00:15:19*madprops joined #nim
00:22:23*khazakar joined #nim
02:42:33*krux02 quit (Remote host closed the connection)
03:22:09FromDiscord<maxtachine> its so unfortunate its called like that ☠️ https://media.discordapp.net/attachments/371759389889003532/1197742768085278820/image.png?ex=65bc5fe0&is=65a9eae0&hm=723d443996824b3a526760238d87f918e6a2a7374bc3c4c8d43200e71be0813d&
03:25:03*disso-peach quit (Quit: Leaving)
05:18:53*flouer quit (Remote host closed the connection)
05:19:13*flouer joined #nim
07:09:16NimEventerNew thread by xioren: A little guidance on threading needed., see https://forum.nim-lang.org/t/10886
07:09:22*rockcavera quit (Remote host closed the connection)
07:10:27*PMunch joined #nim
07:11:33*advesperacit joined #nim
07:29:43*azimut quit (Ping timeout: 240 seconds)
08:26:20*jjido joined #nim
09:28:43*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
09:34:01*SchweinDeBurg joined #nim
09:48:05*rbvrs joined #nim
09:50:36*rbvrs quit (Client Quit)
10:37:20NimEventerNew thread by Pasu4: Cannot capture a Table[string, string], see https://forum.nim-lang.org/t/10887
10:42:23*krux02 joined #nim
11:03:58FromDiscord<kcvinker5420> @ElegantBeef Here it is https://media.discordapp.net/attachments/371759389889003532/1197858990625927168/image.png?ex=65bccc1e&is=65aa571e&hm=abd9ae8d7d7ff4b05337b8993a1a1d4c406247f08da1d4c95d2ef5e3feaad7b8&
11:51:04*noeontheend quit (Ping timeout: 268 seconds)
11:51:12*noeontheend joined #nim
11:51:13*mhcat quit (Ping timeout: 260 seconds)
11:51:56*adigitoleo quit (Ping timeout: 258 seconds)
11:52:55*mronetwo quit (Ping timeout: 268 seconds)
11:53:13*casaca quit (Ping timeout: 268 seconds)
11:58:13*noeontheend quit (Ping timeout: 255 seconds)
11:59:21*mhcat joined #nim
11:59:22*mronetwo joined #nim
11:59:25*adigitoleo joined #nim
11:59:31*noeontheend joined #nim
12:26:11*casaca joined #nim
12:47:36FromDiscord<MDuardo> sent a long message, see https://pasty.ee/LiChYubNyEbJ
12:53:46*azimut joined #nim
12:56:01*azimut quit (Remote host closed the connection)
12:56:25*azimut joined #nim
13:01:20NimEventerNew thread by drkameleon: Weird bug(?) with JS backend, see https://forum.nim-lang.org/t/10888
13:03:08*azimut quit (Remote host closed the connection)
13:03:51*azimut joined #nim
13:05:32PMunchMDuardo, another option is NimScript ;)
13:08:57FromDiscord<ayex> huh? had never heard of hjson - looks like a nice alternative to yml at first glance. 🤔
13:10:52*rockcavera joined #nim
13:11:46PMunchCertainly interesting
13:12:01PMunchHas anyone written a HJSON -> JSON parser in Nim?
13:12:59FromDiscord<MDuardo> I mean, it's just JSON but with comments and commas are optional
13:13:12FromDiscord<MDuardo> There was a lib but it's deprecated↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
13:13:19*azimut quit (Ping timeout: 240 seconds)
13:13:37FromDiscord<MDuardo> NimScript, I'll read about it
13:13:58*azimut joined #nim
13:14:16FromDiscord<nnsee> am i the only one who doesn't find this syntax intuitive at all? why is the first apostrophe on the same column as the colon? is it always like that or is it because it's four spaces from ^? https://media.discordapp.net/attachments/371759389889003532/1197891778930540604/image.png?ex=65bceaa7&is=65aa75a7&hm=43abd346bd6092db7776609e9983aced85b7e9c770448d43fe1275caff7b7a78&
13:14:21FromDiscord<nnsee> maybe it's just the example that's a bit confusing
13:16:19PMunchMDuardo, basically NimScript is what Nimble and Nim uses for configuration. It's also what macros are written in. You would define some global variables that makes up your config, then run the NimScript configuration, and then read out the variables. So the user can write any amount of logic in their configuration file :)
13:18:23FromDiscord<MDuardo> Maybe it's just the indentation space?↵(@nnsee)
13:18:41FromDiscord<nnsee> yeah that's what i meant with the latter
13:18:54FromDiscord<nnsee> that it's one indentation level deeper than the key
13:18:55FromDiscord<MDuardo> Ok, that would work for me↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
13:21:10*azimut quit (Remote host closed the connection)
13:22:32*azimut joined #nim
13:33:23*disso-peach joined #nim
13:36:17*jjido joined #nim
13:43:33FromDiscord<summarity> Is there a pragma that is equivalent to / emits a C `#define`
13:44:07FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=KUOAoUiVWEmk
13:44:25PMunch`{.emit: "#define <something>".}` is of course on option
13:44:55FromDiscord<Robyn [She/Her]> For the other various backends, you'll have to keep the fact that it's generating code for that backend, in mind
13:45:12FromDiscord<.__kenshin__.> https://forum.nim-lang.org/t/4242
13:45:27FromDiscord<Robyn [She/Her]> Idk if a C define works in C++ or ObjC, and it definitely won't work on the JS backend or with Nlvm
13:45:34FromDiscord<.__kenshin__.> (edit) "https://forum.nim-lang.org/t/4242" => "https://forum.nim-lang.org/t/4242↵↵see this"
13:46:00FromDiscord<.__kenshin__.> https://forum.nim-lang.org/t/4242
13:46:17FromDiscord<.__kenshin__.> that was asked here
13:46:33FromDiscord<Robyn [She/Her]> In reply to @.__kenshin__. "https://forum.nim-lang.org/t/4242": Does a Nim define emit a C define, though?
13:46:49FromDiscord<.__kenshin__.> no
13:47:06FromDiscord<.__kenshin__.> but you can make using these mentioned
13:47:55FromDiscord<Robyn [She/Her]> Assuming that Turbo @summarity specifically needs a C define to be emitted too
13:48:42FromDiscord<.__kenshin__.> who is that?
13:49:51FromDiscord<.__kenshin__.> nim in nim..c is c lol
13:52:15FromDiscord<.__kenshin__.> In reply to @chronos.vitaqua "Idk if a C": no it does work in c++
13:52:23FromDiscord<demotomohiro> You can use --passC like `--passC:"-DSOMEDEFINE"` to define.
13:53:03FromDiscord<Robyn [She/Her]> In reply to @.__kenshin__. "no it does work": Good to know, i didn't know for sure if it worked
13:53:12FromDiscord<.__kenshin__.> In reply to @chronos.vitaqua "Good to know, i": copl
13:53:19FromDiscord<.__kenshin__.> (edit) "copl" => "cool"
13:53:53FromDiscord<.__kenshin__.> In reply to @demotomohiro "You can use --passC": but they wanted something that you could define in the source code itself
13:53:56FromDiscord<Phil> Unrelated sidenote: Understanding all these low level things one after another is kinda dope.↵Like defining an event-loop in chronos.
13:54:37PMunch{.passC: "-DSOMEDEFINE".} also works
13:55:01PMunchUseful with `passL` in modules depending on some C module
13:55:16*jmdaemon quit (Ping timeout: 246 seconds)
13:55:44PMunch@Phil, one of the great benefits of doing a CS degree at a good university :)
13:56:25FromDiscord<Phil> In reply to @PMunch "<@180601887916163073>, one of the": Yeah, this is the kind of shit that I think a CS degree would've helped me with
13:58:59PMunchNote though that there are plenty of universities which doesn't do low level though
13:59:01FromDiscord<summarity> In reply to @PMunch "Useful with `passL` in": exactly my case
14:00:04FromDiscord<nnsee> In reply to @summarity "exactly my case": oh hey, I've seen you on the internet before
14:00:10FromDiscord<nnsee> you work on codeql, right?
14:00:13FromDiscord<summarity> yep
14:00:51FromDiscord<nnsee> neat! i use it for my work quite often (i work as a pentester)
14:01:25FromDiscord<summarity> Awesome :D. Are you in the SecLab Slack?
14:01:59FromDiscord<Robyn [She/Her]> CodeQL?
14:02:05FromDiscord<nnsee> nope, didn't realize it existed to be honest
14:02:19FromDiscord<nnsee> In reply to @chronos.vitaqua "CodeQL?": https://codeql.github.com
14:02:47FromDiscord<Robyn [She/Her]> Oh neat
14:03:55FromDiscord<summarity> In reply to @nnsee "nope, didn't realize it": https://gh.io/securitylabslack
14:05:03FromDiscord<nnsee> In reply to @summarity "https://gh.io/securitylabslack": cool, thanks! joined
14:15:17FromDiscord<Phil> In reply to @PMunch "Note though that there": Either way, given that I didn't go to CS universities I'm forced to learn this stuff now
14:15:31FromDiscord<Phil> Man, I imagine a world where I'd had just... 5 years earlier exposure to programming
14:16:29FromDiscord<Phil> The levels of competence I'd have, memory management wouldn't be weird to me since I'd most definitely have mastered that by then, I'd be able to write guaranteed correct code even in the eyes of valgrind and sanitizers etc.
14:17:02FromDiscord<Phil> I'd be able to debug owlkettle memory leak issues that valgrind finds and discern whether they actually are leaks or just resources that don't get cleaned up between GTK shutdown and application end
14:17:42FromDiscord<Phil> Playing catch up is rough
14:20:46FromDiscord<Robyn [She/Her]> Ooor your knowledge would be outdated because comp sci is a field that moves fast?
14:25:00PMunch!remindme 5 years
14:25:24FromDiscord<summarity> Tiny wrapper thing I need today for another project: https://github.com/turbo/dmon.nim
14:25:29PMunchI mean these are things which haven't changed much, so by that logic you should be good in five years time
14:26:03PMunchsummarity, oh cool
14:26:51PMunchThere is a lot to learn by hand-wrapping C libraries in Nim, but did you give Futhark a try?
14:28:19FromDiscord<summarity> The programming language? No
14:28:43FromDiscord<Robyn [She/Her]> In reply to @PMunch "I mean these are": Fair
14:28:43FromDiscord<Robyn [She/Her]> Soon ternary computing takes the world by storm /j
14:29:08PMunchDamn it.. Wish I knew about the language before I named my library..
14:29:20PMunchI was talking about this thing: https://github.com/PMunch/futhark
14:29:28PMunchAutomatic C wrapper
14:29:33FromDiscord<summarity> I only know about the language from the Codegolf SE community 😄
14:31:43FromDiscord<summarity> Ah, I see. I think I've come across this before. I found I actually don't mind wrapping by hand. I see Nim more as a convenient pre-processor for C (or C++). I'm working on a very large project where Nim needs to interface with a C++ codebase and C libraries and as you say, I've learned a lot (and discovered some nim bugs that have been fixed).
14:32:38PMunchWell, if you even want to save a couple hundred hours you know where to find it :P
14:32:52PMunchHand wrapping takes a looong time, especially on larger projects
14:38:41FromDiscord<Phil> In reply to @chronos.vitaqua "Ooor your knowledge would": Sure it moves fast, but principles don't change
14:38:56FromDiscord<Phil> You may get new ways to do the same thing, but push mechanisms remain push mechanisms and pull mechanisms remain pull mechanisms
14:39:12FromDiscord<Robyn [She/Her]> Fair
14:39:30FromDiscord<Phil> It's all about understanding the core problem, then understanding the solutions to them becomes a lot easier
14:39:35FromDiscord<Phil> (edit) "problem," => "problem first,"
14:48:21*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
14:50:48*flouer quit (Remote host closed the connection)
14:51:12*flouer joined #nim
15:06:01FromDiscord<Clonkk> I've got a SIGABORT raised on std/rdstdin, Is it fair to assume it's a RAM issue ? I don't see what else could cause a SIBABRT signal raised on readLineFromStdin
15:10:01FromDiscord<leorize> it's never lupus
15:10:23*rockcavera quit (Ping timeout: 256 seconds)
15:24:50*PMunch quit (Quit: Leaving)
15:25:09FromDiscord<Phil> In reply to @leorize "it's never lupus": Leorize, does nim has something like threadsignals somewhere or do I need to stitch that together with epoll and whatever the fuck on windows myself?
15:25:39FromDiscord<Phil> Well I guess I can at the very least try to steal chronos source code to the best of my abilities
15:25:39FromDiscord<leorize> basically
15:26:14FromDiscord<Phil> Though that looks like so much code to take responsibility for uuuuuugh
15:28:11FromDiscord<leorize> well we are getting CPS to run on nimskull \:p
15:28:15FromDiscord<Phil> I think just not supporting std/asyncdispatch for now may just be the easier solution since it entails having a lot more complex low-level code in my repo than I'd like
15:28:29FromDiscord<Phil> Id somebody wants it to be supported they can make an issue and PR themselves
15:28:49FromDiscord<Phil> (edit) "Id" => "If"
15:36:18FromDiscord<khazakar> In reply to @isofruit "Leorize, does nim has": Selectors won't work here as helper?
15:38:10FromDiscord<khazakar> And windows have iopoll I think
15:41:06FromDiscord<leorize> you can always emulate it with a pipe phil
16:07:46FromDiscord<Phil> In reply to @khazakar "Selectors won't work here": I have so far understood pipes and epoll, not selectors
16:08:08FromDiscord<Phil> In reply to @leorize "you can always emulate": Yeah I can but do I want to have and be forced to test that code is a different question
16:08:27FromDiscord<khazakar> In reply to @isofruit "I have so far": But selectors module contains wrappers around epoll etc
16:09:25FromDiscord<Phil> This may be running into "Docs don't sufficiently explain the way of usage to me" problem
16:09:59FromDiscord<leorize> you don't want to use selectors unless you're writing your own loop afaik
16:10:13FromDiscord<leorize> own loop here refers to your own asyncdispatch.poll
16:18:05FromDiscord<arnetheduck> In reply to @isofruit "<@449019668296892420> Thanks again for": good luck 😉
16:18:51FromDiscord<arnetheduck> chronos v4 release candidate: https://github.com/status-im/nim-chronos/pull/494 - release due next week unless something comes up
16:19:22FromDiscord<arnetheduck> (edit) "In reply to @isofruit "<@449019668296892420> Thanks again for": good luck 😉 ... " added "feel free to improve the docs if you learn something useful"
16:22:21FromDiscord<Phil> In reply to @arnetheduck "chronos v4 release candidate:": Looking forward to it, particularly since afaik threadSync is only available via #head (at least nimble install chronos does not download you a version with threadsync in it)
16:29:43*azimut quit (Ping timeout: 240 seconds)
16:35:13*azimut joined #nim
16:41:20*flouer quit (Remote host closed the connection)
16:41:42*flouer joined #nim
16:45:48*SchweinDeBurg quit (Quit: WeeChat 4.2.0-dev)
16:57:48FromDiscord<khazakar> In reply to @isofruit "This may be running": It's in docs :p
16:58:44FromDiscord<khazakar> https://media.discordapp.net/attachments/371759389889003532/1197948268315938876/Screenshot_20240119-175810_Mull_1.png?ex=65bd1f43&is=65aaaa43&hm=e223d9f78dfe353b4618664c3fbd012140620237c1f0e96e0309a2962f1c62c6&
16:59:05FromDiscord<Phil> That's not a usage explanation
16:59:25FromDiscord<Phil> That's a hint for when you already know your multithreading primitives and thus know the entire concept
16:59:30FromDiscord<khazakar> Yes, it's not, just tells what is being wrapped
16:59:31FromDiscord<Phil> It's docs written for those already in the know
17:05:15FromDiscord<khazakar> Yeah. For me it's easier to understand it when I compare polling to self-rotating doors at shopping malls
17:05:49FromDiscord<khazakar> Python docs better explain it tho :p
17:32:43FromDiscord<Phil> Hmm good names to describe a thread powerding down
17:32:49FromDiscord<Phil> Can't use sleep, that's a well defined name for a proc
17:32:55FromDiscord<Phil> That does something very specific
17:33:34FromDiscord<Phil> Or rather to describe a thread going into a low powered state, aka a name for a proc that does that
17:33:51entikanwhat's a good way to get nim bindings for devkitPro's libnds (vanilla c)? futhark? c2nim?
17:33:55FromDiscord<Phil> (edit) "powerding" => "powering"
17:34:18FromDiscord<Phil> I tend to summon PMunch for those kinds of questions
17:34:37entikanoh wait I think it needs to compile to arm9 or something, I'm probably oversimplifying again
17:34:46entikanbut it's still no-frills C
17:34:50FromDiscord<odexine> In reply to @isofruit "Or rather to describe": Suspend
17:35:38FromDiscord<Phil> In reply to @odexine "Suspend": perfect!
17:36:03FromDiscord<odexine> Probably best to refer to how computers refer to them going into those actual states too lol
17:36:11FromDiscord<odexine> Directly from thinking about how they’re named for laptops
17:36:51FromDiscord<odexine> Though I don’t understand the idea of a thread going “low power”
17:40:02FromDiscord<Phil> In reply to @odexine "Though I don’t understand": essentially it awaits a thread-signal and blocks on that in a waitFor block.↵This is essentially me implementing arne's example on how to use chronos in a loop with "interruptable" polling↵https://forum.nim-lang.org/t/10873
18:06:19*icebattle joined #nim
18:22:19FromDiscord<Phil> Is there a way to use a local nimbledeps folder with a nim c command instead of .nimble/pkgs?
18:22:58FromDiscord<Phil> I know when I launch a command via nimble x it'll use the nimbledeps folder, but if I just do "--path:./nimbledeps" that won't fully work and I don't want to specify a --path flag for every subdir in the nimbledeps folder
18:24:27FromDiscord<michaelb.eth> could use shell expansion so you specify a path for every subdir, but not manually
18:25:17FromDiscord<michaelb.eth> I did that very thing for `nim c` many moons ago, can’t recall specifics atm though
18:32:10FromDiscord<Phil> In reply to @michaelb.eth "I did that very": You don't perchance know if there's a way for chronos to "only do remaining work until dispatcher is empty and then continue" , do you?
18:32:53FromDiscord<michaelb.eth> what do you mean by “then continue”?
18:33:04FromDiscord<michaelb.eth> as in not block/park?
18:33:41FromDiscord<Phil> "Block until all async work is done", basically after the while-loop of the threadServer is broken (aka it is shutting down) I want to wrap up all the async work before finishing
18:34:33FromDiscord<leorize> run `nimble setup` and it will generate you a nice nim.cfg
18:35:17FromDiscord<Phil> nope, you get a config.nims
18:35:22FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#pasty=nTnWTdjbWJEJ
18:35:45FromDiscord<leorize> nimble.paths is a valid nim.cfg, though ;)
18:35:50FromDiscord<Phil> Not entirely sure what that does
18:36:06FromDiscord<leorize> it's a text file, you know
18:36:19FromDiscord<Phil> nimble.paths?
18:36:55FromDiscord<Phil> ... it is, how did that full into gitignore territory
18:37:14FromDiscord<leorize> because nimble setup also setup the ignores
18:37:23FromDiscord<leorize> which is dumb I tell you
18:38:47FromDiscord<Phil> So it should now via compiler magic "just know" to import from nimbledeps, right?
18:39:07FromDiscord<michaelb.eth> hmm, no, I don’t know of such a mechanism, have you tried searching the docs?
18:39:32FromDiscord<michaelb.eth> whoops, that was supposed to be a reply to Phil
18:39:32FromDiscord<Phil> I know --path, that's pretty much it
18:40:33FromDiscord<Phil> nim dump confirmed me most of my stu..... wait a second
18:40:35FromDiscord<michaelb.eth> In reply to @isofruit ""Block until all async": have you tried searching the chronos API docs?
18:40:57FromDiscord<Phil> Oh god damnit, threading is an optional dependency depending on the flags the user uses
18:41:04FromDiscord<Phil> and thus it's not in the paths
18:42:09FromDiscord<Phil> It also somehow forgot chronos wtf
18:42:37FromDiscord<Phil> There we go, compiles now
18:43:28*icebattle quit (Quit: Client closed)
18:50:15*jjido joined #nim
18:50:53FromDiscord<Robyn [She/Her]> In reply to @isofruit "Hmm good names to": Suspend, freeze, pause, rest
18:51:51FromDiscord<Robyn [She/Her]> In reply to @entikan "what's a good way": Futhark would be your best bet, if you want a clean wrapper tho, then you'd wrap it manually↵Futhark does the grunt of the work for you tho so I'd suggest that
18:52:04FromDiscord<Robyn [She/Her]> In reply to @odexine "Suspend": ah ignore me
19:05:01FromDiscord<Phil> Okay we're getting somwhere, getting memory leaks from chronos now, I'm assuming this is outstanding work not being cleaned up on thread-exit
19:06:19*flouer quit (Read error: Connection reset by peer)
19:07:34FromDiscord<Phil> Its not a per message thing but it still somehow manages to leak 36KB by the end of the test
19:08:45FromDiscord<Phil> (edit) "36KB" => "19KB"
19:10:38*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
19:11:06FromDiscord<Phil> Okay, debugging chronos memory leaks is sth else.↵This is the stacktrace of my direct leak (got a bunch of indirect ones):
19:11:17FromDiscord<Phil> https://media.discordapp.net/attachments/371759389889003532/1197981621735919656/message.txt?ex=65bd3e54&is=65aac954&hm=9852c6f1fbc2647439182e2440a3852387457977b11b75adea3b8d5657c94570&
19:12:02FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#pasty=UjwjuayyntUk
19:28:53FromDiscord<Robyn [She/Her]> The futures maybe?
19:28:57FromDiscord<Robyn [She/Her]> Idk
19:32:34entikanthanks robyn
19:32:43entikanI'll give it a whirl
19:32:55*azimut quit (Ping timeout: 240 seconds)
19:33:14*azimut_ joined #nim
19:33:30*azimut_ quit (Remote host closed the connection)
19:38:31*azimut joined #nim
19:55:32FromDiscord<Phil> The thing is that with std/asyncdispatch the solution was just to nil the global dispatcher
19:55:40FromDiscord<Phil> If I pull that with chronos it'll throw an assertiondefect
20:00:12FromDiscord<Phil> Ohhhhh call `=destroy` on it instead!
20:00:31FromDiscord<Phil> However, tsan completely blows up, holy crap
20:02:45FromDiscord<damocles_1605> So Nim does have threading and memory management so long as I want to compile into C++ yes?
20:07:04FromDiscord<Phil> sent a long message, see https://pasty.ee/qlyMcUxlagkC
20:07:26FromDiscord<damocles_1605> aight that answers my question.
20:07:29FromDiscord<Phil> And by threading, I mean you can spawn threads with a proc to execute in any backend that isn't JS (afaik)
20:07:45FromDiscord<damocles_1605> I probably should have just asked, yes pointers or no pointers.
20:08:00FromDiscord<Phil> Can pointers but not recommended pointers
20:08:06FromDiscord<Phil> Nim has ref types instead which are managed
20:08:14FromDiscord<Phil> via automatically inserted hooks
20:15:15FromDiscord<damocles_1605> No idea what that means yet. I just know basic Java. But I want to move unto something I might prefer and also expand the scope of experiences. Nim seems to fit the bill. I don't plan on programming as a career but I want to have some understanding of it.
20:20:56FromDiscord<Phil> In reply to @damocles_1605 "No idea what that": You ever noticed the difference between a java object and an int?↵In how one is pass by value and the other "pass-by-reference", aka if you manipulate an object in a function outside of the function you'll see the object have that change, while if you pass it an int and manipulate that int it won't?
20:21:24FromDiscord<Phil> Actually never mind, that doesn't describe the difference well, hmm
20:22:17FromDiscord<Phil> Basically a reference is exactly the same as a pointer, with the difference that nim takes care of dealing with it for you.↵A pointer (derived from what it means in C) just means "points to a piece of memory in C", freeing that is something you must do manually with a proc that deallocates
20:23:16FromDiscord<damocles_1605> In reply to @isofruit "You ever noticed the": After every comma I feel there are more tenses or subjects missing. What am I passing an int into?
20:23:36FromDiscord<Phil> Into a function
20:24:11FromDiscord<luteva> Hi! I am wondering: I have a folder "pkgs" in my ~/.nimble folder with dozens of libs in there and I have a "pkgs2" folder in my ~/.nimble folder with only 3 libs.↵I guesss that this is because i have installed many libs while using nim version 1.x and i only installed a few libs since is installed nim version 2. Is that correct? And if yes: Can I use the libs from nim version 1.x also for nim version 2.x? Or should i install the libs ag
20:24:59FromDiscord<damocles_1605> In reply to @isofruit "Into a function": Wait so we are talking about changing the original function vs just using the value within a given function and keeping a local reference for it?
20:25:50FromDiscord<Phil> In reply to @damocles_1605 "Wait so we are": Nah, I fucked up there and tried to go into "pass-by-value" vs. "pass-by-reference" when I actually wanted to explain "managed memory with references" vs "unmanaged memory with pointers"
20:29:58FromDiscord<Phil> In reply to @luteva "Hi! I am wondering:": Honestly most libs are fine, the jump from 1.6 to 2.0 was not massive
20:30:09FromDiscord<Phil> If any of you 1.X libs is not ready, you'll notice with compiler errors
20:30:40FromDiscord<Phil> However, what is far better for your sanity is either using atlas or at the very least adding a nimbledeps folder to your project and running nimble setup
20:30:55FromDiscord<Phil> Why? Because then you have a directory with all the packages that you use inside it and can check what you're using
20:31:32FromDiscord<Phil> Believe me, it might take a year or two until you get to that point, but you will eventually get somewhere where a subtle version bug will drive you mad
20:32:04FromDiscord<Phil> And being able to directly sanity check what code you're using with a nimbledeps directory will help a lot there
20:32:40FromDiscord<Phil> The mechanism I speak of with nimbledeps is mentioned here: https://github.com/nim-lang/nimble#nimbles-folder-structure-and-packages
20:32:56FromDiscord<luteva> didn't know atlas at all... gonna have a look at atlas 🙂
20:33:53FromDiscord<Phil> It's also safer in some respects, so I'm planning on migrating soon-ish myself once I can spend enough focus on doing so
20:34:21FromDiscord<Phil> Still utterly stuck on memory leaks. Not drastic ones and in very special, non-standard memory configurations, but still!
20:36:56FromDiscord<luteva> this one, right? https://github.com/nim-lang/atlas
20:41:10FromDiscord<luteva> ah ok an isolated workspace. yes that's nice 😄
20:41:36FromDiscord<luteva> (edit) "😄" => "👍"
21:14:09*krux02 quit (Remote host closed the connection)
21:18:19FromDiscord<nasuray> In reply to @luteva "this one, right? https://github.com/nim-lang/atlas": FYI Seems like Araq is cooking up a big refactor on atlas that will change how it manages state and dependencies (for the better).
21:47:47FromDiscord<Robyn [She/Her]> ...hm, would it be a stupid idea to glue together something for a chat platform that doesn't have the REST API yet?
21:48:51FromDiscord<Phil> I am not familiar what you're building, what do you mean?
21:49:23FromDiscord<Robyn [She/Her]> I dn't even know tbh
21:49:46FromDiscord<Robyn [She/Her]> Basically a chat platform API with the HTTP layer not included (yet)
21:50:01FromDiscord<Phil> I mean, chat is typically done via websockets nowadays
21:50:09FromDiscord<Phil> Strictly speaking you don't need HTTP at all
21:50:29FromDiscord<Phil> I'd still use it for client --> Server part of the communication, simply because for POST requests I'd want an answer from the server and not have to design my own
21:50:37FromDiscord<Phil> But it's doable without even that
21:50:52FromDiscord<Robyn [She/Her]> In reply to @isofruit "I mean, chat is": True but that feels inconvienient :p
21:52:05FromDiscord<Phil> I'd honestly claim that the alternative isn't really a good idea
21:52:19FromDiscord<Phil> Like, your ideas there are polling or long polling, both of which will be a PITA
21:52:19FromDiscord<Robyn [She/Her]> I meant moreso during the dev process
21:52:29FromDiscord<Robyn [She/Her]> It'd just be functions without the HTTP API implemented yet
21:52:36FromDiscord<Phil> (edit) "ideas" => "alternatives"
21:52:56FromDiscord<Robyn [She/Her]> Until I get to a point where I fleshed out enough of the chat server code
21:53:10FromDiscord<Robyn [She/Her]> Then I'd implement a HTTP layer on top of this :p
21:53:12FromDiscord<Phil> So is this a question on what backend functionality you need to write if you ignore controllers?
21:53:23FromDiscord<Phil> Or is this about frontend functionality if you ignore backend?
21:53:24FromDiscord<nnsee> In reply to @chronos.vitaqua "It'd just be functions": yes that's absolutely fine
21:53:36FromDiscord<nnsee> it's a separation of implementation from the interface
21:53:41FromDiscord<Robyn [She/Her]> Ras understands! I'm just so tired and always mushy brained xD
21:53:46FromDiscord<Phil> Maybe memory leak researching is burning my brain here
21:53:53FromDiscord<Robyn [She/Her]> In reply to @nnsee "it's a separation of": Yeah ehe
21:53:59FromDiscord<nnsee> and you can absolutely work on the implementation before the interface
21:54:20FromDiscord<Phil> In reply to @nnsee "it's a separation of": I mean yeah, but is it abstracting away the backend call in the FE or the control layer for the BE?
21:54:38FromDiscord<Phil> (edit) "control" => "controller"
21:54:40FromDiscord<Robyn [She/Her]> This still means I need to figure out how I should handle database stuff... Raw SQL, a query builder or an ORM...
21:54:49FromDiscord<nnsee> i usually do it the other way around, make stub API endpoints so i have a rough idea and plan on how I'll go about implementing everything
21:54:50FromDiscord<Robyn [She/Her]> In reply to @isofruit "I mean yeah, but": This is related to the backend
21:54:58FromDiscord<Phil> Ah, basically you only want to implement the service and repository layers
21:55:00FromDiscord<Robyn [She/Her]> I do not touch frontend
21:55:02FromDiscord<Robyn [She/Her]> Yeah!
21:55:17FromDiscord<Phil> Sure you can implement those first
21:55:21FromDiscord<Robyn [She/Her]> In reply to @nnsee "i usually do it": I tried doing that for every attempt so far but it gets so convoluted and I lose my motivation sadly
21:55:32FromDiscord<nnsee> the backend API is just the frontend to the frontend
21:55:34FromDiscord<Robyn [She/Her]> So I'm gonna try going about it a different way
21:55:39FromDiscord<nnsee> fair enough
21:55:57FromDiscord<Phil> In reply to @nnsee "the backend API is": And the backend calls in the frontend are just the backend of the frontend 😄
21:56:35FromDiscord<nnsee> i write applications with only backends, no frontends. the frontend? actually a backend
21:56:53FromDiscord<Phil> "The backend? Also a backend"
21:57:01FromDiscord<Phil> "This HTML? Believe it or not, also backend"
21:57:07FromDiscord<Phil> "This JS File? Straight backend"
21:57:31FromDiscord<Phil> "This file instantiating tons of widgets? Definitely backend"
21:57:56FromDiscord<Phil> (edit) "Definitely" => "Double"
21:59:02FromDiscord<nnsee> In reply to @isofruit ""This HTML? Believe it": you jest but recently it's been kind of hard to tell the difference
21:59:31FromDiscord<Phil> I mean, generally everything in between database and HTML gets kinda wonky in definition
21:59:49FromDiscord<Phil> HTML itself I haven't yet encountered scenarios where I'd consider it a backend
22:00:18FromDiscord<Phil> but everything in between? You have layers upon layers that interact and everyone as to one side the FE and to the other the BE
22:01:57FromDiscord<nnsee> In reply to @isofruit "HTML itself I haven't": may i introduce you to .net blazor, where the only front end is mouse click coordinates and key presses, and everything else (dom rendering, navigating pages, etc) happens on the server side and where existence is hell
22:02:17FromDiscord<Phil> you lost me at .net
22:02:27FromDiscord<Phil> Not content-wise, interest-wise
22:03:05FromDiscord<Phil> Likely a character-flaw of mine, but at this point I look at MS provided frameworks/languages and just go "ehhhhhhhhhhhh I'd rather not"
22:04:02FromDiscord<muddmaker> Blazor is legendary for its awful performance
22:04:14FromDiscord<Phil> it is?
22:04:24FromDiscord<Phil> Isn't it written in C# or sth which should be doing alright in that regard?
22:04:41FromDiscord<muddmaker> For the frontend, that doesn't translate well
22:04:41FromDiscord<Phil> I mean sure, could be awful C# but I'd assume MS knows at least somewhat what they're doing
22:04:51FromDiscord<Phil> The programming paradigm?
22:05:26FromDiscord<Robyn [She/Her]> In reply to @nnsee "may i introduce you": That sounds horrid
22:05:35FromDiscord<muddmaker> The only wasm frontend frameworks that get somewhat OK performance are all written in Rust, and they are still around 4% slower at best for non-compute heavy tasks
22:05:42FromDiscord<Robyn [She/Her]> In reply to @isofruit "Isn't it written in": It's because they shove the .NET runtime into WASM :p
22:06:11FromDiscord<muddmaker> Wasm doesn't get to share strings with the DOM's runtime, so there's a lot of string copying that has to happen
22:06:34FromDiscord<Robyn [She/Her]> In reply to @muddmaker "The only wasm frontend": Yeah that's to be expected since it also has to do JS interop for the DOM functionality and stuff, which means a lot of stubs and as Muddmaker said, copying
22:06:38FromDiscord<Phil> So basically WASM remains in the space of "Only use for number crunch" ?
22:06:53FromDiscord<Robyn [She/Her]> I'm all for replacing JS with WASM but it needs to mature 😔
22:07:05FromDiscord<muddmaker> Sort of... there are some rust frameworks like leptos that are almost competitive
22:07:17FromDiscord<muddmaker> It performs better than react
22:07:19FromDiscord<Robyn [She/Her]> In reply to @isofruit "So basically WASM remains": Probably until native DOM APIs for WASM, but there's some that exist so
22:07:32FromDiscord<Robyn [She/Her]> In reply to @muddmaker "It performs better than": Huh neat! Isn't React loaded though?
22:08:09FromDiscord<muddmaker> React is fairly slow for a modern JS framework. Still _way_ better than Blazor, though
22:08:28FromDiscord<muddmaker> Here's the benchmark site that most JS people use: <https://krausest.github.io/js-framework-benchmark/2023/table_chrome_120.0.6099.62.html>
22:08:35FromDiscord<muddmaker> Doesn't include karax, though
22:09:41FromDiscord<muddmaker> But compiling to JS would be a generally better tactic for now. Compiling the whole .NET runtime into WASM and running it in the browser is.... uh....
22:10:04FromDiscord<muddmaker> There's a lot of fancy stuff that leptos and others have to do to make itself competitive with JS
22:10:19FromDiscord<Phil> Huh, Angular did better than I anticipated
22:10:27FromDiscord<Phil> I assumed it to be at best middle of the pack
22:11:06FromDiscord<Robyn [She/Her]> In reply to @muddmaker "There's a lot of": Fair
22:12:26FromDiscord<nnsee> I've really been enjoying react (and TS) as of late
22:12:38FromDiscord<nnsee> has been a really pleasant developer experience
22:13:07FromDiscord<muddmaker> My favorite web framework is whatever pays the bills
22:13:12FromDiscord<Robyn [She/Her]> I refuse to touch the realm of JS :p
22:13:27FromDiscord<Phil> It's.... well it's bad, but it can be alright
22:13:34FromDiscord<Phil> If you have competent colleagues
22:13:39FromDiscord<Phil> And not insane deadlines
22:13:46FromDiscord<muddmaker> They all suck, but some suck less than others
22:14:02FromDiscord<Phil> That you're supposed to reach while your only FE teammates are junior devs that haven't internalized company standards yet
22:14:14FromDiscord<Phil> This may be sounding entirely too close to my current situation
22:14:58FromDiscord<muddmaker> While both are in development, SolidStart + Drizzle are probably going to be the best frameworks to use in combination that the JS world has to offer
22:15:52FromDiscord<nnsee> In reply to @isofruit "If you have competent": luckily, I'm working alone on this project and don't have any hard deadlines for this. Many soft deadlines, though, that I can just say "oh I haven't finished it yet"
22:16:02FromDiscord<nnsee> it's been a fun tinkering project
22:16:16FromDiscord<Phil> In reply to @nnsee "luckily, I'm working alone": Man, I fucking wish
22:16:26FromDiscord<Phil> One of my juniors is pretty alright and getting up there
22:16:41FromDiscord<Phil> But the second one actively reduces my productivity by at least 50% whenever I have to help them up
22:16:44FromDiscord<Phil> (edit) "up" => "out"
22:17:18FromDiscord<Phil> With nothing sticking that you tell em, so glad I'm finally getting a senior for backup
22:17:28FromDiscord<Phil> (edit) "em," => "the second one,"
22:17:40FromDiscord<luteva> waht do i have to do to update a depenency where i changed the source? So in my nim app i use a dependency "import mydep" where mydep is not mine, it's installed from github. now, i would like to add a proc to mydep, that i would like to use in my nim app.↵so what do i have to do to use the updated version of mydep in my app?↵- compile the mydep lib, and then ...?
22:19:29FromDiscord<nnsee> In reply to @isofruit "But the second one": we're not a large enough company to even have juniors or seniors, so yeah
22:20:12FromDiscord<Phil> In reply to @luteva "waht do i have": Do you use requires in your nimble file?
22:20:23FromDiscord<luteva> yes
22:21:07FromDiscord<Phil> Basically:↵1) Fork the project↵2) Do your changes↵3) Replace what's inside the requires block with the HTTP url to your fork
22:21:34FromDiscord<Phil> Oh wait, you use Atlas, errrr
22:21:46FromDiscord<Phil> I bet you can `atlas install <http-url>` or so
22:22:02FromDiscord<luteva> ok but i still have to fork, first?
22:22:10FromDiscord<nnsee> doesn't atlast have its own vendoring mechanism?
22:22:13FromDiscord<Phil> Aye, so you have your own version of the package
22:22:18FromDiscord<nnsee> maybe i'm misremembering
22:22:19FromDiscord<luteva> i can't use the local environment?
22:22:23FromDiscord<Phil> In reply to @nnsee "doesn't atlast have its": I'd need to know what that means first
22:22:45FromDiscord<Phil> In reply to @luteva "i can't use the": Oh you can, having a repo just means you're not screwed if you need to build from another machine
22:22:55FromDiscord<nnsee> In reply to @isofruit "I'd need to know": https://stackoverflow.com/questions/26217488/what-is-vendoring
22:23:01FromDiscord<Phil> If having it all local works, well you have some kind of nimbledeps folder right?
22:23:12FromDiscord<Phil> Something where all your locally used libs are in for this particular project
22:23:16FromDiscord<Phil> You can just do the changes in there
22:24:44FromDiscord<Robyn [She/Her]> Atlas seems cool but looking at Cargo when I used it, I liked it
22:25:59FromDiscord<Robyn [She/Her]> Nimble just feels odd and I'm not sure why
22:26:40FromDiscord<Phil (he/him)> ping
22:26:55*rockcavera joined #nim
22:27:00FromDiscord<Phil> Oh wow, the bridge just did not transfer an entire section of the chat
22:27:02FromDiscord<nnsee> nimble feels only slightly better than a well written shell script
22:27:44FromDiscord<Robyn [She/Her]> In reply to @isofruit "Oh wow, the bridge": It does that
22:27:57FromDiscord<Robyn [She/Her]> In reply to @nnsee "nimble feels only slightly": I avoid bash at all costs
22:28:03FromDiscord<Robyn [She/Her]> Nimble is better than bash but oof
22:28:20FromDiscord<Robyn [She/Her]> I think I'd like Cargo for Nim...maybe I should do something like that :P
22:29:20FromDiscord<Robyn [She/Her]> I keep getting new ideas, I need to put a lid on it
22:30:39FromDiscord<nnsee> I like to keep a to-do list of all of my ADHD ideas that I re-read every now and then
22:30:55FromDiscord<Robyn [She/Her]> ...Huh that's genius!
22:30:57FromDiscord<nnsee> when it still feels like a good idea or something I'd want to do a year later, I'll do it
22:31:22FromDiscord<Robyn [She/Her]> Thanks for the idea :D
22:34:24FromDiscord<Robyn [She/Her]> Hm so first thing I need: Account management
22:43:35FromDiscord<Robyn [She/Her]> `sentinel` shall be the model name :)
22:43:41FromDiscord<Robyn [She/Her]> What does a `#?` comment mean-
22:45:06FromDiscord<mratsim> In reply to @chronos.vitaqua "I think I'd like": Cargo is good
22:49:15FromDiscord<Robyn [She/Her]> Indeed!
22:52:02FromDiscord<luteva> In reply to @isofruit "If having it all": works now, thx!
22:55:36*jjido joined #nim
22:56:45FromDiscord<damocles_1605> So, out of curiosity. I understand Nim can compile into C++, but thats different from it being converted to C++ right?
22:57:00FromDiscord<damocles_1605> I can't simply make Nim code turn into C++ code for the convenience of non-nim users right?
23:13:14FromDiscord<Elegantbeef> Damn the bridge missed a lot
23:13:39*advesperacit quit ()
23:13:56FromDiscord<ElegantBeef> @damocles_1605 it generates C++ code it does not generate idiomatic C++