00:04:01 | FromDiscord | <BobBBob> Yep putting them in procs made it free it, but you'd think a block would be the same thing? |
00:06:41 | FromDiscord | <BobBBob> wait no it didnt it just was just going too fast to measure, so it think |
00:06:43 | FromDiscord | <Elegantbeef> Nope |
00:06:45 | FromDiscord | <BobBBob> In reply to @Elegantbeef "As I understand it": is right |
00:07:23 | FromDiscord | <Elegantbeef> Blocks only scope the variable it's still considered global |
00:07:31 | FromDiscord | <Elegantbeef> It's in toplevel code therefore it's global |
00:07:44 | FromDiscord | <BobBBob> hm |
00:09:04 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nTo |
00:11:05 | FromDiscord | <BobBBob> okay finally if you use -d:useMalloc and putting the code in procs like you said it does free it between the calls |
00:11:10 | FromDiscord | <Elegantbeef> I should say each scope |
00:11:12 | FromDiscord | <Elegantbeef> Anywho use procs for things like this |
00:11:12 | FromDiscord | <Elegantbeef> It plays better with orc/arc |
00:11:13 | FromDiscord | <Elegantbeef> So many semantics do not work how you expect. You cannot move for instance since it's a global variable |
00:11:28 | FromDiscord | <BobBBob> how come -d:useMalloc isnt the default though |
00:11:53 | FromDiscord | <Elegantbeef> If you only use procs and remove `useMalloc` it's also more sane |
00:11:53 | FromDiscord | <Elegantbeef> Cause Nim's allocator has different features than malloc |
00:12:05 | FromDiscord | <Elegantbeef> Nim doesnt return memory to the OS so it's even faster for allocating |
00:13:38 | FromDiscord | <BobBBob> I see |
00:20:56 | * | xet7 quit (Remote host closed the connection) |
00:48:23 | * | ltriant joined #nim |
00:53:20 | * | ltriant quit (Ping timeout: 248 seconds) |
01:02:43 | * | beholders_eye joined #nim |
01:10:58 | FromDiscord | <Rika> In reply to @PMunch "<@259277943275126785>, what? Nim passes": Don’t sequences have value semantics |
01:11:59 | FromDiscord | <Rika> I guess they could be copy on write |
01:20:43 | * | beholders_eye quit (Ping timeout: 248 seconds) |
01:21:37 | FromDiscord | <Elegantbeef> Nim has value semantics, but they pass by ref |
01:21:52 | FromDiscord | <Elegantbeef> I mean seqs |
01:22:04 | FromDiscord | <Elegantbeef> I was reading pmunch's message and typing apparently |
01:59:11 | FromDiscord | <Abugenius> why is niminst not included with the installationfrom choosenim? |
02:42:17 | * | rockcavera joined #nim |
03:25:02 | * | dropkick quit (Ping timeout: 246 seconds) |
03:56:39 | FromDiscord | <!!sharpcdf!!> ive begun the process of trying to get tauri to work with nim on the frontend but i havent used nimscript in so long i forgot pretty much everything lol |
03:57:50 | FromDiscord | <!!sharpcdf!!> In reply to @Abugenius "why is niminst not": i believe niminst is a package on nimble, and its also deprecated since 2019 |
03:59:45 | FromDiscord | <!!sharpcdf!!> https://github.com/nim-lang/Nim/issues/11433 this looks relevant |
04:22:03 | FromDiscord | <myxi> In reply to @sharpcdf "ive begun the process": that's my plan after my examinations as well; however i have no idea how capable nim is with JS |
04:23:24 | FromDiscord | <myxi> or node.js for this matter |
04:30:42 | * | rockcavera quit (Remote host closed the connection) |
04:45:30 | * | arkurious quit (Quit: Leaving) |
04:49:58 | * | ltriant joined #nim |
04:51:20 | FromDiscord | <tfp> what's the strat for writing nim bindings for a c++ lib |
04:51:42 | FromDiscord | <tfp> i saw some helpers but nothing as robust as c2nim |
04:52:21 | FromDiscord | <tfp> oh wait does c2nim support c++? |
04:55:07 | * | ltriant quit (Ping timeout: 248 seconds) |
05:32:00 | * | azimut joined #nim |
05:49:02 | FromDiscord | <pmunch> Didn't you believe me when I told you this yesterday? |
05:49:22 | FromDiscord | <pmunch> @BobBBob ^ |
05:50:30 | FromDiscord | <Elegantbeef> If they're anything like me they filter out messages from you... I mean silence |
05:52:11 | FromDiscord | <pmunch> Indeed it has, depending on when you last looked at it it's gotten some fairly substantial work done to it↵(@Hourglass [She/Her]) |
06:50:20 | FromDiscord | <ringabout> I'm re-implement `std/macrocache` using vmops => https://github.com/nim-lang/Nim/pull/21359 Though vmops are quite limited, without overload supports. Perhaps in the future, we should really implement `exportnims: ...` to remove the ugly wrapper the current workaround are using. |
06:52:35 | FromDiscord | <ringabout> which reduces the number of opcodes from 188 to 177. |
06:54:30 | Zevv | that is prett slick |
06:55:57 | FromDiscord | <ringabout> Thank you! |
07:03:40 | FromDiscord | <Phil> In reply to @pmunch "Writing an article/guide on": nimibook docs ftw! |
07:09:07 | * | ltriant joined #nim |
07:27:19 | * | fredrikhr joined #nim |
07:34:57 | * | PMunch joined #nim |
07:55:08 | FromDiscord | <Phil> No but seriously, I would recommend nimibook. Multiple smaller chapters are easier to digest than one long article, not to mention that it guarantees code compileability of any code examples |
07:55:30 | FromDiscord | <Phil> (edit) "nimibook." => "nimibook over writing long MD files." |
07:59:10 | FromDiscord | <Hourglass [She/Her]> In reply to @pmunch "Indeed it has, depending": Neat! |
08:00:27 | PMunch | @Phil, well it's going to be split into sections anyways |
08:00:49 | PMunch | I'm' basically writing as an article because that's the workflow I have |
08:01:25 | PMunch | It's taken long enough to write this article (the original idea was to have it ready for the initial release) |
09:00:13 | * | kenran joined #nim |
09:01:13 | * | kenran quit (*.net *.split) |
09:01:13 | * | crem1 quit (*.net *.split) |
09:01:14 | * | oz quit (*.net *.split) |
09:01:16 | FromDiscord | <arnetheduck> In reply to @Isofruit "Status (IIRC among the": https://status-im.github.io/nim-style-guide/language.result.html |
09:01:33 | * | kenran joined #nim |
09:01:38 | * | crem1 joined #nim |
09:03:12 | FromDiscord | <Elegantbeef> Arne waits in the shadows to try to convert people to the darkside |
09:09:10 | PMunch | That sounds like a really weird recommendation |
09:09:52 | PMunch | I mean the pros doesn't seem to match the recommendation |
09:17:07 | FromDiscord | <Phil> In reply to @arnetheduck "https://status-im.github.io/nim-style-guide/languag": I can agree with the "use `return`, not `result`" recommendation.↵But I'm not that much of a fan of returning expressions, but all of that is purely from a clarity perspective |
09:17:23 | FromDiscord | <Phil> (edit) "clarity" => "code-clarity" |
09:18:11 | FromDiscord | <Rika> I personally think that returns are less clear but I guess that’s because of functional language influence |
09:19:38 | PMunch | I personally use all three styles, for different things. |
09:19:54 | FromDiscord | <Phil> In reply to @arnetheduck "https://status-im.github.io/nim-style-guide/languag": Also, respect for sniping that comment from over a week back 😛 |
09:21:25 | FromDiscord | <arnetheduck> In reply to @PMunch "I mean the pros": we list all pros and cons of the feature, then make a recommendation whether to use it or not "by default" |
09:22:31 | FromDiscord | <arnetheduck> In reply to @Isofruit "I can agree with": expression return = stricter compiler checks, overall -> less bugs in production code |
09:22:38 | PMunch | Oh wow, that is a very confusing way to structure that document |
09:22:55 | FromDiscord | <Phil> In reply to @arnetheduck "expression return = stricter": There's a difference between expression return and `return value`? |
09:23:01 | FromDiscord | <Phil> (edit) "value`?" => "value` in compiler checks?" |
09:23:19 | FromDiscord | <Elegantbeef> Yea expressions have to have all branches either return or raise an derror |
09:23:19 | FromDiscord | <Elegantbeef> an error |
09:23:42 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nUz |
09:23:53 | FromDiscord | <arnetheduck> In reply to @PMunch "Oh wow, that is": ideally we'd hide the pro/con sections, the style guide is for picking a default among bikeshed or confusing options - ie "returning stuff" has 3 options, of which `use-result-and-fall-off-end` is the most pointless one |
09:23:53 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nUA |
09:24:02 | FromDiscord | <Elegantbeef> Since it's not a validi expression |
09:24:08 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4nUB |
09:24:31 | FromDiscord | <Elegantbeef> Expressions are just the best followed by result |
09:24:37 | PMunch | @arnetheduck, I beg to differ |
09:24:56 | FromDiscord | <Elegantbeef> Return enables confusing flow control that i find is just awful ymmv |
09:25:06 | FromDiscord | <Phil> In reply to @Elegantbeef "Return enables confusing flow": Guard clauses though |
09:25:14 | FromDiscord | <Elegantbeef> I do not do guard clauses |
09:25:27 | FromDiscord | <Phil> your poor clauses, fully unguarded |
09:25:40 | PMunch | When I call a procedure I either A) expect the procedure to run all its code, creating a result for me. Or B) takes choices based on my inputs and chooses a sub-part to execute. |
09:26:04 | FromDiscord | <Elegantbeef> I avoid using return unless it's for an optimisation or would be equivalent to a break |
09:26:12 | PMunch | For case A result is the natural option, for case B expression kind returns are the most natural/safe |
09:26:21 | PMunch | @Elegantbeef, ditto |
09:26:43 | FromDiscord | <Elegantbeef> We arent 'enterprise' like Status though pmunch 😛 |
09:26:46 | FromDiscord | <arnetheduck> in our code, we end up with 2 "shapes" of functions:↵ expression return -> short and simple "functional" functions↵ high-level business logic which tends to early-return for a bunch of conditions, then perform a task (procedural style, rather than declarative) |
09:27:00 | FromDiscord | <Rika> Personally I feel like I’d avoid return all the time now after using Elixir so much :baqua: |
09:27:32 | PMunch | @Elegantbeef, true, I just want my code to be easily readable and produce the least amount of bugs so I can spend my free time writing fun projects instead of debugging. |
09:28:25 | FromDiscord | <arnetheduck> `result` is just a hidden `var` - the moment you touch it, the compiler disables a bunch of warnings and goes on as if it were a `var result: returntype` - in code that would use `result`, we prefer an explicit `var` declaration instead |
09:28:49 | FromDiscord | <Elegantbeef> Cool |
09:29:06 | FromDiscord | <Elegantbeef> Shit that's what i want when using ressult |
09:29:07 | Zevv | i hate it. it's in the way for me to implement tail call elimination |
09:29:13 | FromDiscord | <Drygord> Hi everyone. I am Drygord- former world champion TCG player and C/Python programmer. After months of searching for a language with the speed and elegance of C but modern syntactical convenience, I believe I've stumbled upon the King of languages. Nice to have found Nim |
09:29:15 | PMunch | @arnetheduck, high-level business logic for me is mostly limited to a couple functions which don't usually return anything at all. Business logic does stuff |
09:29:37 | FromDiscord | <Elegantbeef> I dont write code that does anything so I cannot argue 😄 |
09:29:39 | FromDiscord | <arnetheduck> we have lots of developers of varying experience writing lots of nim code - avoiding `result` and its implicitness is a source of bugs and confusion _overall_ -> we avoid it |
09:29:52 | FromDiscord | <arnetheduck> (edit) "avoiding" => "using" |
09:30:14 | FromDiscord | <arnetheduck> maybe you're special in avoiding the bugs -> use `result` if you like |
09:30:24 | FromDiscord | <Elegantbeef> > King of languages↵Ah yes subliminal messaging is working i see |
09:30:36 | FromDiscord | <ringabout> In reply to @arnetheduck "`result` is just a": In his case, `{.experimental: "strictDefs".}` might disable uninitialized result in the future. |
09:30:40 | FromDiscord | <ringabout> (edit) "his" => "this" |
09:30:42 | PMunch | @arnetheduck, so instead of using the implicit result variable which makes it easy to track what is actually getting returned you create your own one, getting all the same value from it, but now each time you read a function you need to first figure out what each branch returns to see how the function builds the return value? |
09:30:48 | PMunch | That doesn't really sound any better.. |
09:31:25 | Zevv | c'mon people, you know the rule. single point of return in your functions, eh |
09:31:26 | FromDiscord | <Elegantbeef> > maybe you're special in avoiding the bugs -\> use result if you like↵Pmunch you got their permission! 😛 |
09:31:28 | Zevv | has been like that since the 70s |
09:31:30 | PMunch | @arnetheduck, I do see the argument for unexperienced Nim programmers though. I tend to build my code for people more familiar with the language |
09:31:58 | FromDiscord | <ringabout> (edit) "disable" => "forbid" | "result" => "results" |
09:32:21 | PMunch | Zevv, yeah that's what I was getting at, either I want to run the entire procedure and return the result, or I want to branch in which case I use expression style returns. |
09:33:02 | FromDiscord | <arnetheduck> In reply to @PMunch "<@449019668296892420>, I do see": that's fine 🙂 we write it for people that use the language, of all walks of life 😛 - users don't care what caused the bugs and all programmers are inexperienced at some point in their career |
09:33:16 | PMunch | @Drygord, welcome :) |
09:33:26 | PMunch | You've got us at quite a moment :P |
09:33:43 | FromDiscord | <Rika> Lol return style debate |
09:33:59 | FromDiscord | <Elegantbeef> return to monke |
09:34:17 | FromDiscord | <Drygord> In reply to @PMunch "@Drygord, welcome :)": thanks, looks like quite a commotion indeed xd |
09:34:40 | PMunch | @arnetheduck, sure I didn't mean to sound elitist or anything. I just never really considered the unexperienced case since I haven't encountered it as much. |
09:35:37 | FromDiscord | <arnetheduck> In reply to @ringabout "In this case, `{.experimental:": this is better indeed - though it's still kind of a useless feature compared to an explicit return variable (per the 3-ways-to-return-stuff argument: it's not valuable enough to motivate its complexity in the compiler, or teaching developers about it among all the things inexperienced developers need to be taught, to become experienced) |
09:37:19 | FromDiscord | <Elegantbeef> Meanwhile me wishing Nim would add onto the implicit result with tuples to have named returns like Odin |
09:37:52 | FromDiscord | <jmgomez> In reply to @ringabout "I'm re-implement `std/macrocache` using": what are the implications? Will it be faster? |
09:37:57 | * | crem1 quit (Ping timeout: 252 seconds) |
09:38:29 | FromDiscord | <Elegantbeef> making `proc doThing: (a: int, b: string) = discard` valid |
09:39:18 | PMunch | I also strive to use the features of a language when I use it, to do things "properly", instead of carrying over previous biases from the languages I've used in the past. When I discovered `result` in Nim I mad a conscious effort to use it everywhere to see the pros and cons of it. |
09:39:53 | PMunch | And it led me to write code differently than what I might've done in other languages |
09:39:53 | * | crem1 joined #nim |
09:40:51 | PMunch | @Elegantbeef, named returns? |
09:41:08 | FromDiscord | <ringabout> In reply to @jmgomez "what are the implications?": It might not make the procs faster, but it might be benficial to the big vm dispatcher. |
09:41:10 | FromDiscord | <Elegantbeef> Yea Odin doesnt have tuples or an implicit result |
09:41:18 | PMunch | I like being able to track result easily through my function, it's such a nice boost to readablitiy |
09:41:21 | FromDiscord | <Elegantbeef> but it allows you to name variables in a sort of tuple like construct and assignthem |
09:41:50 | PMunch | @Elegantbeef, so you can just name arbitrarily many variables to return from a procedure? |
09:42:01 | FromDiscord | <Elegantbeef> In the above example it'd introduce `a` and `b` so you could do `a = 30; b = "hello world"` and `doThing() == (30, "hello world")` |
09:42:11 | PMunch | Aah right |
09:42:12 | FromDiscord | <Elegantbeef> Yes |
09:42:19 | FromDiscord | <Elegantbeef> It practically would introduce the return tuple as result variables |
09:42:26 | PMunch | Pretty cool, that would indeed be a fancy feature |
09:42:42 | FromDiscord | <Elegantbeef> So one could also do like `(myVar: int)` and it'd alias `result` |
09:42:46 | PMunch | Although `result.a = 30; result.b = "Hello world"` isn't too bad |
09:43:08 | PMunch | You could even use `with result:` from zevv/with |
09:43:12 | FromDiscord | <Elegantbeef> sure but now i have to write the more tedious `tuple[a: int, b: string]` 😛 |
09:43:25 | FromDiscord | <Elegantbeef> I do not use named tuples anywhere, to use them is crazy |
09:43:26 | FromDiscord | <ringabout> In reply to @jmgomez "what are the implications?": I register them as vmops because vmops are now stored in the tables instead of seqs, which is cheaper than 1.6.10. You can now register as many vmops as you like and it won't affect lookup performance like before. |
09:44:14 | PMunch | @Elegantbeef, ah I see |
09:44:15 | FromDiscord | <Elegantbeef> If i wanted a structurally typed type i'd use a concept, so tuples are just awful |
09:44:28 | FromDiscord | <ringabout> In reply to @ringabout "I register them as": With the current number of vmops, I did a simple benchmark for vmops, it is 1.13 ± 0.05 times faster than 1.6.10. |
09:44:57 | PMunch | @Drygord, Nim does indeed look quite a bit like Python, but don't expect it to be too similar |
09:45:22 | FromDiscord | <Elegantbeef> I've personally probably only used a tuple like 10 times, and only ever as like varargs, or multuple returns. Named tuples just confuse me |
09:45:48 | PMunch | It has quite a lot of distinct features, and things will not always work the same way as you expect in Python |
09:45:51 | FromDiscord | <Elegantbeef> My toy ECS for instance is built 100% on tuples as varargs |
09:46:06 | FromDiscord | <Elegantbeef> You could say distinct again 😜 |
09:47:40 | FromDiscord | <jmgomez> In reply to @ringabout "With the current number": nice, thanks for the explanation |
09:51:49 | FromDiscord | <arnetheduck> In reply to @PMunch "<@449019668296892420>, sure I didn't": well, in our case, it's largely an outcome of actively working with lots of nim developers (whose focus isn't the language, but rather getting shit done) - priorities become different when you focus on other developers rather than yourself as the primary reader of the code |
09:53:49 | FromDiscord | <arnetheduck> the style guide is just a starting point so that anyone coming to the language can get a more gentle starts - it's not that we forbid the use of features: we highlight the fact that they have costs that individual or beginner developers might not see - each feature starts with someone thinking it has some form of pro, after all |
09:58:22 | PMunch | Yeah that's fair enough |
09:59:30 | FromDiscord | <arnetheduck> our "utility function" for judging whether a feature is useful or not is tilted towards outcomes (does it generate bugs) and "average" developers (does it confuse people who have domain-specific knowledge that is likely to outweigh their nim proficiency) because those are priorities in our particular style of development |
10:01:09 | FromDiscord | <4zv4l> does `importc` implies `cdecl` ? |
10:01:45 | FromDiscord | <Elegantbeef> Nope |
10:02:36 | FromDiscord | <arnetheduck> now, a particular outcome of the style of the style guide is that should you have thought of a "pro" or "con" that we haven't added to the guide itself, we're happy to take patches - that section is meant to capture the discussion points above all, not the "final recommendation" |
10:03:34 | FromDiscord | <arnetheduck> we have many lively discussions around each feature but after a while, it becomes easy to get lost in the various arguments 🙂 that's where it started |
10:04:55 | FromDiscord | <Elegantbeef> The real trick is to just use all the Nim features as a counter point to sanity |
10:05:54 | FromDiscord | <arnetheduck> In reply to @Elegantbeef "The real trick is": that's another stage that most developers go through, on their way to "experienced" 🙂 |
10:06:36 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nUO |
10:06:40 | FromDiscord | <Elegantbeef> Unbeatable code |
10:07:38 | FromDiscord | <Elegantbeef> If i ever see that in the wild i'll find where they live and ship them a "I won Nim" sticker |
10:13:35 | PMunch | @Elegantbeef, sadly it doesn't run :P |
10:13:54 | Zevv | does it even compile |
10:14:51 | PMunch | Nope |
10:23:34 | * | PMunch quit (Quit: Leaving) |
10:24:01 | Zevv | shame on beef |
10:25:38 | FromDiscord | <exelotl> Even the compiler couldn't beat it |
10:25:42 | FromDiscord | <4zv4l> `expandFilename` will give me the full path from the root ? |
10:26:12 | * | PMunch joined #nim |
10:26:47 | FromDiscord | <4zv4l> why is this another function when there is `AbsolutePath` ?↵I don't get why `AbsolutePath` get a root argument↵if it gets a root argument it's not an absolute path anymore but a relative one depending on the root |
10:33:44 | * | peterhil quit (Quit: WeeChat 3.7) |
10:42:03 | * | onetwo quit (Quit: The Lounge - https://thelounge.chat) |
10:43:15 | * | onetwo joined #nim |
10:54:44 | FromDiscord | <4zv4l> how do I explicitly convert a string to a cstring since the compiler complains about it ? |
11:01:37 | FromDiscord | <amadan> sent a code paste, see https://play.nim-lang.org/#ix=4nV7 |
11:17:29 | * | jmdaemon quit (Ping timeout: 268 seconds) |
11:29:05 | * | jkl1337 joined #nim |
11:30:40 | * | void09_ joined #nim |
11:30:49 | * | madprops_ joined #nim |
11:31:37 | * | attah_ joined #nim |
11:36:28 | * | madprops quit (*.net *.split) |
11:36:28 | * | jkl quit (*.net *.split) |
11:36:28 | * | attah quit (*.net *.split) |
11:36:29 | * | void09 quit (*.net *.split) |
11:36:29 | * | cornfeedhobo quit (*.net *.split) |
11:36:29 | * | Ekho quit (*.net *.split) |
11:36:35 | * | attah_ is now known as attah |
11:37:01 | * | madprops_ is now known as madprops |
11:37:01 | * | madprops quit (Changing host) |
11:37:01 | * | madprops joined #nim |
11:40:05 | * | Ekho- joined #nim |
11:42:49 | * | cornfeedhobo_ joined #nim |
11:44:33 | FromDiscord | <Require Support> sent a code paste, see https://play.nim-lang.org/#ix=4nVc |
12:56:14 | FromDiscord | <demotomohiro> @Require Support https://en.m.wikipedia.org/wiki/Mersenne_prime |
13:02:57 | FromDiscord | <jtv> So I would never use that. Using the Mersenne twister requires only a few hundred outputs before being completely broken, if you were to use a secure random number to seed. And using the compile time and date does NOT do that. |
13:03:58 | FromDiscord | <demotomohiro> @Require Support it seems `encodedCounter` is LCG.↵https://en.m.wikipedia.org/wiki/Linear_congruential_generator |
13:04:33 | FromDiscord | <jtv> Yes specifically one called the Mersenne Twister |
13:12:45 | FromDiscord | <Rika> In reply to @jtv "So I would never": strenc was never made to actually be secure |
13:13:01 | FromDiscord | <Rika> it is just a demonstration of the capabilities of the term rewriting macro |
13:13:06 | FromDiscord | <Rika> and a fun project |
13:14:39 | FromDiscord | <jtv> Yet people will use it assuming it is 🙂 |
13:16:14 | FromDiscord | <Rika> then that is not the fault of the library as it is stated right on the readme |
13:18:38 | FromDiscord | <Require Support> so what would happen if i changed `16777619` and `0x7FFFFFFF` 🤔 |
13:18:55 | FromDiscord | <Rika> you would likely worsen the random number generator |
13:24:35 | FromDiscord | <Require Support> ah i see |
13:36:11 | * | cornfeedhobo_ is now known as cornfeedhobo |
13:39:40 | FromDiscord | <jtv> Nobody reads the docs 🙂 |
13:40:58 | FromDiscord | <Rika> In reply to @Rika "then that is not": . |
14:07:56 | FromDiscord | <Nerve> `nim check` appears to not throw any errors for my local installation for the `docopt` package. But when I `import docopt` and attempt to use the `dispatchProc` macro, suddenly the compiler is complaining that `docopt` has an undeclared use of `allIt`, which it is very clearly and verifiably being imported from `sequtils`. Is this a bug? |
14:08:16 | FromDiscord | <Nerve> (edit) removed "it" |
14:24:53 | * | rockcavera joined #nim |
14:59:51 | * | arkurious joined #nim |
15:01:15 | FromDiscord | <Nerve> Thankfully I can just ask the `docopt` `args` table for commands and options, so you don't have to use the `dispatchProc` macro. |
15:01:54 | * | beholders_eye joined #nim |
15:08:30 | * | beholders_eye quit (Ping timeout: 255 seconds) |
15:09:05 | FromDiscord | <NachoBIT> hello people |
15:09:09 | FromDiscord | <NachoBIT> how's going |
15:09:48 | FromDiscord | <ringabout> hello |
15:10:12 | * | beholders_eye joined #nim |
15:11:32 | * | PMunch quit (Quit: Leaving) |
15:18:41 | FromDiscord | <Nimaoth> sent a code paste, see https://play.nim-lang.org/#ix=4nWp |
15:20:04 | FromDiscord | <Nimaoth> sent a code paste, see https://play.nim-lang.org/#ix=4nWq |
15:28:41 | Amun-Ra | the message comes from the linker, it's called as: cl.exe a-list-of-all-files |
15:30:43 | Amun-Ra | I'm not a windows guy, but check HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled |
15:31:51 | Amun-Ra | hmm, max cmdline length in windows is 32k, are you sure you hit the limit? if not, there's another issue I'm not aware of |
15:37:43 | * | fredrikhr quit (Quit: Disconnecting...) |
15:44:27 | FromDiscord | <eyes> hey i have a module with a logger in it, how can I make it so that including this logger module automatically imports ``Level`` and ``log`` from ``std/logging``? |
15:45:05 | FromDiscord | <eyes> i can make wrapper functions for every possible level, or export a type like ``type Level object of logging.Level`` |
15:45:20 | FromDiscord | <eyes> but is there a way to sort of re-export something from another module? |
15:47:03 | rockcavera | Nimaoth, I believe that the formation of the name for the .obj files are too long. You can check the length of these file names in nimcache folder |
15:48:11 | * | beholders_eye quit (Ping timeout: 264 seconds) |
15:48:14 | rockcavera | This has nothing to do with the maximum line length in the Windows cmd which borders on 8190 characters as it is passing through file: 'vccexe.exe @linkerArgs.txt' |
15:49:37 | * | beholders_eye joined #nim |
15:53:51 | rockcavera | Here Nim is at E:\Nim; nimcache at E:\nimcache; and nimble in E:\nimble |
15:54:27 | * | beholders_eye quit (Ping timeout: 260 seconds) |
15:55:20 | * | dropkick joined #nim |
15:55:59 | FromDiscord | <Nimaoth> the registry setting is already enabled. I guess vccexe.exe maybe has a limit internally. The longest path in my lingerArgs.txt was 168 characters, but by moving the nimcache to a different folder with a shorter path I was able to compile it. But it would be nice if the generated .obj files didn't include the entire path in the name (I guess it's for uniqueness) |
15:56:00 | rockcavera | The names of .c files generated by the Nim compiler represent the location of the files. The farther from the assembly letter, the longer the generated name will be, which could lead to errors. |
15:56:42 | FromDiscord | <Nimaoth> In reply to @rockcavera "Here Nim is at": good idea, I'll change my nimble and choosenim directories aswell |
15:57:37 | rockcavera | Choosenim installs have an ugly, long name when compiled. |
16:01:54 | rockcavera | I believe the names of the .c files generated by the Nim compiler could be hashed (crc32, adler32... something short) and use $project.json to map to the source file. That could avoid a lot of trouble. But everything has a reason and I don't know what the current reason for such use of names is. |
16:05:42 | * | kenran quit (Remote host closed the connection) |
16:09:55 | * | ox joined #nim |
16:15:20 | * | ox is now known as oz |
16:30:25 | FromDiscord | <Phil> In reply to @ringabout "hello": A new profile pic! Change is my eternal enemy! |
16:31:11 | FromDiscord | <Phil> In reply to @eyes "hey i have a": Have you tried "export" for those symbols yet? |
16:34:15 | FromDiscord | <Phil> Basically export logging.log and export logging.Level↵Logging isn't needed , but I find it more readable to specify which module provides the symbol you're re-exporting |
16:36:01 | FromDiscord | <Phil> In reply to @jtv "Nobody reads the docs": Lies! I skim them and read like a third while doing so! |
16:45:27 | FromDiscord | <I have 50GB of nothing on my PC> I don't want to waste araq's time, so I'll just ask here |
16:45:34 | FromDiscord | <I have 50GB of nothing on my PC> why did araq become an OOP enjoyer? |
16:46:01 | FromDiscord | <Saint> So when I do a $ on a JString I get quotes around it? Is that a bug? |
16:46:13 | FromDiscord | <Saint> Shouldn't the toString of a Jstring not be wrapped in quotes? |
17:02:28 | FromDiscord | <Phil> In reply to @I have 50GB of nothing on my PC "why did araq become": ? |
17:02:55 | FromDiscord | <I have 50GB of nothing on my PC> I did see him regretting not making procs type-bound |
17:05:55 | FromDiscord | <leorize> more or less down to difficulty in generics binding |
17:06:43 | FromDiscord | <leorize> there's a bunch of issues related to that, and type-bound ops was Araq's solution, though rejected by the community |
17:21:14 | FromDiscord | <Saint> How are procs not type bound? I am just wondering |
17:22:58 | FromDiscord | <Phil> In reply to @I have 50GB of nothing on my PC "I did see him": Type bound in a dynamic dispatch kind of way? |
17:24:17 | FromDiscord | <Phil> In reply to @Saint "So when I do": I will be honest: Beats me. |
17:32:07 | FromDiscord | <I have 50GB of nothing on my PC> In reply to @Isofruit "Type bound in a": Not extendable by .nim files that the type wasn't declared in, I guess |
17:43:11 | * | PMunch joined #nim |
17:46:04 | FromDiscord | <Phil> Err... I don't do ref types a ton, but is there a way to instantiate and assign to a ref in one go?↵Like:↵`let x: ref seq[int] = new(@[1,2,3,4])` |
17:47:51 | PMunch | @Phil, yes |
17:48:53 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4nWP |
17:49:57 | PMunch | Just a seq, trying to remember how :P |
17:52:39 | PMunch | Hmm, I do remember having done this recently. But I can't remember how |
17:59:23 | FromDiscord | <leorize> I always had to define a wrapper template to get that rolling |
18:03:44 | FromDiscord | <Elegantbeef> I swear phil! |
18:03:45 | FromDiscord | <Elegantbeef> I already provided a procedure that does that |
18:08:34 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nWV |
18:08:57 | FromDiscord | <Phil> Ah, so write it yourself it is |
18:10:03 | FromDiscord | <Elegantbeef> Yea the only overrides are for allocating types or as i showed a reference value |
18:11:30 | FromDiscord | <fabricio> why isn't it possible to get a concrete instance of a generic function like this `let a = parseOct[BiggestInt]` |
18:13:33 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nWY |
18:13:45 | FromDiscord | <leorize> generics instantiation is always weird |
18:14:02 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nWZ |
18:14:05 | FromDiscord | <Elegantbeef> Atleast if the playground isnt lying |
18:16:01 | FromDiscord | <Elegantbeef> Ah nope both error i assume |
18:17:07 | FromDiscord | <fabricio> sent a code paste, see https://play.nim-lang.org/#ix=4nX3 |
18:17:29 | FromDiscord | <fabricio> wait no |
18:17:36 | FromDiscord | <Elegantbeef> It doesnt work sadly |
18:17:43 | FromDiscord | <Elegantbeef> The compiler didnt error until used |
18:18:26 | FromDiscord | <fabricio> the only way I can do it is by declaring another function that calls the generic one |
18:19:42 | FromDiscord | <fabricio> In reply to @fabricio "why isn't it possible": I think this is a missing feature, although maybe not as necessary as other stuff |
18:21:29 | FromDiscord | <Elegantbeef> Well it gets even more confusing with overloads |
18:22:49 | FromDiscord | <eyes> In reply to @Isofruit "Basically export logging.log and": hey nice! this exactly what i was looking for. also I totally agree, and i’ve been spending a bunch of time going back and refactoring my code to be explicit about which symbols come from which module |
18:22:55 | FromDiscord | <eyes> much better i think |
18:23:11 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4nX4 |
18:23:11 | FromDiscord | <Elegantbeef> Not the most wonderful thing to need, but atleast there is a workaround |
18:29:00 | FromDiscord | <Saint> In reply to @Isofruit "I will be honest:": Should I ask this as a question on github as an issue or something maybe? |
18:31:43 | FromDiscord | <Phil> In reply to @Saint "Should I ask this": Forum might be a good first start |
18:32:06 | FromDiscord | <Elegantbeef> No you should use `getStr` on a `JString` |
18:32:06 | FromDiscord | <Elegantbeef> `$` is for stringifying the entire json |
18:32:55 | FromDiscord | <Saint> In reply to @Isofruit "Forum might be a": Gotcha thanks! |
18:33:00 | FromDiscord | <Elegantbeef> And the correct stringification of a jstring is with quotes cause that's what json's spec states |
18:33:53 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1074760337078894694/image.png |
18:51:51 | * | jmdaemon joined #nim |
18:59:48 | FromDiscord | <jmgomez> In reply to @Saint "Shouldn't the toString of": if you dont like that you can override it |
19:01:23 | FromDiscord | <Elegantbeef> Does anyone read my messages 😄 |
19:01:36 | FromDiscord | <Saint> Haha sorry I am seeing it now @ElegantBeef |
19:02:07 | FromDiscord | <Saint> In reply to @Elegantbeef "And the correct stringification": Got it thanks! |
19:02:22 | FromDiscord | <Phil> I may be warming up to the entire collect(newSeq) thing |
19:21:26 | PMunch | Hmm, fun, I've created a very rudimentary ASCII art to SVG converter |
19:21:54 | PMunch | It basically converts all characters to a single point, then delauney triangulates them and selects the two shortest edges for each point |
19:22:09 | PMunch | It works, okay ish |
19:24:30 | PMunch | I have two changes in mind which could improve it further, one is to create a "connection heatmap" for each character. Basically a 3x3 grid with the character in the center and the willingness to connect to any given pixel. So for a line it would be two warm ellipses spreading out from either side for example |
19:24:50 | PMunch | Then instead of using shortest edge it would use shortest distance through the overlapping heatmaps |
19:25:55 | PMunch | Then instead of only the two shortest edges it would have some decision making to check if this was part of a longer line of repeating characters and such |
19:27:14 | PMunch | Went down this rabbit hole because I was annoyed at the subtle bugs in svgbob rendering by the way: https://ivanceras.github.io/svgbob-editor/ |
19:38:33 | * | Mister_Magister quit (Ping timeout: 252 seconds) |
19:38:55 | * | xet7 joined #nim |
19:43:16 | * | Ekho- is now known as Ekho |
19:52:52 | * | Mister_Magister joined #nim |
19:54:01 | * | azimut quit (Quit: ZNC - https://znc.in) |
19:54:33 | * | azimut joined #nim |
20:06:20 | * | azimut_ joined #nim |
20:06:29 | * | azimut quit (Ping timeout: 255 seconds) |
20:17:34 | PMunch | Hmm @Elegantbeef, tiny issue with the distinct pointer destructor |
20:17:58 | PMunch | There is no good way to tell Futhark to retype all `ptr context` to my distinct type.. |
20:18:15 | PMunch | I mean I could write an Opir hook, but.. |
20:46:17 | * | Jjp137 quit (Ping timeout: 246 seconds) |
20:52:47 | FromDiscord | <jmgomez> hey @PMunch I think Futhark uses clang, right? Do you know if it is possible to ask clang if a given type is available? (passing over a bunch of includes/search paths)? |
20:53:07 | PMunch | @jmgomez, Futhark uses clang, yes |
20:53:20 | PMunch | Well that's pretty much all Futhark does |
20:53:30 | PMunch | It doesn't look for a specific type, but rather all types |
20:54:06 | PMunch | Not entirely sure what you have in mind though |
20:54:26 | FromDiscord | <jmgomez> Nice! The thing is I have some mirror types because they arent available but I dont there is a subset that I can just import because they are. I just dont know which ones, so I generate mirror code for all the types |
20:55:06 | FromDiscord | <jmgomez> The starting point is that I generate the bindings from the reflection rather than from the cpp |
20:55:11 | PMunch | Uhm, that sentence didn't make much sense :P |
20:56:19 | FromDiscord | <jmgomez> (edit) "Nice! The thing is I have some mirror types because they arent available ... butknow" added "(as cpp types) " | "(as cpp types) but I dont ... theremay" added "know if" | "are. I" => "may be. ↵I" |
20:56:26 | FromDiscord | <jmgomez> Did some edits, maybe now? |
20:56:57 | FromDiscord | <jmgomez> mirror type == same memory layout as the real cpp type |
21:06:47 | * | luis_ joined #nim |
21:07:15 | FromDiscord | <Phil> Is there a way to automatically runtime check that for a `seq[seq[string]]` the "inner" sequences are all the same length?↵Like, I'm aware I can't know this at compile-time, but it would be nice to not have to manually verify that |
21:11:05 | PMunch | @jmgomez, the bot tries to be helpul and just sends the edits, which was pretty much incomprehensible |
21:11:36 | FromDiscord | <jmgomez> In reply to @PMunch "<@726017160115126333>, the bot tries": "Nice! The thing is I have some mirror types because they arent available (as cpp types) but I dont know if there is a subset that I can just import because they may be. ↵I just dont know which ones, so I generate mirror code for all the types ↵The starting point is that I generate the bindings from the reflection api rather than from the cpp " |
21:12:04 | FromDiscord | <jmgomez> In reply to @Isofruit "Is there a way": you mean like an assert? |
21:12:15 | PMunch | Hmm, still no idea what you're actually trying to do |
21:12:18 | FromDiscord | <Phil> In reply to @jmgomez "you mean like an": Sort of, but one I don't have to write and is somehow done by the type system |
21:12:24 | * | h00k_ joined #nim |
21:12:31 | FromDiscord | <Phil> Or something |
21:12:36 | PMunch | Are you trying to use Futhark? Or only libclang? Or even clang the tool? |
21:12:36 | FromDiscord | <Elegantbeef> There is not phil |
21:12:46 | FromDiscord | <Phil> I bascically don't want to write the assert |
21:12:49 | FromDiscord | <Phil> sadness |
21:13:06 | FromDiscord | <jmgomez> In reply to @PMunch "Are you trying to": Wondering if clang can serve the purpose of asking for a given arbitrary type in a set of headers |
21:13:11 | FromDiscord | <Elegantbeef> This cannot even be encoded in the type system |
21:13:13 | FromDiscord | <Elegantbeef> Cause the length is dynamic |
21:13:43 | PMunch | outerseq.foldl(if a.len == b.len: a.len else: raise newException()) |
21:13:46 | PMunch | Maybe that works |
21:14:11 | PMunch | @Elegantbeef, he said he knows that he can't do it on compile-time |
21:14:21 | PMunch | Ah automatic runtime check.. |
21:14:37 | PMunch | distinct seq[seq[string]] with a custom add perhaps? |
21:14:46 | PMunch | You only need to check against the first element |
21:15:10 | PMunch | @jmgomez, with libclang and a program, sure |
21:15:32 | PMunch | Heck, you could even use Opir to get the JSON dump and then search that for your type |
21:16:02 | PMunch | Since when did globals call destructors? |
21:16:04 | PMunch | This is great! |
21:16:22 | FromDiscord | <jmgomez> In reply to @PMunch "<@726017160115126333>, with libclang and": okay, I just wanted to know if that's an option. Thanks! |
21:17:17 | FromDiscord | <Elegantbeef> No clue when they started, but yea they call them when the program terminates |
21:17:47 | FromDiscord | <jmgomez> In reply to @PMunch "Heck, you could even": what's Opir? |
21:18:00 | FromDiscord | <Elegantbeef> Opir is the first pass of futhark |
21:18:08 | FromDiscord | <Elegantbeef> It generates a json file for futhark to play with |
21:18:23 | FromDiscord | <jmgomez> ahh, but it doesnt understand cpp, does it? |
21:18:50 | FromDiscord | <Elegantbeef> PRs welcome 😛 |
21:19:29 | * | h00k_ quit (Quit: Konversation terminated!) |
21:20:02 | FromDiscord | <jmgomez> 😅 |
21:22:23 | PMunch | Well I believe it would understand the C parts of a C++ file |
21:22:31 | PMunch | However I haven't tested this at all |
21:23:50 | PMunch | Basically you call it with all the C flags you need, and then a list of header files to import |
21:23:55 | PMunch | And it spits out JSON |
21:24:10 | PMunch | Not quite sure what would happen if you passed it a .hpp file |
21:24:14 | FromDiscord | <jmgomez> it would really need to understand cpp in order to parse these headers. They are full of macros but when the time comes will give it a shot |
21:24:31 | PMunch | Well clang is pretty good at understanding C++ |
21:24:36 | PMunch | So I'm not too worried about that part |
21:25:09 | FromDiscord | <Elegantbeef> Yea clang has a C++ compiler |
21:25:20 | FromDiscord | <jmgomez> not so sure there I may need to work around the msvc hacks |
21:25:28 | FromDiscord | <jmgomez> but for sure it worth a try |
21:25:55 | FromDiscord | <Elegantbeef> There will be issues when it comes to using clang on a platform that expects a different compiler |
21:26:20 | PMunch | Yeah, that's what I ran into with the AVR stuff.. |
21:30:24 | FromDiscord | <Elegantbeef> It's a shame that more C/C++ compilers do not have a library like API |
21:31:07 | FromDiscord | <Elegantbeef> Especially given the complexity that is parsing C/C++ 😄 |
21:33:13 | PMunch | I mean even the clang library isn't exactly well documented or anything |
21:33:18 | PMunch | Mostly just guesswork :P |
21:33:32 | FromDiscord | <Elegantbeef> Sure, but it atleast exists |
21:33:44 | FromDiscord | <Elegantbeef> There is no alternative for gcc or msvc as far as i know |
21:33:59 | FromDiscord | <Elegantbeef> You want to make your own tooling, go make your own variation of the compiler with the same oddities they have |
21:34:02 | FromDiscord | <Elegantbeef> How hard could it be! |
21:37:33 | PMunch | Oh don't get me wrong, libclang is great, but it could've been amazing |
21:37:43 | PMunch | I mean Futhark would be impossible without libclang |
21:37:44 | * | PMunch quit (Quit: leaving) |
21:37:59 | FromDiscord | <Elegantbeef> Lies it's very possible, it just is named c2nim 😜 |
21:40:42 | FromDiscord | <Drygord> Hey guys, I get really slow compile time after making a change. 2-3 seconds for 10 lines of code. This is the compilation output: https://media.discordapp.net/attachments/371759389889003532/1074807350256480367/nim_output.txt |
21:41:21 | FromDiscord | <Drygord> I am using the latest nightlies build but I have no idea why it's showing in D: drive |
21:42:29 | FromDiscord | <Drygord> Is this an issue with mingw? |
21:48:27 | * | rockcavera quit (Read error: Connection reset by peer) |
21:48:46 | * | rockcavera joined #nim |
21:48:47 | * | rockcavera quit (Changing host) |
21:48:47 | * | rockcavera joined #nim |
21:53:56 | FromDiscord | <Drygord> 27879 lines; 2.023s; |
21:55:46 | FromDiscord | <Elegantbeef> It depends on so many factors to say what the issue is |
21:55:54 | FromDiscord | <Elegantbeef> If you want a fast compilation it's best to use tcc |
22:03:16 | FromDiscord | <Drygord> what is a typical compilation speed for something small like this? |
22:04:04 | FromDiscord | <Hourglass [She/Her]> Doesn't GCC use Gimple? |
22:04:10 | FromDiscord | <Hourglass [She/Her]> Couldn't that be used... Somehow? |
22:04:23 | FromDiscord | <Hourglass [She/Her]> If you get it to output the gimple code from the C code? |
22:13:05 | FromDiscord | <Elegantbeef> Small like what?↵(@Drygord) |
22:14:51 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4nYg |
22:17:40 | FromDiscord | <Elegantbeef> The `arr` field is not exported and the templates expand to `a.arr[x]` which errors |
22:18:56 | FromDiscord | <Drygord> In reply to @Elegantbeef "Small like what? (<@166412450877407233>)": https://media.discordapp.net/attachments/371759389889003532/1074816976431632475/image.png |
22:19:11 | FromDiscord | <Elegantbeef> Sure but what's the code |
22:19:21 | FromDiscord | <Drygord> sent a long message, see http://ix.io/4nYh |
22:19:22 | FromDiscord | <Elegantbeef> you can have a very complex macro in 10 lines of code |
22:20:03 | FromDiscord | <Elegantbeef> It takes .3s to compile here |
22:20:07 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4nYi |
22:20:55 | FromDiscord | <Elegantbeef> What cpu do you have drygord? |
22:21:44 | FromDiscord | <Drygord> Processor Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz, 2601 Mhz, 6 Core(s), 12 Logical Processor(s) |
22:21:48 | FromDiscord | <Drygord> it's a laptop |
22:21:54 | FromDiscord | <Elegantbeef> Ok so a nippy cpu still |
22:22:36 | FromDiscord | <Elegantbeef> Wait it takes 2s to compile |
22:22:45 | FromDiscord | <Elegantbeef> > 27879 lines; 2.023s; 30.344MiB peakmem; proj\: C\:\\nim-1.9.1\\first.nim; out\: C\:\\nim-1.9.1\\first.exe [SuccessX] |
22:23:27 | FromDiscord | <Elegantbeef> I misread it as 10s 😄 |
22:23:40 | FromDiscord | <Elegantbeef> Yea I can only really say try tcc and see if that helps |
22:24:26 | FromDiscord | <Elegantbeef> Nim's compiler is not the fastest, but if you want to be faster to running code tcc reduces that time a bit |
22:25:08 | FromDiscord | <Drygord> I wonder if there is something screwy going on with the linking |
22:25:33 | FromDiscord | <Elegantbeef> you can do `nim c -c` to see just the Nim compile time |
22:25:36 | FromDiscord | <Drygord> is clang recommended? |
22:25:42 | FromDiscord | <Elegantbeef> That doesnt build the binary so would remove the linking |
22:25:53 | FromDiscord | <Elegantbeef> I personally use gcc since i'm on linux and that's the default |
22:26:15 | FromDiscord | <Drygord> I see- what kind of time would a short script take you on your setup? |
22:26:21 | FromDiscord | <Drygord> 2-3s? |
22:26:29 | FromDiscord | <Elegantbeef> As i said .3s for the above code |
22:26:40 | FromDiscord | <Elegantbeef> ryzen 5600x |
22:28:51 | FromDiscord | <Drygord> hmm yeah that sounds like what I expected |
22:29:46 | FromDiscord | <Drygord> some guy in the Jai beta was upset because he was getting long compile times. I think it turned out to be an issue with the linker.. will have to go reread that |
22:30:13 | FromDiscord | <Elegantbeef> Well i just told you how to check just Nim's compile time |
22:30:18 | FromDiscord | <Elegantbeef> `nim c -c ./your.nim` |
22:54:20 | * | azimut_ quit (Ping timeout: 255 seconds) |
22:56:10 | * | sagax joined #nim |
23:02:34 | FromDiscord | <Phil> In reply to @Drygord "some guy in the": Linking consistently is the longest step in my release compilation lately.↵As in, that stuff can take 30s upwards for ~11k loc |
23:05:16 | FromDiscord | <jmgomez> In reply to @Isofruit "Linking consistently is the": 30seconds? O_o |
23:05:23 | FromDiscord | <jmgomez> Just linking? |
23:05:38 | FromDiscord | <Phil> Let me do a release compile of my webproject, one sec |
23:08:26 | FromDiscord | <amadan> Have you tried using mold? |
23:08:32 | FromDiscord | <Phil> Linking started 00:06:46↵Linking ended: 00:08:25↵Linker used was musl-gcc, dynamically linked against musl |
23:09:01 | FromDiscord | <Phil> That was on a completely fresh compile, so basically I just jumped from nim 1.6.10 to nim devel and had nothing in the cache, so I had to recompile everything |
23:09:25 | FromDiscord | <Phil> And the linking step started 06:46, the compile itself began like 06:10 |
23:10:07 | FromDiscord | <jmgomez> That makes more sense! Is not that bad |
23:10:19 | FromDiscord | <amadan> (edit) "Have you tried using mold? ... " added "(https://github.com/rui314/mold)" |
23:10:21 | FromDiscord | <jmgomez> (edit) "Is" => "Its" |
23:11:13 | FromDiscord | <Phil> I have no idea as that's my only really large project so far where it comes into play, so I really don't know of > 1 min for linking of ~150 files in my project is super slow or not |
23:11:21 | FromDiscord | <Phil> Or if it's the musl-linker that's super slow |
23:11:59 | FromDiscord | <Phil> In reply to @amadan "Have you tried using": I don't know enough about linkers to evaluate whether mold works with musl or not |
23:12:29 | FromDiscord | <Phil> But anyway, given that I only link for release builds, I'm okay with it taking that long then |
23:15:27 | * | xet7 quit (Remote host closed the connection) |
23:16:48 | FromDiscord | <jmgomez> Hold on I miss read I thought they were seconds. |
23:16:59 | FromDiscord | <Phil> the format is hh:mm:ss |
23:17:13 | FromDiscord | <Phil> I was linking for ~100s |
23:17:30 | FromDiscord | <jmgomez> What you linking the output of nim code or something else? |
23:17:43 | FromDiscord | <jmgomez> (edit) "What ... you" added " are" |
23:18:51 | FromDiscord | <Phil> My knowledge about linkers amounts to: "I pass ` --gcc.linkerexe:"musl-gcc"` and ` --define:lto` to the compiler for free performance gains" |
23:19:27 | FromDiscord | <jmgomez> but I mean, it is just nim code or do you also have c bindings or something? |
23:20:33 | FromDiscord | <Phil> In my own source-code no.↵But I do use prologue, which might, I use nimword which has c-bindings to libsodium and openssl and I use norm which uses ndb which definitely uses C-bindings to the sqlite-lib |
23:21:24 | FromDiscord | <jmgomez> hmm, so how long is your iteration time? |
23:21:37 | FromDiscord | <Phil> iteration time? |
23:21:48 | FromDiscord | <jmgomez> like you do a small chance and you recompile everything |
23:21:55 | FromDiscord | <Phil> Ah, errrr |
23:21:55 | FromDiscord | <jmgomez> (edit) "chance" => "change" |
23:22:03 | FromDiscord | <Phil> with a release command? |
23:22:10 | FromDiscord | <Phil> (edit) "command?" => "command that includes the linking?" |
23:23:07 | FromDiscord | <Phil> Ah, I do use `forceBuild:on` on release, that maybe should be kept in mind |
23:23:28 | FromDiscord | <jmgomez> yeah, but I mean more when you development something and you want to see the output |
23:23:40 | FromDiscord | <jmgomez> (edit) "you" => "you're" |
23:24:38 | FromDiscord | <Phil> Well in that case I'm not linking.↵If it's just about that compile command, it's like 10s |
23:25:25 | FromDiscord | <jmgomez> it does link, probably just incremental. Not sure how gcc approaches it. Anyways, it doesnt sound that bad |
23:25:47 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4nYA |
23:26:04 | FromDiscord | <Phil> The upper one is the one that takes 10s, the lower one is the one that takes 1-2 minutes |
23:30:57 | FromDiscord | <!!sharpcdf!!> https://codeberg.org/sharpcdf/tauri-nim finished my template to use nim with tauri ;) |
23:40:34 | * | koltrast quit (Quit: ZNC - http://znc.in) |
23:40:54 | * | koltrast joined #nim |
23:41:25 | FromDiscord | <Phil> Could've been Nimnotauri |
23:41:49 | FromDiscord | <Phil> Or Nimtaur |
23:42:33 | FromDiscord | <Phil> But despite the overlooked naming opportunities, really cool to see ! 😄 |
23:43:22 | FromDiscord | <Phil> If I weren't already invested in an owlkettle project I'd check that out since I'd really like to combine an angular frontend with a backend and provide that as an app |
23:46:01 | FromDiscord | <Phil> In reply to @sharpcdf "https://codeberg.org/sharpcdf/tauri-nim finished my": Have you considered sharing that milestone in the forum yet? |
23:46:46 | FromDiscord | <Phil> Wait a sec, doesn't that kinda need some more bindings-stuff? |
23:46:57 | FromDiscord | <Phil> I thought this was like bindings etc. |
23:47:23 | FromDiscord | <Phil> Ohhhhhhh in this setup you use rust in the backend and nim for the frontend |
23:47:27 | FromDiscord | <Phil> I keep forgetting the JS backend |
23:57:55 | FromDiscord | <!!sharpcdf!!> In reply to @Isofruit "Could've been Nimnotauri": if it wasnt just a quickstart template i wouldve named it nimauri ;) |
23:58:25 | FromDiscord | <!!sharpcdf!!> i plan on making some bindings to the js api too but for now this is just a template |