00:01:22 | Araq | c.config |
00:02:17 | Araq | seriously. it's super obvious, it's in every second line or something. |
00:02:51 | FromGitter | <ephja> oh so do have access to a context parameter. it's only an issue when there isn't one |
00:03:41 | krux02 | Araq: well anyway I already made a pull request that made the cofig parameter optional |
00:04:03 | * | jhorwitz_ joined #nim |
00:04:14 | krux02 | btw, that makes the documentation correct again that explanis the debug proc in the first place |
00:04:42 | Araq | ok |
00:05:51 | krux02 | I go sleep for tonight. Good night. |
00:05:52 | * | hutfolk joined #nim |
00:06:18 | * | krux02 quit (Quit: Leaving) |
00:08:40 | * | hutfolk quit (Client Quit) |
00:09:00 | * | jhorwitz_ quit (Ping timeout: 265 seconds) |
00:09:17 | * | jhorwitz_ joined #nim |
00:11:32 | * | craigger quit (Quit: bye) |
00:12:20 | * | craigger joined #nim |
00:13:47 | * | jhorwitz_ quit (Ping timeout: 256 seconds) |
00:14:11 | * | jhorwitz_ joined #nim |
00:18:41 | * | jhorwitz_ quit (Ping timeout: 248 seconds) |
00:23:36 | * | Death916_ quit (Changing host) |
00:23:36 | * | Death916_ joined #nim |
00:23:36 | * | Death916_ quit (Changing host) |
00:23:36 | * | Death916_ joined #nim |
00:36:21 | * | dddddd quit (Remote host closed the connection) |
01:01:51 | * | yglukhov[i] joined #nim |
01:06:21 | * | yglukhov[i] quit (Ping timeout: 264 seconds) |
01:09:21 | * | xkapastel joined #nim |
01:15:22 | * | metasyn quit (Ping timeout: 264 seconds) |
01:31:33 | * | Death916_ is now known as death916 |
01:42:04 | * | ftsf joined #nim |
01:45:26 | * | donlzx joined #nim |
02:09:43 | FromGitter | <sotrhRaven> is there documentation for the nim-lang/ui |
02:13:44 | * | kinkinkijkin quit (Remote host closed the connection) |
02:14:09 | * | kinkinkijkin joined #nim |
02:14:25 | * | jhorwitz_ joined #nim |
02:19:21 | * | jhorwitz_ quit (Ping timeout: 268 seconds) |
02:37:51 | * | cspar_ quit (Ping timeout: 268 seconds) |
02:47:34 | * | craigger_ joined #nim |
02:49:03 | * | craigger quit (Ping timeout: 256 seconds) |
02:54:34 | * | metasyn joined #nim |
02:59:20 | * | metasyn quit (Ping timeout: 260 seconds) |
03:23:05 | * | jhorwitz_ joined #nim |
03:23:59 | * | jhorwitz_ quit (Read error: Connection reset by peer) |
03:28:07 | * | jhorwitz_ joined #nim |
03:31:26 | * | lompik joined #nim |
03:33:28 | * | metasyn joined #nim |
03:38:39 | shashlick | doesn't look like - it is a wrapper of libui which itself isn't documented |
03:39:13 | shashlick | there are examples in the nim-lang/ui repo as well as in the andlabs/libui repo |
03:39:29 | shashlick | and the recommendation from the libui page is to refer to ui.h |
03:57:26 | * | endragor joined #nim |
04:27:15 | * | yglukhov[i] joined #nim |
04:31:27 | * | yglukhov[i] quit (Ping timeout: 240 seconds) |
04:43:59 | * | miran joined #nim |
05:00:05 | * | metasyn quit (Ping timeout: 260 seconds) |
05:10:29 | * | metasyn joined #nim |
05:28:49 | * | xkapastel quit (Quit: Connection closed for inactivity) |
05:36:30 | * | jhorwitz_ quit (Ping timeout: 245 seconds) |
05:39:41 | * | nsf joined #nim |
06:03:36 | * | donlzx quit (Quit: Leaving) |
06:06:35 | * | jhorwitz_ joined #nim |
06:11:28 | * | Vladar joined #nim |
06:11:30 | * | jhorwitz_ quit (Ping timeout: 265 seconds) |
06:31:21 | * | anubha joined #nim |
06:32:27 | * | anubha quit (Quit: Leaving) |
06:33:10 | * | user1101 joined #nim |
06:39:48 | * | jhorwitz_ joined #nim |
06:40:34 | * | jhorwitz_ quit (Read error: Connection reset by peer) |
06:47:14 | * | Bevo quit (Ping timeout: 260 seconds) |
07:37:51 | * | user1101 quit (Quit: user1101) |
07:38:05 | * | user1101 joined #nim |
07:42:22 | * | user1101 quit (Client Quit) |
07:42:37 | * | user1101 joined #nim |
07:49:53 | * | yglukhov[i] joined #nim |
07:49:59 | * | yglukhov[i] quit (Read error: Connection reset by peer) |
07:50:16 | * | yglukhov[i] joined #nim |
07:52:07 | * | dddddd joined #nim |
07:53:30 | * | yglukhov[i] quit (Read error: Connection reset by peer) |
07:54:03 | * | yglukhov[i] joined #nim |
08:02:16 | * | user1101 quit (Quit: user1101) |
08:06:47 | * | data-man joined #nim |
08:08:48 | * | data-man quit (Client Quit) |
08:11:29 | FromDiscord | <Legend2> Hi, anyone able to help me out with socket ssl stuff? |
08:12:59 | FromDiscord | <Legend2> Https://forum.nim-lang.org/t/3980 |
08:12:59 | FromDiscord | <Legend2> If anyone knows what is wrong |
08:18:55 | * | jhorwitz_ joined #nim |
08:18:56 | * | bevo joined #nim |
08:23:42 | * | jhorwitz_ quit (Ping timeout: 256 seconds) |
08:39:15 | * | ftsf quit (Ping timeout: 256 seconds) |
08:48:26 | Araq | legend2: I replied |
08:50:13 | Araq | I never use 'fork', so I can't help you more. |
09:01:49 | * | rauss quit (Read error: Connection reset by peer) |
09:03:54 | * | rauss joined #nim |
09:19:04 | * | bleakbriar joined #nim |
09:20:17 | FromDiscord | <Legend2> Thanks! |
09:20:36 | FromDiscord | <Legend2> Is it possible to override the nim standard library's net module? |
09:21:20 | * | bleakbriar left #nim (#nim) |
09:24:24 | FromDiscord | <Legend2> I dont think fork is the problem, my problem is trying to close the server socket |
09:27:01 | dom96 | Why not just use threads instead of fork? |
09:28:10 | * | yglukhov[i] quit (Read error: Connection reset by peer) |
09:28:43 | * | yglukhov[i] joined #nim |
09:41:25 | FromDiscord | <Legend2> My because i want to lower privileges for the child process while maintaining the root privileges for the parent process |
09:41:35 | FromDiscord | <Legend2> Using threads wouldnt be able to accomplish that |
09:43:34 | Araq | Legend2: you can use a "lib override" to patch the stdlib but I forgot the syntax :P |
09:44:06 | FromGitter | <mratsim> dynlibOverride? |
09:44:24 | Araq | if you don't install it in /usr/, you can easily modify the Nim stdlib to play around |
09:45:25 | Araq | https://nim-lang.org/docs/nimscript.html#patchFile,string,string,string |
10:07:30 | FromDiscord | <Legend2> Thanks so much for the help! I will give it a go :) |
10:19:47 | * | jhorwitz_ joined #nim |
10:24:40 | * | jhorwitz_ quit (Ping timeout: 268 seconds) |
10:34:11 | * | elrood joined #nim |
10:42:23 | * | NimBot joined #nim |
10:56:22 | * | cspar_ joined #nim |
11:00:36 | * | yglukhov[i] quit (Remote host closed the connection) |
11:01:21 | * | yglukhov[i] joined #nim |
11:05:51 | * | yglukhov[i] quit (Ping timeout: 265 seconds) |
11:16:55 | * | yglukhov[i] joined #nim |
11:20:32 | FromGitter | <niv> hello. i have a question about the GC: is there a way to make it hand over "reserved" memory? I have a daemon process that does a lot of computation/allocation on startup, but then never needs that memory again |
11:20:57 | FromGitter | <niv> for a smallish data set, getTotalMem() says 300MB, but getOccupied() is only 50MB. i want those 250MB back. |
11:20:57 | * | noonien joined #nim |
11:26:30 | def- | @niv GC_fullCollect sounds good |
11:26:42 | FromGitter | <niv> i tried that, it doesn't actually collect anything. |
11:27:02 | def- | Something still on the stack pointing to it? |
11:27:05 | def- | https://github.com/nim-lang/Nim/issues/6382 |
11:27:37 | FromGitter | <niv> not really. also wouldn't it then not list under getFreeMem() but instead occupied? |
11:33:58 | def- | Then I don't know what the issue is |
11:37:10 | FromGitter | <niv> neither do i. |
11:37:33 | shashlick | GC doesn't immediately release memory cause it could be used for something else |
11:37:47 | shashlick | I ran into a similar issue a while ago |
11:37:49 | FromGitter | <niv> i am aware. but i know it won't be, so i want it back. |
11:38:31 | FromGitter | <niv> also, unrelatedly, i think there's a memleak in the json lib somewhere .. sigh |
11:41:01 | shashlick | https://github.com/nim-lang/Nim/issues/6031 |
11:41:39 | shashlick | I worked around it initially by using malloc free myself |
11:41:56 | * | fjvallarino joined #nim |
11:42:11 | FromGitter | <niv> removing the async pragma cuts occupied memory in half after a run. hmm. |
11:43:53 | Araq | niv: there are no leaks in json.nim |
11:44:17 | FromGitter | <niv> yeah, i realise it's a pure lib. im just confused. |
11:51:40 | Araq | shashlick, the better runtime will fix this :-) |
11:51:50 | Araq | coming real soon now (TM) |
11:51:57 | Araq | as that's what I'm working now. |
11:53:41 | FromGitter | <niv> i don't understand this. just adding a sleepAsync() in the processing loop bumps occupiedmem from 90 to 130MB after the run. |
11:55:48 | dom96 | Each call to sleepAsync allocates a new Future[void] |
11:55:52 | dom96 | maybe these aren't being deallocated |
11:55:57 | FromGitter | <kindlychung> Has anyone used arraymancer in production? Looks pretty nice. |
11:56:03 | dom96 | There is unfortunately a memory leak hiding in there somewhere |
11:56:16 | FromGitter | <niv> and remove them, i mean |
11:56:42 | FromGitter | <niv> so it's sleepAsync specifically that's leaky, or asyncdispatch? |
11:56:57 | Yardanico | @niv can you try with --gc:v2 ? |
11:57:12 | FromGitter | <niv> will do |
11:57:26 | dom96 | Nim, the gc, or asyncdispatch |
11:58:23 | dom96 | I wasn't able to reproduce it in a small test case yet |
11:58:45 | dom96 | (if you can then please share) |
11:59:50 | FromGitter | <niv> i dont know. feels like im fighting several issues here |
12:02:42 | FromGitter | <niv> @dom96 https://gist.github.com/niv/af87918cad1baf0d872dd93c976c1ae7 |
12:03:22 | FromGitter | <niv> funnily enough, GC2 seems to use LESS memory when i yield to sleepAsync in the processing loop, so the reverse to not specifying --gc |
12:07:10 | FromGitter | <niv> i don't really have a small repro, just this project. |
12:08:01 | * | lompik quit (Ping timeout: 248 seconds) |
12:08:05 | * | user1101 joined #nim |
12:12:46 | * | user1101 quit (Client Quit) |
12:13:02 | * | user1101 joined #nim |
12:15:59 | FromGitter | <niv> wait, the GC doesn't return memory to the OS at all? |
12:19:05 | Yardanico | should it? AFAIK OS will take "free" memory from the app when the osneeds it |
12:19:46 | FromGitter | <niv> it should free() memory not in use, otherwise that will have to be swapped out under memory pressure |
12:20:36 | * | jhorwitz_ joined #nim |
12:23:49 | Araq | kindlychung, mratsim is one of my Nim heroes, don't hesitate to use it in production, I'm sure any upcoming issue would be resolved within hours... |
12:23:59 | Araq | :-) |
12:25:07 | FromGitter | <niv> i'm trying to use it in production as well :p |
12:25:21 | * | jhorwitz_ quit (Ping timeout: 256 seconds) |
12:25:36 | Araq | oh interesting :D |
12:28:48 | FromGitter | <kaushalmodi> Can I get help with forward declaration.. I have this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b3231800168e70c08efc20d] |
12:29:15 | FromGitter | <kaushalmodi> I do have the implementation further down in the same file |
12:29:35 | Araq | yeah... what about it? looks fine |
12:30:57 | * | floppydh quit (Read error: Connection reset by peer) |
12:31:08 | FromGitter | <kaushalmodi> ah realised my mistake |
12:31:30 | * | find0x90 joined #nim |
12:31:31 | FromGitter | <kaushalmodi> lines 3, 4 |
12:31:50 | * | floppydh joined #nim |
12:34:51 | * | find0x90 quit (Client Quit) |
12:44:25 | * | fjvallarino quit (Remote host closed the connection) |
13:08:56 | * | fjvallarino joined #nim |
13:24:34 | dom96 | Pretty the GC free's memory |
13:24:40 | dom96 | *Pretty sure |
13:33:56 | * | krux02 joined #nim |
13:35:30 | FromGitter | <krux02> @kaushalmodi I see you work on emacs integration. Will emacs mode finally become usable? |
13:36:12 | FromGitter | <krux02> would be very nice. |
13:39:00 | * | endragor quit (Remote host closed the connection) |
13:53:58 | FromGitter | <mratsim> @kindlychung @niv: this company is evaluating Arraymancer for smart windows/IoT https://forum.nim-lang.org/t/3456#21617, there repo is here: https://github.com/windgo-inc/lerosi |
13:56:50 | * | endragor joined #nim |
13:57:45 | FromGitter | <kindlychung> Looks interesting. 😄 |
14:01:07 | * | endragor quit (Ping timeout: 256 seconds) |
14:19:11 | * | xkapastel joined #nim |
14:19:43 | FromGitter | <mratsim> also I’ve seen visits with referrer from an internal Rakuten bug tracker |
14:20:37 | FromGitter | <mratsim> I don’t think it’s used there but maybe they had some toy proof of concepts |
14:21:25 | * | jhorwitz_ joined #nim |
14:26:09 | * | jhorwitz_ quit (Ping timeout: 264 seconds) |
14:29:59 | * | jhorwitz_ joined #nim |
14:34:40 | * | jhorwitz_ quit (Ping timeout: 260 seconds) |
14:34:41 | * | cryptocat1094 joined #nim |
14:39:27 | * | leorize joined #nim |
14:45:10 | * | xet7 joined #nim |
14:51:53 | * | captainbland joined #nim |
14:54:57 | * | captainbland_ quit (Ping timeout: 256 seconds) |
15:18:02 | * | Trustable joined #nim |
15:19:40 | pqflx3[m] | Does parsetoml support dotted keys? |
15:39:51 | * | xet7 quit (Quit: Leaving) |
15:47:53 | * | lompik joined #nim |
15:48:17 | * | cmk_zzz quit (Ping timeout: 248 seconds) |
15:50:39 | * | fjvallarino quit (Remote host closed the connection) |
15:56:20 | * | cspar_ quit (Ping timeout: 265 seconds) |
16:04:15 | * | leorize quit (Quit: WeeChat 2.1) |
16:05:46 | * | cmk_zzz joined #nim |
16:08:38 | * | cspar_ joined #nim |
16:11:27 | * | smt_ joined #nim |
16:15:21 | * | smt` quit (Ping timeout: 264 seconds) |
16:18:57 | * | metasyn quit (Ping timeout: 264 seconds) |
16:21:25 | FromGitter | <kaushalmodi> @krux02 I am working on Nim Emacs Module which does Emacs/Nim integration via Nim compiled .so objects. It's not clear what you meant by "emacs mode finally become usable".. nim-mode, for example, works great |
16:22:46 | krux02 | kaushalmodi: I use nim-mode. But sadly I had to disable almost everything to make it feasible to work with it. |
16:23:01 | FromGitter | <kaushalmodi> Talking about Emacs Modules, as of now, the "wrappers" branch in my fork is very much useable: https://github.com/kaushalmodi/nim-emacs-module/tree/wrappers |
16:23:33 | krux02 | everything left of nim-mode that I actually use is syntax highlighting and fill-region for comments |
16:23:58 | FromGitter | <kaushalmodi> Comment sontification is a bit broken in nim-mode. But other-wise auto-indentation, and other syntax highlighting works fine |
16:24:01 | krux02 | sorry I mean fill-paragraph, not fill-region |
16:24:19 | * | data-man joined #nim |
16:24:46 | FromGitter | <Vindaar> @krux02 are you also having the issue that nim-mode causes lots of freezes? ⏎ @kaushalmodi nice, good to hear you managed to get it working! The issue with the location of `exportc` really is weird. :) |
16:24:51 | krux02 | well I had cases where auto indentation froze the editor for several seconds and when it was done auto indenting, my code was broken. |
16:25:04 | krux02 | I don't like auto breaking my code |
16:25:11 | krux02 | so auto indentation had to go |
16:25:29 | FromGitter | <kaushalmodi> krux02: I don't auto-indent the whole buffer |
16:25:39 | * | fjvallarino joined #nim |
16:25:47 | krux02 | Vindaar: yes lot's of freezes |
16:26:03 | krux02 | even with almost everything disabled it is not a fluid experience |
16:26:11 | FromGitter | <Vindaar> I've never had a working auto-indent in any language I've used that worked reliably on a whole buffer, with the exception of clojure |
16:26:14 | krux02 | I don't know what is still causing the issue |
16:26:44 | krux02 | Vindaar: first of all, auto indentation doesn't work on languages with semantic indentation |
16:26:48 | FromGitter | <kaushalmodi> krux02: Then the fontification is to blame |
16:27:07 | krux02 | it can only work when indentation can be infered from the braces brackets |
16:27:20 | krux02 | so I don't really get the use case of auto indentation in Nim |
16:27:29 | FromGitter | <ephja> @Vindaar well if it's good enough for Rasmus Lerdorf |
16:27:31 | krux02 | but it go (gofmt) it works fine |
16:27:44 | krux02 | but there it is an external tool, not part of any editor |
16:28:05 | krux02 | kauskalmodi: is there anything I can do about it? |
16:28:13 | FromGitter | <Vindaar> @ephja hm? |
16:28:14 | krux02 | I already use a pixel font |
16:29:06 | FromGitter | <kaushalmodi> krux02: About fontification, I am not good at debugging that. |
16:29:45 | * | nsf quit (Quit: WeeChat 2.1) |
16:30:42 | FromGitter | <kaushalmodi> krux02: Look at `M-x profiler-start` to find the true culprit of the slow down and then file a report using the data you get on `M-x profiler-report`: https://www.gnu.org/software/emacs/manual/html_node/elisp/Profiling.html |
16:30:51 | * | fjvallarino quit (Remote host closed the connection) |
16:30:58 | * | fjvallarino joined #nim |
16:32:56 | krux02 | kaushalmodi: currently I don't have a file ready that is so slow that I need to profile it. but when I have it ready I will start the profiler, but then I won't be able to interpret the report or fail at using emacs in general |
16:33:30 | krux02 | I tried using gdb from emacs |
16:33:35 | krux02 | it's horrible |
16:33:48 | FromGitter | <kaushalmodi> The report is generally readable... you need to expand the plus signs on the left |
16:34:36 | krux02 | is it like in gdb, that when I expand with the + sign, nothing happens, only when I additionally press g to refresh? |
16:35:13 | FromGitter | <kaushalmodi> All I did was `M-x profile-start`, do something for few seconds, `M-x profiler-report`.. that will show the buffer in above screenshot |
16:35:31 | krux02 | but if anybody cares, today I found out about this gdb frontend here: https://github.com/cs01/gdbgui/ |
16:36:37 | krux02 | kaushalmodi: which screenshot? |
16:37:32 | FromGitter | <kaushalmodi> You might need to open this in Gitter |
16:39:58 | FromGitter | <ephja> oh so the IRC bridge doesn't even forward the links |
16:41:03 | FromGitter | <ZarsBranchkin> @kaushalmodi By the way, I gave a shot at creating Nim modules for emacs before as well, I haven't worked on it in a while now though |
16:42:27 | FromGitter | <krux02> (https://files.gitter.im/nim-lang/Nim/uHCp/Screenshot_2018-06-26_18-29-42.png) |
16:42:56 | Yardanico | @krux02 do you use gdb script for nim for pretty-printing? |
16:43:00 | * | metasyn joined #nim |
16:43:31 | FromGitter | <krux02> Yardanico: I definitively did that in the past, but that screenshot is without |
16:44:07 | FromGitter | <ZarsBranchkin> Yeah, it worked nicely. I remember creating string concat function in Nim to compare it with native emacs one and it did end up being faster. Judging from profiler, elisp GC was slowest part of native concat function |
16:45:31 | FromGitter | <krux02> (https://files.gitter.im/nim-lang/Nim/xlrf/image.png) |
16:47:44 | * | btbytes joined #nim |
16:48:05 | FromGitter | <ZarsBranchkin> I tried creating slightly more abstract, simpler to use interface to emacs. Here is example: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b326e45ad21887018e036e7] |
16:48:55 | FromGitter | <kaushalmodi> @ZarsBranchkin what is nimacs? |
16:49:33 | FromGitter | <krux02> (https://files.gitter.im/nim-lang/Nim/rzxM/main_0012.png) |
16:50:13 | FromGitter | <krux02> even the shader is written in nim |
16:52:19 | FromGitter | <kaushalmodi> @ZarsBranchkin Please ping me if/when you make nimacs public |
16:53:52 | Yardanico | what |
16:54:11 | Yardanico | last two messages in Gitter by @ephja and @ZarsBranchkin didn't make it to the IRC |
16:55:48 | FromGitter | <kaushalmodi> I have a question about openArray and unsafeAddr: |
16:56:29 | FromGitter | <kaushalmodi> Above is the only way I could make it work.. |
16:57:15 | FromGitter | <kaushalmodi> I don't know the array size before hand.. so I cannot even roll the openarray to an array in that proc |
16:59:13 | FromGitter | <Vindaar> You could create a local `var` variable as a `seq`, which copies the content of the `listArgs` and then hand the `addr` of the 0 element of that: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ if you'd prefer that [https://gitter.im/nim-lang/Nim?at=5b3270e17da8cd7c8c6fac66] |
16:59:51 | FromGitter | <krux02> @kaushalmodi that is the inteded way of using unsafeAddr |
17:00:24 | FromGitter | <krux02> don't worry about it, if the only situation to call unsafeAddr is in wrappers, then you are fine |
17:01:03 | FromGitter | <ephja> can't do much about it in that case other than encapsulating the unsafe parts |
17:01:42 | FromGitter | <kaushalmodi> The thing is I don't quite get unsafe vs safe |
17:02:15 | FromGitter | <krux02> normally you can't just take the addr of an argument, because the argument is often passed by reference, when you modify the argument though the pointer, things would go wrong. |
17:03:01 | * | yglukhov[i] quit (Ping timeout: 256 seconds) |
17:03:06 | FromGitter | <krux02> You generally use unsafeAddr when you say, "sorry my type system doesn't all to to express 'I don't modify it' here' but I promise I don't modify it" |
17:05:08 | * | natrys joined #nim |
17:06:03 | * | yglukhov[i] joined #nim |
17:09:45 | * | captainbland quit (Remote host closed the connection) |
17:10:03 | * | captainbland joined #nim |
17:12:30 | FromGitter | <Quelklef> Is there some way to execute some lines of code and evaluate two something as if it were a function call, but without a function call? |
17:13:15 | FromGitter | <Quelklef> which I find cleaner than ⏎ ⏎ ```var x = initSomething() ⏎ x.mutate1() ⏎ x.mutate2()``` [https://gitter.im/nim-lang/Nim?at=5b32742baeb8fa0c07443240] |
17:14:30 | FromGitter | <ephja> try it with () instead of {} and without "return" |
17:15:58 | FromGitter | <Quelklef> gnarly, that worked |
17:16:46 | * | captainbland_ joined #nim |
17:17:28 | FromGitter | <Quelklef> thank you tho |
17:18:36 | FromGitter | <zetashift> can't you just chain em like ```nim var x = initSomething().mutate1().mutate2() ``` |
17:19:45 | Yardanico | what's wrong with FromGitter today? |
17:19:49 | FromGitter | <Quelklef> Another solution would be to have an operator `\>` where `x \> f(a, b, c)` stands for `x.f(a, b, c); x` |
17:19:54 | Yardanico | last 3 messages from Gitter weren't bridged again |
17:19:54 | * | captainbland quit (Ping timeout: 256 seconds) |
17:20:05 | oprypin | Yardanico, lol gitter API is sending them like that, i dont even know... |
17:20:29 | Yardanico | oprypin, ehh, it seems Gitter has a very bad API stability :( |
17:20:34 | FromGitter | <Quelklef> @ephja I had that working once, but when I tried again it wouldn't! Let me try again |
17:21:32 | * | captainbland_ quit (Ping timeout: 268 seconds) |
17:21:33 | FromGitter | <Quelklef> Huh, it's working again. This is about what I wanted, thank you! |
17:28:10 | * | miran quit (Ping timeout: 245 seconds) |
17:36:52 | * | mwbrown quit (Ping timeout: 245 seconds) |
17:38:22 | FromGitter | <Quelklef> hmmmm |
17:38:41 | * | dorelix quit (Ping timeout: 248 seconds) |
17:38:57 | FromGitter | <Quelklef> I'm getting "undeclared field: 'sons'" on a value `right` which is of `NimNode` |
17:39:31 | FromGitter | <Quelklef> so it should know that `right.kind == nnkCall` and therefore it has `.sons`, right? |
17:45:19 | * | dorelix joined #nim |
17:47:53 | FromGitter | <Quelklef> Ah, `NimNodeObj.sons` is not exported in `macros`, I think. Odd. |
17:55:57 | Araq | not odd, the .sons in the Nim compiler is a relict |
17:56:15 | Araq | and not every old mistake got copied into the official macro system :P |
18:05:00 | FromGitter | <Varriount> Araq: I'm just waiting for someone to file an issue saying that "sons" isn't a politically correct variable name, because it uses a gendered noun. |
18:05:27 | Yardanico | lol |
18:07:11 | FromGitter | <ephja> is `[]` gender neutral? |
18:09:31 | FromGitter | <Quelklef> Wait, @Araq if .sons isn't how the AST is formed, how is it? |
18:10:01 | Araq | varriount: well 'sons' are all black and homosexual, so it's ok |
18:12:15 | * | lompik quit (Ping timeout: 260 seconds) |
18:13:10 | * | yglukhov[i] quit (Ping timeout: 256 seconds) |
18:13:50 | Araq | Quelkef: via .add and []= ? |
18:15:06 | FromGitter | <Quelklef> Araq: I mean internally. Is it still a list of children NimNodes? |
18:24:40 | * | noonien quit (Quit: Connection closed for inactivity) |
18:28:37 | * | krux02 quit (Quit: Leaving) |
18:32:40 | Araq | sure |
18:34:57 | FromGitter | <Quelklef> Hm, I think I misunderstood an earlier message of yours, then |
18:37:24 | Araq | I don't want to use the internal 'seq' forever, I think "packed" trees will be much faster and use up far less memory |
18:37:37 | Araq | maybe that is what is in your mind. |
18:38:01 | Araq | but either way, we can decouple the internal datastructures from the official AST further, not many problems ahead here |
18:39:20 | * | btbytes quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:40:36 | * | user1101 quit (Quit: user1101) |
18:42:11 | * | btbytes joined #nim |
18:42:42 | * | opi quit (Ping timeout: 245 seconds) |
18:44:11 | FromGitter | <Quelklef> Don't think so; not really sure what you mean by packed trees. |
18:45:34 | * | nkaramolegos[m] joined #nim |
18:46:44 | * | nkaramolegos[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/glZzsBaAXztUOiqKKHjavZEd > |
18:47:45 | * | jjido joined #nim |
18:47:50 | FromGitter | <Varriount> @Quelklef I found http://recurial.com/wp-content/uploads/2017/06/ecoop_submitted_5_17.pdf |
18:48:24 | FromGitter | <GULPF> @Araq any chance that #7800 can be merged soon? I can rebase it if you want |
18:49:04 | FromGitter | <Quelklef> It's just a lot |
18:50:04 | FromGitter | <Quelklef> Oh, I think I get the idea at least from page 2's diagram |
18:50:43 | FromGitter | <ephja> is it unsafe to allocate on the GC heap in a cdecl proc that is called from a nim thread? |
18:52:40 | * | opi joined #nim |
18:54:37 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:54:42 | * | dddddd quit (Remote host closed the connection) |
18:55:19 | * | dddddd joined #nim |
18:57:11 | FromGitter | <ephja> no but it's called from a C proc |
18:58:04 | FromGitter | <ephja> (libsoundio callback) |
18:58:31 | * | jjido joined #nim |
18:58:43 | * | btbytes quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:58:58 | * | flyx|znc joined #nim |
18:59:11 | * | btbytes joined #nim |
18:59:19 | * | btbytes quit (Client Quit) |
19:06:16 | FromGitter | <ephja> it's run in a nim thread but not the main thread. I thought it would work since it's not allocated in a Nim proc and then passed to a C proc, in which case I would use GC_ref and GC_unref. I was only trying to echo something |
19:12:11 | Araq | GULPF: Ok, rebase please |
19:22:17 | * | Jesin quit (Quit: Leaving) |
19:22:42 | FromGitter | <ephja> I dunno if it's supposed to be safe if the heap is thread local |
19:22:50 | * | flyx quit (Quit: ZNC - http://znc.in) |
19:22:50 | * | flyx|znc is now known as flyx |
19:23:11 | * | flyx quit (Quit: ZNC - http://znc.in) |
19:23:37 | * | flyx joined #nim |
19:23:46 | Araq | ephja: you can protect/dispose your GC'ed data |
19:27:42 | * | fjvallarino quit (Remote host closed the connection) |
19:28:09 | * | fjvallarino joined #nim |
19:31:41 | * | nsf joined #nim |
19:32:53 | * | fjvallarino quit (Ping timeout: 268 seconds) |
19:38:06 | * | mwbrown joined #nim |
19:39:36 | * | yglukhov[i] joined #nim |
19:39:38 | * | jjido quit (Ping timeout: 265 seconds) |
19:40:11 | * | captainbland joined #nim |
19:46:13 | * | btbytes joined #nim |
19:53:05 | * | SenasOzys joined #nim |
19:54:39 | FromGitter | <Quelklef> huh, coming from Python, Nim's `varargs` did not work like I expected |
19:55:28 | FromGitter | <Quelklef> it's much simpler than I thought it'd be |
19:58:55 | * | Jesin joined #nim |
20:04:02 | dom96 | Love that I can just install Nim using `apt` on Raspbian now, even if it is 0.16.0 :) |
20:04:13 | * | fjvallarino joined #nim |
20:05:33 | * | metasyn left #nim ("WeeChat 2.1") |
20:06:51 | * | fjvallarino quit (Remote host closed the connection) |
20:07:00 | * | fjvallarino joined #nim |
20:13:14 | * | chopzwei joined #nim |
20:13:31 | federico3 | dom96: you can use the armel build from https://packages.debian.org/sid/nim |
20:14:00 | cryptocat1094 | Is there a particular reason it could not be backported or it just plain hasn't been? |
20:14:26 | FromGitter | <krux02> @Quelklef I think the varargs in Nim are something that needs to be worked on. |
20:14:27 | federico3 | 0.18.0 is in Debian unstable and testing |
20:14:41 | dom96 | looks like armhf is available too |
20:14:53 | dom96 | but I wonder what the best way to install this on Raspbian is |
20:14:57 | * | Vladar quit (Quit: Leaving) |
20:15:08 | FromGitter | <krux02> it works great for macros and templates, but for a normal proc like echo, I don't really like it because it causes allocation. |
20:15:17 | federico3 | and raspberry pi-s are supported natively in Debian (I'm using a freedombox build on a raspi 1 and Nim is there) |
20:17:22 | dom96 | federico3: only armel though, right? |
20:17:28 | FromGitter | <Quelklef> @krux02 What, of the array? Isn't any implementation going to have some overheard? |
20:17:47 | federico3 | dom96: both armel and armhf if that's what you are asking |
20:17:49 | dom96 | federico3: what's the best way for me to install this package on Raspbian, is there even a way? |
20:18:08 | dom96 | huh, why does Raspbian exist then? |
20:18:39 | federico3 | dom96: is it an armel or armhf host? |
20:19:37 | dom96 | no idea |
20:19:58 | * | captainbland quit (Ping timeout: 256 seconds) |
20:20:43 | FromGitter | <dom96> Hrm. |
20:20:44 | federico3 | you can just grab the .deb from https://packages.debian.org/buster/armel/nim/download |
20:21:33 | dom96 | oprypin: Either this is just random chance, or specifically messages are dropped when the same person sends multiple lines |
20:21:56 | federico3 | you might need to update openssl. Worst case you can dpkg -r to remove the package if it cannot be installed. You can also add repos to API to pull any package you want from Debian and perhaps set APT pinning |
20:21:56 | FromGitter | <krux02> dom96: I am not sure why exactly raspbian exist, but I know raspian has a few neat things like a free version of mathematica |
20:23:10 | cryptocat1094 | ? |
20:23:42 | cryptocat1094 | Raspbian exists because Debian doesn't want to distribute the mandatorily-blobbed image Raspberry Pi expects, iirc. |
20:24:14 | dom96 | nim depends on libc6 (>= 2.27); however: Version of libc6:armhf on system is 2.24-11+deb9u3. |
20:24:16 | dom96 | A shame |
20:24:16 | federico3 | actually blobs can be shipped as part of non-free |
20:24:51 | federico3 | cryptocat1094: and FreedomBox ships Debian images for raspberry pi |
20:25:16 | cryptocat1094 | Huh, looks like I was wrong: https://www.raspbian.org/RaspbianFAQ#What_is_Raspbian.3F |
20:27:04 | cryptocat1094 | gt; nim depends on libc6 (>= 2.27) |
20:27:12 | cryptocat1094 | So that's why it's not in stable I guess. |
20:27:13 | * | btbytes quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:27:42 | federico3 | no, that's the dependency requirement in the testing repo - because it was built against that version of libc6 |
20:28:09 | cryptocat1094 | Alright. |
20:29:16 | federico3 | e.g. the one in backports requires libc6 >= 2.15 https://packages.debian.org/stretch-backports/nim |
20:30:11 | cryptocat1094 | So it has been backported. Nice. |
20:33:11 | dom96 | glibc is always the problem |
20:33:12 | * | Trustable quit (Remote host closed the connection) |
20:34:05 | federico3 | uhm you have 2.24 installed |
20:35:00 | FromGitter | <kaushalmodi> dom96: "glibc is always.." heh :) |
20:35:18 | dom96 | It's not like I can just install a newer libc, can i? |
20:35:49 | FromGitter | <kaushalmodi> I tried installing newer libc on my machine, spent hours, failed |
20:36:21 | federico3 | dom96: actually you can upgrade it if there's a Raspbian testing repo (and therefore a hundred other packages that depend on it) |
20:36:38 | FromGitter | <kaushalmodi> Question about ptr.. if a proc parameter is of type "ptr array[2, int]", how can I retreive the value of that array from that ptr inside the proc? |
20:37:21 | FromGitter | <kaushalmodi> I can manually do `[value[0], value[1]]`.. but is there a better way.. an "un-ptr" proc? |
20:39:02 | dom96 | So Raspbian was born because the first RPi uses ARMv6? Seems like for the newer RPi's it's no longer necessary |
20:39:55 | FromGitter | <ephja> @kaushalmodi you can dereference with foo[] |
20:40:33 | FromGitter | <kaushalmodi> yes! That's what I was looking for. Thanks! I was just reading: https://rosettacode.org/wiki/Pointers_and_references#Nim |
20:40:53 | * | elrood quit (Quit: Leaving) |
20:41:18 | Yardanico | @kaushalmodi a lot of nim examples on rosetta code are outdated |
20:43:10 | FromGitter | <kaushalmodi> Yardanico: Thanks. I don't follow them as-is.. I always try them out. In this case the `echo f[]` example there helped. |
20:43:12 | cryptocat1094 | dom96: Probably, yeah. |
20:44:04 | cryptocat1094 | The old ones might stick around for a while though, raspis aren't too finicky. |
20:50:50 | * | cryptocat1094 quit (Quit: gtg) |
20:52:36 | FromGitter | <kayabaNerve> dom96: RPi 0 uses the same chip as the original but with an overclock to 1 GHz versus the original 700MHz IIRC |
20:52:43 | * | Ven`` joined #nim |
20:54:04 | FromGitter | <kayabaNerve> To be specific, it uses the ARM11 which is equivalent to ARMv6 |
20:54:14 | dom96 | It's not just the clock speed |
20:54:20 | dom96 | The newer ones also have more cores |
20:54:37 | FromGitter | <kayabaNerve> The RPi 0 has the same CPU as the original |
20:55:15 | FromGitter | <kayabaNerve> That's what I'm saying here. The RPi 0 isn't supported anymore (or at least not manufactured anymore) due to the RPi 0W (built in WiFi + Bluetooth) |
20:56:45 | FromGitter | <kayabaNerve> https://imgur.com/a/FPclEHb |
20:57:21 | dom96 | Oh, you literally mean RPi Zero |
20:57:32 | FromGitter | <kayabaNerve> The first link says it's ARM11. The second says that's equivalent to ARMv6 (surrounded by technicalities, of course). The third says it's not just the same arch but the same CPU. |
20:57:46 | * | chopzwei quit (Remote host closed the connection) |
20:58:17 | * | chopzwei joined #nim |
20:59:33 | * | nsf quit (Quit: WeeChat 2.1) |
21:07:34 | FromGitter | <Quelklef> @krux02 Why's array allocation particularly bad? Seems like it'd be fairly low |
21:11:36 | FromGitter | <dandevelo> How can I run a process at compile time? Tried doing static: and execProcess but it complains: nim\lib\pure\osproc.nim(511, 19) Error: cannot run in the VM: sizeof(si) |
21:11:44 | * | btbytes joined #nim |
21:12:19 | Araq | system.staticExec |
21:29:21 | * | Ven`` quit (Quit: q+) |
21:31:16 | FromGitter | <dandevelo> Thanks @Araq. Is there any way to set the current directory when running staticExec? |
21:32:04 | * | brainproxy quit (Ping timeout: 256 seconds) |
21:32:50 | Araq | nah :-) |
21:35:14 | FromGitter | <dandevelo> shouldn't it take the current directory from the source file? |
21:36:11 | * | user1101 joined #nim |
21:36:21 | FromGitter | <dandevelo> just like staticRead? |
21:37:03 | Araq | it does do that |
21:37:12 | Araq | there was a bugfix about it |
21:37:41 | * | user1101 quit (Client Quit) |
21:37:43 | Araq | maybe I misremember. |
21:37:57 | * | user1101 joined #nim |
21:37:58 | * | btbytes quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:37:59 | dom96 | staticExec("cd foobar && blah") # maybe? |
21:38:18 | Araq | don't do that. |
21:38:47 | FromGitter | <dandevelo> That's why I am asking. I saw the discussion regarding the bugfix but it seems like it still doesn't take the source file dir |
21:38:51 | Araq | we don't use a shell to run these commands |
21:41:09 | FromGitter | <dandevelo> it seems it runs the command from the nim\bin folder instead of the source file folder |
21:41:19 | * | btbytes joined #nim |
21:42:39 | FromGitter | <dandevelo> Looks like the bug is still there |
21:46:13 | Araq | proc opGorge*(cmd, input, cache: string, info: TLineInfo; conf: ConfigRef): (string, int) = |
21:46:14 | Araq | let workingDir = parentDir(toFullPath(conf, info)) |
21:46:16 | Araq | ... |
21:47:27 | Araq | the compiler's source code disagrees with you. |
21:47:47 | FromGitter | <dandevelo> the procmon log disagrees with you :) |
21:58:41 | * | xkapastel quit (Quit: Connection closed for inactivity) |
22:00:51 | FromGitter | <dandevelo> @Araq: a sample of the log: https://i.imgur.com/27dTuXI.png |
22:01:31 | FromGitter | <dandevelo> this is main.nim : import src/statictest |
22:02:04 | FromGitter | <dandevelo> and this is src/statictest.nim ⏎ static: ⏎ ⏎ ```let output = staticExec("run something") ⏎ echo output``` [https://gitter.im/nim-lang/Nim?at=5b32b7dcaeb8fa0c0744e13d] |
22:02:40 | FromGitter | <dandevelo> and statictest.nim is in X:\nimtest\src |
22:03:11 | * | Araq shrugs. |
22:03:19 | Araq | so fix it, I showed you where. |
22:03:59 | Araq | I don't know what "run something" means |
22:04:20 | FromGitter | <dandevelo> It is a bogus command in order to better see the effects in the log |
22:05:00 | FromGitter | <dandevelo> You can see that the OS looks for run.exe as part of the "run something" command |
22:06:13 | FromGitter | <dandevelo> after that it will try the main.nim location: x:\nimtest\run.exe |
22:06:19 | Araq | bogus commands don't respect the cwd |
22:06:47 | Araq | there are plenty of subleties involved here |
22:09:31 | FromGitter | <dandevelo> If you open cmd.exe cd to a folder and then run a bogus command and see the procmon log you will see that the first path where the OS tries that command is the dir you cd-ed into |
22:11:18 | Araq | and why would I look at the procmon log? I have better things to do. |
22:12:08 | Araq | just fix it and create a PR. |
22:12:26 | Araq | or at least report it properly. |
22:12:35 | FromGitter | <dandevelo> Ok, I will look into how it works and see what can be done about it |
22:12:59 | Araq | with a test program that should work but doesn't, not with vague instructions |
22:13:16 | FromGitter | <dandevelo> Sure |
22:15:00 | * | brainproxy joined #nim |
22:22:47 | * | chopzwei quit (Ping timeout: 250 seconds) |
22:26:39 | * | yglukhov[i] quit (Read error: Connection reset by peer) |
22:27:16 | * | yglukhov[i] joined #nim |
22:31:47 | * | yglukhov[i] quit (Remote host closed the connection) |
22:32:20 | * | yglukhov[i] joined #nim |
22:36:57 | * | yglukhov[i] quit (Ping timeout: 264 seconds) |
22:47:51 | * | brainproxy quit (Ping timeout: 240 seconds) |
22:50:32 | * | natrys quit (Quit: natrys) |
22:52:34 | * | sz0 joined #nim |
22:55:02 | * | chopzwei joined #nim |
22:55:05 | * | brainproxy joined #nim |
22:59:54 | * | brainproxy quit (Ping timeout: 256 seconds) |
23:00:14 | * | btbytes quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:01:16 | * | btbytes joined #nim |
23:07:31 | * | fjvallarino quit (Remote host closed the connection) |
23:07:58 | * | fjvallarino joined #nim |
23:10:13 | * | riidom_ joined #nim |
23:10:21 | * | riidom quit (Ping timeout: 240 seconds) |
23:12:27 | * | fjvallarino quit (Ping timeout: 240 seconds) |
23:14:50 | * | fjvallarino joined #nim |
23:20:43 | * | dddddd quit (Read error: Connection reset by peer) |
23:29:10 | * | brainproxy joined #nim |
23:29:57 | * | btbytes quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:30:26 | * | btbytes joined #nim |
23:30:47 | * | btbytes quit (Client Quit) |
23:31:12 | * | btbytes joined #nim |
23:31:35 | * | btbytes quit (Client Quit) |
23:32:10 | * | btbytes joined #nim |
23:32:23 | * | btbytes quit (Client Quit) |
23:32:59 | * | btbytes joined #nim |
23:33:37 | * | Jesin quit (Quit: Leaving) |
23:38:09 | * | brainproxy quit (Ping timeout: 248 seconds) |
23:50:49 | * | ftsf joined #nim |
23:52:22 | * | fjvallarino quit (Remote host closed the connection) |
23:52:41 | * | btbytes quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:52:51 | * | fjvallarino joined #nim |
23:53:21 | * | data-man quit (Quit: Konversation terminated!) |
23:56:41 | * | Lord_Nightmare quit (Ping timeout: 276 seconds) |
23:56:57 | * | fjvallarino quit (Ping timeout: 240 seconds) |
23:59:38 | * | Lord_Nightmare joined #nim |