<< 24-10-2018 >>

00:11:38FromGitter<yyyc514> any easy way to speed up or do cached/increment builds? I know it’s already doing SOME of that… any way i can get more visibility into the process?
00:12:37FromGitter<kayabaNerve> It checks if the file was altered; if not, it doesn't recompile it; it always links it ofc. The files are stored in the `nimcache`.
00:13:48FromGitter<yyyc514> yeah i don’t think the linking is taking any time :)
00:13:51FromGitter<kayabaNerve> If you don't specify the `nimcache`, it's now under `~/.cache/nim` IIRC (on Linux and Mac)
00:13:57FromGitter<kayabaNerve> You wanted insight :P
00:14:16FromGitter<kayabaNerve> You can specify `-f` to force rebuild
00:26:22FromGitter<yyyc514> i don’t think it’s cahcing the C generation part
00:27:19FromGitter<yyyc514> hmmm, ok it’s not rebuilding the C files randomly but it’s still doing a lot of work
00:29:51FromDiscord<smitop> i'm trying to use opengl with nim. i'm trying to use a uniform to set the color based on the time
00:29:51FromDiscord<smitop> but i get https://pastebin.com/24CWP5nW when i call ``glUniform4f``
00:57:49*zachk quit (Quit: Leaving)
01:06:25FromDiscord<treeform> I do a ton of openGL with nim
01:06:27FromDiscord<treeform> let me see
01:06:52FromDiscord<treeform> what is the value of "vertexColorLocation"
01:06:58FromDiscord<treeform> its probably -1 or other invalid value
01:07:21FromDiscord<treeform> Are you sure "ourColor" maybe you wanted "outColor" ?
01:08:17FromDiscord<treeform> @smitop
01:09:31FromDiscord<smitop> vertexColorLocation is 0
01:09:48FromDiscord<smitop> ou*r*Color is correct
01:10:47*vlad1777d_ quit (Ping timeout: 240 seconds)
01:16:07*abm quit (Ping timeout: 240 seconds)
01:17:32*joibll quit (Quit: Page closed)
01:26:55*platoff quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:54:02FromGitter<yyyc514> hmmm
02:05:01*banc quit (Quit: ZNC - http://znc.in)
02:22:25*banc joined #nim
02:29:49*bozaloshtsh quit (Quit: ZNC 1.7.0 - https://znc.in)
02:32:19*bozaloshtsh joined #nim
02:32:19*bozaloshtsh quit (Changing host)
02:32:20*bozaloshtsh joined #nim
02:33:32*endragor joined #nim
02:58:38FromGitter<citycide> is it possible to put compile-time constraints on FFI imports? like an arg is a `cstring` but must be one of 4 specific strings?
02:59:14FromGitter<citycide> or do I have to make a wrapper of some kind to do it
03:05:15FromGitter<citycide> similar question for `{.varargs.}` on an FFI import, does it always allow everything or can you constrain it to a specific type? `{.varargs: int.}` would be cool
03:09:52*smt quit (Read error: Connection reset by peer)
03:11:05leorizecitycide: I think you could just add a `varargs` param at the end yourself
03:11:29leorizethe `varargs` pragma is just for the C-style untyped `varargs` I think
03:12:35FromGitter<citycide> leorize: I couldn't get that to pass anything but an array in the generated code
03:12:43FromGitter<citycide> (javascript)
03:27:58*smt joined #nim
03:29:47*chemist69_ quit (Ping timeout: 250 seconds)
03:31:50*chemist69 joined #nim
03:38:24*dddddd quit (Remote host closed the connection)
03:59:39*smt quit (Read error: Connection reset by peer)
04:11:13*kapil____ joined #nim
04:16:08FromGitter<gogolxdong> How to make this right? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bcff2081e23486b930ac8d5]
04:17:13*narimiran joined #nim
04:19:32FromGitter<gogolxdong> and basically how to read symbols of a dynlib?
04:27:06FromGitter<gogolxdong> Somebody uses imm32.dll in Nim? I found sdl2 uses .
04:30:42FromGitter<gogolxdong> chrome uses imm32.dll directly.
04:49:57*stefanos82 joined #nim
05:06:48FromGitter<vegai> if I wanted to compete with this https://github.com/cart/amethyst-bunnymark, is there any library you would suggest?
05:07:51FromGitter<vegai> it’s a data-driven game engine
05:11:05FromGitter<vegai> mm, perhaps that’s a silly question anyway
05:15:22FromGitter<vegai> perhaps an implementation on godotnim would be interesting
05:20:25leorizegogolxdong: on linux you could use `nm -D`, I don't know about Windows however
05:20:54leorizebut usually you'd create functions based on their header files, not the symbols themselves
05:26:28*leorize quit (Ping timeout: 264 seconds)
05:31:40FromGitter<gogolxdong> there is loadLib() in dynlib module, can be used for symbols validation.
05:37:59*nsf joined #nim
05:40:19*darithorn quit ()
05:41:17FromGitter<vegai> by the way, how long has nim had async support?
05:41:45FromGitter<vegai> in its current form, I mean. Async/await.
05:51:19FromDiscord<2vg> async/await style supported
05:52:16*leorize joined #nim
05:53:19*Vladar joined #nim
06:00:33*narimiran quit (Quit: Konversation terminated!)
06:03:14*xet7 quit (Remote host closed the connection)
06:04:53*xet7 joined #nim
06:06:39*xet7 quit (Remote host closed the connection)
06:07:12*xet7 joined #nim
06:32:22*d10n quit (Quit: why all the #hashtags #lol #hackers #overheard)
06:32:36*d10n joined #nim
06:32:36*d10n quit (Changing host)
06:32:36*d10n joined #nim
06:33:16*xet7 quit (Read error: Connection reset by peer)
06:44:46*xet7 joined #nim
06:45:55*Vladar quit (Remote host closed the connection)
07:00:12*mech422__ joined #nim
07:02:01*xet7 quit (Remote host closed the connection)
07:03:55*mech422_ quit (Ping timeout: 268 seconds)
07:04:00*PMunch joined #nim
07:06:47*sagax_ joined #nim
07:09:52*xet7 joined #nim
07:30:41*shadowbane quit (Remote host closed the connection)
07:31:09*shadowbane joined #nim
07:31:17*jjido joined #nim
07:39:41*gmpreussner quit (Ping timeout: 268 seconds)
07:39:57*jjido quit (Ping timeout: 252 seconds)
07:46:10*tiorock joined #nim
07:46:10*tiorock quit (Changing host)
07:46:10*tiorock joined #nim
07:46:10*rockcavera is now known as Guest48321
07:46:10*Guest48321 quit (Killed (tolkien.freenode.net (Nickname regained by services)))
07:46:11*tiorock is now known as rockcavera
07:46:18*gmpreussner joined #nim
07:47:17*jjido joined #nim
07:50:10FromGitter<narimiran> good morning, anybody here?
07:51:27*jjido quit (Ping timeout: 240 seconds)
07:54:15FromGitter<alehander42> y
07:56:07FromGitter<narimiran> just the right man to ask about macros :)
07:56:57FromGitter<narimiran> can you tell me why line 8 doesn't work? http://ix.io/1pUi/nim (so we must introduce `b0` and `b1`?
07:59:48snowolfQuick and not particularly brilliant question (well hopefully): any straightforward way of setting up a memoized procedure that might be called from within a spawn'ed procedure?
08:00:57snowolf(I get a Error: 'spawn' takes a GC safe call expression when I just try w/ either the macro or the memoize function from the 'memo' package)
08:00:57FromGitter<alehander42> @narimiran oh yeah this doesn't work
08:00:59FromGitter<alehander42> not sure why
08:01:16FromGitter<alehander42> but I just always assign <node>[<index>]
08:01:35FromGitter<alehander42> like you these days, maybe there is another workaround
08:01:38*abm joined #nim
08:04:15FromGitter<narimiran> it's a gotcha that took me quite long to "debug"
08:04:56Araqsnowolf: use a .thread variable
08:06:07Araqnarimiarn: news! quoting sucks :-)
08:07:47FromGitter<narimiran> Araq: i deny to believe it! i just recently discovered quoting and it is like magic!
08:08:00FromGitter<narimiran> but i guess the magic wears off after some time....
08:08:22*krux02 joined #nim
08:08:52FromGitter<narimiran> i'm impressed that i can do quote onliner (plus some extra unexpected work here) which replaces a whole screen of `dumpAstGen`-generated code
08:18:36PMunchnarimiran, quote has some gotchas but I agree that it's great in general!
08:24:37FromGitter<mratsim> without quoting my macros would be much bigger
08:26:09PMunchIt's still a shame that my PR to allow result in quote didn't get merged though
08:26:16PMunchI think that's one of the more common gotchas
08:28:22FromGitter<mratsim> unquoted result (from proc) is a gotcha, but why wasn’t it accepted?
08:29:13*chemist69 quit (Ping timeout: 250 seconds)
08:30:03*chemist69 joined #nim
08:31:05PMunchhttps://github.com/nim-lang/Nim/pull/7343, zah didn't like how it worked
08:32:18FromGitter<mratsim> yeah, I agree with him, you are fixing the symptoms not the problem
08:53:30*dom96_w joined #nim
08:54:09*dom96_w quit (Client Quit)
08:55:05*dom96_w joined #nim
08:58:01PMunchSure, but it's a fix, and it worked. There are no other symptoms of this problem with regards to quote, and Araq said it would be a PITA to fix properly
08:59:05PMunchBetter to have a working system with a tiny workaround than a broken system without any fix in sight.
09:02:46*leorize quit (Ping timeout: 272 seconds)
09:25:20AraqPMunch, I agree and will merge your PR
09:28:59PMunchReally? Neat, then I can remove the exact same work-around that I've manually applied everywhere I needed the result variable in a quote :)
10:21:20FromGitter<mratsim> ugh, that’s how C++ got build :P
10:21:36FromGitter<mratsim> “small patches” becomes permanent fixes
10:25:54*anamok joined #nim
10:25:56anamokhi
10:26:43anamokWhen working with a hash table, should I use Table or TableRef? Say I don't want to make a copy of it, I just want to fill it and use it? Should I prefer one of them?
10:27:15anamok...fill it and use it. (dot)
10:27:52*Vladar joined #nim
10:28:47anamokAs I understood, Table is created on the stack, while TableRef is on the heap. If the table is too big, maybe TableRef would be a better choice?
10:34:52FromGitter<mratsim> well, actually both are created on the heap but one has value semantics while the other has ref semantics
10:35:34FromGitter<mratsim> so the only question you need to ask your self is how do I want them to behave on assignment
10:36:45anamokThanks. I thought everything that used value semantics was on the stack.
10:37:41FromGitter<mratsim> strings and seq have value semantics but are on the heap
10:38:34FromGitter<mratsim> unfortunately since assignment overloading is broken there is no way to implement efficient value semantics for custom ref types at the moment.
10:42:28anamokIf I want to pass a table to a proc, I think a TableRef would be cheaper since only the reference would be copied, while in the case of a Table the whole table is copied. Is that right?
10:45:11*platoff joined #nim
10:58:26FromGitter<mratsim> no, Nim wil do the right thing™
10:58:52Araqit is not broken
10:59:01Araq'=' for objects works and everything else shouldn't
10:59:07FromGitter<mratsim> stack objects that are too big will be passed by hidden ref
11:00:30*platoff quit (Read error: Connection reset by peer)
11:00:49FromGitter<mratsim> @Araq, well that’s what you said: https://github.com/nim-lang/Nim/issues/6348#issuecomment-334920427
11:02:49AraqI said that one year ago and afterwards I closed it....
11:02:54Araqseriously...
11:13:57FromGitter<yyyc514> where did fsmonitor go?
11:15:52FromGitter<yyyc514> guess it’s old?
11:16:46*dom96_w quit (Changing host)
11:16:46*dom96_w joined #nim
11:16:56dom96_wIt was never cross-platform
11:20:27dom96_wmratsim: Table isn't stored on the heap, its contents might be, but it's not.
11:21:46FromGitter<mratsim> I’m pretty sure @anamok was talking about the content
11:24:44anamokIf I create a simple table, say {1: "one", 2: "two"} and I make it a Table and a TableRef, then what's the difference? Where are they stored? I was curious to know this.
11:26:07dom96_wFrankly, I can't really see a reason to use TableRef.
11:26:34dom96_wSo I'm curious why we even have it now
11:29:09FromGitter<yyyc514> ok anyone have any advice on file watching on OS X?
11:29:15FromGitter<yyyc514> fs-watch seems to compile but crash :
11:32:58FromGitter<alehander42> tup http://gittup.org/tup/ is amazing on linux
11:33:13FromGitter<alehander42> it should support osx, but I haven't used it there
11:35:18FromGitter<yyyc514> not a nim thing?
11:35:33FromGitter<yyyc514> was looking for something in the nim ecosystem to seamless pair with my framework for hot reloading
11:36:31FromGitter<alehander42> it's hm, stack-agnostic
11:36:47FromGitter<alehander42> i use it for a big nim project
11:37:10FromGitter<alehander42> what do you use for hot reloading?
11:37:20FromGitter<yyyc514> nothing yet :) just built it each time
11:37:33FromGitter<yyyc514> could look into dll stuff but not sure that’d help much
11:38:19FromGitter<yyyc514> i tried facebooks thing but it was too complex
11:38:56FromGitter<alehander42> work on reloading is underway ( https://github.com/nim-lang/Nim/issues/8927 )
11:39:55FromGitter<yyyc514> yes i heard
11:40:44FromGitter<yyyc514> no idea what i’m doing wrong with fs-watch
11:41:01FromGitter<yyyc514> SIGSEGV: Illegal storage access. (Attempt to read from nil?)
11:41:38*jjido joined #nim
11:42:04*ajhidd joined #nim
11:42:13planetis[m]so does nested objects with destructors work now? or would be better to fill a bug report?
11:44:45ajhiddHi o/ Just a quick question: can I do something like `let next = system.inc[int]`?
11:46:43anamokyyyc514: it happens to me when I switch from debug mode to release mode. In release mode bound checks are off.
11:47:02planetis[m]system.inc doesn't have a generic parameter
11:47:37planetis[m]and this syntax doesn't compile
11:48:08*ryuo quit (Quit: WeeChat 1.9.1)
11:48:18planetis[m]you need to write x.inc[:int]
11:49:57planetis[m]ajhidd: maybe you want to use a cast? then it: cast[int](x)
11:50:01FromGitter<yyyc514> anamok: nope i’m in debug mode
11:50:19ajhiddplanetis[m]: Actually what I want is the ability to assign a proc to a variable based on some condition
11:50:52ajhiddplanetis[m]: Something like `let next = if cond: inc else: dec`
11:51:02anamokGoing to lunch. Bye.
11:51:08ajhiddplanetis[m]: Wonder if it's possible in nim
11:51:10*anamok quit (Remote host closed the connection)
11:51:33planetis[m]yes it is never used this kind of logic though
11:51:56planetis[m]then you call it
11:52:13*smt joined #nim
11:52:16planetis[m]```let x = inc; next = x()```
11:52:25planetis[m]with the `()`
11:52:44FromGitter<yyyc514> well not impressed with my first c integration experience :)
11:52:47*jjido quit (Ping timeout: 240 seconds)
11:55:16FromGitter<yyyc514> x_Ih4hI0OoPxx88jhmtra0qw = Dl_277579_(handle_Jzj2vS0PJtCaXof8uG2JJw, nimToCStringConv(directory_to_watch_tyyj6lJv5LTKxoIgk88wqQ));
11:55:21FromGitter<yyyc514> broken cstring conversion?
11:55:27ajhiddplanetis[m]: thanks, I'll try this one
11:55:54FromGitter<yyyc514> it wants a string pointer, do i have to do anything special in nim to get that?
11:56:16FromGitter<yyyc514> the generated nim code is “cstring"
11:56:32FromGitter<yyyc514> the source is `const char * path`
11:58:05planetis[m]glad I could help
12:00:44FromGitter<yyyc514> ok cstring does not want a ref string
12:00:50*vlad1777d_ joined #nim
12:00:58planetis[m]wait a minute should I write a destructor for the object that encapsulates? How is this supposed to work?
12:01:21FromGitter<yyyc514> anyc hance this could be a nim isse?
12:01:30FromGitter<yyyc514> the examples are trivial, feel like i’m doing it righ
12:03:53FromGitter<alehander42> Araq, are imported deps subject to DCE
12:04:01planetis[m]also if I have a `lent Foo` parameter, can I copy it with an assignment?
12:04:19FromGitter<alehander42> e.g. if I import <lib> which I use only in function f, but I don't have a call to f in a compiled program, would <lib> be eliminat
12:05:41planetis[m]I have made a custom filestream and csv parser, hope to turn it into a macro
12:17:44FromGitter<alehander42> i am now convinced, orm-s might be overrated, but raw sql serialization/deserialization is absolute pita
12:19:06planetis[m]nevermind it seems it works now great!
12:20:08planetis[m]destructors are so cool, I wish conecpts worked
12:20:15planetis[m]*concepts
12:23:11FromGitter<alehander42> strange, the only orm lib for the last several years is ormin
12:23:43FromGitter<alehander42> the new type field macros might be useful for something like th
12:24:21dom96_wyyyc514: what
12:24:29dom96_w*what's facebook's thing?
12:28:45FromGitter<yyyc514> 1609 if (this->__end_ < this->__end_cap())
12:28:47FromGitter<yyyc514> ugh
12:28:51FromGitter<yyyc514> i dunno some file montior thingy
12:29:10FromGitter<yyyc514> sos maybe session-paths isn’t setup right?
12:29:32FromGitter<yyyc514> but i cann init_session
12:29:34FromGitter<yyyc514> i give up
12:31:38FromGitter<AchalaSB> What is the webassembly interpreter for Nim? To convert from JS to wasmi
12:32:05FromGitter<vegai> @yyyc514 damn, that’s cool! I saw that issue earlier, but I figured it’s one of those ideas that never will got worked on
12:32:26FromGitter<yyyc514> which idea?
12:32:46FromGitter<vegai> https://github.com/nim-lang/Nim/issues/8927 — hot code reloading & REPL
12:36:26*Vladar quit (Remote host closed the connection)
12:59:57shashlickYay https://nim-lang.github.io/Nim/nimc.html#cross-compilation-for-windows
13:02:01FromGitter<alehander42> nice
13:03:16FromGitter<zetashift> @endragor you there by any chance?
13:04:40*rockcavera quit (Ping timeout: 268 seconds)
13:05:06endragorzetashift: hi
13:05:56*ajhidd quit (Quit: Я уже ушел. Fui. (c))
13:08:38*endragor quit (Remote host closed the connection)
13:10:51FromGitter<zetashift> I'm having trouble with the autoload singleton in godot: https://github.com/pragmagic/godot-nim/issues/38, getting recursive dependency errors, what would be a nim way to set the current gamestate and player lives etc without introducing a 'Global' singleton?
13:11:08*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
13:21:56*vlad1777d_ quit (Ping timeout: 268 seconds)
13:25:28Araqalehander42, DCE doesn't care, what is not used is optimized out
13:31:37FromGitter<alehander42> yeah, it makes sense
13:31:39FromGitter<alehander42> ok
13:33:00*endragor joined #nim
13:38:55*craigger_ quit (Read error: Connection reset by peer)
13:39:18*poopBot joined #nim
13:39:30*craigger joined #nim
13:39:55poopBotPMunch, hmm newibe question, but for @r.defaultSize=(200,200); how to pass size cuz atm its complaining i am passing an tuple insted 2 cints
13:40:42PMunchWhat's the actual error message?
13:41:33poopBotPMunch, type mismatch: got <Window, tuple of (int, int)>
13:41:33poopBotbut expected one of:
13:41:33poopBotproc defaultSize=(window: Window; width: cint; height: cint)
13:41:33poopBotfirst type mismatch at position: 2
13:41:33poopBotrequired type: cint
13:41:33poopBotbut expression '(200, 200)' is of type: tuple of (int, int)
13:41:35poopBotexpression: defaultSize=(:tmp427037, (200, 200))
13:42:04PMunchUhm, that's a bug in the gtk3 module :P
13:42:12poopBotoh
13:42:35PMunchYou could try @r.`defaultSize=`(200, 200)
13:42:50poopBoti tryed like 200; 200; . ((200),(200)) and like 20 other ways xD
13:42:56poopBotwill try
13:43:40PMunchor @r.setDefaultSize(200, 200)
13:44:31poopBothmm
13:44:58PMunchThe defaultSize= procedure should've been defined in another way
13:45:02PMunchTo accept e.g. a tuple :P
13:45:20*craigger quit (Read error: Connection reset by peer)
13:46:02*craigger joined #nim
13:46:07poopBotsetDefaultSize worked
13:46:13PMunchYay :)
13:46:35PMunchHow do you like genui so far?
13:46:54FromGitter<kaushalmodi> PMunch: someone here had once mentioned a library about handling floating points; about the issue where parsetoml prints 0.030000000001 instead of 0.03.
13:47:10poopBot@r << is reference to root window, a am just diving in i spend 2 days trying to figure out what window types and stuff i have to use in GTK to achive what i want using Glade
13:47:31FromGitter<kaushalmodi> May be someone reading this knows what library I'm talking about and can point to it.
13:49:09PMunchpoopBot, not quite @r, or @result is the name of the widget created on that line
13:49:35poopBotyep just found it in docs
13:49:46poopBotctrl+F to the resque xD
13:50:21*leorize joined #nim
13:51:06PMunchCan be sued to store the widget in a variable for later as well
13:51:12FromGitter<kaushalmodi> Araq: I think you had shared a gist of your library called "decimal" or something like that? (Ref: my above message about 0.03)
13:51:29poopBotyep i think i saw that allready in docs somwere
13:51:38PMunchkaushalmodi, well TOML specifies that floating point numbers should be a double precision float IIRC
13:51:45PMunchWhich is what it is in parsetoml
13:54:31*narimiran joined #nim
13:55:21Araqhttps://gist.github.com/Araq/c71b764b94188337b24c6180b239229d here it is again
13:55:35Araqbut somebody turned this into Nimble package already iirc/I hope
13:56:15FromGitter<kaushalmodi> PMunch: why would that cause 3e-2 to be 0.03000000... 1?
13:56:32FromGitter<kaushalmodi> Maybe the code Araq shared above helps solve that?
14:01:27PMunchI guess 3e
14:01:39PMunchI guess 3e-2 should actually be 0.0299999999999999988897769753748434595763683319091796875
14:01:58PMunchAnd not 0.030[...]01
14:02:09*endragor quit (Remote host closed the connection)
14:02:32AraqSheldon Cooper's fun with floating points
14:06:38leorizeAraq: is it possible to skip certain patterns in `{.compile: '*.c'.}` statements?
14:06:55leorizeI'm updating the `ui` library to use the upstream libui directly
14:07:18leorizebut the source tree of libui have a bunch of `OLD_*.c` file that shouldn't be compiled
14:08:31*revere quit (Ping timeout: 250 seconds)
14:10:37poopBothmm, if i have ambigous call, how to specifie from what to run, atm am trying to laod img , it accepts resourse path or file path , if i pass just Image("somepath") it crys i tryed Image(filepath:"somepath") and some other vartions but dident figure out
14:11:08leorize`<module>.<procname>`
14:11:56Araqleorize, no it's not possible
14:12:30leorizeso I'm better off having `walkDir` clean up those file then?
14:12:43Araqyup
14:12:45leorizeactually I don't know if walkDir work in NimScript...
14:12:56dom96_wleorize: you can get nimble to skip the installation of those files
14:13:30dom96_wproblem with that is you won't be able to test the package without installing it though
14:13:46*PrimHelios_ joined #nim
14:13:57leorizewell, that might be a problem...
14:14:22poopBotPMunch, you here? want to add Image but it crys ambigous call
14:14:45shashlickdom96_w: https://github.com/dom96/choosenim/pull/97 tests passed, can you please merge
14:17:25poopBot Image(newImage(filename="/home/me/Downloads/121361-7-3.jpg"))
14:17:30poopBotthis too dosent work
14:19:10narimiranbtw, speaking of choosenim, now `koch` and `nimsuggest` are not created in ~/.nimble/bin, should those be added?
14:19:26narimiransorry, not `nimsuggest` but `nimpretty`
14:19:56PMunchpoopBot, sorry. I was in the bathroom. But yeah, specify which module the procedure comes from
14:20:55poopBotcan i get a spoon cuz i think i tryed evrything allready
14:24:43narimirannow i see `nimpretty` was already added, but we can't use it until choosenim's version is updated
14:25:11poopBotPMunch, https://hastebin.com/woxezulaju.cs
14:25:15*revere joined #nim
14:26:58PMunchpoopBot, well there is a slight problem
14:27:21poopBotis that good or bad :)
14:28:00PMunchAh
14:28:08*revere quit (Client Quit)
14:28:44*revere joined #nim
14:29:11PMunchWait, this doesn't work? newImage(filename = "/home/me/Downloads/121361-7-3.jpg")
14:29:52poopBotImage(newImage(filename="/home/me/Downloads/121361-7-3.jpg"))
14:30:02PMunchWhy do you have that outer Image?
14:30:35FromGitter<kaushalmodi> PMunch: I couldn't help but notice the strings "poopBot" and "bathroom" in the same message :P
14:30:35poopBotCuz Button Box and Overlay Window all start like that in higharcy tree
14:30:52PMunchOh right, within genui
14:30:59poopBotyep
14:31:34poopBotanyway i plan to store images in sqlite, so will need to read from variable or something
14:31:47PMunchHold on
14:32:47poopBotduno how will pxbuff be translated to nim, wile pulling blob from sqlite but guess will find out later on, anyway back to atm issue :) , status:holing on
14:32:53poopBot*holding
14:36:09PMunchpoopBot, this works: http://ix.io/1pVu/
14:37:19poopBothmm i think i try like that allreyd
14:37:23poopBotwill try again
14:37:37PMunchBasically Image get's converted to newImage, so the error that newImage was ambiguous basically meant that it couldn't find the right newImage to call. By specifying that we wanted the one that takes a filename it is able to grab the right one
14:38:39poopBotyep, it works, ye i got what was the issue just i was like 99% sure i tryed this allreadyand it ident cooperate
14:38:54PMunchMaybe you tried with : instead of =
14:39:02poopBotpossible
14:40:24PMunchOh well, I've got to run. Hopefully you won't run into too much trouble while I'm gone. And remember, if you ever want to see the output of the macro just run it with -d:debug
14:40:30*PMunch quit (Quit: Leaving)
14:40:44poopBotok ty, i hope too :)
14:56:54livcdIf I would know I cant safely work with templates in powershell I would start this project in wNim :-(
14:57:30*sagax_ quit (Remote host closed the connection)
14:57:43Araqyou cannot use templates in powershell, powershell has no templates. Feel free to start in Nim.
14:59:25FromGitter<iffy> Does the example listed here work for you? https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-importobjc-pragma
14:59:52FromGitter<iffy> I'm on macOS and am getting `error: cannot find interface declaration for 'Object', superclass of 'Greeter'`. Maybe I don't have libobjc?
15:00:09*sz0_ quit ()
15:00:25*PrimHelios__ joined #nim
15:00:45*seni quit (Remote host closed the connection)
15:01:00*sz0 joined #nim
15:02:44FromGitter<iffy> I can get it to work if I make this change: https://gist.github.com/iffy/1cd472da9b2135ccc2a1cc1da3f83bbc
15:03:04*PrimHelios_ quit (Ping timeout: 264 seconds)
15:03:44*sz0 quit (Client Quit)
15:04:20*sz0 joined #nim
15:04:55*Vladar joined #nim
15:06:16Araqiffy: that's good enough
15:07:40FromGitter<mratsim> @AchalaSB use ewasm and convert C to web assembly, converting JS to webassembly will be less efficient.
15:07:48livcdAraq: i meant wpf's style and control templates
15:08:00FromGitter<mratsim> sorry not ewasm, emscripten
15:09:04*Trustable joined #nim
15:10:22FromGitter<iffy> Araq: here's the example I promised of `{.compile: "something.m" .}` not working for me: https://gist.github.com/iffy/7965d17fb688b4471abb7c350d61708c
15:10:26FromGitter<iffy> Should I file an issue?
15:11:14FromGitter<mratsim> Obj-C is still one of the official target until Apple phases it out completely for Swift I guess, so go for it ;)
15:14:21*PrimHelios__ quit (Quit: Leaving)
15:16:39FromGitter<arnetheduck> hey @Araq, would you consider a patch to remove the strong spaces syntax?
15:20:05FromGitter<mratsim> is that the command syntax?
15:20:17poopBothmm, did db_sqlite or probbaly all db_ got update, now it asks for some chanel[TMsg]
15:20:20FromGitter<mratsim> like `echo foo(), bar()`?
15:20:33dom96_wThat feature should be long gone by now. I'm hoping Araq won't have a problem with removing it.
15:21:36poopBotwhat i need to pass as chanel[TMsg] ?
15:21:54dom96_wmratsim: it's not, it's `5 + 5 * 2` being the same as `(5+5) * 2` IIRC
15:22:09poopBotoh an itn
15:22:33FromGitter<mratsim> for operators it respects precedence
15:22:44leorizearnetheduck: some bindings Araq wrote extensively use the command call syntax, so I doubt he'd accept it :P
15:22:47FromGitter<mratsim> don’t you mean 5 + 5 vs 5 +5
15:23:03poopBotor not
15:23:48dom96_wugh, the spacing got lost through the relay
15:24:11dom96_wor possibly even through my IRC client
15:24:48FromGitter<arnetheduck> this: https://github.com/nim-lang/Nim/commit/f23b7e37243036724053b3f6d475c4ac9f577661
15:24:52dom96_wbut yes, that's what I meant
15:25:09FromGitter<arnetheduck> ie it got removed from the docs 2 years ago, but it's still part of the code
15:25:32FromGitter<arnetheduck> dom96_w is on the spot
15:25:42dom96_wCreate the PR. I'm happy to accept it (and fight Araq if necessary)
15:26:17FromGitter<arnetheduck> it's enough work that I'd prefer the fight to happen before the code is written
15:26:25leorizeoh, that strong spaces
15:28:40poopBotcan somone tell me whats this chanel[TMsg] error msg, like 5 days ago sqlite worked i think no problem now it asks for this chnael[TMsg] , from what i read it has something to do with threads but it wont alowe me to create a variable var cn : Channel so i can pass it, i tryed turning on off --threads to to check if that was a issue
15:29:45leorize`db_` family of modules doesn't require Channel...
15:31:08poopBothttps://hastebin.com/tijohuyalo.cs
15:31:29poopBoti think i tested db_sqlite like a week ago and all worked np
15:31:51leorizepoopBot: nil string doesn't exist anymore...
15:31:55leorizeuse empty strings instead
15:32:18leorizeand yea, the docs of db_* should be updated
15:32:27*rockcavera joined #nim
15:34:04*nsf quit (Quit: WeeChat 2.2)
15:34:04poopBothmm,ok now it works, tought i duno why it cryaed for Channel[open.TMsg] insted "Cant use nil no more"
15:34:24poopBothow to update docs
15:34:46Araqarnetheduck: yeah but I can do it too, I keep removing old cruft
15:35:18leorizepoopBot: if you skim through the list you'd see why...
15:35:26Araqthis feature cannot work with macros.parseExpr anyway
15:36:09FromGitter<arnetheduck> oh, that'd be great. started thinking about a code formatter, and getting that cruft out of the way would help a lot.
15:37:26FromGitter<arnetheduck> @Araq in the grammar btw (https://nim-lang.org/docs/manual.html#syntax-grammar), `optInd` is specced as a comment only, but in reality it also eats indent
15:38:18AraqI don't really want to bring this up, but I have a much better way of how to do indentation based parsing that is 99% compatible with the existing Nim...
15:39:00Araqso yeah, optInd etc is kinda messed up
15:39:26poopBotleorize, it tryed to apply all posible overolads on proc and shooted error for each
15:39:41leorizeyep, quite helpful, really :)
15:40:17FromGitter<arnetheduck> speaking of cruft, I think it's a bit of a problem having nimpretty behind `-d` switches as it is.. it makes both the pretty code and the compiler code more complex.. specially the way the comment handling is done, it's really quite hard to follow what's going on..
15:40:53FromGitter<arnetheduck> but anyway. getting the strong spaces stuff out of there would be a great first step.
15:41:34Araqclang uses 2 different parsers instead, I think
15:41:42Araqone for formatting, one for compiling
15:41:53AraqI like my solution better for now
15:41:54FromGitter<arnetheduck> yeah it does.
15:42:16FromGitter<arnetheduck> same lexer afair, but separate parsers
15:43:30FromGitter<arnetheduck> the formatter is more tolerant of small mistakes.. that's actually a fantastic feature once you get used to it.. you just type some code "approximately" and the formatter takes care of cleaning it up for you so you can fix the small details with nice formatting already
15:44:17FromGitter<alehander42> actually the strong spaces precedence thing was cute(I think I saw it in 1 other language too), but it can't survive in the existing lang ecosystem
15:45:14narimiranwow, i didn't know that "colon is proc" https://github.com/nim-lang/Nim/blob/devel/tests/misc/tcolonisproc.nim
15:45:34narimiranbtw, why is that in false block, it seems to be working just fine
15:46:24Araqnarimiran, don't go there.
15:46:52narimiranhaha, ok
15:47:25*floppydh quit (Quit: WeeChat 2.2)
15:47:39FromGitter<mratsim> you can use the do syntax for that
15:48:04dom96_wYou can use the -> macro for that
15:48:30dom96_wThe do notation and whatever that colonisproc thing is should die.
15:49:04poopBotis there some fileReadAsBanary("Path") in os or am i blind?
15:49:29dom96_wno, you read it as a string and treat the data as a binary
15:49:34dom96_wThere is no special binary file reader
15:49:55poopBotok will try
15:50:04narimiran@mratsim i usually see `do` used together with `quote`, but not for other stuff. i guess `->` might be nicer
15:50:29FromGitter<mratsim> do replace argument from the last one
15:51:01FromGitter<arnetheduck> @alehander42 I don't have any issues or opinions on the strong spaces feature itself - my beef with it, and a lot of the nim compiler compiler code, is that there are plenty of half-finished features and cruft in there, making it unnecessarily hard to contribute improvements without breaking something
15:51:02FromGitter<mratsim> `proc foo(a, b: int)` can be called with foo(a) do: 1 + 1
15:51:31FromGitter<alehander42> @dom96_w there is a lot of existing `do (..)` code
15:51:44FromGitter<alehander42> and what is the `->` macro? the one in sugar is only for type signature
15:51:44dom96_wI'm aware
15:51:50dom96_wI mean the => macro
15:52:34dom96_wThis won't stop me from advocating for the removal of the do notation. I have been meaning to create an official proposal for that for years now.
15:53:51FromGitter<alehander42> @dom96_w why do you hate it so much? I agree that removing it can simplify the language a bit
15:53:55FromGitter<mratsim> I think your last commit broke distinctBase in sugar @Araq, I’m trying to add some OpenMP stuff and I get: ⏎ ⏎ ../../laser/tensor/datatypes.nim(111, 15) template/generic instantiation of `distinctBase` from here ⏎ ../../../Nim/lib/pure/sugar.nim(209, 21) Error: undeclared identifier: ‘uncheckedArray' [https://gitter.im/nim-lang/Nim?at=5bd09593bbdc0b2505925f5f]
15:53:55dom96_wmratsim: Huh? You're missing a proc type in there, right?
15:54:16FromGitter<mratsim> no?
15:54:20FromGitter<alehander42> but we need to provide a tool that tries to rewrite do usages with e.g. `=>` at least semiautomatically
15:54:26dom96_walehander42: It doesn't fit the language, using it is awkward and not consistent with the proc def syntax
15:55:03FromGitter<mratsim> for some reason uncheckedArray has the first letter in lowercase
15:55:10dom96_wsure, that can be done.
15:58:12*darithorn joined #nim
16:01:45narimirananother test file.... what's the point of this test exactly? https://github.com/nim-lang/Nim/blob/devel/tests/misc/thintoff.nim
16:04:30FromGitter<arnetheduck> there's one more similar feature to `do`: the last-argument-is-the-body feature of templates.. neither of these feel very natural coming from other languages, though I've never used either extensively
16:04:38poopBotdumb question but how to treat string as binary, do i need to parse it or what?
16:04:50poopBotcast?
16:07:42dom96_warnetheduck: huh, no other language has this? How do macros/templates in other languages consume code?
16:08:20FromGitter<alehander42> @arnetheduck in ruby blocks are consumed with a special `&arg`, is that what you would expect
16:09:31*NimBot joined #nim
16:13:35poopBotcan somone tell me how to use string as binary, pls :)
16:14:34poopBoti read my file var imgBinary : string = readFile("/home/me/Downloads/121361-7-3.jpg")
16:14:40FromGitter<arnetheduck> it's more when producing the block than when consuming them that is a bit unusual.. ie the syntax for expanding a template is not the same as for declaring it.. in the declaration, the arg is inside the parens, while in invocation, it's outside
16:15:08poopBotbut when i try to insert it in sqlite as a blob i get Error: unhandled exception: unrecognized token: "'����" [DbError]
16:15:32FromGitter<alehander42> @arnetheduck well, you wouldn't expect ``` ⏎ proc (l: T) `+` (r: T): ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5bd09aa4ae7be94016ac47d2]
16:17:17poopBotmy guess is i need it to be as seq[bytes] or something
16:18:19FromGitter<arnetheduck> so `template(a, x: untyped) = ..` is called like `x(3): blabla`.. the declaration doesn't show that the latter "works", you have to go read the manual.. in a non-whitespace-delimited lang, it would be natural that the `x` template gets 2 args where the second isdelimited with `{}` or some sugar variant of that.. ie `x(3, { blabla })` would be the way to pass code into the template
16:19:14poopBothope toBin works
16:19:49*crem quit (Ping timeout: 250 seconds)
16:21:34FromGitter<arnetheduck> the `do` syntax does similar magic with the last argument.. declaring and calling is different, and feels a bit arbitrary - but again, this may simply be because I'm unfamiliar with the feature.. take haskell currying for example, there's a strong theoretical reason for why it works - in fact, it underpins the whole function call syntax there making it feel consistent with the rest of the language.. I'm not sure if
16:21:34FromGitter... that's the case with `do`?
16:21:39FromGitter<alehander42> @arnetheduck the example with + was intended to show that usually you have a lot of syntaxes (not only `: block`) which are sugar for function calls: and making the signature of each function similar to the invocation syntax would only complicate the language ⏎ ⏎ e.g. `{}` for templates ⏎ ⏎ `proc a: T[b: U]` ... [https://gitter.im/nim-lang/Nim?at=5bd09c1382893a2f3b32c4aa]
16:21:54*crem joined #nim
16:22:23FromGitter<alehander42> all of those seem equally reasonable to me (as they now follow their invocation syntax)
16:26:18narimiran" Warning: the '.this' pragma is deprecated " -> what should be used instead?
16:27:09FromGitter<mratsim> @arnetheduck I agree that the do is a bit bothering, this is an example of unreadable do notation that I’m currently cleaning: https://github.com/mratsim/Arraymancer/blob/3d1377214453198382b3f7e8d896b379ba02f00e/src/tensor/aggregate.nim#L89-L103
16:27:11FromGitter<arnetheduck> yeah, that's an interesting point.. not sure what a good approach for that is, but every "new" way is something that you have to teach users of the lang
16:29:11FromGitter<arnetheduck> the way I like to learn a lang is to build a minimal mental model of the language from which I can derive the rest - ie first principles of the syntax - haven't been able to fit "do" into that model just yet
16:29:38FromGitter<mratsim> the do is a bulldozer in a homely landscape :P
16:31:02poopBotstring as binary, how, pls :)
16:31:41FromGitter<kaushalmodi> poopBot: what does that mean? How would you expect to see "abc" in binary?
16:32:10FromGitter<mratsim> cast\seq\[byte\ (yourString) but don’t do this at thome :P
16:32:51poopBot01100001 01100010 01100011
16:33:17poopBoti can write it like that "cast\seq\[byte\ (yourString)" wierdest sytax ye
16:34:09poopBotor not, i asked 20 rows up do i need to cast it tought duno how to do that in nim
16:34:18FromGitter<kaushalmodi> poopBot: what is the type of that 0/1 stream? `seq[byte]`?
16:34:42poopBotyes
16:34:47poopBoti think :)
16:35:22poopBoti think i found page on Nim and casting
16:37:49FromGitter<kaushalmodi> poopBot: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bd09fddbbdc0b250592a80f]
16:41:28poopBothmm thats creating a new variable cant i just cast it like dom96 sead, "treat string as binary"
16:44:10FromGitter<kaushalmodi> hmm, that's out of my knowledge area then. I simply avoided casting based on the warnings I've read in the manual
16:45:00poopBothmm guess i can do that too, anyway ty for help
16:47:30dom96_wYou shouldn't need to cast anything
16:47:41poopBothow so?
16:47:45dom96_wYou're trying to get this binary data into sqlite right?
16:47:48dom96_wThat's your end goal?
16:47:50poopBotyep
16:48:15poopBotand leater on to read it to img in gtk, but 1 step at a time xD
16:48:24poopBotvar imgString : string = readFile("/home/me/Downloads/121361-7-3.jpg")
16:48:31poopBotis what i am using atm
16:49:53dom96_wwhat data type are you using in SQLite?
16:49:59poopBotBLOB
16:50:32dom96_whrm, then perhaps Nim's db_sqlite has a bug when it comes to binary data
16:50:57poopBot:)
16:51:08poopBotcan write you what error i get
16:51:36dom96_wwhat's your code that is inserting this image into the db?
16:51:53poopBotdb.exec(sql"INSERT INTO myTable (slika) VALUES (?)", imgBinary)
16:52:53poopBotdb_sqlite.nim(104) dbError
16:52:53poopBotError: unhandled exception: unrecognized token: "'����" [DbError]
16:53:46dom96_wYeah, I don't think you can use an ordinary insert like that to put binary data into the db
16:53:50dom96_whttps://stackoverflow.com/questions/8884058/sqlite-is-it-possible-to-insert-a-blob-via-insert-statement
16:54:08leorizeYou can if you use https://github.com/xzfc/ndb.nim
16:54:25dom96_wLike suggested in that SO post you can encode it as hex
16:55:04dom96_woh, that's nice. We should pull that into stdlib if possible
16:58:05poopBoti will try that ndb
16:58:13FromGitter<mratsim> otherwise for dealing with blobs here is a super simple lib: https://github.com/status-im/nim-byteutils/blob/master/byteutils.nim
16:59:18*dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:04:46FromDiscord<Shield> what's the best way to expose the host's functions to a shared library (both are made with nim)?
17:16:51*nsf joined #nim
17:17:12FromGitter<alehander42> @mratsim well, if you use `=>` the code looks even worse
17:17:28FromGitter<alehander42> I am not really sure what's the best replacement for `do`
17:19:15FromGitter<alehander42> I actually think the whole issue is
17:19:22FromGitter<alehander42> that we use `: ReturnType =`
17:19:30FromGitter<alehander42> if this was `-> ReturnType:`
17:19:50FromGitter<alehander42> this would be more intuitive, as every other block in nim is after `:`
17:20:03FromGitter<alehander42> and it would be compatible with the do syntax
17:20:28FromGitter<mratsim> I think the ship has sailed
17:20:32FromGitter<alehander42> absolutely
17:20:45FromGitter<alehander42> but I am trying to say that `do`'s design is actually fine
17:20:53FromGitter<alehander42> for me
17:21:30FromGitter<mratsim> well it’s weird and impossible to find it intuitively but it works for me as well
17:21:49FromGitter<alehander42> well, if `proc` had intuitive design
17:22:00FromGitter<alehander42> `do` would be almost obvious
17:22:51FromGitter<alehander42> maybe you could even define it as a macro(if we had infix operator macros): stuff `do` signature:block converging to call
17:24:58FromGitter<mratsim> let’s get nimpretty working first ;)
17:27:45*Trustable quit (Remote host closed the connection)
17:30:16FromGitter<alehander42> nah, that's alternate reality stuff (the do / different proc thing)
17:31:04FromGitter<alehander42> now i am kinda sad they didn't have lisp machines in e.g. `the man in the high castle`
17:33:03FromGitter<mratsim> btw, do you have a way to get all the expression “leafs” of the AST? ⏎ ⏎ For loopfusion, it would be useful to supports conditionals and replace ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bd0accf271506518d63caca]
17:38:28FromGitter<alehander42> well, it seems very NimNodeKind specific
17:39:51FromGitter<mratsim> I guess a isFreeStandingExpression macro/magic would be useful
17:42:10FromGitter<alehander42> it seems simple to write, just a bit tedious (you have to blacklist cases like foo and bar for each kind)
17:42:58FromGitter<mratsim> not sure, assume there is a: ⏎ `let baz = x + 2` ⏎ somewhere, you need to stop because x + 2 is an expression but it’s assign
17:43:11FromGitter<mratsim> same thing when it’s inside a call
17:43:25FromGitter<mratsim> but a call can return a free standing expression
17:46:09FromGitter<alehander42> well, I expect that one provides some kind of context: e.g. root node in which the question is `is this node free standing in root?`
17:48:51*Arrrr joined #nim
18:08:12*PrimHelios_ joined #nim
18:08:47*stefanos82 quit (Quit: Quitting for now...)
18:12:33*krux02 quit (Remote host closed the connection)
18:21:52FromGitter<yyyc514> Error: module names need to be unique per Nimble package;
18:21:56FromGitter<yyyc514> well i kind of get that, but grrrr
18:22:08FromGitter<yyyc514> i used folders to categorize things :)
18:23:10leorizeput all of them in a `<proj>` subfolder
18:23:15leorizethen nimble will be happy
18:23:51*Vladar quit (Remote host closed the connection)
18:25:15*PrimHelios_ quit (Ping timeout: 264 seconds)
18:26:45FromGitter<yyyc514> they are already in different folders
18:26:50FromGitter<yyyc514> it didn’t liek that i had dup module names
18:26:57FromGitter<yyyc514> views/pastes controllers/pastes
18:27:34FromGitter<yyyc514> actually seems like someone would hit this
18:27:48FromGitter<yyyc514> does it divide them based on the project root folder?
18:27:56FromGitter<yyyc514> ie, anything outside that is in another naming scope?
18:28:18FromGitter<yyyc514> i mean i kind of see how you couldn’t refernce them both in the same file though i guess :)
18:28:28FromGitter<yyyc514> except you don’t really reference by the scope that often
18:29:05leorizewhat's your current project tree?
18:29:17leorizeI just tried with a dummy project and `nimble check` didn't complain
18:36:58FromGitter<alehander42> nah the problem is when you compile and you get two of them I think
18:37:55FromGitter<alehander42> https://forum.nim-lang.org/t/2937
18:49:06*NimBot joined #nim
18:49:16*crem quit (*.net *.split)
18:49:16*chemist69 quit (*.net *.split)
18:49:16*regtools quit (*.net *.split)
18:49:16*flyx quit (*.net *.split)
18:49:16*nif quit (*.net *.split)
18:49:16*def- quit (*.net *.split)
18:49:17*MrAxilus[m] quit (*.net *.split)
18:49:17*revere quit (*.net *.split)
18:49:17*leorize quit (*.net *.split)
18:49:17*xet7 quit (*.net *.split)
18:49:17*PrimHelios quit (*.net *.split)
18:49:17*Jesin quit (*.net *.split)
18:49:17*voiceftp quit (*.net *.split)
18:49:17*gangstacat quit (*.net *.split)
18:49:17*gmpreussner quit (*.net *.split)
18:49:17*mech422__ quit (*.net *.split)
18:49:17*banc quit (*.net *.split)
18:49:17*couven92 quit (*.net *.split)
18:49:17*mr_yogurt quit (*.net *.split)
18:49:17*mal``` quit (*.net *.split)
18:49:17*beatmox quit (*.net *.split)
18:49:17*fyber quit (*.net *.split)
18:49:17*Cthalupa quit (*.net *.split)
18:49:17*cavariux quit (*.net *.split)
18:49:17*joshbaptiste quit (*.net *.split)
18:49:17*pwntus quit (*.net *.split)
18:49:17*Sargun quit (*.net *.split)
18:49:17*masterm quit (*.net *.split)
18:49:17*acidx quit (*.net *.split)
18:49:17*nuxdie quit (*.net *.split)
18:49:18*noonien quit (*.net *.split)
18:49:18*zacharycarter[m] quit (*.net *.split)
18:49:18*kadin quit (*.net *.split)
18:49:18*zama quit (*.net *.split)
18:49:18*tobbez quit (*.net *.split)
18:49:18*dom96 quit (*.net *.split)
18:49:18*Amun_Ra quit (*.net *.split)
18:49:18*qwertfisch quit (*.net *.split)
18:49:18*hwallann quit (*.net *.split)
18:49:18*opi_ quit (*.net *.split)
18:49:18*xomachine[m] quit (*.net *.split)
18:49:18*EastByte quit (*.net *.split)
18:49:18*vqrs quit (*.net *.split)
18:49:19*m712 quit (*.net *.split)
18:49:19*msmorgan_ quit (*.net *.split)
18:49:19*hogeland quit (*.net *.split)
18:49:19*kapil____ quit (*.net *.split)
18:49:19*bozaloshtsh quit (*.net *.split)
18:49:19*Yardanico quit (*.net *.split)
18:49:19*TheKing[m] quit (*.net *.split)
18:49:19*planetis[m] quit (*.net *.split)
18:49:19*syntonym[m]1 quit (*.net *.split)
18:49:19*pigmej quit (*.net *.split)
18:49:19*Connor[m]1 quit (*.net *.split)
18:49:19*hohlerde quit (*.net *.split)
18:49:19*shashlick quit (*.net *.split)
18:49:19*derlafff quit (*.net *.split)
18:49:19*sg-james[m] quit (*.net *.split)
18:49:19*JStoker quit (*.net *.split)
18:49:19*enigmeta quit (*.net *.split)
18:49:19*LyndsySimon quit (*.net *.split)
18:49:19*sz0 quit (*.net *.split)
18:49:19*surma__ quit (*.net *.split)
18:49:19*euantor quit (*.net *.split)
18:49:19*vegax87 quit (*.net *.split)
18:49:19*lukd quit (*.net *.split)
18:49:19*r4vi quit (*.net *.split)
18:49:19*zielmicha__ quit (*.net *.split)
18:49:20*shodan45 quit (*.net *.split)
18:49:20*gh0st[m]1 quit (*.net *.split)
18:49:20*Demos[m] quit (*.net *.split)
18:49:20*dada78641 quit (*.net *.split)
18:49:20*monofuel[m] quit (*.net *.split)
18:49:20*sendell[m] quit (*.net *.split)
18:49:21*SolitudeSF[m] quit (*.net *.split)
18:49:21*spymasterd[m] quit (*.net *.split)
18:49:21*jaens[m] quit (*.net *.split)
18:49:21*narimiran[m] quit (*.net *.split)
18:49:21*codevance[m] quit (*.net *.split)
18:49:21*jakeprem quit (*.net *.split)
18:49:21*deepend quit (*.net *.split)
18:49:21*bitstoppa[m] quit (*.net *.split)
18:49:21*FromGitter quit (*.net *.split)
18:49:21*AlexMax quit (*.net *.split)
18:49:21*xylef quit (*.net *.split)
18:49:21*petersjt014[m] quit (*.net *.split)
18:49:21*dyce[m] quit (*.net *.split)
18:49:21*Elronnd quit (*.net *.split)
18:49:21*junland quit (*.net *.split)
18:49:21*notbot[m] quit (*.net *.split)
18:49:21*Xe quit (*.net *.split)
18:49:21*snowolf quit (*.net *.split)
18:49:21*awal quit (*.net *.split)
18:49:22*macsek1911[m] quit (*.net *.split)
18:49:22*dashed quit (*.net *.split)
18:49:22*odc quit (*.net *.split)
18:49:22*SunDwarf quit (*.net *.split)
18:49:22*endes[m] quit (*.net *.split)
18:49:22*stisa[m] quit (*.net *.split)
18:49:22*dvn quit (*.net *.split)
18:49:22*cornfeedhobo quit (*.net *.split)
18:49:22*Miguelngel[m] quit (*.net *.split)
18:49:22*k0mpjut0r quit (*.net *.split)
18:49:22*toofly[m] quit (*.net *.split)
18:49:22*zielmicha[m] quit (*.net *.split)
18:49:22*TheManiac[m] quit (*.net *.split)
18:49:22*yglukhov[m] quit (*.net *.split)
18:49:22*pqflx3[m] quit (*.net *.split)
18:49:22*GitterIntegratio quit (*.net *.split)
18:49:22*pydsigner quit (*.net *.split)
18:49:22*rockcavera quit (*.net *.split)
18:49:22*narimiran quit (*.net *.split)
18:49:22*edcragg quit (*.net *.split)
18:49:22*Tongir quit (*.net *.split)
18:49:22*rlr quit (*.net *.split)
18:49:22*spookydeath916 quit (*.net *.split)
18:49:22*Summertime quit (*.net *.split)
18:49:22*copygirl quit (*.net *.split)
18:49:22*FromDiscord quit (*.net *.split)
18:49:22*oky quit (*.net *.split)
18:49:22*gsingh93 quit (*.net *.split)
18:49:22*jxy quit (*.net *.split)
18:49:22*ng0 quit (*.net *.split)
18:49:22*abeaumont quit (*.net *.split)
18:49:22*c15ade4 quit (*.net *.split)
18:49:22*onionhammer quit (*.net *.split)
18:49:23*jonafato quit (*.net *.split)
18:49:23*CcxWrk quit (*.net *.split)
18:49:23*livcd quit (*.net *.split)
18:49:23*poopBot quit (*.net *.split)
18:49:23*flaviu quit (*.net *.split)
18:49:23*xace quit (*.net *.split)
18:49:23*ghost64 quit (*.net *.split)
18:49:23*masterdonx quit (*.net *.split)
18:49:23*avsej quit (*.net *.split)
18:49:23*Lord_Nightmare quit (*.net *.split)
18:49:23*oprypin quit (*.net *.split)
18:49:23*ltr_ quit (*.net *.split)
18:49:23*ldlework quit (*.net *.split)
18:49:23*GaveUp quit (*.net *.split)
18:49:36*Arrrr joined #nim
18:54:15*PrimHelios_ joined #nim
18:54:44*gmpreussner joined #nim
18:54:44*so joined #nim
18:54:44*tribly_ joined #nim
18:54:44*Calinou_ joined #nim
18:54:44*Araq_ joined #nim
18:54:44*cstaeth joined #nim
18:54:44*nsf1 joined #nim
18:54:44*d10n_ joined #nim
18:54:44*darithorn_ joined #nim
18:54:44*federico3_ joined #nim
18:54:44*craigger_ joined #nim
18:54:44*redlegion_ joined #nim
18:54:44*skelett1 joined #nim
18:54:44*smt` joined #nim
18:54:44*MyMind joined #nim
18:54:44*abm joined #nim
18:54:44*crem joined #nim
18:54:44*rockcavera joined #nim
18:54:44*sz0 joined #nim
18:54:44*revere joined #nim
18:54:44*narimiran joined #nim
18:54:44*leorize joined #nim
18:54:44*poopBot joined #nim
18:54:44*chemist69 joined #nim
18:54:44*xet7 joined #nim
18:54:44*mech422__ joined #nim
18:54:44*kapil____ joined #nim
18:54:44*bozaloshtsh joined #nim
18:54:44*banc joined #nim
18:54:44*PrimHelios joined #nim
18:54:44*Jesin joined #nim
18:54:44*voiceftp joined #nim
18:54:44*couven92 joined #nim
18:54:44*gangstacat joined #nim
18:54:44*deepend joined #nim
18:54:44*edcragg joined #nim
18:54:44*oky joined #nim
18:54:44*regtools joined #nim
18:54:44*Yardanico joined #nim
18:54:44*flaviu joined #nim
18:54:44*xace joined #nim
18:54:44*Tongir joined #nim
18:54:44*Summertime joined #nim
18:54:44*hwallann joined #nim
18:54:44*Cthalupa joined #nim
18:54:44*opi_ joined #nim
18:54:44*def- joined #nim
18:54:44*nif joined #nim
18:54:44*flyx joined #nim
18:54:44*gh0st[m]1 joined #nim
18:54:44*TheKing[m] joined #nim
18:54:44*planetis[m] joined #nim
18:54:44*syntonym[m]1 joined #nim
18:54:44*cavariux joined #nim
18:54:44*k0mpjut0r joined #nim
18:54:44*c15ade4 joined #nim
18:54:44*noonien joined #nim
18:54:44*pigmej joined #nim
18:54:44*rlr joined #nim
18:54:44*Connor[m]1 joined #nim
18:54:44*hohlerde joined #nim
18:54:44*xomachine[m] joined #nim
18:54:44*bitstoppa[m] joined #nim
18:54:44*zacharycarter[m] joined #nim
18:54:44*shashlick joined #nim
18:54:44*derlafff joined #nim
18:54:44*kadin joined #nim
18:54:44*sg-james[m] joined #nim
18:54:44*zama joined #nim
18:54:44*xylef joined #nim
18:54:44*EastByte joined #nim
18:54:44*spookydeath916 joined #nim
18:54:44*petersjt014[m] joined #nim
18:54:44*endes[m] joined #nim
18:54:44*onionhammer joined #nim
18:54:44*Demos[m] joined #nim
18:54:44*dyce[m] joined #nim
18:54:44*vqrs joined #nim
18:54:44*MrAxilus[m] joined #nim
18:54:44*stisa[m] joined #nim
18:54:44*mr_yogurt joined #nim
18:54:44*copygirl joined #nim
18:54:44*FromGitter joined #nim
18:54:44*tobbez joined #nim
18:54:44*JStoker joined #nim
18:54:44*dada78641 joined #nim
18:54:44*AlexMax joined #nim
18:54:44*beatmox joined #nim
18:54:44*mal``` joined #nim
18:54:44*fyber joined #nim
18:54:44*nuxdie joined #nim
18:54:44*acidx joined #nim
18:54:44*masterm joined #nim
18:54:44*Sargun joined #nim
18:54:44*pwntus joined #nim
18:54:44*joshbaptiste joined #nim
18:54:44*qwertfisch joined #nim
18:54:44*Amun_Ra joined #nim
18:54:44*dom96 joined #nim
18:54:44*hogeland joined #nim
18:54:44*msmorgan_ joined #nim
18:54:44*m712 joined #nim
18:54:44*enigmeta joined #nim
18:54:44*LyndsySimon joined #nim
18:54:44*shodan45 joined #nim
18:54:44*zielmicha__ joined #nim
18:54:44*r4vi joined #nim
18:54:44*lukd joined #nim
18:54:44*vegax87 joined #nim
18:54:44*euantor joined #nim
18:54:44*surma__ joined #nim
18:54:44*jakeprem joined #nim
18:54:44*codevance[m] joined #nim
18:54:44*narimiran[m] joined #nim
18:54:44*jaens[m] joined #nim
18:54:44*spymasterd[m] joined #nim
18:54:44*SolitudeSF[m] joined #nim
18:54:44*sendell[m] joined #nim
18:54:44*monofuel[m] joined #nim
18:54:44*SunDwarf joined #nim
18:54:44*odc joined #nim
18:54:44*dashed joined #nim
18:54:44*macsek1911[m] joined #nim
18:54:44*awal joined #nim
18:54:44*Xe joined #nim
18:54:44*notbot[m] joined #nim
18:54:44*snowolf joined #nim
18:54:44*junland joined #nim
18:54:44*Elronnd joined #nim
18:54:44*pydsigner joined #nim
18:54:44*pqflx3[m] joined #nim
18:54:44*yglukhov[m] joined #nim
18:54:44*GitterIntegratio joined #nim
18:54:44*TheManiac[m] joined #nim
18:54:44*toofly[m] joined #nim
18:54:44*zielmicha[m] joined #nim
18:54:44*Miguelngel[m] joined #nim
18:54:44*cornfeedhobo joined #nim
18:54:44*dvn joined #nim
18:54:44*ng0 joined #nim
18:54:45*abeaumont joined #nim
18:54:45*jxy joined #nim
18:54:45*gsingh93 joined #nim
18:54:45*FromDiscord joined #nim
18:54:45*livcd joined #nim
18:54:45*CcxWrk joined #nim
18:54:45*jonafato joined #nim
18:54:45*GaveUp joined #nim
18:54:45*ldlework joined #nim
18:54:45*ltr_ joined #nim
18:54:45*oprypin joined #nim
18:54:45*Lord_Nightmare joined #nim
18:54:45*avsej joined #nim
18:54:45*masterdonx joined #nim
18:54:45*ghost64 joined #nim
18:55:38leorize!eval echo NimVersion
18:55:41NimBot0.18.0
18:59:00*jjido joined #nim
19:00:02abmisn't version 0.19.0 already out?
19:00:30FromGitter<kayabaNerve> TheLemonMan It still crashes due to thread storage size, but prints an argument that allows a larger thread size, and if you use that, it doesn't crash.
19:00:48FromGitter<kayabaNerve> As I said in the GitHub issue though: ⏎ "That said, the Channel is unusable since it's a threadvar and it never should be a threadvar. That said, we can chalk that up to the user being the idiot, and not an issue with the compiler itself."
19:03:47copygirlHow does one get the name of a typedesc for displaying in an error pragma?
19:04:11leorize`import typetraits` and you get `$` for typedesc
19:04:40copygirlAlright, thank you <3
19:05:24FromGitter<kayabaNerve> The PR was checked by Araq who said use rawWrite. The currrent PR does use rawWrite. It passes the tests and solves the issue in question.
19:20:50*jjido quit (Ping timeout: 268 seconds)
19:22:45*nsf1 quit (Quit: WeeChat 2.2)
19:24:04dom96NimBot just calls play.nim-lang.org
19:26:04FromGitter<kayabaNerve> dom96 Playground isn't updated to 0.19 though.
19:27:12FromGitter<kayabaNerve> It's not a (total) excuse to say it's not an issue because it uses Playground. It just shifts the blame from the bot to playground. :thinking:
19:27:49*jjido joined #nim
19:28:06dom96ehh, yeah?
19:28:10dom96I don't maintain the playground
19:33:05FromGitter<cooldome> ... Hi, Does anyone know how openarray is represented in vm. I am thinking of adding toOpenArray magic to vm.
19:33:12FromGitter<kayabaNerve> Yeah... I was thinking about that.
19:38:23*jjido quit (Ping timeout: 246 seconds)
19:42:02FromGitter<Araq> @cooldome in the VM seq, openarray and array are all NimNode with nkBracket
19:42:51FromGitter<Araq> toOpenArray should be reasonably easy to implement if we can live with a copy, otherwise we would need to patch the indexing with offsets somehow, very complex
19:45:48FromGitter<cooldome> thx
19:49:17*Arrrr quit (Quit: Arrrr)
19:55:38copygirlSo after some procrastination, I think I've finally build a 2 element Either type: https://gist.github.com/copygirl/e8c779b6727e85155d1ac223c1433778
19:55:55copygirlCan be expanded more but I'd like to write macros to do that for me.. What would be the best way to do that?
19:56:22FromGitter<mratsim> Not sure what you want to do in the end but maybe check that: https://github.com/vegansk/nimfp/blob/master/src/fp/either.nim
19:56:43copygirlThat's only 2 elements.
19:57:18copygirlThis is for a json schema library I'm writing where properties can be multiple different types. (string, int, object 1, object 2, ...)
19:58:26FromGitter<mratsim> you can use an object variant
19:58:48FromGitter<mratsim> Like this: https://github.com/mratsim/chirp8/blob/master/src/cpu.nim#L62-L89
19:59:06FromGitter<mratsim> you can directly use the JsonKind enum from sin/parsejson as the base
19:59:15FromGitter<mratsim> from json*
19:59:42*PrimHelios_ quit (Ping timeout: 252 seconds)
20:00:01copygirlI assume that won't work if I have two object schemas a property can be?
20:00:16FromGitter<mratsim> you speak like yoda :P
20:00:18copygirlSay { "foo": 1 } or { "bar": "string" }
20:01:22FromGitter<mratsim> that would be nodeKindObject: nodeKindInt or nodeKindObject: nodeKindString
20:01:28copygirlIn my case I'd define that property as `someproperty: FooObject or BarObject`. And the idea is that I'd access it through jsonobj.someproperty[FooObject]
20:01:43copygirlNo, both are objects.
20:02:01FromGitter<mratsim> yes this is what I’m saying
20:02:11copygirlOne object with a foo property and one object with a string property.
20:02:26FromGitter<mratsim> both are object and the node below is either a key,int or a key,string pair
20:03:17copygirlhttps://gist.github.com/copygirl/4f8c7d034d21879e21ce20235fcf03e0
20:04:15copygirlDoes this help, maybe? The above code produces types and eventually I want validation and json -> nim object conversion code. I didn't get to the more complicated objects that can have different types.
20:05:16copygirlBut say a buffer can be defined as a `{ "start": int, "end": int }` or `{ "length": int }`.
20:06:05copygirlIt would be defined in the jsonschema block as `BufferStartEnd or BufferLength` for example. And the type of the property itself in the created nim code would be `Either2[BufferStartEnd, BufferLength]`.
20:06:49copygirlBut I want `Either3[T0,T1,T2]` etc as well, not just 2 elements.
20:08:03FromGitter<mratsim> I would use JObject{JArray\[(“start”, “int”), (“end”, int”)\]} for the first end JObject{“length”, “int”} for the second
20:08:31FromGitter<mratsim> basically if you involve generic in the mix you will have to know the types at compile-time
20:09:00FromGitter<mratsim> If you have a fixed schema, that works
20:09:29FromGitter<mratsim> if the schema is known only at runtime you have to use type erasure: either ref object or object variant/sum types.
20:09:42FromGitter<mratsim> ref object+ inheritance*
20:09:56copygirlI... I'm not sure if I don't follow or you don't understand what I want to do. Sorry.
20:10:08FromGitter<mratsim> we’re probably talking past each other :P
20:10:12FromGitter<mratsim> no problem
20:10:59FromGitter<mratsim> But yeah you can use macros to create new case branches.
20:11:54copygirlI'm just wondering if there's a more convenient way to possibly do this.
20:12:48FromGitter<mratsim> maybe that helps: https://github.com/status-im/nimbus/blob/master/nimbus/vm/interpreter_dispatch.nim#L179-L208 ⏎ ⏎ It parse an array that maps an enum to a proc ⏎ and create a case statement for each enum -> proc pair [https://gitter.im/nim-lang/Nim?at=5bd0d240c08b8b306768a7b1]
20:13:25copygirl.... I thiiink... maybe a `quote` plus replace/repeat selected nodes (where I replace, say, the character X with the actual relevant number. TX with T0 for example.
20:14:59dom96copygirl: are you parsing JSON?
20:15:03copygirlI just want to avoid manually putting together all the nim nodes.
20:15:33copygirlNot parsing itself, just putting into a type-safe, known-at-compile-time format.
20:15:33dom96Like do you want to parse JSON that could be: { "start": 123, "end": 456} or {"length": 123}?
20:16:05copygirlI don't just want to validate, but also put into a nim object.
20:16:35dom96I assume you know of the `to` macro? https://nim-lang.org/docs/json.html#to.m%2CJsonNode%2Ctypedesc
20:17:38copygirlHow does it handle optional fields, fields which can be multiple types, ..?
20:18:27dom96For optional fields you just use Option[T]
20:18:46dom96for fields which can be multiple types you should use JsonNode
20:20:31copygirlCan you provide custom parsing behavior?
20:21:47*narimiran quit (Ping timeout: 240 seconds)
20:23:12dom96Not really. You just have to parse that JsonNode after running `to`
20:25:26FromGitter<Araq> and don't use Either, Nim uses exceptions
20:26:08copygirlMhh then I don't know how useful it is to me..? Maybe I'm just biased because I already put work in.
20:26:22copygirlMy Either is not for exceptions, it's for something that can be multiple types.
20:27:16FromGitter<Araq> in theory, yes. in practice it's just some boilerplate-full manually implemented exception handling system
20:28:51copygirlMaybe I should not call it `Either`. That's a stupid name to use for something that can be an error, anyway. `Result` from Rust is way more fitting.
20:29:06copygirlBut no, that's not the goal. In fact the type is never meant to be written out.
20:30:25copygirlYou'd just do something like `var foo = fromJson.requiredProperty.someField[string]` where someField can be a string or int or object with various defined fields. (Or another object with different required fields.)
20:30:54copygirl(different set of required fields*)
20:32:41copygirlBut I believe you helped me find a solution to my original question.
20:36:46dom96If you've got ideas on how to improve the json.to macro I'm always happy to hear them
20:38:13copygirlWell this is sort of to write a dual validator and converter that's aiming to be compatible with the subset of jsonschema features to parse GLTF files.
20:41:37copygirlI fell into the typical rabbit hole. Long time ago I wanted to make a "simple" game. Got to the point where I could render a cube and there was mouse inputs, simple event system.
20:41:45copygirlThough I'd want to load model files.
20:42:33copygirlSo current I'm 3 layers deep: game -> gltf library -> custom json schema parser -> either types.
20:43:58copygirlOh one thing that my parser does that `to` can't is verifying that an optional field requires another to be valid.
20:44:08copygirlSo `scene` is dependant on `scenes`.
20:44:10Demos[m]hm so I have: https://gist.github.com/barcharcraz/9ec04ca3a3a0f6f20df44659878d3ad5
20:44:11Demos[m]and everything works, but after a build the deps.d file is deleted, and then the next invocation of ninja builds it
20:44:15Demos[m]can I prevent that?
20:45:10*zachk joined #nim
20:46:54Demos[m]oops
20:47:00Demos[m]wrong channel, sorta
20:48:42dom96copygirl: you can just write a custom traverser too
20:48:55dom96and save whatever you want into an object
20:49:15dom96or just keep the JsonNode and access fields as-needed
20:51:32copygirlI like the compile time type hints.
20:53:21*zachk quit (Changing host)
20:53:21*zachk joined #nim
21:06:26FromGitter<mratsim> I’m proud of this christmas tree bug: https://github.com/nim-lang/Nim/issues/9497 ⏎ Combining threads + distinct type + generics into a internal compiler error =)
21:08:17*tribly_ is now known as tribly
21:14:08copygirl`type mismatch: got <ref NimNode> but expected one of: proc len(n: NimNode): int` ??
21:14:20copygirlCan I not use `ref NimNode` in a macro, or..?
21:14:47*shadowbane joined #nim
21:14:58copygirlI guess NimNode is a magic type..
21:15:00FromGitter<Araq> don't use `ref NimNode`
21:15:21FromGitter<Araq> but to turn a `ref T` into `T`, you use the deref operator `x[]`
21:16:55copygirlI want to recursively travel through the node tree and replace certain nodes. Thought that was the most straight-forward way.
21:17:27copygirl`x.len` should automatically be `x[].len` though for ref types, right?
21:17:59FromGitter<mratsim> NimNode are ref types already
21:20:11copygirlOh, wait... then maybe I'm getting things mixed up again.
21:20:52copygirlHow can I pass a reference to a proc so that it can *set* the value of that reference..?
21:21:22copygirlI thought `var x` means modifyable but not assignable and `ref x` meant both. Do I need a pointer, instead?
21:24:05FromGitter<mratsim> var means both
21:25:01FromGitter<mratsim> ref, you can modify `at` the memory pointed to (i.e. any property) (what is contained) but not the memory address you are pointing to (the container)
21:25:49copygirlAh right, because foo(var int) means you can modify the integer, not just contents.
21:26:00FromGitter<mratsim> so if you pass `proc foo(a: ref Bar)` you can do a.field1 = 0 but you cannot do a = nil
21:26:13FromGitter<mratsim> yes
21:26:40FromGitter<mratsim> if you want to do `a = nil` in my example you would need to pass `var ref Bar`
21:26:58copygirlAaand.. I don't suppose you can get a `var NimNode` child from another node?
21:27:38copygirlSince `node[i]` is sorta magic I'm not sure if that's possible.
21:27:44FromGitter<mratsim> I never add to pass a var NimNode, pass a normal NimNode and just modify what is inside
21:27:54copygirlWell I can probably do `node[i] = process(node[i])`
21:28:03FromGitter<mratsim> yeah, reassigning is easy
21:28:09copygirlWell the node might be replaced with another node.
21:29:11FromGitter<mratsim> oh yeah, I do use var NimNode, but that’s the only use case I have, it’s for a “pop()” function
21:29:32FromGitter<mratsim> and also for appending
21:30:44copygirl:thumbsup:
21:36:58*poopBot quit (Remote host closed the connection)
21:46:15FromDiscord<Shield> I'm trying to follow the second answer in https://stackoverflow.com/questions/17081131/how-can-a-shared-library-so-call-a-function-that-is-implemented-in-its-loader
21:47:28FromDiscord<Shield> using "-Wl,--export-dynamic", how can I forward declare a function in the nim library but have its implementation in main program?
21:51:01dom96It's usually common to pass the NimNode and an index, and modify its children via `node[i] = ...`
21:52:32*fyber quit (Quit: Ping timeout (120 seconds))
21:53:04*fyber joined #nim
21:59:02Demos[m]who's using --genDeps
21:59:19FromDiscord<treeform> Is there a way to redirect stdout (descriptor 1) in nim to a file (without using the shell)?
21:59:36FromDiscord<treeform> some thing like stdout = open("foo.txt", w)... ?
21:59:48Demos[m]I want to change it to: a) work without --compileOnly, Not imply --genScript, and output in the same format as gcc -MM
22:01:06Demos[m]@treeform: does it need to be portable?
22:03:25Demos[m]oh
22:03:45Demos[m]erm try `reopen(stdout, "foo.txt", fmWrite)`
22:03:59Demos[m]that should be just a call to libc's freopen
22:04:15Demos[m]and it works on my machine (tm) (Fedora 29 Workstation beta)
22:04:19FromDiscord<treeform> cool ill try that!
22:04:46Demos[m]rad
22:05:03FromDiscord<treeform> yeah that works great, thank you!
22:05:13Demos[m]hey who awesomeifyed the docs with little clickable pragma drawers
22:05:16Demos[m]they are awesome!
22:05:26FromDiscord<treeform> not me
22:05:30FromDiscord<treeform> but they are awsome
22:05:46FromGitter<zacharycarter> can I see an example?
22:24:56*kapil____ quit (Quit: Connection closed for inactivity)
22:25:36dom96treeform: You'll have to do that via the OS APIs AFAIK
22:25:50dom96There might be some package that does this already
22:28:09copygirlWhat's the difference between `copyNimNode` and `copyNimTree`? Is one recursive while the other isn't?
22:39:30*jjido joined #nim
22:45:54FromGitter<zacharycarter> copygirl: no - a Node is an individual node in the AST
22:46:11FromGitter<zacharycarter> well I guess yes it is for a short answer
22:46:24FromGitter<zacharycarter> but I mean - as soon as you have a parent / child relationship in terms of AST nodes
22:46:33FromGitter<zacharycarter> `copyNimTree` becomes relevant
22:46:38FromGitter<zacharycarter> in my understanding of things
22:47:24*PrimHelios_ joined #nim
23:04:27*PrimHelios_ quit (Ping timeout: 240 seconds)
23:18:43*rlr quit (Remote host closed the connection)
23:21:51*jjido quit (Remote host closed the connection)
23:36:08*xace quit (Ping timeout: 272 seconds)
23:49:47*xace joined #nim
23:59:21*ghost64 quit (Quit: See you!)