<< 25-01-2024 >>

00:00:09FromDiscord<Elegantbeef> Just use a real OS
00:00:29FromDiscord<leorize> winim is a windows gui thing
00:00:35FromDiscord<leorize> or is it wnim
00:00:41FromDiscord<leorize> I don't remember the name
00:00:42FromDiscord<odexine> prolly wnim
00:00:49FromDiscord<Elegantbeef> Who knows, I doubt the dev even knows
00:00:49FromDiscord<odexine> winim is the windows api wrapper
00:01:10FromDiscord<Elegantbeef> It's not wxnim that's the wx widgets stuff
00:02:11FromDiscord<piman_discriminator_1010> In reply to @Elegantbeef "*Just use a real": last time I tried that I completely destroyed the OS
00:02:24FromDiscord<piman_discriminator_1010> in less than a day
00:02:32FromDiscord<Elegantbeef> Leo time to sell them on a immutable OS
00:02:48FromDiscord<Elegantbeef> I mean if you're running `sudo rm -rf /` you get what you get
00:03:23FromDiscord<odexine> idk, ive broken windows a lot as well
00:03:50FromDiscord<piman_discriminator_1010> In reply to @Elegantbeef "I mean if you're": nah, it was only `sudo apt install ...`
00:03:57FromDiscord<Elegantbeef> I'm always amazed at people breaking linux
00:04:13FromDiscord<piman_discriminator_1010> broke it so hard it didn't ever recognize the keyboard anymore
00:04:19FromDiscord<piman_discriminator_1010> (edit) "ever" => "even"
00:04:54FromDiscord<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:23FromDiscord<leorize> you should definitely use an immutable Linux \:p
00:05:35FromDiscord<Elegantbeef> You should also read what commands are going to do
00:05:45FromDiscord<Elegantbeef> To uninstall your input handling using `apt install` is a feat
00:06:04FromDiscord<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:19FromDiscord<piman_discriminator_1010> In reply to @Elegantbeef "To uninstall your input": and the desktop too
00:06:35FromDiscord<piman_discriminator_1010> booted to terminal and they keyboard was basically gone
00:06:40FromDiscord<Elegantbeef> Just fully uninstalls X through `install`
00:06:57FromDiscord<piman_discriminator_1010> the status lights on the keyboard didn't even work
00:07:07FromDiscord<leorize> none of that could've happened if you use fedora sliverblue xd
00:07:48FromDiscord<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:29FromDiscord<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:38FromDiscord<JJ> or if you use choosenim it should find it by default
00:08:54FromDiscord<JJ> (edit) "nimsuggest" => "nimlsp"
00:09:37FromDiscord<JJ> https://github.com/PMunch/nimlsp/issues/88
00:13:16FromDiscord<leorize> bold of you to assume that people read
00:13:26FromDiscord<Elegantbeef> I can dream dammit
00:21:02FromDiscord<piman_discriminator_1010> I have window :ElmoBurn: https://media.discordapp.net/attachments/371759389889003532/1199871510127579167/image.png?ex=65c41e6c&is=65b1a96c&hm=d8ebf4b7140ca1154cb029f3c0f735547e08fcfc5475cada57596db150621418&
00:23:15FromDiscord<piman_discriminator_1010> unfortunatly the github doesn't explain how to use the library
00:24:18FromDiscord<piman_discriminator_1010> so I guess it's back to diving into WIN32 API
00:25:24FromDiscord<Elegantbeef> They do have a wiki
00:26:14FromDiscord<piman_discriminator_1010> oh yea, just found that, apparently I didn't scroll down all the way
00:51:26FromDiscord<bubblie> I wanted to ask but is nim top down compilation by design or will that change
00:54:08FromDiscord<Elegantbeef> It's a 'single' pass compiler
00:54:32FromDiscord<bubblie> ah I see
00:57:40FromDiscord<piman_discriminator_1010> is that also why there is no incremental building?
00:58:26FromDiscord<Elegantbeef> Sure
00:59:22*raynei quit (Ping timeout: 264 seconds)
01:03:25FromDiscord<piman_discriminator_1010> what is this syntax?↵`button.wEvent_Button do (): listbox.add "button.wEvent_Button"`
01:05:02FromDiscord<Elegantbeef> Do notation, it's a way of making anonymous procs
01:08:09FromDiscord<piman_discriminator_1010> so a lambda?
01:09:04FromDiscord<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:47FromDiscord<piman_discriminator_1010> is there a way to allow implicit casting from enum to int?
02:57:55FromDiscord<piman_discriminator_1010> and do I really have to use `bitor` instead of `|` :mood:
03:09:19FromDiscord<Elegantbeef> You can use `or`
03:09:22FromDiscord<Elegantbeef> you can write a `converter`
03:16:10FromDiscord<odexine> you can write a proc `|` that literally is just `bitor`
03:30:33FromDiscord<girvo> My brain is not working today
03:30:55FromDiscord<Elegantbeef> Ah yes just today
03:30:56FromDiscord<girvo> Is there a simple way to splitLines() then gather them up into a set of sequences of 5 lines each?
03:31:04FromDiscord<girvo> In reply to @Elegantbeef "Ah yes just today": Okay especially today 😄
03:31:30FromDiscord<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:52FromDiscord<odexine> In reply to @Elegantbeef "Ah yes just today": mine never did.
03:32:27FromDiscord<bubblie> sent a code paste, see https://play.nim-lang.org/#pasty=DqDtJZtDznEd
03:32:28FromDiscord<Elegantbeef> Nope there are no like `take(5)` apis
03:32:35FromDiscord<bubblie> (edit) "https://play.nim-lang.org/#pasty=oyYNsCXSlpzS" => "https://play.nim-lang.org/#pasty=iVcrGQDxJErK"
03:33:18FromDiscord<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:46FromDiscord<girvo> Yeah that'll do!
03:33:51FromDiscord<girvo> 🙂
03:35:33FromDiscord<Elegantbeef> There's nothing there that looks off bubblie
03:35:45FromDiscord<bubblie> thats really weird then
03:35:48FromDiscord<girvo> sent a code paste, see https://play.nim-lang.org/#pasty=mMldyKaaEWhm
03:35:50FromDiscord<bubblie> should I try reinstall the package?
03:35:55FromDiscord<bubblie> (edit) "reinstall" => "reinstalling"
03:36:08FromDiscord<Elegantbeef> Try it
03:37:19FromDiscord<Elegantbeef> `vulkan.nim` compiles here
03:37:19FromDiscord<Elegantbeef> I imagine you have an old version that has like `Bleh = object {.union.}`
03:37:20FromDiscord<Elegantbeef> https://github.com/nimious/vulkan/commit/09e02a0339ed6132ae34b9a4d35c22375cea55d5
03:37:20FromDiscord<Elegantbeef> bingo
03:37:49FromDiscord<bubblie> ah so how do I install the latest again?
03:38:00FromDiscord<Elegantbeef> `nimble install vulkan@head`
03:38:04FromDiscord<bubblie> thanks :)
03:38:06FromDiscord<Elegantbeef> or `giturl` instead of vulkan
03:38:20FromDiscord<Elegantbeef> I'd personally just tick the requires inside your .nimble
03:38:29FromDiscord<Elegantbeef> Nvm
03:38:35FromDiscord<Elegantbeef> They do not do semver apparently
03:43:04FromDiscord<bubblie> sent a code paste, see https://play.nim-lang.org/#pasty=DeaAwVhHVvyJ
03:43:43FromDiscord<Elegantbeef> Uninstall it
03:43:46FromDiscord<Elegantbeef> then install it
03:46:18FromDiscord<bubblie> yeah I did that it still isn't working
03:46:22FromDiscord<Elegantbeef> The issue is likely that you're doing `nim c` to compile which means Nim chooses the oldest version
03:46:26FromDiscord<bubblie> oh
03:46:39FromDiscord<bubblie> I did not know that 😭
03:46:40FromDiscord<Elegantbeef> You also can do `@#commit`
03:48:59FromDiscord<Elegantbeef> Really you should use a `.nimble` file and add a `requires giturl#commit`
03:49:46FromDiscord<bubblie> okay ill do that
03:57:00FromDiscord<bubblie> sent a code paste, see https://play.nim-lang.org/#pasty=dPTcPbiQDnVH
03:57:36FromDiscord<Elegantbeef> `nimble build`
03:57:45FromDiscord<Elegantbeef> Atlas also could be used if you want a nicer build api
03:59:24FromDiscord<bubblie> sent a code paste, see https://play.nim-lang.org/#pasty=HVtZNudzGEyV
04:00:05FromDiscord<Elegantbeef> your requires has a `#commit` and not the actual hash
04:00:37FromDiscord<bubblie> oh so like it needs the commit id?
04:00:47FromDiscord<Elegantbeef> Yes it needs to be the git hash
04:08:05FromDiscord<bubblie> sent a code paste, see https://play.nim-lang.org/#pasty=kuGCQaQDnBab
04:09:24FromDiscord<Elegantbeef> remove `.git` perhaps
04:09:53FromDiscord<bubblie> same issue
04:11:29FromDiscord<Elegantbeef> Uh huh
04:13:19FromDiscord<intellij_gamer> sent a code paste, see https://play.nim-lang.org/#pasty=hDzJtuwGwYNM
04:13:53FromDiscord<intellij_gamer> Nimble now requires a working got repo with atleast commit (which the error sadly doesn't mention lol)
04:15:07FromDiscord<bubblie> Sorry im confused create a commit?
04:15:27FromDiscord<bubblie> So like create a commit to my own repository for my project
04:15:33FromDiscord<bubblie> Or for vulkan.nim
04:16:29FromDiscord<Elegantbeef> Wait nimble requires you to be in a working git repo....
04:16:31FromDiscord<Elegantbeef> Interesting
04:17:16FromDiscord<bubblie> Ah okay I understand
04:17:46FromDiscord<bubblie> Ill try it tomorrow and create a commit for the repo
04:30:00FromDiscord<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:01FromDiscord<Elegantbeef> I'd just use assimp
04:36:34*raynei joined #nim
04:40:04*SchweinDeBurg joined #nim
05:29:41FromDiscord<4zv4l> is there a pragma to force a proc not to be inlined ?
05:30:08FromDiscord<Elegantbeef> Nope
05:30:09FromDiscord<4zv4l> except doing `{.exportc.}` which I guess would force not to inline the proc, I dont know
05:30:45FromDiscord<4zv4l> In reply to @Elegantbeef "Nope": cool xD
05:34:36FromDiscord<Elegantbeef> `{.exportc, dynlib.}` does keep a proc alive
05:41:43FromDiscord<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:52FromDiscord<4zv4l> (edit) "8bits)" => "8bytes)"
05:42:07*rockcavera quit (Remote host closed the connection)
05:42:39FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#pasty=zElQTpbbJjYc
05:42:55FromDiscord<Elegantbeef> A string in Orc is `len, ptr (cap: int, data: UncheckedArray[char])`
05:43:09FromDiscord<4zv4l> that should be the default right ?
05:44:10FromDiscord<Elegantbeef> Yes
05:44:17FromDiscord<Elegantbeef> `exportc` does nothing without `dynlib`
05:44:30FromDiscord<4zv4l> it doesnt mangle the names
05:44:49FromDiscord<4zv4l> so it does something
05:45:32FromDiscord<4zv4l> In reply to @Elegantbeef "A string in Orc": the data seems weird
05:45:47FromDiscord<4zv4l> I use Nim 2.0.0 in case
05:46:20FromDiscord<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:18FromDiscord<Elegantbeef> Yea the capacity
05:49:25FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#pasty=ZXdSJDMCllgW
05:50:47FromDiscord<Elegantbeef> Yes
05:51:04FromDiscord<4zv4l> In reply to @Elegantbeef "A string in Orc": okok I get it now, I misunderstood it at first, sorry
05:53:41FromDiscord<4zv4l> sent a long message, see https://pasty.ee/KbxDdBvvsZVv
05:53:55FromDiscord<Elegantbeef> no `int` is 64bits
05:54:16FromDiscord<4zv4l> oh ok int != cint
05:54:34FromDiscord<Elegantbeef> `int` and `uint` are platform specific sized
05:54:46FromDiscord<Elegantbeef> on 32bit they're 32bit on 64bit they're 64bit, this is all in the Nim manual
05:54:50FromDiscord<4zv4l> yes but on 64bits, int is usually 32 bits right ?
05:54:56FromDiscord<4zv4l> in C I mean
05:54:57FromDiscord<Elegantbeef> No
05:55:02FromDiscord<Elegantbeef> Sure in C
05:55:05FromDiscord<Elegantbeef> But this isn't C
05:55:16FromDiscord<Elegantbeef> C doesn't have tuples or `UncheckedArray`
05:56:11FromDiscord<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:36FromDiscord<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:00FromDiscord<4zv4l> I guess the capacity is 14 then but why 64 in the last byte
05:57:06FromDiscord<4zv4l> In reply to @Elegantbeef "https://github.com/beef331/seeya/blob/master/tests/": I will check
05:58:15FromDiscord<Elegantbeef> There's also the `gend.h` generated from the code inside `when` in seeya.nim
05:59:45FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#pasty=ttsRNQIeXGTQ
06:00:30FromDiscord<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:50FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#pasty=sXrZfRVPAvOJ
06:01:52FromDiscord<4zv4l> (edit) "https://play.nim-lang.org/#pasty=VqsLCfNBWiQO" => "https://play.nim-lang.org/#pasty=BYoZcNuPHknl"
06:05:53FromDiscord<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:47FromDiscord<Elegantbeef> capacity does not have to equal length
06:06:53FromDiscord<Elegantbeef> capacity is preallocated memory
06:18:50FromDiscord<4zv4l> yeah but how can the allocated memory for one single string be that much ?
06:19:04FromDiscord<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:18FromDiscord<4zv4l> why not putting the capacity as a different element of the object ?
06:22:10FromDiscord<Elegantbeef> It makes the object bigger I assume
06:27:25*raynei quit (Ping timeout: 264 seconds)
06:34:50FromDiscord<4zv4l> Arent fields just helper to access the memory part of the struct ?
06:35:15FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#pasty=mebTNnvLPmAl
06:36:11FromDiscord<Elegantbeef> What is your question
06:36:29FromDiscord<Elegantbeef> `capacity` is on the heap
06:38:02FromDiscord<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:13FromDiscord<Elegantbeef> No clue
06:38:52FromDiscord<Elegantbeef> Worth noting capacity is marked for literals as they're CoW string literals, but that's neither here nor there
06:39:11FromDiscord<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:33FromDiscord<Elegantbeef> They do make the object bigger
06:42:42FromDiscord<Elegantbeef> Cause `cap` is on the heap and a field would have to be next to the object
06:47:09FromDiscord<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:22FromDiscord<Elegantbeef> Fields take up space
06:47:33FromDiscord<Elegantbeef> I don't know about gdb
06:48:50FromDiscord<4zv4l> mystruct.age should be the same as (int)(mystruct+8)↵If the first field is a ptr to char for example
06:51:25FromDiscord<4zv4l> (Without taking padding in count)
06:51:25FromDiscord<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:10FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#pasty=MFMyEkpfnoLg
06:52:35FromDiscord<4zv4l> In reply to @4zv4l "ok I got how": But here it seems the capacity and data are in the same field
06:52:48FromDiscord<Elegantbeef> No?
06:52:57FromDiscord<4zv4l> p is the field
06:52:59FromDiscord<4zv4l> Right ?
06:53:14FromDiscord<Elegantbeef> Capacity is a `intptr_t` followed by a`char[]`
06:53:40FromDiscord<Elegantbeef> The issue is gdb probably does not know how to handle `UncheckedArray[T]`
06:54:00FromDiscord<4zv4l> That’s what I meant
06:54:03FromDiscord<4zv4l> In the c code
06:54:05FromDiscord<4zv4l> It’s ok
06:54:09FromDiscord<odexine> It should since that’s basically a C array no?
06:54:17FromDiscord<4zv4l> They have separated field
06:54:36FromDiscord<4zv4l> But gdb doesn’t show the field for cap and data
06:54:43FromDiscord<Elegantbeef> It probably should but idk i'm only going off what they're saying here
06:54:56FromDiscord<Elegantbeef> Did you compile with `--debugger:native`?
06:55:00FromDiscord<4zv4l> I did
06:55:01FromDiscord<Elegantbeef> Are you using nim-gdb.py
06:55:09FromDiscord<4zv4l> In reply to @Elegantbeef "Are you using nim-gdb.py": I am not
06:55:31FromDiscord<Elegantbeef> You should use `nim-gdb` and it should load your pretty printer which may help more
06:56:03FromDiscord<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:18PMunchHmm, how can you wrap a `/` from C?
12:44:38PMunchI looked at `codegenDecl` but I can't figure out how to do one argument either side of the slash..
12:45:38FromDiscord<Robyn [She/Her]> /?
12:54:48*kubrat joined #nim
12:57:09FromDiscord<nnsee> i'm assuming he means the division operator?
12:58:57*kubrat quit (Quit: leaving)
13:02:36PMunchYes
13:46:34PMunchNo one knows?
13:59:16*rockcavera joined #nim
13:59:50FromDiscord<ringabout> I think `emit` should work for this case
14:02:03FromDiscord<Robyn [She/Her]> Yeah I think emit is the only option
14:02:31FromDiscord<ringabout> sent a code paste, see https://play.nim-lang.org/#pasty=knEbMmgQXqUH
14:02:38FromDiscord<ringabout> (edit) "https://play.nim-lang.org/#pasty=VwuXkYnpoiwY" => "https://play.nim-lang.org/#pasty=ZyerTtifOEhd"
14:03:17FromDiscord<ringabout> might use `cint`
14:07:10PMunchHmm, clever use of emit with `result` there. But this might add a level of indirection which could hurt performance
14:07:19PMunchIt would probably be inlined anyways though
14:07:40PMunchI keep forgetting that you can insert variables in emit..
14:10:49FromDiscord<ringabout> Well, you can probably use templates with `emit` if performance counts.
14:12:36FromDiscord<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:56PMunchringabout, how would I get the result back with a template that has result?
14:13:26FromDiscord<Robyn [She/Her]> In reply to @PMunch "<@658563905425244160>, how would I": Temp variable I'd imagine
14:16:02FromDiscord<pmunch> Ah fair
14:17:10FromDiscord<ringabout> sent a code paste, see https://play.nim-lang.org/#pasty=MKHAfwmKSNcd
14:22:04FromDiscord<Arkanoid> I was reluctant from adopting it, but after trying I found that nph formatter made my Nim programming actually easier
14:30:37PMunchHow is it easier?
14:30:44PMunchNot critical or anything, just curious
14:33:33FromDiscord<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:21FromDiscord<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:45PMunchLazy shortcuts?
14:37:58PMunchLike you don't bother formatting because you know it will do it for you?
15:11:54*PMunch quit (Quit: Leaving)
15:32:27FromDiscord<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:17FromDiscord<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:39FromDiscord<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:54FromDiscord<Arkanoid> @jtiai c2nim is one option, but in my opinion there is a better one: https://github.com/PMunch/futhark
16:09:45FromDiscord<ayex> agreed, futhark is impressive, but the results are different things\:↵● futhark -\> nim-c-lib-wrapper↵● c2nim -\> c-code-translated-to-nim
16:10:54FromDiscord<ayex> I would assume there are use-cases for each, where the one or the other is preferrable. 🤔
16:12:33FromDiscord<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:34FromDiscord<jtiai> Have to give a go. Just need bunch of stuff to make OS with Nim. 🙂
16:13:06FromDiscord<Arkanoid> @jtiai well, good luck!
16:13:56FromDiscord<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:38FromDiscord<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:34NimEventerNew 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:50FromDiscord<maker_of_mischief> is there a better TUI library than illwill
18:10:49FromDiscord<maker_of_mischief> ive been suffering trudging along with illwill
18:10:56FromDiscord<maker_of_mischief> and then i just found out about ratatui for rust
18:11:09FromDiscord<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:17Amun-RaI was thinking of writing something like mc's tui
18:11:29FromDiscord<saint.___.> Could you give me the command you used to compile it? I'll add it in and try and test it
19:39:58FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=CPigTDWZZrNf
19:40:34FromDiscord<nnsee> why tho
19:44:33FromDiscord<Robyn [She/Her]> `poll` is from async dispatch
19:44:46FromDiscord<Robyn [She/Her]> In reply to @nnsee "why tho": Hashing is blocking and this is a web application :p
19:45:15FromDiscord<Robyn [She/Her]> So to my (limited) understanding, `poll` will let some other futures be completed
19:45:32FromDiscord<Robyn [She/Her]> (While the main thread isn't busy)
19:46:17*azimut joined #nim
19:48:42FromDiscord<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:12FromDiscord<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:21FromDiscord<nnsee> i think a tiny asyncsleep might help you there too
19:50:23FromDiscord<nnsee> maybe
19:50:38FromDiscord<nnsee> i don't really know how nim's async event loop works
19:50:50FromDiscord<nnsee> that's just what treeform did in pg
19:54:12FromDiscord<odexine> In reply to @nnsee "i think a tiny": It would work yes
19:54:24FromDiscord<odexine> But also, isn’t hashing a CPU bound operation?
19:54:49FromDiscord<odexine> And thus not benefit from async
19:56:05FromDiscord<nnsee> depends on the hash
19:56:31FromDiscord<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:14FromDiscord<Robyn [She/Her]> In reply to @nnsee "don't you actually have": That's why I use poll
20:13:41FromDiscord<Robyn [She/Her]> In reply to @nnsee "i think a tiny": Ah
20:14:45FromDiscord<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:02FromDiscord<odexine> Then you wouldn’t need async no?
20:16:57FromDiscord<Robyn [She/Her]> In reply to @odexine "Then you wouldn’t need": I'm calling allographer which is async
20:28:00FromDiscord<Robyn [She/Her]> Is overloading `%` acceptable for making my type work with the JSON module in the expected way? :p
20:28:13FromDiscord<Robyn [She/Her]> And same question for overloading `to`
20:28:27FromDiscord<Robyn [She/Her]> I did try `proc toJsonHook(u: ULID): JsonNode = newJString($u)` but no dice
20:31:37FromDiscord<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:03FromDiscord<Robyn [She/Her]> Rad
20:37:30*jmdaemon quit (Ping timeout: 268 seconds)
21:04:44FromDiscord<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:02FromDiscord<odexine> In reply to @chronos.vitaqua "I'm calling allographer which": Async is per thread
21:15:23FromDiscord<odexine> Well, you can do it over many threads I hear, but I don’t know how
21:15:27FromDiscord<odexine> Simpler not to
21:24:04*figitaki quit (Quit: Ping timeout (120 seconds))
21:24:08*jmdaemon joined #nim
21:26:45FromDiscord<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:24FromDiscord<odexine> I’m not sure why I forgot the original code
21:32:41FromDiscord<odexine> Well perhaps because it was early morning
21:33:09FromDiscord<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:21FromDiscord<Robyn [She/Her]> Nice
21:54:56*figitaki quit (Ping timeout: 250 seconds)
21:57:22FromDiscord<Robyn [She/Her]> https://github.com/Yu-Vitaqua-fer-Chronos/NULID
21:57:28FromDiscord<Robyn [She/Her]> The one thing I am proud of :)
22:03:57FromDiscord<Robyn [She/Her]> Wait with allographer how am I supposed to insert an object that has binary data
22:04:05FromDiscord<Robyn [She/Her]> I just realised that's a big issue
22:05:06FromDiscord<Robyn [She/Her]> Ah okay nvm
23:19:27*zgasma joined #nim
23:30:15arkanoid"ps -ae | grep nimsuggest" after 5 hours of work inside vscode official nim extension: https://termbin.com/n440 . Total ram usage 8GB
23:30:37FromDiscord<Elegantbeef> Highscore!
23:31:56arkanoidAlmost there, this time I managed to stop it before total OOM
23:32:06arkanoidbut yeah, quite proud if it
23:43:56FromDiscord<Arkanoid> how do you avoid putting all types in a single file when the project grows?
23:45:42FromDiscord<Elegantbeef> that's the trick you don't
23:45:55FromDiscord<Elegantbeef> Joke aside you use generics, delayed imports and pointer procs
23:46:01*khazakar quit (Quit: Connection closed for inactivity)
23:46:25FromDiscord<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:57FromDiscord<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:38FromDiscord<Elegantbeef> generics can be used for DI
23:51:52FromDiscord<Elegantbeef> Not ideal, but very true 😄
23:52:26FromDiscord<Arkanoid> is there anything @ElegantBeef can't do with generics?
23:52:35FromDiscord<Elegantbeef> Find someone that doesn't hate me
23:52:42FromDiscord<Elegantbeef> Write real software
23:53:35FromDiscord<Arkanoid> I remember that static args + generics you showed me months ago. What a marvel
23:55:15FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=JfhYONblWVWG
23:55:34FromDiscord<Elegantbeef> Generics can be used as a form of DI in a simple way using mixins and concepts ideally 😛
23:58:09FromDiscord<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:33FromDiscord<Elegantbeef> Nah the afterlife is just a myth to make weak willed people do good
23:59:59FromDiscord<Arkanoid> heaven is a concept, then