<< 15-04-2025 >>

00:16:21*xtr00 quit (Ping timeout: 248 seconds)
00:18:36*xtr00 joined #nim
00:42:38*amadaluzia quit (Quit: Hi, this is Paul Allen. I'm being called away to London for a few days. Meredith, I'll call you when I get back. Hasta la vista, baby.)
01:27:40*dza4 joined #nim
01:27:50*def-- joined #nim
01:28:15*zgasma_ joined #nim
01:34:36*zgasma quit (*.net *.split)
01:34:37*ursa-major quit (*.net *.split)
01:34:37*kasimir_ quit (*.net *.split)
01:34:38*gshumway quit (*.net *.split)
01:34:38*dza quit (*.net *.split)
01:34:38*dv^_^ quit (*.net *.split)
01:34:38*def- quit (*.net *.split)
01:34:38*khazakar quit (*.net *.split)
01:34:45*def-- is now known as def-
01:38:15*amadaluzia joined #nim
01:42:03*khazakar joined #nim
01:46:33*gshumway_ joined #nim
02:11:25*ursa-major joined #nim
02:11:25*kasimir_ joined #nim
02:11:25*dv^_^ joined #nim
02:12:53*twistedspine joined #nim
02:16:37*beholders_eye quit (Ping timeout: 252 seconds)
02:17:43*twistedspine quit (Changing host)
02:17:44*twistedspine joined #nim
02:27:58*amadaluzia quit (Ping timeout: 244 seconds)
02:30:16*amadaluzia joined #nim
02:59:33*twistedspine quit (Quit: Client closed)
03:04:21*twistedspine joined #nim
03:04:21*twistedspine quit (Changing host)
03:04:21*twistedspine joined #nim
03:15:31*twistedspine quit (Read error: Connection reset by peer)
04:21:35*dza4 is now known as dza
04:23:33*tokyovigilante quit (Read error: Connection reset by peer)
04:23:48*tokyovigilante joined #nim
04:25:43FromDiscord<heysokam> In reply to @albassort "maybe i can make": I believe nph is non-configurable by design
04:25:57FromDiscord<albassort> In reply to @heysokam "I believe nph is": :|
04:26:07FromDiscord<albassort> commandism
04:26:13FromDiscord<Elegantbeef> Correct
04:26:25FromDiscord<heysokam> standarization has a prize
04:26:29FromDiscord<heysokam> price
04:26:42FromDiscord<albassort> but our formatting is non standard
04:26:56FromDiscord<heysokam> tell that to nph 🤷‍♂️
04:26:56FromDiscord<albassort> nobody here likes standard formatting
04:27:13FromDiscord<albassort> im on my open source forking arc
04:27:44FromDiscord<heysokam> 😄
04:29:02FromDiscord<Elegantbeef> Resistance is futile your uniqueness will be absorbed into the collective
04:29:35FromDiscord<Elegantbeef> Shit it's distinctiveness
04:29:48FromDiscord<heysokam> Prepare for imminent assimilation. Your codebase belong to us.
04:29:55FromDiscord<Elegantbeef> Good thing I don't proclaim to be a trekker
04:36:36FromDiscord<Laylie> i am interested in a configurable fork of nph
04:37:00FromDiscord<Laylie> i can't stand the way it changes my perfect proc param separator semicolons into commas
04:38:13FromDiscord<albassort> In reply to @Laylie "i am interested in": this is on my todo list now
04:48:18*ntat joined #nim
04:57:02FromDiscord<Elegantbeef> Squint and the issue goes away
04:57:22FromDiscord<zumi.dxy> yeah i just edit nph and make it 60 chars max
04:57:35FromDiscord<zumi.dxy> i do not have a 5:1 monitor↵thank you
04:57:51FromDiscord<zumi.dxy> or multimonitor
04:57:58FromDiscord<zumi.dxy> or the space to install them
04:59:26FromDiscord<Robyn [She/Her]> In reply to @albassort "this is on my": could use the editorconfig format
05:36:29FromDiscord<Laylie> the yaml people could learn a thing or two from the editorconfig spec↵https://spec.editorconfig.org/
05:45:40*amadaluzia quit (Ping timeout: 268 seconds)
05:50:02*coldfeet joined #nim
06:08:10FromDiscord<albassort> In reply to @battery.acid.bubblegum "could use the editorconfig": hmm
06:08:40FromDiscord<albassort> In reply to @Laylie "the yaml people could": HMM
06:08:48FromDiscord<albassort> i need this in rfc format too fnacy
06:08:59FromDiscord<albassort> (edit) "fnacy" => "fancy too implement"
06:09:05FromDiscord<albassort> (edit) "too" => "to"
06:10:29*ntat quit (Quit: leaving)
06:15:10FromDiscord<albassort> In reply to @battery.acid.bubblegum "could use the editorconfig": `it seems this is a very general format and doesn't contain any language specific features
06:32:36FromDiscord<Laylie> looks like it's normal to define custom language-specific properties
06:32:41FromDiscord<Laylie> https://www.jetbrains.com/help/resharper/EditorConfig_Index.html
06:51:25FromDiscord<flyx> the last major YAML release was 2009, before editorconfig started. pretty sure it’s the other way round and editorconfig learned from YAML. I met one of YAML’s authors and basically they would like to do an update but it’s not realistic considering how libs aren’t updated (PyYAML is still on YAML 1.1). so it’ll probably be eternally stuck at what it is today.
06:51:54FromDiscord<Laylie> i don't doubt it
06:52:03FromDiscord<Laylie> i was mainly praising editorconfig's simplicity
06:53:51FromDiscord<leorize> isn't this just slightly extended `ini`?
06:54:28FromDiscord<Laylie> i see it as a well-defined ini with ease of parsing as a goal
06:54:31FromDiscord<flyx> it’s ini with file globs
06:55:02FromDiscord<flyx> pretty good for what it should do
06:55:40FromDiscord<nnsee> > no inline comments
06:55:44FromDiscord<nnsee> immediately lost interest
06:55:54FromDiscord<leorize> use toml if you want that
06:55:59FromDiscord<nnsee> i do ;)
06:56:05FromDiscord<leorize> ini should never have inline comments due to string ambiguity
06:56:43FromDiscord<leorize> on Linux there's an another well-defined ini format that's employed in many complex situation\: https://www.freedesktop.org/software/systemd/man/latest/systemd.syntax.html
07:42:45FromDiscord<albassort> i really do not like nph as a codebase
07:43:03FromDiscord<albassort> i cants say why but it gives me bad vibes
07:43:13FromDiscord<albassort> vibes based engineering
08:02:46*kenran joined #nim
08:08:21*coldfeet quit (Quit: Lost terminal)
08:18:18*ntat joined #nim
08:25:04*kenran quit (Remote host closed the connection)
08:27:21*kenran joined #nim
08:41:47*beholders_eye joined #nim
09:05:23*ntat quit (Quit: leaving)
09:14:07*beholders_eye quit (Ping timeout: 252 seconds)
09:49:09*ntat joined #nim
10:02:35*coldfeet joined #nim
10:02:42*johuck quit (Write error: Connection reset by peer)
10:02:51*johuck joined #nim
11:21:42*ntat quit (Read error: Connection reset by peer)
11:27:44*beholders_eye joined #nim
11:45:58*ntat joined #nim
11:53:26FromDiscord<ywazme_> hi, can someone explain customizable memory management ? it is written in the presentation of the language but i barely understand it
11:53:34*ntat quit (Quit: leaving)
11:57:36*coldfeet quit (Quit: leaving)
12:02:22*coldfeet joined #nim
12:07:56*beholders_eye quit (Ping timeout: 252 seconds)
12:09:37*xtr00 quit (Read error: Connection reset by peer)
12:15:37*xtr00 joined #nim
12:30:41*kenran quit (Remote host closed the connection)
12:37:48FromDiscord<janakali> sent a long message, see https://pasty.ee/BvYWDlDq
12:38:44FromDiscord<janakali> (edit) "https://pasty.ee/xdlvgIZF" => "https://pasty.ee/KZYofgSU"
12:44:19*jinn6 joined #nim
12:44:54*beholders_eye joined #nim
12:45:48jinn6hello, is there a way to detect the current compilation target language, and enable/disable parts of code based on that? I couldn't find any info about that?
12:50:20jinn6ideally allowing me to have single file for all the targets
12:52:13FromDiscord<ywazme_> In reply to @janakali "<@1329929027120660654> https://nim-lang.org/docs/mm": thx, what do you mean exactly by cycles
12:53:07FromDiscord<nnsee> references going object1 -> object2 -> object1
12:54:09FromDiscord<janakali> sent a code paste, see https://play.nim-lang.org/#pasty=ULURIEhE
13:02:54FromDiscord<pmunch> In reply to @jinn6 "hello, is there a": https://play.nim-lang.org/#pasty=yINPeHyt
13:03:15FromDiscord<pmunch> Not 100% sure about the JavaScript one, might be `when defined(javascript)`
13:04:11FromDiscord<pmunch> Hmm, interesting. Got an error about an identifier from a template not being available (even though I marked it as `inject`). Tried to copy the code to the playground to see if anyone knew what was going on, but it works there..
13:04:54jinn6nice, thanks
13:08:45jinn6looks like nim generates rather weird javascript, lol, but it works
13:10:37FromDiscord<nnsee> think of the JS as IR for the javascript engine
13:12:51FromDiscord<pmunch> jinn6, it generates pretty weird C as well
13:12:58FromDiscord<pmunch> The point is that it works and that it is fast
13:13:08jinn6fair enough
13:13:15jinn6and yeah, 85 line, 2546 byte javascript file, just to print a hardcoded "JS1" output, lol, I suppose with bigger programs it would be way less overhead
13:13:35FromDiscord<pmunch> Oh yeah, the overhead for small programs is a bit brutal
13:14:01FromDiscord<pmunch> However compiled in release mode and minified it's not terrible
13:14:09FromDiscord<pmunch> Won't win any size competitions though
13:14:43FromDiscord<pmunch> But if all your libs are in Nim and you compile to JS you will only end up with the JS you need and not have to load a bunch of libraries
13:14:56FromDiscord<pmunch> So you might save it back again in the end
13:15:02jinn6yeah, fair enough
13:16:51FromDiscord<pmunch> This is seriously weird..
13:17:42FromDiscord<pmunch> In my codebase I get ` Error: undeclared identifier: "weight"`, but in this minimal reproduction everything works fine https://play.nim-lang.org/#pasty=vLuOBcFh
13:18:31FromDiscord<nnsee> you probably have, but tried clearing cache?
13:19:47FromDiscord<pmunch> Yup
13:19:56FromDiscord<pmunch> And switched to newer Nim versions
13:20:25FromDiscord<pmunch> And I don't use the identifiers `loop` or `body` anywhere else in my code..
13:20:51FromDiscord<pmunch> (might have something in an include though, but I don't think so, and it shouldn't matter)
13:21:34FromDiscord<pmunch> The `loop` template is exactly the same as mine, the `pixel` in my code is from a loop, and the `png` is from nimPng
13:21:43FromDiscord<leorize> try `--expandMacro`?
13:21:49FromDiscord<leorize> it works on templates too
13:22:32FromDiscord<pmunch> `--expandMacro:loop`: no output
13:24:31FromDiscord<pmunch> If you want to try it yourself: https://pasty.ee/efOtGLJb
13:24:49FromDiscord<pmunch> You need nimPNG installed first, but that should be the only dependency
13:25:36FromDiscord<pmunch> The trouble code is at line 140
13:27:41FromDiscord<pmunch> It's almost like it doesn't see the template at all
13:28:49FromDiscord<pmunch> Moving the template outside the proc makes it work
13:31:19FromDiscord<pmunch> Oh wow, this is weird
13:31:20FromDiscord<pmunch> https://play.nim-lang.org/#pasty=HsvDYpga
13:31:38FromDiscord<pmunch> So it turns out it's because I had the `png` argument to my function as `auto`
13:32:08FromDiscord<pmunch> Same goes if it is a regular generic
13:32:25FromDiscord<leorize> generics funsies
13:33:46FromDiscord<pmunch> A smaller sample: https://play.nim-lang.org/#pasty=HXggaoCF
13:38:25FromDiscord<pmunch> Believe it might be this bug: https://github.com/nim-lang/Nim/issues/23889
14:03:35*ntat joined #nim
14:05:09*beholders_eye quit (Ping timeout: 248 seconds)
14:52:26jinn6ugh, if I want to import decode() from std/base64, but do not want it to be a global "decode()", how do I do it? if I do `from std/base64 import nil` and then `echo base64.decode(data_content)` then it errors `Error: attempting to call undeclared routine: 'decode'`, but the manual claims it's always possible to use full qualification like `echo strutils.replace("abc", "a", "z")`...
14:54:30FromDiscord<treeform> it should be possible but what you are trying todo, but it is strange... I don't think i ever seen `import nil` in the wild. Name space polution is a problem in dynamic langauges like python, but not in Nim because everything is statically checked and routed to the proper function.
14:56:39jinn6yeah, but if I wanted to make my own decode() for example, I'd be unable to, and either need to choose a different name, or be unable to use the base64 (bc the fully qualified name seems broken?)...and well, I just don't want it to be decode() but something more reasonable like b64decode() lol
14:57:58FromDiscord<treeform> no decode you make in your own file is always the one that is used over the imported one.
14:58:25FromDiscord<Laylie> fully qualified base64.decode works for me, problem must be somewhere else
14:59:27FromDiscord<treeform> sent a code paste, see https://play.nim-lang.org/#pasty=EaQXxNOt
15:00:31FromDiscord<treeform> sent a code paste, see https://play.nim-lang.org/#pasty=sMCGxKWM
15:00:56FromDiscord<treeform> but the import nil is strange because Nim's rules don't need it.
15:01:27jinn6https://play.nim-lang.org/#pasty=LoffINFx
15:02:13FromDiscord<Robyn [She/Her]> what if we just use TOML \:\>
15:02:24FromDiscord<Laylie> NO
15:02:41jinn6TOML ftw
15:03:43FromDiscord<treeform> @jinn6 you have a different error var base64=false and a bool value has not decode...
15:03:54*jinn6 facepalms
15:04:28jinn6yeah and now it works fine
15:04:44FromDiscord<treeform> and you don't need import nil
15:05:09jinn6I know, I just don't like the bare decode()
15:05:29FromDiscord<treeform> its just how its done ...
15:05:39jinn6ok well, I don't need the nil I suppose, but whatever...
15:05:48FromDiscord<treeform> what about data_content.decode() instead?
15:06:25jinn6it annoys me how it's just decode() which is super nondescript, lol
15:07:42jinn6base64.decode(stuff) is fine, but just decode(stuff) or stuff.decode() is way too ambiguous imho
15:07:43FromDiscord<treeform> maybe become annoyed at using long name when short name will do instead?
15:08:30jinn6ideally I'd just do `from base64 import decode as b64decode` but alas, can't do that
15:19:44FromDiscord<threefour> Okay I put together a demonstration of what seems to be a compiler bug. Am I doing something that should be functional, or is it an ungraceful fail of invalid usage?
15:19:48FromDiscord<threefour> https://play.nim-lang.org/#pasty=RTQeYGkW
15:20:30FromDiscord<fabric.input_output> sent a code paste, see https://play.nim-lang.org/#pasty=DoRSmpJg
15:20:34FromDiscord<threefour> The issue comes from the `innerShapes` function of the vtable in this case.
15:20:52FromDiscord<threefour> Commenting out everything to do with `innerShapes` makes it compile just fine.
15:21:35FromDiscord<leorize> you can't just say that and not post it here
15:21:54FromDiscord<Laylie> toml is ok i guess, but it has a lot of features that we dont need and i personally like the idea of using a shared format like editorconfig
15:22:53FromDiscord<threefour> In reply to @leorize "you can't just say": Talking to me? I sent a Nim playground link.
15:23:05FromDiscord<leorize> a crash is always a bug
15:23:09FromDiscord<leorize> I usually put it in `()`, makes it looks less arcane↵(@fabric.input_output)
15:23:21FromDiscord<leorize> the question is whether your crash is known \:p
15:23:27FromDiscord<leorize> but it's fine to just submit that snip
15:25:19FromDiscord<leorize> you can simplify the sample a lot more
15:26:04FromDiscord<threefour> Probably. I did a 1:1 of everything in the proprietary code to make sure it was a proper recreation.
15:26:38FromDiscord<leorize> does commenting anything but `innerShapes` still produce the crash?
15:26:49FromDiscord<leorize> everything\
15:26:52FromDiscord<leorize> oh lol matrix lag
15:26:55FromDiscord<leorize> I sent those long ago
15:27:35FromDiscord<leorize> your sample looks minimizable, so you should do that
15:27:47FromDiscord<leorize> make the smallest one that can trigger the bug, then submit it
15:28:00FromDiscord<fabric.input_output> In reply to @leorize "I usually put it": I usually do that but I found out I can just do this so that's what I'm gonna keep doing
15:29:17FromDiscord<leorize> the tiny colon just look so out of place tbh
15:30:46FromDiscord<fabric.input_output> it's comedic
15:30:52FromDiscord<fabric.input_output> I love it
15:39:38*twistedspine joined #nim
15:39:38*twistedspine quit (Changing host)
15:39:38*twistedspine joined #nim
15:42:16*twistedspine quit (Client Quit)
16:11:17*przmk quit (Remote host closed the connection)
16:11:44*przmk joined #nim
16:31:11Amun-Rahmm, I could've sworn this used to work before: https://play.nim-lang.org/#pasty=HIHTvxAE
16:32:36FromDiscord<Elegantbeef> `s: openArray[byte or char]` will work
16:32:44FromDiscord<Elegantbeef> You don't need `or string`
16:33:05FromDiscord<leorize> sounds like a bug for that one
16:33:26Amun-RaI had openArray[byte or char] before the paste, same result
16:33:28FromDiscord<Elegantbeef> Yea, but it never worked
16:33:42FromDiscord<Elegantbeef> `openArray[byte]` requires a conversion that will never happen
16:34:13Amun-Raremoving "or string" fixes the issue
16:34:47FromDiscord<Elegantbeef> https://play.nim-lang.org/#pasty=UMlUanUz
16:34:49FromDiscord<Elegantbeef> best way of doing it
16:35:06FromDiscord<Elegantbeef> Since `openArray` requires a conversion you cannot also have it have `string` as a valid choice
16:36:09Amun-RaI ended up with 'https://play.nim-lang.org/#pasty=gTVLbuiC'
16:36:51FromDiscord<Elegantbeef> You don't need that
16:36:53FromDiscord<Elegantbeef> You can just do what I did and skip the double proc 😄
16:37:06Amun-Rahmm, let me check :>
16:38:08FromDiscord<Elegantbeef> Yes they should be equal, but Nim generic type matching is silly
16:38:27Amun-Rais there a reason openArray[T] is fine and openArray[char or byte] isn't?
16:38:33Amun-RaI seer
16:38:35Amun-Rasee*
16:39:51FromDiscord<Elegantbeef> The reason is likely that `openArray[T]` has a `ntyGenericParam` instead of a `ntyTypeClass` so it can do further checking of a match
16:40:05Amun-Raoh
16:40:14Amun-Rathanks for the fix and explanation
16:40:37FromDiscord<Elegantbeef> Nim does not invoke converters for generics, so it's "technically right" but terrible UX
16:58:58*amadaluzia joined #nim
17:15:09*andy-turner joined #nim
17:32:25*ntat quit (Quit: leaving)
18:08:53*beholders_eye joined #nim
19:47:17*amadaluzia quit (Ping timeout: 244 seconds)
19:47:59*amadaluzia joined #nim
19:55:47*coldfeet quit (Quit: Lost terminal)
20:20:19*GuyForThat joined #nim
20:26:28*GuyForThat left #nim (ERC 5.6.0.30.1 (IRC client for GNU Emacs 30.1))
20:28:31*andy-turner quit (Quit: Leaving)
21:50:15*rockcavera joined #nim
22:57:37*tiorock joined #nim
22:57:38*tiorock quit (Changing host)
22:57:38*tiorock joined #nim
22:57:38*rockcavera quit (Killed (calcium.libera.chat (Nickname regained by services)))
22:57:38*tiorock is now known as rockcavera
22:59:40*tiorock joined #nim
22:59:41*tiorock quit (Changing host)
22:59:41*tiorock joined #nim
22:59:41*rockcavera is now known as Guest8445
22:59:41*tiorock is now known as rockcavera
23:02:09*Guest8445 quit (Ping timeout: 248 seconds)
23:11:42*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
23:18:40FromDiscord<__nycto__> I'm getting a SIGSEGV from `nimsuggest`. Is there a way to get a stacktrace out of that? I tried to recompile it with `./koch nimsuggest -d:debug --debugger:native -d:stacktraceMsgs -d:nimCompilerStacktraceHints -d:nimDebug`, but that didn't help. Is there an incantation I'm missing?
23:24:15*Lord_Nightmare joined #nim