<< 08-11-2014 >>

00:00:41onionhammervarriount st2
00:07:23onionhammervarriount 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:15boydgreenfieldIs 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:02Varriountboydgreenfield: Nothing built-in.
06:49:35boydgreenfieldVarriount: Got it. So a bit of `from submodule/a import blah, yadda, you_too; export blah, yadda, you_too`?
06:49:44boydgreenfield(is the best pattern?)
06:49:53VarriountYeah.
06:50:39Varriountboydgreenfield: 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:56Varriountboydgreenfield: What happens when you try to use the field, fieldPairs, and related iterators on a module name?
06:52:35boydgreenfieldVarriount: Hmm, haven’t tried. Will take a look.
06:53:06Varriountboydgreenfield: 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:09boydgreenfieldVarriount: It’s not *that* bad exporting like 6 identifiers, it’s just, well, kind of silly
06:54:21boydgreenfieldVarriount: 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:52boydgreenfieldVarriount: 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:24Varriountboydgreenfield: 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:09Varriount*something along the lines of
06:57:32boydgreenfieldVarriount: 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:09boydgreenfieldPython 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:12boydgreenfield*r
06:58:44VarriountPython also has the benefit of being dynamic. :P
06:59:24VarriountWell, dynamic in the sense that, most things are dictionaries/hashmaps
07:03:04boydgreenfieldVarriount: 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:46Varriountboydgreenfield: At least you're being explicit about what is being exported.
07:07:24VarriountAraq: It's hard to install buildbot on the vps if I don't have root access. :/
07:07:33boydgreenfieldVarriount: Agred.
07:07:38boydgreenfieldVarriount: *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:56girvoHi all
07:32:13girvoQuick Q: how do you cross-compile for other OS's with nim?
07:42:06girvoAlso, is current master compilable on 64-bit Ubuntu? because she won't compile for me in this Docker container :(
07:43:01girvohttp://hastebin.com/babovomaka.txt
07:43:29girvoThis 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:30boydgreenfieldgirvo: What commit are you pulling?
08:15:48boydgreenfieldgirvo: I just quite literally built it in 4 docker containers (on CircleCI)
08:17:02boydgreenfield(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:09gokrVarriount: 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:48wangokr: 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:42gokrwan: Ok, will comment and... fix
09:59:54Araqgokr: if you want to know how Rust now deals with errors
10:00:10gokrI still can't find the section in their docs describing it
10:00:16gokrWhat the heck do they call it?
10:00:19Araqthere is a try! macro to cut the boilerplate of manual error handling
10:00:40Araqthis essentially reinvents exceptions, but badly
10:00:48AraqIMO it's horrible
10:01:05Araqand this Maybe monad stuff simply doesn't work
10:01:18Araqeven Haskell doesn't do that for OutOfMemory, for instance
10:01:47gokraargh... I need an account to reply. sigh
10:02:14Araqwell my example is a bit unfair since exception don't work with OOM either, but still
10:03:21gokrOk, I commented now. Will see if someone can point me to the proper docs on it.
10:03:36gokrNow I gotta go out in the cold and build a cover up tent over the boat :)
10:04:21gokrI 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:43VarriountAraq: Did you see my earlier request?
10:33:55Araqnope
10:34:12VarriountAraq: 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:12Varriountonionhammer: 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:30Araqugh, why don't you already have root access?
10:39:16AraqI'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:13Araqhi whoot welcome
11:48:19*uku joined #nimrod
11:49:28whoothi. have I found a bug - this trivial snippet does not compile: http://pastebin.com/irWNJuKS
11:49:45whootoh well, that should have been "I believe I have found a bug".
11:50:13whootif I add a call to p() it does compile
11:50:35whootdisclaimer, I am a total nimrod noob
11:54:39whootit does work if the same code is outside the block
11:58:10whootI 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:55whootI'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:18Araqinteresting
12:11:25Araqyeah report it anyway please
12:11:41whootI'm on it. What would be a non-lame title for the bug?
12:11:55whoot"This code won't compile when inside a block" seems lousy
12:12:05Araqunused lifted lambda does not compile
12:12:16whootthat does sound better, thanks
12:12:39NimBotAraq/Nimrod devel 943d4ee Araq [+0 ±2 -0]: fixed the deadlock that happens when stress testing ToFreeQueue
12:12:39NimBotAraq/Nimrod devel 511111d Araq [+0 ±1 -0]: TAtomType includes 'bool'
12:12:39NimBotAraq/Nimrod devel cb976c9 Araq [+0 ±4 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
12:15:50whootdone :)
12:16:57Araqty
12:17:28Araqbbl
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:00dom96Varriount: You now have root.
14:10:20*AFKMorpork is now known as AMorpork
14:13:48dom96_Could we do something similar in Nim? https://news.ycombinator.com/item?id=8576742
14:19:56Araqdom96_: isn't this just .emit?
14:20:10Araqso ... should I rename the repo now?
14:34:12dom96_has 0.10.0 been released yet?
14:34:26dom96_rename the repo whenever the website says "Nim".
14:34:42Araqmeh
14:34:46rpagbecause of the language rename, shouldn't it be nim 0.1.0? :-P
14:35:07Araqthe concept of an incremental release seems to escape you
14:35:14dom96_yeah, let's just pretend version 0.1.0 is that far along.
14:35:19dom96_people will be amazed
14:35:25rpag:D
14:35:59Araqdom96_: we need asyncscgi!
14:37:02dom96_Araq: write it
14:37:18Araqdon't have the time
14:37:54dom96_somebody needs to get the new design going
14:37:57dom96_for the website
14:38:20rpagi guess the crown beside "nimrod" has to go now
14:38:35dom96_nope, that's still our logo.
14:38:59Araqrpag: no, we're still superior to anything else out there :P
14:39:28rpag:)
14:40:12rpagi took it as a reference to a king, but i guess it could just as easily be a reference to a queen
14:40:44Araqhuh? why a queen?
14:41:19rpagjust because a man or woman can have a crown
14:41:51AraqNim is obviously male
14:46:09AraqVarriount: can you please find out why a Nimrod installation can end up finding and using the wrong stdlib?
14:46:23Araqthat's bug no 1 that keeps us from releasing
14:47:24NimBotAraq/Nimrod devel 830e0c0 Araq [+0 ±9 -0]: the codegen doesn't emit deepCopy for parallel statements
14:48:20Araqsee 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:54def-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:57def-another question: how can I set --symbol flags for an entire nimble package?
16:13:30*dom96_ quit (Ping timeout: 250 seconds)
16:22:39Jehan_def-: I suspect that a project config file would be the place to look for.
16:23:26Jehan_Hmm, or parent config.
16:23:41Jehan_I have to admit that I've never looked closely at how these work.
16:27:15def-Jehan_: for example the x11 package uses lots of defines: https://github.com/nimrod-code/x11/blob/master/src/x11pragma.nim
16:27:32Jehan_def-: Yeah, I know why you want it.
16:29:06def-i think the project config file only gets used when compiling the project itself, not a program using the project
16:31:46Jehan_Yeah, I was actually thinking of what is called the parent config file.
16:32:42Jehan_It looks like there isn't actually an option to put it in a package.
16:33:23Jehan_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:43Jehan_An alternative solution would be to have a {.symbol.} pragma.
16:34:26*uku_ joined #nimrod
16:35:16def-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:06moritzHi all, I tried to build from the instructions at http://nim-lang.org/download.html#installation-from-github
17:20:29moritzthe second-to-last step fails, there's no bin/nimrod
17:21:33moritzand 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:37moritzin the last line
17:21:47moritzthen I tried bin/nim c koch --parallelBuild:1
17:21:49moritzand got
17:21:57moritzError: arguments can only be given if the '--run' option is selected
17:23:18moritzah, the option must come first it seems
17:25:02onionhammerVarriount sounds good to me - once it's stable again I would say
17:25:45moritzhttp://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:27def-moritz: the instructions at https://github.com/Araq/Nimrod are more up-to-date i think
17:36:53def-doesn't help for thisissuethough. what system and c compiler do you have?
17:37:37moritzdef-: gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
17:37:57moritzon a fairly Ubuntu (2014.something I believe)
17:39:05def-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:55def-moritz: can you upload the nimcache/koch.c file?
17:48:05moritzdef-: 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:54Araqdef-: please fix what you can
18:10:29Araqmoritz: it's not bin/nim if you compile via devel
18:10:38Araq*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:46moritzAraq: yes, I've tried that
18:25:49*dom96_ quit (Ping timeout: 265 seconds)
18:33:31AraqJehan_: hey, did you just rewrite my precious threadpool module ... o.O
18:38:41*dom96_ joined #nimrod
18:39:43VarriountAraq: What do you want me to do first, set up the buildbot, or try to solve the stdlib mismatch issue?
18:40:02VarriountAlso, how do I replicate the issue?
18:40:20Araqinstall some old nimrod and try to compile something with it
18:40:34VarriountShould it be in my PATH?
18:40:41Araqno.
18:41:00VarriountAraq: Then technically, I've already tested it.
18:41:12Araqwell? works for you?
18:41:37VarriountI have 4 nimrod 'installations' on my system. Or did you mean installation via the installer?
18:42:21Araqyeah via the installer
18:42:51Araqbut ok, quite possible I'm missing something and the problem is somewhere else
18:43:27*nullmove quit (Ping timeout: 244 seconds)
18:45:04VarriountAraq: Could I get a link to an old installer? The downloads page doesn't provide one.
18:45:24def-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:42AraqVarriount: http://nimrod-lang.org/download/nimrod_0.9.2.exe
18:50:54Araqmoritz: the error looks as if nimbase.h is not processed / found
18:51:23Araqmaybe 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:26Varriountdom96: 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:24VarriountI'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:55Jehan_Varriount: What are the permissions on the .ssh directory?
19:18:42VarriountJehan_: 0700
19:18:52Jehan_That looks correct.
19:19:23Jehan_Have you run ssh -v (or whatever the putty equivalent is)?
19:40:35*uku_ quit (Ping timeout: 244 seconds)
19:42:08AraqJehan_: any benchmark results for new threadpool vs old threadpool?
19:43:42AraqVarriount: run pageant and set your key there
19:44:17*johnsoft quit (Ping timeout: 264 seconds)
19:44:44Jehan_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:08Jehan_Biggest overhead is still during spawn setup time, when the callee unavoidably has to report back to the caller.
19:45:38Jehan_That will usually require suspending the calling thread, which is pretty huge.
19:46:13Jehan_Necessary because the caller can't continue until arguments have been deep-copied.
19:48:17Araqyeah, as we suspected
19:48:23Jehan_Unfortunately, thread suspension can amount to thousands of clock cycles.
19:48:50Araqwell we can always use a TChannel
19:48:57Araqand don't suspend at all
19:49:04Araqcosts 2 copies though
19:49:18Jehan_It depends on the circumstances and is difficult to predict.
19:49:34Araqin my tests sometimes that's faster and sometimes the current way is faster
19:49:40Jehan_Yeah.
19:50:14Jehan_It also depends on whether there are other threads running in parallel that can fill in the gaps.
19:50:37Araqyeah well that's the idea behind the current scheme
19:50:45Araquse more threads than cpus
19:50:58Araqto patch over this problem
19:51:57Jehan_Well, that's what one does pretty much everywhere. :)
19:52:16Jehan_It does create a problem with backtracking algorithms, though.
19:52:37Jehan_Where you may exhaust the thread pool under certain circumstances.
19:53:27AraqI don't really like all of your improvements though
19:54:07Jehan_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:19Jehan_Araq: Feel free to. :)
19:54:32Araqfor instance, your barrier is not exception safe
19:55:08onionhammeris there presently a std lib way of getting the path of the exe
19:55:10Jehan_Hmm, I hadn't realized that the generated code wouldn't take care of that.
19:55:39Araqonionhammer: os.getAppExe
19:55:57Jehan_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:07Araqalright
19:56:35Araqwell I should really use github annotations I guess
19:57:34Jehan_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:06onionhammerah tanks
19:59:48Jehan_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:41onionhammerwaitfor is in asyncdispatch
20:02:52onionhammeralthough i woudl rename it to await
20:03:25Jehan_onionhammer: would have different type signature.
20:04:53*kniteli joined #nimrod
20:05:16Araqwhy is notifyCallerSem a threadvar and not part of Worker?
20:05:23Araqhi kniteli welcome
20:05:29kniteliHii
20:05:39kniteliJust pokin about
20:06:32onionhammerJehan_ okay, thought you were talking about just waitfor(expr)
20:06:43Jehan_Araq: For simplicity.
20:06:50Jehan_onionhammer: monitor.waitfor(expr)
20:06:59*kniteli quit (Client Quit)
20:07:07Jehan_onionhammer: Didn't want to type out the monitor. prefix for each procedure. :)
20:07:51Jehan_Araq: Not something that I'm wedded to, but it seemed unnecessary to put it in the worker struct.
20:08:29Araqwell I try to avoid .threadVar until we can get rid of the emulated threadvar hacks
20:08:47*kniteli joined #nimrod
20:09:02Araqwhich might be never as many OSes do not support __thread
20:13:39Araqwhy did you move 'result.add callCodegenProc("barrierEnter", barrier)', Jehan_ ?
20:13:40Jehan_I think most do, just not necessarily efficiently.
20:14:33Jehan_Part of an effort to get rid of the nimArgsPassingDone() callback.
20:15:26Jehan_If the barrier is in the callee, you still need the callback.
20:15:28Araqdef-: I dunno why but I can't merge your PR 1645 automatically
20:17:32def-Probably because I branched from the branch of PR 1643
20:19:33*Demos joined #nimrod
20:19:43NimBotAraq/Nimrod devel ead00d2 Reimer Behrends [+0 ±1 -0]: Properly initialize the stack with emulated thread variables.
20:19:43NimBotAraq/Nimrod devel c43e7c4 Reimer Behrends [+0 ±1 -0]: Remove references to pthread_mutex_timedlock().... 5 more lines
20:19:43NimBotAraq/Nimrod devel f34ee51 Andreas Rumpf [+0 ±2 -0]: Merge pull request #1636 from rbehrends/fix-thread-issues... 2 more lines
20:27:19AraqJehan_: another significant problem is that it's not correct to omit the deepcopy even in 'parallel' unless we check for deep constness
20:27:59Araqwhich we do not do and if we do that it adds another significantly complex effect system analysis
20:28:27Araqor a more complex type system
20:29:12Araqwe can do it easily for seq[Point] or whatever is used in the convexhull example
20:29:34Araqbut as soon as a 'ref is in there, we need to give up and call deepCopy
20:30:46Araqthe alternative is to document that parallel doesn't perform deepCopy but this means 'parallel' is unsafer than standalone 'spawn'
20:31:47Araqwhereas I wanted that 'parallel' is more limited but safer.
20:41:12Araqhttp://invpy.com/camelcase/
20:41:54*uku joined #nimrod
20:42:04Araqhi uku welcome
20:42:13ukuhi
20:43:31Jehan_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:26Jehan_Also, where they're shared.
20:44:29Araqiirc the codegen optimizes trivial deepCopies to ordinary assignments
20:45:05AraqI'm not sure I get your point
20:46:52Jehan_The thing is, in that case, the callback can be optimized away.
20:47:29Jehan_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:49NimBotnimrod-code/nimforum new_async 70b409e Dominik Picheta [+0 ±1 -0]: Design changes for thread view.
20:48:29Araqit's not a callback, but yes, now I get it.
20:48:54Araqnot sure if it's woth the effort
20:50:28Jehan_Call it a notification. But because of that, the calling thread immediately suspends to wait for the spawned task to get there.
20:50:39Jehan_Which is generally pretty expensive.
20:51:03Araqyes. that's *the* problem with my design
20:53:29Jehan_I'd call it a tradeoff.
20:55:17*johnsoft quit (Ping timeout: 245 seconds)
20:55:40*johnsoft joined #nimrod
20:56:01Jehan_You can always go for two copies; plus, I'd still advise having support for multiple shared heaps.
20:57:08Jehan_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:19Araqok, please elaborate
21:07:22Araqhi AlexLibman welcome back
21:07:53AlexLibmanHi. Just stopping by for a second.
21:08:49*Roin quit (Ping timeout: 258 seconds)
21:08:50AlexLibmanSo it's "Nim" now? 8-D
21:09:30Araqit's really great how much you guys contributed after the license change... :P
21:11:40*Roin joined #nimrod
21:11:46dom96lol
21:12:03*AlexLibman hides in shame.
21:13:50Jehan_Hehe. :)
21:14:10Jehan_Araq: Basically, it would work like thread-local heaps without actual threads attached to them.
21:14:45Jehan_The current thread would be able to "enter" such a heap (through some primitive) and acquire a lock for the duration.
21:15:20Jehan_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:51VarriountEh, 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:12Varriount(for ssh)
21:18:00AlexLibmanI think with a domain name like nim.la(nguage) popularity will explode. 8-)
21:20:31Varriountdom96: 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:46AraqJehan_: ah yeah I remember
21:24:53dom96Varriount: Stop worrying about security and focus on getting the build bot running.
21:27:27Varriount... said the person who is about to have his server hacked.
21:29:51AlexLibmanThe 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:22dom96AlexLibman: That looks correct to me.
21:35:45dom96oh I see what you mean.
21:36:05dom96Somebody went a bit overboard with replacing 'nimrod' with 'nim' heh.
21:36:10AlexLibmanhttps://github.com/Araq/Nimrod readme says `git clone --depth 1 git://github.com/nim-code/csources`
21:36:31AlexLibmanI love nim, I just didn't do much coding in the last few years...
21:36:54*Trustable quit (Quit: Leaving)
21:36:56Araqdom96: that was me. because I cannot update everything as a single transaction
21:39:40AraqJehan_: any opinion on the 'deepCopy in parallel' design issue?
21:40:00Jehan_Araq: Not sure what you mean by that?
21:40:10dom96Araq: What do you mean by single transaction?
21:40:55Araqdom96: just another way of saying "I want incremental releases"
21:41:54*superfunc joined #nimrod
21:41:57AraqJehan_: 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:48AlexLibmanAlso, 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:07Jehan_Araq: Yeah, that's unfortunately impossible.
21:43:17AlexLibman(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:38dom96Araq: now I am completely lost about what you're talking about lol
21:43:39Jehan_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:47AraqJehan_: well you *can* do it for seq[int] for instance
21:45:03Araqbecause the barrier ensures the pointer cannot go out of scope
21:45:16Araqand so the seq won't be GC'ed
21:45:20Jehan_But even then the contents can change.
21:45:26Jehan_Leading to rather undefined semantics.
21:45:34Araqyes
21:45:37*kniteli joined #nimrod
21:46:55AlexLibman(Or 12.28 seconds for nim v0.10.1 w/o optimizations.)
21:48:26*AFKMorpork is now known as AMorpork
21:55:05AraqJehan_: we can check that the contents do not change too though. the beauty of 'parallel' is that it is structured control flow.
21:55:59Jehan_Araq: How? There would be an aliasing problem, I'd think.
21:56:58Araqyou can check for aliasing at runtime
21:57:59*AMorpork is now known as AFKMorpork
21:58:04Jehan_Not sure how that would work?
21:59:43*AlexLibman quit (Ping timeout: 246 seconds)
22:02:20Araqer .. so our json parsing still kind of sucks
22:06:13*uku quit (Ping timeout: 265 seconds)
22:06:58AraqJehan_: well it's complex and depends on what exactly you want to prevent
22:08:12Jehan_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:33Araqso what do you suggest? revert it back to 'deepCopy' and have some annotation that prevents it?
22:09:55Araqhrm that may actually be a good idea
22:10:44dom96hrm, what happened to the compiler output? The commands it executes are no longer echoed?
22:12:26Araqdom96: there was a PR to make the output nicer
22:12:35dom96cool
22:15:54Araqdom96: why does nimble now use /tmp ?
22:16:19dom96it has been using that since forever.
22:17:44Araqalso can it be used without 'git'?
22:18:13dom96Yes. It can be used locally and with hg.
22:22:23Araqso how do we add it to Nim?
22:22:34VarriountAraq: How does the json parser suck?
22:22:59AraqVarriount: look at the benchmark results that AlexLibman posted
22:23:31*brson quit (Quit: leaving)
22:24:06*brson joined #nimrod
22:24:50VarriountAraq: Can I get a link?
22:25:34dom96Araq: just put it together with the nim binary
22:25:58*kniteli quit (Ping timeout: 265 seconds)
22:26:07dom96It would be better to install it separately though.
22:26:27*brson quit (Client Quit)
22:26:40*brson joined #nimrod
22:26:47AraqVarriount: no link. read the logs.
22:27:08Araqdom96: what do we do with the source based installation?
22:27:56dom96Araq: nimble can install itself.
22:28:45dom96as 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:38superfuncdom96: that PR is awesome
22:29:52superfuncI just noticed the cleaned up output one day, great surprise
22:29:53VarriountAraq: Ouch. I see. Nimrod should take less than 2 seconds definately.
22:29:59Jehan_The problem on the forum is really something that happens in general you run Nim from a non-local directory.
22:30:12Jehan_If that's what you're talking about.
22:30:29Jehan_Because -L./something won't work then.
22:30:30dom96superfunc: yeah, it definitely cuts down on the noise.
22:30:34VarriountOr rather, the code could be optimized to run in less than 2 seconds.
22:30:49dom96I hope there is a way to get what it executes back.
22:31:33AraqVarriount: depends on the data though. we optimized it once against python's C based parser
22:31:39*q66[lap] joined #nimrod
22:32:11Araqbut the data was full of megabyte long string literals iirc
22:33:06Araqdom96: with --parallelBuild:1 it should be back to its old output
22:33:26Araqdom96: how does Nimble installing itself help when you don't have a Nimble?
22:34:05dom96Araq: 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:57VarriountUm, someone removed the executable bit from build.sh in the csources repo (I think)
22:42:16AraqVarriount: I usually do 'sh build.sh' anyway. the / is too hard to type
22:43:06VarriountAraq: Yes.. but this is for the buildbot.
22:43:09Araqdom96: well but we don't ship prebuild binaries in the source based installation
22:43:30VarriountIt makes it easier for me to execute batch and sh files without having to care about platform differences
22:44:46Araqdom96: I'll include Nimble's code though and adapt the scripts to compile it
22:45:30VarriountHuh. Virtualbox even lets the VM's get information as to how charged my laptop battery is. Neat.
22:45:40dom96Araq: Could you install it into ~/.nimble?
22:49:17Araqdom96: er no, nimble should be in $nim/bin so that one only has to add 1 thing to the path
22:49:26VarriountAraq: 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:19dom96Araq: You will need to add ~/.nimble/bin to the path anyway.
22:52:10VarriountAraq: If it makes you feel any better, any benchmarks involving mechanisms use disk IO should really be run under a ramdisk.
22:53:45VarriountIt prevents wierd IO idiosyncrocies from muddling the results.
22:54:02Jehan_Varriount: Yeah, but … most benchmarks are pretty meaningless to begin with.
22:54:21Jehan_Even running them on a ramdisk won't save them.
23:01:07*kniteli quit (Ping timeout: 272 seconds)
23:01:20wandom96: if you want to see the old output (if you really want to), the switch is --verbosity:2
23:02:17dom96wan: awesome
23:03:26*fowl joined #nimrod
23:12:50*kniteli joined #nimrod
23:13:44onionhammerit would be nice if nimble was in the nim/bin
23:14:10onionhammeralso would be cool if standard tools were built along with the normal koch -d:release call
23:14:29onionhammeri.e c2nim, nimble etc
23:15:04fowlits just a few more lines to install nimble
23:15:57fowlgit clone&& pushd nimble && nim c -r src/nimble install nimble&& popd && rm -rf nimble
23:16:43fowlor nim c src/nimble; src/nimble install
23:17:16*kniteli quit (Remote host closed the connection)
23:24:29gokrVarriount: 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:51gokrSo if that's the one used, aka Lua-CJSON, then its pure C.
23:24:54gokrgnite
23:31:48Varriountdom96: Since the buildbot daemon requires a system restart anyway, may I restart the VPS?
23:32:51dom96sure
23:41:26Varriountdom96: Which URL should the build master's web page be visible at?
23:42:04dom96Varriount: How are you setting it up? Through nginx?
23:42:30VarriountWell, I could do that, with nginx acting as a proxy.
23:42:48VarriountThe build master runs its own small webserver
23:43:11dom96put the web server on some random port
23:43:45VarriountRIght now it's on localhost:8010
23:43:57dom96that's fine
23:44:36AraqVarriount: ignore the exec bit
23:46:15Varriountdom96: Is there already a proxy set up to make that visible to the outside world?
23:46:55Araqdom96: why the ~/.nimble?
23:47:03Araqwhy does it have to be in PATH?
23:47:25dom96Varriount: don't think so. Just make 8010 external.
23:47:51dom96Araq: ~/.nimble/bin
23:47:55dom96has to be in path
23:47:58Araqwhy?
23:48:03dom96that's where binary packages' binaries end up
23:48:24Araqah, damn. this even makes sense.
23:49:05Araqwell I'll add additional source based packages to the installer
23:49:44dom96c2nim shouldn't even be a part of the nim package.
23:49:51dom96people who want it should install it via nimble
23:53:39onionhammeralso, I still think nimble should have the concept of 'sub' lists
23:54:22onionhammerso I could host my own list of nimble repos which would show up via search :)
23:59:19*uber quit (Ping timeout: 265 seconds)