00:02:33 | blackbeard420 | LOL vim³ looks awesome! |
00:02:48 | rayman22201 | lmao, I saw that on HN, and I didn't even realize it was written in Nim. |
00:03:14 | axion | I need some help. |
00:03:15 | dom96 | :o |
00:03:18 | axion | Lemme make a playground |
00:03:28 | rayman22201 | axion, you are correct. inject makes the variable "dirty". It injects it into the parent scope instead of gensyming a clean variable name. |
00:05:01 | * | dadada__ quit (Ping timeout: 264 seconds) |
00:05:46 | rayman22201 | wow, the dude wrote a Nim editor by wrapping libvim. Who is this guy and why isn't he on irc? lol https://github.com/paranim/paravim |
00:05:52 | axion | https://play.nim-lang.org/#ix=2gaF |
00:06:14 | * | dadada joined #nim |
00:06:38 | * | dadada is now known as Guest1269 |
00:08:44 | rayman22201 | looking and thinking ^ |
00:13:47 | * | Guest1269 quit (Ping timeout: 260 seconds) |
00:14:10 | rayman22201 | seems to just work? https://play.nim-lang.org/#ix=2gaH |
00:15:15 | axion | nope... |
00:15:35 | axion | https://play.nim-lang.org/#ix=2gaI |
00:15:50 | axion | oh wait...you mapped vec2 differently |
00:16:32 | axion | Yeah ok, that seems to work. Thanks! |
00:16:41 | rayman22201 | 👍 |
00:17:17 | axion | ideally i'd want the template to expand to 2 templates. no need for function overhead there |
00:17:25 | axion | wonder if that will cause any problems |
00:19:05 | * | silvernode joined #nim |
00:20:41 | rayman22201 | like this? https://play.nim-lang.org/#ix=2gaL |
00:20:41 | rayman22201 | feels like premature optimization. I would expect those functions to get inlined anyway? but you can do it I believe. |
00:21:02 | axion | Cool. How do I expand a template? expandMacros doesn't seem to be doing anything |
00:21:16 | * | dadada__ joined #nim |
00:21:45 | rayman22201 | good question... I'm not sure if we have a way to expand templates... |
00:22:17 | axion | Ah hmm |
00:22:22 | madprops | the nim package in ubuntu is practically useless if it's too old |
00:22:59 | rayman22201 | poke the ubuntu people to upgrade? |
00:23:32 | madprops | well no use if im running an LTS release |
00:23:35 | axion | If you care about stability, use a Debian derivitive. If you're a developer, don't. |
00:24:15 | madprops | would be ok if nimble could update everything somehow |
00:24:41 | Yardanico | choosenim exists :P |
00:25:02 | madprops | oh forgot about that |
00:25:55 | rayman22201 | I think expandMacros **should** work on templates, but I'm not sure |
00:26:17 | axion | Well I'd like to see an example of that working, because I am then doing something entirely wrong. |
00:27:06 | rayman22201 | oh, it's working for me? |
00:27:31 | rayman22201 | The output gets put in the compiler output, not the output of the program. |
00:27:49 | rayman22201 | https://play.nim-lang.org/#ix=2gaO |
00:27:49 | axion | oh so you can't use nim playground to see it anyway? |
00:28:03 | rayman22201 | you can. click on the button that shows "Showing: output" |
00:28:11 | rayman22201 | it will switch to "showing: debug" |
00:28:14 | rayman22201 | it's a toggle switch |
00:28:16 | * | rnrwashere joined #nim |
00:28:21 | axion | oh :) |
00:28:40 | rayman22201 | probably need better docs for that :-) |
00:28:42 | axion | No idea how I missed that. |
00:29:10 | rayman22201 | NP. it's not entirely obvious |
00:29:53 | axion | now it would be super nice if it worked recursively |
00:30:09 | axion | Because that would really be the only use for expanding a template...to see the final code gen |
00:30:34 | axion | ie; instead of printing the inner template calls...expand those too |
00:30:49 | rayman22201 | The VM is really sensitive to recursion, that's why it doesn't |
00:31:13 | rayman22201 | You can embed "expandMacro" statements in your macro to simulate it though. |
00:31:43 | axion | In Lisp we have macroexpand-1 (which this is doing) and macroexpand (which is what I want). Oh well |
00:35:11 | moerm_ | - Back - |
00:35:20 | rayman22201 | It's not a bad feature request? Start here: https://github.com/nim-lang/Nim/blob/version-1-0/lib/core/macros.nim#L507, and then make a version that traverses the node and collects the reprs instead of just getting the single node. |
00:36:55 | rayman22201 | just be careful about the VM. it has a low recursion limit. I would probably unroll the recursion into a loop. |
00:37:20 | axion | Thanks. It'll be a while before I get to hacking on the language, but I do plan on bringing some niceties over from Lisp sometime soon. For now, just writing lots of code to really get to know the language |
00:38:32 | rayman22201 | fair enough. 😉 |
00:40:28 | FromGitter | <zetashift> Isn't there a switch that increases that recursion limit? |
00:41:47 | * | rnrwashere quit (Remote host closed the connection) |
00:42:26 | rayman22201 | yes, but if you want to add a feature to the core of the language, you aren't going to rely on increasing the limit |
00:43:30 | rayman22201 | I was proposing adding to the std lib. As a nimble package / personal utility, sure, go ham lol. |
00:44:53 | * | dwdv quit (Ping timeout: 250 seconds) |
00:45:14 | moerm_ | See you all tomorrow |
00:45:23 | * | moerm_ quit (Quit: Leaving) |
00:53:48 | FromGitter | <zetashift> gnight moerm_ |
00:54:35 | axion | rayman22201: interesting... |
00:55:08 | axion | if i change the procs to templates like you did, the expansion doesn't have the * for exporting them |
00:55:45 | axion | and i indeed do get compile errors when trying to access the members across modules |
00:55:53 | rayman22201 | sure enough... that's a bug. please report! |
00:58:36 | axion | I will, even though my bug reports don't seem to get any replies :) |
00:59:28 | FromGitter | <zetashift> limited manpower |
01:00:03 | FromGitter | <zetashift> I don't think that means they go unnoticed axion |
01:00:06 | axion | I'm not knocking on Nim, but I do think the 1.0 stability guarantee was a few years premature |
01:00:41 | leorize | stable just means that your code won't break in updates :) |
01:00:44 | rayman22201 | *cough* I agree *cough* pre-mature marketing *cough* |
01:00:48 | axion | Just in my first library I'm finding a lot of compiler bugs |
01:01:07 | * | rnrwashere joined #nim |
01:01:16 | leorize | the original plan was to pause it until we got rid of all the bugs :) |
01:01:35 | FromGitter | <zetashift> I found it too, but more people using Nim (because of 1.0) might also mean more bugs being discovered |
01:02:55 | leorize | yep, 1.0 was the main gatekeeper for people to not use Nim, so in the end the decision was to tackle that :p |
01:03:00 | rayman22201 | The problem is, soooo many Hacker News junkies and the "trend followers" were complaining that they wouldn't touch Nim because it was "beta" and "experimental" forever. It was just another excuse to not use the language. |
01:03:05 | axion | That is a valid point. There are never no bugs. users.inc if you ever think so |
01:03:47 | FromGitter | <zetashift> I do hope Nim decides to do a like an 'Autumn of tooling' or winter of fixing bugs(which I guess is hacktorberfest) to work more on those areas |
01:03:49 | leorize | I find it interesting that no one complains about style insensitivity any more |
01:03:53 | FromGitter | <zetashift> YES |
01:04:37 | rayman22201 | lol. lets hope it stays that way :-P |
01:05:58 | FromDiscord | <Benumbed> Personally, IRT the 1.0 stuff, I just wanted the grammar to be stable, that's why I waited |
01:06:00 | * | dadada__ quit (Ping timeout: 265 seconds) |
01:06:21 | leorize | it was stable |
01:06:24 | leorize | :P |
01:07:11 | leorize | since 0.19 IIRC |
01:07:12 | FromDiscord | <Benumbed> Ok, well, I never heard or read that 🙂 |
01:07:21 | FromGitter | <zetashift> You were one of the few then Benumbed, I saw a lot of comments that couldn't introduce it in their team/work because of no 1.0 |
01:07:29 | FromDiscord | <Rika> oof |
01:07:33 | rayman22201 | It was FUD honestly |
01:07:37 | FromDiscord | <Benumbed> Not saying it wasn't communicated, just that I didn't actually see a "no more grammar changes" |
01:07:41 | FromGitter | <zetashift> I don't think anyone asked if the grammar was stable :P |
01:07:58 | FromDiscord | <Benumbed> And I came back because I assumed it was in 1.0, haha 😄 |
01:08:11 | leorize | it's still not stable btw :) |
01:08:54 | leorize | it's not like the language is gonna turn upside down in just a release :P |
01:08:58 | FromDiscord | <Benumbed> Regardless, I'm using it seriously now though, if only for personal stuff |
01:09:14 | leorize | unless you're julia-lang, they messed up their 1.0 hard |
01:09:19 | FromGitter | <zetashift> How's the ride so far? |
01:09:21 | rayman22201 | 1.0 brought some kind of "stability guarantee" (whatever that means) lol. The best thing it brought was a more measured approach to maintaining backwards compatibility. Deprecation paths are taken more seriously now. |
01:09:52 | FromDiscord | <Benumbed> That's really all you can ask for too |
01:09:58 | FromDiscord | <Rika> what happened with julia's 1.0? |
01:09:58 | rayman22201 | talking about Nim. I don't know jack about Julia. (sorry, got irc snipped) |
01:10:10 | FromDiscord | <Benumbed> I just don't want my code that I worked so hard to to randomly break in odd ways 🙂 |
01:10:20 | leorize | julia removed all deprecated things when they release 1.0 |
01:10:35 | leorize | breaking a tons of libraries |
01:10:49 | rayman22201 | lol. fail |
01:11:20 | FromGitter | <zetashift> wasn't that because 0.6 was basically the road to 1.0 |
01:11:21 | FromDiscord | <Rika> how much time did they give for the deprecated things though |
01:11:25 | axion | https://github.com/nim-lang/Nim/issues/13828 |
01:11:39 | FromGitter | <zetashift> so that basically the jump to 0.6 to 1.0 was non-existant |
01:12:02 | rayman22201 | Then again, we always kind of cared about backwards compatibility. Nim still tries to keep examples from a 3 year old book still working... |
01:12:22 | FromDiscord | <Rika> deprecated things should disappear some update no? |
01:12:33 | FromDiscord | <Rika> it just depends how much time itll take |
01:12:54 | axion | The people in my circle won't touch Nim because "it doesn't offer anything over Rust". Sigh |
01:13:06 | leorize | rust is the new hip thing now |
01:13:10 | FromDiscord | <Benumbed> IMO they should warn, then error, with a switch to turn on the old behavior, then disappear, so far Nim seems to handle that pretty well from what I've seen |
01:13:26 | rayman22201 | yup. exactly what nim does |
01:13:39 | rayman22201 | sigh... Nim offers waaayyy better ergonomics than Rust |
01:13:40 | leorize | yea, we got that ever since packages testing was brought into CI |
01:13:51 | axion | I'm actually looking forward to Jai though, if it ever comes out of vaporware |
01:14:15 | rayman22201 | axion, for your usecase in particular, I don't blame you. |
01:14:22 | FromDiscord | <Benumbed> Rust makes you scale a concrete wall with rusty nails pointing out at you for their learning curve |
01:14:42 | axion | rayman22201: what do you mean for my usecase? |
01:14:46 | rayman22201 | games |
01:14:46 | leorize | I just dislike their grammar |
01:14:51 | axion | Oh yeah :) |
01:15:00 | FromDiscord | <Benumbed> Still plan on learning more of it one of these days, but Nim is actually pleasant to use most of the time, vs Rust or Go |
01:15:07 | leorize | though I haven't looked at rust for quite sometime |
01:15:17 | FromDiscord | <Benumbed> Also the Nim community is nice, vs Rust, they tended toward the rabid side |
01:15:24 | FromDiscord | <Benumbed> and Go people and their idoms... |
01:15:26 | FromDiscord | <Benumbed> lord |
01:15:47 | FromGitter | <zetashift> I think that kind of happens when a community get's too big for it's own good |
01:15:51 | * | rnrwashere quit (Remote host closed the connection) |
01:16:09 | leorize | once Nim is big enough you'll see that kind of things too |
01:16:09 | FromDiscord | <Benumbed> agreed |
01:16:20 | FromDiscord | <Benumbed> Which is why I'm ok that it's small right now! 😄 |
01:16:24 | FromGitter | <zetashift> haha |
01:16:32 | rayman22201 | Dr. Nim + arc gives Nim equivalent guarantees as Rust (arguably the potential to have even better guarantees.) |
01:16:55 | FromDiscord | <Benumbed> and why I'm trying to contribute by writing useful libraries, even if I'm slow as hell at it atm |
01:16:57 | FromGitter | <zetashift> I hope they document those stuff for beginners. One thing Rust did really well is their book |
01:17:04 | axion | What is Dr. Nim, and what is CFG? I've seen both mentioned here this week a lot but I am clueless :) |
01:17:21 | rayman22201 | https://github.com/nim-lang/Nim/blob/version-1-0/lib/core/macros.nim#L507 |
01:17:25 | FromGitter | <zetashift> book/documentation they made the entry really low even tho it's such a hard to learn language |
01:17:33 | rayman22201 | Dr. Nim is embedding a proof checker into Nim |
01:17:39 | rayman22201 | Ada Spark style |
01:17:45 | leorize | axion: CFG is control flow graph |
01:17:57 | FromGitter | <zetashift> Using Z3 |
01:18:18 | FromGitter | <zetashift> whoops forgot this: https://github.com/Z3Prover/z3 |
01:18:22 | axion | Ah yeah. I had to use z3 to solve a really complex control flow graph in my game engine. Good stuff |
01:18:55 | leorize | the compiler also got itself a CFG for destructors injection |
01:18:57 | FromGitter | <zetashift> I think it used Zevv's z3 bindings as a base? |
01:19:10 | leorize | though it's not used anywhere else yet |
01:19:24 | leorize | maybe we can finally fix `not nil` with it :P |
01:19:43 | leorize | @zetashift: yea |
01:19:43 | rayman22201 | CFG can also be used to optimize async :-) |
01:20:49 | FromGitter | <zetashift> Is DrNim slated for 1.2? |
01:23:36 | rayman22201 | not sure |
01:25:55 | FromGitter | <zetashift> Oh well I'm looking forward to it |
01:26:03 | FromGitter | <zetashift> Goodnight y'all |
01:27:27 | * | chemist69 quit (Ping timeout: 252 seconds) |
01:27:29 | rayman22201 | gn o/ |
01:27:38 | axion | rayman22201: Quick question. With your playground code, how come I'm not allowed to do `Quat.genAccessors(w, 0)` ? |
01:28:12 | rayman22201 | Quat is a type. UFC syntax doesn't work on types |
01:28:23 | axion | Ah ok |
01:28:25 | rayman22201 | a `typedesc` |
01:29:26 | * | chemist69 joined #nim |
01:32:55 | leorize[m] | rayman22201: ufcs does work on typedesc |
01:33:18 | rayman22201 | oh? then why doesn't axion's example work? |
01:33:38 | leorize[m] | someone even used that to simulate python's forced module qualifier in Nim |
01:34:13 | * | rnrwashere joined #nim |
01:34:19 | rayman22201 | actually, you are totally right. I just tried it, and it works |
01:35:06 | rayman22201 | @axion. what error do you get? |
01:35:15 | rayman22201 | https://play.nim-lang.org/#ix=2gb0 |
01:36:36 | leorize | the issue you might be facing is how untyped param don't bind too well with UFCS |
01:38:23 | rayman22201 | It's a template though, it's all untyped? |
01:38:44 | axion | error| cannot use symbol of kind 'type' as a 'param' |
01:41:17 | rayman22201 | axion. see my nim playground link. It works there. |
01:41:32 | axion | yeah i'm trying to find a repro. it doesnt in my code |
01:41:34 | axion | one sec |
01:42:54 | axion | Oh I see |
01:43:38 | axion | https://play.nim-lang.org/#ix=2gb4 |
01:43:59 | axion | I changed `q` to `t` since it isn't specific to Quat now. Non-ucs works, but not ucs |
01:44:48 | FromDiscord | <Rika> you're getting symbol collision i think |
01:45:00 | axion | But only with UCS. weird |
01:45:12 | FromDiscord | <Rika> yeah works when you rename t to ty |
01:45:38 | axion | also works if for the below 3 calls using `t`, just not ucs |
01:46:14 | rayman22201 | oh yeah, in templates, it will replace the param everywhere. so "proc(t:t)" expands to "proc(Quat: Quat)" |
01:46:19 | rayman22201 | probably not what you want |
01:47:21 | axion | Yeah I wasn't going to stay with it. Was just trying to figure out why it only doesnt work with UCS |
01:47:43 | axion | tbh I'm going to convert this into a real macro anyway so I can iterate over a string of characters instead of having many calls |
01:49:55 | FromDiscord | <Varriount> Araq: Regarding macros for types, it's a shame the macro can't emit other data, like procedure implementations |
01:54:14 | * | lritter quit (Ping timeout: 256 seconds) |
01:55:00 | * | lritter joined #nim |
01:58:47 | * | sleepyqt_ quit (Ping timeout: 260 seconds) |
02:03:59 | axion | How do I write a macro with `quote do` inside a for loop to generate N forms? |
02:04:22 | axion | Struggling to get it to emit any code here... |
02:17:03 | * | silvernode quit (Ping timeout: 265 seconds) |
02:18:21 | * | hax-scramper quit (Ping timeout: 258 seconds) |
02:20:31 | rayman22201 | stupid example but here: https://play.nim-lang.org/#ix=2gba |
02:22:07 | * | Asgaroth_ joined #nim |
02:22:43 | axion | Thanks |
02:25:23 | * | Asgaroth quit (Ping timeout: 260 seconds) |
02:26:41 | axion | What's wrong here? https://play.nim-lang.org/#ix=2gbb |
02:32:39 | * | endragor joined #nim |
02:33:31 | rayman22201 | a is a runtime string. |
02:33:33 | rayman22201 | https://play.nim-lang.org/#ix=2gbe |
02:33:47 | rayman22201 | that works, though might not do what you expect. (It prints the individual chars) |
02:34:49 | axion | Aha, so it has to be annotated as static. That is the answer to an hour of trying to emit _something_. |
02:39:59 | * | muffindrake quit (Ping timeout: 272 seconds) |
02:41:37 | * | muffindrake joined #nim |
02:42:40 | rayman22201 | Glad I could help. |
02:43:07 | axion | Thank you for all your help today :) |
02:43:12 | rayman22201 | Static in macros is not the best documented feature... |
02:43:21 | rayman22201 | Np 😊 |
02:44:16 | axion | It's unintuitive behavior like this that has caused me to struggle with macros coming from Lisp where I am very familiar with them |
02:44:36 | axion | Like, why not produce any output at all if it's not static? A warning would suffice at least |
02:45:55 | Yardanico | dom96: sorry for pinging, but really want to know if there's any ETA to then next nimforum update will be rolled out? AFAIK the forum still runs the (frontend) version compiled in 2018, not sure about backend |
02:46:04 | Yardanico | s/then/the |
02:47:43 | rayman22201 | It's hard to tell if there is no output in the general case. The problem is that the macro took your runtime string just fine. It treaded it as a typed ast node with a len of 0. So the for loop "worked". It just had 0 iterations. |
02:47:57 | rayman22201 | Treated* |
02:48:29 | axion | I see. It seems this structure won't work for what I need it for anyway |
02:48:45 | axion | I'd like to produce proc definitions |
02:49:34 | rayman22201 | you just make your result node a nnkstatementlist, and add the list of proc definitions. |
02:50:19 | * | lritter quit (Ping timeout: 256 seconds) |
02:50:37 | axion | I tried that |
02:50:58 | * | rnrwashere quit (Remote host closed the connection) |
02:52:35 | rayman22201 | If you remember that crazy macro I showed you for lifting bool procs, I do exactly this: https://gist.github.com/rayman22201/bfc4ce11fa15e57176130c4855407199#file-liftboolprocs-nim-L137 |
02:52:58 | rayman22201 | well, it makes macros, not procs, but there is no difference really. (Just the ast node type) |
02:53:29 | axion | https://play.nim-lang.org/#ix=2gbl |
02:53:48 | * | thomasross is now known as Guest52070 |
02:53:48 | * | thomasross_ joined #nim |
02:53:48 | * | Guest52070 quit (Killed (livingstone.freenode.net (Nickname regained by services))) |
02:53:48 | * | thomasross_ is now known as thomasross |
02:53:56 | rayman22201 | off topic. I know how to get rid of the experimental thing now. (I know how to use typedescs better.) But I don't want to spend more time on it :-P |
02:54:10 | axion | That's ok :) |
02:55:11 | rayman22201 | https://play.nim-lang.org/#ix=2gbm |
02:55:15 | rayman22201 | You don't need `ident` |
02:55:43 | axion | without it i got Error: identifier expected, but found '"x"' |
02:56:30 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
02:56:38 | rayman22201 | oh, hold on. |
02:56:40 | rayman22201 | easy fix |
02:59:03 | rayman22201 | https://play.nim-lang.org/#ix=2gbn |
02:59:12 | rayman22201 | two things. 1. you need static again |
02:59:22 | rayman22201 | 2. you can't call ident inside quote do |
02:59:56 | axion | let's see if i can beat myself to death with static today |
03:00:17 | leorize | that's a lot of statics :P |
03:00:20 | rayman22201 | lol. I can see why it's not intuitive for a lisper :-P |
03:00:23 | * | hax-scramper joined #nim |
03:00:33 | axion | Well thanks. That should be enough to get me going |
03:00:57 | rayman22201 | np 🚀 |
03:03:24 | axion | The most confusing thing for a lisper is that ` means quasiquote in Lisp, whereas ` is "unquote" within the quasiquote form quote do :) |
03:03:31 | axion | I keep getting tripped up by that |
03:04:41 | rayman22201 | it's inverted? interesting. |
03:04:51 | axion | `(1 2 ,(+ 1 2)) ; => (1 2 3) |
03:05:05 | axion | comma is the unquote in lisp |
03:05:24 | rayman22201 | that makes some elisp code I was looking at make more sense now lol |
03:07:31 | rayman22201 | unfortunately Nim's quasiquote is a little less ergonomic. You can only embed variables, not full expressions. But it forces you to name unquoted things, so arguably an ok tradeoff. |
03:08:34 | FromDiscord | <Rika> some of us bullshit our variable names though... |
03:08:36 | axion | It's also inverted in the fact that macros are unhygeinic by default, whereas in Nim you supply the inject pragma to make it unhygeinic |
03:08:43 | FromDiscord | <Rika> < - - - - - - |
03:08:49 | axion | in Lisp, you manually gensym what you want |
03:09:03 | FromDiscord | <Rika> i think thats a good thing |
03:09:07 | rayman22201 | that is definitely a good thing imo |
03:09:12 | axion | It is |
03:09:27 | rayman22201 | isn't that schemes whole schtick? hygenic macros? |
03:09:46 | rayman22201 | the common lisp vs. scheme split |
03:09:46 | axion | Yes. I dislike it very much for that reason and more |
03:10:00 | FromDiscord | <Rika> it -> scheme? |
03:10:11 | FromDiscord | <Rika> why dont you like hygienic macros? |
03:10:14 | * | rnrwashere joined #nim |
03:10:42 | axion | Yes, I don't like Scheme. When I say "Lisp" I mean Common Lisp. |
03:10:55 | axion | Scheme is pretty much an entirely different language for a lot of reasons |
03:11:10 | axion | Elisp is closer to CL than Scheme by far |
03:12:13 | axion | I don't like them because they don't allow for very expressive code, and syntax-case etc make "safe" macros very hard to write comparatively speaking |
03:13:21 | axion | rayman22201: Part of it. The bigger reason is the Lisp-1vs Lisp-2 case |
03:14:51 | axion | Lisp-2 means that functions and variables live in a different namespace. In Scheme, you can't use the name of an existing function, user-defined or builtin, as a variable, so it forces you to think and is the source of a lot of bugs...also not very expressive. |
03:15:00 | axion | So Scheme, is a Lisp-1 |
03:15:53 | FromDiscord | <Rika> sounds like ass |
03:16:07 | axion | In Common Lisp, symbols are actually objects that include a variable binding and function binding member (amoung other members) |
03:17:53 | axion | and there's full runtime support for querying all the different information about a symbol, such as applying its currently bound function to something, or getting it's string name, etc. The whole language is sort of designed to be as useful for code generation as it is for runtime manipulation of the language. |
03:21:17 | axion | CL is a very interesting language. I used it for so long because of the extensive introspection support like this, which comes in handy when modifying a game as it's running without stopping to recompile. Anyway, enough off-topic for that tangent :) |
03:28:08 | axion | I really like Nim and I'm trying to forget about CL :) I haven't actually used an Algol derivitive before, unless you count a brief Python experience some 20 years ago or so |
03:31:18 | FromDiscord | <Rika> is nim an algol derivative? |
03:33:31 | axion | Yes |
03:33:55 | * | thomasross quit (Remote host closed the connection) |
03:34:13 | * | thomasross joined #nim |
03:37:21 | axion | http://blog.daveastels.com.s3-website-us-west-2.amazonaws.com/images/languages/PLchart.png |
03:37:24 | FromDiscord | <Yardanico> @Rika https://en.wikipedia.org/wiki/Generational_list_of_programming_languages#ALGOL_based |
03:37:24 | FromDiscord | <Yardanico> https://cdn.discordapp.com/attachments/371759389889003532/694752249049776259/2020-04-01-06-37-06_grim.png |
03:37:57 | axion | Nim would be somewhere far to the right within the huge cluster of Algol derivatives |
03:45:15 | FromDiscord | <Rika> Huh, does nim share a lot with Oberon? Or is there a different way of measuring if something is under another language |
03:49:27 | leorize | iirc 4raq say that Nim have a lot more in common with modula 3 |
03:53:34 | * | Asgaroth_ quit (Ping timeout: 256 seconds) |
03:53:46 | rayman22201 | Yeah. Iirc 4raq's idea was to try and bring a lisp like macro system to modula. Something like that. |
03:57:16 | axion | How do I make an identifier `foo=` to be used as a proc name, given an existing ident foo? |
03:57:28 | FromDiscord | <Rika> In quote do? |
03:57:28 | * | rnrwashere quit (Remote host closed the connection) |
03:57:57 | FromDiscord | <Rika> You need to make an accquoted nimnode I think, then use that in quote do |
03:58:41 | axion | trying to fix the second proc in test2: https://play.nim-lang.org/#ix=2gbz |
04:01:06 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=2gbA |
04:01:20 | FromDiscord | <Rika> ah wait, made a mistake |
04:03:18 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=2gbB |
04:03:23 | FromDiscord | <Rika> axion ^ |
04:03:44 | axion | ah a new node type to look up. Thanks :) |
04:04:16 | * | rnrwashere joined #nim |
04:05:17 | * | narimiran joined #nim |
04:10:24 | axion | What are the [] and []= names even called btw? I'm writing a new proc and need to name that ident something better than what i have? |
04:12:26 | FromDiscord | <Rika> id just call them bracket getters and setters |
04:14:48 | * | moerm joined #nim |
04:15:16 | axion | ok |
04:17:23 | * | opal quit (Ping timeout: 240 seconds) |
04:17:53 | * | moerm quit (Client Quit) |
04:20:37 | * | opal joined #nim |
04:20:47 | axion | well my first non-trivial macro seems to work. |
04:20:52 | axion | thanks for all the help! |
04:25:32 | * | rockcavera quit (Remote host closed the connection) |
04:30:36 | * | voltist joined #nim |
04:33:08 | * | silvernode joined #nim |
04:37:19 | * | nsf joined #nim |
04:42:03 | axion | @Rika This is what I came up with. I do have 1 question regarding a small change if you can help: https://play.nim-lang.org/#ix=2gbK |
04:44:39 | axion | Or rayman22201 for that matter. I'm pretty close to how I want it |
04:45:55 | * | silvernode quit (Ping timeout: 265 seconds) |
04:46:19 | voltist | Could anyone recommend a Nim image manipulation library? |
04:49:01 | rayman22201 | voltist: https://nimble.directory/search?query=Image |
04:49:42 | rayman22201 | axion: what is your question? |
04:50:23 | * | opal quit (Ping timeout: 240 seconds) |
04:50:46 | axion | rayman22201: For line 37, it would be nice if the high level code didn't see an array of strings. I'd like to somehow modify the macro so the call looks like: genAccessors [x, y] without the stringified items in the caller. I tried a static array of symbols, but the compiler yelled at me and said to use NimNode instead. Tried that, and it errors deep inside the compiler in seminst.nim |
04:53:43 | * | opal joined #nim |
04:57:52 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=2gbT best i could think of, axion |
04:58:35 | voltist | rayman22201: If I wanted a list of image libraries I would have asked for one. I'm wondering if anyone has any recommendations. |
04:59:12 | FromDiscord | <Rika> sorry, got no recommendations |
04:59:26 | FromDiscord | <Rika> only one i used was nimpng but that was more "parsing" than "manip" |
04:59:38 | axion | @Rika tried running it and it errors |
04:59:49 | FromDiscord | <Rika> oh no did i fuck up |
04:59:51 | FromDiscord | <Rika> lets see if i did |
05:00:00 | rayman22201 | Why don't you give some details on what features you actually want? Image library is pretty freaking general |
05:00:07 | rayman22201 | Also don't be an ass hole |
05:00:08 | FromDiscord | <Rika> what errors axion |
05:00:10 | voltist | rayman22201: Sorry, that came out a little harsh. |
05:00:22 | axion | @Rika just click Run :) |
05:00:33 | FromDiscord | <Rika> aw shite |
05:00:36 | FromDiscord | <Rika> ill fix em sorry |
05:00:55 | voltist | I'm looking specifically for a library that has the ability to draw text onto an image |
05:01:23 | * | opal quit (Ping timeout: 240 seconds) |
05:02:21 | FromDiscord | <Rika> OH i missed one of the calls, axion, do you mind "Quat.genAccessors(w, x, y, z)" instead of the bracketed one |
05:03:11 | axion | Can I call it like `Quat.genAccessors w, x, y, z` without the parens? |
05:03:22 | FromDiscord | <Rika> dont know, i think you can |
05:03:30 | FromDiscord | <Rika> testing right now |
05:03:47 | axion | That's what I'm looking for. I'm being anal because this macro is practice for an unrelated DSL i eventually want to write |
05:03:52 | FromDiscord | <Rika> yeah you can |
05:04:02 | axion | brackets don't matter then |
05:04:20 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=2gbV |
05:05:28 | axion | What did you change besides the signature? |
05:05:33 | rayman22201 | Sorry, on mobile. @voltist, I think this wrapper might be the best we have. Nothing native unfortunately GitHub - zedeus/nimagemagick: ImageMagick wrapper for Nim (MagickCore/MagickWand) (https://github.com/zedeus/nimagemagick) |
05:06:32 | axion | Oh I see. the $ for idents |
05:06:36 | FromDiscord | <Rika> yeah |
05:06:39 | axion | Thanks. exactly what i was looking for |
05:06:48 | zedeus | nimagemagick is an outdated wrapper, this native one is great https://github.com/SolitudeSF/imageman |
05:08:04 | voltist | rayman22201: Ah well, even if it where an updated library, I may as well just go for a python library that can do what I need rather than implementing the image processing myself. |
05:08:13 | axion | oh very nice. starred |
05:09:27 | voltist | rayman22201: Thanks for the help though. Sorry again for being harsh just earlier, I don't know what came over me. |
05:12:11 | rayman22201 | NP. All good. Sorry we couldn't be more helpful 👍 |
05:13:05 | zedeus | voltist: maybe combining imageman/flippy and this? https://github.com/treeform/typography |
05:13:16 | axion | Thanks for the macro help everyone. Really appreciate it. I got a decent amount done today. Will finish tomorrow. o/ |
05:13:54 | * | opal joined #nim |
05:14:28 | voltist | zedeus: I'll have a look at that for future consideration. Right now I'm just going to pass all this data to Python's matplotlib instead of making my own raster plots |
05:15:08 | rayman22201 | Oh, we have ggplot |
05:15:29 | zedeus | maybe consider this https://github.com/Vindaar/ggplotnim |
05:15:38 | rayman22201 | https://github.com/Vindaar/ggplotnim/blob/master/README.org |
05:15:49 | rayman22201 | Sniped again lol |
05:18:19 | voltist | rayman22201: Yeah I saw that, but I'm trying to make a very niche type of raster plot for use in neuroscience research which is already supported by matplotlib, so I may as well use it |
05:19:27 | rayman22201 | Fair enough |
05:31:19 | * | dddddd quit (Ping timeout: 250 seconds) |
05:31:43 | * | opal quit (Ping timeout: 240 seconds) |
05:34:59 | * | opal joined #nim |
05:35:16 | * | rnrwashere quit (Remote host closed the connection) |
06:19:54 | * | voltist quit (Quit: Leaving) |
06:25:06 | * | rnrwashere joined #nim |
06:27:52 | * | solitudesf joined #nim |
06:44:49 | * | PMunch joined #nim |
06:50:58 | FromDiscord | <Varriount> Hrm, this is an interesting PR - https://github.com/nim-lang/Nim/pull/13813 |
06:53:48 | FromDiscord | <Varriount> I'm not entirely comfortable with how we keep adding bits and pieces to the VM's available procedures... But I don't know of a good alternative |
06:54:00 | * | deepend_ joined #nim |
06:54:58 | * | deepend quit (Ping timeout: 265 seconds) |
06:56:54 | * | aEverr quit (Ping timeout: 240 seconds) |
06:57:49 | * | aEverr joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:05:03 | * | gmpreussner joined #nim |
07:11:23 | axion | @Variount you on mumble? |
07:12:03 | axion | @Varriount * |
07:20:26 | * | liblq-dev joined #nim |
07:22:29 | * | rnrwashere quit (Remote host closed the connection) |
07:23:42 | FromDiscord | <Varriount> Axion: I can get on |
07:36:59 | FromGitter | <Vindaar> @voltist: not sure if you're still around, but I just saw your posts and did this: https://gist.github.com/Vindaar/9c32c0676ffddec9078e4c0917861fcd |
07:37:08 | * | sagax quit (Remote host closed the connection) |
07:45:20 | * | jjido joined #nim |
07:47:47 | * | sagax joined #nim |
07:51:32 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:54:47 | * | jjido joined #nim |
08:05:08 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:08:11 | Yardanico | Finally a worthy first April's joke knome.org |
08:08:57 | * | kenran joined #nim |
08:09:13 | * | kenran quit (Client Quit) |
08:09:34 | * | natrys joined #nim |
08:10:07 | * | kenran joined #nim |
08:21:57 | madprops | something weird happened today. apparently compiling a binary using a specific version of glibc, won't work on systems with an older version of glibc .. which kinda defeats the point of a compiled program |
08:28:49 | PMunch | Yardanico, haha that's nice |
08:39:49 | * | hax-scramper quit (Ping timeout: 264 seconds) |
08:40:11 | livcd | madprops: Nim program? |
08:40:13 | * | fanta1 joined #nim |
08:43:49 | madprops | yeah |
08:43:49 | * | zslkhmctpfr is now known as cfhklmprstz |
08:45:28 | livcd | madprops: Could you do this? https://scripter.co/nim-deploying-static-binaries/ |
08:46:52 | * | hax-scramper joined #nim |
08:52:29 | madprops | i migh try that, thanks livcd |
08:57:25 | * | dadada joined #nim |
08:57:49 | * | dadada is now known as Guest16200 |
08:58:49 | livcd | thanks kaushalmodi :-) |
09:01:23 | * | dwdv joined #nim |
09:02:40 | * | hax-scramper quit (Read error: Connection reset by peer) |
09:03:50 | * | hax-scramper joined #nim |
09:05:15 | * | Vladar joined #nim |
09:06:47 | * | rmt joined #nim |
09:06:53 | FromDiscord | <Recruit_main707> this guy... XD https://github.com/oakes/vim_cubed |
09:08:17 | * | hax-scramper quit (Ping timeout: 256 seconds) |
09:08:39 | rmt | embeddable vim for games .. I like it! :) |
09:08:54 | rmt | Or boss mode. :) |
09:10:00 | * | JustASlacker joined #nim |
09:10:07 | * | hax-scramper joined #nim |
09:12:35 | dom96 | Yardanico: new nimforum will be rolled out when I get the time and will to look at a bug that the new categories have |
09:12:44 | dom96 | (and fix it of course) |
09:18:15 | PMunch | Recruit_main707, maybe that's how I should stream my coding |
09:18:36 | FromDiscord | <Recruit_main707> probably ngl |
09:18:59 | PMunch | I like the README as well, "How do I stop the cube from spinning?" "No" |
09:20:17 | skrylar[m] | so i saw we have an experimental option to make macros that override for loops |
09:20:27 | skrylar[m] | and remembered people were asking about tqdm clones |
09:21:41 | PMunch | Macros that override for loops? |
09:22:05 | PMunch | This paravim stuff is actually pretty neat |
09:23:03 | * | rnrwashere joined #nim |
09:26:06 | * | abm joined #nim |
09:26:55 | federico3 | https://lemire.me/blog/2020/03/31/we-released-simdjson-0-3-the-fastest-json-parser-in-the-world-is-even-better/ we need a fast parser like this in Nim |
09:27:43 | * | rnrwashere quit (Ping timeout: 260 seconds) |
09:27:46 | FromDiscord | <Recruit_main707> lets just wrap this one :smart: |
09:28:02 | * | chemist69 quit (Ping timeout: 246 seconds) |
09:28:07 | * | solitudesf quit (Ping timeout: 256 seconds) |
09:29:14 | * | chemist69 joined #nim |
09:33:05 | skrylar[m] | @PMunch https://nim-lang.org/docs/manual.html#macros-for-loop-macro looks almost made for tqdm lol |
09:37:48 | PMunch | Huh, that is actually pretty cool |
09:38:11 | PMunch | Not 100% sure what it offers over just an iterator though.. |
09:38:22 | PMunch | Short of allowing some optimisations |
09:42:43 | * | Guest16200 is now known as dadada |
09:44:19 | skrylar[m] | eeh well tqdm is a python package that wraps over an iterator to automatically do a progress bar for it |
09:44:35 | dadada | with experimental dotOperators you can't use macros as I noticed while testing https://play.nim-lang.org/#ix=2gdf |
09:45:07 | skrylar[m] | basically sugar over having to make the prog bar and update it in a loop, you just `for x in tqdm(whatever you were already looping)` |
09:46:00 | dadada | I had an idea in mind that's not possible with this limitation, wanted to build a special wrapper using this method |
09:51:24 | * | NimBot joined #nim |
09:51:36 | skrylar[m] | altho if tqdm can't figure out what the length is it just makes it an indeterminate progress bar (still counts iterations per minute) |
09:54:10 | * | Mister_Magister joined #nim |
09:54:25 | PMunch | Sorry for not streaming yesterday by the way.. I procrastinated shovelling snow, and when I finally did it and was done with it it had gotten a bit late.. |
09:57:03 | FromDiscord | <Varriount> It's fine. I was busy pretty much all day |
09:58:41 | dadada | Araq: would it be possible to add support for macros to work with dotOperators? the thing I've in mind is creating a wrapperobject that uses this to automatically forward all dot operator operations to the wrapped object |
09:58:58 | * | couven92 joined #nim |
09:59:05 | Araq | I don't know |
09:59:36 | dadada | fiar |
09:59:39 | dadada | fair |
09:59:40 | Araq | explain the issue in an issue |
10:00:01 | Araq | or maybe even in an RFC |
10:09:47 | * | wgetch joined #nim |
10:11:15 | * | hax-scramper quit (Ping timeout: 250 seconds) |
10:18:35 | * | JustASlacker quit (Ping timeout: 260 seconds) |
10:27:12 | PMunch | Well I mean this works dadada: https://play.nim-lang.org/#ix=2gdp |
10:27:55 | PMunch | I think this might be a regression TBH |
10:28:01 | PMunch | I could have sworn that this used to work.. |
10:28:34 | PMunch | Hmm, maybe not |
10:28:38 | PMunch | Tried with an older version |
10:30:11 | dadada | PMunch: what do you mean? the example 2gdp seems to work, right? Maybe my example is just buggy? |
10:30:46 | PMunch | Yeah, that works, but try to add a `.` proc that takes a Test and any other type |
10:31:43 | dadada | yeah, then I get undeclared identifier y/x |
10:34:11 | * | cfhklmprstz is now known as qwertfisch |
10:34:15 | dadada | so the issue is that proc`.` prevents from macro`.` from being considered somewhere in the resolution process |
10:35:37 | PMunch | Yeah |
10:35:44 | PMunch | Which I think is a bug |
10:36:28 | dadada | me too :-) |
10:41:20 | FromGitter | <Vindaar> just doing some pandas comparisons over here |
10:41:30 | FromGitter | <Vindaar> (https://files.gitter.im/nim-lang/Nim/rJmQ/bench_create_column_openmp.png) |
10:41:57 | FromGitter | <Vindaar> ugh, forgot to give that a white background |
10:42:26 | FromDiscord | <Rika> hard to read indeed |
10:44:45 | FromGitter | <Vindaar> (https://files.gitter.im/nim-lang/Nim/F4Ng/bench_create_column_openmp.png) |
10:45:00 | FromDiscord | <Recruit_main707> when are wikipedia stats updated? |
10:45:01 | FromGitter | <gogolxdong> How to append sequence safely from threads? |
10:45:36 | FromDiscord | <Recruit_main707> Viddaar: is that logaritmic scale? |
10:45:48 | stefantalpalaru | Is there a way to access all the C compiler options passed to {.passc: .} from Nim code? |
10:46:00 | FromDiscord | <Rika> please choose more distinct colors 😦 |
10:47:32 | FromGitter | <Vindaar> @Recruit_main707: yup. x axis is 10^label in column size. y is obviously logarithmic |
10:47:45 | Araq | gogolxdong: you need a 'SharedSeq' |
10:48:13 | FromGitter | <Vindaar> if it wasn't clear "pd_" are pandas benchmarks, "df_" my own |
10:48:17 | FromGitter | <gogolxdong> What's that , how to make it? |
10:54:58 | * | sleepyqt_ joined #nim |
10:56:08 | * | silvernode joined #nim |
10:56:41 | Araq | gogolxdong: can you use --gc:arc already? |
10:56:42 | * | hax-scramper joined #nim |
10:58:52 | * | JustASlacker joined #nim |
10:59:56 | FromDiscord | <HutchyBen> Im looking to learn nim what kind of programs does it specialize at making |
11:00:21 | FromDiscord | <Recruit_main707> what would you like to do? |
11:00:29 | FromDiscord | <Rika> its pretty general |
11:00:29 | FromDiscord | <Recruit_main707> nim can do pretty much anything |
11:00:42 | FromDiscord | <HutchyBen> oh nice |
11:00:56 | FromDiscord | <Recruit_main707> if C can, Nim can, (with more or less effort) |
11:01:14 | FromDiscord | <HutchyBen> and c can do almost anything so cool |
11:01:45 | PMunch | And if JS can, Nim can as well |
11:01:57 | PMunch | So you should be set to create pretty much anything |
11:01:59 | FromDiscord | <Recruit_main707> true |
11:02:39 | FromDiscord | <Recruit_main707> would the js backend be deprecated if a wasm one was ever created? |
11:03:09 | FromDiscord | <Rika> likely not |
11:03:16 | FromDiscord | <Rika> is wasm useful for nodejs |
11:03:33 | FromDiscord | <Recruit_main707> idk XD |
11:07:37 | FromGitter | <lxdong007> not sure about CMP, I am working on another project. |
11:09:20 | PMunch | HutchyBen, where did you hear of Nim since you wanted to try it by the way? |
11:09:24 | PMunch | Just out of curiosity :) |
11:11:06 | FromGitter | <lxdong007> I was about to ask, I noticed there is a shared heap together with arc, I think it's possible to access global varibale from threads with arc. And yes I am using arc. The project I posted is working with arc. |
11:11:54 | PMunch | Yes, using a shared heap and global variables should be possible with ARC |
11:18:59 | FromGitter | <lxdong007> Is shared heap state of art usage of arc? Is there any example? |
11:19:20 | FromGitter | <alehander92> https://news.ycombinator.com/item?id=22743267 |
11:19:35 | FromGitter | <alehander92> nim on hacker news |
11:23:48 | PMunch | Haha, didn't realise that repo has so many funny issues as well |
11:24:10 | go|dfish | it was #1 on r/programming for most of yesterday too |
11:24:54 | FromDiscord | <Rika> its great though |
11:25:18 | PMunch | What, vim3? |
11:27:17 | FromDiscord | <HutchyBen> im trying to set ip vim3 |
11:27:39 | FromDiscord | <HutchyBen> it cant recognise a dll tho >.< |
11:28:12 | FromGitter | <alehander92> rayman22201 |
11:28:20 | FromGitter | <alehander92> do you plan on providing async executors |
11:28:28 | FromGitter | <alehander92> if you guys make an async with state machines |
11:28:57 | livcd | i tried to compile parsetoml with arc :-[ |
11:28:59 | livcd | no luck |
11:29:17 | FromGitter | <alehander92> like i dont understand them very well, but i think i would love to have custom async engines |
11:29:29 | FromGitter | <alehander92> so one can like customize how async is running for its domain/app |
11:29:36 | FromGitter | <alehander92> e.g. https://os.phil-opp.com/async-await/#cooperative-multitasking-1 |
11:30:05 | FromGitter | <alehander92> (and a custom executor if i am understanding corretly) |
11:31:25 | PMunch | HutchyBen, what dll? |
11:31:35 | PMunch | livcd, :( what went wrong with it? |
11:32:19 | liblq-dev | PMunch, @HutchyBen it's vim³™, not any ordinary vim3 |
11:32:39 | PMunch | Vim³, happy? |
11:32:44 | FromGitter | <alehander92> https://blog.yoshuawuyts.com/state-machines/ |
11:32:56 | FromGitter | <alehander92> araq do you mean this for typestate in rust |
11:32:58 | PMunch | Just forgot how to type ³ on this layout |
11:33:19 | FromGitter | <alehander92> i imagine you can do it with `requires` |
11:33:26 | FromGitter | <alehander92> but no overloading on requires |
11:33:47 | FromGitter | <alehander92> i imagined before that one can overload using annotation like that but probably too confusing |
11:33:55 | FromDiscord | <Recruit_main707> .b and .a were the equivalent to [0] and [1]? |
11:34:00 | FromGitter | <alehander92> and requiring z3 support always |
11:35:11 | PMunch | @HutchyBen, in case it didn't highlight you before: What dll is the issue? |
11:36:35 | FromGitter | <alehander92> https://github.com/oakes/vim_cubed/issues/22 |
11:36:38 | FromGitter | <alehander92> i think this one |
11:37:22 | * | tane joined #nim |
11:39:43 | FromDiscord | <Recruit_main707> this code doesnt compile on 1.1.1 https://play.nim-lang.org/#ix=2gdG |
11:39:44 | PMunch | Yeah I realised |
11:40:36 | FromDiscord | <Recruit_main707> its an issue with the pair.a and pair.b thing |
11:40:42 | FromDiscord | <Recruit_main707> has it been changed? |
11:41:09 | FromDiscord | <Recruit_main707> (note that someone gave me this code) |
11:41:54 | * | silvernode quit (Ping timeout: 240 seconds) |
11:44:14 | PMunch | Run likes a charm on Linux this vim³ thing :( |
11:44:16 | PMunch | :)* |
11:46:12 | PMunch | I like the description in the .nimble file. Vim for masochists |
11:51:14 | livcd | PMunch: something with deep copy :O |
11:51:23 | livcd | PMunch: sorry I have not really investigated more as I did not need arc |
11:51:39 | jken | That forum post about rewriting in python got me :D |
11:52:04 | * | hax-scramper quit (Ping timeout: 256 seconds) |
11:52:31 | * | couven92 quit (Read error: Connection reset by peer) |
11:52:36 | PMunch | jken, link? |
11:52:55 | * | couven92 joined #nim |
11:53:04 | jken | https://forum.nim-lang.org/t/6136 |
11:55:10 | PMunch | Oh man |
11:55:31 | PMunch | Throwing shade on Python/C hybrid projects as well, nice :P |
12:02:58 | * | rokups joined #nim |
12:04:11 | * | vycb[m] joined #nim |
12:05:04 | * | hax-scramper joined #nim |
12:08:35 | FromDiscord | <djazz> I for one welcome our (C)Python overlords! |
12:12:20 | * | Vladar quit (Quit: Leaving) |
12:14:49 | FromDiscord | <Recruit_main707> this almost got me lol. |
12:14:51 | FromDiscord | <Recruit_main707> i was like, wtf have they done! |
12:15:06 | PMunch | Haha :P |
12:15:22 | narimiran | :) |
12:16:21 | Araq | XD |
12:16:44 | Araq | and I thought I could have been more subtle |
12:17:25 | federico3 | Araq: perhaps by suggesting pypy |
12:17:54 | * | dddddd joined #nim |
12:23:04 | * | dadada quit (Ping timeout: 256 seconds) |
12:24:24 | * | rockcavera joined #nim |
12:24:34 | dom96 | finally an april fool's joke |
12:24:39 | * | dadada joined #nim |
12:24:40 | dom96 | took us long enough :) |
12:24:59 | FromDiscord | <Recruit_main707> have yall searched Bing in Google yet? |
12:25:03 | * | dadada is now known as Guest5205 |
12:26:40 | dom96 | narimiran, your tweet could have been much shorter and much more click baity |
12:26:54 | dom96 | "Big announcement: we're rewriting Nim in Python" |
12:27:03 | PMunch | What does "./koch boot -d:release" actually do? |
12:27:19 | narimiran | dom96: eh, probably, but i find that too click-baity and less-believeable |
12:27:43 | PMunch | Recruit_main707, anything supposed to happen? |
12:27:46 | narimiran | PMunch: is this a start of some joke? |
12:27:51 | PMunch | Haha, nope |
12:28:13 | PMunch | Someone on HN asked how fast Nim was at compiling |
12:28:18 | FromDiscord | <Recruit_main707> PMuch: internet prank to google |
12:28:23 | PMunch | I thought I'd cite him how fast it compiled Nim |
12:28:48 | narimiran | PMunch: it bootstraps the compiler, but it takes several iterations to do that |
12:28:59 | narimiran | maybe `koch temp` would be better to use as an example? |
12:29:27 | dom96 | narimiran, it's just the tweet doesn't even say that Nim will be rewritten in Python |
12:29:37 | dom96 | the forum thread even says that |
12:30:25 | PMunch | narimiran, yeah that's what I was wondering |
12:33:19 | * | krux02_ is now known as krux02 |
12:34:06 | FromGitter | <alehander92> i honestly often do nim -d:release compiler/nim.nim |
12:34:10 | FromGitter | <alehander92> with some other flags |
12:38:36 | Araq | IMHO 'koch boot' should now default to -d:release |
12:39:32 | * | rockcavera quit (Remote host closed the connection) |
12:39:32 | Araq | I use 'koch temp' when I'm after stack traces |
12:45:34 | FromDiscord | <Recruit_main707> so koch is used to build your local nim compiler in case you edit it? |
12:50:42 | * | nsf quit (Quit: WeeChat 2.7) |
13:08:11 | * | waleee-cl joined #nim |
13:08:44 | * | sunwukong joined #nim |
13:11:09 | liblq-dev | am I the only one who strongly prefers `import module for a, b, c` instead of `from module import a, b, c`? |
13:11:26 | liblq-dev | I first saw that in Wren and imo it's a shame that Nim doesn't have a syntax like this |
13:12:37 | liblq-dev | the thing that pisses me off with `from x import y` is that it doesn't line up with other imports |
13:14:00 | FromGitter | <gogolxdong> createShared, resizeShared,freeShared |
13:14:04 | FromDiscord | <mratsim> Python does the same |
13:16:40 | liblq-dev | I have to fix that in rod :P |
13:16:50 | liblq-dev | when I get to imports, of course. |
13:17:11 | liblq-dev | right now I'm burnt out after my battle with generics |
13:19:18 | Araq | liblq-dev: it's a good point, 'from x import y' is inferior |
13:20:08 | liblq-dev | in my eyes it just looks bad next to my other imports |
13:20:19 | liblq-dev | that's why I avoid using it |
13:20:45 | liblq-dev | I can always reference the module explicitly anyways |
13:25:33 | PMunch | liblq-dev, that syntax is actually pretty nice |
13:25:40 | liblq-dev | which one? |
13:26:04 | PMunch | The `import module for a, b, c` |
13:26:27 | * | lritter joined #nim |
13:27:12 | liblq-dev | yeah, and it doesn't waste another keyword, it just reuses `for` |
13:32:42 | * | Vladar joined #nim |
13:40:25 | FromGitter | <alehander92> Araq |
13:40:31 | FromGitter | <alehander92> i am working on the sourcemap PR |
13:40:51 | FromGitter | <alehander92> from an old comment of yours, i see i shouldn't use a command for it (i guess its for when compileOp) |
13:41:06 | FromGitter | <alehander92> it still doesnt make sense to use one right, just a option flag |
13:41:48 | Araq | option flag seems fine or attach it to the existing --debuginfo flag |
13:43:21 | FromGitter | <alehander92> can i reserve a separate sourcemap one? seems useful if we add different options or even different kinds of sourcemaps one day |
13:45:01 | Araq | please don't, the proliferation of flags and options is killing me |
13:46:16 | FromGitter | <alehander92> well then it can be just `--sourcemap:on/off` : if one has a sourcemap for e.g. C<->nim in the future, it can be reused |
13:46:23 | FromGitter | <alehander92> ok |
13:56:18 | PMunch | Hmm, I wonder if I can take an ASCII art generator and feed it Vim³ so I can run it in my terminal.. |
14:02:10 | FromGitter | <alehander92> Araq, one more thing : should it be `sourcemap` `source-map` or `source_map` in options/flag and `Sourcemap` or `SourceMap` in code |
14:04:01 | FromGitter | <alehander92> guys what do you think of https://sulami.github.io/posts/common-lisp-restarts/ |
14:05:42 | FromDiscord | <Kiloneie> why is sleep() an unknown identifier for me ? |
14:06:04 | FromGitter | <alehander92> import os ? |
14:06:10 | FromDiscord | <Kiloneie> ooh |
14:06:15 | FromDiscord | <Kiloneie> ups |
14:06:31 | FromGitter | <alehander92> you're still sleeping :) |
14:06:33 | FromDiscord | <Kiloneie> forgot os is not default imported |
14:06:42 | FromDiscord | <Kiloneie> i thought it was for some reason |
14:06:59 | FromGitter | <alehander92> yeah, you can write your own `common` file |
14:07:05 | FromGitter | <alehander92> to import if you usually use the same imports |
14:07:13 | FromGitter | <alehander92> which exports such imports |
14:07:18 | FromGitter | <alehander92> e.g. `import os ... export os ` |
14:07:48 | FromDiscord | <Kiloneie> nice trick okay |
14:08:01 | FromGitter | <alehander92> i think local people call it prelude |
14:08:07 | FromGitter | <alehander92> e.g. i think karax had it |
14:08:21 | FromGitter | <alehander92> but not sure overally |
14:08:26 | dom96 | Nim has it |
14:08:27 | FromDiscord | <Kiloneie> im just, play 2 games, make a program(which i can then use for my planned playlist of How to X program or something like that...) |
14:08:29 | dom96 | include prelude |
14:08:50 | FromDiscord | <Kiloneie> i think people would like that idk, probably help with some examples for the docs |
14:09:06 | Araq | alehander92: the style says sourceMap |
14:09:09 | FromDiscord | <Kiloneie> which are quite empty in some modules |
14:09:22 | FromGitter | <alehander92> Araq ok, but my question is because |
14:09:32 | FromGitter | <alehander92> all the flags seem to use lowercase |
14:09:37 | FromGitter | <alehander92> e.g. nilcheck |
14:10:02 | FromGitter | <alehander92> nilseqs etc |
14:10:31 | FromGitter | <alehander92> dom96 but import prelude would be better, right |
14:11:06 | FromGitter | <alehander92> as one can just export from prelude: i just try to use `import` if i can, but in this case i agree probably it's ok |
14:11:54 | dom96 | sure, but IIRC you cannot export modules |
14:12:49 | FromGitter | <alehander92> you can |
14:16:46 | * | fanta1 quit (Quit: fanta1) |
14:23:32 | * | endragor quit (Remote host closed the connection) |
14:33:46 | * | solitudesf joined #nim |
14:33:48 | FromGitter | <mratsim> @Araq @Andrewrk: were is the joined April’s Fool? https://github.com/nim-lang/Nim/pull/13757 |
14:33:56 | FromGitter | <mratsim> where* |
14:34:09 | * | dinu99 joined #nim |
14:43:31 | * | endragor joined #nim |
14:48:09 | * | endragor quit (Ping timeout: 265 seconds) |
14:54:18 | * | PMunch quit (Ping timeout: 256 seconds) |
15:01:16 | Yardanico | @mratsim something like "We decided to combine Zig and Nim into one programming language which'll be the best"? |
15:02:33 | FromGitter | <mratsim> called Zim |
15:03:42 | Yardanico | Zim name is already taken :P https://en.wikipedia.org/wiki/Zim_(software) |
15:03:57 | FromGitter | <mratsim> doesn’t matter, Nig is a bit awkward |
15:04:02 | Yardanico | oof |
15:04:04 | FromGitter | <mratsim> and it’s only for a day |
15:04:13 | narimiran | Yardanico: i use Zim, btw |
15:04:31 | FromGitter | <deech> https://animesuperhero.com/wp-content/uploads/2017/04/invader_zim_render_by_neonstartapeinvasion-d9m3yz6.png |
15:05:42 | * | liblq-dev quit (Ping timeout: 256 seconds) |
15:05:59 | FromGitter | <alehander92> dont like 1 april jokes, but i'd like some zig features |
15:06:00 | FromGitter | <alehander92> :D |
15:06:08 | Yardanico | me too *hides* |
15:07:20 | dom96 | Zimrod :D |
15:09:36 | * | PMunch joined #nim |
15:09:59 | * | sentreen_ quit (Read error: Connection reset by peer) |
15:10:43 | * | sentreen_ joined #nim |
15:12:34 | * | SunDwarf quit (Ping timeout: 240 seconds) |
15:12:59 | FromGitter | <alehander92> yardanico dont hide |
15:13:13 | FromGitter | <alehander92> the borders are closed anyway, Araq can't fight us :D |
15:16:36 | * | deepend_ is now known as depepend |
15:16:42 | * | depepend is now known as deepend |
15:17:05 | * | SunDwarf joined #nim |
15:17:23 | FromGitter | <mratsim> Zigrod :p |
15:17:55 | FromGitter | <alehander92> guys |
15:18:01 | FromGitter | <alehander92> do we have nim syntax support in chrome |
15:18:26 | * | Vladar quit (Remote host closed the connection) |
15:18:44 | FromGitter | <alehander92> sorry i got confused , we dont :D |
15:19:41 | Yardanico | wdym in chrome? like an extension? |
15:22:22 | FromGitter | <alehander92> in developer console |
15:27:59 | * | dinu99 quit (Remote host closed the connection) |
15:29:18 | * | filcuc joined #nim |
15:37:23 | FromGitter | <rishavs> How can I add new items to a set? ⏎ ⏎ ``` var walledDoors: set[Directions] ⏎ walledDoors.add(West)``` [https://gitter.im/nim-lang/Nim?at=5e84b533a61b811a4f7528ed] |
15:37:54 | * | kenran quit (Ping timeout: 240 seconds) |
15:38:14 | FromGitter | <Yardanico> maybe you want HashSet, not the built-in "set" type? |
15:38:34 | FromGitter | <Yardanico> check out https://nim-lang.org/docs/sets.html |
15:42:20 | FromGitter | <rishavs> the way the document is written is pretty confusing but I want the mathematical sets, where I only have unique values |
15:42:47 | narimiran | use `incl`, not `add` |
15:42:52 | narimiran | a.k.a. read the docs |
15:43:49 | FromGitter | <rishavs> aye. found it. :D |
15:44:12 | FromGitter | <rishavs> Thanks |
15:44:19 | * | Vladar joined #nim |
15:51:43 | * | JustASlacker quit (Quit: Leaving) |
15:54:01 | * | couven92 quit (Ping timeout: 250 seconds) |
15:54:24 | * | rokups quit (Quit: Connection closed for inactivity) |
15:59:26 | * | sunwukong quit (Quit: Leaving) |
16:02:28 | * | liblq-dev joined #nim |
16:11:08 | rayman22201 | alehander92: just waking up. You pinged me? |
16:12:24 | rayman22201 | We have custom async executors already. We call it "the event loop". See httpbeast for an example of a custom one. |
16:14:47 | FromGitter | <zetashift> Is there a scenario where you would use sets and not HashSets? |
16:15:04 | FromGitter | <zetashift> ah nvm it's right under there, sets are used for bit flags |
16:15:40 | leorize | that's the C FFI use case |
16:15:54 | leorize | though it's used for writing flags in Nim too :P |
16:16:24 | * | abm quit (Quit: Leaving) |
16:28:15 | FromGitter | <zetashift> leorize do you even sleep |
16:28:35 | leorize | maybe :) |
16:32:14 | * | inv2004 joined #nim |
16:33:04 | inv2004 | Hello, are there any way to write in script-style, but with async? |
16:33:21 | leorize | script-style? |
16:33:38 | inv2004 | I mean that I do not want to define main() {.async.}, but still want to use async. |
16:34:02 | leorize | I don't think you should/can |
16:34:10 | leorize | do you have an example usecase in mind? |
16:35:48 | inv2004 | @leorize, it is quite simple - if you use nim like bash - you do not want to define functions without reasons |
16:36:18 | FromGitter | <kayabaNerve> JS has has this debate for a long time. The problem with doing it at the top-level, in Nim, is you'd need to transform the file itself. |
16:36:39 | FromGitter | <kayabaNerve> File-wide macros aren't a thing unless you put the entire file in a block. Araq hates the idea, although I personally like it. |
16:37:02 | FromGitter | <kayabaNerve> And as the Nim filter system goes line by line, you can't replace line endings with `\r\n ` and compensate. |
16:37:46 | inv2004 | @leorize, probably you can write just two lines: let resp = await client.request; let data = await resp.body(); echo data.parseJson().pretty. but defining waitFor main() would add two more lines :) |
16:38:05 | FromGitter | <kayabaNerve> If you're going to put the entire file in a block just so you don't have to define `proc main() {.async.}; waitFor main()`... why |
16:38:40 | FromGitter | <kayabaNerve> But I mean, hey, if you want to write a macro `asyncMain:` to expand to those two statements, go ahead. |
16:39:16 | leorize | inv2004: or you can write it like this: let resp = waitFor client.request; let data = waitFor resp.body() :p |
16:39:22 | dom96 | yeah, you can't |
16:39:31 | dom96 | but if you're writing scripts, why even use async? |
16:39:55 | inv2004 | @dom96, good question - I did not think about it, because I can :) |
16:41:23 | dom96 | lol |
16:41:24 | inv2004 | @leorize, nice idea, thank you! |
16:41:39 | dom96 | well if the amount of typing bothers you, just don't use it |
16:42:44 | * | inv2004 quit (Quit: Leaving) |
16:46:12 | * | filcuc quit (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/) |
16:48:10 | * | jjido joined #nim |
16:48:37 | * | xet7 quit (Remote host closed the connection) |
16:50:22 | * | xet7 joined #nim |
16:52:30 | leorize | \o/ macros in typedef is now a thing |
16:56:30 | FromDiscord | <Benumbed> *sigh* I just spent the last hour slamming my head on an issue that turned out to be StringStream taking `0XCE` and treating it as 32b instead of 8b |
16:57:21 | FromDiscord | <Benumbed> I'm sure that makese sense at some point, but I haven't slept and omg did that throw me for a loop |
16:58:17 | leorize | yea you should sleep :) |
16:58:18 | FromDiscord | <Benumbed> Esp since the `0xCE` was the termination byte for a network frame, and so the server would then try to read the next 7 bytes and pitch a fit about how everything was zero |
16:58:31 | * | inv2004 joined #nim |
16:58:47 | FromDiscord | <Benumbed> I sat there staring at Wireshark thinking I'd lost it |
16:58:50 | * | inv2004 quit (Client Quit) |
16:58:53 | * | zacharycarter joined #nim |
16:59:02 | FromDiscord | <Benumbed> I would sleep if I could, bad insomnia for the last 3 days 😦 |
16:59:07 | * | inv2004 joined #nim |
17:00:17 | leorize | not looking at the screen is a good way to change that :) |
17:02:14 | FromGitter | <geotre> Are there any libraries for async/await on js backend (apart from asyncjs) ? |
17:03:55 | FromDiscord | <Benumbed> leorize: I went to bed at 2am as usual and laid there until 5am, no lights, no screens |
17:04:04 | FromDiscord | <Benumbed> just brain that won't sleep |
17:05:19 | leorize | that doesn't sound good :( |
17:05:44 | FromDiscord | <Benumbed> Story of my life, haha |
17:05:57 | leorize | well go see a doctor I suppose :) |
17:06:09 | FromDiscord | <Benumbed> I have, multiple times |
17:06:18 | FromDiscord | <Benumbed> Oh and sleep aids generally don't work on me |
17:06:47 | FromDiscord | <Benumbed> My doctor calls me 'an interesting anomaly' |
17:08:42 | FromGitter | <kayabaNerve> Is there a way I can force a ref to be freed? |
17:09:02 | leorize | kayabaNerve: yes, but no |
17:09:22 | FromGitter | <kayabaNerve> I didn't think so outside of reference count manip |
17:09:56 | leorize | well the idea of the GC is that you don't do this kind of "forcing free" |
17:10:25 | leorize | but if it's the last reference (ie. not referenced elsewhere by anything) |
17:10:33 | leorize | set the ref to nil, then run GC_fullCollect() |
17:10:46 | leorize | (please never do that in real programs) |
17:11:43 | leorize | the memory held by the ref might be freed |
17:12:24 | leorize | though any finalizer will still be called if it's not freed |
17:13:41 | leorize | might be freed because the GC can and does keep a pool of small memory segments |
17:14:09 | leorize | it will accumulate the "freed" memory for a big free() |
17:14:16 | leorize | and can also reuse them irrc |
17:14:18 | leorize | iirc* |
17:15:54 | FromGitter | <kayabaNerve> leorize: I'm creating duplicates of 512 MB objects somehow, despite using refs, and need to clear them in my tests |
17:16:34 | FromDiscord | <Recruit_main707> how can i pass a function to a template/macro, and get the name of that function? |
17:17:10 | leorize | Recruit_main707: wdym by passing a function? like this? `macro(foo)` |
17:17:23 | FromDiscord | <Recruit_main707> yes |
17:17:30 | leorize | then the node will depend on the type of the param |
17:17:56 | FromDiscord | <Recruit_main707> the param is the function? |
17:18:05 | leorize | if it's a typed, then it'll resolve into an nnkSymbol. You can use it directly for any expression since it'd be solved |
17:18:14 | leorize | getting the name is as simple as .strVal :) |
17:18:26 | leorize | if it's an indent, well kinda same story :P |
17:19:04 | leorize | kayabaNerve: refc is not really deterministic |
17:19:14 | leorize | you'd really want arc for that |
17:21:41 | FromDiscord | <Recruit_main707> leorize i didnt understand a shit, sorry, let me show you my code so that i can understand: https://play.nim-lang.org/#ix=2gg4 |
17:21:41 | FromDiscord | <Recruit_main707> its a very specific problem, it will be shorter if you dont ask why i do it ;) |
17:24:06 | leorize | https://play.nim-lang.org/#ix=2gg7 |
17:24:18 | leorize | the magic of emit :) |
17:24:53 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:26:02 | FromDiscord | <Recruit_main707> lmao, i didnt know about those XD |
17:26:05 | FromDiscord | <Recruit_main707> thanks |
17:26:26 | leorize | https://play.nim-lang.org/#ix=2gg9 |
17:26:27 | FromDiscord | <Varriount> Hm. Araq, how do other languages handle the aliasing situations that the Nim spec currently says are not allowed? |
17:26:37 | leorize | and here's the macro version if you'd like to know how to get the name |
17:27:28 | FromDiscord | <Recruit_main707> lovely, thank you very much, i am finally seeing the potential of metaprogramming. |
17:29:11 | * | rockcavera joined #nim |
17:36:37 | FromGitter | <kayabaNerve> I think I found the problem. I'm defining the types as: ⏎ ⏎ ```X {.importc: "x", header: "x.h", incompleteStruct.} = object ⏎ Y* = ptr X``` ⏎ ⏎ When Nim clears the wrapper ref object, the pointer isn't properly deallocated. [https://gitter.im/nim-lang/Nim?at=5e84d12461967448380eedf4] |
17:37:11 | FromGitter | <kayabaNerve> That's my theory at least, given that I'm setting the wrapper ref to nil and calling GC_fullCollect() to no effect. |
17:37:44 | * | Trustable joined #nim |
17:38:08 | * | couven92 joined #nim |
17:38:38 | * | rnrwashere joined #nim |
17:41:04 | leorize | do you have a finalizer to deallocate the pointer? |
17:41:08 | FromGitter | <kayabaNerve> Though I'm not entirely sure how to check that. I guess register a destructor for the ref? |
17:41:20 | FromGitter | <kayabaNerve> ... nope. Nim won't do it automatically either. |
17:41:22 | FromGitter | <kayabaNerve> That's my fault. |
17:41:25 | FromGitter | <kayabaNerve> Thanks. |
17:41:56 | leorize | you can write a destructor and it'll be transformed into a finalizer automagically |
17:42:41 | FromGitter | <kayabaNerve> Yep |
17:48:00 | * | solitudesf- joined #nim |
17:49:44 | shashlick | Araq: curious why proc pragmas are at a different place in the AST compared to types |
17:50:12 | * | solitudesf quit (Ping timeout: 256 seconds) |
17:50:44 | leorize | finally I can make my `ctype` macro and it wouldn't look weird :) |
17:51:41 | zacharycarter | does anyone use kakoune with Nim? |
17:59:50 | * | rnrwashere quit () |
18:03:34 | solitudesf- | yes |
18:04:10 | zacharycarter | Nice! Do you use the kak plugin system? |
18:04:27 | zacharycarter | plug.kak or whatever? |
18:04:33 | solitudesf- | nope |
18:05:03 | zacharycarter | ah okay - I have the LSP plugin and just added Nim to the list of languages to set options for, but I have a feeling I'm going to need to do more configuration to get it to work |
18:05:36 | solitudesf- | you dont need plug.kak for that |
18:06:40 | solitudesf- | only thing needed is to do launch kak-lsp and run lsp-enable |
18:06:58 | zacharycarter | okay I'm doing that - so hopefully it's just working already and I'm unaware :) |
18:07:55 | rayman22201 | Hey zacharycarter. Been a while since we've seen you on irc. Hope all is well! |
18:08:14 | solitudesf- | there is lsp-capabilities command to check if its working |
18:11:21 | zacharycarter | I'll try that, thanks |
18:11:37 | zacharycarter | Hey rayman22201: Thanks! All is good, just getting settled into my new digs in Austin |
18:11:55 | rayman22201 | nice! great timing lol |
18:12:10 | zacharycarter | Haha yeah! Just in time to really really settle into them |
18:12:36 | zacharycarter | hope you are doing well too! |
18:12:57 | FromGitter | <zetashift> great to see you again zachary :D |
18:13:25 | zacharycarter | Hi zetashift! Likewise! |
18:20:41 | FromGitter | <alehander92> zacharycarter how are youu |
18:20:57 | FromGitter | <alehander92> rayman22201 so hm |
18:22:04 | FromGitter | <alehander92> i need to write a custom async module? i think sometimes tweaking how async macro works is also needed, but maybe thats too much |
18:24:41 | * | inv2004 quit (Ping timeout: 265 seconds) |
18:25:47 | * | inv2004 joined #nim |
18:29:10 | * | kenran joined #nim |
18:33:17 | rayman22201 | alehander92 sorry. I need more context. what are you trying to do? |
18:33:31 | rayman22201 | I only half read your ping when I woke up lol |
18:35:40 | * | rayman22201 sometimes feels like I'm the only one who sleeps around here lol |
18:36:23 | FromGitter | <alehander92> well i just read about https://os.phil-opp.com/async-await/#cooperative-multitasking-1 implementation a bit :D |
18:36:59 | FromGitter | <alehander92> but honestly just the idea to write custom ways that futures are executed with seems useful, but you're right this might be already possible here |
18:37:09 | FromGitter | <alehander92> ah here it is evening |
18:38:37 | * | Vladar quit (Remote host closed the connection) |
18:38:54 | * | inv2004 quit (Ping timeout: 240 seconds) |
18:40:38 | zacharycarter | Hi alehander92! Good thanks! You? |
18:43:00 | rayman22201 | ah! yes! I saw that article as well. It's on my reading list :-) |
18:44:49 | rayman22201 | Nim promises can pretty much do the same thing, the api is just a bit more messy. I really like the Rust async api. I want to steal a lot of ideas from it for my Async 2.0 project. |
18:45:21 | * | rockcavera quit (Remote host closed the connection) |
18:45:42 | FromGitter | <deech> I'm trying to figure out the current `nimbleDir` setting inside the `.nimble` file but the `nimscript` module doesn't export it and I'm having trouble parsing the `nimble.ini`because `streams` apparently can't be imported in a `.nimble` file. Is there another way to do this? |
18:46:20 | liblq-dev | hey zacharycarter! |
18:48:41 | * | rockcavera joined #nim |
18:50:16 | zacharycarter | Hi liblq-dev! |
18:52:32 | rayman22201 | Httpbeast is a good example of what we have today. The standard library event-loop is single threaded. Httpbeast, instead of using the stand library, has a custom event loop spreads the async events over threads as they are triggered from http requests. |
18:52:57 | rayman22201 | It's not "the cleanest" architecture, but it works quite well. |
18:53:08 | federico3 | :-/ |
18:53:57 | rayman22201 | ?? |
18:58:25 | * | kenran quit (Ping timeout: 264 seconds) |
19:02:16 | shashlick | deech what exactly you trying to do |
19:04:28 | FromGitter | <deech> Figure out what `nimbleDir` is at build time. |
19:05:38 | shashlick | What for, curious |
19:06:22 | FromGitter | <deech> So I can pull in some third party sources like llvm. |
19:09:08 | shashlick | Not using standard Nim search of pkgs? |
19:11:41 | * | PMunch quit (Quit: leaving) |
19:16:50 | * | moerm joined #nim |
19:16:57 | moerm | good day everyone |
19:17:53 | moerm | I just opposed Araq in the "Nim goes Python" forum thread. Sorry but his plan looks unsound and timid to me |
19:19:03 | rayman22201 | moerm. It's an april fools joke. You are aware of that right? or are you trolling? lol |
19:20:10 | rayman22201 | ah. I see. lol. the joke continues |
19:20:27 | Zevv | he best jokes are the ones that keep on giving. Didn't see that coming with this one tho :) |
19:21:31 | moerm | *g |
19:21:42 | moerm | We must be BOLDER! |
19:24:27 | rayman22201 | hahahaha. AI for everyone! |
19:25:38 | rayman22201 | I think we rewrite nim in Perl 6... wait, I mean Raku :-P |
19:26:05 | * | jjido joined #nim |
19:27:17 | moerm | Nope. Nim shall be *danced* and that shall be AI interpreted to detect our *intentions*. Then, the AI expresses it using only void ptrs. It's about time we get rid of the limiting typing paradigma (attention, hidden pun) |
19:31:29 | rayman22201 | lol |
19:32:02 | nisstyre | the site is down |
19:32:09 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:32:22 | nisstyre | or it was... |
19:32:30 | rayman22201 | it's up for me? |
19:32:38 | nisstyre | I got some cloudflare errors |
19:32:42 | nisstyre | maybe it's region specific |
19:32:46 | moerm | Nuh, I think it's just CloudF§&?# f*cking up as they often do |
19:32:53 | go|dfish | had cloudfare errors here too, back now though |
19:33:11 | rayman22201 | 🎉 |
19:34:32 | rayman22201 | @krux02, @Varriount, you have to explain to me why you don't like `{.byaddr.}` I don't get it. |
19:35:19 | moerm | "low latency", my ass. I *often* see sites suffering from having made themselves CouldF§&?' dependent |
19:36:16 | * | mal`` quit (Quit: Leaving) |
19:40:26 | moerm | I/we have a couple of dedicated servers in not exactly central locations (but good providers) and we are consistently better reachable and faster for our audience |
19:41:09 | moerm | And btw. I would NEVER give away my private key to a 5 eyes company |
19:42:07 | moerm | (because I wouldn't do hosting with NSA or GHCQ) |
19:42:41 | rayman22201 | well, iirc, they give us service for free as an OSS project. So we aren't paying them... |
19:43:04 | * | mal`` joined #nim |
19:47:48 | nisstyre | it's better than trusting google or microsoft |
19:48:05 | nisstyre | but they do some weird stuff |
19:49:11 | moerm | Yeah, "for free", that's the bait getting many hooked |
19:49:28 | moerm | But it is NOT FREE. YOU DO PAY! Just not with money |
19:49:39 | rayman22201 | When you are a small open source project, you take what you can get |
19:50:16 | moerm | Well, I'm not here to preach. If that is what you want then go ahead and BE THEIR PRODUCT |
19:52:03 | rayman22201 | 🤷 I just hang out here. If you care that much, talk to the people in charge (possibly with an offer of money to offset the effort to change... I'm just saying...) |
19:57:43 | moerm | No problem, I say things like those but then it's enough. I'm not interested in preaching or in converting people |
20:00:17 | * | nekits joined #nim |
20:02:47 | * | narimiran quit (Ping timeout: 256 seconds) |
20:04:15 | * | rockcavera quit (Read error: Connection reset by peer) |
20:04:36 | * | rockcavera joined #nim |
20:04:36 | * | rockcavera quit (Changing host) |
20:04:36 | * | rockcavera joined #nim |
20:04:38 | axion | o/ |
20:05:12 | axion | I'm trying to understand if I can rely on something about iterators that doesn't seem to be mentioned in the spec |
20:06:07 | FromDiscord | <Varriount> rayman22201: It's not memory safe, not documented as memory unsafe, and hides what I feel should be an explicit operation |
20:06:56 | * | nekits quit (Quit: The Lounge - https://thelounge.chat) |
20:08:09 | FromGitter | <iffy> How would I convert the following C to Nim? c2nim wants a semicolon somewhere near the end of the second line: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e84f4a9302cd3685be07d16] |
20:08:11 | FromDiscord | <Varriount> If someone feels that their program should be optimized using unsafe mechanisms, I would prefer that usage to be clear and explicit. Not hidden behind syntactic sugar that really only removed the need to dereference things. |
20:09:09 | rayman22201 | Hrmm. I agree it's unsafe. Better documentation is always good. It's more than that. Timothees point about pointer escaping is important. |
20:09:20 | krux02 | rayman22201, There are multiple reasons I don't like byaddr. |
20:09:41 | krux02 | First of all, it is yet again another feature that needs to be mantailed and implemented in all backends. |
20:09:55 | krux02 | This is not something that can be resolved in the frontend. |
20:10:15 | FromDiscord | <Varriount> Yes, but how likely is that? In order for the pointer to escape, you would need to label the return type, structure member, or something else as a pointer type. |
20:10:21 | krux02 | Then it is proposed by a specific author who has a tendency of introdcing unnecessary features. |
20:10:34 | krux02 | Then the proposal is convoluted with things I don't want to read. |
20:12:27 | rayman22201 | Can you elaborate on the point about not being able to be resolved by the front end? |
20:12:32 | krux02 | How is byaddr supposed to work in javascript? |
20:13:02 | krux02 | rayman22201, byaddr means that something is literally taken by address. Pointers are not a thing in javascript. |
20:13:29 | krux02 | they are emulated |
20:13:33 | rayman22201 | But there are other features like this that don't work in js |
20:13:55 | krux02 | that is not the point. |
20:13:55 | rayman22201 | regular addr has the same problem |
20:14:28 | rayman22201 | It is the point. There is precedent. JS is a bad example. |
20:15:28 | * | nekits joined #nim |
20:15:59 | * | solitudesf- quit (Remote host closed the connection) |
20:16:05 | krux02 | Anyway, the proposal is from Timothee, his contributions constantly cause a horrible feeling in me that I can't describe. If you want byaddr, make a spec for it, rename it, and let it be implemented by somebody else. |
20:16:33 | zacharycarter | lol that's mean |
20:16:49 | krux02 | I don.t care. |
20:16:52 | * | solitudesf joined #nim |
20:17:01 | FromGitter | <moerm_gitlab> Yay, I managed to get a gitter account (had to create a gitlab account first. Weird) |
20:17:11 | krux02 | He cause so much pain for me, that I don't care about his feelings. |
20:17:27 | zacharycarter | well - I'd be lying if I said you were the only person I think feels that way |
20:17:30 | zacharycarter | lolol |
20:17:38 | rayman22201 | I understand your frustrations, but I'm trying to be objective |
20:18:05 | krux02 | moerm: congratulations, now come back to IRC :P |
20:18:15 | rayman22201 | Lol |
20:18:24 | FromGitter | <moerm_gitlab> Let's crucify him!!!(peoples front of Judea) |
20:18:45 | FromGitter | <rishavs> Is there anyway to iterate over the members of a set? Or perhaps to convert a set into a sequence? |
20:19:09 | krux02 | rayman22201, the best I can do about staying objective about timothees contributions is if I ignore all his opinions. |
20:19:36 | krux02 | I mean bugs are not an opinion. and timothee is very qualified to detect them. |
20:19:45 | krux02 | But I don't want his solutions. |
20:20:17 | FromGitter | <moerm_gitlab> Do we know how Araq feels about him? |
20:20:35 | rayman22201 | Araq accepts the PRs lol |
20:20:43 | krux02 | If a feature is added to Nim, there should be a real problem that this feauter solves. THat means the feature should be backed by a project that is using it. |
20:21:03 | krux02 | I don't want these features that are hanging in the void and are used by nobody. |
20:21:20 | FromGitter | <moerm_gitlab> rayman does that mean that Arq accepts pretty much anything or that he thinks Timothee's stuff is OK? |
20:21:27 | rayman22201 | I'm assuming timothee has projects. |
20:21:34 | krux02 | A feature needs to have real world use cases to get it right. |
20:21:53 | krux02 | and that is not limited to his feature requests. |
20:22:16 | krux02 | I would even go so far and delete the feauter request template for github issues. |
20:22:19 | * | moerm quit (Quit: Leaving) |
20:23:00 | krux02 | I am assuming timothee is 100% busy finding issues and solutions for bugs in Nim. |
20:23:03 | rayman22201 | Araq liked the feature. Krux wants no new features. Krux is a bit extreme imo |
20:23:15 | rayman22201 | But I understand his feelings |
20:23:21 | krux02 | just look at the amount of issues and PR he posts. |
20:24:03 | FromGitter | <moerm_gitlab> rayman Hmmm, thx |
20:24:05 | rayman22201 | But this is all besides the point. I'm just trying to understand this specific feature. |
20:24:06 | krux02 | Yes I don't want any new feauturs. The compiler is already burning because of bugs and inconsistencies. |
20:24:29 | krux02 | But that doesn't mean I wouldn't accept new feauters. The bar to accept new feauters should be high though. |
20:24:47 | krux02 | So high that it is almost impossible to get new feautures into the language. |
20:24:47 | FromGitter | <moerm_gitlab> krux Cool down. The new Python based Nim is comping |
20:24:50 | FromGitter | <moerm_gitlab> -p |
20:25:19 | krux02 | gdb nim integration is written in python if that counts. |
20:25:58 | FromGitter | <moerm_gitlab> A good start. But we need an AI that recognizes our dancing moves and expresses them using void pointers only |
20:25:58 | krux02 | Especially features where somebody things it would be useful should not become part of Nim. |
20:26:09 | krux02 | yea that joke is old by now |
20:26:36 | FromGitter | <moerm_gitlab> krux So sorry, pls forgive my attempt to cool you down a bit |
20:26:45 | krux02 | But joke aside, I think it is inevitable that soon we will have programs written by AIs. |
20:26:46 | * | rayman22201 didn't mean to get krux02 upset. Sorry |
20:26:54 | krux02 | I am not upset. |
20:27:19 | krux02 | I am just frustrated, I am frustrated for quite some time about things that go wrong in the Nim compiler development. |
20:27:22 | rayman22201 | You always sound a bit upset these days. |
20:27:39 | * | filcuc joined #nim |
20:27:42 | krux02 | You are not part of that. You just triggerd something so I realeased my frustration. |
20:27:53 | krux02 | There are other things as well. |
20:27:58 | rayman22201 | I'm an optimist. I think things will improve 😊 |
20:28:08 | krux02 | No I don't think so. |
20:28:12 | rayman22201 | I hope anyway |
20:28:22 | FromGitter | <moerm_gitlab> krux well, yes, maybe Araq is a bit to lenient. But he happens to be the man who gave us Nim so I think it makes sense to let him roll his way |
20:29:08 | krux02 | Araq will continue to accept unnecessary feautures and will make it mandatory for future patches that these broken feautures will continue to be as broken as they were when they were first contributed. |
20:29:35 | FromGitter | <moerm_gitlab> If Nim *really really* gets unwieldy or, god forbid, unreliable you can fork it and throw out what you consider dangerous, not necessary, cruft ... |
20:29:47 | krux02 | Yes Araq gave us Nim, that that is great. |
20:29:58 | axion | As a new developer, I am frustrated too. Everyone I talked to on mumble about the compiler quality issues shares the same opinion for the most part. It really makes me question staying with Nim, but I must stay optimistic if I want to get work done. |
20:30:18 | dom96 | FWIW I agree with krux02's concerns |
20:30:52 | FromGitter | <moerm_gitlab> axion I get you and I very seriously care about quality. But from what I see, staying away from diverse gadgetry seems to be good enough |
20:31:31 | krux02 | And no I don't want to fork Nim. |
20:31:58 | krux02 | For the most part, I don't think Nim will survive a community split. |
20:32:56 | FromGitter | <moerm_gitlab> Hey guys, Araq is also one who seriously wants to bring Nim close to static verif. So he *does* care about Nim at least offering the possibility to create safe code (albeit I guess only when staying away from experimental gadgetry) |
20:33:16 | krux02 | I am not questioning that. |
20:33:38 | krux02 | I am questioning his ability to make the right decisions to keep Nim alive. |
20:33:38 | FromGitter | <moerm_gitlab> krux No. Not a community splitting fork but one that is, let's call it "conservative" |
20:34:15 | krux02 | A conservative Nim that throws out all the dead code |
20:34:28 | krux02 | and removes these incomplete feautures like hot code reloading. |
20:34:41 | krux02 | and concepts |
20:34:48 | * | jjido joined #nim |
20:34:50 | FromGitter | <moerm_gitlab> Yes, something along that line. No funny gadgets, no experimental stuff, only plain solid Nim |
20:35:08 | FromGitter | <moerm_gitlab> plus static verif. |
20:35:13 | krux02 | I am all for that. |
20:35:15 | FromDiscord | <Varriount> https://play.nim-lang.org/#ix=2ghX |
20:35:46 | FromGitter | <moerm_gitlab> You see, we NEED Araq to be "playful" and open to ideas. That's how Nim came into existence |
20:36:02 | FromGitter | <moerm_gitlab> At the same time many of us need Nim to be a solid tool. |
20:36:11 | krux02 | moerm: I know that. |
20:36:27 | krux02 | But now it is time for Nim to become a more boring language. |
20:36:46 | krux02 | Stop playing around. Get the shit out of the way and fix bugs. |
20:37:01 | euantor | A lot of the new features are very difficult to discover too. I fear they get added, nobody knows about them and they only exist to site there and collect dust |
20:37:05 | krux02 | Playing is for Nim users not compiler developers. |
20:37:20 | FromGitter | <moerm_gitlab> That would not be splitting or competive. That would be complementary and and could be a very friendly coexistence. And it would save Araq from concerns about the "conservative faction" and at the same time would give the conservativ Nimians green light. |
20:37:37 | krux02 | euantor, you don't know about all the surprise feautures in Nim. |
20:37:40 | Yardanico | to be honest I agree with krux02 |
20:37:46 | axion | I am mostly frustrated that we scrambled to push a 1.0 probably years too premature, leaving a lot of new users, myself included, with a false impression of the language due to all the instability by favoring new features over the plethora of compiler issues unresolved (or sometimes not even acknowledged as with my issues) |
20:37:56 | euantor | krux02: does anybody truly know them all? |
20:38:18 | FromGitter | <moerm_gitlab> euantor Yep, solid proper docu would be a part of the "conservative Nim brother" too |
20:38:18 | dom96 | axion, premature? We've been working on Nim since 2008 |
20:38:25 | krux02 | well, I don't know them, but I guess I triggered them all once. |
20:38:46 | rayman22201 | @varriont are you showing me the unsafe nature of the feature? |
20:38:51 | axion | Premature yes. I would not exactly call Nim 1.0 in its current state, especially with the attention to features over all the bugs. |
20:38:52 | dom96 | But yes, I agree, 1.0 is the time to get down and fix bugs |
20:38:55 | krux02 | I totally agree, version 1.0 was premature. I told Araq so. |
20:39:00 | dom96 | not work on ARC, static analysis features and whatever else |
20:39:03 | krux02 | But he wanted a version 1.0. |
20:39:06 | euantor | I took a break out of using/following Nim for a couple of months and there have been a lot of changes since then. The 1.0 announcement is what got me back trying to follow things |
20:39:23 | FromDiscord | <Varriount> rayman22201: Yes |
20:39:30 | krux02 | I told him, if Nim doesn't open new issues/bugs for a week, then version 1.0 could get an RC |
20:39:43 | dom96 | but I understand that fixing bugs day in day out can seriously affect burnout rate |
20:39:47 | krux02 | and if it continues to be bug free for a month it could be called version 1.0. |
20:39:56 | rayman22201 | I already knew that @Varriount. Again. I don't think it's worse than our other unsafe features |
20:40:15 | rayman22201 | I think 1.0 was good for only one thing, marketing. |
20:40:17 | FromGitter | <moerm_gitlab> dom96 Without static verif. Nim will stay "just another language in a sea of languages". SV would push it forward and make it a "todays Ada" |
20:40:23 | federico3 | axion: having a stable 1.0 spec enables bugfixing in the compiler |
20:40:29 | euantor | Regarding documentation, I still think the .net documentation is the minimum bar we should all aim for. Most things I look up have clearly documented parameters, return values, exceptions and often examples |
20:40:39 | FromDiscord | <Varriount> Yes, but how long will proper static verification take? |
20:40:39 | krux02 | dom96, for what I can tell you, I didn't work on new features at all, (except sizeof/alignof) I worked on compiler bugs only. |
20:40:39 | dom96 | moerm: sorry, but I have no use for static verification, and most programmers don't either |
20:40:52 | krux02 | and yes, it is tough especially if you don't know the compiler. |
20:40:54 | * | inv2004 joined #nim |
20:40:59 | dom96 | moerm: it's cool, but there are more important things that should have resources put into them |
20:41:20 | FromGitter | <moerm_gitlab> dom96 safety was one of the priorities I looked for when I came to Nim |
20:41:22 | krux02 | But surprise feauters that are sprinkled accross the entire codbase with a lot of dead code everywhere seriousld affects productivity. |
20:41:35 | krux02 | And guess what happens when I tried to clean up that mess. |
20:41:39 | rayman22201 | dom96: completey disagree about static verification |
20:42:01 | zacharycarter | +1 - isn't that why Rust is so popular? |
20:42:07 | zacharycarter | because of static verification? |
20:42:10 | rayman22201 | Exactly |
20:42:15 | FromGitter | <moerm_gitlab> dom96 I get your point that is much to be made solid, cleaned up, etc. But that does not mean that we can *also* do a really important new feature. |
20:42:16 | federico3 | is it? |
20:42:21 | FromDiscord | <Varriount> rayman22201, moerm: Yes, but how long will it take to come out with something that is usable, and actually *complete*? |
20:42:29 | zacharycarter | I don't know - I'm asking |
20:42:43 | krux02 | here this is what happens when I try to get red of dead code: https://github.com/nim-lang/Nim/pull/11981 |
20:42:57 | FromGitter | <moerm_gitlab> In fact that would be a good example for what I mean. Araq Nim is the experiemental one. Once SV is solid enough there, we can put it into the conservative branch |
20:42:58 | dom96 | moerm: it does mean that, resources are limited. |
20:42:59 | federico3 | zacharycarter: I doubt it. It's popular because of marketing |
20:43:30 | krux02 | It happend every time I tried to clean up the code. |
20:43:37 | dom96 | Rust is popular because it guarantees memory safety at compile-time |
20:43:50 | FromGitter | <moerm_gitlab> Varriount That's a question for the Nim team, not for me |
20:43:51 | zacharycarter | well yeah - I think that played a huge role in its meteoric rise in popularity |
20:43:53 | dom96 | That is not what I am referring to when I talk about static verification |
20:43:55 | rayman22201 | What do you think static verification will let you do? |
20:44:15 | krux02 | yes rust is popular because of that guarantee, but it struggles in compile time. |
20:44:35 | krux02 | it also struggles in being very verbose with move semantic annotations. |
20:44:35 | shashlick | let me ask a basic question here - how many of you can review compiler PRs? not in terms or permissions but know-how |
20:44:39 | FromGitter | <moerm_gitlab> dom96 Pardon my french but Rust is popular because memory safety is a seriously pressing problem and because they believe in magic |
20:44:47 | * | lritter quit (Ping timeout: 250 seconds) |
20:44:52 | axion | As such a lot of Rust devs have been ironically migrating to using more dynamic dispatch |
20:44:59 | krux02 | All of the sudden all I see is a forest of move and borrow operators attatched to everything. |
20:45:21 | krux02 | shashlick, I can |
20:45:56 | FromGitter | <moerm_gitlab> shashlick That is only part 1. Part 2 is how many of us have the time and resources to work on a compiler |
20:46:13 | shashlick | krux02: wasn't directed at you 🙂 |
20:46:27 | FromGitter | <moerm_gitlab> shashlick but at? |
20:46:33 | shashlick | moerm: time is the most basic qualification |
20:46:34 | FromDiscord | <Rika> good morning |
20:46:35 | FromDiscord | <Varriount> I could probably learn. |
20:46:41 | FromGitter | <zetashift> I think it's hard to manage developer resources on the budget Nim has. I do wish features, like HCR and concepts, got a bit more love they are important in making the foundations of a solid ecosystem |
20:47:20 | shashlick | having big opinions on what Araq should work on is like telling me what I should work on, or me telling you what you should work on |
20:47:35 | shashlick | i've had this conversation before - some people are good at creating, some are good at sustaining |
20:47:36 | FromGitter | <moerm_gitlab> Sorry I'm writing quite a bit of my work using Nim. And that part is increasing (but, yes, I stay away from gadgetry) |
20:47:50 | dom96 | shashlick, yes, when Araq was working in his spare time |
20:47:54 | krux02 | zetashift: I with HCR and concepts would be removed from the compiler core code base. |
20:47:58 | dom96 | but that isn't the case anymore, many are giving donations to Nim |
20:48:08 | dom96 | they deserve to give their opinion on what should be worked on |
20:48:13 | * | inv2004 quit (Ping timeout: 264 seconds) |
20:48:15 | FromGitter | <zetashift> @krux02 moved to libraries you mean? |
20:48:21 | krux02 | yes |
20:48:25 | rayman22201 | I love the idea of HCR, but I'm ok with killing it if it can't be maintained |
20:48:27 | FromGitter | <moerm_gitlab> shashlick That's why I demand nothing from Araq - but I'm very pleased with much of what he does |
20:48:29 | krux02 | some compiler plugin. |
20:48:33 | FromDiscord | <Rika> on stdlib or nimble? |
20:48:36 | FromGitter | <zetashift> I think HCR could stay but I wouldn't mind a nim-prelude of sorts that contains it |
20:48:45 | FromGitter | <zetashift> it being concepts etc |
20:48:46 | krux02 | I don't want their implementation sprinkled around everywhere in the compiler. |
20:48:46 | shashlick | I think it is a lost cause if you expect him to do maintenance |
20:48:54 | FromDiscord | <Rika> ah so on stdlib |
20:49:15 | FromGitter | <sheerluck> leave Araq alone! Maybe he's not in the mood! |
20:49:26 | FromDiscord | <Rika> stop pinging Ar4q |
20:49:26 | * | lritter joined #nim |
20:49:27 | FromGitter | <moerm_gitlab> So, maybe maintenance is a good starting point for the conservative faction |
20:49:27 | FromDiscord | <Rika> xd |
20:49:34 | krux02 | I think he isn't online, otherwise he would already have responded. |
20:49:48 | krux02 | I said quite a few things that would normally have triggered him. |
20:49:50 | FromDiscord | <Rika> huh, isnt it 10 on europe or something |
20:49:54 | dom96 | HCR and concepts are yet another set of features that are not necessary |
20:49:54 | shashlick | like asking Michelangelo to maintain the Sistine chapel |
20:49:59 | FromDiscord | <Rika> *shrug* |
20:50:04 | shashlick | fix paint chips because you pay his bills |
20:50:09 | FromGitter | <moerm_gitlab> shashlick *g |
20:50:12 | FromGitter | <zetashift> HCR is really nice for the data science-y part tho D: |
20:50:30 | dom96 | You know what is necessary? Being able to write concurrent and parallel code in Nim without fighting a lot |
20:50:36 | FromDiscord | <kodkuce> i want to work on game engine but i am uber newb to pull that myself |
20:50:39 | FromDiscord | <Rika> concepts are nice for those coming from haskell i suppose? not sure, but i liked them |
20:50:44 | zacharycarter | HCR isn't nice unless it works without issues, and it doesn't |
20:50:46 | FromDiscord | <Varriount> Well, for what it's worth, krux02, would you be open to donations for your work on Nim? |
20:50:48 | zacharycarter | same with concepts |
20:50:53 | FromGitter | <moerm_gitlab> dom96 Full ACK |
20:51:12 | krux02 | I am not arguing against the usablility of HCR, but in the compiler the HCR implementation isn't maintained by anybody. |
20:51:16 | FromGitter | <zetashift> dom96 isn'tthat where ARC comes in |
20:51:17 | zacharycarter | but I don't think Araq wants to spend all his time fixing bugs and writing documentation - he obviously likes to research and prototype |
20:51:25 | krux02 | it just sits there and rots away. |
20:51:27 | FromGitter | <zetashift> ah fair krux02 |
20:51:28 | krux02 | same with concepts. |
20:51:36 | zacharycarter | so like shashlick says: it's pointless to say Araq do this |
20:51:42 | zacharycarter | unelss you're paying him a salary, which none of us are |
20:51:53 | dom96 | again, some of us are, partially |
20:51:56 | shashlick | I agree krux02 that junk should be trashed |
20:52:00 | zacharycarter | donations are donations |
20:52:14 | shashlick | but making giant PRs is not received well by anyone |
20:52:18 | FromDiscord | <Recruit_main707> why is data not getting updated! we could have won D already! |
20:52:18 | shashlick | 82 changed files, come on |
20:52:18 | FromDiscord | <Recruit_main707> https://tools.wmflabs.org/pageviews/?project=en.wikipedia.org&platform=all-access&agent=all-agents&redirects=0&start=2015-07&end=2020-02&pages=Nim_(programming_language)|D_(programming_language) |
20:53:01 | shashlick | I mentioned this earlier, if I am given free reign on a particular aspect, I can move fast and fix and improve stuff, as I am with nimterop |
20:53:12 | FromGitter | <moerm_gitlab> Frankly, it seems I'm not too far off with my idea. Let's have some "conservatives" come together an create a solid Nim branch with lots of experimental stuff cut out and a focus on solidity |
20:53:16 | shashlick | i can also introduce new bugs with less oversight but I can fix those too over time, nothing is perfect |
20:53:16 | zacharycarter | I do think though that these experimental features need to be segregated though from Nim's codebase |
20:53:25 | axion | ^ |
20:53:31 | zacharycarter | might be too late for that to happen though |
20:53:38 | FromDiscord | <Rika> i feel like it is too late |
20:53:39 | rayman22201 | I like the two party system as long as we can come to compromise. I would independently donate to krux02 as long as his PRs are accepted. |
20:53:40 | shashlick | if there isn't trust, you'll have to stick to 10 line PRs which is tedious and boring |
20:53:41 | FromDiscord | <Rika> sadly |
20:53:43 | zacharycarter | they seem to have tendrils everywhere at this point |
20:53:49 | shashlick | and slow slow slow |
20:53:53 | axion | I think working on new features is great for self-respect and curing burnout, but when this shows what should be worked on _most_ of the time, come on: https://i.lisp.cl/dKF62H.png |
20:54:15 | FromGitter | <moerm_gitlab> 1) afk for 2 min - |
20:54:42 | FromGitter | <zetashift> DrNim would mean better tools to fix the compiler though no? |
20:54:44 | krux02 | rayman22201, thanks a lot donations would actually motivate me to spend more time on the compiler. |
20:54:56 | shashlick | let me ask this - 4raq spent months working on arc, how many of you had bugs there were caused by arc? |
20:55:01 | krux02 | Currently I only feel the backlash from Araq. |
20:55:26 | FromGitter | <zetashift> Also documentation has been asked for years, I don't think Nim is the language for documentation since it's always so easy to just start stuff |
20:55:31 | shashlick | i don't think any of arc instability was exposed to the general population |
20:55:32 | krux02 | I didn't try arc, because I didn't feel like opening a can of worms yet. |
20:55:57 | shashlick | neither have I but that doesn't mean that him working on new stuff is breaking otherwise stable things |
20:55:58 | axion | I didn't try Arc because I am old and have had bad experiences moving to shiny new things that haven't been properly vetted yet. |
20:55:59 | FromGitter | <zetashift> I only see ARC on the github issues list besides that haven't noticed anything of it yet |
20:56:03 | FromDiscord | <Rika> i dont know what the issues are with documentation |
20:56:06 | FromDiscord | <Rika> iven' |
20:56:06 | * | Sembei quit (Quit: WeeChat 2.7.1) |
20:56:09 | FromDiscord | <Rika> oops |
20:56:12 | FromDiscord | <Varriount> https://github.com/nim-lang/Nim/issues?q=is%3Aissue+is%3Aopen+arc |
20:56:12 | FromDiscord | <Rika> ivent have any |
20:56:22 | FromDiscord | <Rika> had* damn it |
20:56:32 | axion | If it ever becomes the default and it breaks stuff I will have to weigh the cost of fixing everything vs jumping ship |
20:56:34 | dom96 | At the end of the day Araq is his own boss, but he is responsible for ensuring Nim evolves in the best way possible. My opinion (and I bet a lot of other's here) is that this requires far less working on new features. |
20:56:49 | FromGitter | <sheerluck> When exactly 1 April is over in this chat? |
20:57:00 | rayman22201 | Lol |
20:57:00 | FromGitter | <zetashift> I feel the same, but I ain't stopping him from doing him |
20:57:21 | Araq | ah so it's "let's all shit on Araq" time |
20:57:30 | rayman22201 | It's not like he doesn't listen to the community |
20:57:30 | FromDiscord | <Rika> oh hes awake now 😛 |
20:57:33 | krux02 | ah there you are. |
20:57:34 | rayman22201 | Oh hi lol |
20:57:49 | Araq | coming soon, "Nim must be easier with multithreading. And it doesn't require new features (ARC) for that." |
20:58:25 | Araq | and also "I don't want to open a can of worms with ARC so I created a PR rewriting the stdlib instead" |
20:58:46 | Araq | (can you guess? that's for me "Opening a can of worms") |
20:58:54 | zacharycarter | I don't know how ARC became the feature that started getting clobbered. It started with HCR and Concepts |
20:59:21 | FromDiscord | <Rika> i think its because some of us dont see the reason for ARC |
20:59:49 | zacharycarter | Well the reasons are what Araq just described - folks have been complaining about multithreading in Nim for years |
21:00:09 | zacharycarter | and the default GC making multithreading difficult |
21:00:32 | FromGitter | <moerm_gitlab> Hello Araq ;) |
21:01:03 | FromGitter | <alehander92> krux02 i think Nim is a opionated/powerful language by design, you cant really make a language that expressive/flexible and expect it to get to a "small language no more features for now" feeling |
21:01:08 | FromGitter | <alehander92> i might be wrong of course |
21:01:17 | dom96 | I think that a lot of people see ARC as yet another feature that is replacing fixing bugs in the GC to enable better multithreading. |
21:01:19 | FromGitter | <moerm_gitlab> Araq I don't think they are "shitting on you" but rather that it's two basic factions, each of which is right (and with different priorities) |
21:01:42 | FromGitter | <alehander92> maybe one can imagine a smaller type+metaprogramming core and absolutely everything as libs on top but .. oh well |
21:01:45 | FromGitter | <zetashift> I certainly wasn't my intention, I like Nim too much for that |
21:01:51 | FromDiscord | <kodkuce> i want arc |
21:01:57 | krux02 | alehander92: I never said no more features. I said new feauters must have a real world use case. |
21:02:24 | FromGitter | <alehander92> but krux02 this is very subjective: everybody has his own view of what is really "real world use case" |
21:02:26 | dom96 | krux02, I'm sure that's what the C++ committee says too ;) |
21:02:39 | FromGitter | <moerm_gitlab> krux that's meaningless. Even for very weird stuff there are real world use cases |
21:02:48 | FromGitter | <zetashift> @alehander92 I think he wants more "maintainability of features" not so much as anti-features |
21:03:04 | FromGitter | <zetashift> nvm I was wrong lmao |
21:03:08 | FromDiscord | <kodkuce> yep i as a uber newb thik about exactly like you say dom + better interoperability with other stuff |
21:03:12 | krux02 | no featues that feel like a smart idea. |
21:03:21 | krux02 | No more smart ideas in Nim. |
21:03:53 | FromGitter | <alehander92> but this is just a "i got burned once, no more of this ever for me" |
21:03:59 | FromGitter | <moerm_gitlab> As I said already: I think we need BOTH, the "wild experimenters" as well as the "conservative faction" that seeks reliability, well maintained, and documented Nim |
21:04:01 | FromGitter | <alehander92> some smart ideas are practical, some not |
21:04:03 | krux02 | Dump down the implementation, dump down the lines of code in the implementaion, dump down the complexity in behavior. Make things more understandable. |
21:04:04 | FromGitter | <alehander92> that's life |
21:04:21 | krux02 | Dosn't matter if they are practical. |
21:04:30 | shashlick | krux02: that's a bit extreme, this is a team sport after all |
21:04:35 | krux02 | Smart idea bite you in the ass. |
21:04:40 | FromGitter | <alehander92> you can't always code for the ease of implementation: after all, a language is supposed to help users: why not move some of the complexity inside the compiler? |
21:04:49 | FromGitter | <zetashift> @moerm_gitlab I feel like we doing well in that regard, 1.0.6 is great for me and 1.2 seems to be better while devel is working on DrNim, IC and ARC |
21:04:55 | FromGitter | <alehander92> otherwise you just tell your users "nah, you do this" |
21:05:29 | FromGitter | <moerm_gitlab> zetashift Still, there are never ending discussions ... |
21:05:52 | FromGitter | <alehander92> its very good to have simple software, but compilers are one of those things where sometimes you have to add hard to understand complexity(even if it should be still as simple as possible) |
21:06:17 | rayman22201 | @dom Imho we need arc. Other gcs are fundamentaly inadequate. No amount of bug fixing would help. |
21:06:34 | FromGitter | <alehander92> but maintainability and clarity can still be required even for such more complex passes/components of course |
21:06:51 | * | inv2004 joined #nim |
21:07:13 | FromGitter | <zetashift> @moerm_gitlab there will always be those kind no? Bikeshedding still happens in OCaml where I sometimes frequent the discussions and that language is 20+ years old |
21:07:15 | axion | I agree but at the same time others look at ARC as just another experiment to add to the needlessly tall stack of GC's |
21:07:39 | FromGitter | <alehander92> krux02 also i wonder if that's a bit of "imagine how X would look if rewritten cleanly": nim is already a >10 years codebase, so inevitably there is a lot of stuff hard to change radically now |
21:07:41 | shashlick | cannot call ignorance as justification |
21:07:44 | rayman22201 | Sometimes new features are the right answer... But I'm a moderate. I want maintenance too. |
21:07:48 | dom96 | rayman22201, lack of resources + spreading ourselves thin = no adoption. The more features we implement, the more thin we spread ourselves, ARC is a reimagining of a lot of Nim, it's not easy and will require the whole community to adopt it, I'm still skeptical it's worth it. |
21:07:52 | FromGitter | <moerm_gitlab> zetashift My question is: How can we have *both* factions be happy and productive? |
21:07:54 | FromGitter | <zetashift> I'm hopeful it doesn't end up like concepts or HCR, because the plan IS the unify it to ARC |
21:08:44 | krux02 | alehander92: The age of code doesn't say anything about the quality of the code. Some people clean up their mess and remove redundant feauters, other don't. |
21:08:45 | shashlick | unless 10 new people commit spending 3 hours a week on Nim working towards becoming maintainers, this is a pointless conversation |
21:08:46 | Araq | dom96: yet here you are, not implementing new features nor fixing bugs. |
21:08:46 | FromGitter | <zetashift> @moerm_gitlab I don't know man, you'll always have people that do not like it, I bet if we made both factions happen, a new faction will rise up complaining about case style insensitivity |
21:08:58 | FromGitter | <moerm_gitlab> And frankly, I'm not sure that all of us always stay (in discussions) in their realm of expertise |
21:09:17 | FromGitter | <alehander92> krux02 otherwise i agree with some of your points, but i cant agree with your tone: this is not your language after all to judge who can contribute and who cant |
21:09:23 | dom96 | Araq, I don't work full-time on Nim |
21:09:54 | FromGitter | <zetashift> @shashlick yep I concur |
21:10:00 | Araq | so what? whenever somebody touches async you draw them away |
21:10:36 | FromDiscord | <Varriount> shashlick: I would happily do that, if the internals of the compiler were documented at all, or we could actually fix things in the standard library. |
21:10:51 | FromGitter | <moerm_gitlab> Btw Who is the father of Nim's async/await? |
21:10:56 | leorize | dom |
21:11:19 | dom96 | I like to think my opinion deserves to be heard, seeing as I have committed a lot of my time to this language. If I'm being told that then you may as well say that to everyone writing in this channel right now |
21:11:21 | FromGitter | <alehander92> i cant say i agree, whenever i wanted something about async/await i did receive help/or requirement to rfc properly(which is good! its easy to just propose random things without planning) |
21:11:31 | shashlick | Varriount: it is what it is - ast1.0 in nimterop had zero comments and I got zero contributions to date |
21:11:43 | shashlick | so for ast2, i've put hundreds of lines of comments |
21:12:00 | shashlick | but Nim is several orders of magnitude larger so we have to do what we can |
21:12:05 | FromGitter | <moerm_gitlab> Araq what do you mean by dom96 drawing people away wrt async? |
21:12:18 | FromGitter | <alehander92> Varriount: documenting important/non-obvious things about the compiler can be part of maintenance |
21:12:21 | shashlick | i won't say I've gotten into the compiler at all but I now know the AST since I used it in nimterop so baby steps |
21:12:50 | shashlick | i know a little about the VM and nimscript, so i look for bugs in that and make minor contributions |
21:12:51 | krux02 | Varriount: If you care I can give you an introduction to compiler development, just unmute on mumble |
21:12:57 | shashlick | it is a long journey of mostly learning |
21:13:11 | leorize | the only thing I know about the compiler is how nimsuggest is put together :P |
21:13:17 | shashlick | this is a 12 year old product |
21:13:19 | FromGitter | <moerm_gitlab> dom96 Yes, you certainly deserve to be heard. BUT: Araq is our BDFL. *His voice* is the one that counts at the end of the day |
21:13:30 | shashlick | @leorize: then you HAVE to fix the memory leaks pronto |
21:13:37 | rayman22201 | krux02: stream that for everyone! |
21:13:41 | krux02 | dom96, your opinion matters. After all you wrote the only book about Nim. |
21:13:51 | FromGitter | <alehander92> krux02 that's true, but removing features from a language is hard |
21:14:24 | Araq | it's not hard, you simply do it and don't care that N important packages are broken and that the existing users should go to somewhere else. easy |
21:14:32 | krux02 | alehander92: removing feautures is hard, that is why it is so important that the bar to accept feauters is as high as possle. |
21:14:40 | FromGitter | <moerm_gitlab> krux much less so when it's new and incomplete or not yet solid features ... |
21:15:05 | krux02 | after all, the majority of ideas and feautures are bad ideas. |
21:15:16 | shashlick | neither of these approaches make sense - high bar = zero contributions, removing features = instability |
21:15:27 | shashlick | both are extremes |
21:15:27 | krux02 | They are not supposde to be crappy code that slows down compiler contributors. |
21:15:43 | krux02 | shashlick, not true. |
21:15:49 | FromGitter | <alehander92> krux02 yeah, but no features is not better: if nim had no interesting features..why would one use it |
21:15:55 | krux02 | I am talking about new feauters in the compiler. |
21:16:11 | krux02 | Nim has already enough interesting feautures. |
21:16:16 | krux02 | Nim needs stability. |
21:16:23 | FromGitter | <alehander92> ok, this is obviousl ysubjective |
21:16:45 | shashlick | what is unstable in the 1.0.x series right now? |
21:16:49 | FromGitter | <alehander92> that's the problem with language design i admit, different people just want different things |
21:16:55 | FromGitter | <zetashift> Isn't it getting that with DrNim and ARC? |
21:17:07 | Araq | krux02: and how exactly is adding $ to 'distinct T' aligning with "stability" |
21:17:33 | Araq | you say X and then you do Y. |
21:18:00 | shashlick | any project has to move - as long as features are hidden behind flags and deprecation is followed, we can add and remove just fine |
21:18:05 | shashlick | it is about getting agreement on what to do |
21:18:36 | FromDiscord | <Varriount> shashlick: Concepts, ranges, templates, |
21:18:37 | krux02 | Says the man so says at one point to not conflate refactorings with fixes and in other situations expects them to be conflated |
21:18:50 | leorize | shashlick: the leak is somewhere in the vm and I don't wanna touch that |
21:19:15 | Araq | krux02: that's simply not true |
21:19:24 | FromGitter | <moerm_gitlab> ... yet some here feel that SV is not necessary ... strange |
21:19:53 | * | solitudesf quit (Ping timeout: 250 seconds) |
21:20:00 | FromGitter | <moerm_gitlab> IMO SV (well going for it) is a stroke of genius of Araq |
21:20:25 | Araq | but enough of this. Just tell me what to do, I'm listening, krux02. And don't just say "merge my PRs more quickly". |
21:20:33 | FromGitter | <moerm_gitlab> It'll be tremendously valuable when dealing with bugs - in Nim itself, too |
21:20:51 | shashlick | at the end of this conversation, i think we should have one candidate unmaintained feature for deprecation and eventually removal |
21:20:51 | leorize | I don't mind features, but we do need a better timeline for adding features vs fixing bugs |
21:21:01 | shashlick | what will make it a less pointless conversation |
21:21:20 | krux02 | Araq: How about you start with not instantly closing my PRs, just because you don't want to review them. |
21:21:46 | Araq | I did that once after an online discussion about it |
21:21:49 | Araq | with you. |
21:21:55 | Araq | and I told you I would do it. |
21:22:00 | shashlick | krux02 - how about not spending several hours on PRs without first getting general agreement on what you are planning |
21:22:02 | Araq | you created the PR anyway. |
21:22:06 | rayman22201 | Honestly, I just want Nim to hire a "maintenance person". Their only job is fixing compiler bugs. (Maybe some refactoring). Crappy job, but it might put the community at ease? |
21:22:14 | Araq | shashlick: exactly... |
21:22:21 | krux02 | rayman22201, that way my job. |
21:22:35 | shashlick | i mean everyone here has jobs, do you start coding a feature before running it through planning? |
21:22:48 | krux02 | But not all of my maintenance was accepted or wanted. |
21:22:56 | shashlick | i've seen several people do it here |
21:23:14 | krux02 | Cleaning things up in the compiler, generally I got rejection from Araq. |
21:23:16 | FromGitter | <alehander92> :D sometimes you think a feature is very cool and do it |
21:23:22 | FromGitter | <alehander92> but i agree its good to talk before |
21:23:22 | leorize[m] | https://github.com/nim-lang/Nim/issues?q=is%3Aissue+is%3Aopen+label%3ACrash <- we need to handle all of those :p |
21:23:40 | shashlick | collaboration is more important than code |
21:23:43 | Araq | krux02: yeah, right. because they broke stuff. |
21:23:49 | rayman22201 | Yes, well... There have been some HR issues and communication issues with this job... |
21:23:51 | krux02 | Araq: no |
21:24:02 | Araq | listen man, you didn't even get int128 right. |
21:24:10 | krux02 | My PR to rename conflicting file names did not break stuff |
21:24:23 | krux02 | my pr to remove only dead code did not break stuff |
21:24:25 | FromDiscord | <Rika> oh lord |
21:24:49 | krux02 | Araq: how many issues with int128 are open? |
21:24:56 | Araq | whenever there is something you don't understand, it's the fault of the others. |
21:25:03 | FromGitter | <moerm_gitlab> krux sorry but this begins to look more and more like "krux angry because Araq is the final decision maker and not krux" ... |
21:25:04 | Araq | for not documeting the code |
21:25:17 | krux02 | I am not saying I get all the things right on the first try. But I clean up my mess. |
21:25:22 | Araq | or for not writing tests that test for performance implications |
21:25:39 | krux02 | I even had a hard discussion about cleaning up my very own code for sizeofalignof. |
21:25:53 | Araq | or for not writing tests against nlvm so that you notice you cannot just remove field from an object declaration |
21:25:59 | shashlick | I think we need a general Nim policy that no PRs will be accepted before an accepted proposal from the owner on the idea |
21:26:19 | shashlick | can be a one line irc discussion for all i care, or an elaborate design doc |
21:26:24 | shashlick | RFC, whatever |
21:26:41 | Araq | krux02: oh yeah? I told you not to use exceptions for this piece of code. You simply didn't listen. |
21:26:48 | shashlick | don't spend hours working on features and flooding PRs |
21:27:00 | * | filcuc quit (Quit: Konversation terminated!) |
21:27:11 | krux02 | yes exactly I didn't listen. |
21:27:14 | shashlick | don't work on things that the owner isn't aware of |
21:27:20 | Araq | and everything was indeed a constant fight with you. |
21:27:38 | Araq | and now here you are shitting on me. |
21:27:42 | shashlick | it is 1000x more frustrating if code you worked on wasn't accepted versus an idea |
21:27:44 | krux02 | Simply becaues in this case I used what was necessary for maitainability. |
21:28:05 | rayman22201 | @shashlick That has been getting better actually if you look at recent prs and issues. |
21:28:12 | krux02 | yes I am shitting on you, because cleaning up code in Nim was always frustrating, and now the compiler is full of bugs |
21:28:16 | FromGitter | <moerm_gitlab> shashlick come on, let the two settle the issua without interruption |
21:28:32 | shashlick | i'm talking to everyone else, they can discuss whatever |
21:28:40 | FromGitter | <alehander92> this is a public chat |
21:28:48 | Araq | krux02: you don't care about the bugs, you care that it's "simple". |
21:28:52 | shashlick | have seen this so many times and have even said it a few times |
21:29:02 | FromGitter | <moerm_gitlab> krux Bang, game over. Tilt. One doesn't shit on the creator and BDFL of a language. Period. |
21:29:12 | krux02 | yes, simple means that it is more likely to have fewer bugs. |
21:29:15 | FromGitter | <zetashift> This uh seems to have gotten out of hand |
21:29:20 | krux02 | and bugs are easier to spot in the code. |
21:29:29 | Araq | if that "simple" means "buggy in ways krux02 didn't foresee" it doesn't matter |
21:29:50 | krux02 | if it has bugs, complexity is needed as necessary. |
21:29:59 | FromGitter | <moerm_gitlab> zetshift frankly I don't think so. I think there is something finally getting back into its place |
21:30:23 | krux02 | but that doesn't mean that it you should never even dare to simplify things because it could potentionally break things. |
21:30:25 | Araq | krux02: you simply don't understand the bugfixes in the code and claim "It's all unnecessary complexity" |
21:30:51 | FromGitter | <zetashift> @moerm_gitlab fair |
21:31:01 | FromDiscord | <ksandvik> Maybe it's time to have a dedicated irc channel for internal development and one for the public use? |
21:31:20 | krux02 | there is a nim-dev channel. |
21:31:45 | FromDiscord | <ksandvik> Could this kind of discussion about nim internals reside there? |
21:31:59 | krux02 | Araq, that is the point, the code is so full of bugfixes that is almost impossible to understand. |
21:31:59 | Araq | ofc you never look at luajit's code, or LLVM's or Scala's. you look only at the Nim compiler and blame me for your shortcomings. |
21:32:49 | FromGitter | <moerm_gitlab> ksandvik It was *here* that the can of worms was opened, so what's wrong with it being settled here? Sorry for disturbing your convenience |
21:32:52 | FromGitter | <zetashift> @ksandvik I don't think it's unavoidable, this discussion started here among also regular Nim users |
21:33:18 | krux02 | Well at least I did look through the std library implementation of all of Go Scala and Nim, and after all, Nim is by far the worst. And the frustrating part aobut it, simplifications are simply not welcome. |
21:33:19 | FromDiscord | <ksandvik> Oh Ok, I will check back in about three hours then. |
21:33:32 | FromDiscord | <Recruit_main707> @ksandvik also, just mute the channel if you dont want to hear it |
21:33:45 | FromGitter | <alehander92> i think stdlib vs compiler is an important distinction |
21:34:05 | krux02 | And yes I didn't look into scala's compiler implementation, but from the pure observer point of view it also has far fewers bugs than Nim. |
21:34:12 | krux02 | Yes it is slow. |
21:34:30 | FromGitter | <moerm_gitlab> krux never heard the famous saying "Bow before me for I am root!" *wink wink nudge nudge |
21:34:39 | krux02 | But I didn't hit a single bug in the compiler during the years I worked in Scala, I can't say that about Nim. |
21:34:49 | krux02 | And that was 2010. |
21:35:06 | krux02 | Scala was at that point in time only a few years old. |
21:35:33 | Araq | the point is: see if you can understand the Scala compiler. And if you cannot, you cannot use this fact to blame its quality. |
21:35:51 | Araq | because after all, you just said its quality is good. |
21:35:52 | FromGitter | <zetashift> Where you doing same stuff with Scala compiler as you were with Nim? Seems a lot of years to be still trying the same stuff with compilers |
21:35:56 | shashlick | what exactly is the point of these statements? better to debate specific issues instead of general stuff |
21:36:16 | FromGitter | <zetashift> Also Scala isn't the greatest comparison they are having arguments with Dotty too lmao |
21:36:33 | Araq | and you need to study all of the Scala compiler, not just the parts you enjoy looking at. |
21:36:49 | FromGitter | <moerm_gitlab> shashlick "clearing the air". I may hurt but sometimes it's necessary |
21:37:09 | FromGitter | <moerm_gitlab> -I +It |
21:37:18 | FromGitter | <zetashift> I'm out for now, good night everybody |
21:37:30 | FromGitter | <deech> The Scala compiler has a steady supply of PhD students and substantial industrial funding. |
21:37:49 | shashlick | i'm fine with that, but saying Scala is better than Nim might be true or whatever but doesn't make any progress in unblocking anything |
21:38:30 | shashlick | debate merits of technical issues and be specific |
21:38:53 | Araq | btw I didn't look at the Scala compiler, I'm sure I should and learn my lessons. |
21:38:58 | krux02 | zetashift: I wrote a Block building game like mincraft in scala. |
21:39:09 | FromGitter | <moerm_gitlab> shashlick do you know the full history between the two? Probably not. |
21:39:12 | FromGitter | <deech> I'm saying it's (1) farther along because of the support and (2) far, far less able to fix any mistakes because of it's usage. Nim has the benefit of being small and having some unique ideas. |
21:40:06 | krux02 | zetashift: scala and dotty are basically two different scala compiler implementations. Scala is the original branch and dotty a complete new implementation. Dotty din't exist when I stopped using scala. |
21:40:23 | FromDiscord | <Varriount> deech: how are we more able to fix mistakes more easily? |
21:40:32 | shashlick | so somehow i cannot participate in clearing the air |
21:40:37 | FromGitter | <moerm_gitlab> If I were interested in Scala details I'd be in *their* chat |
21:40:52 | FromGitter | <deech> Because there's fewer people depending on Nim. |
21:41:03 | FromDiscord | <Varriount> shashlick: What do you mean by technical issue? |
21:41:26 | FromGitter | <moerm_gitlab> krux (friendly and calm) Stop fighting and listen to Araq, really listen, and think about what he says |
21:41:27 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:42:00 | FromDiscord | <Varriount> moerm: Could you just let people talk? |
21:42:16 | Araq | and one final thing: I don't mind compiler cleanups, but I want real improvements, not differences in taste. |
21:42:35 | Araq | and refactorings shouldn't cause regressions... |
21:42:36 | krux02 | Araq: what is an real improvement to you? |
21:42:40 | FromGitter | <moerm_gitlab> Varriount Could you let Araq and krux decide whether my comments are disturbing to them? |
21:42:59 | Araq | krux02: for example, replace the C codegen by an AST to AST transformation. |
21:43:09 | Araq | don't optimize the ropes, throw away the ropes. |
21:43:18 | shashlick | Varriount: i'm saying it might be beneficial for krux02 to pick a specific issue or PR and debate the merits rather than general comparisons with other languages |
21:43:43 | Araq | different example: remove the hacks for generics in sem*.nim and make the procs take an explicit "typeMap" |
21:43:51 | Araq | that stores the types that sigmatch did compute |
21:44:40 | Araq | other example: unify the CFG with the AST to give us a solid IR |
21:44:45 | krux02 | Araq: the problem is, a good cleanup often comes with a bigfix. And as far as I am concerned, that isn't allowed. |
21:45:32 | Araq | other example: rewrite the PType cycle mess |
21:45:32 | krux02 | what is CFG? |
21:45:39 | Araq | control flow graph. |
21:45:57 | krux02 | Araq: you can't rewrite the PType cycle mess, becaues macros depend on this mess. |
21:46:09 | Araq | macros only see NimNodes |
21:46:16 | FromGitter | <moerm_gitlab> (btw. quite some SVs provide a CFG. Handy) |
21:46:29 | Araq | you can map the new Type to NimNodes |
21:46:40 | krux02 | But don't they map directly to the PType? |
21:46:58 | * | moerm joined #nim |
21:47:34 | moerm | (switched away from gitter and back to IRC) |
21:47:52 | Araq | no, the mapping is done in vmdeps.nim |
21:48:15 | Araq | speaking of which, bad name, rename it do vm_map_type_to_ast.nim |
21:48:19 | Araq | 1 PR |
21:48:30 | Araq | merged as soon as the CIs are green |
21:48:47 | Araq | and opSlurp() shouldn't be in this file |
21:49:27 | krux02 | moerm, 👍 |
21:49:44 | * | natrys quit (Ping timeout: 256 seconds) |
21:50:01 | moerm | krux sorry I only see a placeholder for something outside ascii |
21:50:21 | Araq | and there is more: Let's say you throw away 4K C code generation and replaced it by 6K C code generation logic, but this time an aST to AST transformation |
21:50:25 | Yardanico | moerm: *thumbs up emoji* |
21:50:40 | krux02 | Araq, ok that are the parts in the compiler that you see are bad and need to be cleaned up, but what are the parts that I see that should be cleaned up? |
21:50:57 | krux02 | moerm, it is a thumb up |
21:50:57 | Araq | I would take it even *with* the implied regressions |
21:51:09 | Araq | because it's worth it |
21:51:36 | Araq | same for the PType mess |
21:51:56 | moerm | Yardanico Thx! |
21:52:15 | krux02 | what about the VM. I constantly worked in vm.nim, that file deserves some cleanup as well. |
21:52:29 | Araq | definitely |
21:52:29 | * | jjido joined #nim |
21:52:55 | Araq | I know you dislike the templates and their injections, throw it out |
21:53:07 | krux02 | good. |
21:53:08 | Araq | and it'll be accepted |
21:53:48 | Araq | maybe not "as soon as possible", maybe I will pick on something before it's mergable, that has to be allowed |
21:55:10 | krux02 | I think if I do it, I will do it step by step. |
21:55:53 | shashlick | Araq: if krux02 is really competent at particular areas of the code, why not give free reign to work on that? he still has to pass all existing tests |
21:56:04 | shashlick | and probably add more while he's at it |
21:56:20 | Araq | and ARC, we run every GC test with it, "koch boot" is close to working with it, I'm sorry it's so long in development but you *yourself* wanted a Nim without a GC... |
21:57:15 | Araq | and the code is cleaner than the old GCs too IMO. |
21:57:38 | rayman22201 | Jeeze. For such an important feature, arc has progressed very fast. How fast can you expect? |
21:57:45 | Araq | and it's based on AST rewrite... |
21:57:50 | liblq-dev | so I have a proc reading from ffmpeg's output, and ffmpeg reports some stats about the video encoding while it's being encoded, like `frame= 1 fps=3.0 [...]` |
21:57:58 | shashlick | looks like it is free rein |
21:58:06 | FromGitter | <deech> Araq, a talk on ARC internals at the possibly upcoming remote Nim conference would be amazing. |
21:58:08 | liblq-dev | I'd like to parse that `frame= 1` part and get the number out of it, what's the best way to approach this? |
21:58:09 | moerm | FWIW I don't care at all about fast. I care about solid |
21:58:13 | liblq-dev | strscans? pegs? |
21:58:15 | Araq | most of the time I actually do what I tell others to do. |
21:59:02 | liblq-dev | I tried the strscan "frame=$s$i" and the peg "'frame=' \s+ {\d+}", but both of them don't seem to match my string |
21:59:07 | Araq | shashlick: it's worth considering. |
21:59:28 | FromDiscord | <jackjia> Araq: what's the next step for DrNim? |
22:00:03 | moerm | Btw, is there any place where one can find stressable solid numbers about how many error there *really* are in the compiler and stdlib? |
22:00:10 | * | xace quit (Ping timeout: 258 seconds) |
22:00:24 | * | bozaloshtsh_ joined #nim |
22:00:25 | Araq | the issue tracker draws a realistic picture |
22:01:13 | moerm | Araq Thx. And? Is it as grim a picture as some seem to suggest? |
22:01:37 | * | muffindrake quit (Quit: muffindrake) |
22:01:38 | Araq | impossible to tell because the happy users and silent users. |
22:01:44 | Araq | *are |
22:02:05 | moerm | Hmm, yes quite likely |
22:02:48 | * | xace joined #nim |
22:02:54 | moerm | I'm getting senile. Till yesterday I was still using 1.0.6 and I was suprised to find 1.1 on git *embarrased |
22:03:03 | * | natrys joined #nim |
22:03:11 | * | stefantalpalaru_ joined #nim |
22:06:13 | Araq | jackjia: 'old(x)' needs to be implemented and we need look into using a CFG |
22:07:01 | moerm | Araq If you play it smartly, SA will give you a CFG basically for free |
22:07:34 | leorize | why doesn't distinctBase work on NimNode... |
22:07:34 | liblq-dev | could anyone please help? I'm stuck |
22:08:08 | * | bozaloshtsh quit (*.net *.split) |
22:08:10 | * | vegai quit (*.net *.split) |
22:08:13 | * | stefantalpalaru quit (*.net *.split) |
22:08:14 | * | JStoker quit (*.net *.split) |
22:08:16 | Araq | moerm: no idea how to do that |
22:08:33 | Araq | Z3 doesn't seem to offer anything like that (and why should it) |
22:08:57 | * | silvernode joined #nim |
22:09:00 | leorize | liblq-dev: try npeg? :p |
22:09:02 | axion | I can't figure out how to define a `[]` and `[]=` that allows getting/setting a Slice range for an object type that has an array. Can someone please show me how it's done? |
22:09:26 | liblq-dev | leorize: I think it's overkill, but I may have to resort to that if nothing else works |
22:09:45 | leorize | the only overkill part is that it's not in the stdlib :) |
22:09:48 | * | JStoker joined #nim |
22:10:03 | liblq-dev | not really, it's that I only need a single pattern. I have no need to parse an entire grammar |
22:10:11 | liblq-dev | and npeg was built for that |
22:10:15 | moerm | Araq A SA is *based* on CFG (well, most of them) |
22:10:26 | liblq-dev | but maybe I'm wrong. |
22:11:30 | FromDiscord | <Rika> axiom https://nim-lang.org/docs/system.html#%5B%5D%2Cstring%2CHSlice%5BT%2CU%5D |
22:11:34 | Araq | moerm: yes I know but Z3 doesn't do CFG construction |
22:11:39 | leorize | liblq-dev: I found your problem, I think |
22:11:50 | liblq-dev | what is it? |
22:11:58 | leorize | your patterns doesn't match because ffmpeg outputs more than just the frame in one line |
22:12:22 | liblq-dev | I thought that regexes ignore the rest of the pattern unless I add an anchor |
22:12:37 | liblq-dev | ah, pegs |
22:12:46 | leorize | you need explicit markers to ignore :P for strscans |
22:12:47 | * | jjido quit (Ping timeout: 246 seconds) |
22:12:54 | liblq-dev | yeah I was trying with regex too |
22:12:55 | liblq-dev | ok |
22:13:31 | liblq-dev | no, you use $. to achieve the inverted effect |
22:13:38 | liblq-dev | just checked the doc |
22:13:54 | liblq-dev | $. matches if the end of input has been reached |
22:14:18 | axion | @Rika I have tried using that, but it's trying to using a seq instead of a Slice |
22:14:29 | axion | I'm not sure what I'm doing wrong |
22:15:36 | FromDiscord | <jackjia> Araq: will you continue working on it or switching to other bug fix? even the current implementation already can found some bugs/uncatched exceptions in my code, it's useful |
22:16:27 | leorize | axion: https://play.nim-lang.org/#ix=2giu |
22:17:25 | Araq | jackjia: I cannot work on it anymore because some people in #nim cannot understand it and it's clever stuff. We should only do dumb stuff. |
22:17:46 | axion | Ah so you have to use a seq |
22:18:01 | Araq | we're programmers after all, we don't like to think. |
22:18:06 | moerm | Araq But *elegant* dumb stuff please! |
22:18:23 | * | natrys quit (Ping timeout: 250 seconds) |
22:18:51 | moerm | My aunt Mary used to think occasionally ... and now she's dead. Ergo: Thinking should avoided |
22:19:48 | FromDiscord | <Rika> anyone got a guide for converting numpy -> nim libs? |
22:19:58 | FromDiscord | <Rika> numpy usage i mean, not the numpy lib itself |
22:20:24 | FromDiscord | <Rika> no, im just crunching numbers, no machine learning here 😛 |
22:20:24 | moerm | numpy can be imported once the new Nim compiler is ready *g |
22:20:29 | FromDiscord | <Rika> pff |
22:21:05 | moerm | ;) |
22:22:07 | moerm | Seriously, don't we have a bigint lib? I seem to remember that we do |
22:22:27 | moerm | Otherwise just use a C lib and c2nim it |
22:22:41 | FromDiscord | <Rika> its arraymancer or stint dunno which has the functions of numpy though |
22:22:48 | FromDiscord | <Rika> probably arraymancer |
22:22:53 | FromDiscord | <Rika> hmm ill look into it |
22:23:13 | shashlick | Araq: question on incompleteStruct - if I use it on `struct X` withotu a header: pragma, it works fine - I can create a `var x: X` |
22:23:20 | liblq-dev | leorize: npeg doesn't even compile for me, no meaningful error message… http://ix.io/2giv |
22:23:32 | liblq-dev | I just tried to do `patt("frame=")` |
22:23:37 | FromDiscord | <Rika> WHAT |
22:23:46 | FromDiscord | <Rika> ARRAYMANCER HAS NUMPY FILE READING |
22:23:49 | go|dfish | liblq-dev: how are you reading ffmpeg's output? |
22:23:52 | FromDiscord | <Rika> god i could have used this for my research |
22:23:57 | FromDiscord | <Rika> should have checked ;; |
22:24:13 | shashlick | but if I add a header pragma, it complains about storage size |
22:24:15 | liblq-dev | go|dfish: via the inputStream provided by osproc, why'd you ask? |
22:24:51 | liblq-dev | there isn't a problem with blocking or anything, I'm reading char by char using readChar |
22:24:56 | liblq-dev | and discard all \n and \r |
22:24:57 | go|dfish | liblq-dev: ffmpeg prints a lot of stuff to stderr - may have something to do with your problem |
22:25:06 | liblq-dev | nope, I ignore that |
22:25:29 | liblq-dev | aah not inputStream but errorStream |
22:25:37 | go|dfish | yes but the data you're looking for could be going there |
22:25:49 | liblq-dev | it *is* going there and I am able to read it |
22:26:13 | liblq-dev | it's just that I'm unable to match that `frame= x` string |
22:26:41 | liblq-dev | I even checked if the line I'm reading begins with "frame", and it does |
22:26:46 | leorize | liblq-dev: I'm pretty sure that's not how you write an npeg pattern... |
22:26:51 | leorize | though you should report that issue |
22:27:16 | liblq-dev | leorize: how'd I do that then? I'm just trying to match the string "frame=" for now |
22:27:21 | leorize | Zevv likes to have good error messages, and that wasn't one |
22:27:24 | liblq-dev | not even any of the magic stuff |
22:27:29 | leorize | liblq-dev: does strscans work? |
22:27:39 | leorize | can you give me a line you received? |
22:27:44 | liblq-dev | sure |
22:28:01 | liblq-dev | leorize: |
22:28:04 | liblq-dev | frame= 63 fps=2.1 q=0.0 size= 1kB time=00:00:01.51 bitrate= 4.4kbits/s speed=0.0505x |
22:28:40 | liblq-dev | no '\n' at the end, I strip those off |
22:28:57 | liblq-dev | likewise no '\r', because that's what ffmpeg actually uses. |
22:29:43 | leorize | liblq-dev: try scanf again, it should work this time |
22:29:52 | leorize | you don't have to specify the full pattern it seems |
22:30:54 | * | vegai joined #nim |
22:32:31 | liblq-dev | oh shit it worked this time |
22:32:49 | liblq-dev | maybe it's because I put the relevant scanning code in a different block |
22:33:04 | liblq-dev | this script I'm writing is so convoluted, man… |
22:33:22 | axion | Well looks like I have to redesign a good chunk of this code, or wait until an issue I reported is resolved. It's causing issues all over the place |
22:33:22 | liblq-dev | should've thought it through a little bit better |
22:33:50 | shashlick | axion: which issue |
22:34:06 | axion | #13828 |
22:34:28 | * | abm joined #nim |
22:34:30 | shashlick | where's disbot, lazy bum |
22:36:07 | rayman22201 | Why not use varriounts work around? |
22:37:08 | axion | That would be the huge redesign, because it won't work if you have quote do. |
22:37:32 | axion | My macro is pretty complex (it's now a macro that generates templates instead of a template) |
22:38:18 | * | rnrwashere joined #nim |
22:38:43 | rayman22201 | You can add the dirty pragma to a generated template. |
22:39:05 | rayman22201 | Why won't it work with quote do? |
22:39:21 | axion | The issue is the generated templates are inside a quote do |
22:39:32 | axion | Try it. shrug |
22:39:55 | moerm | Have a good time everyone - cu |
22:40:03 | * | moerm quit (Quit: Leaving) |
22:40:26 | Araq | shashlick: ok, well? |
22:40:37 | Araq | what's the question about incompleteStruct? |
22:40:50 | * | rnrwashere quit (Remote host closed the connection) |
22:41:54 | shashlick | why does incompleteStruct work without header |
22:42:02 | shashlick | but with header, it complains about storage size |
22:42:04 | shashlick | missing |
22:42:51 | inv2004 | I have a question: I did addTimer(1000, false, sendingLoop) proc sendingLoop is closure, but nim raised error with something about GC until I set {.gcsafe.} on the closure which locks one external let |
22:43:44 | inv2004 | proc addTimer(timeout: int; oneshot: bool; cb: Callback) |
22:43:44 | inv2004 | ... first type mismatch at position: 3 |
22:43:44 | inv2004 | ... required type for cb: Callback |
22:43:44 | inv2004 | ... but expression 'sendingLoop' is of type: proc (fd: AsyncFD): bool{.closure, locks: <unknown>.} |
22:43:44 | inv2004 | ... This expression is not GC-safe. Annotate the proc with {.gcsafe.} to get extended error information. |
22:43:48 | inv2004 | ups, sorry! |
22:43:58 | shashlick | **`struct STRUCT0;`** => `STRUCT0* {.incompleteStruct, header: "header.h", importc: "struct STRUCT0".} = object` and `var **s0: STRUCT0**` |
22:44:04 | * | sleepyqt_ quit (Ping timeout: 256 seconds) |
22:44:26 | shashlick | results in `error: storage size of 's0__X8vUbe3oSrwuT7g3oGFTjQ' isn't known`, `struct STRUCT0 s0__X8vUbe3oSrwuT7g3oGFTjQ;` |
22:44:52 | inv2004 | so, the question was: why the closure is not GC-safe and is it correct solution to mark it gcsafe ? |
22:46:13 | Araq | shashlick: it only appears to work |
22:46:35 | Araq | but in reality you can only have a pointer to this struct |
22:46:56 | shashlick | ah, so my test case is bad then |
22:47:26 | Araq | inv2004: .gcsafety inference doesn't work well for lambdas, iirc. |
22:48:17 | shashlick | brilliant |
22:48:32 | shashlick | so once I add bitfield support, ast2 passes ast1 test cases |
22:48:36 | * | altarrel joined #nim |
22:49:20 | * | tane quit (Quit: Leaving) |
22:49:58 | * | xace quit (Ping timeout: 256 seconds) |
22:53:21 | inv2004 | @Araq, but how can I be sure that the .gcsafe. is ok here? |
22:56:15 | Araq | write it down, the compiler checks it for you |
22:56:47 | inv2004 | ok, probably another question: can I create projection from function and parameter? and pass the projection to addTimer then |
22:57:27 | inv2004 | addTimer(..., sendingLoop(myLockedValue: ...)) |
22:58:41 | * | lritter quit (Ping timeout: 250 seconds) |
23:02:16 | * | liblq-dev quit (Quit: WeeChat 2.7.1) |
23:03:30 | rayman22201 | @axion. Works for me: http://ix.io/2giI/nim and http://ix.io/2giJ/nim sorry took longer to test since I needed to use my local machine. Module imports require two files and I can't do that on the playground. :-( |
23:05:34 | * | inv2004 quit (Quit: Leaving) |
23:05:59 | axion | It's ok. I'll inspect, thanks. To be honest right now I am thinking about taking a step back from Nim until it matures a bit more. The bugs I'm running into (there are many more than this one), coupled with the lack of good documentation and learning resources is a constant struggle. |
23:06:21 | * | altarrel quit (Remote host closed the connection) |
23:09:01 | * | rayman22201 sigh |
23:09:59 | Araq | axion: please report the bugs |
23:10:21 | axion | I have reported the ones I could create isolated tests for |
23:10:21 | Araq | and you need no less than 3 `[]` accessors |
23:10:45 | Araq | `[]`(x: Container; index): T |
23:10:51 | Araq | `[]`(x: var Container; index): var T |
23:11:03 | Araq | `[]=`(x: var Container; index; value: T) |
23:11:03 | * | couven92 quit (Read error: Connection reset by peer) |
23:11:27 | * | couven92 joined #nim |
23:11:47 | Araq | not sure why it matters though, it's not like Lisp has anything like that ;-) |
23:12:11 | axion | setf operates on a place, so there is no need for it. |
23:13:00 | Araq | and what about the learning resources? there is plenty of stuff directly linked from our website |
23:15:07 | axion | I'm more concerned with the brief overview style of the manual |
23:15:41 | axion | It's not anything like a language specification. Too many things are unspecified or don't have exhaustive examples. |
23:16:05 | FromDiscord | <Rika> ive had no issues with writing nim code |
23:16:36 | FromDiscord | <Rika> i dont seem to see why others are |
23:16:39 | * | muffindrake joined #nim |
23:16:40 | FromDiscord | <Rika> i need help realizing ;; |
23:17:07 | Araq | we have tutorials too |
23:17:09 | axion | I have read all of the learning resources, including NIA which I bought |
23:17:34 | Araq | ok, so what's missing? |
23:18:34 | * | inv2004 joined #nim |
23:18:49 | * | inv2004 quit (Client Quit) |
23:19:02 | axion | Where in the manual is it mentioned that type parameters on an object can be accessed in a proc body that doesn't have type parameters in its signature? Where is it specified that pairs is always chosen implicitly with for `i,x in object` even if object is a var type? Can I rely on that? Where in the manual does it say I can rely on that if I don't want to be explicit? |
23:20:18 | axion | I believe these cases need to be documented so I can choose the right amount of concision without future breakage |
23:22:00 | Araq | https://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-implict-itemsslashpairs-invocations |
23:22:44 | FromDiscord | <Rika> i dont understand the former |
23:22:57 | Araq | https://nim-lang.org/docs/manual.html#generics-implicit-generics |
23:23:39 | * | abm quit (Read error: Connection reset by peer) |
23:25:07 | Araq | and as others have noticed your bug has an easy workardound |
23:25:09 | Araq | template genAccessor(t, a, i) {.dirty.} = |
23:25:10 | Araq | template a*(q: t): float32 {.inject.} = q[i] |
23:25:10 | Araq | template `a=`*(q: var t, value: float32) {.inject.} = q[i] = value |
23:26:50 | Araq | though when I follow what the compiler does, I am not sure it's a bug, I debugged this template expansion mechanism to death |
23:27:20 | axion | Yes I am experimenting with that now, but that's just 1 bug I found in my first trivial code |
23:27:35 | rayman22201 | Sure seems counter-intuitive. If I export something, I expect it to be exported... |
23:27:55 | Araq | hygienic templates are simply not intuitive, .dirty templates are |
23:28:11 | Araq | we added lots of rules to make them "intuitive", we failed |
23:28:27 | Araq | instead we should have made them simple, then people can learn them |
23:28:42 | * | arecaceae quit (Remote host closed the connection) |
23:28:54 | leorize | Araq: I got a generic proc definition, how can I check if a type (an nkSym) can be matched with it in a macro? |
23:29:05 | * | arecaceae joined #nim |
23:29:14 | axion | I understand about hygeienic and unhygeinic macros. They're both pretty intuitive to me after using them for decades. |
23:30:09 | dwdv | Is DrNim intended to be what spark is to ada, an external tool? Or is there a good chance, many moons down the road, that it will be an integral part of the compiler and thus language supporting good old design-by-contract programming? |
23:30:38 | Araq | axion: well Nim's rules are not. |
23:31:21 | rayman22201 | question is, is this a doc bug? I.E. the current rules need be explained better somewhere? or is this a compiler bug? |
23:32:16 | Araq | rayman22201: the rules are clear for anything but "templates inside templates" |
23:32:42 | rayman22201 | lol. So lets figure out the rules for "templates inside templates" then :-P |
23:33:34 | Araq | dwdv: external tool and unlikely to become part of the compiler |
23:33:36 | axion | There's also export issues elsewhere |
23:34:06 | Araq | and it's not about "design-by-contract", it's about verification. |
23:35:50 | Araq | axion: can't fix what is unreported |
23:36:06 | axion | It was reported |
23:36:34 | Araq | what's the issue number? |
23:37:27 | axion | Well one of them would be #13673 |
23:37:39 | axion | A module, or a whole library with a bunch of mathematical constants in it or something, issues compiler warnings because using just a constant from a module isn't seen as using the module. Harmless, but still a thing. |
23:38:10 | rayman22201 | I think part of axions issues are doc discoverability. The docs are there, but it's sometimes seems hard for people to find what they are looking for? |
23:38:36 | Araq | well he did read them all |
23:39:06 | axion | I read the entire manual 3 times linearly from start to finish and I still find a lot of questions that aren't answered there |
23:40:18 | rayman22201 | can you write those questions down and give them to us? |
23:40:29 | * | Trustable quit (Remote host closed the connection) |
23:40:48 | axion | When the survey came a few months ago, I was quick to write down what I would like to see is more detailed and more example-filled documentation. |
23:41:04 | rayman22201 | Araq gave you links to the dos for the examples you posted, but idk if those are satisfactory. |
23:41:08 | axion | Sure, I will do that as they come to me from now on |
23:41:13 | FromDiscord | <clyybber> Holy shit |
23:41:16 | Araq | axion: thanks |
23:41:26 | FromDiscord | <clyybber> FWIW I found compiler refactorings/cleanups were pretty welcome |
23:41:34 | FromDiscord | <clyybber> If they really improved stuff |
23:41:47 | * | xace joined #nim |
23:41:47 | FromDiscord | <clyybber> And the compiler is not broken |
23:41:54 | FromDiscord | <Rika> T_T arraymancer doc search doesnt work |
23:41:55 | FromDiscord | <clyybber> Clearly you haven't looked at other compilers |
23:42:13 | rayman22201 | thanks axion. really. We want to improve, but we really need concrete issues. (I know that can be time consuming.) |
23:42:22 | Araq | axion: and btw when people say "better docs" we now think they mean "cannot copy&paste API calls around" |
23:42:25 | FromDiscord | <clyybber> dom96: So you want better parallellism/concurrency? But you don't want static analysis and gc:arc? |
23:42:37 | Araq | clyybber: you're too late |
23:42:45 | Araq | discussion moved on |
23:42:47 | FromDiscord | <clyybber> krux02: You want to remove all features, even refs, because you don't understand why you would need them.. |
23:42:49 | Araq | but thanks for supporting me |
23:42:53 | FromDiscord | <clyybber> Araq: I see |
23:43:13 | FromDiscord | <clyybber> I'm just gonna finish my rambling 😄 : |
23:43:20 | rayman22201 | lol |
23:43:37 | FromDiscord | <clyybber> Its easy to not like features/improvements and wanting to remove all of them when you don't understand them in the first place |
23:44:09 | * | clyybber joined #nim |
23:46:30 | rayman22201 | araq, you are right about "copy and paste" syndrome lol. I see it my day job all the time. So many "why doesn't this work?". You look at what they send and it's a copy pasted example, with a comment right at the top that says: "THIS IS FOR EXAMPLE ONLY. DO NOT USE IN PRODUCTION" X.X |
23:46:45 | axion | I support Sraq's decision to work on DrNIM ARC in an effort to replace some of the bad parts of the compiler, because what I would like to see is more stability. |
23:46:49 | axion | Araq's* |
23:48:15 | Araq | thanks. and yeah, Nim has stability problems, but let's take https://github.com/nim-lang/Nim/issues/13673 and analyse it a bit |
23:48:32 | axion | err, DrNim and ARC. I do think though that we need to hire someone to start squashing some bugs, especially thoe tagged with "crash" |
23:48:38 | Araq | 1.) the feature "unused import" is actually rather new and iirc I added it for v1 |
23:48:57 | * | krux02_ joined #nim |
23:49:04 | Araq | 2.) it's not as simple as it seems since your usage of the symbol is inside a generic |
23:49:14 | Araq | which has a 2 phase lookup going on |
23:49:25 | Araq | comparable to C++'s problems |
23:49:47 | axion | That said, I have only wanted 1 feature request that I held back from requesting because I don't want to see new features being worked on over bugs squashed. |
23:49:48 | Araq | there is an RFC improving the situation, "let's use concepts to typecheck generics properly" |
23:50:09 | Araq | scheduled for 2021 |
23:50:38 | Araq | and yet I get blamed for not working on concepts. |
23:50:52 | axion | concepts are custom type classes, right? |
23:50:55 | Araq | look, I don't want to fix concept bugs, I seek to redo them completely. |
23:51:18 | Araq | and that can be seen as "bah, a new feature" |
23:51:21 | FromDiscord | <Rika> do we really need to redo them? |
23:51:39 | * | krux02 quit (Ping timeout: 252 seconds) |
23:51:45 | FromDiscord | <Rika> is it at a state of disrepair that it needs to be redone |
23:51:57 | Araq | IMHO yeah |
23:52:54 | clyybber | krux02_: While we are at it, why does it behave like this: https://github.com/nim-lang/Nim/issues/13724 ? |
23:53:07 | clyybber | IMO typedesc should behave like a static type |
23:53:19 | axion | I didn't mean to come as as so critical. I really do love Nim. But I keep asking myself if I will have as much bitrot and stability issues as say D, or (gasp) Rust |
23:53:27 | clyybber | axion: Its FUD |
23:53:37 | clyybber | FUD is maybe the wrong word |
23:53:55 | rayman22201 | I also basically agree with your current roadmap araq. for what it's worth. 🤷 |
23:54:11 | Araq | and once again |
23:54:21 | Araq | it's the *bugfixes* that cause regressions |
23:54:29 | Araq | I know it's a terrible situation |
23:55:26 | Araq | but this is the reality: imagine we only fix bugs for one year, and let's say we're good at it and get 200 fixed. |
23:55:36 | Araq | the result isn't a "more stable" nim. |
23:55:50 | Araq | the result is that your code stopped to compile. |
23:56:07 | Araq | if you have a good solution to that problem I'm all ears |
23:57:02 | Araq | so far I came up with an RFC process plus a --useVersion emulation |
23:57:12 | clyybber | Its perfect this way IMO |
23:58:14 | Araq | today's devel broke my Karax project. |
23:58:24 | Araq | I fixed it, no big deal, one line change |
23:58:57 | Araq | but in the larger picture it means Nim's ecosystem constantly breaks |