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