<< 25-09-2023 >>

00:35:57*Mister_Magister joined #nim
01:13:59*jmdaemon joined #nim
01:47:59*derpydoo quit (Ping timeout: 245 seconds)
03:10:27*azimut quit (Ping timeout: 252 seconds)
03:40:57NimEventerNew thread by woolsweater: Atlas/nimble build still tries to download dependencies despite nim.cfg, see https://forum.nim-lang.org/t/10514
04:12:49*LuxuryMode joined #nim
05:24:53*advesperacit joined #nim
05:34:58FromDiscord<nnsee> In reply to @NimEventer "New thread by CircArgs:": great response
06:01:05*PMunch joined #nim
06:28:14*ntat joined #nim
06:42:22*LuxuryMode quit (Quit: Connection closed for inactivity)
07:07:38*Mister_Magister quit (Read error: Connection reset by peer)
07:09:27*Mister_Magister joined #nim
07:33:39*derpydoo joined #nim
08:41:11*derpydoo quit (Ping timeout: 255 seconds)
10:30:12*ntat quit (Quit: leaving)
10:34:19FromDiscord<vindaar> I just realized there is a paper https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-023-05333-w about a bioinformatics tool https://github.com/fuhuancheng/CRISPR-GRANT that uses `ggplotnim` 🤯🤯🤯
10:36:37FromDiscord<enthus1ast> folks, i've written an image upload (for my wedding), i run it in a alpine vm, the thing is it seems to leak memory, do you see any obvious memory leaks? https://play.nim-lang.org/#ix=4Hnx
10:38:04FromDiscord<enthus1ast> idk, its actually quite simpel and should not leak
10:38:55FromDiscord<enthus1ast> image.png https://media.discordapp.net/attachments/371759389889003532/1155815691274956861/image.png
10:40:28PMunch@vindaar, cool!
10:41:43PMunch@enthus1ast, if Mummy uses exceptions internally you might be running into this: https://github.com/nim-lang/Nim/issues/22672
10:43:03PMunchDoes it seem to grow unbounded?
10:43:48FromDiscord<enthus1ast> after each image upload it grows and stays like this
10:45:53FromDiscord<odexine> Does it grow to the point of applications getting reaped by the OOM reaper
10:45:57PMunchUnless that echo-statement goes to a RAM-buffer I don't see anything which should leak there..
10:45:59FromDiscord<enthus1ast> yes
10:46:41FromDiscord<enthus1ast> yeah at first i gave it \~2gb of ram, and the site was offline directly after the party...↵(@odexine)
10:46:42FromDiscord<odexine> Best run it through Valgrind or MSan
10:46:56PMunchSo either mummy is leaking, or you're running into a Nim bug, for example the one above. Maybe your browser requests a favicon, it fails to get it with an exception, and it leaks memory from the handler.
10:47:21PMunchMaybe try to compile with refc if Mummy doesn't require ARC/ORC?
10:47:33FromDiscord<enthus1ast> i think it does
10:53:26PMunchAh, bummer
10:53:34PMunchYeah, then Valgrind is probably your best bet
10:56:01FromDiscord<enthus1ast> mh yeah
10:56:02FromDiscord<enthus1ast> ==40458== possibly lost\: 34,560 bytes in 120 blocks
10:56:15FromDiscord<enthus1ast> i think this means it leaks
10:58:18FromDiscord<odexine> You need to also use malloc so add the define flag
10:58:25FromDiscord<odexine> -d:useMalloc
10:58:47FromDiscord<enthus1ast> so like this right?↵nim c --mm\:orc -d\:useMalloc -d\:release fileUploadServer.nim
10:59:05FromDiscord<odexine> Reads fine to me, yes
10:59:32FromDiscord<odexine> Optionally add debug information instead by replacing release with opt speed but it’s up to you
10:59:58FromDiscord<enthus1ast> i get the valgrind overview, after i upload one image, then kill the process with ctrl+c but since its orc it should be freed when out of scope
11:07:48FromDiscord<enthus1ast> mh yeah i think mummy leaks, i've now updated to the newest version, but valgrind show some output
11:08:01FromDiscord<enthus1ast> ..valgrind still..
11:09:02FromDiscord<enthus1ast> https://play.nim-lang.org/#ix=4HnI
11:09:49FromDiscord<jviega> I am still running 100% on refc myself, have had lots of problems w/o it
11:10:11FromDiscord<enthus1ast> yeah unfortunately mummy cannot run on refc
11:11:27FromDiscord<jviega> Sorry :/
11:12:08FromDiscord<odexine> In reply to @enthus1ast "yeah unfortunately mummy cannot": What? Why?
11:12:17FromDiscord<vindaar> are you sure the process would clean up correctly (i.e. run destructors) when you use SIGINT? I don't know what Nim does by default when you don't handle it manually
11:12:38FromDiscord<odexine> Personally I don’t fuss too much on what garbage collector I use, as long as it works for what I make then it’s fine
11:12:47FromDiscord<enthus1ast> no, not really
11:14:35FromDiscord<enthus1ast> it seems the newest version indeed compiles with refc↵(@odexine)
11:22:14FromDiscord<cidzercidzer> nimraid 😃
11:22:15FromDiscord<cidzercidzer> nimraid 😃
11:22:17FromDiscord<cidzercidzer> nimraid 😃
11:23:17*noeontheend_ joined #nim
11:23:17*mronetwo_ joined #nim
11:23:18*oddish_ joined #nim
11:23:39*henrytill_ joined #nim
11:23:40*casaca_ joined #nim
11:24:17FromDiscord<odexine> <@&371760044473319454> some dingus seems to want to start a raid, probably best to stay alert
11:24:33FromDiscord<pmunch> Yeah I noticed
11:25:00FromDiscord<pmunch> Is raid a Discord specific term? Or do they just mean spam the channel?
11:26:10FromDiscord<odexine> Raid just means mass join and spam, it’s a general term
11:26:22FromDiscord<pmunch> Right, that's the usage I'm familiar with
11:26:41FromDiscord<odexine> Well no action needed now I guess just be wary…
11:27:08FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=4HnK
11:30:54*lucerne quit (*.net *.split)
11:30:54*noeontheend quit (*.net *.split)
11:30:54*henrytill quit (*.net *.split)
11:30:55*casaca quit (*.net *.split)
11:30:55*oddish quit (*.net *.split)
11:30:55*mronetwo quit (*.net *.split)
11:30:55*Onionhammer quit (*.net *.split)
11:31:03*henrytill_ is now known as henrytill
11:31:04*noeontheend_ is now known as noeontheend
11:31:04*casaca_ is now known as casaca
11:31:18*adigitoleo quit (Read error: Connection reset by peer)
11:31:20*noeontheend quit (Read error: Connection reset by peer)
11:31:20*mronetwo_ quit (Write error: Connection reset by peer)
11:31:20*henrytill quit (Remote host closed the connection)
11:31:20*casaca quit (Write error: Connection reset by peer)
11:31:21*oddish_ quit (Write error: Connection reset by peer)
11:31:30*oddish joined #nim
11:31:30*mronetwo joined #nim
11:31:36PMunchDid you try --debugger:native @enthus1ast?
11:31:40*casaca joined #nim
11:31:45PMunchThat should give you more info about what leaks
11:31:48*noeontheend joined #nim
11:31:57PMunchLast time I used it I got line numbers of where the leaking allocation happened
11:32:51*adigitoleo joined #nim
11:33:06*henrytill joined #nim
11:35:08*lucerne joined #nim
11:35:08*Onionhammer joined #nim
11:35:09*lucerne quit (Max SendQ exceeded)
11:35:33FromDiscord<enthus1ast> good point, no, i will try
11:36:20*lucerne joined #nim
11:43:45FromDiscord<juancarlospaco> In reply to @enthus1ast "folks, i've written an": Musl leaks by design sometimes AFAIU, eg https://google.com/search?q=musl+dlclose+leak
11:57:55FromDiscord<enthus1ast> i test it on a linux mint and it leaks there as well
11:58:00FromDiscord<enthus1ast> with glibc
12:28:54*derpydoo joined #nim
12:46:23*xet7 joined #nim
13:02:11*azimut joined #nim
13:04:21*edr joined #nim
13:10:54advesperacitrunning "testament all" gives me this error
13:10:54advesperacitError: unhandled exception: categories.nim(748, 9) `cat.string in whiteListedDirs` Invalid category specified: 'rules' not in whilelist: ["deps", "htmldocs", "pkgs"] [AssertionDefect]
13:11:26advesperacitanyone encountered that before? I remember fighting with it before but I don't remember if I got it working or not
13:34:58FromDiscord<cidzercidzer> https://tenor.com/view/discordia-discord-discordian-war-drama-gif-6017844285476930533
13:49:13FromDiscord<System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4Hoz
13:49:19PMunchYes
13:49:26FromDiscord<System64 ~ Flandre Scarlet> How can I do that please?
13:49:30PMunchA macro
13:51:30PMunchI did something similar once when I wanted to have a circle drawn on an Arduino but without having to pull in trigonometry functions and floating point math
13:52:15PMunchAll that stuff was handled on compile-time, but to the user it would look like a completely normal call to draw a circle
13:55:38PMunchSomething a little bit like this: https://play.nim-lang.org/#ix=4HoC
14:24:22FromDiscord<enthus1ast> interesting
14:24:23FromDiscord<enthus1ast> i tried my upload server with nim 1.6.12 and it DOES NOT leak
14:25:11FromDiscord<enthus1ast> it happily stays at 160mb ram
14:28:59FromDiscord<enthus1ast> before it ate through 32gigs easily on my test machine
14:29:26*rockcavera joined #nim
14:30:30FromDiscord<Chronos [She/Her]> Probably won't do anything but have you checked if the leak on 2.0 and 1.6.14 still occurs with -d:useMalloc?
14:34:03FromDiscord<sirolaf> https://github.com/nim-lang/Nim/issues/22510
14:34:16FromDiscord<sirolaf> Good chance you got this problem, also mummy on 2.0
14:35:58FromDiscord<Chronos [She/Her]> Ah, interesting
14:36:08FromDiscord<Chronos [She/Her]> So seems like Nim's allocator is the issue
14:37:35FromDiscord<enthus1ast> with 2.0 it does leak↵(@Chronos [She/Her])
14:38:06FromDiscord<Chronos [She/Her]> Even with malloc?
14:38:21FromDiscord<Chronos [She/Her]> If so, odd
14:42:43FromDiscord<enthus1ast> i just tried again
14:42:49FromDiscord<enthus1ast> it does not leak soo bad
14:43:00FromDiscord<enthus1ast> every \~1000 pictures about 10mb
14:43:11FromDiscord<enthus1ast> but it still leaks
14:44:11FromDiscord<enthus1ast> it looks like it↵(@sirolaf)
14:45:41FromDiscord<enthus1ast> i think for the time beeing i would switch to 1.6.12 and just use that one, the website will not be used that much any more either, i think we got about half the images that where shot
14:54:18*arkanoid quit (Quit: WeeChat 3.5)
15:05:00*ntat joined #nim
15:43:49FromDiscord<nervecenter> What's the latest state of command line parsing libraries?
15:44:15*def- quit (Quit: -)
15:44:29*def- joined #nim
15:51:02*jmdaemon quit (Ping timeout: 260 seconds)
15:51:40FromDiscord<enthus1ast> I like an use cligen quite often
15:52:05FromDiscord<enthus1ast> Most of the time it's just one line of code to have a nice cli
15:55:40FromDiscord<jviega> Well, I have one where you can do all your command line flags and all your configs and your docs w/ just basic config, no code 🙂 Used for some pretty complicated commands. Maybe going to start auto-gening and installing bash completion scripts too, heh
16:15:41*derpydoo quit (Ping timeout: 258 seconds)
16:25:24FromDiscord<Chronos [She/Her]> Honestly debating on if my rogue-like should be made in 3D or 2D
16:25:51FromDiscord<Chronos [She/Her]> It'd still be 2D to the player, but the camera would definitely have quite a big inpact
16:25:53FromDiscord<Chronos [She/Her]> Impact
16:26:36FromDiscord<toma400> What were your main inspirations? Also gosh, didn't know you planned roguelike, I'm pretty excited to see what you create 🥰
16:27:48*xmachina quit (Quit: WeeChat 4.0.4)
16:32:14FromDiscord<Chronos [She/Her]> Yeah aha, gotta create one for college anyway and wanna do it as a learning experience so
16:32:35FromDiscord<Chronos [She/Her]> Thanks! I'm also doing it without a game engine so I'm just poorly trying to get something working :p
16:33:14*derpydoo joined #nim
16:49:44FromDiscord<toma400> Oh, college projects tend to start something bigger I see 😄 good luck with your idea!↵I'd probably pick 2D myself considering it's possibly easier, but really depends on your goals and overall learning process (just like many people rightfully say it's good to start with C, while I'm Python advocate, haha)
16:50:48FromDiscord<Chronos [She/Her]> Thanks! Aha
16:51:33FromDiscord<Chronos [She/Her]> I'm using Nim of course :p↵My issue is I want to have the textures drawn at an angle (think of something like Hades, it's another rogue-like), so drawing it at that angle is needed
16:51:52FromDiscord<Chronos [She/Her]> I don't really understand how I'd do it with a 2D camera, but with a 3D camera it also feels a bit... hard
16:54:30*xmachina joined #nim
16:58:23FromDiscord<System64 ~ Flandre Scarlet> Is there a way to write a Discord bot in Nim?
16:58:47FromDiscord<_gumbercules> https://github.com/krisppurg/dimscord
17:00:29FromDiscord<System64 ~ Flandre Scarlet> In reply to @_gumbercules "https://github.com/krisppurg/dimscord": Oh nice, and does it have latest API features?
17:00:34FromDiscord<Chronos [She/Her]> Yep
17:01:05FromDiscord<System64 ~ Flandre Scarlet> Very nice↵So, should be better than Discord.py or Discord.js
17:01:30FromDiscord<_gumbercules> I can't answer any of your last three questions 🙂 I'm only aware of the library I've never used it
17:01:44FromDiscord<_gumbercules> TMK others have though and I believe the Nim discord bot is built using it
17:01:47FromDiscord<_gumbercules> but I could be wrong
17:08:51FromDiscord<toma400> In reply to @chronos.vitaqua "I don't really understand": Unfortunately have no idea myself, but I hope you find a way.. you can share some insights there if you'd like to, I love to learn new stuff, especially something like those you mentioned here
17:09:36FromDiscord<toma400> In reply to @sys64 "Very nice So, should": Definitely more unique 😅 I made my Discord bot using Rust, it was really fun project, and the first time I actually had something serious to learn Rust alongside with
17:10:46FromDiscord<System64 ~ Flandre Scarlet> In reply to @toma400 "Definitely more unique 😅": Oh nice↵But the Nim api doesn't seems to take advantage of async and / commands
17:12:41FromDiscord<sirolaf> You can do slash commands and stuff with dimscmd but it's not a great experience, maybe that's a discord problem though
17:13:38FromDiscord<System64 ~ Flandre Scarlet> Oh alright↵So should I go with Nim, JS or Python for Discord bots?
17:15:41FromDiscord<sOkam! 🫐> In reply to @chronos.vitaqua "Honestly debating on if": if you are not using an existing engine, 2d clearly
17:16:26FromDiscord<Chronos [She/Her]> In reply to @toma400 "Unfortunately have no idea": Aha fair
17:16:49FromDiscord<Chronos [She/Her]> In reply to @heysokam "if you are not": Still struggling with how t draw it on a grid where my player can explore it
17:17:24FromDiscord<sOkam! 🫐> 3d won't make that better, it will make it 10x worse
17:17:58FromDiscord<Chronos [She/Her]> Fair lol
17:20:17FromDiscord<System64 ~ Flandre Scarlet> https://github.com/ire4ever1190/dimscmd↵Ah I also need this for commands
17:20:30FromDiscord<_gumbercules> @Chronos [She/Her] I might be able to recommend some books
17:20:53FromDiscord<Chronos [She/Her]> In reply to @_gumbercules "<@524288464422830095> I might be": Oh?
17:21:05FromDiscord<Chronos [She/Her]> I'm honestly debating on just using a game engine now aha
17:21:07FromDiscord<_gumbercules> well I've done quite a bit of RL programming in the past
17:21:14FromDiscord<Chronos [She/Her]> Because... I don't have the braincells lol
17:21:26FromDiscord<Chronos [She/Her]> Mostly want this over and done with, yk?
17:21:47FromDiscord<_gumbercules> http://foo.wyrd.name/en:bearlibterminal is one terminal emulator that is pretty easy to use and I think multiple sets of bindings exist for it (one of them I authored a long time ago)
17:22:23FromDiscord<_gumbercules> https://github.com/libtcod/libtcod is the classic RL terminal emulator and I believe someone has wrapped this as wel
17:22:31FromDiscord<_gumbercules> https://github.com/Vladar4/libtcod_nim
17:22:35FromDiscord<Chronos [She/Her]> Oh neat!
17:22:43FromDiscord<_gumbercules> that would actually allow you to follow along with
17:23:27FromDiscord<_gumbercules> https://roguebasin.com/index.php/How_to_Write_a_Roguelike_in_15_Steps
17:23:36FromDiscord<_gumbercules> err wait that' the wrong link
17:24:04FromDiscord<Chronos [She/Her]> Aha
17:24:25FromDiscord<_gumbercules> https://rogueliketutorials.com/tutorials/tcod/v2/
17:24:52FromDiscord<_gumbercules> they use python but you should be able to port that to Nim pretty easily - especially since libtcod is doing most of the heavy lifting here
17:25:44FromDiscord<_gumbercules> https://github.com/jolav/roguelike-tutorial is one for Go using BearLibterminal
17:26:00FromDiscord<Chronos [She/Her]> Thanks Gumber!
17:29:13FromDiscord<Chronos [She/Her]> After I get an initial version with libtcod working, I'll prolly fiddle with it and debate on if it's worth porting to Raylib or not lol
17:42:00FromDiscord<Chronos [She/Her]> That already doesn;t work :p
17:42:01FromDiscord<_gumbercules> Well, libtcod is going to do a lot of things for you that Raylib won't. In fact, depending on your assignment it might be cheating
17:42:20FromDiscord<Chronos [She/Her]> Can't load images as tilesheets in the Nim wrapper lol
17:42:41FromDiscord<Chronos [She/Her]> In reply to @_gumbercules "Well, libtcod is going": Eh it's just to write a game and do the documentation fori t so it's fine
17:44:52FromDiscord<_gumbercules> In reply to @chronos.vitaqua "Can't load images as": ah well typically people that use libtcod are using ascii
17:44:59FromDiscord<Chronos [She/Her]> I'll just do it in Raylib since doing it compleyely 2D is easy
17:45:02FromDiscord<_gumbercules> you can use images but it's not really the intended usage
17:45:06FromDiscord<Chronos [She/Her]> Ah
17:45:14FromDiscord<Chronos [She/Her]> I need to also use custom sprites so-
17:45:27FromDiscord<_gumbercules> gotcha
17:46:38FromDiscord<_gumbercules> https://github.com/deltaphc/raylib-rs/blob/master/samples/roguelike.rs Rust roguelike using raylib
17:46:58FromDiscord<_gumbercules> probably also not using images
17:47:24FromDiscord<_gumbercules> might be useful though
17:47:40FromDiscord<Chronos [She/Her]> Perhaps
17:48:06FromDiscord<Chronos [She/Her]> This is all just pain honestly :p
17:48:28FromDiscord<_gumbercules> games not your thing?
17:49:07FromDiscord<Chronos [She/Her]> Nope- Hell, computer science isn't either lol, programming is just a hyperfixation I have/had, I like being able to make my programs do things and getting immediate results
17:50:02FromDiscord<_gumbercules> well at least you've discovered something you don't want to do in life haha!
17:50:20FromDiscord<_gumbercules> yeah game programming is a lot of tedium - it is glorified, same with programming I think
17:50:24FromDiscord<Chronos [She/Her]> After wasting 3 years on it :p
17:50:54FromDiscord<Chronos [She/Her]> I believe programming has helped me mentally at least, it makes me think more logically and structured
17:50:57FromDiscord<voidwalker> we already have all the games made, stop making games pls
17:50:58FromDiscord<_gumbercules> well, I wouldn't consider it a waste! I earned a history degree and don't really do much with it but I still found the experience to be beneficial
17:51:14FromDiscord<Chronos [She/Her]> In reply to @voidwalker "we already have all": :P
17:51:15FromDiscord<_gumbercules> In reply to @voidwalker "we already have all": lol what should people make instead?
17:51:23FromDiscord<voidwalker> a tui library for nim
17:51:26FromDiscord<_gumbercules> psh
17:51:28FromDiscord<toma400> In reply to @_gumbercules "yeah game programming is": Can't deny that. Spent five years on learning programming (okay, with quite huge hole in between 2019 and 2021) and my current biggest affair is text RPG, just because I can't comprehend moving sprites in anything complex 😅
17:51:32FromDiscord<Chronos [She/Her]> Offtopic but I do want to be a singer, would be nice
17:52:01FromDiscord<toma400> I could lend a bit of help with my source code, but I don't know if it's anything of help (depends on complexity of help needed, and it's quite small complexity level I'm afraid)
17:52:23FromDiscord<Chronos [She/Her]> It's alright aha, either way I'm probably screwed :p
17:52:33FromDiscord<_gumbercules> In reply to @voidwalker "a tui library for": 1) find a TUI library written in C ↵2) wrap it in Nim↵3) ???↵4) profit
17:52:43FromDiscord<toma400> In reply to @chronos.vitaqua "Offtopic but I *do*": Not wanting to get too far off-topic, but what genre? :>
17:52:46FromDiscord<Chronos [She/Her]> I can do it, just need to pull myself up by the botstraps and do it (with the actual meaning, not the one boomers use)
17:52:50FromDiscord<toma400> (edit) ":>" => "❤️"
17:52:56FromDiscord<voidwalker> 1. found 2 already↵2. i can't wrap shit↵3. nobody wants to wrap it↵4. i moved to rust
17:53:14FromDiscord<voidwalker> oh, I mean i found c++ ones, not C
17:53:36FromDiscord<voidwalker> tui/gui stuff is well suited for programming with objects, so why would they write it in C
17:53:51FromDiscord<voidwalker> (edit) "objects," => "oop,"
17:53:59FromDiscord<_gumbercules> whatever you say
17:54:09FromDiscord<Chronos [She/Her]> In reply to @toma400 "Not wanting to get": Haven't thought that far xD, I do know a few songs I really like the vocals of as well as the effects in the actual voice, `The Soul Eclectic` by `Chonny Jash` just gives an emotion I like, any other talk probably in #offtopic tho ehe
17:55:36FromDiscord<raynei486> In reply to @voidwalker "oh, I mean i": tbh "modern" C++ isn't that bad if you have the mental capacity for all the sane opt-in decisions
17:56:05FromDiscord<_gumbercules> they already moved to Rust
17:56:11FromDiscord<raynei486> :noooo:
17:56:19FromDiscord<_gumbercules> lol
17:56:37FromDiscord<_gumbercules> it's not that sad
17:57:13*derpydoo quit (Ping timeout: 240 seconds)
17:57:53FromDiscord<toma400> In reply to @chronos.vitaqua "Haven't thought that far": I see, that's far from what I listen, but if you start anything in that vein, feel free to promote this stuff to me. Nothing better than supporting friends stuff! 😄 ↵(and yes, I'm ending it here, unless you want to go into what I listen, but then #offtopic indeed XD)
17:59:03FromDiscord<toma400> In reply to @_gumbercules "it's not that sad": Yeah, I don't think Nim's ecosystem will be better with complaining alone 😅 obviously young/underloved langs have that worse, but Nim possibility to wrap stuff around makes it much more of a blessing than Odin, V, Vale or whatever else new lang we have on the horizon
18:00:43FromDiscord<_gumbercules> well to be fair - I think all of those languages can interop with C no problem. C++ otoh is more difficult to interop with and the I'm not sure if Odin V or Vale can do it without having a C API to wrap the C++ API. Swift apparently can now which is neat.
18:01:24FromDiscord<_gumbercules> But I mean - if one isn't willing to learn how to wrap a library with Nim they probably were going to give up pretty quickly anyway once they encountered some other friction / adversity.
18:02:07FromDiscord<voidwalker> @_gumbercules I was maybe willing to learn to wrap a C one, but they tell me for C++ you have to get "creative"
18:02:23FromDiscord<voidwalker> Also I can't really read c++
18:02:49FromDiscord<voidwalker> just too many parentheses to open, and I don't see myself pulling through. And time is short : P
18:02:59FromDiscord<_gumbercules> I'm not sure who told you that - certainly it's not as straightforward as wrapping a C library but there's not much creativity involved
18:03:46FromDiscord<_gumbercules> Well if time is short and all that and the goal isn't to learn then yeah, Nim might not be as suitable for you as Go or Rust or C++ etc...
18:04:16FromDiscord<_gumbercules> but I mean, this isn't really a deficiency on the part of Nim - its ecosystem maybe - but then again not many people are making TUI apps
18:04:30FromDiscord<voidwalker> And a secondary problem I had, beyond the 5-6 missing libs, is that I found nobody (more experienced than I) willing to contribute/help. To the libs or the main project. And my project is definitely not a one man job.
18:05:16FromDiscord<voidwalker> Go/Rust/C++ are the only other feasable options yeah
18:05:47FromDiscord<voidwalker> For some reason I feel C++ would be more difficult than rust
18:05:50FromDiscord<_gumbercules> well Nim doesn't have the number of users or contributors that any of the languages you mentioned above do
18:06:22FromDiscord<_gumbercules> the only projects in the Nim ecosystem which seem to have multiple people working on them are in #science and #embedded tmk
18:06:36FromDiscord<_gumbercules> there have been some #gamedev projects in the past but they were closed teams
18:06:43FromDiscord<_gumbercules> oh maybe #webdev does too - I'm not sure tbh
18:07:00FromDiscord<_gumbercules> most Nim developers fly solo for better or worse
18:07:47FromDiscord<toma400> sent a long message, see http://ix.io/4HpN
18:08:22FromDiscord<voidwalker> And Araq scared all the trans people away 😄
18:09:16FromDiscord<_gumbercules> In reply to @toma400 "One of reasons why": unless you know how to wrap C/C++ librarires with Nim - then it's generally easy
18:09:26FromDiscord<_gumbercules> https://github.com/dankamongmen/notcurses @voidwalker did you see this library?
18:09:36FromDiscord<_gumbercules> or is this type of thing not what you're after?
18:10:09FromDiscord<voidwalker> yes @_gumbercules , it was the most promising, because of its notoriety, documentation etc, but it still not a widget based lib
18:10:26FromDiscord<griffith1deadly> In reply to @toma400 "One of reasons why": at this point we can say that if you are developing on Nim for yourself and want everything to be perfect, you need to do everything yourself. sometimes writing bindings to C/C++ libraries can be detrimental because of little knowledge of how it all works specifically at their level and not at the Nim level.
18:10:29FromDiscord<_gumbercules> oh you want widgets...
18:10:54FromDiscord<voidwalker> yes, I want to render a table with 6 lines of code
18:11:01FromDiscord<_gumbercules> In reply to @griffith1deadly "at this point we": huh? I assume if you're wrapping C/C++ you can read C/C++
18:11:07FromDiscord<griffith1deadly> At this point we can say that if you are developing on Nim for yourself and want everything to be perfect, you need to do everything yourself. Sometimes writing bindings to C/C++ libraries can be detrimental because of little knowledge of how it all works specifically at their level and not at the Nim level.
18:11:10FromDiscord<griffith1deadly> oops
18:11:15FromDiscord<Chronos [She/Her]> In reply to @voidwalker "And Araq scared all": Not all of them :p
18:11:56FromDiscord<Chronos [She/Her]> I could care less about his thoughts on us really, I use Nim because it's a nice language to use compared to others for me
18:12:15FromDiscord<griffith1deadly> In reply to @_gumbercules "huh? I assume if": actually, it doesn't always require complete knowledge to write exactly a wrapper to C/C++ types
18:12:42FromDiscord<voidwalker> Yeah that's a healthy thinking. I have a very conservative kind of friend, and he's wary of trying rust, because of it being too trans friendly lmao. But he's still considering it, because "Elon Musk said it's good"
18:12:57FromDiscord<Chronos [She/Her]> That pains me xD
18:14:32FromDiscord<voidwalker> maybe we should pay Musk to say something good about Nim
18:14:52FromDiscord<_gumbercules> In reply to @griffith1deadly "actually, it doesn't always": I'm not asserting it does but I'm pointing out the fallacy in your second point
18:15:25FromDiscord<sOkam! 🫐> i don't think one person saying something good once would help much. single-event attention doesn't last
18:15:34FromDiscord<_gumbercules> that wrapping C/C++ code is sometimes detrimental because you don't have knowledge of what the C/C++ code is doing: that's only the case if you can't read C/C++
18:16:51FromDiscord<_gumbercules> In reply to @voidwalker "maybe we should pay": I don't think this is how you attract people to a PL
18:17:17FromDiscord<_gumbercules> or at least the kind of people you want to attract to a PL
18:17:21FromDiscord<voidwalker> I know how you attract. Some impressive demo. Like that dude writting a "twitter" clone in 50 lines or something
18:17:32FromDiscord<Chronos [She/Her]> Currently making some code to load spritesheets in a way that's nicer to use aha
18:17:39FromDiscord<voidwalker> https://www.youtube.com/watch?v=7Owct-njg0s - this one
18:17:41FromDiscord<_gumbercules> In reply to @voidwalker "I know how you": No not really
18:18:06FromDiscord<_gumbercules> you build something that is practical that someone is going to actually use in a production setting
18:18:16FromDiscord<_gumbercules> like the person who wrote Odin did
18:18:33FromDiscord<_gumbercules> https://odin-lang.org/showcase/
18:18:46FromDiscord<_gumbercules> or you have a really impressive marketing team like Zig did
18:18:50FromDiscord<_gumbercules> or you have Mozilla money like Rust did
18:18:52FromDiscord<sirolaf> In my eyes nim's biggest weakness is the atrocious tooling, specifically when it comes to ide integration. Compared to the likes of python or rust which have a huge backing we are working with caveman tools
18:18:58FromDiscord<voidwalker> yeah, I mean what can you write in Nim easier (or at least as easy) as other languages, while having some advantage, like speed?
18:19:01FromDiscord<sOkam! 🫐> sent a long message, see https://paste.rs/4mDje
18:19:31FromDiscord<voidwalker> (edit) "as" => " than"
18:19:48FromDiscord<emanresu3> no I think it should be something like Mojo. Python but 35k times faster↵(@voidwalker)
18:19:59FromDiscord<voidwalker> wasn't it 68.000 times ? : D
18:20:23FromDiscord<toma400> In reply to @heysokam "the zig guys are": Tbh, Nim guys are starting to become visible, like for example during Nim 2.0 release, Primeagen covered the changelog and said that he's flooded with Nim fanboys asking him to check this lang.↵The issue I found is that when it came to showcasing changelog and general talk about language, there was literally 0 people knowing what Nim is for. Like literally the reasons people argued behind Nim
18:20:31FromDiscord<sirolaf> In reply to @sirolaf "In my eyes nim's": Had a couple people try it but they didn't stick around as the tooling is more in your way than it helps
18:20:51FromDiscord<sOkam! 🫐> In reply to @toma400 "Tbh, Nim guys are": yeah definitely
18:21:04FromDiscord<voidwalker> Ah yeah that primeagen thing was funny, nim is a kind of meme to him. He doesn't get why he would use it
18:21:13FromDiscord<toma400> And welp, I'm doing my part of Nim propaganda myself on several servers, so maybe our enthusiasm will one day succeed 😅
18:21:35FromDiscord<toma400> In reply to @voidwalker "Ah yeah that primeagen": Meme is still kinda a good thing. It's what pushes people around tech nowadays quite a lot
18:21:45FromDiscord<voidwalker> But that's not very significant, he was just spammed, he didn't have any personal interest in it ,before or after
18:21:53FromDiscord<_gumbercules> this topic gets rehashed every week in here I feel like
18:21:53FromDiscord<emanresu3> question, is Nim faster than Mojo?
18:21:58FromDiscord<_gumbercules> or at least every couple
18:22:11FromDiscord<sOkam! 🫐> it needs to be more than that. someone mentioned before that a plan is needed. and that is how it is↵idk if zig has a written marketing plan, but they are following one (even if just intuitively)↵point is that things are not just "manifested", they need to be planned and executed
18:22:48FromDiscord<jviega> The biggest issue is ecosystem more broadly. The fact that for an "easy" language , too many things people want to do where they'd find a lib in another language quickly, there's nothing good and supported. Too much stuff that's abandoned that people won't touch. Then add that to the tooling and the docs being reference only
18:22:53FromDiscord<griffith1deadly> In reply to @sirolaf "In my eyes nim's": at some moments, i actually contemplate hating this part in Nim development. haha
18:22:54FromDiscord<voidwalker> well zig deserves its hype. it is made for a very specific although niche purpose
18:22:59FromDiscord<jviega> It's a broad problem
18:23:12FromDiscord<_gumbercules> In reply to @voidwalker "well zig deserves its": what is that?
18:23:29FromDiscord<voidwalker> making a program that runs at 99.5%+ of the theoretical hardware speed
18:23:33FromDiscord<toma400> In reply to @_gumbercules "this topic gets rehashed": Hard not to, the fact that Nim is almost unknown compared to Odin, Zig, Rust and all others is ridiculous imo. Even if it's rightly overshadowed in some segments by more mature langs, it's strange not be at least counted within those less mature
18:23:37FromDiscord<voidwalker> using custom memory allocations, zero abstractions etc
18:23:39FromDiscord<sOkam! 🫐> In reply to @jviega "The biggest issue is": thats the retention part, yeah
18:23:45FromDiscord<sOkam! 🫐> but whats first, the people or the eggs
18:24:00FromDiscord<sOkam! 🫐> i think the lack of people is punishing the ecosystem, not the other way
18:24:09FromDiscord<_gumbercules> IIRC Zig was authored to "replace C" which is a pretty silly notion
18:24:12FromDiscord<jviega> Well, lots of people have tried nim, built libraries then abandoned them
18:24:27FromDiscord<jviega> So I'd say there's clearly an underlying cultural issue
18:24:30FromDiscord<_gumbercules> but regardless you can do the same thing you're describing with Nim that you can with Zig - as well as other languages in this space
18:24:44FromDiscord<voidwalker> yes @jviega I'm in the same boat. realised nim ecosystem is not sustainable for my project, and I decided to try rust
18:24:59FromDiscord<sOkam! 🫐> so if people write tools, and leave. what would stop them from leaving?
18:25:04FromDiscord<toma400> In reply to @jviega "Well, lots of people": That's what scares me so much. Nim is in much better state than Ruby, but Ruby on the other hand catched some hype in early 2000s
18:25:29FromDiscord<voidwalker> Ruby is alive now just because of rails
18:25:52FromDiscord<toma400> In reply to @heysokam "so if people write": It'd be interesting mission to find those who left and ask, honestly
18:25:54FromDiscord<voidwalker> and it's doing quite well there, for a "dead" language : P
18:26:25FromDiscord<toma400> I mean, Ruby is still used in webdev, but its desktop culture is almost dead
18:26:58FromDiscord<toma400> Spent weeks trying to get any executable exporter working and to no success ;-;
18:27:29FromDiscord<toma400> A lot of libs need older versions than currently being published, so it's a huge issue for Ruby's ecosystem
18:27:39FromDiscord<sOkam! 🫐> In reply to @toma400 "It'd be interesting mission": that would only tell you the ambiguous reasons why they felt they couldn't take it anymore and left↵not the real reasons, which are always UX-based and very few people are aware of their own UX
18:27:42FromDiscord<toma400> (edit) "A lot of libs need older versions than currently being published, so it's a huge issue for Ruby's ecosystem ... " added "(or at least were half a year ago)"
18:28:14FromDiscord<sOkam! 🫐> we take too much for granted to be able to be aware of what we have and or mis
18:28:18FromDiscord<sOkam! 🫐> (edit) "and or mis" => "and/or miss"
18:29:31FromDiscord<sOkam! 🫐> its like in gamedev "dude, this engine sucks. i wonder if i should make one".... yeah, thats not gonna happen, my man, unless you invest 2-4++ years making the engine without touching your game at all
18:29:47FromDiscord<sOkam! 🫐> because we are not aware of the years of effort put behind what we use
18:30:45FromDiscord<toma400> That's true. That push to make stuff by yourself instead of supporting already done is pretty natural, but also doesn't help with maintaining long-term projects that will last
18:31:17FromDiscord<toma400> (not that I didn't do that myself with your support tho in terms of game lib 😅)
18:31:56FromDiscord<sOkam! 🫐> what i wonder is what stops most people from realizing the power of nim↵i struggle because for me it has been really crystal clear from the start... so i have no concepts to base my deductions on 🧩
18:33:20FromDiscord<Elegantbeef> The only good response is "The secret of Nim"
18:33:47FromDiscord<_gumbercules> this convo just goes in circles
18:33:54FromDiscord<jviega> Yup
18:34:34FromDiscord<jviega> But I'll tell you I'm going to open source about 50k lines of Nim code tomorrow, and it definitely will find an audience, so I'm personally not going around in circles 🙂
18:34:48*ntat quit (Quit: leaving)
18:35:07FromDiscord<_gumbercules> just have to hope it's not 50k lines of malware
18:35:12FromDiscord<_gumbercules> kidding
18:35:17FromDiscord<sOkam! 🫐> what are you open sourcing?
18:35:20FromDiscord<jviega> Why would I open source that?
18:35:24FromDiscord<_gumbercules> true
18:35:39FromDiscord<jviega> Be easier to show you tomorrow when it's live
18:35:40FromDiscord<voidwalker> to keep nim in the "forever infected" limbo 😄
18:38:02FromDiscord<Elegantbeef> "For educational purposes only" 😄↵(@jviega)
18:39:33FromDiscord<spaphy> yo! if I want to spawn processes nad have them spin off separately in parallel, is the Parallel pragma the way to do this? spawn looks like it blocks the main thread.
18:39:43*xmachina quit (Ping timeout: 240 seconds)
18:39:48FromDiscord<jviega> Fair enough, though if I were motivated enough to do 50K lines of malware I'd want to profit 😄
18:41:03FromDiscord<Elegantbeef> `startProccesses`
18:41:04FromDiscord<Elegantbeef> That but spelled correctly
18:41:05FromDiscord<Elegantbeef> 50k loc for malware is like 10 loc non malware, you're just obfuscating 😛
18:42:25FromDiscord<aintea> do you guys know any way I can download a video from youtube using nim ? I checked on <https://nimble.directory> but I can't find any libs that makes possible downloading youtube videos
18:43:39FromDiscord<spaphy> err maybe I mean threads. I was trying to execute a bunch of `procs` in threads in parallel but it seems like I hit a wall where I can't have them all dispatched dynamically without using like a sync() or some sort of wait-to-execute
18:46:08FromDiscord<spaphy> In reply to @aintea "do you guys know": you might have more luck using yt-dl on github as a python module and shooting for interoperability, since most of that code is all python. I don't think there is currently a lot of support for it in other languages or something that is just plug and play.
18:47:13FromDiscord<sOkam! 🫐> yt-dl is the best way to do it yeah, just spawn a process from nim and call yt-dl
18:48:14FromDiscord<voidwalker> yt-dlp is python ? omg
18:49:23FromDiscord<voidwalker> yeah there we go, (re)writing such a widely used popular project in nim will certainly attract positive attention to the language
18:49:46FromDiscord<huantian> https://github.com/yt-dlp/yt-dlp#embedding-yt-dlp
18:50:29FromDiscord<huantian> like it mentions, you could use it as a command line program, or interface with it directly via python
18:51:06FromDiscord<Elegantbeef> Just reimplement it in Nim, it's just a bunch of http requests... how hard could it be?! 😛
18:51:09FromDiscord<sOkam! 🫐> In reply to @voidwalker "yeah there we go,": you are thinking too small. seamless python interop would be a ton more helpful than that
18:51:22FromDiscord<aintea> In reply to @heysokam "yt-dl is the best": do you have any idea on how I could do this ?
18:51:35FromDiscord<UN533N_5PY [pwner of pwnt]> Its the work in keeping it up to date
18:51:38FromDiscord<voidwalker> what would seamless mean in this context ? Like not having to convert data types ?
18:51:40FromDiscord<aintea> i'm still new to these things
18:51:40FromDiscord<sOkam! 🫐> In reply to @aintea "do you have any": `execShellCmd` is probably your easiest bet
18:51:48FromDiscord<aintea> okay nice thanks
18:51:48FromDiscord<UN533N_5PY [pwner of pwnt]> thats really only it i guess
18:51:49FromDiscord<sOkam! 🫐> but there is also `execCmd`
18:52:07FromDiscord<aintea> but doesn't it cause security vulns like in python with `os.system` ?
18:52:16*xmachina joined #nim
18:52:23FromDiscord<leetnewb> You used to be able to pull down yt videos with vlc. maybe wrap libvlc?
18:52:26FromDiscord<sOkam! 🫐> In reply to @aintea "but doesn't it cause": its not system, it spawns a shell
18:52:29FromDiscord<sirolaf> In reply to @heysokam "you are thinking too": Could always use [nimpy](https://github.com/yglukhov/nimpy)
18:52:45FromDiscord<aintea> In reply to @heysokam "its not system, it": oh okay, thanks then
18:53:00FromDiscord<aintea> In reply to @leetnewb "You used to be": will check all these possibilities, thanks guys
18:53:16FromDiscord<voidwalker> I used nimpy right at the beginning when I started on nim, and was amazed I made it work/figured it out, in 10 minutes or so. and it actually worked, for the lib I tried
18:53:52FromDiscord<sOkam! 🫐> didn't know about that lib
18:54:29FromDiscord<Elegantbeef> You'd be evaluating a static string
18:54:38FromDiscord<Elegantbeef> There is not much that can go wrong when evaluating a static string
18:55:29FromDiscord<Elegantbeef> Like short of changing what `python` means then using that to do your malicious attack it's pretty secure
19:07:42FromDiscord<aintea> In reply to @heysokam "its not system, it": Another question
19:08:23FromDiscord<aintea> If I just want to run a simple command (`yt-dlp "<the_yt_url>"`), should I use a process or a shell ?
19:08:46FromDiscord<aintea> I have choice between `execCmd` and `execProcess`
19:08:54FromDiscord<aintea> which one should I use based of what I need to do ?
19:11:51FromDiscord<Elegantbeef> `execProcess` gives more control
19:12:34FromDiscord<Elegantbeef> You can do `execProcess("yt-dlp", args = [url])`
19:15:20FromDiscord<Chronos [She/Her]> Trying to think of the best way to format the code for drawing a sprite from a spritesheet hm...
19:16:33FromDiscord<Elegantbeef> An index
19:16:41FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/p2KIB
19:17:44FromDiscord<Chronos [She/Her]> So that'd mean I should prolly implement something for getting sprites as a 1D array rather than 2D?
19:18:29FromDiscord<vindaar> In reply to @heysokam "you are thinking too": As @sirolaf already said, it doesn't really get any more seamless than `nimpy` (at least not for a statically typed language)
19:18:31FromDiscord<Chronos [She/Her]> I was thinking of just making a `distinct Rectangle` since I need the width and all that anyway
19:18:47FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/Knc20
19:19:06FromDiscord<Elegantbeef> vindaar how do I not meme with "What about MoJo??#@!#21
19:19:47FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4Hq4
19:20:24FromDiscord<vindaar> In reply to @Elegantbeef "vindaar how do I": come on, Mojo is just fake Nim in worse 🫣 🤭
19:20:52FromDiscord<Elegantbeef> I will never understand the complexities they added to a language meant to be used by python programmers
19:22:39FromDiscord<vindaar> Yeah. I also don't get why you'd tie yourself to being a python superset (if that becomes a reality). That brings so many crappy things from python into your language (sane scoping rules anyone?)
19:22:59FromDiscord<Elegantbeef> Not to mention their whole struct declaration is silly
19:23:11FromDiscord<Elegantbeef> Having to annotate types, or supply your own move semantic hooks
19:23:19FromDiscord<Elegantbeef> Ah yes approachable code
19:24:32FromDiscord<Elegantbeef> I know I know, the language is designed by the guy behind LLVM and Swift, given my blank CV I cannot speak \:D
19:27:23FromDiscord<vindaar> yeah, he's sure smart and all that. But listening to him describing some decisions and ideas in that Lex interview was kinda painful. To my biased ears it just sounded like he wants Nim 🤷‍♂️ But well, given the money he can move, writing a new language where you can do exactly what you want at your own pace will be enticing, I suppose 😶 Anyway, enough off topic from me 🤭
19:27:30FromDiscord<Elegantbeef> Well it's proprietary presently so who cares about it
19:28:13FromDiscord<Elegantbeef> Just like Jai 😛
19:29:38FromDiscord<Elegantbeef> Anyway I agree it's quite odd that they didn't copy Nim's removing the cruft
19:29:55FromDiscord<Elegantbeef> Nim's move semantics are ideal for noobs as it assumes you're correct and doesn't fight you tooth and nail
19:30:14FromDiscord<Elegantbeef> Like yes it can create sub optimal code in some cases, but it'll still be better than the python equivalent
19:30:30FromDiscord<Chronos [She/Her]> sent a code paste, see https://paste.rs/4DaQ4
19:30:32FromDiscord<Chronos [She/Her]> :)
19:30:47FromDiscord<Chronos [She/Her]> It indeed works :)
19:32:14FromDiscord<Elegantbeef> Not using a distinct int for Sprite, shame on you!
19:32:42FromDiscord<Chronos [She/Her]> 🤷
19:33:02FromDiscord<Chronos [She/Her]> I'd have to cast it back and forth :
19:33:05FromDiscord<Chronos [She/Her]> :P
19:33:20FromDiscord<Elegantbeef> Oh noes type safety
19:36:02FromDiscord<Chronos [She/Her]> `0.Sprite` :p
19:36:53*xmachina quit (Quit: WeeChat 4.0.4)
19:37:43FromDiscord<Chronos [She/Her]> Happy? I added it in now lol
19:38:16FromDiscord<Elegantbeef> Hey you do you
19:38:25FromDiscord<Chronos [She/Her]> :P
19:38:46FromDiscord<Chronos [She/Her]> Now I just need to implement a map format
19:39:06FromDiscord<Elegantbeef> Go use Prestiges Seq2D
19:39:07FromDiscord<Chronos [She/Her]> I'll implement the one I made before
19:39:10FromDiscord<Chronos [She/Her]> Oh?
19:39:27FromDiscord<Elegantbeef> https://github.com/avahe-kellenberger/seq2d/tree/master
19:39:27FromDiscord<Elegantbeef> Think it's missing some minor things
19:39:54FromDiscord<Elegantbeef> Yea doesnt have a `pairs` where you could do `for (x, y), val in mySeq.pairs`
19:40:15FromDiscord<Chronos [She/Her]> Why do I need a 2D seq for a map?
19:40:44FromDiscord<Elegantbeef> Poor poor soul
19:40:44FromDiscord<Elegantbeef> Wait he made items the pairs iterator
19:40:44FromDiscord<Elegantbeef> Cause maps are 2D?
19:41:09FromDiscord<Chronos [She/Her]> Oh wait yeah lol
19:41:17FromDiscord<Chronos [She/Her]> Brain is so dead inside, lord
19:41:29FromDiscord<Elegantbeef> What brain?
19:41:32FromDiscord<Chronos [She/Her]> I wonder if there's an easy way to serialise the map into a binary :p
19:41:36FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "What brain?": Exactly
19:41:48FromDiscord<Elegantbeef> `import pkg/frosty`
19:43:20FromDiscord<Chronos [She/Her]> Oooh
19:44:30FromDiscord<Chronos [She/Her]> Fun!
19:45:29FromDiscord<Elegantbeef> It's pretty much the Serde of Nim but no one uses it sadly
19:46:08FromDiscord<prinova> Hello all, I'm flirting with starting to learn Nim.↵I'm proficient in python and have experiences in c, c++, GPU, SIMD and CUDA (because of AI, ML, 3d graphics development in python with taichi packages and pytorch). There is also Rust, Zig and Odin.↵Why should I learn Nim and why not.↵I hope for honest answers.
19:46:23FromDiscord<prinova> (edit) "not.↵I" => "not?↵I"
19:46:48FromDiscord<Elegantbeef> It's a very strong language with many compile time features that gives you a ton of control
19:46:52FromDiscord<Elegantbeef> It's got very bad tooling
19:46:57FromDiscord<Elegantbeef> There you go
19:47:26FromDiscord<Chronos [She/Her]> If you need fast compiled code but don't want to mess with the Python ABI directly, Nimpy exists
19:47:37FromDiscord<Chronos [She/Her]> Not a language feature but it's an epic library
19:49:24*def- quit (Quit: -)
19:49:37*def- joined #nim
19:50:36FromDiscord<prinova> In reply to @chronos.vitaqua "If you need fast": I saw nimpy and was impressed by the library. The python taichi package uses decorators for compiling GPU/CUDA kernels.↵How can I interop with it? Taichi uses python functions as arguments, I gues this part needs to be written in python and the other code in Nim?
19:51:02FromDiscord<prinova> (edit) "gues" => "guess" | "Nim?" => "Nim, doesn't it?"
19:51:07FromDiscord<Elegantbeef> You can get the python procedures and pass them along iirc
19:51:38FromDiscord<Chronos [She/Her]> I mean, iirc you can also make decorators in Python by passing the func to the decorator as an option, maybe support for that can be done similarly? Idk
19:52:06FromDiscord<sOkam! 🫐> sent a long message, see http://ix.io/4Hq9
19:52:20FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "You can get the": Key parts `tachi ... uses decorators .. python functions as arguments`
19:52:50FromDiscord<Chronos [She/Her]> In reply to @heysokam "nim syntax is closests": The language ecosystem can also be prettu underdeveloped in some cases
19:52:55FromDiscord<Elegantbeef> > nim syntax is closests to what you already know↵Hey we were just talking about Mojo
19:53:06FromDiscord<Elegantbeef> I mean since python is a VM'd language can you not just do that from the Python API?
19:53:07FromDiscord<Chronos [She/Her]> Lol
19:53:09FromDiscord<Elegantbeef> I'm speaking out my arse here
19:53:20FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "I mean since python": Wdym?
19:53:55FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "> nim syntax is": he said he is proficient with python, than line was directly referring to that
19:54:36FromDiscord<Elegantbeef> Decorators are just procedures iirc
19:54:44FromDiscord<sOkam! 🫐> In reply to @chronos.vitaqua "The language ecosystem can": does it count if you can interop with C?
19:54:55FromDiscord<sOkam! 🫐> and cpp, just with more effort?
19:55:06FromDiscord<prinova> In reply to @Elegantbeef "> nim syntax is": Why you bring Mojo here? Mojo is very immature at the moment and lacks a lot right now.
19:55:06FromDiscord<Elegantbeef> Mojo is a Python superset, that was the joke Sokam
19:55:38FromDiscord<Elegantbeef> I am making jokes
19:56:09FromDiscord<Elegantbeef> Mojo is a joke language imo
19:56:09FromDiscord<Elegantbeef> Fight me
19:56:32FromDiscord<Elegantbeef> Anyway I don't know python but arent decorators just silly procedures
19:56:37FromDiscord<voidwalker> "How dare you defy Mojo Jojo" 😄
19:57:36FromDiscord<jviega> I mean, people could say that about templates too 🙂
19:57:49FromDiscord<Elegantbeef> https://github.com/yglukhov/nimpy/issues/156
19:58:24FromDiscord<voidwalker> It all depends on what you want to with it. I found the lack of some libs, or outdated/unmaintained libs, to be the main problem. I am currently learning rust because of that. Check out the libs for your use cases and see if they are suitable. The language itself is fine fine.
19:58:26FromDiscord<Chronos [She/Her]> In reply to @heysokam "does it count if": It's a lot of work imo
19:58:30FromDiscord<Elegantbeef> Except jviega templates do not happen at runtime
19:58:30FromDiscord<Elegantbeef> Decorators run before your procedure is ran and can call your internal procedure
19:59:46FromDiscord<prinova> In reply to @voidwalker "It all depends on": That is my main concern. I need CUDA and GPU interop with hopefully zero-cost overhead.
20:00:08FromDiscord<prinova> (edit) "CUDA and GPU" => "CUDA, (w)GPU"
20:00:09FromDiscord<_gumbercules> https://github.com/SciNim/nimcuda
20:00:44FromDiscord<_gumbercules> https://github.com/SciNim and #science are probably better places to ask these questions @prinova
20:00:55FromDiscord<_gumbercules> #science is a better place to ask even
20:01:22FromDiscord<prinova> In reply to @_gumbercules "https://github.com/SciNim/nimcuda": Oh, I see. I usually use CUDA 12.
20:01:32FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4Hqf
20:01:34FromDiscord<prinova> (edit) "12." => "12 and this library has max CUDA 8"
20:01:42FromDiscord<toma400> In reply to @Elegantbeef "Like yes it can": Well, I find Mojo kinda neat that it may indirectly drive support to Nim. Like more people get used to identation syntax and thus will search for "better than Mojo" equivalents.↵(sorry for necromanting both old message & yet again Nim promotion, I can't help myself XD)
20:01:53FromDiscord<Elegantbeef> Lol
20:02:09FromDiscord<_gumbercules> In reply to @prinova "Oh, I see. I": I have no knowledge of that library and am not into data science but I'd chat with the folks in the channel I mentioned as they might have more detailed answers for you
20:02:23FromDiscord<voidwalker> oh yeah we gotta SEO optimize the shit out of that "better than Mojo"
20:03:37*PMunch quit (Quit: leaving)
20:03:59FromDiscord<sOkam! 🫐> In reply to @chronos.vitaqua "It's a lot of": futhark?
20:04:03FromDiscord<sOkam! 🫐> that takes like minutes
20:04:25FromDiscord<voidwalker> Not really sure how nim stands in ML domain, there's this to look into: https://github.com/ringabout/awesome-nim#deep-learning
20:04:35FromDiscord<Chronos [She/Her]> True Futhark exists, but it's a low-level binding obviously
20:04:57FromDiscord<sOkam! 🫐> In reply to @chronos.vitaqua "True Futhark exists, but": what does the second part of that sentence mean to say?
20:05:14FromDiscord<sOkam! 🫐> idk if its making it good or bad that it is that way, or if its referering to something else im missing
20:05:51FromDiscord<Elegantbeef> It's not an idiomatic binding
20:06:01FromDiscord<Elegantbeef> Futhark just gives you an obtuse C api
20:06:12FromDiscord<Elegantbeef> It does not use Nim semantics, data types, or give you any niceties
20:06:23FromDiscord<sOkam! 🫐> manually written bindings also give you an obtuse C api
20:06:32FromDiscord<.aingel.> Yeah futhark is really good
20:06:36FromDiscord<sOkam! 🫐> unless you put some serious effort to make a layer on top
20:06:44FromDiscord<Elegantbeef> Futhark works great of course, but most people want to write Nim not C
20:07:05FromDiscord<jviega> Yeah that's silly Beef, better to start with a thorough base and then add high-level APIs on top of it (often as you need it)
20:07:07FromDiscord<Elegantbeef> So after using futhark you generally have to wrap the code which takes longer
20:07:09FromDiscord<.aingel.> Yeah you still have to write C but you can make your nim api on top of it
20:07:21FromDiscord<Elegantbeef> What did I say that was silly?
20:07:33FromDiscord<.aingel.> How old it futhark
20:07:37FromDiscord<jviega> For you and me maybe, but for most people Futhark is automating the hardest part
20:07:39FromDiscord<.aingel.> (edit) "it futhark" => "is futhark>"
20:07:40FromDiscord<.aingel.> (edit) "futhark>" => "futhark?"
20:07:48FromDiscord<Elegantbeef> A year or 2
20:07:59FromDiscord<.aingel.> It was functioning the same as it is now basically?
20:08:10FromDiscord<.aingel.> Cause I feel like with futhark we can get a lot more libraries on nim
20:08:16FromDiscord<Elegantbeef> It uses libclang and generates bindings
20:08:20FromDiscord<Elegantbeef> So yes
20:09:03FromDiscord<Elegantbeef> C2Nim does the other approach and parses C and converts it
20:09:03FromDiscord<Elegantbeef> Both are good, depending on the library and what you're doing
20:09:32FromDiscord<Elegantbeef> Like I preferred using c2nim for Wasm3 since it's a small api
20:09:33FromDiscord<Elegantbeef> I much prefer having the C-API written out in full in readable format
20:09:54FromDiscord<Elegantbeef> Pmunch has added that to futhark though, so now you can generate readable bindings using futhark
20:10:58FromDiscord<jviega> I mean, honestly, I am so comfortable on the C side, when I need to interface w/ something not in nim, I often write it in C first, where I abstract pretty well, and then often don't get around to re-writing it in Nim. But I get the nice high-level API for nim tho
20:11:44FromDiscord<Elegantbeef> Yea I mean most people want C code to work with `openArray[T]` and use it's move semantics/destructors
20:11:57FromDiscord<Elegantbeef> No one wants to manually call `destroy(myResource)`
20:12:54FromDiscord<.aingel.> In reply to @jviega "I mean, honestly, I": Do you mean that you rewrite the high level api in nim?
20:13:02FromDiscord<.aingel.> (edit) "rewrite the" => "write a"
20:13:05FromDiscord<.aingel.> For your c code?
20:13:19FromDiscord<Elegantbeef> > nd then often don't get around to re-writing it in Nim
20:13:27FromDiscord<jviega> Yeah, but in C that's the way everything's structured, so basically if I bundle a data type in a pointer, I can wrap an object around it w/ a destructor that just calls free() easy peasy
20:13:58FromDiscord<Elegantbeef> I'm uncertain where this conversation is going
20:14:00FromDiscord<jviega> Sort of, I often get my C reasonably high level first, and then provide a more idiomatic nim interface too
20:14:03FromDiscord<jviega> 🤷
20:14:26FromDiscord<Elegantbeef> I'm just saying as nice as futhark is, it does not solve the library problem aswell as some might think
20:15:41FromDiscord<.aingel.> In reply to @Elegantbeef "> nd then often": I thought he meant he doesn't rewrite the c in nim
20:15:42FromDiscord<jviega> My main point is that most people who are using it are VERY uncomfortable w/ C, but can handle the nim side once wrapped, so it handles more or less ALL of what's hard to them
20:15:51FromDiscord<.aingel.> But writes a high level nim api over it and links it with futhark
20:16:23FromDiscord<.aingel.> In reply to @jviega "Sort of, I often": Oh I see
20:16:32FromDiscord<jviega> It's not a bad approach. Certainly much less error prone and frustrating for many
20:16:50FromDiscord<.aingel.> Why not write in nim and then make C header for it
20:20:31FromDiscord<Chronos [She/Her]> In reply to @heysokam "what does the second": Doesn't wrap anything to work pleasantly in Nim which is expected tbf but ehh
20:24:42FromDiscord<sOkam! 🫐> ah i see
20:25:14FromDiscord<sOkam! 🫐> yeah fair, that is true. but that is true for any bindings in that case, imo
20:27:20FromDiscord<Chronos [She/Her]> Fair
20:28:11FromDiscord<jviega> I mean, I do some of that too. Generally when I go to C, it's easier for me to write it in C than Nim.
20:30:51FromDiscord<jviega> As a for instance, try spawning a process attached to a pseudo terminal in nim. Heck, just try passing a spawned subprocess some stdin while getting back the stdout, stderr AND return code. I'll wait. Then I write myself nice Nim interfaces that backend to C I basically can write in my sleep
20:40:21FromDiscord<JJ> i do wish that nim c ffi was more first class. it works of course and futhark makes it pretty nice, but it's not obj-c seamless.
20:41:04FromDiscord<Chronos [She/Her]> That's to be expected tbf but still sucks a bit
20:41:55FromDiscord<JJ> which is a shame - if style insensitivity wasn't around, i do think there could be a compiler-magic `import c/???` for actual seamless use. everything would use c types and need destructors of course, but...
20:42:53FromDiscord<.aingel.> What do you mean, when the C api for libraries are quite different anyways
20:43:00FromDiscord<Chronos [She/Her]> Why would style insensitivity cause the issue?
20:43:10FromDiscord<Chronos [She/Her]> Oh wait
20:43:13FromDiscord<Chronos [She/Her]> I see your point nvm
20:43:17FromDiscord<jviega> It has nothing to do w/ the FFI really. Just at some point it's much easier to drop down to C when you know the APIs well, esp since Nim often doesn't make it clear how it really exposes them
20:44:09FromDiscord<jviega> Or for many things, doesn't expose them at all, you're basically calling C directly from Nim which is less clear, might as well write the C
20:44:31FromDiscord<JJ> sent a long message, see https://paste.rs/cmuTM
20:45:47FromDiscord<JJ> In reply to @chronos.vitaqua "I see your point": yea that it makes interop harder is really the only thing i have against style insensitivity. a better approach would have been an official style guide & linter imo, but eh it's a barrier to better ffi sure but it's not the only barrier
20:46:26FromDiscord<jviega> I do wonder what Nim has against the poor underscore.
20:46:45FromDiscord<JJ> In reply to @.aingel. "What do you mean,": yeah, indeed. somewhat convoluted syntax for ffi doesn't make using them particularly easier, though
20:47:00FromDiscord<Chronos [She/Her]> In reply to @omentic "in general i think": Crabi?
20:47:09FromDiscord<JJ> In reply to @jviega "I do wonder what": whyTypeManyCharactersWhenFewDoTrick?
20:47:14FromDiscord<sOkam! 🫐> In reply to @jviega "I do wonder what": its not about the underscore, its about the lack of freedom
20:47:16FromDiscord<JJ> In reply to @chronos.vitaqua "Crabi?": oh it's so cool yeah
20:47:17FromDiscord<jviega> Clarity
20:48:01FromDiscord<jviega> Yeah, the fact that the underscore is barely tolerated and there are so many restrictions around them is funny.
20:48:03FromDiscord<sOkam! 🫐> if you write your LIB_LIKE_THIS_SCREAMING_AT_ME, i don't need to put up with it and i can write what I feel like fits my project better, even if screamcase fits your project better on your side
20:48:08FromDiscord<sOkam! 🫐> that freedom is invaluable
20:48:25FromDiscord<JJ> crabi is basically an attempt to make a universal abi for higher level programming languages than c while being backwards compatible with the c abi. it along with webassembly are some of the coolest things i've seen in the past few years
20:48:49FromDiscord<JJ> it solves a great deal of problems with ffi (some do remain, wasm is actually solving some others)
20:49:23FromDiscord<JJ> https://github.com/rust-lang/rfcs/pull/3470
20:50:11FromDiscord<jmgomez> the way Nim interfaces with other langs is pretty good. Especially in C++, one of the best out there
20:52:10FromDiscord<JJ> crabi solves the "you gotta meticulously reconstruct the target language's unstable abi to interop" problem. wasm solves a similar problem with modules (bit tired: there's a subtle distinction which is why both wasm and crabi are useful, i forget it though)
20:53:39FromDiscord<JJ> wasm also solves the incompatible garbage collectors problem. previously using garbage collected languages that are not both reference counting or both mark&sweep was an issue. and even when they shared the same model, passing graphs of live/dead objects across languages was super costly & bad.
20:54:45FromDiscord<JJ> there's a funky little thing wasm does where it has a primitive "ref" type to be tracked by a garbage collector built into the wasm runtime. anyway bit of a tangent sorry, nim ffi reminded me of crabi and subsequently wasm
20:55:42FromDiscord<toma400> Isn't there a flag for compiler that makes FFI stricter?
20:56:04FromDiscord<toma400> Or at least I remember something like that reading the book on Nim few days ago, but could've misunderstand the topic as well
20:56:28FromDiscord<toma400> (edit) "FFI" => "that "syntax agnostics""
20:56:34FromDiscord<toma400> (edit) "agnostics"" => "agnostic""
20:56:40FromDiscord<JJ> i think in the far, far, far future wasm will get javascript api access, which will let languages just target wasm and get web browser support for free, like nim. perhaps javascript will be removed in favour of just the wasm interpreter with api access even
20:57:22FromDiscord<JJ> In reply to @toma400 "Isn't there a flag": yeah. it ensures you have consistent style within your own codebase
20:57:36FromDiscord<Chronos [She/Her]> In reply to @omentic "crabi is basically an": Ah is this a Rust thing or
20:57:37FromDiscord<nnsee> In reply to @omentic "i think in the": god i fucking hope not
20:58:06FromDiscord<Chronos [She/Her]> Lol
20:58:22FromDiscord<JJ> style insensitivity was built so that you can use libraries written in snake_case with camelCase or vice versa, it never really was for inconsistent styles locally
20:58:57FromDiscord<JJ> In reply to @chronos.vitaqua "Ah is this a": nah, just run by the rust team. it'll likely be rust and swift that first implement it, then a good chance for nim
21:01:49FromDiscord<JJ> In reply to @nnsee "god i fucking hope": heh i think it'd be a good thing. wrt. inspectability minified javascript is already (much) harder to reverse engineer than wasm. wrt. efficiency jit javascript interpreters are kinda not worth it, edge just does an interpreter to almost no performance loss. wrt. security javascript sucks. wrt. javascript i don't like it, it'd be neat if all languages were equally supported on the web
21:06:16FromDiscord<Chronos [She/Her]> In reply to @omentic "nah, just run by": Ah
21:07:08FromDiscord<Chronos [She/Her]> What is a JS runtime ran on WASM rather than them both being side-by-side? :P
21:08:33FromDiscord<nnsee> sent a long message, see http://ix.io/4Hqr
21:10:24FromDiscord<JJ> yes, i've tried both. i pop wasm into ghidra and out pops pretty good pseudocode. for javascript, i'm pretty much reliant on a couple random websites for javascript deobfuscation and have had terrible luck with them.
21:10:31FromDiscord<nnsee> really?
21:10:34FromDiscord<nnsee> ghidra?
21:10:48FromDiscord<nnsee> the decompiler with notably NO wasm support?
21:11:07FromDiscord<JJ> yes. wasm support is currently languishing in a pr
21:11:13FromDiscord<nnsee> and I'm not counting the plugin that produces basically unreadable pseudocode
21:12:35FromDiscord<JJ> wrt. simplicity, i've yet to implement a wasm interpreter, but is it not much simpler than javascript? it's just an abstract stack machine. it's so simple the spec even auto generates implementations for you i think
21:12:45FromDiscord<nnsee> also, the fact of the matter is that you'd have to be spinning ghidra up for every single, simplest wasm binary you would want to inspect
21:13:01FromDiscord<nnsee> literally every single one
21:13:27FromDiscord<nnsee> even your `console.log("hello world")`s
21:13:41FromDiscord<Chronos [She/Her]> In reply to @omentic "wrt. simplicity, i've yet": Wasm3 is an interpreter btw
21:13:47FromDiscord<JJ> yeah, that's definitely a downside. deobfuscated javascript is easier for sure but the minification plague is endemic
21:15:15FromDiscord<JJ> oh yea another cool thing the wasm spec does is generate a formal proof of correctness, textual description, and reference interpreter all from the spec's dsl
21:21:14*arkanoid joined #nim
22:14:44*advesperacit quit ()
22:18:15FromDiscord<ranok> I'm really struggling with asyncjs. I am trying to call an async function defined in JS (using importjs to bring it into scope), and I cannot figure it out
22:50:44FromDiscord<System64 ~ Flandre Scarlet> Am I alone to see that??! https://media.discordapp.net/attachments/371759389889003532/1155999857346089020/image.png?ex=65136043&is=65120ec3&hm=afdf8948d620db12fe1f89f6a8ba12fdf518a70cfae7c107d2b87e3a9c647925&
22:56:27FromDiscord<Elegantbeef> No it's well known it's written in Nim
22:57:26FromDiscord<System64 ~ Flandre Scarlet> That's nice to see!
23:30:29FromDiscord<bhunao> how do i deal two imports having procs with the same name?
23:35:31FromDiscord<Elegantbeef> `myModule.myProc(...)`
23:35:35FromDiscord<Elegantbeef> or `import myModule except myProc`
23:43:49FromDiscord<bhunao> thanks