00:00:09 | FromDiscord | <Elegantbeef> Just use a real OS |
00:00:29 | FromDiscord | <leorize> winim is a windows gui thing |
00:00:35 | FromDiscord | <leorize> or is it wnim |
00:00:41 | FromDiscord | <leorize> I don't remember the name |
00:00:42 | FromDiscord | <odexine> prolly wnim |
00:00:49 | FromDiscord | <Elegantbeef> Who knows, I doubt the dev even knows |
00:00:49 | FromDiscord | <odexine> winim is the windows api wrapper |
00:01:10 | FromDiscord | <Elegantbeef> It's not wxnim that's the wx widgets stuff |
00:02:11 | FromDiscord | <piman_discriminator_1010> In reply to @Elegantbeef "*Just use a real": last time I tried that I completely destroyed the OS |
00:02:24 | FromDiscord | <piman_discriminator_1010> in less than a day |
00:02:32 | FromDiscord | <Elegantbeef> Leo time to sell them on a immutable OS |
00:02:48 | FromDiscord | <Elegantbeef> I mean if you're running `sudo rm -rf /` you get what you get |
00:03:23 | FromDiscord | <odexine> idk, ive broken windows a lot as well |
00:03:50 | FromDiscord | <piman_discriminator_1010> In reply to @Elegantbeef "I mean if you're": nah, it was only `sudo apt install ...` |
00:03:57 | FromDiscord | <Elegantbeef> I'm always amazed at people breaking linux |
00:04:13 | FromDiscord | <piman_discriminator_1010> broke it so hard it didn't ever recognize the keyboard anymore |
00:04:19 | FromDiscord | <piman_discriminator_1010> (edit) "ever" => "even" |
00:04:54 | FromDiscord | <piman_discriminator_1010> also on the topic of wnim or winim https://media.discordapp.net/attachments/371759389889003532/1199867457435861042/image.png?ex=65c41aa6&is=65b1a5a6&hm=77d32e1221dd256b8046bc7af7c3800fa81f60de8c324738dc18534c52625702& |
00:04:59 | * | advesperacit quit () |
00:05:23 | FromDiscord | <leorize> you should definitely use an immutable Linux \:p |
00:05:35 | FromDiscord | <Elegantbeef> You should also read what commands are going to do |
00:05:45 | FromDiscord | <Elegantbeef> To uninstall your input handling using `apt install` is a feat |
00:06:04 | FromDiscord | <piman_discriminator_1010> > wNim is Nim's Windows GUI Framework, based on winim. Layout DSL is powered by Yuriy Glukhov's Kiwi constraint solving library. |
00:06:19 | FromDiscord | <piman_discriminator_1010> In reply to @Elegantbeef "To uninstall your input": and the desktop too |
00:06:35 | FromDiscord | <piman_discriminator_1010> booted to terminal and they keyboard was basically gone |
00:06:40 | FromDiscord | <Elegantbeef> Just fully uninstalls X through `install` |
00:06:57 | FromDiscord | <piman_discriminator_1010> the status lights on the keyboard didn't even work |
00:07:07 | FromDiscord | <leorize> none of that could've happened if you use fedora sliverblue xd |
00:07:48 | FromDiscord | <Elegantbeef> None of that could've happened if you said "no" to "Are you sure you want to uninstall xorg, Xserver, X, $DesktopEnvironment ...." |
00:08:29 | FromDiscord | <JJ> In reply to @spacelucy "hey, i'm having some": you need to like. have a copy of the nim source installed on your system you can point nimsuggest at afaik |
00:08:38 | FromDiscord | <JJ> or if you use choosenim it should find it by default |
00:08:54 | FromDiscord | <JJ> (edit) "nimsuggest" => "nimlsp" |
00:09:37 | FromDiscord | <JJ> https://github.com/PMunch/nimlsp/issues/88 |
00:13:16 | FromDiscord | <leorize> bold of you to assume that people read |
00:13:26 | FromDiscord | <Elegantbeef> I can dream dammit |
00:21:02 | FromDiscord | <piman_discriminator_1010> I have window :ElmoBurn: https://media.discordapp.net/attachments/371759389889003532/1199871510127579167/image.png?ex=65c41e6c&is=65b1a96c&hm=d8ebf4b7140ca1154cb029f3c0f735547e08fcfc5475cada57596db150621418& |
00:23:15 | FromDiscord | <piman_discriminator_1010> unfortunatly the github doesn't explain how to use the library |
00:24:18 | FromDiscord | <piman_discriminator_1010> so I guess it's back to diving into WIN32 API |
00:25:24 | FromDiscord | <Elegantbeef> They do have a wiki |
00:26:14 | FromDiscord | <piman_discriminator_1010> oh yea, just found that, apparently I didn't scroll down all the way |
00:51:26 | FromDiscord | <bubblie> I wanted to ask but is nim top down compilation by design or will that change |
00:54:08 | FromDiscord | <Elegantbeef> It's a 'single' pass compiler |
00:54:32 | FromDiscord | <bubblie> ah I see |
00:57:40 | FromDiscord | <piman_discriminator_1010> is that also why there is no incremental building? |
00:58:26 | FromDiscord | <Elegantbeef> Sure |
00:59:22 | * | raynei quit (Ping timeout: 264 seconds) |
01:03:25 | FromDiscord | <piman_discriminator_1010> what is this syntax?↵`button.wEvent_Button do (): listbox.add "button.wEvent_Button"` |
01:05:02 | FromDiscord | <Elegantbeef> Do notation, it's a way of making anonymous procs |
01:08:09 | FromDiscord | <piman_discriminator_1010> so a lambda? |
01:09:04 | FromDiscord | <Elegantbeef> Sure if you want to use words like that |
01:18:22 | * | krux02 quit (Remote host closed the connection) |
01:19:51 | * | raynei joined #nim |
02:23:42 | * | raynei quit (Ping timeout: 256 seconds) |
02:53:47 | FromDiscord | <piman_discriminator_1010> is there a way to allow implicit casting from enum to int? |
02:57:55 | FromDiscord | <piman_discriminator_1010> and do I really have to use `bitor` instead of `|` :mood: |
03:09:19 | FromDiscord | <Elegantbeef> You can use `or` |
03:09:22 | FromDiscord | <Elegantbeef> you can write a `converter` |
03:16:10 | FromDiscord | <odexine> you can write a proc `|` that literally is just `bitor` |
03:30:33 | FromDiscord | <girvo> My brain is not working today |
03:30:55 | FromDiscord | <Elegantbeef> Ah yes just today |
03:30:56 | FromDiscord | <girvo> Is there a simple way to splitLines() then gather them up into a set of sequences of 5 lines each? |
03:31:04 | FromDiscord | <girvo> In reply to @Elegantbeef "Ah yes just today": Okay especially today 😄 |
03:31:30 | FromDiscord | <girvo> I'm doing teh splitLines, for i in ... etc. manual process currently. Figured I'd ask if theres a shortcut I'm not seeing in strutils or something |
03:31:52 | FromDiscord | <odexine> In reply to @Elegantbeef "Ah yes just today": mine never did. |
03:32:27 | FromDiscord | <bubblie> sent a code paste, see https://play.nim-lang.org/#pasty=DqDtJZtDznEd |
03:32:28 | FromDiscord | <Elegantbeef> Nope there are no like `take(5)` apis |
03:32:35 | FromDiscord | <bubblie> (edit) "https://play.nim-lang.org/#pasty=oyYNsCXSlpzS" => "https://play.nim-lang.org/#pasty=iVcrGQDxJErK" |
03:33:18 | FromDiscord | <intellij_gamer> In reply to @girvo "Is there a simple": Could this be what you're looking for https://nim-lang.org/docs/sequtils.html#distribute%2Cseq%5BT%5D%2CPositive ? |
03:33:46 | FromDiscord | <girvo> Yeah that'll do! |
03:33:51 | FromDiscord | <girvo> 🙂 |
03:35:33 | FromDiscord | <Elegantbeef> There's nothing there that looks off bubblie |
03:35:45 | FromDiscord | <bubblie> thats really weird then |
03:35:48 | FromDiscord | <girvo> sent a code paste, see https://play.nim-lang.org/#pasty=mMldyKaaEWhm |
03:35:50 | FromDiscord | <bubblie> should I try reinstall the package? |
03:35:55 | FromDiscord | <bubblie> (edit) "reinstall" => "reinstalling" |
03:36:08 | FromDiscord | <Elegantbeef> Try it |
03:37:19 | FromDiscord | <Elegantbeef> `vulkan.nim` compiles here |
03:37:19 | FromDiscord | <Elegantbeef> I imagine you have an old version that has like `Bleh = object {.union.}` |
03:37:20 | FromDiscord | <Elegantbeef> https://github.com/nimious/vulkan/commit/09e02a0339ed6132ae34b9a4d35c22375cea55d5 |
03:37:20 | FromDiscord | <Elegantbeef> bingo |
03:37:49 | FromDiscord | <bubblie> ah so how do I install the latest again? |
03:38:00 | FromDiscord | <Elegantbeef> `nimble install vulkan@head` |
03:38:04 | FromDiscord | <bubblie> thanks :) |
03:38:06 | FromDiscord | <Elegantbeef> or `giturl` instead of vulkan |
03:38:20 | FromDiscord | <Elegantbeef> I'd personally just tick the requires inside your .nimble |
03:38:29 | FromDiscord | <Elegantbeef> Nvm |
03:38:35 | FromDiscord | <Elegantbeef> They do not do semver apparently |
03:43:04 | FromDiscord | <bubblie> sent a code paste, see https://play.nim-lang.org/#pasty=DeaAwVhHVvyJ |
03:43:43 | FromDiscord | <Elegantbeef> Uninstall it |
03:43:46 | FromDiscord | <Elegantbeef> then install it |
03:46:18 | FromDiscord | <bubblie> yeah I did that it still isn't working |
03:46:22 | FromDiscord | <Elegantbeef> The issue is likely that you're doing `nim c` to compile which means Nim chooses the oldest version |
03:46:26 | FromDiscord | <bubblie> oh |
03:46:39 | FromDiscord | <bubblie> I did not know that 😭 |
03:46:40 | FromDiscord | <Elegantbeef> You also can do `@#commit` |
03:48:59 | FromDiscord | <Elegantbeef> Really you should use a `.nimble` file and add a `requires giturl#commit` |
03:49:46 | FromDiscord | <bubblie> okay ill do that |
03:57:00 | FromDiscord | <bubblie> sent a code paste, see https://play.nim-lang.org/#pasty=dPTcPbiQDnVH |
03:57:36 | FromDiscord | <Elegantbeef> `nimble build` |
03:57:45 | FromDiscord | <Elegantbeef> Atlas also could be used if you want a nicer build api |
03:59:24 | FromDiscord | <bubblie> sent a code paste, see https://play.nim-lang.org/#pasty=HVtZNudzGEyV |
04:00:05 | FromDiscord | <Elegantbeef> your requires has a `#commit` and not the actual hash |
04:00:37 | FromDiscord | <bubblie> oh so like it needs the commit id? |
04:00:47 | FromDiscord | <Elegantbeef> Yes it needs to be the git hash |
04:08:05 | FromDiscord | <bubblie> sent a code paste, see https://play.nim-lang.org/#pasty=kuGCQaQDnBab |
04:09:24 | FromDiscord | <Elegantbeef> remove `.git` perhaps |
04:09:53 | FromDiscord | <bubblie> same issue |
04:11:29 | FromDiscord | <Elegantbeef> Uh huh |
04:13:19 | FromDiscord | <intellij_gamer> sent a code paste, see https://play.nim-lang.org/#pasty=hDzJtuwGwYNM |
04:13:53 | FromDiscord | <intellij_gamer> Nimble now requires a working got repo with atleast commit (which the error sadly doesn't mention lol) |
04:15:07 | FromDiscord | <bubblie> Sorry im confused create a commit? |
04:15:27 | FromDiscord | <bubblie> So like create a commit to my own repository for my project |
04:15:33 | FromDiscord | <bubblie> Or for vulkan.nim |
04:16:29 | FromDiscord | <Elegantbeef> Wait nimble requires you to be in a working git repo.... |
04:16:31 | FromDiscord | <Elegantbeef> Interesting |
04:17:16 | FromDiscord | <bubblie> Ah okay I understand |
04:17:46 | FromDiscord | <bubblie> Ill try it tomorrow and create a commit for the repo |
04:30:00 | FromDiscord | <bubblie> Also quick question would you happen to know if there is tinyobjloader bindings in nim or just obj loader bindings in nim in general |
04:35:01 | FromDiscord | <Elegantbeef> I'd just use assimp |
04:36:34 | * | raynei joined #nim |
04:40:04 | * | SchweinDeBurg joined #nim |
05:29:41 | FromDiscord | <4zv4l> is there a pragma to force a proc not to be inlined ? |
05:30:08 | FromDiscord | <Elegantbeef> Nope |
05:30:09 | FromDiscord | <4zv4l> except doing `{.exportc.}` which I guess would force not to inline the proc, I dont know |
05:30:45 | FromDiscord | <4zv4l> In reply to @Elegantbeef "Nope": cool xD |
05:34:36 | FromDiscord | <Elegantbeef> `{.exportc, dynlib.}` does keep a proc alive |
05:41:43 | FromDiscord | <4zv4l> any reason why the string is represented that way ?↵I mostly mean the `p` field of the object, what is the data before the actual data ? (the 8bits) https://media.discordapp.net/attachments/371759389889003532/1199952218489626624/image.png?ex=65c46996&is=65b1f496&hm=0b3e6e647aa903e0488cb4d5d97acd6b0b8b6a4e46045d0e8b372413cf4a5c8b& |
05:41:52 | FromDiscord | <4zv4l> (edit) "8bits)" => "8bytes)" |
05:42:07 | * | rockcavera quit (Remote host closed the connection) |
05:42:39 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#pasty=zElQTpbbJjYc |
05:42:55 | FromDiscord | <Elegantbeef> A string in Orc is `len, ptr (cap: int, data: UncheckedArray[char])` |
05:43:09 | FromDiscord | <4zv4l> that should be the default right ? |
05:44:10 | FromDiscord | <Elegantbeef> Yes |
05:44:17 | FromDiscord | <Elegantbeef> `exportc` does nothing without `dynlib` |
05:44:30 | FromDiscord | <4zv4l> it doesnt mangle the names |
05:44:49 | FromDiscord | <4zv4l> so it does something |
05:45:32 | FromDiscord | <4zv4l> In reply to @Elegantbeef "A string in Orc": the data seems weird |
05:45:47 | FromDiscord | <4zv4l> I use Nim 2.0.0 in case |
05:46:20 | FromDiscord | <4zv4l> In reply to @Elegantbeef "A string in Orc": but clearly its not like this↵there are some info before the actual data https://media.discordapp.net/attachments/371759389889003532/1199953380165025822/image.png?ex=65c46aab&is=65b1f5ab&hm=453cd8fa80acbc2d3da3cb268a02585534fff8a20fed8e3c20d6abb12f9f97d0& |
05:47:18 | FromDiscord | <Elegantbeef> Yea the capacity |
05:49:25 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#pasty=ZXdSJDMCllgW |
05:50:47 | FromDiscord | <Elegantbeef> Yes |
05:51:04 | FromDiscord | <4zv4l> In reply to @Elegantbeef "A string in Orc": okok I get it now, I misunderstood it at first, sorry |
05:53:41 | FromDiscord | <4zv4l> sent a long message, see https://pasty.ee/KbxDdBvvsZVv |
05:53:55 | FromDiscord | <Elegantbeef> no `int` is 64bits |
05:54:16 | FromDiscord | <4zv4l> oh ok int != cint |
05:54:34 | FromDiscord | <Elegantbeef> `int` and `uint` are platform specific sized |
05:54:46 | FromDiscord | <Elegantbeef> on 32bit they're 32bit on 64bit they're 64bit, this is all in the Nim manual |
05:54:50 | FromDiscord | <4zv4l> yes but on 64bits, int is usually 32 bits right ? |
05:54:56 | FromDiscord | <4zv4l> in C I mean |
05:54:57 | FromDiscord | <Elegantbeef> No |
05:55:02 | FromDiscord | <Elegantbeef> Sure in C |
05:55:05 | FromDiscord | <Elegantbeef> But this isn't C |
05:55:16 | FromDiscord | <Elegantbeef> C doesn't have tuples or `UncheckedArray` |
05:56:11 | FromDiscord | <Elegantbeef> https://github.com/beef331/seeya/blob/master/tests/mylib.nim↵https://github.com/beef331/seeya/blob/master/tests/mylib.h↵If you want to look at some approximations |
05:56:36 | FromDiscord | <4zv4l> I am confused, I try to print the 8 bytes as number, but it shows 14↵it doesnt seem to count the `64` in the 8th byte https://media.discordapp.net/attachments/371759389889003532/1199955966112825387/image.png?ex=65c46d14&is=65b1f814&hm=6ad24d80bb548cf0c8c9ccdeead235b87b4ab6c38f22d1b4827d044329a4c125& |
05:57:00 | FromDiscord | <4zv4l> I guess the capacity is 14 then but why 64 in the last byte |
05:57:06 | FromDiscord | <4zv4l> In reply to @Elegantbeef "https://github.com/beef331/seeya/blob/master/tests/": I will check |
05:58:15 | FromDiscord | <Elegantbeef> There's also the `gend.h` generated from the code inside `when` in seeya.nim |
05:59:45 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#pasty=ttsRNQIeXGTQ |
06:00:30 | FromDiscord | <4zv4l> I just dont get the capacity like, the string length is 14, the first byte of the capacity is 14 but there is a 64 as last byte, when I try to print the whole as number it shows me 14 |
06:01:50 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#pasty=sXrZfRVPAvOJ |
06:01:52 | FromDiscord | <4zv4l> (edit) "https://play.nim-lang.org/#pasty=VqsLCfNBWiQO" => "https://play.nim-lang.org/#pasty=BYoZcNuPHknl" |
06:05:53 | FromDiscord | <4zv4l> ok I got how to print it as decimal number↵but for capacity that is too much https://media.discordapp.net/attachments/371759389889003532/1199958300704382997/image.png?ex=65c46f41&is=65b1fa41&hm=32892f7aef0a70d1f2c75e028f8429c3e0d5797cd05eb760588848910b720b97& |
06:06:47 | FromDiscord | <Elegantbeef> capacity does not have to equal length |
06:06:53 | FromDiscord | <Elegantbeef> capacity is preallocated memory |
06:18:50 | FromDiscord | <4zv4l> yeah but how can the allocated memory for one single string be that much ? |
06:19:04 | FromDiscord | <4zv4l> I start to get how it works https://media.discordapp.net/attachments/371759389889003532/1199961619896205312/image.png?ex=65c47258&is=65b1fd58&hm=8c84598c6d1a23b4f63d059683dac55af8db0c4707d8190fa337ea6142116eb6& |
06:19:18 | FromDiscord | <4zv4l> why not putting the capacity as a different element of the object ? |
06:22:10 | FromDiscord | <Elegantbeef> It makes the object bigger I assume |
06:27:25 | * | raynei quit (Ping timeout: 264 seconds) |
06:34:50 | FromDiscord | <4zv4l> Arent fields just helper to access the memory part of the struct ? |
06:35:15 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#pasty=mebTNnvLPmAl |
06:36:11 | FromDiscord | <Elegantbeef> What is your question |
06:36:29 | FromDiscord | <Elegantbeef> `capacity` is on the heap |
06:38:02 | FromDiscord | <4zv4l> In reply to @4zv4l "ok I got how": I mean why here it doesn’t seem that there is a field to access the capacity or the data ? (Or maybe just me not knowing how to use gdb and “p” is a ptr to a struct with those field) |
06:38:13 | FromDiscord | <Elegantbeef> No clue |
06:38:52 | FromDiscord | <Elegantbeef> Worth noting capacity is marked for literals as they're CoW string literals, but that's neither here nor there |
06:39:11 | FromDiscord | <4zv4l> In reply to @Elegantbeef "What is your question": I meant {len, cap, data} shouldn’t make the object bigger since fields are just helper to access element in the memory |
06:42:33 | FromDiscord | <Elegantbeef> They do make the object bigger |
06:42:42 | FromDiscord | <Elegantbeef> Cause `cap` is on the heap and a field would have to be next to the object |
06:47:09 | FromDiscord | <4zv4l> The field isn’t supposed to take memory space ↵Its an helper to access the memory zone of the struct we want to access |
06:47:22 | FromDiscord | <Elegantbeef> Fields take up space |
06:47:33 | FromDiscord | <Elegantbeef> I don't know about gdb |
06:48:50 | FromDiscord | <4zv4l> mystruct.age should be the same as (int)(mystruct+8)↵If the first field is a ptr to char for example |
06:51:25 | FromDiscord | <4zv4l> (Without taking padding in count) |
06:51:25 | FromDiscord | <odexine> I assume capacity is stored in the pointer object because when a reallocation is needed the original (including length) object doesn’t need to change, though I don’t understand the question |
06:52:10 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#pasty=MFMyEkpfnoLg |
06:52:35 | FromDiscord | <4zv4l> In reply to @4zv4l "ok I got how": But here it seems the capacity and data are in the same field |
06:52:48 | FromDiscord | <Elegantbeef> No? |
06:52:57 | FromDiscord | <4zv4l> p is the field |
06:52:59 | FromDiscord | <4zv4l> Right ? |
06:53:14 | FromDiscord | <Elegantbeef> Capacity is a `intptr_t` followed by a`char[]` |
06:53:40 | FromDiscord | <Elegantbeef> The issue is gdb probably does not know how to handle `UncheckedArray[T]` |
06:54:00 | FromDiscord | <4zv4l> That’s what I meant |
06:54:03 | FromDiscord | <4zv4l> In the c code |
06:54:05 | FromDiscord | <4zv4l> It’s ok |
06:54:09 | FromDiscord | <odexine> It should since that’s basically a C array no? |
06:54:17 | FromDiscord | <4zv4l> They have separated field |
06:54:36 | FromDiscord | <4zv4l> But gdb doesn’t show the field for cap and data |
06:54:43 | FromDiscord | <Elegantbeef> It probably should but idk i'm only going off what they're saying here |
06:54:56 | FromDiscord | <Elegantbeef> Did you compile with `--debugger:native`? |
06:55:00 | FromDiscord | <4zv4l> I did |
06:55:01 | FromDiscord | <Elegantbeef> Are you using nim-gdb.py |
06:55:09 | FromDiscord | <4zv4l> In reply to @Elegantbeef "Are you using nim-gdb.py": I am not |
06:55:31 | FromDiscord | <Elegantbeef> You should use `nim-gdb` and it should load your pretty printer which may help more |
06:56:03 | FromDiscord | <4zv4l> I will try that |
07:11:22 | * | advesperacit joined #nim |
07:14:53 | * | PMunch quit (Quit: leaving) |
07:51:24 | * | xet7_ quit (Remote host closed the connection) |
07:52:55 | * | PMunch joined #nim |
08:22:31 | * | jkl quit (Quit: Gone.) |
08:24:22 | * | jkl joined #nim |
08:34:55 | * | azimut quit (Ping timeout: 240 seconds) |
10:36:26 | * | xet7 joined #nim |
11:16:53 | * | jmdaemon quit (Ping timeout: 256 seconds) |
12:44:18 | PMunch | Hmm, how can you wrap a `/` from C? |
12:44:38 | PMunch | I looked at `codegenDecl` but I can't figure out how to do one argument either side of the slash.. |
12:45:38 | FromDiscord | <Robyn [She/Her]> /? |
12:54:48 | * | kubrat joined #nim |
12:57:09 | FromDiscord | <nnsee> i'm assuming he means the division operator? |
12:58:57 | * | kubrat quit (Quit: leaving) |
13:02:36 | PMunch | Yes |
13:46:34 | PMunch | No one knows? |
13:59:16 | * | rockcavera joined #nim |
13:59:50 | FromDiscord | <ringabout> I think `emit` should work for this case |
14:02:03 | FromDiscord | <Robyn [She/Her]> Yeah I think emit is the only option |
14:02:31 | FromDiscord | <ringabout> sent a code paste, see https://play.nim-lang.org/#pasty=knEbMmgQXqUH |
14:02:38 | FromDiscord | <ringabout> (edit) "https://play.nim-lang.org/#pasty=VwuXkYnpoiwY" => "https://play.nim-lang.org/#pasty=ZyerTtifOEhd" |
14:03:17 | FromDiscord | <ringabout> might use `cint` |
14:07:10 | PMunch | Hmm, clever use of emit with `result` there. But this might add a level of indirection which could hurt performance |
14:07:19 | PMunch | It would probably be inlined anyways though |
14:07:40 | PMunch | I keep forgetting that you can insert variables in emit.. |
14:10:49 | FromDiscord | <ringabout> Well, you can probably use templates with `emit` if performance counts. |
14:12:36 | FromDiscord | <Robyn [She/Her]> Libsodium's argon is blocking, right? Any way for me to push it onto a different thread and let other async code run while that happens? |
14:12:56 | PMunch | ringabout, how would I get the result back with a template that has result? |
14:13:26 | FromDiscord | <Robyn [She/Her]> In reply to @PMunch "<@658563905425244160>, how would I": Temp variable I'd imagine |
14:16:02 | FromDiscord | <pmunch> Ah fair |
14:17:10 | FromDiscord | <ringabout> sent a code paste, see https://play.nim-lang.org/#pasty=MKHAfwmKSNcd |
14:22:04 | FromDiscord | <Arkanoid> I was reluctant from adopting it, but after trying I found that nph formatter made my Nim programming actually easier |
14:30:37 | PMunch | How is it easier? |
14:30:44 | PMunch | Not critical or anything, just curious |
14:33:33 | FromDiscord | <Arkanoid> 1 - it tells you immediately if the error you're having is AST related or not, as it won't format on save↵2 - it forces (an opinated) consistency, that enables some kind of lazy shortcuts while typing |
14:35:21 | FromDiscord | <Arkanoid> 3- it's not very dissimilar from how I usually layout my Nim code. So it's ok to me |
14:36:37 | * | raynei joined #nim |
14:37:45 | PMunch | Lazy shortcuts? |
14:37:58 | PMunch | Like you don't bother formatting because you know it will do it for you? |
15:11:54 | * | PMunch quit (Quit: Leaving) |
15:32:27 | FromDiscord | <Arkanoid> yes, mostly handling automatically where to split single statement into multiple lines. You know, where you try to guess how long that statement will end up being from first character, but you guess wrong |
15:46:17 | FromDiscord | <Arkanoid> memory wise, non ref object inheritance is just like struct composition, correct? Like pasting the child fields under the parent fields? |
15:48:53 | * | raynei quit (Ping timeout: 252 seconds) |
15:52:39 | FromDiscord | <jtiai> Hi. Trying to use `c2nim` to nim from file https://github.com/limine-bootloader/limine/blob/stable/limine.h for some reason app just gets stuck and I do get warning/error `limine\limine.h(47, 10) Warning: expected ';' [SyntaxError]`. I tried various combinations of assume(n)defs but problem persists. Apparently someone managed to do that https://gitlab.com/momikey/nim-limine-barebones/-/blob/master/limine.nim?ref_type=heads↵↵Ideas welc |
15:56:10 | * | raynei joined #nim |
16:07:54 | FromDiscord | <Arkanoid> @jtiai c2nim is one option, but in my opinion there is a better one: https://github.com/PMunch/futhark |
16:09:45 | FromDiscord | <ayex> agreed, futhark is impressive, but the results are different things\:↵● futhark -\> nim-c-lib-wrapper↵● c2nim -\> c-code-translated-to-nim |
16:10:54 | FromDiscord | <ayex> I would assume there are use-cases for each, where the one or the other is preferrable. 🤔 |
16:12:33 | FromDiscord | <Arkanoid> sure, if calling C code from Nim is the target, then futhark. If translation of C code to Nim is the target, c2nim |
16:12:34 | FromDiscord | <jtiai> Have to give a go. Just need bunch of stuff to make OS with Nim. 🙂 |
16:13:06 | FromDiscord | <Arkanoid> @jtiai well, good luck! |
16:13:56 | FromDiscord | <jtiai> I've done it once but quite hacky with manual assembly and such. Hope that limine could give a bit better experience for booting part. |
16:13:59 | * | krux02 joined #nim |
16:20:38 | FromDiscord | <Arkanoid> @jtiai just out of curiosity, why do you need to wrap/FFI with limine, if your target is an OS? Are you embedding the bootloaded into the OS? |
16:41:47 | * | raynei quit (Ping timeout: 260 seconds) |
16:41:58 | * | SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev) |
16:42:13 | * | SchweinDeBurg joined #nim |
16:50:34 | NimEventer | New thread by jhwbarlow: Struggling to understand use of ptr object Types, see https://forum.nim-lang.org/t/10916 |
16:57:50 | * | SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev) |
17:02:04 | * | raynei joined #nim |
18:01:08 | * | jmdaemon joined #nim |
18:09:50 | FromDiscord | <maker_of_mischief> is there a better TUI library than illwill |
18:10:49 | FromDiscord | <maker_of_mischief> ive been suffering trudging along with illwill |
18:10:56 | FromDiscord | <maker_of_mischief> and then i just found out about ratatui for rust |
18:11:09 | FromDiscord | <saint.___.> In reply to @user2m "thanks finally got it": Oh hey sorry for the late reply on this! Yeah I didn't test it on windows |
18:11:17 | Amun-Ra | I was thinking of writing something like mc's tui |
18:11:29 | FromDiscord | <saint.___.> Could you give me the command you used to compile it? I'll add it in and try and test it |
19:39:58 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=CPigTDWZZrNf |
19:40:34 | FromDiscord | <nnsee> why tho |
19:44:33 | FromDiscord | <Robyn [She/Her]> `poll` is from async dispatch |
19:44:46 | FromDiscord | <Robyn [She/Her]> In reply to @nnsee "why tho": Hashing is blocking and this is a web application :p |
19:45:15 | FromDiscord | <Robyn [She/Her]> So to my (limited) understanding, `poll` will let some other futures be completed |
19:45:32 | FromDiscord | <Robyn [She/Her]> (While the main thread isn't busy) |
19:46:17 | * | azimut joined #nim |
19:48:42 | FromDiscord | <nnsee> don't you actually have to await for the event loop to continue? |
19:49:34 | * | raynei quit (Ping timeout: 246 seconds) |
19:50:12 | FromDiscord | <jtiai> In reply to @Arkanoid "<@630837607537836062> just out of": limine bootstraps 64 bit mode automatically so you don't need to do all that boot stuff yourself. It's possible to write custom bootloader but limine is "new" relatively simplistic tool. Besides boot it has primitive console too. |
19:50:21 | FromDiscord | <nnsee> i think a tiny asyncsleep might help you there too |
19:50:23 | FromDiscord | <nnsee> maybe |
19:50:38 | FromDiscord | <nnsee> i don't really know how nim's async event loop works |
19:50:50 | FromDiscord | <nnsee> that's just what treeform did in pg |
19:54:12 | FromDiscord | <odexine> In reply to @nnsee "i think a tiny": It would work yes |
19:54:24 | FromDiscord | <odexine> But also, isn’t hashing a CPU bound operation? |
19:54:49 | FromDiscord | <odexine> And thus not benefit from async |
19:56:05 | FromDiscord | <nnsee> depends on the hash |
19:56:31 | FromDiscord | <nnsee> some can run on (and benefit greatly from) gpu |
19:58:18 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
20:05:40 | * | jmdaemon joined #nim |
20:13:14 | FromDiscord | <Robyn [She/Her]> In reply to @nnsee "don't you actually have": That's why I use poll |
20:13:41 | FromDiscord | <Robyn [She/Her]> In reply to @nnsee "i think a tiny": Ah |
20:14:45 | FromDiscord | <Robyn [She/Her]> In reply to @odexine "And thus not benefit": Wdym? If the hashing is running on another thread, wouldn't that let me continue without a problem? |
20:16:02 | FromDiscord | <odexine> Then you wouldn’t need async no? |
20:16:57 | FromDiscord | <Robyn [She/Her]> In reply to @odexine "Then you wouldn’t need": I'm calling allographer which is async |
20:28:00 | FromDiscord | <Robyn [She/Her]> Is overloading `%` acceptable for making my type work with the JSON module in the expected way? :p |
20:28:13 | FromDiscord | <Robyn [She/Her]> And same question for overloading `to` |
20:28:27 | FromDiscord | <Robyn [She/Her]> I did try `proc toJsonHook(u: ULID): JsonNode = newJString($u)` but no dice |
20:31:37 | FromDiscord | <nervecenter> So long as it's explicitly defined for a type, I don't see an issue, though others can probably give more technical rebuttals if there are any |
20:32:03 | FromDiscord | <Robyn [She/Her]> Rad |
20:37:30 | * | jmdaemon quit (Ping timeout: 268 seconds) |
21:04:44 | FromDiscord | <Arkanoid> "importc" and "importcpp" are really poor names for what they do |
21:10:02 | * | raynei joined #nim |
21:12:51 | * | figitaki joined #nim |
21:15:02 | FromDiscord | <odexine> In reply to @chronos.vitaqua "I'm calling allographer which": Async is per thread |
21:15:23 | FromDiscord | <odexine> Well, you can do it over many threads I hear, but I don’t know how |
21:15:27 | FromDiscord | <odexine> Simpler not to |
21:24:04 | * | figitaki quit (Quit: Ping timeout (120 seconds)) |
21:24:08 | * | jmdaemon joined #nim |
21:26:45 | FromDiscord | <Robyn [She/Her]> In reply to @odexine "Async is per thread": Yeah, so by running blocking code in another thread, it won't block the entire program |
21:32:24 | FromDiscord | <odexine> I’m not sure why I forgot the original code |
21:32:41 | FromDiscord | <odexine> Well perhaps because it was early morning |
21:33:09 | FromDiscord | <odexine> Nonetheless yes, i think either a poll or an await-sleep would work |
21:36:40 | * | khazakar joined #nim |
21:46:35 | * | figitaki joined #nim |
21:48:21 | FromDiscord | <Robyn [She/Her]> Nice |
21:54:56 | * | figitaki quit (Ping timeout: 250 seconds) |
21:57:22 | FromDiscord | <Robyn [She/Her]> https://github.com/Yu-Vitaqua-fer-Chronos/NULID ✨ |
21:57:28 | FromDiscord | <Robyn [She/Her]> The one thing I am proud of :) |
22:03:57 | FromDiscord | <Robyn [She/Her]> Wait with allographer how am I supposed to insert an object that has binary data |
22:04:05 | FromDiscord | <Robyn [She/Her]> I just realised that's a big issue |
22:05:06 | FromDiscord | <Robyn [She/Her]> Ah okay nvm |
23:19:27 | * | zgasma joined #nim |
23:30:15 | arkanoid | "ps -ae | grep nimsuggest" after 5 hours of work inside vscode official nim extension: https://termbin.com/n440 . Total ram usage 8GB |
23:30:37 | FromDiscord | <Elegantbeef> Highscore! |
23:31:56 | arkanoid | Almost there, this time I managed to stop it before total OOM |
23:32:06 | arkanoid | but yeah, quite proud if it |
23:43:56 | FromDiscord | <Arkanoid> how do you avoid putting all types in a single file when the project grows? |
23:45:42 | FromDiscord | <Elegantbeef> that's the trick you don't |
23:45:55 | FromDiscord | <Elegantbeef> Joke aside you use generics, delayed imports and pointer procs |
23:46:01 | * | khazakar quit (Quit: Connection closed for inactivity) |
23:46:25 | FromDiscord | <demotomohiro> Move some of types to other module. |
23:49:41 | * | azimut quit (Ping timeout: 255 seconds) |
23:49:59 | * | azimut_ joined #nim |
23:50:57 | FromDiscord | <Arkanoid> I have a component > navbar > state > component issue. Quite common that the navbar requires dependency injection in ui software patterns, but I'm failing to find a nice one in Nim |
23:51:38 | FromDiscord | <Elegantbeef> generics can be used for DI |
23:51:52 | FromDiscord | <Elegantbeef> Not ideal, but very true 😄 |
23:52:26 | FromDiscord | <Arkanoid> is there anything @ElegantBeef can't do with generics? |
23:52:35 | FromDiscord | <Elegantbeef> Find someone that doesn't hate me |
23:52:42 | FromDiscord | <Elegantbeef> Write real software |
23:53:35 | FromDiscord | <Arkanoid> I remember that static args + generics you showed me months ago. What a marvel |
23:55:15 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=JfhYONblWVWG |
23:55:34 | FromDiscord | <Elegantbeef> Generics can be used as a form of DI in a simple way using mixins and concepts ideally 😛 |
23:58:09 | FromDiscord | <Arkanoid> scaffolding large software with generics, mixins and concepts, then compile, see all them disappear, and watch the software behind it stands in all its glory sustained by invisible forces. Is this heaven? |
23:59:33 | FromDiscord | <Elegantbeef> Nah the afterlife is just a myth to make weak willed people do good |
23:59:59 | FromDiscord | <Arkanoid> heaven is a concept, then |