<< 12-03-2025 >>

00:02:54*xutaxkamay quit (Ping timeout: 246 seconds)
00:03:30FromDiscord<Robyn [She/Her]> ...huh
00:03:37FromDiscord<Robyn [She/Her]> and that worked?
00:03:59FromDiscord<Robyn [She/Her]> Couldn't someone just grab the generated code from the VM and analyse it as it's being executed?
00:04:04FromDiscord<Robyn [She/Her]> And RE it that way?
00:06:07FromDiscord<leorize> of course you can, someone did it\: https://github.com/neuroradiology/InsideReCaptcha
00:06:07FromDiscord<leorize> that repo is 11yrs old so google probably spiced things up by now
00:09:14FromDiscord<Robyn [She/Her]> Ahh
00:14:23*xutaxkamay joined #nim
01:01:41*fallback quit (Ping timeout: 248 seconds)
01:24:56*fallback joined #nim
02:45:48*rockcavera quit (Remote host closed the connection)
02:46:30*jkl quit (Ping timeout: 244 seconds)
02:51:52*jkl joined #nim
03:48:45*disso-peach joined #nim
05:13:09*ntat joined #nim
05:31:51*protium joined #nim
05:40:41*protium quit (Quit: My Mac has gone to sleep. ZZZzzz…)
05:44:18*protium joined #nim
05:49:40*protium quit (Quit: My Mac has gone to sleep. ZZZzzz…)
07:29:08*coldfeet joined #nim
08:08:20*redj quit (Quit: No Ping reply in 180 seconds.)
08:09:52*redj joined #nim
08:11:49*ntat quit (Quit: Leaving)
08:34:48*coldfeet quit (Quit: Lost terminal)
08:38:58FromDiscord<alehander92> In reply to @Elegantbeef "Oh just remembered don't": Thank you, good note!
08:39:06FromDiscord<alehander92> I'll mention it to the team
08:50:11*ntat joined #nim
11:17:24*ntat quit (Quit: leaving)
11:26:49*ntat joined #nim
12:01:52*nyeaa49284230101 quit (Quit: The Lounge - https://thelounge.chat)
12:05:26*nyeaa49284230101 joined #nim
12:51:22*ntat quit (Quit: leaving)
13:36:49*ntat joined #nim
13:44:53*xet7 quit (Ping timeout: 248 seconds)
13:57:30*xet7 joined #nim
14:25:01*protium joined #nim
14:29:33*protium quit (Ping timeout: 252 seconds)
15:12:06FromDiscord<saemideluxe> I just tripped over this one again: I have an object with a field that has a default value set. When I do not initialize `result` inside a `proc` that returns this type (e.g. by using the object-constructur), the field will not be initialized with my defined default, but with the default of the type of the field (ie zero, nil, etc).↵Is there a reason for this behavior or is it a bug? A quick issue-search did not bring anything up.
15:12:36FromDiscord<saemideluxe> (edit) "I just tripped over this one again: I have an object with a field that has a default value set. When I do not initialize `result` inside a `proc` that returns this type (e.g. by using the object-constructur), the field will not be initialized with my defined default, but with the default of the type of the field (ie zero, nil, etc).↵Is there a reason for this behavior or is it a bug? A quick issue-search ... did" added
15:24:53FromDiscord<lainlaylie> object field default values are used only in these cases:↵> an object created with an object construction expression or the procedure default; a ref object created with an object construction expression or the procedure new; an array or a tuple with a subtype which has a default created with the procedure default
15:25:37FromDiscord<lainlaylie> so it's expected that your implicit `result` does not have the default values↵the feature that would prevent you from forgetting to initialize result was bullied out of existence: https://forum.nim-lang.org/t/12646
15:39:52FromDiscord<meteoraxv> hi all↵hi, it's been a few years since ive used nim and did programming in general. im back to programming more because of school projects and maths stuff and i really liked my time with nim, but unfortunately it seems the AV still doesnt play nice with nim programs↵hello.exe quarantined by my AV (norton) because it contains Win64:Evo-gen[Trj]
15:40:08FromDiscord<meteoraxv> i kind of forgot what im supposed to do now
15:40:38FromDiscord<meteoraxv> (edit) "hi all↵hi, it's been" => "sent" | "few years since ive used nim and did programming in general. im back to programming more because of school projects and maths stuff and i really liked my time with nim, but unfortunately it seems the AV still doesnt play nice with nim programs↵hello.exe quarantined by my AV (norton) because it contains Win64:Evo-gen[Trj]" => "code paste, see https://play.nim-lang.org/#pasty=AxKxKJKI"
15:40:43FromDiscord<meteoraxv> (edit) "https://play.nim-lang.org/#pasty=iTAHboNd" => "https://play.nim-lang.org/#pasty=LwEyWPuC"
15:41:47FromDiscord<lainlaylie> https://forum.nim-lang.org/t/12678↵https://forum.nim-lang.org/t/12669
15:44:08FromDiscord<meteoraxv> In reply to @lainlaylie "https://forum.nim-lang.org/t/12678 https://forum.ni": yea i was thinking maybe it is a compiler issue. this other programming language i use called 'V', is also a not that well known language but my AV never destroys V programs. i think maybe it
15:44:18FromDiscord<meteoraxv> (edit) "it" => "it's because of the compiler"
15:44:38FromDiscord<meteoraxv> (edit) "destroys" => "quarantines"
15:44:50FromDiscord<meteoraxv> i should try changing the compiler, maybe
15:45:01FromDiscord<lainlaylie> the C compiler, right
16:22:04FromDiscord<saemideluxe> In reply to @lainlaylie "so it's expected that": Okay, TBH it totally sucks that this got removed from the RFC. For me this would have finally added confidence, that all variables are initialized correctly (as expected)... But seems like it is still available via experimental flag, will try that.
16:22:20FromDiscord<saemideluxe> @lainlaylie Thanks for your explanation.
16:37:18*disso-peach quit (Quit: Leaving)
17:01:29FromDiscord<aintea> what do you people think about having a way to distinguish in place procedures, classic functions, functions that return a boolean, and template/macros ?↵Like in Crystal (for the functions, return type and in place stuff) and Rust (macros ending with !)
17:21:49FromDiscord<meteoraxv> In reply to @lainlaylie "the C compiler, right": actually i guess it's not a compiler issue because programs i compile in other languages also use gcc and dont have this quarantine issue
17:22:38FromDiscord<meteoraxv> funny enough if i compile a nim program in my dev folder (which is excluded from norton's real time protection), if i then scan that .exe with norton it reports no issues
17:23:05FromDiscord<meteoraxv> but as soon as i move that .exe from that folder to my desktop for instance, BOOM it gets quarantined
17:24:16FromDiscord<leorize> not distinguishing them is a feature, not a bug↵(@aintea)
17:24:27FromDiscord<aintea> oh the famous feature
17:24:35FromDiscord<aintea> I wish Nim was more extensible like rust
17:24:54FromDiscord<aintea> only being able to make macros body valid nim syntax is kinda limiting
17:26:16FromDiscord<leorize> for starters the fact that they all look the same means you can seamlessly use templates/macros to bind into what is "supposed" to be a function
17:26:46FromDiscord<aintea> I don't agree on that, you should be able to know what is and what isn't a macro, same for the function stuff
17:27:27FromDiscord<aintea> the boolean thing is kind of useless since most of the functions returning a boolean start with 'is' or 'has', but it would be good to take example on Crystal I think
17:27:44FromDiscord<leorize> if a generic function wants to get a field or call something from the generic parameter, you are not bound to implementing it as fields or functions
17:27:52FromDiscord<leorize> you can implement them as macros, templates, or regular fields
17:29:45FromDiscord<aintea> I'm not sure to understand
17:30:10FromDiscord<leorize> a lot of flexibility comes from not having to distinguishing them, something that is also employed in Lisp, a language that inspired Nim's macro system
17:31:12FromDiscord<aintea> could you give me an example of the `a lot of flexibility comes from not having to distinguishing them` ?
17:36:48FromDiscord<leorize> https://play.nim-lang.org/#pasty=lSCyKrWK
17:36:57FromDiscord<leorize> here's a simple example
17:40:47FromDiscord<leorize> it's something you learn to live with, because the alternative of processing token stream is not fun↵(@aintea)
17:41:14FromDiscord<aintea> I know it's not fun, but once it's done you have full power
17:41:17FromDiscord<solitudesf> In reply to @aintea "I don't agree on": why?
17:41:36FromDiscord<aintea> to better differentiate them without having to read doc / hover on them
17:42:16FromDiscord<solitudesf> what kind of great insight do you achieve if you're not read the docs or even hover?
17:42:24FromDiscord<solitudesf> (edit) "read" => "reading"
17:44:37FromDiscord<aintea> you don't achieve anything it's just faster and feels better to instantly know what is what
17:45:49FromDiscord<solitudesf> faster than what? why do you need to know that? what differnce does it make to you besides feeling good from pretend control?
17:45:51FromDiscord<leorize> so what good is there to know whether X is a macro or function or field?
18:02:11FromDiscord<aintea> It's a personal opinion on this one
18:02:37FromDiscord<aintea> but do you guys agree the one on the 'in place' and 'returns a boolean' is a good idea
18:03:59FromDiscord<Elegantbeef> Right which is why we have words
18:04:23FromDiscord<Robyn [She/Her]> In reply to @aintea "but do you guys": Why would you need or want that?
18:04:41FromDiscord<Elegantbeef> `sort` and `sorted` for instance
18:04:44FromDiscord<Robyn [She/Her]> `var` exists as a mutability modifier for parameters which works fine for in-place code
18:04:51FromDiscord<Elegantbeef> `sort` sorts the list `sorted` returns a sorted list
18:07:44FromDiscord<Elegantbeef> Really though the naming is generally from a sensible place. If you have two operations one returns a value and one returns a bool you do `doThing(arg)` and `tryDoThing(arg)`
18:16:15FromDiscord<lainlaylie> crystal is even less googlable than nim.. does "in place" refer to the ruby `!` suffix?
18:16:24FromDiscord<aintea> yes
18:16:42FromDiscord<aintea> In reply to @Elegantbeef "`sort` sorts the list": that's not really explicit, and I always mix up the two
18:16:45FromDiscord<Elegantbeef> Yea crystal does the same silly thing
18:16:48FromDiscord<Elegantbeef> `?` and `!` for values
18:16:53FromDiscord<aintea> Skill issue yes, but it's an issue nonetheless
18:17:00FromDiscord<Elegantbeef> cause `isBleh?` makes sense
18:17:07FromDiscord<aintea> yessss
18:17:37FromDiscord<aintea> the most important is the in place thing
18:18:04FromDiscord<Elegantbeef> In place doesn't overly matter unless both overloads take a mutable parameters as robyn pointedo ut
18:18:10FromDiscord<lainlaylie> but this would just be a convention, up to library authors (and yourself) to follow it right?
18:19:38FromDiscord<Elegantbeef> It also makes parsing harder
18:19:59FromDiscord<aintea> In reply to @Elegantbeef "In place doesn't overly": how do you visually know
18:20:17FromDiscord<aintea> yo can't without hovering on them, or checking wether the parameters are declared as 'let' or 'var'
18:20:27FromDiscord<aintea> the `!` lets you know directly
18:22:06FromDiscord<Elegantbeef> `a.doThing!` is a prefix but `a.doThing !` is an infix
18:22:07FromDiscord<Elegantbeef> It's a postfix for the first\
18:22:07FromDiscord<Elegantbeef> Matrix bridge is falling down falling down falling down
18:22:08FromDiscord<aintea> In reply to @lainlaylie "but this would just": I can't define a func with both letters and symbols
18:22:19FromDiscord<lainlaylie> In reply to @aintea "the `!` lets you": except it doesn't when authors dont follow convention? or is the idea to disallow var parameters unless the proc name ends with !?
18:22:57FromDiscord<aintea> In reply to @lainlaylie "except it doesn't when": not the second one, Nim is about flexibility anyway, the first one would be good
18:23:04*nimxdebian joined #nim
18:23:08FromDiscord<aintea> like a recommendation in the standard coding style
18:23:31FromDiscord<Elegantbeef> Where do you even place the operator?
18:23:54nimxdebianhi i'm trying to make a simple gui app with nimx but when trying to run it it says error nimx/label not found
18:24:24FromDiscord<Elegantbeef> Did you install the right version of nimx?
18:24:28FromDiscord<Elegantbeef> I'd also say nimx is not overly usable
18:25:26nimxdebianyea nimble install nimx
18:25:39nimxdebianshould have by default
18:25:49FromDiscord<Elegantbeef> Well `nimx/label` is not a module
18:26:49FromDiscord<Elegantbeef> You likely want `nimx/text_field` given it has `newLabel`
18:27:01nimxdebiani'm trying
18:27:01nimxdebianimport nimx
18:27:02nimxdebianproc main() =
18:27:02nimxdebian    let window = newWindow("Hello Nimx", 800, 600)
18:27:03nimxdebian    let label = newLabel(window, "Welcome to Nimx!")
18:27:03nimxdebian    runApplication()
18:27:04nimxdebianmain()
18:27:45nimxdebianit can't find nimx at all
18:28:04FromDiscord<Elegantbeef> IRC users will do everything but use a rich text client 😄
18:28:20nimxdebianfor a few lines of codes it's easiest to just paste it
18:28:52FromDiscord<Elegantbeef> Except it loses indentation! 😛
18:30:03nimxdebianany idea why this stupid simple thing doesn't work?
18:30:13nimxdebiani'm on debian stable
18:30:22nimxdebianbut i used the normal install script on nim's homepage
18:30:44nimxdebianhello world works fine
18:30:56FromDiscord<lainlaylie> please send the actual error message from the compiler
18:31:14nimxdebianmaybe i messed up my desktop since i switched from gnome to kde but didn't remove gnome
18:31:36nimxdebianError: cannot open file: nimx
18:31:43FromDiscord<Elegantbeef> Why would a DE change your Nim compiler?
18:31:52nimxdebianidk what else it could be
18:31:57FromDiscord<Elegantbeef> There is no `nimx` module
18:32:34nimxdebiannimble install nimx
18:32:50FromDiscord<Elegantbeef> There is no nimx module inside nimx
18:34:02nimxdebian..?
18:34:29nimxdebianbut i need import nimx?
18:34:30FromDiscord<Elegantbeef> There is no `nimx.nim`
18:34:43FromDiscord<Elegantbeef> You do not `import nimx` you import the modules you usue
18:34:47FromDiscord<Elegantbeef> use\
18:34:49FromDiscord<lainlaylie> https://github.com/yglukhov/nimx?tab=readme-ov-file#usage
18:34:55FromDiscord<lainlaylie> the example here
18:34:57FromDiscord<Elegantbeef> https://github.com/yglukhov/nimx?tab=readme-ov-file#usage does not `import nimx`
18:35:52FromDiscord<Elegantbeef> The hello world works cause you it did not attempt to invent code. This screams like you're attempting to use an LLM to do things instead of learning
18:36:25FromDiscord<lainlaylie> unrelated but↵> Nimx is tested only against the latest devel version of Nim compiler.↵this is the one true way to develop libraries
18:36:46FromDiscord<Elegantbeef> Cannot tell if serious or not 😄
18:36:52FromDiscord<lainlaylie> serious.
18:37:12FromDiscord<Elegantbeef> I tend towards bleeding edge for my code, but it's not the most stable
18:39:29FromDiscord<aintea> In reply to @Elegantbeef "Where do you even": At the end
18:39:40FromDiscord<aintea> `sort!(stuff)`
18:39:48FromDiscord<Elegantbeef> Ah so it's ambiguous for an infix operator that takes a tuple
18:39:57FromDiscord<aintea> Oh that's why
18:39:59FromDiscord<aintea> How sad
18:40:11*nimxdebian quit (Quit: Client closed)
18:40:11FromDiscord<Elegantbeef> `a.doThing!(10, 20)` could be `a.doThing ! (10, 20)`
18:40:17FromDiscord<Elegantbeef> Well it's not the only reason why it's not here
18:40:27FromDiscord<Elegantbeef> It's just something you need to consider
18:41:21FromDiscord<aintea> I need to consider a lot of things
18:42:04FromDiscord<aintea> I would love another kind of macro where Nim doesn't even check if it's valid Nim, it just goes "you're on your own now"
18:42:26FromDiscord<Elegantbeef> You can just use `static string`
18:42:36FromDiscord<Elegantbeef> You get the same thing and it doesn't cause the parser to be fucking crazy
18:45:19FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=deKabFiN
18:45:57FromDiscord<Elegantbeef> `js` in nim would just be a `template js(s: static string): static string = s`
18:46:03FromDiscord<Elegantbeef> Again this is why templates not being explicit are beneficial
18:58:09FromDiscord<lainlaylie> this is what std/pegs does ^-^
18:59:10FromDiscord<lainlaylie> wait, it's not...
18:59:48FromDiscord<Elegantbeef> strscans does use static strings and a macro that expands it into logic to capture
19:23:22FromDiscord<frusadev> I have a question...
19:23:35FromDiscord<frusadev> Why does nimsuggest crash so often ?
19:24:56FromDiscord<leorize> because it's the compiler
19:24:57FromDiscord<leorize> and the compiler is not really good with code that isn't finished
19:25:26FromDiscord<leorize> or weird AST
19:25:36FromDiscord<frusadev> I see...
19:25:58FromDiscord<frusadev> I've also noticed that most LSPs for nim depend on it...
19:26:15FromDiscord<frusadev> Does anyone know of any LSP that doesn't depend on nimsuggest ?
19:26:39FromDiscord<solitudesf> there isn't one
19:26:46FromDiscord<frusadev> hmmph
21:12:54*nyeaa49284230101 quit (Quit: The Lounge - https://thelounge.chat)
21:14:45FromDiscord<fromiselectq0> sent a long message, see https://pasty.ee/TAXbwhLE
21:15:26*nyeaa49284230101 joined #nim
21:19:32*beholders_eye joined #nim
21:30:10*rockcavera joined #nim
21:37:39*ntat_ joined #nim
22:23:27*ntat_ quit (Quit: leaving)
22:52:58*ntat quit (Quit: Leaving)
22:59:06FromDiscord<demotomohiro> You need to install both gcc and Nim that produce the same kind of executable.↵Or if you are using Nim for 32bit x86 and gcc for 64bit x86, try `--cpu:amd64` option.
23:13:32FromDiscord<fromiselectq0> let me provide my nim version et al
23:14:01FromDiscord<that_dude.> How did you install nim?
23:14:16FromDiscord<fromiselectq0> In reply to @that_dude. "How did you install": choosenim on the website
23:14:58FromDiscord<that_dude.> In a terminal, what happens when you run `where.exe gcc`?
23:15:19FromDiscord<that_dude.> And you're using the windows powershell terminal right?
23:16:28FromDiscord<that_dude.> This is what it looks like for me https://media.discordapp.net/attachments/371759389889003532/1349521453850034186/XFrORr1M46.png?ex=67d3674b&is=67d215cb&hm=bbfdba2567deb8b27f9df9a9ad1de6b3e5938c03938756321b7675f0a1387172&
23:19:05FromDiscord<fromiselectq0> https://media.discordapp.net/attachments/371759389889003532/1349522110925766656/image.png?ex=67d367e8&is=67d21668&hm=a847914d1491e1d0d4a2510301fce3038fbc1a5973effa7156688ae3cd1c4e66&
23:20:06FromDiscord<that_dude.> So it looks like choosenim didn't install a more modern version of gcc for you
23:20:23FromDiscord<that_dude.> You should not be using the msys/mingw one
23:21:03FromDiscord<fromiselectq0> what version of GCC should i be using ?
23:21:03FromDiscord<fromiselectq0> gcc 14 ?
23:22:49FromDiscord<that_dude.> I take it back it looks like I'm also using 11
23:22:59FromDiscord<that_dude.> So it looks like gcc is fine then
23:23:04FromDiscord<that_dude.> What happens when you compile?
23:24:10FromDiscord<fromiselectq0> https://media.discordapp.net/attachments/371759389889003532/1349523389450031115/image.png?ex=67d36918&is=67d21798&hm=965bcd7d1348a0c948f275341425fa88fe263bed0a04db0bd8e75e349b791b87&
23:24:48FromDiscord<that_dude.> You're not on 32 bit or smth like that right?
23:25:25FromDiscord<fromiselectq0> you mean windows ? i am on 64bit
23:25:32FromDiscord<fromiselectq0> does any still use 32
23:25:36FromDiscord<that_dude.> Cool, are you using two different machines?
23:25:49FromDiscord<that_dude.> Just cus the terminals look different
23:25:58FromDiscord<fromiselectq0> primary home workstations
23:26:09FromDiscord<fromiselectq0> one is vscode, the other is windows terminal
23:27:11FromDiscord<that_dude.> In reply to @fromiselectq0 "": I'm assuming that this one is windows terminal, Can you try to compile on this one?
23:27:27FromDiscord<fromiselectq0> okay
23:29:48FromDiscord<fromiselectq0> https://media.discordapp.net/attachments/371759389889003532/1349524812686426162/image.png?ex=67d36a6c&is=67d218ec&hm=e349578536a1aff3740cddc8a208b9f7f73e4020c0b9e875ceb27f3523930ace&
23:31:17FromDiscord<that_dude.> What id you deleted the nimcache folder?
23:31:17FromDiscord<that_dude.> (edit) "id" => "if"
23:31:39FromDiscord<fromiselectq0> same output
23:32:32FromDiscord<fromiselectq0> whats the best way to remove `Nim` from my pc
23:33:04FromDiscord<fromiselectq0> i believe its gotten to the "fresh" install stage
23:34:06FromDiscord<that_dude.> I don't think there is a built in uninstall method. If you delete the nimcache and follow nim related paths found in your environment variables, you can see where everything is
23:39:43FromDiscord<fromiselectq0> removed Nim,
23:39:54FromDiscord<fromiselectq0> will try the manual install and see how that goes
23:48:44FromDiscord<fromiselectq0> @that_dude. @_araq its working now
23:48:50FromDiscord<that_dude.> Nice
23:49:00FromDiscord<fromiselectq0> deleted choosenim and .nimble etc
23:49:08FromDiscord<that_dude.> I bet it some windows antivirus things partially interupting the installation
23:49:08FromDiscord<fromiselectq0> and did the manual install
23:49:26FromDiscord<fromiselectq0> which was straight forward
23:50:05FromDiscord<fromiselectq0> In reply to @that_dude. "I bet it some": dont think so, i put an exception
23:50:13FromDiscord<fromiselectq0> (edit) "In reply to @that_dude. "I bet it some": dont think so, i put an exception ... " added "on the av"
23:50:44FromDiscord<that_dude.> I was working on testing it on one of my vms, and it killed the installer on me
23:50:51FromDiscord<that_dude.> So I'm guessing something similar happened to you
23:52:15FromDiscord<fromiselectq0> makes me wonder why the `choosenim` exists in the first place
23:52:40FromDiscord<that_dude.> It lets you install and switch between multiple nim versions (including nightly) from the comand line
23:53:08FromDiscord<that_dude.> I guess people really like that convenience