<< 02-11-2021 >>

00:00:10FromDiscord<sealmove> Just more well defined spec through excessive testing, which might lead to slight language changes to make it more _correct_. At least that's my take.
00:01:08FromDiscord<evoalg> ok ... I guess I was trying to get a feel of the extent of where it says "Ultimately this will mean a different community, language, standard library, and much more."
00:02:35FromDiscord<sealmove> different community, though it doesn't have to be this way. Different language, no. Different standard library, kind of, yes.
00:02:36FromDiscord<Elegantbeef> Well features will be added/changed but the overall language will be "the same but different"
00:03:50FromDiscord<evoalg> just don't take "collect" away! 😉
00:04:05FromDiscord<Elegantbeef> I mean collect is a macro 😛
00:04:16FromDiscord<Elegantbeef> Saem personally doesnt like macros but has no plan of removing them
00:04:22*brain-soup left #nim (Leave.)
00:05:34*brain-soup joined #nim
00:06:11FromDiscord<evoalg> ohhhh ... ahh ok I know so little ... but then again, from a noob's perspective learning nim, "collect" is absolutely part of the language. Oh interesting that Saem doesn't like macro's when from what i can gather they are all the fashion ... I've been trying to avoid them thus far
00:08:57FromDiscord<evoalg> I'm someone trying to learn & use nim without having to know C or the having to know difference between the stack & the heap, and not having to know what functional programming is ... you can tell I've mainly used python 😉 ... but I've read that I don't have to know that stuff unless I'm doing something tricky like interfacing with some hardware using a c lib or something
00:09:13FromDiscord<Elegantbeef> To be fair though leorize we're not compatible with Nim already 😛 We no longer have marshal in the VM and no longer have importutils
00:10:14arkanoidevery time I tried using collect, I ended up in a corner where it was better not using it. As an extensive user of python comprehensions and c# linq expressions, I would say that collect macro is not up to the task
00:10:30FromDiscord<Elegantbeef> Well saem doesnt like them since they're obfuscation engines practically, it's hard to audit what's going on internally with them
00:10:37FromDiscord<Elegantbeef> Eh i use collect a lot it does it's job well imo
00:10:54FromDiscord<leorize> but luckily saem isn't the only dev \:p
00:11:22FromDiscord<Elegantbeef> I mean he's the odd one out with that view
00:12:13FromDiscord<evoalg> I used to like python LC's, but now I'm so in love with collect
00:12:38FromDiscord<leorize> macros as the compiler implement it might change though
00:13:03FromDiscord<Elegantbeef> My view will always be list comprehensions are backwards
00:13:16FromDiscord<Elegantbeef> it's just an unintuitive to read mess
00:13:57FromDiscord<evoalg> exactly
00:13:59FromDiscord<leorize> nim's collect is pretty easy to read
00:14:06FromDiscord<leorize> the impl is just horrendous though
00:14:17FromDiscord<Elegantbeef> Yea collect is much more imperative which fits better
00:14:43FromDiscord<Elegantbeef> What's the issue with collect?
00:16:15FromDiscord<leorize> try to read the impl
00:16:22FromDiscord<Elegantbeef> Oh ok i see
00:22:07FromDiscord<Elegantbeef> Uh oh saem read all the messages, scatter!
00:24:13FromDiscord<KimJongUnstoppable> Anyone have issues using writeFile on Windows? Every file I try to write to, I get an IO error, regardless of directory I'm in. Even if I'm using an admin elevated command prompt, I still get failures. The only directory I can write to is the temp directory.
00:24:24FromDiscord<KimJongUnstoppable> Wondering if it's a me issue or an OS thing.
00:24:51FromDiscord<Elegantbeef> Have you read the IoError message?
00:26:03FromDiscord<KimJongUnstoppable> Unhandled Exception, cannot open, [IO error] are the basics of it, aside from the file name and location
00:27:19FromDiscord<Elegantbeef> I can only imagine you're trying to write in a location you dont have user permissions for
00:27:59FromDiscord<KimJongUnstoppable> Which is the confusing part, since I've tried the documents folder, the desktop, a drive I use only for storage, and I tried all that from an admin-elevated command prompt, and elevating the binary as admin. None of it worked.
00:28:35FromDiscord<KimJongUnstoppable> Typing this out is making me think it's an issue with my machine or copy of windows rather than a package issue with std/io
00:29:03FromDiscord<leorize> if every other applications work, then it might be an issue with nim
00:29:26FromDiscord<KimJongUnstoppable> I've never experienced any issues writing to any of those directories before, in python or in general
00:29:58FromDiscord<leorize> can you try running a nim compile outputting to that directory?
00:30:12FromDiscord<leorize> if that works then it might just be your code bugging somehow
00:30:17FromDiscord<KimJongUnstoppable> it compiles fine into the directory I was testing from and then when I run the executable I made it won't write to any files in that directory
00:30:41FromDiscord<leorize> do you mind sharing the part that was erroring?
00:30:49FromDiscord<KimJongUnstoppable> I'll spend some more time testing and try to see if I can find a more specific issue than just "IO error" and come back
00:31:11FromDiscord<leorize> and please keep in mind about win32 special names
00:34:57*vicfred quit (Quit: Leaving)
00:50:32*kayabaNerve quit (Remote host closed the connection)
00:56:07*kayabaNerve joined #nim
02:03:55*krux02 quit (Remote host closed the connection)
02:20:01FromDiscord<evoalg> I'm just checking ... for a variable I use "var", but if it doesn't change I can use "let" (which has to be resolved at compile time), but even if it doesn't change, instead of using "let" I can use "var" if I want to, and the code will probably run just as fast either way, but using "let" will catch if I inadvertently try to change it later in the code, so it's more thing of good programming practice to use let when it doesn't change - ha
02:20:37FromDiscord<Elegantbeef> Nope let does not have to be resolved at compile time
02:20:50FromDiscord<Elegantbeef> `let` is a runtime immutable, `const` is a compile time constant
02:21:08FromDiscord<evoalg> ahhh ok! ... have I got the rest of it right?
02:21:23FromDiscord<Elegantbeef> My rule is `const -> let -> var`
02:21:27FromDiscord<Elegantbeef> If it can be constant make it as such, if it needs runtime info, use let, otherwise use var
02:21:51FromDiscord<Elegantbeef> But yes let/var is just a typesystem thing and has 0 effect on runtime speed
02:22:21FromDiscord<Rika> Why does skull not have import utils ?
02:26:43FromDiscord<Elegantbeef> Oh it actually still does, guess i just tried compiling wrong
02:37:46FromDiscord<evoalg> for something declared as with var, I can call a variable, but do name should I use for something declared as a let? ... it's not a variable, right? or is it a variable, just an immutable variable?
02:38:12FromDiscord<Elegantbeef> it's an immutable variable
02:38:38FromDiscord<Rika> If you want to really make it sound sensible you can prolly use names value
02:38:40FromDiscord<Rika> Named
02:41:23FromDiscord<evoalg> I don't know what you mean Rika?
02:42:46FromDiscord<Rika> Instead of “variable”, “named value”
02:43:05FromDiscord<evoalg> ahhh ok 😉
02:45:37FromDiscord<evoalg> so I don't have to pass const's to proc's / func's which is nice, but for other variable I do, and sometimes I have to pass lots of them! ... is this a case where I should bundle them up into something like an object or a tuple, to save on typing really long proc parameter lines?
02:47:40FromDiscord<Rika> usually yeah pretty much
02:48:02FromDiscord<evoalg> Thank you!
03:01:18*neurocyte0132889 quit (Ping timeout: 268 seconds)
03:08:33*arkurious quit (Quit: Leaving)
04:06:01*supakeen quit (Quit: WeeChat 3.3)
04:06:31*supakeen joined #nim
04:22:00FromDiscord<evoalg> instead of a func, I could call it proc instead and it wouldn't change anything (if that's the only change I made) right? The reason we would use func is to catch any side effects that we might introduce inadvertently later, so it's more of a good programming practice thing to do? ... but I could run a proc as a func and it wouldn't change the speed of the program?
05:27:53FromDiscord<Rika> Yes
05:43:49*Guest62 joined #nim
05:44:04*Guest62 quit (Client Quit)
05:44:16*Guest62 joined #nim
05:44:29*Guest62 quit (Client Quit)
06:03:20FromDiscord<dangbinghoo> hi, we should have a "Packages" link on nim-lang.org for https://nimble.directory/
06:20:36FromDiscord<demotomohiro> There is a link to nimble directory in: https://nim-lang.org/documentation.html
06:34:53FromDiscord<dangbinghoo> home page is more convenient
06:35:26FromDiscord<Elegantbeef> something about PRs welcome here
06:35:52FromDiscord<narimiran> something about bookmark the documentation page, and then it is as convenient as home page
06:36:29FromDiscord<Elegantbeef> Shit you got me
06:37:22FromDiscord<narimiran> (but don't bookmark nimble.directory, that's too convenient!)
06:37:44FromDiscord<Elegantbeef> Yea two clicks are better than one
06:37:55FromDiscord<Elegantbeef> Twice as satisfying to hear
06:38:29FromDiscord<Elegantbeef> And certainly dont make a rofi frontend to search the registry
07:12:48*anjovi quit (Remote host closed the connection)
07:13:11*anjovi joined #nim
07:46:16FromDiscord<dangbinghoo> https://tenor.com/view/bunnies-what-confused-meh-gif-13712192
07:46:42FromDiscord<dangbinghoo> 🙃
08:02:44*neurocyte0132889 joined #nim
08:02:44*neurocyte0132889 quit (Changing host)
08:02:44*neurocyte0132889 joined #nim
08:08:56*anjovi quit (Remote host closed the connection)
08:09:18*anjovi joined #nim
08:13:10*mahlon quit (Ping timeout: 260 seconds)
08:13:13*PMunch joined #nim
08:50:47*neurocyte0132889 quit (Read error: Connection reset by peer)
08:51:44*neurocyte0132889 joined #nim
08:51:44*neurocyte0132889 quit (Changing host)
08:51:44*neurocyte0132889 joined #nim
09:18:30*mahlon joined #nim
10:44:26NimEventerNew thread by FernandoTorres: Overloaded array operator allows changing the indexing sequence for objects, but not for tuples., see https://forum.nim-lang.org/t/8581
11:58:24FromDiscord<hmmm> hey what is the nim equivalent of python list.index("element")
11:59:42FromDiscord<haxscramper> `list.find("element")`
11:59:42FromDiscord<ynfle (ynfle)> find
11:59:47FromDiscord<Yardanico> https://nim-lang.org/docs/system.html#find%2CT%2CS
11:59:50FromDiscord<Yardanico> xd
12:00:17FromDiscord<hmmm> good boys
12:00:34FromDiscord<enthus1ast> but when you have to find in a seq that often, better use another data type, eg table
12:00:57FromDiscord<enthus1ast> or when the seq ist huge
12:01:18FromDiscord<enthus1ast> or HashSet
12:01:34FromDiscord<hmmm> hmm let's see where index takes me, if it becomes painful I'll change data structure
12:02:17FromDiscord<enthus1ast> for small datasets i might even be faster than hash lookup
12:06:01*supakeen quit (Quit: WeeChat 3.3)
12:06:54*supakeen joined #nim
12:07:28FromDiscord<Rika> you?
12:14:21FromDiscord<dom96> we should all be using O(enthus1ast) lookups
12:14:50FromDiscord<enthus1ast> \:)
12:15:08FromDiscord<enthus1ast> somehow my keyboard is dirty i guess
12:15:28FromDiscord<dom96> huh, we went to 12.1k stars pretty fast on the Nim repo
12:15:52*Vladar joined #nim
12:28:56FromDiscord<Goel> It was me making thousands of fake accounts to star Nim :nimble: _lies_
12:36:20FromDiscord<Rika> "lies"
12:55:59FromDiscord<krsh> There is a library for parsing and analyzing ELF files? Like pyelftools and Lief
12:56:03madpropshttps://nim-lang.org/docs/nre.html
12:56:18madpropsdoes find in nre return an Option[RegexMatch] or Option[string] ?
12:56:31PMunch@dom96, not really a crazy increase in stargazers: https://star-history.t9t.io/#nim-lang/nim
12:56:56madpropsnvm
13:01:49PMunch@krsh, not sure if we have a library, but this might be helpful: https://formats.kaitai.io/elf/nim.html
13:02:48madpropsso system.quit is not recommended, what's the best way to quietly quit a program?
13:08:03FromDiscord<haxscramper> I don't know what is wrong with `quit()`
13:08:17FromDiscord<haxscramper> Well, I would raise an exception and let the program terminate as usual
13:08:26FromDiscord<haxscramper> `setExitCode()` from exitprocs IIRC
13:08:40FromDiscord<haxscramper> https://nim-lang.org/docs/exitprocs.html#setProgramResult%2Cint
13:20:40FromDiscord<dom96> PMunch: that chart is so tiny lol
13:20:55PMunchSo tiny?
13:21:11FromDiscord<dom96> I mean: doesn’t have a lot of data points.
13:21:19FromDiscord<dom96> So hard to drill into the recent increase
13:22:28FromDiscord<dom96> In reply to @haxscramper "I don't know what": Problem with quit is when it’s used in some library code. I don’t want my libraries to terminate my app.
13:23:22FromDiscord<dom96> So I would say it’s an anti-pattern in apps too. Eventually you’ll refactor into some libraries and run into issues.
13:23:39FromDiscord<dom96> Exceptions are indeed the way to go
13:25:15PMunchTrue. Do you have another which is more high-res?
13:45:21NimEventerNew thread by Miran: This Month with Nim - October 2021, see https://forum.nim-lang.org/t/8582
13:50:52PMunchAh damn it, forgot to submit Futhark..
13:51:05PMunchYardanico, did you ever try it out with Sciter?
13:51:31FromDiscord<Yardanico> Sorry, not yet :( thanks for reminding me, I'll try tomorrow
13:58:28PMunchSweet, so far it's running smoothly for everything I've used it for :)
14:13:08FromDiscord<dom96> We should fix this heh https://media.discordapp.net/attachments/371759389889003532/905097194594504714/IMG_7926.png
14:13:46FromDiscord<IsaacPaul> The squished photo?
14:14:03FromDiscord<dom96> yep
14:17:24NimEventerNew thread by IvanS: Error: type mismatch: got <type string> / expected <string> but got <type string> (fidget), see https://forum.nim-lang.org/t/8583
14:19:44FromDiscord<IsaacPaul> Some pretty cool projects this month
14:21:09FromDiscord<IsaacPaul> kinda wish changer followed this format: https://keepachangelog.com/en/1.0.0/
14:23:09FromDiscord<dom96> ooh changer is indeed cool
14:50:04FromDiscord<tandy> no mention of nimskull \:\>)↵(<@709044657232936960_=4eim=45venter=5b=49=52=43=5d>)
14:54:56FromDiscord<Yardanico> @tandy ?
14:55:06FromDiscord<Yardanico> TMWN is user-made content
15:05:32NimEventerNew thread by Aclough: Nim snap status?, see https://forum.nim-lang.org/t/8584
15:11:51PMunchHmm, even with `nimble build -y -d:debug --lineDir:on --debuginfo --debugger:native` I don't get debug symbols in my generated so file..
15:12:23PMunchI have --app:lib --threads:on --gc:orc in my nim.cfg file
15:12:24FromDiscord<Yardanico> huh
15:12:35FromDiscord<Yardanico> also generally you don't need anything other that --debugger:native for nim source lines to appear, do you
15:13:01PMunchDunno, gdb just keeps saying the library doesn't have debug symbols
15:13:25PMunchAnd objdump --syms <file> | grep debug shows nada
15:17:29FromDiscord<Yardanico> are you trying to debug the library on the same machine where you compiled it?
15:17:51FromDiscord<Yardanico> but yeah, here it works, gdb just says "Reading symbols from libtest.so..."
15:18:22FromDiscord<Yardanico> try ` objdump -h libtest.so | grep .debug`
15:19:23FromDiscord<tandy> technicaly nimskul is user-made↵(@Yardanico)
15:19:30FromDiscord<Yardanico> you didn't get my point
15:19:43FromDiscord<Yardanico> TMWN is made from people submitting their projects
15:19:51FromDiscord<Yardanico> if nimskull is "not there" it means that no one submitted it to TMWN
15:20:11FromDiscord<tandy> yee i know it was a joke
15:20:15FromDiscord<dom96> PMunch: make sure Nimble is passing those options by using `--debug`
15:20:35FromDiscord<dom96> passing those options to Nim
15:23:00PMunchBy the way, when building a dynamically linked library with nimble it doesn't name it libX.so
15:23:48PMunchWait, I might've been an idiot and copied the wrong file
15:24:23FromDiscord<haxscramper> We certainly have a good number of projects to spam tmwn for months, don't worry
15:24:41*PMunch quit (Quit: Leaving)
15:25:09FromDiscord<haxscramper> idk, I can automatically churn out library wrappers and auto-submit them
15:27:02FromDiscord<tandy> nice \:)
15:27:35FromDiscord<tandy> is there any plan to add union to the nimskull stdlib? i know u guys wanna keep it lean so id imagine no
15:28:19FromDiscord<haxscramper> it depends ..., but I personally would be glad to see `Result[]`, `union` and more fp-stuff in stdlinb
15:28:33FromDiscord<tandy> sweet
15:28:43FromDiscord<haxscramper> since we don't have any opposition on form of "Option is dumb" etc.
15:29:27FromDiscord<kevin> Stuck on an error in my code: `Warning: 'write' is not GC-safe as it calls 'len'` where write is (https://github.com/nim-lang/Nim/blob/version-1-6/lib/pure/streams.nim#L346)
15:29:44FromDiscord<haxscramper> > ↵> Warning↵>
15:29:57FromDiscord<kevin> I get an error for my function
15:30:03FromDiscord<kevin> That's the warning right before it errors
15:30:13FromDiscord<haxscramper> Then what is the error?
15:30:17FromDiscord<kevin> `Error: 'serialize' is not GC-safe as it calls 'write'`
15:30:28FromDiscord<kevin> where serialize is my own function
15:30:52FromDiscord<kevin> I don't believe something like `len` would actually not be gc-safe by default
15:38:15FromDiscord<hmmm> hey what was the magic incantation to stuff two seqs in a std/tables
15:39:46FromDiscord<haxscramper> `for k, v in zip(seq1, seq2): table[k] = v`
15:40:12FromDiscord<hmmm> this looks like a winner, I'll try it
15:48:02FromDiscord<IsaacPaul> In reply to @kevin "`Error: 'serialize' is not": You can ignore it by annotating your proc with a pragma: `{.gcsafe.}` but I'd find a gc safe way to use write
15:49:44FromDiscord<IsaacPaul> Perhaps your stream is a global variable?
15:49:54FromDiscord<kevin> In reply to @IsaacPaul "You can ignore it": It's a proc local variable
15:50:33FromDiscord<kevin> Guess I'm confused on how Nim thinks `write` or `len` are not gcsafe
15:52:45FromDiscord<IsaacPaul> sent a code paste, see https://play.nim-lang.org/#ix=3DJ4
15:52:55FromDiscord<IsaacPaul> may or may not help you.. I'm no expect 😅
15:53:01FromDiscord<IsaacPaul> (edit) "expect" => "expert"
15:54:35FromDiscord<kevin> Thanks! 😄
16:11:36FromDiscord<hmmm> hexxy is strange if I use your magic formula I get a ginormous type error but if I use the standard formula in the docs it works just fine: for pairs in zip(x,y):↵ let (first,second) = pairs↵ q[first] = second
16:13:14*sagax quit (Remote host closed the connection)
16:15:43FromDiscord<haxscramper> well, read the error idk
16:15:54FromDiscord<hmmm> yea I'm on it
16:15:57FromDiscord<haxscramper> or `for (k, v) in zip(x, y)`
16:16:03FromDiscord<hmmm> I want to use yours because it's comfier
16:16:19FromDiscord<haxscramper> `for (k, v) in zip(x, y): table[k] = v`
16:17:51FromDiscord<hmmm> yay it werks
16:18:01FromDiscord<hmmm> ty 👑
16:18:38FromDiscord<haxscramper> ah, `zip` is not an iterator
16:18:42FromDiscord<haxscramper> why it is not an iterator ...
16:20:59FromDiscord<haxscramper> sent a code paste, see https://paste.rs/Ibe
16:21:19FromDiscord<haxscramper> basically `sequtils.zip` creates a new sequence, so `for k, v in sequtils.zip()` is the same as `for k, v in pairs(sequtils.zip())`, that's why you get `k` as int and `v` as `(S1, S2)` that you can't put in the table
16:21:33FromDiscord<haxscramper> I completely fail to understand why zip is not an iterator
16:29:18*sagax joined #nim
17:00:00FromDiscord<IsaacPaul> sent a code paste, see https://play.nim-lang.org/#ix=3DJB
17:00:46FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3DJE
17:00:49FromDiscord<haxscramper> index + zipped tuples
17:01:24FromDiscord<IsaacPaul> ah that's your custom zip function
17:04:44*nrds quit (Remote host closed the connection)
17:05:56FromDiscord<IsaacPaul> yea the current zip returns a seq of tuples with no index... using `for k, v in` just automatically adds the index as k instead of destructing the tuple
17:06:21*nrds joined #nim
17:07:33FromDiscord<IsaacPaul> sent a code paste, see https://play.nim-lang.org/#ix=3DJL
17:08:03FromDiscord<IsaacPaul> the sdk zip procedure
17:10:07FromDiscord<IsaacPaul> sent a code paste, see https://play.nim-lang.org/#ix=3DJM
17:14:51FromDiscord<IsaacPaul> Yea I agree it should be an iterator
17:15:44FromDiscord<Elegantbeef> There should atleast be an iterator variant of all(most) of the procs in sequtils
17:16:39FromDiscord<IsaacPaul> What's interesting is that being an iterator allows you to bypass destructing the tuple... there seems to be a not so obvious difference in behaviors.
17:17:05FromDiscord<IsaacPaul> but I'm not new, I'm not sure whats _expected_
17:17:13FromDiscord<IsaacPaul> (edit) removed "not"
17:18:43FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3DJS
17:20:37FromDiscord<IsaacPaul> ah I'm dumb one is actually returning a tuple and the other is returning a seq of tuples which results in the difference of behavior
17:20:44FromDiscord<IsaacPaul> 1 is
17:20:47FromDiscord<Elegantbeef> Which also applies to your for loop over a tuple of elements just `k, v` calls `pairs` and `(k, v)` destructors the given value
17:21:21FromDiscord<Elegantbeef> Uhh
17:21:37FromDiscord<Elegantbeef> I dont think that's the case
17:36:53nrds<Prestige99> Elegantbeef: You have any experience wrapping c++ libraries? I need a box2d wrapper
17:37:07nrds<Prestige99> not sure how decent the interop will be
17:37:33FromDiscord<IsaacPaul> I think there are different implementations of pairs. It seems like most that apply to sequences or strings automatically assign an index to k. The ones that apply to tables just map the left value to k. I'm not sure if a tuple is a table or not tho.. 😂 either way I gotta get back to work T.T
17:39:05FromDiscord<Elegantbeef> What's C++ is that something you eat?
17:39:22nrds<Prestige99> I tried once but threw up
17:39:58FromDiscord<haxscramper> damn box2d is huge
17:40:25nrds<Prestige99> If I can't find someone to write a wrapper I honestly might just port it to Nim
17:40:38*kayabaNerve_ joined #nim
17:40:41*kayabaNerve quit (Remote host closed the connection)
17:40:42*kinkinkijkin quit (Remote host closed the connection)
17:41:10FromDiscord<Elegantbeef> Arent you just making a platformer?
17:41:17nrds<Prestige99> no I'm making a game engine
17:41:25FromDiscord<haxscramper> You can wrap only needed parts
17:41:40FromDiscord<haxscramper> But in general I don't think there is any tool that would be able to properly process all of this
17:41:50FromDiscord<haxscramper> you can try c2nim maybe
17:42:07FromDiscord<haxscramper> it "has successfully wrapped thousands of lines of C++ code", so you might have a chance
17:42:09*pch joined #nim
17:42:20nrds<Prestige99> I did, it ate 16GB ram and almost all my swap before I killed it lol
17:45:06FromDiscord<haxscramper> holy
17:45:06FromDiscord<haxscramper> I thought it is a simple code transform, what is it doing even
17:46:39nrds<Prestige99> 🤷
17:46:55nrds<Prestige99> infinite loop maybe
17:47:05*neurocyte0132889 quit (Quit: The Lounge - https://thelounge.chat)
17:53:09FromDiscord<IsaacPaul> comment half the file until you find the culprit :3
17:53:11*arkurious joined #nim
17:54:04FromDiscord<Elegantbeef> Manual binary search
17:55:50nrds<Prestige99> Would be damn nice if it were just in pure Nim tbh
17:56:13nrds<Prestige99> maybe I'm crazy enough
17:56:27FromDiscord<Elegantbeef> Well physics is complex so i'll see you in a few years
17:56:28FromDiscord<IsaacPaul> Yea, but then someone's gotta maintain it..
17:56:48nrds<Prestige99> I mean just porting it 1 to 1
17:58:00*neurocyte0132889 joined #nim
17:58:00*neurocyte0132889 quit (Changing host)
17:58:00*neurocyte0132889 joined #nim
18:00:25FromDiscord<haxscramper> it is impossible
18:00:33FromDiscord<haxscramper> 1\:1 from C++ to nim is a dead end
18:00:51FromDiscord<haxscramper> for example you get 10x+ drop in method performance, so you have use custom vtable imp
18:00:59FromDiscord<haxscramper> with arc you get like 400x drop
18:01:01FromDiscord<haxscramper> for methods
18:01:07FromDiscord<haxscramper> Unless that was fixed
18:01:20nrds<Prestige99> wow really that bad?
18:01:21FromDiscord<haxscramper> and this library seems to be oop-heavy
18:02:37FromDiscord<haxscramper> https://github.com/nim-lang/Nim/issues/18612
18:02:38FromDiscord<Elegantbeef> Well there is an idea to make it not that bad but it's pretty bad with --newRuntime
18:02:51FromDiscord<haxscramper> 18x slower than before↵nearly 100x slower than regular procs
18:02:53*vicfred joined #nim
18:03:06FromDiscord<haxscramper> I was testing hot dispatch loop for the interpreter
18:03:16FromDiscord<haxscramper> just to see which methods are best
18:03:31FromDiscord<haxscramper> and I had slowdown for 100s for times
18:04:01FromDiscord<Elegantbeef> Plus 1\:1 C++ -\> Nim isnt going to be idiomatic Nim 😀
18:04:35FromDiscord<haxscramper> anyway, methods are almost useless
18:04:52nrds<Prestige99> Could get away with concepts if they're usable, I think..
18:04:54FromDiscord<haxscramper> I use them only when I know I won't be calling into them with any reasonable frequency
18:05:25nrds<Prestige99> that's embarrassingly slow though
18:05:32FromDiscord<Elegantbeef> Or function pointers since it's a onetime cost
18:06:01nrds<Prestige99> are "new concepts" out?
18:06:25FromDiscord<haxscramper> not yet
18:06:39Amun-Raspeaking of new concepts, what's the equivalent of T.foo is int?
18:07:14FromDiscord<Elegantbeef> It's more limited in some regards so i dont think there is an equivlent, since that could be a proc or a field
18:07:24FromDiscord<haxscramper> Well, if `T.foo is int` does not work you can also try `default(T).foo is int`
18:08:08FromDiscord<Elegantbeef> For new concepts though hax that still wont work?
18:08:46FromDiscord<haxscramper> ah
18:08:51FromDiscord<hmmm> boyz what should I know about importing my own modules apart from marking with star all the stuff I want to use?
18:08:52FromDiscord<haxscramper> I missed concept
18:08:56nrds<Prestige99> man that speed slowdown for methods is depressing
18:08:57FromDiscord<haxscramper> context\
18:09:18FromDiscord<haxscramper> Nothing really. Depends on what you want to do↵(@hmmm)
18:09:18FromDiscord<hmmm> can I leave all the redundant std imports for testing or should I clean it up?
18:09:36FromDiscord<haxscramper> For new concepts field checks are not implemented IIRC↵(<@709044657232936960_=41mun-=52a=5b=49=52=43=5d>)
18:10:43FromDiscord<haxscramper> I don't understand the question. If you have some imports you use then leave them, if they are warned with UnusedImport then remove them↵(@hmmm)
18:10:51FromDiscord<hmmm> star import works only on procs or it works on data structures too?
18:11:08FromDiscord<haxscramper> types, fields, procs iterators, toplevel variables
18:11:16Amun-RaI mean: https://play.nim-lang.org/#ix=3DK9
18:11:16FromDiscord<hmmm> perfect
18:11:18FromDiscord<hmmm> ty hexxy
18:11:19FromDiscord<haxscramper> any named entity
18:11:56FromDiscord<Elegantbeef> Yea like we said there isnt an equivalent that we know of
18:12:39Amun-Raah, I see
18:30:37*neurocyte0132889 quit (Quit: The Lounge - https://thelounge.chat)
18:36:06*neurocyte0132889 joined #nim
18:36:06*neurocyte0132889 quit (Changing host)
18:36:07*neurocyte0132889 joined #nim
18:46:03*nrds quit (Remote host closed the connection)
18:47:46*nrds joined #nim
18:53:11*krux02 joined #nim
18:59:48*Vladar quit (Quit: Leaving)
19:13:45*neurocyte0132889 quit (Read error: Connection reset by peer)
19:14:27*neurocyte0132889 joined #nim
19:14:27*neurocyte0132889 quit (Changing host)
19:14:27*neurocyte0132889 joined #nim
19:39:04*neurocyte0132889 quit (Ping timeout: 268 seconds)
19:59:20*neurocyte0132889 joined #nim
19:59:20*neurocyte0132889 quit (Changing host)
19:59:20*neurocyte0132889 joined #nim
21:12:09*brain-soup quit (Remote host closed the connection)
22:52:10*Pyautogui joined #nim
22:56:37FromDiscord<el__maco> noob question #126: how do I stop a case statement from complaining that all cases are not covered
23:00:13FromDiscord<Elegantbeef> `else: assert false` is the easiest but depending on the type you can do some other things
23:00:16FromDiscord<Elegantbeef> What's the type, and what's the of branches
23:02:22FromDiscord<el__maco> the type is GLenum. The type can probably contain a million different things, but in my case there's only 3 values it can have
23:03:03FromDiscord<Elegantbeef> Ah well if they arent contiguous values the assert method is the best
23:03:15FromDiscord<el__maco> hmm
23:03:24FromDiscord<Elegantbeef> if they're contiguous you can do `case range[low..high](yourValue)`
23:03:48FromDiscord<Elegantbeef> low and high being the lowest value and highest value it could be
23:04:55FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3DM0
23:05:13FromDiscord<Elegantbeef> uh oh i did case "idiomatically wrong"
23:05:18FromDiscord<Elegantbeef> No `:` on the case line!
23:06:31FromDiscord<Rika> uh oh
23:06:35FromDiscord<Rika> banned
23:06:42FromDiscord<Elegantbeef> later chumps!
23:07:34*Pyautogui quit (Ping timeout: 260 seconds)
23:13:27*Pyautogui joined #nim
23:18:37*vicfred quit (Quit: Leaving)
23:47:36*Pyautogui quit (Ping timeout: 268 seconds)
23:55:34FromDiscord<codic> I have a question about arc: if it has deterministic destruction, copying, etc (RAII like C++) where exactly is stuff ref counted? <https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc-in-nim.html> doesn't explain it
23:59:41FromDiscord<treeform> I think ref is a pointer to to memory of which first 8 bytes is a memory count
23:59:58*FromDiscord quit (Remote host closed the connection)