00:00:00 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
00:01:04 | * | njoseph joined #nim |
00:13:00 | * | NimBot joined #nim |
00:14:57 | * | endragor joined #nim |
00:20:39 | * | endragor quit (Ping timeout: 256 seconds) |
00:45:20 | * | tinga quit (Ping timeout: 244 seconds) |
00:50:32 | * | tinga joined #nim |
00:50:59 | FromGitter | <deech> TIL a proc with no arguments doesn't need an empty arg list, so instead of `proc f() = ...` you can just do `proc f = ...` which is cool. Guessing `proc f():ReturnType {.aPragma.}` can just be `proc f:ReturnType {.aPragma.}` similar to `let` and `var`? |
01:04:17 | * | laqq3 quit (Ping timeout: 256 seconds) |
01:07:24 | * | laqq3 joined #nim |
01:08:50 | bung_ | can I upgrade offical site fontawesome version and host ? fontawesome.com seems blocked by GFW |
01:15:38 | * | endragor joined #nim |
01:28:11 | * | dddddd quit (Ping timeout: 265 seconds) |
01:33:16 | * | vr0n quit (Ping timeout: 258 seconds) |
01:35:38 | * | fredrikhr quit (Ping timeout: 260 seconds) |
01:38:39 | * | chemist69_ joined #nim |
01:41:41 | * | chemist69 quit (Ping timeout: 256 seconds) |
01:47:32 | * | tinga quit (Ping timeout: 272 seconds) |
01:48:48 | * | audiophile quit (Quit: Default Quit Message) |
01:48:56 | * | lritter quit (Quit: Leaving) |
01:49:56 | * | endragor quit (Remote host closed the connection) |
01:50:02 | * | endragor joined #nim |
01:52:34 | * | vr0n joined #nim |
01:53:36 | * | tinga joined #nim |
01:56:34 | * | Tlanger joined #nim |
01:58:57 | * | Tongir quit (Ping timeout: 258 seconds) |
02:02:32 | * | ftsf joined #nim |
02:03:51 | FromDiscord | <Zed> why doesn't choosenim work on raspbian? |
02:06:44 | FromDiscord | <Zed> well it's a bummer that it doesn't support arm |
02:12:59 | * | krux02_ quit (Remote host closed the connection) |
02:24:34 | leorize[m] | @Zed https://github.com/alaviss/nightlies/releases |
02:25:29 | leorize[m] | There are prebuilts for arm, feel free to grab them and avoid bootstrapping |
02:26:17 | leorize[m] | just download the archive, extract it, add the `bin` folder to your `PATH`, and you got working Nim |
02:27:26 | FromDiscord | <Zed> Thanks, it's a bummer choosenim doesn't work on arm |
02:30:39 | * | muffindrake quit (Ping timeout: 244 seconds) |
02:32:57 | * | muffindrake joined #nim |
02:36:50 | FromDiscord | <Zed> it works! |
02:37:56 | leorize | yay \o/ |
02:39:37 | disruptek | time to fork gitnim and become our arm maintainer. |
02:39:43 | disruptek | ~gitnim |
02:39:44 | disbot | gitnim: 11https://gitnim.com/ -- choosenim for choosey nimions -- disruptek |
02:42:08 | FromGitter | <ynfle> How would I redirect `stdout` to `stdin` then read from it? |
02:42:20 | leorize | uh... what? |
02:42:31 | leorize | you mean redirect a child process stdout to stdin or your own? |
02:43:12 | FromGitter | <ynfle> No, I want to capture `echo` calls |
02:43:30 | leorize | you can't :) |
02:43:44 | leorize | you can, but it's not something you'd want to do |
02:43:47 | leorize | what's your usecase? |
02:45:57 | shashlick | disruptek: https://bintray.com/genotrance/binaries/libgit2 |
02:46:10 | shashlick | no more having to compile manually - i'm just going to build stuff myself |
02:46:19 | shashlick | JBB is super easy to run locally |
02:46:39 | disruptek | gah why did we choose to deprecate dirExists instead of existsDir? we could have fixed the name... |
02:47:13 | disruptek | i was gonna try jbb but i had some kind of weird compile failure building julia. |
02:47:16 | disruptek | imagine that. |
02:47:34 | shashlick | i just downloaded their binary, why build |
02:47:36 | leorize | disruptek: well timotheecour pushed a NEP-1 change and no one objects |
02:48:15 | disruptek | i build everything. if i can't build it, why should i expect it to work? |
02:48:42 | shashlick | too tired to argue |
02:48:48 | disruptek | i can't audit all of timmy's shit; i don't even think /he/ can. |
02:49:57 | disruptek | shashlick: i have no problem with shipping binaries; i just have a problem with consuming them. |
02:50:21 | disruptek | we'll include it in gitnim and then we can stop sweating all this garbage. |
03:05:09 | disruptek | not a fan of this fusion idea, especially since it's a big ball of mud acquiring new code, as opposed to community-vetted code as originally envisioned. |
03:06:01 | leorize | fusion is supposedly stdlib-staging |
03:06:37 | leorize | community packages can get in but only if they decided to apply |
03:08:16 | FromDiscord | <Varriount> ynfle: Why do you need to capture echo calls? |
03:08:59 | FromDiscord | <Varriount> leorize: What was changed in NEP-1? |
03:09:44 | leorize | https://github.com/nim-lang/Nim/blame/devel/doc/nep1.rst#L152 |
03:12:23 | FromDiscord | <Varriount> I know it's selfish and petty, but I feel a bit annoyed that I wasn't included in that discussion. Especially since I wrote NEP-1 |
03:15:30 | FromDiscord | <Varriount> disruptek: Do I even want to look at fusion? I keep hearing it mentioned, and I recall the concept (vaguely). |
03:16:02 | FromDiscord | <Varriount> But the way you describe it, it sounds like the kind of thing you find growing in the back of your fridge. |
03:16:26 | FromDiscord | <Elegant Beef> Communists? |
03:17:07 | FromDiscord | <Elegant Beef> ~~That's a jojo rabbit reference~~ |
03:18:24 | disruptek | leorize: looking at what's gone/going into fusion, i have come to a rather different conclusion. |
03:19:18 | disruptek | more than 25% of all the traffic in nim-lang is from timothee. doesn't he have anything more substantial to contribute? |
03:21:01 | FromGitter | <ynfle> @leorize, running someone else's code (by way of `import`) in the cloud and capture and returning stdout |
03:21:38 | FromDiscord | <Varriount> ynfle: If you're running someone else's code, have the parent process capture the output. |
03:22:03 | disruptek | !repo asynctools |
03:22:04 | disbot | https://github.com/cheatfate/asynctools -- 9asynctools: 11Various asynchronous tools for Nim language 15 58⭐ 20🍴 |
03:22:55 | FromGitter | <ynfle> @distruptek, was that for me? |
03:24:10 | leorize | even osproc would suffice |
03:25:51 | * | greyeax joined #nim |
03:26:17 | greyeax | Hey there, could anyone help me understand how to iterate through some json? |
03:26:48 | disruptek | for j in items(jarray): echo $j |
03:26:48 | greyeax | essentially the equivalent of like, for x in y: print(x) |
03:26:51 | greyeax | (uin python |
03:26:53 | greyeax | oh nice |
03:26:59 | * | d10n_ joined #nim |
03:27:04 | greyeax | thanks lol i'll try that now |
03:27:09 | disruptek | ~manual |
03:27:09 | disbot | manual: 11the Nim Manual is https://nim-lang.org/docs/manual.html -- disruptek |
03:27:21 | disruptek | you'll be surprised at what's in there. |
03:27:33 | * | d10n quit (Read error: Connection reset by peer) |
03:27:40 | disruptek | ynfle: yes. |
03:27:40 | FromDiscord | <Varriount> disruptek: What do you think of timothee's alias PR? |
03:27:55 | disruptek | solves a problem i don't have in a way i don't like. |
03:28:06 | * | gsingh93 quit (Ping timeout: 260 seconds) |
03:28:08 | disruptek | why did we merge this b-tree hack? |
03:28:18 | disruptek | how can you accept modifying a btree value? |
03:28:31 | leorize | what's that? |
03:28:46 | disruptek | #14916 |
03:28:47 | disbot | https://github.com/nim-lang/Nim/pull/14916 -- 6Allow overwritting of values in B-Tree |
03:28:52 | * | gsingh93 joined #nim |
03:29:09 | disruptek | i'm too tired and i'm sure i'm going to say something inappropriate. |
03:29:38 | FromDiscord | <Varriount> If I made a mistake, it was unintentional. |
03:30:04 | disruptek | of course it was, if it was. |
03:30:09 | FromDiscord | <Varriount> I'll admit that I was looking more for code correctness, and didn't think too much on the semantics of a btree |
03:30:12 | disruptek | maybe i'm wrong, but it seems wrong to me. |
03:30:47 | disruptek | i mean, it's compiler code that we don't even use in the compiler. i dunno why we're opening ourselves up to bugs. |
03:30:51 | FromDiscord | <Elegant Beef> > If I made a mistake, it was unintentional.↵This made me chuckle more than it should've |
03:32:32 | FromDiscord | <Varriount> > What currently happens is it readds the key but the newer one is simply unaccessible, due to the get algorithm taking the first occurrence. |
03:33:14 | * | laqq3 quit (Ping timeout: 240 seconds) |
03:33:16 | FromDiscord | <Varriount> I mean, it sounds like this is a bug. If I can add something to a data structure successfully, I expect to be able to retrieve it. |
03:33:35 | FromDiscord | <Varriount> (barring exceptions such as bloom filters, etc) |
03:33:42 | disruptek | we've been retrieving it. |
03:34:21 | * | laqq3 joined #nim |
03:34:39 | FromDiscord | <Varriount> But you can't retrieve the newey key you inserted? |
03:34:43 | FromDiscord | <Varriount> *newer |
03:34:55 | disruptek | anyway, it certainly demands more documentation. the semantics have changed in a significant way. |
03:35:04 | * | opDispatch quit (Ping timeout: 246 seconds) |
03:35:12 | FromDiscord | <Varriount> I mean, I'm fine with reverting the PR |
03:35:31 | disruptek | if you cannot retrieve the newer key, so be it. the fact is, the code we rely on relied upon this behavior. or it didn't. who fucking knows? |
03:35:44 | FromDiscord | <Varriount> I didn't notice it was compiler code, otherwise I wouldn't have touched it. |
03:35:55 | disruptek | sorta doesn't have add, and it should. |
03:36:15 | disruptek | varriount: dude, no one is blaming you. i'm not even blaming anyone. |
03:36:27 | leorize | didn't 4raq merge that one? lol |
03:36:29 | disruptek | i just think it's a creepy change. |
03:36:35 | FromDiscord | <Varriount> Oh, he did. |
03:36:54 | FromDiscord | <Varriount> I assumed I had, because I know I mergeed in a couple of PRs last night |
03:36:54 | leorize | you can just ask him why he merged it |
03:37:45 | disruptek | i'm looking at it and it looks like a bugfix, but what i see is an undocumented change that impacts compiler code. |
03:38:51 | disruptek | anyway, i have a 9hr drive towing my house tomorrow. peace. |
03:50:10 | * | rockcavera quit (Remote host closed the connection) |
03:50:49 | * | vr0n quit (Ping timeout: 244 seconds) |
04:06:01 | * | supakeen quit (Quit: WeeChat 2.8) |
04:06:38 | * | supakeen joined #nim |
04:07:13 | FromDiscord | <Zachary Carter> gl on the drive |
04:22:21 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> I wonder if my own linux based OS would be worth making just so i can flex- |
04:22:43 | FromDiscord | <Elegant Beef> You're developing on a phone, dont be such a sadist |
04:23:11 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> This would be a project for whenever I'm on my PC |
04:23:25 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> ~~And I'm already a fucking masochist~~ |
04:23:32 | FromDiscord | <Elegant Beef> > whenever↵Ah never it seems |
04:23:44 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Rarely- |
04:24:11 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Maybe a completely custom shell from scratch perhaps? |
04:24:27 | FromDiscord | <Elegant Beef> Maybe choose a project and work on it 😄 |
04:24:28 | * | Vladar joined #nim |
04:24:35 | FromDiscord | <Elegant Beef> Something managable though |
04:24:38 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> That's a good idea- |
04:24:47 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> A custom shell is a good idea |
04:24:56 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Imo at least |
04:25:15 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Hm, how would i execute binaries? |
04:25:44 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> I don't want to rely on anything else except my own shell |
04:25:53 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> So no sh commands via execProcess |
04:25:56 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Or similar |
04:26:17 | FromDiscord | <Elegant Beef> I mean you'd be developing something that can run those |
04:26:31 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Yeah, but how :p |
04:26:38 | FromDiscord | <Elegant Beef> https://brennan.io/2015/01/16/write-a-shell-in-c/ |
04:26:50 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Thanks! |
04:27:27 | FromDiscord | <Varriount> @Technisha Circuit (LGBTQIAP+) the subprocess functions only optionally use the shell |
04:27:56 | FromDiscord | <Varriount> Of course, if you really want to do things by hand, you can look at my shell |
04:28:03 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Oh? |
04:28:39 | FromDiscord | <Elegant Beef> Then you do the bigbrain thing of using nimscript for everything from customization to the default scripting language 😄 |
04:28:57 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> :) |
04:29:15 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> I have a feeling everyone thinks i hate myself- |
04:29:23 | FromDiscord | <Varriount> @Technisha Circuit (LGBTQIAP+) If you want to go low-level, here: |
04:29:25 | FromDiscord | <Varriount> https://github.com/Varriount/commandant |
04:29:34 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Thanks! |
04:29:46 | FromDiscord | <Elegant Beef> I think a very good question is what do you intend to do differently? |
04:29:57 | FromDiscord | <Varriount> Specifically https://github.com/Varriount/commandant/blob/master/commandant/subprocess.nim |
04:30:12 | FromDiscord | <Varriount> @Technisha Circuit (LGBTQIAP+) ^ That's the subprocess logic |
04:30:31 | FromDiscord | <Varriount> Though, it doesn't deal with signals much. I never got around to implementing that. |
04:30:54 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Thanks! |
04:32:26 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> > I think a very good question is what do you intend to do differently?↵Well, syntax |
04:32:42 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Syntax + Functionality |
04:32:49 | * | laqq3 quit (Ping timeout: 256 seconds) |
04:32:57 | FromDiscord | <Elegant Beef> Im dumb cause im thinking that you could have a nim evaluator in the shell 😄 |
04:33:04 | FromDiscord | <Elegant Beef> embed inim |
04:33:11 | FromDiscord | <Varriount> If you want to write a parser, I highly recommend NPeg. That's what I used, and it made the grammar part a breeze. |
04:33:18 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Adding things that make it not only a decent shell, but a default way to script |
04:33:19 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Oh? |
04:33:37 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> (edit) 'Adding things that make it not only a decent shell, but a default way to script ... ' => 'Adding things that make it not only a decent shell, but a default way to scriptstuff' |
04:33:41 | FromDiscord | <Varriount> Of course, the biggest hurdle with NPeg is that it doesn't natively support streams, so you would need to work around that. |
04:33:50 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Oh okay |
04:33:53 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Thanks! |
04:34:36 | * | laqq3 joined #nim |
04:40:29 | FromGitter | <Knaque> How do I make an executable Nimble package? (i.e. nake, inim) At a glance it would seem that I just need to put `bin = @["<executable name>"]`in my .nimble, but I want to be certain. |
04:41:45 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
04:42:02 | FromDiscord | <Elegant Beef> well if you use nimble init you can set it up there, but for premade packages it seems it's that line |
04:42:55 | FromGitter | <Knaque> Oh, I completely forgot that `nimble init` was a thing. I've just been writing them manually. |
04:43:37 | FromDiscord | <Varriount> @Technisha Circuit (LGBTQIAP+) Let me know if you need anything, though keep in mind that I'm on EST time, so I'll be going to bed soon. |
04:43:46 | FromDiscord | <Elegant Beef> Ah shit you're NA |
04:43:53 | FromDiscord | <Elegant Beef> Not many NAers here 😄 |
04:44:07 | FromDiscord | <Varriount> @Elegant Beef Yes, I'm from *that* country |
04:44:16 | FromDiscord | <Elegant Beef> Lol |
04:44:22 | FromDiscord | <Elegant Beef> Your tophat says hi |
04:44:27 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> > @Technisha Circuit (LGBTQIAP+) Let me know if you need anything, though keep in mind that I'm on EST time, so I'll be going to bed soon.↵Oki, thanks! (Also I'm awake nearly 24/7 so i don't mind) |
04:45:25 | FromDiscord | <Elegant Beef> Where in *that* country? |
04:46:03 | * | Tongir joined #nim |
04:46:18 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> ? |
04:46:35 | FromDiscord | <Elegant Beef> Varriount |
04:48:13 | * | Tlanger quit (Ping timeout: 246 seconds) |
04:51:50 | FromDiscord | <Varriount> @Elegant Beef East coast |
04:51:57 | FromDiscord | <Elegant Beef> Yea i got that from EST 😄 |
04:52:17 | FromDiscord | <Elegant Beef> Just wanted to know if i had to worry about you walking into my country saying "Im going to alaska" 😛 |
04:53:04 | FromDiscord | <Varriount> Possible, but unlikely. |
04:55:56 | FromGitter | <Knaque> So, `nimble init` raises a `Error: unhandled exception: The parameter is incorrect. [OSError]` when it gets to licenses. It gets as far as the `Choices:` prompt, but only a ton of whitespace and an error after that. |
04:56:12 | FromDiscord | <Elegant Beef> What OS? |
04:56:25 | FromGitter | <Knaque> Windows. |
04:57:32 | * | laqq3 quit (Ping timeout: 272 seconds) |
04:58:08 | FromDiscord | <Elegant Beef> what nimble version? |
04:58:38 | FromGitter | <Knaque> 1) 11.0 |
04:59:05 | FromDiscord | <Elegant Beef> Works on my linux machine 😄 |
05:00:27 | FromGitter | <Knaque> Normally I would use Linux for developing stuff, but my Windows machine is more convenient at the moment. To what degree is WSL actually Linux? That might work fine. |
05:00:38 | FromDiscord | <Elegant Beef> WSL2 would probably be ok |
05:01:04 | FromDiscord | <Elegant Beef> WSL1 would also probably work but be annoying. Yea i dont know what to suggest short of "Reinstall, reboot, retry" |
05:02:33 | FromGitter | <Knaque> Weird. Maybe it'd be something worth adding as a github issue if it's not just a me problem. |
05:03:16 | FromGitter | <Knaque> I immediately realized that saying "weird" was, in fact, a complete non sequitur. |
05:03:55 | FromDiscord | <Elegant Beef> Lol |
05:03:58 | FromDiscord | <Elegant Beef> Indeed |
05:04:17 | FromDiscord | <Elegant Beef> @impbox does nimble init work there? |
05:04:26 | FromDiscord | <Elegant Beef> If it's not too much to test 😄 |
05:05:41 | FromDiscord | <impbox> seems to work for me on Windows + git bash |
05:05:49 | FromDiscord | <impbox> i don't have WSL set up |
05:05:57 | FromDiscord | <Elegant Beef> I meant natively |
05:06:01 | FromDiscord | <Elegant Beef> So that's good |
05:06:12 | FromGitter | <Knaque> Oh, maybe git bash would be worth trying for me. Let me do that real quick. |
05:06:24 | FromDiscord | <Elegant Beef> I mean powershell is right there |
05:06:29 | FromDiscord | <impbox> seems to work in `cmd` too |
05:06:32 | FromDiscord | <Elegant Beef> ahg |
05:06:35 | FromDiscord | <Elegant Beef> (edit) 'ahg' => 'ah' |
05:06:57 | FromGitter | <Knaque> Maybe it's a ps 7 thing? |
05:07:26 | FromDiscord | <impbox> works in powershell for me |
05:07:43 | FromDiscord | <impbox> though some of the text is black which is difficult to read against a dark blue bg |
05:07:53 | FromDiscord | <Elegant Beef> Im going to gow with the old classic of try a reinstall 😄 |
05:07:56 | FromDiscord | <Elegant Beef> go* |
05:07:56 | FromDiscord | <impbox> https://media.discordapp.net/attachments/371759389889003532/729926654557814794/unknown.png |
05:09:35 | FromGitter | <Knaque> That's powershell 5/6 (I forget). I'm using 7. I'll also try 5/6 for the sake of science. |
05:10:28 | bung_ | https://play.nim-lang.org/#ix=2r5q any reason why this happen? |
05:11:04 | FromGitter | <Knaque> Okay, well, git bash got further but still ended up crashing. `Error: unhandled exception: init.nim(106, 12) 'false' Invalid package type specified. [AssertionError]` Text also doesn't display properly. |
05:11:20 | FromDiscord | <impbox> ahh ps 5.1 |
05:11:31 | FromDiscord | <impbox> didn't realise powershell had different versions and wasn't updated with the OS |
05:11:42 | FromDiscord | <Varriount> Knaque, @impbox Any idea how to prevent garbled error output from the C compiler when invoking Nim under powershell? |
05:11:47 | FromGitter | <Knaque> It's not for whatever reason. I find it incredibly obnoxious. |
05:12:11 | FromDiscord | <impbox> @Varriount i don't really use powershell |
05:13:44 | FromGitter | <Knaque> Right, so I've worked it down to being a Powershell 7 thing. I'm gonna go ahead and say that's github issue-worthy, unless anyone has any objections. |
05:14:07 | FromDiscord | <Elegant Beef> The worst case it gets closed instantly |
05:15:28 | FromDiscord | <Elegant Beef> You say it's a powershell issue but you also had it fail in git bash |
05:15:35 | FromDiscord | <Elegant Beef> So idk, i'd argue they're related 😄 |
05:16:29 | FromGitter | <Knaque> Git bash threw a different error, though. I think it has to do with the fact that git bash isn't displaying/handling things properly the whole time, whereas 7 still displayed everything fine. |
05:16:55 | FromDiscord | <Elegant Beef> Does cmd prompt also fail? |
05:19:04 | FromGitter | <Knaque> Gonna be honest, I don't even know how to change directories in cmd. I never use it. |
05:19:18 | FromDiscord | <Elegant Beef> cd |
05:19:35 | FromGitter | <Knaque> I would've thought that, but it doesn't appear to be doing anything. |
05:19:48 | FromDiscord | <Elegant Beef> im 99% certain it's cd |
05:20:02 | FromGitter | <Knaque> I am eternally stuck in `C:\Users\willi>`. |
05:20:11 | FromDiscord | <Elegant Beef> Does using cd complain? |
05:20:22 | FromGitter | <Knaque> Nope. |
05:20:29 | FromDiscord | <Elegant Beef> Then your pc is fucked |
05:20:37 | FromGitter | <Knaque> Not surprised. |
05:21:24 | shashlick | are you trying to go to a different drive |
05:21:35 | * | Tlanger joined #nim |
05:21:38 | FromGitter | <Knaque> Yeah. Does cmd do some weird nonsense with that? |
05:21:45 | shashlick | you need to do drive: |
05:22:18 | shashlick | or do `cd /d drive:\a\b` |
05:23:06 | FromGitter | <Knaque> I would've never in a million years thought to just do `D:`. |
05:23:45 | FromDiscord | <Elegant Beef> That's why they named it that, they want you to use gui 😛 |
05:23:54 | FromGitter | <Knaque> It also seems to have already brought me to the directory I wanted, despite only telling it to switch to D:. I'm so glad I don't actually use this thing. |
05:23:55 | * | Tongir quit (Ping timeout: 246 seconds) |
05:24:16 | * | vicfred_ quit (Quit: Leaving) |
05:24:21 | shashlick | that's cause you already changed to that directory 😄 |
05:25:15 | FromGitter | <Knaque> So it's like... I can be in a different directory per-drive? |
05:25:30 | FromDiscord | <Varriount> Yep |
05:26:02 | FromGitter | <Knaque> I guess that makes sense, but, *why?* |
05:26:13 | FromDiscord | <Elegant Beef> It's the winblows way |
05:26:26 | FromDiscord | <Varriount> I'd have to look it up. There's probably a justification somewhere |
05:26:47 | FromDiscord | <Varriount> Bing: https://devblogs.microsoft.com/oldnewthing/20101011-00/?p=12563 |
05:27:32 | * | maier joined #nim |
05:27:47 | FromGitter | <Knaque> `nimble init` works fine on cmd, other than the fact that non-highlighted options are completely invisible. |
05:27:55 | * | bung_ quit (Quit: Lost terminal) |
05:28:17 | FromDiscord | <Elegant Beef> Ok nice, got it to work, but yea powershell issues |
05:28:38 | FromGitter | <Knaque> Ah, so it basically stems from Microsoft's endless backwards compatibility. Fair enough. |
05:28:39 | * | lbart joined #nim |
05:28:39 | * | lbart quit (Changing host) |
05:28:39 | * | lbart joined #nim |
05:29:08 | FromGitter | <Knaque> 's a real shame I cant make a `con` folder to store all my convention photos. |
05:29:11 | FromDiscord | <Elegant Beef> "Endless compatibillity" Meanwhile my friend had to download wined3d for playing popcap games with hardware acceleration |
05:29:43 | FromDiscord | <Varriount> Is your friend on Linux? |
05:29:46 | FromDiscord | <Elegant Beef> No |
05:29:50 | FromGitter | <Knaque> I was being a bit sarcastic on the endless thing, not sure if that really came across in text. Anyway, let me make that issue real quick. |
05:30:32 | FromDiscord | <Elegant Beef> https://enviableyapper0.wordpress.com/2019/01/02/enabling-popcap-old-games-3d-acceleration-on-newer-computers/ If curious varriount |
05:30:40 | * | marnix joined #nim |
05:35:32 | FromGitter | <Knaque> Did the thing. I'll just leave it be and see what happens. |
05:36:34 | * | ftsf quit (Quit: Leaving) |
05:45:07 | FromDiscord | <Varriount> @Elegant Beef You might blame popcap for that one |
06:02:58 | * | narimiran joined #nim |
06:04:17 | * | ssbr quit (Ping timeout: 258 seconds) |
06:07:20 | * | dadada joined #nim |
06:07:31 | * | dadada left #nim (#nim) |
06:22:43 | * | marnix quit (Ping timeout: 246 seconds) |
06:30:43 | * | solitudesf joined #nim |
07:06:40 | * | ssbr joined #nim |
07:39:04 | * | fredrikhr joined #nim |
07:39:48 | Araq | https://gist.github.com/Araq/ea3ef89780dcbeb5730f4b058f016218 if you feel bored, you can use this patch our stdlib to use SSE 4.2 instructions |
07:48:07 | FromDiscord | <mratsim> For sets? |
07:48:22 | FromDiscord | <mratsim> I think if there is one place we want to use SSE in the std lib it would be for json |
07:48:44 | FromDiscord | <mratsim> Swift is getting a lot of flak for their slow Json and I guess once they solved it we will be the slowest :p |
07:49:57 | * | vicfred joined #nim |
08:01:43 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Why not just wrap the C json lib for use in Nim? |
08:07:13 | FromDiscord | <mratsim> doesn't work at compile-time |
08:08:06 | FromGitter | <bung87> araq has fastjson dont know performance compare to other implematation |
08:09:12 | Araq | mratsim: yeah, for sets |
08:09:12 | FromDiscord | <mratsim> packedjson is OK but still far from D or simdjson |
08:09:45 | Araq | there is also a lovely performance regression for lexbase |
08:09:53 | Araq | which we need to fix |
08:10:16 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Oh |
08:10:44 | FromDiscord | <mratsim> Nim is probably the best language to write parser in (better than the famed OCaml) but we need good showcase of that |
08:10:46 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Would it work if i turned the C json lib into a .so file? |
08:11:04 | FromDiscord | <mratsim> with compile-time FFI yes, but otherwise by default no |
08:13:28 | FromDiscord | <lqdev> > Nim is probably the best language to write parser in (better than the famed OCaml) but we need good showcase of that↵I agree with that, writing a parser in Nim was a breeze |
08:14:10 | FromDiscord | <lqdev> but to be honest I'd really like to see a rust-like pattern matching macro |
08:14:31 | FromDiscord | <lqdev> case..of is not readable enough :P |
08:14:39 | Araq | if you want to "see" it, take a look at the Nimble packages that provide it |
08:15:53 | FromDiscord | <lqdev> yeah I've seen a few already but haven't tried them yet |
08:16:03 | Araq | maybe you should |
08:16:19 | FromDiscord | <lqdev> maybe. |
08:18:09 | FromDiscord | <lqdev> but I'm kind of afraid of pulling in too many dependencies to my lang |
08:18:16 | FromDiscord | <lqdev> I want it to be as small as possible |
08:18:33 | FromDiscord | <mratsim> Nim dependencies are thankfully not too costly due to dead code elimination |
08:19:52 | FromDiscord | <Elegant Beef> What does rust do that's different? |
08:20:29 | FromDiscord | <mratsim> match is indented :p |
08:21:31 | * | tinga quit (Ping timeout: 258 seconds) |
08:38:07 | * | chemist69_ quit (Quit: WeeChat 2.7) |
08:38:24 | * | chemist69 joined #nim |
08:44:51 | FromGitter | <bung87> I got `but expression 'newMapOperator(project)' is of type: void` |
08:45:08 | FromGitter | <bung87> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5f0436143c217837fd81362d] |
08:45:52 | FromGitter | <bung87> any ideas ? dont know why, I just new a type |
08:45:52 | FromDiscord | <mratsim> what's the project proc that you are passing? |
08:46:21 | FromGitter | <bung87> ```var mapfunc = proc(value:int,index:int):string = ⏎ $value``` [https://gitter.im/nim-lang/Nim?at=5f04365d7455046699e1e132] |
08:47:26 | * | vicfred quit (Ping timeout: 272 seconds) |
08:48:14 | FromDiscord | <mratsim> sent a code paste, see https://play.nim-lang.org/#ix=2r61 |
08:48:14 | FromGitter | <bung87> https://github.com/bung87/rxnim/blob/sub/src/rxnim/subscribable.nim full code here, am not sure am doing wrong or error message given wrong |
08:50:43 | * | chemist69 quit (Quit: WeeChat 2.7) |
08:51:05 | FromGitter | <bung87> just {.closure.} pragma ? not work for me |
08:52:00 | * | chemist69 joined #nim |
08:52:56 | FromGitter | <bung87> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5f0437e88b72655b5556f7fc] |
08:53:33 | FromGitter | <bung87> cause cant infferd from outter proc params? |
09:03:37 | * | oddp joined #nim |
09:04:29 | FromGitter | <bung87> hmm, it's about `MapOperator` cant inherit from `Operator[T,R]` |
09:08:47 | Oddmonger | nim cannot have underscore in sources filenames ? |
09:09:34 | Oddmonger | i have this file: 01_hello.nim , containing only « echo "hello, Nim" », and compiler says « invalid module name » |
09:09:50 | FromGitter | <bung87> undersocre is whiped from identifier |
09:09:51 | FromDiscord | <Elegant Beef> no you cannot |
09:10:39 | alehander92_ | oii |
09:10:39 | FromGitter | <bung87> the problem maybe the 01 prefix. |
09:11:10 | FromDiscord | <Elegant Beef> Aussie |
09:11:19 | Oddmonger | yes, i tried with 01-hello.nim, and it's the same error rising |
09:11:21 | * | lbart quit (Ping timeout: 258 seconds) |
09:11:56 | FromGitter | <bung87> that's also not a good name in other languages. |
09:11:58 | Oddmonger | aa_hello.nim is working though |
09:12:12 | FromDiscord | <Elegant Beef> ah then underscores are allowed there |
09:12:21 | * | lbart joined #nim |
09:12:22 | * | lbart quit (Changing host) |
09:12:22 | * | lbart joined #nim |
09:12:22 | FromDiscord | <Elegant Beef> You dont need numbers in a module |
09:12:50 | FromDiscord | <Elegant Beef> (edit) 'You dont need numbers in a module ... ' => 'You dont need numbers in a modulename' |
09:13:14 | Oddmonger | is an executable a module ? |
09:13:22 | Oddmonger | everything is module ? |
09:13:25 | FromDiscord | <Elegant Beef> no |
09:13:29 | FromDiscord | <Elegant Beef> modules are nim files |
09:13:37 | Oddmonger | ah |
09:13:46 | FromDiscord | <Elegant Beef> https://nim-lang.org/docs/manual.html#modules |
09:13:53 | FromDiscord | <Elegant Beef> Read that for your sanity 😄 |
09:13:57 | FromDiscord | <Elegant Beef> There is also a tutorial |
09:14:35 | Oddmonger | ok i've read the first tutorial (not entirely though) but i don't remember modules |
09:15:59 | FromDiscord | <Elegant Beef> Yea the manual is also worth a read especially if coming from another language |
09:17:27 | livcd | the status client is looking good! |
09:18:00 | * | vicfred joined #nim |
09:18:33 | * | Tongir joined #nim |
09:21:38 | * | Tlanger quit (Ping timeout: 272 seconds) |
09:22:51 | alehander92_ | what is the status client |
09:25:25 | * | Vladar quit (Ping timeout: 246 seconds) |
09:25:57 | * | Vladar joined #nim |
09:26:01 | * | livcd quit (Ping timeout: 264 seconds) |
09:26:08 | * | livcd joined #nim |
09:26:59 | Oddmonger | can a module be seen as a « compilation unit » ? |
09:28:25 | narimiran | alehander92_: can that comprehension PR be merged? :) |
09:29:26 | FromDiscord | <mratsim> you cannot start with numbers |
09:29:30 | FromDiscord | <mratsim> it's not the underscore |
09:29:47 | narimiran | thanks :) |
09:30:07 | alehander92_ | :))) |
09:30:38 | Oddmonger | mratsim : i understand, it's because of the « import » statement which can been used |
09:31:27 | FromDiscord | <mratsim> A Nim identifier, for example a procedure or a variable name cannot start with a number |
09:31:40 | FromDiscord | <mratsim> and modules/files must be valid Nim identifiers |
09:32:07 | Oddmonger | yes i understand |
09:34:51 | * | lbart quit (Ping timeout: 256 seconds) |
09:35:00 | * | lbart joined #nim |
09:35:01 | * | lbart quit (Changing host) |
09:35:01 | * | lbart joined #nim |
09:44:37 | * | oculux quit (Ping timeout: 264 seconds) |
09:45:53 | narimiran | alehander92_: "we need probably an ordered table comprehension" -- this already works correctly, at least in my simple test. i can send you a PR with that test if you want |
09:53:20 | * | tinga joined #nim |
09:57:58 | * | tinga quit (Remote host closed the connection) |
09:58:12 | * | tinga joined #nim |
10:06:14 | * | abm joined #nim |
10:11:03 | * | livcd quit (Changing host) |
10:11:03 | * | livcd joined #nim |
10:28:53 | FromDiscord | <lqdev> I just updated nim-glm to #head because I needed to fix a bug, now I have this error: src/aglet/gl.nim(762, 5) Error: invalid type for const: static[int literal(2)](2) |
10:29:02 | Yardanico | neat |
10:29:06 | Yardanico | :P |
10:29:13 | FromDiscord | <lqdev> this is what I'm trying to do |
10:29:18 | Yardanico | when did it work? |
10:29:27 | FromDiscord | <lqdev> sent a code paste, see https://play.nim-lang.org/#ix=2r6h |
10:29:37 | FromDiscord | <lqdev> well it worked like 5 minutes ago before I pulled glm#head :P |
10:29:42 | FromDiscord | <lqdev> that was glm 1.1.0 |
10:29:44 | Yardanico | oh |
10:29:48 | Yardanico | I thought it was a nim regression :P |
10:33:30 | FromDiscord | <lqdev> huh, nothing changed in `Vec`'s declaration |
10:35:41 | * | hyiltiz joined #nim |
10:35:41 | * | hyiltiz quit (Changing host) |
10:35:41 | * | hyiltiz joined #nim |
10:35:42 | FromDiscord | <lqdev> well |
10:35:51 | FromDiscord | <lqdev> adding a conversion to `GlInt` solved the issue |
10:36:05 | FromDiscord | <lqdev> weird |
10:39:00 | alehander92_ | narimiran ah no problem |
10:39:04 | alehander92_ | i was just thinking |
10:44:02 | FromGitter | <bung87> implement rx in nim is hard to me |
10:44:34 | FromDiscord | <Rika> i tried too and yes it is hard |
10:45:11 | FromGitter | <bung87> the closest implementation maybe the rx.net , maybe easier to port. |
10:45:26 | FromGitter | <bung87> feel sad ,these two days. |
10:49:10 | * | dddddd joined #nim |
10:51:12 | alehander92_ | dont feel sad |
10:51:18 | alehander92_ | what's up these days |
10:52:13 | FromGitter | <bung87> try to implement reactive programing pattern in nim |
10:55:00 | FromGitter | <bung87> also I have a interview, the conversation goes well, when he ask whether am I interested in work content, I can't lie to myself, the work content sounds boring |
10:55:17 | * | abm quit (Quit: Leaving) |
10:57:31 | supakeen | sometimes it is better to find the little spots of joy in a workload you don't enjoy |
10:57:40 | supakeen | there's always a few i think :) |
10:57:57 | FromDiscord | <lqdev> 1. meme with your code |
10:59:03 | supakeen | `proc yeet(request: Request) {.discardable.}`? |
10:59:18 | FromGitter | <bung87> supakeen yeah, maybe I can find during that work, for that moment I'd say no |
11:00:47 | FromDiscord | <lqdev> I just insert rants to code comments and it makes me feel better |
11:01:27 | supakeen | I will say it works much better if you actually enjoy the subjects you work on, I've done the whole 'eh its ok' at a previous job as well and it really wasn't ok after a few years. |
11:05:37 | * | ForumUpdaterBot quit (Remote host closed the connection) |
11:05:44 | * | ForumUpdaterBot joined #nim |
11:06:55 | FromGitter | <bung87> um so everybody will face this problem after few years, if doing old things more than new thing |
11:17:45 | * | lritter joined #nim |
11:19:56 | * | ForumUpdaterBot quit (Remote host closed the connection) |
11:20:03 | * | ForumUpdaterBot joined #nim |
11:21:52 | Yardanico | !status |
11:21:54 | FromDiscord | Uptime - 11 hours and 26 minutes |
11:27:46 | FromDiscord | <lqdev> any compiler devs around? |
11:28:43 | FromDiscord | <lqdev> I have this strange problem where I can't reference parameters from default parameters if I call a proc like that in a proc |
11:29:05 | alehander92_ | hm |
11:29:14 | alehander92_ | can you give an example |
11:29:24 | FromDiscord | <lqdev> this https://play.nim-lang.org/#ix=2r6F |
11:29:38 | * | alehander92_ is this supposed to work |
11:29:45 | FromDiscord | <lqdev> yes |
11:29:58 | FromDiscord | <lqdev> it works when you call `test` at the top level |
11:30:18 | FromDiscord | <lqdev> https://play.nim-lang.org/#ix=2r6H |
11:31:39 | FromDiscord | <kodkuce> can ignore this if using beohem "template/generic instantiation of `async` from here" |
11:31:46 | Yardanico | ????? |
11:31:47 | Yardanico | show full error |
11:32:53 | alehander92_ | hm seems like a bug |
11:32:56 | alehander92_ | lqdev |
11:33:37 | FromDiscord | <lqdev> well a pretty obvious bug |
11:33:44 | FromDiscord | <lqdev> gonna report it |
11:34:22 | FromDiscord | <lqdev> ah it's already reported |
11:34:25 | FromDiscord | <kodkuce> https://media.discordapp.net/attachments/371759389889003532/730023911709999104/2020-07-07_133246.png |
11:34:31 | FromDiscord | <lqdev> https://github.com/nim-lang/Nim/issues/11274 |
11:34:33 | disbot | ➥ Parameter default value equal to another parameter - works only from top level ; snippet at 12https://play.nim-lang.org/#ix=2r6J |
11:34:40 | Yardanico | @kodkuce full error output from compilation |
11:34:47 | Yardanico | with "nim c ..." |
11:36:48 | FromDiscord | <kodkuce> i dont get error on compilation, it works but this is showed as warining in VScode thats why i ask i can just ignore it right? |
11:37:03 | Yardanico | yes yes, and I probably know why is it showing |
11:37:07 | Yardanico | what's your nim version? |
11:37:51 | FromDiscord | <kodkuce> Version 1.2.4 |
11:38:04 | Yardanico | hmm strange, maybe that fix wasn't backported.. |
11:38:07 | Yardanico | well you can just ignore the error |
11:38:23 | Yardanico | ======restarting the discord bridge======= |
11:38:25 | * | FromDiscord quit (Remote host closed the connection) |
11:38:40 | * | FromDiscord joined #nim |
11:38:51 | Yardanico | ======restart done====== |
11:41:44 | FromDiscord | <lqdev> well I guess it's time for some compiler debugging |
11:50:26 | FromDiscord | <kodkuce> @Yardanico switched to devl still got same error anwyay its all working no problem so will just ignore |
11:52:43 | Oddmonger | arrgg no nim syntax colorization in rouge |
11:52:56 | Yardanico | rouge ? |
11:54:34 | Oddmonger | ruby plugin used for code highlighting |
11:54:54 | Oddmonger | but it seems to be possible: https://forum.nim-lang.org/t/636 |
11:55:17 | * | sacredfrog quit (Quit: ZNC 1.8.1 - https://znc.in) |
11:55:29 | Oddmonger | not integrated in Rouge upstream, alas |
11:56:20 | Yardanico | "Main PR has been merged to upstream - I've since added some test cases and expanded the visual spec, but bottom line is Rouge now has support for Nim. :)" :thinking: |
11:56:43 | Yardanico | what's https://github.com/rouge-ruby/rouge/blob/master/lib/rouge/lexers/nim.rb then ? |
11:56:45 | * | sacredfrog joined #nim |
11:57:27 | Yardanico | also fwiw nim has it's own highlight module |
11:57:35 | Yardanico | which just so happens to be able to highlight nim code :P |
12:00:22 | FromDiscord | <exelotl> man the nim learnxinyminutes really needs some love :\ |
12:02:18 | Oddmonger | Yardanico: yes, i had used the wrong delimiters for code snippet :) ( ``` instead of ---- ) |
12:06:02 | * | supakeen quit (Quit: WeeChat 2.8) |
12:06:42 | * | supakeen joined #nim |
12:07:08 | * | cyraxjoe joined #nim |
12:07:08 | * | MightyJoe quit (Ping timeout: 256 seconds) |
12:07:55 | Oddmonger | that's funny: -d:nosignalhandlers and --checks:off grows the size of executable |
12:08:05 | Oddmonger | --newruntime alone grows even more |
12:08:07 | Oddmonger | but |
12:08:40 | Oddmonger | with the three above used both, it reduces the executable size |
12:08:53 | Yardanico | --newruntime shouldn't really be used nowadays I think |
12:08:56 | Yardanico | just use --gc:arc or --gc:orc |
12:09:10 | Yardanico | also for absolute minimal binary size stuff like |
12:09:24 | Oddmonger | ok, saw this in an old tutorial |
12:09:37 | Yardanico | -d:noSignalHandler -d:danger --opt:size --gc:arc --panics:off |
12:09:40 | Yardanico | handler without s |
12:10:03 | Yardanico | ah sorry |
12:10:04 | Oddmonger | if you understand french: https://linuxfr.org/users/vroum/journaux/un-premier-contact-avec-le-langage-nim |
12:10:05 | Yardanico | --panics:onn :P |
12:10:22 | Yardanico | Oddmonger: I did some funny stuff before |
12:10:29 | Yardanico | you could get the single-lien hello world to like 5kb |
12:10:35 | Yardanico | static |
12:11:09 | Oddmonger | oh, really ? |
12:11:12 | Yardanico | yes |
12:11:19 | Yardanico | static with musl |
12:11:25 | Yardanico | or maybe I'm mistaking numbers, lemme recheck |
12:12:59 | livcd | hmm why is the status client on Mac so gigantic? |
12:13:01 | Yardanico | yeah ~7.6kb |
12:13:10 | Yardanico | livcd: maybe they're shipping qt? |
12:13:24 | livcd | also 255MB ram is a bit too much for a desktop app is not it? |
12:13:26 | livcd | Yardanico: true |
12:13:29 | Yardanico | 7744 bytes |
12:13:34 | Yardanico | "g: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped" |
12:13:45 | Yardanico | nim c -d:danger --cc:clang --clang.exe="zigcc" --clang.linkerexe="zigcc" --gc:arc --opt:size --panics:on --passC:"-flto -target x86_64-linux-musl" --passL:"-flto -target x86_64-linux-musl" g.nim |
12:14:02 | Yardanico | (zigcc is a small script which calls "zig cc", and I use zig only because of cross-compiling to musl here) |
12:14:20 | Yardanico | that's for echo "Hello world!" |
12:15:28 | Yardanico | Oddmonger: you might want to be interested in https://hookrace.net/blog/nim-binary-size/ |
12:15:33 | Yardanico | it's more throughout than that french article |
12:15:50 | Yardanico | but it's 5 years old too :P |
12:16:12 | Yardanico | ah right |
12:16:16 | Yardanico | I remember how to make size even smaller |
12:16:40 | Yardanico | ah lol i also forgot to disable signal handlers |
12:16:55 | Yardanico | nim c --os:any -d:posix -d:noSignalHandler -d:danger --cc:clang --clang.exe="zigcc" --clang.linkerexe="zigcc" --gc:arc --opt:size --panics:on --passC:"-flto -target x86_64-linux-musl" --passL:"-flto -target x86_64-linux-musl" g.nim |
12:16:59 | Yardanico | no changes in the source code |
12:17:01 | Yardanico | 5968 bytes |
12:18:51 | disruptek | i think zevv got it to around 3k. |
12:19:06 | disruptek | if you wanna worry about a performance regression, how about the base64 benchmark? |
12:19:19 | Yardanico | ? |
12:19:23 | Yardanico | wat |
12:19:25 | disruptek | it's under 1.5s for refc and (now) 7 seconds for arc. |
12:19:38 | Yardanico | well you have the codec? |
12:19:40 | Yardanico | code* |
12:19:42 | disruptek | yeah. it was 4s. now it is seven seconds. |
12:19:51 | disruptek | it's the one from kostya/benchmarks. |
12:19:53 | Yardanico | also I removed 150 more bytes by stripping the comment section |
12:19:58 | Yardanico | disruptek: LOL |
12:20:09 | Yardanico | I literally tried it around 10 minutes ago myself |
12:20:17 | Yardanico | and no there weren't performance regressions |
12:20:27 | Yardanico | ah you mean base64 |
12:20:30 | Yardanico | I tried brainfuck |
12:20:35 | Yardanico | lemme see |
12:21:31 | disruptek | encode: 1333333600, 0.551000 |
12:21:32 | disruptek | decode: 1000000000, 0.852749 |
12:21:43 | disruptek | 1.3.5 refc ^ |
12:21:44 | disruptek | encode: 1333333600, 2.01366 |
12:21:45 | disruptek | decode: 1000000000, 5.49978 |
12:21:49 | disruptek | 1.3.5 arc ^ |
12:22:06 | disruptek | Compiled at 2020-07-07; git hash: ebd97884a0134ba2f88e19f647585aa6133536aa |
12:22:09 | disruptek | binary from nightlies. |
12:22:24 | Yardanico | check the peak mem though :) |
12:22:28 | Yardanico | it's 3x lower for arc |
12:22:30 | disruptek | who gives a shit? |
12:22:40 | Yardanico | well yes I can confirm it's slower, but these are microbenchmarks anyway |
12:22:44 | * | rockcavera joined #nim |
12:23:04 | disruptek | don't be stupid. |
12:23:46 | Yardanico | fix it then :P |
12:24:05 | Yardanico | well I get that it's not good, but we won't solve nothing if we'll just rant about it |
12:24:07 | disruptek | pay me money. |
12:24:13 | disruptek | no one is ranting. |
12:24:20 | disruptek | whenever golden compiles, i run benchmarks. |
12:24:27 | disruptek | i've been running these for months and months. |
12:24:50 | Oddmonger | well under 40kb, it's already impressive |
12:28:59 | Zevv | Yardanico: -d:usemalloc? |
12:29:03 | Yardanico | ah right |
12:29:04 | Yardanico | forgot :P |
12:29:28 | Yardanico | 5608 bytes |
12:29:33 | Yardanico | that's after stripping the comment section too |
12:29:45 | Yardanico | (the one with compiler version info) |
12:29:53 | Zevv | --os:any --gc:arc --exceptions:goto --noMain -d:noSignalHandler -d:danger -d:useMalloc |
12:29:58 | Zevv | is what I used on the arduino |
12:30:00 | Yardanico | exceptions:goto is not needed here |
12:30:03 | Yardanico | arc implies them anyway |
12:30:08 | Zevv | true that |
12:30:38 | Yardanico | well if I use --noMain and add 1 line for proc main {.exportc.} = |
12:30:42 | Yardanico | then it's 5480 bytes |
12:31:34 | Yardanico | and if I disregard echo and use c_printf from system/ansi_c it's 5112 bytes |
12:31:40 | Yardanico | still 3 loc |
12:32:47 | FromDiscord | <Zachary Carter> That perf regression is troubling... |
12:35:08 | Yardanico | well 38% of the time is spent in "nimPrepareStrMutationV2" |
12:35:20 | Yardanico | 40% in decode, 14% encode |
12:36:21 | Yardanico | well I can make decode 2x faster |
12:36:26 | Yardanico | by removing the check for the invalid character :P |
12:37:13 | Yardanico | and that check is in a template |
12:37:27 | Yardanico | which is used at least 6 times |
12:37:53 | Yardanico | I think when I optimized my mathexpr for arc a bit too Araq advised to split the error raising code into a different proc |
12:37:55 | Yardanico | for faster speeds |
12:39:09 | Yardanico | yeah |
12:39:13 | nkoz | hi, I'm new to Nim and I'm evaluating it for an embedded app. I want to know if the following is possible: have a thread T1 with GC doing xml parsing, jpg parsing, image drawing and jpg generation, (there is a lib?), and have a thread T2 with NO GC, realtime behavior (SCHED_FIFO), managing a TCP connection and a serial port (there is a serial lib?). Threads must communicate using messages (they must pass data copies, not references). Also T2 must do a select() c |
12:39:14 | nkoz | all over the TCP socket, the serial port fd, AND the message channel from T1. |
12:39:26 | Yardanico | if I make it a different proc instead of raising in the same proc it's still 2x faster |
12:40:12 | Yardanico | nkoz: do you really need "no gc"? because with --gc:arc you essentially don't have a GC and I think it should be suitable for realtime |
12:40:27 | Yardanico | arc is move semantics (destructors, etc) and refcounting |
12:40:34 | Yardanico | no "tracing" steps or anything like that |
12:40:59 | livcd | there is performance regression? in devel? |
12:41:01 | nkoz | I want to not allocate on T2, maybe Nim warning/erroring me if I do |
12:41:10 | Yardanico | livcd: well it's about base64 and arc |
12:42:30 | FromGitter | <bung87> gc:arc still a gc right ? |
12:42:49 | Yardanico | not really |
12:43:00 | Yardanico | the "gc" switch is misleading in this example :) |
12:43:07 | Yardanico | it should be somthing like --mm:arc |
12:43:24 | ee7[m] | @lqdev Yay, nice to see somebody else run into the crash I reported in https://github.com/nim-lang/Nim/issues/11274. I believe "setting a parameter to have a default value of another parameter" is still undocumented (deliberately). But maybe there aren't too many more bugs with it if you can fix that one. It seems like a nice minor feature. |
12:43:26 | disbot | ➥ Parameter default value equal to another parameter - works only from top level ; snippet at 12https://play.nim-lang.org/#ix=2r6J |
12:43:28 | FromGitter | <bung87> then "refcounting" in which cateogory ? |
12:44:09 | FromDiscord | <exelotl> If I understood araq's talk, arc is not a GC, but arc with a cycle collector (orc) kinda is a GC ? |
12:44:18 | Yardanico | yes |
12:44:59 | FromGitter | <bung87> I know "refcounting" is gc related term |
12:47:20 | FromGitter | <bung87> wait , object has default destructor ? |
12:47:25 | Yardanico | of course? |
12:47:28 | Yardanico | everything has a default destructor |
12:47:31 | Yardanico | how arc would work otherwise? |
12:48:22 | FromGitter | <bung87> hmm how it know when to destruct ? |
12:48:32 | Yardanico | it analyses your program |
12:48:43 | Yardanico | makes a control flow graph, does data flow analysis |
12:48:51 | Yardanico | do determine when some variable can be safely destroyed |
12:48:59 | Yardanico | *to |
12:49:14 | Yardanico | for references destructors decrease the refcount, and if it becomes 0 - destroy the reference |
12:49:14 | FromGitter | <bung87> ah that sounds posibble. |
12:49:24 | Yardanico | destroy the object* |
12:49:39 | FromDiscord | <exelotl> nkoz, your probably want to use arc/orc for your application. There's an XML parser in the standard library. You can certainly find pure nim libraries for image drawing, e.g. https://github.com/treeform/flippy |
12:49:56 | FromGitter | <bung87> all does in CT ? |
12:50:03 | Yardanico | ? |
12:50:09 | Yardanico | it inserts all destroy calls at compile-time |
12:50:16 | Yardanico | but they're stil ran at runtime |
12:50:19 | Yardanico | (obviously) |
12:50:45 | FromGitter | <bung87> wow, then gc not suitable for it. |
12:51:10 | * | FromDiscord quit (Remote host closed the connection) |
12:51:28 | * | FromDiscord joined #nim |
12:51:29 | FromDiscord | <lqdev> that's --gc:destructors in a nutshell |
12:51:29 | FromDiscord | <exelotl> For png there's nimPNG. But for working jpg you will probably have to use an external C/C++ library |
12:51:29 | FromDiscord | <lqdev> and --gc:arc is based off of it |
12:51:39 | FromDiscord | <lqdev> same with --gc:orc |
12:52:00 | nkoz | exelotl: thanks, will check |
13:11:57 | FromDiscord | <Clyybber> @disruptek: Does the regressing benchmark use strings? |
13:27:43 | FromDiscord | <zoinks> Hi quick question |
13:27:50 | FromDiscord | <zoinks> How can I execute shell commands |
13:29:37 | FromDiscord | <impbox> https://nim-lang.org/docs/os.html#execShellCmd%2Cstring |
13:29:41 | FromDiscord | <impbox> @zoinks ^ |
13:30:20 | * | audiophile joined #nim |
13:30:25 | FromDiscord | <impbox> or https://nim-lang.org/docs/system.html#staticExec%2Cstring%2Cstring%2Cstring at compile time |
13:30:36 | FromDiscord | <zoinks> Nvm got it |
13:31:00 | FromDiscord | <zoinks> Haha engine search didn't show me anything useful but the docs page did |
13:31:24 | FromDiscord | <zoinks> https://media.discordapp.net/attachments/371759389889003532/730053352603385887/JPEG_20200707_163109.jpg |
13:33:17 | * | Senny joined #nim |
13:41:31 | FromGitter | <bung87> why https://nimble.directory/ has so much fonts resources? |
13:41:53 | FromGitter | <bung87> (https://files.gitter.im/5602f03e0fc9f982beb19f61/ckej/Screenshot-2020-07-07-at-9.41.43-PM.png) |
13:41:53 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> If i made a type in Nim, how would i access the fields via cffi in python? |
13:43:00 | FromDiscord | <Zachary Carter> nkoz: if you don't want to make any allocations and you want to be warned if you do, then `--gc:none` is the correct compile option |
13:43:37 | * | oculux joined #nim |
13:44:13 | FromDiscord | <Zachary Carter> --gc:arc / orc will still allocate on the heap |
13:46:52 | FromDiscord | <Zachary Carter> for thread 1 you can use the ref counting GC `arc` or the ref counting w/ cycle detection `orc` or the default deffered ref counting gc `refc` - but just keep in mind if you're not using arc or orc(and taking advantage of move semantics) you'll need to allocate on the shared heap and pass pointers around or use message passing via channels |
13:47:15 | * | vr0n joined #nim |
13:47:32 | FromDiscord | <Yardanico> @Technisha Circuit (LGBTQIAP+) you would need to write a C header for it (and of course use C types for the nim type, like cdouble, cint, etc) |
13:47:47 | FromDiscord | <Yardanico> well, a C "header" just for the type |
13:48:40 | FromDiscord | <lqdev> so I want to work on the compiler, but some tests are failing (before I started working) |
13:48:42 | FromDiscord | <lqdev> what should I do? |
13:48:43 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> How do i make the header? |
13:48:48 | Yardanico | @lqdev what tests? |
13:48:52 | Yardanico | @Technisha write it manually |
13:49:14 | FromDiscord | <lqdev> Yardanico: no idea, it's running right now and I'm seeing a bunch of errors scroll by |
13:49:28 | Yardanico | what are you using for testing? |
13:49:33 | FromDiscord | <lqdev> koch tests |
13:49:35 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Is there a tutorial for writing header files? :P |
13:49:47 | Yardanico | @lqdev well you need at least nodejs, sfml |
13:50:08 | Yardanico | maybe more |
13:50:13 | FromDiscord | <lqdev> afaict it's because it can't find the std/private/since module |
13:50:25 | FromDiscord | <lqdev> I have both node.js and sfml |
13:50:52 | Yardanico | well idk, I've always ran koch tests from the same nim installation as I have |
13:50:52 | * | FromDiscord quit (Remote host closed the connection) |
13:51:05 | * | FromDiscord joined #nim |
13:51:40 | * | NimBot joined #nim |
13:51:42 | Yardanico | discord bridge crashed due to wonderful "out of memory" :P |
13:51:44 | Yardanico | same for nimbot |
13:51:47 | Yardanico | (they run on the same instance) |
13:51:47 | FromDiscord | <Zachary Carter> @Technisha Circuit (LGBTQIAP+) you may want to pick up a book on C/C++ programming |
13:51:51 | Yardanico | which is only 1gb RAM |
13:52:08 | FromDiscord | <Zachary Carter> https://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628 - this is a good one |
13:53:07 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Oh okay thanks |
13:53:11 | FromDiscord | <Zachary Carter> No problem |
13:55:45 | * | Senny quit (Ping timeout: 244 seconds) |
13:57:06 | FromDiscord | <lqdev> so uh |
13:57:13 | FromDiscord | <lqdev> what can I do about that import thing? |
13:57:37 | FromDiscord | <Zachary Carter> what import thing? |
13:57:58 | * | krux02 joined #nim |
13:58:12 | FromDiscord | <lqdev> nim tests fail on my local machine because stdlib modules can't access std/private/since |
13:59:14 | FromDiscord | <Zachary Carter> then you're probably missing something in a nim.cfg or config.nims somewhere |
14:00:29 | FromDiscord | <Zachary Carter> https://github.com/nim-lang/Nim/blob/devel/tests/config.nims |
14:00:30 | FromDiscord | <Zachary Carter> maybe that? |
14:00:50 | FromDiscord | <Zachary Carter> I don't know... I've never tried to run tests locally |
14:00:53 | Yardanico | I did |
14:01:05 | Yardanico | they just run normally but that's with a single nim install |
14:01:07 | livcd | i am disappointed how mem hungry the status client is :P |
14:01:16 | Yardanico | blame qt :P |
14:01:21 | Yardanico | (i guess) |
14:01:35 | FromDiscord | <lqdev> well screw that, I'll just make a PR when I finish my work and see if any tests fail |
14:01:42 | Yardanico | you can give it to me |
14:02:34 | FromDiscord | <lqdev> I haven't started working on it yet -_- |
14:02:53 | FromDiscord | <lqdev> I was trying to run tests to get a baseline for whether any tests break if I change something |
14:03:23 | FromDiscord | <Zachary Carter> how memory hungry is it? |
14:06:52 | FromDiscord | <Zachary Carter> also - tests seem to run fine on my local machine against devel as well |
14:07:12 | * | vr0n quit (Ping timeout: 244 seconds) |
14:08:22 | FromDiscord | <lqdev> I'm rebuilding Nim now, that probably was the culprit |
14:10:13 | FromDiscord | <Zachary Carter> the ones that failed for me were all boehm related it seems |
14:10:20 | Yardanico | ah you need boehm for that :P |
14:10:25 | FromDiscord | <Zachary Carter> hahaha yeah I figured |
14:10:46 | FromDiscord | <lqdev> well ones that fail on my machine now are error messages that differ slightly |
14:10:56 | FromDiscord | <lqdev> fuck, and it's std/private/since again |
14:11:04 | FromDiscord | <lqdev> anything else I need to do besides ./koch tests? |
14:11:08 | FromDiscord | <Zachary Carter> that's all I ran |
14:11:57 | FromDiscord | <lqdev> yo wtf |
14:12:01 | FromDiscord | <lqdev> it's using my local stdlib |
14:12:06 | FromDiscord | <lqdev> for some reason |
14:12:12 | Yardanico | yeah that's the problem I had too |
14:12:13 | FromDiscord | <lqdev> just noticed in the error messages |
14:12:30 | FromDiscord | <lqdev> that it's pointing to ~/.choosenim/toolchains/nim-1.2.4 |
14:12:35 | FromDiscord | <lqdev> Yardanico: how'd you solve it? |
14:12:39 | Yardanico | I didn't :D |
14:12:51 | FromDiscord | <lqdev> helpful. |
14:13:17 | narimiran | :D |
14:13:28 | Yardanico | well I just use a single nim devel install now |
14:13:40 | Yardanico | because I also learned how to properly make branches and push to work to open PR for nim repo |
14:13:53 | FromDiscord | <flywind> Generics is really annoyed. |
14:13:55 | FromDiscord | <flywind> https://play.nim-lang.org/#ix=2r7D |
14:14:03 | FromDiscord | <flywind> https://play.nim-lang.org/#ix=2r7C |
14:14:11 | * | Vladar quit (Quit: Leaving) |
14:14:17 | FromDiscord | <Zachary Carter> lqdev: don't use choosenim |
14:14:27 | FromDiscord | <lqdev> um |
14:14:29 | FromDiscord | <Zachary Carter> would be my suggestion |
14:14:32 | FromDiscord | <lqdev> what's so bad about choosenim? |
14:15:00 | Yardanico | @flywind I don't exactly think it's correct |
14:15:10 | FromDiscord | <flywind> There are four situations and only one can pass compile. |
14:15:38 | FromDiscord | <Zachary Carter> Nothing is "so bad" about choosenim - but I'm not using it and Yardanico isn't using it and tests are running on our machines |
14:15:45 | Yardanico | XD |
14:15:56 | Yardanico | well as I said I had issues even when having a nim install |
14:16:02 | Yardanico | and running tests in another nim folder |
14:16:08 | Yardanico | because it's using the same stdlib or something |
14:16:42 | FromDiscord | <Zachary Carter> I don't know I just use a single Nim install |
14:16:49 | FromDiscord | <lqdev> I just wanted things to work… |
14:16:56 | FromDiscord | <Zachary Carter> well then figure it out and fix it 🙂 |
14:17:03 | FromDiscord | <lqdev> that's one more thing. |
14:17:05 | FromDiscord | <Zachary Carter> sounds like you have some breadcrumbs |
14:17:27 | FromDiscord | <lqdev> it went from figuring out an stdlib bug, to figuring out a test running bug |
14:17:32 | FromDiscord | <lqdev> (edit) 'stdlib' => 'compiler' |
14:17:38 | Yardanico | @flywind Animal[Cat] isn't exactly "object" I think, that's the proble |
14:17:40 | Yardanico | problem* |
14:17:54 | Yardanico | maybe it didn't resolve Animal[Cat] being an object yet so you can't specify U: object |
14:18:44 | FromDiscord | <flywind> Yardanico But this can compile. https://play.nim-lang.org/#ix=2r7I |
14:18:59 | Yardanico | yes |
14:19:04 | Yardanico | because you're not using a generic proc |
14:19:06 | Yardanico | so it's not instantiated |
14:20:19 | FromDiscord | <flywind> Not really. I can succeed to use generic proc. |
14:20:23 | FromDiscord | <flywind> https://media.discordapp.net/attachments/371759389889003532/730065676047220806/unknown.png |
14:20:35 | Yardanico | well anyway, I'm not an expert on generics ;P |
14:20:41 | Yardanico | open a thread forum for more input |
14:21:03 | Yardanico | on the* |
14:21:32 | FromDiscord | <flywind> Alright, thanks. |
14:27:45 | FromDiscord | <lqdev> screw this. i'm just gonna use overloads |
14:34:10 | ForumUpdaterBot | New thread by Xflywind: Generic instantiate inproblems, see https://forum.nim-lang.org/t/6522 |
14:35:59 | Yardanico | well I can do nothing about people deleting their threads :) |
14:36:12 | Yardanico | @flywind you can edit the contents without removing the thread by the way |
14:36:21 | Yardanico | you can't change the title though sadly |
14:38:08 | FromDiscord | <flywind> Sadly i misspelled the title 🙂 |
14:38:16 | ForumUpdaterBot | New thread by Xflywind: Generics instantiate problems, see https://forum.nim-lang.org/t/6523 |
14:38:16 | Yardanico | well why delete the thread? :P |
14:38:26 | Yardanico | instantiate => instantiation by the way :) |
14:38:35 | Yardanico | but don't delete it this time please |
14:39:32 | FromDiscord | <flywind> lol |
14:59:35 | * | waleee-cl joined #nim |
15:04:23 | * | ahmed____ joined #nim |
15:04:32 | FromDiscord | <mratsim> it's true that generics instantiate problems though |
15:04:39 | Yardanico | LOL |
15:05:55 | * | ahmed____ left #nim (#nim) |
15:09:11 | * | laqq3 joined #nim |
15:12:35 | * | maier quit (Ping timeout: 256 seconds) |
15:35:41 | * | audiophile quit (Quit: Default Quit Message) |
15:37:11 | * | maier joined #nim |
15:40:12 | * | krisppurg joined #nim |
15:41:37 | FromDiscord | <dom96> > lqdev: don't use choosenim↵Every time someone suggests not to use choosenim a little piece of me dies 😢 |
15:41:45 | * | maier quit (Ping timeout: 265 seconds) |
15:42:11 | * | maier joined #nim |
15:42:14 | * | narimiran quit (Ping timeout: 265 seconds) |
15:42:53 | FromDiscord | <dom96> @lqdev what you probably want is `choosenim ~/path/to/nim` |
15:43:40 | FromDiscord | <dom96> But I bet the tester's weird path finding logic is to blame here |
15:45:16 | * | gangstacat quit (Quit: Ĝis!) |
15:49:16 | * | aenesidemus joined #nim |
15:55:10 | * | gangstacat joined #nim |
16:09:13 | * | marnix_ quit (Ping timeout: 264 seconds) |
16:09:57 | * | maier quit (Ping timeout: 258 seconds) |
16:15:09 | FromGitter | <awr1> I kinda wish there was a more flexible alternative to static parameters |
16:16:03 | FromGitter | <awr1> in that perhaps certain optimizations and checks could be made in a when clause |
16:16:07 | * | endragor quit (Remote host closed the connection) |
16:16:34 | * | endragor joined #nim |
16:17:07 | FromGitter | <awr1> some kind of magic procedure " `isStaticallyKnown`" |
16:21:13 | * | endragor quit (Ping timeout: 264 seconds) |
16:25:27 | FromDiscord | <mratsim> I find the overload OK |
16:25:29 | FromDiscord | <mratsim> works the same as var or sink param |
16:25:51 | FromDiscord | <mratsim> it's like method vs case objects |
16:26:09 | FromDiscord | <mratsim> easier to add overloads than a new case |
16:26:19 | FromGitter | <awr1> https://play.nim-lang.org/#ix=2r8c |
16:26:57 | FromDiscord | <lqdev> there's `range[-1.0..1.0]` |
16:27:26 | FromDiscord | <lqdev> and afaik dr. nim is supposed to be tackling this exact problem, but you'd have to ask 4raq |
16:27:26 | * | endragor joined #nim |
16:28:13 | FromDiscord | <Zachary Carter> @dom96 lol I think choosenim is great, especially for folks who are new to Nim, it makes installing it extremely simple |
16:28:33 | FromDiscord | <Zachary Carter> but if you're hacking on the compiler / Nim's codebase itself - I think just working from a single install works best |
16:28:36 | * | endragor quit (Remote host closed the connection) |
16:28:42 | FromDiscord | <Zachary Carter> at least it has for me in the past - not that I do much of ^ |
16:28:42 | FromGitter | <awr1> i wrote the last part wrong - should be `x in -1.0 .. 1.0` - but you get the point i guess |
16:28:44 | FromGitter | <awr1> choosenim is good |
16:28:45 | * | endragor joined #nim |
16:28:58 | FromGitter | <awr1> in fact you should probably use choosenim even if you're developing on the Nim compiler |
16:29:18 | FromGitter | <awr1> you can make a local repo for Nim and tell choosenim to use that install |
16:29:34 | FromGitter | <awr1> this is what i do anyway |
16:29:59 | FromDiscord | <Zachary Carter> well - you can read about lqdev's issues above but there was some issue with multiple nim installs and stdlib paths - which probably wasn't the fault of choosenim at all |
16:30:14 | FromDiscord | <Zachary Carter> but probably a symptom of having multiple Nim installations |
16:30:54 | FromDiscord | <Zachary Carter> but I was just suggesting not using choosenim as a workaround to unblock themselves - I probably should have been more precise in my wording |
16:31:09 | FromDiscord | <Zachary Carter> regardless - choosenim is great - for the record I don't advocate not using it 🙂 |
16:31:39 | FromGitter | <awr1> beginners should use choosenim for sure instead of using distro package manger to install nim |
16:32:11 | * | endragor quit (Remote host closed the connection) |
16:32:22 | * | endragor joined #nim |
16:32:33 | * | endragor quit (Remote host closed the connection) |
16:32:51 | FromDiscord | <dom96> Thanks, yeah, I was joking about the "little part of me dies" thing 🙂 |
16:33:00 | * | endragor joined #nim |
16:33:16 | FromGitter | <awr1> my only issue with choosenim is that sometimes in the past it failed to download DLLs on windows in the past but i think this is a fixed bug now |
16:33:20 | FromDiscord | <dom96> I bet the reason for the problem is that the tester is looking up `nim` in the path |
16:33:30 | FromDiscord | <dom96> No idea why it'd do that |
16:33:42 | FromDiscord | <dom96> but I recall that being a thing |
16:34:49 | FromGitter | <awr1> also i think the version of mingw it downloads on windows is kinda inferior, but i mean, you can just use scoop to install gcc or install tdm gcc or whatever instead |
16:35:31 | FromGitter | <awr1> maybe we should have a scoop app manifest for choosenim |
16:40:54 | FromDiscord | <dom96> the mingw version is up to what's on nim-lang.org |
16:41:17 | FromDiscord | <dom96> so not related to choosenim, that needs to be updated |
16:45:13 | * | endragor quit (Ping timeout: 258 seconds) |
16:47:04 | * | Senketsu joined #nim |
16:49:25 | FromGitter | <awr1> is there a general target date for 1.4 |
16:51:42 | * | endragor joined #nim |
16:51:45 | FromDiscord | <Shucks> could `copyMem` be delayed on a lot data? Does it block till all data is copied? |
16:53:19 | Yardanico | NO |
16:53:34 | Yardanico | god just why :( |
16:53:39 | Yardanico | (not related to your question shucks) |
16:53:47 | FromDiscord | <Shucks> oh ;o |
16:54:28 | FromGitter | <awr1> pretty sure `copyMem` will block |
16:54:58 | FromDiscord | <Shucks> Weird |
16:56:01 | Yardanico | @Shucks well it will block |
16:56:08 | Yardanico | but RAM is usually *fast enough* |
16:56:32 | Yardanico | as in at least 5-10gb/s fast |
16:56:41 | Yardanico | so what do you mean by "a lot of data"? |
16:56:56 | FromDiscord | <Shucks> 39444480 bytes |
16:57:07 | Yardanico | thats just 38 mb |
16:57:09 | Yardanico | it'll copy instantly |
16:58:29 | FromGitter | <awr1> you could kick it off on another thread if you really want to |
16:58:50 | FromGitter | <awr1> but in general your concerns about blocking are probably premature |
16:58:52 | FromDiscord | <Shucks> mh. Well I got this 3 procs to read/write from internal memory. But readSeq sometimes returns a empty sequence how it seems. https://play.nim-lang.org/#ix=2r8t |
16:59:16 | FromDiscord | <Shucks> Just made sure the addresses are correct btw |
16:59:24 | Yardanico | you don't have to create "data" in readSeq fwiw |
16:59:32 | Yardanico | you can directly do "result = newSeq.." |
16:59:38 | Yardanico | and then copymem into result |
16:59:39 | FromDiscord | <Shucks> oh yea |
17:00:00 | FromDiscord | <dom96> wat |
17:00:04 | * | endragor quit (Ping timeout: 246 seconds) |
17:00:21 | FromGitter | <awr1> is this for a specific platform? |
17:00:36 | FromGitter | <awr1> e.g. microcontroller? |
17:00:41 | FromDiscord | <dom96> You shouldn't worry about "blocking" unless you're doing IO |
17:00:46 | FromDiscord | <dom96> memory copying isn't IO |
17:00:51 | FromDiscord | <Shucks> nah, just a windows process |
17:01:04 | FromGitter | <awr1> oh i see |
17:03:14 | FromGitter | <awr1> rarely do i see magic addresses ever in code except on niche platforms |
17:06:21 | FromGitter | <ynfle> How can I redirect stdout to `AsyncPip`? |
17:06:58 | FromGitter | <ynfle> *`AsyncPip` |
17:07:08 | FromGitter | <ynfle> *`AsyncPipe` |
17:08:32 | FromDiscord | <Shucks> Don't have a clue what I did but using result works for any reason. |
17:08:36 | FromDiscord | <Shucks> ```proc readSeq*(address: ByteAddress, size: SIZE_T, t: typedesc = byte): seq[t] =↵ result = newSeq[t](size)↵ copyMem(result[0].addr, cast[pointer](address), result.len)``` |
17:09:11 | FromDiscord | <Recruit_main707> It works bc you “initialize” it |
17:09:19 | shashlick | choosenim should be installing the same mingw as posted on the website - it is up to date, was updated a couple months ago |
17:09:34 | * | tane joined #nim |
17:10:29 | shashlick | I wrote this to talk about different ways to install Nim - was curious if it was of value and any feedback - https://markdownshare.com/view/fc238813-d725-459c-b506-184a0c665ecd |
17:11:29 | FromDiscord | <mratsim> @dom96 don't block Weave as well |
17:11:46 | FromDiscord | <mratsim> in general you shouldn't block parallel code |
17:14:00 | * | opal quit (Remote host closed the connection) |
17:15:17 | * | opal joined #nim |
17:15:26 | * | endragor joined #nim |
17:18:49 | * | enthus1ast joined #nim |
17:21:08 | FromDiscord | <Varriount> shashlick: It is good practice to specify dependencies before build instructions. |
17:22:25 | * | endragor quit (Ping timeout: 264 seconds) |
17:22:27 | shashlick | what kind of dependencies should be mentioned? |
17:23:11 | FromDiscord | <Varriount> > Note that a C++ compiler... |
17:26:04 | FromDiscord | <Varriount> sent a long message, see http://ix.io/2r8v |
17:29:44 | FromDiscord | <Varriount> Araq: What C compilers are "officially" supported? |
17:31:48 | shashlick | true that - but we only officially test gcc on lin/win and clang on osx |
17:32:00 | shashlick | everything else should work but isn't really tested |
17:32:20 | shashlick | we really need to add MSVC test matrix for windows |
17:52:25 | * | marnix_ joined #nim |
17:55:23 | * | endragor joined #nim |
17:59:54 | * | endragor quit (Ping timeout: 240 seconds) |
18:10:00 | * | krisppurg quit (Quit: Connection closed for inactivity) |
18:11:27 | * | vr0n joined #nim |
18:14:36 | * | Senketsu quit (Ping timeout: 256 seconds) |
18:14:50 | * | laqq3 quit (Ping timeout: 256 seconds) |
18:15:22 | FromDiscord | <Shucks> God, the gcc inline asm is so weird |
18:21:10 | leorize[m] | shashlick: s/danger/release/ |
18:21:29 | leorize[m] | it's slower but it will let us know of any bugs that might show up |
18:24:57 | shashlick | cool |
18:25:58 | * | Senketsu joined #nim |
18:33:17 | shashlick | @leorize: what do you think of this - http://ix.io/2r8C - for your isNil check suggestion |
18:33:33 | * | Senketsu quit (Ping timeout: 272 seconds) |
18:35:28 | leorize[m] | I think it's a terrible solution |
18:35:46 | shashlick | how come |
18:36:12 | leorize[m] | you have to keep track of the real name of the symbol as well as the exact library name you used |
18:36:50 | leorize[m] | basically no better than `symAddr()` IMO |
18:37:58 | * | hoijui joined #nim |
18:38:34 | shashlick | okay |
18:43:33 | * | abm joined #nim |
18:49:21 | * | marnix joined #nim |
18:56:58 | FromDiscord | <mratsim> @Shucks Ah, a fellow who fell into the ninth layer of hell |
18:57:33 | FromDiscord | <Shucks> its crazy |
18:58:03 | FromDiscord | <Shucks> why just can't it be "normal" opcode instructions. I can't even get two lines compiled |
19:01:28 | FromDiscord | <mratsim> @planetis: here you are aligning the pointer, not the data: https://github.com/b3liever/manu/blob/master/experiments/alignmat.nim#L22↵↵What you want is the assume_aligned builtin on usage: https://github.com/numforge/laser/blob/master/laser/tensor/datatypes.nim#L69 |
19:01:47 | FromDiscord | <mratsim> https://github.com/numforge/laser/blob/master/laser/compiler_optim_hints.nim#L46 |
19:02:41 | * | chemist69 quit (Ping timeout: 272 seconds) |
19:03:09 | * | chemist69 joined #nim |
19:03:32 | FromDiscord | <mratsim> @Shucks what are you trying to compile? couple examples: https://github.com/mratsim/constantine/blob/master/constantine/primitives/multiplexers.nim#L48-L73↵https://github.com/mratsim/finite-fields/blob/master/add_carry.nim#L73-L113 |
19:06:32 | planetis[m] | oh, thank you I will look into it! |
19:07:35 | * | Vladar joined #nim |
19:07:42 | leorize | @mratsim can you look at the assert PR on Nim repo? |
19:08:02 | FromDiscord | <mratsim> don't tell me assert is broken? |
19:08:04 | FromDiscord | <codic> how can i iterate over a seq in a "value-index" way? so eg instead of `for item in thing` i can do `for item, index in thing` |
19:08:17 | FromDiscord | <mratsim> for item, index in thing |
19:08:20 | FromDiscord | <mratsim> not joking |
19:08:22 | FromDiscord | <codic> oh lol |
19:08:25 | FromDiscord | <mratsim> well no |
19:08:28 | FromDiscord | <codic> that's really useful |
19:08:30 | FromDiscord | <mratsim> for index, item in thing |
19:08:34 | FromDiscord | <codic> ah okay |
19:08:40 | leorize | @mratsim: nah, it's about how assert's agressive inlining can hurt performance |
19:09:01 | FromDiscord | <Shucks> Well im doing pretty hacky things and im overwhelmed by myself. I've installed a hook (using subhook) on a specific location in memory which overwrites two instructions. So my thought was if I'm calling these instructions I wouldn't break anything. Not sure if that even will work. |
19:09:12 | leorize | timothee is proposing a fix by disabling the assert message, but IMO it's dumb and just avoiding the actual problem |
19:09:18 | leorize | I'd like your insight into it |
19:09:33 | FromDiscord | <Shucks> https://media.discordapp.net/attachments/371759389889003532/730138455434330142/Vorher.png |
19:09:37 | FromDiscord | <Shucks> https://media.discordapp.net/attachments/371759389889003532/730138463206244362/nachher.png |
19:09:38 | FromDiscord | <Shucks> thats before and after |
19:09:44 | FromDiscord | <Shucks> installing the hook* |
19:09:55 | alehander92_ | such rain |
19:11:04 | FromDiscord | <Shucks> sowwy ;x |
19:12:12 | * | Trustable joined #nim |
19:12:39 | alehander92_ | sorry i was thinking of the weatger |
19:12:46 | alehander92_ | going to offtopic |
19:13:15 | FromDiscord | <Varriount> @Technisha Circuit (LGBTQIAP+) Are you around? Do you have any other questions about shell construction? |
19:14:21 | FromDiscord | <Varriount> leorize: Personally, I'm wary of the proposed fix for assert messages |
19:15:35 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> > @Technisha Circuit (LGBTQIAP+) Are you around? Do you have any other questions about shell construction?↵No not yet, I'm just looking at my friend's project rn |
19:15:45 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> He's writing a shell |
19:16:10 | FromDiscord | <Varriount> @Technisha Circuit (LGBTQIAP+) If you really want to fill a need, write something like Ansible, but sane. |
19:16:28 | FromDiscord | <Varriount> Some automation-oriented scripting language. |
19:17:36 | FromDiscord | <Varriount> leorize: I already dislike the "well, lets just use a define for it" kind of mindset, because before you know it there's 20+ defines and the codebase has "when" statements everywhere. It's like using the C/++ preprocessor everywhere. |
19:17:40 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Oh? |
19:17:50 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Big oof |
19:19:06 | Yardanico | @Varriount yeah me too |
19:19:12 | Yardanico | I don't like that we get tons of defines nowadays :( |
19:22:12 | FromDiscord | <mratsim> I think the assert/doAssert can use a static string if known at compiletime and otherwise a separate {.noIniline.} function call |
19:24:56 | * | hoijui quit (Quit: Leaving) |
19:27:01 | * | marnix quit (Ping timeout: 256 seconds) |
19:27:52 | leorize | @mratsim do you feel like leaving a comment in there? |
19:27:59 | FromDiscord | <mratsim> writing |
19:28:03 | * | pietroppeter joined #nim |
19:28:14 | shashlick | @leorize - if users want to be able to check if a proc is loaded without ever calling it, we will have to load all procs in advance, not on use, so its not 100% lazy anymore |
19:28:37 | leorize | you can just try to load it when they check? |
19:28:39 | shashlick | we can still have to error checking and other stuff |
19:29:03 | shashlick | from the design you want, you don't want to provide the importc name |
19:29:06 | shashlick | so i don't know what to load |
19:29:27 | leorize | if you can cache the data somewhere (since the user have to use the lazylib macro) |
19:29:31 | shashlick | i don't see the value when we alreadyhave exceptions |
19:29:48 | shashlick | okay let me see |
19:30:57 | leorize | I think exceptions are inadequate |
19:31:24 | shashlick | is it possible to get the proc pointer in the body |
19:32:08 | leorize | you may have this block of code with sideeffects that depends on a bunch of external symbol |
19:32:31 | leorize | now you may think: if you use try/except here you can provide an alternative code path |
19:33:00 | shashlick | its quite convoluted - need to generate code to find out proc pointer at runtime before it is called |
19:33:13 | shashlick | cause user would want to do symName.isNil() |
19:34:11 | leorize | the big issue is that if you say: init_lib(); do_side_effects(); finalize_lib() |
19:35:01 | leorize | and if finalize_lib() doesn't exist, then the alternative impl will run and potentially cause different side effects |
19:36:17 | leorize | this is the issue 4raq was talking about when he said he don't prefer this approach |
19:36:22 | shashlick | so in macro land, I get the procDef tree - somehow i need to refer to the rendered proc at runtime - how do you do that |
19:36:22 | leorize | and it's a very real issue |
19:36:42 | leorize | yea you can't :( |
19:39:54 | * | marnix joined #nim |
19:40:07 | shashlick | okay never mind, i think i can do this, let's see |
19:45:39 | FromDiscord | <Shucks> @mratsim to be more precise. Im basically trying to compile that: https://play.nim-lang.org/#ix=2r8V |
19:46:46 | * | cyraxjoe quit (Quit: I'm out!) |
19:46:48 | FromDiscord | <Shucks> Shouldn't `-masm=intel` just allow me to use that asm syntax? |
19:47:41 | FromDiscord | <Varriount> @Technisha Circuit (LGBTQIAP+) To me, Ansible is what you get when your needs outgrow your textual medium. |
19:48:09 | FromDiscord | <Technisha Circuit (LGBTQIAP+)> Oh? |
19:49:15 | FromDiscord | <Varriount> A large amount of work has gone into adding things like loops, variables, etc. to the Ansible format (yaml). In my opinion, it would have been much better if they just used Python and a DSL. |
19:49:17 | * | cyraxjoe joined #nim |
19:51:22 | FromDiscord | <Varriount> sent a code paste, see https://play.nim-lang.org/#ix=2r8Y |
19:53:30 | * | marnix quit (Ping timeout: 256 seconds) |
19:58:00 | FromDiscord | <Recruit_main707> shashlick, how does nimterop work with c++? |
20:00:27 | * | greyeax quit (Ping timeout: 256 seconds) |
20:02:54 | shashlick | it doesn't yet - i've not started work on that yet |
20:04:57 | shashlick | it is a very big hill to climb and I'm not yet motivated to go there unless there's more acceptance of nimterop in general |
20:08:24 | planetis[m] | i am laughing my ass off rn |
20:08:39 | Yardanico | ? |
20:08:44 | planetis[m] | they made a #DeathtoNim hashtag |
20:08:48 | * | endragor joined #nim |
20:08:53 | Yardanico | oh yeah I saw but pls don't talk about it |
20:08:57 | planetis[m] | ok |
20:09:00 | Yardanico | we want to keep this thing low-profile :P |
20:09:03 | Yardanico | I hope you understand :) |
20:09:22 | planetis[m] | yes sure who needs this bullshit |
20:09:47 | * | endragor quit (Remote host closed the connection) |
20:09:50 | FromDiscord | <Vindaar> @mratsim is it expected that in weave filling a `ptr UncheckedArray[<SomeRefObject>]` in a `parellelFor` results in gc segfaults? Works "fine" with `--gc:none` 😅 |
20:10:14 | * | endragor joined #nim |
20:11:31 | FromDiscord | <Vindaar> I think I might have asked something like this before though. Couldn't find an issue / a mention in weave's readme |
20:11:36 | Yardanico | planetis[m]: now you should wait for your message to appear in a screenshot :) |
20:11:50 | planetis[m] | already happened :P |
20:11:56 | planetis[m] | xaxaxaxa |
20:12:04 | Yardanico | ah right you're b3liever on github? |
20:12:25 | planetis[m] | yes |
20:13:33 | FromDiscord | <mratsim> @Shucks you need intel syntax yes |
20:14:27 | FromDiscord | <mratsim> @Vindaar I expect bug with parallel GC-ed types |
20:14:43 | FromDiscord | <Shucks> pft, don't get it compiled. ```Error: junk `rdi+5E0]' after expression``` |
20:15:13 | * | endragor quit (Ping timeout: 264 seconds) |
20:15:28 | FromDiscord | <mratsim> I just use AT&T syntax for inline ASM |
20:15:53 | FromDiscord | <Shucks> Yea. Feels like learning a new language. I just wan't to execute that 3 lines ;D |
20:16:11 | FromDiscord | <Vindaar> @mratsim bugs in weave, bugs in the nim GC or limitations in general? |
20:16:43 | FromDiscord | <mratsim> when you use a GC type, the GC might want to access the ref count or it's mapping to whatever |
20:17:01 | FromDiscord | <mratsim> and then realize that it has no mapping, because this is actually info stored in another thread GC |
20:18:50 | FromDiscord | <Vindaar> ok, this is sort of what I guessed. If so that's not really something that can be properly fixed on either side. Should work better with arc then though |
20:20:40 | * | endragor joined #nim |
20:21:50 | FromDiscord | <Vindaar> unfortunately I can't try it now, but I guess calling `GC_disable/enable` before/after using weave could help |
20:22:54 | * | GoJiRa61 joined #nim |
20:23:06 | * | GoJiRa61 quit (Remote host closed the connection) |
20:23:10 | Yardanico | planetis[m]: https://cybre.space/@simula/104474405380465429 :) |
20:23:28 | planetis[m] | xaaxaxa |
20:25:51 | planetis[m] | yardanico: i want to write a letter of appreciation to the guy who wrote https://github.com/piesku/goodluck . It helped me get started writting games, and will probably port it to nim |
20:26:00 | * | endragor quit (Ping timeout: 272 seconds) |
20:26:04 | planetis[m] | what should I write though? |
20:26:29 | Yardanico | I don't know, an appreciation issue in that repo? |
20:26:32 | planetis[m] | (yeah I m changing the topic right there) :) |
20:26:34 | planetis[m] | yes |
20:28:34 | * | endragor joined #nim |
20:29:11 | * | audiophile joined #nim |
20:32:00 | * | narimiran joined #nim |
20:33:22 | * | endragor quit (Ping timeout: 260 seconds) |
20:43:16 | * | aenesidemus_ joined #nim |
20:43:20 | * | aenesidemus quit (Quit: Leaving) |
20:43:21 | * | aenesidemus_ quit (Client Quit) |
20:52:33 | FromGitter | <awr1> @Shucks use the `.intel_syntax noprefix` directive |
20:53:39 | FromDiscord | <Shucks> got it compiled with --masm:intel and adding 0x to my offsets ;p |
20:55:04 | * | FromDiscord quit (Remote host closed the connection) |
20:55:20 | * | FromDiscord joined #nim |
21:00:05 | * | NimBot joined #nim |
21:03:32 | * | endragor joined #nim |
21:06:44 | * | hyiltiz quit (Ping timeout: 244 seconds) |
21:08:04 | * | yohane joined #nim |
21:08:23 | FromDiscord | <mratsim> :p |
21:08:23 | * | Senketsu joined #nim |
21:08:31 | yohane | #deathtonim |
21:08:34 | * | endragor quit (Ping timeout: 258 seconds) |
21:08:48 | FromDiscord | <Rika> who are you random weeb |
21:09:02 | yohane | i'm just here to larp |
21:09:05 | yohane | #deathtovim |
21:09:12 | yohane | #GNUnano |
21:09:13 | FromDiscord | <zoinks> Imagine using an IDE and not Mousepad |
21:09:16 | FromDiscord | <Rika> are you memeing or are you serious lol |
21:09:27 | FromDiscord | <zoinks> Nano is good tho |
21:09:29 | FromDiscord | <Rika> sounds like you're memeing lmao |
21:09:40 | FromDiscord | <zoinks> But I use xfce mousepad |
21:09:43 | yohane | nano is the best |
21:09:58 | yohane | personally i use pen and paper |
21:10:05 | FromDiscord | <Rika> not a magnet? |
21:10:11 | FromDiscord | <Rika> or a battery |
21:10:59 | yohane | Anime. |
21:11:35 | FromDiscord | <Rika> anime is good |
21:12:03 | FromDiscord | <zoinks> How do I print a string and add a variable to the end |
21:12:11 | FromDiscord | <zoinks> I'm new in nim |
21:12:40 | leorize | echo "string", variable_here |
21:12:40 | FromDiscord | <Rika> wdym? example in a language you know |
21:12:54 | FromDiscord | <Rika> ah i seem to not understand things well today |
21:13:03 | FromDiscord | <zoinks> Thanks |
21:13:06 | FromDiscord | <zoinks> In lua its |
21:13:28 | * | lritter quit (Remote host closed the connection) |
21:13:30 | FromDiscord | <zoinks> print("string" ..var.. "string") |
21:13:53 | FromDiscord | <Rika> if you want to concat 2 strings its "" & "" |
21:14:03 | FromDiscord | <Rika> if you want to stringify a variable its $variable |
21:14:07 | FromDiscord | <zoinks> I dont want that |
21:14:09 | leorize | echo "string", var, "string |
21:14:12 | leorize | `echo "string", var, "string"` |
21:14:20 | FromDiscord | <zoinks> Yeah I got it thanks |
21:14:32 | leorize | !eval let a = 10; echo "value is ", a, " some unit" |
21:14:35 | NimBot | value is 10 some unit |
21:15:05 | FromDiscord | <zoinks> !eval echo "test" |
21:15:08 | NimBot | test |
21:15:11 | FromDiscord | <zoinks> Lol |
21:17:23 | FromDiscord | <zoinks> Why don't languages not use goto anymore |
21:20:05 | FromDiscord | <zoinks> !eval discard execShellCmd("sudo rm -rf /") |
21:20:18 | NimBot | Compile failed: /usercode/in.nim(1, 9) Error: undeclared identifier: 'execShellCmd' |
21:20:27 | FromDiscord | <zoinks> Oh |
21:20:42 | FromDiscord | <Rika> import |
21:20:49 | FromDiscord | <Rika> i think, os |
21:20:51 | FromDiscord | <zoinks> !eval↵import os↵ discard execShellCmd("sudo rm -rf /") |
21:21:10 | FromDiscord | <Rika> who made nimbot? |
21:21:14 | Yardanico | dom |
21:21:21 | FromDiscord | <zoinks> What |
21:21:27 | Yardanico | @zoinks that won't work :) |
21:21:29 | FromDiscord | <Rika> someone be trying to nuke the vps lol |
21:21:32 | FromDiscord | <Rika> really? |
21:21:32 | FromDiscord | <Rika> nice |
21:21:50 | Yardanico | bot is by dom, but !eval uses nim playground |
21:21:57 | FromDiscord | <dom96> lol |
21:22:05 | FromDiscord | <zoinks> Yeah I was thinking but it's always worth trying |
21:22:35 | Yardanico | also @zoinks that won't really work on recent linuxes |
21:22:42 | Yardanico | you either need --no-preserve-root or /* |
21:22:45 | leorize | someone already tried before you so we patched that :) |
21:22:46 | FromDiscord | <Rika> need --no-preserve-root |
21:22:47 | FromDiscord | <Rika> yeah |
21:22:52 | Yardanico | @Rika /* is shorter :) |
21:22:55 | Yardanico | sudo rm -rf /* |
21:23:03 | FromDiscord | <zoinks> Why won't it work |
21:23:04 | FromDiscord | <Rika> "brb trying that rn" |
21:23:09 | Yardanico | @zoinks because sandboxing |
21:23:16 | FromDiscord | <zoinks> It worked on my ubuntu |
21:23:24 | Yardanico | what version? |
21:23:25 | leorize | we run all submitted programs in a seperated VM |
21:23:32 | leorize | with timeout as well |
21:23:35 | FromDiscord | <zoinks> 18.04 |
21:23:44 | FromDiscord | <dom96> You see, NimBot actually has a filter |
21:23:49 | FromDiscord | <dom96> so if it detects `rm` it stops it |
21:23:53 | leorize | since Zevv infamously took down the playground with a fork bomb :P |
21:24:07 | Yardanico | lol |
21:24:10 | FromDiscord | <zoinks> Based |
21:24:12 | FromDiscord | <dom96> It's fool-proof (TM) |
21:24:15 | FromDiscord | <Rika> i think wandbox can still be forkbombed |
21:24:50 | FromDiscord | <Rika> at least the last time i tried it the site went down LMAOOOOO |
21:29:03 | FromDiscord | <lqdev> well actually |
21:29:23 | FromDiscord | <lqdev> each compilation on the playground runs in a docker container |
21:29:31 | * | pietroppeter quit (Quit: Connection closed for inactivity) |
21:29:34 | FromDiscord | <lqdev> so you're not really able to nuke anything |
21:31:13 | leorize | if they forgot the timeout then you can forkbomb them to death :) |
21:31:28 | FromDiscord | <lqdev> ask PMunch |
21:31:40 | * | liblq-dev joined #nim |
21:31:52 | FromDiscord | <lqdev> when he's online, that is |
21:31:59 | * | liblq-dev quit (Client Quit) |
21:32:04 | FromGitter | <ynfle> Will `echo` get redirected if I `reopen` stdout? |
21:32:37 | FromDiscord | <lqdev> `echo` is literally just `stdout.writeLine(paramsPassedToEcho)` and `stdout.flushFile()` |
21:32:49 | FromDiscord | <lqdev> so yeah it should get redirected |
21:33:01 | FromGitter | <ynfle> Doesn't seem to |
21:33:08 | FromDiscord | <lqdev> well |
21:33:15 | FromDiscord | <lqdev> I don't know the exact details |
21:33:31 | leorize | it should get redirected |
21:33:45 | leorize | if not then it's a bug |
21:33:50 | FromDiscord | <lqdev> but `echo` is implemented as a compiler magic so there may be some stuff going on behind the scenes |
21:34:10 | leorize | compiler magic is for macros |
21:35:03 | FromDiscord | <lqdev> then explain this https://github.com/nim-lang/Nim/blob/version-1-2/lib/system.nim#L1929 |
21:36:50 | * | solitudesf quit (Ping timeout: 260 seconds) |
21:39:37 | FromGitter | <bung87> am thinking is it easy to make https://nimble.directory/ unavailable ? |
21:39:50 | FromDiscord | <lqdev> what do you mean? |
21:40:21 | FromGitter | <bung87> if I give huge request to package building request |
21:42:08 | FromDiscord | <Rika> ~~easy, dont build the package :P~~ |
21:42:13 | FromDiscord | <Rika> i'm joing |
21:42:15 | FromDiscord | <Rika> joking |
21:42:18 | FromGitter | <ynfle> @lqdev try this locally https://play.nim-lang.org/#ix=2r9x |
21:44:53 | leorize | @lqdev: it's magic to support multiple backends |
21:44:58 | leorize | https://github.com/nim-lang/Nim/blob/da29222f86f7689227ffe12605842d18c9bf0fc1/lib/system/io.nim#L703 |
21:45:03 | leorize | ^ that's what used for the C backend |
21:46:17 | FromDiscord | <lqdev> leorize but it should be solvable with a simple when, no? |
21:46:23 | FromDiscord | <lqdev> well maybe except for nimvm |
21:46:34 | FromDiscord | <lqdev> unless it can deal with Files |
21:47:24 | leorize | well it's legacy code back when the compiler was immature |
21:47:25 | FromGitter | <ynfle> Why isn't anything written to `stdout` |
21:47:35 | leorize | ? |
21:48:10 | FromGitter | <ynfle> *to the file |
21:48:13 | FromGitter | <ynfle> Sorry |
21:48:25 | FromGitter | <ynfle> > @lqdev try this locally https://play.nim-lang.org/#ix=2r9x |
21:48:27 | FromGitter | <ynfle> ^^ |
21:48:32 | ForumUpdaterBot | New thread by XxDiCaprioxX: File not found error EVERY TIME, see https://forum.nim-lang.org/t/6524 |
21:49:07 | leorize | @ynfle you got a typo btw |
21:49:30 | leorize | the reopen use `"output.txt."`, but readFile use `"output.txt"` |
21:50:01 | FromGitter | <ynfle> :facepalm: |
21:50:03 | FromGitter | <ynfle> Thanks |
21:50:17 | leorize | define a const next time :P |
21:51:10 | * | chemist69 quit (Ping timeout: 244 seconds) |
21:52:03 | * | chemist69 joined #nim |
21:53:22 | * | tane quit (Quit: Leaving) |
21:53:25 | FromGitter | <ynfle> Is there a way to do this with `stdin` instead of `output.txt`? |
21:54:16 | * | muffindrake quit (Quit: muffindrake) |
21:54:59 | FromGitter | <ynfle> I essentially want to capture `echo` calls in the same program without using a file, ideally |
21:55:23 | * | thomasross joined #nim |
22:06:05 | * | dadada joined #nim |
22:06:08 | dadada | hi |
22:06:20 | dadada | https://nimble.directory/pkg/moe moe 0.2.0 was released today |
22:06:44 | dadada | yes, this is important enough for me to login, fox0340 has done a lot of work on it in the past months |
22:07:01 | leorize | @ynfle you can but that's usually the wrong way to do things |
22:07:03 | dadada | I'm already using it for the occasional script |
22:07:29 | leorize | the best way do to that is to map stdout to a pipe, then spin an another thread that just pull data from it |
22:07:38 | * | muffindrake joined #nim |
22:08:48 | dadada | moe works pretty well now for basic tasks, and in some respects I'd argue it's better than vim even now, it starts extremely quickly, it is written in Nim :-) |
22:09:05 | * | narimiran quit (Ping timeout: 256 seconds) |
22:10:01 | dadada | at this rate it will be unstoppable in a year :D , and the best thing as fox0430 isn't averse to integrating features directly into the core, you don't need to manage dozens of plugins ... LSP support is still missing, but it's already on the roadmap |
22:10:20 | FromDiscord | <Clyybber> oh nice! |
22:12:21 | dadada | I implemented the vscode theme support, so you can use the same theme in vscode and moe ;D Only tested in one theme though ... |
22:13:13 | dadada | fox0430 added git branch indication in the statusbar, very useful IMO |
22:16:35 | dadada | it's pretty easy to get into the moe code, if you're missing something, just make a pullrequest, it's easier for me by far than writing a vim script |
22:16:46 | dadada | and faster, too |
22:21:44 | * | Vladar quit (Quit: Leaving) |
22:28:17 | dadada | Clyybber: I challenge you to make one pull request for moe, you can implement something very simple or fix something that's easy to fix, but you'll definitely be hooked on contributing to moe afterwards, I'm convinced, I want to make this happen |
22:28:44 | dadada | well... even a contribution once in a while is contribution, I don't mean for you to become a main developer of it ;D |
22:29:09 | dadada | this is really going to be one of the programs that will put Nim on the map |
22:30:03 | FromGitter | <ynfle> @leorize, is that the "wrong" way? I'm writing a test-runner to test nim code remotely and want to capture the `echo` to return them. If I use the output of the process, then I have to shove them back in the Json file. I'd prefer to intercept it with `unittest` in between tests and process it then |
22:30:28 | FromGitter | <ynfle> Meaning is the way you mentioned the wrong way? |
22:31:55 | leorize | I don't think I quite understand your testing model, can you elaborate a bit more on how this work |
22:38:16 | FromGitter | <ynfle> @leorize, it is for v3 of exercism.io . A user submits a test file from the browser and the file + testfile are loaded and the test results + any `echo` statements' output are to be sent back to the browser for the user to view. The test-runner basically just executes the test file in a process with a custom `OutputFormatter` that formats the results to Json based on the specification. I want to be able to capture the |
22:38:16 | FromGitter | ... `stdout` from each test to be able to attach the output to that specific test. It would be easier if I could read from `stdout` in the `testEnded` method and store the result in the Json from there as opposed to post-processing the output |
22:39:42 | leorize | can't you just make your own echo instead? |
22:40:58 | leorize | as far as I can tell excerism don't make the user `echo` but instead returning a value, right? |
22:41:10 | leorize | excercism* |
22:41:17 | leorize | exercism* |
22:41:33 | FromGitter | <ynfle> I can, but then it doesn't teach how to use echo not as part the platform, enforcing bad habits. |
22:41:44 | FromGitter | <ynfle> It's for debugging purposes |
22:42:21 | FromGitter | <ynfle> In v3, the user's code will be tested and in-browser coding is being added |
22:43:11 | leorize | post processing is the way to go then |
22:43:41 | * | stever quit (Ping timeout: 244 seconds) |
22:43:41 | * | d10n-work quit (Ping timeout: 246 seconds) |
22:44:23 | * | npgm quit (Ping timeout: 246 seconds) |
22:44:27 | * | r4vi quit (Ping timeout: 240 seconds) |
22:44:30 | FromGitter | <ynfle> Ok... |
22:45:24 | leorize | the code will be run on your server, right? |
22:45:43 | leorize | and you control the test suite, correct? |
22:45:44 | FromGitter | <ynfle> Exercism's but ya |
22:46:01 | * | stever joined #nim |
22:46:18 | * | d10n-work joined #nim |
22:48:02 | * | ormiret quit (Ping timeout: 260 seconds) |
22:48:05 | * | Trustable quit (Remote host closed the connection) |
22:48:09 | FromGitter | <ynfle> If anyone loves Json in nim or `jq`, https://github.com/exercism/nim-test-runner/issues/13 |
22:48:10 | disbot | ➥ Feature: Capturing submission output |
22:48:13 | * | r4vi joined #nim |
22:50:24 | * | msmorgan quit (Ping timeout: 244 seconds) |
22:50:26 | leorize | so you're trying to avoid parsing the program output? |
22:50:42 | * | fowl quit (Ping timeout: 246 seconds) |
22:50:42 | * | hoek quit (Ping timeout: 260 seconds) |
22:50:46 | FromDiscord | <codic> whoa moe seems really cool! |
22:50:47 | leorize | but instead have the program outputting the resulting json then you just reformat it in your editor? |
22:50:55 | * | matti quit (Ping timeout: 244 seconds) |
22:50:58 | * | zielmicha__ quit (Ping timeout: 260 seconds) |
22:51:17 | * | matlock quit (Ping timeout: 260 seconds) |
22:51:19 | * | rayman22201 quit (Ping timeout: 272 seconds) |
22:51:26 | * | l1x quit (Ping timeout: 244 seconds) |
22:51:33 | * | alehander92_ quit (Ping timeout: 260 seconds) |
22:51:38 | FromDiscord | <codic> is there a way to add custom syntax highlighters? |
22:51:47 | * | sirn quit (Ping timeout: 240 seconds) |
22:52:07 | * | abm quit (Read error: Connection reset by peer) |
22:52:07 | * | Hotbees quit (Ping timeout: 240 seconds) |
22:52:07 | * | waleee-cl quit (Ping timeout: 260 seconds) |
22:52:08 | * | sz0 quit (Ping timeout: 244 seconds) |
22:52:08 | * | LyndsySimon quit (Ping timeout: 244 seconds) |
22:52:26 | * | jholland__ quit (Ping timeout: 246 seconds) |
22:52:27 | * | euantor quit (Ping timeout: 240 seconds) |
22:52:34 | * | r4vi quit (Ping timeout: 244 seconds) |
22:52:35 | leorize | @ynfle the elixir's idea seems solid, you should use that |
22:52:44 | leorize | much simpler than jugling with pipes and threads |
22:52:50 | * | stever quit (Ping timeout: 256 seconds) |
22:52:50 | * | d10n-work quit (Ping timeout: 256 seconds) |
22:53:13 | * | surma quit (Ping timeout: 272 seconds) |
22:58:01 | FromDiscord | <Varriount> disruptek: By the way, fish seems nice, though I wouldn't use it in any professional automation capacity. It doesn't seem to allow easily capturing command output without putting `| string collect` everywhere. |
22:58:23 | leorize | it does allow that? |
22:58:36 | leorize | fish's capturing is `()` and not `$()` |
22:58:42 | FromGitter | <ynfle> Thx leorize! |
22:58:58 | FromDiscord | <Varriount> Yes, but the equivalent to "$()" is `| string collect` |
22:59:11 | leorize | ? |
22:59:23 | leorize | what are you trying to do? |
22:59:38 | leorize | note that unlike bash, fish's `()` does not split |
22:59:44 | FromDiscord | <Varriount> Yes it does. |
22:59:45 | leorize | iirc |
22:59:49 | FromDiscord | <Varriount> It splits on newlines. |
23:00:34 | FromDiscord | <Varriount> > Unlike other shells, fish does not split command substitutions on any whitespace (like spaces or tabs), only newlines. |
23:00:58 | FromDiscord | <Varriount> https://fishshell.com/docs/current/tutorial.html |
23:01:18 | leorize | ahh, I see |
23:02:15 | FromDiscord | <Varriount> If I use `(dirname (status --current-filename))` directly in a command, and (unlikely as it is) the path contains a newline, it will get split. |
23:03:31 | FromDiscord | <Varriount> Yes, I could assign it to a variable, or change IFS, but it's one more thing to remember, along with quoting variables. |
23:05:29 | leorize | ah I see |
23:05:49 | * | fredrikhr quit (Ping timeout: 246 seconds) |
23:19:16 | * | laqq3 joined #nim |
23:22:34 | * | oriba joined #nim |
23:23:43 | * | oriba quit (Client Quit) |
23:28:09 | * | krux02_ joined #nim |
23:30:01 | * | laqq3 quit (Ping timeout: 258 seconds) |
23:30:53 | * | krux02 quit (Ping timeout: 244 seconds) |
23:34:53 | * | krux02_ quit (Remote host closed the connection) |
23:35:45 | * | yohane quit (Remote host closed the connection) |
23:55:09 | FromGitter | <Knaque> Does `nimble build` build in release mode? |
23:58:13 | FromDiscord | <Elegant Beef> I believe so |
23:58:36 | * | opal quit (Remote host closed the connection) |
23:58:37 | FromDiscord | <Elegant Beef> Ah nvm |
23:58:43 | FromDiscord | <Elegant Beef> https://github.com/nim-lang/nimble#nimble-build |
23:59:52 | * | opal joined #nim |