00:00:13 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "If you want a": bro we should ask araq why the book isnt FREE in FREEDOM |
00:00:47 | FromDiscord | <Phil> No because why the fuck would it be |
00:01:47 | FromDiscord | <Phil> I'm aware you're partially jesting here, but I dislike entitled sentiment in general, even stated in jest. |
00:01:50 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "No because why the": it isnt FOSS compliaint |
00:02:10 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "I'm aware you're partially": if the book was FOSS compliaint i would have donated |
00:02:12 | FromDiscord | <Elegantbeef> As much as I understand why it's not free, information should be free |
00:02:20 | FromDiscord | <kingterrytheterrible12> yes |
00:02:42 | FromDiscord | <kingterrytheterrible12> its just the same as locking articles behind paywalls |
00:04:57 | FromDiscord | <Phil> On the one hand yes, on the other got to eat and we don't have UBI. |
00:05:47 | FromDiscord | <Phil> That is more directed at news articles, less at araq |
00:05:50 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "On the one hand": you get to eat by selling support for your compiler |
00:05:57 | FromDiscord | <kingterrytheterrible12> thats how like most compilers and langs make money |
00:06:19 | FromDiscord | <kingterrytheterrible12> far more viable than books |
00:06:25 | FromDiscord | <Phil> Pretty sure that is to a degree what's happening, was more about the paywall'd bits |
00:06:32 | FromDiscord | <Phil> (edit) "Pretty sure that is to a degree what's happening, was more about the paywall'd bits ... " added "with articles" |
00:07:04 | FromDiscord | <kingterrytheterrible12> also how much is status paying araq ngl |
00:07:08 | FromDiscord | <kingterrytheterrible12> probably something bad |
00:07:11 | FromDiscord | <kingterrytheterrible12> like 10k a year |
00:07:54 | FromDiscord | <Phil> Whole load of nanya in my personal opinion, and thus irrelevant |
00:08:34 | FromDiscord | <kingterrytheterrible12> tf does nanya mean |
00:08:38 | FromDiscord | <kingterrytheterrible12> nyacat? |
00:08:51 | FromDiscord | <Phil> Nanya business |
00:09:37 | FromDiscord | <kingterrytheterrible12> WHAT DOES THAT MEAN |
00:09:57 | FromDiscord | <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:15 | FromDiscord | <Phil> None of your business |
00:10:31 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "None of your business": bro just tell me what it means ngl |
00:10:34 | FromDiscord | <kingterrytheterrible12> no need to be rude |
00:10:39 | FromDiscord | <Elegantbeef> Damn phil sokam was just asking a question |
00:11:15 | FromDiscord | <Phil> https://idioms.thefreedictionary.com/nunya↵Seems its more typed like nunya? Know it more the other way round |
00:11:17 | FromDiscord | <Elegantbeef> Use `execProcess` instead |
00:11:27 | FromDiscord | <sOkam! 🫐> In reply to @Elegantbeef "Use `execProcess` instead": that doesn't run a shell |
00:11:33 | FromDiscord | <Elegantbeef> noneya is betterer |
00:11:33 | FromDiscord | <sOkam! 🫐> and, as such, i lose output |
00:11:40 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "https://idioms.thefreedictionary.com/nunya Seems it": ye bro i wanna know how much status giving araq |
00:11:47 | FromDiscord | <kingterrytheterrible12> status is pretty dead message app |
00:11:49 | FromDiscord | <sOkam! 🫐> (edit) "and, as such, i lose ... output" added "instantaneous" |
00:12:05 | FromDiscord | <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:06 | FromDiscord | <Elegantbeef> `poEvalCommand`? |
00:12:14 | FromDiscord | <kingterrytheterrible12> In reply to @isofruit "This has stopped being": ok |
00:12:21 | FromDiscord | <kingterrytheterrible12> so you just send this disccusion to die |
00:12:22 | FromDiscord | <kingterrytheterrible12> xd |
00:13:54 | FromDiscord | <sOkam! 🫐> doesn't poEvalCommand just send the text as it is? does that actually affect how the command is actually run? |
00:14:27 | FromDiscord | <Elegantbeef> No clue I don't have a doctorate in shelling out 😄 |
00:14:39 | FromDiscord | <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:54 | FromDiscord | <sOkam! 🫐> like execShellCmd does, basically |
00:17:06 | * | krux02 quit (Remote host closed the connection) |
00:21:35 | FromDiscord | <Elegantbeef> `poParentStreams`? |
00:23:02 | FromDiscord | <sOkam! 🫐> hmm will try that one, could be 🤔 |
00:55:05 | FromDiscord | <thedistantforest> sent a code paste, see https://play.nim-lang.org/#ix=4GuC |
00:55:45 | FromDiscord | <thedistantforest> (edit) "https://play.nim-lang.org/#ix=4GuC" => "https://play.nim-lang.org/#ix=4GuE" |
00:55:56 | FromDiscord | <thedistantforest> (edit) "https://play.nim-lang.org/#ix=4GuE" => "https://play.nim-lang.org/#ix=4GuF" |
00:56:06 | FromDiscord | <thedistantforest> (edit) "https://play.nim-lang.org/#ix=4GuF" => "https://play.nim-lang.org/#ix=4GuG" |
01:08:41 | FromDiscord | <Elegantbeef> Seems to be a windows specific issue in the binding |
01:13:51 | FromDiscord | <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:15 | FromDiscord | <Elegantbeef> You're likely going to run into the issue again, but sure if it works |
01:14:48 | FromDiscord | <thedistantforest> Yeah I think i might run into the issue again... |
01:42:52 | FromDiscord | <gogolxdong666> where has db_mysql gone? |
01:52:36 | FromDiscord | <gogolxdong666> https://github.com/nim-lang/db_connector |
02:05:07 | FromDiscord | <millymox> Did then nim vscode extension update? I have no syntax highlighting |
02:05:10 | FromDiscord | <millymox> Anymore |
02:08:50 | FromDiscord | <millymox> https://media.discordapp.net/attachments/371759389889003532/1152425829456941098/RPReplay_Final1694830074.mov |
02:09:21 | FromDiscord | <millymox> https://media.discordapp.net/attachments/371759389889003532/1152425961204232232/RPReplay_Final1694830074.mov |
03:00:41 | * | disso-peach quit (Quit: Leaving) |
03:09:06 | FromDiscord | <_nenc> maybe you need the more recently updated Nim extension? there are three extensions named with Nim |
03:25:51 | FromDiscord | <that_dude.> When I have issues, I simply restart vscode. Make sure you have the one published by Saem |
03:28:29 | FromDiscord | <ravinder387> go to File - Auto save and tick auto save |
03:28:44 | FromDiscord | <ravinder387> then you get syntax highlighting |
03:30:04 | FromDiscord | <millymox> I restarted vscode and it fixed it |
03:30:06 | FromDiscord | <millymox> Weird |
03:30:32 | FromDiscord | <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:42 | NimEventer | New 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:04 | FromDiscord | <sOkam! 🫐> In reply to @millymox "Can someone help me": just compile and run the file |
05:36:30 | FromDiscord | <sOkam! 🫐> if you store it in the `tests` folder, you can run `nimble test` and it will run all files inside there |
05:36:40 | FromDiscord | <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:58 | FromDiscord | <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:53 | FromDiscord | <odexine> i dont think so? |
06:16:41 | FromDiscord | <odexine> what's your goal? |
06:17:01 | FromDiscord | <Elegantbeef> Doesnt futhark do this? |
06:17:18 | FromDiscord | <odexine> with a separate program no? |
06:20:59 | FromDiscord | <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:54 | FromDiscord | <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:58 | FromDiscord | <sOkam! 🫐> (edit) "AF" => "af" |
06:23:04 | FromDiscord | <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:20 | FromDiscord | <odexine> well if futhark does it then perhaps it is |
06:23:32 | FromDiscord | <sOkam! 🫐> how does it do it? |
06:24:56 | FromDiscord | <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:34 | FromDiscord | <odexine> https://nim-lang.org/docs/compilesettings.html#querySetting%2CSingleValueSetting |
06:25:45 | FromDiscord | <odexine> forgot about this module |
06:26:22 | FromDiscord | <sOkam! 🫐> oh damn, that is huge for me. been doing so many hacks around this module 🙈 |
06:26:32 | FromDiscord | <sOkam! 🫐> (edit) "oh damn, that is huge for me. been doing so many hacks around ... this" added "not knowing" |
06:30:41 | FromDiscord | <toma400> sent a long message, see http://ix.io/4GvE |
06:30:45 | FromDiscord | <astrolemonade> In reply to @isofruit "On the one hand": What's UBI? |
06:31:07 | FromDiscord | <huantian> universal basic income |
06:40:28 | FromDiscord | <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:41 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4GvJ |
06:54:49 | FromDiscord | <sOkam! 🫐> could some form of `distinct` help with name resolution in some way? |
07:02:12 | FromDiscord | <odexine> instance.addr is ptr ptr InstanceImpl |
07:02:25 | FromDiscord | <odexine> though that's not related to your issue |
07:02:39 | FromDiscord | <odexine> (edit) "issue" => "issue, it is possibly something you didn't intend to do" |
07:03:48 | FromDiscord | <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:37 | FromDiscord | <sOkam! 🫐> `instance.repr()` is hitting the same issue though |
07:04:48 | FromDiscord | <odexine> it would] |
07:04:49 | FromDiscord | <odexine> (edit) "would]" => "would" |
07:04:54 | FromDiscord | <sOkam! 🫐> ty for noticing the bug, didn't see that |
07:04:56 | FromDiscord | <odexine> cast it to a void pointer |
07:05:10 | FromDiscord | <odexine> or cast it to a pointer-sized uint and print that |
07:05:42 | FromDiscord | <sOkam! 🫐> casting did work, yep |
07:07:30 | FromDiscord | <sOkam! 🫐> ty rika, was really stuck with this one 🙏 |
07:18:00 | * | rockcavera joined #nim |
07:29:17 | FromDiscord | <Phil> sent a long message, see http://ix.io/4GvQ |
07:31:15 | FromDiscord | <odexine> well if it says so... |
07:32:33 | FromDiscord | <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:37 | FromDiscord | <odexine> locks: 0 is deprecated in favour of locks: [list of locks] |
07:32:45 | FromDiscord | <odexine> https://nim-lang.org/docs/manual.html#guards-and-locks |
07:34:32 | FromDiscord | <Phil> I don't see a statement on what locks: 0 means =/ |
07:37:54 | FromDiscord | <odexine> https://nim-lang.org/0.20.0/manual_experimental.html#guards-and-locks-lock-levels |
07:38:31 | FromDiscord | <Phil> Here I was trying to find that on the docs of 1.6.12 |
07:39:07 | FromDiscord | <odexine> https://nim-lang.org/1.6.12/manual_experimental.html#guards-and-locks-lock-levels |
07:39:40 | FromDiscord | <Phil> What in the .... ohhhhh it's under experimental |
07:39:44 | FromDiscord | <Phil> No wonder I can't find it |
07:39:48 | FromDiscord | <Phil> That keeps tripping me up |
07:41:33 | FromDiscord | <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:10 | FromDiscord | <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:20 | FromDiscord | <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:22 | FromDiscord | <odexine> python has some bastardly implementation of enums |
07:42:31 | FromDiscord | <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:38 | FromDiscord | <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:24 | NimEventer | New 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:13 | FromDiscord | <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:34 | FromDiscord | <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:07 | FromDiscord | <Elegantbeef> Locks are a deprecated feature @Phil |
08:42:37 | FromDiscord | <Elegantbeef> There is no replacement |
08:42:50 | FromDiscord | <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:52 | FromDiscord | <Elegantbeef> Use tags and effects for the same |
08:43:00 | FromDiscord | <Elegantbeef> Lock levels |
08:43:03 | FromDiscord | <Elegantbeef> I meant of course |
08:43:12 | FromDiscord | <Phil> Ohhhh okay, that makes more sense |
08:43:52 | FromDiscord | <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:02 | FromDiscord | <Phil> So this is more an enforcement mechanism of code the user hands the framework |
08:44:22 | FromDiscord | <Phil> So unless there's tags on lock-feature code that can be used here there is effectively no equivalent |
08:44:39 | FromDiscord | <Elegantbeef> Right and if you force the procs to have a `tag: [NoLock]` on any proc they pass, there you go 😄 |
08:45:06 | FromDiscord | <Elegantbeef> It's not like you could not override lock levels anyway iirc |
08:45:09 | FromDiscord | <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:07 | FromDiscord | <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:17 | FromDiscord | <Elegantbeef> Lock levels are completely deprecated since they are just complicated and I do not think they solved anything in reality |
08:46:18 | FromDiscord | <Phil> The value lies in the validation |
08:48:29 | FromDiscord | <Elegantbeef> Why does owlkettle even care if you access a lock inside of it's callbacks? |
08:48:35 | FromDiscord | <Phil> Beats me |
08:48:49 | FromDiscord | <Phil> I just deal with the warning popping up in the terminal when I compile the examples for testing |
08:48:55 | FromDiscord | <Phil> (edit) "I just ... deal" added "want to" |
08:49:09 | FromDiscord | <Elegantbeef> Are you sure that the reason it was there was not just due to lock level inference being a pain |
08:49:27 | FromDiscord | <Phil> My PfP is a fruit with glasses |
08:49:45 | FromDiscord | <Phil> While that looks intellectual: Does that look like somebody actually have an idea of multithreaded code in nim |
08:49:50 | FromDiscord | <Elegantbeef> Right and mines a dog that has a tongue that looks like it's CGI'd |
08:49:54 | FromDiscord | <Phil> (edit) "have" => "having" |
08:50:27 | FromDiscord | <Phil> Can.l will be able to clear this up anyhow I think. |
08:50:41 | FromDiscord | <Elegantbeef> I'm going out on a limb and saying it's purely due to the inference issue |
08:51:13 | FromDiscord | <Phil> In reply to @Elegantbeef "I'm going out on": Do you usually not go out on limbs? |
08:51:28 | FromDiscord | <Elegantbeef> I mean I do walk on two |
08:51:30 | FromDiscord | <Phil> I thought those were kinda essential for the walking bit |
08:51:52 | FromDiscord | <Elegantbeef> Hey that's the same joke |
08:52:50 | FromDiscord | <nnsee> beef, what does your name mean |
08:52:54 | FromDiscord | <Elegantbeef> Uncertain if you do not realise the actual origin of that term |
08:52:59 | FromDiscord | <Elegantbeef> well phrase |
08:53:23 | FromDiscord | <Phil> It's english, I can barely be bothered to no the origin of sayings in my actual mother tongue |
08:53:27 | FromDiscord | <Phil> (edit) "no" => "know" |
08:53:36 | FromDiscord | <Elegantbeef> My name means fuck all in a tin ship |
08:54:17 | FromDiscord | <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:23 | FromDiscord | <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:51 | FromDiscord | <Phil> The changes to destructors make supporting nim 1.6. not impossible, but slightly annoying |
08:57:38 | FromDiscord | <Elegantbeef> Hey arc/orc is the way to use Nim |
08:58:51 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4Gwa |
08:58:56 | FromDiscord | <Elegantbeef> That'll solve your problem |
08:59:06 | FromDiscord | <Elegantbeef> Replace `locks: 0` with `locker` |
08:59:09 | FromDiscord | <Elegantbeef> call it a day |
09:00:01 | FromDiscord | <Phil> TF is locker?↵Let me go doc diving |
09:00:08 | FromDiscord | <Elegantbeef> It's a pragma pragma |
09:00:14 | FromDiscord | <Elegantbeef> We introduced a new pragma named `locker` |
09:00:35 | FromDiscord | <Elegantbeef> we use that trick to support old Nim and remove the warning from new Nim, in a relatively painless way |
09:03:10 | FromDiscord | <Phil> Do I need to export that ? |
09:03:19 | FromDiscord | <odexine> No |
09:03:19 | FromDiscord | <Phil> I only know pragmas as macros, never used the pragma pragma syntax |
09:03:24 | FromDiscord | <odexine> You can’t export them |
09:03:37 | FromDiscord | <odexine> You have to place it into a separate file and include that |
09:03:39 | FromDiscord | <Phil> Wait I have like 3 modules that'd need this, so I'd need to copy-paste it? |
09:03:49 | FromDiscord | <Phil> Ohh include.... damn |
09:03:49 | FromDiscord | <odexine> Sure that too |
09:05:53 | FromDiscord | <Phil> So I've found the 1 single usecase for include |
09:05:54 | FromDiscord | <Phil> Got it |
09:06:10 | FromDiscord | <Elegantbeef> Which can be replaced with a macro, but it's too much work |
09:06:39 | FromDiscord | <Elegantbeef> You also of course could just do `{.push warning[LockLevel]: off.}` |
09:06:47 | FromDiscord | <Elegantbeef> Then pop it after |
09:07:53 | FromDiscord | <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:09 | FromDiscord | <Elegantbeef> There are like 20 procs inside wasm3 |
09:08:32 | FromDiscord | <Chronos [She/Her]> Which don't do that afaik |
09:08:51 | FromDiscord | <Chronos [She/Her]> But if I could just poke the internal struct... :P |
09:08:54 | FromDiscord | <Elegantbeef> `getMemory` might be the trick |
09:09:03 | * | nisstyre quit (Server closed connection) |
09:09:06 | FromDiscord | <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:37 | FromDiscord | <enthus1ast> I use it quite often for unittesting↵(@Phil) |
09:14:35 | FromDiscord | <Chronos [She/Her]> In reply to @Elegantbeef "`getMemory` might be the": Hm but locals too |
09:14:52 | FromDiscord | <Chronos [She/Her]> Also the current instruction it's running |
09:17:02 | FromDiscord | <enthus1ast> Btw has one tried dietlib libc with nim yet? |
09:17:33 | FromDiscord | <enthus1ast> This one\: https://www.fefe.de/dietlibc/ |
09:18:23 | FromDiscord | <Chronos [She/Her]> Why that instead of musl? |
09:19:02 | FromDiscord | <enthus1ast> Idk what's the difference |
09:19:15 | * | junaid_ joined #nim |
09:19:45 | FromDiscord | <enthus1ast> Fefe is a well known german hacker, that's the only reason I know about his libc |
09:21:07 | FromDiscord | <Chronos [She/Her]> https://github.com/wasm3/wasm3/issues/268 hm reading this, but it doesn't mention needing to save locals? |
09:21:12 | FromDiscord | <Chronos [She/Her]> In reply to @enthus1ast "Fefe is a well": Ah alright |
09:23:20 | FromDiscord | <enthus1ast> https://www.etalabs.net/compare_libcs.html |
09:23:59 | FromDiscord | <enthus1ast> It's way smaller than musl |
09:24:51 | FromDiscord | <Phil> Given how musl has a fair ecosystem around it and seems small enough to me, musl seems nicer |
09:25:46 | FromDiscord | <enthus1ast> Yeah |
09:26:29 | FromDiscord | <Phil> I mean smaller is of course better, just in this case the tradeoff with the cost of change seems meh |
09:35:07 | NimEventer | New 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:40 | FromDiscord | <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:56 | FromDiscord | <Chronos [She/Her]> Autocomplete is also broke... should I use another editor? If so, which one? |
10:03:29 | FromDiscord | <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:04 | FromDiscord | <odexine> Jetbrains’ editor also does not have either of those features (it has rudimentary autocomplete) |
10:05:22 | FromDiscord | <Chronos [She/Her]> Oof... |
10:05:29 | FromDiscord | <Chronos [She/Her]> This sucks major ass |
10:05:36 | FromDiscord | <Chronos [She/Her]> Oh well |
10:09:19 | FromDiscord | <Chronos [She/Her]> I wonder if PMunch's lsp does anything to make it a tad better hm |
10:10:28 | FromDiscord | <odexine> No |
10:10:36 | FromDiscord | <odexine> It also uses the same suggestion engine |
10:11:02 | FromDiscord | <odexine> Well, I cannot say for sure that it won’t help but I have my doubts |
10:11:21 | FromDiscord | <odexine> It depends on what the real issue is, or why the extension is failing |
10:11:26 | FromDiscord | <ieltan> Personally never managed to make lsp reliably work on vscode |
10:11:27 | FromDiscord | <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:32 | FromDiscord | <sOkam! 🫐> What's stopping the knowledable guys from improving the issues of nimsuggest? |
10:11:34 | FromDiscord | <odexine> If the issue is at the suggestion engine then the LSP will not help |
10:11:54 | FromDiscord | <odexine> In reply to @heysokam "What's stopping the knowledable": Architectural issues and time |
10:11:56 | FromDiscord | <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:03 | FromDiscord | <odexine> Both |
10:12:18 | FromDiscord | <odexine> And also that people don’t want to work on it |
10:12:32 | FromDiscord | <sOkam! 🫐> why is that so? |
10:12:45 | FromDiscord | <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:47 | FromDiscord | <odexine> That depends on the person? |
10:12:48 | FromDiscord | <jmgomez> In reply to @odexine "And also that people": Probably this is the biggest issue |
10:13:17 | FromDiscord | <sOkam! 🫐> yeah but i figure if nobody wants to work on it, there must be something common between them |
10:13:36 | FromDiscord | <odexine> It’s likely because of exactly the architectural issues |
10:13:39 | FromDiscord | <Chronos [She/Her]> Rip |
10:13:46 | FromDiscord | <odexine> And the fact that it’s gonna be a lot of work |
10:13:52 | FromDiscord | <Chronos [She/Her]> Wonder if there's any point on starting from scratch |
10:13:52 | FromDiscord | <jmgomez> One can say there are more important things to do |
10:13:52 | FromDiscord | <ieltan> People have worked on IC which is supposed to improve the situation |
10:14:10 | FromDiscord | <ieltan> But it's still not ready |
10:14:21 | FromDiscord | <jmgomez> IC can help but it wont automagically improve the extensions |
10:14:31 | FromDiscord | <ieltan> Ofc |
10:14:32 | FromDiscord | <jmgomez> contrarty to popular believe 😛 |
10:14:44 | FromDiscord | <jmgomez> (edit) "contrarty" => "contrary" |
10:14:51 | FromDiscord | <odexine> Is IC really going to help or we’re most of us just told that it will |
10:14:52 | FromDiscord | <Chronos [She/Her]> Hm |
10:15:00 | FromDiscord | <odexine> In reply to @jmgomez "contrary to popular believe": Belief :Gladsuna: |
10:15:39 | FromDiscord | <jmgomez> In reply to @odexine "Is IC really going": it may to some extend, not in its current form |
10:15:54 | FromDiscord | <sOkam! 🫐> whats the solution. write something new? |
10:16:05 | FromDiscord | <jmgomez> the idea is that it will speed up nimsuggest |
10:16:05 | FromDiscord | <odexine> Lol no, that’s almost never the solution |
10:16:32 | FromDiscord | <jmgomez> but right now is slow than just compiling the code without it |
10:16:43 | FromDiscord | <sOkam! 🫐> yeah pretty much |
10:16:57 | FromDiscord | <odexine> NGL I program in Nim without any suggestion or IDE tooling |
10:16:58 | FromDiscord | <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:45 | FromDiscord | <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:01 | FromDiscord | <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:01 | FromDiscord | <odexine> Maybe that’s just because it’s so poor in the first place though |
10:18:24 | FromDiscord | <sOkam! 🫐> Yeah I figure. but people do care, and thats one of the most user-facing tools of the language |
10:18:38 | FromDiscord | <sOkam! 🫐> if such a big tool is clumsy, what image does it give about the lang |
10:18:45 | FromDiscord | <sOkam! 🫐> its not one thing, of course... but it does matter |
10:19:00 | FromDiscord | <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:03 | FromDiscord | <odexine> Of course |
10:21:53 | FromDiscord | <sOkam! 🫐> go to definition across libraries, and across entire folders, does have a LOT of value |
10:22:20 | FromDiscord | <sOkam! 🫐> just that fact alone makes the lsp 100% worth the memory hog |
10:23:16 | FromDiscord | <ieltan> Also really useful to peek at a function's type signature |
10:23:43 | FromDiscord | <ravinder387> what discard do? |
10:23:54 | FromDiscord | <sOkam! 🫐> In reply to @ravinder387 "what discard do?": `do nothing` |
10:24:12 | FromDiscord | <ravinder387> when should i write? |
10:24:24 | FromDiscord | <sOkam! 🫐> when you want to explicitely not use the output of a function |
10:24:27 | FromDiscord | <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:36 | FromDiscord | <ravinder387> demonstrate me with example if possible |
10:25:17 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4Gwu |
10:25:30 | FromDiscord | <ravinder387> thank you.. let me make note |
10:27:12 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://paste.rs/6Wms9 |
10:27:37 | FromDiscord | <sOkam! 🫐> (edit) "https://play.nim-lang.org/#ix=4Gwx" => "https://play.nim-lang.org/#ix=4Gww" |
10:29:33 | FromDiscord | <.aingel.> What's the main formatter that people use? Do people use nimpretty? |
10:31:10 | FromDiscord | <kots> my eyes and fingers |
10:32:56 | FromDiscord | <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:21 | FromDiscord | <Chronos [She/Her]> In reply to @odexine "So I don’t mind": Issue is for bigger projects tho |
10:33:52 | FromDiscord | <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:11 | FromDiscord | <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:47 | FromDiscord | <.aingel.> What is IC? |
10:35:57 | FromDiscord | <.aingel.> In reply to @chronos.vitaqua "Nimpretty did not like": Yeah it did some sort of weird thing to my file |
10:36:16 | FromDiscord | <.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:40 | FromDiscord | <Chronos [She/Her]> In reply to @.aingel. "What is IC?": Incremental compilation |
10:36:50 | FromDiscord | <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:55 | FromDiscord | <.aingel.> In reply to @chronos.vitaqua "Incremental compilation": Oh cool |
10:37:05 | FromDiscord | <Chronos [She/Her]> Yeah, not ready nor usable atm tho oof |
10:37:08 | FromDiscord | <.aingel.> Which languages implement that? |
10:37:27 | FromDiscord | <Chronos [She/Her]> The major C compilers do I believe |
10:38:31 | FromDiscord | <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:57 | FromDiscord | <Chronos [She/Her]> Just literally save the `PNode`s as files that can be loaded? |
10:42:06 | FromDiscord | <.aingel.> In reply to @chronos.vitaqua "The major C compilers": Wait so nim has to recompile every single file? |
10:42:21 | FromDiscord | <.aingel.> I thought it worked like a c compiler that only compiled like files that changed |
10:44:22 | FromDiscord | <Chronos [She/Her]> In reply to @.aingel. "Wait so nim has": Yeaaah |
10:44:33 | FromDiscord | <.aingel.> Oh no |
10:44:39 | FromDiscord | <Chronos [She/Her]> It compiles it's files to C but doesn't actually do incremental compilation rn |
10:44:49 | FromDiscord | <.aingel.> I guess I've never really built a large nim project to notice that |
10:44:52 | FromDiscord | <Chronos [She/Her]> Usually it's not much of an issue but for big projects (see the compiler), takes ages |
10:47:21 | FromDiscord | <.aingel.> Right |
10:50:34 | FromDiscord | <BanannaMan> sent a code paste, see https://play.nim-lang.org/#ix=4GwF |
10:51:43 | FromDiscord | <odexine> In reply to @BanannaMan "I hate when that": there's a reason it's like this in nim |
10:51:48 | FromDiscord | <BanannaMan> Why? |
10:51:59 | FromDiscord | <odexine> it prevents forgetting to use the returned value? |
10:52:37 | FromDiscord | <BanannaMan> What if I only want to return the value and have it displayed in the console? |
10:53:12 | FromDiscord | <odexine> huh? |
10:53:19 | FromDiscord | <odexine> what do you mean exactly |
10:53:39 | FromDiscord | <BanannaMan> i mean what if I want to return the value after some sort of operation |
10:54:00 | FromDiscord | <BanannaMan> Do I have to use echo instead of return? |
10:55:15 | FromDiscord | <odexine> i seriously dont know what you mean by that |
10:55:16 | FromDiscord | <Chronos [She/Her]> That... doesn't make sense really |
10:58:37 | FromDiscord | <.aingel.> Whats the status of IC? |
10:58:43 | FromDiscord | <.aingel.> https://github.com/nim-lang/Nim/pull/20540 |
10:58:49 | FromDiscord | <.aingel.> This is the last issue I could find on it |
11:01:53 | * | armin left #nim (#nim) |
11:04:52 | FromDiscord | <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:54 | FromDiscord | <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:57 | FromDiscord | <.aingel.> In reply to @odexine "i seriously dont know": When did your status change from kanon to anon |
11:06:28 | FromDiscord | <.aingel.> (edit) "In reply to @odexine "i seriously dont know": When did your status change from kanon to anon ... " added "😏" |
11:08:05 | FromDiscord | <jmgomez> In reply to @.aingel. "https://github.com/nim-lang/Nim/pull/20540": you shouldnt be looking at issues but PRs |
11:18:21 | FromDiscord | <.aingel.> https://www.reddit.com/r/nim/comments/167qzdl/why_to_learn_nim/jysmpdg/ |
11:18:27 | FromDiscord | <.aingel.> What do you guys think of this comment |
11:18:42 | FromDiscord | <.aingel.> sent a long message, see http://ix.io/4GwM |
11:26:44 | FromDiscord | <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:08 | FromDiscord | <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:24 | FromDiscord | <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:35 | FromDiscord | <Phil> sent a long message, see http://ix.io/4GwO |
11:30:12 | FromDiscord | <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:20 | FromDiscord | <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:41 | FromDiscord | <Phil> (edit) "you" => "your options" |
11:31:30 | FromDiscord | <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:30 | FromDiscord | <Phil> (edit) "and" => "which is an architecture level where sonarqube can't save you. And" | "that" => "the OO" |
11:35:28 | FromDiscord | <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:51 | FromDiscord | <BanannaMan> Okay |
11:36:01 | FromDiscord | <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:15 | FromDiscord | <BanannaMan> What is meant by using the value? Changing it? |
11:37:10 | FromDiscord | <Phil> How are you replying to and in reference to what? |
11:37:14 | FromDiscord | <Phil> (edit) "How" => "Who" |
11:39:36 | FromDiscord | <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:17 | FromDiscord | <Phil> Oh that. Okay so you know how return of a proc makes it's return available to the calling proc? |
11:41:25 | FromDiscord | <Phil> (edit) "return" => "returned value" |
11:44:53 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4GwW |
11:46:11 | FromDiscord | <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:24 | FromDiscord | <Phil> (edit) "written" => "written, but you do not care for that text in your usecase" |
11:50:38 | FromDiscord | <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:50 | FromDiscord | <jmgomez> In reply to @chronos.vitaqua "I am very much": what are you trying to do? Creating a new compiler backend? |
11:57:34 | FromDiscord | <Phil> sent a long message, see http://ix.io/4Gx0 |
11:58:30 | FromDiscord | <jmgomez> I wouldnt separate them at all |
11:58:44 | FromDiscord | <Phil> All runtime configs or all compiletime configs? |
11:59:49 | FromDiscord | <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:59 | FromDiscord | <Chronos [She/Her]> In reply to @jmgomez "what are you trying": Yep |
12:00:34 | FromDiscord | <Chronos [She/Her]> I'm expecting it to go absolutely nowhere but I want to try and get it to work |
12:01:25 | FromDiscord | <jmgomez> that's fine, it may be a good thing to learn. What lang do you want to output? |
12:01:37 | FromDiscord | <jmgomez> (edit) "thing" => "way" |
12:03:08 | FromDiscord | <Chronos [She/Her]> Hoping to output Java, honestly |
12:03:55 | FromDiscord | <jmgomez> that's not too far for what is already there. How are you approaching it |
12:04:51 | FromDiscord | <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:25 | FromDiscord | <jmgomez> why dont just start with the gen part and care about the frontend later? |
12:05:26 | FromDiscord | <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:43 | FromDiscord | <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:02 | FromDiscord | <jmgomez> yes, dont use it as a library, just fork it 🙂 |
12:06:17 | FromDiscord | <Chronos [She/Her]> Issue is that the compile times are atrocious oof |
12:06:30 | FromDiscord | <Chronos [She/Her]> Was planning on just making the frontend first so that I could plug my backend into it |
12:06:31 | FromDiscord | <jmgomez> are you using `koch temp` I assume? |
12:08:08 | FromDiscord | <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:21 | FromDiscord | <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:33 | FromDiscord | <Chronos [She/Her]> Just wish I could make only the JS backend be compiled |
12:15:19 | FromDiscord | <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:34 | FromDiscord | <jmgomez> (still use the js as ref) |
12:16:04 | FromDiscord | <jmgomez> if you do the former, PR it 🙂 |
12:17:40 | FromDiscord | <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:12 | FromDiscord | <Phil> Do you need to memory manage cstrings that come from a dynlib that you use (gtk in this case) ? |
12:25:21 | FromDiscord | <Chronos [She/Her]> Not sure how I'd tell koch to do that tho hm |
12:25:27 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "Do you need to": I mean, I'd imagine so |
12:27:04 | FromDiscord | <Phil> So... do I basically make a `type OwnedGtkString = distinct cstring` and define destructors for `OwnedGtkstring` ? |
12:27:22 | FromDiscord | <Phil> (edit) "OwnedGtkString" => "ManagedGtkString" | "`OwnedGtkstring`" => "`ManagedGtkstring`" |
12:32:16 | * | junaid_ joined #nim |
12:34:33 | FromDiscord | <raynei486> yeah |
12:38:37 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "So... do I basically": Yeah seems like it |
12:56:30 | FromDiscord | <sOkam! 🫐> is there a way to define a proc type that can take a generic proc of that shape? 🤔 |
12:57:21 | FromDiscord | <Phil> As in a generic proc type that eats a proc of its own type? |
12:57:32 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4Gxa |
12:59:24 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Gxb |
13:00:14 | FromDiscord | <sOkam! 🫐> that's not generic |
13:00:26 | FromDiscord | <sOkam! 🫐> you are specifying the types explicitly |
13:01:01 | FromDiscord | <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:31 | FromDiscord | <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:44 | FromDiscord | <kingterrytheterrible12> Does nim have a man page? Like can i do `man seq` somehow |
13:02:02 | FromDiscord | <odexine> sent a code paste, see https://play.nim-lang.org/#ix=4Gxd |
13:02:03 | FromDiscord | <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:03 | FromDiscord | <odexine> i do wonder if that works |
13:02:09 | FromDiscord | <sOkam! 🫐> In reply to @odexine "`type MyProc[T] = proc(val:": itdoes |
13:02:09 | FromDiscord | <odexine> In reply to @odexine "i do wonder if": i dont see why not though |
13:02:15 | FromDiscord | <sOkam! 🫐> but... thats for 1 proc, not generic |
13:02:19 | FromDiscord | <kingterrytheterrible12> In reply to @odexine "i dont see why": What happen to kanon |
13:02:23 | FromDiscord | <odexine> it is generic |
13:02:26 | FromDiscord | <odexine> it is a generic type |
13:02:37 | FromDiscord | <Phil> I think you need different wording to describe what you mean here |
13:02:43 | FromDiscord | <odexine> it's not runtime variant |
13:02:43 | FromDiscord | <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:09 | FromDiscord | <sOkam! 🫐> but... well, thinking about it, maybe i don't need to 🤔 |
13:03:48 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4Gxe |
13:04:18 | FromDiscord | <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:09 | FromDiscord | <sOkam! 🫐> But I guess if I store the functions that way, there is no option other than typeless 😔 |
13:07:25 | FromDiscord | <odexine> the allocator would have to be generic as well if you wanted typed ptrs |
13:11:36 | FromDiscord | <sOkam! 🫐> yeah, that's the probl. it would only be able to allocate one type of thing |
13:17:04 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "Does nim have a": I mean, there's the docs |
13:30:16 | FromDiscord | <sOkam! 🫐> Is there any way to varargs without GC'ed memory? |
13:33:53 | FromDiscord | <odexine> i dont tihnk varargs need gc? |
13:35:05 | FromDiscord | <sOkam! 🫐> its a seq internally a apparently 😦 |
13:35:18 | FromDiscord | <sOkam! 🫐> will try again just in case, but last time it didn't work |
13:35:23 | FromDiscord | <odexine> then you cant use it |
13:35:36 | FromDiscord | <odexine> but i dont think that makes sense |
13:37:43 | FromDiscord | <Chronos [She/Her]> I would've assumed it'd be an array considering that varargs are compile time |
13:49:09 | FromDiscord | <sOkam! 🫐> hmmm I guess they work? I don't know why they failed last time then 🤷♂️ |
14:00:23 | FromDiscord | <toma400> sent a code paste, see https://play.nim-lang.org/#ix=4Gxt |
14:00:38 | FromDiscord | <toma400> (edit) "https://play.nim-lang.org/#ix=4Gxt" => "https://play.nim-lang.org/#ix=4Gxu" |
14:06:25 | FromDiscord | <raynei486> templates are basically text substitution |
14:06:30 | FromDiscord | <raynei486> just drop the return |
14:08:20 | FromDiscord | <toma400> Ooh, right, thank you a lot ❤️ |
14:08:31 | FromDiscord | <.aingel.> When I'm making c bindings of functions what's the nim convention for the proc names, should it be CamelCase? |
14:08:38 | FromDiscord | <.aingel.> If the c func names are snake_case |
14:08:49 | FromDiscord | <.aingel.> Should I rename them to CamelCase? |
14:09:24 | FromDiscord | <odexine> no need to |
14:09:50 | FromDiscord | <raynei486> nim is mostly case insensitive |
14:13:12 | FromDiscord | <ravinder387> anybody demonstrate me newCall() with example code |
14:13:28 | FromDiscord | <ravinder387> is it create new ast |
14:14:45 | NimEventer | New 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:20 | FromDiscord | <ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4GxB |
14:18:34 | FromDiscord | <ravinder387> what does it mean by newCall() |
14:19:11 | FromDiscord | <Phil> newCall creates a call-nimnode.↵That is the functional equivalent of executing a function |
14:19:57 | FromDiscord | <Phil> So it's executing.. either rhs, lhs or both, not quite fully sure |
14:20:24 | FromDiscord | <Phil> It executes rhs and uses lhs as an argument |
14:20:28 | FromDiscord | <toma400> sent a code paste, see https://play.nim-lang.org/#ix=4GxC |
14:20:38 | FromDiscord | <Phil> (edit) "an" => "the" | "theargument ... " added "for rhs" |
14:21:03 | FromDiscord | <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:07 | FromDiscord | <.aingel.> In reply to @odexine "no need to": Just wondering what the convention was stylistically |
14:39:39 | FromDiscord | <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:10 | FromDiscord | <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:23 | FromDiscord | <raynei486> In reply to @toma400 "Thank you once again,": 👍 |
15:07:07 | FromDiscord | <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:42 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4GxT |
15:26:35 | FromDiscord | <odexine> i think because object variants raise an exception when the kind is wrong and you access a field |
15:27:12 | FromDiscord | <sOkam! 🫐> crap |
15:27:18 | FromDiscord | <sOkam! 🫐> do methods also raise exceptions? |
15:40:32 | * | blop_ quit (Remote host closed the connection) |
15:41:07 | * | blop_ joined #nim |
15:59:53 | FromDiscord | <leorize> no |
16:03:03 | * | jmdaemon quit (Ping timeout: 240 seconds) |
16:51:53 | FromDiscord | <Chronos [She/Her]> Tbh I might still just make my own frontend |
16:52:03 | FromDiscord | <Chronos [She/Her]> Would be useful in the future too if I want to so similar |
16:53:24 | FromDiscord | <jmgomez> you own compiler frontend you mean? |
16:53:31 | FromDiscord | <jmgomez> (edit) "you" => "your" |
17:01:52 | FromDiscord | <kingterrytheterrible12> You guys think making auto bindgen for nim to react native is a good idea? |
17:02:38 | FromDiscord | <jmgomez> yes |
17:03:34 | FromDiscord | <jmgomez> a better one, do a parser for typescript definition files at macro time |
17:07:54 | FromDiscord | <.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:36 | FromDiscord | <Chronos [She/Her]> In reply to @jmgomez "your own compiler frontend": Yeah |
18:14:11 | FromDiscord | <jmgomez> Dont do that. Just fix `koch temp javascript` |
18:16:58 | FromDiscord | <Chronos [She/Her]> Is that supposed to exist? |
18:17:16 | FromDiscord | <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:31 | FromDiscord | <Chronos [She/Her]> So doing this now just makes it easier for me to (mostly) forget about |
18:17:50 | FromDiscord | <jmgomez> I have good news for you |
18:17:59 | FromDiscord | <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:00 | FromDiscord | <jmgomez> `./koch temp js myFile.nim` works |
18:18:22 | FromDiscord | <Chronos [She/Her]> In reply to @jmgomez "`./koch temp js myFile.nim`": Oh? What does that do? |
18:18:42 | FromDiscord | <jmgomez> generates `myFile.js` |
18:18:50 | FromDiscord | <Chronos [She/Her]> Ah |
18:19:05 | FromDiscord | <Chronos [She/Her]> But how would that help me in compiling a custom backend? |
18:19:33 | FromDiscord | <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:40 | FromDiscord | <Chronos [She/Her]> Ah |
18:19:47 | FromDiscord | <jmgomez> (edit) "in." => "in it." |
18:19:47 | FromDiscord | <Chronos [She/Her]> Okay yeah that makes sense |
18:19:51 | FromDiscord | <Chronos [She/Her]> So I can just do that, fun |
18:19:53 | FromDiscord | <jmgomez> (edit) "gains" => "gain" |
18:19:56 | FromDiscord | <Chronos [She/Her]> As long as it's still named jsgen |
18:20:03 | FromDiscord | <Chronos [She/Her]> Thanks dude! |
18:20:30 | FromDiscord | <jmgomez> to replace it later should be the easy part 😛 |
18:20:33 | FromDiscord | <jmgomez> np, good luck |
18:21:20 | FromDiscord | <Chronos [She/Her]> Thanks! I'll try to get it working aha |
18:36:55 | * | xmachina quit (Quit: WeeChat 4.0.4) |
18:40:44 | FromDiscord | <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:13 | arkanoid | how 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:14 | FromDiscord | <Chronos [She/Her]> Not sure if I need to emulate pointers in Java because it's all pass by reference anyway |
20:17:51 | FromDiscord | <raynei486> In reply to @fabric.input_output "what does the message": Do you have code to reproduce? |
20:17:52 | FromDiscord | <Chronos [She/Her]> God JS gen is a fuck- |
20:17:53 | FromDiscord | <raynei486> Very odd message |
20:30:19 | FromDiscord | <fabric.input_output> sent a code paste, see https://play.nim-lang.org/#ix=4GzA |
20:30:46 | FromDiscord | <fabric.input_output> (edit) "https://play.nim-lang.org/#ix=4GzA" => "https://play.nim-lang.org/#ix=4GzB" |
20:31:21 | FromDiscord | <fabric.input_output> (edit) "https://play.nim-lang.org/#ix=4GzB" => "https://play.nim-lang.org/#ix=4GzC" |
20:32:30 | FromDiscord | <Elegantbeef> Defects are not raised |
20:32:30 | FromDiscord | <Elegantbeef> I mean they are, but they're not tracked |
20:32:35 | FromDiscord | <fabric.input_output> sent a code paste, see https://play.nim-lang.org/#ix=4GzD |
20:33:04 | FromDiscord | <fabric.input_output> In reply to @Elegantbeef "I mean they are,": oh so defects are like exceptions without a stack trace |
20:33:34 | FromDiscord | <Elegantbeef> Defects are meant to kill the program |
20:33:39 | FromDiscord | <Elegantbeef> As such there is no tracking for them |
20:33:55 | FromDiscord | <Elegantbeef> `--panics:on` is the 'correct' behaviour |
20:34:17 | FromDiscord | <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:04 | FromDiscord | <Elegantbeef> It is a shame that there is no defect tracking so you can force handling most incorrect behaviour, but alas |
20:35:50 | FromDiscord | <fabric.input_output> so `raises` works only for catchable exceptions? |
20:35:56 | FromDiscord | <Elegantbeef> Yes |
20:36:18 | FromDiscord | <Elegantbeef> Defects are not meant to be caught and as such are not tracked |
20:36:42 | FromDiscord | <Elegantbeef> Defects are supposed to be used to indicate incorrect behaviour you're generally meant to defensively program for |
20:36:54 | FromDiscord | <Elegantbeef> Such as index defect, range defect, field defect, ... |
20:37:30 | FromDiscord | <fabric.input_output> or in my case, unpacking values and errors from results incorrectly |
20:37:37 | FromDiscord | <Elegantbeef> In your case you'll want `raises:[]` although not what you really want |
20:39:34 | FromDiscord | <fabric.input_output> more not like it should, so I guess I'll just have to remove `raises` alltogether |
20:40:24 | FromDiscord | <fabric.input_output> thanks for explaining |
20:49:23 | FromDiscord | <Chronos [She/Her]> Hm I'm slowly tweaking the JS gen backend :p |
20:49:45 | FromDiscord | <Chronos [She/Her]> It's basically mostly fine so far bc of how similar barebones JS can be to Java |
20:51:19 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/8jUkS |
20:51:27 | FromDiscord | <Elegantbeef> That forces the user to convert from Error to value before extracting a value |
20:52:14 | FromDiscord | <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:21 | FromDiscord | <Chronos [She/Her]> Lol |
20:53:03 | FromDiscord | <Chronos [She/Her]> What if instead of lambda I just make a new private method in the class :p |
20:53:21 | FromDiscord | <Chronos [She/Her]> Also hm `Consumer<Integer> method = (n) -> { System.out.println(n); };` |
20:54:16 | FromDiscord | <Phil> The entire type system and how java turns functions into objects is just fundamentally weird to me |
20:54:48 | FromDiscord | <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:50 | FromDiscord | <Phil> Functions as objects got to be one of the least intuitive things I've seen in programming |
20:55:01 | FromDiscord | <Chronos [She/Her]> Because doing it really well will be a pain I'd imagine- |
20:55:22 | FromDiscord | <Chronos [She/Her]> Also I think a custom system.nim would need to be made too |
20:55:39 | FromDiscord | <Chronos [She/Her]> For stubbing out Nim methods to Java (again, for really good integration) |
20:55:48 | FromDiscord | <Chronos [She/Her]> Hopefully no-one minds it being shitty- |
20:56:29 | FromDiscord | <Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4GzK |
20:56:45 | FromDiscord | <Chronos [She/Her]> I'm assuming this is pointer-related due to the arrays |
20:56:50 | FromDiscord | <Chronos [She/Her]> I am in pain |
20:57:54 | FromDiscord | <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:34 | FromDiscord | <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:08 | FromDiscord | <Chronos [She/Her]> Do you think I'd be better off trying from scratch? :p |
20:59:21 | FromDiscord | <Chronos [She/Her]> I'm in over my head honestly |
20:59:43 | FromDiscord | <Chronos [She/Her]> I can modify some stuff but then others is eternal confusion |
20:59:57 | FromDiscord | <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:25 | FromDiscord | <Chronos [She/Her]> Fair enough |
21:00:57 | FromDiscord | <Chronos [She/Her]> I think... I'm gonna give up :P |
21:01:24 | FromDiscord | <Phil> That's how I know you're not Rick Astley |
21:01:28 | FromDiscord | <Phil> He never would! |
21:01:31 | FromDiscord | <Chronos [She/Her]> Hah |
21:02:02 | FromDiscord | <Chronos [She/Her]> Actually... |
21:02:19 | FromDiscord | <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:12 | FromDiscord | <Chronos [She/Her]> Defining globals is hard :/ |
21:05:08 | * | xet7 quit (Read error: Connection reset by peer) |
21:25:10 | FromDiscord | <millymox> Running nimble test inside my test directory and it’s nothing running my test |
21:29:27 | FromDiscord | <millymox> Fixed |
21:29:36 | FromDiscord | <millymox> Fidget or nimx for GUI? |
21:37:26 | * | def- quit (Quit: -) |
21:37:40 | * | def- joined #nim |
21:41:22 | FromDiscord | <Chronos [She/Her]> I think this is just too much for me oof |
21:41:31 | FromDiscord | <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:22 | FromDiscord | <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:50 | FromDiscord | <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:12 | FromDiscord | <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:30 | FromDiscord | <ShalokShalom (ShalokShalom)> There is a perfectly fine solution to run Nim with Java for years.↵(@vindaar) |
22:43:14 | FromDiscord | <ShalokShalom (ShalokShalom)> Chronos seems to love reinventing things, as all great programmers do. |
22:48:08 | FromDiscord | <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:42 | FromDiscord | <michaelb.eth> eh, maybe it's still in preview |
22:51:38 | FromDiscord | <ShalokShalom (ShalokShalom)> I am talking about the Truffle Framework. |
22:57:26 | FromDiscord | <Chronos [She/Her]> In reply to @ShalokShalom (ShalokShalom) "Chronos seems to love": SuLong is still GraalVM specific |
22:57:52 | FromDiscord | <Chronos [She/Her]> For the performance because of how atrocious it'd be otherwise |
22:58:11 | FromDiscord | <Chronos [She/Her]> And again... i don't want to have to build for multiple platforms |
23:00:39 | FromDiscord | <ShalokShalom (ShalokShalom)> You do yours |
23:01:10 | FromDiscord | <ShalokShalom (ShalokShalom)> Performance would be a no-issue |
23:01:31 | FromDiscord | <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:47 | FromDiscord | <ShalokShalom (ShalokShalom)> Why would it be? |
23:02:12 | FromDiscord | <Chronos [She/Her]> Because who would even think of using your mod if the performance is dog shit :p |
23:02:27 | FromDiscord | <Chronos [She/Her]> Sure I'm doing it for fun but I still want others to actually be able to use it |
23:02:42 | FromDiscord | <Chronos [She/Her]> Minecraft is notorious for bad performance without optimisation mods and even then |
23:02:47 | FromDiscord | <ShalokShalom (ShalokShalom)> You project performance based on nothing else than thin air |
23:03:05 | FromDiscord | <ShalokShalom (ShalokShalom)> Why would it run worse on Truffle |
23:04:13 | FromDiscord | <Langosta> beware premature optimization |
23:04:25 | FromDiscord | <Langosta> https://effectiviology.com/premature-optimization/ |
23:04:33 | FromDiscord | <ShalokShalom (ShalokShalom)> You can build native executables and the whole thing is faster than the normal JVM generally. |
23:04:48 | FromDiscord | <ShalokShalom (ShalokShalom)> We are talking about something completely different. \:)↵(@Langosta) |
23:04:58 | FromDiscord | <Langosta> My bad! |
23:06:39 | FromDiscord | <ShalokShalom (ShalokShalom)> https://medium.com/graalvm/java-on-truffle-going-fully-metacircular-215531e3f840↵(@Langosta) |
23:07:19 | FromDiscord | <Langosta> this is interesting, thank you for the correction |
23:19:51 | FromDiscord | <sOkam! 🫐> when is the next minor or patch version of nim gonna be deployed? |
23:20:24 | FromDiscord | <sOkam! 🫐> (edit) "deployed?" => "deployed on `stable`?" |
23:57:13 | FromDiscord | <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:29 | FromDiscord | <Elegantbeef> It shouldnt change anything |
23:57:50 | FromDiscord | <sOkam! 🫐> but it does 🤷♂️ |
23:58:11 | FromDiscord | <Elegantbeef> Atleast afaik it only adds source info to the generated C |