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:38 | erhlee_bird_ | What is the generic type attached to Selector in lib/pure/selectors.nim supposed to represent? |
01:06:13 | FromGitter | <dom96> Custom data IIRC |
01:07:33 | * | endragor quit (Ping timeout: 264 seconds) |
01:07:44 | erhlee_bird_ | If I don't have a custom data type, is it safe to just throw in any type to appease it? |
01:09:14 | FromGitter | <dom96> Yes |
01:09:29 | erhlee_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:23 | FromGitter | <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:32 | federico3 | lapt! |
02:35:18 | * | mostly-harmless quit (Ping timeout: 265 seconds) |
02:35:46 | FromGitter | <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:46 | Guest30880 | I'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:12 | Guest30880 | What am I doing wrong? |
05:45:27 | FromGitter | <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:39 | Guest30880 | @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:18 | PMunch | Hmm 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:53 | Araq | how do you know "the amount of available characters"? it's a stream. |
10:46:13 | PMunch | ioctl(0, FIONREAD, n.addr) |
10:46:17 | PMunch | That's how I know |
10:48:58 | * | Yardanico joined #nim |
10:51:46 | FromGitter | <Varriount> PMunch: Doesn't that have a race condition? |
10:52:05 | Araq | dunno then, I don't read from stdin. |
10:52:08 | PMunch | Yes, but extra characters will be read next loop |
10:52:22 | PMunch | Problem seemed to have been buf.addr, it should be buf[0].addr |
10:52:50 | Araq | oh yeah, sorry, should have caught that |
10:56:48 | PMunch | Hmm, bit annoying that defer can't be on top-level |
10:57:00 | PMunch | To run stuff if the user ctrl+Cs your program.. |
11:01:14 | PMunch | Now my drawille game of life have commands :) |
11:01:47 | Yardanico | PMunch, create main proc :) |
11:04:08 | * | couven92 joined #nim |
11:06:20 | * | Trustable joined #nim |
11:07:29 | PMunch | Of course that works, but I feel it should work with the implicit main as well |
11:08:25 | Araq | there is a controlC handler thing, forgot its name |
11:09:13 | Araq | I don't think it should be mapped to exception handling, exceptions are sync, signals are async |
11:09:24 | PMunch | Hmm, defer didn't appear to work with Ctrl+C anyways.. |
11:09:40 | Araq | and all you can do is to set a flag in a signal handler |
11:12:11 | Araq | or 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:25 | PMunch | Yeah I know how I can trap a signal, but it's not a big issue |
11:35:41 | PMunch | If 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:27 | Yardanico | wow, even more destructor stuff :) https://github.com/nim-lang/Nim/wiki/Destructors |
12:25:42 | FromGitter | <RedBeard0531> How |
12:26:58 | FromGitter | <RedBeard0531> How would gc-less strings and seqs mix with shallow()? |
12:29:01 | Araq | haven't thought about it but 'shallow' is a weird beast I like to do without |
12:29:35 | Araq | that 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:47 | Araq | that is the assignments that have not been converted into moves. |
12:30:16 | Araq | the more interesting question is how seq interacts with the GC. |
12:30:38 | Araq | and I found a solution for that too, but the wiki page is already quite long |
12:34:29 | FromGitter | <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:04 | Araq | RedBeard0531, 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:40 | FromGitter | <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:53 | Araq | oh you added it to system? |
13:01:03 | Araq | system.nim is a strange beast |
13:01:37 | Araq | easiest way is to add it to system/sysio without a forward declaration |
13:02:15 | Araq | the export and its documentation will be picked up. |
13:02:28 | * | derlafff quit (Remote host closed the connection) |
13:02:33 | Araq | by the tooling, no real need to forward declare anything |
13:03:19 | FromGitter | <RedBeard0531> I'll give that a go later today |
13:03:34 | * | derlafff joined #nim |
13:07:33 | Araq | https://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:53 | FromGitter | <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:07 | FromGitter | <mratsim> switch("define","release") in your nimble file |
13:31:21 | FromGitter | <Clyybber> Ah, thank you. Is there also a way to do only with CLI arguments, without editing the .nimble? |
13:32:16 | FromGitter | <mratsim> nim c -d:release -o:youroutfile yourinputfile.nim |
13:32:40 | FromGitter | <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:48 | FromGitter | <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:03 | FromGitter | <Clyybber> So this: https://github.com/nim-lang/nimble/pull/347/files#diff-fe0eee2675411a16f5bb411dce90d5b1R318 doesnt add new CLI arguments? |
13:38:29 | PMunch | Man, this game of life thing is mesmerizing to watch |
13:42:53 | * | floppydh joined #nim |
13:44:12 | dom96 | PMunch: show us :) |
13:44:38 | dom96 | Clyybber: nimble c -d:release module.nim |
13:45:08 | PMunch | dom96, it's in my Drawille repo |
13:45:13 | * | gangstacat quit (Quit: Ĝis!) |
13:46:54 | PMunch | It uses braille characters to draw a game of life in the terminal :) |
13:50:23 | * | xet7 joined #nim |
13:54:26 | dom96 | link? :) |
13:54:42 | PMunch | githum.com/PMunch/drawille-nim |
13:54:44 | * | gangstacat joined #nim |
13:54:47 | PMunch | github* |
13:56:40 | * | rolandnsharp joined #nim |
14:07:33 | rolandnsharp | Hi add! I've built someone's nim binary for the first time and am getting this error: `could not import: GC_realloc` |
14:07:38 | rolandnsharp | all* |
14:08:01 | rolandnsharp | any hints on how to debug this |
14:12:45 | PMunch | rolandnsharp, code? |
14:13:13 | PMunch | Oooh, just added some colours as well. Now it looks really pretty :) |
14:13:26 | Yardanico | PMunch, did you push it to github? :) |
14:15:21 | * | marenz__ quit (Ping timeout: 260 seconds) |
14:15:28 | PMunch | Yardanico, not yet |
14:16:07 | PMunch | There |
14:16:31 | PMunch | Press 'c' to create random dots everywhere with different colours |
14:17:03 | PMunch | Your terminal obviously needs to support 256-colours and UTF-8 characters |
14:17:12 | Yardanico | PMunch, it has hard-coded drawille path :)) |
14:17:37 | Yardanico | I didn't know that this works btw |
14:17:54 | Yardanico | OMG IT'S AWESOME |
14:18:12 | PMunch | Haha, glad you like it :) |
14:18:30 | PMunch | Oh yeah. I tend to hard-code paths in my example directory |
14:18:42 | PMunch | So you don't have to install the main module to run the examples |
14:19:32 | * | marenz__ joined #nim |
14:19:45 | Yardanico | PMunch, i.imgur.com/JQYpPG2.png |
14:19:53 | PMunch | You can press 'p' to pause, 's' to step through the execution, 'q' to quit and 'c' for chaos |
14:20:05 | dom96 | ooh pretty |
14:20:07 | PMunch | Nice :) |
14:20:26 | PMunch | Didn't even think about trying it transparently over other windows :) |
14:20:30 | dom96 | This is actually really nice, making a game using it would be fun |
14:20:49 | federico3 | :D |
14:21:11 | * | marenz_ joined #nim |
14:21:24 | PMunch | Yeah 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:46 | Yardanico | and also code is pretty compact |
14:22:00 | PMunch | Oh yeah, game of life is really simple |
14:22:04 | rolandnsharp | PMunch: Unfortunately it's propitiatory code. The problem isn't there on macs ... |
14:22:10 | PMunch | It's like three rules |
14:22:18 | Yardanico | rolandnsharp, ooh |
14:22:21 | * | floppydh quit (Quit: WeeChat 2.0) |
14:22:39 | dom96 | rolandnsharp: Are you using the Boehm GC? |
14:23:10 | dom96 | PMunch: Blasphemy: https://github.com/PMunch/drawille-nim/blob/master/examples/gameoflife.nim#L1 |
14:23:25 | Yardanico | dom96, yeah I didn't know this works! |
14:23:36 | dom96 | Please don't do that. |
14:23:36 | PMunch | Oh crap, yeah that should be a relative path.. |
14:23:37 | rolandnsharp | dom96: yeah i think. nim.cfg: `--gc:boehm` |
14:23:47 | FromGitter | <gogolxdong> @Araq check your email and gitter message |
14:23:49 | dom96 | PMunch: echo "--path:"../" > nim.cfg |
14:23:57 | Yardanico | rolandnsharp, you need to have boehm gc installed |
14:24:05 | * | floppydh joined #nim |
14:24:11 | Yardanico | or download it and place in the directory where executable is |
14:24:19 | dom96 | rolandnsharp: the boehm library you have installed might be outdated |
14:24:41 | * | marenz__ quit (Ping timeout: 260 seconds) |
14:24:49 | dom96 | rolandnsharp: You can probably just remove that from nim.cfg and it will work. I doubt boehm is a requirement, but who knows. |
14:25:07 | Yardanico | dom96, it may be a requirement if this app uses shared heap |
14:25:32 | PMunch | Fixed it to a relative path now |
14:25:56 | dom96 | PMunch: Why not follow my advice? :) |
14:25:59 | rolandnsharp | dom96: sorry for the stupid question but how do I install it? with nimble? Yeah it may use a shared heap |
14:26:23 | dom96 | rolandnsharp: 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:52 | PMunch | dom96, eh it requires an extra file. |
14:27:13 | dom96 | PMunch: why is that a problem? |
14:27:53 | rolandnsharp | dom96: this one: `│libmonoboehm-2.0-1 - Mono JIT library (Boehm GC)` |
14:27:53 | PMunch | Not really a problem, just prefer to keep the examples stand-alone |
14:28:08 | Yardanico | rolandnsharp, this one is for Mono |
14:28:48 | * | natrys joined #nim |
14:29:05 | rolandnsharp | Yardanico: there is no obvious selection in the apt-cache search. There is: `libgc1c2 - conservative garbage collector for C and C++` |
14:29:12 | dom96 | PMunch: The users of your package will install it via nimble. |
14:29:17 | Yardanico | rolandnsharp, yep this one may work |
14:29:33 | dom96 | And copy the example into their own project, which will then fail to compile because drawille won't be in the parent directory... |
14:29:43 | PMunch | dom96, not necessarily |
14:30:09 | dom96 | How so? |
14:30:12 | PMunch | I often clone projects int /tmp just to check out their examples |
14:30:58 | dom96 | I don't see how that would be problematic. |
14:31:03 | PMunch | but I guess nim.cfg is a better way to do it |
14:31:05 | dom96 | You'll still be able to compile the code |
14:31:17 | rolandnsharp | dom96: Yardanico: libgc1c2 is already latest version |
14:31:53 | dom96 | rolandnsharp: What distro are you on? |
14:32:21 | rolandnsharp | dom96: ubuntu LTS 16.10 |
14:32:32 | FromGitter | <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:45 | dom96 | rolandnsharp: You want libgc-dev, remove whatever package that is |
14:32:54 | PMunch | Hmm, this runs into the same as all colour blending stuff. Those clusters that live for the longest just turn into gray blobs |
14:33:03 | PMunch | Since it's the average of all colours it has seen |
14:36:01 | FromGitter | <nc-x> Doing `nimble build` to compile the `nimble` source code also fails with sigsiev. |
14:36:16 | FromGitter | <nc-x> Can anyone reproduce either of these issues with latest devel? |
14:36:20 | Yardanico | nc-x: that's VERY strange |
14:36:27 | rolandnsharp | dom: installed and rebuilt but still getting the same error |
14:36:33 | Yardanico | I've never had any SIGSEGVs with nimble |
14:37:07 | dom96 | rolandnsharp: Removed libgc1c2? |
14:37:13 | PMunch | Other than that I must admit the colours looks better than I expected |
14:37:27 | dom96 | nc-x: show us the output |
14:37:30 | PMunch | Considering how they only apply to every 2x4 area |
14:37:46 | FromGitter | <nc-x> > **<dom96>** @nc-x: show us the output ⏎ Output of what? |
14:37:53 | dom96 | nimble build? |
14:38:18 | FromGitter | <nc-x> ```SIGSEGV: Illegal storage access. (Attempt to read from nil?)``` |
14:38:21 | FromGitter | <nc-x> Only this |
14:38:50 | dom96 | `nimble -v`? |
14:39:38 | FromGitter | <nc-x> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5a4e3caa03838b2f2a6dbcb1] |
14:39:45 | rolandnsharp | dom96: yeah, just `sudo apt-get remove libgc1c2` then. Still there |
14:40:29 | dom96 | nc-x: weird. How did you install Nim? |
14:40:57 | dom96 | rolandnsharp: I'm out of ideas then. :\ |
14:41:26 | rolandnsharp | dom96: BTW I don't have a `~/.nimble/bin` directory |
14:41:30 | rolandnsharp | does that help? |
14:41:58 | rolandnsharp | dom96: it's the one thing that confused me about the installation |
14:41:59 | dom96 | rolandnsharp: this doesn't have much to do with nimble, so not really |
14:42:10 | rolandnsharp | dom96: damn |
14:42:54 | dom96 | Is the original author of this proprietary code around? |
14:43:02 | FromGitter | <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:31 | dom96 | nc-x: and it was working fine before, right? If so then maybe devel is just broken. |
14:43:45 | dom96 | (The tests are failing on macOS but not on Linux) |
14:43:52 | PMunch | nc-x why aren't you just using choosenim? |
14:44:20 | PMunch | Oh wait, your doing nim devel stuff |
14:44:21 | rolandnsharp | dom96: unfortunately not. It's working perfectly fine on a max box and on our ubuntu server as far as I know |
14:45:12 | dom96 | rolandnsharp: 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:15 | FromGitter | <nc-x> Reinstalling everything from scratch to re-check. |
14:46:57 | FromGitter | <nc-x> PMunch: I don't use choosenim because it isn't advertised more. |
14:47:05 | dom96 | could be that latest nimble is broken too |
14:47:18 | dom96 | Most people don't really update it often |
14:47:23 | dom96 | (Including myself0 |
14:47:23 | dom96 | ) |
14:47:57 | rolandnsharp | dom96: 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:10 | Yardanico | ohhh |
14:49:40 | dom96 | well, you might want to install that too |
14:50:01 | rolandnsharp | dom96: how :D |
14:50:17 | dom96 | google "ubuntu libgmp package" ;) |
14:50:36 | dom96 | btw, 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:44 | dom96 | to help your colleagues :) |
14:51:21 | rolandnsharp | dom96: libgmp-dev or libgmp10? |
14:51:28 | rolandnsharp | dom96: will do thanks a heap |
14:51:56 | dom96 | -dev is usually best |
14:53:19 | rolandnsharp | dom96: great! it's working. thanks for the help! |
14:53:40 | dom96 | did that fix the gc issue too? |
14:53:41 | * | xet7 quit (Quit: Leaving) |
14:54:13 | Yardanico | yay! |
14:57:58 | FromGitter | <nc-x> dom96: After a clean installation of Nim and Nimble, it works. |
14:58:01 | FromGitter | <nc-x> Strange! |
14:58:12 | rolandnsharp | dom96: ahh no. That only happens when I compile with ` nimble build -d:nimDebugDlOpen` |
14:58:48 | dom96 | odd, might want to report that as an issue |
15:00:51 | * | dandevelo joined #nim |
15:01:37 | rolandnsharp | dom96: in the nim github repo? I will if it will help |
15:01:53 | dom96 | yeah |
15:02:06 | rolandnsharp | dom96: okay cheers |
15:06:20 | FromGitter | <gogolxdong> How to get the address of let or const variables? |
15:08:11 | PMunch | gogolxdong, they don't have one |
15:08:22 | PMunch | IIRC |
15:10:06 | FromGitter | <gogolxdong> my new comer asked what's the different between let and const. |
15:10:21 | FromGitter | <stisa> @gogolxdong `unsafeAddr` I think, but that's not safe 😄 |
15:10:43 | Yardanico | unsafeAddr for let |
15:10:51 | Yardanico | and const variables don't have address really |
15:11:02 | Yardanico | they're directly embedded into C sources |
15:11:19 | Yardanico | I mean they are inlined |
15:17:57 | * | scriptum joined #nim |
15:18:23 | * | endragor joined #nim |
15:21:30 | FromGitter | <gogolxdong> clear |
15:26:07 | Yardanico | const is evaluated at compile-time |
15:26:09 | Yardanico | let - at runtime |
15:27:28 | FromGitter | <Quelklef> Is that ever an issue for complicated consts? |
15:27:39 | FromGitter | <Quelklef> in terms of performance |
15:28:36 | FromGitter | <alehander42> why json would crash with under/overflow error for me? for what kind of numbers should I look |
15:28:42 | Yardanico | well it may be an issue if you would compute mandelbrod at compile-time :P |
15:28:56 | Yardanico | nim's VM performance is ~the same as cpython |
15:28:57 | FromGitter | <Quelklef> lol |
15:29:29 | FromGitter | <Quelklef> but really for like magic number arrays it's negligible? |
15:29:41 | Yardanico | yeah |
15:29:49 | Yardanico | python is not that slow, right ? :D |
15:29:59 | FromGitter | <Quelklef> define slow |
15:30:27 | Yardanico | well 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:04 | FromGitter | <Quelklef> i guess |
15:32:10 | FromGitter | <Quelklef> I'm just thinking like |
15:32:41 | FromGitter | <Quelklef> if a const were used in a lot of places then you're rebuilding (so to speak) its value each time |
15:35:20 | Yardanico | btw, Araq is working on new idea of caching nim compiler AST of modules, this probably will also include consts |
15:35:29 | Yardanico | but I'm not really sure |
15:36:26 | * | endragor quit (Ping timeout: 260 seconds) |
15:37:11 | * | iAmSlow joined #nim |
15:37:21 | iAmSlow | how do i write " in string? |
15:37:36 | iAmSlow | "blabla"bla" |
15:37:45 | iAmSlow | i guess i need to use some special character |
15:37:46 | FromGitter | <alehander42> "blabla\"bla" |
15:37:50 | iAmSlow | ok ty |
15:38:38 | FromGitter | <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:04 | FromGitter | <alehander42> why is getNum deprecated? |
15:53:15 | FromGitter | <alehander42> the docs show it in the first example |
15:53:44 | dom96 | https://github.com/nim-lang/Nim/blob/devel/lib/pure/json.nim#L699 |
15:55:59 | FromGitter | <alehander42> we really need some kind of `devel`-based docs :D |
15:56:00 | FromGitter | <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:40 | GitDisc | <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:09 | FromGitter | <alehander42> sounds good 😋 |
16:51:04 | FromGitter | <xmonader> Hello friends |
16:53:19 | Yardanico | hi! |
16:55:19 | * | Jesin joined #nim |
16:59:38 | FromGitter | <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:45 | dom96 | Ugh, 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:54 | dom96 | tim-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:40 | FromGitter | <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:53 | Yardanico | guys |
17:23:59 | Yardanico | Who have nim repos |
17:24:04 | FromGitter | <data-man> https://github.com/github/explore/pull/129#issuecomment-355144760 |
17:24:07 | Yardanico | add "nim" and "nim-lang" to your topics on github please! |
17:25:20 | Yardanico | all 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:09 | dom96 | Couldn't resist: https://twitter.com/d0m96/status/948973356816183296. |
17:45:49 | * | erhlee_bird quit (Quit: Page closed) |
17:49:30 | Yardanico | dom96, you don't need to use return here! implicit result ftw :P |
17:49:55 | Yardanico | well ok, you can |
17:50:00 | dom96 | Sure, but it fit inside a tweet anyway. |
17:50:00 | Yardanico | because it would be too long otherwise :D |
17:52:54 | FromGitter | <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:12 | dom96 | have you checked the issues labelled "Easy"? :) |
18:03:45 | FromGitter | <xmonader> I'll check thanks ^_^ |
18:04:04 | * | endragor quit (Remote host closed the connection) |
18:05:18 | FromGitter | <xmonader> Is there a contribution flow guide to follow? |
18:07:38 | dom96 | I'm afraid not |
18:07:43 | dom96 | Feel free to ask questions here though |
18:08:02 | dom96 | If you're up for it you could even make a contribution guide as your first contribution heh |
18:14:37 | FromGitter | <xmonader> I'll try to document the steps and ask when in doubt ^_^ |
18:15:03 | FromGitter | <cabhishek> @xmonader I am interested in that document as well :) |
18:15:23 | FromGitter | <cabhishek> is this https://github.com/nim-lang/Nim/pull/5839 suppose to work on `0.17.2`? |
18:15:41 | FromGitter | <cabhishek> it throws https://play.nim-lang.org?gist=81a3ca0ba05160035ed31e95bda0535f |
18:27:07 | * | MJCaley quit (Quit: MJCaley) |
18:30:10 | FromGitter | <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:11 | FromGitter | <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:07 | dom96 | if it helps there are "unchecked" arrays too |
18:32:26 | dom96 | https://nim-lang.org/docs/system.html#UncheckedArray |
18:36:34 | Yardanico | cabhishek: no |
18:36:44 | Yardanico | it can be easily done though |
18:37:06 | Yardanico | you can: 1) import typetraits; echo name(int) |
18:37:21 | Yardanico | or 2) define a $ on typedesc which will call typetraits.name |
18:41:27 | FromGitter | <cabhishek> @Yardanico I thought https://github.com/nim-lang/Nim/blob/devel/lib/pure/typetraits.nim#L34 was suppose to do #2 |
18:42:30 | Yardanico | it's in devel |
18:42:36 | Yardanico | 0.17.2 is "master" branch |
18:42:42 | Yardanico | and devel is current development version |
18:42:47 | Yardanico | there's no this proc in 0.17.2 |
18:44:29 | FromGitter | <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:04 | Yardanico | this type is more efficient that seq AFAIK |
18:47:03 | FromGitter | <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:17 | Yardanico | do you use choosenim? |
18:47:38 | Yardanico | it's not currently possible to bootstrap nim if you use choosenim |
18:47:50 | FromGitter | <cabhishek> @Yardanico yes, I followed `compiling` instructions` from https://github.com/nim-lang/Nim |
18:47:58 | Yardanico | it won't work |
18:48:01 | Yardanico | remove choosenim from your path |
18:48:04 | Yardanico | and try again |
18:48:21 | FromGitter | <cabhishek> oh ok, let me try that! Thaks |
18:48:23 | FromGitter | <cabhishek> thanks |
18:50:26 | hohlerde | is there a wrapper around for libxml2? haven't found anything on nimble or in the documentation so far |
18:50:54 | Yardanico | hohlerde, there's native CSS selector implementation in nim |
18:51:05 | Yardanico | if you're OK with using them |
18:51:30 | Yardanico | https://github.com/GULPF/nimquery |
18:52:00 | * | jjido joined #nim |
18:52:27 | hohlerde | that's cool, but unfortunately I need xpath support |
18:54:04 | Yardanico | hohlerde, well I just mean that you can use css selectors instead of xpath - they're powerful enough :) |
18:54:18 | Yardanico | well there seems to be no libxml2 wrappers written in Nim |
18:54:43 | hohlerde | I'll give the selectors a try, thanks |
18:56:01 | hohlerde | need to muck around with XML signature and encryption |
18:58:15 | FromGitter | <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:18 | FromGitter | <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:29 | Yardanico | it's already in choosenim issues |
18:58:48 | Yardanico | in github repo |
19:00:58 | FromGitter | <cabhishek> 👍 |
19:03:50 | * | devdri joined #nim |
19:14:06 | dom96 | cabhishek: Yardanico: There is another way to work around this, `choosenim show`, then copy the $path/bin/nim into your $nim/compiler directory. |
19:14:46 | dom96 | actually, copy it into the $nim/bin directory :) |
19:14:54 | dom96 | dunno if that's easier |
19:15:11 | * | Elronnd quit (Remote host closed the connection) |
19:17:21 | Yardanico | dom96, would it work? |
19:17:53 | Yardanico | ./koch will probably invoke wrong nim, no? |
19:18:37 | dom96 | it looks in bin/ for the nim exe and if it doesn't exist it uses the one in PATH |
19:18:40 | dom96 | (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:01 | FromGitter | <data-man> He-he, https://github.com/PlanetVaster/OpenBox2D |
19:48:09 | Araq | <data-man> I wrote a Wiki page for you |
19:50:42 | * | jjido joined #nim |
19:53:10 | * | Ven`` joined #nim |
19:54:55 | FromGitter | <data-man> @Araq: Great! Thanks! ⏎ About destructors? https://github.com/nim-lang/Nim/wiki/Destructors |
19:55:11 | Araq | yes. |
19:56:59 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:58:31 | Araq | if you want to make Nim more efficient and better at systems programming implement this for the --newruntime switch |
20:00:29 | FromGitter | <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:24 | FromGitter | <data-man> @Araq: What can we improve firstly? Containers? |
20:06:15 | * | Elronnd joined #nim |
20:06:38 | FromGitter | <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:03 | FromGitter | <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:35 | Araq | of course I looked at pretty much everything dealing with these things |
20:08:43 | Araq | including C++17. |
20:09:30 | Araq | I 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:15 | FromGitter | <RedBeard0531> It was the explicit bitwiseCopy that was throwing me |
20:10:55 | Araq | the bitwiseCopy is just my way of saying "neither =sink nor = is called" |
20:11:18 | Araq | I'm a bit unsure about the soundness of that :-) |
20:12:58 | Araq | but it's a temporary, it stops existing afterwards |
20:13:53 | Araq | so 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:33 | FromGitter | <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:48 | Yardanico | well some compilers have problems with nim |
20:15:51 | Yardanico | or nim has problems with them |
20:16:05 | Yardanico | e.g. if you use clang and compile to c++ you can't use SSL |
20:16:42 | FromGitter | <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:57 | subsetpark | What was times.fromSeconds deprecated in favor of? |
20:17:08 | FromGitter | <RedBeard0531> fromUnix IIRC |
20:17:56 | Araq | data-man: I thougth you would implement --newruntime |
20:18:38 | Araq | or maybe RedBeard0531 |
20:19:44 | FromGitter | <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:21 | Araq | hmmm maybe I should grow a tentacle beard like Davy Jones |
20:20:45 | FromGitter | <RedBeard0531> Hah, I'm working on mine :) |
20:21:51 | Araq | type maps are slow |
20:21:52 | FromGitter | <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:30 | FromGitter | <data-man> @Araq: What can I say ... I will try. |
20:23:02 | FromGitter | <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:27 | FromGitter | <RedBeard0531> dynamic meaning indirect through fn-ptr |
20:23:41 | Araq | fn-ptr is much faster the last time I benchmarked it |
20:23:53 | FromGitter | <RedBeard0531> fascinating! |
20:24:16 | Araq | plus type maps are not as flexible, how do you say "offset 8 is a pointer depending on some other field" |
20:25:19 | FromGitter | <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:52 | Araq | that means you need another expensive check "Is this pointer REALLY part of the GC'ed heap" |
20:26:04 | FromGitter | <data-man> @Yardanico: openssl can be replaced with mbedtls, for example. |
20:26:24 | Araq | just forget about Boehm, even if it's faster it doesn't scale |
20:26:25 | Yardanico | well I know, but probably it's better to be be fixed in codegen :) |
20:27:26 | Araq | https://www2.cs.arizona.edu/~collberg/Teaching/553/2011/Resources/pankhuri-handout.pdf |
20:27:35 | FromGitter | <RedBeard0531> Is getStringOfCap/getSeqOfCap supposed to be zeroing memory or not? |
20:33:46 | * | claudiuinberlin joined #nim |
20:37:37 | Araq | supposed 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:34 | FromGitter | <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:17 | FromGitter | <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:34 | Araq | well 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:29 | subsetpark | holy 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:37 | FromGitter | <GULPF> I think there is something wrong with testament. It exists with success even if there is a failing test. |
23:08:38 | FromGitter | <GULPF> https://travis-ci.org/nim-lang/Nim/jobs/324825877 |
23:10:22 | FromGitter | <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:10 | Araq | GULPF I think that's a test that is supposed to fail |
23:21:34 | FromGitter | <GULPF> I don't think so, testament exists with failure when I only run the failing test |
23:22:01 | FromGitter | <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:57 | Araq | strange |
23:23:05 | FromGitter | <GULPF> The test is one of the times tests, so it isn't supposed to fail |
23:23:10 | Araq | RedBeard0531: I think so. |
23:24:32 | Araq | GULPF: 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 () |