00:00:41 | onionhammer | varriount st2 |
00:07:23 | onionhammer | varriount thats okay, thanks |
00:17:20 | * | Demos_ joined #nimrod |
00:20:22 | * | Demos quit (Ping timeout: 244 seconds) |
00:35:12 | * | brson quit (Quit: leaving) |
00:51:38 | * | Etheco quit (Quit: Leaving) |
01:06:59 | * | mko quit (Quit: Bye.) |
01:08:49 | * | darkf joined #nimrod |
01:11:10 | * | ehaliewicz joined #nimrod |
01:17:38 | * | Trustable quit (Quit: Leaving) |
01:21:54 | * | shodan45 quit (Ping timeout: 244 seconds) |
01:21:55 | * | shodan45_ joined #nimrod |
01:21:55 | * | silven quit (Ping timeout: 244 seconds) |
01:23:49 | * | silven joined #nimrod |
01:45:01 | * | johnsoft quit (Ping timeout: 258 seconds) |
01:45:14 | * | johnsoft joined #nimrod |
01:48:34 | * | ehaliewicz quit (Ping timeout: 250 seconds) |
02:02:51 | * | q66[lap] quit (Read error: Connection reset by peer) |
02:03:33 | * | q66[lap] joined #nimrod |
02:21:59 | * | bjz joined #nimrod |
03:21:27 | * | q66 quit (Quit: Leaving) |
03:22:11 | * | kemet joined #nimrod |
03:22:58 | * | kemet quit (Client Quit) |
03:32:13 | * | AMorpork is now known as AFKMorpork |
03:43:37 | * | saml_ joined #nimrod |
03:53:17 | * | xtagon joined #nimrod |
03:55:17 | * | Jesin quit (Quit: Leaving) |
04:28:21 | * | Jesin joined #nimrod |
04:31:34 | * | vendethiel quit (Ping timeout: 264 seconds) |
04:32:04 | * | vendethiel joined #nimrod |
04:41:28 | * | xenagi joined #nimrod |
04:52:06 | * | nande joined #nimrod |
04:52:57 | * | vendethiel quit (Ping timeout: 244 seconds) |
04:55:44 | * | vendethiel joined #nimrod |
05:17:10 | * | vendethiel quit (Ping timeout: 264 seconds) |
05:18:46 | * | vendethiel joined #nimrod |
05:30:18 | * | rpag quit (Remote host closed the connection) |
05:35:46 | * | Jessin joined #nimrod |
05:38:31 | * | Jesin quit (Ping timeout: 255 seconds) |
05:40:09 | * | vendethiel quit (Ping timeout: 265 seconds) |
05:42:02 | * | vendethiel joined #nimrod |
05:59:04 | * | johnsoft quit (Read error: Connection reset by peer) |
06:07:36 | * | boydgreenfield joined #nimrod |
06:17:32 | * | johnsoft joined #nimrod |
06:18:12 | * | TylerE quit (Ping timeout: 244 seconds) |
06:19:30 | * | TylerE joined #nimrod |
06:24:52 | * | vendethiel quit (Ping timeout: 255 seconds) |
06:25:04 | * | vendethiel joined #nimrod |
06:25:08 | * | xtagon quit (Quit: Leaving) |
06:37:14 | * | xenagi quit (Read error: Connection reset by peer) |
06:44:06 | * | johnsoft quit (Ping timeout: 250 seconds) |
06:44:19 | * | saml_ quit (Quit: Leaving) |
06:45:09 | * | johnsoft joined #nimrod |
06:46:41 | * | vendethiel quit (Ping timeout: 264 seconds) |
06:48:15 | boydgreenfield | Is there an elegant way to automatically re-export all the symbols from a (sub-)module? I’ve been using `include`, but well… that’s kind of hacky as it breaks the individual files themselves (i.e., can’t have redundant imports of the same stdlib modules) |
06:49:02 | Varriount | boydgreenfield: Nothing built-in. |
06:49:35 | boydgreenfield | Varriount: Got it. So a bit of `from submodule/a import blah, yadda, you_too; export blah, yadda, you_too`? |
06:49:44 | boydgreenfield | (is the best pattern?) |
06:49:53 | Varriount | Yeah. |
06:50:39 | Varriount | boydgreenfield: A macro and some mechanism to scan the identifiers in a module would work, but sadly, while we have macros, I don't know of a mechanism that will scan identifiers in a module. |
06:51:56 | Varriount | boydgreenfield: What happens when you try to use the field, fieldPairs, and related iterators on a module name? |
06:52:35 | boydgreenfield | Varriount: Hmm, haven’t tried. Will take a look. |
06:53:06 | Varriount | boydgreenfield: Any particular reason you want to do this? I don't know of any language that lets you *automatically* re-export an entire module easily. |
06:53:09 | boydgreenfield | Varriount: It’s not *that* bad exporting like 6 identifiers, it’s just, well, kind of silly |
06:54:21 | boydgreenfield | Varriount: Just because I have a bunch of functionality that makes sense to logically separate into a few files within the module. In Python, idiom here is just `from views import *` in the module-level __init__ file. Not that that’s beautiful either. |
06:55:52 | boydgreenfield | Varriount: Structure is something like, module.nim, submodule/submodule_a.nim, submodule/submodule_b.nim ideally – just, again, because it’s a package of related functionality that should stay in one module (and code repo), but is awful in a single file (dozens of symbols to export) |
06:56:24 | Varriount | boydgreenfield: Oh, you can do that? I was thinking that, in python, you would have to do something of 'import foo; __all__.extend(foo.__all__)' |
06:57:09 | Varriount | *something along the lines of |
06:57:32 | boydgreenfield | Varriount: No, just from module import *. Very common in some web frameworks and the like. Python of course doesn’t have explicit *-marked exports, so that’s a fairly dangerous thing to do at the top level of the project. But with Nim’s explicit file/module-level exporting, it’d be a lot less dangerous / bad default. |
06:58:09 | boydgreenfield | Python also of course strongly encourages never doing from module import * in actual non-__init__.py code, so the namespacing management burden falls on the importee vs. exporter, as it were. |
06:58:12 | boydgreenfield | *r |
06:58:44 | Varriount | Python also has the benefit of being dynamic. :P |
06:59:24 | Varriount | Well, dynamic in the sense that, most things are dictionaries/hashmaps |
07:03:04 | boydgreenfield | Varriount: Mm, well that shouldn’t really be at play here, and this is a reasonable enough default choice – just curious if there was a lazy way around it :). But writing a macro to do something that’s inherently messy is probably a bit much, so export x, y, z it is for me! |
07:03:10 | * | vendethiel joined #nimrod |
07:03:46 | Varriount | boydgreenfield: At least you're being explicit about what is being exported. |
07:07:24 | Varriount | Araq: It's hard to install buildbot on the vps if I don't have root access. :/ |
07:07:33 | boydgreenfield | Varriount: Agred. |
07:07:38 | boydgreenfield | Varriount: *Agreed. |
07:24:50 | * | vendethiel quit (Ping timeout: 250 seconds) |
07:29:18 | * | girvo joined #nimrod |
07:29:24 | * | girvo quit (Remote host closed the connection) |
07:29:53 | * | girvo joined #nimrod |
07:30:56 | girvo | Hi all |
07:32:13 | girvo | Quick Q: how do you cross-compile for other OS's with nim? |
07:42:06 | girvo | Also, is current master compilable on 64-bit Ubuntu? because she won't compile for me in this Docker container :( |
07:43:01 | girvo | http://hastebin.com/babovomaka.txt |
07:43:29 | girvo | This is the big bit I think: `Error: execution of an external program failed` |
07:47:27 | * | vendethiel joined #nimrod |
07:48:57 | * | boydgreenfield quit (Quit: boydgreenfield) |
07:53:58 | * | boydgreenfield joined #nimrod |
08:01:41 | * | girvo quit (Ping timeout: 255 seconds) |
08:03:49 | * | Demos_ quit (Read error: Connection reset by peer) |
08:08:42 | * | BlaXpirit joined #nimrod |
08:15:30 | boydgreenfield | girvo: What commit are you pulling? |
08:15:48 | boydgreenfield | girvo: I just quite literally built it in 4 docker containers (on CircleCI) |
08:17:02 | boydgreenfield | (last devel commit, full build command was: `if [[ ! -e Nimrod/bin/nim ]]; then git clone -b devel git://github.com/Araq/Nimrod.git && cd Nimrod && git clone -b devel --depth 1 git://github.com/nimrod-code/csources && cd csources && sh build.sh && cd ../ && ./bin/nim c koch && ./koch boot -d:release; fi` |
08:27:39 | * | Jessin is now known as Jesin |
08:39:00 | * | rpag joined #nimrod |
08:52:09 | gokr | Varriount: I am actually contemplating trying out gitlab which also includes gitlab-ci (for our own use). Droid seems a tad "immature" for installing on your own. |
08:59:44 | * | gokr_ quit (Ping timeout: 250 seconds) |
09:02:18 | * | nande quit (Read error: Connection reset by peer) |
09:08:55 | * | boydgreenfield quit (Quit: boydgreenfield) |
09:21:48 | wan | gokr: someone on HN (dbaupp) has a remark on "I missed Nim": https://news.ycombinator.com/item?id=8575372 |
09:30:32 | * | Matthias247 joined #nimrod |
09:55:42 | gokr | wan: Ok, will comment and... fix |
09:59:54 | Araq | gokr: if you want to know how Rust now deals with errors |
10:00:10 | gokr | I still can't find the section in their docs describing it |
10:00:16 | gokr | What the heck do they call it? |
10:00:19 | Araq | there is a try! macro to cut the boilerplate of manual error handling |
10:00:40 | Araq | this essentially reinvents exceptions, but badly |
10:00:48 | Araq | IMO it's horrible |
10:01:05 | Araq | and this Maybe monad stuff simply doesn't work |
10:01:18 | Araq | even Haskell doesn't do that for OutOfMemory, for instance |
10:01:47 | gokr | aargh... I need an account to reply. sigh |
10:02:14 | Araq | well my example is a bit unfair since exception don't work with OOM either, but still |
10:03:21 | gokr | Ok, I commented now. Will see if someone can point me to the proper docs on it. |
10:03:36 | gokr | Now I gotta go out in the cold and build a cover up tent over the boat :) |
10:04:21 | gokr | I will check IRC log, so any comments here about Rust error handling etc - I can take into account when I update the article. later |
10:09:38 | * | gokr quit (Quit: Leaving.) |
10:33:43 | Varriount | Araq: Did you see my earlier request? |
10:33:55 | Araq | nope |
10:34:12 | Varriount | Araq: If you want me to install buildbot on the VPS, I'm going to need root access. |
10:35:06 | * | rpag quit (Quit: Leaving) |
10:37:12 | Varriount | onionhammer: By the way, we need to do a new release of NimLime, the version available on package control is way out of date. |
10:38:30 | Araq | ugh, why don't you already have root access? |
10:39:16 | Araq | I'll give you the root access soon |
11:04:14 | * | Matthias247 quit (Read error: Connection reset by peer) |
11:17:50 | * | irrequietus joined #nimrod |
11:44:56 | * | whoot joined #nimrod |
11:45:13 | Araq | hi whoot welcome |
11:48:19 | * | uku joined #nimrod |
11:49:28 | whoot | hi. have I found a bug - this trivial snippet does not compile: http://pastebin.com/irWNJuKS |
11:49:45 | whoot | oh well, that should have been "I believe I have found a bug". |
11:50:13 | whoot | if I add a call to p() it does compile |
11:50:35 | whoot | disclaimer, I am a total nimrod noob |
11:54:39 | whoot | it does work if the same code is outside the block |
11:58:10 | whoot | I guess I'll just open an issue on github, I was hoping for a quick confirmation that this was really a bug |
12:03:43 | * | q66 joined #nimrod |
12:08:55 | whoot | I'm realizing it may be related to #1641 |
12:10:52 | * | johnsoft quit (Ping timeout: 240 seconds) |
12:11:03 | * | johnsoft joined #nimrod |
12:11:18 | Araq | interesting |
12:11:25 | Araq | yeah report it anyway please |
12:11:41 | whoot | I'm on it. What would be a non-lame title for the bug? |
12:11:55 | whoot | "This code won't compile when inside a block" seems lousy |
12:12:05 | Araq | unused lifted lambda does not compile |
12:12:16 | whoot | that does sound better, thanks |
12:12:39 | NimBot | Araq/Nimrod devel 943d4ee Araq [+0 ±2 -0]: fixed the deadlock that happens when stress testing ToFreeQueue |
12:12:39 | NimBot | Araq/Nimrod devel 511111d Araq [+0 ±1 -0]: TAtomType includes 'bool' |
12:12:39 | NimBot | Araq/Nimrod devel cb976c9 Araq [+0 ±4 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel |
12:15:50 | whoot | done :) |
12:16:57 | Araq | ty |
12:17:28 | Araq | bbl |
12:35:23 | * | uku quit (Ping timeout: 240 seconds) |
13:08:56 | * | BitPuffin joined #nimrod |
13:16:24 | * | gokr joined #nimrod |
13:17:13 | * | gokr quit (Read error: Connection reset by peer) |
13:18:02 | * | gokr joined #nimrod |
13:44:20 | * | rpag joined #nimrod |
14:05:00 | dom96 | Varriount: You now have root. |
14:10:20 | * | AFKMorpork is now known as AMorpork |
14:13:48 | dom96_ | Could we do something similar in Nim? https://news.ycombinator.com/item?id=8576742 |
14:19:56 | Araq | dom96_: isn't this just .emit? |
14:20:10 | Araq | so ... should I rename the repo now? |
14:34:12 | dom96_ | has 0.10.0 been released yet? |
14:34:26 | dom96_ | rename the repo whenever the website says "Nim". |
14:34:42 | Araq | meh |
14:34:46 | rpag | because of the language rename, shouldn't it be nim 0.1.0? :-P |
14:35:07 | Araq | the concept of an incremental release seems to escape you |
14:35:14 | dom96_ | yeah, let's just pretend version 0.1.0 is that far along. |
14:35:19 | dom96_ | people will be amazed |
14:35:25 | rpag | :D |
14:35:59 | Araq | dom96_: we need asyncscgi! |
14:37:02 | dom96_ | Araq: write it |
14:37:18 | Araq | don't have the time |
14:37:54 | dom96_ | somebody needs to get the new design going |
14:37:57 | dom96_ | for the website |
14:38:20 | rpag | i guess the crown beside "nimrod" has to go now |
14:38:35 | dom96_ | nope, that's still our logo. |
14:38:59 | Araq | rpag: no, we're still superior to anything else out there :P |
14:39:28 | rpag | :) |
14:40:12 | rpag | i took it as a reference to a king, but i guess it could just as easily be a reference to a queen |
14:40:44 | Araq | huh? why a queen? |
14:41:19 | rpag | just because a man or woman can have a crown |
14:41:51 | Araq | Nim is obviously male |
14:46:09 | Araq | Varriount: can you please find out why a Nimrod installation can end up finding and using the wrong stdlib? |
14:46:23 | Araq | that's bug no 1 that keeps us from releasing |
14:47:24 | NimBot | Araq/Nimrod devel 830e0c0 Araq [+0 ±9 -0]: the codegen doesn't emit deepCopy for parallel statements |
14:48:20 | Araq | see you later |
14:51:03 | * | saml_ joined #nimrod |
15:04:52 | * | darkf quit (Quit: Leaving) |
15:20:52 | * | Jehan_ joined #nimrod |
15:29:27 | * | EXetoC joined #nimrod |
15:37:54 | def- | Hi guys. Should I try and fix some compile warnings in the standard library with the new renames in devel or will this happen automatically at some point? |
15:46:10 | * | nullmove joined #nimrod |
15:49:51 | * | Trustable joined #nimrod |
15:52:01 | * | BitPuffin quit (Quit: See you on the dark side of the moon!) |
15:55:33 | * | BitPuffin joined #nimrod |
16:01:05 | * | untitaker quit (Ping timeout: 264 seconds) |
16:04:09 | * | uku joined #nimrod |
16:06:27 | * | q66 quit (Quit: Leaving) |
16:06:41 | * | untitaker joined #nimrod |
16:11:02 | * | q66 joined #nimrod |
16:11:57 | def- | another question: how can I set --symbol flags for an entire nimble package? |
16:13:30 | * | dom96_ quit (Ping timeout: 250 seconds) |
16:22:39 | Jehan_ | def-: I suspect that a project config file would be the place to look for. |
16:23:26 | Jehan_ | Hmm, or parent config. |
16:23:41 | Jehan_ | I have to admit that I've never looked closely at how these work. |
16:27:15 | def- | Jehan_: for example the x11 package uses lots of defines: https://github.com/nimrod-code/x11/blob/master/src/x11pragma.nim |
16:27:32 | Jehan_ | def-: Yeah, I know why you want it. |
16:29:06 | def- | i think the project config file only gets used when compiling the project itself, not a program using the project |
16:31:46 | Jehan_ | Yeah, I was actually thinking of what is called the parent config file. |
16:32:42 | Jehan_ | It looks like there isn't actually an option to put it in a package. |
16:33:23 | Jehan_ | It's a bit tricky, what you need is a config file for --path elements, but you only want to read it if you're actually using that path. |
16:33:43 | Jehan_ | An alternative solution would be to have a {.symbol.} pragma. |
16:34:26 | * | uku_ joined #nimrod |
16:35:16 | def- | ok, seems like there is no way to do this properly so far |
16:36:23 | * | uku quit (Ping timeout: 264 seconds) |
16:48:09 | * | Matthias247 joined #nimrod |
16:52:37 | * | BlaXpirit-UA joined #nimrod |
16:55:15 | * | BlaXpirit quit (Ping timeout: 244 seconds) |
17:01:41 | * | whoot quit (Quit: Leaving) |
17:08:22 | * | saml_ quit (Ping timeout: 272 seconds) |
17:11:01 | * | user__ joined #nimrod |
17:11:45 | * | user__ quit (Client Quit) |
17:12:49 | * | nullmove quit (Ping timeout: 244 seconds) |
17:18:49 | * | moritz joined #nimrod |
17:20:06 | moritz | Hi all, I tried to build from the instructions at http://nim-lang.org/download.html#installation-from-github |
17:20:29 | moritz | the second-to-last step fails, there's no bin/nimrod |
17:21:33 | moritz | and when I try with bin/nim instead, I get "Error: execution of an external program failed; rerun with --parallelBuild:1 to see the error message |
17:21:37 | moritz | in the last line |
17:21:47 | moritz | then I tried bin/nim c koch --parallelBuild:1 |
17:21:49 | moritz | and got |
17:21:57 | moritz | Error: arguments can only be given if the '--run' option is selected |
17:23:18 | moritz | ah, the option must come first it seems |
17:25:02 | onionhammer | Varriount sounds good to me - once it's stable again I would say |
17:25:45 | moritz | http://moritz.faui2k3.org/tmp/nimrod-build.log that's what I get from bin/nim --parallelBuild:1 c koch |& tee nimrod-build.log -- any idea what's wrong? |
17:27:51 | * | dom96_ joined #nimrod |
17:36:27 | def- | moritz: the instructions at https://github.com/Araq/Nimrod are more up-to-date i think |
17:36:53 | def- | doesn't help for thisissuethough. what system and c compiler do you have? |
17:37:37 | moritz | def-: gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) |
17:37:57 | moritz | on a fairly Ubuntu (2014.something I believe) |
17:39:05 | def- | that's strange, i just built it with gcc 4.8.3 on linux as well and had no problem |
17:40:54 | * | nullmove joined #nimrod |
17:42:55 | def- | moritz: can you upload the nimcache/koch.c file? |
17:48:05 | moritz | def-: http://moritz.faui2k3.org/tmp/koch.c |
18:07:56 | * | rpag quit (Ping timeout: 265 seconds) |
18:08:52 | * | AMorpork is now known as AFKMorpork |
18:09:54 | Araq | def-: please fix what you can |
18:10:29 | Araq | moritz: it's not bin/nim if you compile via devel |
18:10:38 | Araq | *it's now |
18:18:16 | * | Ven joined #nimrod |
18:19:03 | * | johnsoft quit (Ping timeout: 265 seconds) |
18:19:24 | * | johnsoft joined #nimrod |
18:20:38 | * | rpag joined #nimrod |
18:21:21 | * | Ven quit (Client Quit) |
18:23:46 | moritz | Araq: yes, I've tried that |
18:25:49 | * | dom96_ quit (Ping timeout: 265 seconds) |
18:33:31 | Araq | Jehan_: hey, did you just rewrite my precious threadpool module ... o.O |
18:38:41 | * | dom96_ joined #nimrod |
18:39:43 | Varriount | Araq: What do you want me to do first, set up the buildbot, or try to solve the stdlib mismatch issue? |
18:40:02 | Varriount | Also, how do I replicate the issue? |
18:40:20 | Araq | install some old nimrod and try to compile something with it |
18:40:34 | Varriount | Should it be in my PATH? |
18:40:41 | Araq | no. |
18:41:00 | Varriount | Araq: Then technically, I've already tested it. |
18:41:12 | Araq | well? works for you? |
18:41:37 | Varriount | I have 4 nimrod 'installations' on my system. Or did you mean installation via the installer? |
18:42:21 | Araq | yeah via the installer |
18:42:51 | Araq | but ok, quite possible I'm missing something and the problem is somewhere else |
18:43:27 | * | nullmove quit (Ping timeout: 244 seconds) |
18:45:04 | Varriount | Araq: Could I get a link to an old installer? The downloads page doesn't provide one. |
18:45:24 | def- | moritz: it compiles for me with gcc 4.8.3 by running gcc -c -w -I/home/moritz/src/Nimrod/lib -o nimcache/koch.o nimcache/koch.c |
18:48:42 | Araq | Varriount: http://nimrod-lang.org/download/nimrod_0.9.2.exe |
18:50:54 | Araq | moritz: the error looks as if nimbase.h is not processed / found |
18:51:23 | Araq | maybe nimbase.h does the GCC check slightly wrong? |
18:55:55 | * | shodan45_ quit (Quit: Konversation terminated!) |
18:59:02 | * | dom96_ quit (Ping timeout: 250 seconds) |
19:05:26 | Varriount | dom96: As much as I hate asking for this, how am I supposed to enable login via ssh with a public/private key pair? |
19:06:24 | Varriount | I've added my puTTy key to the authorized_keys file in the .ssh directory, and selected my private key when loggin in using puTTy, however I'm still loggin in via password. |
19:11:17 | * | johnsoft quit (Ping timeout: 264 seconds) |
19:12:10 | * | johnsoft joined #nimrod |
19:17:55 | Jehan_ | Varriount: What are the permissions on the .ssh directory? |
19:18:42 | Varriount | Jehan_: 0700 |
19:18:52 | Jehan_ | That looks correct. |
19:19:23 | Jehan_ | Have you run ssh -v (or whatever the putty equivalent is)? |
19:40:35 | * | uku_ quit (Ping timeout: 244 seconds) |
19:42:08 | Araq | Jehan_: any benchmark results for new threadpool vs old threadpool? |
19:43:42 | Araq | Varriount: run pageant and set your key there |
19:44:17 | * | johnsoft quit (Ping timeout: 264 seconds) |
19:44:44 | Jehan_ | Araq: What little I tested, the difference is essentially nil. Most of the cost is incurred on the OS side of things. |
19:44:45 | * | johnsoft joined #nimrod |
19:45:08 | Jehan_ | Biggest overhead is still during spawn setup time, when the callee unavoidably has to report back to the caller. |
19:45:38 | Jehan_ | That will usually require suspending the calling thread, which is pretty huge. |
19:46:13 | Jehan_ | Necessary because the caller can't continue until arguments have been deep-copied. |
19:48:17 | Araq | yeah, as we suspected |
19:48:23 | Jehan_ | Unfortunately, thread suspension can amount to thousands of clock cycles. |
19:48:50 | Araq | well we can always use a TChannel |
19:48:57 | Araq | and don't suspend at all |
19:49:04 | Araq | costs 2 copies though |
19:49:18 | Jehan_ | It depends on the circumstances and is difficult to predict. |
19:49:34 | Araq | in my tests sometimes that's faster and sometimes the current way is faster |
19:49:40 | Jehan_ | Yeah. |
19:50:14 | Jehan_ | It also depends on whether there are other threads running in parallel that can fill in the gaps. |
19:50:37 | Araq | yeah well that's the idea behind the current scheme |
19:50:45 | Araq | use more threads than cpus |
19:50:58 | Araq | to patch over this problem |
19:51:57 | Jehan_ | Well, that's what one does pretty much everywhere. :) |
19:52:16 | Jehan_ | It does create a problem with backtracking algorithms, though. |
19:52:37 | Jehan_ | Where you may exhaust the thread pool under certain circumstances. |
19:53:27 | Araq | I don't really like all of your improvements though |
19:54:07 | Jehan_ | Oh, as far as I can tell, at least on my machine, the barrier fix does create a small overhead, but so far, that seems unavoidable. Or rather, would require some reengineering to avoid. |
19:54:19 | Jehan_ | Araq: Feel free to. :) |
19:54:32 | Araq | for instance, your barrier is not exception safe |
19:55:08 | onionhammer | is there presently a std lib way of getting the path of the exe |
19:55:10 | Jehan_ | Hmm, I hadn't realized that the generated code wouldn't take care of that. |
19:55:39 | Araq | onionhammer: os.getAppExe |
19:55:57 | Jehan_ | Araq: In the end, take the PR as a suggestion. It was easier for me to write it up in code than in text. |
19:56:07 | Araq | alright |
19:56:35 | Araq | well I should really use github annotations I guess |
19:57:34 | Jehan_ | For what it's worth, it may be nice to add a monitor abstraction to locks.nim for the common case of requiring a (lock, condvar) pair. |
19:58:06 | onionhammer | ah tanks |
19:59:48 | Jehan_ | Would support enter, leave, notify, wait, timedwait operations, and with templates, ideally waitfor(expr) and notifywhen(expr). |
20:02:35 | * | brson joined #nimrod |
20:02:41 | onionhammer | waitfor is in asyncdispatch |
20:02:52 | onionhammer | although i woudl rename it to await |
20:03:25 | Jehan_ | onionhammer: would have different type signature. |
20:04:53 | * | kniteli joined #nimrod |
20:05:16 | Araq | why is notifyCallerSem a threadvar and not part of Worker? |
20:05:23 | Araq | hi kniteli welcome |
20:05:29 | kniteli | Hii |
20:05:39 | kniteli | Just pokin about |
20:06:32 | onionhammer | Jehan_ okay, thought you were talking about just waitfor(expr) |
20:06:43 | Jehan_ | Araq: For simplicity. |
20:06:50 | Jehan_ | onionhammer: monitor.waitfor(expr) |
20:06:59 | * | kniteli quit (Client Quit) |
20:07:07 | Jehan_ | onionhammer: Didn't want to type out the monitor. prefix for each procedure. :) |
20:07:51 | Jehan_ | Araq: Not something that I'm wedded to, but it seemed unnecessary to put it in the worker struct. |
20:08:29 | Araq | well I try to avoid .threadVar until we can get rid of the emulated threadvar hacks |
20:08:47 | * | kniteli joined #nimrod |
20:09:02 | Araq | which might be never as many OSes do not support __thread |
20:13:39 | Araq | why did you move 'result.add callCodegenProc("barrierEnter", barrier)', Jehan_ ? |
20:13:40 | Jehan_ | I think most do, just not necessarily efficiently. |
20:14:33 | Jehan_ | Part of an effort to get rid of the nimArgsPassingDone() callback. |
20:15:26 | Jehan_ | If the barrier is in the callee, you still need the callback. |
20:15:28 | Araq | def-: I dunno why but I can't merge your PR 1645 automatically |
20:17:32 | def- | Probably because I branched from the branch of PR 1643 |
20:19:33 | * | Demos joined #nimrod |
20:19:43 | NimBot | Araq/Nimrod devel ead00d2 Reimer Behrends [+0 ±1 -0]: Properly initialize the stack with emulated thread variables. |
20:19:43 | NimBot | Araq/Nimrod devel c43e7c4 Reimer Behrends [+0 ±1 -0]: Remove references to pthread_mutex_timedlock().... 5 more lines |
20:19:43 | NimBot | Araq/Nimrod devel f34ee51 Andreas Rumpf [+0 ±2 -0]: Merge pull request #1636 from rbehrends/fix-thread-issues... 2 more lines |
20:27:19 | Araq | Jehan_: another significant problem is that it's not correct to omit the deepcopy even in 'parallel' unless we check for deep constness |
20:27:59 | Araq | which we do not do and if we do that it adds another significantly complex effect system analysis |
20:28:27 | Araq | or a more complex type system |
20:29:12 | Araq | we can do it easily for seq[Point] or whatever is used in the convexhull example |
20:29:34 | Araq | but as soon as a 'ref is in there, we need to give up and call deepCopy |
20:30:46 | Araq | the alternative is to document that parallel doesn't perform deepCopy but this means 'parallel' is unsafer than standalone 'spawn' |
20:31:47 | Araq | whereas I wanted that 'parallel' is more limited but safer. |
20:41:12 | Araq | http://invpy.com/camelcase/ |
20:41:54 | * | uku joined #nimrod |
20:42:04 | Araq | hi uku welcome |
20:42:13 | uku | hi |
20:43:31 | Jehan_ | Araq: I was thinking more about cases where the parameters don't require a deepcopy, e.g. int or float, or where they're short enough where it's cost-effective to deepcopy to temp storage, then retrieve from there. |
20:44:26 | Jehan_ | Also, where they're shared. |
20:44:29 | Araq | iirc the codegen optimizes trivial deepCopies to ordinary assignments |
20:45:05 | Araq | I'm not sure I get your point |
20:46:52 | Jehan_ | The thing is, in that case, the callback can be optimized away. |
20:47:29 | Jehan_ | The callback exists because otherwise the caller's heap might change. And, well, to wait for the barrier to start up. |
20:47:45 | * | dom96_ joined #nimrod |
20:47:49 | NimBot | nimrod-code/nimforum new_async 70b409e Dominik Picheta [+0 ±1 -0]: Design changes for thread view. |
20:48:29 | Araq | it's not a callback, but yes, now I get it. |
20:48:54 | Araq | not sure if it's woth the effort |
20:50:28 | Jehan_ | Call it a notification. But because of that, the calling thread immediately suspends to wait for the spawned task to get there. |
20:50:39 | Jehan_ | Which is generally pretty expensive. |
20:51:03 | Araq | yes. that's *the* problem with my design |
20:53:29 | Jehan_ | I'd call it a tradeoff. |
20:55:17 | * | johnsoft quit (Ping timeout: 245 seconds) |
20:55:40 | * | johnsoft joined #nimrod |
20:56:01 | Jehan_ | You can always go for two copies; plus, I'd still advise having support for multiple shared heaps. |
20:57:08 | Jehan_ | I.e. ones that can be individually locked and thus allow for sequential garbage collection. |
20:57:49 | * | gokr_ joined #nimrod |
21:03:36 | * | AlexLibman joined #nimrod |
21:07:19 | Araq | ok, please elaborate |
21:07:22 | Araq | hi AlexLibman welcome back |
21:07:53 | AlexLibman | Hi. Just stopping by for a second. |
21:08:49 | * | Roin quit (Ping timeout: 258 seconds) |
21:08:50 | AlexLibman | So it's "Nim" now? 8-D |
21:09:30 | Araq | it's really great how much you guys contributed after the license change... :P |
21:11:40 | * | Roin joined #nimrod |
21:11:46 | dom96 | lol |
21:12:03 | * | AlexLibman hides in shame. |
21:13:50 | Jehan_ | Hehe. :) |
21:14:10 | Jehan_ | Araq: Basically, it would work like thread-local heaps without actual threads attached to them. |
21:14:45 | Jehan_ | The current thread would be able to "enter" such a heap (through some primitive) and acquire a lock for the duration. |
21:15:20 | Jehan_ | If you do it right, references to the inside of the heap can't escape, so you can do GC just knowing the current thread's stack and the state of that heap. |
21:16:51 | Varriount | Eh, dom96, any reason PermitRootLogin is allowed on the VPS? |
21:16:54 | * | AlexLibman looks at https://www.hover.com/domains/results?q=nim |
21:17:12 | Varriount | (for ssh) |
21:18:00 | AlexLibman | I think with a domain name like nim.la(nguage) popularity will explode. 8-) |
21:20:31 | Varriount | dom96: Also, I really think the VPS should be updated and restarted. It's not safe to have an out-of-date system running. |
21:20:46 | Araq | Jehan_: ah yeah I remember |
21:24:53 | dom96 | Varriount: Stop worrying about security and focus on getting the build bot running. |
21:27:27 | Varriount | ... said the person who is about to have his server hacked. |
21:29:51 | AlexLibman | The second "git clone" line in the readme points to non-existing location, using https://github.com/nimrod-code/csources.git |
21:32:15 | * | irrequietus quit () |
21:33:05 | * | kniteli quit (Ping timeout: 272 seconds) |
21:35:22 | dom96 | AlexLibman: That looks correct to me. |
21:35:45 | dom96 | oh I see what you mean. |
21:36:05 | dom96 | Somebody went a bit overboard with replacing 'nimrod' with 'nim' heh. |
21:36:10 | AlexLibman | https://github.com/Araq/Nimrod readme says `git clone --depth 1 git://github.com/nim-code/csources` |
21:36:31 | AlexLibman | I love nim, I just didn't do much coding in the last few years... |
21:36:54 | * | Trustable quit (Quit: Leaving) |
21:36:56 | Araq | dom96: that was me. because I cannot update everything as a single transaction |
21:39:40 | Araq | Jehan_: any opinion on the 'deepCopy in parallel' design issue? |
21:40:00 | Jehan_ | Araq: Not sure what you mean by that? |
21:40:10 | dom96 | Araq: What do you mean by single transaction? |
21:40:55 | Araq | dom96: just another way of saying "I want incremental releases" |
21:41:54 | * | superfunc joined #nimrod |
21:41:57 | Araq | Jehan_: well I patched the codegen to not produce deepCopy calls for data passed to spawn within a parallel section. but it's not safe. |
21:42:48 | AlexLibman | Also, I recently wrote a benchmark for parsing a large json file, the most time-intensive part of a project I was starting. luajit did it in 1.29 seconds, node in 1.94, coffee in 2.08, pypy in 2.09, sh-jq in 2.21, nimrod in 2.95, go in 3.59... |
21:43:07 | Jehan_ | Araq: Yeah, that's unfortunately impossible. |
21:43:17 | AlexLibman | (With: "--opt:speed --debugger:off --obj_checks:off --field_checks:off --range_checks:off --bound_checks:off --overflow_checks:off --assertions:off --stacktrace:off --linetrace:off --line_dir:off --dead_code_elim:on" ) |
21:43:26 | * | superfunc quit (Client Quit) |
21:43:38 | dom96 | Araq: now I am completely lost about what you're talking about lol |
21:43:39 | Jehan_ | You can only avoid it for data that doesn't require a deepcopy or using a two-stage approach (copy to temporary location first, then from temporary location to callee thread). |
21:43:44 | * | superfunc joined #nimrod |
21:44:47 | Araq | Jehan_: well you *can* do it for seq[int] for instance |
21:45:03 | Araq | because the barrier ensures the pointer cannot go out of scope |
21:45:16 | Araq | and so the seq won't be GC'ed |
21:45:20 | Jehan_ | But even then the contents can change. |
21:45:26 | Jehan_ | Leading to rather undefined semantics. |
21:45:34 | Araq | yes |
21:45:37 | * | kniteli joined #nimrod |
21:46:55 | AlexLibman | (Or 12.28 seconds for nim v0.10.1 w/o optimizations.) |
21:48:26 | * | AFKMorpork is now known as AMorpork |
21:55:05 | Araq | Jehan_: we can check that the contents do not change too though. the beauty of 'parallel' is that it is structured control flow. |
21:55:59 | Jehan_ | Araq: How? There would be an aliasing problem, I'd think. |
21:56:58 | Araq | you can check for aliasing at runtime |
21:57:59 | * | AMorpork is now known as AFKMorpork |
21:58:04 | Jehan_ | Not sure how that would work? |
21:59:43 | * | AlexLibman quit (Ping timeout: 246 seconds) |
22:02:20 | Araq | er .. so our json parsing still kind of sucks |
22:06:13 | * | uku quit (Ping timeout: 265 seconds) |
22:06:58 | Araq | Jehan_: well it's complex and depends on what exactly you want to prevent |
22:08:12 | Jehan_ | Araq: Basically, the receiving thread should get data that's structurally equal to the data in the originating thread at the time of the spawn call. |
22:09:33 | Araq | so what do you suggest? revert it back to 'deepCopy' and have some annotation that prevents it? |
22:09:55 | Araq | hrm that may actually be a good idea |
22:10:44 | dom96 | hrm, what happened to the compiler output? The commands it executes are no longer echoed? |
22:12:26 | Araq | dom96: there was a PR to make the output nicer |
22:12:35 | dom96 | cool |
22:15:54 | Araq | dom96: why does nimble now use /tmp ? |
22:16:19 | dom96 | it has been using that since forever. |
22:17:44 | Araq | also can it be used without 'git'? |
22:18:13 | dom96 | Yes. It can be used locally and with hg. |
22:22:23 | Araq | so how do we add it to Nim? |
22:22:34 | Varriount | Araq: How does the json parser suck? |
22:22:59 | Araq | Varriount: look at the benchmark results that AlexLibman posted |
22:23:31 | * | brson quit (Quit: leaving) |
22:24:06 | * | brson joined #nimrod |
22:24:50 | Varriount | Araq: Can I get a link? |
22:25:34 | dom96 | Araq: just put it together with the nim binary |
22:25:58 | * | kniteli quit (Ping timeout: 265 seconds) |
22:26:07 | dom96 | It would be better to install it separately though. |
22:26:27 | * | brson quit (Client Quit) |
22:26:40 | * | brson joined #nimrod |
22:26:47 | Araq | Varriount: no link. read the logs. |
22:27:08 | Araq | dom96: what do we do with the source based installation? |
22:27:56 | dom96 | Araq: nimble can install itself. |
22:28:45 | dom96 | as long as there is a working nim compiler in the PATH and it has access to its source code |
22:29:35 | * | q66[lap] quit (Read error: Connection reset by peer) |
22:29:38 | superfunc | dom96: that PR is awesome |
22:29:52 | superfunc | I just noticed the cleaned up output one day, great surprise |
22:29:53 | Varriount | Araq: Ouch. I see. Nimrod should take less than 2 seconds definately. |
22:29:59 | Jehan_ | The problem on the forum is really something that happens in general you run Nim from a non-local directory. |
22:30:12 | Jehan_ | If that's what you're talking about. |
22:30:29 | Jehan_ | Because -L./something won't work then. |
22:30:30 | dom96 | superfunc: yeah, it definitely cuts down on the noise. |
22:30:34 | Varriount | Or rather, the code could be optimized to run in less than 2 seconds. |
22:30:49 | dom96 | I hope there is a way to get what it executes back. |
22:31:33 | Araq | Varriount: depends on the data though. we optimized it once against python's C based parser |
22:31:39 | * | q66[lap] joined #nimrod |
22:32:11 | Araq | but the data was full of megabyte long string literals iirc |
22:33:06 | Araq | dom96: with --parallelBuild:1 it should be back to its old output |
22:33:26 | Araq | dom96: how does Nimble installing itself help when you don't have a Nimble? |
22:34:05 | dom96 | Araq: You can bundle a prebuilt Nimble binary with its source code and install it that way. |
22:36:22 | * | uku joined #nimrod |
22:37:27 | * | kniteli joined #nimrod |
22:37:57 | Varriount | Um, someone removed the executable bit from build.sh in the csources repo (I think) |
22:42:16 | Araq | Varriount: I usually do 'sh build.sh' anyway. the / is too hard to type |
22:43:06 | Varriount | Araq: Yes.. but this is for the buildbot. |
22:43:09 | Araq | dom96: well but we don't ship prebuild binaries in the source based installation |
22:43:30 | Varriount | It makes it easier for me to execute batch and sh files without having to care about platform differences |
22:44:46 | Araq | dom96: I'll include Nimble's code though and adapt the scripts to compile it |
22:45:30 | Varriount | Huh. Virtualbox even lets the VM's get information as to how charged my laptop battery is. Neat. |
22:45:40 | dom96 | Araq: Could you install it into ~/.nimble? |
22:49:17 | Araq | dom96: er no, nimble should be in $nim/bin so that one only has to add 1 thing to the path |
22:49:26 | Varriount | Araq: So, what do you want me to do, have the buildbot ignore when the executable bit isn't set on build.sh, or fail? |
22:50:19 | dom96 | Araq: You will need to add ~/.nimble/bin to the path anyway. |
22:52:10 | Varriount | Araq: If it makes you feel any better, any benchmarks involving mechanisms use disk IO should really be run under a ramdisk. |
22:53:45 | Varriount | It prevents wierd IO idiosyncrocies from muddling the results. |
22:54:02 | Jehan_ | Varriount: Yeah, but … most benchmarks are pretty meaningless to begin with. |
22:54:21 | Jehan_ | Even running them on a ramdisk won't save them. |
23:01:07 | * | kniteli quit (Ping timeout: 272 seconds) |
23:01:20 | wan | dom96: if you want to see the old output (if you really want to), the switch is --verbosity:2 |
23:02:17 | dom96 | wan: awesome |
23:03:26 | * | fowl joined #nimrod |
23:12:50 | * | kniteli joined #nimrod |
23:13:44 | onionhammer | it would be nice if nimble was in the nim/bin |
23:14:10 | onionhammer | also would be cool if standard tools were built along with the normal koch -d:release call |
23:14:29 | onionhammer | i.e c2nim, nimble etc |
23:15:04 | fowl | its just a few more lines to install nimble |
23:15:57 | fowl | git clone&& pushd nimble && nim c -r src/nimble install nimble&& popd && rm -rf nimble |
23:16:43 | fowl | or nim c src/nimble; src/nimble install |
23:17:16 | * | kniteli quit (Remote host closed the connection) |
23:24:29 | gokr | Varriount: Not sure which JSON module that AlexLibman used, but here is a list of most, and mp-CJSON is the fastest: http://lua-users.org/wiki/JsonModules |
23:24:51 | gokr | So if that's the one used, aka Lua-CJSON, then its pure C. |
23:24:54 | gokr | gnite |
23:31:48 | Varriount | dom96: Since the buildbot daemon requires a system restart anyway, may I restart the VPS? |
23:32:51 | dom96 | sure |
23:41:26 | Varriount | dom96: Which URL should the build master's web page be visible at? |
23:42:04 | dom96 | Varriount: How are you setting it up? Through nginx? |
23:42:30 | Varriount | Well, I could do that, with nginx acting as a proxy. |
23:42:48 | Varriount | The build master runs its own small webserver |
23:43:11 | dom96 | put the web server on some random port |
23:43:45 | Varriount | RIght now it's on localhost:8010 |
23:43:57 | dom96 | that's fine |
23:44:36 | Araq | Varriount: ignore the exec bit |
23:46:15 | Varriount | dom96: Is there already a proxy set up to make that visible to the outside world? |
23:46:55 | Araq | dom96: why the ~/.nimble? |
23:47:03 | Araq | why does it have to be in PATH? |
23:47:25 | dom96 | Varriount: don't think so. Just make 8010 external. |
23:47:51 | dom96 | Araq: ~/.nimble/bin |
23:47:55 | dom96 | has to be in path |
23:47:58 | Araq | why? |
23:48:03 | dom96 | that's where binary packages' binaries end up |
23:48:24 | Araq | ah, damn. this even makes sense. |
23:49:05 | Araq | well I'll add additional source based packages to the installer |
23:49:44 | dom96 | c2nim shouldn't even be a part of the nim package. |
23:49:51 | dom96 | people who want it should install it via nimble |
23:53:39 | onionhammer | also, I still think nimble should have the concept of 'sub' lists |
23:54:22 | onionhammer | so I could host my own list of nimble repos which would show up via search :) |
23:59:19 | * | uber quit (Ping timeout: 265 seconds) |