<< 16-09-2023 >>

00:00:13FromDiscord<kingterrytheterrible12> In reply to @isofruit "If you want a": bro we should ask araq why the book isnt FREE in FREEDOM
00:00:47FromDiscord<Phil> No because why the fuck would it be
00:01:47FromDiscord<Phil> I'm aware you're partially jesting here, but I dislike entitled sentiment in general, even stated in jest.
00:01:50FromDiscord<kingterrytheterrible12> In reply to @isofruit "No because why the": it isnt FOSS compliaint
00:02:10FromDiscord<kingterrytheterrible12> In reply to @isofruit "I'm aware you're partially": if the book was FOSS compliaint i would have donated
00:02:12FromDiscord<Elegantbeef> As much as I understand why it's not free, information should be free
00:02:20FromDiscord<kingterrytheterrible12> yes
00:02:42FromDiscord<kingterrytheterrible12> its just the same as locking articles behind paywalls
00:04:57FromDiscord<Phil> On the one hand yes, on the other got to eat and we don't have UBI.
00:05:47FromDiscord<Phil> That is more directed at news articles, less at araq
00:05:50FromDiscord<kingterrytheterrible12> In reply to @isofruit "On the one hand": you get to eat by selling support for your compiler
00:05:57FromDiscord<kingterrytheterrible12> thats how like most compilers and langs make money
00:06:19FromDiscord<kingterrytheterrible12> far more viable than books
00:06:25FromDiscord<Phil> Pretty sure that is to a degree what's happening, was more about the paywall'd bits
00:06:32FromDiscord<Phil> (edit) "Pretty sure that is to a degree what's happening, was more about the paywall'd bits ... " added "with articles"
00:07:04FromDiscord<kingterrytheterrible12> also how much is status paying araq ngl
00:07:08FromDiscord<kingterrytheterrible12> probably something bad
00:07:11FromDiscord<kingterrytheterrible12> like 10k a year
00:07:54FromDiscord<Phil> Whole load of nanya in my personal opinion, and thus irrelevant
00:08:34FromDiscord<kingterrytheterrible12> tf does nanya mean
00:08:38FromDiscord<kingterrytheterrible12> nyacat?
00:08:51FromDiscord<Phil> Nanya business
00:09:37FromDiscord<kingterrytheterrible12> WHAT DOES THAT MEAN
00:09:57FromDiscord<sOkam! 🫐> how can I `execShellCmd` from within a specific folder as current working dir?↵https://nim-lang.org/docs/os.html#execShellCmd%2Cstring↵I've been doing `cd mydir; mycmd`... but apparently windows doesn't like it? 🤔
00:10:15FromDiscord<Phil> None of your business
00:10:31FromDiscord<kingterrytheterrible12> In reply to @isofruit "None of your business": bro just tell me what it means ngl
00:10:34FromDiscord<kingterrytheterrible12> no need to be rude
00:10:39FromDiscord<Elegantbeef> Damn phil sokam was just asking a question
00:11:15FromDiscord<Phil> https://idioms.thefreedictionary.com/nunya↵Seems its more typed like nunya? Know it more the other way round
00:11:17FromDiscord<Elegantbeef> Use `execProcess` instead
00:11:27FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "Use `execProcess` instead": that doesn't run a shell
00:11:33FromDiscord<Elegantbeef> noneya is betterer
00:11:33FromDiscord<sOkam! 🫐> and, as such, i lose output
00:11:40FromDiscord<kingterrytheterrible12> In reply to @isofruit "https://idioms.thefreedictionary.com/nunya Seems it": ye bro i wanna know how much status giving araq
00:11:47FromDiscord<kingterrytheterrible12> status is pretty dead message app
00:11:49FromDiscord<sOkam! 🫐> (edit) "and, as such, i lose ... output" added "instantaneous"
00:12:05FromDiscord<Phil> In reply to @kingterrytheterrible12 "ye bro i wanna": This has stopped being actually nim programming related like 10 messages ago, we move this to offtopic
00:12:06FromDiscord<Elegantbeef> `poEvalCommand`?
00:12:14FromDiscord<kingterrytheterrible12> In reply to @isofruit "This has stopped being": ok
00:12:21FromDiscord<kingterrytheterrible12> so you just send this disccusion to die
00:12:22FromDiscord<kingterrytheterrible12> xd
00:13:54FromDiscord<sOkam! 🫐> doesn't poEvalCommand just send the text as it is? does that actually affect how the command is actually run?
00:14:27FromDiscord<Elegantbeef> No clue I don't have a doctorate in shelling out 😄
00:14:39FromDiscord<sOkam! 🫐> like, the problem with gorge and execCmd... they both eat the output themselves and store it, and then give it back. but i want to keep the normal cli output of the command
00:14:54FromDiscord<sOkam! 🫐> like execShellCmd does, basically
00:17:06*krux02 quit (Remote host closed the connection)
00:21:35FromDiscord<Elegantbeef> `poParentStreams`?
00:23:02FromDiscord<sOkam! 🫐> hmm will try that one, could be 🤔
00:55:05FromDiscord<thedistantforest> sent a code paste, see https://play.nim-lang.org/#ix=4GuC
00:55:45FromDiscord<thedistantforest> (edit) "https://play.nim-lang.org/#ix=4GuC" => "https://play.nim-lang.org/#ix=4GuE"
00:55:56FromDiscord<thedistantforest> (edit) "https://play.nim-lang.org/#ix=4GuE" => "https://play.nim-lang.org/#ix=4GuF"
00:56:06FromDiscord<thedistantforest> (edit) "https://play.nim-lang.org/#ix=4GuF" => "https://play.nim-lang.org/#ix=4GuG"
01:08:41FromDiscord<Elegantbeef> Seems to be a windows specific issue in the binding
01:13:51FromDiscord<thedistantforest> mmm, it's using naylib, so I'll probably just report it there? Also can I just get away with using setLen as a workaround for now?
01:14:15FromDiscord<Elegantbeef> You're likely going to run into the issue again, but sure if it works
01:14:48FromDiscord<thedistantforest> Yeah I think i might run into the issue again...
01:42:52FromDiscord<gogolxdong666> where has db_mysql gone?
01:52:36FromDiscord<gogolxdong666> https://github.com/nim-lang/db_connector
02:05:07FromDiscord<millymox> Did then nim vscode extension update? I have no syntax highlighting
02:05:10FromDiscord<millymox> Anymore
02:08:50FromDiscord<millymox> https://media.discordapp.net/attachments/371759389889003532/1152425829456941098/RPReplay_Final1694830074.mov
02:09:21FromDiscord<millymox> https://media.discordapp.net/attachments/371759389889003532/1152425961204232232/RPReplay_Final1694830074.mov
03:00:41*disso-peach quit (Quit: Leaving)
03:09:06FromDiscord<_nenc> maybe you need the more recently updated Nim extension? there are three extensions named with Nim
03:25:51FromDiscord<that_dude.> When I have issues, I simply restart vscode. Make sure you have the one published by Saem
03:28:29FromDiscord<ravinder387> go to File - Auto save and tick auto save
03:28:44FromDiscord<ravinder387> then you get syntax highlighting
03:30:04FromDiscord<millymox> I restarted vscode and it fixed it
03:30:06FromDiscord<millymox> Weird
03:30:32FromDiscord<millymox> sent a code paste, see https://play.nim-lang.org/#ix=4GuX
04:13:42*rockcavera quit (Remote host closed the connection)
05:16:42NimEventerNew thread by 3-2-1: "Benchmarking the Beast" update, see https://forum.nim-lang.org/t/10486
05:33:06*ntat joined #nim
05:36:04FromDiscord<sOkam! 🫐> In reply to @millymox "Can someone help me": just compile and run the file
05:36:30FromDiscord<sOkam! 🫐> if you store it in the `tests` folder, you can run `nimble test` and it will run all files inside there
05:36:40FromDiscord<sOkam! 🫐> (edit) "if you store it in the `tests` folder, you can run `nimble test` and it will run all files inside there ... " added "that start with `t`"
05:59:58FromDiscord<sOkam! 🫐> is there a way to access the value of `--nimcache:...` from inside the file being compiled?
06:14:15*ntat quit (Ping timeout: 240 seconds)
06:15:53FromDiscord<odexine> i dont think so?
06:16:41FromDiscord<odexine> what's your goal?
06:17:01FromDiscord<Elegantbeef> Doesnt futhark do this?
06:17:18FromDiscord<odexine> with a separate program no?
06:20:59FromDiscord<sOkam! 🫐> In reply to @odexine "what's your goal?": calling an external buildsystem to build a lib that then I `{.link: "thefile.a".}` inside the compiled flag↵there is no other way to build rust code from nim, and relying on the user to having already done that process is way worse than calling cargo from nimc
06:21:54FromDiscord<sOkam! 🫐> problem is that right now its building inside `.nimble/pkgs2/wgpu ..../some/sub/folder` and I would prefer if it outputs its compiled cache into nimcache, since its heavy AF (2gb)
06:21:58FromDiscord<sOkam! 🫐> (edit) "AF" => "af"
06:23:04FromDiscord<sOkam! 🫐> I understand I could just add a `const cacheDir {.strdefine.} = "..."` value, but I was wondering if --nimcache value is already accessible without requiring that extra -d:cacheDir on top of --nimcache
06:23:20FromDiscord<odexine> well if futhark does it then perhaps it is
06:23:32FromDiscord<sOkam! 🫐> how does it do it?
06:24:56FromDiscord<sOkam! 🫐> oh i found some lead into the matter. I'll follow the tracks↵https://github.com/PMunch/futhark/blob/a216f5ba6b57a1a338deed64a555193e4e4568b8/src/futhark.nim#L679
06:25:34FromDiscord<odexine> https://nim-lang.org/docs/compilesettings.html#querySetting%2CSingleValueSetting
06:25:45FromDiscord<odexine> forgot about this module
06:26:22FromDiscord<sOkam! 🫐> oh damn, that is huge for me. been doing so many hacks around this module 🙈
06:26:32FromDiscord<sOkam! 🫐> (edit) "oh damn, that is huge for me. been doing so many hacks around ... this" added "not knowing"
06:30:41FromDiscord<toma400> sent a long message, see http://ix.io/4GvE
06:30:45FromDiscord<astrolemonade> In reply to @isofruit "On the one hand": What's UBI?
06:31:07FromDiscord<huantian> universal basic income
06:40:28FromDiscord<sOkam! 🫐> hellyeah, worked. been wanting this for so long! 🥳 https://media.discordapp.net/attachments/371759389889003532/1152494191365083187/image.png
06:44:58*ntat joined #nim
06:53:41FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4GvJ
06:54:49FromDiscord<sOkam! 🫐> could some form of `distinct` help with name resolution in some way?
07:02:12FromDiscord<odexine> instance.addr is ptr ptr InstanceImpl
07:02:25FromDiscord<odexine> though that's not related to your issue
07:02:39FromDiscord<odexine> (edit) "issue" => "issue, it is possibly something you didn't intend to do"
07:03:48FromDiscord<odexine> instance.addr.repr() -> iirc repr dereferences typed pointers so it's trying to dereference your ptr InstanceImpl but InstanceImpl is opaque so its not valid to dereference IIRC
07:04:37FromDiscord<sOkam! 🫐> `instance.repr()` is hitting the same issue though
07:04:48FromDiscord<odexine> it would]
07:04:49FromDiscord<odexine> (edit) "would]" => "would"
07:04:54FromDiscord<sOkam! 🫐> ty for noticing the bug, didn't see that
07:04:56FromDiscord<odexine> cast it to a void pointer
07:05:10FromDiscord<odexine> or cast it to a pointer-sized uint and print that
07:05:42FromDiscord<sOkam! 🫐> casting did work, yep
07:07:30FromDiscord<sOkam! 🫐> ty rika, was really stuck with this one 🙏
07:18:00*rockcavera joined #nim
07:29:17FromDiscord<Phil> sent a long message, see http://ix.io/4GvQ
07:31:15FromDiscord<odexine> well if it says so...
07:32:33FromDiscord<Phil> I'm just wondering if that implies that something else needs to be done regarding multithreaded code.↵I can only assume what lock levels did, so I'm left in the dark on whether new protection measures are necessary now or not
07:32:37FromDiscord<odexine> locks: 0 is deprecated in favour of locks: [list of locks]
07:32:45FromDiscord<odexine> https://nim-lang.org/docs/manual.html#guards-and-locks
07:34:32FromDiscord<Phil> I don't see a statement on what locks: 0 means =/
07:37:54FromDiscord<odexine> https://nim-lang.org/0.20.0/manual_experimental.html#guards-and-locks-lock-levels
07:38:31FromDiscord<Phil> Here I was trying to find that on the docs of 1.6.12
07:39:07FromDiscord<odexine> https://nim-lang.org/1.6.12/manual_experimental.html#guards-and-locks-lock-levels
07:39:40FromDiscord<Phil> What in the .... ohhhhh it's under experimental
07:39:44FromDiscord<Phil> No wonder I can't find it
07:39:48FromDiscord<Phil> That keeps tripping me up
07:41:33FromDiscord<toma400> Coming back to Python after doing Nim is very weird experience. I miss so many things Nim has, and barely embrace OOP system that is Python's advantage.↵Especially lack of overloading and enums... holy heck, those are so integral parts of my programming now thanks to Nim.
07:42:10FromDiscord<Phil> In reply to @odexine "https://nim-lang.org/docs/manual.html#guards-and-lo": So basically we can't express anymore that no lock will be acquired in this code?
07:42:20FromDiscord<toma400> (edit) "Nim." => "Nim.↵Also somehow I find Python more verbose, like it doesn't prevent you writing lengthy code as much as Nim (or is it easier for Nim? Can't say for sure)"
07:42:22FromDiscord<odexine> python has some bastardly implementation of enums
07:42:31FromDiscord<Phil> At least I don't see any hint in that regard in the 2.0 docs
07:42:36*fallback quit (Ping timeout: 248 seconds)
07:42:38FromDiscord<odexine> In reply to @isofruit "So basically we can't": i dont think you need to anymore, yes
07:51:41*def- quit (Quit: -)
07:53:38*def- joined #nim
07:57:09*Mister_Magister quit (Read error: Connection reset by peer)
07:57:24NimEventerNew thread by Isofruit: Warning: 'Lock levels' are deprecated, now a noop - Is there a replacement for locks: 0 ?, see https://forum.nim-lang.org/t/10487
07:58:55*Mister_Magister joined #nim
07:59:13FromDiscord<Phil> In reply to @odexine "i dont think you": To be on the safe side (Since owlkettle is a larger thing and not my framework) I opened a forum thread about it.↵I take that as my current ground stance and if nobody disagrees with it I'll likely go ahead and propose a PR that removes the locks: 0 pragmas
07:59:34FromDiscord<Phil> (edit) "In reply to @odexine "i dont think you": To be on the safe side (Since owlkettle is a larger thing and not my framework) I opened a forum thread about it.↵I take ... thatlocks:0" added "the assumption" | "the assumptionthat ... asbase" added "locks:0 is now unnecessary" | "ground" => "base"
08:04:12*om3ga quit (Read error: Connection reset by peer)
08:06:48*om3ga joined #nim
08:42:07FromDiscord<Elegantbeef> Locks are a deprecated feature @Phil
08:42:37FromDiscord<Elegantbeef> There is no replacement
08:42:50FromDiscord<Phil> In reply to @Elegantbeef "Locks are a deprecated": ... what?↵In general? How does that make sense ? Locking shared mutable memory is like a fundamental feature
08:42:52FromDiscord<Elegantbeef> Use tags and effects for the same
08:43:00FromDiscord<Elegantbeef> Lock levels
08:43:03FromDiscord<Elegantbeef> I meant of course
08:43:12FromDiscord<Phil> Ohhhh okay, that makes more sense
08:43:52FromDiscord<Phil> Now regarding tags and effects, keep in mind that the code that is annotated with those lock:0 pragmas is procs that get handed in by users of owlkettle
08:44:02FromDiscord<Phil> So this is more an enforcement mechanism of code the user hands the framework
08:44:22FromDiscord<Phil> So unless there's tags on lock-feature code that can be used here there is effectively no equivalent
08:44:39FromDiscord<Elegantbeef> Right and if you force the procs to have a `tag: [NoLock]` on any proc they pass, there you go 😄
08:45:06FromDiscord<Elegantbeef> It's not like you could not override lock levels anyway iirc
08:45:09FromDiscord<Phil> Because it's kinda moot if owlkettle defines a tag you need to tag your procs with when owlkettle has no means of actually validating that and the compiler not validating it themselves
08:46:07FromDiscord<Phil> At that point it just becomes a means of annoying the user with no benefit since you could've also just mentioned the "Don't acquire locks in widget-hooks" paradigm in the docs
08:46:17FromDiscord<Elegantbeef> Lock levels are completely deprecated since they are just complicated and I do not think they solved anything in reality
08:46:18FromDiscord<Phil> The value lies in the validation
08:48:29FromDiscord<Elegantbeef> Why does owlkettle even care if you access a lock inside of it's callbacks?
08:48:35FromDiscord<Phil> Beats me
08:48:49FromDiscord<Phil> I just deal with the warning popping up in the terminal when I compile the examples for testing
08:48:55FromDiscord<Phil> (edit) "I just ... deal" added "want to"
08:49:09FromDiscord<Elegantbeef> Are you sure that the reason it was there was not just due to lock level inference being a pain
08:49:27FromDiscord<Phil> My PfP is a fruit with glasses
08:49:45FromDiscord<Phil> While that looks intellectual: Does that look like somebody actually have an idea of multithreaded code in nim
08:49:50FromDiscord<Elegantbeef> Right and mines a dog that has a tongue that looks like it's CGI'd
08:49:54FromDiscord<Phil> (edit) "have" => "having"
08:50:27FromDiscord<Phil> Can.l will be able to clear this up anyhow I think.
08:50:41FromDiscord<Elegantbeef> I'm going out on a limb and saying it's purely due to the inference issue
08:51:13FromDiscord<Phil> In reply to @Elegantbeef "I'm going out on": Do you usually not go out on limbs?
08:51:28FromDiscord<Elegantbeef> I mean I do walk on two
08:51:30FromDiscord<Phil> I thought those were kinda essential for the walking bit
08:51:52FromDiscord<Elegantbeef> Hey that's the same joke
08:52:50FromDiscord<nnsee> beef, what does your name mean
08:52:54FromDiscord<Elegantbeef> Uncertain if you do not realise the actual origin of that term
08:52:59FromDiscord<Elegantbeef> well phrase
08:53:23FromDiscord<Phil> It's english, I can barely be bothered to no the origin of sayings in my actual mother tongue
08:53:27FromDiscord<Phil> (edit) "no" => "know"
08:53:36FromDiscord<Elegantbeef> My name means fuck all in a tin ship
08:54:17FromDiscord<Phil> No your name is a lie, it means beefing with somebody in an elegant manner yet you do not do so elegantly!
08:56:23FromDiscord<Phil> It would actually be neat to know whether owlkettle 3.0 is targetted to be nim2 only or nim1.6 and nim2
08:56:51FromDiscord<Phil> The changes to destructors make supporting nim 1.6. not impossible, but slightly annoying
08:57:38FromDiscord<Elegantbeef> Hey arc/orc is the way to use Nim
08:58:51FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4Gwa
08:58:56FromDiscord<Elegantbeef> That'll solve your problem
08:59:06FromDiscord<Elegantbeef> Replace `locks: 0` with `locker`
08:59:09FromDiscord<Elegantbeef> call it a day
09:00:01FromDiscord<Phil> TF is locker?↵Let me go doc diving
09:00:08FromDiscord<Elegantbeef> It's a pragma pragma
09:00:14FromDiscord<Elegantbeef> We introduced a new pragma named `locker`
09:00:35FromDiscord<Elegantbeef> we use that trick to support old Nim and remove the warning from new Nim, in a relatively painless way
09:03:10FromDiscord<Phil> Do I need to export that ?
09:03:19FromDiscord<odexine> No
09:03:19FromDiscord<Phil> I only know pragmas as macros, never used the pragma pragma syntax
09:03:24FromDiscord<odexine> You can’t export them
09:03:37FromDiscord<odexine> You have to place it into a separate file and include that
09:03:39FromDiscord<Phil> Wait I have like 3 modules that'd need this, so I'd need to copy-paste it?
09:03:49FromDiscord<Phil> Ohh include.... damn
09:03:49FromDiscord<odexine> Sure that too
09:05:53FromDiscord<Phil> So I've found the 1 single usecase for include
09:05:54FromDiscord<Phil> Got it
09:06:10FromDiscord<Elegantbeef> Which can be replaced with a macro, but it's too much work
09:06:39FromDiscord<Elegantbeef> You also of course could just do `{.push warning[LockLevel]: off.}`
09:06:47FromDiscord<Elegantbeef> Then pop it after
09:07:53FromDiscord<Chronos [She/Her]> Hey Beef, you know if there's any way to save the state of the wasm3 interpreter to resume later?
09:08:09FromDiscord<Elegantbeef> There are like 20 procs inside wasm3
09:08:32FromDiscord<Chronos [She/Her]> Which don't do that afaik
09:08:51FromDiscord<Chronos [She/Her]> But if I could just poke the internal struct... :P
09:08:54FromDiscord<Elegantbeef> `getMemory` might be the trick
09:09:03*nisstyre quit (Server closed connection)
09:09:06FromDiscord<Elegantbeef> You can poke the internal struct
09:09:23*nisstyre joined #nim
09:11:43*cm quit (Ping timeout: 264 seconds)
09:12:00*cm joined #nim
09:12:37FromDiscord<enthus1ast> I use it quite often for unittesting↵(@Phil)
09:14:35FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "`getMemory` might be the": Hm but locals too
09:14:52FromDiscord<Chronos [She/Her]> Also the current instruction it's running
09:17:02FromDiscord<enthus1ast> Btw has one tried dietlib libc with nim yet?
09:17:33FromDiscord<enthus1ast> This one\: https://www.fefe.de/dietlibc/
09:18:23FromDiscord<Chronos [She/Her]> Why that instead of musl?
09:19:02FromDiscord<enthus1ast> Idk what's the difference
09:19:15*junaid_ joined #nim
09:19:45FromDiscord<enthus1ast> Fefe is a well known german hacker, that's the only reason I know about his libc
09:21:07FromDiscord<Chronos [She/Her]> https://github.com/wasm3/wasm3/issues/268 hm reading this, but it doesn't mention needing to save locals?
09:21:12FromDiscord<Chronos [She/Her]> In reply to @enthus1ast "Fefe is a well": Ah alright
09:23:20FromDiscord<enthus1ast> https://www.etalabs.net/compare_libcs.html
09:23:59FromDiscord<enthus1ast> It's way smaller than musl
09:24:51FromDiscord<Phil> Given how musl has a fair ecosystem around it and seems small enough to me, musl seems nicer
09:25:46FromDiscord<enthus1ast> Yeah
09:26:29FromDiscord<Phil> I mean smaller is of course better, just in this case the tradeoff with the cost of change seems meh
09:35:07NimEventerNew thread by Dabod: How to properly compare a tuple mixed ranges and int with a tuple with ints?, see https://forum.nim-lang.org/t/10488
09:50:04*cm quit (Ping timeout: 245 seconds)
09:50:54*cm joined #nim
10:02:40FromDiscord<Chronos [She/Her]> Nimsaem's extension does not like me trying to edit the compiler and stuff, no code jumping or type hover preview
10:02:56FromDiscord<Chronos [She/Her]> Autocomplete is also broke... should I use another editor? If so, which one?
10:03:29FromDiscord<odexine> It’s not a matter of the extension but of the suggestion engine, which every other extension and editor (aside from JetBrains’) uses
10:04:04FromDiscord<odexine> Jetbrains’ editor also does not have either of those features (it has rudimentary autocomplete)
10:05:22FromDiscord<Chronos [She/Her]> Oof...
10:05:29FromDiscord<Chronos [She/Her]> This sucks major ass
10:05:36FromDiscord<Chronos [She/Her]> Oh well
10:09:19FromDiscord<Chronos [She/Her]> I wonder if PMunch's lsp does anything to make it a tad better hm
10:10:28FromDiscord<odexine> No
10:10:36FromDiscord<odexine> It also uses the same suggestion engine
10:11:02FromDiscord<odexine> Well, I cannot say for sure that it won’t help but I have my doubts
10:11:21FromDiscord<odexine> It depends on what the real issue is, or why the extension is failing
10:11:26FromDiscord<ieltan> Personally never managed to make lsp reliably work on vscode
10:11:27FromDiscord<jmgomez> The extension could do better TBH but yeah, Rika is right there is a fundamental issue. The compiler partially has jump to definitions though
10:11:32FromDiscord<sOkam! 🫐> What's stopping the knowledable guys from improving the issues of nimsuggest?
10:11:34FromDiscord<odexine> If the issue is at the suggestion engine then the LSP will not help
10:11:54FromDiscord<odexine> In reply to @heysokam "What's stopping the knowledable": Architectural issues and time
10:11:56FromDiscord<sOkam! 🫐> Are there any big flaws in its design or something, or is it just highly complex code to work with? or whats the issue?
10:12:03FromDiscord<odexine> Both
10:12:18FromDiscord<odexine> And also that people don’t want to work on it
10:12:32FromDiscord<sOkam! 🫐> why is that so?
10:12:45FromDiscord<ieltan> Well there have been attempts to improve it, look at all the IC iterations, but everytime there is something bad about it and they go back to scratch
10:12:47FromDiscord<odexine> That depends on the person?
10:12:48FromDiscord<jmgomez> In reply to @odexine "And also that people": Probably this is the biggest issue
10:13:17FromDiscord<sOkam! 🫐> yeah but i figure if nobody wants to work on it, there must be something common between them
10:13:36FromDiscord<odexine> It’s likely because of exactly the architectural issues
10:13:39FromDiscord<Chronos [She/Her]> Rip
10:13:46FromDiscord<odexine> And the fact that it’s gonna be a lot of work
10:13:52FromDiscord<Chronos [She/Her]> Wonder if there's any point on starting from scratch
10:13:52FromDiscord<jmgomez> One can say there are more important things to do
10:13:52FromDiscord<ieltan> People have worked on IC which is supposed to improve the situation
10:14:10FromDiscord<ieltan> But it's still not ready
10:14:21FromDiscord<jmgomez> IC can help but it wont automagically improve the extensions
10:14:31FromDiscord<ieltan> Ofc
10:14:32FromDiscord<jmgomez> contrarty to popular believe 😛
10:14:44FromDiscord<jmgomez> (edit) "contrarty" => "contrary"
10:14:51FromDiscord<odexine> Is IC really going to help or we’re most of us just told that it will
10:14:52FromDiscord<Chronos [She/Her]> Hm
10:15:00FromDiscord<odexine> In reply to @jmgomez "contrary to popular believe": Belief :Gladsuna:
10:15:39FromDiscord<jmgomez> In reply to @odexine "Is IC really going": it may to some extend, not in its current form
10:15:54FromDiscord<sOkam! 🫐> whats the solution. write something new?
10:16:05FromDiscord<jmgomez> the idea is that it will speed up nimsuggest
10:16:05FromDiscord<odexine> Lol no, that’s almost never the solution
10:16:32FromDiscord<jmgomez> but right now is slow than just compiling the code without it
10:16:43FromDiscord<sOkam! 🫐> yeah pretty much
10:16:57FromDiscord<odexine> NGL I program in Nim without any suggestion or IDE tooling
10:16:58FromDiscord<jmgomez> I would say that to continue working on NimSuggest for macro expansion and stuff but to use another provider for regular definitions/suggestions
10:17:45FromDiscord<odexine> In reply to @odexine "NGL I program in": So I don’t mind that much what happens in the completion tooling space
10:18:01FromDiscord<jmgomez> Im trying to help with IC because I want to give it a shot to use the road files as source for the provider rather than just Nim ast
10:18:01FromDiscord<odexine> Maybe that’s just because it’s so poor in the first place though
10:18:24FromDiscord<sOkam! 🫐> Yeah I figure. but people do care, and thats one of the most user-facing tools of the language
10:18:38FromDiscord<sOkam! 🫐> if such a big tool is clumsy, what image does it give about the lang
10:18:45FromDiscord<sOkam! 🫐> its not one thing, of course... but it does matter
10:19:00FromDiscord<jmgomez> yes, a lack of a really working extension I think is the one blocker on adoption. I dont care much but I see the value
10:19:03FromDiscord<odexine> Of course
10:21:53FromDiscord<sOkam! 🫐> go to definition across libraries, and across entire folders, does have a LOT of value
10:22:20FromDiscord<sOkam! 🫐> just that fact alone makes the lsp 100% worth the memory hog
10:23:16FromDiscord<ieltan> Also really useful to peek at a function's type signature
10:23:43FromDiscord<ravinder387> what discard do?
10:23:54FromDiscord<sOkam! 🫐> In reply to @ravinder387 "what discard do?": `do nothing`
10:24:12FromDiscord<ravinder387> when should i write?
10:24:24FromDiscord<sOkam! 🫐> when you want to explicitely not use the output of a function
10:24:27FromDiscord<ieltan> Instead of pulling out a browser tab, go to the library docs, go back to the editor, forget what a function does, cry a little bit 😁
10:24:36FromDiscord<ravinder387> demonstrate me with example if possible
10:25:17FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4Gwu
10:25:30FromDiscord<ravinder387> thank you.. let me make note
10:27:12FromDiscord<sOkam! 🫐> sent a code paste, see https://paste.rs/6Wms9
10:27:37FromDiscord<sOkam! 🫐> (edit) "https://play.nim-lang.org/#ix=4Gwx" => "https://play.nim-lang.org/#ix=4Gww"
10:29:33FromDiscord<.aingel.> What's the main formatter that people use? Do people use nimpretty?
10:31:10FromDiscord<kots> my eyes and fingers
10:32:56FromDiscord<Phil> In reply to @.aingel. "What's the main formatter": I do not use a formatter is the answer for the most part.↵nimpretty is "alright", but I don't particularly jive with the way it writes code
10:33:21FromDiscord<Chronos [She/Her]> In reply to @odexine "So I don’t mind": Issue is for bigger projects tho
10:33:52FromDiscord<Chronos [She/Her]> I can program easily in nano, but editing the compiler is not something I can do without an IDE easily
10:34:11FromDiscord<Chronos [She/Her]> In reply to @isofruit "I do not use": Nimpretty did not like how I indented stuff and kept adding more indents every run lmao
10:35:47FromDiscord<.aingel.> What is IC?
10:35:57FromDiscord<.aingel.> In reply to @chronos.vitaqua "Nimpretty did not like": Yeah it did some sort of weird thing to my file
10:36:16FromDiscord<.aingel.> I was wondering if it was some sort of standard. I found some other nim formatter on github but it seems to be abandoned
10:36:40FromDiscord<Chronos [She/Her]> In reply to @.aingel. "What is IC?": Incremental compilation
10:36:50FromDiscord<Phil> In reply to @.aingel. "What is IC?": Incremental Compilation, basically not having to recompile an entire project every time but only the bits that changed
10:36:55FromDiscord<.aingel.> In reply to @chronos.vitaqua "Incremental compilation": Oh cool
10:37:05FromDiscord<Chronos [She/Her]> Yeah, not ready nor usable atm tho oof
10:37:08FromDiscord<.aingel.> Which languages implement that?
10:37:27FromDiscord<Chronos [She/Her]> The major C compilers do I believe
10:38:31FromDiscord<Chronos [She/Her]> Tho why is IC so hard? Can't you save a hash of the file being compiled, and have the root node of each file have a hash associated with it (of the file) and then just load it?
10:38:57FromDiscord<Chronos [She/Her]> Just literally save the `PNode`s as files that can be loaded?
10:42:06FromDiscord<.aingel.> In reply to @chronos.vitaqua "The major C compilers": Wait so nim has to recompile every single file?
10:42:21FromDiscord<.aingel.> I thought it worked like a c compiler that only compiled like files that changed
10:44:22FromDiscord<Chronos [She/Her]> In reply to @.aingel. "Wait so nim has": Yeaaah
10:44:33FromDiscord<.aingel.> Oh no
10:44:39FromDiscord<Chronos [She/Her]> It compiles it's files to C but doesn't actually do incremental compilation rn
10:44:49FromDiscord<.aingel.> I guess I've never really built a large nim project to notice that
10:44:52FromDiscord<Chronos [She/Her]> Usually it's not much of an issue but for big projects (see the compiler), takes ages
10:47:21FromDiscord<.aingel.> Right
10:50:34FromDiscord<BanannaMan> sent a code paste, see https://play.nim-lang.org/#ix=4GwF
10:51:43FromDiscord<odexine> In reply to @BanannaMan "I hate when that": there's a reason it's like this in nim
10:51:48FromDiscord<BanannaMan> Why?
10:51:59FromDiscord<odexine> it prevents forgetting to use the returned value?
10:52:37FromDiscord<BanannaMan> What if I only want to return the value and have it displayed in the console?
10:53:12FromDiscord<odexine> huh?
10:53:19FromDiscord<odexine> what do you mean exactly
10:53:39FromDiscord<BanannaMan> i mean what if I want to return the value after some sort of operation
10:54:00FromDiscord<BanannaMan> Do I have to use echo instead of return?
10:55:15FromDiscord<odexine> i seriously dont know what you mean by that
10:55:16FromDiscord<Chronos [She/Her]> That... doesn't make sense really
10:58:37FromDiscord<.aingel.> Whats the status of IC?
10:58:43FromDiscord<.aingel.> https://github.com/nim-lang/Nim/pull/20540
10:58:49FromDiscord<.aingel.> This is the last issue I could find on it
11:01:53*armin left #nim (#nim)
11:04:52FromDiscord<toma400> In reply to @BanannaMan "What if I only": If you want to display sth in console, you need to use the value. Return itself does nothing, no matter if you do it in Nim or Python, or whatever else language.
11:05:54FromDiscord<toma400> So if you want to print it out into stdout, you use return - that counts as use, no issue.↵If you don't want to print it out, then you don't need return, or you simply add `discard yourReturningProc` if you crazily need to return but not use.
11:05:57FromDiscord<.aingel.> In reply to @odexine "i seriously dont know": When did your status change from kanon to anon
11:06:28FromDiscord<.aingel.> (edit) "In reply to @odexine "i seriously dont know": When did your status change from kanon to anon ... " added "😏"
11:08:05FromDiscord<jmgomez> In reply to @.aingel. "https://github.com/nim-lang/Nim/pull/20540": you shouldnt be looking at issues but PRs
11:18:21FromDiscord<.aingel.> https://www.reddit.com/r/nim/comments/167qzdl/why_to_learn_nim/jysmpdg/
11:18:27FromDiscord<.aingel.> What do you guys think of this comment
11:18:42FromDiscord<.aingel.> sent a long message, see http://ix.io/4GwM
11:26:44FromDiscord<toma400> I was wondering how Nim macros can affect professional experience considering it's easy to write DSLs & such. This sounds like both a possibility for great enhancement as well as possible pain in the back, depending on implementation.↵If company implements some nice DSL and has a lot of documentation on it, I think this may be very good thing. If there's no docs and/or DSL is counterintuitive/hermetic, it may be indeed a recipe for fail
11:27:08FromDiscord<toma400> (edit) "I was wondering how Nim macros can affect professional experience considering it's easy to write DSLs & such. This sounds like both" => "sent" | "possibility for great enhancement as well as possible pain in the back, depending on implementation.↵If company implements some nice DSL and has a lot of documentation on it, I think this may be very good thing. If there's no docs and/or DSL is counterintuitive/hermetic, it may be ind
11:28:24FromDiscord<toma400> Especially as "overuse of macros" is issue you can even encounter in plain C, it doesn't make C a bad language.
11:28:35FromDiscord<Phil> sent a long message, see http://ix.io/4GwO
11:30:12FromDiscord<sOkam! 🫐> In reply to @.aingel. "> > I": You could write the exact same literal words (except, you could add a book-long rant about templates) if you did that for C++↵That quote has literally nothing to do with the language, and everything to do with the engineers working -with- that language as their tool
11:30:20FromDiscord<Phil> It's definitely a mess that nim enables by being this flexible and not having as much/no tooling to narrow you down (linters especially, or stuff like sonarqube to notify you of code-smells).↵It requires more mastery of general programming in order to not have things devolve into a mess.↵But is that something where nim is a special outlier? I can't judge that.
11:30:41FromDiscord<Phil> (edit) "you" => "your options"
11:31:30FromDiscord<Phil> I'd say java is better in that regard, but java also facilitates and promotes monsters of OO code and I just can't get on board with that paradigm and its implications for readability
11:32:30FromDiscord<Phil> (edit) "and" => "which is an architecture level where sonarqube can't save you. And" | "that" => "the OO"
11:35:28FromDiscord<Phil> I could definitely see tooling to enable more modularity be appreciated though. Something that allows you to cordon off an entire folder and you can't interact with it through anything but the <foldername>.nim barrel file.↵Having something that "enforces" that in a sense or allows you something like java-modules I could see being useful.
11:35:51FromDiscord<BanannaMan> Okay
11:36:01FromDiscord<Phil> (edit) "I could definitely see tooling to enable more modularity be appreciated though. Something that allows you to cordon off an entire folder and you can't interact with it through anything but the <foldername>.nim barrel file.↵Having something that "enforces" that in a sense ... orsth" added "rather than having to rely on convention for that to work" | "rather than having to rely on convention for that to workor ... allows" adde
11:36:15FromDiscord<BanannaMan> What is meant by using the value? Changing it?
11:37:10FromDiscord<Phil> How are you replying to and in reference to what?
11:37:14FromDiscord<Phil> (edit) "How" => "Who"
11:39:36FromDiscord<BanannaMan> In reply to @isofruit "Who are you replying": I was talking to toma. Y'know, despite me knowing how to program for 12 years, I never mastered any language. I'm hoping I can master nim and then go back to the other languages to master them as well.
11:41:17FromDiscord<Phil> Oh that. Okay so you know how return of a proc makes it's return available to the calling proc?
11:41:25FromDiscord<Phil> (edit) "return" => "returned value"
11:44:53FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4GwW
11:46:11FromDiscord<Phil> For the rare cases where you actually want to execute a proc and do not care for what it returns, there you can use "discard" where you explicitly throw away what the proc hands you:↵`discard return5()`↵You do that kind of thing when a proc e.g. writes a file and returns you the exact text that was written etc.
11:46:24FromDiscord<Phil> (edit) "written" => "written, but you do not care for that text in your usecase"
11:50:38FromDiscord<Chronos [She/Her]> I am very much struggling to work on my new backend thing solely because I'm trying to get the initial code for it to work (basically the help screen)
11:56:50FromDiscord<jmgomez> In reply to @chronos.vitaqua "I am very much": what are you trying to do? Creating a new compiler backend?
11:57:34FromDiscord<Phil> sent a long message, see http://ix.io/4Gx0
11:58:30FromDiscord<jmgomez> I wouldnt separate them at all
11:58:44FromDiscord<Phil> All runtime configs or all compiletime configs?
11:59:49FromDiscord<jmgomez> I guess it depends on what you are doing but for instance in NUE users can have a `game.json` to specify some options, and they dont care if some are applied at runtime/compile time or any other time
11:59:59FromDiscord<Chronos [She/Her]> In reply to @jmgomez "what are you trying": Yep
12:00:34FromDiscord<Chronos [She/Her]> I'm expecting it to go absolutely nowhere but I want to try and get it to work
12:01:25FromDiscord<jmgomez> that's fine, it may be a good thing to learn. What lang do you want to output?
12:01:37FromDiscord<jmgomez> (edit) "thing" => "way"
12:03:08FromDiscord<Chronos [She/Her]> Hoping to output Java, honestly
12:03:55FromDiscord<jmgomez> that's not too far for what is already there. How are you approaching it
12:04:51FromDiscord<Chronos [She/Her]> I'm just picking at the main compiler and building off of that, actually :p↵↵I've copied `nim.nim` and `main.nim` so far from the compiler module so I can edit them, and as I need to make more changes, I'll copy more modules (but hopefully stick close to the compiler)
12:05:25FromDiscord<jmgomez> why dont just start with the gen part and care about the frontend later?
12:05:26FromDiscord<Chronos [She/Her]> In reply to @jmgomez "that's not too far": Going to be modifying jsgen.nim since it looks far simpler aha, then compiling it into a standalone binary, I'm using the compiler as a library
12:05:43FromDiscord<Chronos [She/Her]> In reply to @jmgomez "why dont just start": Tbf that's probably a better idea lol, I'll do that now
12:06:02FromDiscord<jmgomez> yes, dont use it as a library, just fork it 🙂
12:06:17FromDiscord<Chronos [She/Her]> Issue is that the compile times are atrocious oof
12:06:30FromDiscord<Chronos [She/Her]> Was planning on just making the frontend first so that I could plug my backend into it
12:06:31FromDiscord<jmgomez> are you using `koch temp` I assume?
12:08:08FromDiscord<jmgomez> also take the time to see what arne did to approach his backend, maybe you can borrow an idea or two from there
12:11:21FromDiscord<Chronos [She/Her]> In reply to @jmgomez "are you using `koch": Yeah I likely will be, if it can compile the js backend
12:11:33FromDiscord<Chronos [She/Her]> Just wish I could make only the JS backend be compiled
12:15:19FromDiscord<jmgomez> you should start by making `koch temp` to work with the js backend then or just use the c backend as started point
12:15:34FromDiscord<jmgomez> (still use the js as ref)
12:16:04FromDiscord<jmgomez> if you do the former, PR it 🙂
12:17:40FromDiscord<Chronos [She/Her]> I could do that tbf, I know you can compile Nim without the JS backend, having the other way around work would be useful
12:23:58*junaid_ quit (Remote host closed the connection)
12:25:12FromDiscord<Phil> Do you need to memory manage cstrings that come from a dynlib that you use (gtk in this case) ?
12:25:21FromDiscord<Chronos [She/Her]> Not sure how I'd tell koch to do that tho hm
12:25:27FromDiscord<Chronos [She/Her]> In reply to @isofruit "Do you need to": I mean, I'd imagine so
12:27:04FromDiscord<Phil> So... do I basically make a `type OwnedGtkString = distinct cstring` and define destructors for `OwnedGtkstring` ?
12:27:22FromDiscord<Phil> (edit) "OwnedGtkString" => "ManagedGtkString" | "`OwnedGtkstring`" => "`ManagedGtkstring`"
12:32:16*junaid_ joined #nim
12:34:33FromDiscord<raynei486> yeah
12:38:37FromDiscord<Chronos [She/Her]> In reply to @isofruit "So... do I basically": Yeah seems like it
12:56:30FromDiscord<sOkam! 🫐> is there a way to define a proc type that can take a generic proc of that shape? 🤔
12:57:21FromDiscord<Phil> As in a generic proc type that eats a proc of its own type?
12:57:32FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4Gxa
12:59:24FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Gxb
13:00:14FromDiscord<sOkam! 🫐> that's not generic
13:00:26FromDiscord<sOkam! 🫐> you are specifying the types explicitly
13:01:01FromDiscord<Phil> CreateProc is generic over requestparams and entry.↵Do you mean a type which itself doesn't have to be generic but stores a generic declaration?
13:01:31FromDiscord<sOkam! 🫐> basically, I want to match `create` and `deallocImpl` that take typed pointers↵I can do that with typeless pointers, but I was hoping I could do it by storing them in a vtable
13:01:44FromDiscord<kingterrytheterrible12> Does nim have a man page? Like can i do `man seq` somehow
13:02:02FromDiscord<odexine> sent a code paste, see https://play.nim-lang.org/#ix=4Gxd
13:02:03FromDiscord<sOkam! 🫐> and I will be creating different functions that will match the same shape as create and dealloc... and all take (hopefully) typed pointers
13:02:03FromDiscord<odexine> i do wonder if that works
13:02:09FromDiscord<sOkam! 🫐> In reply to @odexine "`type MyProc[T] = proc(val:": itdoes
13:02:09FromDiscord<odexine> In reply to @odexine "i do wonder if": i dont see why not though
13:02:15FromDiscord<sOkam! 🫐> but... thats for 1 proc, not generic
13:02:19FromDiscord<kingterrytheterrible12> In reply to @odexine "i dont see why": What happen to kanon
13:02:23FromDiscord<odexine> it is generic
13:02:26FromDiscord<odexine> it is a generic type
13:02:37FromDiscord<Phil> I think you need different wording to describe what you mean here
13:02:43FromDiscord<odexine> it's not runtime variant
13:02:43FromDiscord<sOkam! 🫐> if I store it in a vtable it requires my type to not be able to allocate anything other than a single thing
13:03:09FromDiscord<sOkam! 🫐> but... well, thinking about it, maybe i don't need to 🤔
13:03:48FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4Gxe
13:04:18FromDiscord<sOkam! 🫐> I was hoping I could allocate anything with them, but still keep the `ptr T` typed pointers instead of having to use void
13:05:09FromDiscord<sOkam! 🫐> But I guess if I store the functions that way, there is no option other than typeless 😔
13:07:25FromDiscord<odexine> the allocator would have to be generic as well if you wanted typed ptrs
13:11:36FromDiscord<sOkam! 🫐> yeah, that's the probl. it would only be able to allocate one type of thing
13:17:04FromDiscord<Chronos [She/Her]> In reply to @kingterrytheterrible12 "Does nim have a": I mean, there's the docs
13:30:16FromDiscord<sOkam! 🫐> Is there any way to varargs without GC'ed memory?
13:33:53FromDiscord<odexine> i dont tihnk varargs need gc?
13:35:05FromDiscord<sOkam! 🫐> its a seq internally a apparently 😦
13:35:18FromDiscord<sOkam! 🫐> will try again just in case, but last time it didn't work
13:35:23FromDiscord<odexine> then you cant use it
13:35:36FromDiscord<odexine> but i dont think that makes sense
13:37:43FromDiscord<Chronos [She/Her]> I would've assumed it'd be an array considering that varargs are compile time
13:49:09FromDiscord<sOkam! 🫐> hmmm I guess they work? I don't know why they failed last time then 🤷‍♂️
14:00:23FromDiscord<toma400> sent a code paste, see https://play.nim-lang.org/#ix=4Gxt
14:00:38FromDiscord<toma400> (edit) "https://play.nim-lang.org/#ix=4Gxt" => "https://play.nim-lang.org/#ix=4Gxu"
14:06:25FromDiscord<raynei486> templates are basically text substitution
14:06:30FromDiscord<raynei486> just drop the return
14:08:20FromDiscord<toma400> Ooh, right, thank you a lot ❤️
14:08:31FromDiscord<.aingel.> When I'm making c bindings of functions what's the nim convention for the proc names, should it be CamelCase?
14:08:38FromDiscord<.aingel.> If the c func names are snake_case
14:08:49FromDiscord<.aingel.> Should I rename them to CamelCase?
14:09:24FromDiscord<odexine> no need to
14:09:50FromDiscord<raynei486> nim is mostly case insensitive
14:13:12FromDiscord<ravinder387> anybody demonstrate me newCall() with example code
14:13:28FromDiscord<ravinder387> is it create new ast
14:14:45NimEventerNew thread by DMisener: Given an enum how do I return a seq of its elements, see https://forum.nim-lang.org/t/10489
14:18:20FromDiscord<ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4GxB
14:18:34FromDiscord<ravinder387> what does it mean by newCall()
14:19:11FromDiscord<Phil> newCall creates a call-nimnode.↵That is the functional equivalent of executing a function
14:19:57FromDiscord<Phil> So it's executing.. either rhs, lhs or both, not quite fully sure
14:20:24FromDiscord<Phil> It executes rhs and uses lhs as an argument
14:20:28FromDiscord<toma400> sent a code paste, see https://play.nim-lang.org/#ix=4GxC
14:20:38FromDiscord<Phil> (edit) "an" => "the" | "theargument ... " added "for rhs"
14:21:03FromDiscord<toma400> (edit) "https://play.nim-lang.org/#ix=4GxC" => "https://play.nim-lang.org/#ix=4GxD"
14:25:45*fallback joined #nim
14:37:31*disso-peach joined #nim
14:39:07FromDiscord<.aingel.> In reply to @odexine "no need to": Just wondering what the convention was stylistically
14:39:39FromDiscord<odexine> In reply to @.aingel. "Just wondering what the": camelcase but your preference is fine too, nim does not distinguish between aProcNamedLikeThis and a_proc_named_like_this
14:42:10FromDiscord<toma400> The only important thing is to distinguish between first letter, all next letters are unified, including `_` being ignored
15:00:03*GreaseMonkey quit (Server closed connection)
15:00:11*greaser|q joined #nim
15:00:23FromDiscord<raynei486> In reply to @toma400 "Thank you once again,": 👍
15:07:07FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4GxQ
15:25:30*junaid_ quit (Remote host closed the connection)
15:25:42FromDiscord<sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4GxT
15:26:35FromDiscord<odexine> i think because object variants raise an exception when the kind is wrong and you access a field
15:27:12FromDiscord<sOkam! 🫐> crap
15:27:18FromDiscord<sOkam! 🫐> do methods also raise exceptions?
15:40:32*blop_ quit (Remote host closed the connection)
15:41:07*blop_ joined #nim
15:59:53FromDiscord<leorize> no
16:03:03*jmdaemon quit (Ping timeout: 240 seconds)
16:51:53FromDiscord<Chronos [She/Her]> Tbh I might still just make my own frontend
16:52:03FromDiscord<Chronos [She/Her]> Would be useful in the future too if I want to so similar
16:53:24FromDiscord<jmgomez> you own compiler frontend you mean?
16:53:31FromDiscord<jmgomez> (edit) "you" => "your"
17:01:52FromDiscord<kingterrytheterrible12> You guys think making auto bindgen for nim to react native is a good idea?
17:02:38FromDiscord<jmgomez> yes
17:03:34FromDiscord<jmgomez> a better one, do a parser for typescript definition files at macro time
17:07:54FromDiscord<.aingel.> In reply to @odexine "camelcase but your preference": Gotcha, thanks
17:39:19*junaid_ joined #nim
18:05:22*disso-peach quit (Quit: Leaving)
18:05:36FromDiscord<Chronos [She/Her]> In reply to @jmgomez "your own compiler frontend": Yeah
18:14:11FromDiscord<jmgomez> Dont do that. Just fix `koch temp javascript`
18:16:58FromDiscord<Chronos [She/Her]> Is that supposed to exist?
18:17:16FromDiscord<Chronos [She/Her]> In reply to @jmgomez "Dont do that. Just": Idea in the end is to make it not reliant on an enum too so more backends could be compiled with it too
18:17:31FromDiscord<Chronos [She/Her]> So doing this now just makes it easier for me to (mostly) forget about
18:17:50FromDiscord<jmgomez> I have good news for you
18:17:59FromDiscord<Chronos [She/Her]> I also looked at koch.nim and didn't really know how else I'm supposed to restructure it :p
18:18:00FromDiscord<jmgomez> `./koch temp js myFile.nim` works
18:18:22FromDiscord<Chronos [She/Her]> In reply to @jmgomez "`./koch temp js myFile.nim`": Oh? What does that do?
18:18:42FromDiscord<jmgomez> generates `myFile.js`
18:18:50FromDiscord<Chronos [She/Her]> Ah
18:19:05FromDiscord<Chronos [She/Her]> But how would that help me in compiling a custom backend?
18:19:33FromDiscord<jmgomez> because you replace the js backend with yours, step by step and worry later about how to plug in. Once you gains more insights areound the compiler
18:19:40FromDiscord<Chronos [She/Her]> Ah
18:19:47FromDiscord<jmgomez> (edit) "in." => "in it."
18:19:47FromDiscord<Chronos [She/Her]> Okay yeah that makes sense
18:19:51FromDiscord<Chronos [She/Her]> So I can just do that, fun
18:19:53FromDiscord<jmgomez> (edit) "gains" => "gain"
18:19:56FromDiscord<Chronos [She/Her]> As long as it's still named jsgen
18:20:03FromDiscord<Chronos [She/Her]> Thanks dude!
18:20:30FromDiscord<jmgomez> to replace it later should be the easy part 😛
18:20:33FromDiscord<jmgomez> np, good luck
18:21:20FromDiscord<Chronos [She/Her]> Thanks! I'll try to get it working aha
18:36:55*xmachina quit (Quit: WeeChat 4.0.4)
18:40:44FromDiscord<fabric.input_output> what does the message `'someFunction' cannot raise 'SomeDefect'` where `proc someFunction(...): ... {.raises: [SomeDefect].} = ...`
18:45:53*xmachina joined #nim
18:56:01*junaid_ quit (Remote host closed the connection)
19:27:08*xmachina quit (Quit: WeeChat 4.0.4)
19:29:17*xmachina joined #nim
19:49:52*derpydoo joined #nim
19:50:07*ntat quit (Quit: leaving)
19:54:21*xmachina quit (Quit: WeeChat 4.0.4)
20:12:13arkanoidhow to use "precision" here? https://nim-lang.org/docs/strformat.html#standard-format-specifiers-for-strings-integers-and-floats , &"{12.34567:.3}" prints "12.3", I want "12.345"
20:14:14FromDiscord<Chronos [She/Her]> Not sure if I need to emulate pointers in Java because it's all pass by reference anyway
20:17:51FromDiscord<raynei486> In reply to @fabric.input_output "what does the message": Do you have code to reproduce?
20:17:52FromDiscord<Chronos [She/Her]> God JS gen is a fuck-
20:17:53FromDiscord<raynei486> Very odd message
20:30:19FromDiscord<fabric.input_output> sent a code paste, see https://play.nim-lang.org/#ix=4GzA
20:30:46FromDiscord<fabric.input_output> (edit) "https://play.nim-lang.org/#ix=4GzA" => "https://play.nim-lang.org/#ix=4GzB"
20:31:21FromDiscord<fabric.input_output> (edit) "https://play.nim-lang.org/#ix=4GzB" => "https://play.nim-lang.org/#ix=4GzC"
20:32:30FromDiscord<Elegantbeef> Defects are not raised
20:32:30FromDiscord<Elegantbeef> I mean they are, but they're not tracked
20:32:35FromDiscord<fabric.input_output> sent a code paste, see https://play.nim-lang.org/#ix=4GzD
20:33:04FromDiscord<fabric.input_output> In reply to @Elegantbeef "I mean they are,": oh so defects are like exceptions without a stack trace
20:33:34FromDiscord<Elegantbeef> Defects are meant to kill the program
20:33:39FromDiscord<Elegantbeef> As such there is no tracking for them
20:33:55FromDiscord<Elegantbeef> `--panics:on` is the 'correct' behaviour
20:34:17FromDiscord<Chronos [She/Her]> Maybe I should try and not use the JS backend as a frame, I'll use the initial structure, but not how it actually generates code because it is... Confusing
20:35:04FromDiscord<Elegantbeef> It is a shame that there is no defect tracking so you can force handling most incorrect behaviour, but alas
20:35:50FromDiscord<fabric.input_output> so `raises` works only for catchable exceptions?
20:35:56FromDiscord<Elegantbeef> Yes
20:36:18FromDiscord<Elegantbeef> Defects are not meant to be caught and as such are not tracked
20:36:42FromDiscord<Elegantbeef> Defects are supposed to be used to indicate incorrect behaviour you're generally meant to defensively program for
20:36:54FromDiscord<Elegantbeef> Such as index defect, range defect, field defect, ...
20:37:30FromDiscord<fabric.input_output> or in my case, unpacking values and errors from results incorrectly
20:37:37FromDiscord<Elegantbeef> In your case you'll want `raises:[]` although not what you really want
20:39:34FromDiscord<fabric.input_output> more not like it should, so I guess I'll just have to remove `raises` alltogether
20:40:24FromDiscord<fabric.input_output> thanks for explaining
20:49:23FromDiscord<Chronos [She/Her]> Hm I'm slowly tweaking the JS gen backend :p
20:49:45FromDiscord<Chronos [She/Her]> It's basically mostly fine so far bc of how similar barebones JS can be to Java
20:51:19FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/8jUkS
20:51:27FromDiscord<Elegantbeef> That forces the user to convert from Error to value before extracting a value
20:52:14FromDiscord<Phil> In reply to @chronos.vitaqua "It's basically mostly fine": You do that right up until you see how Java handles lambdas
20:52:21FromDiscord<Chronos [She/Her]> Lol
20:53:03FromDiscord<Chronos [She/Her]> What if instead of lambda I just make a new private method in the class :p
20:53:21FromDiscord<Chronos [She/Her]> Also hm `Consumer<Integer> method = (n) -> { System.out.println(n); };`
20:54:16FromDiscord<Phil> The entire type system and how java turns functions into objects is just fundamentally weird to me
20:54:48FromDiscord<Chronos [She/Her]> Also I wonder if it's a duty of mine to try and make it so Nim integrates with Java really well or if 'usable enough' is fine :p
20:54:50FromDiscord<Phil> Functions as objects got to be one of the least intuitive things I've seen in programming
20:55:01FromDiscord<Chronos [She/Her]> Because doing it really well will be a pain I'd imagine-
20:55:22FromDiscord<Chronos [She/Her]> Also I think a custom system.nim would need to be made too
20:55:39FromDiscord<Chronos [She/Her]> For stubbing out Nim methods to Java (again, for really good integration)
20:55:48FromDiscord<Chronos [She/Her]> Hopefully no-one minds it being shitty-
20:56:29FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4GzK
20:56:45FromDiscord<Chronos [She/Her]> I'm assuming this is pointer-related due to the arrays
20:56:50FromDiscord<Chronos [She/Her]> I am in pain
20:57:54FromDiscord<Chronos [She/Her]> I don't get that part at all ooof, maybe starting from scratch and using jsgen as a reference would be better
20:58:34FromDiscord<Phil> In reply to @chronos.vitaqua "I am in pain": Given that none of the var names are properly explaining themselves: Justified pain.
20:59:08FromDiscord<Chronos [She/Her]> Do you think I'd be better off trying from scratch? :p
20:59:21FromDiscord<Chronos [She/Her]> I'm in over my head honestly
20:59:43FromDiscord<Chronos [She/Her]> I can modify some stuff but then others is eternal confusion
20:59:57FromDiscord<Phil> I have no clue, I'm on an endorphine high from sports and tired lying down, I make about zero deeper technical decisions now
21:00:25FromDiscord<Chronos [She/Her]> Fair enough
21:00:57FromDiscord<Chronos [She/Her]> I think... I'm gonna give up :P
21:01:24FromDiscord<Phil> That's how I know you're not Rick Astley
21:01:28FromDiscord<Phil> He never would!
21:01:31FromDiscord<Chronos [She/Her]> Hah
21:02:02FromDiscord<Chronos [She/Her]> Actually...
21:02:19FromDiscord<Chronos [She/Her]> https://github.com/juancarlospaco/nim-new-backend/blob/master/compiler/jsgen.nim this code obviously doesn't work now but it might be a better base
21:04:12FromDiscord<Chronos [She/Her]> Defining globals is hard :/
21:05:08*xet7 quit (Read error: Connection reset by peer)
21:25:10FromDiscord<millymox> Running nimble test inside my test directory and it’s nothing running my test
21:29:27FromDiscord<millymox> Fixed
21:29:36FromDiscord<millymox> Fidget or nimx for GUI?
21:37:26*def- quit (Quit: -)
21:37:40*def- joined #nim
21:41:22FromDiscord<Chronos [She/Her]> I think this is just too much for me oof
21:41:31FromDiscord<Chronos [She/Her]> Small brain cannot comprehend this
22:07:59*FromDiscord quit (Remote host closed the connection)
22:08:12*FromDiscord joined #nim
22:17:22FromDiscord<vindaar> In reply to @chronos.vitaqua "Also I wonder if": I don't know anything about the context, but are you aware of https://github.com/yglukhov/jnim↵?
22:25:13*jmdaemon joined #nim
22:30:50FromDiscord<Chronos [She/Her]> In reply to @vindaar "I don't know anything": JNI interop and compiling Nim to Java are two very different things aha
22:42:12FromDiscord<ShalokShalom (ShalokShalom)> Why would you consider implementing DSLs as a "last resort"?↵Opposite to macros, who indeed are meant to extend the language, when every other feature of it turns out to be insufficient, has a DSL couple of other benefits\: Readable by non-programmers, and clearly communicating intent.↵(@Phil)
22:42:30FromDiscord<ShalokShalom (ShalokShalom)> There is a perfectly fine solution to run Nim with Java for years.↵(@vindaar)
22:43:14FromDiscord<ShalokShalom (ShalokShalom)> Chronos seems to love reinventing things, as all great programmers do.
22:48:08FromDiscord<michaelb.eth> I haven't worked with it yet, but iirc Project Panama graduated into a JDK release a couple of years ago and is supposed to have some nice advantages over JNI, not sure if it would make integration with Nim more pleasant or not
22:50:42FromDiscord<michaelb.eth> eh, maybe it's still in preview
22:51:38FromDiscord<ShalokShalom (ShalokShalom)> I am talking about the Truffle Framework.
22:57:26FromDiscord<Chronos [She/Her]> In reply to @ShalokShalom (ShalokShalom) "Chronos seems to love": SuLong is still GraalVM specific
22:57:52FromDiscord<Chronos [She/Her]> For the performance because of how atrocious it'd be otherwise
22:58:11FromDiscord<Chronos [She/Her]> And again... i don't want to have to build for multiple platforms
23:00:39FromDiscord<ShalokShalom (ShalokShalom)> You do yours
23:01:10FromDiscord<ShalokShalom (ShalokShalom)> Performance would be a no-issue
23:01:31FromDiscord<Chronos [She/Her]> Why wouldn't it be? Especially if you're running it on something like Minecraft, it's a major issue
23:01:47FromDiscord<ShalokShalom (ShalokShalom)> Why would it be?
23:02:12FromDiscord<Chronos [She/Her]> Because who would even think of using your mod if the performance is dog shit :p
23:02:27FromDiscord<Chronos [She/Her]> Sure I'm doing it for fun but I still want others to actually be able to use it
23:02:42FromDiscord<Chronos [She/Her]> Minecraft is notorious for bad performance without optimisation mods and even then
23:02:47FromDiscord<ShalokShalom (ShalokShalom)> You project performance based on nothing else than thin air
23:03:05FromDiscord<ShalokShalom (ShalokShalom)> Why would it run worse on Truffle
23:04:13FromDiscord<Langosta> beware premature optimization
23:04:25FromDiscord<Langosta> https://effectiviology.com/premature-optimization/
23:04:33FromDiscord<ShalokShalom (ShalokShalom)> You can build native executables and the whole thing is faster than the normal JVM generally.
23:04:48FromDiscord<ShalokShalom (ShalokShalom)> We are talking about something completely different. \:)↵(@Langosta)
23:04:58FromDiscord<Langosta> My bad!
23:06:39FromDiscord<ShalokShalom (ShalokShalom)> https://medium.com/graalvm/java-on-truffle-going-fully-metacircular-215531e3f840↵(@Langosta)
23:07:19FromDiscord<Langosta> this is interesting, thank you for the correction
23:19:51FromDiscord<sOkam! 🫐> when is the next minor or patch version of nim gonna be deployed?
23:20:24FromDiscord<sOkam! 🫐> (edit) "deployed?" => "deployed on `stable`?"
23:57:13FromDiscord<sOkam! 🫐> Does `--debugger:native` disable some optimizations? 🤔↵I'm having a segfault when running without it, but if I run with that switch the segfault goes away and the app runs without issues 🧩
23:57:29FromDiscord<Elegantbeef> It shouldnt change anything
23:57:50FromDiscord<sOkam! 🫐> but it does 🤷‍♂️
23:58:11FromDiscord<Elegantbeef> Atleast afaik it only adds source info to the generated C