<< 17-04-2022 >>

00:01:20nrds<Prestige99> Elegantbeef I saw you closed your PR regarding https://github.com/nim-lang/Nim/issues/19371
00:01:28nrds<Prestige99> Do we know who could possibly fix this?
00:01:31FromDiscord<huantian> why exactly can some builtins not be passed to procvars
00:02:37FromDiscord<Elegantbeef> Hunting down why symbols/types get duplicated
00:02:53FromDiscord<Elegantbeef> It's something that changed between 1.6 and 1.4.8 that doesnt cause compilation issues but reprocessing issues
00:02:58FromDiscord<Elegantbeef> Might be related to IC idk
00:04:42FromDiscord<Yardanico> In reply to @huantian "why exactly can some": IIRC that's because they're implemented as magics
00:05:25FromDiscord<huantian> the proper way is to just use an anonymous proc to wrap 'em?
00:05:39FromDiscord<Elegantbeef> It really should be marked a showstopper imo but i dont know prestige
00:05:58FromDiscord<Yardanico> In reply to @huantian "the proper way is": or templates
00:06:06FromDiscord<huantian> mk
00:09:25nrds<Prestige99> sad nimsuggest noises
00:09:50FromDiscord<Elegantbeef> Hey go to internals and bitch about it
00:10:01FromDiscord<Elegantbeef> I cant do anything aside from say "Yes there is an issue that needs fixed"
00:10:20nrds<Prestige99> oh didn't know that was a thing, I'll hop on discord
00:10:36FromDiscord<huantian> should be accessible on irc too
00:10:52FromDiscord<Yardanico> they're using a bridge so I assume #nim-internals isn't bridged
00:10:59FromDiscord<Yardanico> i mean their own bridge
00:11:05FromDiscord<huantian> ahh
00:14:27FromDiscord<Elegantbeef> My fixes were work arounds prestige there is a "proper" fix which needs to be done but i dont know where/how
00:14:49FromDiscord<Elegantbeef> My approximation of the issue is that It does a first pass finds an error that does another pass and those pointers do not match so it errors
00:15:35nrds<Prestige99> Yeah, hopefully someone from internals can solve it
00:15:37FromDiscord<Elegantbeef> Pointers were a mistake
00:16:31FromDiscord<Yardanico> @beef any recommendations for nim projects to use to compile the compiler with PGO?
00:16:45FromDiscord<Yardanico> right now i only have the compiler itself, arraymancer and npeg, wonder if there are any other projects that kind of stress the compiler heavily
00:17:00FromDiscord<Elegantbeef> CPS libraries perhaps
00:17:40FromDiscord<Elegantbeef> Also code that uses async maybe
00:17:52FromDiscord<Elegantbeef> Might make it a bit smarter about closures and the like
00:18:03FromDiscord<Yardanico> ah true
00:18:42FromDiscord<Yardanico> i should probably write a small nim "script" instead of a bash script :P
00:18:50FromDiscord<Yardanico> i know nim better than bash
00:19:14FromDiscord<Elegantbeef> I think even bash programmers that have never written Nim know Nim better than bash
00:19:18FromDiscord<Yardanico> lol
00:19:19*ltriant quit (Ping timeout: 246 seconds)
00:19:41FromDiscord<Elegantbeef> speaking of closures anyone know if they sink?
00:21:50FromDiscord<huantian> usually only open things sink since water gets in them
00:21:55FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Vl7
00:22:21FromDiscord<Yardanico> i guess a good fit for async would be nitter
00:22:22FromDiscord<Elegantbeef> Actually i just tested with refc
00:22:57FromDiscord<Elegantbeef> Ehhh sinking with arc it seems
00:23:09FromDiscord<Yardanico> although nitter does use a lot of nimble packages
00:23:22FromDiscord<Elegantbeef> Nope nevermind it was just COW string
00:23:26FromDiscord<Yardanico> xd
00:23:34FromDiscord<Yardanico> fullxd
00:24:06FromDiscord<Elegantbeef> Ugh
00:24:27FromDiscord<Elegantbeef> Explicit move does actually work
00:25:55FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Vl8
00:27:59FromDiscord<Elegantbeef> Think i can speed up my slicerator iterators with this.... no longer copying sequences, just give them up
00:48:06*ltriant joined #nim
00:56:12FromDiscord<Elegantbeef> Damn with that change i'm much faster than the stdlib's `zip`
01:05:03*zeus-supreme1 joined #nim
01:08:02*zeus-supreme quit (Ping timeout: 250 seconds)
01:08:17FromDiscord<Yardanico> so right now i decided to have arraymancer, npeg, prologue, nitter, polymorph, nim-regex and the compiler itself
01:08:22FromDiscord<Yardanico> as PGO training data
01:08:35FromDiscord<Elegantbeef> Well tell me how that goes in 10 years
01:08:48FromDiscord<Yardanico> well I mean even in the past when I compiled with PGO it gave big speedups
01:08:51FromDiscord<Yardanico> like 25% in some cases
01:08:58FromDiscord<Yardanico> nim part of the compilation of course
01:09:27FromDiscord<Elegantbeef> Yea I imagined so
01:10:37FromDiscord<Generic> is the compiler even compiled with lto?
01:10:41FromDiscord<Yardanico> no
01:10:48FromDiscord<Yardanico> you can easily do that yourself though
01:11:11FromDiscord<Generic> I once did that with nimsuggest
01:11:22FromDiscord<Generic> though it didn't yield any (noticable) difference
01:11:42FromDiscord<Yardanico> it won't be 100% or 50%, but something like 5-10% is possible
01:11:49FromDiscord<Yardanico> and with PGO 20% is possible
01:12:03FromDiscord<Yardanico> always depends on the application of course, although I don't really know how to PGO nimsuggest easily
01:12:17FromDiscord<Yardanico> that'd require asking it for a lot of autocompletions in an automated way
01:12:56FromDiscord<Generic> it's relatively easy if you use the stdin mode
01:14:50*slowButPresent joined #nim
01:32:49FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3Vlf
01:33:20FromDiscord<Yardanico> use `do`
01:33:49FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Vlg
01:34:25FromDiscord<Yardanico> @ElegantBeef the profile with all generated profiles obviously shows all the refc-related functions with the max counts :P
01:34:36FromDiscord<Yardanico> the top function by count is ` stdlib_system.nim.c:lteqpercent_system_985, max count = 16656531468`
01:34:42FromDiscord<TryAngle> ok this looks a bit silly in this cases and the other cases I have in mind
01:34:49FromDiscord<Yardanico> <=%
01:34:51FromDiscord<TryAngle> is there a way to make a macro with a custom seprator?
01:35:23FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Vlh
01:35:26FromDiscord<Yardanico> if you don't want the `do` way
01:36:16FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3Vli
01:36:41FromDiscord<Yardanico> but how will you find when the ending block stars?
01:36:42FromDiscord<Yardanico> (edit) "stars?" => "starts?"
01:36:56FromDiscord<TryAngle> the ---
01:37:03FromDiscord<TryAngle> or any other symbol I come with lol
01:37:11FromDiscord<TryAngle> (edit) "symbol" => ""symbol""
01:37:28FromDiscord<Yardanico> --- won't work since it's not valid nim syntax
01:37:33FromDiscord<Yardanico> but yes, generally your idea will work
01:38:32FromDiscord<Elegantbeef> There is the new feature to use any statement as the secondary
01:38:39FromDiscord<TryAngle> hmmm, ok this is probably a thing for the future then XD
01:38:48FromDiscord<Yardanico> In reply to @Elegantbeef "There is the new": which one? i don't quite remember
01:39:26FromDiscord<Elegantbeef> It's in the manual or experimental, dont recall
01:40:00FromDiscord<Yardanico> btw, PGO really works, even for hello world with `-d:danger --compileOnly` time drops from ~200ms to ~160ms
01:40:29FromDiscord<Yardanico> ah wait not fair
01:41:09FromDiscord<Yardanico> yeah it's not as big for hello world as i expected :P
01:41:17FromDiscord<Yardanico> from ~180ms to ~160ms
01:41:22FromDiscord<Yardanico> assuming the normal compiler is compiled with -d:danger
01:41:44FromDiscord<Yardanico> well, actually the difference should be even smaller because clang'd nim is a bit slower for me than gcc'd nim
01:41:53FromDiscord<Yardanico> but still there's a positive improvement
01:43:32FromDiscord<Yardanico> also all the destructors and stuff does slow the compilation by a lot
01:43:51FromDiscord<Yardanico> even for the compiler itself (i know it still doesn't work fine with orc, but compiling with orc for checking perf is still good) it takes ~2x longer to compile with ORC
01:44:24FromDiscord<Yardanico> but yeah, the difference is 4.8s (gcc, danger) vs 4.3s (clang, danger, pgo) for me
01:45:14FromDiscord<Yardanico> might try to make gcc pgo'd compiler to see if it's faster than the clang one
01:45:44*Zectbumo quit (Ping timeout: 250 seconds)
02:45:46*arkurious quit (Quit: Leaving)
02:46:57FromDiscord<yoyojambo> how do I create a `[]` proc that returns a modifiable slice of the seq? I am trying to be able to call `my2dArr[x][y]` and have `my2dArr` be internally a single sequence
02:48:30FromDiscord<yoyojambo> sent a code paste, see https://play.nim-lang.org/#ix=3Vln
02:49:21FromDiscord<yoyojambo> sent a code paste, see https://paste.rs/eJC
02:49:35FromDiscord<Elegantbeef> you cannot safely do this
02:49:58FromDiscord<yoyojambo> :(
02:50:02FromDiscord<yoyojambo> and unsafely?
02:50:13FromDiscord<Elegantbeef> You can use `toOpenArray` or a ptr + len
02:52:00FromDiscord<yoyojambo> In reply to @Elegantbeef "You can use `toOpenArray`": and with that I could make it modifiable? like do `my2darray[x][y] = 0` or something like that?
02:52:24FromDiscord<yoyojambo> assuming both x and y are within range
02:52:47FromDiscord<Generic> for single value acesses you can define a [] operator which takes two indices
02:53:00FromDiscord<Elegantbeef> you can just make a `proc []=(myARr: var Array2D[T], x, y: int, val: int) = myArr[x][y] = val`
02:53:29FromDiscord<Elegantbeef> `val: T`\
02:54:53FromDiscord<yoyojambo> thank you
02:55:06FromDiscord<yoyojambo> ill do that
03:10:11FromDiscord<!Patitotective> sent a code paste, see https://paste.rs/63E
03:10:21FromDiscord<!Patitotective> without creating the `color` variable hehe
03:11:34FromDiscord<!Patitotective> (edit) "https://play.nim-lang.org/#ix=3Vlr" => "https://play.nim-lang.org/#ix=3Vlq"
03:12:12FromDiscord<huantian> `let igColor = block: let color = "#ffffff".parseHtmlColor(); ImVec4(x: color.r, y: color.g, z: color.b, w: color.a)` does this ocunt
03:13:33FromDiscord<yoyojambo> In reply to @Elegantbeef "you can just make": it seems like it doesn't call the proc using `[x][y]`
03:13:46FromDiscord<Elegantbeef> no you do `arr[x, y]`
03:13:56FromDiscord<yoyojambo> ahhh
03:14:03FromDiscord<yoyojambo> my bad
03:14:06FromDiscord<yoyojambo> thanks
03:28:16FromDiscord<Yardanico> so I did spend more time and compiled nim with PGO with GCC
03:28:31FromDiscord<Yardanico> i can say that clang's PGO is much easier to use programmaticaly
03:28:41FromDiscord<Yardanico> but anyway, apparently both clang'd and gcc'd PGO builds are essentially same performance ;)
03:28:56FromDiscord<Yardanico> both faster than non-PGO builds, but they're literally 1:1 against each other
03:33:10FromDiscord<Yardanico> yeah same speed consistently, I guess it does make sense since I used same Nim projects for getting profile data for the compiler
03:38:26FromDiscord<Yardanico> and on average speed gains are roughly 10%
03:38:48FromDiscord<Yardanico> 2.5 vs 2.2s, 21.5 vs 19.5s, 180ms vs 160ms, etc
03:39:25FromDiscord<Yardanico> now the next logical step is to setup some repo with github actions that will build PGO'd builds of the compiler automatically :)
03:54:10FromDiscord<Yardanico> let's see if adding LTO to these PGO builds will make it even faster. I remember a few years ago when I tried using LTO + PGO with clang for nim the compiler instantly crashed
03:54:13FromDiscord<Yardanico> (the nim compiler)
03:54:27FromDiscord<huantian> nah I can't see any reason it'd crash
03:54:38FromDiscord<Yardanico> well but it did
03:54:51FromDiscord<Yardanico> maybe due to some misoptimization by the C compiler or something
03:56:51FromDiscord<Yardanico> hm, it doesn't seem faster at all :P
03:56:59FromDiscord<Yardanico> it's actually a bit slower than just PGO'd, that's with clang
03:57:02FromDiscord<Yardanico> I guess I should also test with GCC
03:58:55FromDiscord<Rika> In reply to @Patitotective "is there a way": Unless you want to parse it again every time
03:59:47FromDiscord<Yardanico> In reply to @Patitotective "is there a way": btw, for things like that it's generally better to use `const`, in your case you can use it for `color`, not sure about igColor
03:59:58FromDiscord<Yardanico> just so runtime doesn't have to do work the compile-time can do easily
04:00:44FromDiscord<huantian> yeah I like doing fizzbuzz in compiletime
04:00:50FromDiscord<huantian> that way it has O(1) runtime complexity
04:00:59FromDiscord<Yardanico> xd
04:03:09FromDiscord<huantian> someone made that joke in a talk about nim can't remember who
04:05:43FromDiscord<Yardanico> yep looks like with GCC PGO + LTO is faster than just PGO
04:13:09FromDiscord<Jakraes> Quick question, what's None called in nim?
04:13:17FromDiscord<Yardanico> In reply to @Jakraes "Quick question, what's None": there's no such thing really
04:13:26FromDiscord<Yardanico> Nim is a statically typed language, so generally there's no need for `None`
04:13:28FromDiscord<Jakraes> Like, when a parameter is an object but the object isn't decalred
04:13:31FromDiscord<Jakraes> declared
04:13:41FromDiscord<Yardanico> that can't happen in Nim
04:13:48FromDiscord<Yardanico> if it's not "declared" it just won't compile
04:13:58FromDiscord<Jakraes> My bad, I meant parameter instead of object
04:14:11FromDiscord<Yardanico> but still, if you call a proc that expects two arguments with one, nim will complain
04:14:16FromDiscord<Yardanico> if you want to have optional arguments, check https://nim-lang.org/docs/options.html
04:14:18FromDiscord<Jakraes> Like, I have a linked list, and I want to check when it ends
04:14:29FromDiscord<Yardanico> ah, so you mean null reference then
04:14:30FromDiscord<Yardanico> that's `nil`
04:14:43FromDiscord<Yardanico> it's a default value of all reference/pointer types
04:15:10FromDiscord<huantian> jokes on you unrefs your linked list
04:15:28FromDiscord<Jakraes> Oooh, nice, thank you, I'll check that out
04:15:39FromDiscord<Yardanico> https://nim-lang.org/docs/manual.html#types-nil
04:21:44FromDiscord<Jakraes> Nevermind, what I made isn't a linked list, crap
04:21:47FromDiscord<Jakraes> I don't even know what it is
04:22:07FromDiscord<Elegantbeef> You might be looking for `std/options`
04:22:27FromDiscord<huantian> wups
04:22:29FromDiscord<huantian> sent a code paste, see https://play.nim-lang.org/#ix=3Vlx
04:22:51FromDiscord<Jakraes> Yeah, my linked list is more of a linked tree tbh
04:23:07FromDiscord<huantian> sent a code paste, see https://play.nim-lang.org/#ix=1Kmd
04:23:09FromDiscord<huantian> I keep doing it why
04:24:30FromDiscord<Jakraes> sent a code paste, see https://paste.rs/6fc
04:26:37FromDiscord<Jakraes> I just need to figure out how to iterate through each body part individually
04:26:56FromDiscord<Jakraes> Which I'm not sure if it's possible
04:27:40FromDiscord<Elegantbeef> What's the object definition?
04:28:11FromDiscord<Jakraes> sent a code paste, see https://play.nim-lang.org/#ix=3VlB
04:36:00FromDiscord<Elegantbeef> Yea this structure is hard to make a nice iterator with without copying
04:38:01FromDiscord<Jakraes> Yeah I might just use something like quick-union
04:38:16FromDiscord<Jakraes> What I'm doing is too messy
04:46:16FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3VlC
04:46:43FromDiscord<Elegantbeef> Yes
04:46:50FromDiscord<Elegantbeef> It's not endless on the stack
04:47:04FromDiscord<TryAngle> ah I see
04:47:17FromDiscord<Yardanico> In reply to @TryAngle "ah I see": seqs are on the heap
04:47:25FromDiscord<Yardanico> they do behave like value types but in truth they're ref types
04:47:36FromDiscord<TryAngle> In reply to @Yardanico "seqs are on the": ah ok
04:48:10FromDiscord<TryAngle> cool tbh, they felt like normal to use the whole time
04:53:44FromDiscord<Jakraes> Yeah, quick union was the best approach https://media.discordapp.net/attachments/371759389889003532/965112804908630056/Screenshot_6.png
04:53:48FromDiscord<Jakraes> Works perfectly
05:03:07*slowButPresent quit (Quit: leaving)
07:32:42*jjido joined #nim
07:35:29*zeus-supreme joined #nim
07:38:07*zeus-supreme1 quit (Ping timeout: 240 seconds)
08:00:09FromDiscord<639cdc5b65704dd36a425e849bd59ca3> I am curious is there a way to use custom GC for Nim? Like https://github.com/ivmai/bdwgc this for example.
08:01:04*lumo_e joined #nim
08:02:05FromDiscord<Rika> Nim has Boehm as a GC
08:02:13FromDiscord<Rika> —mm:boehm I believe
08:02:48FromDiscord<639cdc5b65704dd36a425e849bd59ca3> alright
08:02:55FromDiscord<639cdc5b65704dd36a425e849bd59ca3> it's time to experiment
08:03:17FromDiscord<Elegantbeef> https://nim-lang.org/docs/mm.html
08:03:18FromDiscord<Elegantbeef> Documented tehre
08:06:11*lumo_e quit (Ping timeout: 256 seconds)
08:06:16*jmdaemon quit (Ping timeout: 248 seconds)
08:21:35FromDiscord<639cdc5b65704dd36a425e849bd59ca3> nim is pretty comfy
08:21:41FromDiscord<639cdc5b65704dd36a425e849bd59ca3> more comfy than rust
08:24:48*lumo_e joined #nim
08:25:52FromDiscord<tandy> hmm i think no, that bit is fine its the `indexedDB.open(storeName)` in nodejs/jsindexeddb that is causing the issue↵(@Phil)
08:28:13FromDiscord<Rika> In reply to @639cdc5b65704dd36a425e849bd59ca3 "more comfy than rust": “Naturally”
08:35:13FromDiscord<tandy> no tru i will have a look
08:37:06*Gustavo6046 quit (Quit: Goodbye! Leave messages at my XMPP @ [email protected] or my Discord Gustavo6046#9009 or possibly my Mastodon [email protected] – I don't check my email often since it's full of crap, but in any case, [email protected])
09:35:55FromDiscord<TryAngle> is there a quick method to remove `\x00`s at the of strings?
09:36:55FromDiscord<TryAngle> In reply to @639cdc5b65704dd36a425e849bd59ca3 "more comfy than rust": I've literally rewritten all my projects in nim 😳
09:39:50FromDiscord<Rika> In reply to @TryAngle "is there a quick": https://nim-lang.org/docs/strutils.html#strip%2Cstring%2Cset%5Bchar%5D pass in chars = {'\0'}
09:41:17FromDiscord<TryAngle> In reply to @Rika "https://nim-lang.org/docs/strutils.html#strip%2Cstr": 👍
09:46:41FromDiscord<Rika> I assumed end but realised you didn’t say “end”
09:46:48FromDiscord<Rika> You kinda accidentally left out that word
09:57:52FromDiscord<zxcvcxz> is IC still being worked on? i saw it on the roadmap but don't see any progress on it from a long time. (I don't follow the development or the discord closely, so just asking here in case anybody knows)
09:58:56FromDiscord<ShalokShalom> In reply to @Jakraes "Yeah, quick union was": Can I see the code for this?
09:59:33FromDiscord<tandy> suposedly yes↵(@zxcvcxz)
09:59:33FromDiscord<tandy> ask in nim internals
10:00:17FromDiscord<ShalokShalom> I didnt really find "quick union" at all in the documention.
10:02:21FromDiscord<zxcvcxz> i also read somewhere that araq was working on a book. is that correct? and are there any details anywhere?
10:02:32FromDiscord<Rika> In reply to @zxcvcxz "is IC still being": Probably not, I think the core developers are swamped with fixing stuff
10:02:43FromDiscord<Rika> Not as in not right now
10:02:46FromDiscord<Rika> It’s not abandoned
10:02:51FromDiscord<Rika> Slow progress, basically
10:10:36FromDiscord<Phil> Question, have there been cases before where compiling in debug mode produced buggy code while compiling with -d:release produced non-buggy code?
10:12:37NimEventerNew thread by Archnim: Compiler ignores my `if` a throws an error, see https://forum.nim-lang.org/t/9111
10:15:44FromDiscord<Phil> sent a long message, see http://ix.io/3Vmj
10:16:24FromDiscord<Phil> (edit) "http://ix.io/3Vmj" => "http://ix.io/3Vml"
10:16:56*lumo_e quit (Ping timeout: 248 seconds)
10:17:04FromDiscord<Phil> (edit) "http://ix.io/3Vml" => "http://ix.io/3Vmm"
10:17:13FromDiscord<Phil> (edit) "http://ix.io/3Vmm" => "https://paste.rs/Fxj"
10:18:56FromDiscord<ShalokShalom> Did you confirm that in a clean environment?
10:19:10FromDiscord<ShalokShalom> And maybe with another compiler, like switching from GCC to LLVM?
10:19:22*elph joined #nim
10:20:33FromDiscord<Phil> Hmm haven't checked it in a clean environment. I have an old T440 lying around, I can see whether it compiles normally on there
10:20:48FromDiscord<ShalokShalom> Also OS maybe
10:21:01FromDiscord<Phil> If it's OS my test chances are zero because I'm not installing windows
10:32:37FromDiscord<Phil> Hmmm can't properly replicate on the T440, let's see if things change on the machine with the issue by swapping up compiler
10:38:16FromDiscord<TryAngle> how can I enable to accept invalid certs with httpCient?
10:38:23FromDiscord<TryAngle> (edit) "how can I enable to accept invalid ... certs" added "ssl"
10:39:32FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3Vmo
10:40:00*Guest89 joined #nim
10:40:15FromDiscord<TryAngle> I compile with `nim r src/lcu/client.nim -d:ssl `↵or with a config.nims with `--d:ssl` for nimble project
10:40:53FromDiscord<this cat is very good> Nimble exploded? Can't install with choosenim and manual install has the package manager not work.
10:41:00FromDiscord<this cat is very good> Ubuntu 20.04
10:41:16FromDiscord<this cat is very good> Pretty much clean install
10:41:47*Guest89 quit (Client Quit)
10:42:34FromDiscord<TryAngle> In reply to @this cat is very good "Nimble exploded? Can't install": choosenim is working fine for me 🤔
10:42:58FromDiscord<TryAngle> I'm using the AUR package I think
10:43:04FromDiscord<TryAngle> but Im not sure anymore
10:43:10FromDiscord<this cat is very good> Check package manager?
10:43:40FromDiscord<TryAngle> ok it's from AUR
10:43:47FromDiscord<TryAngle> but that's arch not ubuntu
10:43:51FromDiscord<this cat is very good> https://cdn.discordapp.com/attachments/903282304338755664/965181747170000976/unknown.png
10:43:55FromDiscord<this cat is very good> hangs here
10:44:02FromDiscord<this cat is very good> for choosenim
10:44:46FromDiscord<this cat is very good> similar effect when trying to install packages with manually installed nimble
10:44:47FromDiscord<this cat is very good> https://cdn.discordapp.com/attachments/903282304338755664/965188857849061396/unknown.png
10:45:26FromDiscord<this cat is very good> Did this both in and outside of libvfio install script. ie nimble install protobuf has the same behavior
10:48:13FromDiscord<Phil> In reply to @ShalokShalom "And maybe with another": Erm... what do I need to install beyond just llvm and clang to use it?↵`nim c -r --cc:llvm_gcc -f -d:enableTinyPoolLogging --threads:on ./src/nimstoryfont.nim` explodes with `llvm-gcc: command not found`. Seeing as I haven't used that compiler before, not sure what package that command is from
10:49:23FromDiscord<Phil> nevermind, I can just choose the clang option instead, that one works
10:49:30FromDiscord<Phil> and hot damn does it compile fast
10:51:02FromDiscord<Phil> Yeah can't repeat that with clang either
10:51:25FromDiscord<Phil> .... is the solution to reinstall nim in such a case?
10:52:46FromDiscord<Phil> In reply to @this cat is very good "Did this both in": Given I can't see it from the screenshot, I assume the issue is nothing happens after entering "y"?
11:09:34*henistein joined #nim
11:11:39FromDiscord<Rika> In reply to @Isofruit ".... is the solution": Version of GCC?
11:12:59henisteinI discovered this language recently and I am curious about that, I am fluent in python and love functional programming languages too. I am impressed with the speed of nim programs execution time, since python is too slow. But I have discovered that nim can replace javascript too. In this case: https://nitter.net/about they replace javascript with
11:12:59henisteinnim, there is some advantages? Is the website faster?
11:13:21henisteinI am not really a web developer so my knowledge in this field is very poor, I am just curious
11:16:56FromDiscord<Rika> The advantage is code reuse
11:17:29FromDiscord<Rika> Same language for the front end and back end, no need to write the same thing twice if you want to share code between them
11:20:23henisteinRika in javascript you need to write the same thing twice?
11:21:10FromDiscord<Rika> No, I guess you can use node in such a case
11:21:28FromDiscord<Rika> But if you’re not using node, then you’ll have to write JavaScript then the other language
11:21:41FromDiscord<Rika> If you have components to share then duplication happens
11:21:48henisteinalright
11:26:45FromDiscord<this cat is very good> In reply to @Isofruit "Given I can't see": correct
11:26:47FromDiscord<this cat is very good> my bad
11:26:54FromDiscord<this cat is very good> (edit) "my bad ... " added "for slow reply"
11:27:20*henistein quit (Quit: Client closed)
11:27:25FromDiscord<this cat is very good> that's interesting
11:27:36FromDiscord<this cat is very good> I left it while it was hanging and it finally completed?
11:27:44FromDiscord<this cat is very good> Nothing in the download should be taking that long, I'm very confused.
11:28:00FromDiscord<this cat is very good> But that's just choosenim, let's see about the package manager
11:29:06FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3Vmu
11:29:40FromDiscord<TryAngle> using objects to make "scope" function calls
11:29:49FromDiscord<TryAngle> (edit) removed "make"
11:30:42FromDiscord<TryAngle> I mean, everything is async so it shouldnt be an issue 🤔
11:36:58*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
11:44:09FromDiscord<this cat is very good> Okay so it's just ludicrously slow then
11:46:35FromDiscord<this cat is very good> About 15 mins later the package installed.
11:52:23*neceve joined #nim
11:53:31FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=3Vmx
11:55:26FromDiscord<ShalokShalom> In reply to @Isofruit "Yeah can't repeat that": So it only happens with GCC and in debug mode?
11:57:20FromDiscord<ShalokShalom> @henistein Nim is compiled to Javascript, in the case of Nitter. So you write Nim, and then your code becomes Javascript.
11:57:34FromDiscord<ShalokShalom> So they didnt replace Javascript with Nim, strictly speaking.
12:01:21FromDiscord<Phil> In reply to @ShalokShalom "So it only happens": Yep
12:01:52FromDiscord<Phil> In reply to @Rika "Version of GCC?": 11.2.0, the current arch version
12:02:47FromDiscord<Jakraes> In reply to @ShalokShalom "Can I see the": Yeah sure, gimme a few minutes
12:03:43FromDiscord<Phil> Actually, I haven't checked whether the issue persists through a reboot, I didn't pay attention but maybe one of the updates over the last 24h was for gcc
12:07:37FromDiscord<ShalokShalom> Thats a nice GUI for issues like this: https://archlinux.org/packages/community/x86_64/pacmanlogviewer/
12:10:28FromDiscord<Phil> Yep,, gcc update yesterday
12:10:58FromDiscord<Phil> Apparently when that happens and you don't reboot after it does funny things with nim programs you compile... the weirdest bug I had yet
12:11:45FromDiscord<Phil> I'll keep that in mind
12:17:13FromDiscord<ShalokShalom> Oh
12:17:21FromDiscord<ShalokShalom> Always reboot after an update anyway
12:17:34FromDiscord<ShalokShalom> I have also like 9/10 of my issues because of this.
12:24:51FromDiscord<Rika> haha same
12:31:01FromDiscord<Jakraes> @ShalokShalom https://media.discordapp.net/attachments/371759389889003532/965227881347317770/Screenshot_7.png
12:31:46FromDiscord<Jakraes> generatePerson is the same as generatePlayer, one returns an Entity object and another returns a Player object
12:32:20FromDiscord<Jakraes> And here's the object stuff https://media.discordapp.net/attachments/371759389889003532/965228214526042192/Screenshot_8.png
12:39:02*elph quit (Quit: Connection closed for inactivity)
12:39:37FromDiscord<ShalokShalom> looks awesome
12:40:04FromDiscord<ShalokShalom> And the stuff within the @[ are the quick units?
12:41:19FromDiscord<Jakraes> Yeah those area the body parts inside the seq, you basically just assing the bodypart index to the index of the parent in the seq
12:41:53FromDiscord<Jakraes> So it's basically this https://media.discordapp.net/attachments/371759389889003532/965230621838426153/quick-union-example.png
12:42:14FromDiscord<Jakraes> (edit) "assing the" => "assignthe"
12:42:21FromDiscord<Jakraes> (edit) "assignthe" => "assign the"
12:43:57FromDiscord<Jakraes> It's a bit manual, but since there won't be any creatures with more than 10 body parts, it's pretty efficient
12:57:30*noeontheend joined #nim
12:58:05FromDiscord<Catalin Marincia> I have some problems using `choosenim`, it is stuck at `curl https://nim-lang.org/choosenim/init.sh -sSf | sh` I do have internet access
12:59:05FromDiscord<ShalokShalom> I like that its manual, since that means it is explicit
12:59:11FromDiscord<ShalokShalom> Looks good
12:59:26FromDiscord<ShalokShalom> In reply to @Catalin Marincia "I have some problems": Exact error output?
12:59:40FromDiscord<ShalokShalom> You mean it is literally stuck?
12:59:40FromDiscord<Catalin Marincia> None, actually
12:59:41FromDiscord<Catalin Marincia> https://media.discordapp.net/attachments/371759389889003532/965235097466986497/unknown.png
12:59:46FromDiscord<Catalin Marincia> Yes, it's stuck
12:59:49FromDiscord<Forest> Anyone know of a GitHub Action to build an android app with Nim?
13:00:18FromDiscord<ShalokShalom> Seems to be a server issue
13:00:20FromDiscord<ShalokShalom> Same here
13:00:43FromDiscord<Catalin Marincia> @dom96 can you please check?
13:01:00FromDiscord<Catalin Marincia> I hope I got the right person
13:01:20FromDiscord<ShalokShalom> I reported it in #internals as well
13:01:35FromDiscord<Catalin Marincia> Thank you
13:02:32FromDiscord<dom96> maybe it's just downloading very slowly? how fast is your internet?
13:03:39FromDiscord<Catalin Marincia> I'll check now
13:03:59FromDiscord<Catalin Marincia> https://media.discordapp.net/attachments/371759389889003532/965236178481725530/unknown.png
13:09:15FromDiscord<dom96> well, have a look at the .sh script. Can you run the download command manually and see why it gets stuck?
13:24:01FromDiscord<Catalin Marincia> I managed to download the choosenim binary
13:24:06FromDiscord<Catalin Marincia> I am running
13:24:09FromDiscord<Catalin Marincia> `./choosenim-0.8.2_linux_amd64 stable --firstInstall -y`
13:24:17FromDiscord<Catalin Marincia> This is stuck
13:24:32FromDiscord<Catalin Marincia> (edit) "is stuck" => "hangs"
13:28:21FromDiscord<dom96> interesting, try without `-y` and also pass `--debug`
13:29:06FromDiscord<Catalin Marincia> https://media.discordapp.net/attachments/371759389889003532/965242499876679680/unknown.png
13:29:31FromDiscord<Catalin Marincia> no other output
13:30:23*arkurious joined #nim
13:33:46FromDiscord<Phil> Out of curiosity, do yall only import with relative paths?
13:33:57FromDiscord<Phil> (edit) "with" => "modules via"
13:34:37FromDiscord<Rika> what do you mean
13:35:21FromDiscord<Catalin Marincia> :)) kind of a bad joke, but currently I am not importing anything at all, stuck at downloading nim
13:36:38FromDiscord<Catalin Marincia> Something I did was enabling analytics when I very first run the curl command
13:36:45*T-urbo joined #nim
13:36:45FromDiscord<Catalin Marincia> Could it be the reason for getting stuck?
13:36:52FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3VmM
13:38:16FromDiscord<dom96> @Catalin Marincia strange, does `curl -Lv http://nim-lang.org/channels/stable` work on your side?
13:38:30FromDiscord<Catalin Marincia> Yes
13:38:40*T-urbo quit (Client Quit)
13:38:40FromDiscord<Catalin Marincia> Some big chunk of text just got printed
13:39:24FromDiscord<Rika> In reply to @Isofruit "I've been so far": there's no thing as "absolute"? i might not be understanding
13:40:07FromDiscord<Catalin Marincia> It finished downloading nim
13:40:31FromDiscord<Catalin Marincia> sent a code paste, see https://play.nim-lang.org/#ix=3VmN
13:40:36FromDiscord<dom96> so it got unstuck?
13:40:38FromDiscord<Catalin Marincia> After running the command `curl https://nim-lang.org/choosenim/init.sh -sSf | sh` again
13:40:47FromDiscord<Catalin Marincia> It showed me this
13:40:50FromDiscord<Catalin Marincia> Yes
13:40:53FromDiscord<Catalin Marincia> sent a code paste, see https://play.nim-lang.org/#ix=3VmO
13:41:44FromDiscord<Phil> In reply to @Rika "there's no thing as": You can view a project as having a root directory, and make all import paths relative to that, at least that's my experience with other programming languages handling that. ↵So for example `src/applications/user/userModel` instead of `../user/userModel`
13:41:57FromDiscord<Rika> nim does not have this concept
13:41:59FromDiscord<Rika> as of now i believe
13:42:11FromDiscord<Rika> you'd have to pass in a command arg to the compile command i think
13:42:52FromDiscord<Phil> Hmm I#ll take a look at the compiler docs to see whether I can find a flag in that direction
13:43:42FromDiscord<dom96> In reply to @Catalin Marincia "Yes": if you can reproduce it with Nim's httpclient it would be interesting to try and figure out what's going on there
13:45:22FromDiscord<Catalin Marincia> It's my first time using Nim so I don't know yet about it's httpclient. If you can guide me, I will help you debug the issue
13:52:42FromDiscord<Catalin Marincia> What editor/ide are you using for writing Nim code?
13:53:03FromDiscord<dom96> VS Code
13:54:45FromDiscord<Rika> neovim
13:54:48FromDiscord<Rika> lots of different choices
13:56:06FromDiscord<dom96> to repro basically just use https://nim-lang.org/docs/httpclient.html#downloadFile%2CHttpClient%2C%2Cstring
13:59:07supakeenWell, transitory network failures are nothing new.
13:59:11*supakeen files under cannot-reproduce.
14:05:37*zeus-supreme1 joined #nim
14:08:51*zeus-supreme quit (Ping timeout: 256 seconds)
14:38:35FromDiscord<federico3> can I get a list of all effects applied to a proc at compile time?
14:46:36FromDiscord<deech> Why does `echo (quote: some("blah")).repr` output `((val: "blah", has: true),)`? I would expect to see `some("blah")`.
14:51:19FromDiscord<Rika> does nimble allow for multiple authors
14:51:47FromDiscord<deech> In reply to @deech "Why does `echo (quote:": Because `some` is a `proc`, my bad.
14:52:35FromDiscord<Rika> quote should have changed it into ast though
14:52:38FromDiscord<Rika> and repr of ast is the code
14:53:11FromDiscord<konsumlamm> In reply to @deech "Why does `echo (quote:": because that's how `Option[T]` is implemented, with a `val: T` and a `has: bool`
14:53:28FromDiscord<konsumlamm> there are no native sum types in Nim
14:53:42FromDiscord<konsumlamm> (edit) "In reply to @deech "Why does `echo (quote:": because that's how `Option[T]` is implemented, with a `val: T` and a `has: bool` ... " added "field"
14:55:32FromDiscord<dom96> In reply to @Rika "does nimble allow for": it's just a string, so you can type whatever you want in there, including multiple names
14:55:56FromDiscord<Rika> yes but i was expecting being able to put a seq there at least haha
15:02:53*v9fk quit (Remote host closed the connection)
15:06:49*kenran joined #nim
15:08:25*slowButPresent joined #nim
15:16:40*noeontheend quit (Ping timeout: 248 seconds)
15:31:43*noeontheend joined #nim
15:41:34*v9fk joined #nim
15:55:55*noeontheend quit (Ping timeout: 260 seconds)
16:17:52FromDiscord<!Patitotective> how can i compress a string to make it smaller? 🤔
16:19:45*v9fk quit (Remote host closed the connection)
16:19:59*v9fk joined #nim
16:20:24*vicfred quit (Quit: Leaving)
16:21:23FromDiscord<Rika> what does that mean
16:21:33FromDiscord<Rika> theres a lot of ways to compress a string, but whats your goal
16:23:06FromDiscord<!Patitotective> i fetch some json from _the internet_ but its too big and it takes too much time to read and write in a file, so i think that compressing it and writing it to the file would be faster 🤨
16:25:50*vicfred joined #nim
16:26:11FromDiscord<huantian> I mean you can use zippy to compress it
16:27:01FromDiscord<huantian> But compressing data will take it longer to read, since you have to uncompressed it
16:27:35FromDiscord<!Patitotective> -_- not so sure, let me test it
16:28:42*v9fk quit (Remote host closed the connection)
16:28:43FromDiscord<huantian> It might be better if you go from JSON -> Nim object -> binary -> file, with flatty or something
16:28:56*v9fk joined #nim
16:30:44FromDiscord<spoon> flatty + supersnappy?
16:31:17FromDiscord<Elegantbeef> Compressing compressed data rarely gains any benefits
16:31:44FromDiscord<spoon> ah flattys already compressed? thought it was just a binary format
16:32:00FromDiscord<spoon> saw treeform combine them in a forum post before
16:32:21FromDiscord<Elegantbeef> I just woke up and thought you said zippy, i'm dumb
16:32:34FromDiscord<spoon> ah alr
16:33:09FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Vnc
16:33:22FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Vnd
16:33:24FromDiscord<!Patitotective> :[
16:33:37FromDiscord<Yardanico> also you can use zstd too
16:33:42FromDiscord<Yardanico> there are nim bindings, multiple
16:34:07FromDiscord<Elegantbeef> Isnt snappy a cpu light compression algo
16:34:09*jmdaemon joined #nim
16:35:28FromDiscord<!Patitotective> In reply to @Yardanico "now compare performance": in the github page you can see zippy is faster :]↵https://github.com/guzba/zippy#compress↵https://github.com/guzba/zippy#compress
16:35:59FromDiscord<Yardanico> zippy vs supersnappy
16:35:59FromDiscord<!Patitotective> (edit) ":]↵https://github.com/guzba/zippy#compress↵https://github.com/guzba/zippy#compress" => ":]↵https://github.com/guzba/zippy#compress↵https://github.com/guzba/supersnappy#performance"
16:36:03FromDiscord<!Patitotective> lol
16:36:14FromDiscord<Yardanico> hm
16:36:19FromDiscord<Yardanico> try zstd then
16:41:55FromDiscord<!Patitotective> ~~how do i convert a `seq[byte]` to a string? 💀 ~~
16:42:16FromDiscord<Elegantbeef> Why do you need to?
16:42:40FromDiscord<!Patitotective> zstd's decompress proc returns a `seq[byte]`, not a string :[↵https://github.com/wltsmrz/nim_zstd#simple-api
16:42:54FromDiscord<Elegantbeef> That doesnt change my question
16:43:19FromDiscord<Yardanico> In reply to @Patitotective "~~how do i convert": just cast
16:43:31FromDiscord<!Patitotective> i want to `assert originalData == decompress(compressedData)`
16:43:53FromDiscord<!Patitotective> In reply to @Yardanico "just cast": :D
16:44:02FromDiscord<Yardanico> ?
16:44:07FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Vnf
16:44:09FromDiscord<Yardanico> and what about perf
16:44:19FromDiscord<!Patitotective> perf who? lol
16:44:25FromDiscord<Yardanico> perf ormance
16:46:03FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Vng
16:46:59FromDiscord<!Patitotective> :]
16:47:37FromDiscord<Rika> thats cursed beef
16:47:46FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Vnh
16:47:55FromDiscord<Elegantbeef> What;s so cursed?
16:47:55FromDiscord<Yardanico> treeform's benchy for example
16:50:05FromDiscord<Rika> the b variable in your example lmfao
16:50:41FromDiscord<Elegantbeef> Ah it's just for demonstration purposes do not try it at home i'm what you call a "professional"
16:50:53FromDiscord<Phil> You're also a walking paradox
16:51:03FromDiscord<Elegantbeef> Fuck yea
16:51:43FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Vnj
16:51:49FromDiscord<Yardanico> with -d:danger ?
16:51:53FromDiscord<!Patitotective> release
16:51:57FromDiscord<Elegantbeef> Uh oh yard
16:52:02FromDiscord<Elegantbeef> You've done it
16:52:06FromDiscord<Elegantbeef> Rika is triggered
16:52:07FromDiscord<Yardanico> and compare to supersnappy and zippy
16:52:12FromDiscord<Yardanico> In reply to @Elegantbeef "Rika is triggered": ?
16:52:13FromDiscord<!Patitotective> danger scares me
16:52:13*lumo_e joined #nim
16:52:25FromDiscord<Yardanico> In reply to @Patitotective "danger scares me": then at least `-d:lto`
16:52:37FromDiscord<!Patitotective> whats that
16:52:45FromDiscord<Yardanico> lto
16:52:46FromDiscord<Rika> REEEEEEEEE DANGER IS DANGER
16:52:53FromDiscord<Yardanico> In reply to @Rika "REEEEEEEEE DANGER IS DANGER": lto
16:52:56FromDiscord<Yardanico> he's not asking about danger
16:52:58FromDiscord<Rika> lto is ok
16:53:04FromDiscord<Phil> lto is acronym for?
16:53:08FromDiscord<Rika> In reply to @Elegantbeef "Rika is triggered": i was making the joke here
16:53:09FromDiscord<Yardanico> link time optimization
16:53:16FromDiscord<Elegantbeef> Link time optimiziatiatitirienrenrs
16:53:31FromDiscord<Phil> Is that not done as part of d:release? Is there a scenario where you should be wary of it?
16:53:49FromDiscord<Elegantbeef> It's not done due to compiler differences
16:54:00FromDiscord<Yardanico> In reply to @Isofruit "Is that not done": in almost all cases LTO is beneficial with modern compilers
16:54:16FromDiscord<Yardanico> and it doesn't have obvious downsides except for maybe a bit bigger binary
16:54:28FromDiscord<Yardanico> since it inlines across different program parts
16:54:30FromDiscord<Phil> Given that I'm only aware of clang/llvm and gcc and IIRC gcc is ancient, that means it works with clang and not gcc?
16:54:38FromDiscord<Yardanico> gcc isn't "ancient"
16:54:53FromDiscord<Yardanico> due to clang they've made a lot of progress in the past 5-10 years on their compiler
16:54:58FromDiscord<Rika> ancient as in not updated
16:55:03FromDiscord<Yardanico> so both clang and gcc are modern and support LTO/PGO/etc
16:55:12FromDiscord<Rika> so bespoke compilers
16:55:21FromDiscord<Elegantbeef> Comically it actually works with gcc and not clang
16:55:29FromDiscord<Phil> Oh, check, so nothing I'm ever going to care about within the next 24 months as I learn more
16:55:30FromDiscord<Elegantbeef> You can do LTO with both you just need to manually do it with clang with `--passL:"-flto"`
16:55:38FromDiscord<Yardanico> In reply to @Elegantbeef "You can do LTO": yes but that's due to -d:lto's bad implementation
16:55:40FromDiscord<Yardanico> not due to clang
16:55:43FromDiscord<Rika> like compilers for certain embedded devices or weirdos like that one that strived for correctness i forgot the name
16:56:24FromDiscord<Elegantbeef> I mean it's due to clang be different to gcc↵(@Yardanico)
16:56:53FromDiscord<Yardanico> nope
16:57:07FromDiscord<Yardanico> actually it's due to nim config forcing `-fuse-ld=lld` for clang
16:57:08FromDiscord<Yardanico> for lto
16:57:13FromDiscord<Yardanico> https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg#L334
16:57:33FromDiscord<Yardanico> but if you have lld installed -d:lto works
16:57:36FromDiscord<Yardanico> for clang
16:58:16FromDiscord<Rika> me, mistaking `ldd` and `lld`:
16:58:17FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Vnk
16:58:23FromDiscord<Phil> Check, I mean I'm using gcc most of the time anyway (I only experimented with clang earlier because of a gcc-update-but-no-reboot-bug), so I'll throw that parameter into my auto-compile-on-save task in vscode
16:58:28FromDiscord<Rika> LTO murders zippy?
16:58:39FromDiscord<Rika> or did you not add -d:release as well
16:58:41FromDiscord<Yardanico> In reply to @Isofruit "Check, I mean I'm": eh, don't use lto on debug compiles
16:58:46FromDiscord<Yardanico> LTO makes link times much longer, use it for release builds
16:58:52FromDiscord<demotomohiro> Here is example Nim command to use lto: https://internet-of-tomohiro.netlify.app/nim/faq.en.html#optimization-which-compiler-option-generate-smallest-executableqmark
16:58:57FromDiscord<Yardanico> yeah @!Patitotective lto is used together with release
16:59:02FromDiscord<!Patitotective> In reply to @Rika "or did you not": 💀 i-i need to?...
16:59:03FromDiscord<Yardanico> In reply to @demotomohiro "Here is example Nim": why -s though
16:59:05FromDiscord<Rika> yes
16:59:08FromDiscord<Elegantbeef> Lol if you arent using release + lto you've just thrown away all optimization
16:59:15FromDiscord<Yardanico> ah you showed an example with small code size
16:59:19FromDiscord<Rika> whats the point of lto if youre on debug xd
16:59:23FromDiscord<!Patitotective> :[
16:59:27FromDiscord<Yardanico> there are much more options to help with compiler size @demotomohiro
16:59:28FromDiscord<Elegantbeef> Just lto does fuck all
17:00:11FromDiscord<Yardanico> if you're on nix something like `--gc:arc -d:useMalloc --os:any -d:posix -d:noSignalHandler --panics:on -d:danger` will make a much smaller binary (of course also add lto there)
17:00:31FromDiscord<Yardanico> `nim c --os:any -d:posix -d:noSignalHandler --cc:clang --clang.exe="zigcc.sh" --clang.linkerexe="zigcc.sh" -d:danger --gc:arc -d:useMalloc --panics:on --passL:"-target x86_64-linux-musl -flto" --opt:size hello.nim`
17:00:47FromDiscord<Phil> Hmm myself I don't really care about binary size unless we're reaching gigabyte territory, which is highly unlikely.
17:00:57FromDiscord<!Patitotective> sent a code paste, see https://paste.rs/FcJ
17:01:08FromDiscord<Yardanico> In reply to @Isofruit "Hmm myself I don't": binary size also = RAM usage
17:01:24FromDiscord<Yardanico> well, the bigger the binary, the higher the RAM usage will be (because you have to load it in memory)
17:01:32FromDiscord<Phil> It's a web application, I've got around a gig of dedicated RAM just for that webserver
17:01:34FromDiscord<!Patitotective> so @Yardanico what should i use :]
17:01:35FromDiscord<Rika> In reply to @Yardanico "binary size also =": kinda negligible until a few MB though
17:01:40FromDiscord<Yardanico> In reply to @Patitotective "so <@177365113899057152> what should": whatever works well for you
17:01:44FromDiscord<Elegantbeef> Wow who'd have thought the lowest cpu usage algo would be the most efficient
17:01:55FromDiscord<!Patitotective> In reply to @Yardanico "whatever works well for": :[
17:01:57FromDiscord<cyberbird träumend> a bot talking
17:01:57FromDiscord<Yardanico> In reply to @Rika "kinda negligible until a": yeah, until you try a 200mb go binary :P
17:02:01FromDiscord<Rika> lol
17:02:05FromDiscord<Yardanico> In reply to @cyberbird träumend "a bot talking": a bridge talking
17:02:06FromDiscord<Elegantbeef> Snappy is probably the best if yu want speed + compression
17:02:26FromDiscord<cyberbird träumend> I'm not a bridge
17:02:29FromDiscord<Elegantbeef> Bridges dont talk they're for travel you dunce
17:02:30FromDiscord<cyberbird träumend> I think
17:02:33FromDiscord<Yardanico> In reply to @cyberbird träumend "I'm not a bridge": i wasn't talking about you
17:02:38FromDiscord<Yardanico> who are you even
17:02:43FromDiscord<cyberbird träumend> just arrived
17:02:51FromDiscord<Phil> My estimated loc is unlikely to go beyond 10k I think, so I should be alright since I don't think I'll crack 5MB
17:02:52FromDiscord<Yardanico> what brings you there
17:02:54FromDiscord<Elegantbeef> Jeez yard sound more aggresive
17:03:02FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3Vnp
17:03:03FromDiscord<cyberbird träumend> I was searching for interesting programming languages
17:03:07FromDiscord<Rika> In reply to @Patitotective "is it worth? 🤔": choose: speed, size
17:03:10FromDiscord<!Patitotective> In reply to @cyberbird träumend "I was searching for": and you found one
17:03:12FromDiscord<Rika> one or the other, usually
17:03:18FromDiscord<cyberbird träumend> Nim looks very interesting
17:03:27FromDiscord<Elegantbeef> Computer science is always exchanging time for size
17:03:33FromDiscord<Phil> I can also state that nim has a pretty nice learning curve
17:03:43FromDiscord<cyberbird träumend> I'm a complete newbie regarding everything in programming though
17:03:44FromDiscord<Rika> In reply to @Elegantbeef "Computer science is always": be it programmer time or computer time......
17:03:48FromDiscord<Rika> cough
17:04:20FromDiscord<Phil> Though python likely still has the better learning curve, it's hard to beat at that.
17:04:24FromDiscord<Yardanico> In reply to @cyberbird träumend "I'm a complete newbie": check out https://narimiran.github.io/nim-basics/ at least then
17:04:32FromDiscord<Elegantbeef> It also has more runtime errors 😛
17:04:34FromDiscord<cyberbird träumend> In reply to @cyberbird träumend "I'm a complete newbie": but I'm also quite obsessive with... beggining projects, so I was in a quite long search
17:04:51FromDiscord<!Patitotective> In reply to @Isofruit "Though python likely still": 💀
17:04:54FromDiscord<Phil> In reply to @Elegantbeef "It also has more": Oh yeah, that's actually one of the things I love about nim: I get to be dumb at compile time instead of runtime, makes debugging better
17:05:04FromDiscord<cyberbird träumend> I tried some languages, given up on OOP cause it seems dumb, didn't really like rust
17:05:14FromDiscord<Elegantbeef> A static type system is really magical
17:05:32FromDiscord<cyberbird träumend> that feature of yours that let you write stuff in different orders, kinda like how you write a natural language, is pretty fascinating
17:05:36FromDiscord<Phil> If you ever want to take another look at Rust I'd recommend it after you're already somewhat settled with 1 or 2 other languages
17:05:41FromDiscord<Phil> Not before
17:05:49FromDiscord<cyberbird träumend> (edit) "that feature of yours that let you write stuff in different orders, kinda like how you write ... a" added "in"
17:05:54FromDiscord<demotomohiro> @Yardanico `-s` option removes all symbol table and relocation information from the executable.
17:06:01FromDiscord<cyberbird träumend> In reply to @Yardanico "check out https://narimiran.github.io/nim-basics/ a": I'll take a look, thank you
17:06:03FromDiscord<Yardanico> In reply to @demotomohiro "<@177365113899057152> `-s` option removes": yeah, i noticed you meant for size
17:06:12FromDiscord<Yardanico> but as I said, if you really want the smallest size, there are a lot of other options
17:06:23FromDiscord<Elegantbeef> There is also https://ssalewski.de/nimprogramming.html
17:06:30FromDiscord<Elegantbeef> Which explains everything
17:06:31FromDiscord<Phil> Nim has a nice learning curve generally, it gives you the option to interact with a lot of concepts that you, on a superficial level, normally don't think about (such as compile-time programming)
17:06:37FromDiscord<cyberbird träumend> there's also that book right?
17:06:49FromDiscord<Yardanico> nim in action? yes
17:06:52FromDiscord<cyberbird träumend> nim in action I think
17:06:56FromDiscord<Yardanico> but it's more for people who already know programming but don't know nim
17:07:00FromDiscord<cyberbird träumend> I see
17:07:02FromDiscord<Elegantbeef> Maybe you dont think about normally 😛↵(@Phil)
17:07:05FromDiscord<cyberbird träumend> I like books
17:07:16FromDiscord<cyberbird träumend> In reply to @Elegantbeef "There is also https://ssalewski.de/nimprogramming.h": I'll take a look as well
17:07:19FromDiscord<Phil> In reply to @Elegantbeef "Maybe you dont think": on a superficial level 😛
17:07:59FromDiscord<Phil> I really like the opt-in complexity
17:08:04FromDiscord<cyberbird träumend> you know I'm quite fond of good aesthetics
17:08:05FromDiscord<demotomohiro> @Yardanico thx, I will try these options later.
17:08:14FromDiscord<Phil> (edit) "complexity" => "complexity. You can go deep, but don't have to"
17:08:20FromDiscord<cyberbird träumend> In reply to @cyberbird träumend "you know I'm quite": so I can't bring myself to like something that looks ugly
17:08:49FromDiscord<cyberbird träumend> it seems like you guys put some effort on making the whole environment aesthetically pleasing
17:09:06FromDiscord<cyberbird träumend> that's great
17:09:51FromDiscord<!Patitotective> :]
17:11:08FromDiscord<Omicron666> hello, just joined↵<https://play.nim-lang.org/> is down?
17:11:23FromDiscord<Elegantbeef> It seems so
17:11:30FromDiscord<Elegantbeef> And there is not a pmunch in site to scream at
17:12:09FromDiscord<Yardanico> In reply to @Omicron666 "hello, just joined <https://play.nim-lang.org/>": in the meanwhile you can use other similar things
17:12:11FromDiscord<Yardanico> wandbox.org
17:12:15FromDiscord<Elegantbeef> I wonder when pmunch will stop hosting the site on his toaster
17:12:40FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/965298761188397086/unknown.png
17:12:40FromDiscord<Phil> In reply to @Elegantbeef "I wonder when pmunch": Maybe he'll start hosting it on his washing machine
17:12:54FromDiscord<Phil> (edit) "machine" => "machine.↵For clean code"
17:13:00FromDiscord<Yardanico> wandbox also allows you to change compiler arguments
17:13:00FromDiscord<Elegantbeef> Ah smart, i can tell you've read "clean code"↵(@Phil)
17:13:09FromDiscord<cyberbird träumend> well, do you have a recommended IDE or something of the sort to start learning the language?
17:13:10FromDiscord<Elegantbeef> Fuck phil
17:13:14FromDiscord<Elegantbeef> I was going to make that joke
17:13:16FromDiscord<Elegantbeef> Shame on you
17:13:42FromDiscord<Phil> That's the sad thing when you're too slow 😛
17:14:05FromDiscord<Yardanico> In reply to @cyberbird träumend "well, do you have": the most popular option is vscode with the nim-saem extension
17:14:07FromDiscord<!Patitotective> In reply to @cyberbird träumend "well, do you have": ~~sublime~~
17:14:20FromDiscord<Yardanico> assuming you installed nim already you'll have autocompletions, syntax checking and stuff
17:14:30FromDiscord<Phil> There's neovim users (Rika) vscode (dom and myself and no idea who else), sublime (Pati)
17:14:47FromDiscord<Elegantbeef> Vscode is the most popular
17:14:48FromDiscord<Phil> Vscode being the most popular one as yard stated
17:14:53FromDiscord<huantian> And Beef uses Kate
17:14:54FromDiscord<Elegantbeef> Phil leaves me out the bastard
17:14:55FromDiscord<Phil> Dangit, too slow myself
17:15:01FromDiscord<cyberbird träumend> can VSCODE execute nim code though?
17:15:06FromDiscord<cyberbird träumend> thought it was just an editor
17:15:07FromDiscord<huantian> Yeah
17:15:19FromDiscord<Phil> In reply to @Elegantbeef "Phil leaves me out": You use vscode as well? Must've missed it, duly noted now!
17:15:25FromDiscord<huantian> Just setup a launch and build task
17:15:33FromDiscord<!Patitotective> sublime's also an editor and there's the nimlime extension :]
17:15:35FromDiscord<huantian> It’s outlined a bit in the extension readme
17:15:39FromDiscord<cyberbird träumend> sounds good then
17:15:42FromDiscord<Elegantbeef> No i've been using kate like huan said
17:15:45FromDiscord<Phil> In reply to @cyberbird träumend "can VSCODE execute nim": It can compile and run on save with a tasks.json
17:15:55FromDiscord<Yardanico> In reply to @cyberbird träumend "can VSCODE execute nim": it has a built-in terminal
17:15:58FromDiscord<cyberbird träumend> In reply to @Patitotective "sublime's also an editor": isn't sublime like a pretty .txt app
17:16:11FromDiscord<Yardanico> and nim extension has F6 shortcut to compile the file you have open
17:16:11FromDiscord<Elegantbeef> You also can just open the terminal and run the compiler/program
17:16:19FromDiscord<Yardanico> too hard
17:16:20FromDiscord<cyberbird träumend> In reply to @Yardanico "and nim extension has": I see
17:16:36FromDiscord<cyberbird träumend> sounds great
17:16:39FromDiscord<huantian> Really? Huh I’ve always just used my own launch.json↵(@Yardanico)
17:16:47FromDiscord<Phil> I've never even looked at Kate, isn't that a notepad equivalent?
17:16:52FromDiscord<cyberbird träumend> I'll take a look at the other ones just for the sake of it but vs code sounds good enough
17:16:57FromDiscord<spoon> i use vscode and i have the coderunner extension so i can just click the play button
17:16:58FromDiscord<Elegantbeef> It's a text editor
17:17:07FromDiscord<Phil> Strictly speaking, so is vscode
17:17:12FromDiscord<Elegantbeef> Yes
17:17:15FromDiscord<Elegantbeef> Congrats you understand
17:17:25FromDiscord<Phil> But featuresets differ dangit!
17:18:00FromDiscord<Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/965300106310058034/image.png
17:18:03FromDiscord<Elegantbeef> Hmm looks like something
17:18:05FromDiscord<!Patitotective> In reply to @cyberbird träumend "isn't sublime like a": no https://media.discordapp.net/attachments/371759389889003532/965300126874759238/Screenshot_from_2022-04-17_12-17-27.png
17:18:22FromDiscord<Elegantbeef> This guy has minimap enabled
17:18:22FromDiscord<Phil> In reply to @Elegantbeef "image.png": Oh wow, huh yeah that supports a lot more than I assumed
17:18:25FromDiscord<Elegantbeef> Fucking weirdo
17:18:25FromDiscord<cyberbird träumend> In reply to @Patitotective "**no**": I have atom
17:18:31FromDiscord<spoon> is emacs worth learning?
17:18:39FromDiscord<cyberbird träumend> rat
17:18:39FromDiscord<Phil> I mean
17:18:49FromDiscord<huantian> But I mean I’m gonna have to add like 50 compiler flags anyways, so I’ll just take the time to do it with vscode’s built-in runner↵(@spoon)
17:18:51FromDiscord<Elegantbeef> If you have a minimap i instantly assume you eat babies
17:18:51FromDiscord<Phil> yes, so is vim or any decent text editor
17:18:52FromDiscord<!Patitotective> In reply to @Elegantbeef "This guy has minimap": :]
17:19:16FromDiscord<Yardanico> In reply to @huantian "But I mean I’m": using Nim config files is better
17:19:22FromDiscord<Yardanico> Since then nimsuggest also knows your flags
17:19:30FromDiscord<spoon> In reply to @huantian "But I mean I’m": i just hit up+enter in the terminal when i dont have flags in a .nims file
17:19:34FromDiscord<!Patitotective> In reply to @Elegantbeef "If you have a": 😋
17:19:52FromDiscord<huantian> Yeah true, I need to actually keep track of which flags I use
17:19:55FromDiscord<Elegantbeef> Also huan i just learned there is a deprecated `callsite` procedure in `macros`
17:19:56FromDiscord<Yardanico> so e.f. if you compile with --threads:on and use threads stuff nimsuggest will error unless you put that flag into your Nim config as well
17:20:30FromDiscord<huantian> I usually just keep ssl and stylecheck in my config.nims
17:20:43FromDiscord<huantian> Huh why is it deprecated
17:21:05FromDiscord<!Patitotective> without a minimap how could i browse this code :[ https://media.discordapp.net/attachments/371759389889003532/965300882747035719/Screenshot_from_2022-04-17_12-20-35.png
17:21:08FromDiscord<huantian> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/965300735107559484): I usually just keep ssl and stylecheck in my config.nims, but I should add like panics on and other stuff
17:21:15FromDiscord<Elegantbeef> No clue really
17:21:25FromDiscord<Elegantbeef> With the scrollbar
17:21:35FromDiscord<huantian> Jump to symbol
17:21:37FromDiscord<Elegantbeef> The fuck is the point of the minimap for code "Ah yes there is code in my code"
17:22:01FromDiscord<huantian> Actually does jump to symbol work with vscode Nim
17:22:07FromDiscord<!Patitotective> In reply to @Elegantbeef "The fuck is the": its pedantry
17:22:19FromDiscord<Elegantbeef> It does work occasionally
17:22:58FromDiscord<demotomohiro> At least, minimap is very helpfull when I play RTS games:)
17:23:23FromDiscord<Elegantbeef> Exactly
17:23:55FromDiscord<!Patitotective> :[
17:25:31FromDiscord<Solitude> In reply to @Elegantbeef "The fuck is the": mouse users
17:26:17FromDiscord<huantian> I wanna switch to workmans layout but then that’s gonna kill my vim key bindings
17:26:24FromDiscord<!Patitotective> how can i `except NPegException, SyntaxError as error:`?↵like match multiple exceptions :facer
17:26:29FromDiscord<!Patitotective> (edit) ":facer" => "🤨"
17:26:34FromDiscord<huantian> You don’t
17:26:38FromDiscord<!Patitotective> :[
17:27:14FromDiscord<huantian> Don’t as error, use that one function that’s like getCurrentException or something
17:27:23FromDiscord<Elegantbeef> Ugh
17:27:29FromDiscord<Elegantbeef> Dont do that
17:27:39FromDiscord<Elegantbeef> Just have the two except clauses
17:27:49FromDiscord<!Patitotective> :]
17:28:19FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/rYx
17:29:00FromDiscord<cyberbird träumend> installation done
17:29:10FromDiscord<cyberbird träumend> that was simple
17:29:31FromDiscord<cyberbird träumend> In reply to @Patitotective "without a minimap how": (unregistered)
17:29:42FromDiscord<!Patitotective> :slu
17:29:46FromDiscord<!Patitotective> (edit) ":slu" => "💀"
17:29:53FromDiscord<cyberbird träumend> In reply to @Patitotective "💀": 💀
17:30:41FromDiscord<!Patitotective> sublime doesn't know where i live yet↵~~until they contact me im not gonna pay 100$~~
17:30:55FromDiscord<huantian> Come on support the software creator
17:31:12FromDiscord<cyberbird träumend> In reply to @Patitotective "sublime doesn't know where": hypercam feds are messing up with sublime text feds ops
17:31:22FromDiscord<!Patitotective> In reply to @huantian "Come on support the": i dont have 100$...↵if i had 100$ id pay
17:31:32FromDiscord<cyberbird träumend> 100$ is a lot
17:31:39FromDiscord<!Patitotective> sadly :[
17:31:41FromDiscord<cyberbird träumend> specially when u have similar software for free
17:31:59FromDiscord<!Patitotective> In reply to @cyberbird träumend "specially when u have": what similar software?
17:32:07FromDiscord<cyberbird träumend> other text editors I mean
17:32:22FromDiscord<Elegantbeef> Vscodium, kate, onivim2
17:32:27*lumo_e quit (Ping timeout: 240 seconds)
17:33:15FromDiscord<Omicron666> you have minimap in vscode
17:33:28FromDiscord<Omicron666> by default
17:33:41FromDiscord<!Patitotective> vs code uses electron, i cant use that 💀
17:33:54FromDiscord<Elegantbeef> Yea i disable that shit whenever i see it
17:33:54FromDiscord<Elegantbeef> Then use kate
17:34:27FromDiscord<!Patitotective> onivim2 looks like vs code for macos lol
17:34:29FromDiscord<Omicron666> In reply to @Patitotective "vs code uses electron,": why
17:34:37FromDiscord<huantian> You’re using discord, that’s electron
17:34:43FromDiscord<!Patitotective> In reply to @huantian "You’re using discord, that’s": 💀
17:34:43FromDiscord<Yardanico> exactly
17:34:46FromDiscord<Alea> discord uses electron <:tea_kermit:768231151646539776>
17:34:53FromDiscord<!Patitotective> well, then bye
17:34:57FromDiscord<spoon> icky gross
17:35:20FromDiscord<!Patitotective> In reply to @Elegantbeef "Then use kate": i-in ubuntu? 😳 ↵it crashes _[
17:35:23FromDiscord<!Patitotective> (edit) "_[" => ":["
17:35:35FromDiscord<d4rckh> is there any way to categorize the arguments in argparse?
17:35:52FromDiscord<Alea> In reply to @Patitotective "i-in ubuntu? 😳 ": linux moment :clueless:
17:36:07FromDiscord<huantian> Onivim kinda looks neat, might try it↵(@!Patitotective)
17:36:08FromDiscord<!Patitotective> lmfao
17:36:58FromDiscord<!Patitotective> In reply to @huantian "Onivim kinda looks neat,": its still in alpha↵and to try it you need a license key or be a patreon
17:37:04FromDiscord<spoon> simply use microsoft word
17:37:15FromDiscord<!Patitotective> yea, the best code editor↵fully customizable
17:37:18FromDiscord<spoon> oh the days of having to type code in word
17:37:36FromDiscord<huantian> I can just compile it myself↵(@!Patitotective)
17:37:59FromDiscord<!Patitotective> In reply to @huantian "I can just compile": 😳
17:39:13FromDiscord<!Patitotective> ~~im going to need to add actual raw strings to niprefs cause compression breaks the parser 💀 ~~
17:39:21FromDiscord<!Patitotective> (edit) "compression" => "the compressed string"
17:39:26FromDiscord<cyberbird träumend> so in vscode
17:39:49FromDiscord<cyberbird träumend> i should install the package named nimsaem.nimvscode right?
17:39:49FromDiscord<huantian> How much is a license key anyways↵(@!Patitotective)
17:39:51FromDiscord<cyberbird träumend> cause there are 2
17:40:07FromDiscord<Yardanico> In reply to @cyberbird träumend "i should install the": yes
17:40:08FromDiscord<huantian> Yes that one
17:40:22FromDiscord<cyberbird träumend> why is the non-official one like 10x more downloaded
17:40:41FromDiscord<spoon> its not non-official, neither are, its just unmaintained
17:40:43FromDiscord<huantian> Because it used to be the main one, then it stopped being maintained
17:40:49FromDiscord<cyberbird träumend> makes sense
17:45:15FromDiscord<TryAngle> I want to use the json/to method but my type json has the field `type` how do I translate that to a nim field?
17:47:20FromDiscord<TryAngle> ohhhh I should have just read one more line further
17:48:10FromDiscord<TryAngle> sent a code paste, see https://play.nim-lang.org/#ix=3Vnw
17:48:17FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3Vnx
17:48:22FromDiscord<TryAngle> (edit) "https://play.nim-lang.org/#ix=3Vnw" => "https://play.nim-lang.org/#ix=3Vny"
17:48:29FromDiscord<Phil> (The efficient way would be to solve this in SQL but I really don't wanna)
17:48:45FromDiscord<Phil> (edit) "(The efficient way would be to solve this in SQL ... but" added "by selecting the specific entries I want there"
17:49:13FromDiscord<!Patitotective> In reply to @huantian "How much is a": i dont see a way to get a license key, but you can join their patreon by somewhere between 5 and 500$ 🤷‍♂️ and then login to get acces to the alpha↵i think its better to ask on their discord lol
17:49:29FromDiscord<Phil> (edit) "https://play.nim-lang.org/#ix=3Vnx" => "https://play.nim-lang.org/#ix=3Vnz"
17:52:51FromDiscord<huantian> Eh I’ll just use the aur package
17:53:00FromDiscord<huantian> Or https://github.com/santilococo/oni2/
17:53:35FromDiscord<!Patitotective> a-aur? 🚩
17:54:38FromDiscord<huantian> https://aur.archlinux.org/packages?K=Onivim2
17:55:06FromDiscord<huantian> Can’t believe it’s out of date rn
17:57:47*xet7 quit (Remote host closed the connection)
17:58:41FromDiscord<huantian> Weirddd the last commit was like 4 months ago
17:58:46*xet7 joined #nim
18:00:18*jjido joined #nim
18:00:43FromDiscord<huantian> Is it dead?
18:00:55FromDiscord<!Patitotective> ~~sublime's last build was march 25~~
18:04:05FromDiscord<huantian> https://github.com/onivim/oni2/issues/3811
18:04:08FromDiscord<huantian> Ah i see
18:04:30FromDiscord<d4rckh> how can i manually kill all threads ive created?
18:04:45FromDiscord<d4rckh> and if theres a file stream running in it, how can i safely close it?
18:05:00FromDiscord<d4rckh> (edit) "it?" => "it while its running?"
18:09:36FromDiscord<Yardanico> In reply to @d4rckh "how can i manually": i don't think you can
18:09:42FromDiscord<Yardanico> you should stop the execution from the thread itself
18:13:17FromDiscord<d4rckh> hmm
18:13:47FromDiscord<d4rckh> okay, i figured it out
18:14:04FromDiscord<d4rckh> i made a global variable and added `and not forceExited` to my while loop which is reading the file
18:16:29FromDiscord<d4rckh> i dont know how is it on other shells, but in powershell and cmd.exe, when I CTRL+C, it doesnt wait for the program to finish executing if I hooked the keybind and it shows the prompt while the program its running which looks very weird
18:16:41FromDiscord<d4rckh> https://media.discordapp.net/attachments/371759389889003532/965314874433503404/unknown.png
18:17:09FromDiscord<pmunch> I really liked the minimap in Sublime. Our brains are wired to recognise structure, so I could easily peek at the minimap, find the function I wanted to go to without any reading, and then click on it to go there
18:17:12FromDiscord<d4rckh> is there any way to make it wait a bit?
18:17:37FromDiscord<pmunch> But yes, only really useful if you use a mouse
18:18:09FromDiscord<!Patitotective> In reply to @pmunch "I really liked the": 😎 he knows
18:18:19*vicfred quit (Quit: Leaving)
18:18:22*v9fk quit (Remote host closed the connection)
18:18:22FromDiscord<!Patitotective> https://github.com/Patitotective/niprefs/releases/tag/0.1.6 👀
18:25:02FromDiscord<pmunch> Hmm, I wonder if I could make a "zoom out" feature in Vim to quickly traverse code
18:25:24FromDiscord<pmunch> By using the braille characters or something like that
18:25:38*kenran quit (Quit: WeeChat info:version)
18:26:52*v9fk joined #nim
18:33:01FromDiscord<!Patitotective> someone knows which proc nim calls when you do `r"a""b"`?
18:33:16FromDiscord<!Patitotective> like, how does it parse rawstrings
18:33:18FromDiscord<!Patitotective> (edit) "rawstrings" => "raw strings"
18:34:09FromDiscord<Yardanico> that's not a proc
18:34:15FromDiscord<Yardanico> that's a raw string literal, a language feature
18:34:28FromDiscord<Yardanico> same as if you'd do `let a = 0b0100_1011`
18:34:40FromDiscord<Yardanico> `0b` isn't a proc, it's a binary number prefix
18:35:48FromDiscord<cyberbird träumend> in hexadecimal
18:36:10FromDiscord<Yardanico> In reply to @cyberbird träumend "in hexadecimal": that's binary
18:36:11FromDiscord<huantian> Hey pmunch can you look at my Nim playground or
18:36:15FromDiscord<huantian> Hey pmunch can you look at my Nim playground PR
18:36:27FromDiscord<Yardanico> hexadecimal is `0xDEADBEEF`
18:36:33FromDiscord<cyberbird träumend> dead beef
18:37:08FromDiscord<pmunch> Sorry but I'm at my cabin without internet at the moment (typing this from my phone). But I'll be back home tomorrow
18:37:31FromDiscord<cyberbird träumend> why do you guys communicate via bots
18:37:48FromDiscord<!Patitotective> cause they're intelectual
18:37:49FromDiscord<Yardanico> In reply to @cyberbird träumend "why do you guys": because they're using IRC or Matrix
18:37:50FromDiscord<!Patitotective> (edit) "intelectual" => "intellectual"
18:37:55FromDiscord<cyberbird träumend> ah matrix
18:37:58FromDiscord<cyberbird träumend> that's true
18:37:59FromDiscord<Yardanico> and the bridges allow us to talk together
18:38:11FromDiscord<cyberbird träumend> I had forgotten about it
18:38:29FromDiscord<Yardanico> but again, it's not about matrix, it's about webhooks
18:38:41FromDiscord<Yardanico> if you use discord webhooks to send messages, the message always shows up as "bot"
18:40:38FromDiscord<!Patitotective> what does this error means? `Error: expression has no address`↵im getting it and its fixed by rearranging the code 😕
18:41:02FromDiscord<Yardanico> In reply to @Patitotective "what does this error": it means that you're trying to get an address of a `const` or a literal
18:41:23FromDiscord<!Patitotective> its being raised ona doc comment 😕
18:41:27FromDiscord<!Patitotective> (edit) "ona" => "on a"
18:41:30FromDiscord<Yardanico> can't help without code 🤷
18:41:35FromDiscord<Yardanico> it might be just showing the wrong line
18:44:06FromDiscord<pmunch> [huantian @huantian\:matrix.org](https://matrix.to/#/@huantian:matrix.org)\: I had actually looked at that one before. But wanted the error message back. But I see you've fixed that so I merged it
18:44:21FromDiscord<huantian> No rush!
18:44:23FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3VnO
18:44:35FromDiscord<pmunch> Remind me when I'm back to update the live playground though!
18:44:43FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3VnP
18:44:54FromDiscord<Yardanico> it's probably related to the fact that you return `var string`
18:45:46FromDiscord<Yardanico> but yes, it does indeed report an error on the wrong line, that's maybe worth a bug report
18:45:58FromDiscord<huantian> Yep will do
18:45:58FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3VnR
18:46:16FromDiscord<Yardanico> In reply to @Patitotective "the error on the": the issue is that you try to return `var string` of result of `replace`
18:46:26FromDiscord<Yardanico> and replace works out-of-place
18:47:04FromDiscord<Yardanico> one way to make your code work is to do this:
18:47:15FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3VnS
18:47:34FromDiscord<Yardanico> ah right, @!Patitotective why are you using `var PrefsNode` here?
18:47:50FromDiscord<Yardanico> do you replace it with a new PrefsNode somewhere? i'm asking because for `ref` objects you don't need `var` to modify their fields
18:48:01FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3VnU
18:48:01FromDiscord<Yardanico> and it's one pointer indirection less
18:48:08FromDiscord<Yardanico> not that it matters much though
18:48:35FromDiscord<!Patitotective> i dont remember why Lol↵i just made a var version of all `get` procedures
18:48:36FromDiscord<!Patitotective> hehe
18:48:57FromDiscord<!Patitotective> i think only sets, seqs and tables require var lol
18:49:18FromDiscord<Yardanico> In reply to @Patitotective "i think only sets,": this is if you want to return the value that, when modified, will modify the value in PrefsNode itself
18:50:03FromDiscord<!Patitotective> oh, i remember, it was so you dont have to access the field↵`node.getString()` > `node.stringV`
18:50:04FromDiscord<!Patitotective> 🤷‍♂️
18:50:31FromDiscord<Yardanico> so basically a getter
18:50:38FromDiscord<!Patitotective> yea
18:50:40FromDiscord<Yardanico> but any reason it's mutable? users can mutate it?
18:50:52FromDiscord<Yardanico> you can make it in an easier way with setters and getters
18:51:16FromDiscord<!Patitotective> In reply to @Yardanico "but any reason it's": maybe hehe
18:51:59FromDiscord<Yardanico> you can of course rename `string` to something else
18:51:59FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3VnV
18:52:08FromDiscord<Yardanico> also, the backticks aren't needed for the getter here
18:52:31FromDiscord<!Patitotective> hmm
18:52:52FromDiscord<Yardanico> will you commit your new changes to niprefs soon so I can look at it? maybe i can find simplify a bit of stuff
18:52:53FromDiscord<!Patitotective> i will add that only for PString↵cause you dont mess up with raw strings
18:52:58FromDiscord<Yardanico> well by soon i mean today/tomorrow
18:53:22FromDiscord<!Patitotective> In reply to @Yardanico "will you commit your": oh, yea, its a small change
18:53:27FromDiscord<!Patitotective> thanks 🙃
19:01:23FromDiscord<!Patitotective> pushed https://github.com/Patitotective/niprefs @Yardanico ↵:]
19:13:46FromDiscord<Alea> what's the best timer with milisecond resolution?
19:14:05FromDiscord<Alea> times.getTime seems to do something else with nanos?
19:14:15FromDiscord<Yardanico> https://nim-lang.org/docs/monotimes.html how about nanoseconds (depends on the OS)?
19:14:29FromDiscord<Elegantbeef> If you want accurate time stamps monotimes is the best
19:15:37FromDiscord<Alea> hmm↵that says its part of std, but I can't import it
19:15:48FromDiscord<Elegantbeef> `import std/monotimes`
19:16:02FromDiscord<Elegantbeef> it's 2022 prefix all stdlib imports with `std/`
19:18:42FromDiscord<Yardanico> yep
19:19:36FromDiscord<SteveMCWin> Hey guys, why is my browser insisting that the nim download is a virus?
19:20:19FromDiscord<Elegantbeef> Antivirus like using simple methods of detecting malware, and as Nim is commonly used for malware it flags any Nim binaries
19:20:35FromDiscord<Elegantbeef> The code is fully open source if you wish to manually audit it, or you can just trust people when they say "trust us"
19:20:51FromDiscord<SteveMCWin> Fair
19:24:46FromDiscord<pmunch> Ugh, I really don't like this change..
19:24:50FromDiscord<Yardanico> In reply to @pmunch "Ugh, I really don't": why?
19:24:58FromDiscord<Yardanico> honest question, i think it's okay
19:25:05nrds<Prestige99> Which change?
19:25:08FromDiscord<Yardanico> also prevents people mistaking nimble packages from stdlib packages
19:25:13FromDiscord<Yardanico> In reply to @nrds "<Prestige> Which change?": std/ prefix for stdlib imports
19:25:22nrds<Prestige99> oh, no longer optional?
19:25:31FromDiscord<Yardanico> it was never "optional"
19:25:36FromDiscord<Yardanico> it's _still_ not-enforced, but all new stdlib modules are only available in the std/ prefix
19:25:37FromDiscord<Elegantbeef> I mean it's only not optional on new modules
19:25:40FromDiscord<Yardanico> yeah
19:25:45FromDiscord<Elegantbeef> old modules just worked
19:25:51FromDiscord<pmunch> More typing, and I don't really care where a module comes from
19:26:25FromDiscord<Elegantbeef> Eh it's negligibly more typing
19:26:26nrds<Prestige99> how do I get Araq to notice my nimsuggest woes
19:26:45FromDiscord<Elegantbeef> `std/[...]` vs. `...`
19:26:53FromDiscord<Elegantbeef> It's a weekend so give it until the weekday
19:26:59FromDiscord<pmunch> I tend to group my imports into three import statements though. One for stdlib, one for local imports, and one for nimble imports
19:27:09FromDiscord<!Patitotective> me too
19:27:11nrds<Prestige99> I do the same ^
19:27:31FromDiscord<Elegantbeef> I also do the same
19:27:33FromDiscord<pmunch> [] isn't negligible on my keyboard layout
19:27:49FromDiscord<Elegantbeef> Well maybe move to NA 😛
19:27:58FromDiscord<pmunch> I mean all symbols break the flow of typing
19:28:04nrds<Prestige99> could do some nonsense like stdimport template
19:28:33FromDiscord<Elegantbeef> I personally dont mind it, but ymmv
19:28:51FromDiscord<Elegantbeef> It's clear and it ensures there is no fuckup of module import
19:29:31FromDiscord<!Patitotective> btw i ended up not using compression at all Lol
19:29:37FromDiscord<pmunch> \`import std \` shift+7 \` \` AltGr+8 \`monotimes\` AltGr+9
19:29:53FromDiscord<Yardanico> :(
19:30:04FromDiscord<Yardanico> on qwerty [ is just a normal keypress
19:30:07FromDiscord<Yardanico> so is /
19:30:20FromDiscord<Elegantbeef> Well the NA layout
19:30:27FromDiscord<Elegantbeef> Think UK is different
19:30:28FromDiscord<pmunch> I guess I just don't fuck up my module imports often enough to want this feature then \:P
19:30:41FromDiscord<Elegantbeef> Woah pmunch said a bad word 😛
19:31:12FromDiscord<pmunch> @Yardanico\: this is QWERTY, just Norwegian QWERTY
19:31:23FromDiscord<!Patitotective> In reply to @Elegantbeef "Woah pmunch said a": lmfao
19:31:38FromDiscord<pmunch> [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org)\: you said it first!
19:32:04FromDiscord<!Patitotective> beef can't say a sentence without a bad word 💀
19:32:37FromDiscord<pmunch> Haha, neither do I in my native tongue, part of my dialect
19:33:09FromDiscord<pmunch> Guess I unconsciously filter them out when I'm speaking English if you hadn't noticed
19:33:29FromDiscord<!Patitotective> there are no bad words in emoji dialect↵only bad emojis 💀
19:33:44FromDiscord<Elegantbeef> You misunderstand there are no words in my language↵(@!Patitotective)
19:33:50FromDiscord<pmunch> 🖕
19:33:56FromDiscord<!Patitotective> 💀
19:34:05FromDiscord<!Patitotective> permanent ban
19:34:21FromDiscord<pmunch> Skulls aren't really bad though are they?
19:35:01FromDiscord<Elegantbeef> In chinese games they are
19:35:46FromDiscord<!Patitotective> In reply to @pmunch "Skulls aren't really bad": it was a person but he say your middle finger and died
19:35:48FromDiscord<!Patitotective> (edit) "say" => "saw"
19:35:50FromDiscord<pmunch> Like Mahjong?
19:36:28FromDiscord<pmunch> (sorry, light on Chinese games knowledge)
19:36:41FromDiscord<Elegantbeef> Skulls arent allowed in chinese video games
19:36:50FromDiscord<!Patitotective> why
19:36:57FromDiscord<Yardanico> because beef never talks seriously :P
19:36:59FromDiscord<Elegantbeef> They're generally replaced with other things due symbolism
19:37:04FromDiscord<spoon> a lot of things arent
19:37:13FromDiscord<pmunch> And welcome [jvsg](https://matrix.to/#/@jvsg:matrix.org), feel free to ask a question, we're just goofing off at the moment
19:37:22FromDiscord<!Patitotective> In reply to @Elegantbeef "They're generally replaced with": im almost sure thats a japanese demon
19:37:38FromDiscord<huantian> In reply to @pmunch "Like Mahjong?": When you get a skull tile in mahjong and you instantly lose
19:37:43FromDiscord<!Patitotective> (edit) "In reply to @Elegantbeef "They're generally replaced with": im almost sure thats a japanese demon ... " added "(i mean 👺 )"
19:38:00FromDiscord<huantian> We should do some Nim community mahjong sometime 😛
19:38:07FromDiscord<Yardanico> In reply to @Patitotective "im almost sure thats": WE ARE JAPANESE GOBLIN
19:38:17FromDiscord<spoon> so true
19:38:23FromDiscord<Yardanico> https://www.youtube.com/watch?v=UIp6_0kct_U sorry for offtopic :(
19:39:06FromDiscord<!Patitotective> oooooh, i didnt knew what mahjong was↵never understood what was this game lol https://media.discordapp.net/attachments/371759389889003532/965335612058116146/Screenshot_from_2022-04-17_14-38-47.png
19:39:32FromDiscord<spoon> now i gotta flood memes
19:39:38FromDiscord<!Patitotective> In reply to @Yardanico "https://www.youtube.com/watch?v=UIp6_0kct_U sorry f": ~~you forgot to mention rika 💀 lmfao~~
19:39:43FromDiscord<huantian> In reply to @Patitotective "oooooh, i didnt knew": That’s mahjong solitaire
19:39:50FromDiscord<huantian> I mean actual mahjong
19:40:22FromDiscord<Elegantbeef> Oh and pmunch most people that join matrix are just here to lurk and have 0 interest in actually talking 😛
19:41:38FromDiscord<pmunch> [Elegantbeef](https://matrix.to/#/@elegantbeef:matrix.org)\: oh, I'm too used to IRC 😋 Their typing indicator popped up though so I figured they might be waiting for a break
19:45:04FromDiscord<Elegantbeef> Perhaps
19:45:06FromDiscord<huantian> Maybe they’re scared off by the inconsistent room icons/names
19:45:06FromDiscord<Elegantbeef> They arent even reading chat so clearly pmunch made them poo themselves
19:45:34FromDiscord<huantian> It’s a bit like rummikub if you’ve heard of that↵(@huantian)
19:54:33FromDiscord<d4rckh> whats the difference between `import terminal` and `import std/library`?
19:55:22FromDiscord<Elegantbeef> `import terminal` is ambiguous and can import local modules `import std/terminal` always imports the stdlib terminal
19:55:45FromDiscord<d4rckh> thanks!
19:57:08*kenran joined #nim
20:00:34*neceve quit (Ping timeout: 246 seconds)
20:06:10FromDiscord<cyberbird träumend> In reply to @Yardanico "https://www.youtube.com/watch?v=UIp6_0kct_U sorry f": 💀
20:21:54FromDiscord<ratapenado> Hello, I'm not sure to understand when I should use const and when I should use let. Any info ?
20:22:17FromDiscord<Elegantbeef> Use `const` when it's a value known at compile time and `let` when it's a runtime value
20:25:40FromDiscord<ratapenado> That's I understood but I'm not sure to see really the difference. Is it possible to assign readLine result to a let ?
20:25:49FromDiscord<Elegantbeef> Yes
20:26:31FromDiscord<ratapenado> Allright I think I get it
20:27:18FromDiscord<ratapenado> Btw I don't know if the author is here but the tutorial Nim basics is very good
20:30:17FromDiscord<Phil> sent a long message, see http://ix.io/3Voq
20:30:56FromDiscord<Phil> (edit) "http://ix.io/3Voq" => "http://ix.io/3Vor"
20:32:07*Gustavo6046 joined #nim
20:35:32*zeus-supreme joined #nim
20:36:35FromDiscord<ratapenado> In reply to @Isofruit "The key difference is:": I'm not yet at the point to have learn about concepts. However I'm not sure to understand your example: queries to database are done at runtime no?
20:36:54FromDiscord<Elegantbeef> There are also technically optimizations aswell which `let` give you
20:37:18FromDiscord<Elegantbeef> If you know the variable is not mutated you can technically treat it as an alias, not that Nim does this afaik
20:38:22*zeus-supreme1 quit (Ping timeout: 246 seconds)
20:40:11FromDiscord<Yardanico> In reply to @Elegantbeef "If you know the": there are some things nim does differently to let than var
20:41:32FromDiscord<Phil> sent a long message, see http://ix.io/3Vow
20:41:53FromDiscord<Phil> (edit) "http://ix.io/3Vow" => "http://ix.io/3Vox"
20:42:21FromDiscord<ratapenado> In reply to @Isofruit "That they are, but": Oh allright, thanks !
20:42:25FromDiscord<Phil> (edit) "http://ix.io/3Vox" => "http://ix.io/3Voy"
20:42:53*vicfred joined #nim
20:43:21FromDiscord<Phil> There are likely better examples, that just currently tends to be my go-to example since I contributed these convenience procs and their compile-time checks to norm
20:43:34FromDiscord<Phil> (edit) "There are likely better examples, that just currently tends to be my go-to example since I contributed these convenience procs and their compile-time checks to norm ... " added "and thus know how they work"
20:44:46FromDiscord<Phil> Personally, as a rule of thumb, if I can make a variable a const, I make it a const
20:45:30FromDiscord<Phil> Though if Yard corrects me on that and states that a bad idea I'll likely change that rule
20:45:36FromDiscord<Elegantbeef> Do the most amount of work you can at compile time
20:45:39FromDiscord<Elegantbeef> It's vastly safer
20:46:18FromDiscord<Yardanico> and faster
20:46:32FromDiscord<Yardanico> In reply to @Isofruit "Though if Yard corrects": no, that's good
20:46:37FromDiscord<Yardanico> in virtually all cases
20:46:57FromDiscord<Yardanico> so that users' computers don't have to do repeat same computations that you can do once on compile time
20:47:06FromDiscord<Phil> Check
20:47:47FromDiscord<Elegantbeef> Runtime checks are dumb when they can be done statically
20:48:05FromDiscord<Elegantbeef> Abuse the type system, including `let`/`const` variables
20:50:00FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=3VoA
20:50:25FromDiscord<Phil> You'll notice that the output actually only leads to the place where I log the exception
20:50:35FromDiscord<Elegantbeef> https://nim-lang.org/docs/system.html#getStackTrace
20:50:54FromDiscord<Elegantbeef> You cant get anymore info than what the stack trace has
20:51:00FromDiscord<Phil> Wait, I thought that's what "getStackTraceEntries()" was for?
20:51:04FromDiscord<Yardanico> no
20:51:12FromDiscord<Yardanico> it just gives you stack trace entries separately for more automatic usage
20:52:25FromDiscord<Phil> In reply to @Elegantbeef "You cant get anymore": I think getStackTraceEntries() cuts off the actual stacktrace and replaces it with one that leads to the point where getStackTraceEntries() is called.↵When I just let the error happen, I see much more output in the console that leads me also to the actual module where the error happens, not just where this log call happens
20:52:46FromDiscord<Phil> Hmmm I'll see whether anything changes with just getStackTrace
20:54:19FromDiscord<Phil> Hmmm that also cuts off the actual stack trace that I would expect
20:55:15FromDiscord<Phil> This is e.g. the stacktrace that I'd expect, that's the console output I see when no try-catch happens https://media.discordapp.net/attachments/371759389889003532/965354779859640340/message.txt
20:58:03FromDiscord<Yardanico> In reply to @Isofruit "This is e.g. the": ah you mean this, it's async traceback
20:58:18FromDiscord<Yardanico> async macro does some magic to transform stack traces into something more usable than the default
20:59:39FromDiscord<Yardanico> as far as i remember
21:00:15FromDiscord<Phil> I didn't know async does things to the log! Huh.... errr so how do I get that stacktrace back (like, I want to log that!) to log in a try-catch as above?↵I'm currently trialing my way through the errors I can find in the systems module that beef linked. `getCurrentException().getStackTrace()` so far is an improvement. It doesn't give me all the blocks in the message.txt above, but at least the first `#[]#` block
21:01:10FromDiscord<Phil> Logging is done via `std/logging` I maybe should add
21:01:33FromDiscord<Phil> (edit) "add" => "add, which only has a ConsoleAppender with no special format or settings whatsoever"
21:01:35*vicecea quit (Remote host closed the connection)
21:01:46FromDiscord<Phil> (edit) "has" => "gave"
21:02:05*vicecea joined #nim
21:03:16FromDiscord<Yardanico> https://github.com/nim-lang/Nim/blob/devel/lib/pure/asyncfutures.nim#L310 and below has some relevant async traceback logic
21:13:59*T-urbo joined #nim
21:19:32*noeontheend joined #nim
21:20:36*T-urbo left #nim (ERC (IRC client for Emacs 27.2))
21:34:17FromDiscord<ratapenado> Btw are there any good blogs to follow on Nim, beside the ones proposed on the official website ?
21:52:31*rockcavera joined #nim
21:52:31*rockcavera quit (Changing host)
21:52:31*rockcavera joined #nim
22:00:22*jmdaemon quit (Ping timeout: 250 seconds)
22:11:54*jmdaemon joined #nim
22:44:45*m5zs7k quit (Quit: m5zs7k)
22:45:24*flynn quit (Remote host closed the connection)
22:46:34*flynn joined #nim
22:50:32*kenran quit (Quit: WeeChat info:version)
22:52:15*lumo_e joined #nim
22:54:06*noeontheend quit (Ping timeout: 250 seconds)
22:58:43*flynn quit (Remote host closed the connection)
22:59:53*flynn joined #nim
23:07:25*flynn quit (Read error: Connection reset by peer)
23:08:37*flynn joined #nim
23:14:21FromDiscord<SaAnd> how do you do gcc pgo again? when I went on the forum ( https://forum.nim-lang.org/t/6283#38755 ), it couldnt render it
23:15:18FromDiscord<Yardanico> @SaAnd https://forum.nim-lang.org/post.rst?id=38755
23:15:35FromDiscord<Yardanico> although this method is kind of bad to use
23:15:47FromDiscord<Yardanico> a better way would be to compile with nim itself
23:18:10*Gustavo6046 quit (Remote host closed the connection)
23:18:27*flynn quit (Remote host closed the connection)
23:18:40*Gustavo6046 joined #nim
23:19:37*flynn joined #nim
23:24:09*flynn quit (Read error: Connection reset by peer)
23:25:18*flynn joined #nim
23:26:27*lumo_e quit (Ping timeout: 240 seconds)
23:27:51*lumo_e joined #nim
23:30:34*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
23:31:35FromDiscord<TryAngle> sent a code paste, see https://paste.rs/BaA
23:32:00FromDiscord<Elegantbeef> `get[T](client, url)`
23:32:55*flynn quit (Read error: Connection reset by peer)
23:33:14FromDiscord<TryAngle> In reply to @Elegantbeef "`get[T](client, url)`": if this is a hint, I don't understand 😭
23:33:32FromDiscord<Elegantbeef> Is the issue usage or compiing the above?
23:34:05*flynn joined #nim
23:34:11FromDiscord<TryAngle> sent a code paste, see https://paste.rs/e6L
23:34:20FromDiscord<Elegantbeef> Dont think you can have generic async like that
23:35:46FromDiscord<TryAngle> In reply to @Elegantbeef "Dont think you can": hmm but how would I parse generically to json then?
23:35:51FromDiscord<TryAngle> (edit) "In reply to @Elegantbeef "Dont think you can": hmm but how ... would" added "else"
23:35:55FromDiscord<TryAngle> (edit) "to" => "from"
23:36:05FromDiscord<TryAngle> I have like 100 types lol
23:36:09FromDiscord<TryAngle> I can't do that by hand
23:36:25FromDiscord<Elegantbeef> Wait you lied to me
23:36:44FromDiscord<Elegantbeef> It errors on call
23:36:53FromDiscord<TryAngle> lol
23:37:13FromDiscord<TryAngle> but this error looks so compily
23:37:18FromDiscord<TryAngle> (edit) "compily" => "compily'ish"
23:37:38FromDiscord<Elegantbeef> Remove the call to get
23:38:18FromDiscord<Rika> Hello
23:38:23FromDiscord<huantian> Hello
23:38:30FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3VoY
23:38:55FromDiscord<huantian> to(T, json)
23:39:04FromDiscord<huantian> shouldn't this be to(json, T)
23:39:16FromDiscord<Elegantbeef> It should be
23:39:42FromDiscord<Elegantbeef> Which is why it complains it cannot instantiate T
23:41:19FromDiscord<TryAngle> In reply to @Elegantbeef "Which is why it": no the proc decl errors
23:41:24FromDiscord<TryAngle> not the to()
23:42:22FromDiscord<TryAngle> wait how do I take type as paramater for procs again? Maybe that'll work idk I'm just perpflexed
23:42:49FromDiscord<huantian> `result = to(T, json)` should be `result = to(json, T)`
23:42:58FromDiscord<huantian> or `result = json.to(T)`
23:43:04FromDiscord<Elegantbeef> Give a repro and i can see if i can figure out the error
23:43:04FromDiscord<TryAngle> In reply to @huantian "`result = to(T, json)`": already changed that
23:43:04FromDiscord<Elegantbeef> Presently i'm lacking repro
23:43:09FromDiscord<huantian> same error?
23:43:13FromDiscord<TryAngle> In reply to @huantian "same error?": ye
23:43:31FromDiscord<huantian> In reply to @TryAngle "wait how do I": ~~don't take the type as a parameter, this isn't my C#~~
23:45:17FromDiscord<huantian> but might be an async error
23:46:44FromDiscord<TryAngle> @ElegantBeef
23:46:56FromDiscord<TryAngle> https://github.com/TriedAngle/riftlib/blob/04fb57d813ca915639939953df769e956857be26/src/riftlib/lcu/client.nim#L92
23:47:08FromDiscord<huantian> sent a code paste, see https://paste.rs/NM7
23:47:34FromDiscord<huantian> (edit) "https://play.nim-lang.org/#ix=3Vp0" => "https://play.nim-lang.org/#ix=3VoZ"
23:48:42*flynn quit (Ping timeout: 250 seconds)
23:48:46FromDiscord<Elegantbeef> You arent passing the type
23:48:59FromDiscord<Elegantbeef> `g.c.get[: type](routes.GameFlow_Session)`
23:49:34FromDiscord<Elegantbeef> In this case that should be `[: Session]` i think
23:50:03FromDiscord<Elegantbeef> Like i said it's a callsite issue
23:50:14FromDiscord<TryAngle> wait
23:50:21*flynn joined #nim
23:50:24FromDiscord<TryAngle> why do u do `: T`
23:50:28FromDiscord<TryAngle> (edit) "`: T`" => "`[: T]`"
23:50:32FromDiscord<Elegantbeef> cause you're using method call syntax
23:50:42FromDiscord<Elegantbeef> And otherwise `[]` is ambiguous between indexing with a type
23:50:52FromDiscord<TryAngle> 😶‍🌫️
23:51:04FromDiscord<TryAngle> In reply to @Elegantbeef "And otherwise `[]` is": so nim also sufferes from turbofish?
23:51:05FromDiscord<TryAngle> 😦
23:51:14FromDiscord<Elegantbeef> No?
23:51:31FromDiscord<Elegantbeef> you can do `get[Session](g.c, routes.GameFlow_Session)`
23:51:32FromDiscord<Rika> It’s not as bad
23:51:46FromDiscord<Elegantbeef> The reason that syntax exists is due to ambiguity with procedure dispatch
23:52:20FromDiscord<Elegantbeef> `g.c.get[Session]` is considered `[](g.c.get)`
23:52:31FromDiscord<Elegantbeef> `[](g.c.get, Session)`
23:52:35FromDiscord<TryAngle> that is almos the turbofish issue but at least I know now↵thanks for helping me out once again beef 🥺
23:52:46FromDiscord<TryAngle> (edit) "almos" => "basically"
23:53:09FromDiscord<Elegantbeef> The point of turbofish is to infer the type
23:53:28FromDiscord<Elegantbeef> Atleast as i understand it
23:54:16*flynn quit (Read error: Connection reset by peer)
23:54:51FromDiscord<Elegantbeef> Nim doesnt do complex inference so you need to specify generics when there is no way to infer it from the arguments
23:55:29*flynn joined #nim
23:55:52FromDiscord<TryAngle> but it works now thanks :3
23:57:45FromDiscord<Elegantbeef> Thinking about the inference logic required for dropping explicit generic parameters here scares me
23:58:09FromDiscord<huantian> just use converters
23:58:10FromDiscord<huantian> ez
23:58:25FromDiscord<Elegantbeef> Converters dont resolve this
23:58:31FromDiscord<TryAngle> just don't use generics 😎
23:58:35FromDiscord<TryAngle> go moment
23:58:40FromDiscord<Elegantbeef> No use generics
23:59:10FromDiscord<Elegantbeef> Easy speed boosts in something that does generic monpmorphism
23:59:23FromDiscord<Elegantbeef> Golang comically doesnt specialize generics the same and it can cause performance issues