00:17:18 | NimBot | Araq/Nimrod fb2e31a Araq [+0 ±2 -0]: new parser works with docgen |
00:22:02 | * | zahary quit (Quit: Leaving.) |
00:24:29 | fowl | wow you even preserve line info from macros.parseStmt() |
00:26:00 | Araq | well I told the forum to try out newparser |
00:26:04 | Araq | good night |
00:28:18 | fowl | whoo i got a new solution for macros that require libraries |
00:28:40 | fowl | throw a when not(defined(sometype)): import that/lib in the generated code |
00:28:54 | fowl | good 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:16 | dom96 | hey gradha |
13:29:29 | gradha | hey dom96 |
13:31:37 | gradha | rather than writing specs for babel maybe you should write a test case to verify the import rules don't change |
13:33:38 | Araq | why? did they change? |
13:37:32 | gradha | yesterday 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:22 | Araq | er what? |
13:38:31 | Araq | only babelpath is affected |
13:38:45 | Araq | and we did recall previous conversations I think |
13:39:23 | Araq | I asked fowl about the desired behaviour and he agreed with dom96 ... so it was 2 against 1 |
13:39:31 | gradha | is that babelpath change "backwards compatible"? |
13:40:10 | Araq | no ... but then we never claimed babel in any way stable |
13:40:38 | Araq | and I think the old babel path wasn't even in 0.9.0 |
13:40:45 | Araq | which is the base to compare against |
13:40:53 | Araq | bbbl |
13:51:49 | * | fowl joined #nimrod |
14:18:41 | Araq | back |
14:18:59 | fowl | i have an issue :) |
14:19:36 | Araq | dunno how that deserves a :-) but go on |
14:19:58 | gradha | maybe fowl is just a happy person |
14:21:04 | fowl | here 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:12 | Araq | a compileTime var's lifetime is bound to its module ... I think |
14:24:32 | Araq | otherwise how could separate compilation ever work? |
14:25:07 | fowl | i dont follow |
14:25:20 | fowl | my table sticks around |
14:25:52 | Araq | does it *after* the module that defines it has been compiled? |
14:26:51 | fowl | yes |
14:27:01 | fowl | i use it defComponent() and genComponents() |
14:27:35 | Araq | but defComponent and genComponents are both in the same module |
14:27:48 | fowl | im talking about |
14:27:53 | fowl | import complib |
14:27:58 | fowl | defCOmponent(..) |
14:28:23 | fowl | works, but the extra statements that should be in belayedorders arent there |
14:29:00 | Araq | yeah |
14:29:35 | Araq | that's because belayedOrders has been setup in some other module |
14:30:18 | fowl | so has the table where i store component info |
14:33:04 | Araq | fowl: try to workaround with include please |
14:33:15 | fowl | thats what im using atm |
14:33:36 | Araq | what do you mean? it fails with include? |
14:33:45 | fowl | no it works with include |
14:33:59 | fowl | but id rather it work this way, it looks nicer |
14:34:03 | Araq | ha that's what I think ;-) |
14:34:48 | Araq | yeah well that requires compiletime var serialization for rod files and I think it's unsound |
14:35:02 | Araq | zahary pushes for that feature too ... |
14:35:18 | fowl | Araq: i dont actually need it exported |
14:35:35 | Araq | it doesn't matter if exported or not |
14:35:49 | Araq | each module gets its own compiletime context |
14:35:53 | Araq | it's not shared |
14:37:01 | gradha | I don't know how to read a line from a PStream without blocking if there is no data yet to be read |
14:37:26 | Araq | gradha: we're working on async file IO ... |
14:37:46 | gradha | oh, so it's not possible at all? |
14:38:01 | Araq | I don't think so |
14:38:39 | Araq | you could use the handle and pass it to some OS specific function |
14:38:56 | Araq | not 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:07 | gradha | Interesting results of parallelization of idetools |
15:46:08 | gradha | 1 Took 53.17 seconds to process (0.89 minutes in total) |
15:46:08 | gradha | 2 Took 29.34 seconds to process (0.49 minutes in total) |
15:46:08 | gradha | 4 Took 19.20 seconds to process (0.32 minutes in total) |
15:46:08 | gradha | 6 Took 17.29 seconds to process (0.29 minutes in total) |
15:46:09 | gradha | 8 Took 16.18 seconds to process (0.27 minutes in total) |
15:46:11 | gradha | 12 Took 16.19 seconds to process (0.27 minutes in total) |
15:46:19 | gradha | the first column is the number of forced parallel processes |
15:46:34 | gradha | the machine has 4 cores and is using a sleep time of 50ms |
15:46:52 | gradha | if I change the sleep time to 25ms the case for 4 cores goes below 17s |
15:47:20 | gradha | I guess the sleep delay is dependant on machine/architecture/os |
15:47:35 | Araq | interesting that you always produce results with this horribly bugged compiler :D |
15:47:53 | gradha | you mean nimrod? |
15:48:53 | Araq | yeah |
15:49:40 | gradha | are you going to fix the newparser branch for macosx before merging to master? |
15:50:18 | Araq | there is nothing to fix ... we just need to regenerate C sources for macosx or rather you need to download them via nimbuild |
15:50:48 | gradha | ah, so it's that run kock twice thing? |
15:50:56 | Araq | the old compiler doesn't support PType(x: y) and that's what recent versions of the compiler do use |
15:50:59 | gradha | I like "lib/system.nim(2565, 32) Warning: unknown magic 'Locals' might crash the compiler [UnknownMagic]" in the output |
15:51:15 | Araq | yeah .. a sure sign the compiler is too old :P |
16:07:50 | gradha | is gcc48 good enough? |
16:09:07 | Araq | I use 4.7.2 |
16:09:23 | Araq | not 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:36 | reactormonk | fowl, you know I changed my nick by now? ^^ |
16:55:45 | fowl | reactormonk: 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:41 | exhu | hey Araq! |
18:44:42 | Araq | hi exhu |
18:46:22 | exhu | I 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:21 | Araq | my guess: it's the InTransaction template that gets a 'stmt' but is not immediate |
18:51:57 | Araq | you overload them so you can't make them immediate though |
18:52:13 | Araq | meh let me fix it now |
18:56:21 | Araq | btw the non deprecated way is to use palitsa_db.nimrod.cfg |
18:56:35 | Araq | this way aporia can determine the main file |
18:57:18 | exhu | ok, thanks |
18:59:02 | exhu | but i compile tests and the main program separately, so should I use several cfg files? they share the options |
19:00:00 | Araq | I'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:27 | Araq | proc findRow*[TEnt](o: var TOpenDb, tableName: string, |
19:05:29 | Araq | id: TEntityId, outM: var TEnt): stmt = |
19:05:33 | Araq | now that's mean :P |
19:05:50 | Araq | it's a known bug btw |
19:06:49 | Araq | catching these pseudo types properly in the frontend is somehow pretty hard ... |
19:07:30 | Araq | also nice that 'true' matches 'stmt' ... |
19:13:55 | exhu | can you explain what's wrong with this code? |
19:14:28 | Araq | well it should be ': bool' obviously |
19:15:06 | exhu | damn, now i see the mistake -) |
19:15:43 | exhu | templates, macros, generics all mixed in the head and before my eyes -) |
19:22:59 | Araq | well ... it still doesn't compile then |
19:23:06 | Araq | but the error messages are reasonable |
19:23:25 | Araq | and yeah ... expresssions as a proc body support will be improved |
19:27:21 | Araq | in fact ... that's what I wanted to implement today :-/ |
19:30:18 | exhu | I have changed some templates into generic procs and now it compiles. |
19:30:47 | Araq | added 'result = ' to findMedia and findEntry? |
19:31:23 | exhu | return findRow |
19:31:46 | Araq | ok |
19:33:04 | exhu | with generics and .somefunction - style calls code is really nice |
19:33:22 | Araq | http://nimrod-code.org/strutils.html#129 |
19:33:29 | Araq | what you wrote already exists ;-) |
19:35:16 | Araq | also I would raise EInvalidValue instead of EOverflow though admittedly that's quite arbitrary |
19:36:49 | Araq | how do you like sql"string here" btw? helps to prevent bugs or is it just clutter? |
19:38:43 | exhu | sql"" has problems because the requests do not fit into one line of text and I had to use sql("..." & "...") |
19:39:38 | Araq | sql""" use long strings |
19:39:42 | Araq | spanning multiple |
19:39:45 | Araq | lines """ |
19:40:36 | exhu | didn't know it -) |
19:42:28 | Araq | I think I should have made them use $1, $# instead of ? for consistency but now it's too late |
19:42:55 | Araq | and ? is common in SQL engines |
19:47:44 | exhu | I actually don't see any need in sql() because SQLite supports substitution with ? |
19:48:25 | Araq | the sql is there to prevent SQL injection attacks: |
19:49:04 | Araq | "select field where x = '" & someVar & "'" |
19:49:59 | exhu | How 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:43 | Araq | no, there is no & for sql strings ... ok, you can still mess it up, but it's harder :P |
19:52:03 | exhu | sql("aaaa" & "smsmsm") :) |
19:52:40 | Araq | yeah :-/ |
19:53:00 | Araq | oh 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:28 | reactormonk | Araq, let me try to get nimrod run on the arduino... |
21:42:05 | reactormonk | where do I hook to get my -d:arduino with direct deployment? |
21:42:28 | reactormonk | ... and ignore -r |
21:47:00 | dom96 | Tried this? http://build.nimrod-code.org/docs/nimrodc.html#nimrod-for-embedded-systems |
21:47:41 | Araq | --gc:none -d:useMalloc doesn't compile anymore though |
21:47:57 | Araq | it's some trivial fix though I think |
21:56:57 | Araq | reactormonk: which CPU? |
22:10:16 | reactormonk | Araq, http://arduino.cc/en/Reference/HomePage <- programming language... somewhat C-style. |
22:10:18 | reactormonk | Araq, 8-bit Atmel AVR |
22:14:29 | Araq | looks like C to me |
22:16:37 | reactormonk | not sure if it has pointers |
22:17:06 | reactormonk | doesn't look like it |
22:17:11 | reactormonk | wait, it does |
22:18:24 | * | OrionPK joined #nimrod |
22:38:02 | reactormonk | Araq, no GC? so how do I prevent memory leaks? |
22:40:56 | Araq | you want a GC on an 8bit CPU? |
22:41:49 | Araq | heck you shouldn't even call malloc |
22:42:38 | Araq | just use int8 and int16 and do what you need to do |
22:48:10 | reactormonk | ok :-) |
22:48:18 | reactormonk | no free from nimrod? |
23:08:02 | * | q66 quit (Remote host closed the connection) |