<< 12-11-2014 >>

00:01:44*boydgreenfield quit (Quit: boydgreenfield)
00:01:53*flaviu quit (Read error: Connection reset by peer)
00:04:55*flaviu joined #nimrod
00:08:54*kniteli joined #nimrod
00:09:26*untitaker quit (Ping timeout: 264 seconds)
00:16:27*untitaker joined #nimrod
00:22:00*kniteli quit (Ping timeout: 265 seconds)
00:23:27*boydgreenfield joined #nimrod
00:33:17*kniteli joined #nimrod
00:40:19*johnsoft quit (Ping timeout: 250 seconds)
00:40:40*johnsoft joined #nimrod
00:42:39*superfunc quit (Quit: Connection closed for inactivity)
00:51:36*uku joined #nimrod
00:53:45*bjz quit (Ping timeout: 250 seconds)
01:17:28boydgreenfieldIs there going to be a v0.10.0 or just a v0.10.1? (Asking bc current nim -v gives me the latter and just broke a test for v0.10 version string on my end)
01:18:13Araqboydgreenfield: once released it will be 0.10.2
01:18:20boydgreenfieldAraq: Got it.
01:18:23boydgreenfieldThx.
01:18:27Araqbigbreak reported for too long 0.10.0
01:18:45Araqso to avoid confusions we skip this
01:19:22*darkf joined #nimrod
01:21:32darrell_Is there a way to run all the Nimrod/tests in a single command?
01:22:03Araqdarrell_: sure: tests/testament/tester cat all
01:22:08Araqiirc
01:23:11Araqbut note we never have 100% green tests
01:23:43darrell_Humm, don't see testament?
01:23:49darrell_In tests
01:24:19Araqwell you need to build it
01:24:32Araqnim c tests/testament/tester
01:27:46darrell_Oh, sorry didn't see tests/testament directory
01:32:30*q66 quit (Quit: Leaving)
01:37:31NimBotAraq/Nimrod devel b2f577d Araq [+1 ±8 -0]: fixes #1473
01:46:29NimBotAraq/Nimrod devel 29b1709 Araq [+0 ±1 -0]: fixes a regression that made 'system.compiles' output the produced error messages
01:48:54*boydgreenfield quit (Quit: boydgreenfield)
01:55:45*boydgreenfield joined #nimrod
01:56:40NimBotAraq/Nimrod devel 77353b8 Araq [+0 ±1 -0]: fixes #1127
01:58:02*brson quit (Quit: leaving)
01:58:25*uku quit (Ping timeout: 272 seconds)
01:59:32*Demos joined #nimrod
02:02:32*johnsoft quit (Ping timeout: 265 seconds)
02:03:10*johnsoft joined #nimrod
02:08:12*mko quit (Ping timeout: 245 seconds)
02:21:52*kniteli quit (Ping timeout: 265 seconds)
03:11:07*silven quit (Quit: No Ping reply in 180 seconds.)
03:12:31*silven joined #nimrod
03:12:42*boydgreenfield quit (Quit: boydgreenfield)
03:20:19*superfunc joined #nimrod
03:20:42superfuncyo everyone
03:24:55*superfunc quit (Ping timeout: 246 seconds)
03:30:02*superfunc joined #nimrod
03:38:20*saml_ joined #nimrod
03:48:10*saml_ quit (Ping timeout: 244 seconds)
04:00:46*saml_ joined #nimrod
04:02:53*flaviu quit (Ping timeout: 265 seconds)
04:07:33*saml_ quit (Ping timeout: 250 seconds)
04:17:17*darkf quit (Ping timeout: 240 seconds)
04:19:50*saml_ joined #nimrod
04:19:56*saml_ quit (Remote host closed the connection)
04:38:48*fowlmouth joined #nimrod
04:42:31*fowl quit (Ping timeout: 265 seconds)
04:52:24*Demos quit (Read error: Connection reset by peer)
04:53:24*darkf joined #nimrod
05:07:33*BlaXpirit joined #nimrod
05:09:02kokozedmanhey guys, anyone? I need to know a bit more about RootObj
05:15:13*mko joined #nimrod
05:42:59*Sembei quit (Read error: Connection reset by peer)
05:43:51*kemet joined #nimrod
05:44:54*untitaker quit (Ping timeout: 256 seconds)
05:49:37*khmm joined #nimrod
05:52:21*untitaker joined #nimrod
05:55:00*kemet quit (Quit: Instantbird 1.5 -- http://www.instantbird.com)
06:05:49*mko quit (Ping timeout: 244 seconds)
06:30:49*khmm quit (Remote host closed the connection)
06:42:39*superfunc quit (Quit: Connection closed for inactivity)
06:43:01*darrell_ quit (Ping timeout: 246 seconds)
06:43:24kokozedmanquote: Asynchronous message passing is used between threads, so no "stop the world" mechanism is necessary
06:43:50kokozedmanhow and where is this feature documented?
06:48:22*johnsoft quit (Ping timeout: 240 seconds)
06:49:51*johnsoft joined #nimrod
07:00:37*BlaXpirit quit (Quit: Quit Konversation)
07:22:25*ftuvbgyrftr quit (Quit: Page closed)
07:29:00*kniteli joined #nimrod
07:45:29*kniteli quit (Ping timeout: 272 seconds)
07:54:13gokrhey
07:56:19*kniteli joined #nimrod
08:02:21gokrkokozedman: I haven't used it yet, but I would look at the channels module. Can't seem to find much examples, but the API is very small.
08:12:09*[CBR]Unspoken joined #nimrod
08:17:35*uku joined #nimrod
08:28:49*sdw_ quit (Read error: Connection reset by peer)
08:32:13*Sembei joined #nimrod
08:35:03*khmm joined #nimrod
08:35:33*kniteli quit (Ping timeout: 265 seconds)
08:39:50*johnsoft quit (Read error: Connection reset by peer)
08:56:50*johnsoft joined #nimrod
09:28:25*wan quit (Ping timeout: 260 seconds)
09:48:11*jlebrech joined #nimrod
09:48:30*uku quit (Ping timeout: 244 seconds)
09:49:05jlebrechi'm looking to write client/server webbased code but i'd like know if there's a better way to have them communicate than ajax
09:49:48jlebrechfor example i want to use a library that can associate what will be compiled into js with what will be compiled into binary
09:50:17jlebrechand they i can made a call between client and server code, and maybe vice versa seamlessly
09:50:20jlebrechthen*
09:58:02gokrA quick search finds: https://github.com/onionhammer/onion-nimrod
09:58:20gokrSee websockets there for example. Not sure if there is other work too
09:58:29gokronionhammer: ?
10:16:52jlebrechcool
10:27:57*dirkk0 joined #nimrod
10:30:11*uku joined #nimrod
10:35:25*iamanewbie quit (Ping timeout: 246 seconds)
10:39:42jlebrechwhat i'd like is a server that sets up clientside to code to communicate to it, and I can use a clientside library that'll message the server side without configuring the client side. so basically setting the baseurl address and a key etc..
10:40:54jlebrechhope that kinda makes sense
10:54:19*bjz joined #nimrod
11:19:32*kemet joined #nimrod
11:19:44*Trixar_za quit (Ping timeout: 244 seconds)
11:20:13*Trixar_za joined #nimrod
11:35:15*dirkk0 quit (Ping timeout: 264 seconds)
11:41:56*dirkk0 joined #nimrod
11:56:03*ponce__ joined #nimrod
11:56:10ponce__why has nimrod unsigned types now ?
11:56:19ponce__s/Nimrod/Nim
11:58:18*khmm quit (Remote host closed the connection)
12:02:50jlebrechwhy the name change :(
12:15:45*uku quit (Ping timeout: 244 seconds)
12:16:14*Araq0 joined #nimrod
12:17:27Araq0hi ponce__ unsigned has been added long ago, there are still bugs left though
12:17:44Araq0too many people complained that's why they were added
12:18:03Araq0however 'len' still returns int and unsigned artihmetic is discouraged
12:20:57*jlebrech quit (Remote host closed the connection)
12:31:12*Varriount_ joined #nimrod
12:34:21*Varriount quit (Ping timeout: 258 seconds)
12:44:07*dirkk0 quit (Quit: This computer has gone to sleep)
12:48:02*uku joined #nimrod
12:56:14gokrPorted Lapp to latest Nim. Steve Donovan made the original port from Lua. Its neat, but... could use some improvements.
12:57:26*BlaXpirit joined #nimrod
12:58:36*q66[lap] quit (Read error: Connection reset by peer)
13:00:59*q66[lap] joined #nimrod
13:01:42*BitPuffin joined #nimrod
13:06:20*darkf quit (Ping timeout: 255 seconds)
13:06:54kokozedmanI'm accepting proc(o: RootRef, output: string) as parameter, how can I have o not a RootRef but any object so that I don't have to pass this exact proc signature but instead use a proc(o: MyObjectType, output: string)? kind of template or something if it's at all making sense
13:07:36gokrkokozedman: Read my OO article series.
13:07:58gokrhttp://goran.krampe.se/category/nim/
13:08:54kokozedmangokr: ok, thanks... it's hard to sink in all these Nim info until it's relevant
13:08:58gokrAnd... I am not sure what you are asking - you can have "o: MyObjectType" and that proc will then bind to any call with such an argument.
13:09:25gokrMy article series explores both procs and methods, and how to do inheritance and the "super" call etc.
13:14:03*darkf joined #nimrod
13:15:40kokozedmangokr: basically, I'm looking to creating a kind of callback that is called when something has been done... and this callback is of the format proc(MyObjectType, string) belonging to that class' instance
13:16:06kokozedmanthat is,when time comes, the proc will be called in the context of the object of type MyObjectType
13:16:31kokozedmanand I'd like to accept any kind of objec
13:16:38kokozedmans/objec/object/
13:17:04gokrI thought you said "of type MyObjectType". Not any kind.
13:17:17Araq0kokozedman: wrong approach, juse proc (string) {.closure.} instead
13:17:21Araq0*just use
13:17:36ponce__<Araq0> [13:18:03] however 'len' still returns int < good thing
13:18:01kokozedmanAraq0: hmm... and how about the object context?
13:19:03Araq0well usually you capture that instead
13:19:25kokozedmanhmm...I'm not following
13:20:33*irrequietus joined #nimrod
13:21:07Araq0well you can look at my latest commits that use exactly that to override error handling
13:21:22Araq0so that macros.parseExpr can raise an exception instead of dying
13:21:24kokozedmanok, which branch?
13:21:26Araq0devel
13:21:34kokozedmanok, looking...
13:25:08*Etheco joined #nimrod
13:27:38ponce__Araq0: len being int removes most bugs with unsigned usage
13:27:47ponce__imho
13:37:37Araq0ponce__: debatable, width and height in many APIs are unsigned too and bug prone
13:38:10Araq0basically everything where minus makes sense requires signed arithmetic for sanity
13:38:56Araq0maybe making '-' not easily aviable for unsigned also prevents most mistakes
13:40:46Araq0but then you end up with int32(width) - 3 and then you wonder why it was uint32 in the first place when you have to throw away half of the range anyway
13:44:35kokozedmanAraq0: brilliant man!!!!! this closure thing is wicked cool! ... now, that's a major productivity boost. Thanks
13:45:38gokrkokozedman: The concept of closures is not new, but of course, lots of mainstream languages still don't have them.
13:46:16kokozedmangokr: you're right, I was used to that in C++11, but I didn't realize Nim had it! just wicked!
13:46:34gokrNim is a true candy box :)
13:46:43*kokozedman discovers a new thing about Nim every day
13:46:53kokozedmanIndeed!
13:50:28ponce__Araq0: I won't dispute that, and would have preferred if unsigned were out, but there is probably good reasons to have them I've not thought of
13:51:06*Boscop quit (Ping timeout: 265 seconds)
13:52:09Araq0ponce__: well what really *sucked* was int8 to do byte level manipulations with the builtins toU8, ze8 etc. it was simply too hard
13:53:03Araq0but it was an interesting experiment
13:55:10kokozedmanis there an existing construct for a kind of thread-safe list?
13:55:19*uku quit (Ping timeout: 255 seconds)
13:55:26ponce__I guess the unsigned problem might lessen if signed/unsigned comparison or binary ops are disallowed
13:55:35ponce__wild guess
13:55:35*Boscop joined #nimrod
14:02:18*johnsoft quit (Ping timeout: 264 seconds)
14:03:11Araq0kokozedman: well there is the old TChannel stuff
14:04:21Araq0or you can use spawn to return a FlowVar[seq[T]], but then you need to append that to the result list
14:05:03kokozedmanAraq0: which module would that spawn thing be?
14:05:13Araq0threadpool.nim
14:06:00Araq0beware though there is at least 1 bug left that I need to fix
14:06:27kokozedmanheheh... kind of scary
14:07:08Araq0well I love it. it's simple, limited and by construction free of deadlocks and data races
14:08:10kokozedmanno, it's about that left bug
14:08:26*uku joined #nimrod
14:08:52Araq0*shrug* I didn't look into it, maybe I already fixed it. it is also surprisingly easy to debug
14:09:30kokozedmanI guess that's not in the master branch...
14:09:49Araq0it's not in the docs
14:09:58Araq0but yeah you should use devel for that
14:11:05kokozedmanoh, ok... I'm working on something and master is stable for it... I guess I'll see if I can get a quick one involving condition variable and some locks
14:14:28gokrI have implemened something similar to fat-git in Nim.
14:14:38gokrCalling it blimp :)
14:14:50kokozedmangokr: mind sharing?
14:15:04gokrWe have some silly big files in our git repos, and they are not really build artifacts.
14:15:16gokrThey are Smalltalk images, and tend to be around 30-50 Mb easily.
14:15:32gokrThey bloat git and makes git ... silly.
14:15:52gokrSo there are numerous tools for this - git-annex, git-fat, git-media, s3annex etc etc
14:16:19gokrgit-fat and s3annex are quite simple - they simply "inflate" or "deflate" the file in question - and replaces it with a hash.
14:16:40gokrSo the actual content in git - is just a file containing the hash checksum of the original content.
14:17:06gokrThen these tools store the actual content "somewhere else".
14:17:41gokrSo we decided we wanted something like this - so I hacked up "blimp" in Nim.
14:17:52kokozedmancool
14:18:29gokrCurrently it doesn't hook itself in - you will need to manually deflate/inflate. But it does use rsync etc to upload/download the content "on the side".
14:18:55gokrHooking onto git-smudge or whatever its called, is probably also doable.
14:19:56gokrI also got Steve Donovan's Lapp to work with latest Nim. A parseopt library that uses the help text as a spec for the parsing. Kinda neat, although it could use a tad more features.
14:20:42Araq0now that's the *real* way to do command line parsing
14:20:50gokrYeah, its slick.
14:20:58*perturbation joined #nimrod
14:21:11Araq0is it a Nimble package already?
14:21:28gokrYeah... not in the package list - but I did just publish it.
14:21:48gokrhttps://gitlab.3dicc.com/gokr/lapp
14:22:06gokrI know, there is some sillyness with the HTTPS cert there, so your browser may complain.
14:22:19Araq0yup
14:22:27gokrBut its ok, I promise :)
14:22:35gokr(muuuahahaa)
14:22:41Araq0I'm used to allow these things
14:23:02gokrSo Steve Donovan is a Lua guy - he did the Penlight library and more.
14:23:18Araq0never heard of it
14:23:25gokrI emailed him and checked if it was ok if I tweaked his port of Lapp so that it works with latest Nim.
14:23:32gokrAnd he was just happy someone uses it.
14:24:03gokrSo I fixed one bug, renamed a bunch of stuff that has changed and... well, that's basically it.
14:24:28gokrIt can probably be written differently. And it needs more doc/examples.
14:24:29*Boscop_ joined #nimrod
14:24:48Araq0you can use nimfix to do the renamings for you
14:24:58gokrahhh. Too late :)
14:25:38gokrHmm, I can publish blimp too...
14:25:42Araq0well it's usually so little work that tooling support doesn't matter
14:25:54Araq0unless you have >40K LOC ...
14:26:13Araq0(which we do...)
14:26:29gokrhttps://gitlab.3dicc.com/gokr/blimp
14:26:53gokrHere is the use of it: https://gitlab.3dicc.com/gokr/blimp/blob/master/blimp.nim#L148
14:27:17*Boscop quit (Ping timeout: 240 seconds)
14:27:43*bjz quit (Ping timeout: 255 seconds)
14:33:43*bjz joined #nimrod
14:36:38Araq0nice
14:36:52Araq0hrm ': auto' really shouldn't trigger a generic context
14:37:11Araq0it should infer the type instead
14:37:38*Araq0 wonders how hard this is to change
14:41:12Araq0gokr: if not existsDir(blimpStore): createDir(blimpStore)
14:41:27Araq0is not necessary, createDir doesn't fail if the directory already exists
14:41:54Araq0in general we don't follow arachaic API designs blindly
14:42:20*prosper_ joined #nimrod
14:42:28gokrAha
14:46:19Araq0also your empty except are kind of evil
14:46:32Araq0better name the exception like 'except OSError'
14:47:11Araq0though it's not nearly as bad as in python because we don't map KeyboardInterrupt to an exception
14:48:15*flyx left #nimrod (#nimrod)
14:49:17*prosper_ quit (Ping timeout: 258 seconds)
14:53:18*prosper_ joined #nimrod
15:03:52gokrOk, will check :)
15:04:11gokrJust replied to Steve Donovan trying to get him/them into Nim again
15:04:37gokrHe was lured by go concurrency - so I wrote that hey, Nim has cool stuff there now :)
15:10:57*darkf quit (Quit: Leaving)
15:11:30gokrAraq0: Why are there multiple listings of the same raises here: http://nimrod-lang.org/system.html#readFile,string
15:14:37Araq0gokr: because the compiler found multiple paths that raise this exception
15:14:44Araq0but it's a bug of course
15:14:46gokrI kinda suspected :)
15:15:00Araq0it shouldn't show this in the docs though
15:15:15Araq0I think it's still in my todo.txt
15:15:26*BlaXpirit quit (Read error: Connection reset by peer)
15:16:38*BlaXpirit joined #nimrod
15:19:45*perturbation quit (Quit: Leaving)
15:24:10gokrThis kind of programming (blimp) was very smooth in Nim I must say.
15:24:25gokrAnd the resulting binary is of course blindingly fast.
15:24:57gokrI like the "no surprise" simple standard APIs.
15:29:44gokrUgh... my docker doesn't want to build blimp since it doesn't have lapp. So it needs nimble. And it needs... hmm.
15:37:21Araq0well you can always install lapp manually without nimble
15:37:43Araq0in fact maybe nimble should support some way to do script generation for these things
15:37:45gokrMmm. I think I will prep the docker image with nimble.
15:38:11Araq0so you can say "Nimble! create a script for retrieving package a, b, c"
15:38:20kokozedmanwhile using thread, how do I use a proc that needs no argument?
15:38:30kokozedmanI tried to tinker around but ... no
15:38:32gokrBut... it would be nice if nimble could take a bit of json from ... somewhere else too. More "sources" and merge those lists.
15:38:41Araq0kokozedman: createThread[void](fn)
15:38:44gokrAraq0: right
15:40:06kokozedmanAraq0: silly me... thanks
15:42:05Araq0kokozedman: it's a common gotcha though, there should be an overload for that
15:47:50*prosper_ quit (Ping timeout: 256 seconds)
15:52:59*kemet quit (Remote host closed the connection)
15:53:32*kemet joined #nimrod
15:53:55*kemet quit (Client Quit)
15:54:22*kemet joined #nimrod
15:57:39*mko joined #nimrod
15:57:50*mko quit (Max SendQ exceeded)
16:03:18*flyx joined #nimrod
16:05:35*brson joined #nimrod
16:12:09*gokr quit (Quit: Leaving.)
16:20:31*Araq0 quit (Quit: Page closed)
16:21:18*kemet quit (Quit: Instantbird 1.5 -- http://www.instantbird.com)
16:34:41*uku quit (Ping timeout: 255 seconds)
16:38:23*kemet joined #nimrod
16:46:18*johnsoft joined #nimrod
16:50:08*uku joined #nimrod
16:54:22*gokr joined #nimrod
17:02:54gokrThree things that would be nice in nimble: 1) List installed 2) Be able to merge package.json from several sources (so internal packages can be handled) and 3) Act a bit as bundler to suck down dependencies.
17:08:00ldlework1 would be amazing
17:08:14ldleworkalso being able to export that list
17:08:21ldleworkand being able to take it to another machine
17:08:29ldleworkand giving it to nimble and saying, here install these
17:08:41ldleworka built in virtualenv-like system too...
17:09:02ldleworkkthxbai
17:22:14*irrequietus_ joined #nimrod
17:22:14*irrequietus_ quit (Client Quit)
17:22:42*Trustable joined #nimrod
17:23:28dom96_gokr: PRs always welcome ;)
17:23:43gokrYeah... :) I started peeking a bit at it.
17:24:07gokrI built SqueakMap in the Squeak community, kinda similar sort of tool.
17:24:27*irrequietus quit (Ping timeout: 245 seconds)
17:37:11dom96_cool
17:38:32onionhammergokr one thing i've been asking for with nimble is supporting lists of packages in packages.json
17:38:49onionhammeras well as improved search to go along with it..
17:39:06onionhammerso individual developers could manage their own packages/versions/etc
17:39:22gokrWhat do you mean with "lists"? Isn't packages.json a list? Ah, you mean #2 from my three?
17:39:43onionhammerpackages.json is a list, but it's not a list of lists
17:39:48onionhammersimilar to your #2
17:39:56gokrOr... you mean... ability to nail down to specific versions?
17:40:11gokrPinning.
17:40:23onionhammerpacakages.json could point to onionhammer/packages.json and fowlmouth/packages.json
17:40:41onionhammerand users would seemlessly see packages sub-lists
17:40:46gokrMy #2 was more like... oh, we have these 10 internal packages - and would be neat to be able to handle them too. Just like apt can have multiple sources.
17:40:56onionhammerright, I like that idea too
17:41:09gokrAh, ok, so its similar.
17:41:21onionhammeryep, except these are public lists, not private/internal
17:41:22gokrYou mean a kind of federation.
17:41:27onionhammeryeah
17:41:33gokrI mean a kind of "private" federation :)
17:41:38onionhammeryeah
17:41:45gokrBoth quite useful I guess.
17:42:00gokrYou could then maintain your own little "universe".
17:42:19*gokr freezing ...
17:42:29gokrI am sitting in an ice rink.
17:42:29*mko joined #nimrod
17:43:09gokrMy daughter is practicing her axel.
17:45:41onionhammernext stop olympics
17:45:57gokrNah, but after christmas its the district championships :)
17:46:45gokrA few more years until the olympics ;)
17:52:31*Matthias247 joined #nimrod
18:06:03kokozedmanis there an existing list kind that can be used for FIFO?
18:06:32kokozedmanI mean, seq[string] as FIFO?
18:07:11kokozedman(might not be making a proper sense though)
18:09:18*nande_ joined #nimrod
18:09:23*nande quit (Read error: Connection reset by peer)
18:09:28*nande_ quit (Read error: Connection reset by peer)
18:10:17onionhammerkokozedman http://nimrod-lang.org/queues.html
18:12:09*kniteli joined #nimrod
18:12:10kokozedmanonionhammer: thanks
18:13:04*Jesin joined #nimrod
18:16:17*johnsoft quit (Ping timeout: 272 seconds)
18:16:41*johnsoft joined #nimrod
18:24:32kokozedmanQueue is GC unsafe ... I'm trying to use it in a thread, what's the proper solution?
18:24:37*q66 joined #nimrod
18:27:01*gokr quit (Quit: Leaving.)
18:53:27Varriount_kokozedman: Use a ptr?
18:54:27*Varriount_ is now known as Varriount
19:23:11*hopla joined #nimrod
19:25:11*rpag_ joined #nimrod
19:26:57*rpag quit (Ping timeout: 244 seconds)
19:39:06*Boscop_ quit (Ping timeout: 265 seconds)
19:41:32kokozedmanVarriount: moved the variable to be local to the thread
19:49:04hoplawhen infix operators are implemented, first character is used for precedence as in Ocaml?
19:49:26Araqhopla: that is correct. details are in the manual
19:49:36hoplaAraq: thanks!
19:49:49hoplaAraq: I'll look it!
19:49:55Araqkokozedman: you can't move the channel itself to the thread, how should this work?
20:03:43kokozedmanAraq: I'm using a queue ... it doesn't compile if it's a global variable, so I set it to threadvar
20:03:54*Trustable quit (Quit: Leaving)
20:03:56kokozedmanit should work (haven't tried yet)
20:04:03kokozedman(I mean, I guess)
20:04:05Araqand then?
20:04:11Araqit's thread local
20:04:34Araqhow can you then use it for interthread communication?
20:04:46Araqyou should really use a TChannel
20:05:24kokozedmanAraq: oh yeah, you're right... I'm being very stupid right now
20:05:32kokozedmanI should go to sleep, it's late
20:06:29kokozedmangood night everyone
20:06:33Araqbye
20:06:40kokozedmanthanks Araq
20:28:23*Mat3 joined #nimrod
20:28:29Mat3hello
20:32:45*kniteli quit (Ping timeout: 265 seconds)
20:35:01Araqservus
20:38:15*Dispatch joined #nimrod
20:38:38DispatchHi
20:38:49Dispatchdo I need to allocate an array to use it?
20:43:34*Boscop joined #nimrod
20:43:55*kniteli joined #nimrod
20:44:22AraqDispatch: no. but it's of fixed size at compile-time
20:44:45Araqfor a 'seq' you have to use newSeq or similar ways
20:44:46Dispatchok, that's what I assumed
20:46:00*BitPuffin quit (Ping timeout: 244 seconds)
20:54:20Mat3hi Araq
20:54:40*Boscop_ joined #nimrod
20:58:26*Boscop quit (Ping timeout: 265 seconds)
21:00:13*gokr_ joined #nimrod
21:11:58*kniteli quit (Ping timeout: 265 seconds)
21:11:59Varriounthopla: You are the first person to not be surprised by that.
21:15:44*Dispatch quit (Quit: Page closed)
21:16:38*nande joined #nimrod
21:18:57Varriountgokr_: If you have any suggestions for improving the new build bot, feel free to add issues here - https://github.com/nim-lang/nim-buildbot/issues
21:21:10*Visaoni joined #nimrod
21:23:20*kniteli joined #nimrod
21:27:15Araqhi Visaoni welcome
21:27:24AraqVarriount: what's the status of your excpt.nim patch?
21:31:21*kniteli quit (Ping timeout: 272 seconds)
21:34:49*hopla quit (Ping timeout: 246 seconds)
21:38:55*gokr joined #nimrod
21:39:28*flaviu joined #nimrod
21:44:15*kemet quit (Quit: Instantbird 1.5 -- http://www.instantbird.com)
21:44:25*kniteli joined #nimrod
21:44:55VarriountAraq: I've been at work/in class all day, so guess.
21:55:19VarriountAraq: I have the code, however I need a sample to test it on. The error dialogue on appears for very serious/unusual errors (things like heap corruption, threading errors, etc)
21:56:14AraqVarriount: simple.
21:56:19Varriount?
21:56:23Araqthreads.nim, line 195
21:56:34*Boscop joined #nimrod
21:56:35*Boscop quit (Changing host)
21:56:35*Boscop joined #nimrod
21:56:38Araqdisable it, run a threading test from tests/parallel
21:57:07Araqand it will produce a very serious error for you to test
21:57:19*kniteli quit (Ping timeout: 272 seconds)
21:57:27Varriountso '-d:useStackMaskHack'?
21:57:45*Boscop__ joined #nimrod
21:58:50VarriountOh, wait, wrong line.
21:59:16*Boscop_ quit (Ping timeout: 265 seconds)
22:01:23*Boscop quit (Ping timeout: 255 seconds)
22:03:59*hopla joined #nimrod
22:04:46hoplaI would like to compiler nimrod (the compiler) with debugger support but this is failing on the first try. Some problem in system.nim. Is it possible?
22:05:30Varriounthopla: It used to be possible, however the debugger hasn't been maintained. Perhaps, if you and araq were willing, araq could tell you how to fix it?
22:05:53hoplaWhat I want to do is compile nimrod with the debugger to trace into the debugger code to see the internals step by step
22:06:05hoplaI mean "to trace into the compiler code" sorry
22:06:25Varriounthopla: Yeah. You can either use gdb, or fix endb
22:07:32hoplaVarriount: Ah yeah good point. I do not really care about variable values. line info should be fine to start
22:09:45Araqhopla: this is usually the wrong approach
22:09:59*kniteli joined #nimrod
22:10:01Araqyou will be overwhelmed with pointless information
22:10:27Araqhowever, you can insert writeStackTrace() into the compiler's code at strategic places
22:10:34Varriounthopla: Stay away from the lambda lifting code. It bites back.
22:11:55VarriountIn fact, the best way to start is just by examining all the internal structures first (then asking questions, and writing documentation filled with the answers you are given_
22:11:58Mat3Araq: The hack for implementing subroutine threading works quite well (this approach is ~2x faster than using direct threading though GNU'S label-as-address extension in my test - Intel Core I3]
22:12:37VarriountMat3: What are you running to test? Can I try?
22:12:43*superfunc joined #nimrod
22:14:55hoplaAraq: I like learning code like this if the debugger is OK. Mostly to break point and see what is going on here and there. But yeah, with no watch and the rest, this is not going to be that useful. I'll see. Code is small though.
22:17:59Mat3Varriount: I port the threading-dispatch test programs from Anton Ertl's web side. You can find the sources tomorrow night in my Git repro. Beware that the switch based version should compile without optimization flags other than -O or GCC > 4.6 will compile it to remarkable bad code. The subroutine-threaded version should compile with -O3 (-d:release)
22:18:44Araqhopla: well use --debuginfo --lineDir:on and it works fine with gdb
22:19:43hoplaAraq: I am looking at the compilation errors at the same time. Seems to be related to some old naming: Kind -> kind, True->true
22:20:02Mat3avoid clang (horrible code quality)
22:20:11AraqMat3: interesting
22:20:25Araqthey used to brag about how their compiler can deal with interpreters
22:21:26*mko quit (Read error: Connection reset by peer)
22:21:38Mat3really ?
22:22:10Araqiirc yeah
22:22:51Mat3ehm, ok... it's an academic project I guess
22:23:22AraqMat3: did we talk about http://www.emulators.com/docs/nx25_nostradamus.htm ?
22:23:49*hopla quit (Ping timeout: 246 seconds)
22:24:48*hopla joined #nimrod
22:25:25NimBotAraq/Nimrod devel ea57f34 def [+0 ±1 -0]: Fix compile because of case sensitivity
22:25:25NimBotAraq/Nimrod devel 78b3f73 def [+0 ±1 -0]: Remove runtime deadlock prevention as deadlock detection at compile-time is available... 3 more lines
22:25:25NimBotAraq/Nimrod devel 6fb2d44 Andreas Rumpf [+0 ±1 -0]: Merge pull request #1643 from def-/fix-locks-case... 2 more lines
22:26:08Mat3no, the interpeters from Darek Mihocka exploit software pipelining which only works well with VLIW processors like DSP's and superscalar out-of-order cpu's like the ones from Intel
22:29:12Mat3however, it's quite interesting to read his blog
22:29:21Araqwell I don't get it at all
22:29:30Araqin what bizzare universe is this:
22:29:36Araqif (pfn != (PFNDUOP)duopFireEscape)
22:29:38Araq{
22:29:39Araq pfn = (PFNDUOP)(*pfn)(&pduop[1], pduop[1].ops);....
22:29:53Araqthe fastest way to implement dispatching
22:31:25*Matthias247 quit (Read error: Connection reset by peer)
22:32:47*kniteli quit (Ping timeout: 272 seconds)
22:33:35Mat3this code transform machine code for say mx680x0 cpu's into streams of micro instructions which are interpreted by soft-sheduling the generated machine code for its dispatch routine to the out-of-order pipelines of the iCore 2
22:36:02Mat3this way the interpretation overhead is hidden though parallelization
22:37:10*kemet joined #nimrod
22:37:35Mat3the code transformation is not shown in the example so the resulting fragment is somewhat unreadable
22:43:06gokrhopla: If you compile with debuginfo on and lineDir on - then you can step perfectly fine using KDevelop for example.
22:43:43gokrKDevelop was the nicest gdb frontend on Linux that I tried.
22:44:10*BitPuffin joined #nimrod
22:45:07*kniteli joined #nimrod
22:45:44*darrell_ joined #nimrod
22:45:53hoplagokr: sorry, I am staying with gdb :-)
22:47:10Mat3Araq:// A DUOP contains a pointer to the handler, and various operands
22:47:14Mat3typedef struct DUOP
22:47:16Mat3{
22:47:18Mat3PFNDUOP pfn; // pointer to handler
22:47:20Mat3WORD uop; // 16-bit duop opcode
22:47:22Mat3BYTE iduop; // index of this duop into the block
22:47:24Mat3BYTE delta_PC; // start of guest instruction duop corresponds to
22:47:26Mat3DWORD optional; // optional 32-bit operand
22:47:28Mat3DWORD ops; // 32-bit packed operand(s) for this duop
22:47:30Mat3} DUOP, *PDUOP;
22:47:44Mat3sorry, for the long post
22:47:52Araqyeah exactly
22:48:02Araqthats at least 16 byte per instruction
22:48:20Araqquite insane
22:50:02Mat3that's the price of 'C' and 'C++' to be paid for performance
22:51:22Mat3you can limit the sizes by using direct-threading for the dispatch routine (but these depend on the de facto standard GNU extension for labels)
22:51:33*kniteli quit (Ping timeout: 244 seconds)
22:51:56Mat3another alternative is replicating the switch (this is called replicating-switch threading)
22:52:10Mat3both can be combined with software pipelining
22:52:12*hsuh quit (Remote host closed the connection)
22:53:03Mat3the last approach increases the generated code size significant
22:56:06*hsuh joined #nimrod
22:58:21*vendethiel quit (Quit: q+)
22:58:25*def- quit (Ping timeout: 258 seconds)
23:02:23*def- joined #nimrod
23:03:28*kniteli joined #nimrod
23:07:23flaviuI suggested using -Og for the csources compile, but no one was around. Thoughts?
23:07:24*kemet quit (Remote host closed the connection)
23:12:07Araqflaviu: well you know
23:12:14Araqnothing is really hard coded
23:12:28Araqchange your config so that it uses -Og for -d:release
23:13:53flaviuLooks hard coded to me: https://github.com/nim-lang/csources/blob/devel/build.sh#L31
23:14:11Mat3ciao
23:14:21*Mat3 left #nimrod (#nimrod)
23:14:24flaviuAnyway, I guess I should send a pr to nim-lang/nim-buildbot
23:17:10Araqoh you mean the build script
23:17:21Araqwell you need to adapt that then
23:17:38flaviuYep. It takes a while on ARM, so any speed up is desirable.
23:19:47hoplaAbout the interpreter stuff. I am not sure it relates to the conversation ... but tail call optimization is fairly well supported in c compilers (used by many scheme compilers for CPS transform). See: https://gist.github.com/anonymous/922f23126e30e7bde88a. Each opcode function uses a jump and no stack is involved. Anyway :-)
23:22:11*pmac_ joined #nimrod
23:23:44*hsuh quit (Read error: Connection reset by peer)
23:24:09*hsuh joined #nimrod
23:26:17Araqhopla: yeah we know
23:29:26*pmac_ quit (Quit: Page closed)
23:29:35fowlmouthAraq, how come there is no llvm target
23:30:41Araqfowlmouth: too much work for zero gain
23:30:46flaviufowlmouth: Because C works just as well.
23:31:47hoplaAraq, fowlmouth: dwarf support ??? :P
23:44:19*hopla quit (Ping timeout: 246 seconds)
23:49:50*johnsoft quit (Ping timeout: 255 seconds)
23:50:57*johnsoft joined #nimrod