<< 26-06-2018 >>

00:01:22Araqc.config
00:02:17Araqseriously. it's super obvious, it's in every second line or something.
00:02:51FromGitter<ephja> oh so do have access to a context parameter. it's only an issue when there isn't one
00:03:41krux02Araq: well anyway I already made a pull request that made the cofig parameter optional
00:04:03*jhorwitz_ joined #nim
00:04:14krux02btw, that makes the documentation correct again that explanis the debug proc in the first place
00:04:42Araqok
00:05:51krux02I 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:43FromGitter<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:39shashlickdoesn't look like - it is a wrapper of libui which itself isn't documented
03:39:13shashlickthere are examples in the nim-lang/ui repo as well as in the andlabs/libui repo
03:39:29shashlickand 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:29FromDiscord<Legend2> Hi, anyone able to help me out with socket ssl stuff?
08:12:59FromDiscord<Legend2> Https://forum.nim-lang.org/t/3980
08:12:59FromDiscord<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:26Araqlegend2: I replied
08:50:13AraqI 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:17FromDiscord<Legend2> Thanks!
09:20:36FromDiscord<Legend2> Is it possible to override the nim standard library's net module?
09:21:20*bleakbriar left #nim (#nim)
09:24:24FromDiscord<Legend2> I dont think fork is the problem, my problem is trying to close the server socket
09:27:01dom96Why 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:25FromDiscord<Legend2> My because i want to lower privileges for the child process while maintaining the root privileges for the parent process
09:41:35FromDiscord<Legend2> Using threads wouldnt be able to accomplish that
09:43:34AraqLegend2: you can use a "lib override" to patch the stdlib but I forgot the syntax :P
09:44:06FromGitter<mratsim> dynlibOverride?
09:44:24Araqif you don't install it in /usr/, you can easily modify the Nim stdlib to play around
09:45:25Araqhttps://nim-lang.org/docs/nimscript.html#patchFile,string,string,string
10:07:30FromDiscord<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:32FromGitter<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:57FromGitter<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:30def-@niv GC_fullCollect sounds good
11:26:42FromGitter<niv> i tried that, it doesn't actually collect anything.
11:27:02def-Something still on the stack pointing to it?
11:27:05def-https://github.com/nim-lang/Nim/issues/6382
11:27:37FromGitter<niv> not really. also wouldn't it then not list under getFreeMem() but instead occupied?
11:33:58def-Then I don't know what the issue is
11:37:10FromGitter<niv> neither do i.
11:37:33shashlickGC doesn't immediately release memory cause it could be used for something else
11:37:47shashlickI ran into a similar issue a while ago
11:37:49FromGitter<niv> i am aware. but i know it won't be, so i want it back.
11:38:31FromGitter<niv> also, unrelatedly, i think there's a memleak in the json lib somewhere .. sigh
11:41:01shashlickhttps://github.com/nim-lang/Nim/issues/6031
11:41:39shashlickI worked around it initially by using malloc free myself
11:41:56*fjvallarino joined #nim
11:42:11FromGitter<niv> removing the async pragma cuts occupied memory in half after a run. hmm.
11:43:53Araqniv: there are no leaks in json.nim
11:44:17FromGitter<niv> yeah, i realise it's a pure lib. im just confused.
11:51:40Araqshashlick, the better runtime will fix this :-)
11:51:50Araqcoming real soon now (TM)
11:51:57Araqas that's what I'm working now.
11:53:41FromGitter<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:48dom96Each call to sleepAsync allocates a new Future[void]
11:55:52dom96maybe these aren't being deallocated
11:55:57FromGitter<kindlychung> Has anyone used arraymancer in production? Looks pretty nice.
11:56:03dom96There is unfortunately a memory leak hiding in there somewhere
11:56:16FromGitter<niv> and remove them, i mean
11:56:42FromGitter<niv> so it's sleepAsync specifically that's leaky, or asyncdispatch?
11:56:57Yardanico@niv can you try with --gc:v2 ?
11:57:12FromGitter<niv> will do
11:57:26dom96Nim, the gc, or asyncdispatch
11:58:23dom96I wasn't able to reproduce it in a small test case yet
11:58:45dom96(if you can then please share)
11:59:50FromGitter<niv> i dont know. feels like im fighting several issues here
12:02:42FromGitter<niv> @dom96 https://gist.github.com/niv/af87918cad1baf0d872dd93c976c1ae7
12:03:22FromGitter<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:10FromGitter<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:59FromGitter<niv> wait, the GC doesn't return memory to the OS at all?
12:19:05Yardanicoshould it? AFAIK OS will take "free" memory from the app when the osneeds it
12:19:46FromGitter<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:49Araqkindlychung, 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:59Araq:-)
12:25:07FromGitter<niv> i'm trying to use it in production as well :p
12:25:21*jhorwitz_ quit (Ping timeout: 256 seconds)
12:25:36Araqoh interesting :D
12:28:48FromGitter<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:15FromGitter<kaushalmodi> I do have the implementation further down in the same file
12:29:35Araqyeah... what about it? looks fine
12:30:57*floppydh quit (Read error: Connection reset by peer)
12:31:08FromGitter<kaushalmodi> ah realised my mistake
12:31:30*find0x90 joined #nim
12:31:31FromGitter<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:34dom96Pretty the GC free's memory
13:24:40dom96*Pretty sure
13:33:56*krux02 joined #nim
13:35:30FromGitter<krux02> @kaushalmodi I see you work on emacs integration. Will emacs mode finally become usable?
13:36:12FromGitter<krux02> would be very nice.
13:39:00*endragor quit (Remote host closed the connection)
13:53:58FromGitter<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:45FromGitter<kindlychung> Looks interesting. 😄
14:01:07*endragor quit (Ping timeout: 256 seconds)
14:19:11*xkapastel joined #nim
14:19:43FromGitter<mratsim> also I’ve seen visits with referrer from an internal Rakuten bug tracker
14:20:37FromGitter<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:40pqflx3[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:25FromGitter<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:46krux02kaushalmodi: I use nim-mode. But sadly I had to disable almost everything to make it feasible to work with it.
16:23:01FromGitter<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:33krux02everything left of nim-mode that I actually use is syntax highlighting and fill-region for comments
16:23:58FromGitter<kaushalmodi> Comment sontification is a bit broken in nim-mode. But other-wise auto-indentation, and other syntax highlighting works fine
16:24:01krux02sorry I mean fill-paragraph, not fill-region
16:24:19*data-man joined #nim
16:24:46FromGitter<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:51krux02well 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:04krux02I don't like auto breaking my code
16:25:11krux02so auto indentation had to go
16:25:29FromGitter<kaushalmodi> krux02: I don't auto-indent the whole buffer
16:25:39*fjvallarino joined #nim
16:25:47krux02Vindaar: yes lot's of freezes
16:26:03krux02even with almost everything disabled it is not a fluid experience
16:26:11FromGitter<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:14krux02I don't know what is still causing the issue
16:26:44krux02Vindaar: first of all, auto indentation doesn't work on languages with semantic indentation
16:26:48FromGitter<kaushalmodi> krux02: Then the fontification is to blame
16:27:07krux02it can only work when indentation can be infered from the braces brackets
16:27:20krux02so I don't really get the use case of auto indentation in Nim
16:27:29FromGitter<ephja> @Vindaar well if it's good enough for Rasmus Lerdorf
16:27:31krux02but it go (gofmt) it works fine
16:27:44krux02but there it is an external tool, not part of any editor
16:28:05krux02kauskalmodi: is there anything I can do about it?
16:28:13FromGitter<Vindaar> @ephja hm?
16:28:14krux02I already use a pixel font
16:29:06FromGitter<kaushalmodi> krux02: About fontification, I am not good at debugging that.
16:29:45*nsf quit (Quit: WeeChat 2.1)
16:30:42FromGitter<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:56krux02kaushalmodi: 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:30krux02I tried using gdb from emacs
16:33:35krux02it's horrible
16:33:48FromGitter<kaushalmodi> The report is generally readable... you need to expand the plus signs on the left
16:34:36krux02is it like in gdb, that when I expand with the + sign, nothing happens, only when I additionally press g to refresh?
16:35:13FromGitter<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:31krux02but if anybody cares, today I found out about this gdb frontend here: https://github.com/cs01/gdbgui/
16:36:37krux02kaushalmodi: which screenshot?
16:37:32FromGitter<kaushalmodi> You might need to open this in Gitter
16:39:58FromGitter<ephja> oh so the IRC bridge doesn't even forward the links
16:41:03FromGitter<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:27FromGitter<krux02> (https://files.gitter.im/nim-lang/Nim/uHCp/Screenshot_2018-06-26_18-29-42.png)
16:42:56Yardanico@krux02 do you use gdb script for nim for pretty-printing?
16:43:00*metasyn joined #nim
16:43:31FromGitter<krux02> Yardanico: I definitively did that in the past, but that screenshot is without
16:44:07FromGitter<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:31FromGitter<krux02> (https://files.gitter.im/nim-lang/Nim/xlrf/image.png)
16:47:44*btbytes joined #nim
16:48:05FromGitter<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:55FromGitter<kaushalmodi> @ZarsBranchkin what is nimacs?
16:49:33FromGitter<krux02> (https://files.gitter.im/nim-lang/Nim/rzxM/main_0012.png)
16:50:13FromGitter<krux02> even the shader is written in nim
16:52:19FromGitter<kaushalmodi> @ZarsBranchkin Please ping me if/when you make nimacs public
16:53:52Yardanicowhat
16:54:11Yardanicolast two messages in Gitter by @ephja and @ZarsBranchkin didn't make it to the IRC
16:55:48FromGitter<kaushalmodi> I have a question about openArray and unsafeAddr:
16:56:29FromGitter<kaushalmodi> Above is the only way I could make it work..
16:57:15FromGitter<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:13FromGitter<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:51FromGitter<krux02> @kaushalmodi that is the inteded way of using unsafeAddr
17:00:24FromGitter<krux02> don't worry about it, if the only situation to call unsafeAddr is in wrappers, then you are fine
17:01:03FromGitter<ephja> can't do much about it in that case other than encapsulating the unsafe parts
17:01:42FromGitter<kaushalmodi> The thing is I don't quite get unsafe vs safe
17:02:15FromGitter<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:06FromGitter<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:30FromGitter<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:15FromGitter<Quelklef> which I find cleaner than ⏎ ⏎ ```var x = initSomething() ⏎ x.mutate1() ⏎ x.mutate2()``` [https://gitter.im/nim-lang/Nim?at=5b32742baeb8fa0c07443240]
17:14:30FromGitter<ephja> try it with () instead of {} and without "return"
17:15:58FromGitter<Quelklef> gnarly, that worked
17:16:46*captainbland_ joined #nim
17:17:28FromGitter<Quelklef> thank you tho
17:18:36FromGitter<zetashift> can't you just chain em like ```nim var x = initSomething().mutate1().mutate2() ```
17:19:45Yardanicowhat's wrong with FromGitter today?
17:19:49FromGitter<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:54Yardanicolast 3 messages from Gitter weren't bridged again
17:19:54*captainbland quit (Ping timeout: 256 seconds)
17:20:05oprypinYardanico, lol gitter API is sending them like that, i dont even know...
17:20:29Yardanicooprypin, ehh, it seems Gitter has a very bad API stability :(
17:20:34FromGitter<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:33FromGitter<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:22FromGitter<Quelklef> hmmmm
17:38:41*dorelix quit (Ping timeout: 248 seconds)
17:38:57FromGitter<Quelklef> I'm getting "undeclared field: 'sons'" on a value `right` which is of `NimNode`
17:39:31FromGitter<Quelklef> so it should know that `right.kind == nnkCall` and therefore it has `.sons`, right?
17:45:19*dorelix joined #nim
17:47:53FromGitter<Quelklef> Ah, `NimNodeObj.sons` is not exported in `macros`, I think. Odd.
17:55:57Araqnot odd, the .sons in the Nim compiler is a relict
17:56:15Araqand not every old mistake got copied into the official macro system :P
18:05:00FromGitter<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:27Yardanicolol
18:07:11FromGitter<ephja> is `[]` gender neutral?
18:09:31FromGitter<Quelklef> Wait, @Araq if .sons isn't how the AST is formed, how is it?
18:10:01Araqvarriount: 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:50AraqQuelkef: via .add and []= ?
18:15:06FromGitter<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:40Araqsure
18:34:57FromGitter<Quelklef> Hm, I think I misunderstood an earlier message of yours, then
18:37:24AraqI 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:37Araqmaybe that is what is in your mind.
18:38:01Araqbut 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:11FromGitter<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:50FromGitter<Varriount> @Quelklef I found http://recurial.com/wp-content/uploads/2017/06/ecoop_submitted_5_17.pdf
18:48:24FromGitter<GULPF> @Araq any chance that #7800 can be merged soon? I can rebase it if you want
18:49:04FromGitter<Quelklef> It's just a lot
18:50:04FromGitter<Quelklef> Oh, I think I get the idea at least from page 2's diagram
18:50:43FromGitter<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:11FromGitter<ephja> no but it's called from a C proc
18:58:04FromGitter<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:16FromGitter<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:11AraqGULPF: Ok, rebase please
19:22:17*Jesin quit (Quit: Leaving)
19:22:42FromGitter<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:46Araqephja: 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:39FromGitter<Quelklef> huh, coming from Python, Nim's `varargs` did not work like I expected
19:55:28FromGitter<Quelklef> it's much simpler than I thought it'd be
19:58:55*Jesin joined #nim
20:04:02dom96Love 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:31federico3dom96: you can use the armel build from https://packages.debian.org/sid/nim
20:14:00cryptocat1094Is there a particular reason it could not be backported or it just plain hasn't been?
20:14:26FromGitter<krux02> @Quelklef I think the varargs in Nim are something that needs to be worked on.
20:14:27federico30.18.0 is in Debian unstable and testing
20:14:41dom96looks like armhf is available too
20:14:53dom96but I wonder what the best way to install this on Raspbian is
20:14:57*Vladar quit (Quit: Leaving)
20:15:08FromGitter<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:17federico3and raspberry pi-s are supported natively in Debian (I'm using a freedombox build on a raspi 1 and Nim is there)
20:17:22dom96federico3: only armel though, right?
20:17:28FromGitter<Quelklef> @krux02 What, of the array? Isn't any implementation going to have some overheard?
20:17:47federico3dom96: both armel and armhf if that's what you are asking
20:17:49dom96federico3: what's the best way for me to install this package on Raspbian, is there even a way?
20:18:08dom96huh, why does Raspbian exist then?
20:18:39federico3dom96: is it an armel or armhf host?
20:19:37dom96no idea
20:19:58*captainbland quit (Ping timeout: 256 seconds)
20:20:43FromGitter<dom96> Hrm.
20:20:44federico3you can just grab the .deb from https://packages.debian.org/buster/armel/nim/download
20:21:33dom96oprypin: Either this is just random chance, or specifically messages are dropped when the same person sends multiple lines
20:21:56federico3you 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:56FromGitter<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:10cryptocat1094?
20:23:42cryptocat1094Raspbian exists because Debian doesn't want to distribute the mandatorily-blobbed image Raspberry Pi expects, iirc.
20:24:14dom96nim depends on libc6 (>= 2.27); however: Version of libc6:armhf on system is 2.24-11+deb9u3.
20:24:16dom96A shame
20:24:16federico3actually blobs can be shipped as part of non-free
20:24:51federico3cryptocat1094: and FreedomBox ships Debian images for raspberry pi
20:25:16cryptocat1094Huh, looks like I was wrong: https://www.raspbian.org/RaspbianFAQ#What_is_Raspbian.3F
20:27:04cryptocat1094gt; nim depends on libc6 (>= 2.27)
20:27:12cryptocat1094So 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:42federico3no, that's the dependency requirement in the testing repo - because it was built against that version of libc6
20:28:09cryptocat1094Alright.
20:29:16federico3e.g. the one in backports requires libc6 >= 2.15 https://packages.debian.org/stretch-backports/nim
20:30:11cryptocat1094So it has been backported. Nice.
20:33:11dom96glibc is always the problem
20:33:12*Trustable quit (Remote host closed the connection)
20:34:05federico3uhm you have 2.24 installed
20:35:00FromGitter<kaushalmodi> dom96: "glibc is always.." heh :)
20:35:18dom96It's not like I can just install a newer libc, can i?
20:35:49FromGitter<kaushalmodi> I tried installing newer libc on my machine, spent hours, failed
20:36:21federico3dom96: actually you can upgrade it if there's a Raspbian testing repo (and therefore a hundred other packages that depend on it)
20:36:38FromGitter<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:21FromGitter<kaushalmodi> I can manually do `[value[0], value[1]]`.. but is there a better way.. an "un-ptr" proc?
20:39:02dom96So Raspbian was born because the first RPi uses ARMv6? Seems like for the newer RPi's it's no longer necessary
20:39:55FromGitter<ephja> @kaushalmodi you can dereference with foo[]
20:40:33FromGitter<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:18Yardanico@kaushalmodi a lot of nim examples on rosetta code are outdated
20:43:10FromGitter<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:12cryptocat1094dom96: Probably, yeah.
20:44:04cryptocat1094The old ones might stick around for a while though, raspis aren't too finicky.
20:50:50*cryptocat1094 quit (Quit: gtg)
20:52:36FromGitter<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:04FromGitter<kayabaNerve> To be specific, it uses the ARM11 which is equivalent to ARMv6
20:54:14dom96It's not just the clock speed
20:54:20dom96The newer ones also have more cores
20:54:37FromGitter<kayabaNerve> The RPi 0 has the same CPU as the original
20:55:15FromGitter<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:45FromGitter<kayabaNerve> https://imgur.com/a/FPclEHb
20:57:21dom96Oh, you literally mean RPi Zero
20:57:32FromGitter<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:34FromGitter<Quelklef> @krux02 Why's array allocation particularly bad? Seems like it'd be fairly low
21:11:36FromGitter<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:19Araqsystem.staticExec
21:29:21*Ven`` quit (Quit: q+)
21:31:16FromGitter<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:50Araqnah :-)
21:35:14FromGitter<dandevelo> shouldn't it take the current directory from the source file?
21:36:11*user1101 joined #nim
21:36:21FromGitter<dandevelo> just like staticRead?
21:37:03Araqit does do that
21:37:12Araqthere was a bugfix about it
21:37:41*user1101 quit (Client Quit)
21:37:43Araqmaybe I misremember.
21:37:57*user1101 joined #nim
21:37:58*btbytes quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:37:59dom96staticExec("cd foobar && blah") # maybe?
21:38:18Araqdon't do that.
21:38:47FromGitter<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:51Araqwe don't use a shell to run these commands
21:41:09FromGitter<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:39FromGitter<dandevelo> Looks like the bug is still there
21:46:13Araqproc opGorge*(cmd, input, cache: string, info: TLineInfo; conf: ConfigRef): (string, int) =
21:46:14Araq let workingDir = parentDir(toFullPath(conf, info))
21:46:16Araq ...
21:47:27Araqthe compiler's source code disagrees with you.
21:47:47FromGitter<dandevelo> the procmon log disagrees with you :)
21:58:41*xkapastel quit (Quit: Connection closed for inactivity)
22:00:51FromGitter<dandevelo> @Araq: a sample of the log: https://i.imgur.com/27dTuXI.png
22:01:31FromGitter<dandevelo> this is main.nim : import src/statictest
22:02:04FromGitter<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:40FromGitter<dandevelo> and statictest.nim is in X:\nimtest\src
22:03:11*Araq shrugs.
22:03:19Araqso fix it, I showed you where.
22:03:59AraqI don't know what "run something" means
22:04:20FromGitter<dandevelo> It is a bogus command in order to better see the effects in the log
22:05:00FromGitter<dandevelo> You can see that the OS looks for run.exe as part of the "run something" command
22:06:13FromGitter<dandevelo> after that it will try the main.nim location: x:\nimtest\run.exe
22:06:19Araqbogus commands don't respect the cwd
22:06:47Araqthere are plenty of subleties involved here
22:09:31FromGitter<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:18Araqand why would I look at the procmon log? I have better things to do.
22:12:08Araqjust fix it and create a PR.
22:12:26Araqor at least report it properly.
22:12:35FromGitter<dandevelo> Ok, I will look into how it works and see what can be done about it
22:12:59Araqwith a test program that should work but doesn't, not with vague instructions
22:13:16FromGitter<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