00:00:01 | * | marcus quit (Remote host closed the connection) |
00:00:52 | * | marcus joined #nim |
00:40:51 | * | silverhikari joined #nim |
01:26:53 | * | silverhikari quit (Quit: Leaving) |
01:28:19 | FromDiscord | <janakali> sent a long message, see https://pasty.ee/lLqBbXBLYljO |
01:29:20 | FromDiscord | <janakali> (edit) "https://pasty.ee/hclexWEPNHXk" => "https://pasty.ee/ITdbiqHORvtp" |
01:29:53 | FromDiscord | <janakali> (edit) "https://pasty.ee/LhzKAYkvpGnf" => "https://pasty.ee/pxQKlLTlEMrs" |
01:38:44 | FromDiscord | <Elegantbeef> It's amazing that it works after 7 years give a lot of Nim code would explode in that time |
01:45:22 | FromDiscord | <bosinski2023> In reply to @janakali "On somewhat unrelated note,": seems theres a release 0.9 coming. was planned for 2023 and might surface this year 🙂 |
01:49:12 | FromDiscord | <zumi.dxy> In reply to @Elegantbeef "It's amazing that it": Aporia... |
01:49:37 | FromDiscord | <janakali> 0.8 should be in most repos, but compiling vis from source is also easy: it only need lua54 and libtermkey |
01:50:00 | FromDiscord | <janakali> (edit) "lua54" => "lua" |
02:39:41 | * | Jjp137 quit (Quit: Leaving) |
02:42:30 | * | Jjp137 joined #nim |
02:51:59 | FromDiscord | <user2m> in nimscript createDir is not defined is there any other proc that can be used? |
02:59:05 | FromDiscord | <demotomohiro> In reply to @user2m "in nimscript createDir is": https://nim-lang.org/docs/nimscript.html#mkDir%2Cstring |
02:59:33 | FromDiscord | <user2m> In reply to @demotomohiro "https://nim-lang.org/docs/nimscript.html#mkDir%2Cst": Perfect! |
03:34:27 | arkanoid | I have a nim string, I have to pass it to an importec C function that wants a ptr cstring |
03:34:51 | arkanoid | I'm trying mystring.cstring.addr, but I get "expression has no address" |
03:35:12 | FromDiscord | <Elegantbeef> You cannot convert a Nim string to a `ptr cstring` |
03:36:05 | FromDiscord | <Elegantbeef> You can do `let x = cstring myString; myProc(x.addr)` but it'll likely not work how you intend |
03:36:55 | FromDiscord | <Elegantbeef> As I suspect it'll change the pointer `x` points to else it'd just be a `cstring` |
03:37:09 | FromDiscord | <Elegantbeef> There is a non zero chance this is actually a cstring array |
03:40:33 | arkanoid | mh, maybe I should skip the convertion from cstring to nim string initially, then. But I need to copy the cstring |
03:40:48 | arkanoid | let newstring = cstring(oldcstring) would copy it? |
03:51:25 | FromDiscord | <Elegantbeef> No clue |
04:00:04 | FromDiscord | <demotomohiro> `let newString = $oldcstring` returns new string by copying from `oldstring`. |
04:00:26 | FromDiscord | <demotomohiro> And you can get `cstring` from `newString` later. |
04:32:24 | FromDiscord | <leapingwillow87> Is there a github tag for Jim projects? |
04:32:24 | FromDiscord | <leapingwillow87> Nim |
04:32:25 | FromDiscord | <leapingwillow87> Autocorrect |
04:32:29 | FromDiscord | <leapingwillow87> @room |
04:35:44 | FromDiscord | <leapingwillow87> Hello? |
04:35:51 | FromDiscord | <leapingwillow87> Is there a github tag |
04:36:05 | FromDiscord | <leapingwillow87> I made a project called fuckNiggers @room |
04:36:10 | FromDiscord | <leapingwillow87> It plays this video |
04:36:20 | FromDiscord | <leapingwillow87> 1000000027.webm https://media.discordapp.net/attachments/371759389889003532/1212981727262277642/1000000027.webm?ex=65f3d043&is=65e15b43&hm=bb28171849362c960d316b66d273b4257352f5281f133f41433bb50b841bba62& |
04:36:35 | FromDiscord | <ElegantBeef> <@&371760044473319454> |
04:36:42 | FromDiscord | <leapingwillow87> 😀 |
04:36:55 | FromDiscord | <leapingwillow87> @room does anyone want to try my fuckNiggers project |
04:37:05 | FromDiscord | <leapingwillow87> Flame on nigger |
04:37:22 | FromDiscord | <leapingwillow87> 1000000026.webm https://media.discordapp.net/attachments/371759389889003532/1212981984763183175/1000000026.webm?ex=65f3d081&is=65e15b81&hm=9372136b9689d14e0e979892e473c99730f860a5baf557c835686361bc277a1b& |
04:37:25 | FromDiscord | <leapingwillow87> 1000000027.webm https://media.discordapp.net/attachments/371759389889003532/1212981998994587739/1000000027.webm?ex=65f3d084&is=65e15b84&hm=612a2940ea47a8036de550ab06068cfc0cca74dbc096e11e7ae2981f3eac14ca& |
04:37:29 | FromDiscord | <leapingwillow87> 1000000018.webm https://media.discordapp.net/attachments/371759389889003532/1212982016723648542/1000000018.webm?ex=65f3d088&is=65e15b88&hm=1267699319703b8f90437bd68f82d264d46aba9ee23f4c56a5554a94084d8b2a& |
04:37:44 | FromDiscord | <leapingwillow87> @room please try fuckNiggers I want to see if its cross platform |
04:38:26 | FromDiscord | <leapingwillow87> @room please |
04:38:30 | FromDiscord | <leapingwillow87> Try fuckNiggers |
04:38:39 | FromDiscord | <Elegantbeef> One day I know one day I'll understand why |
04:38:50 | FromDiscord | <leapingwillow87> Please |
04:38:55 | FromDiscord | <leapingwillow87> Try fuckNiggers |
04:39:03 | FromDiscord | <leapingwillow87> I want to see if it works cross platform |
04:39:05 | FromDiscord | <leapingwillow87> @room |
04:39:25 | FromDiscord | <leapingwillow87> 1000000026.webm https://media.discordapp.net/attachments/371759389889003532/1212982502038315008/1000000026.webm?ex=65f3d0fc&is=65e15bfc&hm=7063bc9aa06eece1b826169d8fd9b36048f4e4d431d053d0e977206d536dbe21& |
04:39:26 | FromDiscord | <leapingwillow87> 1000000027.webm https://media.discordapp.net/attachments/371759389889003532/1212982507298095104/1000000027.webm?ex=65f3d0fd&is=65e15bfd&hm=0c9f57c89b2f185a79781df03c9dd80a874fec2a9ccde6e67609fd5f9a38a7ad& |
04:39:29 | FromDiscord | <leapingwillow87> 1000000018.webm https://media.discordapp.net/attachments/371759389889003532/1212982519847452692/1000000018.webm?ex=65f3d100&is=65e15c00&hm=1097024fac44af850f22ead1f3625e19d9d27d88daaf29d9244b25e493381598& |
04:47:05 | FromDiscord | <l3xic00ne> 1000000026.webm https://media.discordapp.net/attachments/371759389889003532/1212984432848412672/1000000026.webm?ex=65f3d2c8&is=65e15dc8&hm=b3dac1ec82ba64e10db18acb38f5dc6eaa2732e74b987515d76533b2308d02c7& |
04:47:06 | FromDiscord | <l3xic00ne> 1000000027.webm https://media.discordapp.net/attachments/371759389889003532/1212984439706099742/1000000027.webm?ex=65f3d2ca&is=65e15dca&hm=7ba9bd0db7a141631435bbf966e0a607c38944b860cec5c50c46d58483035bc9& |
04:47:10 | FromDiscord | <l3xic00ne> 1000000018.webm https://media.discordapp.net/attachments/371759389889003532/1212984452867948604/1000000018.webm?ex=65f3d2cd&is=65e15dcd&hm=e37625daa852e6aacb16a46e4387cf97af9f2093ec290b668697a53993f114d1& |
04:47:14 | FromDiscord | <l3xic00ne> @room I vouch for fuckNiggers |
04:47:20 | FromDiscord | <Elegantbeef> Someone really needs to get a hobby |
04:47:26 | FromDiscord | <l3xic00ne> This is my hobby |
04:47:35 | FromDiscord | <l3xic00ne> I also made fuckFaggots |
04:47:57 | FromDiscord | <l3xic00ne> 1000039372.webm https://media.discordapp.net/attachments/371759389889003532/1212984647429001216/1000039372.webm?ex=65f3d2fc&is=65e15dfc&hm=e0898ea9cce143d8cd6f47bd3e704febddfc400763c78ae51d106697b121e2ce& |
04:49:54 | FromDiscord | <lx12ucy> wow this room is really moderated |
05:13:01 | FromDiscord | <lx12ucy> image.psd.png https://media.discordapp.net/attachments/371759389889003532/1212990959487426560/image.psd.png?ex=65f3d8dd&is=65e163dd&hm=fe33bbe74c1afcedd7c9ff2452d28ebbb3bd51d191a5e423b39bd90589254ae8& |
05:13:50 | FromDiscord | <Elegantbeef> On the plus side you can block them since you're on matrix |
05:15:39 | FromDiscord | <lx12ucy> thats true |
05:20:46 | FromDiscord | <m4ul3r> How would i determin if code is being compiled for 32bit or 64bit in a `when defined()` for code |
05:23:24 | FromDiscord | <Elegantbeef> The easiest is `sizeof(int) == sizeof(uint32)` |
05:24:04 | FromDiscord | <Elegantbeef> You can also do `defined(amd64)` or `defined(i386)` I imagine |
05:24:40 | FromDiscord | <pmunch> Sorry about that, seems like we where all asleep at the same time.. |
05:25:00 | FromDiscord | <m4ul3r> That works |
05:25:09 | FromDiscord | <m4ul3r> thanks for cleaning that up, i need to go burn my eyes |
05:25:17 | FromDiscord | <m4ul3r> thanks beef |
05:29:09 | arkanoid | removing choosenim shims solved almost all the tooling problems I've been fighting for months |
05:29:49 | arkanoid | please remove choosenim from nim download page, or possibly replace it with something that is tested with tooling |
05:30:09 | FromDiscord | <Elegantbeef> There is no replacement for it |
05:30:15 | FromDiscord | <Elegantbeef> gitnim only works on amd64 |
05:30:20 | FromDiscord | <Elegantbeef> amd64 linux |
05:30:27 | arkanoid | without it is better than with it |
05:30:39 | FromDiscord | <Elegantbeef> Works on my machine TM |
05:32:11 | arkanoid | start nimsuggest manually via choosenim shim from command line over random nim file, send sigterm to shim process (parent of real nimsuggest), now you have dangling nimsuggest process |
05:32:47 | FromDiscord | <Elegantbeef> I was joking, yes it's broke but it can be fixed |
05:34:47 | arkanoid | yes it can be fixed, but nim homepage points to a project with last release 6/2022, with pull requests and many issues waiting, and with main developer that has quit |
05:35:42 | arkanoid | how many more bad points does it need to remove it from the official download page of Nim? |
05:37:11 | FromDiscord | <Elegantbeef> Well it should be forked and pointed to the official choosenim or w/e is decided on |
05:38:44 | arkanoid | remove from download page > fork fix and test > restore it |
05:40:57 | arkanoid | seriously, it causes OOM on dev machine with the right conditions. And the right conditions is using vscode and opening/closing projects. It accumulates and boom. Sometimes you trigger some nimsuggest bug that loops and fills heap and boom |
05:45:26 | * | azimut quit (Ping timeout: 260 seconds) |
05:47:17 | * | SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev) |
05:47:41 | * | SchweinDeBurg joined #nim |
05:48:15 | FromDiscord | <djazz> Yep i had OOM several times that froze up system |
06:09:51 | FromDiscord | <pmunch> In reply to @arkanoid "please remove choosenim from": Really? I've had nothing but bliss with choosenim.. |
06:10:45 | FromDiscord | <Elegantbeef> You do also use nimlsp |
06:10:58 | FromDiscord | <Robyn [She/Her]> The OOM bug with nimlangserver was chased back to choosenim :p |
06:11:06 | FromDiscord | <Robyn [She/Her]> (edit) "chased" => "traced" |
06:11:07 | arkanoid | pmunch it depends how your development environment kills nimsuggest processes |
06:11:24 | FromDiscord | <Elegantbeef> Pmunch doesn't have nimsuggest processes 😛 |
06:11:27 | FromDiscord | <pmunch> In reply to @arkanoid "seriously, it causes OOM": That's a nimsuggest bug though isn't it? |
06:11:49 | FromDiscord | <Elegantbeef> Apparently the shim does not properly handle it's processes and it causes a leaked program |
06:12:05 | FromDiscord | <pmunch> In reply to @Elegantbeef "Pmunch doesn't have nimsuggest": Well, NimLSP is basically nimsuggest with a mustache and fake glasses |
06:12:19 | arkanoid | pmunch: the long story https://github.com/nim-lang/langserver/issues/184 |
06:12:23 | FromDiscord | <pmunch> If only a certain OS had symlinks.. |
06:13:04 | arkanoid | the short story is: choosenim proxy exes dont forward signals (sigtrap for example) to child processes properly |
06:13:28 | FromDiscord | <pmunch> In reply to @arkanoid "<@696333749570371585>: the long story": Well, what can I say NimLSP was purposefully design to avoid these issues 🤷♂️ |
06:13:33 | arkanoid | as a result, you have leaking nimsuggest processes everytime nimsuggest proxy exe is launched |
06:14:01 | FromDiscord | <pmunch> I've gotta run now by the way |
06:14:07 | arkanoid | pmunch, that's why I've used nimlsp a lot |
06:14:24 | arkanoid | nimlsp is the winning design |
06:14:51 | arkanoid | but nim gods promoted IPC and forking and stuff |
06:14:59 | arkanoid | and proxy exes |
06:15:49 | FromDiscord | <Elegantbeef> iirc the whole reason nimlangserver uses IPC is to manage phantom nimsuggest instances 😄 |
06:19:43 | FromDiscord | <Robyn [She/Her]> In reply to @pmunch "If only a certain": Windows does, just needs to be turned on I think? |
06:25:01 | * | kenran joined #nim |
06:25:02 | arkanoid | maybe windows handled traps differently? |
06:43:48 | * | rockcavera quit (Remote host closed the connection) |
06:47:04 | * | advesperacit joined #nim |
07:34:55 | FromDiscord | <Robyn [She/Her]> 🤷♀️ |
07:49:47 | * | kenran quit (Remote host closed the connection) |
07:50:07 | * | kenran joined #nim |
07:53:11 | FromDiscord | <_deadmeme_> In reply to @guzba8 "huge efforts have gone": is there any official/blessed fix for this? Putting nim in Windows defender whitelist or something like that? |
07:55:43 | * | kenran quit (Remote host closed the connection) |
07:56:02 | * | kenran joined #nim |
08:06:07 | FromDiscord | <griffith1deadly> In reply to @arkanoid "maybe windows handled traps": this bug also happen's on windows and fixed by installing nim without choosenim |
08:16:58 | * | ntat joined #nim |
08:17:21 | NimEventer | New Nimble package! pon2 - Puyo Puyo and Nazo Puyo Application, see https://github.com/izumiya-keisuke/pon2 |
08:46:20 | * | redj quit (Remote host closed the connection) |
08:49:12 | * | redj joined #nim |
08:53:41 | FromDiscord | <tauruuuuuus> My nimsuggest has been acting up since this morning, it seems like it's hanging and can't function properly in vscodium https://media.discordapp.net/attachments/371759389889003532/1213046491220942848/image.png?ex=65f40c94&is=65e19794&hm=a832f64199718acc8ea61c3d7c75e8a594e841626c566a6efa0b71db0679b3e3& |
08:53:49 | FromDiscord | <tauruuuuuus> Anyone got the same problem or knows a fix? |
09:42:29 | * | ntat quit (Read error: Connection reset by peer) |
09:44:09 | * | ntat joined #nim |
09:50:25 | * | ntat quit (Quit: Leaving) |
10:39:50 | FromDiscord | <thesherwood> sent a code paste, see https://play.nim-lang.org/#pasty=ORgbGcDyRjgd |
10:42:41 | FromDiscord | <Robyn [She/Her]> In reply to @thesherwood "Has anyone got any": Could you share the error? That'd help |
10:43:32 | FromDiscord | <Robyn [She/Her]> Also, make sure to pass `--cpu:i386` to the Nim compiler since wasm32 is a 32 bit target |
10:46:11 | FromDiscord | <thesherwood> @Robyn [She/Her] Here's a pastebin: https://pastebin.com/sGCHmfAi |
10:46:31 | FromDiscord | <thesherwood> I'll try again with the option you suggested |
10:56:53 | * | ntat joined #nim |
11:35:12 | * | Jhonny2x4 quit (Quit: Jhonny2x4) |
11:36:14 | * | Jhonny2x4 joined #nim |
12:05:40 | FromDiscord | <pmunch> In reply to @arkanoid "but nim gods promoted": Eh, we'll just have to port their new features. Shouldn't be too hard |
13:05:42 | * | ntat_ joined #nim |
13:05:55 | * | ntat quit (Ping timeout: 246 seconds) |
13:34:09 | * | kenran quit (Remote host closed the connection) |
13:44:07 | * | rockcavera joined #nim |
13:51:09 | * | ntat_ is now known as ntat |
14:27:42 | * | ntat quit (Quit: Leaving) |
14:36:07 | FromDiscord | <thesherwood> @Robyn [She/Her] Okay. I sorted out a few issues. I'm getting a new error about it not being able to locate `setjmp.h`. Here's the pastebin: https://pastebin.com/2hmPWA0w . Any ideas on how I can make sure it finds it? |
14:36:36 | * | azimut joined #nim |
14:44:52 | FromDiscord | <Robyn [She/Her]> In reply to @thesherwood "<@524288464422830095> Okay. I sorted": Sadly that's an issue with Nim 2.0 |
14:45:20 | FromDiscord | <Robyn [She/Her]> Try `--exceptions:goto`, and if that doesn't work, then try it with Nim 1.6 (whatever is the latest 1.6) |
14:58:35 | * | junaid_ joined #nim |
14:59:00 | FromDiscord | <ringabout> In reply to @thesherwood "<@524288464422830095> Okay. I sorted": https://github.com/nim-lang/Nim/pull/23259 |
14:59:06 | FromDiscord | <ringabout> try the devel branch |
15:00:00 | FromDiscord | <ringabout> the setjmp dep has been removed for goto exceptions on the devel |
15:02:16 | FromDiscord | <niguss_101-_-> Guys |
15:03:04 | FromDiscord | <niguss_101-_-> İts my first time using vs and it’s could not work for me properly I mean it doesn’t run the code like its supposed to do |
15:05:57 | FromDiscord | <thesherwood> @Robyn [She/Her] @ringabout Okay. I just tried with v1.6.12 and got even more errors. `choosenim` is erroring when i try to install 1.6.18. What's that best way to get the devel branch? Do I need to clone the project and build it or are there releases? |
15:07:01 | FromDiscord | <thesherwood> Looks like choosenim worked for `devel`. but i'm seeing the same error when i try to compile. |
15:08:27 | FromDiscord | <Robyn [She/Her]> In reply to @ringabout "the setjmp dep has": Ah neat! |
15:08:32 | FromDiscord | <Robyn [She/Her]> In reply to @thesherwood "Looks like choosenim worked": What's the error? |
15:12:15 | FromDiscord | <thesherwood> I was wrong. Different errors on devel. Looks like most are coming from the package I'm using for clang. Pastebin: https://pastebin.com/raSFn1P3 |
15:12:52 | FromDiscord | <Robyn [She/Her]> In reply to @thesherwood "I was wrong. Different": Ah, make sure you have wasi-sdk installed I think |
15:14:04 | FromDiscord | <thesherwood> I downloaded it and I've been running it on simple c programs. I think the simple nim program must be requiring stuff that my simple c programs aren't. |
15:14:22 | FromDiscord | <Robyn [She/Her]> Hm, what command line arguments did you give to clang on the CLI? |
15:14:41 | FromDiscord | <thesherwood> `nim c --cc:clang --cpu:i386 --nimcache:tmp --passC:"--target=wasm32 -O3 -flto -nostdlib -Wl,--no-entry -Wl,--export-all -Wall -o:nim_wasm6.wasm" nim_wasm.nim` |
15:15:07 | FromDiscord | <thesherwood> That's the nim command I've been using. When i compile the c programs I use the same clang options. |
15:15:46 | FromDiscord | <Robyn [She/Her]> Oh, try `--passL:"-lwasi-emulated-signal" --passC:"-D_WASI_EMULATED_SIGNAL"` |
15:16:08 | FromDiscord | <thesherwood> Both of those in the nim command? |
15:16:30 | FromDiscord | <Robyn [She/Her]> If you read through the paste, there's more arguments it says to pass to the linker and compiler I believe |
15:16:32 | FromDiscord | <Robyn [She/Her]> In reply to @thesherwood "Both of those in": Yep |
15:18:20 | * | azimut quit (Remote host closed the connection) |
15:18:37 | FromDiscord | <thesherwood> I'm not sure I did that right. Pastebin: https://pastebin.com/e1Uk4jV1 |
15:18:41 | * | azimut joined #nim |
15:18:58 | FromDiscord | <thesherwood> The errors look much the same. |
15:23:19 | FromDiscord | <zumi.dxy> would adding `-d:useMalloc` work? |
15:23:51 | FromDiscord | <thesherwood> Within `passC` or outside it? |
15:24:00 | FromDiscord | <zumi.dxy> outside it |
15:25:00 | FromDiscord | <thesherwood> That seems to have resolved the first error |
15:25:11 | FromDiscord | <thesherwood> Why did that work? |
15:26:08 | FromDiscord | <zumi.dxy> > WASI lacks a true mmap↵is a clue↵nim's memory management uses mmap by default now i think |
15:27:20 | FromDiscord | <zumi.dxy> > wasm lacks signal support↵`-d:noSignalHandler`? |
15:28:30 | FromDiscord | <thesherwood> This is where I'm at: https://pastebin.com/CHkC8Ykv |
15:28:50 | FromDiscord | <thesherwood> Same set of errors with or without the `noSignalHandler` flag |
15:30:31 | FromDiscord | <Robyn [She/Her]> You need to enable WASI with clang, do you know how? |
15:31:27 | FromDiscord | <thesherwood> I don't know how. I haven't needed to with the other C programs I've done |
15:33:07 | FromDiscord | <Robyn [She/Her]> Hm, I'm lost then, sorry |
15:34:52 | FromDiscord | <thesherwood> No problem. Thanks for all your help |
15:35:25 | FromDiscord | <Robyn [She/Her]> Of course |
16:00:22 | * | azimut quit (Remote host closed the connection) |
16:00:53 | * | azimut joined #nim |
16:01:21 | * | disso-peach joined #nim |
16:05:59 | NimEventer | New thread by Nlits: Why are let variables not gcsafe? + General Threads and GCSafe understanding help, see https://forum.nim-lang.org/t/11128 |
16:18:31 | * | ntat joined #nim |
17:00:29 | arkanoid | I am wrapping imported C lib. I feel that there's room for a very powerful Nim macro here. All C lib functions are in the form "foo_r(ctx: Context, arg1: ..., arg2: ...)", at the moment I am passing around ctx for every call, it works but it is not very elegant |
17:00:47 | arkanoid | how would you "hide away" that Context variable? |
17:01:43 | FromDiscord | <leorize> std/with |
17:08:01 | FromDiscord | <demotomohiro> Are you sure you never need to use multiple context? |
17:15:04 | arkanoid | leorize, thanks! |
17:32:26 | arkanoid | std/with seems not working with left hand sides of assignments |
17:32:48 | arkanoid | with ctx: let myfoo = foo_r(arg1, arg2) |
17:33:26 | arkanoid | identifier expected, but found 'let myfoo =' |
17:53:12 | * | lucasta joined #nim |
18:16:04 | FromDiscord | <Robyn [She/Her]> How should I install Nim on Windows? Choosenim is probably what I should avoid |
18:18:30 | FromDiscord | <Robyn [She/Her]> Think I got it |
18:34:38 | FromDiscord | <griffith1deadly> In reply to @chronos.vitaqua "How should I install": just download release from nim website, unpack and run finish.exe |
18:45:09 | FromDiscord | <Robyn [She/Her]> I cannot tolerate Windows for development |
18:45:25 | FromDiscord | <leorize> then why are you using it? |
18:45:26 | FromDiscord | <Robyn [She/Her]> I'm going to get WSL working just so I can get rid of this nightmare as soon as possible |
18:45:31 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "then why are you": My mom's laptop |
18:46:55 | FromDiscord | <leorize> rip |
18:47:03 | FromDiscord | <leorize> your desktop still dead? |
18:47:25 | FromDiscord | <Robyn [She/Her]> Yep, couldn't fix it even after tinkering, the RAM seems to be fine so it must be the CPU or motherboard |
18:48:03 | FromDiscord | <leorize> that's unfortunate |
18:48:09 | FromDiscord | <Robyn [She/Her]> I accidentally got thermal paste on the pins of my CPU socket when trying to see if I put the CPU in wrong (I didn't, it has notches to ensure that) so now it's just unrecoverable |
18:48:24 | FromDiscord | <Robyn [She/Her]> Already stripped the drives and RAM from it if I decide to repurpose it for anything else |
18:48:32 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "that's unfortunate": Yeaaah, but oh well, it's life |
18:49:41 | FromDiscord | <leorize> back when I didn't have my own computer I just carry with me a flash drive with a Linux installation |
18:49:54 | FromDiscord | <leorize> makes it easy to just use whatever computer in front of you |
18:49:58 | FromDiscord | <Robyn [She/Her]> I have a 32gb flash drive to be fair |
18:50:35 | FromDiscord | <Robyn [She/Her]> Wouldn't be a great experience though, so I'd probably get a bigger USB first |
18:50:49 | FromDiscord | <leorize> mine was on a 32gb \:p |
18:51:03 | FromDiscord | <Robyn [She/Her]> Didn't it clog up quickly? |
18:51:11 | FromDiscord | <leorize> but that's like 8 years ago |
18:51:24 | FromDiscord | <leorize> no, if you know your way around you can get quite some mileage |
18:51:50 | FromDiscord | <Robyn [She/Her]> Huh... Care to elaborate? I do not know my way around aha |
18:52:09 | FromDiscord | <leorize> first order of business is to use btrfs |
18:52:24 | FromDiscord | <leorize> then reduce the amount of writes by disabling all log writing |
18:53:09 | FromDiscord | <leorize> if you have the ram to spare, there are tools that synchronize your browser profiles to ram, avoiding expensive writes as you browse the web |
18:53:12 | FromDiscord | <Robyn [She/Her]> Isn't that the filesystem format everyone is raving about? |
18:53:32 | FromDiscord | <saint.___.> Why not just use an external ssd |
18:53:45 | FromDiscord | <saint.___.> They're super cheap |
18:54:12 | FromDiscord | <leorize> depends on your financial status, sure |
18:54:21 | FromDiscord | <Robyn [She/Her]> I am broke and have absolutely nothing to my name :p |
18:54:26 | FromDiscord | <saint.___.> Its liek $20 for a 200gb |
18:54:32 | FromDiscord | <saint.___.> O okay |
18:54:41 | FromDiscord | <Robyn [She/Her]> Trying to work on freelancing gigs but yeah kinda hard to start |
19:00:34 | FromDiscord | <sOkam! 🫐> Is there an existing way to create unix/linux signals from `signals.h` |
19:01:23 | FromDiscord | <sOkam! 🫐> _(other than wrapping the `signal()` function, that is. was wondering if there is something wrapped or idiomatic)_ |
19:02:13 | FromDiscord | <leorize> wdym creating signals? |
19:02:56 | NimEventer | New thread by AMSwift: Resizable arrays in Nim - difficulty in getting performance, see https://forum.nim-lang.org/t/11129 |
19:03:24 | FromDiscord | <guzba8> In reply to @_deadmeme_ "is there any official/blessed": its been a bit since I last fought this, but I think adding your Downloads folder to the excluded folder list for Windows defender, then downloading choosenim to Downloads and installing from there helped? i remember disabling windows defender did not help, its just a disaster overall unfortunately |
19:04:36 | FromDiscord | <sOkam! 🫐> In reply to @leorize "wdym creating signals?": https://www.man7.org/linux/man-pages/man7/signal.7.html |
19:05:16 | FromDiscord | <sOkam! 🫐> maybe should have said "signal handlers" to be specific |
19:05:45 | FromDiscord | <leorize> there's no way out of using the syscalls, so wrap away |
19:05:51 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#pasty=QJLlZSEeYkiU |
19:05:55 | FromDiscord | <leorize> and you probably want sigaction instead |
19:06:23 | FromDiscord | <sOkam! 🫐> In reply to @leorize "and you probably want": whats the difference? |
19:06:49 | FromDiscord | <leorize> it's actually standardized and you can customize much more behaviors |
19:07:09 | FromDiscord | <leorize> you will also get the signal information in your handler as well |
19:08:56 | FromDiscord | <sOkam! 🫐> kk will look it up. first time using signals ever, im just referencing someone elses code for now until I understand the codebase |
19:09:36 | FromDiscord | <leorize> read man signal(7) |
19:10:13 | FromDiscord | <leorize> and signal-safety(7) |
19:10:18 | FromDiscord | <sOkam! 🫐> found this. seems useful. ty for pointing it out https://stackoverflow.com/questions/231912/what-is-the-difference-between-sigaction-and-signal/ |
19:10:35 | FromDiscord | <leorize> signal handlers are never fun to deal with |
19:11:07 | FromDiscord | <sOkam! 🫐> why so? |
19:11:42 | FromDiscord | <leorize> they interrupts your code |
19:12:02 | FromDiscord | <leorize> ie. stop whatever is being done in your thread to run the handler |
19:12:07 | FromDiscord | <sOkam! 🫐> oh |
19:12:14 | FromDiscord | <leorize> as such they're even harder to deal with than threads |
19:12:32 | FromDiscord | <sOkam! 🫐> i believe this is just defining behavior for when the user Ctrl+C 🤔 |
19:12:44 | FromDiscord | <sOkam! 🫐> is there a more idiomatic way to deal with that on nim? |
19:12:58 | FromDiscord | <leorize> setControlCHook \:p |
19:13:12 | FromDiscord | <sOkam! 🫐> definitely sounds like the right thing yep |
19:13:16 | FromDiscord | <sOkam! 🫐> ty leorize ✍️ |
19:13:33 | FromDiscord | <leorize> though it's actually not any better, only a sugar and is also dangerous |
19:13:54 | FromDiscord | <leorize> at least the default impl won't try to allocate memory anymore iirc |
19:14:09 | FromDiscord | <leorize> you used to be able to deadlock your program on ctrl-c, pretty fun |
19:15:12 | FromDiscord | <leorize> but the rules of signal-safety still apply fwiw |
19:16:14 | FromDiscord | <sOkam! 🫐> i actually think that's what was happening 🙈 |
19:16:19 | FromDiscord | <leorize> don't allocate memory, don't modify globals, and make sure you use the exact same subset |
19:16:30 | FromDiscord | <sOkam! 🫐> kk |
19:16:47 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#pasty=otmmOntyFvFf |
19:16:52 | FromDiscord | <sOkam! 🫐> (edit) "https://play.nim-lang.org/#pasty=SzTqExvNuQRu" => "https://play.nim-lang.org/#pasty=fJHfghPzhCtQ" |
19:17:43 | FromDiscord | <leorize> it might come as a surprise, but exit is not async signal safe |
19:18:42 | FromDiscord | <sOkam! 🫐> so, this is very bad code? im just learning it for the first time, so no clue whts good/bad 😔 |
19:18:50 | FromDiscord | <leorize> yep |
19:19:14 | FromDiscord | <leorize> and if you do it like this, none of your resources will be cleaned up properly, so you might have files that are not flushed to disk |
19:19:24 | FromDiscord | <sOkam! 🫐> oof |
19:19:44 | FromDiscord | <sOkam! 🫐> how do I exit correctly so everything is done well? |
19:20:18 | FromDiscord | <leorize> usually you trigger a flag to do that, atomically |
19:20:27 | FromDiscord | <leorize> then your code check if the flag is set |
19:20:31 | FromDiscord | <leorize> and if set, quits |
19:21:13 | FromDiscord | <leorize> quits by just returning and hope that your caller is also cancellation aware |
19:21:46 | FromDiscord | <sOkam! 🫐> hmm, so you would set a flag inside setControlCHook? is that what you mean? |
19:22:20 | FromDiscord | <leorize> pretty much |
19:22:26 | FromDiscord | <sOkam! 🫐> kk ✍️ |
19:23:10 | FromDiscord | <sOkam! 🫐> can you pass data to the hook though? 🤔 |
19:24:58 | FromDiscord | <leorize> not safely |
19:26:11 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#pasty=onJVkekVIxmt |
19:26:22 | FromDiscord | <sOkam! 🫐> seems = feels |
19:28:12 | * | lucasta quit (Quit: Leaving) |
20:17:19 | FromDiscord | <leorize> probably not that bad \:p |
20:17:54 | FromDiscord | <leorize> typically that global would have to be volatile and use sig atomic\_t |
20:26:03 | * | ntat quit (Quit: Leaving) |
20:58:01 | * | Jjp137 quit (Ping timeout: 264 seconds) |
20:58:26 | * | Jjp137 joined #nim |
21:30:38 | * | junaid_ quit (Remote host closed the connection) |
21:48:40 | * | krux02 joined #nim |
22:17:26 | * | advesperacit quit () |
22:20:13 | FromDiscord | <TӨMΛ ☠> sent a code paste, see https://play.nim-lang.org/#pasty=jzMApeHudQWT |
22:21:00 | FromDiscord | <TӨMΛ ☠> (edit) "https://play.nim-lang.org/#pasty=SKDMpZgSwJUk" => "https://play.nim-lang.org/#pasty=UieBOAsKwSCm" |
22:21:31 | FromDiscord | <TӨMΛ ☠> (edit) "https://play.nim-lang.org/#pasty=wCQXuuGZwJUX" => "https://play.nim-lang.org/#pasty=iSRBOMBkWDuF" |
22:21:43 | FromDiscord | <TӨMΛ ☠> (edit) "https://play.nim-lang.org/#pasty=iTkVVPrKDkaO" => "https://play.nim-lang.org/#pasty=YFRAglsfrhmf" |
22:25:05 | FromDiscord | <Robyn [She/Her]> Finally WSL all set up and configured :) |
22:25:45 | FromDiscord | <Robyn [She/Her]> In reply to @toma400 "I'm sorry if this": In Nim, binary files are read as strings so you'd do it the same way you would with any text file |
22:26:26 | FromDiscord | <Robyn [She/Her]> Look into `std/streams` (specifically `newFileStream`) for what you want for your parser, too ^^ @TӨMΛ ☠ |
23:02:39 | * | xet7 quit (Remote host closed the connection) |