<< 01-04-2020 >>

00:02:33blackbeard420LOL vim³ looks awesome!
00:02:48rayman22201lmao, I saw that on HN, and I didn't even realize it was written in Nim.
00:03:14axionI need some help.
00:03:15dom96:o
00:03:18axionLemme make a playground
00:03:28rayman22201axion, 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:46rayman22201wow, 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:52axionhttps://play.nim-lang.org/#ix=2gaF
00:06:14*dadada joined #nim
00:06:38*dadada is now known as Guest1269
00:08:44rayman22201looking and thinking ^
00:13:47*Guest1269 quit (Ping timeout: 260 seconds)
00:14:10rayman22201seems to just work? https://play.nim-lang.org/#ix=2gaH
00:15:15axionnope...
00:15:35axionhttps://play.nim-lang.org/#ix=2gaI
00:15:50axionoh wait...you mapped vec2 differently
00:16:32axionYeah ok, that seems to work. Thanks!
00:16:41rayman22201👍
00:17:17axionideally i'd want the template to expand to 2 templates. no need for function overhead there
00:17:25axionwonder if that will cause any problems
00:19:05*silvernode joined #nim
00:20:41rayman22201like this? https://play.nim-lang.org/#ix=2gaL
00:20:41rayman22201feels like premature optimization. I would expect those functions to get inlined anyway? but you can do it I believe.
00:21:02axionCool. How do I expand a template? expandMacros doesn't seem to be doing anything
00:21:16*dadada__ joined #nim
00:21:45rayman22201good question... I'm not sure if we have a way to expand templates...
00:22:17axionAh hmm
00:22:22madpropsthe nim package in ubuntu is practically useless if it's too old
00:22:59rayman22201poke the ubuntu people to upgrade?
00:23:32madpropswell no use if im running an LTS release
00:23:35axionIf you care about stability, use a Debian derivitive. If you're a developer, don't.
00:24:15madpropswould be ok if nimble could update everything somehow
00:24:41Yardanicochoosenim exists :P
00:25:02madpropsoh forgot about that
00:25:55rayman22201I think expandMacros **should** work on templates, but I'm not sure
00:26:17axionWell I'd like to see an example of that working, because I am then doing something entirely wrong.
00:27:06rayman22201oh, it's working for me?
00:27:31rayman22201The output gets put in the compiler output, not the output of the program.
00:27:49rayman22201https://play.nim-lang.org/#ix=2gaO
00:27:49axionoh so you can't use nim playground to see it anyway?
00:28:03rayman22201you can. click on the button that shows "Showing: output"
00:28:11rayman22201it will switch to "showing: debug"
00:28:14rayman22201it's a toggle switch
00:28:16*rnrwashere joined #nim
00:28:21axionoh :)
00:28:40rayman22201probably need better docs for that :-)
00:28:42axionNo idea how I missed that.
00:29:10rayman22201NP. it's not entirely obvious
00:29:53axionnow it would be super nice if it worked recursively
00:30:09axionBecause that would really be the only use for expanding a template...to see the final code gen
00:30:34axionie; instead of printing the inner template calls...expand those too
00:30:49rayman22201The VM is really sensitive to recursion, that's why it doesn't
00:31:13rayman22201You can embed "expandMacro" statements in your macro to simulate it though.
00:31:43axionIn Lisp we have macroexpand-1 (which this is doing) and macroexpand (which is what I want). Oh well
00:35:11moerm_- Back -
00:35:20rayman22201It'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:55rayman22201just be careful about the VM. it has a low recursion limit. I would probably unroll the recursion into a loop.
00:37:20axionThanks. 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:32rayman22201fair enough. 😉
00:40:28FromGitter<zetashift> Isn't there a switch that increases that recursion limit?
00:41:47*rnrwashere quit (Remote host closed the connection)
00:42:26rayman22201yes, 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:30rayman22201I 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:14moerm_See you all tomorrow
00:45:23*moerm_ quit (Quit: Leaving)
00:53:48FromGitter<zetashift> gnight moerm_
00:54:35axionrayman22201: interesting...
00:55:08axionif i change the procs to templates like you did, the expansion doesn't have the * for exporting them
00:55:45axionand i indeed do get compile errors when trying to access the members across modules
00:55:53rayman22201sure enough... that's a bug. please report!
00:58:36axionI will, even though my bug reports don't seem to get any replies :)
00:59:28FromGitter<zetashift> limited manpower
01:00:03FromGitter<zetashift> I don't think that means they go unnoticed axion
01:00:06axionI'm not knocking on Nim, but I do think the 1.0 stability guarantee was a few years premature
01:00:41leorizestable just means that your code won't break in updates :)
01:00:44rayman22201*cough* I agree *cough* pre-mature marketing *cough*
01:00:48axionJust in my first library I'm finding a lot of compiler bugs
01:01:07*rnrwashere joined #nim
01:01:16leorizethe original plan was to pause it until we got rid of all the bugs :)
01:01:35FromGitter<zetashift> I found it too, but more people using Nim (because of 1.0) might also mean more bugs being discovered
01:02:55leorizeyep, 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:00rayman22201The 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:05axionThat is a valid point. There are never no bugs. users.inc if you ever think so
01:03:47FromGitter<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:49leorizeI find it interesting that no one complains about style insensitivity any more
01:03:53FromGitter<zetashift> YES
01:04:37rayman22201lol. lets hope it stays that way :-P
01:05:58FromDiscord<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:21leorizeit was stable
01:06:24leorize:P
01:07:11leorizesince 0.19 IIRC
01:07:12FromDiscord<Benumbed> Ok, well, I never heard or read that 🙂
01:07:21FromGitter<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:29FromDiscord<Rika> oof
01:07:33rayman22201It was FUD honestly
01:07:37FromDiscord<Benumbed> Not saying it wasn't communicated, just that I didn't actually see a "no more grammar changes"
01:07:41FromGitter<zetashift> I don't think anyone asked if the grammar was stable :P
01:07:58FromDiscord<Benumbed> And I came back because I assumed it was in 1.0, haha 😄
01:08:11leorizeit's still not stable btw :)
01:08:54leorizeit's not like the language is gonna turn upside down in just a release :P
01:08:58FromDiscord<Benumbed> Regardless, I'm using it seriously now though, if only for personal stuff
01:09:14leorizeunless you're julia-lang, they messed up their 1.0 hard
01:09:19FromGitter<zetashift> How's the ride so far?
01:09:21rayman222011.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:52FromDiscord<Benumbed> That's really all you can ask for too
01:09:58FromDiscord<Rika> what happened with julia's 1.0?
01:09:58rayman22201talking about Nim. I don't know jack about Julia. (sorry, got irc snipped)
01:10:10FromDiscord<Benumbed> I just don't want my code that I worked so hard to to randomly break in odd ways 🙂
01:10:20leorizejulia removed all deprecated things when they release 1.0
01:10:35leorizebreaking a tons of libraries
01:10:49rayman22201lol. fail
01:11:20FromGitter<zetashift> wasn't that because 0.6 was basically the road to 1.0
01:11:21FromDiscord<Rika> how much time did they give for the deprecated things though
01:11:25axionhttps://github.com/nim-lang/Nim/issues/13828
01:11:39FromGitter<zetashift> so that basically the jump to 0.6 to 1.0 was non-existant
01:12:02rayman22201Then 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:22FromDiscord<Rika> deprecated things should disappear some update no?
01:12:33FromDiscord<Rika> it just depends how much time itll take
01:12:54axionThe people in my circle won't touch Nim because "it doesn't offer anything over Rust". Sigh
01:13:06leorizerust is the new hip thing now
01:13:10FromDiscord<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:26rayman22201yup. exactly what nim does
01:13:39rayman22201sigh... Nim offers waaayyy better ergonomics than Rust
01:13:40leorizeyea, we got that ever since packages testing was brought into CI
01:13:51axionI'm actually looking forward to Jai though, if it ever comes out of vaporware
01:14:15rayman22201axion, for your usecase in particular, I don't blame you.
01:14:22FromDiscord<Benumbed> Rust makes you scale a concrete wall with rusty nails pointing out at you for their learning curve
01:14:42axionrayman22201: what do you mean for my usecase?
01:14:46rayman22201games
01:14:46leorizeI just dislike their grammar
01:14:51axionOh yeah :)
01:15:00FromDiscord<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:07leorizethough I haven't looked at rust for quite sometime
01:15:17FromDiscord<Benumbed> Also the Nim community is nice, vs Rust, they tended toward the rabid side
01:15:24FromDiscord<Benumbed> and Go people and their idoms...
01:15:26FromDiscord<Benumbed> lord
01:15:47FromGitter<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:09leorizeonce Nim is big enough you'll see that kind of things too
01:16:09FromDiscord<Benumbed> agreed
01:16:20FromDiscord<Benumbed> Which is why I'm ok that it's small right now! 😄
01:16:24FromGitter<zetashift> haha
01:16:32rayman22201Dr. Nim + arc gives Nim equivalent guarantees as Rust (arguably the potential to have even better guarantees.)
01:16:55FromDiscord<Benumbed> and why I'm trying to contribute by writing useful libraries, even if I'm slow as hell at it atm
01:16:57FromGitter<zetashift> I hope they document those stuff for beginners. One thing Rust did really well is their book
01:17:04axionWhat is Dr. Nim, and what is CFG? I've seen both mentioned here this week a lot but I am clueless :)
01:17:21rayman22201https://github.com/nim-lang/Nim/blob/version-1-0/lib/core/macros.nim#L507
01:17:25FromGitter<zetashift> book/documentation they made the entry really low even tho it's such a hard to learn language
01:17:33rayman22201Dr. Nim is embedding a proof checker into Nim
01:17:39rayman22201Ada Spark style
01:17:45leorizeaxion: CFG is control flow graph
01:17:57FromGitter<zetashift> Using Z3
01:18:18FromGitter<zetashift> whoops forgot this: https://github.com/Z3Prover/z3
01:18:22axionAh yeah. I had to use z3 to solve a really complex control flow graph in my game engine. Good stuff
01:18:55leorizethe compiler also got itself a CFG for destructors injection
01:18:57FromGitter<zetashift> I think it used Zevv's z3 bindings as a base?
01:19:10leorizethough it's not used anywhere else yet
01:19:24leorizemaybe we can finally fix `not nil` with it :P
01:19:43leorize@zetashift: yea
01:19:43rayman22201CFG can also be used to optimize async :-)
01:20:49FromGitter<zetashift> Is DrNim slated for 1.2?
01:23:36rayman22201not sure
01:25:55FromGitter<zetashift> Oh well I'm looking forward to it
01:26:03FromGitter<zetashift> Goodnight y'all
01:27:27*chemist69 quit (Ping timeout: 252 seconds)
01:27:29rayman22201gn o/
01:27:38axionrayman22201: Quick question. With your playground code, how come I'm not allowed to do `Quat.genAccessors(w, 0)` ?
01:28:12rayman22201Quat is a type. UFC syntax doesn't work on types
01:28:23axionAh ok
01:28:25rayman22201a `typedesc`
01:29:26*chemist69 joined #nim
01:32:55leorize[m]rayman22201: ufcs does work on typedesc
01:33:18rayman22201oh? then why doesn't axion's example work?
01:33:38leorize[m]someone even used that to simulate python's forced module qualifier in Nim
01:34:13*rnrwashere joined #nim
01:34:19rayman22201actually, you are totally right. I just tried it, and it works
01:35:06rayman22201@axion. what error do you get?
01:35:15rayman22201https://play.nim-lang.org/#ix=2gb0
01:36:36leorizethe issue you might be facing is how untyped param don't bind too well with UFCS
01:38:23rayman22201It's a template though, it's all untyped?
01:38:44axionerror| cannot use symbol of kind 'type' as a 'param'
01:41:17rayman22201axion. see my nim playground link. It works there.
01:41:32axionyeah i'm trying to find a repro. it doesnt in my code
01:41:34axionone sec
01:42:54axionOh I see
01:43:38axionhttps://play.nim-lang.org/#ix=2gb4
01:43:59axionI changed `q` to `t` since it isn't specific to Quat now. Non-ucs works, but not ucs
01:44:48FromDiscord<Rika> you're getting symbol collision i think
01:45:00axionBut only with UCS. weird
01:45:12FromDiscord<Rika> yeah works when you rename t to ty
01:45:38axionalso works if for the below 3 calls using `t`, just not ucs
01:46:14rayman22201oh yeah, in templates, it will replace the param everywhere. so "proc(t:t)" expands to "proc(Quat: Quat)"
01:46:19rayman22201probably not what you want
01:47:21axionYeah I wasn't going to stay with it. Was just trying to figure out why it only doesnt work with UCS
01:47:43axiontbh 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:55FromDiscord<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:59axionHow do I write a macro with `quote do` inside a for loop to generate N forms?
02:04:22axionStruggling 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:31rayman22201stupid example but here: https://play.nim-lang.org/#ix=2gba
02:22:07*Asgaroth_ joined #nim
02:22:43axionThanks
02:25:23*Asgaroth quit (Ping timeout: 260 seconds)
02:26:41axionWhat's wrong here? https://play.nim-lang.org/#ix=2gbb
02:32:39*endragor joined #nim
02:33:31rayman22201a is a runtime string.
02:33:33rayman22201https://play.nim-lang.org/#ix=2gbe
02:33:47rayman22201that works, though might not do what you expect. (It prints the individual chars)
02:34:49axionAha, 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:40rayman22201Glad I could help.
02:43:07axionThank you for all your help today :)
02:43:12rayman22201Static in macros is not the best documented feature...
02:43:21rayman22201Np 😊
02:44:16axionIt'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:36axionLike, why not produce any output at all if it's not static? A warning would suffice at least
02:45:55Yardanicodom96: 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:04Yardanicos/then/the
02:47:43rayman22201It'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:57rayman22201Treated*
02:48:29axionI see. It seems this structure won't work for what I need it for anyway
02:48:45axionI'd like to produce proc definitions
02:49:34rayman22201you 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:37axionI tried that
02:50:58*rnrwashere quit (Remote host closed the connection)
02:52:35rayman22201If 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:58rayman22201well, it makes macros, not procs, but there is no difference really. (Just the ast node type)
02:53:29axionhttps://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:56rayman22201off 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:10axionThat's ok :)
02:55:11rayman22201https://play.nim-lang.org/#ix=2gbm
02:55:15rayman22201You don't need `ident`
02:55:43axionwithout it i got Error: identifier expected, but found '"x"'
02:56:30*waleee-cl quit (Quit: Connection closed for inactivity)
02:56:38rayman22201oh, hold on.
02:56:40rayman22201easy fix
02:59:03rayman22201https://play.nim-lang.org/#ix=2gbn
02:59:12rayman22201two things. 1. you need static again
02:59:22rayman222012. you can't call ident inside quote do
02:59:56axionlet's see if i can beat myself to death with static today
03:00:17leorizethat's a lot of statics :P
03:00:20rayman22201lol. I can see why it's not intuitive for a lisper :-P
03:00:23*hax-scramper joined #nim
03:00:33axionWell thanks. That should be enough to get me going
03:00:57rayman22201np 🚀
03:03:24axionThe most confusing thing for a lisper is that ` means quasiquote in Lisp, whereas ` is "unquote" within the quasiquote form quote do :)
03:03:31axionI keep getting tripped up by that
03:04:41rayman22201it's inverted? interesting.
03:04:51axion`(1 2 ,(+ 1 2)) ; => (1 2 3)
03:05:05axioncomma is the unquote in lisp
03:05:24rayman22201that makes some elisp code I was looking at make more sense now lol
03:07:31rayman22201unfortunately 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:34FromDiscord<Rika> some of us bullshit our variable names though...
03:08:36axionIt'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:43FromDiscord<Rika> < - - - - - -
03:08:49axionin Lisp, you manually gensym what you want
03:09:03FromDiscord<Rika> i think thats a good thing
03:09:07rayman22201that is definitely a good thing imo
03:09:12axionIt is
03:09:27rayman22201isn't that schemes whole schtick? hygenic macros?
03:09:46rayman22201the common lisp vs. scheme split
03:09:46axionYes. I dislike it very much for that reason and more
03:10:00FromDiscord<Rika> it -> scheme?
03:10:11FromDiscord<Rika> why dont you like hygienic macros?
03:10:14*rnrwashere joined #nim
03:10:42axionYes, I don't like Scheme. When I say "Lisp" I mean Common Lisp.
03:10:55axionScheme is pretty much an entirely different language for a lot of reasons
03:11:10axionElisp is closer to CL than Scheme by far
03:12:13axionI 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:21axionrayman22201: Part of it. The bigger reason is the Lisp-1vs Lisp-2 case
03:14:51axionLisp-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:00axionSo Scheme, is a Lisp-1
03:15:53FromDiscord<Rika> sounds like ass
03:16:07axionIn Common Lisp, symbols are actually objects that include a variable binding and function binding member (amoung other members)
03:17:53axionand 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:17axionCL 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:08axionI 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:18FromDiscord<Rika> is nim an algol derivative?
03:33:31axionYes
03:33:55*thomasross quit (Remote host closed the connection)
03:34:13*thomasross joined #nim
03:37:21axionhttp://blog.daveastels.com.s3-website-us-west-2.amazonaws.com/images/languages/PLchart.png
03:37:24FromDiscord<Yardanico> @Rika https://en.wikipedia.org/wiki/Generational_list_of_programming_languages#ALGOL_based
03:37:24FromDiscord<Yardanico> https://cdn.discordapp.com/attachments/371759389889003532/694752249049776259/2020-04-01-06-37-06_grim.png
03:37:57axionNim would be somewhere far to the right within the huge cluster of Algol derivatives
03:45:15FromDiscord<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:27leorizeiirc 4raq say that Nim have a lot more in common with modula 3
03:53:34*Asgaroth_ quit (Ping timeout: 256 seconds)
03:53:46rayman22201Yeah. Iirc 4raq's idea was to try and bring a lisp like macro system to modula. Something like that.
03:57:16axionHow do I make an identifier `foo=` to be used as a proc name, given an existing ident foo?
03:57:28FromDiscord<Rika> In quote do?
03:57:28*rnrwashere quit (Remote host closed the connection)
03:57:57FromDiscord<Rika> You need to make an accquoted nimnode I think, then use that in quote do
03:58:41axiontrying to fix the second proc in test2: https://play.nim-lang.org/#ix=2gbz
04:01:06FromDiscord<Rika> https://play.nim-lang.org/#ix=2gbA
04:01:20FromDiscord<Rika> ah wait, made a mistake
04:03:18FromDiscord<Rika> https://play.nim-lang.org/#ix=2gbB
04:03:23FromDiscord<Rika> axion ^
04:03:44axionah a new node type to look up. Thanks :)
04:04:16*rnrwashere joined #nim
04:05:17*narimiran joined #nim
04:10:24axionWhat 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:26FromDiscord<Rika> id just call them bracket getters and setters
04:14:48*moerm joined #nim
04:15:16axionok
04:17:23*opal quit (Ping timeout: 240 seconds)
04:17:53*moerm quit (Client Quit)
04:20:37*opal joined #nim
04:20:47axionwell my first non-trivial macro seems to work.
04:20:52axionthanks 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:03axion@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:39axionOr rayman22201 for that matter. I'm pretty close to how I want it
04:45:55*silvernode quit (Ping timeout: 265 seconds)
04:46:19voltistCould anyone recommend a Nim image manipulation library?
04:49:01rayman22201voltist: https://nimble.directory/search?query=Image
04:49:42rayman22201axion: what is your question?
04:50:23*opal quit (Ping timeout: 240 seconds)
04:50:46axionrayman22201: 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:52FromDiscord<Rika> https://play.nim-lang.org/#ix=2gbT best i could think of, axion
04:58:35voltistrayman22201: If I wanted a list of image libraries I would have asked for one. I'm wondering if anyone has any recommendations.
04:59:12FromDiscord<Rika> sorry, got no recommendations
04:59:26FromDiscord<Rika> only one i used was nimpng but that was more "parsing" than "manip"
04:59:38axion@Rika tried running it and it errors
04:59:49FromDiscord<Rika> oh no did i fuck up
04:59:51FromDiscord<Rika> lets see if i did
05:00:00rayman22201Why don't you give some details on what features you actually want? Image library is pretty freaking general
05:00:07rayman22201Also don't be an ass hole
05:00:08FromDiscord<Rika> what errors axion
05:00:10voltistrayman22201: Sorry, that came out a little harsh.
05:00:22axion@Rika just click Run :)
05:00:33FromDiscord<Rika> aw shite
05:00:36FromDiscord<Rika> ill fix em sorry
05:00:55voltistI'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:21FromDiscord<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:11axionCan I call it like `Quat.genAccessors w, x, y, z` without the parens?
05:03:22FromDiscord<Rika> dont know, i think you can
05:03:30FromDiscord<Rika> testing right now
05:03:47axionThat'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:52FromDiscord<Rika> yeah you can
05:04:02axionbrackets don't matter then
05:04:20FromDiscord<Rika> https://play.nim-lang.org/#ix=2gbV
05:05:28axionWhat did you change besides the signature?
05:05:33rayman22201Sorry, 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:32axionOh I see. the $ for idents
05:06:36FromDiscord<Rika> yeah
05:06:39axionThanks. exactly what i was looking for
05:06:48zedeusnimagemagick is an outdated wrapper, this native one is great https://github.com/SolitudeSF/imageman
05:08:04voltistrayman22201: 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:13axionoh very nice. starred
05:09:27voltistrayman22201: Thanks for the help though. Sorry again for being harsh just earlier, I don't know what came over me.
05:12:11rayman22201NP. All good. Sorry we couldn't be more helpful 👍
05:13:05zedeusvoltist: maybe combining imageman/flippy and this? https://github.com/treeform/typography
05:13:16axionThanks 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:28voltistzedeus: 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:08rayman22201Oh, we have ggplot
05:15:29zedeusmaybe consider this https://github.com/Vindaar/ggplotnim
05:15:38rayman22201https://github.com/Vindaar/ggplotnim/blob/master/README.org
05:15:49rayman22201Sniped again lol
05:18:19voltistrayman22201: 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:27rayman22201Fair 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:58FromDiscord<Varriount> Hrm, this is an interesting PR - https://github.com/nim-lang/Nim/pull/13813
06:53:48FromDiscord<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:23axion@Variount you on mumble?
07:12:03axion@Varriount *
07:20:26*liblq-dev joined #nim
07:22:29*rnrwashere quit (Remote host closed the connection)
07:23:42FromDiscord<Varriount> Axion: I can get on
07:36:59FromGitter<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:11YardanicoFinally 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:57madpropssomething 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:49PMunchYardanico, haha that's nice
08:39:49*hax-scramper quit (Ping timeout: 264 seconds)
08:40:11livcdmadprops: Nim program?
08:40:13*fanta1 joined #nim
08:43:49madpropsyeah
08:43:49*zslkhmctpfr is now known as cfhklmprstz
08:45:28livcdmadprops: Could you do this? https://scripter.co/nim-deploying-static-binaries/
08:46:52*hax-scramper joined #nim
08:52:29madpropsi migh try that, thanks livcd
08:57:25*dadada joined #nim
08:57:49*dadada is now known as Guest16200
08:58:49livcdthanks 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:53FromDiscord<Recruit_main707> this guy... XD https://github.com/oakes/vim_cubed
09:08:17*hax-scramper quit (Ping timeout: 256 seconds)
09:08:39rmtembeddable vim for games .. I like it! :)
09:08:54rmtOr boss mode. :)
09:10:00*JustASlacker joined #nim
09:10:07*hax-scramper joined #nim
09:12:35dom96Yardanico: 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:44dom96(and fix it of course)
09:18:15PMunchRecruit_main707, maybe that's how I should stream my coding
09:18:36FromDiscord<Recruit_main707> probably ngl
09:18:59PMunchI like the README as well, "How do I stop the cube from spinning?" "No"
09:20:17skrylar[m]so i saw we have an experimental option to make macros that override for loops
09:20:27skrylar[m]and remembered people were asking about tqdm clones
09:21:41PMunchMacros that override for loops?
09:22:05PMunchThis paravim stuff is actually pretty neat
09:23:03*rnrwashere joined #nim
09:26:06*abm joined #nim
09:26:55federico3https://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:46FromDiscord<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:05skrylar[m]@PMunch https://nim-lang.org/docs/manual.html#macros-for-loop-macro looks almost made for tqdm lol
09:37:48PMunchHuh, that is actually pretty cool
09:38:11PMunchNot 100% sure what it offers over just an iterator though..
09:38:22PMunchShort of allowing some optimisations
09:42:43*Guest16200 is now known as dadada
09:44:19skrylar[m]eeh well tqdm is a python package that wraps over an iterator to automatically do a progress bar for it
09:44:35dadadawith experimental dotOperators you can't use macros as I noticed while testing https://play.nim-lang.org/#ix=2gdf
09:45:07skrylar[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:00dadadaI 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:36skrylar[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:25PMunchSorry 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:03FromDiscord<Varriount> It's fine. I was busy pretty much all day
09:58:41dadadaAraq: 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:05AraqI don't know
09:59:36dadadafiar
09:59:39dadadafair
09:59:40Araqexplain the issue in an issue
10:00:01Araqor 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:12PMunchWell I mean this works dadada: https://play.nim-lang.org/#ix=2gdp
10:27:55PMunchI think this might be a regression TBH
10:28:01PMunchI could have sworn that this used to work..
10:28:34PMunchHmm, maybe not
10:28:38PMunchTried with an older version
10:30:11dadadaPMunch: what do you mean? the example 2gdp seems to work, right? Maybe my example is just buggy?
10:30:46PMunchYeah, that works, but try to add a `.` proc that takes a Test and any other type
10:31:43dadadayeah, then I get undeclared identifier y/x
10:34:11*cfhklmprstz is now known as qwertfisch
10:34:15dadadaso the issue is that proc`.` prevents from macro`.` from being considered somewhere in the resolution process
10:35:37PMunchYeah
10:35:44PMunchWhich I think is a bug
10:36:28dadadame too :-)
10:41:20FromGitter<Vindaar> just doing some pandas comparisons over here
10:41:30FromGitter<Vindaar> (https://files.gitter.im/nim-lang/Nim/rJmQ/bench_create_column_openmp.png)
10:41:57FromGitter<Vindaar> ugh, forgot to give that a white background
10:42:26FromDiscord<Rika> hard to read indeed
10:44:45FromGitter<Vindaar> (https://files.gitter.im/nim-lang/Nim/F4Ng/bench_create_column_openmp.png)
10:45:00FromDiscord<Recruit_main707> when are wikipedia stats updated?
10:45:01FromGitter<gogolxdong> How to append sequence safely from threads?
10:45:36FromDiscord<Recruit_main707> Viddaar: is that logaritmic scale?
10:45:48stefantalpalaruIs there a way to access all the C compiler options passed to {.passc: .} from Nim code?
10:46:00FromDiscord<Rika> please choose more distinct colors 😦
10:47:32FromGitter<Vindaar> @Recruit_main707: yup. x axis is 10^label in column size. y is obviously logarithmic
10:47:45Araqgogolxdong: you need a 'SharedSeq'
10:48:13FromGitter<Vindaar> if it wasn't clear "pd_" are pandas benchmarks, "df_" my own
10:48:17FromGitter<gogolxdong> What's that , how to make it?
10:54:58*sleepyqt_ joined #nim
10:56:08*silvernode joined #nim
10:56:41Araqgogolxdong: can you use --gc:arc already?
10:56:42*hax-scramper joined #nim
10:58:52*JustASlacker joined #nim
10:59:56FromDiscord<HutchyBen> Im looking to learn nim what kind of programs does it specialize at making
11:00:21FromDiscord<Recruit_main707> what would you like to do?
11:00:29FromDiscord<Rika> its pretty general
11:00:29FromDiscord<Recruit_main707> nim can do pretty much anything
11:00:42FromDiscord<HutchyBen> oh nice
11:00:56FromDiscord<Recruit_main707> if C can, Nim can, (with more or less effort)
11:01:14FromDiscord<HutchyBen> and c can do almost anything so cool
11:01:45PMunchAnd if JS can, Nim can as well
11:01:57PMunchSo you should be set to create pretty much anything
11:01:59FromDiscord<Recruit_main707> true
11:02:39FromDiscord<Recruit_main707> would the js backend be deprecated if a wasm one was ever created?
11:03:09FromDiscord<Rika> likely not
11:03:16FromDiscord<Rika> is wasm useful for nodejs
11:03:33FromDiscord<Recruit_main707> idk XD
11:07:37FromGitter<lxdong007> not sure about CMP, I am working on another project.
11:09:20PMunchHutchyBen, where did you hear of Nim since you wanted to try it by the way?
11:09:24PMunchJust out of curiosity :)
11:11:06FromGitter<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:54PMunchYes, using a shared heap and global variables should be possible with ARC
11:18:59FromGitter<lxdong007> Is shared heap state of art usage of arc? Is there any example?
11:19:20FromGitter<alehander92> https://news.ycombinator.com/item?id=22743267
11:19:35FromGitter<alehander92> nim on hacker news
11:23:48PMunchHaha, didn't realise that repo has so many funny issues as well
11:24:10go|dfishit was #1 on r/programming for most of yesterday too
11:24:54FromDiscord<Rika> its great though
11:25:18PMunchWhat, vim3?
11:27:17FromDiscord<HutchyBen> im trying to set ip vim3
11:27:39FromDiscord<HutchyBen> it cant recognise a dll tho >.<
11:28:12FromGitter<alehander92> rayman22201
11:28:20FromGitter<alehander92> do you plan on providing async executors
11:28:28FromGitter<alehander92> if you guys make an async with state machines
11:28:57livcdi tried to compile parsetoml with arc :-[
11:28:59livcdno luck
11:29:17FromGitter<alehander92> like i dont understand them very well, but i think i would love to have custom async engines
11:29:29FromGitter<alehander92> so one can like customize how async is running for its domain/app
11:29:36FromGitter<alehander92> e.g. https://os.phil-opp.com/async-await/#cooperative-multitasking-1
11:30:05FromGitter<alehander92> (and a custom executor if i am understanding corretly)
11:31:25PMunchHutchyBen, what dll?
11:31:35PMunchlivcd, :( what went wrong with it?
11:32:19liblq-devPMunch, @HutchyBen it's vim³™, not any ordinary vim3
11:32:39PMunchVim³, happy?
11:32:44FromGitter<alehander92> https://blog.yoshuawuyts.com/state-machines/
11:32:56FromGitter<alehander92> araq do you mean this for typestate in rust
11:32:58PMunchJust forgot how to type ³ on this layout
11:33:19FromGitter<alehander92> i imagine you can do it with `requires`
11:33:26FromGitter<alehander92> but no overloading on requires
11:33:47FromGitter<alehander92> i imagined before that one can overload using annotation like that but probably too confusing
11:33:55FromDiscord<Recruit_main707> .b and .a were the equivalent to [0] and [1]?
11:34:00FromGitter<alehander92> and requiring z3 support always
11:35:11PMunch@HutchyBen, in case it didn't highlight you before: What dll is the issue?
11:36:35FromGitter<alehander92> https://github.com/oakes/vim_cubed/issues/22
11:36:38FromGitter<alehander92> i think this one
11:37:22*tane joined #nim
11:39:43FromDiscord<Recruit_main707> this code doesnt compile on 1.1.1 https://play.nim-lang.org/#ix=2gdG
11:39:44PMunchYeah I realised
11:40:36FromDiscord<Recruit_main707> its an issue with the pair.a and pair.b thing
11:40:42FromDiscord<Recruit_main707> has it been changed?
11:41:09FromDiscord<Recruit_main707> (note that someone gave me this code)
11:41:54*silvernode quit (Ping timeout: 240 seconds)
11:44:14PMunchRun likes a charm on Linux this vim³ thing :(
11:44:16PMunch:)*
11:46:12PMunchI like the description in the .nimble file. Vim for masochists
11:51:14livcdPMunch: something with deep copy :O
11:51:23livcdPMunch: sorry I have not really investigated more as I did not need arc
11:51:39jkenThat 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:36PMunchjken, link?
11:52:55*couven92 joined #nim
11:53:04jkenhttps://forum.nim-lang.org/t/6136
11:55:10PMunchOh man
11:55:31PMunchThrowing 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:35FromDiscord<djazz> I for one welcome our (C)Python overlords!
12:12:20*Vladar quit (Quit: Leaving)
12:14:49FromDiscord<Recruit_main707> this almost got me lol.
12:14:51FromDiscord<Recruit_main707> i was like, wtf have they done!
12:15:06PMunchHaha :P
12:15:22narimiran:)
12:16:21AraqXD
12:16:44Araqand I thought I could have been more subtle
12:17:25federico3Araq: 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:34dom96finally an april fool's joke
12:24:39*dadada joined #nim
12:24:40dom96took us long enough :)
12:24:59FromDiscord<Recruit_main707> have yall searched Bing in Google yet?
12:25:03*dadada is now known as Guest5205
12:26:40dom96narimiran, your tweet could have been much shorter and much more click baity
12:26:54dom96"Big announcement: we're rewriting Nim in Python"
12:27:03PMunchWhat does "./koch boot -d:release" actually do?
12:27:19narimirandom96: eh, probably, but i find that too click-baity and less-believeable
12:27:43PMunchRecruit_main707, anything supposed to happen?
12:27:46narimiranPMunch: is this a start of some joke?
12:27:51PMunchHaha, nope
12:28:13PMunchSomeone on HN asked how fast Nim was at compiling
12:28:18FromDiscord<Recruit_main707> PMuch: internet prank to google
12:28:23PMunchI thought I'd cite him how fast it compiled Nim
12:28:48narimiranPMunch: it bootstraps the compiler, but it takes several iterations to do that
12:28:59narimiranmaybe `koch temp` would be better to use as an example?
12:29:27dom96narimiran, it's just the tweet doesn't even say that Nim will be rewritten in Python
12:29:37dom96the forum thread even says that
12:30:25PMunchnarimiran, yeah that's what I was wondering
12:33:19*krux02_ is now known as krux02
12:34:06FromGitter<alehander92> i honestly often do nim -d:release compiler/nim.nim
12:34:10FromGitter<alehander92> with some other flags
12:38:36AraqIMHO 'koch boot' should now default to -d:release
12:39:32*rockcavera quit (Remote host closed the connection)
12:39:32AraqI use 'koch temp' when I'm after stack traces
12:45:34FromDiscord<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:09liblq-devam I the only one who strongly prefers `import module for a, b, c` instead of `from module import a, b, c`?
13:11:26liblq-devI first saw that in Wren and imo it's a shame that Nim doesn't have a syntax like this
13:12:37liblq-devthe thing that pisses me off with `from x import y` is that it doesn't line up with other imports
13:14:00FromGitter<gogolxdong> createShared, resizeShared,freeShared
13:14:04FromDiscord<mratsim> Python does the same
13:16:40liblq-devI have to fix that in rod :P
13:16:50liblq-devwhen I get to imports, of course.
13:17:11liblq-devright now I'm burnt out after my battle with generics
13:19:18Araqliblq-dev: it's a good point, 'from x import y' is inferior
13:20:08liblq-devin my eyes it just looks bad next to my other imports
13:20:19liblq-devthat's why I avoid using it
13:20:45liblq-devI can always reference the module explicitly anyways
13:25:33PMunchliblq-dev, that syntax is actually pretty nice
13:25:40liblq-devwhich one?
13:26:04PMunchThe `import module for a, b, c`
13:26:27*lritter joined #nim
13:27:12liblq-devyeah, and it doesn't waste another keyword, it just reuses `for`
13:32:42*Vladar joined #nim
13:40:25FromGitter<alehander92> Araq
13:40:31FromGitter<alehander92> i am working on the sourcemap PR
13:40:51FromGitter<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:06FromGitter<alehander92> it still doesnt make sense to use one right, just a option flag
13:41:48Araqoption flag seems fine or attach it to the existing --debuginfo flag
13:43:21FromGitter<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:01Araqplease don't, the proliferation of flags and options is killing me
13:46:16FromGitter<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:23FromGitter<alehander92> ok
13:56:18PMunchHmm, I wonder if I can take an ASCII art generator and feed it Vim³ so I can run it in my terminal..
14:02:10FromGitter<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:01FromGitter<alehander92> guys what do you think of https://sulami.github.io/posts/common-lisp-restarts/
14:05:42FromDiscord<Kiloneie> why is sleep() an unknown identifier for me ?
14:06:04FromGitter<alehander92> import os ?
14:06:10FromDiscord<Kiloneie> ooh
14:06:15FromDiscord<Kiloneie> ups
14:06:31FromGitter<alehander92> you're still sleeping :)
14:06:33FromDiscord<Kiloneie> forgot os is not default imported
14:06:42FromDiscord<Kiloneie> i thought it was for some reason
14:06:59FromGitter<alehander92> yeah, you can write your own `common` file
14:07:05FromGitter<alehander92> to import if you usually use the same imports
14:07:13FromGitter<alehander92> which exports such imports
14:07:18FromGitter<alehander92> e.g. `import os ... export os `
14:07:48FromDiscord<Kiloneie> nice trick okay
14:08:01FromGitter<alehander92> i think local people call it prelude
14:08:07FromGitter<alehander92> e.g. i think karax had it
14:08:21FromGitter<alehander92> but not sure overally
14:08:26dom96Nim has it
14:08:27FromDiscord<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:29dom96include prelude
14:08:50FromDiscord<Kiloneie> i think people would like that idk, probably help with some examples for the docs
14:09:06Araqalehander92: the style says sourceMap
14:09:09FromDiscord<Kiloneie> which are quite empty in some modules
14:09:22FromGitter<alehander92> Araq ok, but my question is because
14:09:32FromGitter<alehander92> all the flags seem to use lowercase
14:09:37FromGitter<alehander92> e.g. nilcheck
14:10:02FromGitter<alehander92> nilseqs etc
14:10:31FromGitter<alehander92> dom96 but import prelude would be better, right
14:11:06FromGitter<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:54dom96sure, but IIRC you cannot export modules
14:12:49FromGitter<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:48FromGitter<mratsim> @Araq @Andrewrk: were is the joined April’s Fool? https://github.com/nim-lang/Nim/pull/13757
14:33:56FromGitter<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:16Yardanico@mratsim something like "We decided to combine Zig and Nim into one programming language which'll be the best"?
15:02:33FromGitter<mratsim> called Zim
15:03:42YardanicoZim name is already taken :P https://en.wikipedia.org/wiki/Zim_(software)
15:03:57FromGitter<mratsim> doesn’t matter, Nig is a bit awkward
15:04:02Yardanicooof
15:04:04FromGitter<mratsim> and it’s only for a day
15:04:13narimiranYardanico: i use Zim, btw
15:04:31FromGitter<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:59FromGitter<alehander92> dont like 1 april jokes, but i'd like some zig features
15:06:00FromGitter<alehander92> :D
15:06:08Yardanicome too *hides*
15:07:20dom96Zimrod :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:59FromGitter<alehander92> yardanico dont hide
15:13:13FromGitter<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:23FromGitter<mratsim> Zigrod :p
15:17:55FromGitter<alehander92> guys
15:18:01FromGitter<alehander92> do we have nim syntax support in chrome
15:18:26*Vladar quit (Remote host closed the connection)
15:18:44FromGitter<alehander92> sorry i got confused , we dont :D
15:19:41Yardanicowdym in chrome? like an extension?
15:22:22FromGitter<alehander92> in developer console
15:27:59*dinu99 quit (Remote host closed the connection)
15:29:18*filcuc joined #nim
15:37:23FromGitter<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:14FromGitter<Yardanico> maybe you want HashSet, not the built-in "set" type?
15:38:34FromGitter<Yardanico> check out https://nim-lang.org/docs/sets.html
15:42:20FromGitter<rishavs> the way the document is written is pretty confusing but I want the mathematical sets, where I only have unique values
15:42:47narimiranuse `incl`, not `add`
15:42:52narimirana.k.a. read the docs
15:43:49FromGitter<rishavs> aye. found it. :D
15:44:12FromGitter<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:08rayman22201alehander92: just waking up. You pinged me?
16:12:24rayman22201We have custom async executors already. We call it "the event loop". See httpbeast for an example of a custom one.
16:14:47FromGitter<zetashift> Is there a scenario where you would use sets and not HashSets?
16:15:04FromGitter<zetashift> ah nvm it's right under there, sets are used for bit flags
16:15:40leorizethat's the C FFI use case
16:15:54leorizethough it's used for writing flags in Nim too :P
16:16:24*abm quit (Quit: Leaving)
16:28:15FromGitter<zetashift> leorize do you even sleep
16:28:35leorizemaybe :)
16:32:14*inv2004 joined #nim
16:33:04inv2004Hello, are there any way to write in script-style, but with async?
16:33:21leorizescript-style?
16:33:38inv2004I mean that I do not want to define main() {.async.}, but still want to use async.
16:34:02leorizeI don't think you should/can
16:34:10leorizedo you have an example usecase in mind?
16:35:48inv2004@leorize, it is quite simple - if you use nim like bash - you do not want to define functions without reasons
16:36:18FromGitter<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:39FromGitter<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:02FromGitter<kayabaNerve> And as the Nim filter system goes line by line, you can't replace line endings with `\r\n ` and compensate.
16:37:46inv2004@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:05FromGitter<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:40FromGitter<kayabaNerve> But I mean, hey, if you want to write a macro `asyncMain:` to expand to those two statements, go ahead.
16:39:16leorizeinv2004: or you can write it like this: let resp = waitFor client.request; let data = waitFor resp.body() :p
16:39:22dom96yeah, you can't
16:39:31dom96but if you're writing scripts, why even use async?
16:39:55inv2004@dom96, good question - I did not think about it, because I can :)
16:41:23dom96lol
16:41:24inv2004@leorize, nice idea, thank you!
16:41:39dom96well 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:30leorize\o/ macros in typedef is now a thing
16:56:30FromDiscord<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:21FromDiscord<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:17leorizeyea you should sleep :)
16:58:18FromDiscord<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:47FromDiscord<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:02FromDiscord<Benumbed> I would sleep if I could, bad insomnia for the last 3 days 😦
16:59:07*inv2004 joined #nim
17:00:17leorizenot looking at the screen is a good way to change that :)
17:02:14FromGitter<geotre> Are there any libraries for async/await on js backend (apart from asyncjs) ?
17:03:55FromDiscord<Benumbed> leorize: I went to bed at 2am as usual and laid there until 5am, no lights, no screens
17:04:04FromDiscord<Benumbed> just brain that won't sleep
17:05:19leorizethat doesn't sound good :(
17:05:44FromDiscord<Benumbed> Story of my life, haha
17:05:57leorizewell go see a doctor I suppose :)
17:06:09FromDiscord<Benumbed> I have, multiple times
17:06:18FromDiscord<Benumbed> Oh and sleep aids generally don't work on me
17:06:47FromDiscord<Benumbed> My doctor calls me 'an interesting anomaly'
17:08:42FromGitter<kayabaNerve> Is there a way I can force a ref to be freed?
17:09:02leorizekayabaNerve: yes, but no
17:09:22FromGitter<kayabaNerve> I didn't think so outside of reference count manip
17:09:56leorizewell the idea of the GC is that you don't do this kind of "forcing free"
17:10:25leorizebut if it's the last reference (ie. not referenced elsewhere by anything)
17:10:33leorizeset the ref to nil, then run GC_fullCollect()
17:10:46leorize(please never do that in real programs)
17:11:43leorizethe memory held by the ref might be freed
17:12:24leorizethough any finalizer will still be called if it's not freed
17:13:41leorizemight be freed because the GC can and does keep a pool of small memory segments
17:14:09leorizeit will accumulate the "freed" memory for a big free()
17:14:16leorizeand can also reuse them irrc
17:14:18leorizeiirc*
17:15:54FromGitter<kayabaNerve> leorize: I'm creating duplicates of 512 MB objects somehow, despite using refs, and need to clear them in my tests
17:16:34FromDiscord<Recruit_main707> how can i pass a function to a template/macro, and get the name of that function?
17:17:10leorizeRecruit_main707: wdym by passing a function? like this? `macro(foo)`
17:17:23FromDiscord<Recruit_main707> yes
17:17:30leorizethen the node will depend on the type of the param
17:17:56FromDiscord<Recruit_main707> the param is the function?
17:18:05leorizeif 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:14leorizegetting the name is as simple as .strVal :)
17:18:26leorizeif it's an indent, well kinda same story :P
17:19:04leorizekayabaNerve: refc is not really deterministic
17:19:14leorizeyou'd really want arc for that
17:21:41FromDiscord<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:41FromDiscord<Recruit_main707> its a very specific problem, it will be shorter if you dont ask why i do it ;)
17:24:06leorizehttps://play.nim-lang.org/#ix=2gg7
17:24:18leorizethe magic of emit :)
17:24:53*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:26:02FromDiscord<Recruit_main707> lmao, i didnt know about those XD
17:26:05FromDiscord<Recruit_main707> thanks
17:26:26leorizehttps://play.nim-lang.org/#ix=2gg9
17:26:27FromDiscord<Varriount> Hm. Araq, how do other languages handle the aliasing situations that the Nim spec currently says are not allowed?
17:26:37leorizeand here's the macro version if you'd like to know how to get the name
17:27:28FromDiscord<Recruit_main707> lovely, thank you very much, i am finally seeing the potential of metaprogramming.
17:29:11*rockcavera joined #nim
17:36:37FromGitter<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:11FromGitter<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:04leorizedo you have a finalizer to deallocate the pointer?
17:41:08FromGitter<kayabaNerve> Though I'm not entirely sure how to check that. I guess register a destructor for the ref?
17:41:20FromGitter<kayabaNerve> ... nope. Nim won't do it automatically either.
17:41:22FromGitter<kayabaNerve> That's my fault.
17:41:25FromGitter<kayabaNerve> Thanks.
17:41:56leorizeyou can write a destructor and it'll be transformed into a finalizer automagically
17:42:41FromGitter<kayabaNerve> Yep
17:48:00*solitudesf- joined #nim
17:49:44shashlickAraq: 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:44leorizefinally I can make my `ctype` macro and it wouldn't look weird :)
17:51:41zacharycarterdoes anyone use kakoune with Nim?
17:59:50*rnrwashere quit ()
18:03:34solitudesf-yes
18:04:10zacharycarterNice! Do you use the kak plugin system?
18:04:27zacharycarterplug.kak or whatever?
18:04:33solitudesf-nope
18:05:03zacharycarterah 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:36solitudesf-you dont need plug.kak for that
18:06:40solitudesf-only thing needed is to do launch kak-lsp and run lsp-enable
18:06:58zacharycarterokay I'm doing that - so hopefully it's just working already and I'm unaware :)
18:07:55rayman22201Hey zacharycarter. Been a while since we've seen you on irc. Hope all is well!
18:08:14solitudesf-there is lsp-capabilities command to check if its working
18:11:21zacharycarterI'll try that, thanks
18:11:37zacharycarterHey rayman22201: Thanks! All is good, just getting settled into my new digs in Austin
18:11:55rayman22201nice! great timing lol
18:12:10zacharycarterHaha yeah! Just in time to really really settle into them
18:12:36zacharycarterhope you are doing well too!
18:12:57FromGitter<zetashift> great to see you again zachary :D
18:13:25zacharycarterHi zetashift! Likewise!
18:20:41FromGitter<alehander92> zacharycarter how are youu
18:20:57FromGitter<alehander92> rayman22201 so hm
18:22:04FromGitter<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:17rayman22201alehander92 sorry. I need more context. what are you trying to do?
18:33:31rayman22201I 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:23FromGitter<alehander92> well i just read about https://os.phil-opp.com/async-await/#cooperative-multitasking-1 implementation a bit :D
18:36:59FromGitter<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:09FromGitter<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:38zacharycarterHi alehander92! Good thanks! You?
18:43:00rayman22201ah! yes! I saw that article as well. It's on my reading list :-)
18:44:49rayman22201Nim 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:42FromGitter<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:20liblq-devhey zacharycarter!
18:48:41*rockcavera joined #nim
18:50:16zacharycarterHi liblq-dev!
18:52:32rayman22201Httpbeast 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:57rayman22201It's not "the cleanest" architecture, but it works quite well.
18:53:08federico3:-/
18:53:57rayman22201??
18:58:25*kenran quit (Ping timeout: 264 seconds)
19:02:16shashlickdeech what exactly you trying to do
19:04:28FromGitter<deech> Figure out what `nimbleDir` is at build time.
19:05:38shashlickWhat for, curious
19:06:22FromGitter<deech> So I can pull in some third party sources like llvm.
19:09:08shashlickNot using standard Nim search of pkgs?
19:11:41*PMunch quit (Quit: leaving)
19:16:50*moerm joined #nim
19:16:57moermgood day everyone
19:17:53moermI just opposed Araq in the "Nim goes Python" forum thread. Sorry but his plan looks unsound and timid to me
19:19:03rayman22201moerm. It's an april fools joke. You are aware of that right? or are you trolling? lol
19:20:10rayman22201ah. I see. lol. the joke continues
19:20:27Zevvhe best jokes are the ones that keep on giving. Didn't see that coming with this one tho :)
19:21:31moerm*g
19:21:42moermWe must be BOLDER!
19:24:27rayman22201hahahaha. AI for everyone!
19:25:38rayman22201I think we rewrite nim in Perl 6... wait, I mean Raku :-P
19:26:05*jjido joined #nim
19:27:17moermNope. 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:29rayman22201lol
19:32:02nisstyrethe site is down
19:32:09*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:32:22nisstyreor it was...
19:32:30rayman22201it's up for me?
19:32:38nisstyreI got some cloudflare errors
19:32:42nisstyremaybe it's region specific
19:32:46moermNuh, I think it's just CloudF§&?# f*cking up as they often do
19:32:53go|dfishhad cloudfare errors here too, back now though
19:33:11rayman22201🎉
19:34:32rayman22201@krux02, @Varriount, you have to explain to me why you don't like `{.byaddr.}` I don't get it.
19:35:19moerm"low latency", my ass. I *often* see sites suffering from having made themselves CouldF§&?' dependent
19:36:16*mal`` quit (Quit: Leaving)
19:40:26moermI/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:09moermAnd btw. I would NEVER give away my private key to a 5 eyes company
19:42:07moerm(because I wouldn't do hosting with NSA or GHCQ)
19:42:41rayman22201well, 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:48nisstyreit's better than trusting google or microsoft
19:48:05nisstyrebut they do some weird stuff
19:49:11moermYeah, "for free", that's the bait getting many hooked
19:49:28moermBut it is NOT FREE. YOU DO PAY! Just not with money
19:49:39rayman22201When you are a small open source project, you take what you can get
19:50:16moermWell, I'm not here to preach. If that is what you want then go ahead and BE THEIR PRODUCT
19:52:03rayman22201🤷 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:43moermNo 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:38axiono/
20:05:12axionI'm trying to understand if I can rely on something about iterators that doesn't seem to be mentioned in the spec
20:06:07FromDiscord<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:09FromGitter<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:11FromDiscord<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:09rayman22201Hrmm. I agree it's unsafe. Better documentation is always good. It's more than that. Timothees point about pointer escaping is important.
20:09:20krux02rayman22201, There are multiple reasons I don't like byaddr.
20:09:41krux02First of all, it is yet again another feature that needs to be mantailed and implemented in all backends.
20:09:55krux02This is not something that can be resolved in the frontend.
20:10:15FromDiscord<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:21krux02Then it is proposed by a specific author who has a tendency of introdcing unnecessary features.
20:10:34krux02Then the proposal is convoluted with things I don't want to read.
20:12:27rayman22201Can you elaborate on the point about not being able to be resolved by the front end?
20:12:32krux02How is byaddr supposed to work in javascript?
20:13:02krux02rayman22201, byaddr means that something is literally taken by address. Pointers are not a thing in javascript.
20:13:29krux02they are emulated
20:13:33rayman22201But there are other features like this that don't work in js
20:13:55krux02that is not the point.
20:13:55rayman22201regular addr has the same problem
20:14:28rayman22201It 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:05krux02Anyway, 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:33zacharycarterlol that's mean
20:16:49krux02I don.t care.
20:16:52*solitudesf joined #nim
20:17:01FromGitter<moerm_gitlab> Yay, I managed to get a gitter account (had to create a gitlab account first. Weird)
20:17:11krux02He cause so much pain for me, that I don't care about his feelings.
20:17:27zacharycarterwell - I'd be lying if I said you were the only person I think feels that way
20:17:30zacharycarterlolol
20:17:38rayman22201I understand your frustrations, but I'm trying to be objective
20:18:05krux02moerm: congratulations, now come back to IRC :P
20:18:15rayman22201Lol
20:18:24FromGitter<moerm_gitlab> Let's crucify him!!!(peoples front of Judea)
20:18:45FromGitter<rishavs> Is there anyway to iterate over the members of a set? Or perhaps to convert a set into a sequence?
20:19:09krux02rayman22201, the best I can do about staying objective about timothees contributions is if I ignore all his opinions.
20:19:36krux02I mean bugs are not an opinion. and timothee is very qualified to detect them.
20:19:45krux02But I don't want his solutions.
20:20:17FromGitter<moerm_gitlab> Do we know how Araq feels about him?
20:20:35rayman22201Araq accepts the PRs lol
20:20:43krux02If 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:03krux02I don't want these features that are hanging in the void and are used by nobody.
20:21:20FromGitter<moerm_gitlab> rayman does that mean that Arq accepts pretty much anything or that he thinks Timothee's stuff is OK?
20:21:27rayman22201I'm assuming timothee has projects.
20:21:34krux02A feature needs to have real world use cases to get it right.
20:21:53krux02and that is not limited to his feature requests.
20:22:16krux02I would even go so far and delete the feauter request template for github issues.
20:22:19*moerm quit (Quit: Leaving)
20:23:00krux02I am assuming timothee is 100% busy finding issues and solutions for bugs in Nim.
20:23:03rayman22201Araq liked the feature. Krux wants no new features. Krux is a bit extreme imo
20:23:15rayman22201But I understand his feelings
20:23:21krux02just look at the amount of issues and PR he posts.
20:24:03FromGitter<moerm_gitlab> rayman Hmmm, thx
20:24:05rayman22201But this is all besides the point. I'm just trying to understand this specific feature.
20:24:06krux02Yes I don't want any new feauturs. The compiler is already burning because of bugs and inconsistencies.
20:24:29krux02But that doesn't mean I wouldn't accept new feauters. The bar to accept new feauters should be high though.
20:24:47krux02So high that it is almost impossible to get new feautures into the language.
20:24:47FromGitter<moerm_gitlab> krux Cool down. The new Python based Nim is comping
20:24:50FromGitter<moerm_gitlab> -p
20:25:19krux02gdb nim integration is written in python if that counts.
20:25:58FromGitter<moerm_gitlab> A good start. But we need an AI that recognizes our dancing moves and expresses them using void pointers only
20:25:58krux02Especially features where somebody things it would be useful should not become part of Nim.
20:26:09krux02yea that joke is old by now
20:26:36FromGitter<moerm_gitlab> krux So sorry, pls forgive my attempt to cool you down a bit
20:26:45krux02But 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:54krux02I am not upset.
20:27:19krux02I am just frustrated, I am frustrated for quite some time about things that go wrong in the Nim compiler development.
20:27:22rayman22201You always sound a bit upset these days.
20:27:39*filcuc joined #nim
20:27:42krux02You are not part of that. You just triggerd something so I realeased my frustration.
20:27:53krux02There are other things as well.
20:27:58rayman22201I'm an optimist. I think things will improve 😊
20:28:08krux02No I don't think so.
20:28:12rayman22201I hope anyway
20:28:22FromGitter<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:08krux02Araq 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:35FromGitter<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:47krux02Yes Araq gave us Nim, that that is great.
20:29:58axionAs 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:18dom96FWIW I agree with krux02's concerns
20:30:52FromGitter<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:31krux02And no I don't want to fork Nim.
20:31:58krux02For the most part, I don't think Nim will survive a community split.
20:32:56FromGitter<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:16krux02I am not questioning that.
20:33:38krux02I am questioning his ability to make the right decisions to keep Nim alive.
20:33:38FromGitter<moerm_gitlab> krux No. Not a community splitting fork but one that is, let's call it "conservative"
20:34:15krux02A conservative Nim that throws out all the dead code
20:34:28krux02and removes these incomplete feautures like hot code reloading.
20:34:41krux02and concepts
20:34:48*jjido joined #nim
20:34:50FromGitter<moerm_gitlab> Yes, something along that line. No funny gadgets, no experimental stuff, only plain solid Nim
20:35:08FromGitter<moerm_gitlab> plus static verif.
20:35:13krux02I am all for that.
20:35:15FromDiscord<Varriount> https://play.nim-lang.org/#ix=2ghX
20:35:46FromGitter<moerm_gitlab> You see, we NEED Araq to be "playful" and open to ideas. That's how Nim came into existence
20:36:02FromGitter<moerm_gitlab> At the same time many of us need Nim to be a solid tool.
20:36:11krux02moerm: I know that.
20:36:27krux02But now it is time for Nim to become a more boring language.
20:36:46krux02Stop playing around. Get the shit out of the way and fix bugs.
20:37:01euantorA 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:05krux02Playing is for Nim users not compiler developers.
20:37:20FromGitter<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:37krux02euantor, you don't know about all the surprise feautures in Nim.
20:37:40Yardanicoto be honest I agree with krux02
20:37:46axionI 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:56euantorkrux02: does anybody truly know them all?
20:38:18FromGitter<moerm_gitlab> euantor Yep, solid proper docu would be a part of the "conservative Nim brother" too
20:38:18dom96axion, premature? We've been working on Nim since 2008
20:38:25krux02well, I don't know them, but I guess I triggered them all once.
20:38:46rayman22201@varriont are you showing me the unsafe nature of the feature?
20:38:51axionPremature 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:52dom96But yes, I agree, 1.0 is the time to get down and fix bugs
20:38:55krux02I totally agree, version 1.0 was premature. I told Araq so.
20:39:00dom96not work on ARC, static analysis features and whatever else
20:39:03krux02But he wanted a version 1.0.
20:39:06euantorI 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:23FromDiscord<Varriount> rayman22201: Yes
20:39:30krux02I told him, if Nim doesn't open new issues/bugs for a week, then version 1.0 could get an RC
20:39:43dom96but I understand that fixing bugs day in day out can seriously affect burnout rate
20:39:47krux02and if it continues to be bug free for a month it could be called version 1.0.
20:39:56rayman22201I already knew that @Varriount. Again. I don't think it's worse than our other unsafe features
20:40:15rayman22201I think 1.0 was good for only one thing, marketing.
20:40:17FromGitter<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:23federico3axion: having a stable 1.0 spec enables bugfixing in the compiler
20:40:29euantorRegarding 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:39FromDiscord<Varriount> Yes, but how long will proper static verification take?
20:40:39krux02dom96, 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:39dom96moerm: sorry, but I have no use for static verification, and most programmers don't either
20:40:52krux02and yes, it is tough especially if you don't know the compiler.
20:40:54*inv2004 joined #nim
20:40:59dom96moerm: it's cool, but there are more important things that should have resources put into them
20:41:20FromGitter<moerm_gitlab> dom96 safety was one of the priorities I looked for when I came to Nim
20:41:22krux02But surprise feauters that are sprinkled accross the entire codbase with a lot of dead code everywhere seriousld affects productivity.
20:41:35krux02And guess what happens when I tried to clean up that mess.
20:41:39rayman22201dom96: completey disagree about static verification
20:42:01zacharycarter+1 - isn't that why Rust is so popular?
20:42:07zacharycarterbecause of static verification?
20:42:10rayman22201Exactly
20:42:15FromGitter<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:16federico3is it?
20:42:21FromDiscord<Varriount> rayman22201, moerm: Yes, but how long will it take to come out with something that is usable, and actually *complete*?
20:42:29zacharycarterI don't know - I'm asking
20:42:43krux02here this is what happens when I try to get red of dead code: https://github.com/nim-lang/Nim/pull/11981
20:42:57FromGitter<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:58dom96moerm: it does mean that, resources are limited.
20:42:59federico3zacharycarter: I doubt it. It's popular because of marketing
20:43:30krux02It happend every time I tried to clean up the code.
20:43:37dom96Rust is popular because it guarantees memory safety at compile-time
20:43:50FromGitter<moerm_gitlab> Varriount That's a question for the Nim team, not for me
20:43:51zacharycarterwell yeah - I think that played a huge role in its meteoric rise in popularity
20:43:53dom96That is not what I am referring to when I talk about static verification
20:43:55rayman22201What do you think static verification will let you do?
20:44:15krux02yes rust is popular because of that guarantee, but it struggles in compile time.
20:44:35krux02it also struggles in being very verbose with move semantic annotations.
20:44:35shashlicklet me ask a basic question here - how many of you can review compiler PRs? not in terms or permissions but know-how
20:44:39FromGitter<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:52axionAs such a lot of Rust devs have been ironically migrating to using more dynamic dispatch
20:44:59krux02All of the sudden all I see is a forest of move and borrow operators attatched to everything.
20:45:21krux02shashlick, I can
20:45:56FromGitter<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:13shashlickkrux02: wasn't directed at you 🙂
20:46:27FromGitter<moerm_gitlab> shashlick but at?
20:46:33shashlickmoerm: time is the most basic qualification
20:46:34FromDiscord<Rika> good morning
20:46:35FromDiscord<Varriount> I could probably learn.
20:46:41FromGitter<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:20shashlickhaving 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:35shashlicki've had this conversation before - some people are good at creating, some are good at sustaining
20:47:36FromGitter<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:50dom96shashlick, yes, when Araq was working in his spare time
20:47:54krux02zetashift: I with HCR and concepts would be removed from the compiler core code base.
20:47:58dom96but that isn't the case anymore, many are giving donations to Nim
20:48:08dom96they deserve to give their opinion on what should be worked on
20:48:13*inv2004 quit (Ping timeout: 264 seconds)
20:48:15FromGitter<zetashift> @krux02 moved to libraries you mean?
20:48:21krux02yes
20:48:25rayman22201I love the idea of HCR, but I'm ok with killing it if it can't be maintained
20:48:27FromGitter<moerm_gitlab> shashlick That's why I demand nothing from Araq - but I'm very pleased with much of what he does
20:48:29krux02some compiler plugin.
20:48:33FromDiscord<Rika> on stdlib or nimble?
20:48:36FromGitter<zetashift> I think HCR could stay but I wouldn't mind a nim-prelude of sorts that contains it
20:48:45FromGitter<zetashift> it being concepts etc
20:48:46krux02I don't want their implementation sprinkled around everywhere in the compiler.
20:48:46shashlickI think it is a lost cause if you expect him to do maintenance
20:48:54FromDiscord<Rika> ah so on stdlib
20:49:15FromGitter<sheerluck> leave Araq alone! Maybe he's not in the mood!
20:49:26FromDiscord<Rika> stop pinging Ar4q
20:49:26*lritter joined #nim
20:49:27FromGitter<moerm_gitlab> So, maybe maintenance is a good starting point for the conservative faction
20:49:27FromDiscord<Rika> xd
20:49:34krux02I think he isn't online, otherwise he would already have responded.
20:49:48krux02I said quite a few things that would normally have triggered him.
20:49:50FromDiscord<Rika> huh, isnt it 10 on europe or something
20:49:54dom96HCR and concepts are yet another set of features that are not necessary
20:49:54shashlicklike asking Michelangelo to maintain the Sistine chapel
20:49:59FromDiscord<Rika> *shrug*
20:50:04shashlickfix paint chips because you pay his bills
20:50:09FromGitter<moerm_gitlab> shashlick *g
20:50:12FromGitter<zetashift> HCR is really nice for the data science-y part tho D:
20:50:30dom96You know what is necessary? Being able to write concurrent and parallel code in Nim without fighting a lot
20:50:36FromDiscord<kodkuce> i want to work on game engine but i am uber newb to pull that myself
20:50:39FromDiscord<Rika> concepts are nice for those coming from haskell i suppose? not sure, but i liked them
20:50:44zacharycarterHCR isn't nice unless it works without issues, and it doesn't
20:50:46FromDiscord<Varriount> Well, for what it's worth, krux02, would you be open to donations for your work on Nim?
20:50:48zacharycartersame with concepts
20:50:53FromGitter<moerm_gitlab> dom96 Full ACK
20:51:12krux02I am not arguing against the usablility of HCR, but in the compiler the HCR implementation isn't maintained by anybody.
20:51:16FromGitter<zetashift> dom96 isn'tthat where ARC comes in
20:51:17zacharycarterbut 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:25krux02it just sits there and rots away.
20:51:27FromGitter<zetashift> ah fair krux02
20:51:28krux02same with concepts.
20:51:36zacharycarterso like shashlick says: it's pointless to say Araq do this
20:51:42zacharycarterunelss you're paying him a salary, which none of us are
20:51:53dom96again, some of us are, partially
20:51:56shashlickI agree krux02 that junk should be trashed
20:52:00zacharycarterdonations are donations
20:52:14shashlickbut making giant PRs is not received well by anyone
20:52:18FromDiscord<Recruit_main707> why is data not getting updated! we could have won D already!
20:52:18shashlick82 changed files, come on
20:52:18FromDiscord<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:01shashlickI 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:12FromGitter<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:16shashlicki can also introduce new bugs with less oversight but I can fix those too over time, nothing is perfect
20:53:16zacharycarterI do think though that these experimental features need to be segregated though from Nim's codebase
20:53:25axion^
20:53:31zacharycartermight be too late for that to happen though
20:53:38FromDiscord<Rika> i feel like it is too late
20:53:39rayman22201I 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:40shashlickif there isn't trust, you'll have to stick to 10 line PRs which is tedious and boring
20:53:41FromDiscord<Rika> sadly
20:53:43zacharycarterthey seem to have tendrils everywhere at this point
20:53:49shashlickand slow slow slow
20:53:53axionI 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:15FromGitter<moerm_gitlab> 1) afk for 2 min -
20:54:42FromGitter<zetashift> DrNim would mean better tools to fix the compiler though no?
20:54:44krux02rayman22201, thanks a lot donations would actually motivate me to spend more time on the compiler.
20:54:56shashlicklet me ask this - 4raq spent months working on arc, how many of you had bugs there were caused by arc?
20:55:01krux02Currently I only feel the backlash from Araq.
20:55:26FromGitter<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:31shashlicki don't think any of arc instability was exposed to the general population
20:55:32krux02I didn't try arc, because I didn't feel like opening a can of worms yet.
20:55:57shashlickneither have I but that doesn't mean that him working on new stuff is breaking otherwise stable things
20:55:58axionI 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:59FromGitter<zetashift> I only see ARC on the github issues list besides that haven't noticed anything of it yet
20:56:03FromDiscord<Rika> i dont know what the issues are with documentation
20:56:06FromDiscord<Rika> iven'
20:56:06*Sembei quit (Quit: WeeChat 2.7.1)
20:56:09FromDiscord<Rika> oops
20:56:12FromDiscord<Varriount> https://github.com/nim-lang/Nim/issues?q=is%3Aissue+is%3Aopen+arc
20:56:12FromDiscord<Rika> ivent have any
20:56:22FromDiscord<Rika> had* damn it
20:56:32axionIf it ever becomes the default and it breaks stuff I will have to weigh the cost of fixing everything vs jumping ship
20:56:34dom96At 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:49FromGitter<sheerluck> When exactly 1 April is over in this chat?
20:57:00rayman22201Lol
20:57:00FromGitter<zetashift> I feel the same, but I ain't stopping him from doing him
20:57:21Araqah so it's "let's all shit on Araq" time
20:57:30rayman22201It's not like he doesn't listen to the community
20:57:30FromDiscord<Rika> oh hes awake now 😛
20:57:33krux02ah there you are.
20:57:34rayman22201Oh hi lol
20:57:49Araqcoming soon, "Nim must be easier with multithreading. And it doesn't require new features (ARC) for that."
20:58:25Araqand also "I don't want to open a can of worms with ARC so I created a PR rewriting the stdlib instead"
20:58:46Araq(can you guess? that's for me "Opening a can of worms")
20:58:54zacharycarterI don't know how ARC became the feature that started getting clobbered. It started with HCR and Concepts
20:59:21FromDiscord<Rika> i think its because some of us dont see the reason for ARC
20:59:49zacharycarterWell the reasons are what Araq just described - folks have been complaining about multithreading in Nim for years
21:00:09zacharycarterand the default GC making multithreading difficult
21:00:32FromGitter<moerm_gitlab> Hello Araq ;)
21:01:03FromGitter<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:08FromGitter<alehander92> i might be wrong of course
21:01:17dom96I 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:19FromGitter<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:42FromGitter<alehander92> maybe one can imagine a smaller type+metaprogramming core and absolutely everything as libs on top but .. oh well
21:01:45FromGitter<zetashift> I certainly wasn't my intention, I like Nim too much for that
21:01:51FromDiscord<kodkuce> i want arc
21:01:57krux02alehander92: I never said no more features. I said new feauters must have a real world use case.
21:02:24FromGitter<alehander92> but krux02 this is very subjective: everybody has his own view of what is really "real world use case"
21:02:26dom96krux02, I'm sure that's what the C++ committee says too ;)
21:02:39FromGitter<moerm_gitlab> krux that's meaningless. Even for very weird stuff there are real world use cases
21:02:48FromGitter<zetashift> @alehander92 I think he wants more "maintainability of features" not so much as anti-features
21:03:04FromGitter<zetashift> nvm I was wrong lmao
21:03:08FromDiscord<kodkuce> yep i as a uber newb thik about exactly like you say dom + better interoperability with other stuff
21:03:12krux02no featues that feel like a smart idea.
21:03:21krux02No more smart ideas in Nim.
21:03:53FromGitter<alehander92> but this is just a "i got burned once, no more of this ever for me"
21:03:59FromGitter<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:01FromGitter<alehander92> some smart ideas are practical, some not
21:04:03krux02Dump down the implementation, dump down the lines of code in the implementaion, dump down the complexity in behavior. Make things more understandable.
21:04:04FromGitter<alehander92> that's life
21:04:21krux02Dosn't matter if they are practical.
21:04:30shashlickkrux02: that's a bit extreme, this is a team sport after all
21:04:35krux02Smart idea bite you in the ass.
21:04:40FromGitter<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:49FromGitter<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:55FromGitter<alehander92> otherwise you just tell your users "nah, you do this"
21:05:29FromGitter<moerm_gitlab> zetashift Still, there are never ending discussions ...
21:05:52FromGitter<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:17rayman22201@dom Imho we need arc. Other gcs are fundamentaly inadequate. No amount of bug fixing would help.
21:06:34FromGitter<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:13FromGitter<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:15axionI 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:39FromGitter<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:41shashlickcannot call ignorance as justification
21:07:44rayman22201Sometimes new features are the right answer... But I'm a moderate. I want maintenance too.
21:07:48dom96rayman22201, 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:52FromGitter<moerm_gitlab> zetashift My question is: How can we have *both* factions be happy and productive?
21:07:54FromGitter<zetashift> I'm hopeful it doesn't end up like concepts or HCR, because the plan IS the unify it to ARC
21:08:44krux02alehander92: 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:45shashlickunless 10 new people commit spending 3 hours a week on Nim working towards becoming maintainers, this is a pointless conversation
21:08:46Araqdom96: yet here you are, not implementing new features nor fixing bugs.
21:08:46FromGitter<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:58FromGitter<moerm_gitlab> And frankly, I'm not sure that all of us always stay (in discussions) in their realm of expertise
21:09:17FromGitter<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:23dom96Araq, I don't work full-time on Nim
21:09:54FromGitter<zetashift> @shashlick yep I concur
21:10:00Araqso what? whenever somebody touches async you draw them away
21:10:36FromDiscord<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:51FromGitter<moerm_gitlab> Btw Who is the father of Nim's async/await?
21:10:56leorizedom
21:11:19dom96I 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:21FromGitter<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:31shashlickVarriount: it is what it is - ast1.0 in nimterop had zero comments and I got zero contributions to date
21:11:43shashlickso for ast2, i've put hundreds of lines of comments
21:12:00shashlickbut Nim is several orders of magnitude larger so we have to do what we can
21:12:05FromGitter<moerm_gitlab> Araq what do you mean by dom96 drawing people away wrt async?
21:12:18FromGitter<alehander92> Varriount: documenting important/non-obvious things about the compiler can be part of maintenance
21:12:21shashlicki 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:50shashlicki know a little about the VM and nimscript, so i look for bugs in that and make minor contributions
21:12:51krux02Varriount: If you care I can give you an introduction to compiler development, just unmute on mumble
21:12:57shashlickit is a long journey of mostly learning
21:13:11leorizethe only thing I know about the compiler is how nimsuggest is put together :P
21:13:17shashlickthis is a 12 year old product
21:13:19FromGitter<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:30shashlick@leorize: then you HAVE to fix the memory leaks pronto
21:13:37rayman22201krux02: stream that for everyone!
21:13:41krux02dom96, your opinion matters. After all you wrote the only book about Nim.
21:13:51FromGitter<alehander92> krux02 that's true, but removing features from a language is hard
21:14:24Araqit'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:32krux02alehander92: removing feautures is hard, that is why it is so important that the bar to accept feauters is as high as possle.
21:14:40FromGitter<moerm_gitlab> krux much less so when it's new and incomplete or not yet solid features ...
21:15:05krux02after all, the majority of ideas and feautures are bad ideas.
21:15:16shashlickneither of these approaches make sense - high bar = zero contributions, removing features = instability
21:15:27shashlickboth are extremes
21:15:27krux02They are not supposde to be crappy code that slows down compiler contributors.
21:15:43krux02shashlick, not true.
21:15:49FromGitter<alehander92> krux02 yeah, but no features is not better: if nim had no interesting features..why would one use it
21:15:55krux02I am talking about new feauters in the compiler.
21:16:11krux02Nim has already enough interesting feautures.
21:16:16krux02Nim needs stability.
21:16:23FromGitter<alehander92> ok, this is obviousl ysubjective
21:16:45shashlickwhat is unstable in the 1.0.x series right now?
21:16:49FromGitter<alehander92> that's the problem with language design i admit, different people just want different things
21:16:55FromGitter<zetashift> Isn't it getting that with DrNim and ARC?
21:17:07Araqkrux02: and how exactly is adding $ to 'distinct T' aligning with "stability"
21:17:33Araqyou say X and then you do Y.
21:18:00shashlickany 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:05shashlickit is about getting agreement on what to do
21:18:36FromDiscord<Varriount> shashlick: Concepts, ranges, templates,
21:18:37krux02Says the man so says at one point to not conflate refactorings with fixes and in other situations expects them to be conflated
21:18:50leorizeshashlick: the leak is somewhere in the vm and I don't wanna touch that
21:19:15Araqkrux02: that's simply not true
21:19:24FromGitter<moerm_gitlab> ... yet some here feel that SV is not necessary ... strange
21:19:53*solitudesf quit (Ping timeout: 250 seconds)
21:20:00FromGitter<moerm_gitlab> IMO SV (well going for it) is a stroke of genius of Araq
21:20:25Araqbut 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:33FromGitter<moerm_gitlab> It'll be tremendously valuable when dealing with bugs - in Nim itself, too
21:20:51shashlickat the end of this conversation, i think we should have one candidate unmaintained feature for deprecation and eventually removal
21:20:51leorizeI don't mind features, but we do need a better timeline for adding features vs fixing bugs
21:21:01shashlickwhat will make it a less pointless conversation
21:21:20krux02Araq: How about you start with not instantly closing my PRs, just because you don't want to review them.
21:21:46AraqI did that once after an online discussion about it
21:21:49Araqwith you.
21:21:55Araqand I told you I would do it.
21:22:00shashlickkrux02 - how about not spending several hours on PRs without first getting general agreement on what you are planning
21:22:02Araqyou created the PR anyway.
21:22:06rayman22201Honestly, 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:14Araqshashlick: exactly...
21:22:21krux02rayman22201, that way my job.
21:22:35shashlicki mean everyone here has jobs, do you start coding a feature before running it through planning?
21:22:48krux02But not all of my maintenance was accepted or wanted.
21:22:56shashlicki've seen several people do it here
21:23:14krux02Cleaning things up in the compiler, generally I got rejection from Araq.
21:23:16FromGitter<alehander92> :D sometimes you think a feature is very cool and do it
21:23:22FromGitter<alehander92> but i agree its good to talk before
21:23:22leorize[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:40shashlickcollaboration is more important than code
21:23:43Araqkrux02: yeah, right. because they broke stuff.
21:23:49rayman22201Yes, well... There have been some HR issues and communication issues with this job...
21:23:51krux02Araq: no
21:24:02Araqlisten man, you didn't even get int128 right.
21:24:10krux02My PR to rename conflicting file names did not break stuff
21:24:23krux02my pr to remove only dead code did not break stuff
21:24:25FromDiscord<Rika> oh lord
21:24:49krux02Araq: how many issues with int128 are open?
21:24:56Araqwhenever there is something you don't understand, it's the fault of the others.
21:25:03FromGitter<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:04Araqfor not documeting the code
21:25:17krux02I am not saying I get all the things right on the first try. But I clean up my mess.
21:25:22Araqor for not writing tests that test for performance implications
21:25:39krux02I even had a hard discussion about cleaning up my very own code for sizeofalignof.
21:25:53Araqor for not writing tests against nlvm so that you notice you cannot just remove field from an object declaration
21:25:59shashlickI 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:19shashlickcan be a one line irc discussion for all i care, or an elaborate design doc
21:26:24shashlickRFC, whatever
21:26:41Araqkrux02: oh yeah? I told you not to use exceptions for this piece of code. You simply didn't listen.
21:26:48shashlickdon't spend hours working on features and flooding PRs
21:27:00*filcuc quit (Quit: Konversation terminated!)
21:27:11krux02yes exactly I didn't listen.
21:27:14shashlickdon't work on things that the owner isn't aware of
21:27:20Araqand everything was indeed a constant fight with you.
21:27:38Araqand now here you are shitting on me.
21:27:42shashlickit is 1000x more frustrating if code you worked on wasn't accepted versus an idea
21:27:44krux02Simply becaues in this case I used what was necessary for maitainability.
21:28:05rayman22201@shashlick That has been getting better actually if you look at recent prs and issues.
21:28:12krux02yes I am shitting on you, because cleaning up code in Nim was always frustrating, and now the compiler is full of bugs
21:28:16FromGitter<moerm_gitlab> shashlick come on, let the two settle the issua without interruption
21:28:32shashlicki'm talking to everyone else, they can discuss whatever
21:28:40FromGitter<alehander92> this is a public chat
21:28:48Araqkrux02: you don't care about the bugs, you care that it's "simple".
21:28:52shashlickhave seen this so many times and have even said it a few times
21:29:02FromGitter<moerm_gitlab> krux Bang, game over. Tilt. One doesn't shit on the creator and BDFL of a language. Period.
21:29:12krux02yes, simple means that it is more likely to have fewer bugs.
21:29:15FromGitter<zetashift> This uh seems to have gotten out of hand
21:29:20krux02and bugs are easier to spot in the code.
21:29:29Araqif that "simple" means "buggy in ways krux02 didn't foresee" it doesn't matter
21:29:50krux02if it has bugs, complexity is needed as necessary.
21:29:59FromGitter<moerm_gitlab> zetshift frankly I don't think so. I think there is something finally getting back into its place
21:30:23krux02but that doesn't mean that it you should never even dare to simplify things because it could potentionally break things.
21:30:25Araqkrux02: you simply don't understand the bugfixes in the code and claim "It's all unnecessary complexity"
21:30:51FromGitter<zetashift> @moerm_gitlab fair
21:31:01FromDiscord<ksandvik> Maybe it's time to have a dedicated irc channel for internal development and one for the public use?
21:31:20krux02there is a nim-dev channel.
21:31:45FromDiscord<ksandvik> Could this kind of discussion about nim internals reside there?
21:31:59krux02Araq, that is the point, the code is so full of bugfixes that is almost impossible to understand.
21:31:59Araqofc 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:49FromGitter<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:52FromGitter<zetashift> @ksandvik I don't think it's unavoidable, this discussion started here among also regular Nim users
21:33:18krux02Well 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:19FromDiscord<ksandvik> Oh Ok, I will check back in about three hours then.
21:33:32FromDiscord<Recruit_main707> @ksandvik also, just mute the channel if you dont want to hear it
21:33:45FromGitter<alehander92> i think stdlib vs compiler is an important distinction
21:34:05krux02And 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:12krux02Yes it is slow.
21:34:30FromGitter<moerm_gitlab> krux never heard the famous saying "Bow before me for I am root!" *wink wink nudge nudge
21:34:39krux02But 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:49krux02And that was 2010.
21:35:06krux02Scala was at that point in time only a few years old.
21:35:33Araqthe 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:51Araqbecause after all, you just said its quality is good.
21:35:52FromGitter<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:56shashlickwhat exactly is the point of these statements? better to debate specific issues instead of general stuff
21:36:16FromGitter<zetashift> Also Scala isn't the greatest comparison they are having arguments with Dotty too lmao
21:36:33Araqand you need to study all of the Scala compiler, not just the parts you enjoy looking at.
21:36:49FromGitter<moerm_gitlab> shashlick "clearing the air". I may hurt but sometimes it's necessary
21:37:09FromGitter<moerm_gitlab> -I +It
21:37:18FromGitter<zetashift> I'm out for now, good night everybody
21:37:30FromGitter<deech> The Scala compiler has a steady supply of PhD students and substantial industrial funding.
21:37:49shashlicki'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:30shashlickdebate merits of technical issues and be specific
21:38:53Araqbtw I didn't look at the Scala compiler, I'm sure I should and learn my lessons.
21:38:58krux02zetashift: I wrote a Block building game like mincraft in scala.
21:39:09FromGitter<moerm_gitlab> shashlick do you know the full history between the two? Probably not.
21:39:12FromGitter<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:06krux02zetashift: 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:23FromDiscord<Varriount> deech: how are we more able to fix mistakes more easily?
21:40:32shashlickso somehow i cannot participate in clearing the air
21:40:37FromGitter<moerm_gitlab> If I were interested in Scala details I'd be in *their* chat
21:40:52FromGitter<deech> Because there's fewer people depending on Nim.
21:41:03FromDiscord<Varriount> shashlick: What do you mean by technical issue?
21:41:26FromGitter<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:00FromDiscord<Varriount> moerm: Could you just let people talk?
21:42:16Araqand one final thing: I don't mind compiler cleanups, but I want real improvements, not differences in taste.
21:42:35Araqand refactorings shouldn't cause regressions...
21:42:36krux02Araq: what is an real improvement to you?
21:42:40FromGitter<moerm_gitlab> Varriount Could you let Araq and krux decide whether my comments are disturbing to them?
21:42:59Araqkrux02: for example, replace the C codegen by an AST to AST transformation.
21:43:09Araqdon't optimize the ropes, throw away the ropes.
21:43:18shashlickVarriount: 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:43Araqdifferent example: remove the hacks for generics in sem*.nim and make the procs take an explicit "typeMap"
21:43:51Araqthat stores the types that sigmatch did compute
21:44:40Araqother example: unify the CFG with the AST to give us a solid IR
21:44:45krux02Araq: the problem is, a good cleanup often comes with a bigfix. And as far as I am concerned, that isn't allowed.
21:45:32Araqother example: rewrite the PType cycle mess
21:45:32krux02what is CFG?
21:45:39Araqcontrol flow graph.
21:45:57krux02Araq: you can't rewrite the PType cycle mess, becaues macros depend on this mess.
21:46:09Araqmacros only see NimNodes
21:46:16FromGitter<moerm_gitlab> (btw. quite some SVs provide a CFG. Handy)
21:46:29Araqyou can map the new Type to NimNodes
21:46:40krux02But don't they map directly to the PType?
21:46:58*moerm joined #nim
21:47:34moerm(switched away from gitter and back to IRC)
21:47:52Araqno, the mapping is done in vmdeps.nim
21:48:15Araqspeaking of which, bad name, rename it do vm_map_type_to_ast.nim
21:48:19Araq1 PR
21:48:30Araqmerged as soon as the CIs are green
21:48:47Araqand opSlurp() shouldn't be in this file
21:49:27krux02moerm, 👍
21:49:44*natrys quit (Ping timeout: 256 seconds)
21:50:01moermkrux sorry I only see a placeholder for something outside ascii
21:50:21Araqand 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:25Yardanicomoerm: *thumbs up emoji*
21:50:40krux02Araq, 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:57krux02moerm, it is a thumb up
21:50:57AraqI would take it even *with* the implied regressions
21:51:09Araqbecause it's worth it
21:51:36Araqsame for the PType mess
21:51:56moermYardanico Thx!
21:52:15krux02what about the VM. I constantly worked in vm.nim, that file deserves some cleanup as well.
21:52:29Araqdefinitely
21:52:29*jjido joined #nim
21:52:55AraqI know you dislike the templates and their injections, throw it out
21:53:07krux02good.
21:53:08Araqand it'll be accepted
21:53:48Araqmaybe not "as soon as possible", maybe I will pick on something before it's mergable, that has to be allowed
21:55:10krux02I think if I do it, I will do it step by step.
21:55:53shashlickAraq: 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:04shashlickand probably add more while he's at it
21:56:20Araqand 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:15Araqand the code is cleaner than the old GCs too IMO.
21:57:38rayman22201Jeeze. For such an important feature, arc has progressed very fast. How fast can you expect?
21:57:45Araqand it's based on AST rewrite...
21:57:50liblq-devso 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:58shashlicklooks like it is free rein
21:58:06FromGitter<deech> Araq, a talk on ARC internals at the possibly upcoming remote Nim conference would be amazing.
21:58:08liblq-devI'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:09moermFWIW I don't care at all about fast. I care about solid
21:58:13liblq-devstrscans? pegs?
21:58:15Araqmost of the time I actually do what I tell others to do.
21:59:02liblq-devI 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:07Araqshashlick: it's worth considering.
21:59:28FromDiscord<jackjia> Araq: what's the next step for DrNim?
22:00:03moermBtw, 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:25Araqthe issue tracker draws a realistic picture
22:01:13moermAraq Thx. And? Is it as grim a picture as some seem to suggest?
22:01:37*muffindrake quit (Quit: muffindrake)
22:01:38Araqimpossible to tell because the happy users and silent users.
22:01:44Araq*are
22:02:05moermHmm, yes quite likely
22:02:48*xace joined #nim
22:02:54moermI'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:13Araqjackjia: 'old(x)' needs to be implemented and we need look into using a CFG
22:07:01moermAraq If you play it smartly, SA will give you a CFG basically for free
22:07:34leorizewhy doesn't distinctBase work on NimNode...
22:07:34liblq-devcould 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:16Araqmoerm: no idea how to do that
22:08:33AraqZ3 doesn't seem to offer anything like that (and why should it)
22:08:57*silvernode joined #nim
22:09:00leorizeliblq-dev: try npeg? :p
22:09:02axionI 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:26liblq-devleorize: I think it's overkill, but I may have to resort to that if nothing else works
22:09:45leorizethe only overkill part is that it's not in the stdlib :)
22:09:48*JStoker joined #nim
22:10:03liblq-devnot really, it's that I only need a single pattern. I have no need to parse an entire grammar
22:10:11liblq-devand npeg was built for that
22:10:15moermAraq A SA is *based* on CFG (well, most of them)
22:10:26liblq-devbut maybe I'm wrong.
22:11:30FromDiscord<Rika> axiom https://nim-lang.org/docs/system.html#%5B%5D%2Cstring%2CHSlice%5BT%2CU%5D
22:11:34Araqmoerm: yes I know but Z3 doesn't do CFG construction
22:11:39leorizeliblq-dev: I found your problem, I think
22:11:50liblq-devwhat is it?
22:11:58leorizeyour patterns doesn't match because ffmpeg outputs more than just the frame in one line
22:12:22liblq-devI thought that regexes ignore the rest of the pattern unless I add an anchor
22:12:37liblq-devah, pegs
22:12:46leorizeyou need explicit markers to ignore :P for strscans
22:12:47*jjido quit (Ping timeout: 246 seconds)
22:12:54liblq-devyeah I was trying with regex too
22:12:55liblq-devok
22:13:31liblq-devno, you use $. to achieve the inverted effect
22:13:38liblq-devjust checked the doc
22:13:54liblq-dev$. matches if the end of input has been reached
22:14:18axion@Rika I have tried using that, but it's trying to using a seq instead of a Slice
22:14:29axionI'm not sure what I'm doing wrong
22:15:36FromDiscord<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:27leorizeaxion: https://play.nim-lang.org/#ix=2giu
22:17:25Araqjackjia: 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:46axionAh so you have to use a seq
22:18:01Araqwe're programmers after all, we don't like to think.
22:18:06moermAraq But *elegant* dumb stuff please!
22:18:23*natrys quit (Ping timeout: 250 seconds)
22:18:51moermMy aunt Mary used to think occasionally ... and now she's dead. Ergo: Thinking should avoided
22:19:48FromDiscord<Rika> anyone got a guide for converting numpy -> nim libs?
22:19:58FromDiscord<Rika> numpy usage i mean, not the numpy lib itself
22:20:24FromDiscord<Rika> no, im just crunching numbers, no machine learning here 😛
22:20:24moermnumpy can be imported once the new Nim compiler is ready *g
22:20:29FromDiscord<Rika> pff
22:21:05moerm;)
22:22:07moermSeriously, don't we have a bigint lib? I seem to remember that we do
22:22:27moermOtherwise just use a C lib and c2nim it
22:22:41FromDiscord<Rika> its arraymancer or stint dunno which has the functions of numpy though
22:22:48FromDiscord<Rika> probably arraymancer
22:22:53FromDiscord<Rika> hmm ill look into it
22:23:13shashlickAraq: 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:20liblq-devleorize: npeg doesn't even compile for me, no meaningful error message… http://ix.io/2giv
22:23:32liblq-devI just tried to do `patt("frame=")`
22:23:37FromDiscord<Rika> WHAT
22:23:46FromDiscord<Rika> ARRAYMANCER HAS NUMPY FILE READING
22:23:49go|dfishliblq-dev: how are you reading ffmpeg's output?
22:23:52FromDiscord<Rika> god i could have used this for my research
22:23:57FromDiscord<Rika> should have checked ;;
22:24:13shashlickbut if I add a header pragma, it complains about storage size
22:24:15liblq-devgo|dfish: via the inputStream provided by osproc, why'd you ask?
22:24:51liblq-devthere isn't a problem with blocking or anything, I'm reading char by char using readChar
22:24:56liblq-devand discard all \n and \r
22:24:57go|dfishliblq-dev: ffmpeg prints a lot of stuff to stderr - may have something to do with your problem
22:25:06liblq-devnope, I ignore that
22:25:29liblq-devaah not inputStream but errorStream
22:25:37go|dfishyes but the data you're looking for could be going there
22:25:49liblq-devit *is* going there and I am able to read it
22:26:13liblq-devit's just that I'm unable to match that `frame= x` string
22:26:41liblq-devI even checked if the line I'm reading begins with "frame", and it does
22:26:46leorizeliblq-dev: I'm pretty sure that's not how you write an npeg pattern...
22:26:51leorizethough you should report that issue
22:27:16liblq-devleorize: how'd I do that then? I'm just trying to match the string "frame=" for now
22:27:21leorizeZevv likes to have good error messages, and that wasn't one
22:27:24liblq-devnot even any of the magic stuff
22:27:29leorizeliblq-dev: does strscans work?
22:27:39leorizecan you give me a line you received?
22:27:44liblq-devsure
22:28:01liblq-devleorize:
22:28:04liblq-devframe= 63 fps=2.1 q=0.0 size= 1kB time=00:00:01.51 bitrate= 4.4kbits/s speed=0.0505x
22:28:40liblq-devno '\n' at the end, I strip those off
22:28:57liblq-devlikewise no '\r', because that's what ffmpeg actually uses.
22:29:43leorizeliblq-dev: try scanf again, it should work this time
22:29:52leorizeyou don't have to specify the full pattern it seems
22:30:54*vegai joined #nim
22:32:31liblq-devoh shit it worked this time
22:32:49liblq-devmaybe it's because I put the relevant scanning code in a different block
22:33:04liblq-devthis script I'm writing is so convoluted, man…
22:33:22axionWell 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:22liblq-devshould've thought it through a little bit better
22:33:50shashlickaxion: which issue
22:34:06axion#13828
22:34:28*abm joined #nim
22:34:30shashlickwhere's disbot, lazy bum
22:36:07rayman22201Why not use varriounts work around?
22:37:08axionThat would be the huge redesign, because it won't work if you have quote do.
22:37:32axionMy macro is pretty complex (it's now a macro that generates templates instead of a template)
22:38:18*rnrwashere joined #nim
22:38:43rayman22201You can add the dirty pragma to a generated template.
22:39:05rayman22201Why won't it work with quote do?
22:39:21axionThe issue is the generated templates are inside a quote do
22:39:32axionTry it. shrug
22:39:55moermHave a good time everyone - cu
22:40:03*moerm quit (Quit: Leaving)
22:40:26Araqshashlick: ok, well?
22:40:37Araqwhat's the question about incompleteStruct?
22:40:50*rnrwashere quit (Remote host closed the connection)
22:41:54shashlickwhy does incompleteStruct work without header
22:42:02shashlickbut with header, it complains about storage size
22:42:04shashlickmissing
22:42:51inv2004I 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:44inv2004proc addTimer(timeout: int; oneshot: bool; cb: Callback)
22:43:44inv2004 ... first type mismatch at position: 3
22:43:44inv2004 ... required type for cb: Callback
22:43:44inv2004 ... but expression 'sendingLoop' is of type: proc (fd: AsyncFD): bool{.closure, locks: <unknown>.}
22:43:44inv2004 ... This expression is not GC-safe. Annotate the proc with {.gcsafe.} to get extended error information.
22:43:48inv2004ups, sorry!
22:43:58shashlick**`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:26shashlickresults in `error: storage size of 's0__X8vUbe3oSrwuT7g3oGFTjQ' isn't known`, `struct STRUCT0 s0__X8vUbe3oSrwuT7g3oGFTjQ;`
22:44:52inv2004so, the question was: why the closure is not GC-safe and is it correct solution to mark it gcsafe ?
22:46:13Araqshashlick: it only appears to work
22:46:35Araqbut in reality you can only have a pointer to this struct
22:46:56shashlickah, so my test case is bad then
22:47:26Araqinv2004: .gcsafety inference doesn't work well for lambdas, iirc.
22:48:17shashlickbrilliant
22:48:32shashlickso 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:21inv2004@Araq, but how can I be sure that the .gcsafe. is ok here?
22:56:15Araqwrite it down, the compiler checks it for you
22:56:47inv2004ok, probably another question: can I create projection from function and parameter? and pass the projection to addTimer then
22:57:27inv2004addTimer(..., sendingLoop(myLockedValue: ...))
22:58:41*lritter quit (Ping timeout: 250 seconds)
23:02:16*liblq-dev quit (Quit: WeeChat 2.7.1)
23:03:30rayman22201@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:59axionIt'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:59Araqaxion: please report the bugs
23:10:21axionI have reported the ones I could create isolated tests for
23:10:21Araqand you need no less than 3 `[]` accessors
23:10:45Araq`[]`(x: Container; index): T
23:10:51Araq`[]`(x: var Container; index): var T
23:11:03Araq`[]=`(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:47Araqnot sure why it matters though, it's not like Lisp has anything like that ;-)
23:12:11axionsetf operates on a place, so there is no need for it.
23:13:00Araqand what about the learning resources? there is plenty of stuff directly linked from our website
23:15:07axionI'm more concerned with the brief overview style of the manual
23:15:41axionIt's not anything like a language specification. Too many things are unspecified or don't have exhaustive examples.
23:16:05FromDiscord<Rika> ive had no issues with writing nim code
23:16:36FromDiscord<Rika> i dont seem to see why others are
23:16:39*muffindrake joined #nim
23:16:40FromDiscord<Rika> i need help realizing ;;
23:17:07Araqwe have tutorials too
23:17:09axionI have read all of the learning resources, including NIA which I bought
23:17:34Araqok, so what's missing?
23:18:34*inv2004 joined #nim
23:18:49*inv2004 quit (Client Quit)
23:19:02axionWhere 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:18axionI believe these cases need to be documented so I can choose the right amount of concision without future breakage
23:22:00Araqhttps://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-implict-itemsslashpairs-invocations
23:22:44FromDiscord<Rika> i dont understand the former
23:22:57Araqhttps://nim-lang.org/docs/manual.html#generics-implicit-generics
23:23:39*abm quit (Read error: Connection reset by peer)
23:25:07Araqand as others have noticed your bug has an easy workardound
23:25:09Araqtemplate genAccessor(t, a, i) {.dirty.} =
23:25:10Araq template a*(q: t): float32 {.inject.} = q[i]
23:25:10Araq template `a=`*(q: var t, value: float32) {.inject.} = q[i] = value
23:26:50Araqthough 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:20axionYes I am experimenting with that now, but that's just 1 bug I found in my first trivial code
23:27:35rayman22201Sure seems counter-intuitive. If I export something, I expect it to be exported...
23:27:55Araqhygienic templates are simply not intuitive, .dirty templates are
23:28:11Araqwe added lots of rules to make them "intuitive", we failed
23:28:27Araqinstead we should have made them simple, then people can learn them
23:28:42*arecaceae quit (Remote host closed the connection)
23:28:54leorizeAraq: 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:14axionI understand about hygeienic and unhygeinic macros. They're both pretty intuitive to me after using them for decades.
23:30:09dwdvIs 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:38Araqaxion: well Nim's rules are not.
23:31:21rayman22201question is, is this a doc bug? I.E. the current rules need be explained better somewhere? or is this a compiler bug?
23:32:16Araqrayman22201: the rules are clear for anything but "templates inside templates"
23:32:42rayman22201lol. So lets figure out the rules for "templates inside templates" then :-P
23:33:34Araqdwdv: external tool and unlikely to become part of the compiler
23:33:36axionThere's also export issues elsewhere
23:34:06Araqand it's not about "design-by-contract", it's about verification.
23:35:50Araqaxion: can't fix what is unreported
23:36:06axionIt was reported
23:36:34Araqwhat's the issue number?
23:37:27axionWell one of them would be #13673
23:37:39axionA 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:10rayman22201I 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:36Araqwell he did read them all
23:39:06axionI 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:18rayman22201can you write those questions down and give them to us?
23:40:29*Trustable quit (Remote host closed the connection)
23:40:48axionWhen 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:04rayman22201Araq gave you links to the dos for the examples you posted, but idk if those are satisfactory.
23:41:08axionSure, I will do that as they come to me from now on
23:41:13FromDiscord<clyybber> Holy shit
23:41:16Araqaxion: thanks
23:41:26FromDiscord<clyybber> FWIW I found compiler refactorings/cleanups were pretty welcome
23:41:34FromDiscord<clyybber> If they really improved stuff
23:41:47*xace joined #nim
23:41:47FromDiscord<clyybber> And the compiler is not broken
23:41:54FromDiscord<Rika> T_T arraymancer doc search doesnt work
23:41:55FromDiscord<clyybber> Clearly you haven't looked at other compilers
23:42:13rayman22201thanks axion. really. We want to improve, but we really need concrete issues. (I know that can be time consuming.)
23:42:22Araqaxion: and btw when people say "better docs" we now think they mean "cannot copy&paste API calls around"
23:42:25FromDiscord<clyybber> dom96: So you want better parallellism/concurrency? But you don't want static analysis and gc:arc?
23:42:37Araqclyybber: you're too late
23:42:45Araqdiscussion moved on
23:42:47FromDiscord<clyybber> krux02: You want to remove all features, even refs, because you don't understand why you would need them..
23:42:49Araqbut thanks for supporting me
23:42:53FromDiscord<clyybber> Araq: I see
23:43:13FromDiscord<clyybber> I'm just gonna finish my rambling 😄 :
23:43:20rayman22201lol
23:43:37FromDiscord<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:30rayman22201araq, 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:45axionI 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:49axionAraq's*
23:48:15Araqthanks. 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:32axionerr, 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:38Araq1.) the feature "unused import" is actually rather new and iirc I added it for v1
23:48:57*krux02_ joined #nim
23:49:04Araq2.) it's not as simple as it seems since your usage of the symbol is inside a generic
23:49:14Araqwhich has a 2 phase lookup going on
23:49:25Araqcomparable to C++'s problems
23:49:47axionThat 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:48Araqthere is an RFC improving the situation, "let's use concepts to typecheck generics properly"
23:50:09Araqscheduled for 2021
23:50:38Araqand yet I get blamed for not working on concepts.
23:50:52axionconcepts are custom type classes, right?
23:50:55Araqlook, I don't want to fix concept bugs, I seek to redo them completely.
23:51:18Araqand that can be seen as "bah, a new feature"
23:51:21FromDiscord<Rika> do we really need to redo them?
23:51:39*krux02 quit (Ping timeout: 252 seconds)
23:51:45FromDiscord<Rika> is it at a state of disrepair that it needs to be redone
23:51:57AraqIMHO yeah
23:52:54clyybberkrux02_: While we are at it, why does it behave like this: https://github.com/nim-lang/Nim/issues/13724 ?
23:53:07clyybberIMO typedesc should behave like a static type
23:53:19axionI 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:27clyybberaxion: Its FUD
23:53:37clyybberFUD is maybe the wrong word
23:53:55rayman22201I also basically agree with your current roadmap araq. for what it's worth. 🤷
23:54:11Araqand once again
23:54:21Araqit's the *bugfixes* that cause regressions
23:54:29AraqI know it's a terrible situation
23:55:26Araqbut 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:36Araqthe result isn't a "more stable" nim.
23:55:50Araqthe result is that your code stopped to compile.
23:56:07Araqif you have a good solution to that problem I'm all ears
23:57:02Araqso far I came up with an RFC process plus a --useVersion emulation
23:57:12clyybberIts perfect this way IMO
23:58:14Araqtoday's devel broke my Karax project.
23:58:24AraqI fixed it, no big deal, one line change
23:58:57Araqbut in the larger picture it means Nim's ecosystem constantly breaks