<< 26-01-2021 >>

00:06:28*krux02 quit (Remote host closed the connection)
00:07:49*zidsal quit (Quit: Connection closed)
00:14:32FromDiscord<gcao> Thank you guys for pointing me to fusion. however I think fusion pool is not exactly what I'm looking for. I was hoping to have a pool that I can implement a proc to borrow object and store in a ref, and =destroy to return object to. I'll let Nim call =destroy when the reference goes out of scope.↡Is this possible?
01:15:31*dddddd quit (Ping timeout: 256 seconds)
01:19:18FromDiscord<Balen> sent a code paste, see https://paste.rs/u0g
01:28:21*xet7 quit (Quit: Leaving)
01:33:08FromDiscord<Rika> i dont think so
01:33:34*dddddd joined #nim
01:35:36*abm quit (Read error: Connection reset by peer)
01:43:16*lf joined #nim
01:43:40*lf is now known as Guest23239
01:45:25*j-james joined #nim
01:50:05*dddddd quit (Ping timeout: 256 seconds)
01:53:35*j-james quit (Read error: Connection reset by peer)
01:57:48*j-james joined #nim
02:00:41*dddddd joined #nim
02:16:35FromDiscord<exelotl> !eval echo relativePath("foo.txt", "bar.txt")
02:16:36NimBotCompile failed: /usercode/in.nim(1, 6) Error: undeclared identifier: 'relativePath'
02:16:46FromDiscord<ElegantBeef> @treeform also i never did say that your async google api worked fine for me, i just did coded my config loader dumbly and turns out i never actually called it, so it worked fine i was dumb πŸ˜„
02:16:54FromDiscord<ElegantBeef> relativepath is `os` no?
02:16:56FromDiscord<exelotl> !eval import os; echo relativePath("foo.txt", "bar.txt")
02:17:00NimBot../foo.txt
02:17:11FromDiscord<exelotl> wtf is going on with this lol ^
02:17:21FromDiscord<ElegantBeef> Nim doesnt differentiate paths from files in path ops
02:17:36FromDiscord<ElegantBeef> So just bad logic
02:18:15FromDiscord<exelotl> ah so should get the parent dir of the 2nd param
02:18:36disruptekthis mokose camera is garbage.
02:27:29*dddddd quit (Ping timeout: 256 seconds)
02:30:52FromGitter<iffy> When using macros, some of the generated identifiers are of the format somethin`gensym2312 while others are MyType_283927483. What causes one or the other? I'm trying to strip the _NNNNNNNN off, but want to first understand what puts it there
02:37:41*dddddd joined #nim
02:40:31*def- quit (Quit: -)
02:40:32*def-- joined #nim
02:40:50*D_ quit (Ping timeout: 264 seconds)
02:40:56*def-- is now known as def-
03:02:46FromDiscord<ElegantBeef> @carpal should add more examples to your readme on Nobject and also you accidently pushed your `test1.exe` πŸ˜„
03:04:15FromDiscord<treeform> I am glad your figured it out!
03:05:00FromDiscord<ElegantBeef> Yep my silly build system can now push unity releases to github and google cloud storage πŸ˜„
03:05:13FromDiscord<ElegantBeef> ~~Hasnt ran it for a long period of time so has 0 clue if it'll implode~~
03:07:22*muffindrake quit (Ping timeout: 260 seconds)
03:09:16*muffindrake joined #nim
03:09:25*dddddd quit (Ping timeout: 256 seconds)
03:10:38disruptekiffy: if you want to strip off the _3234234 just grab the symbol and take the .strVal instead of rendering it.
03:11:15*D_ joined #nim
03:18:02*Guest23239 quit (Quit: Guest23239)
03:18:18*Guest23239 joined #nim
03:19:42*dddddd joined #nim
03:35:25FromGitter<iffy> k, I'll give that a try
03:38:49FromGitter<iffy> Different question now: using `{.compile: "somefile.c".}` with `nim --compileOnly --nimcache:somedir` doesn't work well because `somefile.c` doesn't make it into `somedir/`. Would it be reasonable for `nim` to copy C files into that dir?
03:55:27disrupteknot really.
03:56:27*j-james quit (Ping timeout: 272 seconds)
04:09:13*spiderstew joined #nim
04:10:14*spiderstew_ quit (Ping timeout: 264 seconds)
04:18:06*Guest23239 quit (Quit: Guest23239)
04:18:25*Guest23239 joined #nim
04:32:00*j-james joined #nim
04:34:29*leorize quit (Ping timeout: 268 seconds)
04:36:10*lritter joined #nim
04:39:24FromGitter<offbeat-stuff> Hi, Is there a nim framework that can render svgs into pngs (transparent background) and also load TTF fonts to render text
04:43:40*vicfred joined #nim
04:43:41FromDiscord<ElegantBeef> I believe pixie can render svgs to pngs
04:43:47FromDiscord<ElegantBeef> !repo pixie
04:43:48disbothttps://github.com/HarperProjects/Pixie -- 9Pixie: 11Some crypto implementations in nim 15 0⭐ 0🍴 7& 1 more...
04:43:54FromDiscord<ElegantBeef> That's not it πŸ˜„
04:43:56FromDiscord<ElegantBeef> https://github.com/treeform/pixie
04:44:43FromDiscord<ElegantBeef> Treeform also has fidget which can load/render ttf fonts, but the api is still being worked on, not an established method yet
04:46:41FromGitter<offbeat-stuff> Well my svg files have font selected as monospace
04:47:04FromGitter<offbeat-stuff> I want that to be a ttf font on my computer
04:47:14FromGitter<offbeat-stuff> Also I want font ligatures to work
04:48:51FromDiscord<ElegantBeef> So you have a SVG with paths and and text and want to render both to a transparent png?
04:49:11FromGitter<offbeat-stuff> Well It's mostly text
04:49:21FromGitter<offbeat-stuff> and some rectangles
04:49:34FromGitter<offbeat-stuff> My top priority is font and ligatures
04:54:34FromGitter<offbeat-stuff> Well pixie doesn't work
04:54:51FromGitter<offbeat-stuff> anything that can parse tags in svg,html
04:55:54disruptekhave you tried any of the imagemagick wrappers?
04:56:04FromGitter<offbeat-stuff> No
04:56:12disruptekinteresting.
04:56:45FromGitter<offbeat-stuff> I am just trying to render syntax higlighted text into hig res pngs
04:57:42FromGitter<offbeat-stuff> using pygments to generate svg
04:58:13*rockcavera quit (Remote host closed the connection)
04:58:48disruptekwhat's the point of doing it in nim?
04:59:18FromDiscord<ElegantBeef> Like i said treeform has a bunch of useful libraries for this domain, https://github.com/treeform/typography
04:59:41FromGitter<offbeat-stuff> Well I tried looking at others libs in c++ none was good
04:59:55FromGitter<offbeat-stuff> So Now just trying in nim
05:00:00disruptekwhat's the point of not just typing `convert foo.svg bar.png`?
05:00:19FromGitter<offbeat-stuff> Well My TTF fonts
05:01:25disruptekthat's not possible to override in imagemagick?
05:01:50disrupteki would think it'd be pretty trivial.
05:04:32FromGitter<offbeat-stuff> Well The input to pygment will itself come from a nim program so Why not do it all in nim
05:05:12disrupteki can think of a good reason.
05:05:44FromGitter<offbeat-stuff> Yeah Well I can work with c,c++,nim libraries and cli programs
05:06:23FromGitter<offbeat-stuff> Just exploring my options
05:08:26*Xatenev joined #nim
05:14:38disruptekkeep us posted if it's public; it sounds useful.
05:16:47*Xatenev left #nim ("Leaving")
05:18:15*Guest23239 quit (Quit: Guest23239)
05:19:00*Guest23239 joined #nim
05:35:48*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
05:35:56*njoseph joined #nim
05:58:52*j-james quit (Ping timeout: 264 seconds)
06:23:47*habamax joined #nim
06:27:48*Guest23239 quit (Quit: Guest23239)
06:28:06*Guest23239 joined #nim
06:29:29saemhuh, why would a nimsuggest test fail in 32 bit linux. It's a really weird failure. https://dev.azure.com/nim-lang/255dfe86-e590-40bb-a8a2-3c0295ebdeb1/_apis/build/builds/12503/logs/118 (at the bottom, tsug_regression for those interested)
06:36:10disrupteklooks like a test error to me.
06:36:40saemThe test works locally.
06:36:58disruptekno doubt.
06:37:26saemSo I'm trying to figure out how to replicate it. πŸ™€
06:39:15disrupteki'm wondering the best way to highlight arbitrary code on the console; basically, to reimplement pygments.
06:39:34saemnot just nim, but anything?
06:39:41disruptekjust nim.
06:39:54disruptekbut afaik, pygments is pretty crude as syntax highlighting goes.
06:40:21disrupteki just want this for nicer balls output.
06:40:29disruptekand maybe docgen.
06:41:47disruptekpygments seems to be regex-based.
06:41:49saemWould the app developer use it like a library as they output whatever strings?
06:41:53disruptekyes.
06:42:50saemHmm, well if we're shipping syntax highlighting files, and I think perhaps we should, the it would be more a matter of making a highlighter that can use them based on a known implementation. That seems slightly less scary?
06:44:09disrupteki guess there's no point in reimplementing nimsuggest just to do this.
06:44:41*waleee-cl quit (Quit: Connection closed for inactivity)
06:45:05saemYeah, there is that too. But nimsuggest is semantic highlighting, which might not be possible as I imagine most people will be emitting small fragments.
06:45:24disruptekwell, it /should/ be possible.
06:45:50disrupteki mean, things like runnableExamples look small but they are entire programs.
06:46:18disrupteki can always throw away the bits i don't need.
06:46:33saemhmm, it depends upon API, perhaps? So if the highlighting library says, getHighlightedString(c: CodeRange): string then that should be ok.
06:47:35disruptekit doesn't sound all that useful.
06:49:23saemMy thinking was test runs, runner notices a failure, runner uses metadata to made available by the test to get the relevant chunk and blat it out with highlighting. The metadata in this case would be the code range.
06:50:24disruptekyeah, i mean, i don't know if it's worth implementing because it's expensive, specialized, narrow in scope.
06:51:00FromDiscord<ElegantBeef> I've got my silly PR for colouring nim's output, just applies ascii codes manually when `--color:on` could be replaced with some more human accessible escape sequence
06:51:09disruptekmaybe leorize has some thoughts on it.
06:51:51saemwell forgetting semantic highlighting, I mean you have an AST, you could just use that to colour it and stick with boring syntax highlighting.
06:52:09disrupteki thought about just hacking the renderer to take a special buffer type.
06:52:12FromDiscord<ElegantBeef> Idk i feel like error highlighting needs to be more manual
06:52:20disruptekbut, then i'd lose the user's code comments.
06:53:11disruptekon the plus side, hacking the renderer would be pretty cheap.
06:53:17saembeef, what's this manual business you speak of?
06:53:44FromDiscord<ElegantBeef> Idk i seen errors and colouring so thought we were trying to provide errors in a more colourful matter
06:54:24saemI'm presuming it's more test x failed, here is a snippet of code and not just a line number to help figure out what's up.
06:55:01disrupteki already supply the code and line numbers.
06:55:18disruptekand, it's the user's code, not a rendering.
06:56:30disrupteki just think there isn't enough color in my balls output. 😁
06:57:08FromDiscord<ElegantBeef> Just do some regex for your basic highlighting adding ascii on the symbols πŸ˜„
06:57:22FromDiscord<ElegantBeef> ansi i mean
06:57:39disruptekyeah, that's probably the smart move. lame as it is.
06:58:14disrupteki wouldn't even regex it; i'd just use the line info data i already have.
06:59:41*krux02 joined #nim
07:00:36FromDiscord<ElegantBeef> I still need to make that colourize error message PR smarter, though i feel like that requires a rewrite of most of the error output and using more constants/loading from a config for error messages
07:01:30disruptekgive us an example.
07:01:32saemLoL, textmate grammars... https://github.com/microsoft/vscode-textmate
07:02:30FromDiscord<ElegantBeef> At the moment it's mostly doing stuff like this ` ("redefinition of '$1'; previous declaration here: $2" %↡ [s, c.config $ conflictsWith]) [s, c.config $ conflictsWith]).colorError(c.config))`↡here is the entire PR to cry at manual error annotation <https://github.com/nim-lang/Nim/pull/16446>
07:02:32disbotβž₯ Colorful output Hotshot part deux(Different method of #16356)
07:02:51FromDiscord<ElegantBeef> adding the `colorError(c.config)`
07:03:02FromDiscord<ElegantBeef> It's just not graceful, but kinda required if you want to be more descriptive
07:03:30disruptekit almost makes you wish macros were allowed in the compiler.
07:03:34saemYou can go the template route or you can go the data structure/interpreter route, they both are interesting for their own reasons.
07:03:35FromDiscord<ElegantBeef> The alternative is loading all error messages from a config and replacing placehold markers with the identifiers
07:04:31FromDiscord<ElegantBeef> The benefit of that approach is it allows user defined error messages, even in separate languages, but it'd be a bitch to implement πŸ˜„
07:04:51saemI mean gettext and friends are pretty old at this point.
07:05:01FromDiscord<Avatarfighter> hey hey
07:05:09FromDiscord<Avatarfighter> what is up with you all
07:05:14saemquick, everyone hide!
07:05:23saemπŸ˜€
07:05:25FromDiscord<ElegantBeef> opengl here
07:05:48FromDiscord<Avatarfighter> lmaoooo saem πŸ˜›
07:05:57FromDiscord<Avatarfighter> Beef, funny enough I was just eyeing opengl
07:06:06saemshit, see what happened
07:06:21FromDiscord<ElegantBeef> Yea i really like the output of that PR though so nice to see colour in the messages
07:06:43saemI'm a big fan of that too, I mean I still fondly remember Elm
07:07:13FromDiscord<ElegantBeef> Just that it's annoying to maintain, edit the highlighting
07:07:55saemI mean, Elm does set the benchmark for this stuff in many ways, IIRC, rust took a lot of lessons from there too. Did you look at the approaches they used?
07:08:38disruptekproviding the users with compilers having few bugs?
07:08:40FromDiscord<ElegantBeef> timothee suggested D lang which seems to just do the lazy thing of highlighting everything inside single quotes but that was just not helpful
07:08:56saemYeah, no...
07:09:19FromDiscord<ElegantBeef> That's what the first implementation followed but i hated the output
07:09:24FromGitter<Araq> error messages must be optimized for IDEs... I cringe every time that I see that bullshit "context" of a few lines here and there
07:09:48disruptekwhat?
07:09:56FromGitter<Araq> error is here ⏎ ^^^^^^^^^^
07:10:06saemLike this: https://elm-lang.org/news/compiler-errors-for-humans
07:10:06disruptekyour ide can only handle one line of text?
07:10:22FromGitter<Araq> these ascii art games like we never left the 70ies behind
07:10:23disruptekyes, elm's errors are good. btdt.
07:10:23saemI mean this can be parsed out easy enough as it has start stop markers.
07:10:27FromDiscord<ElegantBeef> Eh Nim has that with `--hint:source`
07:10:37FromGitter<Araq> I know, it's stupid.
07:10:43FromDiscord<ElegantBeef> I'm talking to saem
07:10:56saemI think you both are. πŸ˜†
07:11:05FromDiscord<ElegantBeef> Eh it doesnt really give any useful colouring
07:11:10FromGitter<Araq> but that's just my opinion, ignore me
07:11:16FromDiscord<ElegantBeef> That entire page just has a colour on the arrow
07:11:21FromDiscord<ElegantBeef> I did better than that and i'm a numpty
07:11:46saemBeef: that's from 2015, they might have changed things since.
07:12:00FromDiscord<ElegantBeef> I mean there is nothing there that i think is that nice
07:12:22FromDiscord<ElegantBeef> The biggest issue with nim's errors are they're very unreadable due being the same colour and too condensed
07:12:24saemYou mean the incredibly instructive error messages?
07:13:18disruptekhe means the error messages that never refer to indentation issues, common as they are.
07:14:33FromGitter<Araq> bad error messages should be fixed but errors should be to the point and not verbose
07:14:46FromDiscord<ElegantBeef> I mean i dont disagree that Nim's can be more instructive, but I mean just selective highlighting and more newlines makes life better https://user-images.githubusercontent.com/11792483/102170556-e0d10580-3e51-11eb-8982-f9763cc89ad7.png
07:14:52FromDiscord<ElegantBeef> My first attempt
07:14:54saemSorry, what I meant is that Elm error messages are incredibly instructive and teach as you go, in fact they treat bad error messages as bugs.
07:15:04disruptekyeah, we should make the sigmatch errors more descriptive; they are too short as it is.
07:15:28FromDiscord<ElegantBeef> Added the immutable message and highlighted the cases it was the culprit
07:15:32FromDiscord<carpal> πŸ‘
07:15:35saembeef: and a year after that blog post this is what the colouring looks like: https://twitter.com/id_aa_carmack/status/735197548034412546?lang=en
07:15:39disruptekwhat nim needs a pager built into the error messages.
07:15:49FromDiscord<Avatarfighter> lol
07:16:05FromDiscord<ElegantBeef> I dont like that one bit
07:16:13disruptekrude.
07:16:20saemI'm dying
07:16:45FromGitter<Araq> yeah right, and we don't treat bad error messages as bugs... *sigh*
07:16:46FromDiscord<ElegantBeef> Lol
07:17:02FromGitter<Araq> and we never improve anything, if only we would know about Elm
07:17:17FromGitter<Araq> (never mind that I used it personally myself)
07:17:35saemI'm not directing it at you, Araq.
07:18:02FromGitter<Araq> that error message you've improved with colors
07:18:03saemSpecifically, there are a world of lessons out there and not everyone has had the same exposure.
07:18:12FromDiscord<ElegantBeef> I think the fact is the colouring for the error is identical to the suggestion tells you all you need to know about colouring
07:18:20FromGitter<Araq> would be better if the compiler did more filtering
07:18:44FromGitter<Araq> there are only a couple of `[]` procs that apply, mutability difference or not
07:18:50FromGitter<Araq> yet it lists them all
07:18:59disruptekmaybe it could filter the bugs out before compiling them.
07:19:14FromDiscord<ElegantBeef> Yea just dont write errors... i mean bugs
07:19:40FromGitter<Araq> making the compiler a bit smarter seems more useful than coloring the nonsense more nicely
07:19:45disruptektimmy's approach is just to compile everything and never yield an error unless it's a hint.
07:20:18FromGitter<Araq> stop it, he is not "Timmy" and he's doing good work
07:20:28FromDiscord<haxscramper> The problem with errors right now is that they are based on strings, so it is kind of hard to do anything complicated
07:20:35FromDiscord<haxscramper> Like scored sorting for type mismatches
07:20:45FromGitter<Araq> ^ exactly.
07:20:52FromDiscord<haxscramper> Or creating different error representations
07:20:54saemA structured output mode for the compiler would be interesting.
07:21:06FromGitter<Araq> errors should be `nkError` nodes
07:21:15FromDiscord<ElegantBeef> I dont disagree, but colouring seemed to be something i could reasonably add versus actually touching the compiler
07:21:19FromDiscord<haxscramper> Well, I've discussed this earlier and basically the only think stopping me is just lack of time
07:21:34FromDiscord<haxscramper> But I want to start working on it in next couple of months eventually
07:21:35FromDiscord<haxscramper> RFC
07:21:52FromGitter<Araq> useful for Nim's macro system, useful for better error handling, allows us to use `typed` macros everywhere
07:21:55FromDiscord<haxscramper> starting with RFC of course, but the general idea is - structured internal representation for errors
07:22:02FromGitter<Araq> Nim needs `nkError`
07:22:17disruptekif only we knew someone who could make edits to the compiler.
07:22:25FromDiscord<haxscramper> Sounds like a good idea for `nkError`
07:22:39FromDiscord<haxscramper> disruptek: at this point I'm more than enough annoyed with current errors
07:22:48FromDiscord<haxscramper> So I guess I'm willing to make a dive
07:22:48FromDiscord<Rika> what would nkError hold other than strings though
07:23:11FromGitter<Araq> it would hold ASTs
07:23:17FromDiscord<Rika> oh
07:23:18FromDiscord<Rika> i get it
07:23:21FromDiscord<Rika> that sounds very smart
07:23:21saemPlus error structures
07:23:37disruptekyou can already embed error ast; i do it with the error pragma and it works great.
07:23:42saemWell ones that should otherwise not be part of "normal" ASTs.
07:24:29FromDiscord<Rika> saem like what? im having difficulty seeing what else it should hold
07:24:49disruptekarbitrary structure.
07:24:55FromDiscord<haxscramper> And having separate representation for errors is also useful for making "IDE-optimized" and "terminal-optimized" errors
07:25:04disruptekit's just data; we can put whatever we want in there.
07:25:06FromDiscord<lqdev> nkError to allow `typed` macros everywhere sounds like big brain time
07:25:52disruptektyped macros don't work, so allowing them everywhere will just bring on the compiler bugocalypse.
07:26:14saemRika instead of strings how about replacing them with even enums. The enums get swapped for strings, that's how one could consider i18n. This will of course mean you can't do parameterized errors, so then you upgrade that enum to some sort of object with a kind, maybe a variant, and include the various parameters as you need them.
07:26:44FromDiscord<haxscramper> I thought about reusing enums for hints/errors that we already have
07:26:45disrupteklet's just embed a little program in there that you have to run to output your error.
07:26:50FromGitter<Araq> saem: that's what I did 10 years ago, I replaced the enum values with fewer and fewer
07:26:52saemBut you don't have strings, you can refer to AST nodes and what not to refer to a something, etc...
07:27:16disruptekwe could just make a new language for describing errors.
07:27:17FromGitter<Araq> because it was a pita to maintain and i18n for error messages is fundamentally wrong
07:27:19disruptekwe can call it json.
07:27:23disruptekor, jason.
07:27:37FromGitter<Araq> 1) much harder to google error messages when they are translated
07:27:40FromDiscord<ElegantBeef> Disruptek i know you love me but quit naming shit after me
07:27:42FromGitter<Araq> 1) bad translations
07:27:43FromDiscord<lqdev> yeah i never got why people need i18n for error messages
07:27:44saemI mean I wouldn't _actually_ support i18n until later
07:27:45FromDiscord<Rika> why is i18n for errors wrong?
07:27:46FromDiscord<lqdev> like what's the point
07:27:53FromDiscord<Rika> ah i see
07:27:58FromDiscord<lqdev> your frickin' code is English already, dumbo
07:27:58FromGitter<Araq> 1) doesn't work with errors coming from macros
07:28:11FromDiscord<Rika> lqdev its not always though
07:28:14FromDiscord<lqdev> why would you need error messages in Polish, German, Spanish, or any ol' language
07:28:22FromDiscord<lqdev> @Rika then that's bad code
07:28:30disrupteknim is all about dialects.
07:28:39FromDiscord<Rika> are you telling me all programmers must know english fluently?
07:28:49disruptekonly nimions.
07:28:53FromDiscord<lqdev> no.
07:28:56saemJust keep a basic rule like, strings are from look ups, future nimions can evolve that later.
07:29:07FromDiscord<lqdev> but, you need to understand english to browse the docs anyways.
07:29:20FromDiscord<lqdev> all keywords are in english, the stdlib is in english.
07:29:30FromGitter<Araq> or rather: the translation step can always be done in your browser
07:29:35*narimiran joined #nim
07:29:40FromDiscord<lqdev> true that
07:30:07FromDiscord<lqdev> personally i've never met some who'd unironically code in a language that's not english
07:30:10FromDiscord<Rika> the documentation doesnt have to be in english
07:30:25FromDiscord<Rika> because you dont live in a country where english proficiency is low
07:30:26saemyou don't know many people then?
07:30:32FromDiscord<lqdev> and even my friends who aren't native english speakers and don't speak english very fluently try to code in english
07:30:34FromDiscord<Rika> exactly
07:30:50FromDiscord<lqdev> saem: well maybe
07:30:57saemuuhh, are those friends from countries which have latin or germanic languages as their primary language?
07:31:04FromDiscord<lqdev> yes
07:31:10FromDiscord<lqdev> no
07:31:12FromDiscord<lqdev> slavic
07:31:16FromGitter<Araq> my primary language is German...
07:31:20FromDiscord<lqdev> eh i'm still half asleep
07:31:27FromDiscord<Rika> ask a japanese or a chinese only programmer to program in english.
07:31:37saem^^
07:32:16FromDiscord<lqdev> yeah brb gonna create a japanese dialect of nim
07:32:25disruptekwell, i'm looking forward to nkErrors in my typed macros. will be a nice change from SEGVs.
07:32:47FromDiscord<lqdev> for all those poor japanese programmers who can't use a translation service or can't be bothered to learn at least the basics of english
07:32:55FromDiscord<Rika> know this, im not saying the programming language has to be in japanese or whatever
07:33:08FromDiscord<Rika> i mean that the documentation and errors should at least be translated or so
07:33:32saemor possible to translate, all it's asking for is not to close the door.
07:33:40FromDiscord<Rika> because we all know machine translations are reliable
07:33:48FromGitter<Araq> yes, into Japanese. Which you don't speak. Got it. Always care about the ones you don't know.
07:34:06FromDiscord<lqdev> i think rika does know japanese though
07:34:10disrupteksomeone write our japanese programmer an email and ask them if they want to translate the compiler.
07:34:16disruptekoh wait.
07:34:35FromDiscord<Rika> are we gonna go into the chicken and egg problem now
07:34:37saemI've seen some Japanese tweets about Nim.
07:34:48FromDiscord<haxscramper> Good error translation is major PITA because of all the programming terminology that does not have non-english alternatives
07:34:49FromDiscord<Rika> dont we have TWO books for nim in japanese
07:34:50FromGitter<Araq> I've seen Ruby using English keywords
07:34:56disruptekyeah, they think it's a kind of towel iirc.
07:34:59saemI work at a company where about half the engineers are Japanese
07:35:13saemAnd multiple of them are Ruby core committers
07:35:17FromDiscord<Rika> then we probably have to adopt rust's way for errors, having an index
07:35:43*MyMind quit (Ping timeout: 260 seconds)
07:35:45FromDiscord<haxscramper> Yes, for error this might suffice, but that doesn't really need to any specific compiler interaction
07:35:49FromDiscord<haxscramper> Output errors to json
07:35:55disruptekit's likely that the japanese find our error messages easier to understand than we do.
07:35:57FromDiscord<haxscramper> Let everyone write their own translator
07:36:00FromDiscord<haxscramper> Problem solved
07:36:33FromDiscord<haxscramper> Like this is a non-issue IMO
07:36:38FromDiscord<Rika> i'll be fine if we had no i18n for the errors but we had an index and the index was translatable/translated
07:36:45saemYeah, don't close the door, don't have to actually do much, just use something structured, later someone else can help when and if there is a greater need.
07:36:48FromDiscord<haxscramper> Index is a good idea
07:37:19disruptekjust create a discord channel and call it a day.
07:38:08FromDiscord<lqdev> index is a good idea
07:38:13FromDiscord<haxscramper> We basically have it already - with `TMsgKind`
07:38:22FromDiscord<haxscramper> It only needs more attention wrt to documentation
07:38:43saemUgh.. I need to setup an i386 build env.
07:38:47saemThat's a not tonight problem.
07:39:03FromGitter<Araq> `TMsgKind` is a failed experiment but whatever, don't listen to the guy who wrote it
07:39:32FromGitter<Araq> I'm looking forward to partially English messages coming from macros, it'll be great
07:39:46disruptekfirst they must compile.
07:40:51FromDiscord<haxscramper> Araq: by the way, could you elaborate on your `nkError` idea a little more
07:41:26FromGitter<Araq> "Fehler: Knotentyp must be nkIf", what a lovely future
07:42:40FromGitter<Araq> yeah, yeah if only everybody writes macro system error messages with i18n in mind, it'll work. That's why we never have to see &lt; on a web page
07:43:58FromGitter<Araq> and plastic pollution is never going to be a problem, all you have to do is never throw it into the sea
07:44:37FromDiscord<lqdev> that error made me laugh lol
07:44:44FromDiscord<lqdev> Knotentyp XDDDD
07:45:28saemHold on, so we don't want to have structured error messages with keys, that for example an editor could turn translations on and off for, but otherwise standard output is untranslated so the default preserves the benefits of speaking one language?
07:46:29FromDiscord<haxscramper> By keys you mean compiler options like `--errorLang:jp`?
07:46:34saemno
07:47:25saemAs in (errorCode:x, listOfStructuredParams:@[])
07:47:44FromDiscord<haxscramper> Oh, yes, that's exactly what I had in mind
07:47:46saemThat's for structured error output, translation is a rendering problem
07:48:13FromGitter<Araq> haxscramper: there is not much more to say, I need to write an RFC...
07:48:40FromGitter<Araq> "Nim 2.0: The book of unwritten RFCs" -- would you buy it?
07:49:00saemI mean, is it just blank pages...
07:49:21FromDiscord<haxscramper> I can make a book of unpublished RFCs
07:49:35saemIf the paper is good and I can use it with my fountain pens I just might.
07:49:41FromDiscord<ElegantBeef> It's a single page of "This book would be filled if any fuckwits actually submitted RFCS"
07:50:47FromDiscord<haxscramper> Though I have a free day today, and it is not like the world is going to break in half if I make RFC to use a prompt for error message discussion
07:51:21FromDiscord<haxscramper> Instead of actually thinking it all the way through the end as I originally intended
07:51:22FromDiscord<ElegantBeef> Sorry hax, i apologize for mention error messages πŸ˜›
07:51:29FromDiscord<ElegantBeef> (edit) "mention" => "mentioning"
07:51:33saemIt was the opengl
07:53:09FromGitter<Araq> "structured errors" are nice and what we need, see nkError. but don't bring up i18n, it's a different topic
07:53:12saem*shrug* I think the structured error message stuff is pretty cool
07:53:29FromGitter<Araq> totally agree, I do mind i18n
07:56:12FromDiscord<Rika> regular function call syntax, RFCS
07:56:36saemThat's a good April RFC
07:57:28FromDiscord<hamidb80> Hey everyone. I wonder why Nim standrad libraries don't use `func` instead of `proc. Lots of them don't have any side effects
07:57:41FromDiscord<hamidb80> (edit) "`proc." => "`proc`."
07:57:46FromGitter<Araq> out of practical experience with i18n, not because I don't like people who don't speak English very well
07:57:50FromDiscord<Rika> prolly because the stdlib predates func
07:58:08saemAraq: I honestly wouldn't be surprised if we both agreed that i18n is an external rendering/lookup issue. The compiler doesn't need to do the work. That's the job of whatever is rendering and has all sorts of other context.
07:58:47FromDiscord<Rika> isnt the index idea good enough for that
07:58:48FromDiscord<haxscramper> What I think might be necessary, is to have kind of ... idk, 'beginner-mode' errors or something like that. Mainly for things like https://forum.nim-lang.org/t/7343 . Because no amount of RTFM'ing would replace error contextual suggestions
07:58:51FromGitter<Araq> we can agree on that but please keep in mind that it's 2021 and machines can do translations
07:58:58FromDiscord<haxscramper> In addition to index
07:59:04FromGitter<Araq> and they are getting *really* good at, quickly.
07:59:27FromDiscord<Rika> but theyre not there yet for something pretty technical as programming can be, are they?
07:59:41FromDiscord<haxscramper> At least for some common errors like `hash` or something - if particular error pattern is common enough, special-casing it is not that bad of an idea IMO
08:00:31saemIf anything the rather structured and regular nature of the technical bits make it easier. In fact you can probably help it by putting in dummy data which removes irregular terms and allows for even better translations.
08:02:34FromDiscord<Rika> saem dont you think the index idea is sufficient or what
08:02:34*Guest23239 quit (Quit: Guest23239)
08:02:51*Guest23239 joined #nim
08:03:00ForumUpdaterBotNew thread by Gemath: How would Nim do in this language comparison?, see https://forum.nim-lang.org/t/7432
08:03:31saempossibly, but we might do even better. I mean structured error messages are already a thing with people in the chat now excited about it.
08:03:38saemWhich means the index isn't precluded.
08:04:14saemBut, I also think that's a _rendering_ problem.
08:04:27FromDiscord<Rika> buuuuuut that means you cant easily put it through a translator does it
08:04:39saemI think it does.
08:04:41FromDiscord<Rika> (i legitimately dont know the state of translator frontends)
08:04:52saemGood?
08:05:27FromDiscord<Rika> i mean, do cli translators exist, i do not know
08:06:11FromDiscord<haxscramper> Can't error translation just be implemented using hardcoded patterns?
08:06:21FromDiscord<haxscramper> It's not like we have infinite number of different errors
08:06:24saemIf the messages are structured, you can grab them from the code base, fire them at a translator, save that as an artifact.
08:06:58FromDiscord<Rika> structured as in a file holds all of them and just them?
08:07:00FromDiscord<haxscramper> We can make error message text itself structured
08:07:00ForumUpdaterBotNew thread by Drkameleon: Problem with compile-time `len` and variable, see https://forum.nim-lang.org/t/7433
08:07:02FromDiscord<Rika> like gettext or something?
08:07:23saemI don't want to write the code in my head right now, we don't even have an RFC.
08:07:49saemThis is well past off the cuff thinking and needs to deeper thought written long form prose and/or diagrams provide.
08:07:53FromGitter<Araq> my RFC would be about `nkError`
08:08:12saemAlso that
08:08:20FromGitter<Araq> and it would be so controversial that I have to close it immediately
08:08:50saem`nkError` is an enabling capability for far more than i18n.
08:09:01FromGitter<Araq> yeah, it will be scary
08:09:10saemπŸ‘»
08:09:28FromGitter<Araq> so I should write an issue for compiler-dev instead and make `nkError` internal first
08:09:38FromGitter<Araq> as a refactoring of the compiler
08:09:48FromGitter<Araq> later on we can expose it or not
08:10:33saemAnyone on Fedora and has done the legwork to setup an i386 build env?
08:11:00saemPersonally would prefer internal incubation.
08:14:27FromGitter<Araq> don't bother, disable the tests for 32bits and move on please
08:14:33FromGitter<Araq> *the test
08:14:41saemEven better!
08:15:23FromGitter<Araq> it's fair to say "for a better nimsuggest use a 64bit build"
08:17:07saemYeah, my other option was change the tester to output more text (currently 200 chars) and see what the issue is, but I feel bad about hogging all that CI.
08:35:03*PMunch joined #nim
08:38:31*Vladar joined #nim
08:53:53FromGitter<gogolxdong> Anyone familiar with wNim? I've been stuck at embeding hyperlink in wTextCtrl for several weeks.
09:00:04*juanfra__ quit (Quit: Idle for 30+ days)
09:02:38*Guest23239 quit (Quit: Guest23239)
09:02:55*Guest23239 joined #nim
09:06:30FromDiscord<carpal> fidex thanks https://github.com/Carpall/nobject/
09:06:38FromDiscord<carpal> (edit) "https://github.com/Carpall/nobject/" => "<https://github.com/Carpall/nobject/>"
09:06:53FromDiscord<ElegantBeef> What'd you call me?
09:13:08ForumUpdaterBotNew thread by RainbowAsteroids: How do I list the files in a directory in Nim?, see https://forum.nim-lang.org/t/7435
09:37:29*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:38:39FromDiscord<flywind> Hi, how can I do weak linkage for `getrandom` like rust? https://github.com/rust-random/getrandom/blob/d79de0c95c01860268e071bcb6b0d019e18cd608/src/solaris_illumos.rs#L33
09:39:30FromDiscord<flywind> or https://github.com/rust-lang/rust/commit/675bdf6d6d7b6441598961052df6466efbb4bee4
09:43:55PMunchAnother person confused by Nim speed by not doing -d:release.. https://forum.nim-lang.org/t/7426 I'm starting to think we should look for procedures named `fib` and output a warning that they should probably be using -d:release..
09:49:12FromDiscord<ElegantBeef> lol
09:49:26FromDiscord<Zachary Carter> RTFM
09:49:33FromDiscord<ElegantBeef> Should force people to read the compiler manual before being allowed to compiler
09:49:50FromDiscord<ElegantBeef> "Welcome to the nim compiler, after answering this series of 200 questions it will be opened for you"
09:50:16FromDiscord<ElegantBeef> Compilation should be earned not given away freely πŸ˜„
09:50:58FromDiscord<mratsim> "hello, I see you are compiling \"fib\", here I am, Clippy, your helpful Nim compiler nagging you to not forget to use release.
09:51:28FromDiscord<mratsim> but to be fair, C, C++, Rust also suffer from the same
09:51:32FromDiscord<haxscramper> `--warning[RTFM]:on`
09:51:38FromDiscord<mratsim> people forgetting -O2 or CMake with release
09:53:00*narimiran quit (Ping timeout: 265 seconds)
10:00:50FromDiscord<lqdev> people using cmake
10:02:43*Guest23239 quit (Quit: Guest23239)
10:04:37FromGitter<offbeat-stuff> Hi This throws error https://play.nim-lang.org/#ix=2NmL
10:06:19FromDiscord<konsumlamm> even when looking around a tiny bit about nim performance, one of the first things you find is "use `-d:release`"
10:06:25FromDiscord<ElegantBeef> Are you missing a proc named `needsRefresh`?
10:07:07FromGitter<offbeat-stuff> needsRefresh is of kind proc(x:string,b:varargs[string])
10:07:13FromGitter<offbeat-stuff> how to pass my values to that
10:08:27FromGitter<offbeat-stuff> render/nakefile.nim(4, 27) Error: cannot convert varargs[string] to varargs[string]
10:09:00FromDiscord<konsumlamm> i mean, you didn't define `needsRefresh` in the playground, so it will obviously fail
10:09:16FromGitter<offbeat-stuff> Not in the playground
10:09:24FromGitter<offbeat-stuff> on my computer
10:09:45FromDiscord<konsumlamm> ye, but it's obvious that the playground code will fail
10:10:02FromDiscord<konsumlamm> what's the code that gives you the varargs error?
10:10:19FromGitter<offbeat-stuff> if needsRefresh(ox,ix,args):
10:10:21FromGitter<offbeat-stuff> This line
10:10:26FromDiscord<konsumlamm> ah, hmm
10:10:40FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2NmO one solution
10:11:00FromDiscord<konsumlamm> idk too much how varargs work in nim
10:11:01FromDiscord<ElegantBeef> Varargs dont play nicely with single passed values and arrays
10:11:10FromDiscord<ElegantBeef> (edit) "arrays" => "openarrays"
10:11:13FromDiscord<konsumlamm> in other languages it gets converted to an array
10:11:22FromGitter<offbeat-stuff> Thanks
10:11:41FromDiscord<ElegantBeef> https://nim-lang.org/docs/manual.html#types-varargs
10:11:43FromDiscord<konsumlamm> so you have to use a "splat" operator (`` in python)
10:12:29FromDiscord<ElegantBeef> It's converted to an array internally so you're passing `string, string, array`
10:12:37FromDiscord<ElegantBeef> Which just doesnt play nice
10:13:30FromDiscord<konsumlamm> shouldn't you be able to pass an array to varargs, judging from the manual?
10:13:49FromDiscord<ElegantBeef> You can pass an openarray or single values, but not both
10:14:35FromDiscord<konsumlamm> isn't an array also an openarray?
10:14:39FromDiscord<ElegantBeef> Yes
10:14:53FromDiscord<ElegantBeef> Notice that their second proc only has two arguments
10:15:03FromDiscord<ElegantBeef> But they're passing two strings and an array
10:15:28FromDiscord<konsumlamm> ohh
10:15:29FromDiscord<konsumlamm> i see
10:15:51FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2NmR another example
10:16:20FromDiscord<konsumlamm> the error message is a bit misleading though
10:25:27FromDiscord<Meowz> Why can't I define `release` in the project nim.cfg file? Neither `-d:release` `--define:release` or `-d:"release"` do the job
10:27:00FromDiscord<lqdev> due to how the compiler's nim.cfg is processed before your nim.cfg
10:27:10FromDiscord<lqdev> and release and danger are implemented there
10:27:31FromDiscord<lqdev> why'd you want to -d:release every single build though
10:27:34FromDiscord<lqdev> you lose stack traces
10:27:45FromDiscord<lqdev> usually --opt:speed is good enough to give you a good performance boost
10:27:54FromDiscord<ElegantBeef> well they said "project nim.cfg"
10:27:54FromDiscord<lqdev> though it slows down compilation
10:28:02FromDiscord<ElegantBeef> idk if it's the global cfg
10:28:11FromDiscord<lqdev> @ElegantBeef it doesn't matter
10:28:16FromDiscord<ElegantBeef> I just tested it
10:28:22FromDiscord<lqdev> the compiler's nim.cfg is still processed first
10:28:32FromDiscord<ElegantBeef> You can put release into a `main.nim.cfg` and it works
10:29:11FromDiscord<lqdev> https://nim-lang.org/docs/nimc.html#compiler-usage-configuration-files
10:29:19FromDiscord<lqdev> you sure about that beef?
10:30:08FromDiscord<ElegantBeef> https://streamable.com/z5fmgn
10:30:10FromDiscord<ElegantBeef> I hope so
10:33:44FromDiscord<ElegantBeef> Either way dont make everything a release build, just tedious πŸ˜„
10:33:46FromDiscord<ElegantBeef> I now sleep
10:34:54FromDiscord<Rika> It’s not for debugging so why should you always make one
10:35:06FromDiscord<Meowz> Well I'm not debugging that project at all. Guess making everything a debug build is weird ;x
10:35:07FromDiscord<Rika> Are you telling me you don’t debug πŸ˜›
10:35:27FromDiscord<Rika> Then just do it once on the command
10:35:46FromDiscord<Meowz> bleh.. compiling it 300 times a hour. I wanna save that! πŸ˜„
10:36:43FromDiscord<Rika> Does your shell not have history
10:39:33FromDiscord<Meowz> https://discord.com/channels/701530051140780102/794620795493548062/794626504017051719
10:40:17FromDiscord<Meowz> https://guidedhacking.com/attachments/47314541_2216816705019508_3216886657382875136_n-jpg.8407/
10:41:34FromDiscord<Rika> β€œhistory | grep command”
10:57:47*Q-Master joined #nim
10:58:37*^Q-Master^ quit (Read error: Connection reset by peer)
11:14:30PMunchOr just !nim @Rika
11:14:51FromDiscord<Rika> Yeah that works I guess
11:15:01FromDiscord<Rika> I’m not using bash though so I forgot
11:19:42*Avahe[m] quit (Quit: Bridge terminating on SIGTERM)
11:19:49*stisa[m] quit (Quit: Bridge terminating on SIGTERM)
11:19:49*leorize[m] quit (Quit: Bridge terminating on SIGTERM)
11:19:49*planetis[m] quit (Quit: Bridge terminating on SIGTERM)
11:19:49*j-james[m] quit (Quit: Bridge terminating on SIGTERM)
11:19:49*unclechu quit (Quit: Bridge terminating on SIGTERM)
11:19:49*lnxw37d4 quit (Quit: Bridge terminating on SIGTERM)
11:19:49*Avatarfighter[m] quit (Quit: Bridge terminating on SIGTERM)
11:19:49*lytedev[m] quit (Quit: Bridge terminating on SIGTERM)
11:19:49*MTRNord1 quit (Quit: Bridge terminating on SIGTERM)
11:19:49*jaens[m] quit (Quit: Bridge terminating on SIGTERM)
11:19:49*William[m]1 quit (Quit: Bridge terminating on SIGTERM)
11:19:49*reversem3 quit (Quit: Bridge terminating on SIGTERM)
11:19:51*VijayMarupudi[m] quit (Quit: Bridge terminating on SIGTERM)
11:19:51*k0mpjut0r quit (Quit: Bridge terminating on SIGTERM)
11:19:51*cmc[m] quit (Quit: Bridge terminating on SIGTERM)
11:19:51*silvernode[m] quit (Quit: Bridge terminating on SIGTERM)
11:19:51*codic quit (Quit: Bridge terminating on SIGTERM)
11:19:51*dilawar_uchiha[m quit (Quit: Bridge terminating on SIGTERM)
11:19:51*Kurre[m] quit (Quit: Bridge terminating on SIGTERM)
11:19:52*ee7[m] quit (Quit: Bridge terminating on SIGTERM)
11:19:53*awici[m] quit (Quit: Bridge terminating on SIGTERM)
11:19:53*Zoom[m] quit (Quit: Bridge terminating on SIGTERM)
11:19:53*Clonkk[m] quit (Quit: Bridge terminating on SIGTERM)
11:19:54*cadmium[m] quit (Quit: Bridge terminating on SIGTERM)
11:19:56*Juno[m] quit (Quit: Bridge terminating on SIGTERM)
11:19:56*vindaar[m] quit (Quit: Bridge terminating on SIGTERM)
11:19:56*himup[m] quit (Quit: Bridge terminating on SIGTERM)
11:20:14*BitPuffin quit (Quit: Bridge terminating on SIGTERM)
11:20:14*matthias[m] quit (Quit: Bridge terminating on SIGTERM)
11:20:14*GitterIntegratio quit (Quit: Bridge terminating on SIGTERM)
11:20:15*BauxnaMatrix[m] quit (Quit: Bridge terminating on SIGTERM)
11:20:33FromDiscord<lqdev> n<right arrow>
11:20:42FromDiscord<lqdev> fish master race
11:22:47FromDiscord<lqdev> @haxscramper how's your clang-based c++ wrapping tool?
11:24:43FromDiscord<haxscramper> I have one large refactoring pending, but otherwise it is usable, but not documented. So far I've only wrapped one C++-OOP library for test - https://github.com/haxscramper/nimtrail/blob/master/src/nimtrail.nim
11:24:53*PMunch quit (Quit: leaving)
11:25:30FromDiscord<haxscramper> But for now it can be considered work-in progress still
11:26:04*Guest23239 joined #nim
11:27:49*PMunch joined #nim
11:28:01FromDiscord<haxscramper> But I've found several ergonomics issues that need to be fixed
11:29:18*hmmm joined #nim
11:30:39PMunchHmm, can two procedures await the same future?
11:32:20PMunchProblem is I have one websocket that can both send a reply to a message I just sent or update me on the state of an event
11:32:40*Kurre[m] joined #nim
11:36:26*Guest23239 quit (Ping timeout: 240 seconds)
11:39:35*Guest23239 joined #nim
11:41:51FromDiscord<mratsim> @PMunch, you shouldn't do that.
11:41:58FromDiscord<mratsim> one owner.
11:42:04PMunchYeah I realised that was a bad idea :P
11:42:12PMunchI'm too used to thinking about threads..
11:42:19FromDiscord<mratsim> shared mutable state is a recipe for heisenbugs
11:42:31FromDiscord<mratsim> even with a threadpool
11:43:01FromDiscord<mratsim> just have something block on the future with registered callbacks
11:43:24FromDiscord<mratsim> doesn't the stdlib provide AsyncEvent or something like that?
11:44:00FromDiscord<mratsim> yes, you can use that: https://nim-lang.org/docs/asyncdispatch.html#trigger%2CAsyncEvent
11:44:33PMunchWhat would I use that for?
11:46:11FromDiscord<mratsim> you subscribe a callback that is triggered when the event is signaled
11:46:32FromDiscord<mratsim> and in the awaiter you trigger the event after the future is completed
11:46:45FromDiscord<mratsim> you subscribe 2 callbacks
11:47:14FromDiscord<mratsim> i.e. you do a producer-> consumer architeture by having consumers subscribe to producer events
11:50:45FromDiscord<Clyybber> @Araq moduleHasChanged was wrong before your IC changes, right? I remember some oddities with it, but can't reproduce them anymore after your changes
11:51:32FromDiscord<Clyybber> (maybe they weren't related to moduleHasChanged)
11:51:59FromDiscord<Clyybber> it was basically the nim compiler not recompiling if changing the file while it's compiling
11:52:04FromDiscord<Clyybber> but now it works so yay
11:54:42*lritter quit (Ping timeout: 260 seconds)
11:54:46*rockcavera joined #nim
12:02:30PMunch@mratsim, the problem is keeping track of the awaiter..
12:02:44PMunchThat's why I tried to attach multiple callbacks to one sender
12:17:37*stisa[m] joined #nim
12:17:37*BitPuffin joined #nim
12:17:37*lnxw37d4 joined #nim
12:17:37*GitterIntegratio joined #nim
12:17:37*Avahe[m] joined #nim
12:17:38*j-james[m] joined #nim
12:17:38*reversem3 joined #nim
12:17:38*unclechu joined #nim
12:17:38*Avatarfighter[m] joined #nim
12:17:38*William[m]1 joined #nim
12:17:39*lytedev[m] joined #nim
12:17:39*MTRNord joined #nim
12:17:39*planetis[m] joined #nim
12:17:40*matthias[m] joined #nim
12:17:40*jaens[m] joined #nim
12:17:40*leorize[m] joined #nim
12:17:44*cadmium[m] joined #nim
12:17:44*Juno[m] joined #nim
12:17:44*vindaar[m] joined #nim
12:17:44*himup[m] joined #nim
12:17:45*VijayMarupudi[m] joined #nim
12:17:45*awici[m] joined #nim
12:17:45*silvernode[m] joined #nim
12:17:45*codic joined #nim
12:17:45*Clonkk[m] joined #nim
12:17:46*ee7[m] joined #nim
12:17:46*k0mpjut0r joined #nim
12:17:46*BauxnaMatrix[m] joined #nim
12:17:47*dilawar_uchiha[m joined #nim
12:17:47*cmc[m] joined #nim
12:17:48*Zoom[m] joined #nim
12:25:33*vsantana joined #nim
12:36:10*lf joined #nim
12:36:33*lf is now known as Guest62103
12:39:49*Guest23239 quit (Ping timeout: 258 seconds)
12:40:19*abm joined #nim
12:53:22*vsantana quit (Read error: Connection reset by peer)
13:06:11*hmmm quit (Quit: WeeChat 2.8)
13:15:31*narimiran joined #nim
13:22:48FromDiscord<konsumlamm> tfw the stdlib threadpool segfaults for a fibonacci example
13:23:11PMunchWhich one?
13:25:13FromDiscord<konsumlamm> https://github.com/nim-lang/Nim/issues/11922
13:25:14disbotβž₯ Threadpool deadlocks on common multithreading examples
13:25:56FromDiscord<konsumlamm> wait, no, it just deadlocks
13:26:17FromDiscord<konsumlamm> segfaulting was when you create a thread inside a proc and return the thread handle
13:27:00PMunchHmm, threading in Nim is a bit wonky..
13:27:31FromDiscord<konsumlamm> mm, sadly
13:27:44PMunchHopefully it looks like there are some improvements coming
13:27:52PMunchI mean ARC is already a big improvement
13:28:09FromDiscord<konsumlamm> what does ARC have to do with threading?
13:28:22PMunchYou can more easily share data between threads without copying
13:28:29PMunchAnd without breaking the GC
13:28:36FromDiscord<konsumlamm> ah, i remember reading something about that
13:28:37FromDiscord<konsumlamm> that's nice
13:28:44FromDiscord<Zachary Carter> move semantics baby
13:28:53PMunchOh yeah!
13:29:05FromDiscord<Clyybber> @konsumlamm Use weave instead of the stdlib
13:29:34FromDiscord<konsumlamm> ig
13:29:45FromDiscord<konsumlamm> though weave is still experimental, isn't it?
13:29:50FromDiscord<Zachary Carter> yeah
13:29:52PMunchStill not 100% sure when a move is triggered though, I kinda want to re-implement my trivial work-stealing thing for ARc
13:29:55FromDiscord<konsumlamm> (i mean, so is threadpool)
13:30:05FromDiscord<Zachary Carter> threadpool has never worked right
13:30:27FromDiscord<konsumlamm> hey, at least it didn't break over night
13:30:50FromDiscord<Zachary Carter> I think the common advice since pre 1.0 was to avoid using threadpool
13:30:57PMunchMan a nice DSL for homeassistant in Nim would be amazing
13:30:59FromDiscord<konsumlamm> perhaps that should be clarified, instead of just saying "Unstable API."
13:31:06FromDiscord<Zachary Carter> and if you want to have a threadpool at your disposal, implement your own
13:31:19FromDiscord<Zachary Carter> I'm not sure what code, besides tests, relies on threadpool
13:31:21FromDiscord<Zachary Carter> I can't imagine it's much
13:31:31FromDiscord<Zachary Carter> so maybe it should just be removed from the stdlib all together
13:31:45FromDiscord<Zachary Carter> or it should be fixed
13:32:03ZevvHey zacharay carter
13:32:08FromDiscord<Zachary Carter> Hi Zevv
13:32:12FromDiscord<mratsim> @konsumlamm to be fair even production libraries choks on fibonacci
13:32:14Zevvwhat did disruptek find on you to make you pay
13:32:19FromDiscord<Zachary Carter> lol
13:32:42FromDiscord<Zachary Carter> I just want him to get out of his bus or trailer or tent
13:32:47FromDiscord<Zachary Carter> or whatever he's living in now
13:33:14Zevvyeah same here. that sucks very big time
13:33:19FromDiscord<mratsim> Julia for example chokes on fib: https://github.com/JuliaLang/julia/issues/33762↡and HPX, a production-grade threading library: https://github.com/STEllAR-GROUP/hpx/issues/4227
13:33:30disbotβž₯ Fibonacci: segfaults and scalability issues ; snippet at 12https://play.nim-lang.org/#ix=2NnC
13:33:44FromDiscord<mratsim> And Haskell takes a looooooooooonnngggg time
13:33:49FromDiscord<Zachary Carter> It does... I don't know him well enough to understand his reluctance to get a real job
13:33:50FromDiscord<konsumlamm> oof
13:33:57FromDiscord<konsumlamm> but it terminates?
13:33:59FromDiscord<mratsim> oh, and GCC OpenMP is completely broken
13:34:05FromDiscord<mratsim> GCC doesn't terminate
13:34:09FromDiscord<mratsim> I don't remember
13:34:13FromDiscord<Zachary Carter> but I guess if he wants to just go the FOSS donation route that's cool too - he's gotta start somewhere
13:34:20PMunchZevv, we're having a fundraiser for Disruptek?
13:34:37FromDiscord<Zachary Carter> I just sponsored him on Github
13:34:41FromDiscord<Zachary Carter> like $15 a month or soemthing
13:34:41PMunchAh cool
13:34:43FromDiscord<konsumlamm> lemme test haskell and rayon
13:34:45FromDiscord<Zachary Carter> (edit) "soemthing" => "something"
13:34:57ZevvPMunch: we've had for a long time
13:35:07ZevvWhat, only $15? shame on you!
13:35:12FromDiscord<Zachary Carter> lol
13:35:16FromDiscord<Zachary Carter> I'm not as rich as I used to be
13:35:26Zevvwrong business dude. games don't pay.
13:35:29FromDiscord<Zachary Carter> I used to give Nim $150 a month, did that for like a year or so
13:35:34FromDiscord<Zachary Carter> no they do not
13:36:00*Guest62103 quit (Quit: Guest62103)
13:36:16*Guest62103 joined #nim
13:36:24Zevvwow that's a significant sum
13:36:51FromDiscord<Zachary Carter> yeah, but that's when I was single and got paid well and was living rent free
13:37:08FromDiscord<hamidb80> https://github.com/nim-lang/Nim/issues/16832
13:37:08disbotβž₯ using `func` keyword instead of `proc` in standard libraries
13:37:10FromDiscord<Rika> oof, what happened to the paid well part
13:37:16FromDiscord<Zachary Carter> I went into game dev
13:37:42FromDiscord<mratsim> @konsumlamm https://github.com/mratsim/weave/tree/master/benchmarks/fibonacci for haskell and rayon https://github.com/HadrienG2/weave-parallel-benchmarks-rs
13:37:43FromDiscord<Rika> yeah exactly what i said, it predated func so most of it isnt using func
13:37:51FromDiscord<Rika> feel free to do the PRs though
13:38:56FromDiscord<Clyybber> not sure if keeping the issue open is useful though, as I don't think we can ever be certain when to close it :P
13:39:09FromDiscord<Zachary Carter> when everything is side effect free
13:39:19FromDiscord<Clyybber> remove io.nim
13:39:28FromDiscord<hamidb80> I've never been in a such kind community before
13:39:33FromDiscord<Clyybber> :D
13:39:37FromDiscord<Zachary Carter> I sense sarcasm
13:39:46FromDiscord<konsumlamm> let me have my fun doing pointless benchmarks someone else already has done :p
13:39:59FromDiscord<Rika> i mean legitimately not being mean here, i dont know what else i'd say
13:40:03FromDiscord<Clyybber> I don't think so; most people aren't native speakers
13:40:17FromDiscord<konsumlamm> who needs io anyway
13:40:20FromDiscord<mratsim> gl hf
13:40:26FromDiscord<konsumlamm> this meme was brought to you by haskell gang
13:40:37FromDiscord<Rika> lmao
13:41:27ZevvPMunch: https://github.com/sponsors/disruptek
13:41:59Zevv"I'm unemployed and homeless.
13:41:59ZevvWith your support, I buy drugs.
13:42:00ZevvIf there's anything left, I buy food."
13:42:02PMunchI mean with a bio like that it's hard not to sponsor :P
13:42:07Zevvikr
13:42:08FromDiscord<Zachary Carter> lol
13:42:19PMunch"Narrator: there wasn't" < don't forget that part
13:42:54FromDiscord<konsumlamm> @mratsim didn't even think about monad-par, but it seems to be the closest to nims threadpool
13:43:37FromDiscord<mratsim> if you have an alternate implementation feel free to PR it in
13:43:48FromDiscord<mratsim> I looked for a couple and that was the easiest to use.
13:44:05FromDiscord<konsumlamm> i thought about using the async package
13:44:27FromDiscord<konsumlamm> which is basically a wrapper around haskells standard forkIO
13:46:37FromDiscord<mratsim> nqueens is a fun non toy benchmark to implement. Also very unbalanced due to backtracking so very good test for actual schedulers (and not test for overhead: https://github.com/mratsim/weave/blob/master/benchmarks/nqueens/weave_nqueens.nim)
13:46:58FromDiscord<mratsim> Also that's one thing less to do if you get that at a hiring interview
13:47:21ZevvI never had an hiring interview :(
13:47:49PMunchhttps://github.com/PMunch/nimlsp/issues/70 <- anyone know what might trigger this?
13:47:56disbotβž₯ nimlsp crashes with a nim file importing a non-existent module and critbits ; snippet at 12https://play.nim-lang.org/#ix=2NnJ
13:48:18PMunchSeems related to this: https://forum.nim-lang.org/t/7434
13:51:28FromDiscord<konsumlamm> @mratsim do you also plan to support easy to use parallel map/fold
13:51:56FromDiscord<mratsim> https://github.com/mratsim/weave#data-parallelism
13:52:20FromDiscord<mratsim> and for folding: https://github.com/mratsim/weave#parallel-reduction
13:53:00FromDiscord<konsumlamm> i see
13:53:30FromDiscord<konsumlamm> since using more of an FP style, i always expect such things to be higher order functions
13:53:40FromDiscord<mratsim> I wonder why parallelReduce is called parallelReduceImpl, must have missed a proc
13:53:40FromDiscord<konsumlamm> but in nim those don't work that nicely
13:54:03FromDiscord<mratsim> you can create a higher level wrapper
13:54:19FromDiscord<konsumlamm> so weave is just meant to provide a low level API?
13:54:29FromDiscord<mratsim> Weave syntax is more reminiscent to OpenMP
13:55:08FromDiscord<konsumlamm> oh, btw, you may also want to add a benchmark for D with std.parallelism
13:55:14FromDiscord<mratsim> I think the API is quite complete in terms of global threadpool
13:55:28FromDiscord<konsumlamm> (i've never used D, but it's similar to Nim in many ways, so i think it would be a good addition)
13:55:42FromDiscord<mratsim> the other stuff I would like to add is "pool.spawn" for local threadpool
13:55:49FromDiscord<mratsim> also distributed computing
13:56:05FromDiscord<mratsim> and CUda/OpenCL scheduling
13:56:35FromDiscord<mratsim> and yes, Weave is meant to be a low-level backend to Lux: https://github.com/numforge/laser/tree/master/laser/lux_compiler/core
13:56:58FromDiscord<mratsim> It would a deep learning / scientific computing compiler
13:57:53FromDiscord<konsumlamm> will it always be necessary to call `init(Weave)` and `exit(Weave)`?
13:59:30FromDiscord<mratsim> I can create a weave_autoinit file :p that does that on import
14:00:17FromDiscord<mratsim> Example of deep learning / image processing compilers: https://halide-lang.org/ http://tiramisu-compiler.org/
14:04:00FromDiscord<mratsim> likely what I will do is create weave_local and weave_global and weave\_global will auto init the runtime.
14:05:16FromDiscord<Rika> will you keep the forced qualification as well
14:06:30FromDiscord<mratsim> yes
14:06:42FromDiscord<mratsim> to differentiate between pool.init() and Weave.init()
14:07:00FromDiscord<mratsim> and because using just "init" will be very confusing
14:28:37FromGitter<Araq> use `init` and make the copy&paste example code use `pool.init()`, it works
14:28:51FromGitter<Araq> programmers are good at copy&paste
14:31:38FromDiscord<mratsim> there is no pool.init yet
14:31:52FromDiscord<mratsim> I didn't implement local pools
14:32:33FromDiscord<konsumlamm> so, using rayon works very well (i ended up using the versions you linked xd)
14:33:34FromDiscord<mratsim> apparently Rayon is cheating there: https://github.com/HadrienG2/parallel-histograms-bench/issues/2#issuecomment-563464607
14:33:38disbotβž₯ Perf profile on i9-9980XE ; snippet at 12https://play.nim-lang.org/#ix=biQ
14:33:53FromDiscord<mratsim> well it's less general than spawn(fnCall(params...))
14:36:03*Guest62103 quit (Quit: Guest62103)
14:36:35*Guest62103 joined #nim
14:36:50FromDiscord<mratsim> I think you can't implement nqueens in Rayon because it doesn't support fork join parallelism?
14:37:32FromDiscord<mratsim> this is problematic because many algorithms in scientific computing are recursive divide and conquer.
14:38:23FromDiscord<mratsim> for example FFT, solving a constraint of matrices and plenty of others
14:38:55FromDiscord<mratsim> and you need one runtime that can seamlessly interweave data parallel and task parallel multithreading.
14:54:57FromDiscord<konsumlamm> not sure
14:55:03FromDiscord<konsumlamm> have you looked at `scope`?
14:55:28FromDiscord<konsumlamm> also, what is a good input value to benchmark?
14:56:15FromDiscord<mratsim> I think 13-15 are decently long without being too much
14:56:23FromDiscord<mratsim> Rayon doesn't support futures yet does it?
14:57:02FromDiscord<konsumlamm> i dont think so
14:57:30FromDiscord<konsumlamm> i tested the rayon version (with `join` and with `scope`) and it was almost instantaneous
14:57:53FromDiscord<konsumlamm> using fib(20)
14:58:32FromDiscord<mratsim> still pending: https://github.com/rayon-rs/rayon/pull/679
14:58:33disbotβž₯ [WIP] Add the ability to spawn futures
15:01:49*NimBot joined #nim
15:01:54FromDiscord<konsumlamm> haskell with monad-par is also almost instant, with 8 threads
15:02:01FromDiscord<konsumlamm> i feel like i'm doing something wrong
15:02:44FromDiscord<mratsim> I might be remembering wrong about Haskell
15:02:54FromDiscord<mratsim> Rayon scopes are expected to be fast.
15:03:14FromDiscord<mratsim> Julia, GCC, HPX are expected to be broken.
15:03:20FromDiscord<mratsim> and Nim's threadpool
15:09:39FromDiscord<konsumlamm> async works similarly good
15:09:47*habamax quit (Ping timeout: 272 seconds)
15:10:11FromDiscord<konsumlamm> @mratsim would you be interested in a D benchmark?
15:10:41FromDiscord<mratsim> sure
15:10:55FromDiscord<mratsim> any lang/impl can go in those folders
15:11:21FromDiscord<mratsim> the goal is really to find who can beat Weave so that I can study, unravel their secrets and assimilate them.
15:12:10FromDiscord<konsumlamm> xd
15:12:11FromDiscord<Clyybber> 😈
15:28:19ForumUpdaterBotNew post on r/nim by abakune: Nim Template Help, see https://www.reddit.com/r/nim/comments/l5g7s1/nim_template_help/
15:35:11*waleee-cl joined #nim
15:36:20*Guest62103 quit (Quit: Guest62103)
15:36:40*Guest62103 joined #nim
15:39:29*ryanhowe joined #nim
15:40:23ForumUpdaterBotNew post on r/nim by ralz0000: Needing help with reading a file to a Channel[string], see https://www.reddit.com/r/nim/comments/l5gggk/needing_help_with_reading_a_file_to_a/
16:12:29*leorize joined #nim
16:13:39*xet7 joined #nim
16:14:59*leorize quit (Remote host closed the connection)
16:15:18*leorize joined #nim
16:16:27FromDiscord<hamidb80> what does `Infix` mean?
16:17:40FromDiscord<Zachary Carter> like infix notation?
16:18:09FromDiscord<hamidb80> yes
16:18:11FromDiscord<Zachary Carter> `+ 1 1` would be prefix notation, `1 + 1` would be infix
16:18:21FromDiscord<Zachary Carter> it depends on the placement of the operator vs operands
16:27:21FromDiscord<hamidb80> I just copied this code from ↡https://nim-lang.org/docs/macros.html#callsslashexpressions-ranges↡and it give me error https://media.discordapp.net/attachments/371759389889003532/803662371809001543/Screenshot_165.png
16:27:32FromDiscord<hamidb80> (edit) "I just copied this code from ↡https://nim-lang.org/docs/macros.html#callsslashexpressions-ranges↡and it give me ... error" added "an"
16:28:33FromDiscord<mratsim> use untyped instead of stmt and open a bug, the documentation is outdated
16:32:07FromDiscord<hamidb80> I found Nim code more readable than similar python code
16:33:58*Prestige quit (Quit: Prestige)
16:35:49*Prestige joined #nim
16:36:24*Guest62103 quit (Quit: Guest62103)
16:36:42*Guest62103 joined #nim
16:38:27FromDiscord<hamidb80> sent a long message, see http://ix.io/2NoX
16:38:46FromDiscord<hamidb80> his first program in Nim https://media.discordapp.net/attachments/371759389889003532/803665245083533332/Screenshot_160.png
16:39:52FromDiscord<hamidb80> (edit) "http://ix.io/2NoX" => "http://ix.io/2NoY"
16:43:01*j-james joined #nim
16:45:00FromDiscord<hamidb80> (edit) sent a long message, see http://ix.io/2Np0
16:48:44FromDiscord<haxscramper> By the way, if you have no spaces in identifier names you don't even need backticks
16:49:35FromDiscord<hamidb80> yeah, I used ` just because it supports our native language characters πŸ˜†
16:50:03FromDiscord<haxscramper> No, I mean any valid unicode without spaces works
16:50:06*habamax joined #nim
16:50:17FromDiscord<haxscramper> !eval let тСст = "q123"
16:50:19NimBot<no output>
16:50:33FromDiscord<hamidb80> !eval let тСст = "q123"; echo тСст
16:50:35NimBotq123
16:50:41FromDiscord<hamidb80> wow
16:58:08disrupteki would go the foss route if i could live off it.
16:58:21disruptekotherwise i will wait for covid to end so i can go back to washing hair at the local salon.
16:59:36*superbia joined #nim
17:00:02disruptekwhen was the last time your software surprised you?
17:00:38disruptekdom96: i don't mean bugs.
17:00:38FromDiscord<mratsim> when Nim view types worked as expected, so yesterday
17:01:15disrupteki just did `git nim` and got this:
17:01:28disruptekrefreshing the 1.0.11 distribution...
17:01:34disruptek 8 days ago rm weave from 1.0
17:01:34disruptek 8 days ago also remove weave from tests (duh)
17:01:34disruptek 7 days ago balls-2.0.7
17:02:02FromDiscord<mratsim> Weave is tested in 1.0 ?
17:02:09disrupteknot anymore.
17:02:10FromDiscord<mratsim> AFAIK it needs 1.2 at minimum
17:02:43disrupteki guess these log messages need polish. 🀦
17:02:58*hnOsmium0001 joined #nim
17:03:29*superbia quit (Client Quit)
17:08:40*abm quit (Ping timeout: 246 seconds)
17:19:29*asdflkj joined #nim
17:20:23FromDiscord<carpal> color scheme?
17:21:11disrupteki wash all colors of hair.
17:27:10FromDiscord<iWonderAboutTuatara> @ElegantBeef not sure if the window of submission for this month in Nim has passed
17:27:17FromDiscord<iWonderAboutTuatara> for this month
17:27:44FromDiscord<iWonderAboutTuatara> If it has, can you @ me a few days before you publish the version for next moth so I can post the most updated version of my game?
17:37:27disruptekcarpal: oh, gitnim already has color to distinguish the age of the update from the commit summary itself.
17:39:33FromDiscord<Clyybber> poor disruptek doesnt see what carpal was replying too
17:40:03FromDiscord<Clyybber> (replied to the image that was sent)
17:41:02*disruptek sighs.
17:42:55disruptekAraq: am i right to assume that you ignored all feedback regarding concepts and simply implemented your design as originally proposed in the first comment of the RFC?
17:43:35FromDiscord<mratsim> AFAIK he asked for review on his PR that has been sitting there for months
17:43:36FromDiscord<carpal> why nimble on linux doesn't know the requirement nim >= 1.4.2?
17:43:42FromDiscord<carpal> (edit) "nim" => "`nim" | "1.4.2?" => "1.4.2`?"
17:43:52disruptekmratsim: that's what i'm doing, for the second time.
17:43:58leorizeI don't think nimble ever check that requirement
17:44:15FromDiscord<mratsim> I think it does, some use it to require devel
17:44:33disruptekit's basically there to screw you and for no other reason.
17:44:35FromDiscord<carpal> I switched to PopOS from windows and while on win that requirement was mandatory in linux doesn't exist..
17:45:21FromDiscord<carpal> (the version was the same)
17:49:51Oddmongerwake me up when AmigaOS is back for the vengeance
17:51:04FromDiscord<lytedev> is there a way to have nim spit out failed assertions? I guess assert is true or false, so is there some way to easily see _why_ an assertion is failing at a glance?
17:51:52FromDiscord<lytedev> something like `assert(8 == 9)` where it would output something like `assertion failed on line 1: left value 8, expected value 9`
17:52:02FromDiscord<Rika> prolly better to use unittest's check
17:52:09disruptek!repo balls
17:52:10FromDiscord<lytedev> will take a look - thank you
17:52:10disbothttps://github.com/disruptek/balls -- 9balls: 11the unittest framework with balls πŸ”΄πŸŸ‘πŸŸ’ 15 35⭐ 1🍴 7& 1 more...
17:52:32disruptekcheck will output symbol values during failed assertions.
18:01:02*abm joined #nim
18:09:11*adnan338 joined #nim
18:13:59narimiran"This Month with Nim": https://nim-lang.org/blog/2021/01/26/this-month-with-nim.html
18:16:29FromDiscord<haxscramper> I created RFC for error messages - https://github.com/nim-lang/RFCs/issues/322
18:16:35FromDiscord<haxscramper> Mainly as a prompt for discussion
18:16:36disbotβž₯ Better error messages ; snippet at 12https://play.nim-lang.org/#ix=2Npp
18:17:19FromDiscord<haxscramper> And getting other people's opinions - based discussion earler today
18:17:27FromDiscord<haxscramper> (edit) "earler" => "earlier"
18:20:17*j-james quit (Quit: WeeChat 3.0)
18:24:24dom96disruptek: rent free
18:26:50disruptekdom96: i'm never gonna dance again; guilty feet have got no rhythm.
18:32:01disruptekclyybber: wanna see something silly?
18:32:13FromDiscord<Clyybber> sure
18:32:21disruptekhttps://github.com/disruptek/jsonconvert/actions/runs/512940135
18:33:22FromDiscord<Clyybber> debug compilation fails?
18:34:41disruptek1.0, devel, and 1.[24] all illustrate different failure modes.
18:35:18FromDiscord<Clyybber> oh
18:35:20disruptekthe builds succeed but the execution fails.
18:35:20FromDiscord<Clyybber> neat
18:36:08FromDiscord<Clyybber> could it be that you removed balls.cmd?
18:36:20disruptekwhat?
18:36:29*Guest62103 quit (Quit: Guest62103)
18:36:50*Guest62103 joined #nim
18:39:01FromDiscord<Clyybber> could it be that it didn't find balls.cmd
18:39:16FromDiscord<Clyybber> also can you reply to the RFC on github, seems like there was some misunderstanding
18:39:18disruptekballs is the runner that compiles the tests.
18:39:23FromDiscord<Clyybber> or I didn't understand your reply either
18:39:33disruptekwhich RFC?
18:39:34FromDiscord<Clyybber> disruptek: Yeah, I don't see balls.cmd anywhere
18:39:37Prestigedisruptek: I love that
18:39:40FromDiscord<Clyybber> the comma one
18:40:34FromDiscord<Clyybber> the RFC wouldn't affect macros at all
18:41:07FromDiscord<Clyybber> var sections are var sections regardless of wether they look like var\n x = 1\n y = 1 or var x = 1, y = 1
18:41:24*MyMind joined #nim
18:41:29disrupteki don't see what i could add.
18:43:20FromDiscord<Clyybber> I don't know, the discussion seems to have departed quite far from the actual RFC
18:44:14FromDiscord<Clyybber> allowing var x = 1, y = 1 doesn't hurt and is consistent with being able to do proc (x = 1, y = 1)
18:45:02disruptekthis is technically true, but it's harder to read. so it should not be supported unless you truly agree that we should "get rid of obviousness" and make the code as obfuscated as possible.
18:46:04disruptekif the code doesn't change in the ast, then the only point is to improve ergonomics for the user. if the code does change the ast, then it should be more consistent if possible (witness tuples and objects).
18:46:18FromDiscord<Clyybber> the code doesn't change the ast
18:46:32disruptekergo, unless it improves clarity, i don't support it.
18:46:36disrupteknot sure how else to say this.
18:46:56FromDiscord<Clyybber> personally I never thought about the syntax the RFC proposes
18:47:06FromDiscord<Clyybber> but apparently others do
18:47:25FromDiscord<mratsim> agree with disruptek
18:50:21disruptekclyybber: if balls.cmd was missing, no compilation would proceed.
18:50:35FromDiscord<Clyybber> I'm neutral on this one. The RFC makes it more consistent and it doesn't hurt, OTOH I never felt the need for that syntax
18:51:04disruptekit hurts because now i have to read the entire line, skipping past an expr, just to find other symbol definitions.
18:51:20disrupteki just love counting commas.
18:53:19Prestigenew lines after commas?
18:53:45disruptekoooh, maybe we can have more lines starting with , too.
18:53:55Prestigestarting with , ? :o
18:54:05disruptekthat's always lovely. it's a js idiom.
18:54:24PrestigeI hate it
18:59:46FromDiscord<Clyybber> @haxscramper I feel like your RFC is more of a collection of issues, isn't it?
19:00:36FromDiscord<Clyybber> I think it's easier to tackle individual error messages and improve them
19:00:50FromDiscord<Clyybber> so individual issues might make more sense
19:01:35FromDiscord<haxscramper> sent a long message, see http://ix.io/2NpE
19:02:07FromDiscord<haxscramper> And it is not exactly collection of issues (it has large number of them, yes) - structured error messages are also mentioned
19:02:18FromDiscord<haxscramper> Large part of RFC is about type mismatch specifically
19:03:14*dddddd_ joined #nim
19:03:52FromDiscord<Clyybber> so basically sorting the candidate list?
19:04:18FromDiscord<haxscramper> And providing additional heuristics if none of the candidates seem reasonable
19:04:51FromDiscord<haxscramper> @Araq mentioned that he will be writing RFC for `nkError`, so I decided to not dump all my ideas for possible error handling and instead opt for more broad RFC that is not really actionable in itself
19:05:11FromDiscord<Clyybber> yeah
19:05:27FromDiscord<haxscramper> Becase today was a third time for this circular discussion for errors-bad-can-we-fix-them-yes
19:06:31*dddddd quit (Ping timeout: 256 seconds)
19:06:45FromDiscord<hamidb80> Material dark ocean
19:07:22FromDiscord<Clyybber> I feel like the RFC is better split up into "Type Mismatch Sorting", "Machine Readable Errors", "Smart Suggestions"
19:07:23FromDiscord<haxscramper> I wanted to first dig into compiler and write RFC with concrete steps
19:07:31FromDiscord<haxscramper> And then implement it
19:07:44FromDiscord<Clyybber> because all of these are kinda complex, and else the discussion tends to be too broad IME
19:08:16FromDiscord<Clyybber> and for implementing you need to dig into the details anyways, so it might make sense to have the RFC as specific as possible
19:09:36FromDiscord<haxscramper> Again - this is discussion prompt, not concrete implementation steps. It is more similar to https://github.com/nim-lang/Nim/issues/16001
19:09:36disbotβž₯ Nimsuggest misleads, but newcomers use it by default
19:10:04FromDiscord<haxscramper> But
19:10:11FromDiscord<haxscramper> RFC is more suitable becase
19:10:22FromDiscord<Clyybber> @haxscramper Yeah, my fear is just that the discussion won't go into the details, which it must IMO
19:10:27FromDiscord<Clyybber> to be actionable at least
19:10:50FromDiscord<Clyybber> otherwise the RFC stays too broad; in its current state it could be accepted of course, but what would it mean?
19:11:00FromDiscord<Clyybber> of course we want to improve error messages
19:11:06FromDiscord<Clyybber> the question is how
19:11:46FromDiscord<Clyybber> The RFC you linked is a good example, because it lead to nothing
19:11:56FromDiscord<haxscramper> Accepting or rejecting this RFC wouldn't mean anything in particular yes. I could've created this as a regular issue, but I though it is more fit as RFC.
19:12:20FromDiscord<iWonderAboutTuatara> how do I make a varargs of var params?
19:12:32FromDiscord<iWonderAboutTuatara> If I try to use `varargs[var bool]` I get a read from nil error
19:13:03FromDiscord<haxscramper> I guees that what I want to get at this stage are opinions and general ideas
19:13:23FromDiscord<haxscramper> Well, I'm not exacrlt defending my RFC tbh
19:13:29FromDiscord<haxscramper> I think you have a fair point
19:14:05FromDiscord<hamidb80> var varags[bool]?
19:14:12FromDiscord<iWonderAboutTuatara> that gives a compile error
19:14:26FromDiscord<iWonderAboutTuatara> type mismatch
19:15:14FromDiscord<haxscramper> But this can be an issue in nim repo just like #16001, but I don't think it would change anything specifically
19:15:15disbothttps://github.com/nim-lang/Nim/issues/16001 -- 5Nimsuggest misleads, but newcomers use it by default
19:15:26FromDiscord<Clyybber> IME broad RFCs are more likely to derail into unrelated discussions
19:16:24FromDiscord<Clyybber> Yeah, I don't think its better as a single issue
19:16:29FromDiscord<Clyybber> I think it needs to be split up
19:17:13FromDiscord<haxscramper> I can split it into three RFCs for topics that you mentioned
19:17:21FromDiscord<Clyybber> Sounds good
19:17:28FromDiscord<haxscramper> Alright, will do now
19:17:33FromDiscord<Clyybber> Nice, thanks!
19:20:11Zevvooh, almost 21:00, I should get ready soon
19:20:11disruptekAraq: https://github.com/nim-lang/RFCs/issues/168#issuecomment-529364946
19:20:14disbotβž₯ Concepts and type-checking generics ; snippet at 12https://play.nim-lang.org/#ix=23U8
19:20:30Zevvsee if I can loot a ps5 tonight somewhere and burn some more cars
19:20:35disruptekthis seems pretty important for composition reasons.
19:21:25disruptekZevv: a bat has good reach but a hammer makes it clear that you'd mad af.
19:21:32disrupteks/you'd/you're/
19:22:03ZevvI'm bringing my pitchfork, it's a classic and has this cool retro feel
19:22:29Zevvand I've learned from games that bats should at least be wound with barbed wire
19:22:31disruptekyeah, but for every four forks, you need a knife and a torch.
19:23:57saemYeah, torches are really underrated
19:28:20saemI would be really happy if we can support the higher kinded type like things via concepts per that comment. Between that, CPS, ARC, you get a lot of the nice composition properties without too much allocation and other over head as tax. Anyhow, it's very exciting and I'm enthusiastic.
19:28:49disruptekyeah, but how is it supposed to work today?
19:29:21disrupteki mean, not today; with the new concepts it's clear how to compose the generics but nothing else.
19:29:40saemAs in what is the incremental steps, that are themselves valid, as the rosy vision is worked towards?
19:30:29disruptektype Hashable = concept ... hash(s: self): Hash ... type Series[T: Hashable] = concept ... proc len(s: self): int; proc contains(s: self; n: T): bool ...
19:31:06FromDiscord<Clyybber> we should just fix the current concepts and then people can use something like the macro I posted for declarative style syntax
19:31:57disrupteki told araq i would test this because he insistent that the new impl is predicated upon new syntax.
19:32:16disruptekbut i cannot even express what i had previously.
19:32:22*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
19:32:34FromDiscord<Clyybber> well, it was an experiment
19:32:43disruptekwhat was?
19:32:50FromDiscord<Clyybber> the new impl
19:34:00disruptekthe new impl doesn't even parse these type sections.
19:35:06FromDiscord<Clyybber> heh disruptek you have an error in your group example I think
19:35:26FromDiscord<Clyybber> you are trying `h.del` but `h` is `let`
19:35:30disruptekyes, i put an error in most of my examples.
19:35:36disruptekit's to see if people are actually testing them.
19:35:59disruptekwe already talked about that one last time you looked at groups. 😁
19:36:07FromDiscord<Clyybber> oh
19:36:24FromDiscord<Clyybber> well, I forgot what the example is supposed to demonstrate :p
19:36:28disruptekto his credit, dom96 did see the problem with my cps rfc, though no one else did.
19:36:35*Guest62103 quit (Quit: Guest62103)
19:36:46disruptekthe logic is broken regardless of the del.
19:36:59disruptekwe aren't supposed to be able to del.
19:37:11FromDiscord<Clyybber> I get an error for that
19:37:12*Guest62103 joined #nim
19:37:24FromDiscord<Clyybber> but expression 'h' is immutable, not 'var'
19:37:28disruptekyou are supposed to. read the comments.
19:37:41leorize@Clyybber `let a = <expression>` <- will variables in this expression be destroyed after it went out of `a` scope or after it went out of `<expression>`?
19:37:54disruptekout of expr.
19:38:06FromDiscord<Clyybber> disruptek: No
19:38:19FromDiscord<Clyybber> leorize: Out of `a`'s scope
19:38:41leorizethat's good to know, I can cheat a bit to avoid copying :p
19:38:47disruptekwhat? a stmtlist on rhs survives until end of a scope?
19:38:48leorizeis that guaranteed by spec?
19:38:55FromDiscord<Clyybber> disruptek: Yes
19:38:58FromDiscord<Clyybber> leorize: Yes
19:39:12disruptekjesus this fucks up cps, then.
19:39:15FromDiscord<Clyybber> stmtlists don't introduce a scope
19:39:27disruptekno, but it means that we have to add them into the env.
19:39:36disruptekotherwise shims won't include them.
19:39:45FromDiscord<Clyybber> I think I told you that
19:40:15FromDiscord<Clyybber> leorize: if your <expression> is a block then they will be destroyed at the end of that block (except for the thing that gets returned)
19:40:23disruptekwell, if i ever work on cps again, maybe i'll remember this time.
19:40:56*xet7 quit (Ping timeout: 240 seconds)
19:41:13leorize@Clyybber: if it's an expression made by a template then it should be fine, right?
19:41:46FromDiscord<Clyybber> templates don't introcue a scope so yes
19:41:56FromDiscord<Clyybber> (edit) "introcue" => "introduce"
19:42:40leorizenice
19:43:02disrupteknot nice.
19:43:24FromDiscord<Clyybber> very nice.
19:43:59FromDiscord<iWonderAboutTuatara> so how do I pass a varargs param of var arguements?
19:44:09FromDiscord<Clyybber> @iWonderAboutTuatara WDYM?
19:44:32FromDiscord<iWonderAboutTuatara> I have a proc with a param of varargs[bool]
19:44:37FromDiscord<iWonderAboutTuatara> but I want the bools to be var params
19:44:47FromDiscord<Clyybber> thats not possible AFAIK
19:44:52FromDiscord<iWonderAboutTuatara> oh that's unfortunate
19:44:56FromDiscord<iWonderAboutTuatara> thanks!
19:44:59FromDiscord<Clyybber> why do you need it?
19:45:03FromDiscord<Clyybber> (edit)
19:45:17FromDiscord<iWonderAboutTuatara> I have several variables that I want to be able to modify in the function itself
19:45:28FromDiscord<iWonderAboutTuatara> basically caches on whether a specific button is pressed
19:45:29disruptekuse a template.
19:45:40FromDiscord<iWonderAboutTuatara> oh that's a very good idea
19:45:44FromDiscord<iWonderAboutTuatara> yeah I will
19:45:45FromDiscord<iWonderAboutTuatara> thanks!
19:46:48*habamax quit (Ping timeout: 256 seconds)
19:47:04FromDiscord<iWonderAboutTuatara> been a while since I used one actually
19:47:10FromDiscord<iWonderAboutTuatara> how do I convert proc code to a template?
19:48:11*Gustavo6046 joined #nim
19:50:15FromDiscord<lqdev> i think i used varargs[ptr T] successfully
19:50:25disrupteki need a list of countries where infanticide is punished with anything less than jail time.
19:50:28FromDiscord<lqdev> or was it openArray?
19:50:39FromDiscord<lqdev> either way, ptr would also work in this case
19:50:58FromDiscord<Clyybber> disruptek: h also shouldn't be Collectable right?
19:52:21disruptekthere are immutable Collectables.
19:52:39disruptekit's only del(var Collectable; index) that must exist.
19:52:39FromDiscord<Clyybber> but your Collectable concept "calls" del
19:52:53FromDiscord<Clyybber> yeah, doesn't looks that immutable to me :p
19:53:03disrupteksee concept c, var w.
19:53:06disruptekw is a var.
19:53:17FromDiscord<Clyybber> ah
19:54:42FromDiscord<Clyybber> disruptek: the last line "so uh how is h a Groupable"
19:55:01FromDiscord<Clyybber> AFAICT h should be Groupable and is
19:56:20disruptekgroupable is a collectable that, if it's mutable, you can add to.
19:56:49disruptekh is Groupable[string] (should be true), but `g is Groupable` should be true also.
19:57:00disruptekand it isn't, despite being mutable and otherwise the same as h.
19:57:32*Jesin quit (Quit: Leaving)
19:57:43saemGonna have to read that concept RFC a few times, but especially glad that Araq seems to be onboard with a literal value, such as 1, can also be a very narrow type in and of itself.
19:58:03disruptekwhat?
19:58:11FromDiscord<haxscramper> saem: I created RFC for structured error messages (based on today's discussion) - #324
19:58:20FromDiscord<haxscramper> !rfc 324
19:58:21disbothttps://github.com/nim-lang/RFCs/issues/324 -- 3Structured compilation errors 7& 3 more...
19:58:24disrupteknone of the syntax for that RFC seems to work with the impl afaict.
19:58:44disruptek#168 i mean
19:58:50saemHaxscramper awesome, thanks for doing that. Might get to read it tonight.
19:58:51disruptek!rfc 168
19:58:51disbothttps://github.com/nim-lang/RFCs/issues/168 -- 3Concepts and type-checking generics 7& 4 more...
20:00:08FromDiscord<haxscramper> saem: it turned out to be really short (tl;dr - add IR for errors, allow json output)
20:00:21FromDiscord<Clyybber> :)
20:00:33FromDiscord<Clyybber> disruptek: g is Groupable[string] too
20:01:13disruptekyes, but if you change Groupable to only be mutable, it still fails because h is Groupable[string] and g isnot Groupable (still).
20:01:16FromDiscord<haxscramper> @Clyybber :p
20:01:50FromDiscord<Clyybber> disruptek: The two issues I can identify are: mutability not taken into account in a concept and concepts not working as a typeclass
20:02:01disruptekyes.
20:02:33disrupteknote that g is Collectable.
20:02:45FromDiscord<Clyybber> hmm
20:02:46FromDiscord<Clyybber> noted
20:02:55saemHax: yeah, definitely sounds like that should be the extent. It can grow internally for a while (compiler-dev) and get fleshed out and then get exposed when more fully baked.
20:03:08FromDiscord<Clyybber> disruptek: h is Collectable too
20:03:19FromDiscord<Clyybber> works with the typeclass syntax
20:03:28disruptekyeah, so why not Groupable?
20:03:35FromDiscord<Clyybber> bug
20:03:45FromDiscord<Clyybber> not sure whats the root cause is yet
20:04:48*Jesin joined #nim
20:06:11disrupteki think it's due to bugs.
20:06:27FromDiscord<Clyybber> :surprise:
20:07:56FromDiscord<Deorder> On Windows when using os.removeFile I get "Access is denied" even when running as admin. Any ideas?
20:08:08FromDiscord<Recruit_main707> no semaphores in stdlib right?
20:08:25disrupteki think there's a semaphore in threadpool or something.
20:08:28saemI've still not been able to muster up sufficient courage to dive into generics part of the compiler in any meaningful way. 😨
20:08:43disruptek!repo cps
20:08:44disbothttps://github.com/disruptek/cps -- 9cps: 11Continuation-Passing Style for Nim πŸ”— 15 60⭐ 3🍴
20:08:51disrupteki put a semaphore in cps.
20:08:52leorizesaem: just assume that it is broken :P
20:09:15disruptekmost of generics works, actually.
20:09:17FromDiscord<Recruit_main707> ok thanks
20:09:18saemIt might be, and that's ok, I want to help fix it.
20:09:45*muffindrake quit (Quit: muffindrake)
20:09:52disrupteklike, i think the generics bugs are mostly due to other features making poor assumptions rather than bugs in generics.
20:10:14disruptekyou might have to read that sentence 3-4 times before it makes sense.
20:10:20*muffindrake joined #nim
20:10:45leorizeit's also because of generics weird binding rule
20:11:03leorize4raq allowed `bind` in procs to remedy that though
20:11:11ForumUpdaterBotNew thread by Arnetheduck: Nim style guide based on Nimbus experience, see https://forum.nim-lang.org/t/7436
20:11:25FromDiscord<Deorder> sent a code paste, see https://play.nim-lang.org/#ix=2Nq1
20:11:29leorizeconcepts will probably fix the remaining use cases
20:11:30FromDiscord<Deorder> While using Nake
20:11:33FromDiscord<Clyybber> leorize: Whats weird about them?
20:11:42FromDiscord<Clyybber> the binding rules I mean
20:12:18leorizethe generics sandwich problem
20:14:26saemHmm, for the rhs and preservation of anything created therein until end of scope, is that practically a problem if any actual expression therein where a var/let could be introduced would create a scope itself?
20:15:14disruptekno, because those scopes will get destroyed.
20:18:42saemOK, so the two forms of trouble would be: 1. if there is a form of expression which allows creation of new symbols, but itself doesn't introduce a scope, and 2. if the CPS transform is working inside the RHS
20:18:56saemIs that correct?
20:19:07saemI'm trying to test my intuition here
20:19:41FromDiscord<Clyybber> 1. Yes there is echo((var a = 1; a)); echo a
20:19:44*xet7 joined #nim
20:20:12disruptekcase 1 is "handled correctly" when case 2 is not in effect, but when 2 is in effect, i think we may be dropping case 1 on the floor.
20:20:29disruptekbecause we compose the jump before we rewrite the RHS...
20:21:12disruptekanyway, like i said... i'm done with cps as long as the compiler folks aren't prioritizing fixes or even tagging the issues.
20:22:43saemπŸ€” clyybber is that an actually desirable priority? I'm trying to think of situations I'd want that and have `a` be available later. But I don't want to just have a var declaration above.
20:22:58saems/priority/property
20:23:39leorizesaem: yes it is
20:23:42*xet7 quit (Client Quit)
20:23:58disrupteki still want explicit scopes in typed ast, but i think i'm in the minority.
20:24:06leorizesaem: imagine `getCurrentDir().cstring`
20:24:23leorizeif the temporary introduced by `getCurrentDir()` got destroyed, then the cstring will be invalid too
20:24:41saemdisruptek: as in what to program against as a macro author?
20:25:05disruptekyes, it would make so many of these problems trivial to reason about.
20:25:12*xet7 joined #nim
20:25:32disruptektry(except), if(elif, elif, elif, else), ...
20:25:32FromDiscord<Clyybber> saem Yes, if initSomething((var variable; variable)):↡ use variable
20:25:57saemThanks those examples help a bunch.
20:26:29disruptekpro style tip: raise newException ValueError: "a very long string that you want to put on a separate line"
20:26:47disrupteki use : everywhere now.
20:27:37saemI think explicit scopes make a lot of sense for any sort of sophisticated macro, or ones that are used for say analysis/test as opposed to transform alone.
20:27:52FromDiscord<Clyybber> disruptek I dont see which bug is blocking you
20:29:00disruptekdo you have access to a web-browser?
20:29:01FromDiscord<Clyybber> explicit scopes are bad because it allows creating things that would normally have scopes without a scope
20:29:13ForumUpdaterBotNew thread by Deorder: Using removeFile in Nake throws error in Windows even when running as admin, see https://forum.nim-lang.org/t/7437
20:29:16FromDiscord<Clyybber> and they dont really solve an issue
20:29:39FromDiscord<Clyybber> disruptek the only one I can see is for loops, and I thought you were fine with not doing them for now
20:30:03disruptek!repo cps
20:30:04disbothttps://github.com/disruptek/cps -- 9cps: 11Continuation-Passing Style for Nim πŸ”— 15 60⭐ 3🍴
20:30:07disrupteklook for purple text
20:30:09saemFrom a read side of the AST, at least for making decisions, it'd still be handy.
20:30:37leorizehow about something like `.scopeId` to get which scope a symbol is in?
20:30:41disrupteki don't care if scopes in the ast even mean anything.
20:30:49*rockcavera quit (Killed (orwell.freenode.net (Nickname regained by services)))
20:30:50*rockcavera joined #nim
20:30:59saemLike, just meta data to make decisions?
20:31:02disruptekyes.
20:31:10saemNot I wish to write them
20:31:13disruptekright.
20:31:27saemCool, I then didn't misunderstand at all
20:32:14saemI think Clyybber may have taken it to mean emitting scopes by a macro author?
20:32:18disrupteki wanted them in the new ast and at first, araq supported the idea. but he took them out at some point.
20:33:55saemThere might be some trickiness as in "stability" of the scopes. With various AST transforms happening and timing not being clear?
20:34:10disruptekall the more reason.
20:34:27*xet7 quit (Quit: Leaving)
20:36:43saemSorry, not meant as a counter argument, merely sympathizing with the difficulty.
20:36:59*Guest62103 quit (Quit: Guest62103)
20:37:04disruptekyes; this is why it should be done, though.
20:37:16*Guest62103 joined #nim
20:37:58saemI might feel a bit of this pain again myself when I have another run up the hill of trying to make twithin_macro work.
20:38:01disruptekit's sometimes the case that stmtlists get collapsed into single statements. nothing wrong with this, but it leaves us nothing to query for scopeId.
20:38:33saemGuessing that's mostly semfold etc...
20:39:12disruptekit would be nice to be able to query for scopes.
20:44:46FromDiscord<carpal> thanks
20:46:08*adnan338 quit (Ping timeout: 260 seconds)
20:54:43*Vladar quit (Quit: Leaving)
20:59:00FromDiscord<Clyybber> I dont think its usefule because checking kind in NodesThatIntroduceScopes isnt that hard
21:03:49FromDiscord<Clyybber> saem the scope id idea is more interesting, I assume you want it to easily check if two symbols share a scope?
21:06:38*xet7 joined #nim
21:08:03leorizehmm, what should happen if a `Process` object go out of scope?
21:10:27leorizeshould I kill the process, or should I raise an `assert`?
21:14:03FromDiscord<iWonderAboutTuatara> if I take as a param a ptr, can I cast that back to whatever it is?
21:16:01*oddp joined #nim
21:20:38*az83 joined #nim
21:22:36az83I'm trying to understand procedures. I got this example https://www.logpasta.com/paste/afe254d5-0dca-4e96-bc47-72aca4c49727 and it says that expression is of type int and has to be used or discarded. I don't understand why when it's similar to the tutorial in the docs.
21:23:20leorizeyour proc returns an `int`
21:23:47FromDiscord<Meowz> well it should ;D
21:24:03az83It worked when I removed the int. Why is that?
21:24:08*xet7 quit (Remote host closed the connection)
21:24:18leorizein Nim all return values must be used
21:24:49leorizeyou may explicitly discard them via the `discard` keyword
21:24:58az83But it suddenly worked when I removed the int?
21:25:16leorizethe `: int` at the end of the procedure declaration is the return type
21:25:35az83How would you fix it if I kept the int?
21:26:01FromDiscord<haxscramper> `discard super(10)`
21:26:03leorizeit depends on your intent
21:26:20*PMunch quit (Quit: leaving)
21:26:23az83And what different kinds of intents are there?
21:26:46leorizeif you want to compute a value then return it to the caller or if you just wanna perform an action
21:27:07FromDiscord<haxscramper> Or if you have error code that you need to return you might want to use discard temporarily
21:27:15*narimiran quit (Ping timeout: 272 seconds)
21:27:20FromDiscord<haxscramper> For testing purposes
21:27:29az83All I wanted to do was just compute x * x for the given argument of what x is.
21:27:54FromDiscord<haxscramper> `let x2x = super(10)`
21:28:10FromDiscord<haxscramper> You need to use value, discard it or don't return anything
21:28:55FromDiscord<haxscramper> `s/need to/can/`
21:30:19az83If I do let x2x = super(10) it doesn't return any value.
21:30:30leorizeaz83: https://play.nim-lang.org/#ix=2Nqk <- I guess this is what you want?
21:31:40disruptekclyybber: you're assuming you already have all the scopeful nodes, which is not the point at all.
21:31:46az83Is it proper to use echo for a function? I'm not used to that from C, python, or any other language that uses functions. I'm used to just super(10) rather than echo super(10).
21:32:06*vicfred quit (Quit: Leaving)
21:32:17FromDiscord<haxscramper> If expression has a value it must be used
21:32:34FromDiscord<Clyybber> disruptek what is the point?
21:32:46FromDiscord<haxscramper> Using `echo X` is a go-to way for outputting things to terminal
21:34:17FromDiscord<haxscramper> If you don't need result `discard` it (`super(10)` in c/python is `discard super(10)`)
21:36:20az83What would be a more professional way to do this example? Removing the int or using echo super(10)?
21:36:39disruptekclyybber: never mind. i'm learning, albeit slowly, that if i want the code to work, it's pointless to depend upon the compiler.
21:37:03*Guest62103 quit (Quit: Guest62103)
21:37:19*Guest62103 joined #nim
21:38:02FromDiscord<haxscramper> az83: you need result from proc or not?
21:38:21FromDiscord<haxscramper> It all depends on what do you intend to do with it
21:38:41az83What would be an example of not needing the result?
21:38:45az83in a function
21:38:49*vicfred joined #nim
21:39:15leorize`proc printHello(name: string) = echo name` <- something like that?
21:39:20FromDiscord<haxscramper> mutating arguments and returning some number
21:40:07FromDiscord<haxscramper> Like error code, or number of bytes or whatever
21:40:56FromDiscord<haxscramper> If you mean "not needing result" as "not using result of a functions that returns something"
21:41:22az83So this not needing result is the same thing as a void function in C?
21:41:59FromDiscord<haxscramper> yes, `proc super(): void` works the same way in C and nim
21:42:19leorizeplease don't use the `: void` in nim though
21:42:41az83What happens if I remove the void and make it proc super() = without specifying the return type for the function?
21:42:51leorizeit's the same thing
21:43:01leorize`: return_type` is optional
21:43:32leorizethe preferred form is to not specify `: void`
21:43:52az83Is it better to specify the return type for a function or not?
21:44:17leorizeif you need it you gotta specify it
21:44:21leorizeif you don't then don't
21:44:52FromDiscord<haxscramper> !eval echo typeof(proc() = discard) is typeof(proc(): void = discard)
21:44:55NimBottrue
21:47:50*abm quit (Quit: Leaving)
21:49:42*abm joined #nim
21:50:16az83I guess I'll make it practice to use an echo for procedures.
21:56:28az83Does a string count as a return value?
21:57:02leorizeyes
21:57:20leorizeyou can return anything in Nim
21:57:50az83I'm still a bit confused why I must use echo for a function.
21:58:06leorizeyou don't have to, it's just an example
21:58:07FromDiscord<haxscramper> what is your main language?
21:58:17az83I got a bit of C and python experience.
21:58:25leorizewhat you must do is to use the returned value
21:58:30disruptek~manual
21:58:31disbotmanual: 11the Nim Manual is https://nim-lang.org/docs/manual.html -- disruptek
21:58:31disbotmanual: 11just good to Ctrl+F in cases like this
21:58:53FromDiscord<haxscramper> https://nim-lang.org/docs/manual.html#statements-and-expressions-discard-statement
22:00:49az83Then what would happen if I said proc super(x: int) = vs proc super(x:int):int =? What's the difference between the two procs?
22:00:52FromDiscord<Meowz> There's no simple `code` in a `response` of https://nim-lang.org/docs/httpclient.html#7 ?
22:01:16disruptekof course there is.
22:01:21*hnOsmium0001 left #nim (#nim)
22:01:35leorizeaz83: the latter returns an integer to the caller
22:01:48az83What does the former do?
22:01:52FromDiscord<haxscramper> az83: `void super(int a)` vs `int super(int a)`
22:02:11*xet7 joined #nim
22:02:12FromDiscord<Meowz> Got it
22:02:23az83I think so. If I don't specify the return type it becomes void.
22:02:35leorizeyes, that's how it work
22:02:35FromDiscord<haxscramper> yes, exactly
22:10:57*az83 quit (Quit: Connection closed)
22:13:58*rockcavera is now known as Guest27659
22:13:59*Guest27659 quit (Killed (moon.freenode.net (Nickname regained by services)))
22:14:00*rockcavera joined #nim
22:20:53*asdflkj quit (Ping timeout: 256 seconds)
22:37:04*Guest62103 quit (Quit: Guest62103)
22:37:25*Guest62103 joined #nim
22:37:28ForumUpdaterBotNew thread by Pumpus: FromJSON, dataframe, see https://forum.nim-lang.org/t/7438
22:41:29ForumUpdaterBotNew thread by Pumpus: Nim forum statistics, see https://forum.nim-lang.org/t/7439
22:41:45FromDiscord<Meowz> Got bored and someone used that paste page, https://play.nim-lang.org/#ix=2NqI
22:46:13*Q-Master quit (Read error: Connection reset by peer)
22:47:54*Q-Master joined #nim
22:52:00*koltrast quit (Ping timeout: 258 seconds)
22:52:15*koltrast joined #nim
22:57:59*oddp quit (Quit: quit)
22:59:32*mal``` quit (Quit: Leaving)
23:01:35FromDiscord<exelotl> mann I really could do with some timestamp utilities in nimscript :(
23:02:32*xet7 quit (Quit: Leaving)
23:06:56FromDiscord<exelotl> I wanted to run a task to rebuild the soundbank if any of the sounds in the asset directory changed (or if a sound was added, deleted, renamed, etc.)
23:08:26FromDiscord<exelotl> makefile would be able to do it pretty easily but it's surprising involved to do it with nimscript
23:16:54FromDiscord<exelotl> surprisingly
23:17:06*oddp joined #nim
23:17:19saemClyybber yeah, I think being able to see node a which scope is it in, node b which scope is it in, then it can be derived if a scope was created or they're in the same scope, etc...
23:18:04FromDiscord<ElegantBeef> Yea exelotl many of the file operations are not exposed the nimscript
23:18:10FromDiscord<ElegantBeef> (edit) "the" => "to"
23:21:16*mal`` joined #nim
23:23:57FromDiscord<exelotl> cursed idea
23:24:12FromDiscord<exelotl> what if I pretended the asset tool was a linker
23:24:19FromDiscord<exelotl> or C compiler
23:24:29FromDiscord<ElegantBeef> Just use a nim compiler with `libffi` enabled
23:24:56FromDiscord<exelotl> and passed the assets to it using {.compile.} or {.link.} pragmas, thus using nim's own caching mechanism to check if the files changed or not
23:27:46FromDiscord<exelotl> @ElegantBeef I'm doing this for my library so I want it to work out of the box with the latest nim for everyone
23:27:58FromDiscord<ElegantBeef> Well then make a build system using nim
23:28:14FromDiscord<ElegantBeef> Or nake i guess πŸ˜„
23:28:46*mbomba joined #nim
23:28:53FromDiscord<exelotl> I am planning to have a small helper tool like nicoboot, so I guess I could bundle such functionality into there
23:35:04*oddp quit (Quit: quit)
23:40:49*mbomba quit (Quit: WeeChat 3.0)
23:54:03FromDiscord<Clyybber> disruptek amazing argument
23:54:37disruptekit's one-sided as long as compiler devs refuse to, y'know, participate in trying to use their own work product.
23:54:49disruptekno point in talking about it.
23:54:54*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
23:55:22FromDiscord<Clyybber> I have no idea what you are talking about
23:55:40disrupteksee?
23:56:13FromDiscord<Clyybber> and you refuse to tell me
23:56:40*Lord_Nightmare joined #nim
23:57:11FromDiscord<Clyybber> its always the same
23:57:27FromDiscord<Clyybber> we talk about a concrete thing/bug/feature
23:57:59FromDiscord<Clyybber> and you derail into blaming and ranting generally
23:58:39disrupteknah. i just realized that i don't /want/ this to be implemented in the compiler.
23:58:50FromDiscord<konsumlamm> @mratsim so i did some experiments with D's `std.parallelism` and it either exits with code -11 or gives `Error creating thread` and hangs
23:59:12FromDiscord<Clyybber> disruptek then just say it :p
23:59:17disrupteki did.
23:59:38FromDiscord<Clyybber> I'm not enough of a native speaker to pick up on these extremely subtle clues
23:59:58disrupteki said `never mind`; it means, don't worry about it; forget it.