<< 08-02-2023 >>

00:04:27*jmdaemon quit (Ping timeout: 255 seconds)
00:16:05*jmdaemon joined #nim
00:27:23*forest joined #nim
00:45:02FromDiscord<Girvo> sent a code paste, see https://play.nim-lang.org/#ix=4nq5
00:45:10FromDiscord<Girvo> What am I missing? Tried `.cfloat` on them but it doesn't like that
00:45:32FromDiscord<Elegantbeef> `0d`
00:45:41FromDiscord<Elegantbeef> or `0.0`
00:45:42FromDiscord<Elegantbeef> something to say float
00:46:42FromDiscord<Girvo> 👍
00:46:48FromDiscord<Girvo> I ripped out cfloat as well, that was from c2nim itself
00:46:54FromDiscord<Girvo> just used regular float
00:47:03FromDiscord<Girvo> Also it seems this code has unintialised array values lol
00:47:11FromDiscord<Girvo> Which is also causing an issue
00:48:27FromDiscord<Phil> In reply to @Saint "<@180601887916163073> Hey! I was": No, I have one docker-compose file for everything
00:49:24FromDiscord<Phil> In reply to @Saint "Also should I make": Is your test-data so large that you can't just copy it into the container itself?
00:55:32FromDiscord<Elegantbeef> @Girvo\: i assume thumbs up means it worked? 😄
01:45:01*jmdaemon quit (Ping timeout: 268 seconds)
01:54:57*dropkick joined #nim
02:15:38FromDiscord<Saint> In reply to @Isofruit "Is your test-data so": Nah it's not test data, so I want my tests to run against a separate test search index for example, without interfering with the main/production index that you would normally launch with docker-compose
02:19:06FromDiscord<Saint> The way I can see it so far is that I can have a separate test index service, but it will always start up when I do docker compose up?
02:28:09*jmdaemon joined #nim
02:39:41*ehmry quit (Ping timeout: 255 seconds)
02:48:14*azimut joined #nim
03:04:32*azimut quit (Ping timeout: 255 seconds)
03:05:55*azimut joined #nim
03:31:44*jmdaemon quit (Ping timeout: 248 seconds)
04:13:40*arkurious quit (Quit: Leaving)
04:19:10*dropkick quit (Ping timeout: 260 seconds)
04:52:39*jmdaemon joined #nim
05:51:29*azimut quit (Ping timeout: 255 seconds)
05:54:07*azimut joined #nim
05:59:08*azimut quit (Ping timeout: 255 seconds)
06:02:01*azimut joined #nim
06:14:26*azimut quit (Ping timeout: 255 seconds)
06:15:41*azimut joined #nim
06:24:49*forest left #nim (Wandered off)
06:31:01*rockcavera quit (Remote host closed the connection)
06:41:23FromDiscord<Hamid_Bluri> hey beef, how are you doing?↵↵can you label this issue in github?↵https://github.com/nim-lang/Nim/issues/21302
06:41:43FromDiscord<Elegantbeef> Nope i dont have any administrative powers
06:45:53FromDiscord<ringabout> Hi beef, I was wondering would you like to help with the labelling stuff?
06:46:30FromDiscord<Elegantbeef> I guess i could
06:46:58FromDiscord<Elegantbeef> Just dont give me any actual control, cause i'm a klutz and am bound to mess it up
06:49:36FromDiscord<ringabout> Lol, sure. I have invited you, you should be able to label and close issues/PRs.
07:02:12*kenran joined #nim
07:14:28FromDiscord<Elegantbeef> I'm not even sure if the present state is a bug 😄↵(@Hamid_Bluri)
07:14:49FromDiscord<Elegantbeef> Unrelated to labelling
07:16:36FromDiscord<Elegantbeef> Ah nevermind misread the issue 😄
07:17:08FromDiscord<Elegantbeef> Thought you were saying that two constants shouldnt point to the same proc cause you used `wrap`
07:36:29*kenran quit (Remote host closed the connection)
07:51:42FromDiscord<BobBBob> sent a code paste, see https://play.nim-lang.org/#ix=4nr0
07:51:56FromDiscord<BobBBob> (edit) "https://play.nim-lang.org/#ix=4nr0" => "https://play.nim-lang.org/#ix=4nr1"
07:54:18FromDiscord<BobBBob> (and I know I can just use countup and put that in the index, but I wanna know if you cant do it with iterators since it's cleaner)
07:56:03FromDiscord<Elegantbeef> You want it to yield 1, 4, 7, 2, 5, 8, 3, 6, 9?
07:56:06FromDiscord<Elegantbeef> Well you can always write your own iterator
07:57:42FromDiscord<BobBBob> okay I was just wondering if there was some built in way to do it
07:58:20FromDiscord<Elegantbeef> I do not even know what you're asking to confirm or deny it's existence, but i'm going to say it likely doesnt exist
07:58:42FromDiscord<BobBBob> yeah it was what you said, 1, 4, 7, 2, 5, 8, 3, 6, 9
07:59:08FromDiscord<Elegantbeef> ah then yep there is nothing in the stdlib that i know of
08:04:34FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nr3
08:04:40FromDiscord<Elegantbeef> Couldnt help myself from the little challenge 😄
08:05:09FromDiscord<BobBBob> hey awesome, thanks
08:05:12FromDiscord<Elegantbeef> Well that works for a single depth nested array
08:06:06FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nr4
08:25:25*mal``` quit (Quit: Leaving)
08:33:46*mal`` joined #nim
08:33:47*jkl quit (Quit: Gone.)
08:34:09*jkl joined #nim
08:54:19FromDiscord<BobBBob> btw is there any reason not to use func over proc if a function has no side effects?
08:55:10FromDiscord<Elegantbeef> It's more pure so not really
09:07:42FromDiscord<ShalokShalom> sent a long message, see http://ix.io/4nri
09:07:57FromDiscord<ShalokShalom> Other than that, top. 👌🏻
09:09:14FromDiscord<Elegantbeef> Need better tooling
09:09:17FromDiscord<ShalokShalom> Just to be precise: I suggest to do all possible functions as such↵↵Since I think about it: It's a nice compiler feature, to look up the code and change all pure procs into funcs.
09:09:31FromDiscord<ShalokShalom> In reply to @Elegantbeef "*Need better tooling*": Exactly.↵↵You read my mind.
09:09:35FromDiscord<ShalokShalom> Good boy
09:09:36FromDiscord<Elegantbeef> > You didn't mark this one as func, so now I can't rely on that explicit information, mentally.↵Hover a proc symbol, and it shows it if it's pure, magic one day
09:09:52FromDiscord<ShalokShalom> Yeah, but I like to convert entire code bases
09:10:04FromDiscord<Elegantbeef> Cool but there is no point really
09:10:12FromDiscord<ShalokShalom> That would be an easy change, and a good contribution
09:10:14FromDiscord<Elegantbeef> Nim makes a pure proc pure implicitly
09:10:28FromDiscord<ShalokShalom> In reply to @Elegantbeef "Cool but there is": Well, did you read my comment above 😂
09:10:55FromDiscord<ShalokShalom> Sure, you can hover over the proc. ↵In the IDE, and not in GitHub
09:11:07FromDiscord<ShalokShalom> And its also tiring, to hover over every single entry
09:11:16FromDiscord<Phil> Basically the same reason why you should use `Set` when your task fundamentally is to check if X is part of some group of values:↵It communicates intent.↵Func communicates "This does not have side-effects, this is safe"↵Proc communicates "This might have side-effects"
09:11:19FromDiscord<Elegantbeef> Well good thin you do not need to
09:11:34FromDiscord<Elegantbeef> The amount of times i care whether something is a proc or a func is near 0
09:11:49FromDiscord<ShalokShalom> And, most important↵↵Once all humans disappear from the planet, and other civilizations form, we might provide them more information about our left code.
09:11:53FromDiscord<Elegantbeef> It really doesnt matter when writing or reading code outside of the procedure
09:12:06FromDiscord<Elegantbeef> Well if they have the code hopefully they have a Nim compiler
09:12:17FromDiscord<ShalokShalom> And I mean, who would argue against pleasing aliens with property assigned Nim code
09:12:24FromDiscord<Phil> I mean, it's similar for me, but that's mostly because when I deal with DB It's always a side-effect that I can't avoid and that's at the root of the main code-path my code follows
09:12:37FromDiscord<ShalokShalom> In reply to @Isofruit "Basically the same reason": Ab-so-lutely
09:12:44FromDiscord<Elegantbeef> Plus new strict funcs make the idea of a func even more minute
09:12:50FromDiscord<ShalokShalom> One of the core building blocks
09:13:02FromDiscord<ShalokShalom> Communicated Intention
09:13:08FromDiscord<ShalokShalom> Is programming anything else?
09:13:31FromDiscord<ShalokShalom> In reply to @Elegantbeef "Plus new strict funcs": Yeah, and it seems like they could have to be reworked again
09:13:37FromDiscord<Phil> Like, I can make my `$` stuff funcs and I do, but I can't make `addCreature` or `updateCreature` or `deleteCreature` a func, that's inherently side-effecty
09:13:40FromDiscord<ShalokShalom> Did you see the issue?
09:13:55FromDiscord<ShalokShalom> In reply to @Isofruit "Like, I can make": Well, in most languages
09:13:58FromDiscord<ShalokShalom> In Nim
09:14:55FromDiscord<ShalokShalom> In reply to @Isofruit "I mean, it's similar": One more aspect: It shows, where your code is supposed to be placed at. ↵↵If you have lots of your procs in the main part, you could probably ask why.
09:15:08FromDiscord<Elegantbeef> What issue?
09:15:17FromDiscord<ShalokShalom> Either you developing an OS, for embedded systems or do probably do stupid design
09:15:28FromDiscord<ShalokShalom> In reply to @Elegantbeef "What issue?": the strict func one
09:15:35FromDiscord<Phil> In reply to @ShalokShalom "One more aspect: It": If a core of your application is procs in webdev that just means you use a database 😛
09:15:39FromDiscord<Elegantbeef> What?
09:16:07FromDiscord<ShalokShalom> https://github.com/nim-lang/Nim/pull/21066#issuecomment-1416845926
09:16:09FromDiscord<ShalokShalom> Sorry
09:16:12FromDiscord<ShalokShalom> Its the PR
09:16:14FromDiscord<ShalokShalom> My fault
09:16:34FromDiscord<ShalokShalom> In reply to @Isofruit "If a core of": No, it means you use a database centric desigm
09:16:36FromDiscord<Elegantbeef> Yes I talked with leorise about that problem
09:16:45FromDiscord<ShalokShalom> And yeah, most likely it means what you said
09:16:50FromDiscord<ShalokShalom> (edit) "desigm" => "design"
09:16:58FromDiscord<ShalokShalom> And sometimes, that is a design issue
09:19:07FromDiscord<jmgomez> Hey Beef, I think I read you write that you prefer to script in something targeting webassembly rather than NimVM? I was thinking as next step for after vfuncs, NUE to integrate the VM. But I also was thinking that it can benefit for allowing a layer of top with webassembly where any other lang can target. Any particular reason of why you discarded the vm approach?
09:19:20FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4nrl
09:20:14FromDiscord<Elegantbeef> Of course it is phil
09:20:15FromDiscord<Elegantbeef> That's valid procedure calling syntax
09:20:19FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nrn
09:20:22FromDiscord<Elegantbeef> I mean i only briefly considered the NimVm for scripting a game
09:20:33FromDiscord<ShalokShalom> In reply to @jmgomez "Hey Beef, I think": I prefer wasm as plugin mechanism, and think it's the future (possibly)
09:20:34FromDiscord<Elegantbeef> The issue with the NimVM is it's slow, not really meant for being embedded and isnt overly portable
09:20:46FromDiscord<Elegantbeef> Shalok changed their name to beef
09:20:48FromDiscord<Elegantbeef> Interesting
09:21:08FromDiscord<Elegantbeef> The reason wasm for scripting is so enticing is the fact it's language agnostic, sandboxed and cross platform
09:21:15FromDiscord<Phil> In reply to @Elegantbeef "That's valid procedure calling": It's valid procedure calling syntax to call a proc with only some of its parameters and define there rest after a colon in a newline?
09:21:16FromDiscord<ShalokShalom> ShalBeef
09:21:41FromDiscord<Elegantbeef> You can compiler a wasm module on a PC running templeos then transfer it to a iphone 32 and it'll work
09:21:45FromDiscord<Elegantbeef> compile\
09:21:58FromDiscord<Elegantbeef> Yes phil it's block calling
09:22:02FromDiscord<jmgomez> In reply to @Elegantbeef "The issue with the": It's like python slow? I just wanted to integrate it for an improved dev experience rather than for shipping code
09:22:03FromDiscord<ShalokShalom> 🌈
09:22:11FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#templates-passing-a-code-block-to-a-template
09:22:12FromDiscord<ShalokShalom> All rainbows and sunshine
09:22:28FromDiscord<Elegantbeef> It's slower than python now iirc
09:22:29FromDiscord<jmgomez> In reply to @ShalokShalom "I prefer wasm as": What attracts me about the idea is that it can really sky rocket the plugin
09:22:41FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4nro
09:22:47FromDiscord<ShalokShalom> In reply to @jmgomez "What attracts me about": This is true!
09:23:15FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=4nrp
09:23:16FromDiscord<ShalokShalom> You could go advertising the plugin also in other communities
09:23:18FromDiscord<Elegantbeef> Nimscript is a nice easy way to get runtime scripting to a program
09:23:26FromDiscord<ShalokShalom> GHC just got native wasm support
09:23:42FromDiscord<Phil> That explains why constructing widgets in Owlkettle can use the syntax it does
09:23:58FromDiscord<Elegantbeef> But it's very much not the most ideal way of scripting programs if you want to have long lasting environment
09:24:01FromDiscord<Phil> I thought the fact I can do resize = false inside the constructor as well as the block following the widget was some kind of owlkettle macro magic
09:24:11FromDiscord<Phil> (edit) "I thought the fact I can do resize = false inside the constructor ... as" added "of a Paned Widget"
09:24:22FromDiscord<jmgomez> In reply to @Elegantbeef "Nimscript is a nice": any limitations in terms of interoping with cpp? Is it correct to assume that as long as you pass over the nim symbols, funcs should be available?
09:24:27FromDiscord<Elegantbeef> Yep Nim parses it just fine
09:24:34FromDiscord<Elegantbeef> That was to phil 😄
09:24:56FromDiscord<Elegantbeef> If you send the hooks across the VM it will work fine
09:25:05FromDiscord<Elegantbeef> You need nimcall thunks though
09:25:26FromDiscord<Phil> God damn nim supports a wide-range of syntax
09:25:49FromDiscord<jmgomez> cool, thanks for the info!
09:28:42FromDiscord<Rika> In reply to @Isofruit "God damn nim supports": I sure hope you know about `do` then
09:29:10FromDiscord<Elegantbeef> Wait until they learn that macros can use user defined `else`
09:29:26FromDiscord<Elegantbeef> https://github.com/beef331/nimtrest/blob/master/staticcases.nim#L59-L79
09:32:50FromDiscord<Phil> In reply to @Rika "I sure hope you": I know of its existence and maybe used it like once or twice in passing, or rather started using code-pieces that contain it that I copy-pasted from beef
09:33:08FromDiscord<Elegantbeef> Do is doo doo
09:33:22FromDiscord<ringabout> `git reset --soft $(git merge-base devel HEAD)` is handy, I use it to get a clean commit message https://github.com/nim-lang/Nim/pull/21342
09:33:23FromDiscord<Phil> voo: doo
09:33:49FromDiscord<Elegantbeef> I just rebase like a neanderthal i am
09:34:02FromDiscord<Elegantbeef> `git rebase -i HEAD~x` is too simple
09:34:19FromDiscord<Elegantbeef> I guess `git amend` also could work for single commits
09:34:26FromDiscord<Phil> In reply to @ringabout "`git reset --soft $(git": That looks fast
09:34:39FromDiscord<Phil> And yeah, I do git amend
09:34:59FromDiscord<ringabout> Yeah, though I have too many silly commit message from https://github.com/nim-lang/Nim/pull/20897, so I would rather discard them all at once.
09:35:17FromDiscord<ringabout> (edit) "I have" => "it has" | "message" => "messages"
09:35:30FromDiscord<Elegantbeef> Yea i'd squash and edit it cause like i said i bash rock with rock to make other rock not rock
09:39:37FromDiscord<Elegantbeef> Hmph when it uses vtables that makes interfaces easier
09:40:37FromDiscord<Elegantbeef> Actually one still i guess needs to make it do a method call
09:40:54FromDiscord<Elegantbeef> Hard to do from user code but not too crazy from compiler
09:41:02FromDiscord<Elegantbeef> the opposite of `procCall` could exist
09:41:52FromDiscord<ringabout> I agree. I'm testing whether it is worth storing the vtables to a global static array of function pointers instead of fields of objects.
09:42:00FromDiscord<Elegantbeef> \Idea being that you could do like `methodCall(methodName, someTypeErasedReference, ...)`
09:42:37FromDiscord<Elegantbeef> I'd say having it global makes the most sense
09:43:19FromDiscord<Elegantbeef> Now just if we could get the actual type name at a upcasted pointer 😄
09:43:23FromDiscord<ringabout> Yeah, it is feasible.
09:44:40FromDiscord<Elegantbeef> Damn using a vtable makes life so much better in many regards
09:45:24FromDiscord<Elegantbeef> Thinking about somehow attaching things like `$` in the vtable
09:45:27FromDiscord<Elegantbeef> Though that requires new language features
09:50:01FromDiscord<⚶ Zeno> whats difference between .nim and .nimscript ?
10:03:55FromDiscord<Phil> In reply to @⚶ Zeno "whats difference between .nim": .nim is an actual nim file that has full access to all libs and nim syntax
10:04:01*uics joined #nim
10:04:42FromDiscord<Phil> nimscript is a subset of nim that gets evaluated by nims "vm" that it uses at compiletime.↵It has an additional module for easy OS interaction (copying files, moving files, etc., the basic system operation stuff)
10:05:08FromDiscord<Phil> But nimscript can not use some libraries because their code cannot be evaluated solely by the VM
10:05:22FromDiscord<Phil> Nimscript also doesn't get compiled to a binary
10:05:39FromDiscord<Phil> To play around with nimscript, just use nim secret, that's the VM I'm talking abuot
10:05:41FromDiscord<Phil> (edit) "abuot" => "about"
10:06:16FromDiscord<Phil> (edit) "nimscript is a subset of nim that gets evaluated by nims "vm" that it uses at compiletime.↵It has an additional module for easy OS interaction (copying files, moving files, etc., the basic system operation stuff) ... " added "that normally you'd use std/os for but nimscript can't use a lot of std/os so that works as a replacement"
10:06:31FromDiscord<Phil> (edit) "But nimscript" => "Nimscript"
10:07:18FromDiscord<Phil> Nimscript basically is the thing you're mostly using for build-scripts etc.↵For your actual application you'll just use nim and compile that to a binary
10:07:33FromDiscord<⚶ Zeno> i see
10:07:36FromDiscord<⚶ Zeno> alright thanks
10:10:42FromDiscord<Phil> sent a long message, see https://paste.rs/Qth
10:10:45FromDiscord<Phil> All with just the command `nimble local_deploy`
10:10:58FromDiscord<Phil> No complicated bash script needed, all just nim syntax
10:11:12*jmdaemon quit (Ping timeout: 248 seconds)
10:11:50FromDiscord<Phil> (edit) "http://ix.io/4nrA" => "http://ix.io/4nrD"
10:11:54FromDiscord<Phil> (edit) "http://ix.io/4nrD" => "https://paste.rs/tag"
10:20:45*oddish quit (Remote host closed the connection)
10:26:28*uics quit (Remote host closed the connection)
10:26:48*uics joined #nim
10:27:26*uics quit (Remote host closed the connection)
10:47:01*uics joined #nim
11:14:55*ltriant quit (Ping timeout: 252 seconds)
11:50:37*xet7 quit (Quit: Leaving)
11:55:35FromDiscord<kaddkaka> Nimscript sounds practical. Is it a novel idea for nim or are there other languages that have similar subsets?
12:00:40*ltriant joined #nim
12:01:26FromDiscord<auxym> rust macros, recent c++ has constexpr. But personally I'm not aware of any language which gives you basically full access to an identical language for compile time evaluation of constants (and AST macros).
12:06:37*ltriant quit (Ping timeout: 268 seconds)
12:15:47FromDiscord<konsumlamm> most lisps have that
12:21:55FromDiscord<Rika> Long time no see
12:22:08FromDiscord<Rika> Or maybe I’m just too inactive nowadays
12:34:44FromDiscord<jmgomez> The thing that still blows my mind with Nim is that’s statically checked. If one day we have the proper tooling to really showcase that it can be a game changer
12:42:20*xet7 joined #nim
12:44:01FromDiscord<Phil> In reply to @jmgomez "The thing that still": That what is statically checked? Nimscript itself?
12:45:34FromDiscord<Phil> In reply to @kaddkaka "Nimscript sounds practical. Is": I'll say it like that:↵I'm not familiar with any similar concept for java, groovy, JS/TS or python. So I think it's a more niche-y concept (?)
12:46:22FromDiscord<Phil> Actually nevermind, I'm an idiot, such a language only makes sense for compiled languages
12:46:31FromDiscord<Phil> (edit) "Actually nevermind, I'm an idiot, such a ... language" added "scripting"
12:46:41FromDiscord<Phil> (edit) "Actually nevermind, I'm an idiot, such a scripting language only makes sense for compiled languages ... " added "and c++/rust have it as auxym pointed out"
12:46:55FromDiscord<Phil> (edit) "c++/rust" => "c++/rust/lisp-langs" | "c++/rust/lisp-langshave it as auxym ... pointed" added "and konsumlamm"
13:00:21FromDiscord<jmgomez> In reply to @Isofruit "That what is statically": I mean the combination of heavy AST modification + static checking. I think Zig and Rust (?) share that trait but not sure as I didnt look into Zig neither Rust macros
13:07:28FromDiscord<Rika> Rust macros are token based IIRC
13:12:32*dropkick joined #nim
13:34:50*uics quit (Remote host closed the connection)
13:40:27FromDiscord<Nerve> Since we're on scripting languages, I'm just curious, who here has checked out Janet? It's a Lispy scripting language, aesthetically resembles Clojure (with data structure literals and all), and is designed to fit niches Python and Lua do, with a bit of an emphasis towards Lua. Case in point: Much like Nim, the Janet build tool can actually bundle your scripts with the interpreter and runtime into a single dependency-free executable. Built
13:41:07FromDiscord<Nerve> (edit) "Since we're on scripting languages, I'm just curious, who here has checked out Janet? It's" => "sent" | "Lispy scripting language, aesthetically resembles Clojure (with data structure literals and all), and is designed to fit niches Python and Lua do, with a bit of an emphasis towards Lua. Case in point: Much like Nim, the Janet build tool can actually bundle your scripts with the interpreter and runtime into a single dependency-fr
13:42:00FromDiscord<Nerve> In my testing it also quite nicely tends to be roughly twice as fast as Python for the same tasks. Not crazy, but to get the flexibility of Lisp and a speedup is pretty nice.
13:50:56*oddish joined #nim
13:51:30FromDiscord<jmgomez> Never heard of it, it looks cool. But why would you prefer it over NimScript (assuming the use case that you have already a Nim app and you want to script it)
13:54:42*uics joined #nim
13:58:17*uics left #nim (#nim)
14:01:21*ltriant joined #nim
14:04:28FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4nsB
14:07:13*ltriant quit (Ping timeout: 252 seconds)
14:14:12*rockcavera joined #nim
14:17:37FromDiscord<pyolyokh> <https://nim-lang.org/docs/manual.html#statements-and-expressions-when-nimvm-statement>↵first branch: compile time↵second branch: runtime↵and the runtime branch can't be compiled because it refers to procs that aren't available in the target that you're compiling to
14:20:22FromDiscord<pyolyokh> at a glance, stdlib uses `when defined(nimscript)` for what you're trying to do here
14:23:39FromDiscord<sOkam!> @pyolyokh that worked, tysm. was really stuck with this 🙏↵what i don't quite follow is that using `when nimvm` in a nimscript file forks into the true version, but this other situation didnt↵i guess its because it will run the nimvm option, but tries to interpret both? 🤔
14:25:04FromDiscord<pyolyokh> I'd explain it as, it compiles two functions and runs one at runtime and one at compile time. So both functions need to be valid
15:04:15*arkurious joined #nim
15:26:57FromDiscord<Nerve> In reply to @jmgomez "Never heard of it,": Not addressing that use case, just curious if anyone's used it for any other purpose
15:31:50*ehmry joined #nim
15:43:25FromDiscord<eyes> hey quick question- how do people go about using a single logger throughout a large project
15:43:38FromDiscord<eyes> without passing in a reference to the logger object into every proc
15:44:24FromDiscord<eyes> i tried declaring a logger in one file, exporting it with , and importing it in many places, but that didnt seem to work as I expected
15:44:44*jmdaemon joined #nim
15:45:57FromDiscord<Rika> it should
15:46:00FromDiscord<Rika> what was the problem
15:46:33FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4nt3
15:46:54FromDiscord<sOkam!> (edit) "https://play.nim-lang.org/#ix=4nt3" => "https://play.nim-lang.org/#ix=4nt4"
15:49:46FromDiscord<eyes> sent a code paste, see https://play.nim-lang.org/#ix=4nt5
15:50:03FromDiscord<eyes> i get a undeclared identifier error for ``log``
15:50:17FromDiscord<eyes> which is odd, i thought that was defined withing ``std/logging``
15:50:34FromDiscord<Rika> your file should not be the same name as the variable
15:50:53FromDiscord<Rika> otherwise you would need to do `log(logger.logger, ...)`
15:51:04FromDiscord<Rika> i dont even think that would work
15:51:28FromDiscord<Rika> the issue is basically the import name and the variable name yeah
15:51:30FromDiscord<eyes> ahhh
15:53:03FromDiscord<eyes> yeah that fixed it thank you
15:54:35FromDiscord<Rika> 👌
15:56:00FromDiscord<ShalokShalom> In reply to @jmgomez "I mean the combination": Julia can do the static checking
15:56:27FromDiscord<ShalokShalom> It does not by default, and has a quite interesting type system
15:56:35FromDiscord<ShalokShalom> And it's macro's are very good
15:57:28*jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in)
15:57:47*jmdaemon joined #nim
15:58:30FromDiscord<jmgomez> Didnt know Julia allows you to modify the AST. That's good to know!
16:08:30*jmdaemon quit (Ping timeout: 260 seconds)
16:10:50*jmdaemon joined #nim
16:28:58FromDiscord<deech> The last I tried them, Rust's macros are just a token stream, so you're not really modifying the ast, but transforming tokens to ast (I think), it's probably closer to basic Nim templates than macros. Zig expressly does not have macros.
16:30:24FromDiscord<deech> And unlike Nim you have no type information available at macro expansion time. It's just a syntactic transform.
16:35:24FromDiscord<ShalokShalom> In reply to @jmgomez "Didnt know Julia allows": it's probably the closest to Nim, outside of Lisps, that I know about. ↵↵Julia looks like a really cool language↵It's ecosystem is hardly anything other than for science, is my feeling 😅
16:35:34FromDiscord<I have 50GB of gay porn on my PC> 👉👈 nim 2.0 and nimsuggest impovements when?
16:36:00FromDiscord<I have 50GB of gay porn on my PC> appereantly all 2.0 tasks are "complete" on github
16:37:51FromDiscord<jmgomez> In reply to @deech "The last I tried": ah thanks, never really looked at it. I just knew that it allows you to do compile time stuff and I assumed it may be similar to Nim
16:39:11FromDiscord<jmgomez> In reply to @I have 50GB of gay porn on my PC "👉👈 nim 2.0 and": AFAIK that will happen after 2.0 with IC
16:40:32FromDiscord<deech> One thing I really like about working with token streams instead of the ast is that you don't have to generate syntactically valid code. Nim macros are a real pain to debug when you can't even macroexpand due to a syntax problem which is very easy to do when working with NimNode's.
16:41:51FromDiscord<deech> (edit) "a" => "bad" | removed "problem"
16:46:00FromDiscord<jmgomez> But then do you have to parse the tokens? Or how do you know what's going on? Can you introspect them?
16:46:23FromDiscord<deech> Lots and lots of `echo blah.repr`. 😦
16:46:46FromDiscord<jmgomez> I mean on the token streams based \
16:46:53FromDiscord<jmgomez> (edit) removed "\"
16:47:21FromDiscord<deech> Oh you mean in Rust? You just splice them in place, it's like passing `untyped` arguments to a template.
16:48:08FromDiscord<jmgomez> In reply to @deech "Lots and lots of": yeah, but it isnt that bad. I usually setup the env so it compiles fast and it's almost like a repl
16:48:58FromDiscord<jmgomez> In reply to @deech "Oh you mean in": then there is no equivalent to getImpl()
16:49:00FromDiscord<jmgomez> right?
16:49:11FromDiscord<deech> It's not insurmountable but not great either. A "tokenExpand" or something would save me heaps of time.
16:49:20FromDiscord<I have 50GB of gay porn on my PC> In reply to @deech "One thing I really": it's easy enough to use static string to get a token stream
16:50:04FromDiscord<I have 50GB of gay porn on my PC> but then there's no obvious way to error out on a specific line and column, unlike when you have a node
16:50:57FromDiscord<deech> In reply to @jmgomez "then there is no": There's a third party lib (https://crates.io/crates/syn) that basically re-parses everything so you can get a crippled version of it and then only for types you own.
16:55:23FromDiscord<deech> Nim really needs built in pattern matching and exhaustiveness checking over a dedicated sum/product type construct. Object variants are too flexible for static analysis.
16:56:59FromDiscord<jmgomez> agree, I would be happy for the time being if at least fusion/matching worked
16:58:04FromDiscord<ShalokShalom> One user reported, that patty seems to be broken, with overloadable enums since it hasn't been updated
16:58:52FromDiscord<ShalokShalom> https://github.com/haxscramper/hmatching
16:58:59FromDiscord<ShalokShalom> This seems like the most up to date
16:59:12FromDiscord<deech> In reply to @jmgomez "agree, I would be": IMO it has too many features, but yes, something officially supported would be better than the current state.
16:59:19FromDiscord<ShalokShalom> And was also in discussion to become the build in solution
17:35:05FromDiscord<haxscramper> Some subset of features can be added into official solution
17:59:33FromDiscord<4zv4l> can I create a proc inside a proc ?
18:04:37FromDiscord<huantian> Yes
18:04:58*ltriant joined #nim
18:08:40FromDiscord<rakgew> sent a long message, see http://ix.io/4ntK
18:11:00*ltriant quit (Ping timeout: 260 seconds)
18:32:14*jmdaemon quit (Ping timeout: 260 seconds)
18:35:56FromDiscord<BobBBob> Does try/except not have an else statement?
18:38:02FromDiscord<Nerve> In reply to @rakgew "https://play.nim-lang.org/#ix=4ntJ trying to": Hm, I've done this exact thing and had no issues without using any pragmas. Just a const table associating string names to procs, and I dereference the table with parameters to call.
18:40:40FromDiscord<Phil> In reply to @BobBBob "Does try/except not have": You mean a "finally" that runs every time regardless of success or failure?
18:41:43FromDiscord<jtv> No, one that runs only if no exception is thrown
18:41:52FromDiscord<BobBBob> sent a code paste, see https://play.nim-lang.org/#ix=4ntY
18:42:42FromDiscord<Phil> I don't think there is one
18:43:26FromDiscord<Phil> Shouldn't be super hard to to implement via templates
18:43:39FromDiscord<Phil> (edit) "templates" => "templates, so I think there might be a lib for it"
18:44:26FromDiscord<BobBBob> well how does everyone else do what I tried
18:46:09FromDiscord<Phil> Haven't had the scenario happen to me yet.↵At a first glance I think I'd just keep that code inside the try statement or return in the except statement (assuming it isn't supposed to re-raise)
18:46:26FromDiscord<Phil> (edit) "re-raise)" => "re-raise a different exception)"
18:46:31FromDiscord<rakgew> sent a code paste, see https://play.nim-lang.org/#ix=4ntZ
18:47:33FromDiscord<Phil> Yeah, roughly like that, though imo the returns could have explicit bools attached to not rely on nim's implicit instantiation, but that's a super subjective thing on my end
18:48:24FromDiscord<rakgew> agreed an explicit return would be nicer.
18:49:51*derpydoo joined #nim
18:55:42FromDiscord<BobBBob> I could just put a continue in each except then put a break at the end of the while but I just thought that was kinda ugly
18:58:02FromDiscord<BobBBob> Also why do I have to use newException to raise custom exceptions? if I just use raise it gives "Error: only a 'ref object' can be raised" even if the exception type is a ref object
18:59:07*jmdaemon joined #nim
18:59:17FromDiscord<jtv> Error messages in nim suck. If it's a ref object that has the right base class you don't need newException
18:59:44FromDiscord<BobBBob> Oh so I cant just use of Exception
19:01:08FromDiscord<BobBBob> it says that in the manual 🙄
19:01:21FromDiscord<BobBBob> (edit) "it says ... that" added "you can do"
19:01:57FromDiscord<BobBBob> or actually it says to do of Exception then use raise newException
19:03:18FromDiscord<BobBBob> no changing them to "ref object of ValueError" still doesnt work
19:06:38FromDiscord<Elegantbeef> you do `raise (ref MyException)(msg: "", otherStuff: ...)`
19:07:06FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nu6
19:20:22FromDiscord<Hourglass [She/Her]> Anyone know a decent UI/GUI library in Nim that can be compiled to WASM?
19:33:00FromDiscord<rakgew> thx Nerve - very good to know, that it should actully work. is your version somewhere in a public repo/snippet by any chance?↵(@Nerve)
19:40:38FromDiscord<Hourglass [She/Her]> In reply to @Hourglass, When the Hour Strikes "Anyone know a decent": Alternatively, anything wrapping the canvas API to make it more bearable in Nim?
19:43:59*azimut quit (Ping timeout: 255 seconds)
19:48:34Amun-RaSDL2?
19:48:42Amun-Raworks ootb
20:22:34FromDiscord<Phil> Do we have docs on choosenim? Other than the redme?
20:23:22FromDiscord<Phil> (edit) "redme?" => "readme?"
20:23:26FromDiscord<Elegantbeef> There's the greenme aswell
20:23:43FromDiscord<Elegantbeef> The answer is no there are no other docs that i know of
20:30:13FromDiscord<Hourglass [She/Her]> Greenme?
20:33:55FromDiscord<Phil> I wrote "redme" initially
20:33:58FromDiscord<Phil> Was a joke
20:34:41*ltriant joined #nim
20:36:51FromDiscord<Phil> sent a long message, see http://ix.io/4nuy
20:37:29FromDiscord<Phil> (edit) "http://ix.io/4nuy" => "https://paste.rs/kcl"
20:38:16FromDiscord<Elegantbeef> Likely should either publish a fork, or subsume the fork into norm
20:38:51FromDiscord<Phil> by subsume you mean have the fork as a separate sibling repository to norm under moigagoo's user (he's the creator of norm) ?
20:39:09FromDiscord<Elegantbeef> I mean put the code directly in Norm if it makes sense to be the only consumer of it
20:39:10*uics joined #nim
20:39:28*ltriant quit (Ping timeout: 248 seconds)
20:39:58FromDiscord<Phil> Ah, check.↵I think for now I'll go for publishing the fork. Imo ndb is generally a decent base to build an ORM off of because it properly represents NULL instead of returning it as empty string
20:40:25FromDiscord<Phil> I wouldn't want to make that unavailable for folks wanting to build something on top of it in nim 2.0 and future
20:41:19FromDiscord<amadan> Publish fork is good idea↵I use your fork anyways in one of my projects lol
20:41:40FromDiscord<Phil> TFW people actually use forks of mine
20:41:45FromDiscord<Elegantbeef> Nimble directory schmible directory
20:46:56FromDiscord<Saint> So I was just browsing some python repo on github, and I could easily see that some function was located in a library and I was able to look up that library
20:47:05FromDiscord<Saint> This would be impossible in nim - is that okay? Is that a limitation?
20:47:17FromDiscord<Saint> I know this convo has been done to death but just wondering if there's a way around that or not
20:48:05FromDiscord<Phil> It's not that it's impossible in nim, like 50% of the time in VSCode I can actually follow a proc to the package that implements it and stare at the source-code, it's just that the tooling isn't quite there
20:48:14FromDiscord<Phil> (edit) "It's not that it's impossible in nim, like 50% of the time in VSCode I can actually follow a proc to the package that implements it and stare at the source-code, it's just that the tooling isn't quite there ... " added "to do it perfectly consistently"
20:48:41FromDiscord<Phil> (edit) "It's not that it's impossible in nim, like 50% of the time in VSCode I can actually follow a proc ... to" added "(by CTRL + Click on proc name)"
20:48:54FromDiscord<Phil> Why that is I couldn't tell you
20:49:02FromDiscord<Phil> (edit) "you" => "you, I assume nimsuggest issues"
20:49:27FromDiscord<deech> In reply to @Saint "So I was just": GH has special code navigation tooling for Python (https://github.blog/2021-12-09-precise-code-navigation-python-code-navigation-pull-requests/).
20:49:27FromDiscord<Saint> It's not just about the ide/lsp, I mean that I could just tell by looking at the raw text in github on a project
20:49:35FromDiscord<Elegantbeef> It's not impossible in Nim you can do `myModule.proc(...)` all day long
20:50:00FromDiscord<Saint> Yeah but that's not the convention and no one really does it
20:50:38FromDiscord<Elegantbeef> By why would you want to
20:51:08FromDiscord<Saint> In reply to @deech "GH has special code": Interesting!
20:51:14FromDiscord<deech> The short answer is not really. Small community, funding, niche language, tooling isn't fun to work on etc. etc.
20:51:23FromDiscord<Saint> In reply to @Elegantbeef "By why would you": Just so you know where methods are coming from
20:51:37FromDiscord<Saint> If I see a function call in nim I have no idea where it is defined
20:51:44FromDiscord<Phil> Ah, you meant GH features, my bad I missunderstood
20:51:54FromDiscord<Saint> In reply to @Isofruit "Ah, you meant GH": No I didn't mean GH features
20:52:07FromDiscord<Elegantbeef> It makes your code less expressive and harder to read
20:52:27FromDiscord<Phil> Was this not about following symbols to their point of definition, but via a github user interface?
20:52:33FromDiscord<Saint> I just meant that if I'm reading some code on GH, and it's in python I can tell where code is comign from but with nim I will have no idea and would have to git clone it first
20:52:58FromDiscord<Saint> I mean that would be cool too, it's more just like having to rely on external tools vs not
20:53:03FromDiscord<Phil> Ohhhh now I get it, the fact you have to guess at which of the modules imports a given proc
20:53:10FromDiscord<Saint> Yeah exactly
20:53:15FromDiscord<Phil> (edit) "Ohhhh now I get it, the fact you have to guess at which of the modules imports ... a" added "provides"
20:53:21FromDiscord<Elegantbeef> instead of something like `{'a'..'z'} in myString` you do `strutils.contains(myString, {'a'..'z'.}))`
20:53:22FromDiscord<Elegantbeef> Is this a benefit to readabillity? Who knows
20:53:22FromDiscord<Elegantbeef> Yes then also types
20:53:23FromDiscord<rakgew> or easier to read, in case you want to know where the proc is from..
20:53:23FromDiscord<Elegantbeef> I personally do not think where a procedure comes from matters, but I also only write Nim now
20:53:23FromDiscord<Elegantbeef> You should do `var a: mymodule.type` like it's C++/Rust 😄
20:53:24FromDiscord<rakgew> but on the other hand one would loose a part of the nice ucs
20:53:52FromDiscord<rakgew> I remember when I started with nim coming from py, I was quite annoyed I would not know where things are from.
20:54:10FromDiscord<Phil> You may also just do a lot of qualified imports `from X import lots of things`
20:54:12FromDiscord<Elegantbeef> I mean that's the point of the import statements
20:54:45FromDiscord<Phil> But that will break your neck for all the places where some generated proc is trying to bind another proc provided by another module and it's not immediately visible in the source
20:54:55FromDiscord<Phil> (edit) "proc" => "code"
20:54:59FromDiscord<Phil> (edit) "proc" => "symbol"
20:54:59FromDiscord<Elegantbeef> Ostensibly if I have `Url` and I import `webby` i'm using webby's Url
20:55:09FromDiscord<rakgew> right, one could do more qualified imports.
20:55:40FromDiscord<Phil> I mean, it is a fair point beef. There's a very clear tradeoff. Like, I've found myself questioning where the implementation of the proc that's getting used there was coming from more than once
20:55:50FromDiscord<rakgew> but if it is not qualified, it is not clear just from the source where things might be from.
20:56:13FromDiscord<Phil> And in case you've got overloads from different modules (because the setup for extendability was chosen that way) that isn't actually all that easy to figure out
20:56:16FromDiscord<Elegantbeef> If you're reading a statically compiled language without tooling, what are you doing is always what it comes to me
20:57:00FromDiscord<Elegantbeef> I cannot think of any instance except referring to code in browser that it makes sense to have no tooling
20:57:29FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4nuH
20:57:43FromDiscord<Phil> assuming both myproc variations have different signatures
20:57:51FromDiscord<rakgew> well I read source in a book like "mastering nim" I have no tooling.
20:58:50FromDiscord<rakgew> @Phil right, then one would probably start with aliasing things..?
20:59:15FromDiscord<Elegantbeef> Given i dont have that book I cannot comment on the content
20:59:31FromDiscord<rakgew> (-\:
20:59:58FromDiscord<Phil> In reply to @rakgew "<@180601887916163073> right, then one": That might cause problems if some of your code relies on overloads, think of json'y `parseHook` that works by overloading that proc a bunch of times
21:00:06FromDiscord<Phil> (edit) "json'y" => "jsony's"
21:00:30FromDiscord<Elegantbeef> Yea you need that `myProc` named properly so mixins work
21:00:31FromDiscord<rakgew> hm, true.
21:01:07FromDiscord<Elegantbeef> I just think the cases that most people bring up where this causes reading issues is always like "Imagine you're reading a PR on the toilet with a phone that has 3 lines that are 3 columns wide"
21:02:13FromDiscord<Phil> A solution that works for everything is either go for `module.proc`, abandon UCS and any case in your code where you don't prefix with `module` it immediately becomes clear that you're doing a play with overloads
21:02:37FromDiscord<Phil> OR you live with having to search a bit to figure out where a proc comes from
21:02:47FromDiscord<Elegantbeef> And now we have `if strutils.contains(myString, {'a'..'z'})` instead of `{'a'..'z'} in myString`
21:03:28FromDiscord<Phil> In reply to @Elegantbeef "And now we have": Yeah, that's the price you'd be paying: Less precise expression of what applies to what else in exchange for knowing at a glance the location that provided the proc
21:03:29FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nuK
21:03:42FromDiscord<Phil> And more convoluted code generally
21:03:54FromDiscord<Phil> There's a reason not even java asks that of you
21:04:18FromDiscord<Phil> Actually never mind, they do since everything's a class and classes do 1:1 correspond to files
21:04:26FromDiscord<Phil> I abandon my case, java does it, that's still a bad idea
21:05:37FromDiscord<Elegantbeef> I just think that the cases where there is ambiguity where a procedure comes from appear cause there is static ambiguity
21:06:01FromDiscord<Elegantbeef> If you `import std/strutils` one can assume that any non system string operations are coming from there
21:07:00FromDiscord<Elegantbeef> If it's unclear in a specific case you can always alias those procedures, or selectively import what you're using
21:07:10FromDiscord<Elegantbeef> It's more likely to be clear than unclear in my experience
21:15:10FromDiscord<kaddkaka> nim uses this syntax `import std/[strutils, sequtils]` to import several modules that share a parent. DO you have any opinions on this syntax? good? bad?↵I'm thinking of doing some hierarchical categorisation of a test suite, and I'm thinking if I should use something similar
21:15:23FromDiscord<Elegantbeef> It's idiomatic
21:15:51FromDiscord<Elegantbeef> Though due to parsing i think you need to do `"." / [moduleA, moduleB]`
21:15:58FromDiscord<Elegantbeef> Or is that for `".."`
21:16:00FromDiscord<Elegantbeef> I forget
21:17:56FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4nuO
21:18:23FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nuP
21:19:20FromDiscord<kaddkaka> In reply to @Elegantbeef "Though due to parsing": due to parsing? Hmm, what do you mean?
21:19:57FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4nuQ
21:20:09FromDiscord<Elegantbeef> Fuck element correcting my codeblocks due to three backticks followed by an emoji!
21:20:13FromDiscord<rakgew> well @Phil 's non-indented import is source code friendlier I guess.
21:20:52FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4nuR
21:21:02FromDiscord<kaddkaka> In reply to @rakgew "well <@180601887916163073> 's non-indented": friendlier in what sense? `git diff`? `git diff --word-diff`?
21:21:06FromDiscord<rakgew> I mean the not allowed trailing comma in indented imports.↵they read nicer though..
21:21:11FromDiscord<Elegantbeef> I believe `../` or `./` is parsed/processed incorrectly to not be relative or parent
21:21:11FromDiscord<Elegantbeef> I forget which
21:21:11FromDiscord<Elegantbeef> I think it's `./`
21:21:12FromDiscord<Elegantbeef> I am phil
21:21:12FromDiscord<Elegantbeef> I dislike a shit load of `let`s
21:21:53FromDiscord<Phil> Shit load of lets are superior over forcing my eyes to scan when the declaration block ends!
21:22:57FromDiscord<Phil> I also don't like how it sort of promotes the habit of having all your declarations in one block as opposed to closest to the place where they're needed contextually
21:23:53FromDiscord<Elegantbeef> It doesnt though phil
21:23:56FromDiscord<rakgew> @kaddkaka in the non indented one can easily remove the last import and have a single line change in git diff, whereas removing last import from indeted import one gets 2 line changes.. (-;
21:25:25FromDiscord<rakgew> good point.↵(@Phil)
21:25:29FromDiscord<kaddkaka> that's what word-diff is for 🙂
21:26:25FromDiscord<kaddkaka> (or canonicalizing (aka black/go-formatting) before diffing 😉 )
21:26:36FromDiscord<kaddkaka> (edit) "(or canonicalizing (aka black/go-formatting) before diffing 😉 ) ... " added "(Why isn't this a thing yet?)"
21:26:45FromDiscord<kaddkaka> (edit) "yet?)" => "(yet)?)"
21:27:34FromDiscord<kaddkaka> In reply to @rakgew "<@185793553539137537> in the non": see reply above ^
21:31:12*ltriant joined #nim
21:31:38FromDiscord<Phil> In reply to @Elegantbeef "I believe `../` or": IIRC you can't do ./[multiple, imports] nor can you do ../[multiple, imports]↵I think I remember doing ../othermodule/[multiple, imports] though
21:32:11FromDiscord<kaddkaka> Is ` ../othermodule/[multiple, imports]/basic` possible?
21:32:54FromDiscord<Phil> No idea
21:33:04FromDiscord<Phil> Never ever even tried that one
21:33:16FromDiscord<Phil> I wouldn't even know what it'd want to express
21:34:31FromDiscord<Elegantbeef> No that is not
21:36:26FromDiscord<eyes> quick how do i do logical AND
21:36:38FromDiscord<Elegantbeef> `and`
21:36:42FromDiscord<eyes> bruh
21:36:45FromDiscord<Elegantbeef> Quck give me $300
21:36:53FromDiscord<eyes> dies\
21:37:10FromDiscord<Phil> In reply to @Elegantbeef "Quck give me $300": `not`
21:37:38FromDiscord<eyes> the reason i didnt think it was ``and`` is because it didnt get highlighted when i wrote it in vim
21:37:46FromDiscord<eyes> whereas ``not`` and ``notin`` do
21:37:48FromDiscord<eyes> cringe
21:42:21FromDiscord<kaddkaka> I have highlighted `and`, but it might be because of `Plug 'alaviss/nim.nvim'`
21:42:39FromDiscord<kaddkaka> (edit)
21:50:33FromDiscord<antonio_michelle> Enjoy profitable forex/cryptocurrency income and earn up to $30,000.00 within 5 days, not only interested people should ask me how↵https://t.me/+BQlhudqWXGk1MWY0
21:55:20FromDiscord<Phil> In reply to @antonio_michelle "Enjoy profitable forex/cryptocurrency income": <@&371760044473319454> Crypto scam scum
22:12:48*arkurious quit (Ping timeout: 248 seconds)
22:16:47*arkurious joined #nim
22:18:06FromDiscord<jmgomez> if you have a nim file that produced a obj file via a c/cpp and to produce it used an external header (with the header pragma). If the header changes, Nim doesnt recompile the affected files because the hash is based on the cpp (not sure about this). Is this the expected behaviour? If so, any way to force it?
22:25:45*uics quit (Remote host closed the connection)
22:26:20*uics joined #nim
22:28:58*Batzy quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
22:30:12*Batzy joined #nim
22:33:03*dropkick quit (Quit: Leaving)
22:42:11FromDiscord<Elegantbeef> you can provide `-f` or `--forceBuild:on`
22:44:26FromDiscord<jmgomez> In reply to @Elegantbeef "you can provide `-f`": but that will end up building everything, even for those files that dont use the header
22:45:52FromDiscord<jmgomez> I guess I will need to keep track of them manually. My issue is that I get a linker issue when recompiling and deleting a virtual function if the user deletes the virtual function implementation
23:03:10*beholders_eye joined #nim
23:03:39*derpydoo quit (Ping timeout: 248 seconds)
23:08:47FromDiscord<Elegantbeef> I do have to say making this MR for wine, Nim is much nicer for PRs no one argues how to format an if statement 😄
23:10:37FromDiscord<leorize> does wine not use clang-format?
23:11:21FromDiscord<I have 50GB of nothing on my PC> which library should I use for a http server?
23:12:13FromDiscord<Elegantbeef> I do not know leo
23:12:24FromDiscord<Elegantbeef> I do not write C ever
23:12:31FromDiscord<Elegantbeef> This is really the first time i've written C
23:12:51FromDiscord<leorize> well, `clang-format` and `clang-tidy` is just magic
23:13:27FromDiscord<Elegantbeef> Uh oh bos joining
23:13:29FromDiscord<Elegantbeef> bots
23:13:38FromDiscord<Elegantbeef> SOmeone get a mtrix mod
23:14:10FromDiscord<Elegantbeef> Wait this might be gitter migration?
23:16:58FromDiscord<Elegantbeef> Could they have made this any less intrusive
23:16:59FromDiscord<leorize> how many were in our gitter instance damn it
23:17:00FromDiscord<leorize> it's gitter users
23:17:00FromDiscord<Elegantbeef> I think this is matrix culling off gitter so now they're real matrix users
23:17:01FromDiscord<leorize> what?
23:17:02FromDiscord<Elegantbeef> For context we're seeing a shitload of people joining on matrix
23:20:04FromDiscord<Elegantbeef> A couple
23:20:04FromDiscord<Elegantbeef> What were we talking about.... right C
23:20:04FromDiscord<leorize> they're done ig
23:20:05FromDiscord<Elegantbeef> C is not fun
23:20:05FromDiscord<Yepoleb> the bridge is still very slow
23:20:06FromDiscord<Yepoleb> rip
23:20:06FromDiscord<Yepoleb> why do you dislike C?
23:20:07FromDiscord<Elegantbeef> Doesnt help that matrix just ddos'd their home server
23:21:04FromDiscord<Elegantbeef> It's just so horrid to write and debug(yes debuggers exist, but i just need to print out X value) 😄
23:21:10FromDiscord<Yepoleb> do you always use print debugging?
23:21:24FromDiscord<Elegantbeef> I often use print debugging so going into C is just horrid
23:21:29FromDiscord<Yepoleb> yes
23:21:41FromDiscord<Elegantbeef> Plus it uses untyped ints for like 90% of things
23:21:41FromDiscord<Yepoleb> what debugger do you use for nim?
23:21:43FromDiscord<Elegantbeef> ah yes the protocol is `2`
23:21:51FromDiscord<Elegantbeef> 2 is a protocol yes!
23:22:12FromDiscord<Elegantbeef> When i rarely need to do break point debugging i use gdb
23:22:19FromDiscord<Yepoleb> the meaning of 2 is behind 3 layers of #define
23:22:22FromDiscord<Elegantbeef> But i hardly ever reach for a debugger in Nim
23:22:44FromDiscord<Elegantbeef> Since i can just `echo x` and get a majestic formatted version of the type
23:23:43FromDiscord<Yepoleb> i use gdb for both and it's more horrible for nim because of mangled names
23:24:58FromDiscord<Elegantbeef> Sure, but you also never really need to reach for a debugger with Nim ime
23:25:15FromDiscord<Elegantbeef> I write compiler code without a debugger cause a simple `echo node.kind` suffices 😄
23:25:30FromDiscord<Yepoleb> i do for crashes
23:25:38FromDiscord<Elegantbeef> I dont write code that crashes so checkmate
23:25:39FromDiscord<Yepoleb> segfaults and exceptions in release mode
23:25:39FromDiscord<Elegantbeef> 😛
23:25:52FromDiscord<Yepoleb> damn owned
23:26:14FromDiscord<Elegantbeef> I do one day intend on making nim capable of emitting debug procedures for the types
23:26:46FromDiscord<Elegantbeef> So that gdb uses something like `$` instead of how it presently works
23:27:01FromDiscord<Yepoleb> there is nim-gdb.py which was supposed to have that i think
23:27:10FromDiscord<Yepoleb> but it does not work anymore
23:27:16FromDiscord<Elegantbeef> I mean it does work
23:27:21FromDiscord<Elegantbeef> It just doesnt do it properly
23:27:41FromDiscord<Yepoleb> i get a lot of exceptions when using it
23:27:50FromDiscord<Yepoleb> python exceptions
23:27:50FromDiscord<Elegantbeef> The compiler just needs to emit a procedure per type and skip all the attempting to reason the type inside the python script
23:28:57FromDiscord<Elegantbeef> If instead of those pretty printers written in python the script called the Nim code for debugging the types, we'd be in a much better place with gdb
23:29:49FromDiscord<Yepoleb> would you do this with a compiler flag?
23:30:24FromDiscord<Elegantbeef> If you supply `--debugger:native` the Nim compiler should emit some extern `debug` procedures
23:31:37FromDiscord<Elegantbeef> Atleast in my happier world
23:31:38FromDiscord<Elegantbeef> This allows the pretty printers to be braindead, they grab the type then find the procedure of that type and call it
23:31:38FromDiscord<Elegantbeef> This would allow complex types and sets to just work
23:32:44FromDiscord<Yepoleb> sounds good
23:32:50FromDiscord<Yepoleb> i support your idea
23:33:12FromDiscord<Elegantbeef> Now if only someone implemented it
23:33:28FromDiscord<Yepoleb> we could kidnap someone
23:35:31FromDiscord<Yepoleb> i don't really know what nim debugging needs
23:35:57FromDiscord<Yepoleb> i also like print debugging whenever possible
23:36:13FromDiscord<Elegantbeef> Nim debugging really just needs to be able to print the actual Nim data
23:36:23FromDiscord<Elegantbeef> Which can be got when you use `extern` generated procedures in theory
23:36:47FromDiscord<Yepoleb> i think it also needs demangling that just works
23:36:48FromDiscord<Elegantbeef> All Nim types need to emit a `debug` procedure with that flag so you can debug specific values
23:36:56FromDiscord<Elegantbeef> You do not need demangling in my world
23:37:05FromDiscord<Elegantbeef> Cause the Nim compiler emits the debug logic
23:37:18FromDiscord<Elegantbeef> Which means it is statically known information
23:37:26FromDiscord<Elegantbeef> It's very much akin to if `$` actually existed for all types
23:37:29FromDiscord<Yepoleb> but printing values is not everything
23:37:43FromDiscord<Yepoleb> i also sometimes need backtraces
23:38:06FromDiscord<Yepoleb> and proc names and line numbers are very nice
23:38:41FromDiscord<Elegantbeef> Yea given i dont really use a debugger i do not know what that adds 😄
23:38:51FromDiscord<Elegantbeef> `writeStackTrace` works enough for me 😄
23:39:21FromDiscord<Yepoleb> release builds are also hard to debug
23:40:16FromDiscord<Yepoleb> which i know sounds a bit dumb, but some problems only show up with optimization
23:41:33FromDiscord<Yepoleb> didn't we want to shit on C though?
23:42:58FromDiscord<Elegantbeef> I already shit on C
23:42:59FromDiscord<leorize> but then the debug procs would mutate the program state \:p
23:43:11FromDiscord<Elegantbeef> Oh noes
23:44:26FromDiscord<Elegantbeef> Debuggable programs vs. worrying about enabling UB
23:45:14FromDiscord<Yepoleb> i think implementation or platform defined behavior is worse than UB
23:46:17FromDiscord<Yepoleb> oh, this is about the debugger
23:47:09FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1073027233435885588/image.png
23:47:11FromDiscord<Elegantbeef> Here we go C shit talking
23:47:16FromDiscord<Elegantbeef> Imagine if generics existed
23:47:42FromDiscord<leorize> this is more of\: imagine if template existed
23:47:52FromDiscord<Elegantbeef> It's a bit of both
23:48:12FromDiscord<Elegantbeef> Could be a generic that takes a pointer proc
23:50:08FromDiscord<Yepoleb> that's really awful
23:50:29FromDiscord<Elegantbeef> You're telling me, i'm just trying to get the protocol of a request in a cross platform way
23:51:12FromDiscord<Elegantbeef> Sadly only Linux implemented SO\_PROTOCOL for getsockopt
23:52:25FromDiscord<Yepoleb> i am confused
23:52:33FromDiscord<Yepoleb> the protocol of what request?
23:52:48FromDiscord<Elegantbeef> The protocol of a in process request on an opened socket
23:53:07FromDiscord<Elegantbeef> Windows apparently doesnt error when you send to port 0 with udp(and tcp?)
23:53:17FromDiscord<Elegantbeef> Linux errors, cause that's fucking dumb
23:53:37FromDiscord<Elegantbeef> No clue if any other posix systems that implement `sendmsg` error
23:53:57FromDiscord<Elegantbeef> Anyway point is one needs to see if it's a udp packet going to port 0 and skip over that data
23:54:17FromDiscord<Elegantbeef> In a cross platform way that works on all platforms wine supports
23:54:21FromDiscord<Yepoleb> why not reject it for all protocols?
23:54:30FromDiscord<Elegantbeef> Cause it's valid for some protocols
23:54:58FromDiscord<antonio_michelle> Enjoy profitable forex/cryptocurrency income and earn up to $30,000.00 within 5 days, not only interested people should ask me how↵https://t.me/+BQlhudqWXGk1MWY0
23:55:10FromDiscord<Yepoleb> fuck off
23:55:14FromDiscord<leorize> I though we have this nimbot thing with is mjolnir?
23:55:23FromDiscord<leorize> does no one operates it?
23:55:24FromDiscord<Elegantbeef> It's apparently missing
23:55:41FromDiscord<Yepoleb> is it valid for any IP protocols?
23:56:04FromDiscord<Elegantbeef> Seems icmp is fine with it
23:56:33FromDiscord<leorize> icmp doesn't do ports, right?
23:56:43FromDiscord<Elegantbeef> Do i look like i know what i'm doing? 😄
23:56:50FromDiscord<Yepoleb> yes
23:57:01FromDiscord<Yepoleb> you are my expert
23:57:04FromDiscord<Elegantbeef> I'm throwing darts at a problem that i found a fix for trying to get something that is accepted into wine
23:57:20FromDiscord<Elegantbeef> It's not going well cause i know next to nothing about network protocols
23:57:25FromDiscord<Elegantbeef> And i know less about C