00:01:28 | * | boopsies is now known as boopsiesisaway |
00:01:36 | * | NhanH joined #nim |
00:04:53 | * | skroll2 quit (Ping timeout: 252 seconds) |
00:04:54 | * | ioctl_ quit (Ping timeout: 252 seconds) |
00:05:02 | * | ioctl joined #nim |
00:05:10 | * | skroll2 joined #nim |
00:05:35 | * | biscarch joined #nim |
00:07:49 | * | mikolalysenko joined #nim |
00:07:49 | * | EastByte joined #nim |
00:18:15 | * | johnsoft joined #nim |
00:37:17 | * | NimBot joined #nim |
00:40:30 | * | gyeates joined #nim |
00:40:39 | * | NhanH_ is now known as NhanH |
00:41:56 | * | Heartmender joined #nim |
00:41:56 | * | tmku joined #nim |
00:41:56 | * | shevy joined #nim |
00:41:56 | * | OnO joined #nim |
00:42:10 | * | Heartmender quit (Changing host) |
00:42:10 | * | Heartmender joined #nim |
00:43:11 | * | Heartmender is now known as Guest37450 |
00:50:47 | * | endou___________ joined #nim |
00:51:18 | * | jackkv joined #nim |
00:51:43 | * | biscarch joined #nim |
00:54:38 | * | Guest85144 is now known as taotetek |
00:55:15 | * | profan quit (Remote host closed the connection) |
00:55:16 | * | endou__________ quit (Ping timeout: 943 seconds) |
00:55:17 | * | dalarmmst quit (Ping timeout: 943 seconds) |
00:55:17 | * | jackv quit (Ping timeout: 943 seconds) |
00:55:18 | * | minus quit (Ping timeout: 943 seconds) |
00:58:28 | * | minus joined #nim |
01:01:49 | * | gyeates quit (Ping timeout: 276 seconds) |
01:02:20 | * | gyeates joined #nim |
01:14:28 | * | dalarmmst joined #nim |
01:29:58 | reactormonk | dom96, imo do that contributing part yourself, I think you know yourself better what you want to communicate. |
01:31:56 | * | Uint2048 quit (Quit: Page closed) |
01:46:09 | * | Demon_Fox joined #nim |
01:58:09 | reactormonk | Araq, lib/impure/rdstdin.nim(103, 10) Error: cannot open 'readline' |
01:58:17 | reactormonk | you broke booting. Booh. |
02:11:23 | * | strcmp2 quit (Quit: Leaving) |
02:25:53 | * | dddddd quit (Ping timeout: 246 seconds) |
03:01:21 | * | jackkv is now known as jackv |
03:03:01 | * | shevy quit (Remote host closed the connection) |
03:06:23 | * | BitPuffin|osx quit (Ping timeout: 252 seconds) |
03:08:08 | * | darkf joined #nim |
03:49:57 | * | shevy joined #nim |
04:09:40 | * | gyeates quit (Ping timeout: 276 seconds) |
04:29:03 | * | yglukhov joined #nim |
04:33:16 | * | yglukhov quit (Ping timeout: 246 seconds) |
04:39:49 | * | Kingsquee joined #nim |
04:48:31 | * | gyeates joined #nim |
05:05:10 | * | pipeep joined #nim |
05:05:33 | * | mnemonikk_ is now known as mnemonikk |
05:05:33 | * | mnemonikk quit (Changing host) |
05:05:33 | * | mnemonikk joined #nim |
05:14:13 | * | jj2baile_ quit (Ping timeout: 264 seconds) |
05:14:39 | * | jj2baile joined #nim |
05:25:15 | * | n3vtelen joined #nim |
05:25:28 | * | n3vtelen left #nim ("Leaving") |
05:27:01 | * | gyeates quit (Ping timeout: 256 seconds) |
06:59:05 | * | Amun-Ra is now known as Amun_Ra |
06:59:35 | * | Amun_Ra is now known as Guest54567 |
07:12:27 | * | jubalh joined #nim |
07:25:58 | * | jszymanski joined #nim |
07:56:13 | * | xcombelle joined #nim |
07:58:22 | * | strcmp1 joined #nim |
08:00:38 | * | xificurC joined #nim |
08:00:45 | * | jubalh quit (Quit: Leaving) |
08:20:51 | * | Matthias247 joined #nim |
08:36:10 | * | ChrisMAN_ quit (Ping timeout: 276 seconds) |
08:37:36 | * | milosn quit (Quit: leaving) |
08:39:25 | * | key_ quit (Ping timeout: 276 seconds) |
09:05:28 | * | filcuc joined #nim |
09:18:53 | * | apense joined #nim |
09:20:05 | * | xcombelle quit (Remote host closed the connection) |
09:24:10 | OnO | good morning and thanks for the mess :) |
09:26:34 | * | apense quit (Ping timeout: 265 seconds) |
09:30:50 | * | jubalh joined #nim |
09:32:14 | * | jubalh quit (Remote host closed the connection) |
09:35:15 | * | OnO is now known as ono |
09:41:40 | * | shevy left #nim ("I'll be back ... maybe") |
09:53:32 | * | ono is now known as OnO |
10:03:40 | Araq | OnO: hey. bbl |
10:07:47 | * | yglukhov joined #nim |
10:25:55 | * | gokr joined #nim |
10:27:18 | * | charmander is now known as squirtle |
10:28:12 | * | polde quit (Quit: q) |
10:32:12 | * | polde joined #nim |
10:45:30 | * | jaco60 joined #nim |
10:46:48 | * | polde quit (Quit: q) |
10:47:23 | * | polde joined #nim |
10:50:23 | * | BitPuffin|osx joined #nim |
10:57:13 | * | betawaffle quit (Ping timeout: 276 seconds) |
10:58:22 | * | gokr1 joined #nim |
10:58:23 | * | gokr quit (Read error: Connection reset by peer) |
10:59:03 | Araq | OnO: so ... calmed down a bit? ;-) |
10:59:29 | OnO | yeah, definitely, took my pills ;P |
11:00:13 | * | Kingsquee quit (Quit: Konversation terminated!) |
11:02:29 | * | betawaffle joined #nim |
11:07:26 | Araq | OnO: btw c2nim produces CR-LF on windows, when I edit the file the editor keeps line endings consistent, git diff on linux shows ^M. who is to blame? |
11:10:45 | * | squirtle is now known as dtscode |
11:10:50 | * | dddddd joined #nim |
11:16:56 | OnO | just set your Git autocrlf |
11:17:01 | OnO | https://help.github.com/articles/dealing-with-line-endings/ |
11:18:36 | Araq | yeah I know of this solution |
11:19:16 | OnO | btw. did the PR for Git commit rules https://github.com/nim-lang/Nim/pull/2966 |
11:19:18 | * | leru joined #nim |
11:19:24 | Araq | and I guess I will do it. nevertheless it's wrong too, because as I said, a few files are CR-LF for testing purposes, at least they used to be. |
11:20:49 | OnO | I guess you may set these file in .gitattribtues to be treated differently |
11:27:13 | OnO | bbl |
11:30:54 | Araq | dom96: can I add "nimble publish"? |
11:32:07 | dom96 | Araq: If you want to implement it, go ahead. |
11:33:37 | Araq | for me it's a showstopper missing feature |
11:34:10 | Araq | packages.json makes me type stuff all over that's already in the Nimble file |
11:34:49 | Araq | it's also wrong btw |
11:35:14 | Araq | it asks about the license but this can depend on the git hash / version |
11:41:35 | dom96 | It's the license that the project is currently on. |
11:41:44 | dom96 | That is why this is also specified in the .nimble file. |
11:41:57 | Araq | it's not a big deal |
11:41:58 | dom96 | Is it really that difficult to copy and paste? |
11:42:32 | Araq | we really want this list to be used |
11:42:57 | Araq | so it has to be as simple as possible and then even simpler |
11:46:22 | Araq | also JSON is annoying with all these commas and brackets and shit :P |
11:47:37 | * | filcuc quit (Ping timeout: 265 seconds) |
12:01:47 | * | tymat joined #nim |
12:01:53 | tymat | hello |
12:02:09 | tymat | what is required to get FreeBSD/*BSD support? |
12:02:13 | pigmej | hey everyone ;) |
12:02:32 | * | milosn joined #nim |
12:02:34 | Araq | tymat: Nim does support FreeBSD/*BSD afaict |
12:03:17 | * | wuehlmaus joined #nim |
12:03:48 | tymat | oh I didn't see it on the list |
12:03:55 | tymat | is there an updates ports for it? |
12:05:57 | Araq | I don't know. but it's in the "ports" list, whatever that means. |
12:30:44 | * | Demon_Fox quit (Quit: Leaving) |
12:41:17 | * | jszymanski quit (Quit: computer sleeps...) |
12:41:59 | pigmej | reactormonk: the biggest problem is taht after some time, I have like 50 nimsuggest processes |
12:42:21 | pigmej | probably find-or-create-epc is broken somehow |
12:44:50 | * | Ven joined #nim |
12:45:51 | Araq | dom96: https://github.com/nim-lang/packages/pull/195 |
12:47:46 | * | Ven quit (Read error: No route to host) |
12:48:08 | * | Ven joined #nim |
13:00:41 | * | darkf_ joined #nim |
13:01:30 | * | xificurC_ joined #nim |
13:02:44 | * | Matthias247_ joined #nim |
13:03:11 | * | tmku_ joined #nim |
13:03:45 | * | jj2baile_ joined #nim |
13:06:03 | * | biscarch_ joined #nim |
13:07:49 | * | Heartmender joined #nim |
13:08:02 | * | Matthias247 quit (*.net *.split) |
13:08:02 | * | xificurC quit (*.net *.split) |
13:08:02 | * | strcmp1 quit (*.net *.split) |
13:08:03 | * | jj2baile quit (*.net *.split) |
13:08:04 | * | darkf quit (*.net *.split) |
13:08:05 | * | dalarmmst quit (*.net *.split) |
13:08:05 | * | biscarch quit (*.net *.split) |
13:08:05 | * | endou___________ quit (*.net *.split) |
13:08:08 | * | Guest37450 quit (*.net *.split) |
13:08:08 | * | tmku quit (*.net *.split) |
13:08:11 | * | OnO quit (*.net *.split) |
13:08:12 | * | Heartmender is now known as Guest49681 |
13:08:43 | * | shevy joined #nim |
13:09:01 | * | endou___________ joined #nim |
13:09:38 | * | jj2baile_ quit (Ping timeout: 276 seconds) |
13:09:47 | * | OnO joined #nim |
13:09:55 | * | jj2baile joined #nim |
13:10:25 | * | biscarch_ is now known as biscarch |
13:12:01 | * | strcmp1 joined #nim |
13:15:54 | * | dalarmmst joined #nim |
13:18:35 | * | Matthias247 joined #nim |
13:19:32 | * | S_Walker quit (Ping timeout: 265 seconds) |
13:20:30 | * | themagician quit (Ping timeout: 265 seconds) |
13:20:31 | * | r-ku quit (Ping timeout: 265 seconds) |
13:20:59 | * | yglukhov quit (Ping timeout: 265 seconds) |
13:21:01 | * | fold quit (Ping timeout: 265 seconds) |
13:21:28 | * | Matthias247_ quit (Ping timeout: 265 seconds) |
13:24:33 | * | jubalh joined #nim |
13:25:29 | * | themagician joined #nim |
13:26:14 | * | S_Walker joined #nim |
13:26:27 | * | r-ku joined #nim |
13:27:45 | * | darkf_ is now known as darkf |
13:28:37 | * | milosn quit (Ping timeout: 276 seconds) |
13:29:43 | * | milosn joined #nim |
13:35:28 | * | fold joined #nim |
13:46:10 | * | jubalh quit (Quit: Leaving) |
14:00:05 | * | trafcio joined #nim |
14:03:52 | * | trafcio quit (Client Quit) |
14:04:28 | * | trafcio joined #nim |
14:12:20 | * | trafcio quit (Quit: Textual IRC Client: www.textualapp.com) |
14:12:47 | * | trafcio joined #nim |
14:27:28 | * | aziz joined #nim |
14:35:10 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:37:16 | * | trafcio quit (Quit: Textual IRC Client: www.textualapp.com) |
14:37:42 | * | trafcio joined #nim |
14:44:50 | * | jszymanski joined #nim |
14:49:10 | dom96 | Anybody bored and want a project? |
14:49:21 | * | dalarmmst quit (Remote host closed the connection) |
14:50:49 | * | dalarmmst joined #nim |
15:01:21 | federico2 | dom96: what project? |
15:02:56 | * | Guest49681 quit (Changing host) |
15:02:56 | * | Guest49681 joined #nim |
15:02:56 | * | Guest49681 quit (Changing host) |
15:02:56 | * | Guest49681 joined #nim |
15:02:59 | * | Guest49681 is now known as Quora |
15:06:48 | Araq | federico2: I think he means creating a wrapper for github's API |
15:08:58 | * | tmku_ is now known as tmku |
15:09:01 | * | fowl quit (Read error: Connection reset by peer) |
15:11:38 | * | fowl joined #nim |
15:16:49 | * | strcmp1 quit (Remote host closed the connection) |
15:17:02 | * | gyeates joined #nim |
15:18:13 | * | trafcio quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
15:30:49 | * | aziz quit (Remote host closed the connection) |
15:36:37 | * | shevy left #nim ("I'll be back ... maybe") |
15:39:29 | dom96 | federico2: yep, what Araq said |
15:50:58 | * | xificurC_ quit (Quit: WeeChat 1.2) |
15:51:13 | * | xificurC joined #nim |
15:55:18 | * | Matthias247 quit (Read error: Connection reset by peer) |
16:24:12 | * | trafcio joined #nim |
16:25:00 | * | boopsiesisaway is now known as boopsies |
16:30:47 | * | jszymanski1 joined #nim |
16:33:13 | * | jszymanski quit (Ping timeout: 250 seconds) |
16:33:21 | * | Ven joined #nim |
16:38:22 | * | trafcio quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
16:42:49 | * | zahary joined #nim |
16:45:35 | * | yeye123 joined #nim |
16:54:06 | * | jszymanski1 is now known as jszymanski |
16:57:02 | * | darkf quit (Quit: Leaving) |
17:02:42 | reactormonk | pigmej, pkill nimsuggest - any find the bug :-) |
17:03:51 | reactormonk | can you toss me a screen recording for reproduction? |
17:05:58 | * | vikaton joined #nim |
17:09:11 | * | yglukhov joined #nim |
17:10:39 | * | federico2 is now known as federico3 |
17:14:24 | * | yeye123 quit (Quit: Leaving) |
17:17:00 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:18:54 | reactormonk | Araq, bootstrapping still broken. Error: unhandled exception: invalid integer: -1 [ValueError] |
17:20:42 | * | aziz joined #nim |
17:25:56 | pigmej | reactormonk: yeah sure I will try to investigate |
17:26:21 | pigmej | for now it seems that when nimsuggest crashes, it's not properly discarded/closed by epc |
17:37:17 | * | trafcio joined #nim |
17:39:41 | reactormonk | maybe check for an active buffer? Or make nimsuggest more resilient to crashes |
17:40:02 | pigmej | reactormonk: that's a good question though what happens there |
17:40:19 | pigmej | also what I noticed, nimsuggest errors are colored when spawned by epc |
17:40:41 | pigmej | so it seems that tty is not working correctly or something, because the colors appears just as escape sequences |
17:40:47 | pigmej | and not like real colors |
17:55:30 | * | Matthias247 joined #nim |
17:56:32 | * | Amrykid quit (Ping timeout: 246 seconds) |
17:56:59 | * | Amrykid joined #nim |
17:57:17 | * | trafcio quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
17:58:23 | reactormonk | probably tty detection gone wrong |
17:58:55 | yglukhov | nim resets tty attributes incorreclty. |
17:59:23 | yglukhov | after nim invocation the bash prompt is corrupted a bit |
18:00:26 | * | profan joined #nim |
18:07:54 | * | skyfex joined #nim |
18:14:59 | * | yglukhov quit (Quit: Be back later ...) |
18:18:17 | reactormonk | well, fuck |
18:30:02 | * | vendethiel- quit (Ping timeout: 264 seconds) |
18:31:20 | * | vendethiel joined #nim |
18:54:58 | * | cyraxjoe_ is now known as cyraxjoe |
19:03:53 | * | Trustable joined #nim |
19:04:36 | * | allan0 quit (Quit: WeeChat 1.2) |
19:10:53 | pigmej | reactormonk: any ideas how we can implement 'syntax check' / |
19:10:54 | pigmej | ? |
19:13:31 | reactormonk | pigmej, what exactly what should it do? |
19:13:57 | pigmej | good question |
19:14:06 | pigmej | but genreally nimsuggest is useless when three is an error |
19:14:38 | pigmej | the thing is we could know it only when debug mode is turned on |
19:15:29 | * | BitPuffin|osx quit (Ping timeout: 252 seconds) |
19:16:03 | * | Trustable quit (Read error: Connection reset by peer) |
19:16:26 | * | Trustable joined #nim |
19:16:26 | reactormonk | you could count errors |
19:16:34 | reactormonk | or grab the errors from msg |
19:16:43 | pigmej | only first one is usefull |
19:16:49 | pigmej | the rest are garbage |
19:17:22 | pigmej | Araq said so |
19:18:54 | reactormonk | :-( |
19:19:10 | pigmej | yeah |
19:19:21 | reactormonk | Any way to mess with the parser such that it will produce better results? |
19:21:11 | reactormonk | Aka rerun the parse with some modifications to make it run |
19:32:22 | * | Mat4 joined #nim |
19:41:12 | * | Guest54567 is now known as Amun_Ra |
19:45:39 | * | jubalh joined #nim |
19:51:34 | * | irezvov joined #nim |
19:51:41 | irezvov | hi there |
19:52:28 | Araq | hi irezvov |
19:52:37 | irezvov | could anybody tell me how call one macro from another and pass variable with NimNode to it? |
19:52:42 | Araq | reactormonk: hrm. booting works for me |
19:53:05 | reactormonk | Araq, confirmed, fixed. |
19:53:15 | irezvov | i wonna decouple one big macro in small submacros |
19:53:30 | irezvov | i can provide some code for example |
19:53:38 | reactormonk | irezvov, the second one can just be a proc, you can call procs from macros |
19:54:12 | Araq | irezvov: usually macros use .compileTime procs |
19:55:00 | irezvov | but i use quoute |
19:55:09 | irezvov | and got this error: Error: 'mExpandToAst' can only be used in compile-time context |
19:55:28 | irezvov | so i've decided it is wrong way |
19:56:05 | irezvov | i have got this message when tried use pure proc |
19:56:51 | irezvov | https://gist.github.com/SPY/67ee9b7ba12edcec3212 |
19:56:56 | irezvov | this is example |
19:57:50 | fowl | Mark the proc compiletime |
19:58:09 | * | vendethiel quit (Ping timeout: 244 seconds) |
19:59:08 | irezvov | shame on my head, i have to be more careful |
19:59:10 | irezvov | thx :) |
19:59:34 | irezvov | fowl: this is working |
20:00:57 | reactormonk | Araq, any reason why the compiletime part is necessary? |
20:01:11 | reactormonk | no way to just duplicate the proc with {.compileTime.} added if it's called from a macro? |
20:04:13 | * | vendethiel joined #nim |
20:08:16 | Araq | reactormonk: usually .compileTime procs use NimNode which isn't available at runtime. |
20:08:43 | Araq | there is no code duplication cause you can indeed just use the stuff that's neutral on the runtime vs compiletime issue |
20:08:45 | reactormonk | so you could automatically mark procs which use NimNode as compiletime? |
20:08:55 | Araq | yeah, we could do that |
20:09:32 | reactormonk | but that would require a meaningful error incase you're trying to call it from runtime |
20:10:39 | Araq | well right now you get nice C compiler errors |
20:10:53 | Araq | so ... it's not like it's fine the way it is now |
20:11:14 | reactormonk | :-( |
20:13:02 | * | Trustable quit (Remote host closed the connection) |
20:18:50 | * | wu-lee_ quit (Remote host closed the connection) |
20:24:23 | irezvov | i have written macro which helps to define network structures, but it looks awful :) https://gist.github.com/SPY/9393f9e5cb11ca4ae8b7#file-netdef-nim-L159-L168 |
20:25:01 | irezvov | network structure means fields have big-endian bytes order |
20:25:31 | irezvov | code like that make me crazy: fieldType = i[1][0][0][1] |
20:26:40 | irezvov | how can i improve readability? |
20:27:15 | Araq | i.first.zeroth.zeroth.first |
20:27:32 | Araq | (we don't know really) |
20:27:55 | irezvov | i think i should rename i to field. it will change everything :) |
20:28:18 | Araq | yup |
20:30:11 | irezvov | so is it regular practice to have such code in templates? |
20:30:42 | avsej | irezvov, wow, you are working on couchbase driver? |
20:30:53 | avsej | or memcache? |
20:31:04 | irezvov | avsej: no, on memcache driver now |
20:31:51 | irezvov | just like study project. i wonna feel Nim better |
20:31:56 | fowl | irezvov: normally we can use quote: to have nice looking macros but you are filling in the fields on a type def and its very nested, the only alternative is to build the ast inside out |
20:31:59 | avsej | interesting. I have plans to write couchbase one. so memcache parser (or macro for packet definition) would be great |
20:32:59 | fowl | irezvov: inside out would be building the nnkRecList, adding it to nnkObjectTy, adding it to nnkTypeDef, then nnkTypeSection |
20:33:11 | irezvov | avsej: you are welcome :) i will be glad if it will be usefull for somebody |
20:34:39 | * | skyfex quit (Read error: Connection reset by peer) |
20:34:54 | * | skyfex joined #nim |
20:35:07 | Araq | irezvov: it's common but you can use accessors like 'x.condition.thenbranch'. |
20:35:20 | Araq | except macros.nim doesn't define these :P |
20:35:40 | Araq | we tried to keep the API small |
20:35:51 | irezvov | fowl: yeah, i think i will separate iteration with data extraction and call procedure for each task inside loop step |
20:40:56 | irezvov | btw, this is my memcached driver(but it is on very early state now) - https://github.com/SPY/nim-memcached/blob/master/memcache.nim |
20:41:20 | * | jszymanski quit (Quit: computer sleeps...) |
20:41:37 | irezvov | nonetheless it has been working already |
20:42:35 | fowl | irezvov: suggest you use {.pure.} Enums when you have short identifiers like Get/Set |
20:42:53 | irezvov | yeah, good point |
20:48:59 | * | skyfex_ joined #nim |
20:51:40 | * | skyfex quit (Ping timeout: 256 seconds) |
20:58:08 | * | NimBot joined #nim |
21:00:05 | * | brson joined #nim |
21:04:24 | * | dalarmmst quit (Ping timeout: 252 seconds) |
21:06:19 | * | wu-lee joined #nim |
21:09:59 | * | wan joined #nim |
21:10:08 | * | aziz quit (Remote host closed the connection) |
21:11:37 | * | NimBot joined #nim |
21:14:49 | * | jubalh quit (Quit: Leaving) |
21:16:22 | * | dalarmmst joined #nim |
21:16:23 | pigmej | hmm how should I use marshal.to ? |
21:23:42 | Araq | marshal.to[destType](x) |
21:24:43 | pigmej | ah right |
21:24:47 | pigmej | thx |
21:26:01 | reactormonk | pigmej, nimsuggest stuff debugging? |
21:26:20 | pigmej | reactormonk: ? |
21:26:32 | reactormonk | pigmej, or why the marshall stuf |
21:27:04 | pigmej | playing with nim and testing nim-mode in something realistic |
21:27:22 | * | Demon_Fox joined #nim |
21:27:27 | reactormonk | neat |
21:38:02 | fowl | irezvov: in waitForResponse you don't need new(), instead put the struct on the stack and pass its address |
21:48:20 | * | Demos joined #nim |
21:52:20 | * | Mat4 quit (Quit: Verlassend) |
21:56:14 | * | brson quit (Quit: leaving) |
22:06:00 | * | zeroDivisible joined #nim |
22:08:37 | * | dnoq joined #nim |
22:09:09 | * | zeroDivisible left #nim ("WeeChat 1.2") |
22:09:55 | * | leru quit (Quit: Nettalk6 - www.ntalk.de) |
22:11:27 | Demos | Araq, https://twitter.com/velartrill/status/612701472430686208 |
22:15:16 | * | dnoq left #nim (#nim) |
22:15:30 | * | Pisuke joined #nim |
22:16:15 | * | yglukhov joined #nim |
22:17:46 | * | MyMind quit (Ping timeout: 276 seconds) |
22:19:05 | Araq | Demos: twitter to her to join IRC? ;-) |
22:19:27 | Demos | I twittered her that it's a bug |
22:20:28 | * | yglukhov quit (Ping timeout: 252 seconds) |
22:20:48 | Araq | why? |
22:20:54 | * | Pisuke quit (Max SendQ exceeded) |
22:20:59 | Araq | why is it a bug? |
22:21:12 | Araq | the compiler can mangle the name as it wishes? |
22:21:47 | Demos | right, but it should not randomly conflict with something in a different module |
22:22:04 | * | Jev joined #nim |
22:22:06 | * | Pisuke joined #nim |
22:22:12 | Araq | it doesn't. there is an ID attached to it |
22:22:17 | reactormonk | Demos, it should mangle it with an underscore... that's what it usually does. |
22:22:25 | Jev | is there a way to define multiple return types for a proc |
22:22:54 | reactormonk | Jev, cosum style? |
22:22:57 | Araq | Jev: overloading by return type is not supported if that's what you mean |
22:23:14 | Jev | i mean returning perhaps either a int or bool |
22:23:21 | vikaton | Nim is sexist :O |
22:23:30 | Demos | right, well this woman had a conflict. I guess the same thing can happen in C++. We could emit names that are not valid C symbol names |
22:23:32 | reactormonk | Jev, https://github.com/nim-lang/Nim/issues/1070 |
22:23:37 | Demos | assuming linker support |
22:24:10 | reactormonk | vikaton, yeah, those people always pull out the hardest terms directly. That's also why I didn't want def- to fix that stuff :-/ |
22:25:03 | Araq | Jev: return a tuple (int, bool) or perhaps Option[int] or just 'int' and document that sometimes it only returns 0 and 1 |
22:25:36 | Jev | ooo alright. that works for me |
22:25:47 | reactormonk | Jev, or look for en Either implementation :-) |
22:25:52 | Demos | Anyway apperently sometimes the compiler's name mangling does conflict with stuff in C libraries |
22:25:58 | reactormonk | Jev, or return a case object |
22:26:15 | Jev | ill take a look at it! |
22:26:28 | Araq | Demos: ah perhaps with the 'init' procs we generate |
22:26:43 | Demos | maybe |
22:26:47 | Araq | but not with her 'init' proc, that one should get an ID attached to it |
22:27:02 | Demos | right, but she could have had both her init proc and ours |
22:27:07 | Demos | no way to really tell the difference |
22:27:10 | Araq | yup |
22:27:28 | Araq | that should be really easy to fix |
22:30:16 | reactormonk | Araq, http://hastebin.com/kaboduqita |
22:31:10 | Araq | reactormonk: bug report? fix? hrm? |
22:32:05 | reactormonk | Araq, that's just what I got back. |
22:34:45 | reactormonk | Araq, the problem is that the glfwInit() for init of the module needs to be mangled a bit more |
22:37:23 | wu-lee | all: making some slow progress getting Nim working on Arduino |
22:37:44 | wu-lee | is this entirely virgin territory, or (as I suspect) has this been done before? |
22:37:58 | reactormonk | wu-lee, Tried it, lemme give you my code |
22:38:14 | wu-lee | excellent, that would be fantastic |
22:40:22 | reactormonk | wu-lee, https://github.com/reactormonk/nim/commit/f9a5cd43c160995316377b1f1af94b18781d1f23 |
22:40:29 | wu-lee | I've had problems with global vars, don't seem to be usable, in nim or C |
22:40:32 | reactormonk | wu-lee, https://github.com/reactormonk/nim/commit/3b555cbc4d8d06a2494c05ec4f2a78e411c683e7 |
22:40:34 | wu-lee | does that sound right? |
22:40:38 | reactormonk | nope |
22:41:01 | reactormonk | How much RAM does your arduino have? |
22:41:35 | wu-lee | it's a diecimila with an atmega168 |
22:42:05 | reactormonk | need a number ^^ |
22:42:50 | wu-lee | so.... (looking up) 16Kbytes flash ram |
22:43:46 | reactormonk | yeah, so you'll need to remove heap stuff I'd say... because you can't alloc() |
22:44:07 | reactormonk | that's what I tried to do, with limited success |
22:44:23 | reactormonk | but I haven't followed the standalone part, someone else might have done something meanwhile |
22:44:33 | wu-lee | I see you needed to patch the Nim source |
22:45:10 | reactormonk | Well, yeah. string and seq assume you have a heap |
22:45:15 | reactormonk | ... which you don't |
22:46:04 | wu-lee | I have a nim program which doesn't work, unless I compile the emitted C with the stdlib_* files #included |
22:46:06 | reactormonk | you can try just not using them but the last time I checked it didn't work, might just now |
22:46:22 | reactormonk | don't forget to add --gc:none |
22:46:36 | reactormonk | huh? got me some code? |
22:46:53 | renesac | reactormonk: arduino uno has 2.5kb of RAM and 32kb of program memory in flash |
22:47:07 | reactormonk | renesac, yeah, so no heap |
22:47:23 | wu-lee | thanks, --gc:none wasn't included. however, doesn't seem to help |
22:47:42 | renesac | --gc:none is implied by --os:standalone |
22:47:45 | renesac | IIRC |
22:47:52 | reactormonk | renesac, I don't think so |
22:47:55 | reactormonk | lemme check |
22:48:48 | wu-lee | hold on, I'll create a gist. |
22:49:01 | reactormonk | renesac, pretty sure it isn't |
22:49:26 | renesac | the command line for avr that I found here was: |
22:49:28 | renesac | nim c --cpu:avr --os:standalone --deadCodeElim:on --genScript x.nim |
22:50:26 | reactormonk | sounds about right |
22:51:10 | renesac | how will the gcc malloc/mmap memory w/o an OS? |
22:51:44 | reactormonk | yeah, that's why seq/string won't work |
22:52:15 | renesac | strings on the stack should work though |
22:52:38 | renesac | but yeah, you want static allocation |
22:53:10 | reactormonk | that's the PSTR in the commit I linked |
22:53:43 | renesac | oh, didn't read the entire dicusssion |
22:55:04 | wu-lee | reactormonk: ok, current mess committed here: https://github.com/wu-lee/nim-test/tree/arduino |
22:55:09 | reactormonk | even if you did, you would have missed the commit, didn't mention it explicitly |
22:56:13 | reactormonk | oh, not master branch O.o |
22:56:15 | wu-lee | "make upload" for nim, "make -f c.makefile upload" for the C version (currently blink5.c) |
22:57:04 | wu-lee | blink5.c has had the #includes of stdlib_* commented out, if I uncomment them it seems to work |
22:57:30 | wu-lee | otherwise, it's a copy of the generated blink.c file in nimcache |
22:57:31 | reactormonk | lib/nimbase.h:393:13: error: size of array ‘assert_numbits’ is negative |
22:58:17 | reactormonk | /* Test to see if Nim and the C compiler agree on the size of a pointer. |
22:58:20 | reactormonk | On disagreement, your C compiler will say something like: |
22:58:22 | reactormonk | "error: 'assert_numbits' declared as an array with a negative size" */ |
22:58:23 | wu-lee | (actually, with nimFrame and popFrame also commented) |
22:58:42 | reactormonk | wu-lee, there we go :-) |
22:59:08 | wu-lee | yes, was getting that recently when attempting to build and link stdlib_* stuff separately |
22:59:35 | wu-lee | oh, wait, i have a nim.cfg I've not committed |
23:00:03 | reactormonk | wu-lee, platform.CPU[targetCPU].intSize.rope |
23:00:15 | reactormonk | ^ that one produces an incorrect result on your platform |
23:00:25 | reactormonk | or wait, the gcc invocation sucks |
23:00:41 | reactormonk | how do you actually compile your C? |
23:00:49 | wu-lee | ok, pushed that .cfg |
23:01:09 | wu-lee | see the c.makefile |
23:01:36 | reactormonk | renesac, somehow genScript fails horribly |
23:02:04 | Araq | genScript has been broken for quite some time now I think |
23:02:15 | reactormonk | wu-lee, ah, that's better with the .cfg |
23:02:17 | Araq | but at least the script gives a starting point |
23:02:31 | wu-lee | the c.makefile includes a "-DNIM_INTBITS=16" hack you might ignore currently, as I said, it's very much work in progress |
23:02:51 | reactormonk | wu-lee, trim the config file a bit |
23:02:52 | wu-lee | but the compilation would be: avr-gcc -I ~/i/installs/Nim/lib -g -mmcu=atmega168 -c -o blink5.o blink5.c |
23:03:44 | reactormonk | wu-lee, --passC:-mmcu=atmega168 |
23:04:08 | wu-lee | reactormonk: it's a cargo-cult copy, but all I changed were the lines setting avr-gcc |
23:04:24 | reactormonk | wu-lee, yeah, delete all the lines you didn't change |
23:04:27 | wu-lee | to avoid the ‘assert_numbits’ is negative |
23:04:31 | wu-lee | error |
23:05:20 | reactormonk | wu-lee, yeah, that error indicates that you configured gcc incorrectly - with the passC that shouldn't be a problem anymore |
23:05:41 | wu-lee | reactormonk, done, pushed |
23:06:16 | reactormonk | wu-lee, can't pull |
23:06:37 | reactormonk | aka nothing new |
23:07:46 | wu-lee | ok, try again |
23:09:50 | reactormonk | that's better |
23:10:20 | reactormonk | wu-lee, add passC = -mmcu=atmega168 |
23:10:42 | reactormonk | the -I should be generated by nim |
23:10:59 | wu-lee | in nim.cfg? |
23:11:12 | reactormonk | yup |
23:12:23 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:13:09 | wu-lee | ok, done, pushed |
23:13:19 | wu-lee | no obvious change in behaviour however |
23:13:26 | reactormonk | Hm. |
23:13:37 | wu-lee | (i.e. no flashing) |
23:14:19 | reactormonk | you can also add everything else, such as gc = none\nos= standalone\n etc. |
23:15:09 | * | strcmp1 joined #nim |
23:15:37 | reactormonk | wu-lee, /usr/bin/avr-ld: cannot find -lm |
23:16:10 | reactormonk | I'll just install the arduino sdk |
23:16:50 | wu-lee | reactormonk, just push a version of blink5.c and c.makefile which seem to work for me |
23:17:58 | wu-lee | i.e. with #included stdlib_*, compiles with 'make -f c.makefile upload' |
23:18:38 | wu-lee | scuse grammar, fat fingers. |
23:19:15 | reactormonk | wu-lee, lemme install arduino here real quick |
23:19:41 | wu-lee | ok, np. I expect you'll need that. |
23:22:21 | wu-lee | a couple of odd things about the blink.nim implementation.... |
23:22:40 | reactormonk | go on |
23:22:45 | wu-lee | a) I can't call the proc 'blink', I get an odd compiler error |
23:23:09 | wu-lee | seems to be the result of simply naming a proc the same as the file it is in |
23:23:43 | reactormonk | eh yup, we had an issue like that before |
23:24:02 | wu-lee | (just trying to dig up the actual error) |
23:25:10 | wu-lee | "Error: internal error: expr(nkClosedSymChoice); unknown node kind" |
23:25:20 | reactormonk | yeah, try another name |
23:25:28 | wu-lee | yep, that's all I did |
23:26:01 | reactormonk | command to compile it? |
23:26:07 | wu-lee | b) global vars seem not to work as expected. If I don't put the actual code in a proc, nothing works |
23:26:10 | reactormonk | nim c --cpu:avr --os:standalone --deadCodeElim:on --gc:none --parallelBuild:1 blink.nim |
23:26:37 | reactormonk | I get /usr/bin/avr-ld: cannot find -lm - which libs are that? |
23:26:57 | wu-lee | ...by comparing with modifications of the generated c, seems global vars don't work in C either. |
23:27:19 | wu-lee | libm is the floating point maths lib iirc |
23:28:13 | reactormonk | then why the fuck isn't it found? |
23:28:21 | wu-lee | not sure why it would need that at all. |
23:28:23 | reactormonk | I mean it's in /usr/lib/libm |
23:29:18 | wu-lee | just checking what I have installed. |
23:30:37 | wu-lee | libm appears to be part of the libc6 packages (on ubuntu) |
23:31:30 | wu-lee | I don't seem to have any specific avr libc6 installed |
23:31:36 | reactormonk | ah thanks |
23:31:55 | reactormonk | yes, you were correct |
23:32:02 | wu-lee | however I do have arduino arduino-core arduino-mk |
23:32:14 | reactormonk | yeah, arch has just arduino in the AUR |
23:32:28 | reactormonk | yeah, it compiles. But you said it doesn't run? |
23:32:58 | wu-lee | the nim version compiles, uploads, and the arduino does nothing visible |
23:33:02 | wu-lee | no blinking |
23:33:18 | wu-lee | the C version makes it blink however |
23:33:37 | reactormonk | try -d:release just because |
23:33:53 | reactormonk | also, which one is the c version? |
23:34:24 | wu-lee | ok, tried, same result: no blinking |
23:34:33 | wu-lee | the c version is blink5.c |
23:34:58 | wu-lee | the only difference I can see is that the stdlib_* files are inlined. |
23:35:35 | * | chdsbd joined #nim |
23:36:29 | reactormonk | ah, you manually added the includes |
23:36:37 | wu-lee | (because laziness, plus I had trouble getting the stdlib_* files to compile without the negative nimbits errror) |
23:36:43 | reactormonk | as mentioned, try -d:release |
23:36:55 | reactormonk | and btw, now it compiles without any hackery |
23:36:57 | wu-lee | I did, doesn't seem to fly |
23:37:05 | reactormonk | nim c -d:release --cpu:avr --os:standalone --deadCodeElim:on --gc:none |
23:37:07 | reactormonk | ^ this line? |
23:37:34 | wu-lee | nim c --cpu:avr --os:standalone --deadCodeElim:on --parallelBuild:1 --gc:none -d:release -o:blink.bin blink.nim |
23:38:41 | reactormonk | how to upload stuff to the arduino? Then I can go blow some dust off mine |
23:38:49 | * | pregressive joined #nim |
23:39:30 | reactormonk | and does it blink a built-in LED or something externally which I'd have to connect? |
23:40:23 | fowl | 9o999999999oo999o9o9o9ooo99o9oo999o99o99o99o9o9999999oo9oo9o9999999o99oo9o9999o9o9 p |
23:40:47 | wu-lee | if you run this it should work as it does for me: make f c.makefile upload |
23:40:55 | wu-lee | s/f/-f/ |
23:41:00 | fowl | Oops |
23:41:24 | wu-lee | it blinks the built-in LED |
23:42:40 | * | gyeates quit (Ping timeout: 246 seconds) |
23:42:46 | reactormonk | wu-lee, let's see |
23:42:50 | wu-lee | this is the working compilation output: https://gist.github.com/wu-lee/2c456572ea4a13b716dc |
23:43:28 | wu-lee | one other observation... |
23:43:50 | wu-lee | when I attemtpt to compile blink4.c without inlining the stdlib_* files, |
23:44:15 | reactormonk | which arduino? I've got an arduino uno here |
23:44:24 | wu-lee | oh, wait I see. |
23:44:46 | wu-lee | which arduino: diecimila |
23:45:07 | reactormonk | let's find out what avrdude tells me about uno |
23:45:09 | wu-lee | I don't expect there'll be much difference |
23:45:43 | * | boopsies is now known as boopsiesisaway |
23:46:26 | wu-lee | you may need to alter MMCU and/or DUDE_MCU in c.makefile |
23:48:56 | reactormonk | avrdude: stk500_recv(): programmer is not responding |
23:49:46 | wu-lee | my observation was that the stdlib_ files seem to hardwire NIM_INTBITS to 64, but something fixed that. |
23:50:03 | wu-lee | reactormonk: that error sounds like the baud may be wrong. |
23:50:11 | reactormonk | wu-lee, possible |
23:50:34 | reactormonk | http://www.arduino.cc/en/Main/ArduinoBoardUno |
23:50:41 | wu-lee | this is how I got my params: run arduino IDE, check everything works normally, then |
23:51:19 | wu-lee | edit ~/.arduino/preferences.txt, add 'upload.verbose=true' |
23:51:32 | wu-lee | then re-upload, check the output to see what was used |
23:52:40 | reactormonk | I just didn't specify -b. worked |
23:52:51 | * | pregressive quit (Remote host closed the connection) |
23:54:15 | reactormonk | not sure if I have something to blink on the uno. Lemme load some code. |
23:55:24 | wu-lee | there's an example, 'blink' in the arduino menu |
23:57:02 | * | pregressive joined #nim |
23:57:07 | wu-lee | that's an arduino sketch, for raw C see blink.c, and minus CPP varnish, see blink2.c (omit the inlines at the end) |
23:58:36 | * | gyeates joined #nim |
23:58:36 | reactormonk | wu-lee, ... building ... |
23:59:22 | wu-lee | I've just pushed an edited version of blink2.c, works better for me. |