<< 04-01-2018 >>

00:00:32*yglukhov joined #nim
00:15:21*natrys quit (Quit: natrys)
00:42:02*craigger quit (Quit: bye)
00:43:55*craigger joined #nim
00:49:49*noonien quit (Quit: Connection closed for inactivity)
00:57:51*kier quit (Remote host closed the connection)
00:59:02*kier joined #nim
01:02:33*endragor joined #nim
01:02:50*erhlee_bird_ joined #nim
01:05:38erhlee_bird_What is the generic type attached to Selector in lib/pure/selectors.nim supposed to represent?
01:06:13FromGitter<dom96> Custom data IIRC
01:07:33*endragor quit (Ping timeout: 264 seconds)
01:07:44erhlee_bird_If I don't have a custom data type, is it safe to just throw in any type to appease it?
01:09:14FromGitter<dom96> Yes
01:09:29erhlee_bird_cool, thanks
01:16:36*yglukhov quit (Remote host closed the connection)
01:47:05*yglukhov joined #nim
01:51:27*yglukhov quit (Ping timeout: 240 seconds)
01:52:06*Serenit0r joined #nim
01:54:19*erhlee_bird_ quit (Ping timeout: 260 seconds)
01:55:31*Serenitor quit (Ping timeout: 256 seconds)
01:56:23FromGitter<gogolxdong> Has anyone drawn in canvas using karax?
02:04:40*craigger quit (Quit: bye)
02:06:37*craigger joined #nim
02:07:56*craigger quit (Client Quit)
02:09:42*craigger joined #nim
02:12:15*xet7 quit (Ping timeout: 248 seconds)
02:14:02*gokr quit (Ping timeout: 265 seconds)
02:32:32federico3lapt!
02:35:18*mostly-harmless quit (Ping timeout: 265 seconds)
02:35:46FromGitter<data-man> @federico3: Are you about poker? :-)
02:36:34*mostly-harmless joined #nim
02:49:26*yglukhov joined #nim
02:53:47*yglukhov quit (Ping timeout: 252 seconds)
02:54:57*dandevelo quit (Ping timeout: 240 seconds)
03:01:24*chemist69 quit (Ping timeout: 265 seconds)
03:13:17*marenz__ joined #nim
03:14:33*chemist69 joined #nim
03:16:47*marenz_ quit (Ping timeout: 248 seconds)
03:24:34*awal quit (Quit: ZNC 1.6.4 - http://znc.in)
03:43:40*MJCaley joined #nim
03:51:55*dandevelo joined #nim
03:53:57*MJCaley quit (Quit: MJCaley)
03:56:15*dandevelo quit (Ping timeout: 248 seconds)
04:00:44*endragor joined #nim
04:05:21*endragor quit (Ping timeout: 248 seconds)
04:07:17*arthurz joined #nim
04:08:20*yglukhov joined #nim
04:12:47*yglukhov quit (Ping timeout: 248 seconds)
04:19:32*awal joined #nim
04:19:55*awal is now known as Guest76911
04:20:39*Guest76911 is now known as awal
04:24:31*marenz__ quit (Ping timeout: 248 seconds)
04:26:57*dddddd quit (Remote host closed the connection)
04:30:57*Yardanico[Phone] quit (Ping timeout: 264 seconds)
04:35:21*Yardanico[Phone] joined #nim
04:38:27*NimBot joined #nim
04:40:36*arthurz quit (Quit: Leaving)
05:35:41*Yardanico joined #nim
05:35:49*Yardanico quit (Remote host closed the connection)
05:36:20*bb8 joined #nim
05:36:44*bb8 is now known as Guest30880
05:38:10*Yardanico joined #nim
05:42:46Guest30880I'm trying to save some data in a file and read it back, but having issues. Simplified example here: https://ghostbin.com/paste/5pcz3
05:43:12Guest30880What am I doing wrong?
05:45:27FromGitter<RedBeard0531> Guest30880 give this a read https://en.wikipedia.org/wiki/Floating-point_arithmetic#Representable_numbers,_conversion_and_rounding
05:47:46*Yardanico quit (Remote host closed the connection)
05:48:39Guest30880@RedBeard0531 thanks! I'll have a look
05:53:19*dandevelo joined #nim
05:56:27*Yardanico joined #nim
05:57:24*yglukhov joined #nim
05:58:33*dandevelo quit (Ping timeout: 264 seconds)
06:01:51*yglukhov quit (Ping timeout: 260 seconds)
06:08:41*Yardanico quit (Remote host closed the connection)
06:10:14*Yardanico joined #nim
06:14:12*Yardanico quit (Remote host closed the connection)
06:35:14*nsf joined #nim
07:02:01*endragor joined #nim
07:03:15*vlad1777d quit (Ping timeout: 268 seconds)
07:04:21*derlafff quit (Ping timeout: 256 seconds)
07:06:27*endragor quit (Ping timeout: 240 seconds)
07:09:08*gokr joined #nim
07:35:27*gokr quit (Ping timeout: 240 seconds)
07:44:46*yglukhov joined #nim
07:49:30*yglukhov quit (Ping timeout: 268 seconds)
07:50:01*dandevelo joined #nim
07:59:14*Serenit0r quit (Quit: Leaving)
08:11:32*Vladar joined #nim
08:18:00*dddddd joined #nim
08:22:47*gokr joined #nim
08:23:58*claudiuinberlin joined #nim
08:47:50*Vladar quit (Remote host closed the connection)
08:54:58*sendell joined #nim
08:56:05*yglukhov joined #nim
08:59:54*endragor joined #nim
09:04:11*floppydh joined #nim
09:20:47*PMunch joined #nim
09:32:14*yglukhov quit (Remote host closed the connection)
09:33:10*yglukhov joined #nim
09:35:54*Vladar joined #nim
09:37:48*user0 joined #nim
09:44:05*dandevelo quit (Ping timeout: 252 seconds)
10:02:12*kunev quit (Quit: е те!)
10:08:10*kunev joined #nim
10:10:05*dddddd quit (Remote host closed the connection)
10:36:18PMunchHmm reading from stdin. Currently I'm doing "var buf = newString(n); if stdin.readBuffer(buf.addr, n) == n: echo buf" where n is the amount of available characters. But sometimes this just crashes, any idea why?
10:45:53Araqhow do you know "the amount of available characters"? it's a stream.
10:46:13PMunchioctl(0, FIONREAD, n.addr)
10:46:17PMunchThat's how I know
10:48:58*Yardanico joined #nim
10:51:46FromGitter<Varriount> PMunch: Doesn't that have a race condition?
10:52:05Araqdunno then, I don't read from stdin.
10:52:08PMunchYes, but extra characters will be read next loop
10:52:22PMunchProblem seemed to have been buf.addr, it should be buf[0].addr
10:52:50Araqoh yeah, sorry, should have caught that
10:56:48PMunchHmm, bit annoying that defer can't be on top-level
10:57:00PMunchTo run stuff if the user ctrl+Cs your program..
11:01:14PMunchNow my drawille game of life have commands :)
11:01:47YardanicoPMunch, create main proc :)
11:04:08*couven92 joined #nim
11:06:20*Trustable joined #nim
11:07:29PMunchOf course that works, but I feel it should work with the implicit main as well
11:08:25Araqthere is a controlC handler thing, forgot its name
11:09:13AraqI don't think it should be mapped to exception handling, exceptions are sync, signals are async
11:09:24PMunchHmm, defer didn't appear to work with Ctrl+C anyways..
11:09:40Araqand all you can do is to set a flag in a signal handler
11:12:11Araqor something like that, read the Posix standard, it's enlightening of how much stuff in there is unusable.
11:17:12*Yardanico quit (Remote host closed the connection)
11:18:01*endragor quit (Remote host closed the connection)
11:18:34*endragor joined #nim
11:21:31*Yardanico[Phone] quit (Ping timeout: 260 seconds)
11:23:42*marenz__ joined #nim
11:24:35*endragor quit (Ping timeout: 240 seconds)
11:24:50*Guest30880 quit (Ping timeout: 260 seconds)
11:35:25PMunchYeah I know how I can trap a signal, but it's not a big issue
11:35:41PMunchIf you ctrl+C at the wrong time your terminal would just be left in a weird state
11:41:47*fredrik92 joined #nim
11:43:06*freddy92 joined #nim
11:45:41*couven92 quit (Ping timeout: 268 seconds)
11:46:36*fredrik92 quit (Ping timeout: 246 seconds)
11:50:45*Yardanico joined #nim
11:52:10*freddy92 quit (Read error: Connection reset by peer)
11:56:26*Yardanico quit (Remote host closed the connection)
12:00:21*gokr quit (Ping timeout: 264 seconds)
12:02:24*Yardanico joined #nim
12:11:11*dandevelo joined #nim
12:11:27Yardanicowow, even more destructor stuff :) https://github.com/nim-lang/Nim/wiki/Destructors
12:25:42FromGitter<RedBeard0531> How
12:26:58FromGitter<RedBeard0531> How would gc-less strings and seqs mix with shallow()?
12:29:01Araqhaven't thought about it but 'shallow' is a weird beast I like to do without
12:29:35Araqthat said, you can reserve a flag in the header just like today and make the assignments for them cheap
12:29:45*dandevelo quit (Ping timeout: 264 seconds)
12:29:47Araqthat is the assignments that have not been converted into moves.
12:30:16Araqthe more interesting question is how seq interacts with the GC.
12:30:38Araqand I found a solution for that too, but the wiki page is already quite long
12:34:29FromGitter<RedBeard0531> Araq, any idea what the problem was here https://gitter.im/nim-lang/Nim?at=5a4d2ca30163b02810ab16be
12:37:48*derlafff joined #nim
12:39:14*derlafff quit (Remote host closed the connection)
12:39:55*derlafff joined #nim
12:41:39*Snircle joined #nim
12:44:23*noonien joined #nim
12:46:04AraqRedBeard0531, not sure, don't duplicate the pragmas in the implementation
12:47:05*Yardanico quit (Read error: Connection reset by peer)
12:48:19*derlafff quit (Remote host closed the connection)
12:50:23*Yardanico joined #nim
12:50:45*derlafff joined #nim
12:57:40FromGitter<RedBeard0531> I didn't even get to the point of writing the impl. I failed at writing the forward declare, so I just implemented the function in my own code for now
13:00:53Araqoh you added it to system?
13:01:03Araqsystem.nim is a strange beast
13:01:37Araqeasiest way is to add it to system/sysio without a forward declaration
13:02:15Araqthe export and its documentation will be picked up.
13:02:28*derlafff quit (Remote host closed the connection)
13:02:33Araqby the tooling, no real need to forward declare anything
13:03:19FromGitter<RedBeard0531> I'll give that a go later today
13:03:34*derlafff joined #nim
13:07:33Araqhttps://github.com/nim-lang/Nim/wiki/Destructors as you noticed.
13:09:09*derlafff quit (Remote host closed the connection)
13:09:50*derlafff joined #nim
13:11:21*xet7 joined #nim
13:15:42*arecacea1 quit (Remote host closed the connection)
13:16:02*arecacea1 joined #nim
13:23:53FromGitter<Clyybber> How would I use nimbles build option to build for release? I've looked at https://github.com/nim-lang/nimble/pull/347/files, but am too dumb to figure it out.
13:26:10*Yardanico quit (Remote host closed the connection)
13:26:24*dandevelo joined #nim
13:30:07FromGitter<mratsim> switch("define","release") in your nimble file
13:31:21FromGitter<Clyybber> Ah, thank you. Is there also a way to do only with CLI arguments, without editing the .nimble?
13:32:16FromGitter<mratsim> nim c -d:release -o:youroutfile yourinputfile.nim
13:32:40FromGitter<Clyybber> Yep, thats how im doing it currently, thank you.
13:33:05*floppydh quit (Ping timeout: 240 seconds)
13:33:12*gokr joined #nim
13:34:23*dandevelo quit (Ping timeout: 252 seconds)
13:35:48FromGitter<Clyybber> Only problem is that then I will to manually specify every module, if im not mistaken.
13:36:42*Yardanico joined #nim
13:36:57*xet7 quit (Ping timeout: 264 seconds)
13:37:03FromGitter<Clyybber> So this: https://github.com/nim-lang/nimble/pull/347/files#diff-fe0eee2675411a16f5bb411dce90d5b1R318 doesnt add new CLI arguments?
13:38:29PMunchMan, this game of life thing is mesmerizing to watch
13:42:53*floppydh joined #nim
13:44:12dom96PMunch: show us :)
13:44:38dom96Clyybber: nimble c -d:release module.nim
13:45:08PMunchdom96, it's in my Drawille repo
13:45:13*gangstacat quit (Quit: Ĝis!)
13:46:54PMunchIt uses braille characters to draw a game of life in the terminal :)
13:50:23*xet7 joined #nim
13:54:26dom96link? :)
13:54:42PMunchgithum.com/PMunch/drawille-nim
13:54:44*gangstacat joined #nim
13:54:47PMunchgithub*
13:56:40*rolandnsharp joined #nim
14:07:33rolandnsharpHi add! I've built someone's nim binary for the first time and am getting this error: `could not import: GC_realloc`
14:07:38rolandnsharpall*
14:08:01rolandnsharpany hints on how to debug this
14:12:45PMunchrolandnsharp, code?
14:13:13PMunchOooh, just added some colours as well. Now it looks really pretty :)
14:13:26YardanicoPMunch, did you push it to github? :)
14:15:21*marenz__ quit (Ping timeout: 260 seconds)
14:15:28PMunchYardanico, not yet
14:16:07PMunchThere
14:16:31PMunchPress 'c' to create random dots everywhere with different colours
14:17:03PMunchYour terminal obviously needs to support 256-colours and UTF-8 characters
14:17:12YardanicoPMunch, it has hard-coded drawille path :))
14:17:37YardanicoI didn't know that this works btw
14:17:54YardanicoOMG IT'S AWESOME
14:18:12PMunchHaha, glad you like it :)
14:18:30PMunchOh yeah. I tend to hard-code paths in my example directory
14:18:42PMunchSo you don't have to install the main module to run the examples
14:19:32*marenz__ joined #nim
14:19:45YardanicoPMunch, i.imgur.com/JQYpPG2.png
14:19:53PMunchYou can press 'p' to pause, 's' to step through the execution, 'q' to quit and 'c' for chaos
14:20:05dom96ooh pretty
14:20:07PMunchNice :)
14:20:26PMunchDidn't even think about trying it transparently over other windows :)
14:20:30dom96This is actually really nice, making a game using it would be fun
14:20:49federico3:D
14:21:11*marenz_ joined #nim
14:21:24PMunchYeah there are many cool things you can use it for. This is the first time I've actually used it for anything bigger than my examples
14:21:46Yardanicoand also code is pretty compact
14:22:00PMunchOh yeah, game of life is really simple
14:22:04rolandnsharpPMunch: Unfortunately it's propitiatory code. The problem isn't there on macs ...
14:22:10PMunchIt's like three rules
14:22:18Yardanicorolandnsharp, ooh
14:22:21*floppydh quit (Quit: WeeChat 2.0)
14:22:39dom96rolandnsharp: Are you using the Boehm GC?
14:23:10dom96PMunch: Blasphemy: https://github.com/PMunch/drawille-nim/blob/master/examples/gameoflife.nim#L1
14:23:25Yardanicodom96, yeah I didn't know this works!
14:23:36dom96Please don't do that.
14:23:36PMunchOh crap, yeah that should be a relative path..
14:23:37rolandnsharpdom96: yeah i think. nim.cfg: `--gc:boehm`
14:23:47FromGitter<gogolxdong> @Araq check your email and gitter message
14:23:49dom96PMunch: echo "--path:"../" > nim.cfg
14:23:57Yardanicorolandnsharp, you need to have boehm gc installed
14:24:05*floppydh joined #nim
14:24:11Yardanicoor download it and place in the directory where executable is
14:24:19dom96rolandnsharp: the boehm library you have installed might be outdated
14:24:41*marenz__ quit (Ping timeout: 260 seconds)
14:24:49dom96rolandnsharp: You can probably just remove that from nim.cfg and it will work. I doubt boehm is a requirement, but who knows.
14:25:07Yardanicodom96, it may be a requirement if this app uses shared heap
14:25:32PMunchFixed it to a relative path now
14:25:56dom96PMunch: Why not follow my advice? :)
14:25:59rolandnsharpdom96: sorry for the stupid question but how do I install it? with nimble? Yeah it may use a shared heap
14:26:23dom96rolandnsharp: Nope, it's a system DLL. You need to install it using your package manager or download the DLL if you're on Windows
14:26:52PMunchdom96, eh it requires an extra file.
14:27:13dom96PMunch: why is that a problem?
14:27:53rolandnsharpdom96: this one: `│libmonoboehm-2.0-1 - Mono JIT library (Boehm GC)`
14:27:53PMunchNot really a problem, just prefer to keep the examples stand-alone
14:28:08Yardanicorolandnsharp, this one is for Mono
14:28:48*natrys joined #nim
14:29:05rolandnsharpYardanico: there is no obvious selection in the apt-cache search. There is: `libgc1c2 - conservative garbage collector for C and C++`
14:29:12dom96PMunch: The users of your package will install it via nimble.
14:29:17Yardanicorolandnsharp, yep this one may work
14:29:33dom96And copy the example into their own project, which will then fail to compile because drawille won't be in the parent directory...
14:29:43PMunchdom96, not necessarily
14:30:09dom96How so?
14:30:12PMunchI often clone projects int /tmp just to check out their examples
14:30:58dom96I don't see how that would be problematic.
14:31:03PMunchbut I guess nim.cfg is a better way to do it
14:31:05dom96You'll still be able to compile the code
14:31:17rolandnsharpdom96: Yardanico: libgc1c2 is already latest version
14:31:53dom96rolandnsharp: What distro are you on?
14:32:21rolandnsharpdom96: ubuntu LTS 16.10
14:32:32FromGitter<nc-x> On nim devel, does nimsuggest crash for anyone in vscode. ⏎ By crash I mean `Developer Tools` filled with ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a4e3b00ba39a53f1ad675a1]
14:32:45dom96rolandnsharp: You want libgc-dev, remove whatever package that is
14:32:54PMunchHmm, this runs into the same as all colour blending stuff. Those clusters that live for the longest just turn into gray blobs
14:33:03PMunchSince it's the average of all colours it has seen
14:36:01FromGitter<nc-x> Doing `nimble build` to compile the `nimble` source code also fails with sigsiev.
14:36:16FromGitter<nc-x> Can anyone reproduce either of these issues with latest devel?
14:36:20Yardaniconc-x: that's VERY strange
14:36:27rolandnsharpdom: installed and rebuilt but still getting the same error
14:36:33YardanicoI've never had any SIGSEGVs with nimble
14:37:07dom96rolandnsharp: Removed libgc1c2?
14:37:13PMunchOther than that I must admit the colours looks better than I expected
14:37:27dom96nc-x: show us the output
14:37:30PMunchConsidering how they only apply to every 2x4 area
14:37:46FromGitter<nc-x> > **<dom96>** @nc-x: show us the output ⏎ Output of what?
14:37:53dom96nimble build?
14:38:18FromGitter<nc-x> ```SIGSEGV: Illegal storage access. (Attempt to read from nil?)```
14:38:21FromGitter<nc-x> Only this
14:38:50dom96`nimble -v`?
14:39:38FromGitter<nc-x> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a4e3caa03838b2f2a6dbcb1]
14:39:45rolandnsharpdom96: yeah, just `sudo apt-get remove libgc1c2` then. Still there
14:40:29dom96nc-x: weird. How did you install Nim?
14:40:57dom96rolandnsharp: I'm out of ideas then. :\
14:41:26rolandnsharpdom96: BTW I don't have a `~/.nimble/bin` directory
14:41:30rolandnsharpdoes that help?
14:41:58rolandnsharpdom96: it's the one thing that confused me about the installation
14:41:59dom96rolandnsharp: this doesn't have much to do with nimble, so not really
14:42:10rolandnsharpdom96: damn
14:42:54dom96Is the original author of this proprietary code around?
14:43:02FromGitter<nc-x> dom96: From source using these instructions https://github.com/nim-lang/Nim#compiling and updating by `git pull`, `koch boot -d:release` and `koch tools`
14:43:31dom96nc-x: and it was working fine before, right? If so then maybe devel is just broken.
14:43:45dom96(The tests are failing on macOS but not on Linux)
14:43:52PMunchnc-x why aren't you just using choosenim?
14:44:20PMunchOh wait, your doing nim devel stuff
14:44:21rolandnsharpdom96: unfortunately not. It's working perfectly fine on a max box and on our ubuntu server as far as I know
14:45:12dom96rolandnsharp: You should try looking into what .so the process is loading, that may give some clue (it's probably loading a surprising .so)
14:46:15FromGitter<nc-x> Reinstalling everything from scratch to re-check.
14:46:57FromGitter<nc-x> PMunch: I don't use choosenim because it isn't advertised more.
14:47:05dom96could be that latest nimble is broken too
14:47:18dom96Most people don't really update it often
14:47:23dom96(Including myself0
14:47:23dom96)
14:47:57rolandnsharpdom96: I'll look into that. I just did a `nimble build` instead of `nimble build -d:nimDebugDlOpen ` and now I'm getting: `could not load: libgmp.so compile with -d:nimDebugDlOpen for more information`
14:49:10Yardanicoohhh
14:49:40dom96well, you might want to install that too
14:50:01rolandnsharpdom96: how :D
14:50:17dom96google "ubuntu libgmp package" ;)
14:50:36dom96btw, once you figure this out you should add something like this to your proprietary package: https://github.com/nim-lang/nimble/blob/master/nimble.nimble#L25-L30
14:50:44dom96to help your colleagues :)
14:51:21rolandnsharpdom96: libgmp-dev or libgmp10?
14:51:28rolandnsharpdom96: will do thanks a heap
14:51:56dom96-dev is usually best
14:53:19rolandnsharpdom96: great! it's working. thanks for the help!
14:53:40dom96did that fix the gc issue too?
14:53:41*xet7 quit (Quit: Leaving)
14:54:13Yardanicoyay!
14:57:58FromGitter<nc-x> dom96: After a clean installation of Nim and Nimble, it works.
14:58:01FromGitter<nc-x> Strange!
14:58:12rolandnsharpdom96: ahh no. That only happens when I compile with ` nimble build -d:nimDebugDlOpen`
14:58:48dom96odd, might want to report that as an issue
15:00:51*dandevelo joined #nim
15:01:37rolandnsharpdom96: in the nim github repo? I will if it will help
15:01:53dom96yeah
15:02:06rolandnsharpdom96: okay cheers
15:06:20FromGitter<gogolxdong> How to get the address of let or const variables?
15:08:11PMunchgogolxdong, they don't have one
15:08:22PMunchIIRC
15:10:06FromGitter<gogolxdong> my new comer asked what's the different between let and const.
15:10:21FromGitter<stisa> @gogolxdong `unsafeAddr` I think, but that's not safe 😄
15:10:43YardanicounsafeAddr for let
15:10:51Yardanicoand const variables don't have address really
15:11:02Yardanicothey're directly embedded into C sources
15:11:19YardanicoI mean they are inlined
15:17:57*scriptum joined #nim
15:18:23*endragor joined #nim
15:21:30FromGitter<gogolxdong> clear
15:26:07Yardanicoconst is evaluated at compile-time
15:26:09Yardanicolet - at runtime
15:27:28FromGitter<Quelklef> Is that ever an issue for complicated consts?
15:27:39FromGitter<Quelklef> in terms of performance
15:28:36FromGitter<alehander42> why json would crash with under/overflow error for me? for what kind of numbers should I look
15:28:42Yardanicowell it may be an issue if you would compute mandelbrod at compile-time :P
15:28:56Yardaniconim's VM performance is ~the same as cpython
15:28:57FromGitter<Quelklef> lol
15:29:29FromGitter<Quelklef> but really for like magic number arrays it's negligible?
15:29:41Yardanicoyeah
15:29:49Yardanicopython is not that slow, right ? :D
15:29:59FromGitter<Quelklef> define slow
15:30:27Yardanicowell I mean it's enough for this task
15:31:16*endragor quit (Remote host closed the connection)
15:31:49*endragor joined #nim
15:31:52*couven92 joined #nim
15:32:04FromGitter<Quelklef> i guess
15:32:10FromGitter<Quelklef> I'm just thinking like
15:32:41FromGitter<Quelklef> if a const were used in a lot of places then you're rebuilding (so to speak) its value each time
15:35:20Yardanicobtw, Araq is working on new idea of caching nim compiler AST of modules, this probably will also include consts
15:35:29Yardanicobut I'm not really sure
15:36:26*endragor quit (Ping timeout: 260 seconds)
15:37:11*iAmSlow joined #nim
15:37:21iAmSlow how do i write " in string?
15:37:36iAmSlow "blabla"bla"
15:37:45iAmSlowi guess i need to use some special character
15:37:46FromGitter<alehander42> "blabla\"bla"
15:37:50iAmSlowok ty
15:38:38FromGitter<Quelklef> Yardanico, no idea what that means, but sounds like progress
15:47:59*dddddd joined #nim
15:50:57*iAmSlow quit (Quit: Leaving)
15:53:04FromGitter<alehander42> why is getNum deprecated?
15:53:15FromGitter<alehander42> the docs show it in the first example
15:53:44dom96https://github.com/nim-lang/Nim/blob/devel/lib/pure/json.nim#L699
15:55:59FromGitter<alehander42> we really need some kind of `devel`-based docs :D
15:56:00FromGitter<alehander42> thanks
15:59:38*MJCaley joined #nim
16:03:21*PMunch quit (Quit: Leaving)
16:04:50*rolandnsharp quit (Ping timeout: 260 seconds)
16:23:39*rauss quit (Quit: WeeChat 2.0.1)
16:25:26*rauss joined #nim
16:28:51*fvs joined #nim
16:29:05*yglukhov quit (Remote host closed the connection)
16:32:45*floppydh quit (Ping timeout: 264 seconds)
16:34:19*yglukhov_ joined #nim
16:34:29*endragor joined #nim
16:37:40GitDisc<NopeDK> alexander42, I have mentioned it before and dom96 has opened an issue to get the "./koch web" to serve properly to allow self-conlmpiled docs with full search functionality.
16:39:21*yglukhov_ quit (Ping timeout: 264 seconds)
16:42:01*nsf quit (Quit: WeeChat 2.0.1)
16:45:09FromGitter<alehander42> sounds good 😋
16:51:04FromGitter<xmonader> Hello friends
16:53:19Yardanicohi!
16:55:19*Jesin joined #nim
16:59:38FromGitter<tim-st> is there any difference semantically between a const seq[T] and const array[T] ?
17:02:49*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
17:06:45dom96Ugh, I wish my university didn't decide to change when semester's start. Two years ago I would still have a month free until the next semester.
17:07:54dom96tim-st: I would guess not, but only way to tell is to look at the generated C code
17:15:23*yglukhov joined #nim
17:16:33*yglukhov quit (Remote host closed the connection)
17:16:46*yglukhov joined #nim
17:17:08*floppydh joined #nim
17:19:52*yglukhov quit (Read error: Connection reset by peer)
17:20:28*yglukhov joined #nim
17:21:59*nsf joined #nim
17:22:33*couven92 quit (Ping timeout: 264 seconds)
17:22:40FromGitter<data-man> > "I think we've not been adding topics to that list unless they have about 500 repositories using them." :-(
17:23:07*sendell quit (Remote host closed the connection)
17:23:53Yardanicoguys
17:23:59YardanicoWho have nim repos
17:24:04FromGitter<data-man> https://github.com/github/explore/pull/129#issuecomment-355144760
17:24:07Yardanicoadd "nim" and "nim-lang" to your topics on github please!
17:25:20Yardanicoall my nim repos have nim and nim-lang topics
17:32:29*themagician joined #nim
17:37:59*floppydh quit (Quit: WeeChat 2.0.1)
17:45:09dom96Couldn't resist: https://twitter.com/d0m96/status/948973356816183296.
17:45:49*erhlee_bird quit (Quit: Page closed)
17:49:30Yardanicodom96, you don't need to use return here! implicit result ftw :P
17:49:55Yardanicowell ok, you can
17:50:00dom96Sure, but it fit inside a tweet anyway.
17:50:00Yardanicobecause it would be too long otherwise :D
17:52:54FromGitter<xmonader> So I want to do my first PR against nim lang these days but trying to find a very easy to tackle issue :(
17:56:12dom96have you checked the issues labelled "Easy"? :)
18:03:45FromGitter<xmonader> I'll check thanks ^_^
18:04:04*endragor quit (Remote host closed the connection)
18:05:18FromGitter<xmonader> Is there a contribution flow guide to follow?
18:07:38dom96I'm afraid not
18:07:43dom96Feel free to ask questions here though
18:08:02dom96If you're up for it you could even make a contribution guide as your first contribution heh
18:14:37FromGitter<xmonader> I'll try to document the steps and ask when in doubt ^_^
18:15:03FromGitter<cabhishek> @xmonader I am interested in that document as well :)
18:15:23FromGitter<cabhishek> is this https://github.com/nim-lang/Nim/pull/5839 suppose to work on `0.17.2`?
18:15:41FromGitter<cabhishek> it throws https://play.nim-lang.org?gist=81a3ca0ba05160035ed31e95bda0535f
18:27:07*MJCaley quit (Quit: MJCaley)
18:30:10FromGitter<tim-st> @dom96 thanks, I looked at the code, it generated a seq, the problem was for me that I wanted constant arrays, but these have different sizes so as a defining type I would have to use seq although I wont resize it
18:31:11FromGitter<tim-st> I thought if there is no semantic difference for const array and seq maybe the compiler automatically changes it to array, but that doesnt seem to be the case
18:31:25*MJCaley joined #nim
18:32:07dom96if it helps there are "unchecked" arrays too
18:32:26dom96https://nim-lang.org/docs/system.html#UncheckedArray
18:36:34Yardanicocabhishek: no
18:36:44Yardanicoit can be easily done though
18:37:06Yardanicoyou can: 1) import typetraits; echo name(int)
18:37:21Yardanicoor 2) define a $ on typedesc which will call typetraits.name
18:41:27FromGitter<cabhishek> @Yardanico I thought https://github.com/nim-lang/Nim/blob/devel/lib/pure/typetraits.nim#L34 was suppose to do #2
18:42:30Yardanicoit's in devel
18:42:36Yardanico0.17.2 is "master" branch
18:42:42Yardanicoand devel is current development version
18:42:47Yardanicothere's no this proc in 0.17.2
18:44:29FromGitter<tim-st> @dom96 Thanks, it seems this type only differs that it doesnt check for "out of bounds error", I will stay with seq than
18:45:04Yardanicothis type is more efficient that seq AFAIK
18:47:03FromGitter<cabhishek> @Yardanico makes sense. I tried to build nim locally from devel and it still gave the error. Maybe I don't know how to build devel locally
18:47:17Yardanicodo you use choosenim?
18:47:38Yardanicoit's not currently possible to bootstrap nim if you use choosenim
18:47:50FromGitter<cabhishek> @Yardanico yes, I followed `compiling` instructions` from https://github.com/nim-lang/Nim
18:47:58Yardanicoit won't work
18:48:01Yardanicoremove choosenim from your path
18:48:04Yardanicoand try again
18:48:21FromGitter<cabhishek> oh ok, let me try that! Thaks
18:48:23FromGitter<cabhishek> thanks
18:50:26hohlerdeis there a wrapper around for libxml2? haven't found anything on nimble or in the documentation so far
18:50:54Yardanicohohlerde, there's native CSS selector implementation in nim
18:51:05Yardanicoif you're OK with using them
18:51:30Yardanicohttps://github.com/GULPF/nimquery
18:52:00*jjido joined #nim
18:52:27hohlerdethat's cool, but unfortunately I need xpath support
18:54:04Yardanicohohlerde, well I just mean that you can use css selectors instead of xpath - they're powerful enough :)
18:54:18Yardanicowell there seems to be no libxml2 wrappers written in Nim
18:54:43hohlerdeI'll give the selectors a try, thanks
18:56:01hohlerdeneed to muck around with XML signature and encryption
18:58:15FromGitter<data-man> > Makes me wonder if we should consider auto-assigning the respective language-named topics to repos that dynamically identify their language. ⏎ :-)
18:58:18FromGitter<cabhishek> @Yardanico removing choosenim from path worked. Maybe we should document this? Since we promote choosenim as the preferred way to install nim
18:58:29Yardanicoit's already in choosenim issues
18:58:48Yardanicoin github repo
19:00:58FromGitter<cabhishek> 👍
19:03:50*devdri joined #nim
19:14:06dom96cabhishek: Yardanico: There is another way to work around this, `choosenim show`, then copy the $path/bin/nim into your $nim/compiler directory.
19:14:46dom96actually, copy it into the $nim/bin directory :)
19:14:54dom96dunno if that's easier
19:15:11*Elronnd quit (Remote host closed the connection)
19:17:21Yardanicodom96, would it work?
19:17:53Yardanico./koch will probably invoke wrong nim, no?
19:18:37dom96it looks in bin/ for the nim exe and if it doesn't exist it uses the one in PATH
19:18:40dom96(IIRC)
19:30:57*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:34:26*gokr quit (Ping timeout: 260 seconds)
19:35:12*couven92 joined #nim
19:44:01FromGitter<data-man> He-he, https://github.com/PlanetVaster/OpenBox2D
19:48:09Araq<data-man> I wrote a Wiki page for you
19:50:42*jjido joined #nim
19:53:10*Ven`` joined #nim
19:54:55FromGitter<data-man> @Araq: Great! Thanks! ⏎ About destructors? https://github.com/nim-lang/Nim/wiki/Destructors
19:55:11Araqyes.
19:56:59*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:58:31Araqif you want to make Nim more efficient and better at systems programming implement this for the --newruntime switch
20:00:29FromGitter<RedBeard0531> PMunch: I get this if I run gameoflife in the default term size: https://gist.github.com/RedBeard0531/d2d0e79c26461b2cdf3ca6e00ec5f0e5. It works fine in full screen, although the visible cursor movement makes it feel very spastic (mintty over ssh)
20:02:24FromGitter<data-man> @Araq: What can we improve firstly? Containers?
20:06:15*Elronnd joined #nim
20:06:38FromGitter<RedBeard0531> @Araq I'm surprised by rewrite rules like f_noSink(g()) -> var tmp = bitwiseCopy(g()); f(tmp); =destroy(tmp). Have you considered doing something like RVO/NRVO/Copy-Elision like is done in c++ compilers (now manditory in C++17): http://en.cppreference.com/w/cpp/language/copy_elision
20:07:23*Yardanico quit (Remote host closed the connection)
20:07:39*Yardanico joined #nim
20:08:03FromGitter<RedBeard0531> ideally var `tmp = g()` is transformed into `var tmp; g(addr tmp)` since that is already how it works in most abis
20:08:35Araqof course I looked at pretty much everything dealing with these things
20:08:43Araqincluding C++17.
20:09:30AraqI don't see your point, as you say that's an ABI detail. f(tmp) can still be f(&tmp) under the hood.
20:10:15FromGitter<RedBeard0531> It was the explicit bitwiseCopy that was throwing me
20:10:55Araqthe bitwiseCopy is just my way of saying "neither =sink nor = is called"
20:11:18AraqI'm a bit unsure about the soundness of that :-)
20:12:58Araqbut it's a temporary, it stops existing afterwards
20:13:53Araqso the usual if x.p != nil: destroy(x); x.p = nil in the '=sink' operation does not apply (and only works if the temp is initialized)
20:14:33FromGitter<data-man> @Araq: Some time ago I suggested to improve the Nim testing with a different compilers. I think I will return to this idea, but I'll add a compilation with a different compiler switches. Including testing with --newruntime.
20:15:48Yardanicowell some compilers have problems with nim
20:15:51Yardanicoor nim has problems with them
20:16:05Yardanicoe.g. if you use clang and compile to c++ you can't use SSL
20:16:42FromGitter<RedBeard0531> The other nice RVO property is that returning something from a deeply nested function call all the way out is free since the bottom call constructs the return value in place in the final assignment location and the intermediate functions don't have to do anything to propagate the return value out. The description on that page sounded like it wouldn't preserve that property, but it now seems like you would.
20:16:57subsetparkWhat was times.fromSeconds deprecated in favor of?
20:17:08FromGitter<RedBeard0531> fromUnix IIRC
20:17:56Araqdata-man: I thougth you would implement --newruntime
20:18:38Araqor maybe RedBeard0531
20:19:44FromGitter<RedBeard0531> Will the new runtime make it possible to generate boehm-compatible type maps? https://github.com/ivmai/bdwgc/blob/master/include/gc_typed.h (it would need to know staticly which offsets in types could contain refs)
20:20:21Araqhmmm maybe I should grow a tentacle beard like Davy Jones
20:20:45FromGitter<RedBeard0531> Hah, I'm working on mine :)
20:21:51Araqtype maps are slow
20:21:52FromGitter<RedBeard0531> I doubt I'll have time to work on that much. Winter vacation is over so its back to the real job (although today is a snow day in NYC)
20:22:30FromGitter<data-man> @Araq: What can I say ... I will try.
20:23:02FromGitter<RedBeard0531> right now doesn't nim use a dynamic function call to mark each object? (If I'm reading the gc impl correctly) Wouldn't that be even slower?
20:23:27FromGitter<RedBeard0531> dynamic meaning indirect through fn-ptr
20:23:41Araqfn-ptr is much faster the last time I benchmarked it
20:23:53FromGitter<RedBeard0531> fascinating!
20:24:16Araqplus type maps are not as flexible, how do you say "offset 8 is a pointer depending on some other field"
20:25:19FromGitter<RedBeard0531> You don't, but I can't tell if that flexibility is worth it. I'm not used to working in GC'd languages or impls, so I haven't built up that intuition yet
20:25:52Araqthat means you need another expensive check "Is this pointer REALLY part of the GC'ed heap"
20:26:04FromGitter<data-man> @Yardanico: openssl can be replaced with mbedtls, for example.
20:26:24Araqjust forget about Boehm, even if it's faster it doesn't scale
20:26:25Yardanicowell I know, but probably it's better to be be fixed in codegen :)
20:27:26Araqhttps://www2.cs.arizona.edu/~collberg/Teaching/553/2011/Resources/pankhuri-handout.pdf
20:27:35FromGitter<RedBeard0531> Is getStringOfCap/getSeqOfCap supposed to be zeroing memory or not?
20:33:46*claudiuinberlin joined #nim
20:37:37Araqsupposed to be zero'ing for GC'ed types as the write barrier requires it
20:38:35*kunev quit (Ping timeout: 240 seconds)
20:39:34FromGitter<RedBeard0531> Then what is the point of https://github.com/nim-lang/Nim/commit/bbfe6e81ad9a09fc57710809d5325e13a8c95cbe. It seems misleading at best
20:39:36*kunev joined #nim
20:40:17FromGitter<tim-st> compiling nim filenames dont work with umlaut included, but it seems only gcc has problems, dont know if it should work
20:40:34Araqwell I don't remember but I think for consistency with GC'ed types it should all be zeroed
20:44:33*user0 quit (Quit: user0)
20:56:24*jjido joined #nim
21:20:58*Yardanico quit (Remote host closed the connection)
21:25:49*fvs left #nim ("ERC (IRC client for Emacs 25.3.1)")
21:52:11*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
21:53:35*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:56:41*chemist69 quit (Ping timeout: 252 seconds)
22:06:49*gokr joined #nim
22:08:08*endragor joined #nim
22:09:22*jjido joined #nim
22:10:30*chemist69 joined #nim
22:13:35*endragor_ joined #nim
22:14:23*natrys quit (Quit: natrys)
22:16:29subsetparkholy crap you guys, AMQP is making my brain break
22:16:33*endragor quit (Ping timeout: 264 seconds)
22:18:59*Vladar quit (Quit: Leaving)
22:20:41*jjido quit (Read error: Connection reset by peer)
22:21:26*jjido joined #nim
22:21:36*MJCaley quit (Quit: MJCaley)
22:22:26*vlad1777d joined #nim
22:23:01*endragor joined #nim
22:26:19*endragor_ quit (Ping timeout: 256 seconds)
22:31:43*nsf quit (Quit: WeeChat 2.0.1)
22:34:07*couven92 quit (Ping timeout: 248 seconds)
22:35:50*Ven`` quit (Quit: q+)
22:49:35*endragor quit (Remote host closed the connection)
22:50:09*endragor joined #nim
22:53:41*Trustable quit (Remote host closed the connection)
22:54:39*endragor quit (Ping timeout: 256 seconds)
22:57:33*dandevelo quit (Remote host closed the connection)
22:58:08*dandevelo joined #nim
23:00:50*darithorn joined #nim
23:08:37FromGitter<GULPF> I think there is something wrong with testament. It exists with success even if there is a failing test.
23:08:38FromGitter<GULPF> https://travis-ci.org/nim-lang/Nim/jobs/324825877
23:10:22FromGitter<RedBeard0531> Am I the only one amused by the wording of "baseless methods are deprecated"
23:11:52*endragor joined #nim
23:16:58*endragor quit (Ping timeout: 268 seconds)
23:20:10AraqGULPF I think that's a test that is supposed to fail
23:21:34FromGitter<GULPF> I don't think so, testament exists with failure when I only run the failing test
23:22:01FromGitter<GULPF> Looks like it was introduced in https://github.com/nim-lang/Nim/commit/3f2636c76580c8a086df4255a17b077622434d7d, can't reproduce it prior to that commit
23:22:57Araqstrange
23:23:05FromGitter<GULPF> The test is one of the times tests, so it isn't supposed to fail
23:23:10AraqRedBeard0531: I think so.
23:24:32AraqGULPF: huh yeah, we definitely need to look into that
23:27:11*endragor joined #nim
23:35:57*endragor quit (Ping timeout: 240 seconds)
23:43:04*endragor joined #nim
23:47:45*endragor quit (Ping timeout: 264 seconds)
23:50:03*devdri quit ()
23:55:33*dddddd quit (Read error: Connection reset by peer)
23:56:37*dddddd joined #nim
23:57:12*themagician quit ()