00:05:56 | * | wontruefree[m] quit (*.net *.split) |
00:06:32 | * | wontruefree[m] joined #nim |
00:16:42 | * | xet7 joined #nim |
00:25:59 | leorize | disruptek: also, can I have testes test for defects? |
00:27:12 | leorize | I'm writing some behavioral verification tests and I would like to test if Defect is raised |
00:38:56 | * | wasted_youth quit (Read error: Connection reset by peer) |
00:39:27 | * | wasted_youth joined #nim |
00:50:11 | Zoom[m] | How about distatesful for a name? Fits perfectly |
00:50:45 | Zoom[m] | Do we have any currently maintained Postresql driver? |
00:51:38 | Zoom[m] | *distasteful |
00:53:31 | Zoom[m] | Wait, leorize do you redoing stdlib io for async or just redoing it? I'm out of the loop |
00:54:00 | Zoom[m] | *are you (sorry) |
00:54:37 | leorize | I'm rewriting all of it |
00:56:12 | Zoom[m] | Cool. I'm currently trying to wet my feet with io and started with getTempDir, want to support transient (unlinked) tempfiles |
00:56:55 | leorize | beware of windows |
00:57:28 | Zoom[m] | It has remove on exit option for files, but I'm not sure if it supports invisible files yet |
00:57:51 | leorize | yes, on windows 10 |
00:57:59 | leorize | but it's a microsoft product, so I won't count on it |
00:58:38 | leorize | you have to open the file with FILE_SHARE_DELETE then you may delete it |
00:59:21 | Zoom[m] | Sorry, need to go, will get back to you later. |
00:59:48 | leorize | o/ |
01:18:50 | * | wasted_youth quit (Quit: Leaving) |
01:20:36 | FromDiscord | <that_dude> what is \c? I'm trying some things out and it keeps showing up. When I look it up I only get things about escape characters in the C and it wasn't there. https://media.discordapp.net/attachments/371759389889003532/799810298445037578/unknown.png |
01:20:57 | FromDiscord | <that_dude> https://media.discordapp.net/attachments/371759389889003532/799810388341555210/unknown.png |
01:21:23 | FromDiscord | <that_dude> Thanks in advance |
01:22:10 | * | adnan338 quit (Ping timeout: 256 seconds) |
01:23:20 | leorize | `\c` is CR in CR-LF |
01:23:38 | Prestige | thought that was /r |
01:23:49 | leorize | it's `\c` in nim |
01:23:52 | Prestige | ah |
01:24:00 | leorize | we support both actually :P |
01:24:08 | leorize | !eval echo '\c' == '\r' |
01:24:12 | NimBot | true |
01:40:06 | * | adnan338 joined #nim |
01:40:11 | * | adnan338 quit (Client Quit) |
01:40:25 | * | adnan338 joined #nim |
02:01:14 | FromDiscord | <that_dude> ah I see, thanks |
02:30:09 | leorize | disruptek: you renamed testes? it broke my ci :P |
02:32:33 | FromDiscord | <ElegantBeef> Leorize now has to find where disruptek relocated testes |
02:36:51 | * | ^Q-Master^ joined #nim |
02:37:17 | * | Q-Master quit (Read error: Connection reset by peer) |
02:42:13 | * | adnan338 quit (Ping timeout: 264 seconds) |
02:47:05 | * | shirty quit (Quit: Going offline, see ya! (www.adiirc.com)) |
03:00:25 | disruptek | leorize: i figured i could fix it before you noticed. |
03:00:45 | * | etothpiiminus1 joined #nim |
03:00:47 | FromDiscord | <iWonderAboutTuatara> !repo testes |
03:00:49 | disbot | https://github.com/disruptek/balls -- 9balls: 11the unittest framework with balls 🔴🟡🟢 15 25⭐ 1🍴 7& 29 more... |
03:01:00 | FromDiscord | <iWonderAboutTuatara> Nice |
03:01:35 | disruptek | believe me, it will break something like 30 CIs of mine. |
03:03:13 | disruptek | what did you do to clamp the version? you should always clamp to majors unless you are a nimbleton. |
03:03:34 | leorize | I forgot that nimble is dumb dumb and didn't clamp it |
03:03:42 | leorize | fix that now though |
03:03:46 | disruptek | okay. |
03:04:04 | disruptek | i took the opportunity to make suite: the entry macro, but i guess you know that now. |
03:06:25 | * | etothpiiminus1 quit (Ping timeout: 240 seconds) |
03:07:12 | leorize | disruptek: look at this stupid hack I devised to test Defect: https://github.com/alaviss/nim-sys/blob/master/tests/helpers/utils.nim#L14 |
03:09:00 | leorize | tips for anyone using destructors: use arc or it won't work: https://github.com/alaviss/nim-sys/runs/1712416416?check_suite_focus=true#step:7:469 |
03:09:15 | leorize | now I have to go figure out what caused this |
03:09:58 | disruptek | that word is `caught`, btw. |
03:10:13 | leorize | :P |
03:10:24 | disruptek | that's cool though; why don't you put it in my balls? |
03:10:25 | * | lritter quit (Ping timeout: 264 seconds) |
03:10:38 | leorize | laziness, really |
03:10:44 | disruptek | fair enough. |
03:10:57 | leorize | was testing locally so just hacked something together fast |
03:11:04 | disruptek | okay, so there's a testes repo now. i will make sure it works and then archive it. |
03:11:08 | * | lritter joined #nim |
03:12:21 | leorize | and now refc doesn't want my destructors |
03:12:35 | leorize | and I thought destructors are supposed to be the stable by now... |
03:12:49 | disruptek | well, that's silly. |
03:13:13 | disruptek | but if you want concepts to work, i told araq i would test them. |
03:13:39 | leorize | I'm pretty much doing the testing work for destructors here |
03:14:46 | disruptek | all the more reason. |
03:17:35 | disruptek | leorize: for synch operation, you don't need to use cps. you can, though; just don't offer a cpsMagic primitive for the operation, or write one but don't make it enqueue in the dispatcher, or make it enqueue but don't let the dispatcher reschedule it, or let the dispatcher schedule it but don't let it be prempted, or... |
03:18:17 | * | muffindrake quit (Ping timeout: 260 seconds) |
03:19:48 | * | muffindrake joined #nim |
03:28:07 | * | wasted_youth joined #nim |
03:29:29 | * | wasted_youth quit (Client Quit) |
03:38:40 | FromDiscord | <Avatarfighter> disruptek: congrats on balls |
03:38:48 | FromDiscord | <Avatarfighter> its a pretty huge library |
03:39:43 | * | adnan338 joined #nim |
03:40:21 | * | rockcavera quit (Remote host closed the connection) |
03:40:25 | FromDiscord | <Avatarfighter> disruptek: cps good btw I got my scraper working on it |
03:40:30 | FromDiscord | <Avatarfighter> sort of |
03:40:50 | FromDiscord | <Avatarfighter> ive got the POC working without http library atm |
03:44:56 | * | adnan338 quit (Read error: Connection reset by peer) |
03:47:34 | disruptek | avatarfighter: you like my balls? |
03:47:39 | disruptek | pretty suite, right? |
03:47:55 | disruptek | if you have something working with cps, you're the first. |
03:52:57 | * | lritter quit (Quit: Leaving) |
03:53:01 | FromDiscord | <Avatarfighter> well |
03:53:14 | FromDiscord | <Avatarfighter> working is a stretch, nimsuggest either stopped giving error or plain stopped working |
03:53:23 | FromDiscord | <Avatarfighter> either or I call it a success |
03:53:44 | disruptek | eh welcome to the elite. |
03:53:53 | disruptek | the few, |
03:53:53 | disruptek | the proud, |
03:53:53 | disruptek | the completely lacking in syntax highlighting. |
03:53:54 | FromDiscord | <Avatarfighter> disruptek: I love your balls, its so life changing |
03:54:09 | FromDiscord | <Avatarfighter> the lack of highlighting is really sad |
03:54:12 | FromDiscord | <Avatarfighter> i feel naked |
03:54:38 | FromGitter | <gogolxdong> GUI crashes frequently with orc, while stand still with arc |
03:56:21 | disruptek | if you have something that compiles and runs with cps, well, that's something. |
03:59:15 | disruptek | can you show some code? |
03:59:23 | disruptek | transforms, i mean. |
03:59:39 | disruptek | i don't think we have any typed stuff in the wild yet. |
04:07:50 | FromDiscord | <Avatarfighter> disruptek: my code? |
04:07:54 | FromDiscord | <Avatarfighter> im not even sure it works |
04:08:01 | FromDiscord | <Avatarfighter> i haven't actually hit compile lol |
04:08:12 | FromDiscord | <Avatarfighter> the errors just stopped so i assume i did something correct |
04:08:13 | disruptek | pffbt |
04:08:21 | disruptek | probably nimsuggest crashed. |
04:08:36 | FromDiscord | <Avatarfighter> im not even joking when I say I assume I have something working based on the lack of nimsuggest complaints lmaooo |
04:10:30 | disruptek | well, the race is on between you and leorize to make a thing work in real typed cps. |
04:11:17 | disruptek | nigel doesn't work due to concepts, as per usual, so i am out of the running. i can't remember if zevv's server works but i doubt it does. |
04:11:36 | FromDiscord | <Avatarfighter> lmao |
04:11:45 | FromDiscord | <Avatarfighter> i have suspicions leorize will win |
04:12:01 | disruptek | i can see his code, so that helps. |
04:12:04 | FromDiscord | <Avatarfighter> though I have learned a lot about cps and how to use your library in theory I haven't had success in practice |
04:12:05 | FromDiscord | <Avatarfighter> yeah |
04:12:07 | FromDiscord | <Avatarfighter> true |
04:12:10 | FromDiscord | <Avatarfighter> no need to rub it in |
04:12:43 | disruptek | /home/adavidoff/git/balls/balls.nim(328, 19) Error: node has no type |
04:12:51 | disruptek | this is my current problem. buggy balls. |
04:13:10 | disruptek | typed macros ftw. |
04:13:16 | FromDiscord | <Avatarfighter> why are your balls so buggy |
04:13:20 | FromDiscord | <Avatarfighter> get some bug spray |
04:17:52 | disruptek | it's because some symbols don't have types. 😢 |
04:18:32 | * | spiderstew_ joined #nim |
04:20:10 | * | spiderstew quit (Ping timeout: 246 seconds) |
04:37:28 | FromDiscord | <Avatarfighter> crying |
04:47:44 | * | abm quit (Read error: Connection reset by peer) |
05:04:48 | leorize | filed #16732, then remove {.inline.} thinking that would fix it |
05:04:54 | disbot | https://github.com/nim-lang/Nim/issues/16732 -- 3{.inline.} destructors don't compile under --gc:refc ; snippet at 12https://play.nim-lang.org/#ix=2Mak |
05:05:06 | leorize | it compiles, but I can't get the destructor to trigger |
05:05:11 | disruptek | Error: /home/runner/work/gittyup/gittyup/nim/lib/pure/os.nim(1363, 12) Error: cannot 'importc' variable at compile time; getcwd |
05:05:31 | disruptek | this is what i'm on right now. refc, 1.4 (only). |
05:05:35 | leorize | did a `while true: GC_fullCollect()` and it still don't trigger |
05:05:58 | disruptek | does it work in a block? |
05:06:22 | leorize | it doesn't, the test originally was in nim-sys |
05:06:29 | disruptek | hmm. |
05:06:40 | leorize | added a block and nothing happens |
05:06:49 | disruptek | it's only the .inline. that breaks it? |
05:06:54 | leorize | but I doubt this simple as hell code is not tested |
05:07:53 | leorize | disruptek: inline makes it not compile, not having it makes it, uh, do nothing? |
05:08:08 | disruptek | maybe it's a simple case of sigmatch error. |
05:08:08 | leorize | maybe I gotta check the C code |
05:08:22 | disruptek | sigmatch is hairy, as we know. |
05:08:52 | leorize | maybe, gotta check the C code |
05:09:01 | leorize | this is what I'm testing if you wanna look at it: https://play.nim-lang.org/#ix=2Mal |
05:09:11 | disruptek | ~bentley |
05:09:11 | disbot | bentley: 11https://imgur.com/gallery/yEXiWWG -- disruptek |
05:09:11 | disbot | bentley: 11a good boy |
05:10:34 | leorize | C code shows that it is assigned as a finalizer |
05:10:46 | leorize | but who knows how to get the finalizer to even trigger... |
05:14:40 | FromDiscord | <ElegantBeef> Any dog that has to put up with dist is a god in my books |
05:14:53 | FromDiscord | <ElegantBeef> (edit) "dist" => "dis" |
05:14:55 | disruptek | true, true. |
05:37:43 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
05:37:51 | * | njoseph joined #nim |
05:41:25 | leorize | I'm finding it hard to figure out a File API for use with CPS |
05:41:41 | disruptek | neat, what's the problem? |
05:42:22 | leorize | you need to `open()` file in non-blocking mode if you want async operations to be async |
05:42:43 | leorize | (or you use a thread pool to run operations, but that's the story for another time) |
05:43:51 | leorize | so now if an user take a File and run them with CPS, async or not depends on whether that file was opened in async mode |
05:44:13 | disruptek | you store that in the File? |
05:45:08 | leorize | ofc I can store it, but what I have to think of would be the user expectation |
05:46:11 | * | muffindrake quit (Quit: muffindrake) |
05:46:18 | disruptek | well, to me, that's data. |
05:46:33 | leorize | would they expect operations done via cps to be "magically" async? |
05:46:52 | leorize | and forgot that they need to replace their `open` with `openAsync` for example? |
05:47:06 | disruptek | well, that's the goal. |
05:47:17 | disruptek | we're trying to get rid of color. |
05:48:11 | leorize | the file still has to be opened in async mode |
05:48:57 | disruptek | yes, but it can be of an async type if so. |
05:49:04 | * | vicfred quit (Remote host closed the connection) |
05:49:22 | * | vicfred joined #nim |
05:50:36 | * | vicfred quit (Remote host closed the connection) |
05:51:07 | disruptek | you feel me? |
05:51:43 | leorize | you mean I keep AsyncFile? |
05:53:35 | disruptek | can't it just be a distinct File? |
05:55:11 | leorize | it already is |
05:56:31 | disruptek | so open can do different things based upon its input, right? |
05:58:34 | leorize | yes |
05:58:48 | disruptek | okay, what i am missing? |
06:04:28 | leorize | whether I should remove AsyncFile |
06:05:03 | disruptek | well, i've done this the other way, and i don't recommend it. |
06:05:19 | disruptek | i mean, statics+generics are two legs of hell's pentagram. |
06:05:38 | disruptek | or however many fucking sides it has these days. |
06:06:06 | leorize | so if I remove AsyncFile, then to have operations done async, the user would have to use openAsync() or open(ffAsync) |
06:06:30 | disruptek | maybe you should build it as openAsync and we can always change it once we have a pattern we can support. |
06:09:23 | leorize | sure, nim-sys is an experimental ground after all |
06:11:25 | disruptek | each .cps. proc is really two procs. so there's already an easy way to colorize the calls. but, we haven't done this yet, so you'd have to do it yourself if you wanted to do it up-front. |
06:12:54 | disruptek | < leorize> so if I remove AsyncFile |
06:12:59 | disruptek | no, i wouldn't remove it, either. |
06:13:26 | * | MyMind quit (Ping timeout: 256 seconds) |
06:14:22 | leorize | I gotta write a dispatcher first |
06:14:46 | leorize | a good thing with cps is that I don't need a general purpose dispatcher/selector like the one in the stdlib |
06:14:55 | disruptek | right. |
06:15:09 | disruptek | it will just have what you need and nothing else. easy to reason about. |
06:15:42 | disruptek | you'll probably do your exception handling in there, for practically all exceptions. |
06:15:58 | disruptek | and that's about it. 😁 |
06:16:53 | leorize | can I mix-match continuation types? |
06:17:04 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
06:17:06 | leorize | I still don't understand how they work with the macro yet :P |
06:17:40 | disruptek | they will all be the same type currently because mratsim doesn't want to merge his type eraser. |
06:17:51 | disruptek | but that's not really a limitation. |
06:18:43 | leorize | since its ref object I believe I can just add more fields via inheritance |
06:18:47 | disruptek | like, Cont from eventqueue is a good demo -- it doesn't hold anything but fn in the normal case. |
06:18:54 | disruptek | yes, you can. |
06:19:09 | leorize | I'm just thinking whether I should support cancellation |
06:19:19 | disruptek | lol there's no cancellation. |
06:19:26 | leorize | which would probably be implemented as a semaphore passed by the user |
06:19:36 | disruptek | you just don't run your continuation and, poof, it's cancelled. |
06:19:50 | leorize | then when they signal it I would just stop the next iteration |
06:20:14 | leorize | I need to do some clean up too |
06:20:20 | disruptek | if you want to remove it from a queue or something, `proc cancel()` can do that. |
06:20:37 | disruptek | it doesn't need any cps-specific code. |
06:20:59 | leorize | I can't just "abandon" the continuation, that is |
06:21:22 | disruptek | you just remove it from memory. |
06:21:47 | leorize | no I mean I have to run clean up code :P |
06:21:53 | disruptek | right. |
06:22:52 | disruptek | why do you need a semaphore? because you want tokens? |
06:22:53 | FromDiscord | <reilly> Hey, how do I do that `except as` thing? Either nimsaem.nimvscode is wrong or my intuition is. |
06:23:25 | disruptek | try: ... except Exception as e: echo e.msg |
06:23:50 | disruptek | what is saem doing, that chucklehead? |
06:24:27 | leorize | disruptek: I need a way to signal my continuation to just stop the waiting and clean up the mess |
06:24:47 | saem | disruptek: ruining things! |
06:24:53 | leorize | could be useful for when I decide to offload async disk i/o to a thread pool |
06:25:00 | FromDiscord | <reilly> I assumed I could just `except as e` and Nim would intuit that I want to catch any exception that I haven't already caught. Still, this makes enough sense. |
06:25:03 | saem | ugh, discord, no auto complete. |
06:25:18 | leorize | saem: depends on your irc client |
06:25:44 | saem | leorize: I was using srain, and I can do those render/grep expressions, but currently using irccloud |
06:25:56 | disruptek | leorize: whatever you pass to cancel should be enough, right? a file would be enough to find the continuation in the queue and remove it, tear it down, destroy it, whatever... right? |
06:26:48 | leorize | no, because people can do concurrent requests |
06:27:10 | disruptek | okay, i will wait for the code. |
06:28:14 | saem | @reilly it uses nimsuggest and nim check, so likely the compiler doesn't agree with you more than the extension, but who knows? Can you post some code? |
06:29:13 | saem | hmm, I never audited the snippets I wonder if some of those are stale and might be an issue. |
06:29:35 | leorize | !eval try: raise newException(CatchableError, "") except as e: echo e.msg |
06:29:38 | NimBot | Compile failed: /usercode/in.nim(1, 52) Error: undeclared identifier: 'as' |
06:29:45 | leorize | !eval try: raise newException(CatchableError, "") except CatchableError as e: echo e.msg |
06:29:45 | FromDiscord | <reilly> No, it's a solved problem. I assumed that Nim would intuit that by `except as e` I really meant `except Exception as e`, but that was throwing an error. I've been told nimsuggest isn't the most reliable thing on the planet, so it never hurts to consider that a point of failure. |
06:29:49 | NimBot | <no output> |
06:30:12 | saem | Cool, that means I don't have to do anything to fix that. |
06:30:26 | saem | I suppose I should look at that other nimsuggest bug I've been ignoring. |
06:30:29 | disruptek | i love those bugs. |
06:31:21 | saem | Hmm, I wonder if I can get the nimsuggest issue closing stick. |
06:32:09 | disruptek | i wonder how balls works for 1.0, 1.2, 1.5 but not 1.4. |
06:32:24 | saem | a mystery for the ages |
06:32:31 | disruptek | i hope not. |
06:32:37 | saem | inscrutable |
06:32:50 | disruptek | surely not. |
06:32:56 | saem | to know is to know madness. |
06:33:05 | disruptek | is inscrutable like inflammable? |
06:33:19 | disruptek | it shares its meaning with its antonym? |
06:33:47 | disruptek | i mean, there's no such thing as scrutable. it's inscrutable. |
06:34:17 | saem | Like, one can't simply scrute |
06:34:26 | disruptek | believe me, i've tried. |
06:34:57 | disruptek | i don't recommend it, though. |
06:35:07 | disruptek | honestly, i think it might even be illegal in canada. |
06:35:16 | saem | nah, we legalized it with weed |
06:36:19 | saem | hmm, to try fixing this nimsuggest issue with macros and macrocache or try some easier ones and then come back to this? |
06:36:48 | disruptek | macrocache may get disrupted by ic, so, yes, come back to it. |
06:37:32 | saem | Coooooool |
06:37:44 | saem | I'll give the other macro issue a whirl |
06:38:31 | saem | who knows it might make CPS every so slightly easier to work on. |
06:38:38 | saem | BTW is it done? |
06:38:40 | saem | Can I have it? |
06:38:45 | * | disruptek cheers. |
06:38:45 | saem | howboutnow |
06:38:51 | disruptek | opengl here? |
06:38:59 | saem | sigh |
06:39:07 | saem | I'm going to put opengl in nimsuggest, then you'll see |
06:48:42 | disruptek | it's about time we had a flight sim in nimsuggest. |
06:50:17 | saem | ok forget this language thing, pivot to a flightsim. |
06:50:26 | saem | we can sell virtual flights with bitcoins |
06:50:35 | saem | no one can fly during the pandemic, it'll be all escapist. |
06:50:53 | disruptek | i heard M$ is making a killing on their product. |
06:50:58 | disruptek | how hard could it be? |
06:50:58 | saem | srsly |
06:51:22 | saem | I mean, M$ is doing it so yeah |
06:51:53 | saem | bet they need 90% of their staff just to make sure DX drivers don't keep crashing the computer. |
06:52:09 | saem | now that's where opengl is needed. |
06:52:40 | disruptek | we can probably save a few million lines of code right there. |
06:52:58 | disruptek | i feel like we're already making money. |
06:53:11 | saem | basically bootstrapped at this point. |
06:54:58 | disruptek | /home/adavidoff/nims/lib/pure/os.nim(1363, 12) Error: cannot 'importc' variable a |
06:55:00 | disruptek | t compile time; getcwd |
06:55:39 | disruptek | i think i'm rendering `dirExists ...` from a macro at compile-time, but it's intended to run, y'know, at runtime. |
06:57:32 | disruptek | oh, no. it's because i'm converting its path to a relative path. but shouldn't that fail on 1.0, 1.2, 1.5? |
06:58:36 | * | muffindrake joined #nim |
07:01:12 | saem | ENOTENOUGHCONTEXT |
07:01:44 | disruptek | just another buglet to workaround and forget about. |
07:04:54 | FromDiscord | <ElegantBeef> Wait did i miss the talk about opengl here? |
07:05:17 | saem | actually this time it was there |
07:20:47 | FromDiscord | <reilly> Someone please explain to me how `sleepAsync()` is supposed to be used, because it's not doing anything right now. |
07:21:24 | disruptek | it returns a future. await it. |
07:21:36 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=2MaS |
07:22:09 | FromDiscord | <reilly> This is what I'm doing. |
07:22:21 | FromDiscord | <Rika> are you calling a properlly? |
07:22:27 | disruptek | it's a miracle. |
07:22:40 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=2MaT |
07:22:51 | FromDiscord | <Rika> or await a() if youre in an async proc also |
07:23:18 | FromDiscord | <reilly> sent a code paste, see https://play.nim-lang.org/#ix=2MaV |
07:23:21 | FromDiscord | <reilly> I set it to 5 seconds to make it very, very obvious that it's not doing anything. |
07:23:31 | FromDiscord | <Rika> well it will do things since its awaiting |
07:23:35 | FromDiscord | <Rika> it will do other things |
07:23:43 | FromDiscord | <Rika> but not continue in the messageCreate proc |
07:24:06 | FromDiscord | <Rika> when 5 seconds pass it will continue the messageCreate proc |
07:24:19 | FromDiscord | <reilly> Well, there's only the messageCreate proc, and it sure is continuing. |
07:25:07 | FromDiscord | <Rika> are you sure? did you put an echo in both the start and end of the proc? |
07:25:32 | disruptek | rika: reilly said it sure is. |
07:25:48 | FromDiscord | <Rika> lmao |
07:25:52 | disruptek | don't you trust reilly? |
07:26:44 | FromDiscord | <reilly> I mean, would you rather me send you the whole proc? |
07:28:03 | saem | No more debugging tonight |
07:28:15 | saem | Brain is spent |
07:28:16 | disruptek | reilly: sorry, bud, we're closed. |
07:28:26 | saem | Hahaha |
07:28:40 | saem | That was a nonseqiutor |
07:29:08 | disruptek | i never do that. |
07:30:05 | disruptek | Zevv: you have to take over for me with leorize; it's worth it to ensure that avatarfighter doesn't produce the first successful use of cps/typed. |
07:45:11 | saem | LoL |
07:45:32 | saem | Wtf |
07:46:19 | saem | What did avatarfighter do? |
07:46:35 | ForumUpdaterBot | New thread by Adnan: How to implement a RwLock lock , see https://forum.nim-lang.org/t/7392 |
08:31:58 | * | letto quit (Ping timeout: 272 seconds) |
08:33:14 | * | letto joined #nim |
08:37:36 | * | letto quit (Ping timeout: 240 seconds) |
08:49:30 | * | Vladar joined #nim |
08:52:18 | * | muffindrake quit (Quit: muffindrake) |
09:30:01 | Zevv | I tried a few days ago, but the stuff is just to broken |
09:32:04 | * | notandinus joined #nim |
10:08:40 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
10:11:31 | * | wasted_youth joined #nim |
10:11:55 | FromDiscord | <no name fits> I've been trying to find tutorials on how to write commands in the nimble file, but I couldn't find anything on the official site, and my search engine shows me some Hewlett stuff called nimble, so if anyone could me point me to, how to set up build commands and such, that'd be awesome 🙂 |
10:17:49 | FromDiscord | <no name fits> It's just that so far I've only been compiling a single file, so I was wondering how to set it up for bigger projects |
10:23:50 | FromDiscord | <haxscramper> Nimble readme has list of built-in tasks like `build/test`, and for custom tasks you just do `task task_name, "Description": <nim code>` |
10:24:04 | FromDiscord | <ElegantBeef> @no name fits it's apart of the `nimscript` module https://nim-lang.org/docs/nimscript.html#task.t%2Cuntyped%2Cstring%2Cuntyped |
10:25:04 | FromDiscord | <no name fits> Thanks so much guys. I'm sorry for the dumb questions, I'm still really new, but I'm enjoying Nim a lot so far! |
10:27:03 | Oddmonger | is it possible to add « dark mode » on index page of the website , please ? |
10:27:17 | FromDiscord | <no name fits> Are there any good projects you can recommend where I can see how they've set it up? |
10:34:42 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2Mby |
10:34:59 | FromDiscord | <haxscramper> Nothing particularly interesting. Maybe you could look into curated packages |
10:36:13 | FromDiscord | <haxscramper> Something like this idk https://github.com/haxscramper/hmisc/blob/master/hmisc.nimble#L19 |
10:44:54 | FromDiscord | <no name fits> thanks |
11:17:09 | * | Vladar quit (Quit: Leaving) |
11:26:22 | * | letto joined #nim |
11:31:47 | * | notandinus left #nim ("Killed buffer") |
11:33:16 | * | screens__ quit (Read error: Connection reset by peer) |
11:34:21 | * | screens_ joined #nim |
11:58:23 | Zevv | disruptek: if you're up to it, we can do a few of those sessions again where I use CPS, see it is broken, whine about it, you fix it, and repeat |
12:36:10 | * | Torro joined #nim |
13:06:34 | giaco | as there's no bytestream object in std, and there's no byteseq to string conversion to use stringstream instead, what's the fastest/right-way to feed a stream of bytes to a proc accepting a "stream" object? I'm looping over byte seq to build a "char" seq currently |
13:08:19 | * | hmmm joined #nim |
13:18:21 | giaco | oh, wait, found large old topic on the subject: https://github.com/nim-lang/Nim/issues/14810 |
13:18:29 | disbot | ➥ Add byte-array-to-string conversion to system module ; snippet at 12https://play.nim-lang.org/#ix=2Mcb |
13:54:00 | * | rockcavera joined #nim |
14:26:37 | * | al1ranger joined #nim |
14:28:53 | Oddmonger | repr is so nice for debug |
14:31:14 | * | tane joined #nim |
14:45:04 | * | abm joined #nim |
14:46:43 | * | leorize quit (Ping timeout: 240 seconds) |
14:47:36 | * | leorize joined #nim |
14:53:19 | ForumUpdaterBot | New thread by Alexeypetrushin: Call `result.new` automatically in `proc`?, see https://forum.nim-lang.org/t/7393 |
15:08:07 | FromDiscord | <juliuskiesian> @mratsim QR decomposition test fails in arraymancer test suite. |
15:08:34 | FromDiscord | <juliuskiesian> some of the tensor elements are off by sign. |
15:10:52 | FromDiscord | <juliuskiesian> sent a code paste, see https://play.nim-lang.org/#ix=2Mdr |
15:12:05 | * | a_b_m joined #nim |
15:12:30 | * | rockcavera is now known as Guest65700 |
15:12:30 | * | Guest65700 quit (Killed (orwell.freenode.net (Nickname regained by services))) |
15:12:31 | * | rockcavera joined #nim |
15:14:11 | * | clyybber joined #nim |
15:15:24 | * | abm quit (Ping timeout: 256 seconds) |
15:16:19 | * | al1ranger quit (Quit: Leaving) |
15:24:46 | * | hmmm quit (Quit: WeeChat 3.0) |
15:26:28 | * | Vladar joined #nim |
15:33:25 | disruptek | Zevv: i wonder if it's the shim code. |
15:34:48 | Zevv | It's the block in cps.nim:576 adding the spurious return |
15:34:51 | disruptek | hmm, it's not. |
15:34:51 | Zevv | but I don't see why |
15:35:05 | Zevv | it says n.kind is in returner |
15:35:23 | disruptek | that's how we pop the stack at the end of any control flow. |
15:35:49 | disruptek | is stmtlist really a returner? |
15:36:18 | disruptek | i feel like it's not. |
15:36:30 | Zevv | ikr |
15:36:34 | disruptek | yeah, taking that out passes your tests. |
15:36:40 | Zevv | I know it does |
15:36:58 | disruptek | just remove it and let's see if anyone notices. |
15:37:32 | disruptek | btw, this is the sort of change that we've had to adapt to since switching to typed. |
15:37:38 | disruptek | the ast is just that little bit different. |
15:37:46 | Zevv | my standalone tcp server also was not allowd pushing to master |
15:38:05 | disruptek | i know, whatfer making the tests stay green when possible. |
15:38:35 | disruptek | you may have noticed me making prs... |
15:39:17 | * | hmmm joined #nim |
15:39:27 | disruptek | so i fixed a while test yesterday and the test used to crash the compiler and now it simply passes. |
15:39:36 | disruptek | so that's... interesting. |
15:40:07 | hmmm | tek arewecpsyet? |
15:40:16 | disruptek | naw dawg. |
15:40:21 | hmmm | :| |
15:40:42 | disruptek | but two bigs fixed in two days is 🔥 |
15:40:47 | disruptek | bugs, too. |
15:40:59 | Zevv | disruptek: anyway, tcp server now kind-of-works |
15:41:11 | disruptek | nice, let's put it into tests. |
15:41:38 | Zevv | no that's not good |
15:41:41 | disruptek | no? |
15:41:49 | Zevv | well, you can test if it compiles, but not if it runs |
15:41:55 | Zevv | because network stuff |
15:41:55 | disruptek | yeah, that's fine. |
15:42:19 | disruptek | i lust for a large suite. |
15:42:20 | Zevv | but why can't I push that? it doesn't fail the tests |
15:42:43 | disruptek | when it passes the checks you can merge it. |
15:42:59 | Zevv | btw I still need cases like `var a: SocketHandle = bind()`, because SocketHandle is a `distinct int` and you can't instantiate that |
15:43:03 | disruptek | it's green right now. |
15:43:09 | Zevv | yeah merge, but not push to msaster |
15:43:19 | disruptek | yes. |
15:43:29 | Zevv | ah right |
15:43:47 | Zevv | done |
15:44:01 | disruptek | so what's the distinct int issue about? |
15:44:53 | Zevv | I'll make a test |
15:45:21 | disruptek | it sounds like something as simple as s/getType/getTypeImpl/ but who knows. |
15:46:20 | disruptek | omg i think that may have fixed /shadow mission impossible/ too. |
15:46:20 | * | hmmm quit (Quit: WeeChat 3.0) |
15:46:27 | disruptek | you're a genius, zevv. |
15:47:01 | Zevv | always have been, always will be |
15:48:08 | Zevv | see https://github.com/disruptek/cps/pull/63 for the type problem |
15:48:08 | disbot | ➥ Added test for type problem |
15:50:34 | disruptek | well, push the fix for 60 please. |
15:52:43 | Zevv | drop nnkStmtList} from returner? |
15:54:15 | FromDiscord | <Clyybber> Are you checking the node kinds to determine wether it will be an expression or not? |
15:55:20 | disruptek | Zevv: yeah. |
15:56:23 | disruptek | clyybber: what's /it/ in that question? |
15:56:35 | FromDiscord | <Clyybber> the node |
15:56:49 | FromDiscord | <Clyybber> basically whats a returner? |
15:56:57 | clyybber | why am I using discord.. |
15:57:10 | disruptek | a returner leaves a scope and requires that we pop the control-flow stack. |
15:57:47 | clyybber | so basically expr vs stmt? |
15:59:11 | clyybber | disruptek ^ |
15:59:13 | disruptek | returner = {nnkBlockStmt, nnkElifBranch, nnkElse} |
15:59:23 | Zevv | yeah it's testing |
15:59:30 | Zevv | but your tests are soo slooow |
15:59:42 | disruptek | these are blocks that, when we exit, we need to jump. |
15:59:52 | clyybber | Ah, I see |
16:00:12 | disruptek | i should comment this better. |
16:00:16 | clyybber | Why is nnkIf not in there? |
16:00:28 | disruptek | because if wraps clauses in the ast. |
16:00:35 | disruptek | it's like a meta-node. |
16:00:42 | disruptek | it never gets processed by safen. |
16:01:04 | clyybber | so nnkCase also doesn't belong in there? |
16:01:17 | disruptek | a case clause probably does. |
16:01:26 | disruptek | we don't have any tests for it. 😁 |
16:01:52 | clyybber | Why would you not jump from an nnkIf though? |
16:02:17 | disruptek | because we jump from the leaves. |
16:02:27 | clyybber | But the first if branch is one leave |
16:02:34 | clyybber | *leaf |
16:03:04 | disruptek | no, it's (if (elif, elif, elif)) |
16:04:10 | clyybber | oh, I get it now I think |
16:04:19 | clyybber | why is nnkBlock in there then though? |
16:04:27 | disruptek | because of break. |
16:04:46 | clyybber | And while loop breaks are handled elsewhere? |
16:04:52 | disruptek | yes. |
16:05:40 | disruptek | there are subtleties to while loop breaks that make it simpler to just impl them alongside the loop itself. |
16:06:33 | disruptek | we probably should add a test for case. |
16:10:06 | giaco | do you tend to write func instead of proc? How to do defensive programming in nim? |
16:10:44 | disruptek | nah, i'm the guy your mother said to defend against. |
16:11:16 | FromDiscord | <haxscramper> I try to use `func` when possible |
16:11:28 | FromDiscord | <haxscramper> And for defensive programming - just any other language? |
16:11:39 | FromDiscord | <haxscramper> There is no built-in design-by-contract or special asserts |
16:12:05 | disruptek | !repo contracts |
16:12:06 | disbot | https://github.com/Udiknedormin/NimContracts -- 9NimContracts: 11Nim Language design by contract (DbC) library. 15 40⭐ 3🍴 7& 5 more... |
16:12:13 | FromDiscord | <haxscramper> We have experimental `not nil` and `drnim` |
16:12:13 | Zevv | really disruptek. 15 mins and still going |
16:12:16 | Zevv | why the hell |
16:12:45 | Zevv | are you testing sleep(60) 15 times?! |
16:12:47 | disruptek | don't ask me; i don't even work here. |
16:13:44 | giaco | thanks for the feedback |
16:14:38 | disruptek | we do --forceBuild on ci, which makes it slower. |
16:15:12 | disruptek | unfortunately, it is required to ensure that the compiler does not reuse assets. because the compiler is not always correct in that regard. |
16:16:59 | disruptek | so i guess it takes a long time because we have more test files now. we could move echo somewhere else. |
16:17:10 | disruptek | and tick. |
16:17:30 | disruptek | and you could merge ttypes and tzevv at least. |
16:18:00 | Zevv | sure |
16:21:07 | * | Vladar quit (Remote host closed the connection) |
16:25:13 | giaco | is there any difference from nim-chronos and asyncdispatch? |
16:25:32 | * | hmmm joined #nim |
16:25:37 | disruptek | that's a silly question, but the answer is `yes`. |
16:26:11 | clyybber | Zevv: 15 minutes to compile? |
16:26:29 | disruptek | my balls are exhausted. |
16:26:30 | giaco | disruptek: not if you ignore nim history |
16:26:33 | disruptek | exhaustive, rather. |
16:26:46 | disruptek | giao: what does the readme for chronos say about it? |
16:26:46 | Zevv | clyybber: testing, 30 minutes |
16:27:25 | clyybber | ah ok |
16:27:37 | clyybber | was confused because disruptek mentioned --forceBUild |
16:27:43 | giaco | disruptek: that the diff list is 22 months old: https://github.com/status-im/nim-chronos/wiki/AsyncDispatch-comparison |
16:28:01 | disruptek | you think they got more similar over time? |
16:28:06 | giaco | yeah |
16:28:11 | disruptek | interesting. |
16:33:08 | leorize | disruptek: cps 0.0.14 uses testes < 1.1.0 and your testes is currently 1.1.12 |
16:33:21 | disruptek | i know. |
16:33:55 | * | Vladar joined #nim |
16:34:58 | leorize | am I supposed to grab cps head now? |
16:35:44 | disruptek | yes. |
16:35:53 | disruptek | we will cut a new patch. |
16:36:28 | disruptek | i mean, it won't change the use of tests<1.1.0. |
16:36:35 | disruptek | but we can ensure you get the fixes. |
16:37:06 | disruptek | balls provokes a cps bug. |
16:37:59 | leorize | so I guess I will have to downgrade my balls back to testes when I wanna test my impl? |
16:38:22 | disruptek | cps depends on testes, not balls. |
16:38:39 | disruptek | so, yes. |
16:38:52 | leorize | disruptek: your testes doesn't have tag |
16:39:05 | disruptek | oh, good point. |
16:39:15 | disruptek | cps actually uses the noic branch. |
16:39:52 | leorize | yes it does, but criterion also wants a testes |
16:40:20 | disruptek | i will fix that. |
16:40:26 | disruptek | okay, 1.1.12 and 1.0.1 tags exist now. |
16:41:35 | leorize | > Cannot satisfy the dependency on testes 1.1.12 and testes 1.0.1 |
16:41:46 | leorize | because nimble is what it is, I have zero idea where 1.0.1 was pulled |
16:42:23 | * | letto quit (Read error: Connection reset by peer) |
16:42:30 | * | letto_ joined #nim |
16:42:30 | disruptek | use nimph, of course. |
16:43:09 | leorize | nimph wants the compiler |
16:43:16 | leorize | anything that imports the compiler = bad time |
16:43:24 | disruptek | don't be such a baby. |
16:43:46 | leorize | at least for my setup because we still haven't manage to standardize an installation layout |
16:43:58 | leorize | (for the compiler) |
16:44:09 | disruptek | Araq: you see what havoc my balls have wrought? |
16:44:48 | disruptek | leorize: well, get used to it. it's crazy to think that this language won't import from a 60k metaprogramming codebase. |
16:44:49 | leorize | ok I solved the issue by removing my nimble dir |
16:45:31 | leorize | remind me to redo package management once I'm done with nim-sys |
16:45:40 | disruptek | 👍 |
16:46:15 | disruptek | i had to uninstall your nim ebuild a couple days ago. |
16:46:22 | disruptek | it was confusing my gitnim development. |
16:46:36 | disruptek | it was only 1.2, anyway. |
16:47:30 | leorize | the compiler makes a ton of assumptions on locations of its assets |
16:48:13 | leorize | it's terrible but I can't make it better (yet) |
16:50:03 | leorize | I just read up on selectors design and everyone wanna makes windows completion notification works like unix readiness notifications... |
16:50:56 | leorize | it's basically madness |
16:51:10 | leorize | gonna be fun when people try to make io_uring work like that |
16:52:07 | * | Gustavo6046_ joined #nim |
16:52:09 | disruptek | lol that will never happen. |
16:52:46 | disruptek | Zevv: our tests take a long time because they pass arc and cpp. |
16:52:56 | * | Gustavo6046 quit (Ping timeout: 272 seconds) |
16:52:57 | disruptek | most software fails there, so the test runs are shorter. |
16:53:18 | disruptek | i got them down to about 15mins tho. |
16:54:19 | * | Gustavo6046_ is now known as Gustavo6046 |
16:55:11 | * | letto_ quit (Quit: Konversation terminated!) |
16:55:39 | * | letto joined #nim |
16:56:44 | * | leorize quit (Remote host closed the connection) |
16:57:12 | * | leorize joined #nim |
16:57:27 | FromGitter | <HJarausch_gitlab> How to display all exported names of a package? E.g. in Python, I can say ⏎ `` ⏎ import re ⏎ dir(re) ⏎ `` ... [https://gitter.im/nim-lang/Nim?at=60031af791e9b71badde1c77] |
16:59:56 | disruptek | ~ninp |
16:59:56 | disbot | ninp: 11nim is not python!! |
17:00:05 | * | clyybber quit (Quit: WeeChat 3.0) |
17:00:36 | FromGitter | <Technisha> Heya, quick question: How do i have a websocket constantly on |
17:00:44 | FromGitter | <Technisha> I'm making an mc server in Nim- |
17:01:10 | FromDiscord | <Rika> thats a big task |
17:01:40 | Zoom[m] | leorize (@freenode_leorize:matrix.org): are you still on matrix? which one (there's two accounts in the list here)? |
17:02:21 | leorize[m] | this one |
17:02:29 | disruptek | leorize: cps 0.0.15 is for you. |
17:02:32 | leorize | I frequently hop into irc because of the sync lag |
17:03:32 | Zoom[m] | K, pinged you there already. |
17:08:25 | saem | Morning |
17:09:07 | disruptek | what is up my dude |
17:10:15 | saem | Today is the day I start figuring out a tiny bit more about how macros are handled in the compiler. |
17:10:22 | disruptek | oh no. |
17:11:01 | saem | I need to fix this nimsuggest test and I figure I might end up fixing bugs for you too, so double win? |
17:11:31 | saem | If I time it right I can have avatarfighter use CPS first. |
17:11:40 | FromGitter | <haxscramper> @HJarausch_gitlab it is not possible IIRC, at least not without using compiler API |
17:11:56 | FromGitter | <haxscramper> Docgen does that in `exported` section, but it uses compiler |
17:12:49 | FromGitter | <haxscramper> And in general you can't have access to whole module AST at compile-time, only individual toplevel entries |
17:13:29 | * | rockcavera quit (Remote host closed the connection) |
17:15:16 | * | letto quit (Ping timeout: 240 seconds) |
17:16:23 | * | letto joined #nim |
17:17:07 | disruptek | it's possible without using the compiler, but we pretend it's not. |
17:17:57 | leorize | avatarfigher will definitely win, they only has to do it on one platform :P |
17:18:16 | FromDiscord | <haxscramper> disruptek: how |
17:18:26 | FromDiscord | <haxscramper> Actually, no, don't tell me |
17:18:35 | disruptek | the power is too great. |
17:18:44 | disruptek | you need to be on irc for this. |
17:18:48 | leorize | disruptek: saw it, thanks |
17:18:56 | FromDiscord | <Daniel> random question:↵Can nim work in GPU, instead of CPU? |
17:19:01 | disruptek | ye. |
17:19:03 | disruptek | s |
17:19:33 | FromDiscord | <haxscramper> disruptek: It's good I'm on discord right now, or otherwise my mind would be corrupted beyond repair |
17:19:40 | disruptek | probably. |
17:19:55 | saem | You get used to it |
17:19:58 | disruptek | if you're wondering why you haven't see shashlick around in awhile... well... yeah. |
17:20:06 | disruptek | !last shashlick |
17:20:06 | disbot | shashlick spoke in 12#nim 3 weeks ago 12https://irclogs.nim-lang.org/22-12-2020.html#18:56:48 |
17:20:12 | FromDiscord | <haxscramper> I will come to holy IRC land when I think I'm ready |
17:20:21 | disruptek | fair enough. |
17:20:53 | disruptek | make sure your sword is sharp and your estate planning is up to date. |
17:21:14 | FromDiscord | <Daniel> How do i tell nim to do stuff in GPU instead of in CPU? |
17:21:42 | leorize | you do it like everyone else, write a gpgpu kernel |
17:21:48 | leorize | for details I will have to ping mratsim |
17:21:57 | FromDiscord | <haxscramper> Well, IIRC you need to specifically design around this, it is not like you can move regular code to CPU magically |
17:22:02 | leorize | he worked on this stuff for his arraymancer iirc |
17:22:33 | saem | Or just read up on arraymancer |
17:25:30 | FromGitter | <HJarausch_gitlab> @haxscramper Thanks though it's bad news. |
17:26:26 | * | waleee-cl joined #nim |
17:28:08 | FromGitter | <haxscramper> @HJarausch_gitlab what do you need exported symbols for? |
17:29:23 | FromDiscord | <Daniel> To me, as a total noob, its fascinating how graphic card actually has parts like whole computer PCB is basically motherboard with its own processing unit, ram, controllers, accelerators(audio)......its lacking long term storage like SSD, but in a sense its mini computer inside a normal computer.....so i am under impression its not even closely used to its potential....just my random thinking |
17:29:36 | FromDiscord | <Daniel> (edit) "To me, as a total noob, its fascinating how graphic card actually has parts like whole computer PCB is basically motherboard with its own processing unit, ram, controllers, accelerators(audio)......its lacking long term storage like SSD, but in a sense its mini computer inside a normal computer.....so i am under impression its not even closely used to its potential....just my random thinking ... " added "about technology" |
17:30:27 | FromDiscord | <treeform> Wait till you find out that there are more components like that. |
17:31:04 | FromDiscord | <Daniel> Yea, but graphics card most computational power, judging by the number of transistors silicon has. |
17:31:12 | FromDiscord | <Daniel> (edit) "Yea, but graphics card ... most" added "has" |
17:32:05 | FromDiscord | <Daniel> So i am still puzzled why isnt it used more often in computation, like when its needed to 7zip something. |
17:32:28 | leorize | because you have to move memory into the graphics card in order to perform computation there |
17:32:45 | leorize | which is very slow |
17:33:03 | FromDiscord | <treeform> And is not great at sequential algorithms |
17:33:27 | leorize | for the case of 7zip, your bottleneck lies in disk I/O as well, and you can't do that in GPU efficiently |
17:33:55 | leorize | there was the HSA architecture for making this fast and all |
17:34:19 | leorize | but AMD seems to stopped development on it so it's dead now |
17:35:42 | FromDiscord | <Daniel> Oh right, I/O slows it down, i see....didnt think about that, i was assuming PCIE is very fast these days to feed the GPU quickly enough. |
17:37:33 | FromDiscord | <treeform> Gpu wins when you need a ton of compute and little IO. |
17:37:52 | FromDiscord | <treeform> Opposite of 7zip |
17:39:49 | FromDiscord | <VVX7> what's the best way to install nimble deps in a project (that's not a library)? Should I just include a .nimble file and run `nimble install`? |
17:39:59 | Zevv | disruptek: any idea about the type thingy? |
17:41:08 | FromDiscord | <haxscramper> You can write `requires` section and do `nimble build` IIRC it will pull all necessary dependencies |
17:44:56 | * | Arrrrrrrr joined #nim |
17:47:27 | saem | It's sad about HSA (and HSail?). But some lessons came across. IIUC AMD has a that new fast path for main memory access via the GPU, haven't dug in deep but it's not just for AMD CPU/GPU combos others can use it |
17:50:03 | FromDiscord | <Daniel> but if GPU has its own RAM, why does it need main RAM? |
17:50:23 | FromDiscord | <Daniel> isnt that just excess traffic moving around? |
17:50:28 | saem | It doesn't. It's about performance. |
17:50:46 | saem | Moving data is slow |
17:50:55 | saem | Basically the slowest thing |
17:54:22 | * | Torro quit (Quit: bye) |
18:01:24 | disruptek | GPU is the next frontier for nim. |
18:01:58 | disruptek | Zevv: i will look at it. |
18:02:43 | saem | Ok, time to give this macro stuff a poke |
18:02:57 | disruptek | leorize: do you still have a requirements clash with criterion 0.2.7? |
18:03:18 | FromDiscord | <treeform> Running some algorithm on GPU and CPU, GPU does it 924.65 times faster! |
18:03:38 | leorize | disruptek: it's fine now |
18:03:42 | disruptek | yeah, people really have no concept of how much power is in their gaming rig. |
18:03:53 | FromDiscord | <treeform> its hard to access |
18:04:07 | disruptek | we will be able to support it. |
18:04:26 | disruptek | i mean, we do support it, to an extent. |
18:04:36 | disruptek | but i think we'll be able to compile to GPU directly. |
18:04:43 | * | Vladar quit (Remote host closed the connection) |
18:04:49 | FromDiscord | <treeform> GPU - a different programming paradigm |
18:04:59 | FromDiscord | <treeform> who is the "we" you speak of? |
18:05:16 | disruptek | Zevv: did you push a branch? |
18:05:19 | Zevv | mratsim, mostly :) |
18:05:23 | disruptek | i don't see anything typed. |
18:05:51 | * | Gustavo6046 quit (Read error: Connection reset by peer) |
18:06:14 | disruptek | i got it. |
18:06:25 | * | Vladar joined #nim |
18:06:56 | Zevv | disruptek: yeah' typeproblem' |
18:07:00 | Zevv | just rebased and repushed |
18:07:28 | Zevv | so cps properly deduces that foo returns a Thing which is a distinct int |
18:07:28 | disruptek | rebased it. |
18:07:35 | disruptek | lol |
18:07:40 | Zevv | but then of course it tries to create a 'distinct int' in the env |
18:07:54 | disruptek | okay, so that should be easy. |
18:07:55 | * | Gustavo6046 joined #nim |
18:07:56 | Zevv | I tried all getTypeThisses and getTypeThats that I could find |
18:08:04 | disruptek | really? |
18:08:05 | Zevv | but didn't actually try to understand what I was doing |
18:08:15 | Zevv | probably the wrong ones, still |
18:08:17 | disruptek | one of them unwraps all abstractions. |
18:09:06 | disruptek | getTypeImpl is what we want. |
18:09:14 | disruptek | https://nim-lang.org/docs/macros.html#getTypeImpl%2CNimNode |
18:09:23 | disruptek | but you say it doesn't work, and you're pretty smart, so... hmmm. |
18:09:42 | leorize | treeform: my concerns is that loading the gpu up is a slow process |
18:10:11 | leorize | iirc while json can be parsed plenty fast on a gpu, you still won't use it because of the memory access cost |
18:10:23 | disruptek | Zevv: getTypeInst should give you the Thing that you want to put into the env. |
18:10:42 | FromDiscord | <treeform> yes it is, I loose 3ms transferring with read pixels and about 1.5ms transferring with off-screen buffers, for a 0.010ms algorithm its a deal breaker. |
18:11:00 | leorize | similar to how HPC people loves intel's AVX512 because it allowed them to skip the memory copies |
18:11:36 | Zevv | disruptek: ah right, wrong file |
18:13:08 | Zevv | fixed, will merge one day if CI completes |
18:13:22 | disruptek | sweet. |
18:13:39 | Zevv | soo, this is almost usable |
18:13:44 | Zevv | time to call in PMunch |
18:15:49 | kinkinkijkin | i forget, does nim have a fixed point type? |
18:15:54 | disruptek | nope. |
18:16:00 | disruptek | !repos fixed point |
18:16:00 | disbot | https://github.com/zevv/fixedpoint -- 9fixedpoint: 11Fixed point math library 15 2⭐ 0🍴 |
18:16:03 | kinkinkijkin | if not, how do i implement integral data types so i |
18:16:05 | kinkinkijkin | FUCK |
18:16:20 | kinkinkijkin | someone already did it, of course |
18:16:24 | Zevv | I wouldn't use that if I were you |
18:16:33 | disruptek | some bozo, but at least you can copy their operator syntax. |
18:16:50 | disruptek | kinkinkijkin: where have you been? we haven't seen you around lately. |
18:17:05 | Zevv | kinkinkijkin: it kind of works, but it was more of an experiment to see if I could make it work with arbitrary length types and fractional sizes |
18:17:12 | Zevv | conclusion: yes, it can. now I'm bored. |
18:17:44 | kinkinkijkin | disruptek ive been working on things and having things happen to me |
18:17:51 | disruptek | Zevv: be glad; most people don't emerge from statics+generics "bored"; they come out "dead". |
18:18:15 | Zevv | congratulations to me then |
18:18:34 | Zevv | kinkinkijkin: but by all means, I think the underlying ideas are sane, it just needs growing and tests |
18:18:46 | kinkinkijkin | i want to implement fixed point numbers as a type that can be passed to a fixed point unit |
18:19:00 | * | Gustavo6046 quit (Ping timeout: 256 seconds) |
18:19:14 | Zevv | if you need only one type of one size, that should be pretty simple. |
18:19:16 | kinkinkijkin | like, implement "standard" fixed point numbers, not arbitrary scientific fixed point numbers |
18:19:22 | Zevv | right. |
18:19:39 | Zevv | my lib tries to do funky stuff, like allowing multiplication of a 8.3 with a 16.8 |
18:19:53 | kinkinkijkin | well i want to do 8.8, 12.4, 4.12, 16.16, 24.8, 8.24, etc |
18:20:09 | Zevv | ok, so that's quite a bunch already |
18:20:22 | kinkinkijkin | basically all the fixed point numbers you can actually see in fixed point units on actual devices |
18:20:41 | Zevv | I've worked on a 17.8 once |
18:20:53 | kinkinkijkin | of most interest is the fixed point numbers available to the GC's variant of PPC |
18:21:12 | kinkinkijkin | so 16.16 is top priority |
18:21:13 | Zevv | you could re-use the type, probably: https://github.com/zevv/fixedpoint/blob/master/src/fixedpoint.nim#L5 |
18:21:41 | Zevv | (16.16 is called 32.16 here, first part is the underlying storage, 2nd part is the fractional size) |
18:22:21 | kinkinkijkin | the hard thing is implementing fast fixed point math for stupid and dumb platforms that don't have built-in fixed point stuff like x86 |
18:22:43 | kinkinkijkin | i mean sure, just use them like integers most of the time |
18:23:08 | Zevv | kinkinkijkin: if you want all the fast things, you probably should just bind a proven C lib |
18:23:23 | kinkinkijkin | but that's gonna be a task itself without pulling out ASM or binding C |
18:24:21 | Zevv | binding C is trivial, you can even just ship the C code inside a Nim .nimble |
18:24:36 | Zevv | doing native nim is way cooler of course, but it's a tedious job |
18:25:04 | kinkinkijkin | and the intended end result is interop between fixed and floating point numbers, to a degree |
18:25:26 | leorize[m] | if you wanna do it in native nim, the folks at #nim-science can give you a few pointers I believe |
18:25:31 | kinkinkijkin | so i can drop it into my game engine and have something for people to come to me to complain about making their game slow |
18:29:08 | FromDiscord | <exelotl> Zevv: your fixed point lib looks great but those procs definitely need to be {.inline.} or templates 😅 |
18:31:28 | Zevv | oh sure |
18:31:42 | Zevv | but maybe it first should all actually work and be completed to make it usable |
18:31:52 | disruptek | crazy talk. |
18:32:20 | kinkinkijkin | what i was thinking of is a data-friendly fixed point lib, using as much native fixed point shenanigans as possible |
18:33:00 | Zevv | go for it! |
18:33:22 | kinkinkijkin | actually wait does arm64 do fixeds natively |
18:33:38 | Zevv | disruptek: when are you going to drop your eventqueue stuff from the CPS repo |
18:33:52 | kinkinkijkin | i know x86_64 needs to treat them as ints |
18:34:06 | * | Gustavo6046 joined #nim |
18:35:51 | leorize | Zevv: but I like that eventqueue, it has Cont and trampoline :( |
18:36:25 | FromDiscord | <exelotl> For my fixed point lib I decided that supporting fixed × int and int × fixed (without needing to convert the int to fixed), and same for division, is basically essential to reduce the possibility of overflow. |
18:36:31 | disruptek | Zevv: i think we can safely move it out now, right? |
18:37:53 | FromDiscord | <exelotl> and then it follows that all operations (+ - / += -= = /=) should all allow one fixed parameter and one int parameter, for consistency |
18:38:54 | Zevv | disruptek: I bet it will speed up the tests. |
18:39:08 | Zevv | leorize: it should not live there. It should be in a different repo |
18:39:19 | Zevv | that Cont and trampoline are not the ones you want or need |
18:39:19 | disruptek | none of the tests use eventqueue. |
18:39:23 | Zevv | ah ok cool |
18:39:55 | Zevv | makes sense if we'd move cps.nim into cps/ and make cps.nim only do some imports? |
18:40:00 | FromDiscord | <exelotl> it's worked out fine so far, except my module only supports 24.8 fixed point. :/↵i definitely want it to support other sizes |
18:40:10 | FromDiscord | <exelotl> but that'll basically need a rewrite |
18:40:14 | disruptek | Zevv: why? |
18:40:36 | Zevv | symmetry and esthetics, I guess |
18:40:43 | Zevv | nah nevermind |
18:40:43 | leorize | wouldn't I need that because there can be only one continuation type rn? |
18:41:02 | Zevv | nope, there can be an infinite number of those |
18:41:20 | disruptek | you can only have one continuation type per scheduler; and with inheritance, this isn't really an issue. |
18:41:27 | Zevv | the type is a concept, and you as a "middlewere" implementer make it fit your problem domain |
18:41:56 | disruptek | but poke mratsim and ask him again to pr his type erasure code. |
18:42:06 | disruptek | he won't listen to me. |
18:42:18 | leorize | ah, ok, will move to my own continuations then |
18:42:53 | Zevv | leorize: if we want to do asyncy-things, I think we should make a simple repo that offers just that |
18:42:54 | disruptek | yes, you don't want eventqueue. |
18:43:03 | Zevv | it can (should?) lie on top of ioselectors probably |
18:43:12 | leorize | not sure about that |
18:43:26 | Zevv | if you want portability |
18:43:37 | disruptek | if flywind ports timers into stdlib, it should be okay. |
18:44:25 | Zevv | eh, there are timers in stdlib already, right? |
18:44:33 | leorize | in nim-sys I'm experimenting with skipping ioselectors and having primitives implemented in a platform-specific way |
18:44:35 | disruptek | not for windows. |
18:44:41 | Zevv | wow |
18:44:49 | leorize | this is mainly because of completion vs readiness notifications |
18:45:19 | Zevv | hm but there's registerTimer, does that now work on windows then? |
18:45:36 | disruptek | right, it does not. |
18:45:44 | Zevv | and it does not even say that in the docs |
18:45:45 | Zevv | wonderful |
18:45:57 | disruptek | there's a readme here that explains this: |
18:45:59 | disruptek | !repo cps |
18:46:00 | disbot | https://github.com/disruptek/cps -- 9cps: 11Continuation-Passing Style for Nim 🔗 15 55⭐ 2🍴 |
18:50:28 | FromDiscord | <Zachary Carter> uhhh - does anyone know how to link a DLL using `vcc` on Windows? I'm trying everything but can't figure out how to do it... |
18:52:23 | leorize | you don't link a dll |
18:52:29 | leorize | you link with a .lib file |
18:53:55 | FromDiscord | <Daniel> i dont understand this?...does it mean it will be available in nim 1.5? https://media.discordapp.net/attachments/371759389889003532/800075373596508160/unknown.png |
18:53:58 | FromDiscord | <Zachary Carter> how do I tell the compiler that these symbols are contained in this dll? |
18:55:07 | leorize | @Zachary by linking with a .lib file :) |
18:55:08 | * | ^Q-Master^ quit (Ping timeout: 260 seconds) |
18:55:18 | leorize | in short, you don't |
18:55:25 | disruptek | daniel: it means it requires the devel branch. |
18:55:41 | FromDiscord | <Zachary Carter> wtf |
18:55:42 | FromDiscord | <Zachary Carter> okay |
18:55:56 | disruptek | the d in dll stands for dynamic. |
18:56:00 | FromDiscord | <Daniel> oh i see, makes sense i guess, thank you for the explanation |
18:56:07 | leorize | @Zachary the .lib teels the linker what symbol the library it associates with provides |
18:56:47 | leorize | it will also tells the linker what dll it is |
18:57:06 | leorize | and when you start your program that dll will be searched in PATH |
18:57:08 | FromDiscord | <Zachary Carter> right okay I think I'm just getting confused - I need to tell Nim via the cimport pragma what dynamic library to load the symbol from |
18:57:20 | FromDiscord | <Zachary Carter> if I don't want to statically link |
18:57:44 | leorize | I would link with a .lib tbh |
18:57:48 | leorize | much less overhead |
18:58:06 | FromDiscord | <Zachary Carter> yeah |
18:58:16 | leorize | and you get Windows default error box as well |
18:58:39 | FromDiscord | <Avatarfighter> Disruptek: hey lol |
19:01:10 | * | Jesin quit (Quit: Leaving) |
19:03:24 | disruptek | what up fighter |
19:07:10 | * | Jesin joined #nim |
19:09:44 | giaco | how would you push events from external thread to async loop thread? |
19:11:27 | * | hnOsmium0001 joined #nim |
19:11:55 | * | grobe0ba_ joined #nim |
19:12:34 | * | Cthalupa quit (Ping timeout: 256 seconds) |
19:12:34 | * | grobe0ba quit (Ping timeout: 256 seconds) |
19:12:34 | * | revere quit (Ping timeout: 256 seconds) |
19:12:34 | * | oz quit (Ping timeout: 256 seconds) |
19:12:38 | * | reveres joined #nim |
19:13:02 | * | reveres is now known as revere |
19:13:04 | * | Cthalupa joined #nim |
19:13:14 | * | oz joined #nim |
19:14:55 | disruptek | giaco: i would ask dom96. |
19:15:04 | FromDiscord | <Anuke> Is this a bug? https://play.nim-lang.org/#ix=2MeH |
19:15:54 | giaco | disruptek: thanks |
19:15:56 | FromDiscord | <dom96> giaco: either channels or just use a socket if you don't mind serialising it |
19:16:59 | giaco | dom96: channels! I was on the right path. Do channels have async constructs? |
19:17:45 | FromDiscord | <dom96> unfortunately not right now, but you can use async events to signal their readiness |
19:18:16 | giaco | good. Thanks a lot for the quick feedback |
19:20:36 | FromDiscord | <dom96> no problem, happy to help 🙂 |
19:22:08 | Zevv | disruptek: |
19:22:28 | disruptek | wut |
19:22:37 | Zevv | which dependencies can we drop from cps |
19:23:10 | Zevv | none I guess? |
19:23:22 | disruptek | depends on whether you feel like fixing foreign bindsym. |
19:23:46 | disruptek | you can remove criterion if you don't care about running the benchmark. |
19:25:25 | Zevv | nah it's fine for now, but you know how I feel about deps |
19:25:42 | Zevv | not that it matters, it's *your* repo after all :) |
19:26:29 | disruptek | well, grow out of it or replace them with your own code. |
19:27:07 | disruptek | i personally don't want to maintain test running for every project, but i'm happy to let you do it if you want. |
19:27:47 | Zevv | I guess I'll grow out of it then, right |
19:28:00 | * | Q-Master joined #nim |
19:28:13 | disruptek | criterion says our performance is pretty dismal. |
19:29:06 | Zevv | how come |
19:29:37 | FromDiscord | <Rika> @Anuke no, multiline comments start with #[ and end with ]#, add a space |
19:29:50 | FromDiscord | <Rika> misread |
19:29:59 | FromDiscord | <Rika> but thats another bug lol |
19:31:18 | disruptek | Zevv: i dunno if it's the object conversion tests or what. |
19:31:31 | disruptek | we are missing a move, too. |
19:31:32 | FromDiscord | <Anuke> are you saying the `#[` without a corresponding `]#` being accepted by the compiler is a bug as well? |
19:31:39 | FromDiscord | <Rika> no |
19:31:53 | FromDiscord | <Rika> it didnt compile when i tried so i assumed the bug was about that |
19:32:11 | Zevv | disruptek: can we enforce that? |
19:32:16 | disruptek | my case statement test produces an infinite loop at compile-time. 😢 |
19:32:35 | Zevv | that'll significantly slow down the CI pipe |
19:32:40 | disruptek | Zevv: i started on it with --define:cpsMoves but it's not finished. |
19:32:46 | Zevv | cool |
19:32:47 | FromDiscord | <Anuke> my bad, I forgot to test it with the comments - remove them and you'll see what I meant |
19:32:58 | * | Q-Master quit (Ping timeout: 246 seconds) |
19:33:23 | FromDiscord | <Rika> i see the issue now, the array is constant so arr[1] is folded intp proc() but arr[i] cannot exist |
19:33:30 | FromDiscord | <Rika> wait no |
19:33:31 | disruptek | omg it's not infinite. |
19:33:32 | FromDiscord | <Rika> okay |
19:33:34 | FromDiscord | <Rika> this is kinda funky |
19:34:03 | FromDiscord | <Anuke> I'm trying to work around this bug right now and pretty much every variant I try either gives invalid codegen or puts `nil`s everywhere |
19:34:05 | disruptek | case statements take 1.5mins to compile. |
19:34:44 | Zevv | it's testes |
19:34:50 | Zevv | or isn't it |
19:35:12 | disruptek | if you have a problem with my balls, just come out and say it. |
19:35:17 | Zevv | I just did |
19:35:23 | disruptek | oh, right. |
19:35:34 | FromDiscord | <Rika> holy shit im getting errors in the C file now |
19:35:36 | Zevv | 35k lines of C for tzevv is pretty funny |
19:35:44 | FromDiscord | <Rika> anuke what have you done |
19:35:51 | disruptek | it's not about the length; it's about the girth. |
19:35:59 | FromDiscord | <Anuke> it breaks even when I use seqs/vars/lets |
19:36:26 | FromDiscord | <Rika> i assume the issue is not seqs, its the proc type and const |
19:37:37 | Zevv | disruptek: one optimization we should make soon is not splitting when not needed |
19:37:49 | disruptek | make a test. |
19:39:13 | Zevv | because that'll kill performnace |
19:39:23 | Zevv | all these extra trampoline jumps |
19:39:44 | disruptek | #59 removed some extra jumps. |
19:39:56 | Zevv | yeah, but we need logic to only transform if a block has a cps call |
19:40:13 | disruptek | start with a test. |
19:40:17 | Zevv | dude |
19:40:21 | Zevv | you sound like my manager |
19:40:34 | disruptek | well, we'd get alone great, i'm sure. |
19:40:35 | Zevv | I just decided this week to start quitting that job |
19:40:41 | disruptek | lol |
19:41:07 | disruptek | our test suite is starting to be useful. |
19:42:33 | * | Q-Master joined #nim |
19:42:46 | leorize | why won't WaitForMultipleObjects accept IOCP? :( |
19:43:14 | leorize | so I will still have to spawn threads, because Windows |
19:47:36 | * | Gustavo6046 quit (Ping timeout: 246 seconds) |
19:49:05 | disruptek | only on windows, though, right? |
19:51:14 | Zevv | disruptek: added a test. tyranny |
19:55:26 | Zevv | did we ever decided if we want to run the first iteration of a contiuation when calling the booty? |
19:55:38 | Zevv | because the head of the cps proc can be moved into the booty, saving one call |
19:55:58 | disruptek | premature opt. |
19:56:05 | Zevv | I'm full of those |
19:56:12 | Zevv | if you need any, call me |
19:56:16 | disruptek | you're full of something, alright. |
19:56:33 | Zevv | I remember when you said clyybber is full of bs one day |
19:57:14 | leorize[m] | disruptek: yea, it's annoying, but luckily windows have a built-in threadpool for that |
19:57:23 | Zevv | wow |
20:04:59 | disruptek | hmm, look at tzevv now. |
20:05:10 | disruptek | it didn't even occur to me to run the tests. |
20:05:58 | FromDiscord | <lqdev> Zevv: using npeg for a lexer i'm whipping up, so far so good |
20:06:20 | FromDiscord | <lqdev> gonna see how that openArray[T] parsing works in a sec |
20:09:19 | Zevv | lqdev: pretty much uncharted territory you're going |
20:09:41 | Zevv | the good thing is that I needed to change *very* little to make npeg parse anything seq'ish |
20:10:11 | Zevv | so I'm pretty confident it should work out. Basically all I did was make it generic, and isolate one or two cases where explicit string things were happening |
20:11:16 | Zevv | disruptek: messy error from cps.nim: ps.nim(514, 9) Error: expression [20 lines of nim here] s of type 'NimNode' and has to be used (or discarded); |
20:11:27 | disruptek | i know, it's nuts. |
20:12:55 | disruptek | it's the kind of error that makes me check `nim --version`. 🤣 |
20:16:45 | * | lritter joined #nim |
20:19:09 | * | npgm_ quit () |
20:19:42 | * | npgm joined #nim |
20:21:06 | FromDiscord | <lqdev> Zevv: do you have any examples on simple AST building? |
20:26:52 | disruptek | Zevv: you ruined everything. |
20:29:15 | Zevv | lqdev: look for my mathpipe repo |
20:29:31 | Zevv | or the rod parser which is in misc or contrib somewhere in npeg |
20:30:21 | FromDiscord | <lqdev> oh yeah missed that one |
20:35:50 | disruptek | Zevv: seems like we're creating an extra done() proc sometimes. it's never actually called. |
20:39:41 | * | screens_ quit (Quit: screens_) |
20:44:58 | FromDiscord | <lqdev> Zevv: why did you add the ^ 0 to parenExp here? trying to wrap my head around your precedence climbing shenanigans https://github.com/zevv/npeg/blob/master/misc/rod.nim#L179 |
20:45:10 | * | a_chou joined #nim |
20:48:26 | FromDiscord | <lqdev> alr think i found it |
20:48:32 | FromDiscord | <lqdev> P ^ 0: resets the current precedence to 0 and continues parsing. This main use case for this is parsing sub-expressions in parentheses. |
20:50:03 | FromDiscord | <lqdev> but wait |
20:50:18 | FromDiscord | <lqdev> it only resets the precedence for P, right? |
20:54:08 | Zevv | lqdev: so, you are building AST, parsing openarray[T] and now you want to do precedence operators as well?! |
20:54:29 | Zevv | yeah, only for P |
20:54:40 | FromDiscord | <lqdev> are you saying none of the three things you just mentioned were tested? |
20:54:50 | Zevv | by me I guess :) |
20:55:01 | FromDiscord | <lqdev> well, now it's gonna be two people. |
20:55:21 | Zevv | but for the good news: the number of actual bugs reported on npeg is ridiculously low |
20:55:22 | disruptek | who's the other person? |
20:55:36 | Zevv | so either it has no users, or the code is rock solid |
20:58:00 | FromDiscord | <lqdev> disruptek: yours truly. |
20:58:31 | disruptek | that makes one. |
20:59:42 | * | Arrrrrrrr quit (Ping timeout: 256 seconds) |
21:03:00 | * | a_chou quit (Remote host closed the connection) |
21:04:02 | * | vicfred joined #nim |
21:19:20 | FromDiscord | <Anuke> How would I declare and initialize a seq/array of procs without making the procs variables/consts? This doesn't work: https://play.nim-lang.org/#ix=2Mg0 |
21:20:09 | FromDiscord | <lqdev> @Anuke that's because proc types have the {.closure.} convention by default |
21:20:26 | FromDiscord | <lqdev> you need to add {.nimcall.} to it, like so: `type ProcType = proc(b: int) {.nimcall.}` |
21:21:26 | mipri | https://play.nim-lang.org/#ix=2Mg3 |
21:22:52 | FromDiscord | <lqdev> or that. implicit conversions in arrays and tuples are a bit fiddly |
21:24:40 | FromDiscord | <Anuke> Thanks, converting to the proc type explicitly fixed it.↵@lqdev Your advice fixed the example, but lead to a `lock levels differ` error in my actual code (possibly due to macro usage) |
21:25:10 | FromDiscord | <lqdev> ah dang, lock levels |
21:25:18 | FromDiscord | <lqdev> neat in concept but annoying in practice. |
21:26:17 | FromDiscord | <Anuke> I'm not sure why they even exist when I don't have threads on |
21:27:50 | FromDiscord | <lqdev> Zevv: how would i handle something like a proc call, where the amount of arguments may vary, with the stack-based AST building approach? |
21:28:10 | FromDiscord | <lqdev> would i need something like a sentinel value in that case, to know when to stop popping from the stack, or is there a better way? |
21:29:14 | disruptek | you make an arg list type that has length, no? |
21:29:55 | FromDiscord | <lqdev> well yes, but that's not what i'm asking about |
21:30:22 | FromDiscord | <lqdev> https://github.com/zevv/npeg/blob/master/misc/rod.nim doesn't handle this case probably because it was written before i implemented calls into my lang |
21:30:33 | FromDiscord | <lqdev> but it does the stack-based AST building thing |
21:48:21 | FromDiscord | <apollo> so i can use the system.hostOS to write completley different code for the 3 seperate operating systems? |
21:52:05 | * | pbb quit (Remote host closed the connection) |
21:53:19 | * | pbb joined #nim |
21:53:56 | Zevv | lqdev: mathpipe does that |
22:01:11 | FromDiscord | <lqdev> @apollo or better yet, use `defined(windows)`, `defined(linux)`, `defined(macosx)`, or `defined(posix)` |
22:02:18 | FromDiscord | <apollo> havent gotten or learnt that yet 😅 |
22:02:24 | FromDiscord | <lqdev> Zevv: ah, so something similar to what i'm doing |
22:03:00 | FromDiscord | <lqdev> @apollo i'm not surprised, i think i first encountered it in the wild when reading some stdlib code |
22:03:53 | FromDiscord | <apollo> well im glad nim has these options :)) |
22:05:25 | FromDiscord | <lqdev> why wouldn't it :p |
22:05:48 | FromDiscord | <lqdev> it's a low-level language, it's quite an essential feature to be able to detect the OS at compile time |
22:05:54 | disruptek | rude. |
22:08:57 | * | Gustavo6046 joined #nim |
22:10:24 | Zevv | https://github.com/zevv/mathpipe/blob/master/mp.nim#L60 |
22:13:06 | FromDiscord | <lqdev> yeah found it already |
22:25:51 | * | grobe0ba_ is now known as grobe0ba |
22:26:44 | * | Vladar quit (Quit: Leaving) |
22:29:17 | disruptek | Zevv: man, i think blocks are really broken. |
22:29:47 | Zevv | thats a *blocking* bug then |
22:37:02 | * | Hexeratops joined #nim |
22:37:46 | * | Hexeratops quit (Client Quit) |
22:49:21 | FromDiscord | <lqdev> lol -d:npegTrace causes a codegen bug |
22:49:45 | FromDiscord | <lqdev> sent a code paste, see https://play.nim-lang.org/#ix=2MgF |
22:50:02 | FromDiscord | <lqdev> and two more similar errors |
22:51:33 | FromDiscord | <lqdev> Zevv: ping |
22:52:01 | FromDiscord | <lqdev> it's probably related to that openArray[T] parsing |
22:52:21 | Zevv | yeah nice |
22:52:23 | FromDiscord | <lqdev> 'cos lexer.nim compiles successfully |
22:52:30 | Zevv | minimize away |
22:52:52 | Zevv | bah |
22:53:30 | Zevv | do you have something reproducable? |
22:53:32 | Zevv | you can share |
22:57:03 | Zevv | well, I'm off for a nap anyway. |
22:57:08 | Zevv | if you suspect a bug, lemme know |
22:57:10 | FromDiscord | <lqdev> yeah i think i got a minimal example |
22:57:16 | FromDiscord | <lqdev> hold on |
22:57:17 | Zevv | I'll buy you a beer if it's in npeg |
22:57:36 | FromDiscord | <lqdev> http://ix.io/2MgH |
22:57:51 | FromDiscord | <lqdev> it's probably not npeg |
22:57:56 | FromDiscord | <lqdev> that set comparison triggers it |
22:58:01 | Zevv | then I'll drink the beer |
22:58:24 | FromDiscord | <lqdev> yeah i'm underage so that's probably better |
22:58:34 | Zevv | pff said no on ever |
22:58:42 | Zevv | compiles fine for me? |
22:58:52 | FromDiscord | <lqdev> -d:npegTrace |
22:59:05 | Zevv | ah sorry |
22:59:07 | FromDiscord | <lqdev> nim 1.4.2 |
22:59:11 | Zevv | boom |
22:59:13 | FromDiscord | <lqdev> will try devel tho |
22:59:36 | Zevv | solution: use js instead of c :) |
22:59:40 | Zevv | devel does boom |
23:00:36 | FromDiscord | <lqdev> alright, now onto blindly inserting `echo` everywhere and hoping for the best |
23:00:40 | FromDiscord | <lqdev> because npegTrace doesn't work |
23:01:09 | Zevv | bah |
23:03:52 | * | krux02 joined #nim |
23:04:39 | Zevv | yeah but you're doing funny stuff with the == for a set and one element |
23:04:42 | Zevv | you know that, of course |
23:04:49 | Zevv | no reason for nim to barf like that, of course |
23:05:36 | Zevv | you say you are passing a Token |
23:05:45 | Zevv | but actually you are passing a set[Token] |
23:06:54 | Zevv | why don't you just [tokA] * ([TokA] | [TokB]) * [TokC] |
23:07:00 | Zevv | no need for the nasty set fiddling and lying |
23:07:48 | Zevv | I can also make npeg parse [tokA] * {[TokA], [TokB]} * [TokC] |
23:07:55 | Zevv | which would make sense, as that also works for char |
23:09:43 | FromDiscord | <lqdev> that would be nice |
23:10:07 | Zevv | let me see if I can make that work |
23:10:09 | * | vicfred quit (Quit: Leaving) |
23:10:10 | FromDiscord | <lqdev> i was just testing whether the feature holds up as advertised :p |
23:10:31 | FromDiscord | <lqdev> y'know, letting the user supply any arbitrary expression in [] |
23:10:40 | FromDiscord | <lqdev> and, to a degree, it works |
23:10:46 | Zevv | yeah, but you should pass 1 type |
23:10:47 | Zevv | not 2 |
23:10:57 | Zevv | I guess |
23:11:05 | Zevv | because the type gets passed to echo in npegTrace |
23:11:15 | Zevv | and something is creeping past nims defences I guess |
23:11:25 | FromDiscord | <lqdev> hm |
23:11:50 | Zevv | hm the curly does not fit simply |
23:12:01 | Zevv | but using choice (|) should be enough for what you are trying to do |
23:12:14 | FromDiscord | <lqdev> oh totally |
23:12:23 | FromDiscord | <lqdev> well, i'll be logging off for the night. @ me if you got any updates |
23:12:25 | Zevv | curlies and choice is equivalent, and actually gets compiled to the same parser (for chars) |
23:12:33 | Zevv | same here, time for ZzZ |
23:13:22 | Zevv | nighty |
23:51:57 | FromDiscord | <ITR> either the vscode is borking the debugger, or my program somehow gets a segfault before it runs :/ |
23:56:41 | FromDiscord | <shadow.> disruptek: why the name change? |
23:56:46 | FromDiscord | <shadow.> testes kinda fit with tests and still had the joke |
23:56:50 | FromDiscord | <shadow.> balls feels too unrelated and forced |
23:56:59 | disruptek | ask araq. |
23:57:04 | FromDiscord | <shadow.> did he not like it? |
23:57:19 | disruptek | how is it unrelated? |
23:57:23 | disruptek | !repo disruptek/balls |
23:57:23 | disbot | https://github.com/disruptek/balls -- 9balls: 11the unittest framework with balls 🔴🟡🟢 15 29⭐ 1🍴 |
23:57:31 | FromDiscord | <shadow.> how does it relate to tests lol |
23:58:03 | saem | welp no screwing around with macros today... spent time dicking around with fans in my case instead |
23:58:10 | FromDiscord | <shadow.> unfortunate |
23:58:29 | disruptek | air cooling is for chumps. |
23:58:39 | saem | water cooling is pain. |
23:59:06 | disruptek | the kits make it painless now. |
23:59:36 | saem | yeah |
23:59:59 | saem | I decided to vote with my dollars and gave system76 money |