00:06:28 | * | krux02 quit (Remote host closed the connection) |
00:07:49 | * | zidsal quit (Quit: Connection closed) |
00:14:32 | FromDiscord | <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:18 | FromDiscord | <Balen> sent a code paste, see https://paste.rs/u0g |
01:28:21 | * | xet7 quit (Quit: Leaving) |
01:33:08 | FromDiscord | <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:35 | FromDiscord | <exelotl> !eval echo relativePath("foo.txt", "bar.txt") |
02:16:36 | NimBot | Compile failed: /usercode/in.nim(1, 6) Error: undeclared identifier: 'relativePath' |
02:16:46 | FromDiscord | <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:54 | FromDiscord | <ElegantBeef> relativepath is `os` no? |
02:16:56 | FromDiscord | <exelotl> !eval import os; echo relativePath("foo.txt", "bar.txt") |
02:17:00 | NimBot | ../foo.txt |
02:17:11 | FromDiscord | <exelotl> wtf is going on with this lol ^ |
02:17:21 | FromDiscord | <ElegantBeef> Nim doesnt differentiate paths from files in path ops |
02:17:36 | FromDiscord | <ElegantBeef> So just bad logic |
02:18:15 | FromDiscord | <exelotl> ah so should get the parent dir of the 2nd param |
02:18:36 | disruptek | this mokose camera is garbage. |
02:27:29 | * | dddddd quit (Ping timeout: 256 seconds) |
02:30:52 | FromGitter | <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:46 | FromDiscord | <ElegantBeef> @carpal should add more examples to your readme on Nobject and also you accidently pushed your `test1.exe` π |
03:04:15 | FromDiscord | <treeform> I am glad your figured it out! |
03:05:00 | FromDiscord | <ElegantBeef> Yep my silly build system can now push unity releases to github and google cloud storage π |
03:05:13 | FromDiscord | <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:38 | disruptek | iffy: 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:25 | FromGitter | <iffy> k, I'll give that a try |
03:38:49 | FromGitter | <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:27 | disruptek | not 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:24 | FromGitter | <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:41 | FromDiscord | <ElegantBeef> I believe pixie can render svgs to pngs |
04:43:47 | FromDiscord | <ElegantBeef> !repo pixie |
04:43:48 | disbot | https://github.com/HarperProjects/Pixie -- 9Pixie: 11Some crypto implementations in nim 15 0β 0π΄ 7& 1 more... |
04:43:54 | FromDiscord | <ElegantBeef> That's not it π |
04:43:56 | FromDiscord | <ElegantBeef> https://github.com/treeform/pixie |
04:44:43 | FromDiscord | <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:41 | FromGitter | <offbeat-stuff> Well my svg files have font selected as monospace |
04:47:04 | FromGitter | <offbeat-stuff> I want that to be a ttf font on my computer |
04:47:14 | FromGitter | <offbeat-stuff> Also I want font ligatures to work |
04:48:51 | FromDiscord | <ElegantBeef> So you have a SVG with paths and and text and want to render both to a transparent png? |
04:49:11 | FromGitter | <offbeat-stuff> Well It's mostly text |
04:49:21 | FromGitter | <offbeat-stuff> and some rectangles |
04:49:34 | FromGitter | <offbeat-stuff> My top priority is font and ligatures |
04:54:34 | FromGitter | <offbeat-stuff> Well pixie doesn't work |
04:54:51 | FromGitter | <offbeat-stuff> anything that can parse tags in svg,html |
04:55:54 | disruptek | have you tried any of the imagemagick wrappers? |
04:56:04 | FromGitter | <offbeat-stuff> No |
04:56:12 | disruptek | interesting. |
04:56:45 | FromGitter | <offbeat-stuff> I am just trying to render syntax higlighted text into hig res pngs |
04:57:42 | FromGitter | <offbeat-stuff> using pygments to generate svg |
04:58:13 | * | rockcavera quit (Remote host closed the connection) |
04:58:48 | disruptek | what's the point of doing it in nim? |
04:59:18 | FromDiscord | <ElegantBeef> Like i said treeform has a bunch of useful libraries for this domain, https://github.com/treeform/typography |
04:59:41 | FromGitter | <offbeat-stuff> Well I tried looking at others libs in c++ none was good |
04:59:55 | FromGitter | <offbeat-stuff> So Now just trying in nim |
05:00:00 | disruptek | what's the point of not just typing `convert foo.svg bar.png`? |
05:00:19 | FromGitter | <offbeat-stuff> Well My TTF fonts |
05:01:25 | disruptek | that's not possible to override in imagemagick? |
05:01:50 | disruptek | i would think it'd be pretty trivial. |
05:04:32 | FromGitter | <offbeat-stuff> Well The input to pygment will itself come from a nim program so Why not do it all in nim |
05:05:12 | disruptek | i can think of a good reason. |
05:05:44 | FromGitter | <offbeat-stuff> Yeah Well I can work with c,c++,nim libraries and cli programs |
05:06:23 | FromGitter | <offbeat-stuff> Just exploring my options |
05:08:26 | * | Xatenev joined #nim |
05:14:38 | disruptek | keep 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:29 | saem | huh, 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:10 | disruptek | looks like a test error to me. |
06:36:40 | saem | The test works locally. |
06:36:58 | disruptek | no doubt. |
06:37:26 | saem | So I'm trying to figure out how to replicate it. π |
06:39:15 | disruptek | i'm wondering the best way to highlight arbitrary code on the console; basically, to reimplement pygments. |
06:39:34 | saem | not just nim, but anything? |
06:39:41 | disruptek | just nim. |
06:39:54 | disruptek | but afaik, pygments is pretty crude as syntax highlighting goes. |
06:40:21 | disruptek | i just want this for nicer balls output. |
06:40:29 | disruptek | and maybe docgen. |
06:41:47 | disruptek | pygments seems to be regex-based. |
06:41:49 | saem | Would the app developer use it like a library as they output whatever strings? |
06:41:53 | disruptek | yes. |
06:42:50 | saem | Hmm, 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:09 | disruptek | i 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:05 | saem | Yeah, 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:24 | disruptek | well, it /should/ be possible. |
06:45:50 | disruptek | i mean, things like runnableExamples look small but they are entire programs. |
06:46:18 | disruptek | i can always throw away the bits i don't need. |
06:46:33 | saem | hmm, it depends upon API, perhaps? So if the highlighting library says, getHighlightedString(c: CodeRange): string then that should be ok. |
06:47:35 | disruptek | it doesn't sound all that useful. |
06:49:23 | saem | My 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:24 | disruptek | yeah, i mean, i don't know if it's worth implementing because it's expensive, specialized, narrow in scope. |
06:51:00 | FromDiscord | <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:09 | disruptek | maybe leorize has some thoughts on it. |
06:51:51 | saem | well 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:09 | disruptek | i thought about just hacking the renderer to take a special buffer type. |
06:52:12 | FromDiscord | <ElegantBeef> Idk i feel like error highlighting needs to be more manual |
06:52:20 | disruptek | but, then i'd lose the user's code comments. |
06:53:11 | disruptek | on the plus side, hacking the renderer would be pretty cheap. |
06:53:17 | saem | beef, what's this manual business you speak of? |
06:53:44 | FromDiscord | <ElegantBeef> Idk i seen errors and colouring so thought we were trying to provide errors in a more colourful matter |
06:54:24 | saem | I'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:01 | disruptek | i already supply the code and line numbers. |
06:55:18 | disruptek | and, it's the user's code, not a rendering. |
06:56:30 | disruptek | i just think there isn't enough color in my balls output. π |
06:57:08 | FromDiscord | <ElegantBeef> Just do some regex for your basic highlighting adding ascii on the symbols π |
06:57:22 | FromDiscord | <ElegantBeef> ansi i mean |
06:57:39 | disruptek | yeah, that's probably the smart move. lame as it is. |
06:58:14 | disruptek | i wouldn't even regex it; i'd just use the line info data i already have. |
06:59:41 | * | krux02 joined #nim |
07:00:36 | FromDiscord | <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:30 | disruptek | give us an example. |
07:01:32 | saem | LoL, textmate grammars... https://github.com/microsoft/vscode-textmate |
07:02:30 | FromDiscord | <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:32 | disbot | β₯ Colorful output Hotshot part deux(Different method of #16356) |
07:02:51 | FromDiscord | <ElegantBeef> adding the `colorError(c.config)` |
07:03:02 | FromDiscord | <ElegantBeef> It's just not graceful, but kinda required if you want to be more descriptive |
07:03:30 | disruptek | it almost makes you wish macros were allowed in the compiler. |
07:03:34 | saem | You can go the template route or you can go the data structure/interpreter route, they both are interesting for their own reasons. |
07:03:35 | FromDiscord | <ElegantBeef> The alternative is loading all error messages from a config and replacing placehold markers with the identifiers |
07:04:31 | FromDiscord | <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:51 | saem | I mean gettext and friends are pretty old at this point. |
07:05:01 | FromDiscord | <Avatarfighter> hey hey |
07:05:09 | FromDiscord | <Avatarfighter> what is up with you all |
07:05:14 | saem | quick, everyone hide! |
07:05:23 | saem | π |
07:05:25 | FromDiscord | <ElegantBeef> opengl here |
07:05:48 | FromDiscord | <Avatarfighter> lmaoooo saem π |
07:05:57 | FromDiscord | <Avatarfighter> Beef, funny enough I was just eyeing opengl |
07:06:06 | saem | shit, see what happened |
07:06:21 | FromDiscord | <ElegantBeef> Yea i really like the output of that PR though so nice to see colour in the messages |
07:06:43 | saem | I'm a big fan of that too, I mean I still fondly remember Elm |
07:07:13 | FromDiscord | <ElegantBeef> Just that it's annoying to maintain, edit the highlighting |
07:07:55 | saem | I 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:38 | disruptek | providing the users with compilers having few bugs? |
07:08:40 | FromDiscord | <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:56 | saem | Yeah, no... |
07:09:19 | FromDiscord | <ElegantBeef> That's what the first implementation followed but i hated the output |
07:09:24 | FromGitter | <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:48 | disruptek | what? |
07:09:56 | FromGitter | <Araq> error is here β ^^^^^^^^^^ |
07:10:06 | saem | Like this: https://elm-lang.org/news/compiler-errors-for-humans |
07:10:06 | disruptek | your ide can only handle one line of text? |
07:10:22 | FromGitter | <Araq> these ascii art games like we never left the 70ies behind |
07:10:23 | disruptek | yes, elm's errors are good. btdt. |
07:10:23 | saem | I mean this can be parsed out easy enough as it has start stop markers. |
07:10:27 | FromDiscord | <ElegantBeef> Eh Nim has that with `--hint:source` |
07:10:37 | FromGitter | <Araq> I know, it's stupid. |
07:10:43 | FromDiscord | <ElegantBeef> I'm talking to saem |
07:10:56 | saem | I think you both are. π |
07:11:05 | FromDiscord | <ElegantBeef> Eh it doesnt really give any useful colouring |
07:11:10 | FromGitter | <Araq> but that's just my opinion, ignore me |
07:11:16 | FromDiscord | <ElegantBeef> That entire page just has a colour on the arrow |
07:11:21 | FromDiscord | <ElegantBeef> I did better than that and i'm a numpty |
07:11:46 | saem | Beef: that's from 2015, they might have changed things since. |
07:12:00 | FromDiscord | <ElegantBeef> I mean there is nothing there that i think is that nice |
07:12:22 | FromDiscord | <ElegantBeef> The biggest issue with nim's errors are they're very unreadable due being the same colour and too condensed |
07:12:24 | saem | You mean the incredibly instructive error messages? |
07:13:18 | disruptek | he means the error messages that never refer to indentation issues, common as they are. |
07:14:33 | FromGitter | <Araq> bad error messages should be fixed but errors should be to the point and not verbose |
07:14:46 | FromDiscord | <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:52 | FromDiscord | <ElegantBeef> My first attempt |
07:14:54 | saem | Sorry, 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:04 | disruptek | yeah, we should make the sigmatch errors more descriptive; they are too short as it is. |
07:15:28 | FromDiscord | <ElegantBeef> Added the immutable message and highlighted the cases it was the culprit |
07:15:32 | FromDiscord | <carpal> π |
07:15:35 | saem | beef: 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:39 | disruptek | what nim needs a pager built into the error messages. |
07:15:49 | FromDiscord | <Avatarfighter> lol |
07:16:05 | FromDiscord | <ElegantBeef> I dont like that one bit |
07:16:13 | disruptek | rude. |
07:16:20 | saem | I'm dying |
07:16:45 | FromGitter | <Araq> yeah right, and we don't treat bad error messages as bugs... *sigh* |
07:16:46 | FromDiscord | <ElegantBeef> Lol |
07:17:02 | FromGitter | <Araq> and we never improve anything, if only we would know about Elm |
07:17:17 | FromGitter | <Araq> (never mind that I used it personally myself) |
07:17:35 | saem | I'm not directing it at you, Araq. |
07:18:02 | FromGitter | <Araq> that error message you've improved with colors |
07:18:03 | saem | Specifically, there are a world of lessons out there and not everyone has had the same exposure. |
07:18:12 | FromDiscord | <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:20 | FromGitter | <Araq> would be better if the compiler did more filtering |
07:18:44 | FromGitter | <Araq> there are only a couple of `[]` procs that apply, mutability difference or not |
07:18:50 | FromGitter | <Araq> yet it lists them all |
07:18:59 | disruptek | maybe it could filter the bugs out before compiling them. |
07:19:14 | FromDiscord | <ElegantBeef> Yea just dont write errors... i mean bugs |
07:19:40 | FromGitter | <Araq> making the compiler a bit smarter seems more useful than coloring the nonsense more nicely |
07:19:45 | disruptek | timmy's approach is just to compile everything and never yield an error unless it's a hint. |
07:20:18 | FromGitter | <Araq> stop it, he is not "Timmy" and he's doing good work |
07:20:28 | FromDiscord | <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:35 | FromDiscord | <haxscramper> Like scored sorting for type mismatches |
07:20:45 | FromGitter | <Araq> ^ exactly. |
07:20:52 | FromDiscord | <haxscramper> Or creating different error representations |
07:20:54 | saem | A structured output mode for the compiler would be interesting. |
07:21:06 | FromGitter | <Araq> errors should be `nkError` nodes |
07:21:15 | FromDiscord | <ElegantBeef> I dont disagree, but colouring seemed to be something i could reasonably add versus actually touching the compiler |
07:21:19 | FromDiscord | <haxscramper> Well, I've discussed this earlier and basically the only think stopping me is just lack of time |
07:21:34 | FromDiscord | <haxscramper> But I want to start working on it in next couple of months eventually |
07:21:35 | FromDiscord | <haxscramper> RFC |
07:21:52 | FromGitter | <Araq> useful for Nim's macro system, useful for better error handling, allows us to use `typed` macros everywhere |
07:21:55 | FromDiscord | <haxscramper> starting with RFC of course, but the general idea is - structured internal representation for errors |
07:22:02 | FromGitter | <Araq> Nim needs `nkError` |
07:22:17 | disruptek | if only we knew someone who could make edits to the compiler. |
07:22:25 | FromDiscord | <haxscramper> Sounds like a good idea for `nkError` |
07:22:39 | FromDiscord | <haxscramper> disruptek: at this point I'm more than enough annoyed with current errors |
07:22:48 | FromDiscord | <haxscramper> So I guess I'm willing to make a dive |
07:22:48 | FromDiscord | <Rika> what would nkError hold other than strings though |
07:23:11 | FromGitter | <Araq> it would hold ASTs |
07:23:17 | FromDiscord | <Rika> oh |
07:23:18 | FromDiscord | <Rika> i get it |
07:23:21 | FromDiscord | <Rika> that sounds very smart |
07:23:21 | saem | Plus error structures |
07:23:37 | disruptek | you can already embed error ast; i do it with the error pragma and it works great. |
07:23:42 | saem | Well ones that should otherwise not be part of "normal" ASTs. |
07:24:29 | FromDiscord | <Rika> saem like what? im having difficulty seeing what else it should hold |
07:24:49 | disruptek | arbitrary structure. |
07:24:55 | FromDiscord | <haxscramper> And having separate representation for errors is also useful for making "IDE-optimized" and "terminal-optimized" errors |
07:25:04 | disruptek | it's just data; we can put whatever we want in there. |
07:25:06 | FromDiscord | <lqdev> nkError to allow `typed` macros everywhere sounds like big brain time |
07:25:52 | disruptek | typed macros don't work, so allowing them everywhere will just bring on the compiler bugocalypse. |
07:26:14 | saem | Rika 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:44 | FromDiscord | <haxscramper> I thought about reusing enums for hints/errors that we already have |
07:26:45 | disruptek | let's just embed a little program in there that you have to run to output your error. |
07:26:50 | FromGitter | <Araq> saem: that's what I did 10 years ago, I replaced the enum values with fewer and fewer |
07:26:52 | saem | But you don't have strings, you can refer to AST nodes and what not to refer to a something, etc... |
07:27:16 | disruptek | we could just make a new language for describing errors. |
07:27:17 | FromGitter | <Araq> because it was a pita to maintain and i18n for error messages is fundamentally wrong |
07:27:19 | disruptek | we can call it json. |
07:27:23 | disruptek | or, jason. |
07:27:37 | FromGitter | <Araq> 1) much harder to google error messages when they are translated |
07:27:40 | FromDiscord | <ElegantBeef> Disruptek i know you love me but quit naming shit after me |
07:27:42 | FromGitter | <Araq> 1) bad translations |
07:27:43 | FromDiscord | <lqdev> yeah i never got why people need i18n for error messages |
07:27:44 | saem | I mean I wouldn't _actually_ support i18n until later |
07:27:45 | FromDiscord | <Rika> why is i18n for errors wrong? |
07:27:46 | FromDiscord | <lqdev> like what's the point |
07:27:53 | FromDiscord | <Rika> ah i see |
07:27:58 | FromDiscord | <lqdev> your frickin' code is English already, dumbo |
07:27:58 | FromGitter | <Araq> 1) doesn't work with errors coming from macros |
07:28:11 | FromDiscord | <Rika> lqdev its not always though |
07:28:14 | FromDiscord | <lqdev> why would you need error messages in Polish, German, Spanish, or any ol' language |
07:28:22 | FromDiscord | <lqdev> @Rika then that's bad code |
07:28:30 | disruptek | nim is all about dialects. |
07:28:39 | FromDiscord | <Rika> are you telling me all programmers must know english fluently? |
07:28:49 | disruptek | only nimions. |
07:28:53 | FromDiscord | <lqdev> no. |
07:28:56 | saem | Just keep a basic rule like, strings are from look ups, future nimions can evolve that later. |
07:29:07 | FromDiscord | <lqdev> but, you need to understand english to browse the docs anyways. |
07:29:20 | FromDiscord | <lqdev> all keywords are in english, the stdlib is in english. |
07:29:30 | FromGitter | <Araq> or rather: the translation step can always be done in your browser |
07:29:35 | * | narimiran joined #nim |
07:29:40 | FromDiscord | <lqdev> true that |
07:30:07 | FromDiscord | <lqdev> personally i've never met some who'd unironically code in a language that's not english |
07:30:10 | FromDiscord | <Rika> the documentation doesnt have to be in english |
07:30:25 | FromDiscord | <Rika> because you dont live in a country where english proficiency is low |
07:30:26 | saem | you don't know many people then? |
07:30:32 | FromDiscord | <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:34 | FromDiscord | <Rika> exactly |
07:30:50 | FromDiscord | <lqdev> saem: well maybe |
07:30:57 | saem | uuhh, are those friends from countries which have latin or germanic languages as their primary language? |
07:31:04 | FromDiscord | <lqdev> yes |
07:31:10 | FromDiscord | <lqdev> no |
07:31:12 | FromDiscord | <lqdev> slavic |
07:31:16 | FromGitter | <Araq> my primary language is German... |
07:31:20 | FromDiscord | <lqdev> eh i'm still half asleep |
07:31:27 | FromDiscord | <Rika> ask a japanese or a chinese only programmer to program in english. |
07:31:37 | saem | ^^ |
07:32:16 | FromDiscord | <lqdev> yeah brb gonna create a japanese dialect of nim |
07:32:25 | disruptek | well, i'm looking forward to nkErrors in my typed macros. will be a nice change from SEGVs. |
07:32:47 | FromDiscord | <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:55 | FromDiscord | <Rika> know this, im not saying the programming language has to be in japanese or whatever |
07:33:08 | FromDiscord | <Rika> i mean that the documentation and errors should at least be translated or so |
07:33:32 | saem | or possible to translate, all it's asking for is not to close the door. |
07:33:40 | FromDiscord | <Rika> because we all know machine translations are reliable |
07:33:48 | FromGitter | <Araq> yes, into Japanese. Which you don't speak. Got it. Always care about the ones you don't know. |
07:34:06 | FromDiscord | <lqdev> i think rika does know japanese though |
07:34:10 | disruptek | someone write our japanese programmer an email and ask them if they want to translate the compiler. |
07:34:16 | disruptek | oh wait. |
07:34:35 | FromDiscord | <Rika> are we gonna go into the chicken and egg problem now |
07:34:37 | saem | I've seen some Japanese tweets about Nim. |
07:34:48 | FromDiscord | <haxscramper> Good error translation is major PITA because of all the programming terminology that does not have non-english alternatives |
07:34:49 | FromDiscord | <Rika> dont we have TWO books for nim in japanese |
07:34:50 | FromGitter | <Araq> I've seen Ruby using English keywords |
07:34:56 | disruptek | yeah, they think it's a kind of towel iirc. |
07:34:59 | saem | I work at a company where about half the engineers are Japanese |
07:35:13 | saem | And multiple of them are Ruby core committers |
07:35:17 | FromDiscord | <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:45 | FromDiscord | <haxscramper> Yes, for error this might suffice, but that doesn't really need to any specific compiler interaction |
07:35:49 | FromDiscord | <haxscramper> Output errors to json |
07:35:55 | disruptek | it's likely that the japanese find our error messages easier to understand than we do. |
07:35:57 | FromDiscord | <haxscramper> Let everyone write their own translator |
07:36:00 | FromDiscord | <haxscramper> Problem solved |
07:36:33 | FromDiscord | <haxscramper> Like this is a non-issue IMO |
07:36:38 | FromDiscord | <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:45 | saem | Yeah, 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:48 | FromDiscord | <haxscramper> Index is a good idea |
07:37:19 | disruptek | just create a discord channel and call it a day. |
07:38:08 | FromDiscord | <lqdev> index is a good idea |
07:38:13 | FromDiscord | <haxscramper> We basically have it already - with `TMsgKind` |
07:38:22 | FromDiscord | <haxscramper> It only needs more attention wrt to documentation |
07:38:43 | saem | Ugh.. I need to setup an i386 build env. |
07:38:47 | saem | That's a not tonight problem. |
07:39:03 | FromGitter | <Araq> `TMsgKind` is a failed experiment but whatever, don't listen to the guy who wrote it |
07:39:32 | FromGitter | <Araq> I'm looking forward to partially English messages coming from macros, it'll be great |
07:39:46 | disruptek | first they must compile. |
07:40:51 | FromDiscord | <haxscramper> Araq: by the way, could you elaborate on your `nkError` idea a little more |
07:41:26 | FromGitter | <Araq> "Fehler: Knotentyp must be nkIf", what a lovely future |
07:42:40 | FromGitter | <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 < on a web page |
07:43:58 | FromGitter | <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:37 | FromDiscord | <lqdev> that error made me laugh lol |
07:44:44 | FromDiscord | <lqdev> Knotentyp XDDDD |
07:45:28 | saem | Hold 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:29 | FromDiscord | <haxscramper> By keys you mean compiler options like `--errorLang:jp`? |
07:46:34 | saem | no |
07:47:25 | saem | As in (errorCode:x, listOfStructuredParams:@[]) |
07:47:44 | FromDiscord | <haxscramper> Oh, yes, that's exactly what I had in mind |
07:47:46 | saem | That's for structured error output, translation is a rendering problem |
07:48:13 | FromGitter | <Araq> haxscramper: there is not much more to say, I need to write an RFC... |
07:48:40 | FromGitter | <Araq> "Nim 2.0: The book of unwritten RFCs" -- would you buy it? |
07:49:00 | saem | I mean, is it just blank pages... |
07:49:21 | FromDiscord | <haxscramper> I can make a book of unpublished RFCs |
07:49:35 | saem | If the paper is good and I can use it with my fountain pens I just might. |
07:49:41 | FromDiscord | <ElegantBeef> It's a single page of "This book would be filled if any fuckwits actually submitted RFCS" |
07:50:47 | FromDiscord | <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:21 | FromDiscord | <haxscramper> Instead of actually thinking it all the way through the end as I originally intended |
07:51:22 | FromDiscord | <ElegantBeef> Sorry hax, i apologize for mention error messages π |
07:51:29 | FromDiscord | <ElegantBeef> (edit) "mention" => "mentioning" |
07:51:33 | saem | It was the opengl |
07:53:09 | FromGitter | <Araq> "structured errors" are nice and what we need, see nkError. but don't bring up i18n, it's a different topic |
07:53:12 | saem | *shrug* I think the structured error message stuff is pretty cool |
07:53:29 | FromGitter | <Araq> totally agree, I do mind i18n |
07:56:12 | FromDiscord | <Rika> regular function call syntax, RFCS |
07:56:36 | saem | That's a good April RFC |
07:57:28 | FromDiscord | <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:41 | FromDiscord | <hamidb80> (edit) "`proc." => "`proc`." |
07:57:46 | FromGitter | <Araq> out of practical experience with i18n, not because I don't like people who don't speak English very well |
07:57:50 | FromDiscord | <Rika> prolly because the stdlib predates func |
07:58:08 | saem | Araq: 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:47 | FromDiscord | <Rika> isnt the index idea good enough for that |
07:58:48 | FromDiscord | <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:51 | FromGitter | <Araq> we can agree on that but please keep in mind that it's 2021 and machines can do translations |
07:58:58 | FromDiscord | <haxscramper> In addition to index |
07:59:04 | FromGitter | <Araq> and they are getting *really* good at, quickly. |
07:59:27 | FromDiscord | <Rika> but theyre not there yet for something pretty technical as programming can be, are they? |
07:59:41 | FromDiscord | <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:31 | saem | If 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:34 | FromDiscord | <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:00 | ForumUpdaterBot | New thread by Gemath: How would Nim do in this language comparison?, see https://forum.nim-lang.org/t/7432 |
08:03:31 | saem | possibly, 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:38 | saem | Which means the index isn't precluded. |
08:04:14 | saem | But, I also think that's a _rendering_ problem. |
08:04:27 | FromDiscord | <Rika> buuuuuut that means you cant easily put it through a translator does it |
08:04:39 | saem | I think it does. |
08:04:41 | FromDiscord | <Rika> (i legitimately dont know the state of translator frontends) |
08:04:52 | saem | Good? |
08:05:27 | FromDiscord | <Rika> i mean, do cli translators exist, i do not know |
08:06:11 | FromDiscord | <haxscramper> Can't error translation just be implemented using hardcoded patterns? |
08:06:21 | FromDiscord | <haxscramper> It's not like we have infinite number of different errors |
08:06:24 | saem | If the messages are structured, you can grab them from the code base, fire them at a translator, save that as an artifact. |
08:06:58 | FromDiscord | <Rika> structured as in a file holds all of them and just them? |
08:07:00 | FromDiscord | <haxscramper> We can make error message text itself structured |
08:07:00 | ForumUpdaterBot | New thread by Drkameleon: Problem with compile-time `len` and variable, see https://forum.nim-lang.org/t/7433 |
08:07:02 | FromDiscord | <Rika> like gettext or something? |
08:07:23 | saem | I don't want to write the code in my head right now, we don't even have an RFC. |
08:07:49 | saem | This is well past off the cuff thinking and needs to deeper thought written long form prose and/or diagrams provide. |
08:07:53 | FromGitter | <Araq> my RFC would be about `nkError` |
08:08:12 | saem | Also that |
08:08:20 | FromGitter | <Araq> and it would be so controversial that I have to close it immediately |
08:08:50 | saem | `nkError` is an enabling capability for far more than i18n. |
08:09:01 | FromGitter | <Araq> yeah, it will be scary |
08:09:10 | saem | π» |
08:09:28 | FromGitter | <Araq> so I should write an issue for compiler-dev instead and make `nkError` internal first |
08:09:38 | FromGitter | <Araq> as a refactoring of the compiler |
08:09:48 | FromGitter | <Araq> later on we can expose it or not |
08:10:33 | saem | Anyone on Fedora and has done the legwork to setup an i386 build env? |
08:11:00 | saem | Personally would prefer internal incubation. |
08:14:27 | FromGitter | <Araq> don't bother, disable the tests for 32bits and move on please |
08:14:33 | FromGitter | <Araq> *the test |
08:14:41 | saem | Even better! |
08:15:23 | FromGitter | <Araq> it's fair to say "for a better nimsuggest use a 64bit build" |
08:17:07 | saem | Yeah, 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:53 | FromGitter | <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:30 | FromDiscord | <carpal> fidex thanks https://github.com/Carpall/nobject/ |
09:06:38 | FromDiscord | <carpal> (edit) "https://github.com/Carpall/nobject/" => "<https://github.com/Carpall/nobject/>" |
09:06:53 | FromDiscord | <ElegantBeef> What'd you call me? |
09:13:08 | ForumUpdaterBot | New 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:39 | FromDiscord | <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:30 | FromDiscord | <flywind> or https://github.com/rust-lang/rust/commit/675bdf6d6d7b6441598961052df6466efbb4bee4 |
09:43:55 | PMunch | Another 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:12 | FromDiscord | <ElegantBeef> lol |
09:49:26 | FromDiscord | <Zachary Carter> RTFM |
09:49:33 | FromDiscord | <ElegantBeef> Should force people to read the compiler manual before being allowed to compiler |
09:49:50 | FromDiscord | <ElegantBeef> "Welcome to the nim compiler, after answering this series of 200 questions it will be opened for you" |
09:50:16 | FromDiscord | <ElegantBeef> Compilation should be earned not given away freely π |
09:50:58 | FromDiscord | <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:28 | FromDiscord | <mratsim> but to be fair, C, C++, Rust also suffer from the same |
09:51:32 | FromDiscord | <haxscramper> `--warning[RTFM]:on` |
09:51:38 | FromDiscord | <mratsim> people forgetting -O2 or CMake with release |
09:53:00 | * | narimiran quit (Ping timeout: 265 seconds) |
10:00:50 | FromDiscord | <lqdev> people using cmake |
10:02:43 | * | Guest23239 quit (Quit: Guest23239) |
10:04:37 | FromGitter | <offbeat-stuff> Hi This throws error https://play.nim-lang.org/#ix=2NmL |
10:06:19 | FromDiscord | <konsumlamm> even when looking around a tiny bit about nim performance, one of the first things you find is "use `-d:release`" |
10:06:25 | FromDiscord | <ElegantBeef> Are you missing a proc named `needsRefresh`? |
10:07:07 | FromGitter | <offbeat-stuff> needsRefresh is of kind proc(x:string,b:varargs[string]) |
10:07:13 | FromGitter | <offbeat-stuff> how to pass my values to that |
10:08:27 | FromGitter | <offbeat-stuff> render/nakefile.nim(4, 27) Error: cannot convert varargs[string] to varargs[string] |
10:09:00 | FromDiscord | <konsumlamm> i mean, you didn't define `needsRefresh` in the playground, so it will obviously fail |
10:09:16 | FromGitter | <offbeat-stuff> Not in the playground |
10:09:24 | FromGitter | <offbeat-stuff> on my computer |
10:09:45 | FromDiscord | <konsumlamm> ye, but it's obvious that the playground code will fail |
10:10:02 | FromDiscord | <konsumlamm> what's the code that gives you the varargs error? |
10:10:19 | FromGitter | <offbeat-stuff> if needsRefresh(ox,ix,args): |
10:10:21 | FromGitter | <offbeat-stuff> This line |
10:10:26 | FromDiscord | <konsumlamm> ah, hmm |
10:10:40 | FromDiscord | <ElegantBeef> https://play.nim-lang.org/#ix=2NmO one solution |
10:11:00 | FromDiscord | <konsumlamm> idk too much how varargs work in nim |
10:11:01 | FromDiscord | <ElegantBeef> Varargs dont play nicely with single passed values and arrays |
10:11:10 | FromDiscord | <ElegantBeef> (edit) "arrays" => "openarrays" |
10:11:13 | FromDiscord | <konsumlamm> in other languages it gets converted to an array |
10:11:22 | FromGitter | <offbeat-stuff> Thanks |
10:11:41 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/manual.html#types-varargs |
10:11:43 | FromDiscord | <konsumlamm> so you have to use a "splat" operator (`` in python) |
10:12:29 | FromDiscord | <ElegantBeef> It's converted to an array internally so you're passing `string, string, array` |
10:12:37 | FromDiscord | <ElegantBeef> Which just doesnt play nice |
10:13:30 | FromDiscord | <konsumlamm> shouldn't you be able to pass an array to varargs, judging from the manual? |
10:13:49 | FromDiscord | <ElegantBeef> You can pass an openarray or single values, but not both |
10:14:35 | FromDiscord | <konsumlamm> isn't an array also an openarray? |
10:14:39 | FromDiscord | <ElegantBeef> Yes |
10:14:53 | FromDiscord | <ElegantBeef> Notice that their second proc only has two arguments |
10:15:03 | FromDiscord | <ElegantBeef> But they're passing two strings and an array |
10:15:28 | FromDiscord | <konsumlamm> ohh |
10:15:29 | FromDiscord | <konsumlamm> i see |
10:15:51 | FromDiscord | <ElegantBeef> https://play.nim-lang.org/#ix=2NmR another example |
10:16:20 | FromDiscord | <konsumlamm> the error message is a bit misleading though |
10:25:27 | FromDiscord | <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:00 | FromDiscord | <lqdev> due to how the compiler's nim.cfg is processed before your nim.cfg |
10:27:10 | FromDiscord | <lqdev> and release and danger are implemented there |
10:27:31 | FromDiscord | <lqdev> why'd you want to -d:release every single build though |
10:27:34 | FromDiscord | <lqdev> you lose stack traces |
10:27:45 | FromDiscord | <lqdev> usually --opt:speed is good enough to give you a good performance boost |
10:27:54 | FromDiscord | <ElegantBeef> well they said "project nim.cfg" |
10:27:54 | FromDiscord | <lqdev> though it slows down compilation |
10:28:02 | FromDiscord | <ElegantBeef> idk if it's the global cfg |
10:28:11 | FromDiscord | <lqdev> @ElegantBeef it doesn't matter |
10:28:16 | FromDiscord | <ElegantBeef> I just tested it |
10:28:22 | FromDiscord | <lqdev> the compiler's nim.cfg is still processed first |
10:28:32 | FromDiscord | <ElegantBeef> You can put release into a `main.nim.cfg` and it works |
10:29:11 | FromDiscord | <lqdev> https://nim-lang.org/docs/nimc.html#compiler-usage-configuration-files |
10:29:19 | FromDiscord | <lqdev> you sure about that beef? |
10:30:08 | FromDiscord | <ElegantBeef> https://streamable.com/z5fmgn |
10:30:10 | FromDiscord | <ElegantBeef> I hope so |
10:33:44 | FromDiscord | <ElegantBeef> Either way dont make everything a release build, just tedious π |
10:33:46 | FromDiscord | <ElegantBeef> I now sleep |
10:34:54 | FromDiscord | <Rika> Itβs not for debugging so why should you always make one |
10:35:06 | FromDiscord | <Meowz> Well I'm not debugging that project at all. Guess making everything a debug build is weird ;x |
10:35:07 | FromDiscord | <Rika> Are you telling me you donβt debug π |
10:35:27 | FromDiscord | <Rika> Then just do it once on the command |
10:35:46 | FromDiscord | <Meowz> bleh.. compiling it 300 times a hour. I wanna save that! π |
10:36:43 | FromDiscord | <Rika> Does your shell not have history |
10:39:33 | FromDiscord | <Meowz> https://discord.com/channels/701530051140780102/794620795493548062/794626504017051719 |
10:40:17 | FromDiscord | <Meowz> https://guidedhacking.com/attachments/47314541_2216816705019508_3216886657382875136_n-jpg.8407/ |
10:41:34 | FromDiscord | <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:30 | PMunch | Or just !nim @Rika |
11:14:51 | FromDiscord | <Rika> Yeah that works I guess |
11:15:01 | FromDiscord | <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:33 | FromDiscord | <lqdev> n<right arrow> |
11:20:42 | FromDiscord | <lqdev> fish master race |
11:22:47 | FromDiscord | <lqdev> @haxscramper how's your clang-based c++ wrapping tool? |
11:24:43 | FromDiscord | <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:30 | FromDiscord | <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:01 | FromDiscord | <haxscramper> But I've found several ergonomics issues that need to be fixed |
11:29:18 | * | hmmm joined #nim |
11:30:39 | PMunch | Hmm, can two procedures await the same future? |
11:32:20 | PMunch | Problem 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:51 | FromDiscord | <mratsim> @PMunch, you shouldn't do that. |
11:41:58 | FromDiscord | <mratsim> one owner. |
11:42:04 | PMunch | Yeah I realised that was a bad idea :P |
11:42:12 | PMunch | I'm too used to thinking about threads.. |
11:42:19 | FromDiscord | <mratsim> shared mutable state is a recipe for heisenbugs |
11:42:31 | FromDiscord | <mratsim> even with a threadpool |
11:43:01 | FromDiscord | <mratsim> just have something block on the future with registered callbacks |
11:43:24 | FromDiscord | <mratsim> doesn't the stdlib provide AsyncEvent or something like that? |
11:44:00 | FromDiscord | <mratsim> yes, you can use that: https://nim-lang.org/docs/asyncdispatch.html#trigger%2CAsyncEvent |
11:44:33 | PMunch | What would I use that for? |
11:46:11 | FromDiscord | <mratsim> you subscribe a callback that is triggered when the event is signaled |
11:46:32 | FromDiscord | <mratsim> and in the awaiter you trigger the event after the future is completed |
11:46:45 | FromDiscord | <mratsim> you subscribe 2 callbacks |
11:47:14 | FromDiscord | <mratsim> i.e. you do a producer-> consumer architeture by having consumers subscribe to producer events |
11:50:45 | FromDiscord | <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:32 | FromDiscord | <Clyybber> (maybe they weren't related to moduleHasChanged) |
11:51:59 | FromDiscord | <Clyybber> it was basically the nim compiler not recompiling if changing the file while it's compiling |
11:52:04 | FromDiscord | <Clyybber> but now it works so yay |
11:54:42 | * | lritter quit (Ping timeout: 260 seconds) |
11:54:46 | * | rockcavera joined #nim |
12:02:30 | PMunch | @mratsim, the problem is keeping track of the awaiter.. |
12:02:44 | PMunch | That'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:48 | FromDiscord | <konsumlamm> tfw the stdlib threadpool segfaults for a fibonacci example |
13:23:11 | PMunch | Which one? |
13:25:13 | FromDiscord | <konsumlamm> https://github.com/nim-lang/Nim/issues/11922 |
13:25:14 | disbot | β₯ Threadpool deadlocks on common multithreading examples |
13:25:56 | FromDiscord | <konsumlamm> wait, no, it just deadlocks |
13:26:17 | FromDiscord | <konsumlamm> segfaulting was when you create a thread inside a proc and return the thread handle |
13:27:00 | PMunch | Hmm, threading in Nim is a bit wonky.. |
13:27:31 | FromDiscord | <konsumlamm> mm, sadly |
13:27:44 | PMunch | Hopefully it looks like there are some improvements coming |
13:27:52 | PMunch | I mean ARC is already a big improvement |
13:28:09 | FromDiscord | <konsumlamm> what does ARC have to do with threading? |
13:28:22 | PMunch | You can more easily share data between threads without copying |
13:28:29 | PMunch | And without breaking the GC |
13:28:36 | FromDiscord | <konsumlamm> ah, i remember reading something about that |
13:28:37 | FromDiscord | <konsumlamm> that's nice |
13:28:44 | FromDiscord | <Zachary Carter> move semantics baby |
13:28:53 | PMunch | Oh yeah! |
13:29:05 | FromDiscord | <Clyybber> @konsumlamm Use weave instead of the stdlib |
13:29:34 | FromDiscord | <konsumlamm> ig |
13:29:45 | FromDiscord | <konsumlamm> though weave is still experimental, isn't it? |
13:29:50 | FromDiscord | <Zachary Carter> yeah |
13:29:52 | PMunch | Still not 100% sure when a move is triggered though, I kinda want to re-implement my trivial work-stealing thing for ARc |
13:29:55 | FromDiscord | <konsumlamm> (i mean, so is threadpool) |
13:30:05 | FromDiscord | <Zachary Carter> threadpool has never worked right |
13:30:27 | FromDiscord | <konsumlamm> hey, at least it didn't break over night |
13:30:50 | FromDiscord | <Zachary Carter> I think the common advice since pre 1.0 was to avoid using threadpool |
13:30:57 | PMunch | Man a nice DSL for homeassistant in Nim would be amazing |
13:30:59 | FromDiscord | <konsumlamm> perhaps that should be clarified, instead of just saying "Unstable API." |
13:31:06 | FromDiscord | <Zachary Carter> and if you want to have a threadpool at your disposal, implement your own |
13:31:19 | FromDiscord | <Zachary Carter> I'm not sure what code, besides tests, relies on threadpool |
13:31:21 | FromDiscord | <Zachary Carter> I can't imagine it's much |
13:31:31 | FromDiscord | <Zachary Carter> so maybe it should just be removed from the stdlib all together |
13:31:45 | FromDiscord | <Zachary Carter> or it should be fixed |
13:32:03 | Zevv | Hey zacharay carter |
13:32:08 | FromDiscord | <Zachary Carter> Hi Zevv |
13:32:12 | FromDiscord | <mratsim> @konsumlamm to be fair even production libraries choks on fibonacci |
13:32:14 | Zevv | what did disruptek find on you to make you pay |
13:32:19 | FromDiscord | <Zachary Carter> lol |
13:32:42 | FromDiscord | <Zachary Carter> I just want him to get out of his bus or trailer or tent |
13:32:47 | FromDiscord | <Zachary Carter> or whatever he's living in now |
13:33:14 | Zevv | yeah same here. that sucks very big time |
13:33:19 | FromDiscord | <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:30 | disbot | β₯ Fibonacci: segfaults and scalability issues ; snippet at 12https://play.nim-lang.org/#ix=2NnC |
13:33:44 | FromDiscord | <mratsim> And Haskell takes a looooooooooonnngggg time |
13:33:49 | FromDiscord | <Zachary Carter> It does... I don't know him well enough to understand his reluctance to get a real job |
13:33:50 | FromDiscord | <konsumlamm> oof |
13:33:57 | FromDiscord | <konsumlamm> but it terminates? |
13:33:59 | FromDiscord | <mratsim> oh, and GCC OpenMP is completely broken |
13:34:05 | FromDiscord | <mratsim> GCC doesn't terminate |
13:34:09 | FromDiscord | <mratsim> I don't remember |
13:34:13 | FromDiscord | <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:20 | PMunch | Zevv, we're having a fundraiser for Disruptek? |
13:34:37 | FromDiscord | <Zachary Carter> I just sponsored him on Github |
13:34:41 | FromDiscord | <Zachary Carter> like $15 a month or soemthing |
13:34:41 | PMunch | Ah cool |
13:34:43 | FromDiscord | <konsumlamm> lemme test haskell and rayon |
13:34:45 | FromDiscord | <Zachary Carter> (edit) "soemthing" => "something" |
13:34:57 | Zevv | PMunch: we've had for a long time |
13:35:07 | Zevv | What, only $15? shame on you! |
13:35:12 | FromDiscord | <Zachary Carter> lol |
13:35:16 | FromDiscord | <Zachary Carter> I'm not as rich as I used to be |
13:35:26 | Zevv | wrong business dude. games don't pay. |
13:35:29 | FromDiscord | <Zachary Carter> I used to give Nim $150 a month, did that for like a year or so |
13:35:34 | FromDiscord | <Zachary Carter> no they do not |
13:36:00 | * | Guest62103 quit (Quit: Guest62103) |
13:36:16 | * | Guest62103 joined #nim |
13:36:24 | Zevv | wow that's a significant sum |
13:36:51 | FromDiscord | <Zachary Carter> yeah, but that's when I was single and got paid well and was living rent free |
13:37:08 | FromDiscord | <hamidb80> https://github.com/nim-lang/Nim/issues/16832 |
13:37:08 | disbot | β₯ using `func` keyword instead of `proc` in standard libraries |
13:37:10 | FromDiscord | <Rika> oof, what happened to the paid well part |
13:37:16 | FromDiscord | <Zachary Carter> I went into game dev |
13:37:42 | FromDiscord | <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:43 | FromDiscord | <Rika> yeah exactly what i said, it predated func so most of it isnt using func |
13:37:51 | FromDiscord | <Rika> feel free to do the PRs though |
13:38:56 | FromDiscord | <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:09 | FromDiscord | <Zachary Carter> when everything is side effect free |
13:39:19 | FromDiscord | <Clyybber> remove io.nim |
13:39:28 | FromDiscord | <hamidb80> I've never been in a such kind community before |
13:39:33 | FromDiscord | <Clyybber> :D |
13:39:37 | FromDiscord | <Zachary Carter> I sense sarcasm |
13:39:46 | FromDiscord | <konsumlamm> let me have my fun doing pointless benchmarks someone else already has done :p |
13:39:59 | FromDiscord | <Rika> i mean legitimately not being mean here, i dont know what else i'd say |
13:40:03 | FromDiscord | <Clyybber> I don't think so; most people aren't native speakers |
13:40:17 | FromDiscord | <konsumlamm> who needs io anyway |
13:40:20 | FromDiscord | <mratsim> gl hf |
13:40:26 | FromDiscord | <konsumlamm> this meme was brought to you by haskell gang |
13:40:37 | FromDiscord | <Rika> lmao |
13:41:27 | Zevv | PMunch: https://github.com/sponsors/disruptek |
13:41:59 | Zevv | "I'm unemployed and homeless. |
13:41:59 | Zevv | With your support, I buy drugs. |
13:42:00 | Zevv | If there's anything left, I buy food." |
13:42:02 | PMunch | I mean with a bio like that it's hard not to sponsor :P |
13:42:07 | Zevv | ikr |
13:42:08 | FromDiscord | <Zachary Carter> lol |
13:42:19 | PMunch | "Narrator: there wasn't" < don't forget that part |
13:42:54 | FromDiscord | <konsumlamm> @mratsim didn't even think about monad-par, but it seems to be the closest to nims threadpool |
13:43:37 | FromDiscord | <mratsim> if you have an alternate implementation feel free to PR it in |
13:43:48 | FromDiscord | <mratsim> I looked for a couple and that was the easiest to use. |
13:44:05 | FromDiscord | <konsumlamm> i thought about using the async package |
13:44:27 | FromDiscord | <konsumlamm> which is basically a wrapper around haskells standard forkIO |
13:46:37 | FromDiscord | <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:58 | FromDiscord | <mratsim> Also that's one thing less to do if you get that at a hiring interview |
13:47:21 | Zevv | I never had an hiring interview :( |
13:47:49 | PMunch | https://github.com/PMunch/nimlsp/issues/70 <- anyone know what might trigger this? |
13:47:56 | disbot | β₯ nimlsp crashes with a nim file importing a non-existent module and critbits ; snippet at 12https://play.nim-lang.org/#ix=2NnJ |
13:48:18 | PMunch | Seems related to this: https://forum.nim-lang.org/t/7434 |
13:51:28 | FromDiscord | <konsumlamm> @mratsim do you also plan to support easy to use parallel map/fold |
13:51:56 | FromDiscord | <mratsim> https://github.com/mratsim/weave#data-parallelism |
13:52:20 | FromDiscord | <mratsim> and for folding: https://github.com/mratsim/weave#parallel-reduction |
13:53:00 | FromDiscord | <konsumlamm> i see |
13:53:30 | FromDiscord | <konsumlamm> since using more of an FP style, i always expect such things to be higher order functions |
13:53:40 | FromDiscord | <mratsim> I wonder why parallelReduce is called parallelReduceImpl, must have missed a proc |
13:53:40 | FromDiscord | <konsumlamm> but in nim those don't work that nicely |
13:54:03 | FromDiscord | <mratsim> you can create a higher level wrapper |
13:54:19 | FromDiscord | <konsumlamm> so weave is just meant to provide a low level API? |
13:54:29 | FromDiscord | <mratsim> Weave syntax is more reminiscent to OpenMP |
13:55:08 | FromDiscord | <konsumlamm> oh, btw, you may also want to add a benchmark for D with std.parallelism |
13:55:14 | FromDiscord | <mratsim> I think the API is quite complete in terms of global threadpool |
13:55:28 | FromDiscord | <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:42 | FromDiscord | <mratsim> the other stuff I would like to add is "pool.spawn" for local threadpool |
13:55:49 | FromDiscord | <mratsim> also distributed computing |
13:56:05 | FromDiscord | <mratsim> and CUda/OpenCL scheduling |
13:56:35 | FromDiscord | <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:58 | FromDiscord | <mratsim> It would a deep learning / scientific computing compiler |
13:57:53 | FromDiscord | <konsumlamm> will it always be necessary to call `init(Weave)` and `exit(Weave)`? |
13:59:30 | FromDiscord | <mratsim> I can create a weave_autoinit file :p that does that on import |
14:00:17 | FromDiscord | <mratsim> Example of deep learning / image processing compilers: https://halide-lang.org/ http://tiramisu-compiler.org/ |
14:04:00 | FromDiscord | <mratsim> likely what I will do is create weave_local and weave_global and weave\_global will auto init the runtime. |
14:05:16 | FromDiscord | <Rika> will you keep the forced qualification as well |
14:06:30 | FromDiscord | <mratsim> yes |
14:06:42 | FromDiscord | <mratsim> to differentiate between pool.init() and Weave.init() |
14:07:00 | FromDiscord | <mratsim> and because using just "init" will be very confusing |
14:28:37 | FromGitter | <Araq> use `init` and make the copy&paste example code use `pool.init()`, it works |
14:28:51 | FromGitter | <Araq> programmers are good at copy&paste |
14:31:38 | FromDiscord | <mratsim> there is no pool.init yet |
14:31:52 | FromDiscord | <mratsim> I didn't implement local pools |
14:32:33 | FromDiscord | <konsumlamm> so, using rayon works very well (i ended up using the versions you linked xd) |
14:33:34 | FromDiscord | <mratsim> apparently Rayon is cheating there: https://github.com/HadrienG2/parallel-histograms-bench/issues/2#issuecomment-563464607 |
14:33:38 | disbot | β₯ Perf profile on i9-9980XE ; snippet at 12https://play.nim-lang.org/#ix=biQ |
14:33:53 | FromDiscord | <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:50 | FromDiscord | <mratsim> I think you can't implement nqueens in Rayon because it doesn't support fork join parallelism? |
14:37:32 | FromDiscord | <mratsim> this is problematic because many algorithms in scientific computing are recursive divide and conquer. |
14:38:23 | FromDiscord | <mratsim> for example FFT, solving a constraint of matrices and plenty of others |
14:38:55 | FromDiscord | <mratsim> and you need one runtime that can seamlessly interweave data parallel and task parallel multithreading. |
14:54:57 | FromDiscord | <konsumlamm> not sure |
14:55:03 | FromDiscord | <konsumlamm> have you looked at `scope`? |
14:55:28 | FromDiscord | <konsumlamm> also, what is a good input value to benchmark? |
14:56:15 | FromDiscord | <mratsim> I think 13-15 are decently long without being too much |
14:56:23 | FromDiscord | <mratsim> Rayon doesn't support futures yet does it? |
14:57:02 | FromDiscord | <konsumlamm> i dont think so |
14:57:30 | FromDiscord | <konsumlamm> i tested the rayon version (with `join` and with `scope`) and it was almost instantaneous |
14:57:53 | FromDiscord | <konsumlamm> using fib(20) |
14:58:32 | FromDiscord | <mratsim> still pending: https://github.com/rayon-rs/rayon/pull/679 |
14:58:33 | disbot | β₯ [WIP] Add the ability to spawn futures |
15:01:49 | * | NimBot joined #nim |
15:01:54 | FromDiscord | <konsumlamm> haskell with monad-par is also almost instant, with 8 threads |
15:02:01 | FromDiscord | <konsumlamm> i feel like i'm doing something wrong |
15:02:44 | FromDiscord | <mratsim> I might be remembering wrong about Haskell |
15:02:54 | FromDiscord | <mratsim> Rayon scopes are expected to be fast. |
15:03:14 | FromDiscord | <mratsim> Julia, GCC, HPX are expected to be broken. |
15:03:20 | FromDiscord | <mratsim> and Nim's threadpool |
15:09:39 | FromDiscord | <konsumlamm> async works similarly good |
15:09:47 | * | habamax quit (Ping timeout: 272 seconds) |
15:10:11 | FromDiscord | <konsumlamm> @mratsim would you be interested in a D benchmark? |
15:10:41 | FromDiscord | <mratsim> sure |
15:10:55 | FromDiscord | <mratsim> any lang/impl can go in those folders |
15:11:21 | FromDiscord | <mratsim> the goal is really to find who can beat Weave so that I can study, unravel their secrets and assimilate them. |
15:12:10 | FromDiscord | <konsumlamm> xd |
15:12:11 | FromDiscord | <Clyybber> π |
15:28:19 | ForumUpdaterBot | New 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:23 | ForumUpdaterBot | New 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:27 | FromDiscord | <hamidb80> what does `Infix` mean? |
16:17:40 | FromDiscord | <Zachary Carter> like infix notation? |
16:18:09 | FromDiscord | <hamidb80> yes |
16:18:11 | FromDiscord | <Zachary Carter> `+ 1 1` would be prefix notation, `1 + 1` would be infix |
16:18:21 | FromDiscord | <Zachary Carter> it depends on the placement of the operator vs operands |
16:27:21 | FromDiscord | <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:32 | FromDiscord | <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:33 | FromDiscord | <mratsim> use untyped instead of stmt and open a bug, the documentation is outdated |
16:32:07 | FromDiscord | <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:27 | FromDiscord | <hamidb80> sent a long message, see http://ix.io/2NoX |
16:38:46 | FromDiscord | <hamidb80> his first program in Nim https://media.discordapp.net/attachments/371759389889003532/803665245083533332/Screenshot_160.png |
16:39:52 | FromDiscord | <hamidb80> (edit) "http://ix.io/2NoX" => "http://ix.io/2NoY" |
16:43:01 | * | j-james joined #nim |
16:45:00 | FromDiscord | <hamidb80> (edit) sent a long message, see http://ix.io/2Np0 |
16:48:44 | FromDiscord | <haxscramper> By the way, if you have no spaces in identifier names you don't even need backticks |
16:49:35 | FromDiscord | <hamidb80> yeah, I used ` just because it supports our native language characters π |
16:50:03 | FromDiscord | <haxscramper> No, I mean any valid unicode without spaces works |
16:50:06 | * | habamax joined #nim |
16:50:17 | FromDiscord | <haxscramper> !eval let ΡΠ΅ΡΡ = "q123" |
16:50:19 | NimBot | <no output> |
16:50:33 | FromDiscord | <hamidb80> !eval let ΡΠ΅ΡΡ = "q123"; echo ΡΠ΅ΡΡ |
16:50:35 | NimBot | q123 |
16:50:41 | FromDiscord | <hamidb80> wow |
16:58:08 | disruptek | i would go the foss route if i could live off it. |
16:58:21 | disruptek | otherwise 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:02 | disruptek | when was the last time your software surprised you? |
17:00:38 | disruptek | dom96: i don't mean bugs. |
17:00:38 | FromDiscord | <mratsim> when Nim view types worked as expected, so yesterday |
17:01:15 | disruptek | i just did `git nim` and got this: |
17:01:28 | disruptek | refreshing the 1.0.11 distribution... |
17:01:34 | disruptek | 8 days ago rm weave from 1.0 |
17:01:34 | disruptek | 8 days ago also remove weave from tests (duh) |
17:01:34 | disruptek | 7 days ago balls-2.0.7 |
17:02:02 | FromDiscord | <mratsim> Weave is tested in 1.0 ? |
17:02:09 | disruptek | not anymore. |
17:02:10 | FromDiscord | <mratsim> AFAIK it needs 1.2 at minimum |
17:02:43 | disruptek | i 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:23 | FromDiscord | <carpal> color scheme? |
17:21:11 | disruptek | i wash all colors of hair. |
17:27:10 | FromDiscord | <iWonderAboutTuatara> @ElegantBeef not sure if the window of submission for this month in Nim has passed |
17:27:17 | FromDiscord | <iWonderAboutTuatara> for this month |
17:27:44 | FromDiscord | <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:27 | disruptek | carpal: oh, gitnim already has color to distinguish the age of the update from the commit summary itself. |
17:39:33 | FromDiscord | <Clyybber> poor disruptek doesnt see what carpal was replying too |
17:40:03 | FromDiscord | <Clyybber> (replied to the image that was sent) |
17:41:02 | * | disruptek sighs. |
17:42:55 | disruptek | Araq: 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:35 | FromDiscord | <mratsim> AFAIK he asked for review on his PR that has been sitting there for months |
17:43:36 | FromDiscord | <carpal> why nimble on linux doesn't know the requirement nim >= 1.4.2? |
17:43:42 | FromDiscord | <carpal> (edit) "nim" => "`nim" | "1.4.2?" => "1.4.2`?" |
17:43:52 | disruptek | mratsim: that's what i'm doing, for the second time. |
17:43:58 | leorize | I don't think nimble ever check that requirement |
17:44:15 | FromDiscord | <mratsim> I think it does, some use it to require devel |
17:44:33 | disruptek | it's basically there to screw you and for no other reason. |
17:44:35 | FromDiscord | <carpal> I switched to PopOS from windows and while on win that requirement was mandatory in linux doesn't exist.. |
17:45:21 | FromDiscord | <carpal> (the version was the same) |
17:49:51 | Oddmonger | wake me up when AmigaOS is back for the vengeance |
17:51:04 | FromDiscord | <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:52 | FromDiscord | <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:02 | FromDiscord | <Rika> prolly better to use unittest's check |
17:52:09 | disruptek | !repo balls |
17:52:10 | FromDiscord | <lytedev> will take a look - thank you |
17:52:10 | disbot | https://github.com/disruptek/balls -- 9balls: 11the unittest framework with balls π΄π‘π’ 15 35β 1π΄ 7& 1 more... |
17:52:32 | disruptek | check will output symbol values during failed assertions. |
18:01:02 | * | abm joined #nim |
18:09:11 | * | adnan338 joined #nim |
18:13:59 | narimiran | "This Month with Nim": https://nim-lang.org/blog/2021/01/26/this-month-with-nim.html |
18:16:29 | FromDiscord | <haxscramper> I created RFC for error messages - https://github.com/nim-lang/RFCs/issues/322 |
18:16:35 | FromDiscord | <haxscramper> Mainly as a prompt for discussion |
18:16:36 | disbot | β₯ Better error messages ; snippet at 12https://play.nim-lang.org/#ix=2Npp |
18:17:19 | FromDiscord | <haxscramper> And getting other people's opinions - based discussion earler today |
18:17:27 | FromDiscord | <haxscramper> (edit) "earler" => "earlier" |
18:20:17 | * | j-james quit (Quit: WeeChat 3.0) |
18:24:24 | dom96 | disruptek: rent free |
18:26:50 | disruptek | dom96: i'm never gonna dance again; guilty feet have got no rhythm. |
18:32:01 | disruptek | clyybber: wanna see something silly? |
18:32:13 | FromDiscord | <Clyybber> sure |
18:32:21 | disruptek | https://github.com/disruptek/jsonconvert/actions/runs/512940135 |
18:33:22 | FromDiscord | <Clyybber> debug compilation fails? |
18:34:41 | disruptek | 1.0, devel, and 1.[24] all illustrate different failure modes. |
18:35:18 | FromDiscord | <Clyybber> oh |
18:35:20 | disruptek | the builds succeed but the execution fails. |
18:35:20 | FromDiscord | <Clyybber> neat |
18:36:08 | FromDiscord | <Clyybber> could it be that you removed balls.cmd? |
18:36:20 | disruptek | what? |
18:36:29 | * | Guest62103 quit (Quit: Guest62103) |
18:36:50 | * | Guest62103 joined #nim |
18:39:01 | FromDiscord | <Clyybber> could it be that it didn't find balls.cmd |
18:39:16 | FromDiscord | <Clyybber> also can you reply to the RFC on github, seems like there was some misunderstanding |
18:39:18 | disruptek | balls is the runner that compiles the tests. |
18:39:23 | FromDiscord | <Clyybber> or I didn't understand your reply either |
18:39:33 | disruptek | which RFC? |
18:39:34 | FromDiscord | <Clyybber> disruptek: Yeah, I don't see balls.cmd anywhere |
18:39:37 | Prestige | disruptek: I love that |
18:39:40 | FromDiscord | <Clyybber> the comma one |
18:40:34 | FromDiscord | <Clyybber> the RFC wouldn't affect macros at all |
18:41:07 | FromDiscord | <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:29 | disruptek | i don't see what i could add. |
18:43:20 | FromDiscord | <Clyybber> I don't know, the discussion seems to have departed quite far from the actual RFC |
18:44:14 | FromDiscord | <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:02 | disruptek | this 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:04 | disruptek | if 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:18 | FromDiscord | <Clyybber> the code doesn't change the ast |
18:46:32 | disruptek | ergo, unless it improves clarity, i don't support it. |
18:46:36 | disruptek | not sure how else to say this. |
18:46:56 | FromDiscord | <Clyybber> personally I never thought about the syntax the RFC proposes |
18:47:06 | FromDiscord | <Clyybber> but apparently others do |
18:47:25 | FromDiscord | <mratsim> agree with disruptek |
18:50:21 | disruptek | clyybber: if balls.cmd was missing, no compilation would proceed. |
18:50:35 | FromDiscord | <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:04 | disruptek | it hurts because now i have to read the entire line, skipping past an expr, just to find other symbol definitions. |
18:51:20 | disruptek | i just love counting commas. |
18:53:19 | Prestige | new lines after commas? |
18:53:45 | disruptek | oooh, maybe we can have more lines starting with , too. |
18:53:55 | Prestige | starting with , ? :o |
18:54:05 | disruptek | that's always lovely. it's a js idiom. |
18:54:24 | Prestige | I hate it |
18:59:46 | FromDiscord | <Clyybber> @haxscramper I feel like your RFC is more of a collection of issues, isn't it? |
19:00:36 | FromDiscord | <Clyybber> I think it's easier to tackle individual error messages and improve them |
19:00:50 | FromDiscord | <Clyybber> so individual issues might make more sense |
19:01:35 | FromDiscord | <haxscramper> sent a long message, see http://ix.io/2NpE |
19:02:07 | FromDiscord | <haxscramper> And it is not exactly collection of issues (it has large number of them, yes) - structured error messages are also mentioned |
19:02:18 | FromDiscord | <haxscramper> Large part of RFC is about type mismatch specifically |
19:03:14 | * | dddddd_ joined #nim |
19:03:52 | FromDiscord | <Clyybber> so basically sorting the candidate list? |
19:04:18 | FromDiscord | <haxscramper> And providing additional heuristics if none of the candidates seem reasonable |
19:04:51 | FromDiscord | <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:11 | FromDiscord | <Clyybber> yeah |
19:05:27 | FromDiscord | <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:45 | FromDiscord | <hamidb80> Material dark ocean |
19:07:22 | FromDiscord | <Clyybber> I feel like the RFC is better split up into "Type Mismatch Sorting", "Machine Readable Errors", "Smart Suggestions" |
19:07:23 | FromDiscord | <haxscramper> I wanted to first dig into compiler and write RFC with concrete steps |
19:07:31 | FromDiscord | <haxscramper> And then implement it |
19:07:44 | FromDiscord | <Clyybber> because all of these are kinda complex, and else the discussion tends to be too broad IME |
19:08:16 | FromDiscord | <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:36 | FromDiscord | <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:36 | disbot | β₯ Nimsuggest misleads, but newcomers use it by default |
19:10:04 | FromDiscord | <haxscramper> But |
19:10:11 | FromDiscord | <haxscramper> RFC is more suitable becase |
19:10:22 | FromDiscord | <Clyybber> @haxscramper Yeah, my fear is just that the discussion won't go into the details, which it must IMO |
19:10:27 | FromDiscord | <Clyybber> to be actionable at least |
19:10:50 | FromDiscord | <Clyybber> otherwise the RFC stays too broad; in its current state it could be accepted of course, but what would it mean? |
19:11:00 | FromDiscord | <Clyybber> of course we want to improve error messages |
19:11:06 | FromDiscord | <Clyybber> the question is how |
19:11:46 | FromDiscord | <Clyybber> The RFC you linked is a good example, because it lead to nothing |
19:11:56 | FromDiscord | <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:20 | FromDiscord | <iWonderAboutTuatara> how do I make a varargs of var params? |
19:12:32 | FromDiscord | <iWonderAboutTuatara> If I try to use `varargs[var bool]` I get a read from nil error |
19:13:03 | FromDiscord | <haxscramper> I guees that what I want to get at this stage are opinions and general ideas |
19:13:23 | FromDiscord | <haxscramper> Well, I'm not exacrlt defending my RFC tbh |
19:13:29 | FromDiscord | <haxscramper> I think you have a fair point |
19:14:05 | FromDiscord | <hamidb80> var varags[bool]? |
19:14:12 | FromDiscord | <iWonderAboutTuatara> that gives a compile error |
19:14:26 | FromDiscord | <iWonderAboutTuatara> type mismatch |
19:15:14 | FromDiscord | <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:15 | disbot | https://github.com/nim-lang/Nim/issues/16001 -- 5Nimsuggest misleads, but newcomers use it by default |
19:15:26 | FromDiscord | <Clyybber> IME broad RFCs are more likely to derail into unrelated discussions |
19:16:24 | FromDiscord | <Clyybber> Yeah, I don't think its better as a single issue |
19:16:29 | FromDiscord | <Clyybber> I think it needs to be split up |
19:17:13 | FromDiscord | <haxscramper> I can split it into three RFCs for topics that you mentioned |
19:17:21 | FromDiscord | <Clyybber> Sounds good |
19:17:28 | FromDiscord | <haxscramper> Alright, will do now |
19:17:33 | FromDiscord | <Clyybber> Nice, thanks! |
19:20:11 | Zevv | ooh, almost 21:00, I should get ready soon |
19:20:11 | disruptek | Araq: https://github.com/nim-lang/RFCs/issues/168#issuecomment-529364946 |
19:20:14 | disbot | β₯ Concepts and type-checking generics ; snippet at 12https://play.nim-lang.org/#ix=23U8 |
19:20:30 | Zevv | see if I can loot a ps5 tonight somewhere and burn some more cars |
19:20:35 | disruptek | this seems pretty important for composition reasons. |
19:21:25 | disruptek | Zevv: a bat has good reach but a hammer makes it clear that you'd mad af. |
19:21:32 | disruptek | s/you'd/you're/ |
19:22:03 | Zevv | I'm bringing my pitchfork, it's a classic and has this cool retro feel |
19:22:29 | Zevv | and I've learned from games that bats should at least be wound with barbed wire |
19:22:31 | disruptek | yeah, but for every four forks, you need a knife and a torch. |
19:23:57 | saem | Yeah, torches are really underrated |
19:28:20 | saem | I 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:49 | disruptek | yeah, but how is it supposed to work today? |
19:29:21 | disruptek | i mean, not today; with the new concepts it's clear how to compose the generics but nothing else. |
19:29:40 | saem | As in what is the incremental steps, that are themselves valid, as the rosy vision is worked towards? |
19:30:29 | disruptek | type 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:06 | FromDiscord | <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:57 | disruptek | i told araq i would test this because he insistent that the new impl is predicated upon new syntax. |
19:32:16 | disruptek | but i cannot even express what i had previously. |
19:32:22 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
19:32:34 | FromDiscord | <Clyybber> well, it was an experiment |
19:32:43 | disruptek | what was? |
19:32:50 | FromDiscord | <Clyybber> the new impl |
19:34:00 | disruptek | the new impl doesn't even parse these type sections. |
19:35:06 | FromDiscord | <Clyybber> heh disruptek you have an error in your group example I think |
19:35:26 | FromDiscord | <Clyybber> you are trying `h.del` but `h` is `let` |
19:35:30 | disruptek | yes, i put an error in most of my examples. |
19:35:36 | disruptek | it's to see if people are actually testing them. |
19:35:59 | disruptek | we already talked about that one last time you looked at groups. π |
19:36:07 | FromDiscord | <Clyybber> oh |
19:36:24 | FromDiscord | <Clyybber> well, I forgot what the example is supposed to demonstrate :p |
19:36:28 | disruptek | to 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:46 | disruptek | the logic is broken regardless of the del. |
19:36:59 | disruptek | we aren't supposed to be able to del. |
19:37:11 | FromDiscord | <Clyybber> I get an error for that |
19:37:12 | * | Guest62103 joined #nim |
19:37:24 | FromDiscord | <Clyybber> but expression 'h' is immutable, not 'var' |
19:37:28 | disruptek | you are supposed to. read the comments. |
19:37:41 | leorize | @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:54 | disruptek | out of expr. |
19:38:06 | FromDiscord | <Clyybber> disruptek: No |
19:38:19 | FromDiscord | <Clyybber> leorize: Out of `a`'s scope |
19:38:41 | leorize | that's good to know, I can cheat a bit to avoid copying :p |
19:38:47 | disruptek | what? a stmtlist on rhs survives until end of a scope? |
19:38:48 | leorize | is that guaranteed by spec? |
19:38:55 | FromDiscord | <Clyybber> disruptek: Yes |
19:38:58 | FromDiscord | <Clyybber> leorize: Yes |
19:39:12 | disruptek | jesus this fucks up cps, then. |
19:39:15 | FromDiscord | <Clyybber> stmtlists don't introduce a scope |
19:39:27 | disruptek | no, but it means that we have to add them into the env. |
19:39:36 | disruptek | otherwise shims won't include them. |
19:39:45 | FromDiscord | <Clyybber> I think I told you that |
19:40:15 | FromDiscord | <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:23 | disruptek | well, if i ever work on cps again, maybe i'll remember this time. |
19:40:56 | * | xet7 quit (Ping timeout: 240 seconds) |
19:41:13 | leorize | @Clyybber: if it's an expression made by a template then it should be fine, right? |
19:41:46 | FromDiscord | <Clyybber> templates don't introcue a scope so yes |
19:41:56 | FromDiscord | <Clyybber> (edit) "introcue" => "introduce" |
19:42:40 | leorize | nice |
19:43:02 | disruptek | not nice. |
19:43:24 | FromDiscord | <Clyybber> very nice. |
19:43:59 | FromDiscord | <iWonderAboutTuatara> so how do I pass a varargs param of var arguements? |
19:44:09 | FromDiscord | <Clyybber> @iWonderAboutTuatara WDYM? |
19:44:32 | FromDiscord | <iWonderAboutTuatara> I have a proc with a param of varargs[bool] |
19:44:37 | FromDiscord | <iWonderAboutTuatara> but I want the bools to be var params |
19:44:47 | FromDiscord | <Clyybber> thats not possible AFAIK |
19:44:52 | FromDiscord | <iWonderAboutTuatara> oh that's unfortunate |
19:44:56 | FromDiscord | <iWonderAboutTuatara> thanks! |
19:44:59 | FromDiscord | <Clyybber> why do you need it? |
19:45:03 | FromDiscord | <Clyybber> (edit) |
19:45:17 | FromDiscord | <iWonderAboutTuatara> I have several variables that I want to be able to modify in the function itself |
19:45:28 | FromDiscord | <iWonderAboutTuatara> basically caches on whether a specific button is pressed |
19:45:29 | disruptek | use a template. |
19:45:40 | FromDiscord | <iWonderAboutTuatara> oh that's a very good idea |
19:45:44 | FromDiscord | <iWonderAboutTuatara> yeah I will |
19:45:45 | FromDiscord | <iWonderAboutTuatara> thanks! |
19:46:48 | * | habamax quit (Ping timeout: 256 seconds) |
19:47:04 | FromDiscord | <iWonderAboutTuatara> been a while since I used one actually |
19:47:10 | FromDiscord | <iWonderAboutTuatara> how do I convert proc code to a template? |
19:48:11 | * | Gustavo6046 joined #nim |
19:50:15 | FromDiscord | <lqdev> i think i used varargs[ptr T] successfully |
19:50:25 | disruptek | i need a list of countries where infanticide is punished with anything less than jail time. |
19:50:28 | FromDiscord | <lqdev> or was it openArray? |
19:50:39 | FromDiscord | <lqdev> either way, ptr would also work in this case |
19:50:58 | FromDiscord | <Clyybber> disruptek: h also shouldn't be Collectable right? |
19:52:21 | disruptek | there are immutable Collectables. |
19:52:39 | disruptek | it's only del(var Collectable; index) that must exist. |
19:52:39 | FromDiscord | <Clyybber> but your Collectable concept "calls" del |
19:52:53 | FromDiscord | <Clyybber> yeah, doesn't looks that immutable to me :p |
19:53:03 | disruptek | see concept c, var w. |
19:53:06 | disruptek | w is a var. |
19:53:17 | FromDiscord | <Clyybber> ah |
19:54:42 | FromDiscord | <Clyybber> disruptek: the last line "so uh how is h a Groupable" |
19:55:01 | FromDiscord | <Clyybber> AFAICT h should be Groupable and is |
19:56:20 | disruptek | groupable is a collectable that, if it's mutable, you can add to. |
19:56:49 | disruptek | h is Groupable[string] (should be true), but `g is Groupable` should be true also. |
19:57:00 | disruptek | and it isn't, despite being mutable and otherwise the same as h. |
19:57:32 | * | Jesin quit (Quit: Leaving) |
19:57:43 | saem | Gonna 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:03 | disruptek | what? |
19:58:11 | FromDiscord | <haxscramper> saem: I created RFC for structured error messages (based on today's discussion) - #324 |
19:58:20 | FromDiscord | <haxscramper> !rfc 324 |
19:58:21 | disbot | https://github.com/nim-lang/RFCs/issues/324 -- 3Structured compilation errors 7& 3 more... |
19:58:24 | disruptek | none of the syntax for that RFC seems to work with the impl afaict. |
19:58:44 | disruptek | #168 i mean |
19:58:50 | saem | Haxscramper awesome, thanks for doing that. Might get to read it tonight. |
19:58:51 | disruptek | !rfc 168 |
19:58:51 | disbot | https://github.com/nim-lang/RFCs/issues/168 -- 3Concepts and type-checking generics 7& 4 more... |
20:00:08 | FromDiscord | <haxscramper> saem: it turned out to be really short (tl;dr - add IR for errors, allow json output) |
20:00:21 | FromDiscord | <Clyybber> :) |
20:00:33 | FromDiscord | <Clyybber> disruptek: g is Groupable[string] too |
20:01:13 | disruptek | yes, but if you change Groupable to only be mutable, it still fails because h is Groupable[string] and g isnot Groupable (still). |
20:01:16 | FromDiscord | <haxscramper> @Clyybber :p |
20:01:50 | FromDiscord | <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:01 | disruptek | yes. |
20:02:33 | disruptek | note that g is Collectable. |
20:02:45 | FromDiscord | <Clyybber> hmm |
20:02:46 | FromDiscord | <Clyybber> noted |
20:02:55 | saem | Hax: 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:08 | FromDiscord | <Clyybber> disruptek: h is Collectable too |
20:03:19 | FromDiscord | <Clyybber> works with the typeclass syntax |
20:03:28 | disruptek | yeah, so why not Groupable? |
20:03:35 | FromDiscord | <Clyybber> bug |
20:03:45 | FromDiscord | <Clyybber> not sure whats the root cause is yet |
20:04:48 | * | Jesin joined #nim |
20:06:11 | disruptek | i think it's due to bugs. |
20:06:27 | FromDiscord | <Clyybber> :surprise: |
20:07:56 | FromDiscord | <Deorder> On Windows when using os.removeFile I get "Access is denied" even when running as admin. Any ideas? |
20:08:08 | FromDiscord | <Recruit_main707> no semaphores in stdlib right? |
20:08:25 | disruptek | i think there's a semaphore in threadpool or something. |
20:08:28 | saem | I've still not been able to muster up sufficient courage to dive into generics part of the compiler in any meaningful way. π¨ |
20:08:43 | disruptek | !repo cps |
20:08:44 | disbot | https://github.com/disruptek/cps -- 9cps: 11Continuation-Passing Style for Nim π 15 60β 3π΄ |
20:08:51 | disruptek | i put a semaphore in cps. |
20:08:52 | leorize | saem: just assume that it is broken :P |
20:09:15 | disruptek | most of generics works, actually. |
20:09:17 | FromDiscord | <Recruit_main707> ok thanks |
20:09:18 | saem | It might be, and that's ok, I want to help fix it. |
20:09:45 | * | muffindrake quit (Quit: muffindrake) |
20:09:52 | disruptek | like, i think the generics bugs are mostly due to other features making poor assumptions rather than bugs in generics. |
20:10:14 | disruptek | you might have to read that sentence 3-4 times before it makes sense. |
20:10:20 | * | muffindrake joined #nim |
20:10:45 | leorize | it's also because of generics weird binding rule |
20:11:03 | leorize | 4raq allowed `bind` in procs to remedy that though |
20:11:11 | ForumUpdaterBot | New thread by Arnetheduck: Nim style guide based on Nimbus experience, see https://forum.nim-lang.org/t/7436 |
20:11:25 | FromDiscord | <Deorder> sent a code paste, see https://play.nim-lang.org/#ix=2Nq1 |
20:11:29 | leorize | concepts will probably fix the remaining use cases |
20:11:30 | FromDiscord | <Deorder> While using Nake |
20:11:33 | FromDiscord | <Clyybber> leorize: Whats weird about them? |
20:11:42 | FromDiscord | <Clyybber> the binding rules I mean |
20:12:18 | leorize | the generics sandwich problem |
20:14:26 | saem | Hmm, 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:14 | disruptek | no, because those scopes will get destroyed. |
20:18:42 | saem | OK, 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:56 | saem | Is that correct? |
20:19:07 | saem | I'm trying to test my intuition here |
20:19:41 | FromDiscord | <Clyybber> 1. Yes there is echo((var a = 1; a)); echo a |
20:19:44 | * | xet7 joined #nim |
20:20:12 | disruptek | case 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:29 | disruptek | because we compose the jump before we rewrite the RHS... |
20:21:12 | disruptek | anyway, 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:43 | saem | π€ 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:58 | saem | s/priority/property |
20:23:39 | leorize | saem: yes it is |
20:23:42 | * | xet7 quit (Client Quit) |
20:23:58 | disruptek | i still want explicit scopes in typed ast, but i think i'm in the minority. |
20:24:06 | leorize | saem: imagine `getCurrentDir().cstring` |
20:24:23 | leorize | if the temporary introduced by `getCurrentDir()` got destroyed, then the cstring will be invalid too |
20:24:41 | saem | disruptek: as in what to program against as a macro author? |
20:25:05 | disruptek | yes, it would make so many of these problems trivial to reason about. |
20:25:12 | * | xet7 joined #nim |
20:25:32 | disruptek | try(except), if(elif, elif, elif, else), ... |
20:25:32 | FromDiscord | <Clyybber> saem Yes, if initSomething((var variable; variable)):β΅ use variable |
20:25:57 | saem | Thanks those examples help a bunch. |
20:26:29 | disruptek | pro style tip: raise newException ValueError: "a very long string that you want to put on a separate line" |
20:26:47 | disruptek | i use : everywhere now. |
20:27:37 | saem | I 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:52 | FromDiscord | <Clyybber> disruptek I dont see which bug is blocking you |
20:29:00 | disruptek | do you have access to a web-browser? |
20:29:01 | FromDiscord | <Clyybber> explicit scopes are bad because it allows creating things that would normally have scopes without a scope |
20:29:13 | ForumUpdaterBot | New 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:16 | FromDiscord | <Clyybber> and they dont really solve an issue |
20:29:39 | FromDiscord | <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:03 | disruptek | !repo cps |
20:30:04 | disbot | https://github.com/disruptek/cps -- 9cps: 11Continuation-Passing Style for Nim π 15 60β 3π΄ |
20:30:07 | disruptek | look for purple text |
20:30:09 | saem | From a read side of the AST, at least for making decisions, it'd still be handy. |
20:30:37 | leorize | how about something like `.scopeId` to get which scope a symbol is in? |
20:30:41 | disruptek | i 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:59 | saem | Like, just meta data to make decisions? |
20:31:02 | disruptek | yes. |
20:31:10 | saem | Not I wish to write them |
20:31:13 | disruptek | right. |
20:31:27 | saem | Cool, I then didn't misunderstand at all |
20:32:14 | saem | I think Clyybber may have taken it to mean emitting scopes by a macro author? |
20:32:18 | disruptek | i wanted them in the new ast and at first, araq supported the idea. but he took them out at some point. |
20:33:55 | saem | There might be some trickiness as in "stability" of the scopes. With various AST transforms happening and timing not being clear? |
20:34:10 | disruptek | all the more reason. |
20:34:27 | * | xet7 quit (Quit: Leaving) |
20:36:43 | saem | Sorry, not meant as a counter argument, merely sympathizing with the difficulty. |
20:36:59 | * | Guest62103 quit (Quit: Guest62103) |
20:37:04 | disruptek | yes; this is why it should be done, though. |
20:37:16 | * | Guest62103 joined #nim |
20:37:58 | saem | I 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:01 | disruptek | it'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:33 | saem | Guessing that's mostly semfold etc... |
20:39:12 | disruptek | it would be nice to be able to query for scopes. |
20:44:46 | FromDiscord | <carpal> thanks |
20:46:08 | * | adnan338 quit (Ping timeout: 260 seconds) |
20:54:43 | * | Vladar quit (Quit: Leaving) |
20:59:00 | FromDiscord | <Clyybber> I dont think its usefule because checking kind in NodesThatIntroduceScopes isnt that hard |
21:03:49 | FromDiscord | <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:03 | leorize | hmm, what should happen if a `Process` object go out of scope? |
21:10:27 | leorize | should I kill the process, or should I raise an `assert`? |
21:14:03 | FromDiscord | <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:36 | az83 | I'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:20 | leorize | your proc returns an `int` |
21:23:47 | FromDiscord | <Meowz> well it should ;D |
21:24:03 | az83 | It worked when I removed the int. Why is that? |
21:24:08 | * | xet7 quit (Remote host closed the connection) |
21:24:18 | leorize | in Nim all return values must be used |
21:24:49 | leorize | you may explicitly discard them via the `discard` keyword |
21:24:58 | az83 | But it suddenly worked when I removed the int? |
21:25:16 | leorize | the `: int` at the end of the procedure declaration is the return type |
21:25:35 | az83 | How would you fix it if I kept the int? |
21:26:01 | FromDiscord | <haxscramper> `discard super(10)` |
21:26:03 | leorize | it depends on your intent |
21:26:20 | * | PMunch quit (Quit: leaving) |
21:26:23 | az83 | And what different kinds of intents are there? |
21:26:46 | leorize | if you want to compute a value then return it to the caller or if you just wanna perform an action |
21:27:07 | FromDiscord | <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:20 | FromDiscord | <haxscramper> For testing purposes |
21:27:29 | az83 | All I wanted to do was just compute x * x for the given argument of what x is. |
21:27:54 | FromDiscord | <haxscramper> `let x2x = super(10)` |
21:28:10 | FromDiscord | <haxscramper> You need to use value, discard it or don't return anything |
21:28:55 | FromDiscord | <haxscramper> `s/need to/can/` |
21:30:19 | az83 | If I do let x2x = super(10) it doesn't return any value. |
21:30:30 | leorize | az83: https://play.nim-lang.org/#ix=2Nqk <- I guess this is what you want? |
21:31:40 | disruptek | clyybber: you're assuming you already have all the scopeful nodes, which is not the point at all. |
21:31:46 | az83 | Is 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:17 | FromDiscord | <haxscramper> If expression has a value it must be used |
21:32:34 | FromDiscord | <Clyybber> disruptek what is the point? |
21:32:46 | FromDiscord | <haxscramper> Using `echo X` is a go-to way for outputting things to terminal |
21:34:17 | FromDiscord | <haxscramper> If you don't need result `discard` it (`super(10)` in c/python is `discard super(10)`) |
21:36:20 | az83 | What would be a more professional way to do this example? Removing the int or using echo super(10)? |
21:36:39 | disruptek | clyybber: 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:02 | FromDiscord | <haxscramper> az83: you need result from proc or not? |
21:38:21 | FromDiscord | <haxscramper> It all depends on what do you intend to do with it |
21:38:41 | az83 | What would be an example of not needing the result? |
21:38:45 | az83 | in a function |
21:38:49 | * | vicfred joined #nim |
21:39:15 | leorize | `proc printHello(name: string) = echo name` <- something like that? |
21:39:20 | FromDiscord | <haxscramper> mutating arguments and returning some number |
21:40:07 | FromDiscord | <haxscramper> Like error code, or number of bytes or whatever |
21:40:56 | FromDiscord | <haxscramper> If you mean "not needing result" as "not using result of a functions that returns something" |
21:41:22 | az83 | So this not needing result is the same thing as a void function in C? |
21:41:59 | FromDiscord | <haxscramper> yes, `proc super(): void` works the same way in C and nim |
21:42:19 | leorize | please don't use the `: void` in nim though |
21:42:41 | az83 | What happens if I remove the void and make it proc super() = without specifying the return type for the function? |
21:42:51 | leorize | it's the same thing |
21:43:01 | leorize | `: return_type` is optional |
21:43:32 | leorize | the preferred form is to not specify `: void` |
21:43:52 | az83 | Is it better to specify the return type for a function or not? |
21:44:17 | leorize | if you need it you gotta specify it |
21:44:21 | leorize | if you don't then don't |
21:44:52 | FromDiscord | <haxscramper> !eval echo typeof(proc() = discard) is typeof(proc(): void = discard) |
21:44:55 | NimBot | true |
21:47:50 | * | abm quit (Quit: Leaving) |
21:49:42 | * | abm joined #nim |
21:50:16 | az83 | I guess I'll make it practice to use an echo for procedures. |
21:56:28 | az83 | Does a string count as a return value? |
21:57:02 | leorize | yes |
21:57:20 | leorize | you can return anything in Nim |
21:57:50 | az83 | I'm still a bit confused why I must use echo for a function. |
21:58:06 | leorize | you don't have to, it's just an example |
21:58:07 | FromDiscord | <haxscramper> what is your main language? |
21:58:17 | az83 | I got a bit of C and python experience. |
21:58:25 | leorize | what you must do is to use the returned value |
21:58:30 | disruptek | ~manual |
21:58:31 | disbot | manual: 11the Nim Manual is https://nim-lang.org/docs/manual.html -- disruptek |
21:58:31 | disbot | manual: 11just good to Ctrl+F in cases like this |
21:58:53 | FromDiscord | <haxscramper> https://nim-lang.org/docs/manual.html#statements-and-expressions-discard-statement |
22:00:49 | az83 | Then 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:52 | FromDiscord | <Meowz> There's no simple `code` in a `response` of https://nim-lang.org/docs/httpclient.html#7 ? |
22:01:16 | disruptek | of course there is. |
22:01:21 | * | hnOsmium0001 left #nim (#nim) |
22:01:35 | leorize | az83: the latter returns an integer to the caller |
22:01:48 | az83 | What does the former do? |
22:01:52 | FromDiscord | <haxscramper> az83: `void super(int a)` vs `int super(int a)` |
22:02:11 | * | xet7 joined #nim |
22:02:12 | FromDiscord | <Meowz> Got it |
22:02:23 | az83 | I think so. If I don't specify the return type it becomes void. |
22:02:35 | leorize | yes, that's how it work |
22:02:35 | FromDiscord | <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:28 | ForumUpdaterBot | New thread by Pumpus: FromJSON, dataframe, see https://forum.nim-lang.org/t/7438 |
22:41:29 | ForumUpdaterBot | New thread by Pumpus: Nim forum statistics, see https://forum.nim-lang.org/t/7439 |
22:41:45 | FromDiscord | <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:35 | FromDiscord | <exelotl> mann I really could do with some timestamp utilities in nimscript :( |
23:02:32 | * | xet7 quit (Quit: Leaving) |
23:06:56 | FromDiscord | <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:26 | FromDiscord | <exelotl> makefile would be able to do it pretty easily but it's surprising involved to do it with nimscript |
23:16:54 | FromDiscord | <exelotl> surprisingly |
23:17:06 | * | oddp joined #nim |
23:17:19 | saem | Clyybber 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:04 | FromDiscord | <ElegantBeef> Yea exelotl many of the file operations are not exposed the nimscript |
23:18:10 | FromDiscord | <ElegantBeef> (edit) "the" => "to" |
23:21:16 | * | mal`` joined #nim |
23:23:57 | FromDiscord | <exelotl> cursed idea |
23:24:12 | FromDiscord | <exelotl> what if I pretended the asset tool was a linker |
23:24:19 | FromDiscord | <exelotl> or C compiler |
23:24:29 | FromDiscord | <ElegantBeef> Just use a nim compiler with `libffi` enabled |
23:24:56 | FromDiscord | <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:46 | FromDiscord | <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:58 | FromDiscord | <ElegantBeef> Well then make a build system using nim |
23:28:14 | FromDiscord | <ElegantBeef> Or nake i guess π |
23:28:46 | * | mbomba joined #nim |
23:28:53 | FromDiscord | <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:03 | FromDiscord | <Clyybber> disruptek amazing argument |
23:54:37 | disruptek | it's one-sided as long as compiler devs refuse to, y'know, participate in trying to use their own work product. |
23:54:49 | disruptek | no point in talking about it. |
23:54:54 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
23:55:22 | FromDiscord | <Clyybber> I have no idea what you are talking about |
23:55:40 | disruptek | see? |
23:56:13 | FromDiscord | <Clyybber> and you refuse to tell me |
23:56:40 | * | Lord_Nightmare joined #nim |
23:57:11 | FromDiscord | <Clyybber> its always the same |
23:57:27 | FromDiscord | <Clyybber> we talk about a concrete thing/bug/feature |
23:57:59 | FromDiscord | <Clyybber> and you derail into blaming and ranting generally |
23:58:39 | disruptek | nah. i just realized that i don't /want/ this to be implemented in the compiler. |
23:58:50 | FromDiscord | <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:12 | FromDiscord | <Clyybber> disruptek then just say it :p |
23:59:17 | disruptek | i did. |
23:59:38 | FromDiscord | <Clyybber> I'm not enough of a native speaker to pick up on these extremely subtle clues |
23:59:58 | disruptek | i said `never mind`; it means, don't worry about it; forget it. |