<< 13-01-2024 >>

00:00:04FromDiscord<Elegantbeef> But yes very much I concur that choosenim should work with arm both apple and non apple variants
00:02:19FromDiscord<Elegantbeef> I suppose one could develop it using qemu... hmmmm
00:03:28FromDiscord<Elegantbeef> Would be ideal to have real hardware though
00:03:38FromDiscord<Elegantbeef> Shame I cannot install postmarket on my phone 😄
00:04:08FromDiscord<ca_lobo_14153> In reply to @Elegantbeef "But yes very much": Humm... in the hunt for "how to install" info I ran across a tidbit that Adreas using a Mac Studio... so I know Nim works on Apple Silicon just not Choosenim... https://forum.nim-lang.org/t/7823 and that was from April 2021...
00:04:56FromDiscord<Elegantbeef> Yea choosenim was never absorbed into `nim-lang` so it's dissociated
00:05:04*advesperacit quit ()
00:07:05FromDiscord<Elegantbeef> I've gotta fire up a rpi OS image to see what the actual issue is with choosenim on arm
00:07:23FromDiscord<ca_lobo_14153> So does someone have write privilidges to choosenim?
00:07:49FromDiscord<Elegantbeef> Only dom that I know of and he left Nim for Mojo pastures or something like that
00:12:06FromDiscord<ca_lobo_14153> sent a code paste, see https://play.nim-lang.org/#ix=html>
00:13:59FromDiscord<ca_lobo_14153> apple silicon fails because there were no binaries to pull ... see line 127
00:14:41FromDiscord<ca_lobo_14153> (edit) "127" => "127.. where it says it pulls the intel binaries..."
00:15:41FromDiscord<Elegantbeef> What if you make it believe it supports arm at 42?
00:15:59FromDiscord<Phil (he/him)> Through the power of friendship?
00:19:25FromDiscord<Elegantbeef> Indeed
00:24:59FromDiscord<ca_lobo_14153> In reply to @Elegantbeef "What if you make": I didn't say that... I said that it correctly identifies the platform/OS combo... and on line 42, where there is no matching case statement - eg linux/arm64 it fails.. and exits at the end of the case statement/line 51 with unsupported error message. I really wish it was through the power of friendship... just thinking about it would fix it. 🙂
00:25:21FromDiscord<Elegantbeef> I mean that was my point do not error at that statement
00:36:11FromDiscord<ca_lobo_14153> Ok, I mis-read your original reply. Yes, that could work.. however, I believe there's two additional issues: the appropriate choosenim binaries isn't available, and 2) the nim binaries for the release don't appear to be available.... somone suggested that I grab the latest 2.0 branch binaries and manually install them... which gave me 1.6.x binaries... I gave up at this point and went back to attempting to bandaid patch the local
00:44:36*Batzy quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
00:56:04*dude10 joined #nim
01:04:59FromDiscord<Elegantbeef> Sounds like you did not fetch the right versions↵(@ca_lobo_14153)
01:07:31FromDiscord<Elegantbeef> Should be something like fetching the history of all `version-` branch history looking changes on https://github.com/nim-lang/Nim/blob/ade5295fd56f632fc6fbdcfef42b1bb827574be6/lib/system/compilation.nim#L1C1-L15
01:13:35FromDiscord<ca_lobo_14153> It's very possible that I could have not have fetched the right binaries or I mis-installed the binaries... and it goes to validate my point that an end user shouldn't have to do this by hand.
01:14:03dude10Did anyone try to directly interact with FFTW C++ library? {.compile: "/usr/include/fftw3.h".}
01:14:14dude10seems not enough
01:15:51FromDiscord<Elegantbeef> FFTW C++?
01:16:18dude10Yep, https://www.fftw.org/
01:16:29dude10it's fast fourier transform library written in C++
01:16:47FromDiscord<Elegantbeef> No it's written in C
01:17:12FromDiscord<Elegantbeef> > FFTW is a free collection of fast C routines
01:17:16FromDiscord<Elegantbeef> Atleast if their docs are to be trusted
01:17:22dude10oh I see. Sorry I didn't know that
01:18:43FromDiscord<Elegantbeef> `--passL: pkg-config --libs fftw3` if on linux will help
01:18:49FromDiscord<Elegantbeef> `pkg-config` is really the bees knees
01:20:01dude10Should I add that in the pragma line?
01:21:10dude10Oh got it, I found it on the manual
01:36:44*jkl quit (Quit: Gone.)
01:37:05*jkl joined #nim
01:54:40*azimut joined #nim
02:00:14*dude10 quit (Quit: leaving)
02:05:36*systemdsucks quit (Remote host closed the connection)
02:15:47*systemdsucks joined #nim
03:37:43*azimut quit (Ping timeout: 240 seconds)
04:37:54*azimut joined #nim
05:23:19*azimut quit (Ping timeout: 240 seconds)
05:24:27*azimut joined #nim
05:55:16*dude10 joined #nim
06:27:34*dude10 quit (Quit: leaving)
06:58:08*rockcavera quit (Remote host closed the connection)
07:09:50*rockcavera joined #nim
07:10:11FromDiscord<opensourcecult> how fast is jester / nim web development compared to fastapi(python) or rust or go .↵i am not finding any benchmarks ↵also how does nim web dev compare to crystal-lang?
07:13:02FromDiscord<opensourcecult> will nim ever support llvm ?
07:13:26FromDiscord<khazakar> In reply to @opensourcecult "will nim ever support": Nlvm
07:14:26FromDiscord<opensourcecult> In reply to @khazakar "Nlvm": you need to port your tools i guess to get it to work with nlvm
07:15:09FromDiscord<khazakar> In reply to @opensourcecult "you need to port": Not that much,check it on its GH project page 🙂
07:16:10FromDiscord<opensourcecult> In reply to @khazakar "Not that much,check it": if i write a tool in nlvm , can i import that tool in normal nim and use it like any other tool ? any benefits of doing such since on their gh , they say its faster than compiling it to c and then llvm
07:16:47FromDiscord<khazakar> In reply to @opensourcecult "if i write a": It should be compatible, they also touch this topic
07:17:01FromDiscord<khazakar> And for what you need direct LLVM? WASM?
07:17:47FromDiscord<opensourcecult> In reply to @khazakar "And for what you": i thought it was faster when doing it the nlvm way acc to their gh page
07:24:24FromDiscord<khazakar> In reply to @opensourcecult "i thought it was": That's also the case, but for start I wouldn't bother with compilation or runtime speed first
07:24:45FromDiscord<khazakar> Vanilla nim compiler is quite performant by itself, too 🙂
07:36:59*redj quit (Ping timeout: 260 seconds)
07:40:09*redj joined #nim
07:45:43*azimut quit (Ping timeout: 240 seconds)
08:00:04FromDiscord<nnsee> In reply to @opensourcecult "if i write a": nlvm is just an alternative compiler for the Nim language. The language is still the same. IIRC nlvm had some very slight quirks and didn't support something pretty niche but it's unlikely you'll run into that
08:00:25FromDiscord<Barry James> sent a long message, see <!doctype html>
08:00:44FromDiscord<nnsee> <@&371760044473319454>
08:23:41FromDiscord<bung8954> how to do `case iterable` when matched one , break it
08:24:27FromDiscord<Elegantbeef> What do you mean?
08:25:33FromDiscord<bung8954> like `case ['a','b'] of 'a': dosomething; break;`
08:26:20FromDiscord<Elegantbeef> Use fusion/matching or write your own macro
08:30:59FromDiscord<bung8954> okay
08:48:35*advesperacit joined #nim
09:08:20FromDiscord<bung8954> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:08:35FromDiscord<bung8954> `Error: expression expected, but found 'keyword of'`
09:09:28FromDiscord<bung8954> it's syntax error use of alone? how to fix this
09:09:46FromDiscord<bung8954> (edit) "of" => "`of`"
09:22:45FromDiscord<Phil> That... huh. Never ran into that
09:23:01FromDiscord<Phil> It's not allowing an of-block directly into untyped
09:23:10FromDiscord<Phil> Which seems odd since untyped accepts basically everything
09:25:53FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:27:12FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:27:22FromDiscord<Phil> It is specifically `of` that is running into issues with the compiler here.
09:29:39FromDiscord<bung8954> okay, thanks ! let me try.
09:50:53FromDiscord<Elegantbeef> You do not need that pointless wrapping macro
09:51:15FromDiscord<Elegantbeef> https://github.com/beef331/nimtrest/blob/master/staticcases.nim#L26 for example @bung8954
09:52:26FromDiscord<Elegantbeef> @Phil the reason that works is Nim allows `elif` `of` `else` `finally` `except` .... following macro calls
09:52:43FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=html>
09:54:59FromDiscord<bung8954> what's the difference make mine not work
09:55:29FromDiscord<Elegantbeef> You do not have have `varargs`
09:55:55FromDiscord<Elegantbeef> Plus you need `:` on the macro
09:56:47FromDiscord<Elegantbeef> Whoops you have `:` it's the indent
10:23:30FromDiscord<ezquerra> In reply to @dude10 "Did anyone try to": You could also use @arnetheduck 's nim-fftr instead (https://github.com/arnetheduck/nim-fftr)
10:34:45*Jjp137_ joined #nim
10:35:35*Jjp137 quit (Ping timeout: 276 seconds)
10:44:47*jmdaemon joined #nim
11:09:59FromDiscord<Phil (he/him)> GlobalDispatch is going to bring me to my grave
11:10:14FromDiscord<Phil (he/him)> I'm not even sure on which thread that damn memory is leaking and somehow it still does despite me calling destroy and nilling all of them
11:20:47*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
11:27:57FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
11:28:09FromDiscord<Phil> (edit)
11:28:47FromDiscord<Phil> (edit)
11:37:50FromDiscord<bung8954> In reply to @Elegantbeef "You do not have": OK, thanks! I'll try again
11:49:02*jmdaemon joined #nim
12:06:54FromDiscord<khazakar> is there a tutorial or guide which shows how to create local using nimble and atlas?
12:07:22FromDiscord<Phil> Nimble has its readme, atlas was underdocumented last time I checked
12:07:31FromDiscord<Phil> https://github.com/nim-lang/nimble#readme
12:07:52FromDiscord<Phil> I stand corrected:↵https://github.com/nim-lang/atlas/blob/master/doc/atlas.md
12:57:11FromDiscord<leorize> Phil\: you're destroying asyncdispatch global wrong
12:57:38FromDiscord<Phil> I am? I'm only aware of either nilling the variable or calling destroy on it
12:57:58FromDiscord<leorize> are you calling destroy on the variable then?
12:58:11FromDiscord<Phil> wait.... those two are not equivalent?
12:58:45FromDiscord<leorize> it surprises me that it even compiled tbh
12:58:48FromDiscord<Phil> Fetching the ref variable via getGlobalDispatcher should reduce the ref-count, that variable falling out of scope should reduce the ref-count again, leading to collection
13:00:22FromDiscord<leorize> use gc\_unref if that's what you want
13:01:55FromDiscord<Phil> I mean fundamentally I just want that dispatcher to get free'd
13:02:06FromDiscord<Phil> Because it leaks according to my valgrind outputs
13:02:31FromDiscord<Phil> And so far it's proven resilient, currently running `GC_unref(getGlobalDispatcher())` to see if that frees
13:02:37FromDiscord<Phil> or rather stops the leak
13:02:55FromDiscord<Phil> Ah, this is under orc for reference
13:03:56FromDiscord<leorize> you can't assume that refcounts work the way you want with orc \:p
13:04:39FromDiscord<leorize> you're reaching in to nil everywhere else, better just do it for this as well
13:04:59FromDiscord<Phil> Basically nil the dispatcher and hope for the best? So far that was leaking as well ^^'
13:06:14FromDiscord<leorize> you got a trace then?
13:06:24FromDiscord<Phil> Yeah, currently running it again, one sec
13:09:46FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
13:09:56FromDiscord<Phil> The trace https://media.discordapp.net/attachments/371759389889003532/1195716360483901471/message.txt?ex=65b500a3&is=65a28ba3&hm=b65f4291423fcccdcca7d01605c1597073806f139cd4cd8c497ceddcbb7e6b0a&
13:11:25FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
13:12:28FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=html>
13:12:32FromDiscord<leorize> btw you only need to passC for the FP flags
13:12:57FromDiscord<Phil> I'll keep it in mind and reduce some of my CI code with that
13:13:56FromDiscord<leorize> you're leaking via system.roots
13:14:09FromDiscord<Phil> ... but I call GC_full_collect on system.roots
13:14:27FromDiscord<Phil> Wait, that's behind a when flag
13:14:34FromDiscord<Phil> Maybe... short experiment
13:15:08FromDiscord<Phil> 🤦
13:15:16FromDiscord<leorize> you'll notice that your code doesn't even compile
13:15:17FromDiscord<Phil> Okay, when defined(orc) is not a valid way to check for the GC style
13:15:28FromDiscord<leorize> it's gcOrc btw
13:16:16FromDiscord<Phil> Yeah, that no longer compiles, I read the docs on that in the meantime and it does not take params
13:16:48FromDiscord<Phil> Okay so to "free system.roots" I only call GC_fullcollect? Don't I still need to deinit roots?
13:16:55FromDiscord<leorize> yea
13:17:06FromDiscord<Phil> Yeah to which of these two?
13:17:21FromDiscord<leorize> if you read the code in orc.nim you'll see that it does a lot
13:17:41FromDiscord<leorize> including deinit roots at the end
13:17:59FromDiscord<Phil> Ahhh check
13:18:11FromDiscord<Phil> Okay, try again, let's see if the balls become green
13:18:25FromDiscord<Phil> I also need to find a way to make this faster, this test file runs ridiculously slow
13:19:00FromDiscord<Phil> Like one run takes 3 minutes and this should just be a simple call to createThread with the second thread now running in a while-loop
13:19:19FromDiscord<Phil> And then exchanging around 4 messages in string form total
13:19:40FromDiscord<leorize> also your leak reason was a bit sneaky, but was in the traces anyways\: decRef -\> registerCycle -\> init cellseq
13:19:54FromDiscord<leorize> might be worth it to remember that pattern
13:20:05FromDiscord<Phil> Basically if I see registerCycle/cellSeq, assume the leak is system.roots?
13:20:35FromDiscord<leorize> pretty much, if you read registerCycle code
13:20:51FromDiscord<Phil> memcheck ball is green!+
13:21:03FromDiscord<Phil> That means the basics of Threadbutler are memory leak safe, yay for that
13:21:16FromDiscord<leorize> memcheck is really slow, yea
13:21:47FromDiscord<leorize> that's why I like asan more \:p
13:22:01FromDiscord<Phil> Same so far
13:22:23FromDiscord<Phil> sanitizers have brought me a bit closer to not finding it as scary thankfully
13:22:33FromDiscord<Phil> Still can't do anything with the memory map it gives you under some circumstances
13:22:54FromDiscord<Phil> But now I at least understand what I should have a stacktrace and that is the holy grail for debugging
13:23:40FromDiscord<leorize> if you get a memory map it's usually memory corruption \:p
13:23:44FromDiscord<Phil> Helgrind not being much faster though xD
13:25:09FromDiscord<Phil> I really like how easy it is to plonk balls into whatever codebase you have and use it
13:25:30FromDiscord<Phil> The fact memcheck and helgrind take about a year to compute even my simplest examples grates a bit
13:25:47FromDiscord<Phil> But half the time so far that was because of some other silly thing I did
13:26:24FromDiscord<Phil> The fact helgrind has been running the equivalent of around 400-500 lines of non-recursive code for 5 minutes now is hurting though
13:28:59NimEventerNew Nimble package! dnsdisc - Nim discovery library supporting EIP-1459, see https://github.com/status-im/nim-dnsdisc
13:59:00*jmdaemon quit (Ping timeout: 252 seconds)
14:26:07*azimut joined #nim
14:38:56*krux02 joined #nim
15:06:31*wheatengineer joined #nim
15:08:43*wheatengineer quit (Client Quit)
15:22:55*azimut quit (Ping timeout: 240 seconds)
16:27:28*xet7 quit (Remote host closed the connection)
17:19:16*xet7 joined #nim
18:00:56*azimut joined #nim
18:05:14FromDiscord<pengwyns> Who's responsible for the nim-lang.org domain nowadays?
18:38:27FromDiscord<khazakar> Em, Araq?
18:39:44NimEventerNew thread by nasl: Swift, Godot and c/c++ interop, see https://forum.nim-lang.org/t/10870
18:42:52FromDiscord<nnsee> In reply to @pengwyns "Who's responsible for the": why?
18:43:07FromDiscord<pengwyns> https://github.com/nim-lang/nimforum/issues/360
18:43:53FromDiscord<pengwyns> Although you might have to read the linked issue for more context.
18:44:56FromDiscord<nnsee> fair enough
18:45:25FromDiscord<nnsee> ping @Impostor, Dom isn't involved in Nim these days
18:45:43FromDiscord<nnsee> (edit) "@Impostor," => "@_araq,"
18:46:47FromDiscord<nnsee> I'm actually not sure who manages `lists`
19:04:12*tinytoast quit (Remote host closed the connection)
19:04:22*tinystoat joined #nim
20:01:15NimEventerNew thread by stbalbach: unhandled exception: index -1 not in 0 .. 12 [IndexDefect], see https://forum.nim-lang.org/t/10871
20:37:44*arkanoid quit (Ping timeout: 252 seconds)
20:41:20FromDiscord<raul8244> what is nims best use case ? i really want to start a project in nim to learn and explore the language because the concept seems pretty nice but in what area does it shine brightest, i am a little out of ideas for this and i wanted some coments on it
20:49:10FromDiscord<tapeda> In reply to @raul8244 "what is nims best": @leorize General purpose, but like it's also just really good fun to play with github/treeform/pixie to start. An actual anwser though is probably that Nim templates/macros shine for making ergonomic DSL's that can manage abstraction leakage from the hardware up
20:49:58FromDiscord<pengwyns> There are some areas where the ecosystem could be improved such as web and graphical but I'd say that Nim already shines in a lot of use-cases, so just go with whatever random project idea you have! Nim will most likely be good at it.
20:51:04*Onionhammer quit (Ping timeout: 276 seconds)
20:55:15FromDiscord<raul8244> In reply to @tapeda "@leorize General purpose, but": pixie seems very nice, i think i going to give it a go and see what i get out of it
20:59:11*Onionhammer joined #nim
21:05:36FromDiscord<ambient3332> Fast, ergonomic, GC language that's very easy to integrate with C or C++. I can't really come up with much competitors. 🤔 https://media.discordapp.net/attachments/371759389889003532/1195836066385645708/image.png?ex=65b5701f&is=65a2fb1f&hm=f9a45644692028ee95ec6f50271cb3b4f645593a2db239c7ec9a370ba0f86d5e&
21:06:18FromDiscord<ambient3332> (edit) "much" => "many"
21:07:14FromDiscord<ambient3332> Go is very integration hostile, it's more of its own ecosystem. Zig has much more memory fiddling and the language syntax looks uglier (IHMO). Rust is just completely different development experience, very poor for exploratory programming.
21:08:04FromDiscord<ambient3332> Of course there are billion programming languages but counting the ones that have some form of ecosystem.
21:09:13FromDiscord<raul8244> In reply to @ambient3332 "Go is very integration": thats is pretty much the reason i got interested in it
21:12:16FromDiscord<ambient3332> For example I felt like writing a synth from scratch and it was pretty easy, outside finding good/working libraries https://github.com/amb/nim-synth
21:12:32FromDiscord<ambient3332> Pretty much fast as Python, but the code is multiple orders of magnitude faster
21:12:51FromDiscord<ambient3332> (edit) "fast" => "easy"
21:42:33FromDiscord<sOkam! 🫐> In reply to @raul8244 "what is nims best": anything that requires big amounts of quick prototyping
21:44:28FromDiscord<sOkam! 🫐> 1. the most "flashy" thing about nim is metaprogramming↵2. the truly most "powerful" thing about nim, on a normal person day-to-day basis, is blazing fast prototyping↵↵you won't get many recommendations of the latter because its not flashy and not noticeable unless you compare it side to side with another language where you invested the same amount of effort into learning. but that is truly the most powerful thing about nim, by
21:54:24FromDiscord<Phil> I think the one thing that's super dope but you just hasn't seen wide spread implementation is a DSL for GUI frameworks
21:54:47FromDiscord<Phil> GTK has something similar already with its builder API where you can build a bunch of widgets via an XML file in a declarative way.
21:55:09FromDiscord<Phil> But with nim you can do that in source code and combine it with logic immediately. You don't need to first declare stuff and then attach logic to it like you do with builder
21:55:23FromDiscord<Phil> You have thus far better locality of behaviour
21:55:51FromDiscord<Phil> Owlkettle really opened my eyes to what Araq means when he says "DSL for GUI frameworks"
21:56:14FromDiscord<Phil> Being able to declaratively display your Widget tree together with the logic associated to it is just so damn readable
22:09:59entikanmuhahehe my nim-panda3d journey is picking up speed. I ported my procedural modelling tools and character controller from python to nim and it works like a charm (and fast wow) :D
22:50:10FromDiscord<.e.l.i> has anyone tried nim with htmx and some templating lib?
22:53:56FromDiscord<.e.l.i> it's easy with go and the inbuilt html templating, but was wondering what's equivalent in nim
23:09:00FromDiscord<hotdog6666> In reply to @.e.l.i "it's easy with go": https://github.com/ajusa/dekao seems to be a popular lib for this, people use it with htmx iirc
23:09:56FromDiscord<.e.l.i> In reply to @hotdog6666 "https://github.com/ajusa/dekao seems to be": thanks