00:02:43 | FromDiscord | <Quibono> Ahh gotcha gotcha |
00:03:58 | * | vsantana_ joined #nim |
00:07:28 | * | vsantana quit (Ping timeout: 272 seconds) |
00:09:03 | * | vsantana joined #nim |
00:09:08 | * | vsantana_ quit (Ping timeout: 260 seconds) |
00:29:12 | FromDiscord | <Quibono> Similar question, how much work would it take to use net to recreate httpclient sort of but with binary return data? |
00:33:17 | FromDiscord | <ElegantBeef> idk what you mean it already has binary return data |
00:33:36 | FromDiscord | <Quibono> It returns things as strings I believe |
00:34:15 | FromDiscord | <ElegantBeef> Strings are binary |
00:35:23 | FromDiscord | <Quibono> Sorry if Iβm being obtuse, but isnβt there some overhead to convert them to like an array of uint8? |
00:36:06 | FromDiscord | <ElegantBeef> Strings are a sequence of chars, chars are just uint8s that can be converted to printable characters |
00:39:13 | FromDiscord | <ElegantBeef> What you can do is get the string the make a newStringStream and read the data from it as you which |
00:40:51 | FromDiscord | <Quibono> So thatβd be the lowest cost way to get int into an array of chars? |
00:41:57 | FromDiscord | <Quibono> it |
00:42:03 | FromDiscord | <ElegantBeef> The lowest cost would be to leave it as a string |
00:43:04 | FromDiscord | <Quibono> My naΓ―ve understanding from reading was that you wanted to avoid objects on the heap for high performance stuffs |
00:44:24 | FromDiscord | <ElegantBeef> I dont think that's an issue for sequential values but idk |
01:10:14 | * | Tanger joined #nim |
01:13:48 | FromDiscord | <shadow.> @Quibono you're comparing uint8's right |
01:13:55 | FromDiscord | <shadow.> bc byte / uint8 / char is all the same data |
01:14:08 | FromDiscord | <shadow.> so why not just compare the char s |
01:14:09 | FromDiscord | <shadow.> (edit) "char s" => "chars" |
01:14:13 | FromDiscord | <Quibono> Yes I see now |
01:14:16 | FromDiscord | <shadow.> it should be just as fast as comparing the bytes |
01:14:16 | FromDiscord | <shadow.> ye |
01:19:19 | FromDiscord | <Quibono> I also need to make procs for indexing start and end of word and then just copying that into an array |
01:24:17 | FromDiscord | <ElegantBeef> @Quibono what do you mean? |
01:25:14 | FromDiscord | <Quibono> Like finding the index of a substring to copy it |
01:25:18 | ForumUpdaterBot | New thread by Guzba: Zippy update: Zip archive and tarball support + much closer to zlib performance, see https://forum.nim-lang.org/t/7281 |
01:27:00 | FromDiscord | <ElegantBeef> @guzba shit you work quick, nice zip archives |
01:28:01 | FromDiscord | <guzba> haha yeah, after doing tarballs zip turned out to be really not bad |
01:28:07 | * | lum quit (Quit: Lum: Bye!) |
01:29:09 | FromDiscord | <guzba> phew ok i think im going to step away from compressed file formats for at least 2 minutes lol |
01:29:28 | FromDiscord | <ElegantBeef> do the archives work in the VM? |
01:30:02 | FromDiscord | <guzba> aw you had to ask. zippy compress and uncompress does, tarballs may? i know archives do not just yet |
01:30:12 | FromDiscord | <guzba> its the whole string vs uint stuff i hate hate hate |
01:30:18 | FromDiscord | <guzba> i cant cast in vm |
01:30:23 | FromDiscord | <flywind> Wow it looks good to me, it should be added to important-packages I think. |
01:30:24 | FromDiscord | <ElegantBeef> Yea i know |
01:30:28 | FromDiscord | <guzba> but i readfile as string |
01:30:31 | FromDiscord | <guzba> so its like welllllllll |
01:30:47 | FromDiscord | <guzba> thanks flywind! |
01:30:56 | FromDiscord | <ElegantBeef> Yea i know the VM isnt overly sophisticated when it comes to bits π |
01:31:04 | FromDiscord | <guzba> to be clear the vm is amazing |
01:31:08 | FromDiscord | <guzba> im just whining |
01:31:33 | FromDiscord | <flywind> Could you specify a nimble task to test your files? |
01:31:56 | FromDiscord | <ElegantBeef> I mean i had to do what i consider as a bodge for the Nim <-> Nimscript interop i've made |
01:32:26 | FromDiscord | <guzba> @flywind nimble test is what i use now, does a specific task need to be created? if so does it need a specific name to play nicely? |
01:32:45 | FromDiscord | <guzba> (edit) "nimble test" => "`nimble test`" |
01:32:48 | FromDiscord | <ElegantBeef> I believe they mean make a test to run examples |
01:32:55 | FromDiscord | <shadow.> @ElegantBeef what's your github again? |
01:32:55 | FromDiscord | <flywind> For example I use |
01:33:00 | FromDiscord | <flywind> task tests, "Run all tests":β΅ exec "testament all" |
01:33:10 | FromDiscord | <shadow.> nvm found it |
01:33:15 | FromDiscord | <ElegantBeef> That's redundant with `nimble test` |
01:33:39 | FromDiscord | <ElegantBeef> although it only runs files that start with `t` |
01:34:12 | FromDiscord | <flywind> If you use `nimble test`, that's ok |
01:34:50 | FromDiscord | <ElegantBeef> Why'd you want my github account anywho? |
01:34:55 | FromDiscord | <guzba> nimble test runs for my github actions and i ensure they cover everything each commit should be checked against. i have other verification and benchmarking but that is kind of for me |
01:34:58 | FromDiscord | <ElegantBeef> I've got nothing cool there |
01:35:15 | FromDiscord | <guzba> (edit) "nimble test runs for my github actions and i ensure they cover everything each commit should be checked against. i have other verification and benchmarking ... but" added "in the tests/ dir" |
01:36:41 | * | lum joined #nim |
01:37:26 | FromDiscord | <shadow.> nimscripter |
01:37:30 | * | lum quit (Client Quit) |
01:37:40 | FromDiscord | <shadow.> you've mentioned it quite a bit so i just thought i'd take a look lol |
01:37:58 | * | Tlangir joined #nim |
01:38:21 | FromDiscord | <ElegantBeef> ah |
01:40:39 | * | Tanger quit (Ping timeout: 256 seconds) |
01:40:58 | FromDiscord | <ElegantBeef> It's pretty useful if you want to easily work with a scripted language |
01:41:09 | FromDiscord | <flywind> done https://github.com/nim-lang/Nim/pull/16442 |
01:41:10 | disbot | β₯ add zippy to important packages |
01:43:03 | FromDiscord | <guzba> oo cool! |
01:47:15 | FromDiscord | <ElegantBeef> Flywind you going to add it to awesome-nim aswell? π |
01:48:04 | FromDiscord | <flywind> PR is welcome |
01:48:18 | FromDiscord | <ElegantBeef> Sounds like work π |
01:50:51 | FromDiscord | <Cohjellah> sent a long message, see http://ix.io/2Jd0 |
01:51:10 | FromDiscord | <Rika> they use an intermediate server |
01:51:33 | FromDiscord | <Rika> port forwarding is needed for peer to peer (which is why torrenting needs it usually) |
01:52:05 | FromDiscord | <ElegantBeef> Only the server needs to port forward, so if you host it you portforward |
01:52:24 | FromDiscord | <Rika> ~~in the case of torrenting, everyone is a server~~ |
01:52:37 | FromDiscord | <ElegantBeef> Yea |
01:59:23 | FromDiscord | <Cohjellah> Ohhhh |
01:59:33 | FromDiscord | <Cohjellah> Makes more sense. |
01:59:57 | FromDiscord | <Cohjellah> Now I get It |
02:01:32 | * | a_chou joined #nim |
02:02:54 | FromDiscord | <Cohjellah> Do I have to change other settings such as my IP, because it's currently just localhost for both the client and server. Or will this automatically use your local IP when connecting to a server that's not on a LAN? |
02:04:45 | FromDiscord | <shadow.> i mean |
02:04:51 | FromDiscord | <shadow.> you can do a localhost tunnel instead if that's easier |
02:04:54 | FromDiscord | <shadow.> @Cohjellah like ngrok |
02:05:16 | FromDiscord | <shadow.> just do `ngrok tcp <port>` and then send the link to your friend |
02:05:51 | * | a_chou quit (Remote host closed the connection) |
02:06:23 | FromDiscord | <Cohjellah> What exactly is the link though? |
02:06:39 | FromDiscord | <Cohjellah> Also I've already got a server setup that is utilising a port |
02:07:49 | FromDiscord | <Cohjellah> Will ngrok just make it so I don't need to port forward? |
02:14:51 | * | lum joined #nim |
02:17:04 | * | lum quit (Client Quit) |
02:28:05 | disruptek | yay, github fixed !requires. |
02:41:14 | * | lum joined #nim |
03:00:23 | disruptek | ah, i'm wrong. it's fixed for very small query limits. π€¨ |
03:01:59 | disruptek | ah, i'm wrong. it doesn't fucking work at all. |
03:02:26 | * | abm quit (Quit: Leaving) |
03:07:15 | FromDiscord | <Rika> lol |
03:36:31 | disruptek | so weird. |
03:39:11 | * | vikfret joined #nim |
03:39:16 | * | klaufir_ quit (Ping timeout: 240 seconds) |
03:59:09 | * | muffindrake quit (Ping timeout: 272 seconds) |
04:01:09 | * | muffindrake joined #nim |
04:37:51 | ForumUpdaterBot | New thread by Jasonfi: Client-side JS with Nim, see https://forum.nim-lang.org/t/7282 |
04:50:42 | * | spiderstew_ joined #nim |
04:52:21 | * | spiderstew quit (Ping timeout: 272 seconds) |
04:54:44 | * | narimiran joined #nim |
05:01:52 | * | superbia1 joined #nim |
05:05:01 | * | superbia quit (Ping timeout: 272 seconds) |
05:48:37 | * | ex_nihilo joined #nim |
06:02:44 | ex_nihilo | dom96: looking at Nim in Action Listing 4.26, the httpclient example, there is something I don't understand; the book code shows: |
06:03:03 | ex_nihilo | let response = waitFor client.get("http://nim-lang.org") |
06:03:12 | ex_nihilo | echo(response.version) |
06:03:20 | ex_nihilo | echo(waitFor response.body) # Why is waitFor used here? |
06:03:27 | ex_nihilo | From the Nim docs I thought that `response` is an `AsyncResponse`, and that `response.body` is a string. I thought that `waitFor` needed a `Future[T]`, e.g., a `Future[string]`. There is no `waitFor` used with `response.version`; what am I missing? |
06:03:56 | disruptek | the body is a future, or perhaps it was. |
06:04:06 | disruptek | have you consulted the errata? |
06:04:26 | ex_nihilo | disruptek: I have looked, but I may have missed something |
06:04:33 | disruptek | lemme check. |
06:05:18 | disruptek | man i'd kill for some bandwidth. |
06:05:19 | FromDiscord | <Rika> AsyncResponse has Future[string] for body |
06:05:28 | FromDiscord | <Rika> I distinctly remember it |
06:05:47 | disruptek | it's called bodyStream. |
06:05:52 | disruptek | body is a string. |
06:06:01 | disruptek | https://nim-lang.org/docs/httpclient.html#AsyncResponse |
06:06:19 | disruptek | ex_nihilo: it was probably changed. don't sweat it. |
06:08:10 | FromDiscord | <Rika> Oh really? Odd, might have been changed indeed |
06:08:17 | FromDiscord | <Rika> Since I do remember body being the Future |
06:10:16 | FromDiscord | <myphs> How come `--gc:none` makes my binary bigger than with GC e.g. `--gc:boehm`? |
06:11:00 | disruptek | no one took the garbage out. |
06:13:07 | FromDiscord | <myphs> I'm genuinely interested. I used `--opt:speed -d:danger` and `--gc` and found this disturbing to see |
06:14:26 | disruptek | it's different code. different code compiles to different sizes. |
06:16:39 | FromDiscord | <myphs> Yeah, but one would imagine that binaries with GC enabled must be bigger, right? |
06:17:24 | disruptek | why? |
06:17:37 | FromDiscord | <Rika> More code doesnβt mean bigger all the time |
06:17:54 | disruptek | --gc:arc is essentially a garbage-free garbage collector. see how large it is. |
06:17:56 | FromDiscord | <myphs> I thought I could run the program until my memory runs out. So it would just allocate and never free |
06:18:03 | disruptek | indeed, it will. |
06:18:11 | FromDiscord | <Rika> And it would , yes |
06:18:14 | disruptek | how large the binary is has nothing to do with that. |
06:18:24 | Araq | --gc:none still includes our allocator |
06:18:36 | FromDiscord | <myphs> I see |
06:18:39 | Araq | and --gc:boehm doesn't. simple as that |
06:18:44 | FromDiscord | <Rika> Oh yeah that makes more sense now |
06:19:03 | Araq | you can use -d:useMalloc |
06:22:39 | FromDiscord | <myphs> That indeed makes more sense. Thanks |
06:26:22 | FromDiscord | <ElegantBeef> So when i get around to adding a `\n` after each mismatch, what should the option be for disabling that feature? D: |
06:26:24 | FromDiscord | <ElegantBeef> (edit) "D:" => "π" |
06:27:18 | disruptek | just bundle grep with the compiler. |
06:27:43 | FromDiscord | <ElegantBeef> I dont get the joke |
06:27:43 | * | habamax joined #nim |
06:27:50 | disruptek | i finally found a proper bug in nimph. |
06:28:22 | disruptek | https://github.com/disruptek/nimph/issues/145 |
06:28:23 | disbot | β₯ case insensitive github urls are exploited by nimpletons |
06:30:42 | disruptek | beef: nim c foo.nim | grep . |
06:31:00 | disruptek | well, not really proper, but it's a bug. i don't get many. |
06:31:04 | FromDiscord | <ElegantBeef> Seems like a fantastically bad idiea |
06:31:12 | FromDiscord | <ElegantBeef> Yea less a bug and more an issue with github |
06:33:59 | disruptek | i'm sure they have their reasons... but yeah, it's annoying simply because it provokes oversights like this. |
06:39:58 | ex_nihilo | disruptek: I think I figured it out-- `body` is not exported from `AsyncResponse`, so `response.body` is actually calling `body(response)`, which does return `Future[string]` |
06:40:03 | ex_nihilo | https://nim-lang.org/docs/theindex.html#body |
06:40:15 | disruptek | nice! |
06:40:27 | disruptek | shows how long its been since i was working on my startup. |
06:40:36 | ex_nihilo | I feel a bit better now ;) |
06:40:59 | disruptek | Araq: why zippy and not supersnappy? |
06:41:13 | Araq | ah... |
06:41:13 | disruptek | nevermind, i don't want to know. |
06:41:39 | disruptek | it's best that i forget my time in the compiler. |
06:42:35 | FromDiscord | <ElegantBeef> You can never forget it |
06:42:40 | Araq | I'm an idiot |
06:42:55 | Araq | confused zippy with snupersnappy :-( |
06:43:05 | Araq | well it's early in the morning |
06:43:15 | disruptek | eh, i'm sure ryan appreciates the sentiment nonetheless. |
06:43:20 | disruptek | what do you think of dist? |
06:43:23 | disruptek | !repo disruptek/dist |
06:43:24 | disbot | https://github.com/disruptek/dist -- 9dist: 11a nim distribution 15 2β 0π΄ |
06:43:35 | Araq | beats me |
06:43:52 | Araq | I don't understand how it works |
06:44:23 | * | leorize quit (Ping timeout: 240 seconds) |
06:44:52 | disruptek | what would help? |
06:45:05 | disruptek | c-blake... "aboriginal nimble authors" π€£ |
06:46:55 | * | leorize joined #nim |
06:48:03 | FromDiscord | <ElegantBeef> Ya know, i should probably make a forum post for nimscripter and actually add it to nimble |
06:48:23 | disruptek | are you an aboriginal canuck? |
06:48:29 | FromDiscord | <ElegantBeef> Nope |
06:48:40 | disruptek | i knew there was a reason i didn't like you. |
06:48:53 | FromDiscord | <ElegantBeef> Lol |
06:49:03 | FromDiscord | <ElegantBeef> We've spoke before so i'd imagine that'd be enough reason |
06:59:00 | disruptek | ah, yeah, that's probably what it is. |
07:06:57 | * | letto quit (Read error: Connection reset by peer) |
07:10:16 | FromDiscord | <himu> sent a code paste, see https://play.nim-lang.org/#ix=2Jei |
07:12:05 | ForumUpdaterBot | New thread by ElegantBeef: Nimscripter - Easy Nimscript-Nim interop, see https://forum.nim-lang.org/t/7283 |
07:14:58 | FromDiscord | <ElegantBeef> Maybe checkout the unicode module, idk π |
07:16:24 | * | leorize quit (Remote host closed the connection) |
07:18:50 | FromDiscord | <himu> sure. Even C fails to get it correct. unicode is difficult it seems to parse. SMH |
07:19:13 | FromDiscord | <himu> (edit) "correct." => "correct or I don't know what I am doing wrong." |
07:20:12 | * | leorize joined #nim |
07:58:46 | FromDiscord | <mratsim> sent a long message, see http://ix.io/2Jey |
07:58:48 | FromDiscord | <mratsim> There is no 2. |
08:02:18 | * | PMunch joined #nim |
08:02:54 | disruptek | to me this isn't "we introduced flexiblity" it's "we can't abstract it". |
08:03:44 | disruptek | just think about how elegant cps is. |
08:04:27 | disruptek | it's never any more or less complex than this. |
08:04:48 | disruptek | and yet it's the basis for all the control-flow we might want. |
08:05:27 | disruptek | and it synergizes with arc as if it were designed to be passed between threads on a multicore cpu from 1970. |
08:06:39 | disruptek | in no case does your continuation need to know anything at all about the scheduler. |
08:08:21 | voltist | Is there a way to use Nim's threads so wrong that it isn't actually multithreading? I'm spawning threads with `spawn` but it doesn't seem to give nearly as much of a speed increase as it should (each individual process takes a good few seconds to run, so it should be almost 1/4 the time on my CPU with 4 cores, right?) |
08:08:51 | disruptek | you won't get 100% utilization from each core. |
08:10:05 | voltist | I'm thinking it should still be more than this; the improvement is about the length of one of the operations i'm multithreading, so I can't even be sure it's not just random noise |
08:10:13 | disruptek | what does `time` say? |
08:10:27 | FromDiscord | <mratsim> @voltist, there are plenty of way to use threads so wrong that you slowdown by N100% where n is your number of cores. |
08:10:49 | disruptek | it sounds like simple process spawns, though. |
08:10:55 | voltist | Well at least it's not slowing down :) |
08:11:09 | FromDiscord | <mratsim> false sharing can occur with simple spawn |
08:11:19 | voltist | I'm using channels as well if that makes a difference |
08:11:26 | FromDiscord | <mratsim> you jjust need 4 threads to put data in a non padded array[4, bool] |
08:11:27 | disruptek | lol |
08:12:16 | FromDiscord | <mratsim> I can't tell you without seeing the code |
08:12:32 | disruptek | i think i'd rather be asleep right now. |
08:12:42 | FromDiscord | <mratsim> and even if I see it, sometimes it takes me a while to understand perf bugs especially multithreading |
08:13:18 | voltist | Is it possible that channels is hindering it? |
08:13:18 | disruptek | you're sending process output to the dispatching thread? |
08:13:21 | voltist | Code is here: https://github.com/dizzyliam/astroNimy/blob/master/src/astroNimy/detect.nim |
08:13:26 | disruptek | yes, it is possible. |
08:13:27 | voltist | At bottom of file |
08:14:39 | voltist | My apologies for the lack of comments |
08:14:40 | FromDiscord | <mratsim> what's the "Image" type? |
08:14:51 | FromDiscord | <mratsim> how big is it? |
08:15:04 | voltist | https://github.com/dizzyliam/astroNimy/blob/master/src/astroNimy/dataTypes.nim |
08:15:30 | disruptek | hmm. |
08:15:31 | voltist | It can be very big because it holds FITS images |
08:15:36 | FromDiscord | <mratsim> yeah so you have a Table, a seq inside |
08:15:51 | FromDiscord | <mratsim> and if you use arraymancer from before last week, a full tensor |
08:16:11 | FromDiscord | <mratsim> what you should do instead is pass ownership in the channel (so a pointer) |
08:16:26 | FromDiscord | <mratsim> but with the default GC you're likely to break refcounting and collect memory in the wrong GC |
08:17:00 | FromDiscord | <mratsim> ultimately for computational physics it's probably better to use Weave. |
08:17:21 | voltist | Actually I've just realized that the detectStars proc only modifies one part of the Image object (and it's not the tensor!), so I could just make it return that only over the channel |
08:17:39 | disruptek | especially if you plan to publish. π |
08:18:29 | voltist | Yay new things to learn |
08:18:30 | FromDiscord | <mratsim> does detectStars need to resize the sequence? |
08:19:33 | voltist | Yes, but I think I'll do the actual modification of the Image objects outside of the spawned threads |
08:19:41 | voltist | Once the channel has returned a resized seq |
08:20:03 | FromDiscord | <mratsim> because if you don't, I would pass just ptr UncheckedArray of the seq to thread directly and avoid channels here |
08:20:26 | FromDiscord | <mratsim> for numerical computing you especially want to avoid Nim channels |
08:21:57 | FromDiscord | <mratsim> basically, channels simplify synchronization, you don't have ordering to worry about |
08:22:33 | FromDiscord | <mratsim> but in scientific computing, often you work on patches/different part of the problem, for example independant part of an image or a tensor |
08:22:39 | FromDiscord | <mratsim> that's called data parallel. |
08:22:59 | FromDiscord | <mratsim> in that case, you don't need synchronization via a channel, because you just don't have such constraint. |
08:23:45 | FromDiscord | <mratsim> so just use threadpool and gives different part of the image to each thread. |
08:24:24 | FromDiscord | <mratsim> and if you can, pre-dimension everything and just pass raw ptr UncheckedArray via spawn to avoid deep copies. |
08:25:45 | voltist | I |
08:25:50 | voltist | Oopd |
08:25:54 | voltist | Oops |
08:26:05 | voltist | I'll try to stick to that in future |
08:26:22 | FromDiscord | <mratsim> also not sure if relevant: https://github.com/HugoGranstrom/nimbody |
08:27:02 | FromDiscord | <mratsim> don't worry, multithreading is something hard to get right, both as an implementer and a user. |
08:27:12 | ldlework | amen |
08:27:40 | FromDiscord | <mratsim> just like in traditional computer science, a big part of solving the problem is choosing your data structure. For multithreading it's choosing how to partition work. |
08:29:02 | FromDiscord | <mratsim> Also you will here a lot about "don't communicate by sharing, share by communicating" as a slogan for message-passing (for Go or Rust for example).β΅This is about concurrency, but you likely have a parallelism problem. |
08:29:29 | FromDiscord | <mratsim> anyway, don't hesitate to ask or ping me here or in the science channel in doubt. |
08:30:05 | FromDiscord | <mratsim> Also I can probably add your example to Weave benchmarks, it seems quite self contained: https://github.com/mratsim/weave/tree/master/benchmarks |
08:30:14 | FromDiscord | <mratsim> (edit) also not sure if relevant: https://github.com/HugoGranstrom/nimbody |
08:32:09 | voltist | Awesome, thanks for your help |
08:36:53 | * | superbia1 is now known as superbia |
08:44:31 | PMunch | disruptek, I saw you added me to your dist repo :) Anything in particular you wanted me to do there? |
08:48:46 | FromDiscord | <lqdev> ^ |
08:54:14 | * | letto joined #nim |
09:00:06 | * | jonjitsu[m] quit (Quit: Idle for 30+ days) |
09:00:55 | * | wowi42 quit (Remote host closed the connection) |
09:01:40 | * | wowi42 joined #nim |
09:32:48 | * | klaufir_ joined #nim |
09:37:19 | * | Arrrrrrrr joined #nim |
09:51:38 | FromDiscord | <mratsim> Forum is down? |
09:52:00 | PMunch | Appears like it |
09:52:20 | narimiran | @dom96 ^ |
09:55:44 | FromDiscord | <mratsim> https://blog.johnnovak.net/2020/12/21/nim-apocrypha-vol1/ top 15 of HN |
09:56:43 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
09:56:56 | PMunch | Oh, good to see that John Novak is still writing about Nim |
09:57:22 | PMunch | Still the largest post on my site by far is the time when I replied to his UI thing :P |
10:04:58 | PMunch | Haha, I like his first (and only) bookmark :P |
10:05:07 | PMunch | s/bookmark/footnote |
10:05:27 | * | letto quit (Quit: Konversation terminated!) |
10:05:53 | * | letto joined #nim |
10:05:56 | FromDiscord | <lqdev> nim website is down |
10:07:11 | PMunch | It's up for me |
10:07:14 | PMunch | But the forums are down |
10:07:39 | superbia | website is up, forum is down for me |
10:07:42 | FromDiscord | <pointystick> Both the main website and the forums are working |
10:08:01 | Prestige | I can't get to the docs or forum |
10:08:21 | PMunch | Docs are up for me |
10:08:22 | superbia | correction, forum just got back online |
10:11:43 | narimiran | TIL about `dump` |
10:13:05 | FromDiscord | <lqdev> oh really? |
10:13:07 | * | Tlangir quit (Remote host closed the connection) |
10:13:43 | Prestige | That was a pretty great read |
10:17:06 | Zevv | "Speaking of the system module, itβs full of useful stuff thatβs not mentioned anywhere in the documentation. Make sure to go through the function list once in a while, Iβll guarantee youβll find something of interest every time" |
10:24:40 | FromDiscord | <Yardanico> is nim-lang.org down? |
10:24:46 | FromDiscord | <Yardanico> 522 |
10:26:09 | FromDiscord | <lqdev> yes. |
10:26:13 | FromDiscord | <Yardanico> F |
10:26:51 | PMunch | Oh, now the main site is down for me as well |
10:27:09 | PMunch | Playground and IRC logs are still up though |
10:27:38 | superbia | $ halt |
10:27:55 | PMunch | @dom96 is the only one I know who has access to those servers |
10:28:11 | PMunch | Let's hope he hasn't taken Christmas vacation just yet |
10:28:28 | FromDiscord | <lqdev> it's still quite early in the morning in England tho so maybe he's just asleep |
10:28:35 | FromDiscord | <lqdev> or eating breakfast |
10:29:31 | FromDiscord | <lzoz> it's back online |
10:39:21 | PMunch | Hoorah! |
10:51:15 | FromDiscord | <mratsim> @Zevv, @disruptek, btw if CPS work you can publish a paper on it, because it would make it very easy to implement a "continuation-stealing" scheduler. To understand how big of a deal it is http://www.open-std.org/Jtc1/sc22/wg21/docs/papers/2014/n3872.pdf |
10:52:13 | FromDiscord | <mratsim> In practice: that would make Weave have less tasks in flight at any point in time, bounded by the number of processors instead of unbounded. |
10:52:19 | PMunch | Hmm, is this when I should mention that I did write a work-stealing algorithm that stole closure iterators across threads by using one of the threadsafe GCs? |
10:52:25 | FromDiscord | <mratsim> so way less stress on the memory manager |
10:52:50 | FromDiscord | <mratsim> and maybe I can remove the memory pool from Weave altogether |
10:52:57 | FromDiscord | <mratsim> I have to think about it. |
10:53:45 | FromDiscord | <mratsim> I.e. instead of a memory pool, I can just have 1 scratchspace on each thread and tail-call continuations. |
10:54:52 | FromDiscord | <mratsim> @PMunch, tell me more? |
10:55:31 | PMunch | It was just a little experiment I did |
10:55:53 | PMunch | Not even sure if I still have it around |
10:57:40 | PMunch | Let me see if I can find it |
10:59:29 | PMunch | Hmm, can't find it, might be on my laptop or my work machine |
11:00:04 | PMunch | I saw it the other day while looking for something else |
11:00:24 | * | Vladar joined #nim |
11:04:50 | Zevv | PMunch: the irony is lost on him |
11:05:18 | Zevv | oh you were not being ironic :) |
11:06:28 | PMunch | Haha :P |
11:07:06 | PMunch | It was just a silly little thing I wrote based on my recollection of the Cilk++ paper I read in Uni |
11:09:55 | FromDiscord | <mratsim> a simple work stealing scheduler just to handle spawn/sync isn't that hard |
11:10:32 | FromDiscord | <mratsim> instead of having a single queue in the Nim threadpool, you have an array of queues, each slot owned by a thread. |
11:11:06 | FromDiscord | <mratsim> on spawn, a thread enqueue the child function (or the continuation) in its queue |
11:11:57 | FromDiscord | <mratsim> the queue is actually a threadsafe dequeue, the owner enqueue and pop from one end, and the thieves when they have nothing in their own queue pop from the other end to limit synchronization conflict. |
11:11:59 | FromDiscord | <mratsim> and that's all. |
11:13:57 | PMunch | I remember doing some trickery around the queues and the stealing to make it thread safe though |
11:14:55 | Zevv | whe needs mratsim when we have PMunch?! |
11:15:00 | FromDiscord | <mratsim> yep that's the hard part |
11:15:03 | Zevv | I don't even know what half of those words mean |
11:15:19 | FromDiscord | <dom96> PMunch: I'm still around |
11:15:20 | FromDiscord | <mratsim> but there are papers that give you the C code (instead of algorithm in strange math speak) |
11:15:24 | FromDiscord | <dom96> Guess cloudflare had a hiccup, maybe? |
11:15:40 | PMunch | @dom96, seems so, if you didn't do anything to fix it :P |
11:15:51 | PMunch | A bit strange though that the playground never went down |
11:16:00 | PMunch | If it was a CF issue |
11:16:14 | FromDiscord | <mratsim> this is a threadsafe dequeue for work stealing: https://github.com/mratsim/weave/blob/v0.1.0/experiments/e01_staccato/task_deque.nim#L83-L137 |
11:16:26 | FromDiscord | <dom96> https://www.cloudflarestatus.com/ |
11:16:34 | FromDiscord | <dom96> yep, cloudflare issue |
11:17:21 | FromDiscord | <dom96> nim-lang.org officially has better uptime than cloudflare π |
11:17:47 | FromDiscord | <mratsim> In Weave I don't share the deque across threads which has interesting tradeoffs. You can block the runtime if you block in a thread, but you can do way better load balancing (and you should put blocking stuff in a blocking threadpool anyway, why use a HPC runtime for stdin read?). |
11:30:10 | FromDiscord | <mratsim> Oh, another realization for @dom96 , and @Zevv and @disruptek , if you have first continuations that you execute on a work-stealing threadpool you don't have to worry about blocking reads unless ALL your threads end up blocked. |
11:30:32 | FromDiscord | <mratsim> you make progress on your events even if one is blocked. |
11:34:00 | FromDiscord | <dom96> Yes, of course. But how many real threads can you realistically have? |
11:37:39 | FromDiscord | <mratsim> 10k π |
11:39:06 | FromDiscord | <mratsim> if you have a work stealing threadpool without continuation, you have another issue, it's unbounded pending task growth: http://www.open-std.org/Jtc1/sc22/wg21/docs/papers/2014/n3872.pdf |
11:39:33 | FromDiscord | <mratsim> Weave solves that with memory pool, but that memory pool needs logic to return memory to the OS |
11:40:08 | FromDiscord | <mratsim> and it needs another layer of caching (a "look-side list") to be able to handle trillions of tasks |
11:40:18 | FromDiscord | <mratsim> in 100ms |
11:40:26 | FromDiscord | <mratsim> so billions of task per second |
11:40:37 | FromDiscord | <mratsim> milliseconds |
11:41:34 | FromDiscord | <mratsim> (not all are allocated, there is backpressure logic) |
11:42:56 | FromDiscord | <mratsim> anyway still thinking about this but there is high potential to further reduce Weave or any scheduler overhead in a novel way. |
11:46:50 | FromDiscord | <mratsim> This paper uses fibers: http://chaoran.me/assets/pdf/ws-spaa16.pdf which have higher overhead than continuations but apparently they reduce overhead by 3x to 8x compared to Intel Cilk and Intel TBB. I can reproduce. |
11:47:12 | FromDiscord | <mratsim> though only on toy bench like fib(40) (Weave can only do 1.5x and 6x) |
12:01:17 | FromDiscord | <zetashift> Oh sudden Nim on HN |
12:01:31 | FromDiscord | <zetashift> Also a lot of good stuff on the forum too |
12:08:52 | FromDiscord | <mratsim> Also found 2 killer apps for no allocation coroutines or continuations:β΅- writing kernel-mode drivers.β΅- writing cryptographic handshake like TLS. |
12:09:46 | FromDiscord | <mratsim> They both involve complex state machines, that need to be paused/resume to interleave with waiting for a reply. |
12:10:08 | FromDiscord | <mratsim> and heap alloc is more than strongly discouraged. |
12:15:47 | Zevv | I wonder, is HN just a small a group of people hanging around in the same bubble? |
12:16:43 | FromDiscord | <dom96> oh cool, Nim on HN. Nice. |
12:20:50 | FromDiscord | <Recruit_main707> Would it be too hard/break too much stuff to allow threads to have multiple arguments? Or at least, extend the {.thread.} pragma so that it takes care of this for you? |
12:22:31 | FromDiscord | <dom96> probably not, you can definitely write a quick macro to do this at least |
12:24:00 | FromDiscord | <mratsim> pass a tuple |
12:24:13 | FromDiscord | <mratsim> same with multiple return values |
12:24:14 | FromDiscord | <Recruit_main707> Would a PR that added this be welcome? (note that I am not considering doing it in a close future, but maybe once I am more familiar with macros...) |
12:24:50 | FromDiscord | <mratsim> just use an overload that varargs into tuple. |
12:25:18 | FromDiscord | <Recruit_main707> Yeah, it adds an unnecessary complexity to the function body |
12:25:35 | FromDiscord | <mratsim> I don't think it's worth it though |
12:26:20 | FromDiscord | <mratsim> project that use raw threads are likely to want to customize many things and adding a 2 line function to pack args in a tuple is something they can do. |
12:26:52 | FromDiscord | <mratsim> createThread((a, b)) and done even |
12:27:04 | FromDiscord | <mratsim> instead of createThread(a, b) |
12:28:16 | FromDiscord | <Recruit_main707> I think Iβll write an rfc, although having the god of multithreading against the idea might make things harder :p |
12:34:50 | * | NimBot joined #nim |
12:35:02 | FromDiscord | <mratsim> it's not multithreading though, it it's more similar to adding an overload for `proc add[T, U](s: var seq[(T, U)], a: T, b: U)` |
12:35:49 | FromDiscord | <mratsim> so allowing s.add(a, b) instead of s.add((a, b)) for sequence of tuples. |
12:44:58 | FromDiscord | <Recruit_main707> its not about how you call the function, its about how you write it, with a tuple, its just dumb having to add an `args.actualArgument` to use stuff |
12:51:56 | FromDiscord | <ArkarMinMyat> I installed nim v.1.2. from choosenim and set path in ~/.profile. but nim -v only work on installed console https://media.discordapp.net/attachments/371759389889003532/791286971104100362/Screen_Shot_2020-12-23_at_19.19.21.png |
12:52:26 | FromDiscord | <ArkarMinMyat> (edit) "v.1.2." => "v.1.2.6" | "console" => "console. Any Idea?" |
12:55:48 | FromDiscord | <Recruit_main707> did you op |
12:56:02 | FromDiscord | <Recruit_main707> en the console before installing nim? |
12:56:08 | PMunch | Hmm, for point 5 here, is there a way to override `echo` so that you can specify e.g. file logging? https://blog.johnnovak.net/2020/12/21/nim-apocrypha-vol1/ |
12:56:46 | FromDiscord | <ArkarMinMyat> Yes I closed and try in another console not work! |
12:57:06 | FromDiscord | <mratsim> I would have to see an example in the RFC |
13:00:34 | FromDiscord | <Recruit_main707> @ArkarMinMyat maybe you need to restart the pc, but i dont know |
13:03:56 | FromDiscord | <ArkarMinMyat> not work! even restart! |
13:04:59 | FromDiscord | <ArkarMinMyat> It is possible to downgrade nim v.1.4.2 to v.1.2.6? |
13:05:05 | PMunch | Yes |
13:05:16 | PMunch | With choosenim simply do `choosenim 1.2.6` |
13:05:52 | PMunch | It's just a matter of setting the PATH correctly for both of your terminals |
13:05:58 | PMunch | How they set this depends on the terminal |
13:12:39 | FromDiscord | <ArkarMinMyat> When I installed nim from homebrew and installed choosenim from nimble package. But choosenim command not found!!!!! https://media.discordapp.net/attachments/371759389889003532/791292183453237258/Screen_Shot_2020-12-23_at_19.41.03.png |
13:13:25 | FromDiscord | <mratsim> you need to add $HOME/.nimble/bin to your path or something like that |
13:13:51 | FromDiscord | <mratsim> @dom96 ^ a reminder when nimble installs binaries? |
13:17:57 | PMunch | @ArkyarMinMyat, note, when installing Nim from homebrew and later using choosenim you should uninstall the version from homebrew. Homebrew packages typically have precedence so you'd end up in a situation where `choosenim` would install Nim and put it in your path but your shell will find the homebrew version first and use that. |
13:18:27 | FromDiscord | <flywind> !eval import fenv; echo epsilon(float64) |
13:18:30 | NimBot | 2.220446049250313e-16 |
13:19:49 | FromDiscord | <flywind> Is `epsilon(float64)` a good base for `almostEqual`? |
13:20:11 | FromDiscord | <lqdev> not at all |
13:20:49 | FromDiscord | <lqdev> the machine epsilon is only precise for the first few values a float can represent, so eg. 100 + epsilon(float64) is probably gonna be equal to 100 |
13:21:34 | FromDiscord | <lqdev> you're much better off using a bigger epsilon like 0.001 |
13:22:00 | FromDiscord | <flywind> Yeah I mean stdlib https://github.com/nim-lang/Nim/blob/b1c3dab2089bb4327627c2152a1148b299f1a930/lib/pure/math.nim#L213 |
13:23:52 | * | lf_ joined #nim |
13:24:43 | * | superbia quit (Ping timeout: 246 seconds) |
13:28:32 | * | lf_ quit (Client Quit) |
13:28:34 | * | Q-Master quit (Ping timeout: 246 seconds) |
13:29:14 | * | lf_ joined #nim |
13:33:48 | FromDiscord | <flywind> I would prefer `almostEqualxxx(x, y, 1e-9)` instead of `almostEqual(x, y, 10000)` which I need to guess the real differences of these two numbers. |
13:44:58 | * | lf_ quit (Read error: Connection reset by peer) |
13:45:21 | * | lf_ joined #nim |
13:46:56 | FromDiscord | <Rika> you have to scale the epsilon to the size of the float or smth |
13:47:45 | FromDiscord | <Rika> i always refer to this, but i cant tell if its trustworthy |
13:47:46 | FromDiscord | <Rika> https://floating-point-gui.de/errors/comparison/ |
13:53:52 | FromDiscord | <juan_carlos> @ElegantBeef People that dont know Nim do not understand the benefit on the video, they do not immediately understand part is compiled part is interpreted, it needs a non-Nim description, kinda like "This shows interoperability of Nim compiled and interpreted, would be similar to embed Lua on C++" something like that. |
13:54:36 | FromDiscord | <mratsim> @flywind depending on your application you as a dev need to decide if the relative difference (percentage) or the absolute difference (magnitude) is more important |
13:55:17 | FromDiscord | <mratsim> see relative_error and absolute_error here: https://github.com/mratsim/Arraymancer/blob/master/src/arraymancer/ml/metrics/common_error_functions.nim#L35-L66 |
13:55:42 | FromDiscord | <mratsim> and you need to also choose the tolerance. |
13:55:53 | Zevv | yeah but people are not very tolerant these days, are they |
13:56:02 | FromDiscord | <mratsim> some applications need 1e-14 because errors get multiplied for example |
13:56:36 | FromDiscord | <mratsim> others use stochastic/random processes and so don't care about error much (like machine learning or Monte Carlo) |
13:59:48 | * | Q-Master joined #nim |
14:00:38 | * | habamax quit (Quit: leaving) |
14:03:50 | FromDiscord | <himu> sent a code paste, see https://play.nim-lang.org/#ix=2Jgt |
14:05:06 | * | Q-Master quit (Ping timeout: 256 seconds) |
14:05:46 | FromDiscord | <flywind> thanks |
14:06:09 | FromDiscord | <mratsim> echo "\u10000000"? |
14:06:15 | FromDiscord | <himu> yeah |
14:07:36 | FromDiscord | <himu> Sorry capital U |
14:07:54 | * | oddp joined #nim |
14:07:54 | FromDiscord | <mratsim> what's the capital U supposed to do? |
14:08:03 | FromDiscord | <flywind> !eval echo "\U10000000".repr |
14:08:06 | NimBot | 0x55580dcad870"\225\128\1280000" |
14:08:20 | FromDiscord | <mratsim> https://play.nim-lang.org/#ix=2Jgu |
14:08:28 | FromDiscord | <mratsim> I do get unicode |
14:11:50 | FromDiscord | <mratsim> @zevv, @disruptek: everyone on the CPS bandwagon: https://www.joachim-breitner.de/blog/778-Don%E2%80%99t_think%2C_just_defunctionalize |
14:13:02 | FromDiscord | <himu> sent a code paste, see https://paste.rs/wDA |
14:15:11 | Zevv | yeah I saw that |
14:15:34 | FromDiscord | <himu> https://en.wikipedia.org/wiki/Escape_sequences_in_C. Refer to this |
14:16:33 | FromDiscord | <mratsim> probably no one used it so should be a feature request. |
14:19:05 | FromDiscord | <himu> Should I make a pull request on this one? Somehow it leads me to believe this will make nim future secured. I guess. I am writing a parser for a library of my own. I was exploring unicode support in languages. Nim has till `/u`. |
14:21:25 | FromDiscord | <mratsim> you can make a PR directly yes |
14:22:00 | FromDiscord | <mratsim> just make sure that you refer to the C escape code and maybe Python if they behave the same. |
14:22:23 | FromDiscord | <mratsim> I'm under the impression that strutils is more designed after Python. |
14:23:37 | FromDiscord | <himu> python3 supports it as well. try `print("\U00010000")` |
14:28:33 | * | narimiran quit (Ping timeout: 268 seconds) |
14:28:39 | * | narimiran_ joined #nim |
14:29:03 | Fish-Face | is there a built in way to get the modulo operator which returns values in the range 0..n-1 rather than -n+1..n-1? |
14:29:18 | narimiran_ | Fish-Face: we have `floorMod` |
14:29:37 | Fish-Face | thanks |
14:29:58 | * | lessismore joined #nim |
14:30:19 | FromDiscord | <flywind> see https://github.com/nim-lang/Nim/pull/16414 |
14:30:19 | disbot | β₯ add `euclDiv` and `euclMod` to `math` |
14:31:00 | Fish-Face | that is... recent! |
14:31:04 | * | lessismore quit (Remote host closed the connection) |
14:31:17 | * | Arrrrrrrr1 joined #nim |
14:31:52 | * | Arrrrrrrr quit (Ping timeout: 260 seconds) |
14:31:53 | Fish-Face | what's the difference between `euclMod` and `floorMod`? |
14:33:04 | FromDiscord | <flywind> floorMod has same sign as b |
14:33:12 | Fish-Face | ah |
14:33:18 | FromDiscord | <flywind> euclMod: is non-negative |
14:33:37 | Fish-Face | it has never occurred to me to use the operator with a negative b... |
14:35:35 | FromDiscord | <flywind> https://media.discordapp.net/attachments/371759389889003532/791313053387718656/unknown.png |
14:36:03 | FromDiscord | <flywind> rF is `floorMod` and rE is `euclMod` |
14:36:13 | Fish-Face | I understood already but thanks |
14:36:35 | FromDiscord | <flywind> np |
14:44:35 | * | Q-Master joined #nim |
14:48:49 | * | Zevv quit (Ping timeout: 264 seconds) |
14:55:07 | * | Arrrrrrrr1 quit (Quit: Arrrrrrrr1) |
15:03:59 | FromDiscord | <krisppurg> sent a code paste, see https://play.nim-lang.org/#ix=2Jh1 |
15:05:00 | * | lf_ quit (Quit: lf_) |
15:05:24 | * | lf_ joined #nim |
15:05:35 | * | Zevv_ joined #nim |
15:07:11 | * | lf_ quit (Client Quit) |
15:07:42 | * | PMunch quit (Quit: leaving) |
15:08:44 | * | Arrrrrrrr joined #nim |
15:20:01 | FromDiscord | <himu> @mratsim So unicode is fully supported but we have to do `echo "\u{00010000}"` instead of the conventional approach of C and Python. |
15:20:47 | * | Zevv_ quit (Quit: leaving) |
15:21:06 | * | ico joined #nim |
15:29:14 | * | vikfret quit (Read error: Connection reset by peer) |
15:43:37 | * | lf_ joined #nim |
15:53:54 | FromDiscord | <jseb> i want to generate wasm from nim. So i've compiled my nim source wth -c option to get the source. I've found the source in the cache directory, and now ? |
15:55:25 | FromDiscord | <jseb> sent a code paste, see https://play.nim-lang.org/#ix=2Jhd |
15:56:00 | FromDiscord | <lqdev> don't forget to {.exportc.} the proc, otherwise it'll get mangled |
15:57:10 | FromDiscord | <jseb> and i think it's stripped because not used |
15:57:46 | FromDiscord | <jseb> i remember there is a switch for «no main()» , too⦠|
15:58:52 | * | rockcavera joined #nim |
15:59:47 | FromDiscord | <jseb> sent a code paste, see https://play.nim-lang.org/#ix=2Jhe |
16:00:48 | FromDiscord | <lqdev> yeah don't expect it to get any better |
16:01:00 | FromDiscord | <lqdev> Nim's C output isn't supposed to be human friendly |
16:02:01 | FromDiscord | <jseb> sent a code paste, see https://play.nim-lang.org/#ix=2Jhg |
16:02:03 | FromDiscord | <lqdev> ah well yeah |
16:02:07 | FromDiscord | <lqdev> -d:danger removes checks |
16:02:52 | FromDiscord | <jseb> i thought it would remove the first affectation, too |
16:03:15 | FromDiscord | <jseb> but it's probably removed by the c compiler, anyway |
16:03:47 | FromDiscord | <lqdev> Nim relies on the C compiler for simple optimizations like this |
16:06:25 | FromDiscord | <jseb> ok now i think it's a matter of sed/awk for generating missing declarations, before sending it to llvm compiler |
16:07:00 | FromDiscord | <mratsim> we have a repo generating wasm from Nim directly via nlvm |
16:07:07 | FromDiscord | <mratsim> and you can use emscripten |
16:07:14 | FromDiscord | <mratsim> or clang wasm switch |
16:07:34 | FromDiscord | <jseb> yes i was thinking using clang with wasm switch |
16:08:09 | FromDiscord | <jseb> i was wondering if it was useful to use emscripten , if i'm not interested in pre-wrapped libs like SDL |
16:08:50 | FromDiscord | <jseb> nlvm would may be prevent me for re-inventing the wheel |
16:10:16 | * | lf_ quit (Ping timeout: 240 seconds) |
16:11:06 | ForumUpdaterBot | New post on r/nim by sigzero: Nim Apocrypha, Vol. I, see https://blog.johnnovak.net/2020/12/21/nim-apocrypha-vol1/ |
16:20:31 | * | lf_ joined #nim |
16:20:32 | FromDiscord | <notchris> i wish i could access the camera on osx with nim |
16:20:37 | FromDiscord | <notchris> its been such a pain |
16:20:54 | ico | notchris: how would one do that from C or C++ then |
16:21:39 | * | ico is now known as Zevv |
16:21:50 | FromDiscord | <notchris> Good question, probably with the latest opencv or qt maybe |
16:22:00 | Zevv | if you can do it from C, you can do it from Nim |
16:22:22 | Zevv | but honestly, I don't think opencv or qt will do anything for you |
16:22:39 | notchris | hmm |
16:22:45 | Zevv | these might have some kidn of binding for accessing the cam, but it's not something that's offered by these libs |
16:22:51 | notchris | yeah i tried the cv nim pkg and the qml one |
16:23:15 | notchris | and i know on osx apps need a listing in their plist for camera access |
16:23:18 | notchris | so its just super locked down |
16:24:13 | Zevv | you need to find the native API on osx to do that |
16:24:20 | Zevv | that's prbly what opencv and qt also use |
16:25:21 | notchris | Right, they access AVFoundation |
16:25:37 | notchris | But i wouldnt know where to start in accessing the native api |
16:25:44 | notchris | let alone granting camera access |
16:25:50 | notchris | guess ill have to read a lot :) |
16:26:24 | Zevv | Anyway, your problem is not a Nim problem |
16:26:49 | notchris | haha yeah that's fair |
16:27:11 | notchris | if i figure it out, ill be sure to make the solution pub |
16:27:26 | Zevv | cool |
16:28:37 | * | lf_ quit (Quit: lf_) |
16:30:59 | disruptek | i had no trouble accessing your camera. |
16:31:05 | disruptek | regrets, yes, i have plenty of those. |
16:33:07 | FromDiscord | <notchris> Lol disruptek |
16:33:18 | FromDiscord | <notchris> Sorry if Iβm lookin rough |
16:34:40 | FromDiscord | <mratsim> Don't look rough, disruptek will be jealous |
16:36:16 | disruptek | i'm pretty much the definition of `rough sleeper` in multiple languages and cultures. |
16:37:13 | disruptek | pmunch: i add people with numerous packages to try to coalesce ecosystems. you can offer tips to keep your stuff cooperating. |
16:40:27 | Zevv | today I have been working from the blanket ford. I should do that more often |
16:55:20 | * | azed joined #nim |
17:00:21 | FromDiscord | <mratsim> Zevv the blanket lord |
17:02:42 | * | lritter joined #nim |
17:24:33 | * | habamax joined #nim |
17:28:32 | * | xet7 quit (Ping timeout: 256 seconds) |
17:30:17 | * | lf_ joined #nim |
17:39:19 | * | ex_nihilo quit (Quit: Leaving) |
17:47:37 | FromDiscord | <Avatarfighter> blankets truly are heaven |
17:47:44 | FromDiscord | <Avatarfighter> they boost productivity |
17:53:09 | Zevv | It makes me wonder |
17:53:22 | Zevv | why in modern houses people don't make these nooks and crannies anymore |
17:53:26 | Zevv | just a little corner where you can hide |
17:53:31 | Zevv | with a little bookshelf |
17:54:31 | * | superbia joined #nim |
17:56:36 | Zevv | so disruptek |
17:56:36 | disruptek | people don't understand the value of intimate accomodations. |
17:56:49 | Zevv | right. It's all about mΒ² |
17:57:00 | disruptek | i wanna build a house that is warren-like and dark, like my rv. |
17:57:13 | Zevv | like an rv, but with proper insulation |
17:57:15 | disruptek | gimme 4 floors and i'll put 7 levels. |
17:57:27 | disruptek | little rooms. task lights. |
17:57:41 | disruptek | somewhere designed for neckbeards to nest. |
17:57:50 | Zevv | i shaved |
17:58:02 | disruptek | all the rooms will smell like sex and contempt. |
17:58:13 | disruptek | you shaved down there? |
17:58:20 | Zevv | down there |
17:58:23 | Zevv | in the neck |
17:58:30 | disruptek | the neck of the shaft? |
17:58:46 | disruptek | i had to shear myself yesterday. i couldn't take it anymore. |
17:58:58 | Zevv | I will now watch mratsims video |
17:59:38 | Zevv | to see if I can grasp this plan you two have been cooking up |
18:00:00 | disruptek | i'll tell you right now, it's a bad idea. |
18:00:28 | disruptek | it's very limited. |
18:00:38 | Zevv | that was /my/ point |
18:00:39 | Zevv | remember |
18:01:16 | disruptek | yes, but if he wants to do it for his limited use-case, i'm fine with it. |
18:01:28 | Zevv | I was so ahead of my time. Going through mratsims list it looks like coros are really /the/ latest hype. I have been raving about them for over a decade and no one got it. They just didn't. |
18:01:40 | Zevv | ok, so we agree this is not a good idea |
18:01:54 | Zevv | so I *did* understand perfectly right |
18:02:01 | disruptek | no. π |
18:02:09 | disruptek | look, there are two approaches here: |
18:02:30 | disruptek | in the first, we use a ref. we can convert it around, return it, it holds the fn. |
18:02:38 | disruptek | you're well-familiar with that method. |
18:02:42 | Zevv | right. |
18:03:08 | disruptek | in the second, we use an object. we mutate the object and return the fn. no memory access. all of cps can be rewritten as a fsm. |
18:03:26 | disruptek | returning the fn is rewritten as returning the state. |
18:03:34 | disruptek | the whole thing can live on the stack. |
18:03:46 | Zevv | whats in "the object" |
18:03:52 | Zevv | the locals, right, lifted just as they are now |
18:04:02 | Zevv | how is that different from #1 where we don't put fn in the env object |
18:04:22 | disruptek | in #1 we /do/ put the fn. |
18:04:30 | disruptek | like cps is now. |
18:04:41 | Zevv | the problem for using a var object instead of a ref was the typing propagating into the trampoline, right? |
18:04:48 | Zevv | we decided we can type-erase that |
18:04:52 | Zevv | and just ptr around |
18:05:05 | Zevv | for generated code, that's perfectly acceptable imho |
18:05:20 | disruptek | if you use an object, what i call #2, you don't have a trampoline. |
18:05:43 | disruptek | and, really, you might not even need the object. you can use the scope itself as your object. |
18:05:50 | disruptek | it's good enough. |
18:05:56 | Zevv | no dude. |
18:06:04 | disruptek | yes. |
18:06:35 | disruptek | when you have vars that share scopes, they can share symbols. |
18:06:41 | Zevv | https://play.nim-lang.org/#ix=2Jbn where do the i's go |
18:06:44 | Zevv | I still don't understand |
18:07:09 | Zevv | draw a circle around them in memory, with my little red crayon |
18:07:36 | disruptek | the i's don't go anywhere. |
18:07:59 | Zevv | ooh, the i's don't go anywhere. now it makes sense |
18:08:09 | disruptek | counter disolves from a proc into inline code. |
18:08:17 | Zevv | there is /state/ |
18:08:21 | disruptek | dissolves? disolves? |
18:08:31 | Zevv | it has to be put somewhere. State has a location, place |
18:08:33 | disruptek | two 's's. |
18:08:49 | disruptek | yes, inside the loop, the i's exist. |
18:09:28 | Zevv | your earlier answer doesn't hold right? i_125143 and i_567456 |
18:09:33 | Zevv | because there's now a random number of i's |
18:10:13 | disruptek | hmm. |
18:10:23 | Zevv | what kind of "hmm." is that |
18:10:39 | disruptek | i'm just thinking your example might not work. |
18:10:46 | Zevv | right. |
18:10:59 | disruptek | but, look, the stack-based technique is inherently limited. |
18:11:04 | disruptek | it won't work all the time. |
18:11:13 | Zevv | no. but it will not work the most of the times for me |
18:11:17 | Zevv | because (wait, me is typing) |
18:12:48 | Zevv | https://play.nim-lang.org/#ix=2Jim |
18:13:02 | Zevv | real world stuff. not making this up. this is what people do. |
18:13:20 | Zevv | sounds silly right? Like, waiting on a server socket and dynamically creating clients for each connection |
18:13:35 | Zevv | That is what I ment with the "free floating" feeling of CPS |
18:13:54 | disruptek | yes but no; that's solved with a list of some sort. but here's the kicker that i didn't realize until i wrote the code: it's not just that the dispatcher is complicated, it's that you cannot return a continuation of a different type. that's a deal breaker for me. |
18:14:10 | Zevv | we type erase |
18:14:17 | Zevv | a continuation is a blob of bytes |
18:14:34 | disruptek | talk is cheap. |
18:14:34 | Zevv | if mratsim wants to do high-efficiency, he pools them and makes them fixed size on the stack |
18:14:38 | disruptek | i don't see how the code works. |
18:14:45 | Zevv | if I want to do this kind of stuff, I just alloc them as a ref |
18:14:59 | disruptek | you have to be able to grow as well as shrink. |
18:15:08 | disruptek | and you cannot be limited to 400 bytes or some such bullshit. |
18:15:13 | Zevv | that's mratsims problem |
18:15:23 | disruptek | yes, that's a #2 problem. a shitty problem. |
18:15:25 | Zevv | if you want to be dynamic, you go heap and you pay |
18:15:28 | disruptek | i don't want any part of it. |
18:15:35 | Zevv | if you want to be fast, you go mratsim an you pay something else |
18:15:49 | Zevv | but the CPS transform /should not care shit about this/ |
18:15:54 | Zevv | it's about what you build on top of it |
18:15:56 | disruptek | ah, but it must. |
18:16:16 | disruptek | because the stack version elides the trampoline. |
18:16:27 | Zevv | I don't see that. |
18:16:33 | disruptek | and that means it's the same as the fsm, and that means it's a different rewrite. |
18:16:36 | Zevv | You have an fn. You call it, and you get a new one, right? |
18:16:40 | Zevv | that still holds |
18:16:44 | disruptek | no. |
18:16:51 | Zevv | then I miss something |
18:17:01 | disruptek | there's no reason to lambda lift because the env doesn't change. |
18:17:10 | disruptek | so you're just moving the bodies around. |
18:17:35 | disruptek | since there's no proc pointer, there's no fn per se. there's a state variable. a static. |
18:17:48 | Zevv | ok, that's the duff-device version, allright |
18:17:49 | disruptek | now you can goto with no stack alloc. |
18:18:14 | Zevv | so you can have only one of something. or with nasty logic you cna have a fixed size maybe |
18:18:31 | Zevv | really, write me an example of how this would look post-transform |
18:18:36 | Zevv | something trivial |
18:18:41 | Zevv | like the random number of iterators |
18:19:05 | Zevv | if 'i' lives on the stack, the generated code will access that var at an address relative to the stack pointer |
18:19:28 | Zevv | every time you come at that place, the stack pointer will be the same. So that 'i' can only reference one single memory location |
18:19:31 | disruptek | you're going to know the value of random(10), so you alloca an array[10]. |
18:19:38 | disruptek | or whatever it is. |
18:19:38 | Zevv | read the above lines |
18:20:03 | disruptek | yes, but each "stack" can live in the array. |
18:20:14 | Zevv | So, we go messing about with the stack pointer? |
18:20:21 | Zevv | we go poke arch-specific assembly? |
18:20:25 | disruptek | what? no. |
18:20:49 | disruptek | we're talking about a for loop, right? |
18:21:06 | Zevv | /multiple instances/ of the same for loop acting on different data |
18:21:08 | disruptek | it's already an example of this. |
18:21:20 | Zevv | 1 copy of the code. X copies of the data. |
18:21:22 | Zevv | agree? |
18:21:47 | disruptek | yes. |
18:22:10 | Zevv | Ok. So this code boils down to some low level machine code doing relative addressing like mov r1, [sp-10] |
18:22:54 | Zevv | how can that same code act on multiple instances of a thing? |
18:22:54 | disruptek | for a for loop, yes; that's what inline iterators are afaik. |
18:23:09 | Zevv | inline iterators have *one instance* of a thing |
18:23:16 | disruptek | what thing? |
18:23:18 | Zevv | that's the hole point. So do stackless coroutines |
18:23:25 | Zevv | A client, a counter, a whatever |
18:23:29 | FromDiscord | <exelotl> what's a good Nim library to generate a random salt for hashing passwords? |
18:24:45 | disruptek | exelotl: how much do you want to spend? |
18:25:21 | Zevv | disruptek: does it make any sense what I'm rambling? |
18:25:26 | disruptek | yes. |
18:25:30 | Zevv | cool |
18:25:46 | disruptek | you're right that for a `for` we probably want one piece of data. |
18:26:04 | Zevv | so here is what I think we can do to make both us and mratsim happy: |
18:26:10 | disruptek | but for your `while true`, it needs to work differently. |
18:26:12 | FromDiscord | <exelotl> disruptek: you want me to commission you to write a library? x) |
18:26:43 | disruptek | exelotl: no, i mean you can get random numbers cheaply or at great expense depending on how clever you are and what you want to spend. |
18:27:13 | FromDiscord | <exelotl> oh right |
18:27:13 | Zevv | - we take CPS as we have it. We still generate an env, but it's an object, not a ref. It's also not a inheritence tree |
18:27:22 | FromDiscord | <exelotl> I'm just looking for a standard CSPRNG |
18:27:31 | Zevv | - the CPS functions take a pointer and cast to their right type. We mutate the data on the env. |
18:27:34 | disruptek | can't you get that from stdlib? |
18:27:55 | Zevv | - The initial env is not allocated by the CPS bootstrap as we have now, but by the user |
18:28:35 | Zevv | so CPS still works as it does for us. We can just new() an env of a given type dynamically if we want X instances |
18:28:42 | Zevv | mratsim can make these things on the stack or in a pool or whatever |
18:29:03 | Zevv | The code will now access 'i' not relative to the stack pointer, but relative to the pointer passed to the continuation functions |
18:29:13 | Zevv | We can have 2. or 3. or n. |
18:29:18 | Zevv | for a for loop, ok, we just have one |
18:29:30 | FromDiscord | <exelotl> std/random tells me "Do not use this module for cryptographic purposes!" |
18:29:36 | FromDiscord | <exelotl> there's the mersenne twister but that sux |
18:29:41 | Zevv | I do see that sp-relative code can be / will be much more efficient |
18:29:45 | Zevv | because that's how cpus work. |
18:30:17 | Zevv | exolotl: /dev/urandom is the way to go on linux, if that happens to be your only platform |
18:30:18 | disruptek | exelotl: i would look at nimcrypto if you think you need more than nim's PRNG. |
18:31:30 | disruptek | zevv: the problem is that i cannot return an env of a different type than that which i was passed. |
18:31:36 | disruptek | this is a huge and novel constraint. |
18:31:42 | Zevv | All envs are a fn and an opaque pointer |
18:31:48 | Zevv | type-erased |
18:31:52 | disruptek | so what? |
18:32:01 | disruptek | you're telling me i cannot perform env allocs. |
18:32:13 | disruptek | you're telling me that the caller does this. |
18:32:33 | Zevv | /can/ do this |
18:32:56 | Zevv | the CPS transformation can provide the info you need, which is just "how many bytes" |
18:33:26 | disruptek | oh, for the maximal size of a possible return type? |
18:33:28 | * | def- quit (Quit: -) |
18:33:37 | Zevv | For this particular transformed CPS function, yes |
18:33:50 | Zevv | So my little iterator will need an env of 8 bytes |
18:33:51 | disruptek | so if i just return an error, i'm still alloc'ing the entire payload. |
18:34:10 | disruptek | i think this is dumb. |
18:34:12 | Zevv | that's what we have in current CPS as well |
18:34:20 | Zevv | we still alloc the env. |
18:34:26 | disruptek | we /elect/ this behavior. |
18:34:37 | Zevv | anyway, that's just my two cents. |
18:34:40 | Zevv | You get my point, which was my point |
18:34:46 | disruptek | i do. |
18:34:56 | Zevv | one more remark: if we do type erasure, we have one pretty nasty effect |
18:35:05 | Zevv | is that we lose automatic life time memory management of closures |
18:35:16 | Zevv | because if we new() something but then just pass the pointer around |
18:35:28 | disruptek | yes, but it's worse than that. |
18:35:29 | Zevv | who will take care of freeing up the stuff when the time has come |
18:35:41 | disruptek | iirc, we don't have /any/ cast in cps right now. |
18:35:51 | * | lf__ joined #nim |
18:36:10 | Zevv | Hm wait, if we go casting about, do we lose JS ? |
18:36:26 | Zevv | or even VM? |
18:36:34 | disruptek | dunno, but i am going to proceed with the current ref-based technique. |
18:36:41 | Zevv | same here |
18:36:45 | Zevv | nice. |
18:36:46 | * | def- joined #nim |
18:36:54 | Zevv | glad we have the same idea on this again |
18:36:58 | Zevv | thought I lost you buddy |
18:37:11 | disruptek | mratsim knows enough to impl it his way, but i frankly don't have a use for such an animal and i think it's a weak abstraction. |
18:37:14 | Zevv | crazy talk you did there yesterday |
18:37:48 | Zevv | so, what I think we should/could/might try still, is to see if we can make this so that it is also usable for the mratsim use case |
18:37:58 | * | lf_ quit (Ping timeout: 246 seconds) |
18:38:15 | disruptek | we can support objects, but beyond that, i think he's on his own. |
18:38:18 | Zevv | but he's in a different league. He's perfectly fine with pointer casting data and doing all allocations manully for sake of performance |
18:38:25 | disruptek | and even supporting objects is going to be hard. |
18:38:28 | Zevv | did you ever try weave? |
18:38:34 | disruptek | no. |
18:38:51 | disruptek | i don't care about CPU. i have CPU coming out of my ears. |
18:39:08 | Zevv | This is how you get your data into weave: cast[ptr UncheckedArray[float32]](input[0].unsafeAddr) |
18:39:14 | Zevv | no other way |
18:39:25 | Zevv | and sure, I get that. why and how. |
18:39:36 | disruptek | this is not abstraction. |
18:39:41 | Zevv | but you don't want to sprinkle that burden around |
18:39:43 | Zevv | just because |
18:39:54 | Zevv | "# We can't work with seq directly as it's managed by GC, take a ptr to the buffer" |
18:40:13 | Zevv | and if weave is done you go "let out = cast[ptr UncheckedArray[float32]](output[0].addr)" |
18:40:24 | * | krux02 joined #nim |
18:40:57 | Zevv | oh, no you also do that before :) |
18:40:58 | Zevv | nevermind |
18:41:00 | Zevv | you get my . |
18:41:15 | disruptek | right. |
18:41:45 | disruptek | it's not that i care that much about js. |
18:41:49 | disruptek | it's that js keeps me honest. |
18:42:00 | Zevv | exactly |
18:42:08 | Zevv | if this can go 100% nim, that's a huge pro |
18:42:38 | Zevv | but we also can't lose mratsim on this |
18:42:44 | Zevv | but it's just that we totally speak a different language |
18:43:39 | disruptek | he's approaching it from a different direction. we should be able to share a lot of work even if we cannot share the ultimate composition. |
18:44:33 | Zevv | right. and that's where we should aim at. |
18:45:24 | Zevv | so maybe CPS can just have this tiny little switch somewhere. Like, flag = enum xfrmDisruptek, xfrmMratsim |
18:45:47 | disruptek | lol no we'll just look at the type. |
18:48:35 | Zevv | so, you can tell him :) |
18:48:41 | disruptek | haha |
18:50:44 | disruptek | i need to create two new libraries and i just don't wanna. one for package management and one for meta-programming. |
18:52:27 | Zevv | dont go there man |
18:52:36 | Zevv | too many libraries is just not good for you |
18:54:10 | * | azed quit (Ping timeout: 272 seconds) |
18:54:32 | notchris | disruptek: oo like getters/setters? |
18:55:32 | * | hnOsmium0001 joined #nim |
18:56:24 | * | azed joined #nim |
18:57:25 | disruptek | no, i'm an asshole, not an idiot. |
18:57:41 | notchris | disruptek: thats why im a fan |
18:58:14 | disruptek | i... what? |
18:58:33 | notchris | disruptek: idk but im following you now on gh |
18:58:40 | disruptek | also it's time to add .dot output to gram. |
18:58:44 | disruptek | which sucks. |
18:59:13 | disruptek | notchris: can you recommend other assholes to follow? |
18:59:21 | notchris | disruptek: did you follow me back? thats one |
18:59:45 | disruptek | lol |
19:00:04 | notchris | i would put more effort into your request but i just ate a big sandwich |
19:00:10 | notchris | in recovery |
19:00:22 | disruptek | i feel you. |
19:00:57 | disruptek | you only have four repos pinned and none of them are nim. |
19:01:06 | disruptek | what a prick. take my follow. |
19:01:10 | notchris | YES |
19:01:15 | * | lf__ quit (Quit: lf__) |
19:01:54 | notchris | that's sad, i need to finish one of my nim projects |
19:02:09 | notchris | been messing a lot with gintro last week |
19:02:18 | notchris | wanna try to get gtk4 working |
19:02:27 | disruptek | what's the holdup? |
19:02:52 | notchris | some issue with brew iirc |
19:02:55 | notchris | i have to look again |
19:03:12 | notchris | im on osx so you know, things are twice as hard |
19:03:48 | disruptek | i ran gentoo prefix on osx back in the day, but it wouldn't have occurred to me to use brew and gtk4 in the same sentence. |
19:04:18 | notchris | yeah a lot of times i have to just build manually |
19:04:37 | notchris | i had to do that to get the qt/qml nim package working |
19:05:03 | disruptek | just think about the cumulative amount of hours wasted on such shit. |
19:05:31 | notchris | i try not to, its like looking back at how much time i spent in time at cvs |
19:05:36 | notchris | in line |
19:05:46 | notchris | because they havent figured out how to replace cashiers with robots |
19:06:08 | disruptek | oh, i was about to say... i thought i was the only person i knew who lived in a cvs. |
19:06:23 | disruptek | baby diapers are incredibly comfortable. |
19:06:35 | disruptek | i'm sad i grew out of them. |
19:06:57 | disruptek | but seriously, when the zombies invade, make for a cvs. |
19:07:18 | notchris | CVS: A New Hope |
19:08:35 | notchris | I found this recently |
19:08:36 | notchris | https://github.com/yglukhov/darwin |
19:08:44 | notchris | it gave me hope i could access native osx apis |
19:08:52 | notchris | but never made progress with it |
19:09:07 | disruptek | i'd look into how python does it. |
19:09:31 | notchris | Yeah i mean im by no means a great programmer but |
19:09:39 | notchris | i should at least be able to see where the connection happens |
19:10:06 | disruptek | why don't you just install a real os? |
19:10:58 | notchris | I mean, i have windows and linux |
19:11:11 | notchris | i like the osx gui the best |
19:11:43 | notchris | and osx is more locked down, meaning less competition for the things i want to make |
19:11:55 | disruptek | that's the most compelling argument right there. |
19:12:03 | disruptek | why not compile your nim to objc? |
19:12:08 | notchris | valid |
19:12:19 | notchris | ive heard that recommendation before but im not there yet |
19:12:25 | notchris | for some background, i come from JS land |
19:12:32 | notchris | and typescript |
19:12:34 | disruptek | oh, the land that time forgot? |
19:12:34 | Zevv | too late. we lost: https://tokio.rs/blog/2020-12-tokio-1-0 |
19:12:38 | notchris | disruptek: exactly |
19:12:42 | Zevv | "multi-threaded, work-stealing scheduler" |
19:13:38 | notchris | I see a lot of Rust fans as well |
19:13:58 | disruptek | zevv: nah, it's still mio-based. |
19:13:58 | notchris | Not too familiar with it |
19:15:29 | disruptek | rust is pretty good. |
19:17:28 | notchris | but yeah when i was looking into accessing the camera on a mbp via nim |
19:17:36 | notchris | i found out you need a plist entry to grant auth |
19:17:43 | notchris | and i did find a nim lib to generate plists |
19:17:47 | notchris | so idk, theres hope i guess |
19:18:14 | disruptek | plists are just xml. |
19:18:22 | * | Jesin quit (Quit: Leaving) |
19:18:29 | notchris | does the `p` stand for preference? |
19:18:35 | disruptek | who cares? |
19:18:42 | notchris | touche |
19:20:38 | notchris | disruptek: im glad we're friends now |
19:20:57 | disruptek | yeah, it's pretty fucking great. |
19:21:50 | notchris | im probably useless to you from a code standpoint, but i make free music |
19:21:54 | notchris | https://notchris.net |
19:21:56 | notchris | njoy |
19:22:14 | disruptek | we need that for the stream now that twitch is shitting all over us thieves. |
19:22:46 | disruptek | mratsim: your weave tests require cligen, you aboriginal nimble author, you. |
19:24:47 | * | Jesin joined #nim |
19:25:50 | * | habamax quit (Ping timeout: 256 seconds) |
19:27:49 | * | Q-Master quit (Ping timeout: 264 seconds) |
19:36:47 | * | lritter quit (Quit: Leaving) |
19:39:02 | * | vsantana quit (Ping timeout: 256 seconds) |
19:41:09 | * | vsantana joined #nim |
19:44:27 | * | D__ joined #nim |
19:44:32 | * | D_ quit (Ping timeout: 256 seconds) |
19:54:12 | * | Q-Master joined #nim |
19:56:36 | * | Arrrrrrrr quit (Ping timeout: 240 seconds) |
19:57:43 | * | Arrrrrrrr joined #nim |
19:59:10 | * | Q-Master quit (Ping timeout: 246 seconds) |
20:00:40 | * | rockcavera quit (Ping timeout: 272 seconds) |
20:01:00 | * | oddp quit (Quit: quit) |
20:04:53 | FromDiscord | <nikki> accessing camera just means using the AV apis and yeah your application's Info.plist needs permissions. you don't need to write the plist from Nim, you can just write it by hand |
20:04:58 | FromDiscord | <nikki> or from Xcode |
20:05:23 | FromDiscord | <nikki> write some foo.m file with obj-c in it, and have some C funcs it exposes |
20:05:31 | FromDiscord | <nikki> then call those from Nim |
20:05:44 | * | vsantana_ joined #nim |
20:07:03 | * | vsantana_ quit (Client Quit) |
20:08:48 | * | Q-Master joined #nim |
20:08:49 | * | narimiran_ quit (Ping timeout: 265 seconds) |
20:09:06 | FromDiscord | <notchris> thanks @nikki i will do my best :X |
20:09:18 | * | vsantana quit (Ping timeout: 265 seconds) |
20:12:23 | FromDiscord | <shadow.> notchris we live very close to each other π |
20:12:45 | FromDiscord | <shadow.> nice music btw |
20:12:54 | FromDiscord | <notchris> @shadow. Ooo CT? Thank you! |
20:13:02 | FromDiscord | <shadow.> yep haha |
20:13:21 | FromDiscord | <notchris> Ah! It's rare but it happens. I'm in manchester currently |
20:13:34 | FromDiscord | <shadow.> yeah thats about a 25 minute drive lmao |
20:13:54 | FromDiscord | <notchris> Hell yeahhh feel free to chill and code whenev |
20:13:59 | FromDiscord | <shadow.> loll |
20:14:18 | FromDiscord | <shadow.> currently struggling with today's aoc |
20:14:26 | FromDiscord | <shadow.> can't decide between a linked list or a linked ring |
20:14:30 | FromDiscord | <shadow.> rip |
20:14:43 | FromDiscord | <notchris> ah i didn't try it out this year |
20:14:49 | FromDiscord | <notchris> ik its always super hard though haha |
20:14:59 | FromDiscord | <shadow.> yeah i've gotten this far so i'm not aboutta drop it |
20:15:06 | FromDiscord | <shadow.> i did skip day 20 part 2 but so did everyone else lol |
20:15:16 | FromDiscord | <notchris> oh man that difficult? |
20:15:28 | FromDiscord | <shadow.> well |
20:15:31 | FromDiscord | <shadow.> aoc started with 130k people |
20:15:40 | FromDiscord | <shadow.> only 10k ppl did day 20 part 1 (including me) |
20:15:43 | FromDiscord | <shadow.> and only 5k ppl did part 2 |
20:15:48 | FromDiscord | <notchris> holy crap lol |
20:15:51 | FromDiscord | <shadow.> i wasnt able to do part 2, or rather i didn't wanna write 250 lines of code |
20:16:05 | disruptek | that's a lot of people with too much time on their hands. |
20:16:11 | FromDiscord | <shadow.> yep |
20:16:22 | FromDiscord | <shadow.> or too little sunlight |
20:16:26 | FromDiscord | <notchris> id never be able to keep up with new anime and balance that |
20:16:26 | disruptek | i keep looking at that testes pr languishing due to aoc. |
20:16:43 | FromDiscord | <notchris> lol yeah i saw that come up on gh |
20:16:54 | FromDiscord | <shadow.> lol |
20:17:22 | FromDiscord | <notchris> @shadow. ever go to the ct science center? |
20:18:16 | FromDiscord | <shadow.> yep |
20:18:17 | FromDiscord | <shadow.> haha |
20:18:21 | FromDiscord | <shadow.> it's a cool place |
20:18:23 | FromDiscord | <notchris> nice i used to be head dev there! |
20:18:28 | FromDiscord | <shadow.> damnn |
20:18:29 | FromDiscord | <shadow.> how long ago? |
20:18:47 | FromDiscord | <notchris> hmm its been like 2.5 years now |
20:18:54 | FromDiscord | <notchris> I was there for about 5 years |
20:19:03 | FromDiscord | <shadow.> then i def went there while you were head dev lol |
20:19:15 | FromDiscord | <notchris> Hell yea! |
20:19:29 | FromDiscord | <shadow.> man do i love just doing `T.toSeq.proc` whenever i need to |
20:19:30 | FromDiscord | <shadow.> lmao |
20:19:39 | disruptek | you guys may have taken a shit in the same toilet. |
20:19:45 | FromDiscord | <shadow.> most likely have |
20:19:48 | FromDiscord | <shadow.> i might try to make a lazy iteration library |
20:19:58 | FromDiscord | <shadow.> lazy evaluation |
20:20:05 | FromDiscord | <shadow.> i know that makes me sound like a rustacean but so be it |
20:20:13 | disruptek | !repo cps |
20:20:14 | disbot | https://github.com/disruptek/cps -- 9cps: 11Continuation-Passing Style for Nim π 15 42β 2π΄ |
20:20:16 | FromDiscord | <shadow.> i like being able to do `T.map()` without an issue |
20:20:21 | FromDiscord | <shadow.> hm? |
20:20:26 | FromDiscord | <shadow.> i was talking more generics fp |
20:20:39 | FromDiscord | <shadow.> nvm |
20:20:42 | FromDiscord | <shadow.> i think i mixed up my terms |
20:20:55 | leorize[m] | you can use cps as the backbone is what he meant |
20:21:00 | FromDiscord | <shadow.> ohhh |
20:21:03 | FromDiscord | <shadow.> fair enough |
20:21:26 | FromDiscord | <shadow.> idk im just thinking like a lot of functions in sequtils construct seqs which probably isn't that efficient |
20:21:40 | FromDiscord | <shadow.> i kinda like the `T.iter().proc().proc().collect()` approach rust has |
20:21:51 | FromDiscord | <shadow.> as in dont collect until the end of the iter chain |
20:22:09 | FromDiscord | <notchris> i never used the public toilets |
20:22:11 | FromDiscord | <shadow.> rip |
20:22:12 | FromDiscord | <notchris> so unlikely |
20:22:19 | leorize[m] | nim's zero_functional does exactly that |
20:22:25 | leorize[m] | afaik |
20:22:29 | FromDiscord | <shadow.> google time |
20:22:29 | disruptek | yes. |
20:22:31 | FromDiscord | <notchris> i used the public water fountains though |
20:22:39 | disruptek | NO WAY! |
20:22:45 | FromDiscord | <shadow.> yep that's what i was looking for |
20:22:49 | FromDiscord | <shadow.> ah yes we've definitely drank the same water |
20:22:57 | FromDiscord | <shadow.> well i've probably shitted somewhere in manchester too |
20:23:26 | disruptek | sometimes i look around manchester and it's hard to tell what /hasn't/ been shit on. |
20:24:10 | FromDiscord | <notchris> @shadow. so youre in central ct or? |
20:24:20 | FromDiscord | <shadow.> probably a little north of there but yeah |
20:24:32 | FromDiscord | <notchris> Wow rly close |
20:24:33 | disruptek | he's not sure /where/ he is. |
20:24:35 | FromDiscord | <shadow.> im near the capital |
20:24:38 | FromDiscord | <shadow.> west of it |
20:24:39 | FromDiscord | <shadow.> lol |
20:24:47 | FromDiscord | <notchris> so west hartford |
20:24:48 | FromDiscord | <shadow.> yes |
20:24:49 | FromDiscord | <shadow.> lol |
20:25:05 | FromDiscord | <notchris> ever eat at black bamboo? |
20:25:07 | FromDiscord | <shadow.> yep |
20:25:10 | FromDiscord | <shadow.> haha |
20:25:10 | FromDiscord | <notchris> so good right |
20:25:15 | FromDiscord | <shadow.> very |
20:25:20 | FromDiscord | <notchris> i have a crush on a girl who works there |
20:25:23 | FromDiscord | <shadow.> lmaoo |
20:25:25 | FromDiscord | <shadow.> good luck |
20:25:27 | FromDiscord | <notchris> ikr |
20:26:09 | FromDiscord | <shadow.> just flex your knowledge of pointers and references and she'll be all over you |
20:26:17 | * | Arrrrrrrr quit (Quit: Arrrrrrrr) |
20:26:51 | FromDiscord | <notchris> _considers this_ |
20:26:53 | FromDiscord | <shadow.> "are you a linked list because i'm trying to O(1) insert my value?" |
20:27:04 | FromDiscord | <shadow.> it works every time, trust me |
20:27:11 | FromDiscord | <notchris> lol yeah im not bringing you as my wingman/lady w/e |
20:27:17 | FromDiscord | <shadow.> probably not a good idea |
20:27:39 | FromDiscord | <notchris> well, looks like we're best friends now |
20:27:51 | FromDiscord | <notchris> sorry disruptek |
20:28:18 | FromDiscord | <shadow.> rip/ |
20:28:19 | FromDiscord | <shadow.> (edit) "rip/" => "rip." |
20:28:31 | FromDiscord | <shadow.> it's ok he has his hookers |
20:29:02 | FromDiscord | <notchris> then i dont feel as bad |
20:29:03 | FromDiscord | <notchris> tbh |
20:29:03 | FromDiscord | <shadow.> if you have another nitro boost you should boost nim π |
20:29:14 | FromDiscord | <shadow.> we'd be at level one i think lol |
20:29:18 | FromDiscord | <shadow.> afaik im the only booster π |
20:29:21 | FromDiscord | <shadow.> (edit) "π" => ":blobpain:" |
20:30:16 | FromDiscord | <notchris> i boosted my anime server twice tho |
20:30:19 | FromDiscord | <notchris> i have none left :X |
20:30:20 | FromDiscord | <shadow.> f |
20:30:25 | FromDiscord | <shadow.> lemme see if i can boost this one again |
20:30:27 | FromDiscord | <notchris> we dont even use the animated server icon |
20:30:54 | FromDiscord | <shadow.> but the hip members of the nim programing language discord wanna use all the emojis https://media.discordapp.net/attachments/371759389889003532/791402477890830386/unknown.png |
20:31:07 | FromDiscord | <notchris> oh shitttt |
20:31:10 | FromDiscord | <shadow.> haha |
20:31:14 | FromDiscord | <shadow.> im /j |
20:31:40 | FromDiscord | <notchris> sometimes i drive to wh /newington |
20:31:44 | FromDiscord | <notchris> just to go to california pizza kitchen |
20:31:49 | FromDiscord | <notchris> and watch people walk into the mall |
20:31:50 | FromDiscord | <shadow.> can't say i've been there |
20:31:53 | FromDiscord | <shadow.> ah the mall |
20:31:54 | FromDiscord | <shadow.> westfarms? |
20:31:57 | FromDiscord | <notchris> yeaa |
20:32:03 | FromDiscord | <shadow.> my gf lives near there lol |
20:32:25 | FromDiscord | <notchris> i used to live in new britain so i was p close |
20:32:30 | FromDiscord | <notchris> so glad i dont anymore |
20:32:30 | FromDiscord | <shadow.> nice nice |
20:32:32 | FromDiscord | <shadow.> ah lol |
20:33:01 | FromDiscord | <shadow.> hmm |
20:33:05 | FromDiscord | <shadow.> this problem is still hurting my head |
20:33:55 | FromDiscord | <notchris> i have to do issues at work for another 90min |
20:33:59 | FromDiscord | <notchris> then i think we have tomorrow off |
20:34:02 | FromDiscord | <notchris> im not 100% sure tho |
20:34:07 | FromDiscord | <shadow.> welp, good luck |
20:34:09 | FromDiscord | <shadow.> im already on break |
20:35:55 | FromDiscord | <notchris> Woo i just confirmed we do |
20:36:02 | FromDiscord | <notchris> btw which anime is in your avatar |
20:36:39 | FromDiscord | <shadow.> karma from assassination classroom |
20:36:58 | FromDiscord | <shadow.> i just needed to immaturely flex my nitro so yk |
20:37:02 | FromDiscord | <shadow.> got a gif and the #0001 tag |
20:37:03 | disruptek | karma's a bitch. |
20:37:16 | FromDiscord | <notchris> @shadow. ah me too |
20:37:22 | FromDiscord | <notchris> im notchris 0001 right |
20:37:26 | FromDiscord | <shadow.> "yeah that's right, i can afford to pay 5 dollars for a useless discord premium, suck it." << my ideaology |
20:37:36 | FromDiscord | <shadow.> quite the flex, i know, i know |
20:37:39 | FromDiscord | <shadow.> lmao |
20:37:45 | FromDiscord | <shadow.> and yes, your tag is 0001 |
20:40:04 | FromDiscord | <shadow.> my head still hurst |
20:40:07 | FromDiscord | <shadow.> this problem is odd |
20:40:18 | FromDiscord | <shadow.> yesterday's was fun after i spent 2 hours trying to figure out what i did wrong |
20:40:25 | FromDiscord | <shadow.> when in fact i was just making my params immutable and shadowing |
20:40:28 | FromDiscord | <shadow.> instead of mutable |
20:40:31 | FromDiscord | <shadow.> so that was lovely |
20:40:32 | FromDiscord | <notchris> ok im flexing now @shadow. |
20:40:38 | FromDiscord | <shadow.> there we go |
20:40:39 | FromDiscord | <shadow.> perfect |
20:40:51 | FromDiscord | <notchris> lmao |
20:41:14 | FromDiscord | <shadow.> man its like this was just asking me to use a linkedring |
20:41:24 | FromDiscord | <shadow.> i mean it needs O(1) middle insertion and wraparound indexing |
20:41:28 | FromDiscord | <shadow.> wraparound logic |
20:42:07 | FromDiscord | <notchris> its a sign |
20:42:33 | FromDiscord | <shadow.> true |
20:44:36 | FromDiscord | <shadow.> hmm |
20:44:44 | FromDiscord | <shadow.> i know you can do `var a, b = v` |
20:44:48 | FromDiscord | <shadow.> but can you do `a, b = v` |
20:45:04 | FromDiscord | <shadow.> because that would be lovely |
20:45:08 | FromDiscord | <notchris> like destructuring? |
20:45:11 | FromDiscord | <shadow.> well |
20:45:13 | FromDiscord | <shadow.> no |
20:45:21 | FromDiscord | <shadow.> just assigning to things to the same variable outside of a definition |
20:45:24 | FromDiscord | <notchris> ah |
20:45:45 | FromDiscord | <shadow.> var a, b = 5β΅a, b = 6β΅assert (a, b) == (6, 6) |
20:45:46 | FromDiscord | <shadow.> ya feel? |
20:46:05 | FromDiscord | <shadow.> idk whatever it's not that bad to write the other line |
20:46:56 | FromDiscord | <notchris> ahh |
20:47:00 | FromDiscord | <notchris> ok yeai. see |
20:47:25 | FromDiscord | <shadow.> lol |
20:47:40 | FromDiscord | <shadow.> i can only imagine what part two is gonna be like |
20:52:59 | * | bozaloshtsh quit (Quit: ZNC 1.7.5 - https://znc.in) |
20:53:14 | * | bozaloshtsh joined #nim |
20:53:14 | * | bozaloshtsh quit (Changing host) |
20:53:14 | * | bozaloshtsh joined #nim |
20:53:17 | FromDiscord | <notchris> @shadow. i dmed u my life story |
20:55:39 | FromDiscord | <shadow.> gotchu |
21:03:16 | FromDiscord | <notchris> lmao |
21:05:49 | FromDiscord | <Shucks> Umm, is there a pass nim compiler pragma? Trying to hardcode `skipProjCfg` |
21:06:04 | disruptek | nope. |
21:07:18 | FromDiscord | <shadow.> hmmm |
21:07:32 | FromDiscord | <shadow.> has anyone else had issues with `SinglyLinkedRing.find(T)`? |
21:07:35 | FromDiscord | <shadow.> seems to be infinitely stalling for me |
21:07:53 | Prestige | Can you show a code example? |
21:08:31 | FromDiscord | <19> trying to follow the Nim invocation from C example on windows, getting undefined reference to NimMain when i use `gcc` |
21:08:47 | disruptek | use --app:lib |
21:09:26 | FromDiscord | <shadow.> prestige: sure |
21:09:44 | FromDiscord | <shadow.> https://play.nim-lang.org/#ix=2Jjl |
21:09:47 | FromDiscord | <shadow.> stalls on the 3rd iteration |
21:10:08 | FromDiscord | <19> now it says undefined reference to imp_NimMain |
21:10:35 | FromDiscord | <shadow.> i did some debug prints and it seems to be stalling on line 33 |
21:10:55 | FromDiscord | <Daniel> If i understand corerctly, firist it was c2nim, then nimgen, then the final tool nimterop which superseded all of previous ones...or am i missing something? |
21:11:16 | disruptek | yeah; c2nim and nimterop are competitive impls. |
21:11:22 | Prestige | hm maybe a bug then |
21:11:25 | * | ex_nihilo joined #nim |
21:11:38 | FromDiscord | <shadow.> yep, stalls on playground too |
21:11:41 | * | ex_nihilo quit (Remote host closed the connection) |
21:11:56 | FromDiscord | <shadow.> odd |
21:12:33 | * | ex_nihilo joined #nim |
21:12:41 | FromDiscord | <shadow.> fuck this is gonna ruin my aoc if i cant use a linked ring lol |
21:13:40 | * | ex_nihilo quit (Remote host closed the connection) |
21:13:59 | Prestige | I believe it's calling https://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/collections/lists.nim#L331 |
21:14:44 | * | ex_nihilo joined #nim |
21:15:15 | FromDiscord | <shadow.> hm? |
21:15:16 | FromDiscord | <shadow.> yeah |
21:15:20 | FromDiscord | <shadow.> that's what it's calling |
21:15:24 | FromDiscord | <shadow.> idk what part it's stalling on tho |
21:15:32 | FromDiscord | <shadow.> lemme add some debug prints inside of the module |
21:16:10 | FromDiscord | <shadow.> yeah it cant find 5 |
21:16:18 | * | ex_nihilo quit (Remote host closed the connection) |
21:16:18 | FromDiscord | <shadow.> lemme check out the for loop |
21:16:40 | FromDiscord | <shadow.> yup, it's infinitely cycling |
21:16:45 | * | ex_nihilo joined #nim |
21:17:20 | FromDiscord | <shadow.> same thing happened when i tried to print the list |
21:17:22 | Prestige | Seems like the for loop using nodes(L) is invoking the wrong iterator? Or the iterator is broken |
21:17:30 | FromDiscord | <shadow.> nah im guessing i messed up the list somehow |
21:17:34 | FromDiscord | <shadow.> printing it has the same issue |
21:17:36 | FromDiscord | <19> im generating a lib on windows and it says success but i dont get the lib file |
21:17:40 | FromDiscord | <shadow.> probably user error oof |
21:17:46 | FromDiscord | <shadow.> ill look into it |
21:18:55 | FromDiscord | <19> sent a code paste, see https://play.nim-lang.org/#ix= |
21:20:41 | FromDiscord | <shadow.> wait a minute. |
21:20:45 | FromDiscord | <shadow.> how would find on a ring even work in the first place |
21:21:21 | FromDiscord | <shadow.> nvm |
21:21:39 | Prestige | Iterator removes elements as it searches |
21:21:55 | FromDiscord | <shadow.> fair enough |
21:22:17 | FromDiscord | <shadow.> ig ill try implementing my own |
21:22:26 | Prestige | https://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/collections/lists.nim#L296 |
21:22:58 | Prestige | as it iterates* |
21:23:09 | FromDiscord | <shadow.> tbh i prolly just fucked up my list idk |
21:23:12 | FromDiscord | <mratsim> nimble doesn't support optional dependencies / task level dependencies, not my fault |
21:23:22 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
21:23:32 | Prestige | idk shadow, maybe create a minimal example to test it out |
21:23:36 | FromDiscord | <shadow.> fair enough |
21:23:38 | FromDiscord | <shadow.> thanks |
21:24:06 | * | D__ is now known as D_ |
21:29:02 | FromDiscord | <shadow.> yeah i cannot figure this out |
21:29:03 | FromDiscord | <mratsim> @zevv, @disruptek, CPS on stack vs CPS on heap should "only" require compiler help about lifetime and if a variable escapes its scope |
21:30:00 | FromDiscord | <shadow.> fuck it, time to make my own linkedring |
21:30:08 | FromDiscord | <mratsim> and it's not a narrow use case. If you write a kernel driver for say a blue tooth chip, or if you do a TLS or any other cryptographic handshake, or within a scheduler you do not want to allocate |
21:30:12 | FromDiscord | <Clyybber> disrutpek: So is https://github.com/nim-lang/Nim/issues/16389 an infinite loop or is it just hitting the limit? |
21:30:13 | disbot | β₯ recent regression in generics as demo'd by jason package ; snippet at 12https://play.nim-lang.org/#ix=2IA6 |
21:30:16 | FromDiscord | <mratsim> allocate is very last resort |
21:30:17 | FromDiscord | <Clyybber> That is what timothee is asking |
21:30:51 | FromDiscord | <mratsim> And it would be sad to have the one thing that simplify 80% of embedded development (state machines) be something they can't use. |
21:31:46 | FromDiscord | <mratsim> also in many case, the CPS object will be part of a larger ref |
21:32:00 | FromDiscord | <mratsim> and you can pay the allocation only once if CPS is a plain object. |
21:32:16 | disruptek | clyybber: it's >100 and <150 insts. not infinite. |
21:32:27 | FromDiscord | <Clyybber> then tell him on github |
21:32:33 | FromDiscord | <Clyybber> thats all he was asking |
21:32:40 | FromDiscord | <Clyybber> :P |
21:32:48 | disruptek | fine. i don't have a web browser right now. but, soon, maybe. |
21:33:02 | FromDiscord | <Clyybber> oh updating? |
21:33:04 | disruptek | mratsim: no, because i want my cps to be able to instantiate new envs. |
21:33:20 | disruptek | finally dumping my last btrfs because i can't fucking take it anymore. |
21:33:56 | FromDiscord | <mratsim> instantiate new envs? |
21:34:04 | disruptek | i would rather "waste" nvme with my chromium profile thrashing then deal with btrfs over san. |
21:34:10 | FromDiscord | <Clyybber> disruptek: Ah, because of the 5.10 perf regression? |
21:34:13 | disruptek | than, too. |
21:34:27 | disruptek | no, it's the instability that i cannot tolerate. |
21:34:37 | disruptek | looking forward to bcachefs. |
21:34:41 | FromDiscord | <Clyybber> Same |
21:34:47 | FromDiscord | <Clyybber> My home is on bcachefs |
21:34:48 | disruptek | mratsim: yes. |
21:35:04 | FromDiscord | <Clyybber> But the rest is still on btrfs; although I haven't had any problem with btrfs |
21:35:05 | FromDiscord | <mratsim> what does it mean, and what is it used for? |
21:35:20 | disruptek | it's in mainline now? i thought it was but the web-site says it isn't. |
21:35:27 | FromDiscord | <Clyybber> no, its not |
21:35:33 | FromDiscord | <shadow.> prestige: starting to think this is a bug |
21:35:35 | disruptek | mratsim: cps currently lets you return an entirely new continuation. |
21:35:42 | FromDiscord | <Clyybber> but its addressed all its review comments |
21:35:52 | FromDiscord | <Clyybber> but probably won't end up in 5.11 |
21:35:59 | disruptek | that's okay. |
21:36:01 | FromDiscord | <Clyybber> since the merge window is closing in a wekk I think |
21:36:12 | disruptek | i will settle for ext4. works great across my san. |
21:36:23 | FromDiscord | <mratsim> I don't see why ref vs stack prevents returning a new continuation. |
21:36:24 | * | rockcavera joined #nim |
21:36:53 | disruptek | well, i await your PR. π |
21:37:08 | FromDiscord | <mratsim> for now I'm designing, top down |
21:37:48 | FromDiscord | <mratsim> sent a long message, see http://ix.io/2JjA |
21:37:51 | FromDiscord | <mratsim> and will do the same with continuations |
21:38:01 | FromDiscord | <Clyybber> disruptek: Btw, since ryu's tables are too big I ported grisu2; its tables are only 1kb which is great compared to sprintf's 4kb |
21:38:08 | FromDiscord | <Clyybber> and its also faster |
21:38:21 | disruptek | !repo lemonboy/dtoa |
21:38:22 | disbot | https://github.com/LemonBoy/dtoa.nim -- 9dtoa.nim: 11Port of Milo Yip's fast dtoa() implementation 15 5β 1π΄ |
21:38:28 | FromDiscord | <Clyybber> oh no |
21:38:30 | FromDiscord | <Clyybber> fuck |
21:38:35 | FromDiscord | <Clyybber> thats the exact one I ported |
21:38:37 | FromDiscord | <Clyybber> bruh |
21:38:45 | disruptek | but, it's fine. i'm sure yours is licensed, at least. |
21:39:23 | FromDiscord | <Clyybber> I want to put it in the stdlib |
21:39:26 | FromDiscord | <Clyybber> replace the $ |
21:39:36 | disruptek | put it in dist. |
21:40:21 | FromDiscord | <Clyybber> it has to be put in the stdlib, so that the stdlib doesn't use sprintf anymore and the 4kb tables don't get generated |
21:41:36 | disruptek | ultimately, yes, but i don't trust the compiler any more and i specifically don't trust stdlib. |
21:41:49 | FromDiscord | <Clyybber> thats cool, but I do |
21:41:53 | disruptek | but whatever. i cannot win this battle. |
21:42:08 | FromDiscord | <mratsim> can someone explain to me why I have an extra 0 at the end? https://play.nim-lang.org/#ix=2JjB |
21:42:17 | FromDiscord | <Clyybber> yeah; not sure what battle you are fighting; I think dist is a great idea though; fusion as it should be |
21:42:50 | disruptek | clyybber: i have red all over my project dashboard. all the fucking time. |
21:43:05 | disruptek | i give up on cpp. |
21:43:18 | FromDiscord | <Clyybber> you probably test the most extensively |
21:43:57 | disruptek | give me some thoughts in the dist discussions. i want to hear ideas on how it should work. |
21:44:35 | disruptek | mratsim: there's a thing where loops run their tails.. probably clyybber will say i'm wrong, but it happened to me. |
21:44:57 | disruptek | and, no, i didn't really read your code. |
21:45:03 | FromDiscord | <Clyybber> disruptek: I don't think we should use --nimblePath |
21:45:31 | FromDiscord | <Clyybber> not even nimble uses it |
21:45:44 | disruptek | nimble is hardly a paragon of design excellence. |
21:45:53 | FromDiscord | <Clyybber> nimblePath is bad |
21:45:56 | disruptek | nimph uses it and it works really well for having multiple distributions. |
21:46:14 | FromDiscord | <Clyybber> what can nimblePath accomplish that --path can't? |
21:46:17 | disruptek | i have, like, my shashlick tree, my treeform tree, my disruptree, etc. |
21:46:37 | FromDiscord | <Rebel> For a fairly complex Nim project let's say around 2000 lines and you build it in debug mode how long would you expect to zip up the generated files? Attempting to zip up those generated files with Python takes 10+ minutes (stopped after 15 minutes of waiting :/) |
21:46:49 | disruptek | trivial configuration. no need to reconfigure projects when you change your distribution. |
21:47:26 | disruptek | 2000 lines? i'd say under a second. |
21:48:00 | disruptek | it takes me like 90s to build nimph, with FFI and >500k lines of nim. |
21:49:56 | FromDiscord | <Clyybber> disruptek: My idea of fusion/dist was having it just be a preinit .nimble |
21:50:18 | FromDiscord | <Clyybber> is dist tied to nimph? |
21:50:22 | FromDiscord | <Clyybber> or tied to nimble? |
21:50:28 | disruptek | neither. |
21:50:48 | FromDiscord | <Clyybber> so do you do nim c --nimblePath:yourdistfolder yourself? |
21:51:02 | disruptek | i don't do anything, yet. |
21:51:11 | FromDiscord | <Rebel> Is Python really just that slow? |
21:51:15 | disruptek | yes. |
21:51:19 | FromDiscord | <Clyybber> ok, I think its not good to rely on nimblePath staying in the compiler |
21:51:28 | disruptek | rebel: i'm j/k. you're probably reading stdin. |
21:51:55 | FromDiscord | <Rebel> ? |
21:52:07 | disruptek | clyybber: in my software, i use a combination of local deps and --nimblePath, but my local deps are specified using --nimblePath in any event. |
21:52:27 | disruptek | rebel: make sure your python-based zip isn't in i/o wait. |
21:52:47 | disruptek | clyybber: nimph merely specifies --path statements for stupidly-structured packages. |
21:52:57 | FromDiscord | <Rebel> sent a code paste, see https://play.nim-lang.org/#ix=2JjH |
21:53:25 | FromDiscord | <Rebel> Well O(N^2) is a bit yikes so yeah I could just use built in commands try that lol |
21:53:31 | disruptek | doesn't that just write the filename? |
21:54:24 | disruptek | clyybber: to put that another way, nimph merely specifies paths for packages that cannot be imported otherwise. |
21:55:35 | FromDiscord | <Rebel> No? Regardless I have an idea and will just use an asyncio subprocess call with tar or zip and see how that fairs as that will just call a C binary that is much faster |
21:55:52 | disruptek | just use zippy, chucklehead. |
21:55:54 | disruptek | !repo zippy |
21:55:55 | disbot | https://github.com/guzba/zippy -- 9zippy: 11Pure Nim implementation of deflate, zlib, gzip and zip. 15 68β 4π΄ 7& 1 more... |
21:56:37 | FromDiscord | <Rebel> oh |
21:57:12 | FromDiscord | <Rebel> Fair |
22:00:40 | FromDiscord | <ElegantBeef> @juan_carlos well the video is outdated anyway, so i guess i should rerecord it π |
22:00:57 | disruptek | i pictured you fatter. |
22:02:07 | FromDiscord | <ElegantBeef> Quit picturing me |
22:03:28 | * | Vladar quit (Quit: Leaving) |
22:04:37 | Prestige | @shadow. I also was thinking it is a bug |
22:05:37 | disruptek | beef: but i'm almost there. |
22:05:50 | FromDiscord | <ElegantBeef> I dont care if you're coming or going |
22:08:22 | disruptek | if i had a nickel... |
22:09:06 | FromDiscord | <ElegantBeef> You'd be less hungry |
22:10:52 | disruptek | clyybber: so the sum total of your advice is, "don't use that thing that currently works"? |
22:11:25 | FromDiscord | <Clyybber> well I thought you yourself wanted nimblePath gone |
22:11:30 | FromDiscord | <Clyybber> but maybe I misremember |
22:13:55 | disruptek | no, i asked araq to leave it in because it's handy. |
22:13:56 | FromDiscord | <ElegantBeef> Damn my colourise is failing tests |
22:14:09 | FromDiscord | <ElegantBeef> Well i give up, we'll never have nice coloured outputs π |
22:14:15 | FromDiscord | <Clyybber> woot |
22:14:24 | disruptek | good, now we can work on something useful. |
22:14:49 | FromDiscord | <Clyybber> Beef: Btw, can you make the "is" in "is immutable not var" not be colored? |
22:14:54 | FromDiscord | <Clyybber> I think it would look better |
22:15:05 | FromDiscord | <ElegantBeef> I can |
22:15:19 | FromDiscord | <ElegantBeef> Lol disruptek, i dont know if you noticed, i dont do much useful developing |
22:15:34 | disruptek | i'm not talking about you, obviously. |
22:15:49 | disruptek | clyybber: don't you want me to test stuff? |
22:16:02 | FromDiscord | <Clyybber> I don't know? |
22:16:09 | FromDiscord | <Clyybber> What should I want you to test |
22:16:41 | disruptek | it depends on whether you want to learn about regressions from users or from CI. |
22:17:00 | FromDiscord | <Clyybber> am I regression-man now? |
22:17:05 | FromDiscord | <Clyybber> thats a lame superhero |
22:17:10 | disruptek | you're the only dev here. |
22:17:20 | FromDiscord | <Clyybber> heh |
22:17:29 | FromDiscord | <Clyybber> whaddabaddayou? |
22:17:41 | FromDiscord | <Clyybber> but anyways; tell me what regressed |
22:18:11 | disruptek | like, what doesn't work right now? |
22:18:18 | FromDiscord | <Clyybber> sure |
22:18:28 | disruptek | jason. |
22:18:28 | FromDiscord | <Clyybber> but not the usual concepts pls; I know that already :p |
22:18:33 | FromDiscord | <Clyybber> aight |
22:18:48 | disruptek | and skiplists demonstrates a pretty bad bug on windows with gc:arc. |
22:18:52 | FromDiscord | <Clyybber> but it works with a higher instantiation limit right? |
22:18:56 | disruptek | yes. |
22:19:06 | FromDiscord | <Clyybber> disruptek: That I can't debug; I don't have a windows machine |
22:19:14 | disruptek | i have the same problem. |
22:19:25 | FromDiscord | <Clyybber> Yeah; araq will have to take a look at that one |
22:19:56 | disruptek | it's actually my bloom filter, if you can believe it. |
22:19:58 | FromDiscord | <ElegantBeef> Clyybber any idea why my tests are writting hints out in some cases causing messages to be different? π |
22:20:02 | disruptek | at least, i think it is. |
22:20:12 | FromDiscord | <Clyybber> Beef; I'll take a look |
22:21:34 | FromDiscord | <Clyybber> @ElegantBeef are they though? |
22:21:42 | FromDiscord | <Clyybber> I think it might be your color sequences |
22:21:54 | FromDiscord | <ElegantBeef> It shouldnt be using them |
22:22:03 | * | klaufir_ quit (Ping timeout: 260 seconds) |
22:22:06 | FromDiscord | <ElegantBeef> assuming `--color:off` is set |
22:22:32 | FromDiscord | <Clyybber> but the failing tests don't explicitly set --color:off do they |
22:22:37 | FromDiscord | <ElegantBeef> I dont know |
22:25:56 | FromDiscord | <Recruit_main707> i am getting a weird error when trying to iterate over a NimNode: `for field in obj[2][2]: # Error: unhandled exception: index 6 not in 0 .. 4 [IndexDefect]` |
22:36:12 | FromDiscord | <ElegantBeef> @Clyybber colour must be off as there is no ansi code for using config, so i dont get it π https://hatebin.com/ndikaunoiz |
22:36:48 | FromDiscord | <Clyybber> oh don't worry about that |
22:36:50 | FromDiscord | <Clyybber> its not the cause |
22:36:58 | FromDiscord | <Clyybber> testament only tests for subset |
22:38:03 | FromDiscord | <Clyybber> the line with the custom pragma error seems fishy |
22:38:15 | FromDiscord | <Clyybber> ah nevermind |
22:40:35 | FromDiscord | <Clyybber> heh; found it |
22:40:40 | FromDiscord | <Clyybber> @ElegantBeef its ` vs ' |
22:40:56 | FromDiscord | <ElegantBeef> Oh |
22:41:00 | FromDiscord | <ElegantBeef> Ok |
22:41:12 | FromDiscord | <ElegantBeef> Gotta fix all the errors with back ticks |
22:41:38 | FromDiscord | <ElegantBeef> ConSistanCy |
22:43:49 | FromDiscord | <ElegantBeef> texplain is a weird un though |
22:45:57 | FromDiscord | <ElegantBeef> Ok so hopefully that's all of them |
22:48:01 | FromDiscord | <ElegantBeef> I should've tested before pushing, but i'm a numpty |
22:52:18 | * | MyMind joined #nim |
22:53:34 | * | Sembei quit (Ping timeout: 260 seconds) |
22:56:36 | disruptek | itym nimpty ftfy |
23:10:56 | * | xet7 joined #nim |
23:13:47 | * | superbia quit (Quit: WeeChat 3.0) |
23:16:45 | * | saem joined #nim |
23:24:42 | saem | hi, folks |
23:24:54 | FromDiscord | <ElegantBeef> Hello |
23:25:11 | FromDiscord | <ElegantBeef> It's the vscode Nim extension person π |
23:25:42 | saem | _a_ vscode nim extension person -- I only ported the code and rsduck has been awesome with patches. |
23:25:45 | * | azed quit (Quit: WeeChat 2.9) |
23:26:09 | saem | Thanks though, I hope it's useful. |
23:26:18 | FromDiscord | <ElegantBeef> Ah |
23:26:28 | FromDiscord | <ElegantBeef> I didnt look much into it so i just assumed you were the original author π |
23:27:14 | saem | I added a history section to help clear that up in the readme. It does have some features and fixes the other one doesn't at this point. |
23:27:33 | saem | Some unique bugs too, because we yoloing it with no tests. |
23:35:39 | saem | Apologies for my lack of knowledge of the community, @elegantbeef. I'm in the vs-code guy, which guy/gal/non-binary-pal are you? ;) |
23:36:12 | FromDiscord | <ElegantBeef> I'm the schmuck that makes random stuff, and currently is attempting to colourise the output of the compiler |
23:37:19 | saem | Cool! I'm presently figuring out tests for nimsuggest and using that to also learn what I don't really get about setting up a productive dev environment for the compiler. |
23:38:24 | FromDiscord | <ElegantBeef> Dont ask me about that, i tend to just run my head into a wall and hope it doesnt get stuck |
23:40:39 | saem | We have the same approach then. |
23:40:48 | ForumUpdaterBot | New thread by 19: Call Nim from C on Win, see https://forum.nim-lang.org/t/7284 |
23:43:25 | disruptek | weird, i have a sticky head sometimes, too. |
23:44:10 | saem | That just means push harder until you're free on the other side, right? |
23:44:27 | disruptek | no, she hates that. |