00:02:13 | reactormonk | Araq, got an idea about how to move main() in the C code? |
00:02:28 | reactormonk | avr apparently cares |
00:02:51 | reactormonk | Uint2048, global var? eh. |
00:02:53 | * | vikaton joined #nim |
00:03:06 | reactormonk | Uint2048, and yup, guess why. It's not a var. |
00:03:11 | Araq | you mean it has to be the first function? |
00:03:18 | reactormonk | yup |
00:03:27 | Araq | in what sense? |
00:03:37 | reactormonk | yee log |
00:03:50 | Araq | the first function of the .c file. the first function in the universe? |
00:04:07 | reactormonk | if main() is moved to top of blink.c nimcache file, it can upload and run successfully |
00:04:15 | reactormonk | Uint2048, to solve it, return a var <type> |
00:04:42 | Araq | that's some bizarre C dialect |
00:06:12 | reactormonk | yes, it is |
00:07:13 | Araq | there is no support in the C codegen for "move this thing at the top of the C file" |
00:07:50 | reactormonk | any way to hack it? |
00:08:15 | Araq | sure but requires yet another pragma |
00:10:20 | Araq | just use "sed" to modify the C code. oh wait ... regexes cannot count braces so I suppose it's tricky |
00:10:44 | reactormonk | fuck |
00:19:45 | * | renesac quit (Ping timeout: 252 seconds) |
00:20:45 | * | vendethiel quit (Ping timeout: 250 seconds) |
00:23:04 | * | renesac joined #nim |
00:23:58 | * | BitPuffin quit (Ping timeout: 265 seconds) |
00:32:43 | * | gsingh93_ quit (Quit: Connection closed for inactivity) |
00:32:48 | * | tennix joined #nim |
00:38:14 | * | tennix quit (Ping timeout: 256 seconds) |
00:44:03 | reactormonk | err, wut. nim c still not producing output binary |
00:45:24 | * | vendethiel joined #nim |
00:46:42 | Demos | I tracked down that twitter bug, I think she was using {.header: "<glfw3.dll>".} |
00:46:46 | Demos | erm .h |
00:47:11 | Demos | because if I import initGlfw via dynlib it mangles the name of the function |
00:47:47 | Demos | changing the generated name of the init function would help, but there's no way we can be collision-free in all cases with header files |
00:48:00 | Demos | esp since it's good to try not to mangle too much for debugging reasons |
00:48:25 | fowl | People report issues via twitter now? |
00:48:49 | Xe | people do everything via twitter |
00:48:52 | Xe | including tweeting |
00:49:59 | * | pregressive joined #nim |
00:50:23 | Demos | someone I follow happened to be complaning about nim on her feed |
00:52:34 | federico3 | how can I do a blocking readLine() over a device file? |
00:52:58 | reactormonk | federico3, err, you just do it? |
00:53:42 | federico3 | reactormonk: readLine is frequently returning an empty string |
00:54:41 | reactormonk | federico3, maybe a select is what you're looking for? |
00:57:00 | federico3 | reactormonk: hm, this one? http://nim-lang.org/docs/osproc.html#select,seq[Process],int |
00:57:15 | federico3 | I don't think so |
00:57:34 | reactormonk | federico3, that's for child processes, I was thinking of posix select |
00:58:04 | * | Uint2048 quit (Quit: Page closed) |
00:58:16 | federico3 | (shouldn't readLine block until \n is found?) |
00:59:05 | reactormonk | check the source |
00:59:18 | reactormonk | Araq, any way I can add -I stuff via pragma? |
01:00:11 | federico3 | oh, there's a serial interface in http://nimio.us/ |
01:00:35 | Araq | reactormonk: yes, .passL or .passC |
01:00:44 | reactormonk | ah, sweet |
01:01:43 | * | Jesin quit (Quit: Leaving) |
01:02:02 | * | jaco60 quit (Ping timeout: 256 seconds) |
01:03:39 | * | yglukhov____ joined #nim |
01:05:00 | * | Jesin joined #nim |
01:06:35 | * | vendethiel quit (Ping timeout: 246 seconds) |
01:08:22 | reactormonk | wu-lee, sooo you want your own main or is setup/loop fine? |
01:09:02 | * | yglukhov____ quit (Ping timeout: 252 seconds) |
01:10:45 | reactormonk | Araq, err, any way to add some C files to be compiled? |
01:11:01 | Xe | .compile prefix? |
01:11:24 | Xe | pragma* |
01:11:33 | Araq | {.compile: "foobar.c".} |
01:12:46 | reactormonk | Araq, not in here: http://nim-lang.org/docs/manual.html |
01:13:14 | Araq | http://nim-lang.org/docs/nimc.html#additional-features-compile-pragma |
01:13:19 | Araq | as I said |
01:13:33 | Araq | implementation specific pragmas are in nimc, not in the manual |
01:13:48 | Araq | but I guess at this point nobody cares about this distinction |
01:14:35 | Araq | also who did that CSS for the docs again? it's still superb |
01:15:18 | Varriount | Araq: The thing is, people expect the compiler user guide to tell how the compiler is supposed to be invoked, not explain new pragmas. |
01:15:48 | Varriount | Even a link in the pragmas section of the manual would clear things up. |
01:15:57 | * | vendethiel joined #nim |
01:20:52 | Araq | Varriount: theindex works in any case |
01:21:10 | Araq | but yeah we can move these over to the manual anyway |
01:21:18 | reactormonk | Araq, uhm, I invoke nim, no errors, but not output file is produced |
01:21:41 | Araq | --genscript implies --compileOnly? dunno |
01:22:13 | reactormonk | Araq, http://pastie.org/10254039 |
01:22:48 | Araq | try -f |
01:23:09 | Araq | but I dunno, seems like gcc produces the output somewhere else? |
01:23:39 | reactormonk | nope, no help |
01:24:34 | reactormonk | I have no idea where. |
01:25:27 | Araq | --listCmd -f |
01:25:58 | reactormonk | ... nothing |
01:26:13 | reactormonk | ah there, found it. |
01:26:18 | reactormonk | check the command line again ^^ |
01:26:48 | Araq | 'c' in the wrong position? |
01:27:10 | reactormonk | nope, forgot a passC in front of the mmcu |
01:27:17 | Araq | true |
01:27:26 | Araq | er |
01:27:34 | reactormonk | but why doesn't the compiler compilain? |
01:27:34 | Araq | shouldn't Nim complain about this command line? |
01:28:58 | reactormonk | yes, it should |
01:33:08 | reactormonk | Araq, importc on vars -> no decl, exportc -> decl? |
01:33:28 | Araq | not really |
01:33:48 | Araq | but good enough |
01:33:49 | Araq | good night |
01:33:54 | reactormonk | ^^ ok |
01:36:20 | * | dddddd quit (Ping timeout: 272 seconds) |
01:38:52 | * | vendethiel quit (Ping timeout: 256 seconds) |
01:40:30 | * | vendethiel joined #nim |
01:41:16 | reactormonk | wu-lee, got to another problem |
01:42:35 | * | gyeates quit (Ping timeout: 252 seconds) |
01:49:41 | * | brson quit (Remote host closed the connection) |
02:02:34 | * | vendethiel quit (Ping timeout: 252 seconds) |
02:04:52 | * | saml_ quit (Ping timeout: 264 seconds) |
02:09:07 | reactormonk | wu-lee, code size too big. |
02:15:48 | * | vendethiel joined #nim |
02:23:19 | * | tennix joined #nim |
02:26:49 | * | Kingsquee joined #nim |
02:27:07 | * | BitPuffin|osx quit (Ping timeout: 276 seconds) |
02:27:52 | * | tennix quit (Ping timeout: 252 seconds) |
02:31:33 | reactormonk | wu-lee, https://gist.github.com/5400966dfcca17660fdb nim -d:release --cpu:avr --os:standalone --deadCodeElim:on --gc:none --parallelBuild:1 --passC:-mmcu=atmega328p c blink.nim |
02:31:39 | reactormonk | change as needed for your board |
02:32:40 | dtscode | who is this wu-lee person? |
02:35:21 | * | pregressive quit (Remote host closed the connection) |
02:36:22 | reactormonk | dtscode, see chatlog |
02:36:41 | dtscode | ah |
02:36:50 | dtscode | I thought I was missing half the convo |
02:38:31 | * | vendethiel quit (Ping timeout: 256 seconds) |
02:38:34 | reactormonk | wu-lee, apparently it's horribly inefficient because .text overflow here |
02:57:02 | * | dtscode is now known as charmande |
02:57:05 | * | charmande is now known as charmander |
03:00:19 | Demos | what do we think about using __nim__moduleInit instead of moduleInit or moduleInit0000 |
03:03:50 | * | FedeOmoto joined #nim |
03:13:44 | * | FedeOmoto is now known as FedeOmoto_ |
03:14:20 | * | FedeOmoto_ is now known as FedeOmoto__ |
03:14:30 | * | FedeOmoto__ is now known as FedeOmoto |
03:20:38 | * | FedeOmoto quit (Quit: Leaving) |
03:20:51 | * | darkf joined #nim |
03:22:29 | * | FedeOmoto joined #nim |
03:23:19 | * | FedeOmoto quit (Client Quit) |
03:25:05 | * | charmander is now known as dtscode |
03:30:07 | * | gunn_ joined #nim |
03:53:43 | * | ozra quit (Ping timeout: 246 seconds) |
03:58:55 | * | rgv151 quit (Remote host closed the connection) |
04:02:31 | * | profan joined #nim |
04:06:02 | * | Demos quit (Read error: Connection reset by peer) |
04:12:03 | * | tennix joined #nim |
04:16:24 | * | tennix quit (Ping timeout: 252 seconds) |
04:27:41 | * | tennix joined #nim |
04:34:49 | * | gyeates joined #nim |
04:39:25 | * | gyeates quit (Ping timeout: 244 seconds) |
04:48:07 | * | tennix quit (Remote host closed the connection) |
04:49:15 | * | tennix joined #nim |
04:54:47 | * | Varriount_ joined #nim |
04:55:37 | * | Jesin quit (Quit: Leaving) |
04:55:39 | * | katis_ quit (Quit: WeeChat 0.3.7) |
04:56:28 | * | brson joined #nim |
04:58:34 | * | Varriount quit (Ping timeout: 276 seconds) |
04:59:36 | * | brson quit (Client Quit) |
05:08:19 | * | tennix quit (Read error: Connection reset by peer) |
05:14:16 | vikaton | ooo |
05:14:18 | vikaton | arduino |
05:14:50 | * | zulmin_ is now known as zulmin |
05:17:32 | * | tennix joined #nim |
05:17:32 | * | tennix quit (Changing host) |
05:17:32 | * | tennix joined #nim |
05:43:52 | * | jszymanski joined #nim |
05:45:43 | * | gunn_ quit (Max SendQ exceeded) |
05:56:10 | * | wuehlmaus quit (Quit: Lost terminal) |
06:16:04 | * | jubalh joined #nim |
06:16:42 | * | jubalh quit (Client Quit) |
06:17:49 | * | jubalh joined #nim |
06:19:16 | * | jszymanski quit (Quit: computer sleeps...) |
06:20:27 | * | jubalh quit (Client Quit) |
06:36:33 | * | jubalh joined #nim |
06:38:45 | * | yglukhov____ joined #nim |
06:42:37 | vikaton | what gcc version does Nim use |
06:43:42 | reactormonk | vikaton, system one |
06:49:01 | * | dalarmmst quit (Ping timeout: 250 seconds) |
06:49:44 | * | Senketsu joined #nim |
07:03:56 | * | mnemonikk quit (Ping timeout: 276 seconds) |
07:05:30 | * | lyro joined #nim |
07:06:17 | * | mnemonikk joined #nim |
07:06:25 | * | mnemonikk quit (Changing host) |
07:06:25 | * | mnemonikk joined #nim |
07:10:32 | * | dalarmmst joined #nim |
07:12:14 | * | bjz joined #nim |
07:13:53 | * | bjz quit (Client Quit) |
07:15:03 | * | dalarmmst quit (Ping timeout: 256 seconds) |
07:27:19 | * | jszymanski joined #nim |
07:39:05 | * | tennix quit (Remote host closed the connection) |
07:39:38 | * | tennix joined #nim |
07:41:23 | * | rinukkusu quit (Ping timeout: 246 seconds) |
07:44:31 | * | Trustable joined #nim |
07:49:20 | * | tennix quit (Remote host closed the connection) |
07:50:30 | * | tennix joined #nim |
07:51:43 | * | huonw quit (Ping timeout: 248 seconds) |
07:53:27 | * | bjz joined #nim |
07:54:46 | * | huonw joined #nim |
08:04:32 | * | rinukkusu joined #nim |
08:08:01 | * | zviryatk0 joined #nim |
08:08:03 | * | wuehlmaus joined #nim |
08:09:46 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
08:16:08 | * | coffepot joined #nim |
08:16:09 | * | coffepot quit (Client Quit) |
08:16:49 | * | coffeepot joined #nim |
08:25:50 | * | mnemonikk quit (Ping timeout: 276 seconds) |
08:26:07 | * | dalarmmst joined #nim |
08:26:42 | * | mnemonikk joined #nim |
08:27:38 | * | mnemonikk quit (Changing host) |
08:27:38 | * | mnemonikk joined #nim |
08:30:28 | * | zodiak joined #nim |
08:32:15 | * | dalarmmst quit (Ping timeout: 248 seconds) |
08:41:17 | * | MyMind joined #nim |
08:43:16 | * | Sembei quit (Ping timeout: 264 seconds) |
08:45:29 | * | tennix quit (Remote host closed the connection) |
08:46:01 | * | mnemonikk quit (Ping timeout: 276 seconds) |
08:46:37 | * | mnemonikk joined #nim |
08:46:37 | * | mnemonikk quit (Changing host) |
08:46:37 | * | mnemonikk joined #nim |
08:49:34 | * | tennix joined #nim |
08:59:41 | * | tennix quit (Remote host closed the connection) |
09:01:09 | * | tennix joined #nim |
09:11:06 | * | tennix quit (Remote host closed the connection) |
09:14:39 | * | tennix joined #nim |
09:26:53 | * | tennix quit (Remote host closed the connection) |
09:28:28 | * | tennix joined #nim |
09:38:37 | * | lokulin_ quit (Changing host) |
09:38:37 | * | lokulin_ joined #nim |
09:39:49 | * | lokulin_ is now known as lokulin |
09:50:31 | * | Johnjohn joined #nim |
09:50:32 | * | Johnjohn quit (Client Quit) |
09:50:53 | * | JohnYy joined #nim |
09:58:11 | * | vikaton quit (Quit: Connection closed for inactivity) |
10:15:14 | * | ekarlso joined #nim |
10:18:37 | * | Ven joined #nim |
10:23:11 | r-ku | how do i define struct so it does not have "TNimObject Sup;"? need to parse binary file here |
10:23:25 | Araq | don't use inheritance |
10:23:49 | r-ku | that will need ugly workaround. oh well. thanks |
10:24:25 | Araq | you can also use .inheritable, pure iirc |
10:25:10 | Araq | it's surprising how often that is required for wrappers, or maybe not |
10:25:30 | r-ku | that looks like what i need. thank you |
10:26:32 | r-ku | one more question Araq. {.packed.} does not take an argument. is there really no way to specify custom alignment? |
10:27:04 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:27:24 | Araq | nah, but you can .importc, header the whole struct and then it's compatible since the compiler doesn't generate its own version of the struct |
10:27:37 | Araq | this way even bit fields work |
10:28:31 | r-ku | yeah i thought of that, but was hoping to write everything in nim too. anyway not that i need it. but there are some applications that could surely use this option. |
10:28:46 | Araq | that said, the C code really shouldn't use customized alignment. C's advantage is supposedly an "ABI" compatibility |
10:32:15 | Araq | r-ku: yeah even more control would be nice, but people also count the number of pragmas and yell "too complex". |
10:32:45 | Araq | apparently they never count C's pragmas or C#'s annotations |
10:33:52 | r-ku | well... in this specific case there already is pragma for packing. so if it could take param and put it into generated c code it would be like minimal added complexity. |
10:34:50 | Araq | yeah I agree |
10:34:50 | r-ku | while i too think there are lots of pragmas its also a nice unified syntax to customize behavior. i rather have 50 pragmas instead of 50 different rarely used syntaxes to learn |
10:36:27 | * | Ven joined #nim |
10:39:19 | * | Kingsquee quit (Quit: Konversation terminated!) |
11:03:25 | * | Ven quit (Remote host closed the connection) |
11:08:15 | * | Ven joined #nim |
11:16:03 | * | mnemonikk quit (Ping timeout: 276 seconds) |
11:16:06 | * | tennix_ joined #nim |
11:16:11 | * | tennix quit (Remote host closed the connection) |
11:19:31 | * | mnemonikk joined #nim |
11:19:31 | * | mnemonikk quit (Changing host) |
11:19:31 | * | mnemonikk joined #nim |
11:30:52 | * | tennix_ quit (Remote host closed the connection) |
11:39:37 | * | tennix joined #nim |
11:39:44 | * | tennix quit (Remote host closed the connection) |
11:42:24 | * | dddddd joined #nim |
11:46:36 | * | mnemonikk quit (Ping timeout: 276 seconds) |
11:50:48 | * | mnemonikk joined #nim |
11:50:48 | * | mnemonikk quit (Changing host) |
11:50:48 | * | mnemonikk joined #nim |
12:09:12 | * | aziz_ joined #nim |
12:10:08 | * | aziz_ is now known as aziz |
12:17:30 | * | zviryatk0 quit (Ping timeout: 256 seconds) |
12:40:28 | * | tennix joined #nim |
12:42:40 | * | jaco60 joined #nim |
12:45:46 | * | tennix quit (Ping timeout: 272 seconds) |
13:03:08 | * | FedeOmoto joined #nim |
13:08:59 | * | yglukhov____ quit (Ping timeout: 252 seconds) |
13:09:37 | * | yglukhov____ joined #nim |
13:18:40 | * | gyeates joined #nim |
13:19:11 | * | askatasuna joined #nim |
13:22:35 | * | zviryatk0 joined #nim |
13:32:13 | * | aziz quit (Remote host closed the connection) |
13:37:45 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
13:38:39 | * | coffeepot joined #nim |
13:39:56 | * | coffeepot quit (Client Quit) |
13:43:00 | * | bjz joined #nim |
13:43:19 | * | coffeepot joined #nim |
14:11:13 | * | tennix joined #nim |
14:15:29 | * | tennix quit (Ping timeout: 246 seconds) |
14:37:55 | * | pregressive joined #nim |
14:39:02 | * | vendethiel joined #nim |
14:49:19 | * | tennix joined #nim |
14:49:38 | * | gyeates quit (Ping timeout: 252 seconds) |
14:53:35 | * | tennix quit (Ping timeout: 248 seconds) |
15:04:12 | * | Arrrr joined #nim |
15:07:46 | wuehlmaus | hi, all. One question that arrises here is if nre is broken in 0.11.2 but only works in the dev version right now. True? |
15:14:16 | * | gyeates joined #nim |
15:14:52 | * | drewsrem joined #nim |
15:15:43 | drewsrem | Can I "resolve" a symbol in a macro? - As in: can I have a macro that takes a string argument and reads its content? |
15:19:43 | * | Ven_ joined #nim |
15:21:51 | * | gyeates quit (Ping timeout: 248 seconds) |
15:22:29 | * | Ven quit (Ping timeout: 265 seconds) |
15:44:19 | * | tennix joined #nim |
15:45:21 | * | yglukhov____ quit (Quit: Be back later ...) |
15:48:35 | * | tennix quit (Ping timeout: 246 seconds) |
15:52:12 | * | dalarmmst joined #nim |
15:53:49 | * | xcombelle joined #nim |
15:55:47 | * | darkf quit (Quit: Leaving) |
15:56:06 | * | gyeates joined #nim |
16:03:14 | * | tennix joined #nim |
16:04:00 | * | Ven_ quit (Ping timeout: 272 seconds) |
16:07:53 | * | tennix quit (Ping timeout: 264 seconds) |
16:09:04 | * | AxBen joined #nim |
16:09:15 | AxBen | Where's windows.nim? |
16:10:57 | coffeepot | AxBen: on my Nim it's under C:\Nim\lib\windows |
16:11:36 | AxBen | I cloned from GitHub (fresh install) and it's no longer there.... |
16:11:44 | coffeepot | oh, no idea then :/ |
16:12:12 | EastByte | https://github.com/nim-lang/Nim/tree/devel/lib/windows |
16:12:19 | EastByte | looks pretty empty there |
16:13:14 | AxBen | I cloned from git clone https://github.com/nim-lang/Nim.git |
16:13:33 | AxBen | A lot of stuff there, but no windows.nim |
16:15:48 | * | brson joined #nim |
16:17:30 | drewsrem | Is it possible to escape the ending triple-quotes in a triple-quoted-string-literal? |
16:18:27 | Arrrr | lol |
16:18:45 | Arrrr | Maybe with \ ? |
16:19:33 | Arrrr | "$parentDir/nim.cfg where $parentDir stands for any parent directory of the project file's path" Do this actually work? |
16:22:09 | * | Ven joined #nim |
16:30:10 | * | Kelet joined #nim |
16:30:37 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:40:15 | * | gyeates quit (Ping timeout: 248 seconds) |
16:50:49 | * | FedeOmoto quit (Ping timeout: 255 seconds) |
16:53:48 | * | yglukhov joined #nim |
16:58:04 | * | gyeates joined #nim |
17:02:23 | * | pregressive quit (Remote host closed the connection) |
17:02:37 | * | pregressive joined #nim |
17:03:08 | * | pregressive quit (Remote host closed the connection) |
17:04:31 | * | FedeOmoto joined #nim |
17:05:37 | Araq | AxBen: it got removed because it's archaic. it'll be a nimble package soon, "oldwinapi" |
17:06:43 | Araq | drewsrem: nope, you need to use string concatenation instead |
17:06:51 | drewsrem | Araq, thanks |
17:07:38 | Araq | as for your other question, there is bindSym but it takes a compile-compile-time value |
17:07:53 | Araq | and doesn't allow for 'getImpl' (which is planned though) |
17:10:24 | * | brson quit (Quit: leaving) |
17:11:14 | * | yeye123 joined #nim |
17:19:37 | drewsrem | thanks, will search for it |
17:26:38 | * | askatasuna quit (Quit: WeeChat 1.2) |
17:27:07 | * | askatasuna joined #nim |
17:28:20 | * | drewsrem quit (Quit: Leaving) |
17:34:07 | * | Kelet quit (Quit: Page closed) |
17:40:45 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:46:23 | AxBen | :@Araq: What would I do in the meantime? Not compile Nim no more? When is soon? Where would I get an archaiv version of Nim? |
17:46:49 | Araq | take it from the master branch? |
17:47:02 | * | Ven joined #nim |
17:47:11 | Araq | take from an official release? |
17:48:00 | Araq | we have the releases to develop against, it's bad to depend on "nim devel" |
17:48:28 | Araq | if that doesn't work for you, tell us and we can reconsider this approach or perhaps release more frequently |
17:49:52 | AxBen | That sure doesn't work for me, as some of my "libs" depend on the windows module. The current situation leaves me in the nowhere. |
17:50:37 | Araq | hrm can you elaborate? |
17:54:24 | AxBen | Do I really have to elaborate that? If you would mark all the functions a deprecated or so, wouldn't mind it. But cutting the whole module all at a sudden W/O A REPLACEMENT forces me to go back to the master branch with just a few releases per year, making it impossible to git pull new stuff. |
17:55:09 | AxBen | Why not leave the stuff in? I sure doesn't break things... |
17:55:22 | Araq | well I can finish "oldwinapi" *now* |
17:55:41 | Araq | my question is if that's good enough or if that cannot work for some reason for you |
17:56:17 | Araq | and i need to restore it for "nim devel" |
17:56:18 | AxBen | That would depend on the functionality of oldwinapi. Haven't seen any docs so far. |
17:56:38 | Araq | it's windows.nim with a cleaned up license text |
17:56:56 | * | zviryatk0 quit (Ping timeout: 256 seconds) |
17:57:12 | AxBen | I have no probs with that and would gladly change my sources, but I need sth that I can use... |
17:57:52 | Araq | ok, good. give me a few minutes |
17:58:00 | AxBen | GREAT |
17:59:19 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:00:31 | * | brson joined #nim |
18:10:37 | * | tennix joined #nim |
18:11:30 | * | boopsiesisaway is now known as boopsies |
18:13:52 | * | yeye123 quit (Quit: Leaving) |
18:15:15 | * | drewsrem joined #nim |
18:15:33 | AxBen | Got to leave. Looking forward to "oldwinapi" (grin). Thanks for your efforts! |
18:15:46 | AxBen | :quit |
18:15:55 | * | AxBen quit (Quit: Page closed) |
18:17:33 | drewsrem | Assuming I have an ref-object type, called foo, with a field called bar which is an int, is there a way to create a setter for bar that has access to foo? - i.e. foo.bar = 10 calls a "setter"-proc |
18:19:22 | * | tennix quit (Ping timeout: 276 seconds) |
18:19:46 | Arrrr | i think it is possible with proc `.bar=` |
18:26:45 | drewsrem | Arrrr, `bar=` worked, thanks |
18:28:47 | * | Matthias247 joined #nim |
18:30:05 | * | brson quit (Remote host closed the connection) |
18:32:04 | * | Trustable quit (Ping timeout: 256 seconds) |
18:32:53 | * | Trustable joined #nim |
18:36:51 | Araq | well too bad. |
18:37:05 | Araq | oldwinapi is a nimble package now. |
18:37:14 | Araq | (I mean too bad he left) |
18:39:03 | Arrrr | Quick Q: how do i tell to my exe "the path for this dll is in x folder" ? |
18:40:00 | Araq | not too sure, you can edit %PATH% but usually just put it next to the .exe |
18:42:04 | * | fowl quit (Excess Flood) |
18:42:58 | * | fowl joined #nim |
18:43:36 | Arrrr | I wanted to load the dll from a different place, but saw i can change it from where the dynlib is declared |
18:44:02 | * | fowl quit (Excess Flood) |
18:44:13 | * | brson joined #nim |
18:45:58 | * | fowl joined #nim |
18:48:18 | Araq | Arrrr: yeah you can do that |
18:48:23 | * | fowl quit (Excess Flood) |
18:59:59 | * | gyeates quit (Ping timeout: 248 seconds) |
19:00:59 | * | xcombelle quit (Remote host closed the connection) |
19:04:49 | * | jubalh quit (Quit: Leaving) |
19:08:09 | * | Jesin joined #nim |
19:12:06 | * | tennix joined #nim |
19:17:10 | * | tennix quit (Ping timeout: 272 seconds) |
19:18:51 | * | jubalh joined #nim |
19:23:59 | * | gyeates joined #nim |
19:27:24 | * | jszymanski quit (Quit: computer sleeps...) |
19:27:44 | * | jszymanski joined #nim |
19:27:50 | * | zviryatk0 joined #nim |
19:37:28 | * | fowl joined #nim |
19:42:04 | Arrrr | http://www.reddit.com/r/programming/comments/3arcgs/the_unix_philosophy_and_elixir_as_an_alternative/csfl06s |
19:43:50 | pigmej | Arrrr: you know what's funny ? Elixir is NOT fast |
19:45:41 | Araq | what has this thing to do with unix? |
19:46:22 | pigmej | Araq: nothing ? Just like most of 'innovative' things on reddit |
19:46:37 | Araq | no I skimmed the real article |
19:46:44 | Araq | and found no reference to unix |
19:47:14 | Arrrr | Complain about it, the author is shitting on nim |
19:47:28 | fowl | Who cares |
19:48:06 | Araq | I don't think he shits on nim in particular. |
19:48:07 | * | zahary joined #nim |
19:48:33 | Araq | it's just a way of saying "look at me, I'm up to date" |
19:48:47 | Araq | except that he is not :P |
19:49:02 | Araq | cause he missed Crystal. XD |
19:49:48 | Arrrr | sigh (thinks about blaxpirit) |
19:50:20 | pigmej | Arrrr: the author compliments JVM... |
19:50:27 | * | tennix joined #nim |
19:51:19 | Arrrr | w-what's wrong about that |
19:51:48 | pigmej | Arrrr: nothing straight, but it's kindof opposite of nim, rust |
19:52:40 | * | miglo joined #nim |
19:53:46 | miglo | is there something like an abstract method in nim? |
19:54:24 | miglo | I would like to define an abstract type as it is known from Java/C++ |
19:54:45 | miglo | ...as abstract class |
19:54:58 | Arrrr | yes "method doSomething() = quit "Surprise"" |
19:55:05 | * | tennix quit (Ping timeout: 250 seconds) |
19:55:09 | pigmej | Arrrr: rotfl:D |
19:55:28 | pigmej | but anyway, I once hit something like this in some wonderfull library in python |
19:55:46 | pigmej | it had somewhere sys.exit('..') in some error catching things |
19:56:23 | miglo | Arrrr: but this isn't really an abstract method, isn't it? |
19:56:43 | Arrrr | No, the compiler wont yell at you if you dont implement it |
19:57:10 | Arrrr | But it's the closest thing you'll see |
19:57:44 | Arrrr | Maybe with pragmas and macros it is possible to get something like this |
20:02:57 | Araq | well you can raise an exception instead |
20:03:55 | fowl | cant you put {.error.} Inside the base function |
20:04:11 | fowl | For a compile time err |
20:04:27 | Araq | yeah but then it would always produce a compile-time error |
20:04:39 | fowl | Oh |
20:04:45 | Araq | the error pragma knows nothing about "I want people to override this" |
20:05:29 | * | zaquest quit (Ping timeout: 246 seconds) |
20:14:13 | * | fowl quit (Excess Flood) |
20:15:58 | * | fowl joined #nim |
20:19:15 | * | drewsrem quit (Quit: Leaving) |
20:19:41 | * | Arrrr quit (Quit: WeeChat 1.2) |
20:24:07 | * | wu-lee quit (Remote host closed the connection) |
20:29:26 | reactormonk | Isn't an abstract method something for a concept? |
20:33:32 | * | zviryatk0 quit (Quit: Konversation terminated!) |
20:34:11 | * | zaquest joined #nim |
20:34:51 | * | key_ joined #nim |
20:37:42 | * | wu-lee joined #nim |
20:47:55 | * | ^aurora^ joined #nim |
20:48:28 | * | filcuc joined #nim |
20:49:34 | * | Matthias247 quit (Read error: Connection reset by peer) |
20:49:56 | * | tennix joined #nim |
20:51:12 | * | Phaal joined #nim |
20:51:40 | * | Matthias247 joined #nim |
20:53:12 | Phaal | Hello! I looking for download/upload http library with speed limiting and resume capability. Something like curl. Is there something like that in pure nim, or should i better stick with curl? |
20:54:09 | Araq | we used to have libcurl in the stdlib ... but *cough* it got deleted and will be a nimble package real soon ... but hey, you can still get it from the master branch |
20:54:11 | reactormonk | Phaal, pretty sure there's no rate limiting in there. |
20:54:25 | * | tennix quit (Ping timeout: 264 seconds) |
20:54:35 | reactormonk | Araq, pfft. Just deleting random stuff whenever you feel like it. |
20:54:50 | Araq | reactormonk: it was part of some RFC |
20:55:09 | reactormonk | And no one felt like adding it? |
20:55:18 | * | ^aurora^ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
20:55:31 | Araq | adding what? |
20:55:40 | * | ^aurora^ joined #nim |
20:55:52 | reactormonk | libcurl back into a git repo somwhere, e.g. nim-lang |
20:55:57 | Phaal | I have Nim 0.11.2 installed and curl header is still there... so ok, i will use curl. |
20:56:17 | Araq | reactormonk: I'm working on it ... |
20:56:29 | Phaal | Thx for info :) |
20:56:49 | reactormonk | Araq, I assume it follows the old TFoo conventions? |
20:57:25 | Araq | no idea, I think it has got an update in the meantime |
20:58:38 | Araq | hrm I wonder where ozra is ... last words from him were something like "I'll be drunk like there is no tomorrow" |
20:59:19 | Araq | should have taken him seriously :P |
21:01:35 | * | jszymanski quit (Quit: computer sleeps...) |
21:01:56 | * | yglukhov quit (Quit: Be back later ...) |
21:14:54 | miglo | has someone used / implemented the strategy pattern in nim or knows a good example that shows it in the sense of "that's how it's done in nim"? |
21:19:25 | miglo | I have implemented it for exercise but I'm still thinking in terms of interfaces, objects, abstract objects/methods, polymorphism |
21:20:30 | Araq | usually you just pass a closure proc to the constructor, store it in the object and then invoke it |
21:20:45 | Araq | if you even need the object |
21:21:06 | miglo | ok, so same as in python |
21:21:25 | Araq | similar to Python yeah |
21:21:45 | Araq | though Python has more support for the classical OO ways I guess |
21:28:09 | * | dtscode is now known as charmander |
21:29:43 | * | filcuc quit (Quit: Konversation terminated!) |
21:33:55 | JohnYy | During Nim installation on Windows, if you check the "Setup Path Environment" box and you don't have a Path environment variable, it's not created |
21:33:58 | JohnYy | so it's not added at all |
21:34:18 | JohnYy | is it a bug? |
21:34:56 | JohnYy | (I just tried to make my little sister install Nim heh) |
21:38:31 | * | jubalh quit (Quit: Leaving) |
21:39:46 | Phaal | Is there somewhere example of curl write callback (in Nim) ?... i dont know how to pass nim File type through pointer to this callback :( |
21:40:17 | fowl | JohnYy: never heard of not having PATH but I guess its possible |
21:41:24 | fowl | Phaal: Nims File is File* in c |
21:42:50 | Phaal | hmm... i rewriting this example to Nim: http://curl.haxx.se/libcurl/c/ftpget.html |
21:43:31 | Phaal | i passed File to callback function, then i tried open it in callback, but i get error |
21:43:32 | reactormonk | Phaal, try c2nim :D |
21:43:59 | Phaal | ok , i ll try :) |
21:44:44 | * | askatasuna quit (Ping timeout: 272 seconds) |
21:45:50 | reactormonk | Phaal, although probably a bad idea. |
21:45:56 | reactormonk | it will procude shitty nim code imo |
21:48:59 | Phaal | hmm... i tried: var outstream = cast[File] (outstream) |
21:49:03 | Phaal | but sigsev |
21:50:25 | Phaal | this is my code: http://pastebin.com/ib6qpCiS |
21:53:18 | reactormonk | pretty sure there's a better idea than casting.... but I donno |
21:54:58 | Phaal | this is what c2nim suggested to me ..hehe |
21:55:42 | * | tennix joined #nim |
21:55:58 | Araq | JohnYy: environment vars are in the registry these days, not in autoexec.bat ... |
21:58:22 | Araq | install "rapid environment editor" and see for yourself. don't use windows absurdly complex ways to arrive at the bullshit UI for dealing with the environment vars |
22:00:19 | * | tennix quit (Ping timeout: 250 seconds) |
22:01:50 | JohnYy | I don't know what autoexec.bat is... |
22:01:58 | Araq | good. |
22:02:39 | JohnYy | all I know is, in Windows environment variable (in the config panel...), there's 2 lists of environment variable, one for the current user, and one for the system |
22:02:39 | miglo | I've a created a type: type Callback = proc () ... and additionally: proc newBox(f: Callback) ... that should act as a constructor ... now I'm passing proc action() = echo "action" ... to newBox(action) |
22:02:57 | JohnYy | Nim's installer add the folders paths to the Path variable of the user |
22:03:19 | JohnYy | but if he doesn't have one, it doesn't do anything so it has to be added manually |
22:03:20 | miglo | but the compiler complains always :-/ |
22:04:17 | Araq | JohnYy: possible but why is there no path variable? |
22:04:25 | miglo | now it works |
22:04:29 | JohnYy | I don't know why she doesn't have one |
22:04:42 | JohnYy | (and she doesn't either) |
22:04:48 | Araq | she should have. everybody has. |
22:07:15 | miglo | it's difficult to change the way how to think ... to think nim'ish |
22:09:58 | Araq | miglo: not sure about that. YAGNI goes a long way in Nim. ;-) |
22:10:04 | dom96 | Araq: Everybody has a *system* PATH |
22:10:12 | dom96 | not necessarily a *user* PATH |
22:10:32 | dom96 | The installer should probably add Nim to the *system* PATH. |
22:10:52 | JohnYy | or... add the path to the user path |
22:11:08 | JohnYy | Golang has its own GOPATH variable |
22:12:09 | Araq | dom96: *shrug* fix it. :P |
22:12:21 | dom96 | I'm not in charge of the installers |
22:12:29 | dom96 | Time to delegate. |
22:12:31 | Araq | now you are. |
22:12:48 | JohnYy | is it on Github? |
22:13:03 | Araq | of course |
22:15:52 | * | gyeates quit (Ping timeout: 252 seconds) |
22:18:23 | fowl | miglo: what was the issue |
22:18:43 | fowl | Er how did you fix it |
22:21:45 | * | Kingsquee joined #nim |
22:22:36 | miglo | I'm still learning nim and what I did was "var x: newBox(action)" instead "var x: Box " and then "x = newBox(action)" |
22:25:05 | fowl | Ah |
22:25:57 | miglo | my impression is that the classical oop strategy pattern needs a lot of boilerplate code |
22:26:31 | miglo | the functional style seems to be more ... mmm ... practical |
22:26:48 | fowl | Show me what you have maybe it can be reduced |
22:27:51 | miglo | I've followed the advice of Araq and passed the "strategy" just as an function to the constructor of an object |
22:28:24 | miglo | the code is much simpler then my first more oop oriented solution |
22:28:58 | * | gyeates joined #nim |
22:29:14 | * | fowl quit (Excess Flood) |
22:29:29 | miglo | and I think that it even doesn't provide any disadvantages compared to the typical oop solution |
22:29:58 | * | fowl joined #nim |
22:30:28 | * | fowl quit (Excess Flood) |
22:30:48 | miglo | simple but nevertheless still easy to extend if more 'strategies' are needed |
22:32:28 | * | fowl joined #nim |
22:33:54 | miglo | I also stumbled about the programming language "pony" which seems to be also very interesting |
22:35:13 | miglo | but their tutorial is not complete, yet |
22:36:23 | * | boopsies is now known as boopsiesisaway |
22:36:24 | miglo | seems to be a very young language |
22:42:13 | * | miglo left #nim ("http://quassel-irc.org - Chat comfortably. Anywhere.") |
22:46:05 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:48:54 | * | gyeates quit (Ping timeout: 246 seconds) |
22:50:55 | * | Phaal quit (Quit: Page closed) |
23:01:22 | * | gyeates joined #nim |
23:06:03 | * | pregressive joined #nim |
23:06:57 | * | tennix joined #nim |
23:09:44 | * | JohnYy quit (Quit: Page closed) |
23:12:08 | * | tennix quit (Ping timeout: 272 seconds) |
23:21:15 | * | Trustable quit (Remote host closed the connection) |
23:31:35 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:32:06 | * | tennix joined #nim |
23:34:11 | * | vikaton joined #nim |
23:36:32 | * | tennix quit (Ping timeout: 246 seconds) |
23:36:45 | reactormonk | self-hosting? :-@s9 |
23:40:23 | Araq | reactormonk: last time I checked, I couldn't download it anywhere |
23:41:24 | Araq | however poly-lang is a great example of how to design a language. Designed by people who chose what makes sense in the *context of their language* rather than worrying about "oh this looks like in Python but behaves differently so it will be confusing" |
23:45:47 | wu-lee | reactormonk: another progress report |
23:46:06 | wu-lee | good news this time, I think I just found the problem |
23:47:26 | wu-lee | absense of crt.o, hence entry point at start of .text only works if main() routine happens to be on the execution path from there |
23:49:36 | wu-lee | in that, compiling nim -> c, and then c -> bin -> hex -> upload now works for me |
23:50:33 | * | brson quit (Ping timeout: 244 seconds) |
23:50:47 | wu-lee | my makefile had a two step .c -> .o, .o ->.bin compilation, which doesn't implicitly add a crt.o object |
23:51:14 | wu-lee | as happens when a one step .c -> .bin is used (compile and link) |
23:55:17 | wu-lee | seems that the nim compiler does the same, omits the crt.o |
23:56:27 | wu-lee | in this case, anyway. |
23:56:47 | * | saml_ joined #nim |
23:57:03 | * | gokr quit (Quit: Leaving.) |