<< 08-03-2025 >>

00:04:29FromDiscord<Elegantbeef> @aintea I imagine it's less about maturity and just more that people already have a preferred system language and a preferred even higher level language(Go/C#/Kotlin)
00:05:25FromDiscord<Elegantbeef> Like even Rust has problems getting into established doors
00:15:06*sadomei quit (Quit: sadomei)
00:18:17*shrewd joined #nim
00:19:22*shrewd quit (Changing host)
00:19:22*shrewd joined #nim
00:23:02FromDiscord<heysokam> sent a long message, see https://pasty.ee/ncEJqsHF
00:24:31FromDiscord<heysokam> Also, framing the question with "is too immature", for a 15y/o lang... is giving me strong "loaded question" vibes
00:27:56FromDiscord<Elegantbeef> Hey Nim is able to drink in its home country
00:28:29FromDiscord<zumi.dxy> In reply to @heysokam "Also, framing the question": tbf Rust has this lobbed at it too↵it's almost as old as Nim↵but wayyyyy more popular↵it (the users that is) want to kill C for this
00:29:07FromDiscord<zumi.dxy> what one calls "immature" others call "organic" (see php)
00:31:52FromDiscord<heysokam> My point is that you usually hear "Right tool for the right job", and that's fine for personal projects↵But, when it comes to business success... its more about:↵"Right people for the right team, and choose the tool that those people can use and/or learn better"
00:32:26FromDiscord<Elegantbeef> Surely you can hire a team of Nim programmers! 😄
00:35:02FromDiscord<zumi.dxy> too bad they're all at status 😏
00:35:17FromDiscord<Elegantbeef> Hey code tracer has Nim developers
00:35:32FromDiscord<zumi.dxy> (treeform still works at reddit, right?)
00:36:18FromDiscord<Elegantbeef> No clue would have to ask him yourself
00:51:16FromDiscord<System64 ~ Flandre Scarlet> In reply to @zumi.dxy "what one calls "immature"": php is a mistake...
02:30:18FromDiscord<saemideluxe> Definitely mature enough. I am using it in my company for client projects. There might a bit less packages available than in other eco-systems, but average quality of the existing ones feel higher than e.g. in Python or JS.↵Also, a language where I can upgrade all code in my projects to version 2 of the language in the blink of an eye, has a level of maturity that I find really impressive. But I also a Python2/3 transition survivor,
02:31:57FromDiscord<Elegantbeef> "Surviving Python 2" has to be a book somewhere
02:34:43FromDiscord<saemideluxe> In regards to hiring: Yeah, finding "Nim" devs might be hard. But a decent developer can get quickly into Nim and become productive I would say. So, as others have pointed out, it then becomes a point of preference or "culture-match"...
02:37:36FromDiscord<Elegantbeef> Yea aside from the things noobs shouldn't touch it's a very accessible language
03:25:11*rockcavera joined #nim
04:43:01*tiorock joined #nim
04:43:01*rockcavera is now known as Guest9561
04:43:01*tiorock is now known as rockcavera
04:45:10*tiorock joined #nim
04:45:10*tiorock quit (Changing host)
04:45:10*tiorock joined #nim
04:45:10*rockcavera quit (Killed (tantalum.libera.chat (Nickname regained by services)))
04:45:10*tiorock is now known as rockcavera
04:46:34*Guest9561 quit (Ping timeout: 244 seconds)
06:21:09*coldfeet joined #nim
06:28:20*tiorock joined #nim
06:28:20*tiorock quit (Changing host)
06:28:20*tiorock joined #nim
06:28:20*rockcavera is now known as Guest1182
06:28:20*Guest1182 quit (Killed (osmium.libera.chat (Nickname regained by services)))
06:28:20*tiorock is now known as rockcavera
06:30:24*tiorock joined #nim
06:30:24*tiorock quit (Changing host)
06:30:24*tiorock joined #nim
06:30:24*rockcavera quit (Killed (tungsten.libera.chat (Nickname regained by services)))
06:30:24*tiorock is now known as rockcavera
06:36:28FromDiscord<abraham> I would 2000% take a pay cut to write Nim code for a living.
06:43:56FromDiscord<odexine> What if that pay cut were 100%
06:51:19*SchweinDeBurg quit (Quit: WeeChat 4.6.0-dev)
06:51:45*SchweinDeBurg joined #nim
06:53:20*ntat joined #nim
07:19:01*GnuYawk6733 quit (Quit: The Lounge - https://thelounge.chat)
07:19:29*GnuYawk6733 joined #nim
07:49:27*MauGal joined #nim
08:10:06FromDiscord<rakgew> sent a code paste, see https://play.nim-lang.org/#pasty=bYmvXUGk
08:12:31*ntat_ joined #nim
08:12:59*ntat quit (Remote host closed the connection)
08:14:49FromDiscord<rakgew> nvm found parseEnum from strutils
08:15:32*mahlon quit (Ping timeout: 272 seconds)
08:15:53*ntat_ is now known as ntat
08:21:45*derpydoo joined #nim
08:27:15FromDiscord<lainlaylie> that gets you `sk` from "skim" though, which is the opposite of what you want
08:45:32FromDiscord<aintea> In reply to @heysokam "Business tech choices are": That's a really good answer, thanks for taking your time to write this
08:45:52FromDiscord<aintea> It explains the problem really good
08:46:21FromDiscord<aintea> Btw are there topics in which Nim doesn't have a lot of library to choose from ?
08:46:56FromDiscord<aintea> And second question: since Nim can transpile to JavaScript, can it interoperate with JavaScript libraries ?
09:10:45*MauGal quit (Ping timeout: 248 seconds)
09:20:01Amun-Rasure, if you write proper declarations
09:20:43Amun-Ranim has to know what to call and with what arguments first
09:25:20FromDiscord<rakgew> right, but when reversing the enum key/vals and asking with `.symbolName` from std/enumutils I get "skim" for "sk".↵(@lainlaylie)
09:27:49FromDiscord<rakgew> but probably there are better ways to o string to string lookup tables. I was just curious if I could do it via an enum (instead of tables (via hashing)). but probably the parseEnum is not more efficient than just a plain old table[string, string]
09:32:18*coldfeet quit (Quit: Lost terminal)
10:09:59FromDiscord<rakgew> hm interesting, so `parseEnum` actually uses the macro `genEnumCaseStmt`
10:18:56*mahlon joined #nim
10:19:32*tiorock joined #nim
10:19:32*rockcavera quit (Killed (iridium.libera.chat (Nickname regained by services)))
10:19:32*tiorock is now known as rockcavera
10:21:13ehmry.tokyovigilante: that wayland codegenerator is hell to read so I'm curious if you can do something useful with it
10:43:29FromDiscord<odexine> In reply to @rakgew "right, but when reversing": Yes, you can get the string from the enum just by using the to string operator $
10:55:11FromDiscord<rakgew> looking at performance and readability, for a string-to-string lookup, which would you think is be a better idea?↵● use a lookup into a regular tables↵● use an enum-indexed array with access via parseEnum↵● use a function with case statement that simply lists the mappings one by one
11:20:02*derpydoo quit (Ping timeout: 252 seconds)
13:40:01*nyeaa49284230101 quit (Quit: The Lounge - https://thelounge.chat)
13:42:47*nyeaa49284230101 joined #nim
13:49:28FromDiscord<lainlaylie> given that parseEnum uses a case statement anyway and applies ident normalization to the input string, option 3 is better than option 2↵as for option 1 vs option 3, it would probably depend on how many mappings there are
13:49:57FromDiscord<lainlaylie> there's also std/strtabs
13:59:01FromDiscord<luteva> If you need pivot operations on your data: I just released nivot - a pivot library for nim.↵https://github.com/Luteva-ssh/nivot↵Maybe this can help 🙂
15:06:22FromDiscord<rakgew> huh - strtabs? never heard of it - sounds like a perfect fit!↵thank you so much!!↵(@lainlaylie)
15:30:27*shrewd quit (Remote host closed the connection)
15:30:48*shrewd joined #nim
15:37:40FromDiscord<madonuko> anything similar to rust `chumsky`
15:37:56FromDiscord<madonuko> trying to make a parser for a config format
15:38:09FromDiscord<madonuko> might use `lilt` if no other options
16:13:36FromDiscord<madonuko> nvm lilt is basically unusable with modern nim
16:16:03FromDiscord<madonuko> I'll just use pegs then
17:12:04*scmutalisk joined #nim
17:13:45*ntat quit (Quit: Leaving)
17:16:06*ntat joined #nim
17:35:50FromDiscord<madonuko> holy smoke npeg is probably what I want after all
18:15:27*tiorock joined #nim
18:15:27*tiorock quit (Changing host)
18:15:27*tiorock joined #nim
18:15:27*rockcavera is now known as Guest9820
18:15:27*Guest9820 quit (Killed (erbium.libera.chat (Nickname regained by services)))
18:15:27*tiorock is now known as rockcavera
18:17:35*tiorock joined #nim
18:17:35*tiorock quit (Changing host)
18:17:35*tiorock joined #nim
18:17:35*rockcavera is now known as Guest5263
18:17:35*tiorock is now known as rockcavera
18:20:50*Guest5263 quit (Ping timeout: 260 seconds)
18:42:44*jjido joined #nim
19:47:18tokyovigilanteehmry: thanks, it was more helpful for giving me the push to write my own codegen, which was actually pretty straightforward. I'd already hand-written a few Nim translations of the xdg-shell header (I'm using the C libwayland-client lib and compiling in the generated C private-code) so it's actually been pretty easy to patch wayland-scanner to rewrite the header into a nim objcet
19:47:23tokyovigilante*object
19:55:32tokyovigilantefor example here's the output for the xdg_popup_listener struct: https://play.nim-lang.org/#pasty=cQQVoPTd
19:55:47tokyovigilanteWill share the code once I'm done
21:52:31*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
22:06:04*ntat quit (Quit: Leaving)
22:17:57*thunder quit (Killed (NickServ (GHOST command used by metasintactic)))
22:17:57*metasintactic joined #nim
22:23:23*thunder joined #nim
22:27:12*metasintactic quit (Ping timeout: 264 seconds)
23:28:46*shrewd quit (Quit: shrewd)
23:29:41*shrewd joined #nim
23:39:23FromDiscord<System64 ~ Flandre Scarlet> About JS↵Is it possible to use JS as a scripting language for a native app like Lua?↵And would it even be better than Lua?
23:40:22FromDiscord<leorize> you can, most JS engines are made to be embedded
23:41:15FromDiscord<System64 ~ Flandre Scarlet> In reply to @leorize "you can, most JS": And is it more performant than Lua?
23:41:30FromDiscord<leorize> it depends™
23:41:31FromDiscord<Robyn [She/Her]> In reply to @sys64 "About JS Is it": Yes possible (Duktape, and a few others), even better depends on what you're looking for
23:42:11FromDiscord<Elegantbeef> If you really want performance time to use dynamic libraries 😄
23:42:35FromDiscord<leorize> performance will almost always come from native code
23:42:39FromDiscord<Robyn [She/Her]> In reply to @sys64 "And is it more": yeah what Leorize said, if you wanna embed V8, say goodbye to portability and small sizes, if you wanna embed something like Duktape, won't be as good as V8 but it probably won't be bad compared to Lua
23:43:01FromDiscord<Elegantbeef> Though the issue is with native code it's not portable and a security nightmare
23:43:16FromDiscord<Elegantbeef> Pledge on linux when? 😄
23:43:19FromDiscord<leorize> native code here might just be syscalls \:p
23:43:29FromDiscord<leorize> I mean, call to application
23:43:36FromDiscord<System64 ~ Flandre Scarlet> In reply to @battery.acid.bubblegum "yeah what Leorize said,": It's for my modular synth↵I try to implement a module that you can script
23:43:52FromDiscord<Robyn [She/Her]> Doesn't it compile to WASM? Or is it all server side?
23:44:04FromDiscord<System64 ~ Flandre Scarlet> It's a native app
23:44:09FromDiscord<Robyn [She/Her]> Oh crap yeah
23:44:43FromDiscord<System64 ~ Flandre Scarlet> But Lua is probably more standard for scripting
23:45:10FromDiscord<Robyn [She/Her]> https://gist.github.com/guest271314/bd292fc33e1b30dede0643a283fadc6a I recommend taking a look
23:46:00FromDiscord<leorize> I don't think performance matters that much in this case
23:46:01FromDiscord<leorize> you want something people actually want to write code with
23:46:11FromDiscord<Robyn [She/Her]> In reply to @sys64 "But Lua is probably": Probably due to the low barrier of entry for non-programmers in game dev (as an example), and easy to embed into an application
23:46:13FromDiscord<Elegantbeef> Just embed a scripting language and go to town, if you hit a performance issue see what's causing it then attempt to pivot
23:46:25FromDiscord<Robyn [She/Her]> Imo, Lua sucks compared to the beauty of Nim :P
23:46:26FromDiscord<leorize> lua is more popular thanks to it extremely simple design
23:46:33FromDiscord<leorize> JS is a very big language
23:46:51FromDiscord<Robyn [She/Her]> The slimmed down runtimes are generally fine I believe
23:47:11FromDiscord<leorize> I'm talking about features
23:47:25FromDiscord<leorize> the JS language itself is big
23:47:32FromDiscord<Robyn [She/Her]> Ah yeah that makes sense
23:48:02FromDiscord<leorize> meanwhile lua has like, 5 data types that's used for everything
23:48:15FromDiscord<System64 ~ Flandre Scarlet> In reply to @leorize "JS is a very": JS is GOOFY
23:48:36FromDiscord<System64 ~ Flandre Scarlet> And I've heard that Lua maps closely to C, hence the performances
23:48:49FromDiscord<leorize> not really
23:49:02FromDiscord<leorize> the reference interpreter is fast but not that fast
23:49:18FromDiscord<System64 ~ Flandre Scarlet> However LuaJIT is
23:49:40FromDiscord<Elegantbeef> Well JITs can be fast
23:49:49FromDiscord<leorize> lua power is mostly in `userdata`
23:50:40FromDiscord<Robyn [She/Her]> MicroPython baybeee: https://github.com/micropython/micropython/blob/master/examples/embedding/README.md
23:50:41FromDiscord<leorize> they have a basic primitive to hook in extra features from C side
23:50:47FromDiscord<Elegantbeef> No
23:50:58FromDiscord<Elegantbeef> Bad robyn
23:51:09FromDiscord<Robyn [She/Her]> But whyyyy
23:51:31FromDiscord<Elegantbeef> Cause the amount of "I'm limited in space cause I used micropython to program an embedded device" is too much
23:51:49FromDiscord<leorize> micropython focus is to be used in MCUs
23:51:50FromDiscord<Elegantbeef> It's also not fast
23:52:00FromDiscord<leorize> not to actually embed into a program as an interpreter
23:52:14FromDiscord<leorize> cpython is what you use if you want that
23:52:26FromDiscord<leorize> (and obviously, it's not fast)
23:53:02FromDiscord<Elegantbeef> Just ship nlvm and build wasm modules
23:53:02FromDiscord<Elegantbeef> How hard could it be
23:53:18FromDiscord<Elegantbeef> there are no windows builds of nlvm the last I checked
23:53:41FromDiscord<leorize> use wasm to run a mini Linux vm
23:53:44FromDiscord<leorize> then run nlvm on it
23:53:45FromDiscord<leorize> easy
23:53:51FromDiscord<Elegantbeef> Lol
23:54:21FromDiscord<Elegantbeef> Multiple layers of VMs really gets the performance flowing
23:54:55FromDiscord<leorize> you're just paying upfront with compile time
23:58:10FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Cause the amount of": well this isn't an embedded device, is it? :P
23:58:30FromDiscord<Elegantbeef> Blocked