00:07:46 | * | noeontheend joined #nim |
00:12:26 | NimEventer | New thread by Jwatson-CO-edu: Building Nim + Nimble on Ubuntu 22, "could not import: SSL_get_peer_certificate", see https://forum.nim-lang.org/t/9168 |
00:59:37 | * | noeontheend quit (Ping timeout: 244 seconds) |
01:07:02 | * | vicfred quit (Quit: Leaving) |
02:02:17 | * | noeontheend joined #nim |
02:03:06 | FromDiscord | <morgan> been working on a pixel art upscaler, it's now like 900 lines long. i think i need to break it up into a few files |
02:03:26 | FromDiscord | <morgan> 1.5x scaling that looks nice is hard |
02:04:35 | FromDiscord | <morgan> next im going to try using a DCT of the input 2x2 and some pixels around it (haven't decided on 4x4, 6x6, or 8x8) to sample the new 3x3 from |
02:04:53 | FromDiscord | <morgan> and then quantizing to the palette |
02:05:24 | FromDiscord | <morgan> eventually im gonna make a cli app from it using my cli input parser framework thing, tho i think i gotta do some more on that before it's done |
02:22:55 | * | kayabaNerve quit (Ping timeout: 260 seconds) |
02:25:54 | * | rockcavera joined #nim |
02:25:54 | * | rockcavera quit (Changing host) |
02:25:54 | * | rockcavera joined #nim |
02:54:42 | FromDiscord | <morgan> ok so following on from #internals, does the compiler have any special treatment for range? |
02:55:01 | FromDiscord | <Elegantbeef> Yes it does |
02:56:14 | FromDiscord | <Elegantbeef> But i mean you can get compile time and runtime checks with distincts |
02:56:23 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/NG3 |
02:56:59 | FromDiscord | <Elegantbeef> Though they're not implicit conversions |
02:57:06 | FromDiscord | <Elegantbeef> But you can make a converter for your specific Factor |
02:57:06 | * | noeontheend quit (Ping timeout: 272 seconds) |
02:57:14 | FromDiscord | <morgan> right |
02:59:17 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Yps |
03:00:47 | FromDiscord | <Elegantbeef> A reason that ranges are done in the compiler is the implicit conversion and also the nice type syntax |
03:01:08 | FromDiscord | <Elegantbeef> Like you can do `var a: 0..1` and there is no way to do that without the compiler support |
03:02:12 | FromDiscord | <morgan> yeah |
03:03:08 | FromDiscord | <morgan> `var b: 2x3` 👀 |
03:14:55 | FromDiscord | <morgan> tempted to clone the compiler and poke around and see if i can get it working with `factor[2, 3]` instead of `Factor[[2, 3]]`, and add 2x3x5 etc for another way of encoding it |
03:15:08 | FromDiscord | <morgan> even if just for fun |
03:15:28 | FromDiscord | <Elegantbeef> It's not an easy task |
03:15:34 | FromDiscord | <morgan> i know |
03:15:43 | FromDiscord | <Elegantbeef> The compiler is not something very simple |
03:15:54 | FromDiscord | <Elegantbeef> Easier to use a macro to do it |
03:15:59 | FromDiscord | <morgan> yeah i was already poking around in the files |
03:30:13 | FromDiscord | <morgan> i think i’m gonna try and figure out all the syntax variations first |
03:46:14 | * | vicfred joined #nim |
04:55:11 | * | vicfred quit (Quit: Leaving) |
05:20:57 | FromDiscord | <sushie> sent a code paste, see https://play.nim-lang.org/#ix=3YpH |
05:21:18 | FromDiscord | <sushie> (edit) "https://play.nim-lang.org/#ix=3YpH" => "https://play.nim-lang.org/#ix=3YpI" |
05:21:34 | FromDiscord | <Yardanico> this is invalid code anyway, but yes, the compiler should show a proper error |
05:21:36 | FromDiscord | <sushie> (edit) "https://play.nim-lang.org/#ix=3YpI" => "https://paste.rs/7yo" |
05:21:52 | FromDiscord | <Yardanico> `const` is for compile-time constants |
05:21:58 | FromDiscord | <Yardanico> why do you want a `const` proc? |
05:22:12 | FromDiscord | <Yardanico> if you want to run it at compile-time, then you can just define a normal proc and call it in a `static` block |
05:24:32 | FromDiscord | <Yardanico> The difference between `var`/`let`/`const` in Nim is not the same as in some other languages. `var` means that the variable is created during runtime and is mutable, `let` - also created during runtime, and immutable (the variable itself, not its underlying data), `const` - a variable is created during compile time and is immutable |
05:28:52 | FromDiscord | <sushie> sent a code paste, see https://play.nim-lang.org/#ix=3YpJ |
05:29:01 | FromDiscord | <sushie> the above is generated as a macro |
05:29:07 | FromDiscord | <sushie> (edit) "as" => "using" | "macro" => "macro" |
05:29:25 | FromDiscord | <sushie> (edit) "https://play.nim-lang.org/#ix=3YpJ" => "https://play.nim-lang.org/#ix=3YpK" |
05:29:28 | FromDiscord | <Yardanico> why won't it let you call it if you make it a normal proc and not a `const`? |
05:29:44 | FromDiscord | <sushie> (edit) "https://play.nim-lang.org/#ix=3YpK" => "https://play.nim-lang.org/#ix=3YpL" |
05:30:21 | FromDiscord | <Yardanico> i just don't quite get what this code does, sorry |
05:36:49 | FromDiscord | <sushie> sent a code paste, see https://paste.rs/ZeO |
05:37:11 | FromDiscord | <sushie> (edit) "https://play.nim-lang.org/#ix=3YpN" => "https://play.nim-lang.org/#ix=3YpM" |
05:39:03 | FromDiscord | <Elegantbeef> What version doesnt work? |
05:41:10 | FromDiscord | <sushie> sent a code paste, see https://play.nim-lang.org/#ix=3YpP |
05:41:16 | FromDiscord | <sushie> but if it has an argument, it runs fine |
05:41:53 | FromDiscord | <sushie> (edit) "but if ... it" added "you give" | removed "has" | "argument," => "parameter/argument," |
05:42:17 | * | kayabaNerve joined #nim |
05:42:32 | FromDiscord | <Elegantbeef> It's a compiler bug that's quite odd |
05:48:43 | FromDiscord | <ripluke> can i use nim to get images in a terminal |
05:49:04 | FromDiscord | <Elegantbeef> Yes, now is there a wrapped API for it probably not |
05:49:24 | FromDiscord | <ripluke> how |
05:49:30 | FromDiscord | <Elegantbeef> https://sw.kovidgoyal.net/kitty/graphics-protocol/ |
05:50:00 | FromDiscord | <Yardanico> https://github.com/jesvedberg/tpix for kitty graphics protocol, idk about other terminal emulators |
05:50:09 | FromDiscord | <ripluke> thats just for kitty, i was thinking something like w3m |
05:50:25 | FromDiscord | <Yardanico> so you mean pseudographics? |
05:51:33 | FromDiscord | <ripluke> nah like w3m can show images |
05:51:54 | FromDiscord | <Yardanico> just check how w3m does it, easy :P |
05:52:10 | FromDiscord | <Yardanico> "Best i understand you need to use a xterm derived terminal for this to work, because the sub-program used by w3m for this draws over the terminal window to make things happen." |
05:52:16 | FromDiscord | <Yardanico> also this sounds really hacky and not a good way to do things |
05:52:17 | FromDiscord | <Elegantbeef> > w3m and überzug both rely on x11 to draw an image in a subwindow. It is highly unlikely that either of the two can be made to work in Terminal without also modifying the tools themselves. |
05:52:33 | FromDiscord | <Elegantbeef> It doesnt render it in the window it renders a hidden window where the image should be |
05:52:36 | FromDiscord | <Yardanico> yep |
05:57:17 | FromDiscord | <ripluke> oh |
05:57:19 | FromDiscord | <ripluke> rip |
05:57:45 | FromDiscord | <Elegantbeef> Terminal emulators generally just emulate terminals and terminals of course couldnt display images |
06:07:06 | * | crem quit (*.net *.split) |
06:07:07 | * | euantorano quit (*.net *.split) |
06:07:24 | * | crem joined #nim |
06:08:18 | * | euantorano joined #nim |
06:18:17 | * | PMunch joined #nim |
06:18:30 | * | cornfeedhobo quit (*.net *.split) |
06:18:31 | * | tinystoat quit (*.net *.split) |
06:19:27 | * | tinystoat joined #nim |
06:22:42 | FromDiscord | <Phil> TFW you still use the gnome terminal because you never saw the need to upgrade |
06:24:28 | FromDiscord | <Yardanico> i also just use konsole, it works really well |
06:24:32 | * | cornfeedhobo joined #nim |
06:30:05 | om3ga | what I don't get. var declared in thread function's scope is thread local by default? |
06:30:29 | FromDiscord | <Elegantbeef> What? |
06:31:07 | om3ga | I'm asking the variable declared in thread procedure (in nim terms), will be accessible for that procedure only? |
06:32:15 | FromDiscord | <Elegantbeef> Safely yes |
06:32:35 | om3ga | why I'm asking that, because something really strange happens, with the code that used to work without any problem before :) |
06:32:57 | FromDiscord | <Elegantbeef> I believe you should be able to pass the address to other threads and it can write, but i may be mistaken |
06:33:08 | FromDiscord | <Elegantbeef> It's all memory inside of a program so I imagine it's true |
06:33:10 | om3ga | now what I did, I used locks (posix mutex), and locked entire procedure |
06:33:28 | om3ga | so that helped |
06:34:26 | om3ga | I see concurency issues, which are issues more to application logic, not for the runtime |
06:36:33 | om3ga | each thread here has a variable request, which initialized by library, and is a structure in C. By some reason it's content changes |
06:36:52 | FromDiscord | <Elegantbeef> Code? |
06:37:08 | om3ga | Elegantbeef, just a second |
06:37:12 | FromDiscord | <Elegantbeef> Does the library you're using support threading? |
06:37:23 | om3ga | Elegantbeef, sure |
06:38:08 | om3ga | I recently asked here couple of times about that, it is old fcgi lib (patched) |
06:38:21 | om3ga | I mapped it to nim (from C) |
06:39:06 | om3ga | my "mapping" had issues, but all of them are fixed, just a second, I will share the code |
06:47:38 | om3ga | Elegantbeef: https://drive.google.com/file/d/1Zuh6ekg6-J-MSC_15sXIXOjdYuEkXNQW/view?usp=sharing |
06:48:18 | om3ga | this is the "compact" version of the server app |
06:49:54 | * | jjido joined #nim |
06:51:11 | om3ga | what happens there, in proc worker, there is var request, which is C struct FCGX_Request. When http pipelined requests are sent to the fcgi app, then that var somehow being affected. |
06:52:57 | FromDiscord | <Elegantbeef> Google drive more like gitdrive amirite |
06:54:27 | om3ga | sorry, I don't know where to upload files nowadays, without registration and sending sms |
06:54:51 | om3ga | I don't like Gdrive |
06:54:57 | FromDiscord | <Zectbumo> it bugs me when libs have "almost useful" functions. Take io.readLines() for example↵https://nim-lang.org/docs/io.html#readLines%2Cstring%2CNatural |
06:55:09 | FromDiscord | <Elegantbeef> Eh most people just host their code on a gitrepo |
06:55:15 | FromDiscord | <Elegantbeef> "almostUseful"? |
06:55:44 | FromDiscord | <Zectbumo> yeah, like who is going to want `n` lines. what generally we want is to iterate over all the lines |
06:55:51 | FromDiscord | <Yardanico> there's `lines` for that |
06:55:56 | FromDiscord | <Yardanico> https://nim-lang.org/docs/io.html#lines.i%2Cstring |
06:56:09 | FromDiscord | <Zectbumo> and if I don't get the number of lines I want then I can throw EOF if I wanted to |
06:56:12 | FromDiscord | <Yardanico> readLines is specifically if you only want to read `n` files from a file |
06:56:15 | FromDiscord | <Yardanico> and not all |
06:56:25 | FromDiscord | <Zectbumo> who does that? |
06:56:34 | FromDiscord | <Elegantbeef> Consider a file format with a header and you want to validate the file 😄 |
06:56:38 | FromDiscord | <Yardanico> In reply to @Zectbumo "who does that?": if you want to read first 100 lines of 10 GB file |
06:56:53 | FromDiscord | <Yardanico> good like doing `"file.txt".readFile.splitLines[0..99]` |
06:56:57 | FromDiscord | <Yardanico> (edit) "like" => "luck" |
06:57:08 | FromDiscord | <Yardanico> why do you not like `lines` iterator? It's exactly what you're asking for |
06:57:20 | FromDiscord | <Zectbumo> I'll use `lines` yes |
06:57:21 | FromDiscord | <Yardanico> it's defined for both `File` and `string` (filename) |
06:57:22 | FromDiscord | <Elegantbeef> What's the behaviour om3ga? |
06:57:38 | FromDiscord | <Elegantbeef> I'm looking at the code now and it seems ok |
06:58:09 | om3ga | Elegantbeef, in worker procedure, there is var request, with type FCGX_Request |
06:58:23 | om3ga | it defined in fcgx_lib.nim |
06:58:23 | FromDiscord | <Elegantbeef> Also there is a `withLock(lock): echo "Hello"` 😛 |
06:58:25 | FromDiscord | <Zectbumo> but I was just looking at the readLines (while I needed lines) and saw it pulls it all `n` lines into memory |
06:58:55 | FromDiscord | <Yardanico> so do you want the stdlib to be bigger or smaller? :P |
06:59:13 | FromDiscord | <Yardanico> In reply to @Zectbumo "but I was just": and of course it will put all lines into memory, since it's a `proc` and returns a seq |
06:59:16 | FromDiscord | <Yardanico> not an `iterator` |
06:59:35 | FromDiscord | <Elegantbeef> Just to be clear you did setup fastcgi to work with multithreading? Generally libraries need that explicitly |
06:59:59 | om3ga | Elegantbeef, sure, I used that lib in C before |
07:01:19 | FromDiscord | <Zectbumo> In reply to @Elegantbeef ""almostUseful"?": yes almost, as in, just use `lines`. maybe `readLines` came out first and then someone came out and made `lines` because `readLines` was "almost useful, but didn't cut it". for example, PHP had a lot of "almost useful" functions and kept adding substr1() substr2() substr3(). it was just forehead slap after forehead slap |
07:01:22 | om3ga | maybe I forgot something, and don't remember (here is more than 10 tasks running with that lib which were written long ago in C). But how I see now, it's not ok |
07:01:24 | FromDiscord | <Elegantbeef> Oh om3ga you've got two procs that point to the same procedure |
07:01:41 | om3ga | Elegantbeef: where? |
07:01:45 | FromDiscord | <Elegantbeef> `proc FCGX_InitRequest(): int {.header: "fcgiapp.h", varargs.}` and `proc FCGX_InitRequest(request: ptr FCGX_Request; sock: cint; flags: cint): cint {.header: "fcgiapp.h", varargs.}` go to the same proc, that doesnt seem right |
07:02:18 | om3ga | OMG |
07:02:24 | om3ga | just a second |
07:03:03 | FromDiscord | <Elegantbeef> Where's pmunch to scream "Should've used futhark" 😄 |
07:03:17 | FromDiscord | <Yardanico> also, is `varargs` really needed here if all arguments are already in the proc definition? |
07:03:27 | FromDiscord | <Elegantbeef> It's not |
07:03:38 | FromDiscord | <Elegantbeef> They probably just seen it in some C code and thought it was |
07:04:08 | om3ga | yes. this looks like the reason |
07:04:16 | FromDiscord | <Elegantbeef> also you can do `{.push header: "fcgiapp.h".}` `{.pop.}` |
07:04:23 | FromDiscord | <Elegantbeef> Dont need to annotate every single proc with the header |
07:04:31 | PMunch | Oh yeah, Futhark wouldn't mess up like that :P |
07:04:32 | om3ga | I used c2nim |
07:04:51 | FromDiscord | <Elegantbeef> Fuck the demon is here |
07:04:55 | PMunch | Muhahah |
07:04:55 | om3ga | and strange thing, it work'd before |
07:05:04 | FromDiscord | <Elegantbeef> Anyway well i have the code want me to touch it up a bit? 😛 |
07:05:21 | om3ga | Elegantbeef sure |
07:05:22 | PMunch | You're the one who called me by my true name and summoned me, don't act all surprised now |
07:06:25 | om3ga | I spent hours with debugger, with pipelined http requests, it just corrupts request var content |
07:06:59 | FromDiscord | <Elegantbeef> Is there any reason for `Shared2` isnt that just a `distinct cint`? |
07:07:08 | om3ga | causing segfaults (because Accept_r frees, and re-inits stuff in that struct) |
07:07:55 | om3ga | Elegantbeef, yeah, fcgi procs need cint |
07:08:11 | FromDiscord | <Elegantbeef> So then it's just a distinct cint |
07:08:22 | om3ga | yes |
07:09:09 | FromDiscord | <Elegantbeef> It's not much but https://play.nim-lang.org/#ix=3Yq4 |
07:09:54 | FromDiscord | <Elegantbeef> Guess that should be `sys[] = Shared2(-1)` |
07:10:25 | FromDiscord | <Elegantbeef> Anyway glad to have helped did c2nim cause the issue or you? |
07:10:58 | om3ga | interesting, but withLock may not work with that lib |
07:11:40 | FromDiscord | <Elegantbeef> I mean it should, but meh |
07:11:56 | om3ga | ELephantbeef, thank you very much, I will fix imports from C, and verify if everything is ok |
07:11:58 | FromDiscord | <Elegantbeef> I have to think about the nine slice i added to my gui system and how to best work with it |
07:12:14 | om3ga | Thank you! |
07:13:31 | PMunch | @Elegantbeef, ooh you're doing nine-slices as well? |
07:13:38 | FromDiscord | <Elegantbeef> Yea |
07:13:58 | FromDiscord | <Elegantbeef> My game gui is going mostly well |
07:14:23 | PMunch | You can have a look at how I handle them in SDLGamelib: https://github.com/PMunch/SDLGamelib/blob/master/gamelib/ninepatch.nim |
07:14:29 | PMunch | Might give you some inspiration |
07:14:38 | FromDiscord | <Elegantbeef> It's all in shader |
07:14:57 | FromDiscord | <Elegantbeef> simplescreenrecorder-2022-05-23\_01.14.09.mp4 https://media.discordapp.net/attachments/371759389889003532/978194307339157534/simplescreenrecorder-2022-05-23_01.14.09.mp4 |
07:15:01 | FromDiscord | <Elegantbeef> Present state of my gui if interested |
07:15:18 | * | gsalazar joined #nim |
07:15:48 | PMunch | Definitely looks like a game UI :P |
07:16:41 | FromDiscord | <Elegantbeef> So rood |
07:17:07 | FromDiscord | <Elegantbeef> It actually looks nice without the ugly 9slice |
07:17:26 | FromDiscord | <Elegantbeef> simplescreenrecorder-2022-05-21\_19.23.42.mp4 [simplescreenrecorder-2022-05-21_19.23.42.mp4](https://t2bot.io/_matrix/media/r0/download/matrix.org/PnsdWNlZKNDkxaPWcEksAALA) |
07:18:26 | FromDiscord | <Bung> @PMunch have you recheck this PR https://github.com/PMunch/nimlsp/pull/125 |
07:28:35 | * | ltriant_ quit (Ping timeout: 260 seconds) |
07:52:47 | om3ga | Elegantbeef: no, that not helped unfortunately. I should to verify FCGI man again, maybe it's not the issue with threads at all.. |
07:53:40 | FromDiscord | <everyone> In reply to @Elegantbeef "simplescreenrecorder-2022-05-21\_19.23.42.mp4 [simp": it looks like it was made in TempleOS |
07:55:55 | FromDiscord | <everyone> Guys i want to learn about compilers and language development. Are there any blog posts or videos or guides that can help me get to know them? |
07:55:58 | PMunch | om3ga, maybe try with Futhark, at least then you can be fairly certain that the C <-> Nim bindings are sound |
07:56:33 | om3ga | PMunch, yeah. Good idea indeed, I will try that right now |
07:56:37 | PMunch | @everyone, just have to ask, but is your username just a way to troll the channel with people tagging you (which at least on some platforms tags @everyone :P) |
07:56:58 | FromDiscord | <everyone> In reply to @PMunch "<@856412455507984404>, just have to": lol |
07:58:13 | FromDiscord | <everyone> i just thought it was funn |
07:58:17 | FromDiscord | <everyone> (edit) "funn" => "funni" |
07:58:34 | FromDiscord | <everyone> i'll change it if you want me too |
07:59:04 | PMunch | I'm on IRC so it doesn't bother me, just wondered if @everyone else gets pinged when I tag you :P |
07:59:29 | FromDiscord | <everyone> In reply to @PMunch "I'm on IRC so": no they do't |
07:59:34 | FromDiscord | <everyone> (edit) "do't" => "don't" |
07:59:47 | PMunch | Right, then feel free to keep it :) |
08:00:13 | FromDiscord | <everyone> do you know some source where i could learn about making languages? |
08:00:32 | * | dithpri quit (Remote host closed the connection) |
08:00:40 | FromDiscord | <Elegantbeef> Crafting interpreters is like the #1 suggested resource |
08:00:58 | * | dithpri joined #nim |
08:01:43 | FromDiscord | <everyone> In reply to @Elegantbeef "Crafting interpreters is like": guess we have to buy that |
08:02:25 | FromDiscord | <Elegantbeef> http://www.craftinginterpreters.com/ |
08:02:55 | FromDiscord | <everyone> https://craftinginterpreters.com/introduction.html |
08:04:24 | FromDiscord | <everyone> is there any book or something related to making programming languages in nim? |
08:05:05 | FromDiscord | <Elegantbeef> https://gist.github.com/haxscramper/3562fa8fee4726d7a30a013a37977df6 is a good resource |
08:12:03 | FromDiscord | <qb> choosenim fails with `could not import: SSL_get_peer_certificate` on popos. Any ideas? |
08:12:25 | FromDiscord | <Elegantbeef> Ubuntu updated openssl and choosenim doesnt support it yet |
08:12:57 | FromDiscord | <qb> Oh |
08:13:32 | FromDiscord | <Elegantbeef> I've been shouting about flatpak for a few weeks now 😄 |
08:17:37 | PMunch | Ugh, flatpak is just bringing us down to Windows level.. |
08:17:48 | FromDiscord | <Elegantbeef> How? |
08:17:58 | FromDiscord | <Elegantbeef> Are you mistaking it for appimage? |
08:18:03 | PMunch | Ah, maybe |
08:18:28 | FromDiscord | <Elegantbeef> Flatpak is distributed the same as your other software in a nice manager, it's just distro agnostic |
08:19:04 | FromDiscord | <Elegantbeef> In other words if it works in one place with flatpak it works everywhere |
08:19:06 | PMunch | Hmm, so it's just like another separate manager? |
08:19:48 | FromDiscord | <Elegantbeef> Yes, i'd much prefer it in the package manager, but i think flatpak solves the issue much more elegantly than relying on X maintainers for Y distros |
08:20:33 | FromDiscord | <Elegantbeef> In an ideal world you just setup flatpak on your distro(many do this automatically) and then just `flatpak install choosenim` |
08:21:07 | FromDiscord | <Elegantbeef> Or use your GUI if you're one of those and it'd appear in there |
08:22:27 | FromDiscord | <Elegantbeef> Appimage is the more windowsy binary image |
08:22:53 | FromDiscord | <Elegantbeef> Which i think is sensible for paid proprietary software and non steam games |
08:32:06 | * | ltriant joined #nim |
08:33:32 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
08:34:19 | om3ga | PMunch, may I ask you, in case if include files are in the system path, should I enter the same /usr/include for both sysPath and path? |
08:40:23 | FromDiscord | <Rika> I am pretty sure Flatpak is closer to windows than AppImage. |
08:40:59 | FromDiscord | <Rika> Someone has definitely sent this before |
08:41:01 | FromDiscord | <Rika> https://ludocode.com/blog/flatpak-is-not-the-future |
08:41:03 | FromDiscord | <Elegantbeef> Well appimage's are generally distributed on websites |
08:41:15 | FromDiscord | <Elegantbeef> https://theevilskeleton.gitlab.io/2022/05/16/response-to-flatpak-is-not-the-future.html#introduction 😄 |
08:42:36 | om3ga | PMunch, maybe I'm tired or doing everything wrong but it says Fatal: 'stdarg.h' file not found |
08:43:11 | FromDiscord | <Rika> Even with these extra arguments I don’t think I will ever use either Flatpak or Snap |
08:43:38 | FromDiscord | <Rika> And if the binary is an AppImage I would extract it and delete the dependencies |
08:43:44 | FromDiscord | <Rika> If something doesn’t work I’ll deal with it |
08:46:02 | FromDiscord | <Elegantbeef> Yea I mostly try to avoid flatpak, but fragmentation is an issue that needs resolved somewhere for a reduction of work 😄 |
08:50:30 | FromDiscord | <Rika> Versioning is hard and needs fixing but this isn’t the way |
08:58:11 | FromDiscord | <Rika> Ooh the portal argument is nice though |
08:58:36 | FromDiscord | <Rika> I don’t know what the original author was thinking with the Flatpak only thing |
09:01:36 | FromDiscord | <heinthanth> sent a long message, see http://ix.io/3Yqi |
09:01:41 | FromDiscord | <heinthanth> I tried to leak some mem, but not leak at all |
09:01:59 | FromDiscord | <Rika> You just did |
09:02:09 | FromDiscord | <Rika> How do you know it didn’t leak |
09:02:13 | FromDiscord | <Elegantbeef> use `-d:useMalloc` |
09:02:18 | FromDiscord | <Rika> He does |
09:02:26 | FromDiscord | <Elegantbeef> Oh i'm blind |
09:02:27 | FromDiscord | <heinthanth> 0 leaks of 0 total leaked bytes |
09:02:42 | FromDiscord | <heinthanth> in C https://media.discordapp.net/attachments/371759389889003532/978221419756421160/Screen_Shot_2022-05-23_at_3.32.37_PM.png |
09:03:35 | FromDiscord | <heinthanth> I looked for `free()` call in generated C code. But how nim free that allocated memory. Or `leaks` command on macOS did wrong ... |
09:03:49 | FromDiscord | <Rika> Try Valgrind |
09:04:18 | FromDiscord | <heinthanth> Ohh ... valgrind does not support later macOS. |
09:04:25 | FromDiscord | <Elegantbeef> This is a fools errand Nim doesnt track `ptr` |
09:04:35 | FromDiscord | <Rika> It really doesn’t |
09:04:43 | FromDiscord | <Elegantbeef> If it's a `ptr` there is no deallocation |
09:04:44 | FromDiscord | <Rika> So even if you didn’t disable anything it would have leaked |
09:07:41 | FromDiscord | <everyone> how do i split a string using a for loop? |
09:08:24 | FromDiscord | <sheerluck> In reply to @uncle jim "how do i split": https://www.rosettacode.org/wiki/Tokenize_a_string#Nim |
09:08:38 | FromDiscord | <everyone> In reply to @sheerluck "https://www.rosettacode.org/wiki/Tokenize_a_string#": thanks lizzOS |
09:09:08 | FromDiscord | <heinthanth> In reply to @Rika "Try Valgrind": the same on Linux too https://media.discordapp.net/attachments/371759389889003532/978223042553610250/Screen_Shot_2022-05-23_at_3.38.56_PM.png |
09:09:37 | FromDiscord | <heinthanth> I was like WTF, how nim deallocate that allocation without `free()` |
09:09:42 | FromDiscord | <Elegantbeef> I can say for certainty that memory is not freed, given that `ptr`s are raw C pointers 😄 |
09:10:07 | FromDiscord | <sheerluck> In reply to @uncle jim "thanks lizzOS": http://www.rosettacode.org/wiki/Category:Nim |
09:10:44 | FromDiscord | <everyone> damn who made this site????? Must have taken a lifetime to make it lel |
09:10:54 | FromDiscord | <Elegantbeef> I think i see what's happening |
09:12:47 | * | ltriant quit (Ping timeout: 255 seconds) |
09:12:48 | FromDiscord | <sheerluck> In reply to @uncle jim "damn who made this": https://github.com/ad-si/RosettaGit |
09:14:05 | FromDiscord | <Elegantbeef> Nope i was wrong it's not due to top level statement |
09:16:38 | FromDiscord | <heinthanth> there's no magic in `nimbase.h` too. |
09:16:41 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/dC3 |
09:16:45 | FromDiscord | <Elegantbeef> That does work |
09:16:49 | FromDiscord | <Elegantbeef> I mean you can trust me 😄 |
09:17:50 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/oL1 |
09:19:12 | FromDiscord | <heinthanth> In reply to @Elegantbeef "That does work": how ... |
09:19:16 | FromDiscord | <heinthanth> not working on my side. |
09:19:30 | FromDiscord | <heinthanth> valgrind always report "All heap blocks were freed -- no leaks are possible" |
09:19:34 | FromDiscord | <Rika> Maybe the c compiler is removing unused variables |
09:19:56 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/14I |
09:19:59 | FromDiscord | <Rika> Because you’re passing in danger (-O2) maybe? |
09:20:08 | FromDiscord | <Elegantbeef> I tested with both |
09:20:24 | FromDiscord | <Elegantbeef> It lost the proper amount of bytes |
09:20:32 | FromDiscord | <heinthanth> Yeah ... |
09:20:51 | FromDiscord | <Elegantbeef> With refc it doesnt report any loss |
09:21:02 | FromDiscord | <Elegantbeef> Dont recall if `useMalloc` works there |
09:21:18 | FromDiscord | <Elegantbeef> with arc/orc it says the proper |
09:23:04 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Yqo |
09:23:52 | * | ltriant joined #nim |
09:24:17 | FromDiscord | <heinthanth> idk ... what's different between u and me https://media.discordapp.net/attachments/371759389889003532/978226853787607080/Screen_Shot_2022-05-23_at_3.53.55_PM.png |
09:24:38 | FromDiscord | <Elegantbeef> `nim -v`? |
09:24:49 | FromDiscord | <heinthanth> sent a code paste, see https://paste.rs/bPG |
09:25:03 | FromDiscord | <Elegantbeef> Same versions |
09:25:27 | FromDiscord | <Elegantbeef> I can ship the binary if you trust a random binary from a random joe schmoe |
09:25:41 | FromDiscord | <Elegantbeef> Can diff it atleast with yours 😄 |
09:25:51 | FromDiscord | <heinthanth> nim binary or valgrind binary |
09:25:59 | FromDiscord | <Elegantbeef> The output |
09:26:05 | FromDiscord | <heinthanth> Ofc |
09:26:22 | FromDiscord | <Elegantbeef> test https://media.discordapp.net/attachments/371759389889003532/978227377094156358/test.null |
09:26:26 | FromDiscord | <Elegantbeef> sketchy 28kb file |
09:27:03 | FromDiscord | <Elegantbeef> that's `-d:useMalloc --mm:none -d:danger` |
09:27:56 | FromDiscord | <heinthanth> yeah ... your binary did leak https://media.discordapp.net/attachments/371759389889003532/978227769651638302/Screen_Shot_2022-05-23_at_3.57.31_PM.png |
09:28:13 | FromDiscord | <Elegantbeef> Do you have a config overriding your GC by any chance? |
09:28:33 | FromDiscord | <Elegantbeef> Are the binaries the same size? |
09:28:48 | FromDiscord | <heinthanth> Yours bigger |
09:28:55 | FromDiscord | <heinthanth> 28392 and 28552 |
09:29:41 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Yqp |
09:29:51 | FromDiscord | <heinthanth> yes! |
09:29:58 | FromDiscord | <Elegantbeef> This is super weird |
09:30:06 | FromDiscord | <heinthanth> Just default nim config. |
09:30:07 | FromDiscord | <heinthanth> sent a code paste, see https://play.nim-lang.org/#ix=3Yqq |
09:30:13 | FromDiscord | <Elegantbeef> gcc version? |
09:30:20 | FromDiscord | <heinthanth> 11.2.0 |
09:30:26 | FromDiscord | <Elegantbeef> 11.3 here |
09:31:03 | FromDiscord | <heinthanth> this case is super weird ... |
09:31:09 | FromDiscord | <golova> Maybe you should check via godbolt? |
09:31:10 | FromDiscord | <Elegantbeef> try `--cc:clang` |
09:31:16 | FromDiscord | <golova> Or disassembler idk |
09:31:24 | FromDiscord | <Elegantbeef> You will need to download clang of course |
09:32:09 | FromDiscord | <heinthanth> sent a code paste, see https://paste.rs/E1g |
09:32:29 | FromDiscord | <Elegantbeef> Well give it a whirl and see if you can find the leak |
09:32:42 | FromDiscord | <Elegantbeef> This is the first time i've ever seen this behaviour so i'm lost |
09:32:46 | FromDiscord | <heinthanth> no no ... the same ... all free'd |
09:33:06 | FromDiscord | <Elegantbeef> I have to believe your GC is being set somewhere |
09:33:33 | FromDiscord | <Elegantbeef> When you compile does it have a unexpected `config` loaded? |
09:33:47 | FromDiscord | <Elegantbeef> The first messages it goes through are config files it's loading |
09:33:53 | FromDiscord | <heinthanth> Hint: used config file '/home/ubuntu/nim-1.6.6/config/nim.cfg' [Conf]↵Hint: used config file '/home/ubuntu/nim-1.6.6/config/config.nims' [Conf] |
09:33:59 | FromDiscord | <heinthanth> just installation defaults |
09:34:07 | FromDiscord | <heinthanth> I just downloaded https://nim-lang.org/install_unix.html and extract |
09:34:21 | FromDiscord | <heinthanth> that server is new and so, no prior config files |
09:35:16 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Yqs |
09:36:07 | FromDiscord | <Elegantbeef> It'll print out during Nim compilation the GC it uses |
09:36:15 | FromDiscord | <Elegantbeef> So if all things are proper should say `"None"` |
09:36:40 | FromDiscord | <heinthanth> Yeah ... none |
09:36:47 | FromDiscord | <heinthanth> https://media.discordapp.net/attachments/371759389889003532/978230000207675402/Screen_Shot_2022-05-23_at_4.06.42_PM.png |
09:37:19 | FromDiscord | <Elegantbeef> There's got to be a very very simple thing we're missing and it's going to make us feel as dumb as possible |
09:37:45 | FromDiscord | <Elegantbeef> Well until then, I need to sleep now, sorry i couldnt help |
09:37:58 | FromDiscord | <heinthanth> Thanks for your patience too ... |
09:38:07 | FromDiscord | <heinthanth> Hope some nim compiler guys see this message. |
09:44:42 | * | xet7 quit (Remote host closed the connection) |
09:45:40 | FromDiscord | <Rika> Probably something to do with macOS no? |
09:46:45 | FromDiscord | <heinthanth> the same on Linux too |
09:51:01 | FromDiscord | <Rika> This is going to sound dumb but |
09:51:08 | FromDiscord | <Rika> “Are you compiling the right file” |
09:52:22 | FromDiscord | <heinthanth> Of course. |
09:52:26 | FromDiscord | <heinthanth> There's is only one file |
09:52:55 | FromDiscord | <heinthanth> I'm just testing around if I can disable GC completely. Sometimes, I love do allocation manually. |
09:54:05 | FromDiscord | <Rika> This is very strange |
09:54:21 | FromDiscord | <Rika> Maybe it has to do with the other flags you added |
09:55:21 | FromDiscord | <heinthanth> Idk, if I can ping some nim member I know. |
09:55:31 | FromDiscord | <heinthanth> I feel super weird about this case. |
09:56:19 | FromDiscord | <heinthanth> @Araq ... sorry to bother you. What do you think about this case. |
10:00:49 | FromDiscord | <tandy> why am i getting `Error: undeclared identifier: 'isNil'` when using it on an object |
10:02:37 | FromDiscord | <Rika> ? How are you using it |
10:02:45 | FromDiscord | <tandy> `if client.isNil:` |
10:03:12 | FromDiscord | <Rika> Maybe full code is needed now |
10:03:18 | FromDiscord | <tandy> hmm |
10:03:52 | FromDiscord | <tandy> im pushing |
10:04:29 | FromDiscord | <Rika> Push harder |
10:05:48 | FromDiscord | <tandy> https://github.com/Listen2gether/Listen2gether.github.io/blob/remove-serviceuser/src/views/home.nim |
10:05:49 | FromDiscord | <tandy> lol |
10:05:58 | FromDiscord | <tandy> if you clone this branch and run nimble buildjs |
10:06:14 | FromDiscord | <tandy> line 81 |
10:06:22 | FromDiscord | <Rika> If only I could clone on my phone |
10:06:31 | FromDiscord | <tandy> rip |
10:07:36 | FromDiscord | <Rika> Where the heck is client and mirror defined h |
10:09:28 | FromDiscord | <tandy> in share.nim↵(@Rika) |
10:09:40 | FromDiscord | <tandy> the type is defined in types.nim |
10:09:44 | FromDiscord | <tandy> sorry for the maze |
10:11:18 | FromDiscord | <Rika> I mean the variable |
10:11:30 | FromDiscord | <Rika> Nothing in the global or local scope around line 81 |
10:11:31 | FromDiscord | <Andreas> hi, i'm looking for a example of a long running-thread, doing maintanance and never quits ? |
10:13:37 | FromDiscord | <tandy> yeah the var is defined in share.nim↵(@Rika) |
10:13:43 | FromDiscord | <tandy> weir↵(@Rika) |
10:13:44 | FromDiscord | <tandy> weird |
10:13:52 | FromDiscord | <Rika> Okay so it’s there wait I’ll look then |
10:15:06 | FromDiscord | <Rika> Tbh this is cursed, global exported variables |
10:15:43 | FromDiscord | <Rika> Can you post full error |
10:21:27 | FromDiscord | <N00nehere> is it possible to make a nim program run on ms-dos or windows xp? |
10:22:27 | FromDiscord | <Rika> Sure why not |
10:28:49 | FromDiscord | <tandy> yes \:'(↵(@Rika) |
10:28:52 | FromDiscord | <tandy> sent a code paste, see https://play.nim-lang.org/#ix=3YqC |
10:30:05 | FromDiscord | <demotomohiro> In reply to @N00nehere "is it possible to": https://github.com/nim-lang/Nim/pull/19742↵There is PR for adding support for targeting 16-bit x86 |
10:31:06 | FromDiscord | <Yardanico> In reply to @tandy "yes \:'( (<@259277943275126785>)": what type is client ? |
10:31:58 | FromDiscord | <Rika> User |
10:32:04 | FromDiscord | <Rika> It is a reference type |
10:33:20 | FromDiscord | <tandy> if u have ideas on how to improve this btw im interested↵(@Rika) |
10:33:30 | FromDiscord | <Rika> No I don’t |
10:33:51 | FromDiscord | <Rika> I don’t want to think about it, I have no interest in thinking for hours to fix your project |
10:34:22 | FromDiscord | <Yardanico> In reply to @tandy "if u have ideas": you didn' |
10:34:26 | FromDiscord | <Yardanico> t add prologue to the requirements |
10:35:01 | FromDiscord | <Yardanico> also just FYI it compiles for me on devel :P |
10:35:08 | FromDiscord | <Yardanico> ah develop branch |
10:35:08 | FromDiscord | <Yardanico> hm |
10:35:13 | FromDiscord | <Rika> Lol |
10:39:45 | FromDiscord | <Yardanico> the problem is related to `pkg/[listenbrainz, lastfm],` |
10:39:56 | FromDiscord | <Yardanico> @tandy do those also have some User type or not? or some client variable |
10:40:32 | FromDiscord | <Yardanico> listenbrainz exports client |
10:40:33 | FromDiscord | <tandy> hmm, yes i think they might have somethign called client |
10:40:37 | FromDiscord | <tandy> fuck |
10:40:50 | PMunch | om3ga, sorry I was off for lunch. In general you don't want to put the /usr/include directory as a path argument as that would import all sorts of things |
10:41:03 | FromDiscord | <tandy> understandable↵(@Rika) |
10:41:19 | PMunch | If you have something as path there is no reason to also define it as syspath |
10:42:18 | om3ga | PMunch, thanks, I will try |
10:49:19 | FromDiscord | <tandy> how did u identify this btw?↵(@Yardanico) |
10:49:37 | FromDiscord | <Yardanico> i frequently use sledgehammer approach for this, it works well |
10:49:50 | FromDiscord | <Yardanico> just removed code in home.nim excluding that part with client.isNil until it started compiling |
10:51:38 | * | xet7 joined #nim |
10:52:32 | * | jmd_ quit (Ping timeout: 260 seconds) |
10:54:59 | FromDiscord | <N00nehere> In reply to @demotomohiro "https://github.com/nim-lang/Nim/pull/19742 There is": cool |
10:55:47 | FromDiscord | <Yardanico> In reply to @N00nehere "cool": nim runs on windows xp out of the box |
10:56:03 | FromDiscord | <N00nehere> In reply to @Yardanico "nim runs on windows": without any problem? |
10:56:23 | FromDiscord | <Yardanico> no one ran tests on it, but apparently nimble worked fine |
10:59:20 | FromDiscord | <tandy> i see, thanks↵(@Yardanico) |
11:05:20 | * | tinystoat is now known as sir_stoat |
11:05:35 | * | sir_stoat is now known as tiny_stoat |
11:06:15 | * | tiny_stoat is now known as sir_stoat |
11:12:35 | * | om3ga quit (Ping timeout: 260 seconds) |
11:16:51 | * | jjido joined #nim |
11:27:34 | * | om3ga joined #nim |
11:46:21 | FromDiscord | <tandy> is there any way to "cancel" an async function? |
11:46:43 | FromDiscord | <enthus1ast> dom mentioned once you can close the fd |
11:47:32 | FromDiscord | <tandy> hmm |
11:48:11 | FromDiscord | <enthus1ast> what do you wanna cancel? |
11:48:21 | FromDiscord | <enthus1ast> i guess there is no general way yet |
11:49:13 | FromDiscord | <tandy> well im using asyncjs |
11:49:46 | FromDiscord | <tandy> but i have a recursive "update" async proc which is called when a user visits a page in my spa |
11:50:13 | FromDiscord | <tandy> but when the user presses the back button and they leave that page, the proc should not execute |
11:50:14 | FromDiscord | <tandy> but it does |
11:50:19 | FromDiscord | <hotdog> In reply to @tandy "well im using asyncjs": I don’t think js promises are cancellable |
11:51:14 | FromDiscord | <hotdog> In reply to @tandy "but when the user": As a simple hack, could the proc check that ‘window.location.href’ matches what it expects, if not then early return? |
11:54:34 | FromDiscord | <tandy> thats a good idea, i currently check the status of a global enum, but that didnt seem to fix it↵(@hotdog) |
11:57:50 | FromDiscord | <tandy> nvm, got it |
12:14:54 | om3ga | PMunch, unfortunately it not works, Fatal: 'stdarg.h' file not found. I impotred missing va_list manually like that: type va_list* {.importc: "va_list", header: "<stdarg.h>".} = object |
12:15:31 | FromDiscord | <ynfle> Can someone help me with this error message `Error: unhandled exception: field 'node' is not accessible for type 'TFullReg' using 'kind = rkInt' [FieldDefect]` |
12:15:33 | PMunch | What? You don't have to manually import va_list like that |
12:15:34 | FromDiscord | <ynfle> (edit) "[FieldDefect]`" => "[FieldDefect]`?" |
12:17:05 | PMunch | stdarg.h missing sounds like a linking issue |
12:17:20 | PMunch | Well, not linking, but build flags |
12:17:30 | om3ga | PMunch, I don't remember exactly it required somewhere |
12:17:54 | om3ga | I will check right now |
12:17:57 | FromDiscord | <Andreas> sent a code paste, see https://play.nim-lang.org/#ix=3Yr4 |
12:18:30 | FromDiscord | <Andreas> (edit) "https://play.nim-lang.org/#ix=3Yr4" => "https://paste.rs/1GU" |
12:19:44 | om3ga | PMunch, proc FCGX_VFPrintF*(stream: ptr FCGX_Stream; format: cstring; arg: va_list): cint {.header: "fcgiapp.h", varargs, cdecl.} |
12:19:51 | FromDiscord | <Andreas> (edit) "https://play.nim-lang.org/#ix=3Yr7" => "https://paste.rs/TZ4" |
12:19:53 | om3ga | FCGX_VFPrintF* needs va_list |
12:20:53 | PMunch | Yes, but Futhark should wrap that properly |
12:21:07 | om3ga | well, for some reason it not does that |
12:21:12 | om3ga | unfortunately |
12:21:15 | PMunch | Hmm, that's not great |
12:21:34 | PMunch | Seems like a regression |
12:21:53 | PMunch | It does correctly tag it as `varargs`, but apparently it doesn't remove the va_list argument |
12:22:32 | om3ga | If you need the code, I can send link |
12:23:06 | PMunch | Yeah, please create an issue in GitHub with code and preferably link to documentation |
12:23:27 | om3ga | PMunch, no prob, thanks |
12:30:13 | FromDiscord | <ynfle> In reply to @Andreas "seems you need to": I'm pretty sure TFullReg is in the compiler |
12:31:10 | FromDiscord | <Andreas> In reply to @ynfle "I'm pretty sure TFullReg": ?? wdym ? i don't now the names of the variant-kinds.. |
12:31:31 | FromDiscord | <konsumlamm> it's a bug |
12:32:11 | FromDiscord | <konsumlamm> (in the nim compiler) |
12:32:15 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
12:33:56 | FromDiscord | <Andreas> In reply to @konsumlamm "(in the nim compiler)": u mean there are errors in the nim-compiler - fuck me running, i did not expect that at all 😉 |
12:35:03 | FromDiscord | <konsumlamm> yes, there a lot of errors actually |
12:35:14 | FromDiscord | <konsumlamm> have you ever looked at the Nim issue tracker? |
12:37:25 | FromDiscord | <Andreas> In reply to @konsumlamm "have you ever looked": not recently, too scary.. |
12:39:42 | * | ltriant quit (Ping timeout: 244 seconds) |
12:40:07 | FromDiscord | <ynfle> In reply to @Andreas "?? wdym ? i": https://github.com/nim-lang/Nim/blob/05c0419658e3f97c29a12a16e99c0f8b842622c8/compiler/vmdef.nim#L220 |
12:42:00 | FromDiscord | <Yardanico> In reply to @ynfle "https://github.com/nim-lang/Nim/blob/05c0419658e3f9": no real reason to look at it |
12:42:05 | FromDiscord | <Yardanico> just run the same command with nim_dbg |
12:42:17 | FromDiscord | <Yardanico> depending on how you installed nim, you might already have it |
12:42:22 | FromDiscord | <Yardanico> `nim_dbg` is the nim compiler in full debug mode |
12:52:39 | FromDiscord | <Andreas> In reply to @Yardanico "depending on how you": i did it via `brew`, but no nim_dbg here. found `nimsuggest, nimble, nimgrep` ? i can't build latest on my machine ? |
12:52:53 | FromDiscord | <Andreas> (edit) "no nim_dbg" => "no` nim_dbg`" |
12:52:55 | FromDiscord | <Yardanico> In reply to @Andreas "i did it via": but you don't have a bug? it was ynfle |
12:53:00 | FromDiscord | <Yardanico> and why you can't build latest? |
12:53:04 | FromDiscord | <Yardanico> but yeah, things like brew won't ship nim_dbg |
12:54:27 | FromDiscord | <Andreas> In reply to @Yardanico "but yeah, things like": well, i have my fair share of bugs here 🙂 no gcc on macOS and `clang version 12.0.1` had some problem, that i forgot.. |
12:54:37 | FromDiscord | <Andreas> (edit) "gcc" => "`gcc`" |
12:54:45 | FromDiscord | <Yardanico> btw, if anyone needs nim manual in pdf for the latest devel version, https://transfer.sh/xJaGra/manual.pdf |
12:55:02 | FromDiscord | <Yardanico> (if you didn't know nim has `./koch pdf` to build all separate docs into pdf files, for that it uses nim's `rst2tex` command` |
12:55:04 | FromDiscord | <Yardanico> (edit) "command`" => "command)" |
12:57:45 | * | sir_stoat is now known as tinystoat |
13:02:02 | * | kayabaNerve quit (Read error: Connection reset by peer) |
13:02:11 | * | kayabaNerve joined #nim |
13:02:29 | FromDiscord | <ambient> yeah i have many issues where running clang instead of gcc will reveal bugs in some libraries |
13:02:49 | FromDiscord | <ambient> but apple m1 is twice as fast with nim when compared to AMD 3600 so 🙂 |
13:03:28 | FromDiscord | <ambient> and its running only in Rosetta |
13:04:23 | FromDiscord | <Yardanico> why not build nim for arm64? |
13:04:30 | FromDiscord | <ambient> i can do that? |
13:04:34 | FromDiscord | <Yardanico> of course?! |
13:04:38 | FromDiscord | <Yardanico> in fact Araq uses it on an M1 mac |
13:04:46 | FromDiscord | <Yardanico> why did you think you won't be able to do it :DDD |
13:05:08 | FromDiscord | <ambient> im a software developer, not a programming language developer |
13:05:36 | FromDiscord | <Yardanico> yes, so why did you think that a language that compiles to C and has like tens of architectures/OSes supported won't run on M1 natively 🤔 |
13:05:47 | FromDiscord | <ambient> theres usually a line where i just trust my tools to work for me instead of diving in too deep into the weeds |
13:07:47 | FromDiscord | <Andreas> In reply to @Yardanico "yes, so why did": cos' my old-clang had a problem with nim.latest - i'd really like to use head, but thus would require a macOS-upgrade to - at least Catalina, prolly Big Sur |
13:07:59 | FromDiscord | <Yardanico> huh, weird |
13:08:35 | * | ltriant joined #nim |
13:08:53 | FromDiscord | <ynfle> In reply to @Yardanico "just run the same": Do you know if it's available for `jiro4989/setup-nim-action@v1` |
13:09:19 | FromDiscord | <Yardanico> no clue honestly, probably not :( you can always just build it manually from the nim github repo |
13:11:08 | FromDiscord | <ynfle> It works on my local machine |
13:11:22 | * | noeontheend joined #nim |
13:13:23 | FromDiscord | <ynfle> In reply to @Yardanico "`nim_dbg` is the nim": Will it help if it only fails when running |
13:13:40 | FromDiscord | <ynfle> It's probably related to nimscripter |
13:13:44 | FromDiscord | <everyone> GUYS.....how do print statements work? |
13:13:51 | * | ltriant quit (Ping timeout: 276 seconds) |
13:13:53 | FromDiscord | <ynfle> Because compilation itself is fine |
13:13:59 | FromDiscord | <everyone> do they just spilt it? |
13:14:08 | FromDiscord | <ynfle> In reply to @uncle jim "GUYS.....how do print statements": `echo "Hello", ", world"` |
13:14:16 | FromDiscord | <everyone> In reply to @ynfle "`echo "Hello", ", world"`": ik that |
13:14:25 | FromDiscord | <everyone> but how do they work under the hood? |
13:14:36 | FromDiscord | <everyone> how do they print the stuff between "" |
13:14:49 | FromDiscord | <everyone> or a variable |
13:14:49 | FromDiscord | <Yardanico> In reply to @uncle jim "how do they print": just call the relevant system/standard C library routines |
13:14:58 | FromDiscord | <Yardanico> worst case you use linux system calls to write to the file descriptor |
13:15:06 | FromDiscord | <ynfle> In reply to @uncle jim "how do they print": They don't print stuff in between |
13:15:19 | FromDiscord | <ynfle> It call `$` on every parameter passed in |
13:15:40 | FromDiscord | <everyone> In reply to @ynfle "It call `$` on": ummmmmm |
13:16:18 | FromDiscord | <everyone> https://tenor.com/view/i-dont-get-it-i-dont-understand-clueless-laughing-huh-gif-15442422 |
13:16:28 | FromDiscord | <ynfle> What part don't you understand? |
13:16:42 | FromDiscord | <ynfle> `$` is nim's `toString` operator by convention |
13:17:07 | FromDiscord | <everyone> i am not asking it specifically for nim |
13:17:17 | FromDiscord | <everyone> all languages in general |
13:17:22 | FromDiscord | <Yardanico> it works differently in different languages |
13:17:42 | FromDiscord | <ynfle> What is you question then? |
13:17:44 | FromDiscord | <everyone> In reply to @Yardanico "it works differently in": python should be easy |
13:17:52 | FromDiscord | <ynfle> What do you mean? |
13:18:02 | FromDiscord | <ynfle> Like how does it interact with the operating system? |
13:18:23 | FromDiscord | <ynfle> Well Unix, it just write to the processes `/dev/stdout` file and the OS takes care of the rest |
13:18:51 | FromDiscord | <everyone> In reply to @ynfle "What is you question": for eg in python: |
13:19:11 | FromDiscord | <everyone> sent a code paste, see https://paste.rs/uuy |
13:19:23 | FromDiscord | <everyone> how does it only print the `ello` |
13:19:41 | FromDiscord | <Yardanico> we have #offtopic for that |
13:19:54 | FromDiscord | <Yardanico> please ask such questions that are about programming in general there :) |
13:20:00 | FromDiscord | <Yardanico> or maybe in #langdev , but in your case #offtopic would be a bit better |
13:20:40 | FromDiscord | <ambient> seems theres no way but manual git pull and copy files to right locations to get Nim for arm64 |
13:20:41 | FromDiscord | <everyone> In reply to @Yardanico "please ask such questions": oke |
13:20:48 | FromDiscord | <ambient> would be nice to have something with choosenim |
13:40:22 | FromDiscord | <Andreas> Howto use `atomic.compareExchange `with a custom Variant ?↵`location is (nonAtomicValue: cBranch-1/32 branches-0 leaves-1, guard: ())` |
13:41:08 | FromDiscord | <Andreas> (edit) "())`" => "())`↵possible at all ?" |
13:41:17 | FromDiscord | <ynfle> In reply to @Yardanico "no clue honestly, probably": Does chooenim install it by default? |
13:41:25 | FromDiscord | <Yardanico> don't think so |
13:54:10 | FromDiscord | <ynfle> In reply to @Yardanico "don't think so": It does, but it it doesn't link to `nimble/bin` |
13:57:47 | * | haliucinas quit (Ping timeout: 240 seconds) |
13:59:54 | FromDiscord | <ynfle> @Yardanico Any idea how to go about trying debug this? I'm nimscripter and it compiles fine on my machine |
14:00:29 | FromDiscord | <Yardanico> well, I only know one way - manually compiling nim and then using nim_dbg from the installation |
14:00:44 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=3Yry |
14:00:44 | * | vicfred joined #nim |
14:00:44 | FromDiscord | <Yardanico> then run nim_dbg from bin/ |
14:00:49 | * | PMunch quit (Quit: Leaving) |
14:01:04 | FromDiscord | <ynfle> It installed it |
14:01:09 | FromDiscord | <dom96> `~/.choosenim/toolchains/nim-1.6.4/bin/` might have it |
14:01:14 | FromDiscord | <ynfle> sent a code paste, see https://play.nim-lang.org/#ix=3Yrz |
14:01:21 | FromDiscord | <ynfle> This is the stack trace and error message |
14:01:21 | FromDiscord | <dom96> (edit) "`~/.choosenim/toolchains/nim-1.6.4/bin/`" => "`~/.choosenim/toolchains/nim-1.6.6/bin/`" |
14:01:27 | FromDiscord | <ynfle> In reply to @dom96 "`~/.choosenim/toolchains/nim-1.6.6/bin/` might have": It does |
14:02:50 | FromDiscord | <ynfle> (edit) "https://play.nim-lang.org/#ix=3Yrz" => "https://paste.rs/P5G" |
14:02:54 | FromDiscord | <Yardanico> ahh, nimscripter |
14:02:56 | FromDiscord | <Yardanico> hmm |
14:02:58 | FromDiscord | <ynfle> Ya |
14:03:16 | FromDiscord | <Yardanico> don't know if you can get a better traceback than this then, can you try to minimize your code? |
14:03:48 | FromDiscord | <ynfle> Not sure |
14:03:56 | FromDiscord | <ynfle> I can try, just not sure where to start |
14:04:13 | FromDiscord | <ynfle> running `nimble test -y` works |
14:10:30 | * | noeontheend quit (Ping timeout: 260 seconds) |
14:19:05 | * | dithpri quit (Quit: '); DROP TABLE Users;--) |
14:23:32 | * | noeontheend joined #nim |
14:40:02 | * | noeontheend quit (Ping timeout: 260 seconds) |
14:50:36 | * | noeontheend joined #nim |
15:08:46 | FromDiscord | <ambient> if i manually build Nim, can i just copy the entire folder into .choosenim/toolchains, and it will work? |
15:10:56 | * | noeontheend quit (Ping timeout: 258 seconds) |
15:12:07 | * | om3ga quit (Ping timeout: 260 seconds) |
15:17:40 | * | noeontheend joined #nim |
15:30:45 | * | ltriant joined #nim |
15:34:27 | FromDiscord | <demotomohiro> You can use your manually built Nim by just adding the path to bin directory in your Nim source to PATH environment variable. |
15:34:28 | * | mjsir911 quit (Quit: Goodbye, World!) |
15:34:43 | * | mjsir911 joined #nim |
15:35:22 | * | ltriant quit (Ping timeout: 244 seconds) |
15:37:10 | FromDiscord | <ambient> yeah but doesnt that overwrite choosenim |
15:44:14 | FromDiscord | <ynfle> Remove the choosenim links |
15:45:17 | FromDiscord | <ambient> i want to use it tho to quickly switch different nim versions |
15:46:19 | FromDiscord | <ambient> going to test and see if it works i guess |
15:48:28 | FromDiscord | <ynfle> You use choosenim with custom version of nim |
15:48:45 | FromDiscord | <ambient> yep, that's what i want to do |
15:48:48 | FromDiscord | <ambient> custom builds |
15:52:26 | FromDiscord | <ynfle> see the choosenim error message |
15:52:53 | FromDiscord | <dom96> In reply to @ambient "if i manually build": Yep. You can |
16:01:37 | FromDiscord | <spoon> sent a code paste, see https://play.nim-lang.org/#ix=3YrW |
16:01:45 | FromDiscord | <spoon> same error if i try to assign it to a variable first |
16:02:17 | FromDiscord | <Rika> you cant use await outside of an async proc |
16:02:22 | FromDiscord | <Rika> or in the top level |
16:03:43 | FromDiscord | <spoon> ah, added async pragma and it works |
16:08:00 | FromDiscord | <spoon> ty |
16:09:28 | * | wallabra joined #nim |
16:09:52 | * | wallabra quit (Remote host closed the connection) |
16:10:08 | * | wallabra joined #nim |
16:15:43 | * | arkurious joined #nim |
16:17:48 | FromDiscord | <ambient> well i built Nim for arm64, and added it as nim-#apple to choosenim, but it still makes x86_64 executables 😭 |
16:22:01 | FromDiscord | <Rika> building nim for arm doesnt mean it would default to building on arm |
16:22:03 | FromDiscord | <Rika> (edit) "on" => "to" |
16:25:38 | FromDiscord | <Yardanico> In reply to @ambient "well i built Nim": are you sure you're running the arm64 one? |
16:25:55 | * | om3ga joined #nim |
16:25:58 | FromDiscord | <ambient> nim -v gave arm64 yes |
16:26:03 | FromDiscord | <Yardanico> does `nim -v` actually show `arm64` and not `amd64` (they look alike a bit) |
16:26:06 | * | om3ga quit (Read error: Connection reset by peer) |
16:26:07 | FromDiscord | <Yardanico> huh |
16:26:31 | FromDiscord | <Yardanico> In reply to @ambient "nim -v gave arm64": and what if you explicitly specify the `cpu` when compiling? |
16:26:37 | FromDiscord | <Yardanico> `nim c --cpu:arm64 file.nim` |
16:27:03 | FromDiscord | <Rika> wait i didnt realise youre running this on m1 are you |
16:27:04 | FromDiscord | <Rika> xd |
16:27:09 | FromDiscord | <ambient> i just followed this https://forum.nim-lang.org/t/7823 |
16:27:17 | FromDiscord | <Rika> then that is strange |
16:28:11 | FromDiscord | <ambient> @Yardanico i have to test that later today, have to go for now |
16:28:14 | FromDiscord | <Yardanico> In reply to @ambient "i just followed this": there's no need for that anymore |
16:28:55 | * | om3ga joined #nim |
16:29:06 | FromDiscord | <Yardanico> at least as far as i know |
16:29:35 | FromDiscord | <ambient> choosenim installs amd64 version of nim on M! |
16:29:49 | FromDiscord | <Yardanico> that's choosenim |
16:29:52 | FromDiscord | <Yardanico> choosenim != nim |
16:33:34 | NimEventer | New Nimble package! ipfshttpclient - ipfs http client, see https://github.com/xflywind/ipfshttpclient |
16:34:25 | * | wallabra quit (Changing host) |
16:34:25 | * | wallabra joined #nim |
16:35:18 | * | wallabra quit (Quit: ZNC 1.8.2 - https://znc.in) |
16:35:30 | * | wallabra joined #nim |
16:36:03 | * | wallabra quit (Changing host) |
16:36:03 | * | wallabra joined #nim |
16:40:18 | * | om3ga quit (Read error: Connection reset by peer) |
16:40:38 | * | om3ga joined #nim |
16:44:40 | FromDiscord | <Yardanico> @xflywind any reason for merging a package without actual source code right away? :P |
16:45:21 | * | tiorock joined #nim |
16:45:21 | * | tiorock quit (Changing host) |
16:45:21 | * | tiorock joined #nim |
16:45:21 | * | rockcavera is now known as Guest484 |
16:45:21 | * | Guest484 quit (Killed (tantalum.libera.chat (Nickname regained by services))) |
16:45:21 | * | tiorock is now known as rockcavera |
16:45:30 | * | rockcavera quit (Remote host closed the connection) |
16:46:49 | * | jjido joined #nim |
16:55:47 | FromDiscord | <xflywind> really, it has some code? |
16:56:06 | FromDiscord | <Yardanico> just a tiny bit :P |
16:57:02 | FromDiscord | <xflywind> oh, i forget to push internal directory though |
16:58:39 | FromDiscord | <xflywind> Oh, i forgot to push the internal directory. |
17:00:52 | FromDiscord | <xflywind> I basically modified puppy to add file upload feature because I cannot make httpclient work. |
17:01:23 | FromDiscord | <xflywind> (edit) "modified" => "modify" | "to" => "which uses curl directly and" |
17:01:59 | FromDiscord | <xflywind> (edit) "curl" => "libcurl" |
17:02:29 | FromDiscord | <xflywind> It is broken when using winhttp api in the puppy. So I can only believe curl. |
17:02:38 | FromDiscord | <xflywind> (edit) "puppy." => "puppy too." |
17:05:48 | FromDiscord | <ambient> @Yardanico ´´nim c --cpu:arm64 --os:macosx -d:release -d:danger --passC:"-flto" --passL:"-flto" -r fft.nim´´´still gives x86_64 on file fft |
17:06:00 | FromDiscord | <Yardanico> check your config files |
17:06:04 | FromDiscord | <ambient> (edit) "´´nim" => "´´´nim" |
17:06:14 | FromDiscord | <Yardanico> nim shows the config files it is using when compiling a file |
17:06:17 | FromDiscord | <Yardanico> check if those have a hardcoded arch |
17:07:35 | FromDiscord | <ambient> they are the default config files from nim git |
17:13:59 | FromDiscord | <ambient> i also tested clang and it does output arm64 by default |
17:21:00 | FromDiscord | <d4rckh> is choosenim supposed to add nim to my path? https://media.discordapp.net/attachments/371759389889003532/978346824001785866/unknown.png |
17:21:06 | FromDiscord | <d4rckh> tried to sign out and log back in |
17:21:29 | FromDiscord | <d4rckh> and %PATH% does not contain any nim folder |
17:23:41 | FromDiscord | <d4rckh> meh, added it myself |
17:23:46 | FromDiscord | <Rika> It does not add automatically |
17:23:54 | FromDiscord | <Rika> It’s supposed to tell you to add it if it isn’t in |
17:24:13 | FromDiscord | <d4rckh> i see |
17:33:47 | * | noeontheend quit (Ping timeout: 256 seconds) |
18:03:26 | FromDiscord | <ynfle> Just tried on a fresh git clone and I get the error |
18:20:25 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
18:28:10 | * | PMunch joined #nim |
18:28:23 | FromDiscord | <treeform> In reply to @Yardanico "for example if you": Does it include flatty twice in the exe? Is it some thing I can fix? |
18:29:09 | FromDiscord | <Yardanico> In reply to @treeform "Does it include flatty": flatty.nim was my own file |
18:29:14 | FromDiscord | <Yardanico> its not related to flatty at all |
18:29:22 | FromDiscord | <Yardanico> it's just me showing how nim makes filenames for C files |
18:30:04 | FromDiscord | <treeform> oh got it 🙂 |
18:32:49 | FromDiscord | <Andreas> Is std/atomics or threading/atomics the one to use ? |
18:36:29 | PMunch | Ugh, I should move closer to China.. |
18:36:59 | PMunch | Just realised I need a 24pin FPC connector for a project, that's a solid month of waiting.. |
18:43:44 | FromDiscord | <ynfle> Fixed the bug. I had edited and fixed a bug but hadn't committed and pushed that code |
18:43:53 | * | jmdaemon joined #nim |
18:51:51 | * | rockcavera joined #nim |
18:51:51 | * | rockcavera quit (Changing host) |
18:51:51 | * | rockcavera joined #nim |
19:03:15 | FromDiscord | <dom96> In reply to @Rika "It’s supposed to tell": Yeah. Only does that if you pass —firstInstall which gets passed for you on Windows if you use the zip install method. Not supposed to just run the exe directly. Probably should just get rid of this tbh and detect this flag implicitly. |
19:32:58 | * | ltriant joined #nim |
19:37:41 | * | ltriant quit (Ping timeout: 244 seconds) |
19:47:25 | * | kenran joined #nim |
19:49:54 | FromDiscord | <deech> sent a code paste, see https://play.nim-lang.org/#ix=3YsH |
19:51:43 | FromDiscord | <planetis> In reply to @Andreas "Is std/atomics or threading/atomics": I would say the threading/atomics but I made it |
19:51:50 | FromDiscord | <planetis> (edit) removed "the" |
19:52:10 | FromDiscord | <Andreas> In reply to @planetis "I would say threading/atomics": good to know, ty.. |
19:53:44 | * | kenran quit (Quit: WeeChat info:version) |
19:54:37 | FromDiscord | <Rika> In reply to @deech "How do I combine": you dont |
19:54:44 | FromDiscord | <Rika> you lose MCS with enforced qualification |
19:54:48 | FromDiscord | <Rika> no way around it afaik |
19:55:10 | FromDiscord | <Rika> i mean in terms of explicit "nice" syntax, of course theres probably some hacky way you could |
19:58:18 | FromDiscord | <deech> A different syntax for module qualification vs. mcs vs. field access would be nice, conflating all three into the dot looks nice but make code hard to understand. |
19:58:45 | FromDiscord | <huantian> I feel like module qualifcation isn't used enough to justify it tbh |
20:05:35 | FromDiscord | <Andreas> @planetis so may i ask you about how to use it in my case - cos' the runnable examples don't help me out. I read in some C++/Atomics blogs, that one can load a pointer, copy/clone the shared object, make changes on the local clone, then compareAndExchange. I'm working on a data-structure and like to try this approach with a graph of `ref object variant`. But the compiler wont let do this 🙂 |
20:07:08 | * | xet7 quit (Remote host closed the connection) |
20:07:47 | FromDiscord | <planetis> you need a Atomic[ref T] but that's not allowed only type AtomType = SomeNumber | pointer | ptr | char | bool |
20:08:42 | FromDiscord | <planetis> there are threading/smartptrs SharedPtr for this job |
20:08:58 | FromDiscord | <Andreas> In reply to @planetis "you need a Atomic[ref": hmm, that is my impression. But a ref object can be 'downgraded' to a raw-pointer, can it ? |
20:09:14 | FromDiscord | <planetis> but most likely you should stay with a pointer |
20:09:44 | FromDiscord | <planetis> it can but incRef/decRef are not threadsafe |
20:11:16 | FromDiscord | <planetis> Now that I think about it, it might have been better if SharedPtr was a distinct ptr |
20:11:47 | FromDiscord | <Andreas> In reply to @planetis "but most likely you": ok, i'm confused 😉 do you mean a Smart/Unique/Shared-Ptr from the threading/atomics-lib or a dumb raw-pointer ? |
20:12:24 | FromDiscord | <planetis> yeah a dumb one |
20:12:38 | FromDiscord | <Andreas> In reply to @planetis "Now that I think": do these Smart/Shared=Ptr have some sort of aquire/release semantics ? |
20:12:56 | FromDiscord | <Andreas> (edit) "Smart/Shared=Ptr" => "Smart/Shared-Ptr" |
20:12:57 | FromDiscord | <planetis> but I should make Atomic[SharedPtr] work somehow |
20:13:23 | FromDiscord | <Andreas> (edit) "Smart/Shared-Ptr" => "Smart-/Shared-Ptr" |
20:13:45 | FromDiscord | <planetis> In reply to @Andreas "do these Smart-/Shared-Ptr have": no they just atomically increment / decrement a counter |
20:14:44 | FromDiscord | <Andreas> In reply to @planetis "yeah a dumb one": and a dump one i get by `my_thing.unsafeAddr` ? |
20:16:03 | * | dithpri joined #nim |
20:16:13 | * | dithpri quit (Client Quit) |
20:16:51 | FromDiscord | <planetis> it depends... |
20:17:08 | FromDiscord | <planetis> but I guess |
20:18:11 | FromDiscord | <Andreas> In reply to @planetis "but I guess": ty, just tried it and yep, works |
20:19:28 | FromDiscord | <planetis> https://play.nim-lang.org/#ix=3YsN don't tell me, it can't match because it's distinct... pfff |
20:23:58 | * | noeontheend joined #nim |
20:24:57 | FromDiscord | <Andreas> In reply to @planetis "https://play.nim-lang.org/#ix=3YsN don't tell me,": https://play.nim-lang.org/#ix=3YsO |
20:26:38 | FromDiscord | <planetis> btw just use a Lock and you will be blessed |
20:26:53 | FromDiscord | <Andreas> (edit) "https://play.nim-lang.org/#ix=3YsO" => "https://play.nim-lang.org/#ix=3YsP changed again, get a true for n1.unsafeAddr" |
20:28:35 | FromDiscord | <Andreas> In reply to @planetis "btw just use a": maybe, well see - i wanna learn this stuff - for a different part i could need a thread-safe queue - is there smth. in your other package of yours, that i just discovered on nimble |
20:29:26 | FromDiscord | <Andreas> (edit) "your" => "the" | "theother package of yours, that i just discovered on nimble ... " added " 'sync' ?" |
20:30:04 | FromDiscord | <planetis> I guess many atomic linked lists exist out there |
20:30:11 | FromDiscord | <planetis> but what kind of queue? |
20:31:27 | FromDiscord | <Andreas> In reply to @planetis "but what kind of": hmm, size limited, thread-safe, put stuff in on the left and pop it from the right, so LIFO it is.. |
20:32:07 | FromDiscord | <planetis> single producer/ consumer? |
20:34:53 | FromDiscord | <Andreas> In reply to @planetis "single producer/ consumer?": good question, not sure yet. Its not critical. Could be any combination many producers : one consumer could be the scenario.. yes many-to-one, the one threads job is to fix orphaned-branches in the tree, that other thread have produced, as a result of a node removal.. |
20:34:59 | FromDiscord | <planetis> if so sync/spsc, the rest either use std/channels? or port one yourself |
20:35:20 | FromDiscord | <planetis> where is std/channels I can't find it, wtf happened? |
20:35:45 | FromDiscord | <planetis> it's channels_builtin now? |
20:36:34 | FromDiscord | <Andreas> yes, it says so 1.6.6 channels_builtin |
20:36:37 | FromDiscord | <planetis> I tried a mpsc implementation once but it wasn't right |
20:36:51 | FromDiscord | <planetis> but someone else found a different paper and might have a package |
20:38:51 | FromDiscord | <planetis> oh it was that one https://github.com/nim-works/loony |
20:39:11 | FromDiscord | <Andreas> and for channels, one can have any arrangement one-to-many, many-to-many etc.. |
20:40:41 | FromDiscord | <planetis> yes, I have a long time to code something with multiple threads so things have changed |
20:41:20 | FromDiscord | <planetis> there is also https://github.com/status-im/nim-taskpools |
20:41:35 | FromDiscord | <planetis> a better threadpool impl |
20:42:11 | FromDiscord | <Andreas> reading the loony-lib, sounds good to me, maybe a bit overkill, but why not,, i'm planning for 4-6-threads max.. |
20:43:32 | FromDiscord | <planetis> if you use it use TheadSanitizer and tell us if it works |
20:43:40 | * | noeontheend quit (Ping timeout: 258 seconds) |
20:44:22 | FromDiscord | <planetis> sent a code paste, see https://paste.rs/DaR |
20:44:24 | FromDiscord | <Andreas> `TheadSanitizer` what is that ? smth. that makes thread-debugging easier ? |
20:45:03 | FromDiscord | <Rika> oh man you have to learn about the sanitisers |
20:45:17 | FromDiscord | <Rika> https://clang.llvm.org/docs/ThreadSanitizer.html |
20:52:49 | NimEventer | New post on r/nim by hc0re: Installing NIM using choosenim on Pop!_OS fails with reason "could not load: libcrypto.so", see https://reddit.com/r/nim/comments/uwa1qv/installing_nim_using_choosenim_on_pop_os_fails/ |
20:55:02 | FromDiscord | <Andreas> this video was recommended, just-in-case,, https://www.youtube.com/watch?v=KeLBd2EJLOU 'Atomic Weapons' by Herp Sutter, very funny - in part I he explains that 1-percent of the silicon deals with our source-code - the rest makes all sort of memory related optimizations.. |
20:59:22 | FromDiscord | <planetis> I've never watched it in full, I should make time |
20:59:32 | FromDiscord | <planetis> is the information still relevant? |
21:00:11 | FromDiscord | <federico3> @Yardanico\: what makes you say that LibreSSL support is required? |
21:00:50 | FromDiscord | <Andreas> In reply to @planetis "is the information still": i's say yes - very much - he argues that the von-Neumann-machine has died in the 90'ies, but nobody noticed and the mental-model lives on.. |
21:00:58 | FromDiscord | <Andreas> (edit) "i's" => "i'd" |
21:18:41 | * | PMunch quit (Quit: leaving) |
21:23:23 | FromDiscord | <morgan> is there any way for me to see what nimsuggest is doing? it's using a full core rn, and has been for hours |
21:23:50 | * | dithpri joined #nim |
21:25:44 | FromDiscord | <morgan> https://media.discordapp.net/attachments/371759389889003532/978408412394176592/unknown.png |
21:25:57 | FromDiscord | <morgan> yeah turns out it has been going for a while |
21:26:14 | FromDiscord | <Elegantbeef> Are you using vscode? |
21:26:18 | FromDiscord | <morgan> yes |
21:26:19 | * | arkurious quit (Quit: Leaving) |
21:26:25 | FromDiscord | <Elegantbeef> What extension? |
21:26:35 | FromDiscord | <morgan> saem's |
21:26:47 | FromDiscord | <Elegantbeef> You should setup the project settings |
21:27:39 | FromDiscord | <morgan> sent a code paste, see https://play.nim-lang.org/#ix=3Yt4 |
21:27:54 | FromDiscord | <Elegantbeef> ok? |
21:28:05 | FromDiscord | <morgan> that's the open files and ports |
21:28:34 | FromDiscord | <morgan> i'll look into the project settings |
21:28:55 | FromDiscord | <Elegantbeef> https://github.com/saem/vscode-nim#options it's mentioned in here |
21:31:59 | FromDiscord | <morgan> ok maybe it's the nim.project, since i'm `include`ing a file atm |
21:32:19 | FromDiscord | <morgan> tho actually i probably don't need to |
21:32:32 | FromDiscord | <morgan> yeah i don't think i need to |
21:32:39 | FromDiscord | <Elegantbeef> include is literally satan |
21:35:34 | FromDiscord | <morgan> ok why does importing from another file not let me use stuff defined in it?????? it keeps displaying errors |
21:36:00 | FromDiscord | <morgan> oh |
21:36:04 | FromDiscord | <morgan> im dumb |
21:36:15 | FromDiscord | <morgan> before it was all in one so i wasn't exporting anything i declared |
21:41:02 | FromDiscord | <voidwalker> how do i debug a startprocess, to see its execution line ? executable starts but does not appear to be doing what I intended |
21:42:03 | FromDiscord | <Elegantbeef> you can pass the option `poEchoCmd` and it'll show what it's running |
21:46:33 | * | noeontheend joined #nim |
21:52:54 | FromDiscord | <voidwalker> hmm looks good, it might be that it needs its output read to progress ? |
22:04:07 | * | jjido joined #nim |
22:12:24 | * | wallabra quit (Quit: ZNC 1.8.2 - https://znc.in) |
22:13:38 | * | wallabra joined #nim |
22:13:45 | FromDiscord | <voidwalker> `while myproc.running: discard myproc.readLines` how else can i do this ? without blocking |
22:14:51 | FromDiscord | <Elegantbeef> async perhaps |
22:18:52 | FromDiscord | <voidwalker> would another kind of exec proc work, that I don't have to read its output ? |
22:20:30 | FromDiscord | <Elegantbeef> I mean you dont need to read the output |
22:21:12 | * | gsalazar quit (Ping timeout: 252 seconds) |
22:21:34 | FromDiscord | <Elegantbeef> you can just do `while myProc.running: discard` |
22:22:02 | FromDiscord | <Elegantbeef> Think there is also a `waitForExit` |
22:22:39 | FromDiscord | <voidwalker> yes but i want to let the program run in the background, and have some kind of watchdog process that checks if it's done (it produced a certain file) |
22:23:15 | FromDiscord | <Elegantbeef> So then just have the process run then check if it's finished when you need to |
22:24:56 | * | Guest21 joined #nim |
22:25:05 | Guest21 | hi! |
22:25:35 | FromDiscord | <voidwalker> but it does not start working if I don't read its output. that's why I asked if there is an alternative (besides using async, which I don't know how to use yet, but I will read) |
22:26:10 | FromDiscord | <Elegantbeef> You shouldnt need to read the output for a process to wrok |
22:32:55 | FromDiscord | <dom96> @voidwalker you should be able to also have the process output its stdout to your process' stdout |
22:33:17 | FromDiscord | <dom96> if you're just debugging that should work quite well |
22:34:54 | * | noeontheend quit (Ping timeout: 244 seconds) |
22:37:29 | FromDiscord | <voidwalker> How would I do that ? |
22:41:28 | FromDiscord | <j-james> In reply to @MorganAlyssa "is there any way": this is a known bug: https://github.com/nim-lang/Nim/issues/11679 |
22:44:14 | FromDiscord | <morgan> good to know |
22:45:16 | * | ltriant joined #nim |
22:55:46 | FromDiscord | <dom96> Hopefully the likes of https://github.com/nim-lang/langserver/ can manage the nimsuggest process to prevent it running wild |
22:57:44 | FromDiscord | <dom96> In reply to @voidwalker "How would I do": use the `poParentStreams` ProcessOption |
22:58:11 | FromDiscord | <dom96> or just use `execCmd` which does it implicitly https://nim-lang.org/docs/osproc.html#execCmd%2Cstring |
22:59:28 | FromDiscord | <voidwalker> I just tried the poParentStreams. I get the first line, and then the process turns into a zombie instead of continuing |
22:59:59 | FromDiscord | <voidwalker> It should output a text progress bar.. maybe that's too complex |
23:32:12 | * | Guest21 quit (Quit: Client closed) |
23:32:46 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |