<<02-05-2013>>

00:17:18NimBotAraq/Nimrod fb2e31a Araq [+0 ±2 -0]: new parser works with docgen
00:22:02*zahary quit (Quit: Leaving.)
00:24:29fowlwow you even preserve line info from macros.parseStmt()
00:26:00Araqwell I told the forum to try out newparser
00:26:04Araqgood night
00:28:18fowlwhoo i got a new solution for macros that require libraries
00:28:40fowlthrow a when not(defined(sometype)): import that/lib in the generated code
00:28:54fowlgood night
00:49:38*OrionPK quit (Read error: Connection reset by peer)
00:51:45*OrionPK joined #nimrod
00:54:09*fowl quit (Read error: Connection reset by peer)
03:17:51*fowl joined #nimrod
04:10:48*fowl quit (Ping timeout: 272 seconds)
04:28:29*fowl joined #nimrod
04:29:52*OrionPK quit (Read error: Connection reset by peer)
07:20:28*_ponce joined #nimrod
08:34:37*q66 joined #nimrod
11:25:22*fowl quit (Ping timeout: 272 seconds)
13:22:35*gradha joined #nimrod
13:29:16dom96hey gradha
13:29:29gradhahey dom96
13:31:37gradharather than writing specs for babel maybe you should write a test case to verify the import rules don't change
13:33:38Araqwhy? did they change?
13:37:32gradhayesterday you did change the behaviour, and did so without recalling previous conversations, so looks like documentation is a lost hope, at least unit testing signals when it fails
13:37:49*xcombelle joined #nimrod
13:38:22Araqer what?
13:38:31Araqonly babelpath is affected
13:38:45Araqand we did recall previous conversations I think
13:39:23AraqI asked fowl about the desired behaviour and he agreed with dom96 ... so it was 2 against 1
13:39:31gradhais that babelpath change "backwards compatible"?
13:40:10Araqno ... but then we never claimed babel in any way stable
13:40:38Araqand I think the old babel path wasn't even in 0.9.0
13:40:45Araqwhich is the base to compare against
13:40:53Araqbbbl
13:51:49*fowl joined #nimrod
14:18:41Araqback
14:18:59fowli have an issue :)
14:19:36Araqdunno how that deserves a :-) but go on
14:19:58gradhamaybe fowl is just a happy person
14:21:04fowlhere belayedOrders is coming up empty if I import this from a different file https://gist.github.com/fowlmouth/5487130#file-components2-nim-L160
14:23:12Araqa compileTime var's lifetime is bound to its module ... I think
14:24:32Araqotherwise how could separate compilation ever work?
14:25:07fowli dont follow
14:25:20fowlmy table sticks around
14:25:52Araqdoes it *after* the module that defines it has been compiled?
14:26:51fowlyes
14:27:01fowli use it defComponent() and genComponents()
14:27:35Araqbut defComponent and genComponents are both in the same module
14:27:48fowlim talking about
14:27:53fowlimport complib
14:27:58fowldefCOmponent(..)
14:28:23fowlworks, but the extra statements that should be in belayedorders arent there
14:29:00Araqyeah
14:29:35Araqthat's because belayedOrders has been setup in some other module
14:30:18fowlso has the table where i store component info
14:33:04Araqfowl: try to workaround with include please
14:33:15fowlthats what im using atm
14:33:36Araqwhat do you mean? it fails with include?
14:33:45fowlno it works with include
14:33:59fowlbut id rather it work this way, it looks nicer
14:34:03Araqha that's what I think ;-)
14:34:48Araqyeah well that requires compiletime var serialization for rod files and I think it's unsound
14:35:02Araqzahary pushes for that feature too ...
14:35:18fowlAraq: i dont actually need it exported
14:35:35Araqit doesn't matter if exported or not
14:35:49Araqeach module gets its own compiletime context
14:35:53Araqit's not shared
14:37:01gradhaI don't know how to read a line from a PStream without blocking if there is no data yet to be read
14:37:26Araqgradha: we're working on async file IO ...
14:37:46gradhaoh, so it's not possible at all?
14:38:01AraqI don't think so
14:38:39Araqyou could use the handle and pass it to some OS specific function
14:38:56Araqnot sure if you can get the handle without hacks though
14:45:24*fowl quit (Ping timeout: 272 seconds)
14:53:55*q66 quit (Remote host closed the connection)
15:04:15*q66 joined #nimrod
15:46:07gradhaInteresting results of parallelization of idetools
15:46:08gradha1 Took 53.17 seconds to process (0.89 minutes in total)
15:46:08gradha2 Took 29.34 seconds to process (0.49 minutes in total)
15:46:08gradha4 Took 19.20 seconds to process (0.32 minutes in total)
15:46:08gradha6 Took 17.29 seconds to process (0.29 minutes in total)
15:46:09gradha8 Took 16.18 seconds to process (0.27 minutes in total)
15:46:11gradha12 Took 16.19 seconds to process (0.27 minutes in total)
15:46:19gradhathe first column is the number of forced parallel processes
15:46:34gradhathe machine has 4 cores and is using a sleep time of 50ms
15:46:52gradhaif I change the sleep time to 25ms the case for 4 cores goes below 17s
15:47:20gradhaI guess the sleep delay is dependant on machine/architecture/os
15:47:35Araqinteresting that you always produce results with this horribly bugged compiler :D
15:47:53gradhayou mean nimrod?
15:48:53Araqyeah
15:49:40gradhaare you going to fix the newparser branch for macosx before merging to master?
15:50:18Araqthere is nothing to fix ... we just need to regenerate C sources for macosx or rather you need to download them via nimbuild
15:50:48gradhaah, so it's that run kock twice thing?
15:50:56Araqthe old compiler doesn't support PType(x: y) and that's what recent versions of the compiler do use
15:50:59gradhaI like "lib/system.nim(2565, 32) Warning: unknown magic 'Locals' might crash the compiler [UnknownMagic]" in the output
15:51:15Araqyeah .. a sure sign the compiler is too old :P
16:07:50gradhais gcc48 good enough?
16:09:07AraqI use 4.7.2
16:09:23Araqnot sure if nimrod has been tested with 4.8
16:29:46*Reisen is now known as Reiser
16:43:48*fowl joined #nimrod
16:54:36reactormonkfowl, you know I changed my nick by now? ^^
16:55:45fowlreactormonk: nick names context sensitive
17:22:31*xcombelle quit (Remote host closed the connection)
17:27:36*Trixar_zb is now known as Trixar_za
18:38:33*exhu joined #nimrod
18:38:41exhuhey Araq!
18:44:42Araqhi exhu
18:46:22exhuI have created another issue about compiler internal error, now it's not macro related but with generic procs, this is a show stopper for me, https://github.com/Araq/Nimrod/issues/414
18:51:21Araqmy guess: it's the InTransaction template that gets a 'stmt' but is not immediate
18:51:57Araqyou overload them so you can't make them immediate though
18:52:13Araqmeh let me fix it now
18:56:21Araqbtw the non deprecated way is to use palitsa_db.nimrod.cfg
18:56:35Araqthis way aporia can determine the main file
18:57:18exhuok, thanks
18:59:02exhubut i compile tests and the main program separately, so should I use several cfg files? they share the options
19:00:00AraqI'm not sure but I think you can use @include "somefile.cfg" in the configuration file
19:01:46*Trixar_za is now known as Trix[a]r_za
19:05:27Araqproc findRow*[TEnt](o: var TOpenDb, tableName: string,
19:05:29Araq id: TEntityId, outM: var TEnt): stmt =
19:05:33Araqnow that's mean :P
19:05:50Araqit's a known bug btw
19:06:49Araqcatching these pseudo types properly in the frontend is somehow pretty hard ...
19:07:30Araqalso nice that 'true' matches 'stmt' ...
19:13:55exhucan you explain what's wrong with this code?
19:14:28Araqwell it should be ': bool' obviously
19:15:06exhudamn, now i see the mistake -)
19:15:43exhutemplates, macros, generics all mixed in the head and before my eyes -)
19:22:59Araqwell ... it still doesn't compile then
19:23:06Araqbut the error messages are reasonable
19:23:25Araqand yeah ... expresssions as a proc body support will be improved
19:27:21Araqin fact ... that's what I wanted to implement today :-/
19:30:18exhuI have changed some templates into generic procs and now it compiles.
19:30:47Araqadded 'result = ' to findMedia and findEntry?
19:31:23exhureturn findRow
19:31:46Araqok
19:33:04exhuwith generics and .somefunction - style calls code is really nice
19:33:22Araqhttp://nimrod-code.org/strutils.html#129
19:33:29Araqwhat you wrote already exists ;-)
19:35:16Araqalso I would raise EInvalidValue instead of EOverflow though admittedly that's quite arbitrary
19:36:49Araqhow do you like sql"string here" btw? helps to prevent bugs or is it just clutter?
19:38:43exhusql"" has problems because the requests do not fit into one line of text and I had to use sql("..." & "...")
19:39:38Araqsql""" use long strings
19:39:42Araqspanning multiple
19:39:45Araqlines """
19:40:36exhudidn't know it -)
19:42:28AraqI think I should have made them use $1, $# instead of ? for consistency but now it's too late
19:42:55Araqand ? is common in SQL engines
19:47:44exhuI actually don't see any need in sql() because SQLite supports substitution with ?
19:48:25Araqthe sql is there to prevent SQL injection attacks:
19:49:04Araq"select field where x = '" & someVar & "'"
19:49:59exhuHow can it prevent this? I can pass arbitrary string, or it's just dummy as of now, but supposed to check the string for validity?
19:51:43Araqno, there is no & for sql strings ... ok, you can still mess it up, but it's harder :P
19:52:03exhusql("aaaa" & "smsmsm") :)
19:52:40Araqyeah :-/
19:53:00Araqoh well a TR macro fixes this :P
20:58:13*gradha quit (Quit: bbl, have youtube videos to watch)
21:03:05*exhu quit (Quit: Leaving)
21:41:28reactormonkAraq, let me try to get nimrod run on the arduino...
21:42:05reactormonkwhere do I hook to get my -d:arduino with direct deployment?
21:42:28reactormonk... and ignore -r
21:47:00dom96Tried this? http://build.nimrod-code.org/docs/nimrodc.html#nimrod-for-embedded-systems
21:47:41Araq--gc:none -d:useMalloc doesn't compile anymore though
21:47:57Araqit's some trivial fix though I think
21:56:57Araqreactormonk: which CPU?
22:10:16reactormonkAraq, http://arduino.cc/en/Reference/HomePage <- programming language... somewhat C-style.
22:10:18reactormonkAraq, 8-bit Atmel AVR
22:14:29Araqlooks like C to me
22:16:37reactormonknot sure if it has pointers
22:17:06reactormonkdoesn't look like it
22:17:11reactormonkwait, it does
22:18:24*OrionPK joined #nimrod
22:38:02reactormonkAraq, no GC? so how do I prevent memory leaks?
22:40:56Araqyou want a GC on an 8bit CPU?
22:41:49Araqheck you shouldn't even call malloc
22:42:38Araqjust use int8 and int16 and do what you need to do
22:48:10reactormonkok :-)
22:48:18reactormonkno free from nimrod?
23:08:02*q66 quit (Remote host closed the connection)