00:01:16 | * | vendethiel quit (Ping timeout: 244 seconds) |
00:02:19 | * | freezerburnV joined #nim |
00:13:32 | * | Demos joined #nim |
00:14:01 | * | vendethiel joined #nim |
00:16:08 | * | benwbooth quit (Ping timeout: 272 seconds) |
00:19:43 | * | benwbooth joined #nim |
00:32:31 | * | yglukhov joined #nim |
00:35:33 | * | vendethiel quit (Ping timeout: 240 seconds) |
00:36:55 | * | yglukhov quit (Ping timeout: 260 seconds) |
00:45:44 | * | akaisora joined #nim |
01:04:01 | * | akaisora quit (Read error: Connection reset by peer) |
01:14:37 | * | vendethiel joined #nim |
01:20:12 | * | freezerburnV quit (Ping timeout: 246 seconds) |
01:24:56 | * | kier_ quit (Quit: Reconnecting) |
01:25:02 | * | kier joined #nim |
01:26:30 | kier | getting a gcc error in code originating from Nim's codegen |
01:30:19 | def- | kier: mind sharing the code that causes it? otherwise try with devel branch, check if there is an issue about it on github, otherwise submit one |
01:31:42 | Demos | is there a way to get c2nim to go ahead and parse some <> style includes |
01:33:12 | Demos | also I just tried c2nim --cpp for the first time and it works real well |
01:33:28 | Demos | actually considering c++ tends to use less macros than C things could be pretty smooth |
01:34:57 | * | yglukhov joined #nim |
01:35:25 | kier | def-: currently trying to reduce it to a minimal working example |
01:36:21 | kier | oddly, if I pull out the code that I think might be causing it into a new file and compile it, I get a different error |
01:36:53 | def- | kier: to submit an issue the code doesn't need to be minimal, just 1 file and reproducable btw |
01:39:13 | * | yglukhov quit (Ping timeout: 252 seconds) |
01:53:21 | * | kulelu88 joined #nim |
01:53:21 | * | kulelu88 quit (Changing host) |
01:53:21 | * | kulelu88 joined #nim |
01:55:34 | * | chemist69 quit (Ping timeout: 272 seconds) |
01:57:59 | * | vendethiel quit (Ping timeout: 250 seconds) |
01:58:49 | * | abruanese joined #nim |
02:06:01 | * | vktec quit (Ping timeout: 258 seconds) |
02:08:40 | * | chemist69 joined #nim |
02:10:09 | kier | #4346 |
02:10:40 | * | nsf joined #nim |
02:14:17 | * | vktec joined #nim |
02:15:40 | * | vktec quit (Quit: So long and thanks for all the fish) |
02:15:57 | * | vktec joined #nim |
02:39:05 | * | mcc joined #nim |
02:41:16 | mcc | does the nim standard library and/or nimble just happen to contain a good priority queue implementation? |
02:42:18 | mcc | there's a "binaryheap" in nimble that looks promising... |
02:44:20 | * | kulelu88 quit (Quit: Leaving) |
02:53:25 | * | vendethiel joined #nim |
03:18:01 | * | brson joined #nim |
03:29:46 | * | Demos quit (Ping timeout: 252 seconds) |
03:36:43 | * | yglukhov joined #nim |
03:37:45 | * | vendethiel quit (Ping timeout: 246 seconds) |
03:41:07 | * | yglukhov quit (Ping timeout: 250 seconds) |
03:47:41 | * | vendethiel joined #nim |
03:57:10 | * | Demos joined #nim |
04:08:24 | * | vendethiel quit (Ping timeout: 244 seconds) |
04:24:32 | * | vendethiel joined #nim |
04:27:15 | * | GangstaCat joined #nim |
04:36:35 | * | brson quit (Ping timeout: 250 seconds) |
04:36:59 | * | brson joined #nim |
04:42:20 | * | brson quit (Ping timeout: 244 seconds) |
04:50:06 | * | vendethiel quit (Ping timeout: 276 seconds) |
04:53:47 | * | vendethiel joined #nim |
04:56:22 | * | endragor joined #nim |
05:35:03 | * | LeNsTR|away is now known as lenstr |
05:35:03 | * | lenstr quit (Changing host) |
05:35:03 | * | lenstr joined #nim |
05:37:51 | * | so joined #nim |
05:38:18 | * | endragor quit (Remote host closed the connection) |
05:38:44 | * | yglukhov joined #nim |
05:43:40 | * | yglukhov quit (Ping timeout: 264 seconds) |
05:52:58 | * | so quit (*.net *.split) |
05:57:06 | * | plzhalp joined #nim |
05:58:07 | * | plzhalp quit (Client Quit) |
05:58:23 | * | vendethiel quit (Ping timeout: 276 seconds) |
05:58:37 | * | so joined #nim |
06:05:38 | * | vendethiel joined #nim |
06:08:34 | * | IPv6 joined #nim |
06:10:08 | * | IPv6 quit (Client Quit) |
06:26:55 | * | Demos quit (Ping timeout: 260 seconds) |
06:33:51 | * | endragor joined #nim |
06:34:32 | * | brson joined #nim |
06:34:51 | * | endragor_ joined #nim |
06:38:04 | * | endragor quit (Ping timeout: 244 seconds) |
06:46:37 | * | yglukhov joined #nim |
06:48:19 | * | vendethiel quit (Ping timeout: 252 seconds) |
06:51:20 | * | yglukhov quit (Ping timeout: 272 seconds) |
06:53:03 | * | allan0 quit (Ping timeout: 246 seconds) |
06:53:04 | * | endragor_ quit (Remote host closed the connection) |
06:53:34 | * | endragor joined #nim |
06:58:19 | * | vendethiel joined #nim |
07:00:27 | * | yglukhov joined #nim |
07:02:16 | * | yglukhov quit (Remote host closed the connection) |
07:03:59 | * | endragor quit (Remote host closed the connection) |
07:05:11 | * | gokr joined #nim |
07:15:16 | * | MonsterAbyss is now known as BitToAtom |
07:16:31 | * | allan0 joined #nim |
07:18:38 | * | Demon_Fox quit (Quit: Leaving) |
07:27:30 | * | endragor joined #nim |
07:34:33 | * | lyro quit (Ping timeout: 244 seconds) |
07:37:05 | * | lyro joined #nim |
07:50:35 | * | PMunch joined #nim |
07:52:10 | * | Trustable joined #nim |
07:55:04 | * | lyro quit (Ping timeout: 264 seconds) |
07:56:19 | * | lyro joined #nim |
07:59:16 | * | yglukhov joined #nim |
08:03:43 | * | euantor joined #nim |
08:06:04 | * | vendethiel quit (Ping timeout: 272 seconds) |
08:09:36 | * | vendethiel joined #nim |
08:14:47 | * | deavmi_mobile joined #nim |
08:26:38 | * | mcc quit (Quit: Connection closed for inactivity) |
08:43:49 | * | deavmi joined #nim |
08:44:26 | * | akiradeveloper joined #nim |
08:44:26 | * | akiradeveloper quit (Client Quit) |
08:48:52 | * | euantor quit (Quit: Page closed) |
08:51:26 | * | deavmi_mobile quit (Read error: No route to host) |
08:51:56 | * | abbat joined #nim |
08:52:03 | * | vendethiel quit (Ping timeout: 244 seconds) |
08:55:49 | * | vendethiel joined #nim |
09:02:23 | * | brson quit (Ping timeout: 244 seconds) |
09:04:48 | * | brson joined #nim |
09:18:21 | * | zaquest quit (Ping timeout: 240 seconds) |
09:26:02 | * | deavmi quit (Ping timeout: 250 seconds) |
09:31:51 | * | zaquest joined #nim |
09:32:50 | * | Mozart_ joined #nim |
09:37:18 | * | Mozart_ quit (Ping timeout: 250 seconds) |
09:38:32 | * | vendethiel quit (Ping timeout: 272 seconds) |
09:39:33 | * | vendethiel joined #nim |
09:40:18 | cheatfate | Araq_, ping |
09:43:31 | * | jortiz7 joined #nim |
09:46:39 | * | jortiz7 quit (Client Quit) |
09:47:29 | skrzyp | I |
09:47:41 | skrzyp | I'm still struggling with Nimble installation |
09:47:54 | skrzyp | even install_nimble.nims complains about lack of "compiler/ast" thing |
09:50:24 | Araq_ | cheatfate: pong |
09:50:35 | Araq_ | skrzyp: describe your setup |
09:50:50 | skrzyp | what exactly? |
09:52:01 | skrzyp | (in the meantime I'm trying to bootstrap a fresh Nim from git again to check if that still happens) |
09:53:59 | * | ephja joined #nim |
09:56:56 | skrzyp | ~/src/lang/nim/nim $ nim install_nimble.nims |
09:56:58 | skrzyp | src/lang/nim/dist/nim/lib/system/ansi_c.nim(51, 12) Error: SIGABRT not ported to your platform |
09:57:00 | skrzyp | WAT |
09:57:45 | skrzyp | I'm not using OpenVMS or AmigaOS |
09:57:57 | skrzyp | it's a regular UNIX system, lol |
09:58:51 | cheatfate | skrzyp, you need to know that openbsd is differs even from netbsd and freebsd... |
09:59:15 | * | coffeepot joined #nim |
09:59:41 | skrzyp | but version from ports runs and compiles code properly |
10:00:09 | skrzyp | the only thing with that is that Nimble can't be build due to missing "compile/ast" |
10:02:02 | skrzyp | http://sprunge.us/jhRI - here's a list of patches applied to version from ports |
10:02:45 | * | vendethiel quit (Ping timeout: 260 seconds) |
10:05:25 | skrzyp | So, no one wants to help, even if we have a large amount of people from #openbsd here? :) |
10:06:46 | * | endragor quit (Remote host closed the connection) |
10:07:08 | * | vendethiel joined #nim |
10:07:58 | Araq_ | skrzyp: nim e install_nimble.nims |
10:08:39 | Araq_ | you missed the 'e' but i dont know if thats the problem |
10:11:09 | * | euantor joined #nim |
10:11:43 | skrzyp | why it's not docummented in --help? |
10:11:48 | skrzyp | or even the manpage? |
10:12:49 | cheatfate | skrzyp, and who is here from openbsd? |
10:13:11 | skrzyp | 121259 +++ common lurkers from freenode.#weechat: |
10:13:13 | skrzyp | 121259 Pisuke, SirCmpwn, Xe, abruanese, gsingh93, nchambers, sarlalian, tstm |
10:13:25 | skrzyp | scripts are not lying :) |
10:15:37 | cheatfate | all of them except Xe is bots and Xe is away... |
10:16:23 | Araq_ | what manpage? we don't have manpages. |
10:16:59 | * | euan joined #nim |
10:17:31 | skrzyp | cheatfate: they're not bots |
10:17:41 | skrzyp | I can personally admit that for SirCmpwn |
10:18:18 | * | euan quit (Client Quit) |
10:18:51 | cheatfate | skrzyp, for 4 months i never seen SirCmpwn is said something here... |
10:19:40 | * | kingofoz quit (Ping timeout: 260 seconds) |
10:20:24 | skrzyp | Does that even matter? |
10:20:41 | * | kingofoz joined #nim |
10:21:19 | cheatfate | skrzyp, i told you yesterday that i dont have any problems with Nim on openbsd |
10:21:23 | * | deavmi joined #nim |
10:21:51 | skrzyp | But I have, even if I did the same thing as you - build from git HEAD |
10:22:59 | cheatfate | Araq_, what is `NoFakeVars`? |
10:24:16 | * | nsf quit (Quit: WeeChat 1.4) |
10:24:17 | Araq_ | cheatfate: it means to not use var SOMESIGNALWEWISHWEHADINVENTEDVOWELS {.importc.}: cint |
10:24:18 | cheatfate | skrzyp, what c compiler you have installed? |
10:24:29 | * | Pisuke quit (Read error: Connection reset by peer) |
10:24:34 | cheatfate | Araq_, is it enabled by default? |
10:24:38 | * | euant joined #nim |
10:24:49 | cheatfate | skrzyp, and using? |
10:24:51 | Araq_ | I think so in the recent devel |
10:25:14 | * | euantor quit (Quit: Page closed) |
10:25:22 | * | euant is now known as euantor |
10:25:36 | * | Pisuke joined #nim |
10:25:50 | euantor | Anybody know if it's possible to return a closure iterator from a method? |
10:26:20 | euantor | I'd like to return a string iterator from a method so that it's dynamically dispatched, but I can't work out the syntax. I've tried |
10:26:28 | euantor | method getAllTablesForDatabase*(d: MysqlDriver, database: string): iterator: string |
10:26:37 | euantor | and: `method getAllTablesForDatabase*(d: MysqlDriver, database: string): iterator[string]` |
10:26:59 | skrzyp | cheatfate: |
10:27:01 | skrzyp | ~ $ gcc -v 2>&1 | tail -n1 |
10:27:03 | skrzyp | gcc version 4.2.1 20070719 |
10:27:05 | skrzyp | ~ $ egcc -v 2>&1 | tail -n1 |
10:27:07 | skrzyp | gcc version 4.9.3 (GCC) |
10:27:10 | euantor | ALl I get is "invalid pragma: base" |
10:27:35 | skrzyp | (both of them are widely patched with backports and security fixes) |
10:27:46 | cheatfate | gcc 4.2.1 is not supported |
10:28:18 | cheatfate | please give me value of nim.cfg's variable cc = |
10:28:37 | cheatfate | Nim/config |
10:28:42 | cheatfate | Nim/config/nim.cfg |
10:30:10 | Araq_ | method getAllTablesForDatabase*(d: MysqlDriver, database: string): (iterator: string) |
10:31:42 | skrzyp | cheatfate: after changing "cc=" to egcc in nim.cfg, it still doesn't work |
10:32:06 | euantor | Araq_: perfect, thanks! |
10:32:23 | cheatfate | skrzyp, better use egcc |
10:32:56 | skrzyp | cheatfate: how can I rebuild nim using egcc? |
10:33:16 | skrzyp | I can''t see a config file in nim-lang/nim repository |
10:33:40 | cheatfate | Araq is it possible to rebuild nim with 'egcc'? |
10:33:54 | cheatfate | skrzyp, but i think async_c.nim bug will still be here |
10:38:02 | dom96 | There are other ways to install Nimble. If Araq's magical install script doesn't work then follow the instructions in Nimble'd readme. |
10:38:20 | dom96 | But if you can't bootstrap Git HEAD then that's a different problem. |
10:39:30 | skrzyp | dom96: I can, but ruuning it complains about SIGABRT |
10:40:15 | cheatfate | dom96, i have already made PR |
10:40:22 | dom96 | skrzyp: interesting |
10:41:09 | * | ephja quit (Quit: WeeChat 1.5) |
10:42:19 | dom96 | skrzyp: but that only happens when you run the install_nimble.nims script right? |
10:43:30 | cheatfate | dom96, i have pushed PR which can resolve ansi_c.nim bug |
10:43:36 | skrzyp | dom96: yes |
10:43:42 | dom96 | skrzyp: have you tried just doing this? https://github.com/nim-lang/nimble#unix |
10:43:48 | skrzyp | nim -v and nim -h works |
10:43:55 | skrzyp | I should check some example sources |
10:44:23 | skrzyp | yep |
10:44:25 | skrzyp | Hint: operation successful (10085 lines compiled; 1.215 sec total; 15.504MiB; Debug Build) [SuccessX] |
10:44:31 | skrzyp | (on hallo.nim) |
10:45:31 | dom96 | Please try https://github.com/nim-lang/nimble#unix |
10:50:16 | * | vendethiel quit (Ping timeout: 264 seconds) |
10:50:29 | skrzyp | Wait a sec, wireless connection is actually bleeding |
10:51:04 | skrzyp | src/lang/nim/nimble/src/nimble.nim(4, 8) Error: cannot open 'httpclient' |
10:51:40 | * | elrood joined #nim |
10:52:03 | dom96 | skrzyp: now that's a strange error. |
10:52:23 | * | vendethiel joined #nim |
10:52:30 | dom96 | It seems like Nim is buggy on your platform. |
10:52:53 | dom96 | `httpclient` is part of the stdlib and should be easily found. |
10:53:14 | skrzyp | maybe it doesn't find my nim directory |
10:53:22 | skrzyp | which was installed using ./install.sh |
10:53:36 | dom96 | it seems as if Nim cannot find its standard library |
10:53:37 | skrzyp | there's not line about loading my .cfg file |
10:54:08 | dom96 | yeah, where did you install Nim? |
10:54:20 | Araq_ | skrzyp: don't use ./install.sh |
10:54:36 | Araq_ | don't install Nim, just add it your PATH |
10:54:51 | skrzyp | /home/skrzyp/src/lang/nim/dist/nim - that's a directory used by install.sh |
10:55:18 | Araq_ | rm /usr/bin/nim |
10:55:29 | skrzyp | it was done before |
10:55:35 | Araq_ | rm /usr/local/bin/nim |
10:55:39 | skrzyp | ^ |
10:55:47 | skrzyp | I used pkg_delete -iv nim |
10:55:59 | skrzyp | I know my platform :> |
10:56:03 | Araq_ | nim does tell you which config it's reading |
10:56:43 | skrzyp | Hint: used config file '/home/skrzyp/src/lang/nim/nimble/src/nimble.nim.cfg' [Conf] |
10:56:53 | skrzyp | so it's not reading my actual nim directory |
10:56:54 | skrzyp | weird |
10:57:08 | skrzyp | what options should I append? |
10:57:28 | * | abbat quit (Ping timeout: 264 seconds) |
10:58:06 | * | abbat joined #nim |
11:01:37 | dom96 | what's in /home/skrzyp/src/lang/nim/dist/nim ? |
11:03:14 | skrzyp | http://sprunge.us/ILJN |
11:04:12 | PMunch | dom96, the videos in your latest post doesn't appear to run for me |
11:05:35 | dom96 | skrzyp: hrm, are you sure that `which nim` == /home/skrzyp/src/lang/nim/dist/nim/bin/nim? |
11:06:22 | skrzyp | it's /home/skrzyp/bin/nim |
11:06:27 | skrzyp | which is in fact a symlink there |
11:06:35 | skrzyp | maybe that's an issue? |
11:06:51 | skrzyp | but I think it should parse symlinks |
11:06:57 | dom96 | lol that's definitely the issue |
11:07:16 | dom96 | But yes, I bet it can't handle symlinks on OpenBSD |
11:07:35 | skrzyp | symlinks are the sam on all POSIX systems |
11:07:42 | dom96 | Likely this is broken on your platform: http://nim-lang.org/docs/os.html#expandSymlink,string |
11:07:50 | * | brson quit (Ping timeout: 272 seconds) |
11:09:52 | dom96 | It could be the system call on OpenBSD is slightly different |
11:09:55 | dom96 | or something silly like that |
11:11:19 | dom96 | https://github.com/nim-lang/Nim/blob/devel/compiler/options.nim#L214 |
11:11:22 | dom96 | Relevant code |
11:11:27 | * | WickedShell quit (Quit: Leaving) |
11:11:28 | dom96 | in the compiler |
11:12:45 | euantor | It looks like readlink() is the same on OpenBSD to me: http://man.openbsd.org/readlink.2 |
11:12:57 | skrzyp | okay |
11:13:02 | skrzyp | now Nim says |
11:13:15 | skrzyp | Error: unknown C compiler: 'egcc' |
11:13:27 | skrzyp | but it's on $PATH |
11:13:31 | skrzyp | and it's not a symlink |
11:13:37 | cheatfate | skrzyp, this is my fault |
11:13:43 | cheatfate | you need not modify cc = gcc |
11:14:42 | cheatfate | skrzyp, please be sure your cc = gcc in nim.cfg |
11:14:48 | * | vendethiel quit (Ping timeout: 272 seconds) |
11:14:56 | skrzyp | okay |
11:15:02 | skrzyp | I've turned it back to gcc |
11:15:16 | skrzyp | and now everything works, at least it looks like it's building nimble code |
11:15:24 | dom96 | cool |
11:15:37 | skrzyp | FAILURE: Could not read package info file in /home/skrzyp/src/lang/nim/nimble/nimble.nimble; |
11:15:39 | skrzyp | Reading as ini file failed with: |
11:15:40 | cheatfate | skrzyp, but some code will require to use egcc |
11:15:41 | skrzyp | Invalid section: . |
11:15:43 | skrzyp | Evaluating as NimScript file failed with: |
11:15:45 | skrzyp | lib/system/ansi_c.nim(51, 12) Error: SIGABRT not ported to your platform. |
11:15:47 | skrzyp | Error: execution of an external program failed: '/home/skrzyp/src/lang/nim/nimble/src/nimble -y install' |
11:15:49 | skrzyp | well, fuck |
11:15:52 | dom96 | oh lol |
11:16:04 | cheatfate | dom96, i have already made patch on this bug |
11:16:06 | skrzyp | *facedesk* |
11:16:15 | dom96 | cheatfate: have you tested it? |
11:16:15 | euantor | Is this the latest nimble code? |
11:16:30 | euantor | I had that same issue on OS X with an old version of Nimble |
11:16:47 | cheatfate | dom96, just checked appropriate headers for every platform |
11:16:52 | dom96 | euantor: perhaps a similar one, I bet it didn't say "lib/system/ansi_c.nim(51, 12) Error: SIGABRT not ported to your platform." though :) |
11:16:56 | dom96 | cheatfate: i'll merge it then |
11:17:16 | skrzyp | euantor: yep, git HEAD |
11:17:21 | euantor | dom96: No, not quite |
11:17:31 | dom96 | skrzyp: cd $nim_dir && git pull && ./koch boot -d:release |
11:17:50 | dom96 | Although I guess you didn't really install it that way |
11:18:07 | skrzyp | yes I did |
11:18:10 | skrzyp | cheatfate said so |
11:18:21 | dom96 | okay, good, then you can easily update. |
11:18:21 | skrzyp | (I used bootstrap.sh, but it's in fact the same thing) |
11:18:28 | * | vendethiel joined #nim |
11:18:58 | * | endragor joined #nim |
11:20:44 | cheatfate | skrzyp, and this link helps you adopt your nim.cfg to use `egcc` instead of old `gcc` https://github.com/nim-lang/Nim/issues/4046#issuecomment-222542273 |
11:20:53 | skrzyp | wait a moment |
11:20:59 | skrzyp | I'm doing 10 things at once |
11:21:24 | cheatfate | skrzyp, hour ago you complained that nobody hearing you... |
11:21:34 | skrzyp | no, it's okay |
11:21:58 | skrzyp | large thanks for helping me, of course |
11:22:28 | cheatfate | so is ansi_c.nim bug still exist? |
11:22:36 | skrzyp | but I've just been asked to do some other stuff and now I'm telling Nim to work, copying files, talking to you on IRC, selling 2 things on OLX, etc. |
11:22:48 | skrzyp | Koch is still processing |
11:25:11 | Araq_ | skrzyp: it's a regression in devel |
11:25:17 | skrzyp | okay |
11:25:18 | Araq_ | const NoFakeVars* = defined(nimscript) |
11:25:25 | skrzyp | "nimnle installed successfully" |
11:25:35 | Araq_ | and Nimble uses nimscript |
11:25:48 | Araq_ | NoFakeVars are not yet ported to the BSDs |
11:25:58 | Araq_ | big question is though why it works for cheatfate |
11:26:02 | skrzyp | can I move ".nimble" anywhere else, with correct $PATH? |
11:26:08 | dom96 | because he doesn't use nimble |
11:26:09 | dom96 | AFAIK |
11:26:14 | cheatfate | Araq_, because i'm not using nimble |
11:26:23 | skrzyp | :DD |
11:26:26 | dom96 | skrzyp: not right now |
11:26:42 | Araq_ | skrzyp: master branch of Nim shouldn't have this problem :-) |
11:26:49 | Araq_ | and is reasonably up to date |
11:26:59 | skrzyp | Araq_: I'm using HEAD for nimble too |
11:27:11 | Araq_ | it's not a nimble bug. |
11:27:17 | dom96 | skrzyp: you can change where Nimble installs stuff (including itself) via config https://github.com/nim-lang/nimble#configuration |
11:27:33 | cheatfate | Araq_, we have already made commit to resolve this ansi_c.nim bug |
11:27:36 | dom96 | skrzyp: but you should add ~/.nimble/bin to your $PATH |
11:27:39 | skrzyp | un-movable dotfiles are a bit problematic for me, while I don't have any dotfile in $HOME |
11:27:48 | skrzyp | (many hacks was used for that) |
11:27:59 | Araq_ | cheatfate: already merged? |
11:28:04 | cheatfate | Araq_, yep |
11:28:16 | Araq_ | ok -.- so I wasted my time |
11:28:19 | dom96 | skrzyp: you can move it, just make sure to add nimbleDir = "newPathToNimbleDir" into ~/.config/nimble/nimble.ini |
11:28:37 | skrzyp | okay |
11:28:44 | cheatfate | Araq_, sorry |
11:29:03 | * | brson joined #nim |
11:29:05 | dom96 | skrzyp: whatever path you end up with though, you should add $nimbleDir/bin to your $PATH |
11:30:45 | deavmi | kier: Ey. You there? |
11:34:24 | dom96 | bbl |
11:36:53 | skrzyp | ~/src/lang/nim/dist/nimble/bin $ ls -l |
11:36:55 | skrzyp | total 0 |
11:36:57 | skrzyp | lrwxr-xr-x 1 skrzyp skrzyp 45 Jun 16 13:24 nimble -> /home/skrzyp/.nimble/pkgs/nimble-0.7.4/nimble |
11:36:59 | skrzyp | haha :D |
11:38:03 | skrzyp | okay, I fixed that, how can I test nimble on some advanced project? |
11:45:05 | cheatfate | dom96, are you going to accept this? https://github.com/nim-lang/Nim/pull/4336 |
11:47:45 | * | brson quit (Ping timeout: 246 seconds) |
11:49:50 | * | chemist69 quit (Ping timeout: 258 seconds) |
11:54:20 | * | chemist69 joined #nim |
12:00:03 | cheatfate | Araq_, what is size of ntyFloat == ntyFloat64 on x64? and ntyFloat == ntyFloat32 on x86? |
12:10:37 | skrzyp | installing sdl2 package failed with: |
12:10:39 | skrzyp | FAILURE: Could not read package info file in /tmp/nimble_8080/githubcom_nimlangsdl2/sdl2.nimble; |
12:10:41 | skrzyp | Reading as ini file failed with: |
12:10:43 | skrzyp | Invalid section: . |
12:10:45 | skrzyp | Evaluating as NimScript file failed with: |
12:10:47 | skrzyp | Cannot find nimscriptapi.nim. |
12:17:39 | foosball | i had the same problem |
12:18:45 | * | endragor quit (Remote host closed the connection) |
12:18:54 | * | endragor joined #nim |
12:26:12 | * | arnetheduck joined #nim |
12:34:01 | * | branduardi joined #nim |
12:36:32 | * | branduardi quit (Client Quit) |
12:36:47 | * | Branduardi___ joined #nim |
12:37:51 | * | Branduardi___ quit (Client Quit) |
12:38:27 | * | branduardi joined #nim |
12:38:29 | branduardi | Hi guys |
12:38:53 | branduardi | I have a strange problem with the httpclient |
12:39:12 | branduardi | curl http://f1c4d963.ngrok.io/test/test -v # returns Hallo as expected |
12:39:23 | branduardi | import httpclient; var resp = get("http://f1c4d963.ngrok.io/test/test"); echo $resp |
12:39:26 | branduardi | has an empty body |
12:39:49 | dom96 | branduardi: Sounds like a bug, please report it on Github |
12:40:51 | branduardi | it only occurs on a dev server of mine, don't want to let that exposed to the internet.. |
12:41:13 | Araq_ | haven't we deprecated httpclient? |
12:41:31 | dom96 | skrzyp: foosball: strange that people still have this problem. Here is the code that attempts to find it https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/nimscriptsupport.nim#L175 |
12:41:37 | dom96 | Araq_: No, that's http*server* |
12:41:50 | euantor | Compiling an application on an old WIndows EMbedded x32 system with a 1000MHz CPU - 98% CPU usage on the compiler, 82 second compile time. Ouch. |
12:41:56 | Araq_ | cheatfate: float is always 64buts |
12:42:21 | euantor | There are quite a few changes that could be done to httpclient I noticed. For instance, there's an `AsyncHttpClient` type, but no sync equivalent |
12:42:59 | euantor | I started writing my own for my own use, but it's going to take a while to do it properly. |
12:43:06 | dom96 | branduardi: hrm, well, you can try and investigate the problems yourself if you'd like: https://github.com/nim-lang/Nim/blob/devel/lib/pure/httpclient.nim#L475 |
12:44:06 | dom96 | euantor: yeah, I realised too late that I should have created a HttpClient type. |
12:44:20 | dom96 | euantor: If you've got the time feel free to create PRs to fix this :) |
12:45:18 | branduardi | dom96: thanks, I'll build from git and try to find something |
12:45:35 | euantor | dom96: There are some other slight oddities too, which I was planning to work out in my implementation, such as a slightly nicer interface to handle cookies and stuff |
12:45:48 | euantor | The implementation I started (but that is far from complete) is here: https://github.com/euantorano/http |
12:46:33 | * | vendethiel quit (Ping timeout: 276 seconds) |
12:47:56 | dom96 | euantor: nice, but it would be awesome if you tried to fix httpclient instead :) |
12:48:07 | * | vendethiel joined #nim |
12:48:34 | euantor | I will try fixing it, but I may end up bringing some of the stuff I've written for my package across if it turns out to work well |
12:49:44 | cheatfate | but its very easy to convert AsyncHttpClient to HttpClient... |
12:50:53 | cheatfate | but much more harder to convert synchronous httpclient to asynchronous httpclient |
12:52:04 | euantor | cheatfate: AsyncHttpClient will still be there, but in my opinion it's easier to understand if both methods have the same API |
12:52:27 | euantor | Right now you have request("url") or request(asyncClient, "url") |
12:52:55 | euantor | It's easier to understand if it's always client.request("url"), where client is either synchronous or asynchronous |
12:53:03 | euantor | Take a look at the IRC package for instance |
12:55:29 | branduardi | dom96: that's it: https://github.com/nim-lang/Nim/blob/devel/lib/pure/httpclient.nim#L196 <- apparently my server doesn't send Connection: close |
12:56:31 | dom96 | branduardi: what headers does it send? |
12:56:56 | branduardi | curl http://f1c4d963.ngrok.io/test/test -v |
12:57:03 | branduardi | and from nim, if I echo headers: |
12:57:23 | branduardi | date=>Thu, 16 Jun 2016 12:56:10 GMT |
12:57:26 | branduardi | x-frame-options=>SAMEORIGIN |
12:57:29 | branduardi | content-type=>text/html; charset=utf-8 |
12:57:31 | branduardi | server=>WSGIServer/0.2 CPython/3.4.2 |
12:57:33 | branduardi | that's all |
12:58:04 | branduardi | it's Django's manage.py runserver |
12:58:12 | dom96 | ahh, HTTP/1.0. Interesting. |
12:58:18 | dom96 | curl says "* HTTP 1.0, assume close after body" |
12:59:06 | * | BitPuffin joined #nim |
12:59:41 | cheatfate | euantor, i'm just trying to say, that making httpclient from scratch to be synchronous is a big mistake |
12:59:48 | branduardi | oh, right, didn't catch that... 1.0 vs 1.1 |
13:00:28 | dom96 | so we just need to pass the HTTP version into parseBody and add 'or httpVersion == "1.0"' in there. |
13:00:47 | branduardi | I'll try that :) |
13:02:20 | euantor | cheatfate: That isn't the plan at all :) The parsing and creating of requests/responses will be synchronous as there's little point trying to do that asynchronously |
13:02:49 | euantor | The actual client side of it is arguably the easiest part |
13:03:22 | cheatfate | euantor, while you making sync, you can ask to recv as many bytes as you want and recv will return appropriate number of bytes |
13:03:50 | cheatfate | but in async way you can obtain less bytes then you requested |
13:04:01 | cheatfate | so it can cause problems to parser |
13:04:30 | cheatfate | because request can be received not full at some moment |
13:06:12 | * | bjz joined #nim |
13:07:39 | dom96 | I don't think that's true. |
13:08:31 | dom96 | What if the socket disconnects before you receive all the bytes? |
13:08:58 | dom96 | Calling recv(1000) doesn't guarantee that you will get 1000 characters. |
13:09:06 | * | akaisora joined #nim |
13:11:49 | euantor | Doesn't recv() return how many bytes were returned? |
13:12:00 | euantor | I come from a C# background, and that's what we do there |
13:12:15 | euantor | Pass in a byte array with a maximum size, and recv() tells us the actual number received |
13:12:40 | euantor | Though in Nim, sockets seem to always return strings, which I can't say I'm a big fan of ;) |
13:13:01 | dom96 | well no, in Nim recv() returns an in too |
13:13:03 | dom96 | *int |
13:13:19 | euantor | Yep, I've just looked at the docs |
13:13:23 | euantor | That's what I would expect |
13:13:25 | dom96 | precisely because you might not always receive what you ask |
13:13:37 | dom96 | and it doesn't matter if it's sync or not |
13:13:41 | euantor | Yes, which is what I was saying :) |
13:13:49 | euantor | And receiving 0 bytes means the socket is closed |
13:15:17 | * | akaisora quit (Read error: Connection reset by peer) |
13:16:02 | * | brson joined #nim |
13:18:11 | cheatfate | euantor, just try to be modern :) make code async |
13:18:33 | euantor | Oh yeah, I prefer async wherever I can too :) |
13:20:17 | cheatfate | euantor, and why you making sync httpclient then? |
13:20:55 | cheatfate | as for me converting stdlib's async httpclient to be synchronous is just `waitFor httpclient.request()` |
13:21:56 | euantor | Because the current way means we have two very different APIs for doing similar things |
13:22:28 | euantor | If using `waitFor` is preferred (and agreed that it is preferred), the `request(url)` methods should be removed |
13:23:05 | euantor | Maybe I'm not explaining myself very well, it might be better if I make a topic on the forum tonight] |
13:23:24 | cheatfate | euantor, its better to make an issue on github |
13:23:48 | euantor | cheatfate: Fair enough, I'll do that |
13:25:07 | dom96 | I don't think you need to do that. |
13:25:44 | dom96 | What we need to do is obvious: introduce a HttpClient type, deprecate the current sync methods and implement them for the HttpClient type. |
13:26:38 | euantor | That's exactly what I'm suggesting, but obviously some of us aren't on the same page |
13:28:14 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
13:33:59 | * | freezerburnV joined #nim |
13:35:27 | * | endragor quit (Remote host closed the connection) |
13:37:25 | dom96 | euantor: Please just go ahead and make a PR which does that (if you have the time of course). There is no need to waste time creating discussions on Github IMO. |
13:37:51 | euantor | dom96: No problem, I should get some free time tonight or tomorrow night to do so :) |
13:37:59 | dom96 | Great :) |
13:39:29 | branduardi | dom96: thanks, now my code works! https://github.com/nim-lang/Nim/pull/4349 |
13:39:48 | kier | deavmi: pong |
13:40:31 | dom96 | branduardi: Awesome! Thank you for the PR :) |
13:41:15 | * | branduardi is now known as hendi |
13:41:27 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
13:43:35 | * | bjz joined #nim |
13:46:21 | * | brson quit (Ping timeout: 276 seconds) |
13:51:59 | * | akaisora joined #nim |
13:58:38 | * | chemist69 quit (Ping timeout: 258 seconds) |
13:58:47 | * | edubart joined #nim |
14:01:06 | * | chemist69 joined #nim |
14:01:32 | * | edubart_ joined #nim |
14:01:39 | * | edubart_ quit (Client Quit) |
14:01:44 | * | edubart quit (Client Quit) |
14:05:33 | * | benwbooth quit (Ping timeout: 240 seconds) |
14:07:45 | * | jjido joined #nim |
14:09:25 | cheatfate | dom96, just want to ask you what is not true? You need to check your code... if you request read for 200 bytes and only 17 bytes received your recv() call return you only 17 bytes... |
14:11:15 | * | freezerburnV quit (Ping timeout: 260 seconds) |
14:11:49 | * | brson joined #nim |
14:17:46 | * | SHARP joined #nim |
14:18:10 | * | SHARP is now known as Guest15679 |
14:18:53 | * | xet7 quit (Quit: Leaving) |
14:19:47 | deavmi | kier: ey :) |
14:20:04 | * | Guest15679 left #nim (#nim) |
14:20:21 | dom96 | cheatfate: Yes, and you said that this is only the case for async. |
14:20:26 | dom96 | That's not true. |
14:22:54 | cheatfate | dom96, of course there many cases you can get while programming in async, but this is just simpliest one, which can cause problems to parser/processing |
14:23:38 | * | edub4rt joined #nim |
14:26:20 | * | freezerburnV joined #nim |
14:28:42 | * | edub4rt left #nim (#nim) |
14:28:47 | * | endragor joined #nim |
14:28:49 | * | edub4rt joined #nim |
14:29:06 | kier | deavmi: hey. cheers for pointing out yung bae, some good stuff there :) |
14:33:16 | euantor | cheatfate: which is why you buffer what you receive, and look for start characters and terminators |
14:36:28 | * | Sembei joined #nim |
14:38:52 | * | vendethiel quit (Ping timeout: 264 seconds) |
14:38:58 | kier | it looks like we might have accidentally muted webchat users, probably as a result of the fiasco of the last few days |
14:39:38 | euantor | Yep, I was one of the affected users, Dom told me what was wrong. Maybe best to add it to the banner next time? |
14:39:39 | * | Pisuke quit (Ping timeout: 276 seconds) |
14:40:03 | * | dom96 quit (Changing host) |
14:40:03 | * | dom96 joined #nim |
14:41:17 | * | vendethiel joined #nim |
14:41:27 | dom96 | yep, it's hard to say which ones are genuine unfortunately. |
14:42:38 | dom96 | let's try that |
14:43:01 | * | nsf joined #nim |
14:43:16 | edub4rt | hello, I am new to nim, and I was wondering if there is a easy way to write an array of bytes |
14:43:28 | edub4rt | for example atm I am using "let x= [0xaa'u8,0xbb'u8,0xcc'u8,0xdd'u8]" |
14:44:04 | edub4rt | but would be nicer if I could do something like a "bytes literal", like let x = b"aabbccdd" |
14:45:13 | Araq_ | you can use a string literal, strings are just arrays of bytes |
14:46:12 | Araq_ | also only the first array element needs the 'u8 annotation |
14:47:17 | edub4rt | with strings literal I would have to do let x = "\xaa\xbb\xcc\xdd" typing \x every byte does not look pretty, I was just wondering |
14:47:26 | edub4rt | hmm good no know |
14:48:18 | * | Demon_Fox joined #nim |
14:50:57 | kier | if you install the 'hex' package from nimble, you can do: let x = hex.decode("aabbccdd") |
14:52:43 | edub4rt | that looks better, and if I use: const x = hex.decode("aabbccdd"), will it decode at compile time? |
14:53:04 | kier | yep |
14:55:38 | deavmi | kier: yeah man. Makes really nice stuff. |
14:55:49 | deavmi | hex.decode() |
14:55:57 | deavmi | Returns decimal number from hex? |
14:56:02 | deavmi | nice |
14:56:03 | * | brson quit (Ping timeout: 240 seconds) |
15:05:31 | * | vendethiel quit (Ping timeout: 252 seconds) |
15:16:24 | * | deavmi_mobile joined #nim |
15:17:32 | * | pregressive joined #nim |
15:17:58 | deavmi | What is an enum? |
15:18:08 | deavmi | Like in general in terms of computer programming? |
15:18:11 | deavmi | or enumeration |
15:23:06 | * | vendethiel joined #nim |
15:24:07 | euantor | https://en.wikipedia.org/wiki/Enumeration |
15:25:28 | edub4rt | I am going to write an application in nim that uses asynchronous UDP for both server/client, for that I need recvFrom and sendTo in asynchronous manner, but I've noticed that asyncnet is missing those methods |
15:26:09 | * | endragor quit (Ping timeout: 250 seconds) |
15:26:25 | euantor | edub4rt: THere's an open PR on GitHub, with a working implementation for Linux, but no WIndows support |
15:26:40 | euantor | https://github.com/nim-lang/Nim/pull/4341 |
15:27:08 | euantor | Actually, that PR does support WIndows (nice work cheatfate!) |
15:27:17 | euantor | An earlier patch did not support Windows |
15:27:29 | edub4rt | I've seen that, is it my only option? I am guessing it will be merged soon then? |
15:28:29 | Araq_ | you can count on that, cheatfate's work is superb. |
15:28:33 | euantor | It is for now, yes |
15:30:15 | edub4rt | ok good, for the moment I will merge myself and use it then |
15:31:08 | * | Satyajit quit (Quit: https://fnordserver.eu) |
15:36:35 | deavmi | .join #nim-offtopic |
15:36:41 | deavmi | sorry. |
15:38:44 | * | benwbooth joined #nim |
15:41:53 | * | PMunch quit (Quit: leaving) |
15:44:59 | * | vendethiel quit (Ping timeout: 250 seconds) |
15:47:35 | deavmi | kier: yung bae - bae (full album on youtube) |
15:50:58 | cheatfate | deavmi, could you pleas talk about youtube, music and albums in #nim-offtopic |
15:51:34 | deavmi | cheatfate: sorry yes will do |
15:56:21 | * | deavmi_mobile quit (Quit: Cheers all. Be good and don't do drugs.) |
15:56:42 | * | deavmi_mobile joined #nim |
15:56:50 | * | deavmi_mobile quit (Client Quit) |
15:57:12 | * | deavmi_mobile joined #nim |
16:05:08 | * | chemist69 quit (Ping timeout: 258 seconds) |
16:08:17 | * | euantor quit (Quit: Leaving) |
16:09:27 | * | chemist69 joined #nim |
16:11:20 | * | chemist69 quit (Client Quit) |
16:12:35 | * | chemist69 joined #nim |
16:24:23 | * | vktec is now known as all |
16:24:27 | * | all is now known as vktec |
16:25:09 | edub4rt | how do I test if a bit is set in nim? I can think of "if (a & b) == b" but is there a function or shortcut for this? in C is just "if(a & b)" |
16:25:37 | * | philo joined #nim |
16:27:50 | cheatfate | edub4rt, if (value and bitvalue) == bitvalue |
16:28:59 | cheatfate | and you can always make template for yourself template isSomething(a, b): bool = ((a and b) == b) |
16:29:00 | * | philo quit (Client Quit) |
16:29:13 | * | nsf quit (Quit: WeeChat 1.4) |
16:29:31 | cheatfate | and you can use it like if a.isSomething(b): |
16:30:26 | * | philo joined #nim |
16:31:40 | * | yglukhov quit (Ping timeout: 264 seconds) |
16:32:36 | * | philo quit (Client Quit) |
16:33:23 | * | mahasamoot joined #nim |
16:33:57 | * | mahasamoot quit (Client Quit) |
16:35:21 | edub4rt | cheatfate: thanks with the template is nicer |
16:38:53 | * | euantor joined #nim |
16:42:16 | edub4rt | just curiosity, which IDE/editor you guys generally use to code in Nim? any with nim plugins that enhances productivity? |
16:43:54 | euantor | I use Atom with the Nim plugin personally |
16:44:19 | * | zacts quit (Quit: WeeChat 1.4) |
16:45:40 | kier | Sublime Text with the Nim plugin, though I don't use any of the plugin's features besides syntax highlighting |
16:46:37 | EastByte | vim with syntax highlighting for nim |
16:47:38 | kier | been meaning to try out Aporia sometime |
16:50:22 | deavmi | kier: Aporia is nice |
16:50:30 | deavmi | It's better than a "full-IDE" |
16:50:54 | deavmi | It is a nice text editor with ability to run code - that to me is the best |
16:51:10 | deavmi | Very simple to use and works very well. Nice error list as well. |
16:51:30 | kier | ah, sounds neat |
16:51:40 | deavmi | kier: I use nano and `nim c [file]` |
16:51:50 | deavmi | For me that works well. |
16:52:28 | deavmi | kier: 'tis very neat. Simple, easy and fast. |
16:53:00 | kier | very minimal :) |
16:53:06 | kier | does nano have find+replace? |
16:53:13 | deavmi | kier: I think so |
16:53:36 | deavmi | kier: It is so sexy. There is a very nice theme that provides a black background and beautiful syntax highlighting |
16:53:59 | deavmi | kier: It's pretty much a full text editor with themes, compiler intergration (running and error lists as well as compilation log) |
16:54:11 | kier | wow, much more powerful than I thought |
16:54:14 | * | Satyajit joined #nim |
16:55:04 | deavmi | kier: Is very good. Infact great. If I was a GUI person I'd use it. But because I love the terminal for efficiency I stick with nano and nim. Because vim is too hard to use and I don't need that in my life. |
16:58:04 | * | euantor quit (Remote host closed the connection) |
16:59:25 | renesac_ | https://gist.github.com/ReneSac/a955b899200ec4d84cf9732a45b39d6b <- is this behaviour from "is" expected? |
17:01:28 | * | Europa joined #nim |
17:02:38 | Europa | Hello. I have only one question, can I integrate Nim's logo to my project's logo (which wriiten in Nim)? |
17:06:23 | Europa | ....MIT doesn't warn us about trademark(s). |
17:06:50 | lazypenguin1 | The logo might be licensed differently than the source code |
17:07:24 | Europa | Yes, you are right. |
17:07:26 | renesac_ | I don't think nim has registered any trademarks, but it is better to wait for an official answer |
17:07:51 | Europa | Okay, renesac. |
17:07:55 | * | vendethiel joined #nim |
17:12:16 | Europa | renesac: how long it will take? |
17:12:23 | * | yglukhov joined #nim |
17:12:38 | * | jjido quit (Ping timeout: 272 seconds) |
17:14:06 | federico3 | Europa: http://forum.nim-lang.org/t/2316 |
17:15:42 | Europa | federico3: Thanks, but I didn't ask for Nim's logo, I asked if I can use the logo as a part of my project logo. |
17:15:53 | Europa | ? |
17:16:03 | * | chemist69 quit (Ping timeout: 258 seconds) |
17:16:14 | federico3 | I know, I was just sending you to the discussion where you can also ask if it's ok to use it |
17:16:54 | Europa | Yes, but I need a quick answer. |
17:17:01 | federico3 | Araq_? |
17:17:20 | Europa | excuse me, but who is Araq_? |
17:17:24 | federico3 | Europa: if you link to your project it might help |
17:17:50 | Europa | It's not online yet. |
17:18:07 | Europa | But it's planned to be open source. |
17:20:02 | Europa | federico3: So, what should I do? |
17:20:06 | renesac_ | no hurry the |
17:20:10 | renesac_ | wait |
17:20:34 | * | euantor joined #nim |
17:21:26 | Europa | Alright, renesac. NP (No Problem) |
17:21:44 | federico3 | Europa: https://github.com/nim-lang/Nim/issues/3462 you might ask here about trademark |
17:24:01 | * | akaisora quit (Read error: Connection reset by peer) |
17:25:09 | Europa | fed: Thanks again, but I need the answer ASAP (As Soon As Possible). |
17:25:18 | * | akaisora__ joined #nim |
17:25:31 | Europa | I mean, I need the answer now. |
17:25:53 | Araq_ | Europa: https://github.com/nim-lang/assets/blob/master/Art/README.md |
17:26:45 | * | nsf joined #nim |
17:27:11 | Araq_ | which is er ... unclear to me. |
17:27:20 | Europa | Araq: So the answer is negative? |
17:28:00 | Araq_ | nah, but show me what the result looks like please |
17:28:16 | Europa | Result of what?! |
17:28:21 | Araq_ | "ntegrate Nim's logo to my project's logo" |
17:28:51 | Europa | You mean your license term?! |
17:29:12 | Europa | the link that you just uploaded to me? |
17:29:38 | Araq_ | I mean our license terms are not nearly clear enough and I'm not a lawyer |
17:30:13 | Europa | Araq: Yes, writing license is harder that writing program IMO (In My Opinion) |
17:30:27 | * | akaisora__ is now known as sorakun |
17:30:32 | Araq_ | however, this is acceptable: "Derivative works of Nim and support services for those derivative works are available under my own trademarks at my website." |
17:30:50 | Araq_ | which seems to apply to your use case |
17:31:29 | Europa | Araq: okay, but why there is another logo which defined as simplified and modern , https://github.com/nim-lang/assets/blob/master/Experimental/logo-simplified.svg |
17:32:10 | Europa | I want to set a logo for my project which represents that the project is uses Nim technologies. |
17:32:36 | Araq_ | that's not your original question though. |
17:32:57 | Araq_ | "powered by Nim (logo here)" is perfectly fine |
17:33:14 | * | chemist69 joined #nim |
17:33:30 | Araq_ | your question was about taking the logo and adding something to the art/picture, at least that's how I understood you. |
17:33:35 | euantor | It looks like the forum doesn't properly escape the '\' character, correct? |
17:34:01 | Araq_ | which seems to be fine too, so yeah, go ahead |
17:34:08 | euantor | There also doesn't seem to be any built in procs in the db_mysql module to do proper escaping of input (or to do parameterised queries) |
17:34:46 | Araq_ | euantor: "foo(?, ?)", x, y is properly escaped for you |
17:34:50 | euantor | Both of which might be nice future enhancements |
17:35:02 | euantor | Araq_ not quite ;) |
17:35:12 | Araq_ | why not? |
17:35:35 | euantor | `conn.exec("INSERT INTO test(val) VALUES (?);", "C:\\Users\\Euan") |
17:35:48 | Europa | Araq: My project's logo is planned to be an octopus animation, but we want the octopus wear Nim's king crown logo, so that will means that our project is power by Nim technology. |
17:35:48 | euantor | Results in `val` being "C:UsersEuan" |
17:36:02 | euantor | Or it does on my machine, using the current version of Nim and mariaDB 10 |
17:36:09 | euantor | I also noticed it on the forum |
17:36:29 | Araq_ | the forum does what RST suggests \ should do, I think |
17:36:36 | edub4rt | quick question, I need to convert a bitset of enums (4 enums) to uint8 and vice versa, can I use cast[uint8](myset) for that? it worked but I'm not confident enough |
17:36:38 | Araq_ | and has nothing to do with the mysql bug |
17:37:02 | Araq_ | edub4rt: you should really use Nim's sets rather than bitmasking on your own |
17:37:22 | * | Matthias247 joined #nim |
17:37:30 | Araq_ | euantor: the mysql escaping seems to be a severe bug |
17:37:38 | edub4rt | i am using them, but i need to convert them to uint8 for IO |
17:37:38 | euantor | Ah, RST does use '\' as an escape character |
17:37:56 | euantor | https://github.com/nim-lang/Nim/blob/master/lib/impure/db_mysql.nim#L118 |
17:38:03 | euantor | dbQuote only seems to handle "'" |
17:38:07 | Araq_ | edub4rt: casting is fine then and is what Nim uses internally too :P |
17:38:30 | edub4rt | good :) |
17:38:45 | euantor | I guess the easiest solution would be to just add another branch to that check to replace \ with \\ |
17:39:25 | Araq_ | euantor: yup, please do it. |
17:39:37 | Araq_ | and fyi \ is not part of the SQL standard |
17:40:55 | Europa | Thanks, I got the answer, keep it up Mr. Araq. Let's shake our hands on it and forget everything from the past. |
17:41:55 | euantor | If I remember correctly, it's used as an escape character by MySQL too |
17:42:25 | euantor | http://dev.mysql.com/doc/refman/5.7/en/string-literals.html |
17:42:30 | euantor | See Table 10.1 |
17:43:21 | euantor | When using a parameterised query, I don't believe it applies |
17:48:18 | * | benwbooth quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:48:39 | * | benwbooth joined #nim |
17:49:36 | * | Europa quit (Quit: Page closed) |
17:52:16 | Araq_ | "Forget everything from the past"?! |
17:53:29 | Araq_ | does that mean it was our troll again? ffs |
17:55:20 | Araq_ | euantor: I think we need to pass NO_BACKSLASH_ESCAPES to mysql instead |
17:55:50 | kier | eh, at least he's behaving today |
17:55:59 | euantor | Possibly, I've not used the standard C library |
17:57:54 | euantor | Araq_ you mean http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_no_backslash_escapes |
17:58:20 | euantor | That would work, but means running an extra query? |
18:01:00 | * | tankfeeder joined #nim |
18:07:53 | Araq_ | euantor: not sure |
18:12:29 | * | abbat quit (Remote host closed the connection) |
18:22:55 | * | mostworst joined #nim |
18:25:46 | * | mahasamoot joined #nim |
18:26:40 | * | pregressive quit (Remote host closed the connection) |
18:27:12 | * | pregressive joined #nim |
18:27:25 | mahasamoot | hello? |
18:27:52 | vktec | Hello |
18:28:21 | * | pregressive quit (Read error: Connection reset by peer) |
18:28:56 | * | pregressive joined #nim |
18:29:35 | tankfeeder | http://nim-by-example.github.io/types/objects/ |
18:29:36 | * | pregressive quit (Read error: Connection reset by peer) |
18:29:38 | tankfeeder | question |
18:29:38 | mahasamoot | I've been learning Programming on HackerRank, and have completed the Python domain. Unfortunately, HackerRank does not have Nim support. |
18:29:55 | tankfeeder | is * in Animal is part of name? |
18:30:00 | mahasamoot | Is there a similar site that supports Nim? |
18:30:11 | tankfeeder | if not, where is description of * in tutorial ? |
18:30:11 | def- | tankfeeder: * says that Animal is exported from the module |
18:30:22 | tankfeeder | ok then |
18:30:38 | def- | tankfeeder: "Exporting symbols": http://nim-by-example.github.io/procs/ |
18:31:06 | tankfeeder | aha, thanks |
18:31:31 | def- | mahasamoot: well, my solution was to implement half of Rosetta Code in Nim :P |
18:33:05 | def- | mahasamoot: I see Nim listed on HackerRank btw: https://www.hackerrank.com/environment |
18:33:09 | mahasamoot | I see, Rosetta has the same pass / fail testing for your code? |
18:33:24 | def- | mahasamoot: nope |
18:34:23 | def- | mahasamoot: you could ask them to update Nim to 0.14.2 though |
18:34:50 | mahasamoot | Yes.. but Nim isn't in the drop downs |
18:35:26 | mahasamoot | do they need someone to make each challenge Nimable? |
18:36:19 | def- | mahasamoot: no idea, you could ask them on #hackerrank |
18:39:09 | deavmi | mahasamoot: The Nim documentation is pretty good - also I am working on this - https://deavmi.carteronline.net/nim/ |
18:39:52 | mahasamoot | I've also been studying Machine Learning. There was talk on the forum of writing a nim ml lib. This seems like a good learning project for me. However, I wonder if there's really a compelling reason for a native nim lib. Wouldn't TensorFlow or some other C/C++ lib work just fine from Nim? |
18:41:54 | mahasamoot | deavmi: Thanks! |
18:42:08 | deavmi | mahasamoot: Pleasure. Nimian |
18:42:13 | deavmi | Nimian's unite |
18:42:20 | * | pregressive joined #nim |
18:42:35 | * | pregressive quit (Remote host closed the connection) |
18:46:46 | mahasamoot | deavmi: I've got the compiler working (on an arm chromebook, btw). And I've got vim set up. Does the Aporia IDE get any love? Or do most nimians use vim or emacs? |
18:47:01 | deavmi | I use nano |
18:47:16 | deavmi | Aporia is nice. But you can use the terminal |
18:47:35 | deavmi | The nim compiler is verbose and will tell you what the errors are (it's really good at that) |
18:47:51 | def- | mahasamoot: sure, it's much easier to use a large library that is well tested and performs well already and write a wrapper for that |
18:48:25 | deavmi | mahasamoot: I recommend just using the terminal. |
18:48:59 | deavmi | mahasamoot: More efficient. Just `[place text editor here (#teamnano)] [source.nim]` and `nim c [source file]` |
18:49:34 | deavmi | mahasamoot: And of course `./[source]` to run it |
18:52:20 | lazypenguin1 | @def: I agree, I wish nimble could also build the C libraries to make distribution of wrappers that much easier |
18:52:31 | def- | lazypenguin1: well, there is {.compile.} |
18:52:44 | mahasamoot | def-: What's involved in wrighting a wrapper? Since Nim compiles into c, isn't like calling a native function? Is the major purpose of the wrapper to create a higher level interface? |
18:52:57 | def- | mahasamoot: http://forum.nim-lang.org/t/2319 |
18:53:23 | * | TheLemonMan joined #nim |
18:53:33 | def- | lazypenguin1: like this, but it's a bit hacky: https://github.com/flaviut/nre/blob/master/src/private/pcre.nim |
18:55:34 | Araq_ | mahasamoot: since Nim is a compiler it needs to know about the involved types beforehand even if it's just a "native call" |
18:55:51 | Araq_ | so you need to type and proc prototype declarations and stuff |
18:55:54 | mahasamoot | right |
18:56:07 | Araq_ | that's the minimum a wrapper needs to provide. |
18:56:19 | Araq_ | usually some higher level features are built on top of that for convenience |
18:56:37 | mahasamoot | I was just reading about predeclarations |
18:56:49 | lazypenguin1 | def: wow, that's great. Can you optionally compile a static lib as well? |
18:56:57 | renesac_ | and you usually strip some C clumsy namespacing on the proc names |
18:57:09 | renesac_ | and ajust for nim's partial style insensitiveness |
18:57:45 | Araq_ | renesac_: well everybody should use c2nim --nep1 :-) |
18:58:00 | lazypenguin1 | Araq_ is there a limits.h equivalent for nim? Documentation mentions high(int64) but doesn't work for uint |
18:58:00 | renesac_ | right |
18:58:33 | skrzyp | def-: hi |
18:58:44 | lazypenguin1 | nep1 undocumented? :) https://github.com/nim-lang/c2nim/blob/master/doc/c2nim.rst |
18:58:51 | * | mostworst quit (Ping timeout: 240 seconds) |
18:59:05 | skrzyp | def-: I've join here due to your writeup about nim platformer |
18:59:14 | skrzyp | but sadly I can't build it |
18:59:37 | Araq_ | lazypenguin1: low/high are available |
19:00:04 | skrzyp | ~/src/own/nim-bits/nim-platformer $ nimble build |
19:00:06 | skrzyp | Reading from config file at /home/skrzyp/.config/nimble/nimble.ini |
19:00:08 | skrzyp | FAILURE: Could not read package info file in /home/skrzyp/src/own/nim-bits/nim-platformer/platformer.nimble; |
19:00:10 | skrzyp | Reading as ini file failed with: |
19:00:12 | skrzyp | Invalid section: . |
19:00:14 | skrzyp | Evaluating as NimScript file failed with: |
19:00:16 | skrzyp | Cannot find nimscriptapi.nim. |
19:00:31 | Araq_ | high(uint) is high(uint64) for 64bit systems and x <= high(uint64) is always true so it's worthless |
19:01:07 | Araq_ | skrzyp: didn't we solve that issue this morning? |
19:01:12 | skrzyp | no |
19:01:22 | Araq_ | why not? |
19:01:43 | skrzyp | the "invalid section" failure was still unresolved |
19:01:51 | skrzyp | when I've also tried to install sdl2 manually |
19:02:27 | Araq_ | what does 'nim e install_nimble.nims' do for you? |
19:03:18 | lazypenguin1 | Araq_ high(int) works on 0.14.0 on amd64 but high(uint) returns invalid argument |
19:03:22 | skrzyp | Araq_: well, I used that method https://github.com/nim-lang/nimble#unix |
19:03:33 | skrzyp | but it was also sucessful |
19:03:51 | Araq_ | use my install_nimble script please |
19:04:12 | Araq_ | there is a fight going on between me and dom96 about how to install nimble |
19:04:49 | Araq_ | I think I'm winning, dom96 thinks he's winning, so collecting data is interesting :P |
19:05:02 | lazypenguin1 | what's wrong with current method of installation? |
19:05:10 | Araq_ | it's fragile. |
19:05:22 | Araq_ | mine is bullet proof. *cough* |
19:05:27 | cheatfate | i think i'm only one here who dont use nimble... |
19:05:28 | lazypenguin1 | what is proposed alternative? |
19:05:55 | Araq_ | lazypenguin1: either follow nimble's official instructions or use install_nimble.nims |
19:06:54 | renesac_ | https://gist.github.com/ReneSac/a955b899200ec4d84cf9732a45b39d6b <-- araq, two things |
19:07:08 | renesac_ | is something wrong in using setLen() there? |
19:07:18 | skrzyp | Araq_: okay, but it worked, but how can I acrually install nim outside Git directory? |
19:07:26 | skrzyp | as install.sh does? |
19:07:29 | renesac_ | and is that `is` behaviour correct? |
19:07:49 | renesac_ | I didn't expect the error in the penultimate line |
19:08:28 | Araq_ | renesac_: firstly, it's 'isnot' in Nim, secondly it happens that 'is not' should work as well |
19:08:46 | skrzyp | or, is using Nim build by koch in ./ (directory with git sources) supported, without using that install.sh script? |
19:09:04 | * | Demos joined #nim |
19:09:12 | Araq_ | skrzyp: we generally encourage you to never use install.sh |
19:09:21 | skrzyp | GUYS |
19:09:24 | skrzyp | WHAT THE HELL |
19:09:29 | skrzyp | UNIFY YOUR TOOLS PLEASE |
19:09:41 | Araq_ | just add Nim to your path or create a symlink to it in /usr/bin |
19:09:57 | skrzyp | one user says: use install.sh |
19:10:08 | lazypenguin1 | Was there a previously laternative way to install nimble? Current method of cloning, building and installing seems appropriate. Looks like install_nimble.nims does the same except doesn't install to $PATH location |
19:10:11 | skrzyp | another one: don't, just add to $PATH |
19:10:22 | skrzyp | someone else: symlinking does not work |
19:10:24 | skrzyp | WTF |
19:10:33 | fowl | Lol |
19:10:33 | cheatfate | stop CAPsing skryzip |
19:10:51 | cheatfate | sorry skrzyp |
19:10:52 | renesac_ | Araq_: oh, sorry, isnot works indeed. Should I file a bug or itis already covered somewhere? |
19:10:58 | Araq_ | well symlinks might be broken on BSD, there is a limit to what we can test |
19:11:14 | skrzyp | cheatfate: I'vr just stopped that 2 minutes ago |
19:11:55 | Araq_ | don't blame us there are 5 trillion different Unixes around that nevertheless have no advantages whatsoever to each other |
19:12:00 | skrzyp | but all of this is very confusing even for experienced users |
19:12:13 | skrzyp | and not everything about that is a platform dependant |
19:12:40 | * | akaisora__ joined #nim |
19:13:15 | skrzyp | I haven't said that I want run Nim on SCO Unix or Tru64 or some other kind of dead commercial Unix OS, but on a regular, actively developed and popular system. |
19:13:24 | cheatfate | skrzyp, as i know open/net/freebsds is not officially supported, |
19:13:59 | skrzyp | But as I said before, that install_nimble.nims vs. nim -r src/nimble -y install clash isn't a "problem with OpenBSD" |
19:14:16 | * | sorakun quit (Ping timeout: 264 seconds) |
19:14:22 | * | euantor quit (Remote host closed the connection) |
19:14:29 | * | Joey__ joined #nim |
19:14:52 | Araq_ | that clash means both methods are officially meant to work |
19:15:02 | Araq_ | and both have been tested extensively |
19:15:06 | Araq_ | albeit on Linux. |
19:15:28 | renesac_ | and the answer for my question about .setLen() is that yes, my algorithm is wrong there, I just need to make a good test to crash it now |
19:15:53 | Araq_ | it's our problem that we don't agree on a single set of instructions for now. |
19:16:02 | Araq_ | but it shouldn't be yours. |
19:16:52 | Araq_ | (well it's also been tested on OSX and Windows, for that matter) |
19:17:05 | skrzyp | I can't agree with that |
19:17:24 | skrzyp | but I'm too tired now to discuss that further |
19:18:16 | skrzyp | so just assume you're ultimately correct and I should grab my fresh copy of Ubuntu 16.04 from local free software repository to make myself happy and satisfied |
19:18:38 | Araq_ | you can also help us fix the bug on the BSDs |
19:18:51 | Araq_ | but don't shout about how we're all mad. |
19:19:25 | Araq_ | even though I surely lost my sanity long ago, trying to support all these crazy OSes out there ... |
19:20:18 | skrzyp | what are "crazy OSes" for you? |
19:21:15 | Araq_ | every OS developed before the year 2000. |
19:21:42 | skrzyp | so, every OS on the market. |
19:21:51 | Araq_ | yes, they are all crazy. |
19:22:06 | cheatfate | Araq_, i will start new OS with you :P |
19:22:25 | lazypenguin1 | the dream |
19:22:31 | skrzyp | (I'm couting only functional OSes with ability to be POSIX compatible) |
19:22:33 | skrzyp | no, wait a sec |
19:22:41 | skrzyp | MorphOS is from 2000 |
19:23:07 | * | PMunch joined #nim |
19:23:13 | skrzyp | and it's pretty well usable, i had a license key for PowerPC Mac Mini G4 and Amiga 1200 with PPC |
19:23:35 | cheatfate | skrzyp, hmm i dont think BSDs is fully posix compatible... |
19:23:41 | Araq_ | cool, does that mean we can port it to MorphOS? |
19:24:05 | skrzyp | you can, if someone from there will be interested |
19:24:13 | skrzyp | but they're actually alergic about FLOSS |
19:24:41 | skrzyp | (using "borrowed" OpenBSD libc and GCC stack just because) |
19:24:47 | cheatfate | skrzyp, just please take a watch on this https://gist.github.com/cheatfate/209336cf90fccfd5d6abd995e9a1844c |
19:25:11 | cheatfate | did you see any compatibility? |
19:25:58 | skrzyp | System endianness is a more individual thing per OS and per CPU |
19:26:09 | skrzyp | so it's bad example I think |
19:26:09 | cheatfate | but function names???? |
19:26:19 | cheatfate | skrzyp, ok please take a look here https://github.com/nim-lang/Nim/blob/devel/lib/posix/kqueue.nim |
19:26:28 | cheatfate | this is BSD staff |
19:26:35 | cheatfate | even not posix compatible |
19:26:58 | cheatfate | even constants are different from one OS to another |
19:27:19 | skrzyp | that's right |
19:27:40 | Araq_ | cheatfate: that's a Posix problem though, Posix thinks everything is in C anyway, no need to give the constants useful values |
19:27:44 | skrzyp | no one said that any of this OS are perfect and 100% compatible with anything else |
19:27:55 | Araq_ | as a result every spec in assembler is more useful than Posix. |
19:28:01 | skrzyp | (while the other ones are sometimes incompatible between their own releases too) |
19:28:42 | cheatfate | skrzyp, then don't blame 10 active developers, because you can't run nim on your os |
19:28:48 | skrzyp | but the point is that requires a lot less code to write for additional Unix variant than supporting win32 |
19:29:05 | Araq_ | ha ha ha ha. |
19:29:21 | Araq_ | win32 is actually a platform you can target. |
19:29:25 | skrzyp | I can, with minor problems which I'm continously trying to report and examine, but at least it runs |
19:29:26 | Araq_ | posix is nothing. |
19:29:49 | Araq_ | Nim is full of hacks supporting all the Unixes out there |
19:30:21 | cheatfate | skrzyp, windows dont have outdated man pages, as Unix |
19:30:33 | Araq_ | what's the sizeof(time_t)? |
19:30:58 | dom96 | As I said previously: |
19:30:59 | dom96 | skrzyp: foosball: strange that people still have this problem. Here is the code that attempts to find it https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/nimscriptsupport.nim#L175 |
19:31:02 | skrzyp | windows doesn't have any manpages, so they're not outdated, you've got a point :) |
19:31:14 | dom96 | You can clearly see how it tries to find nimscriptapi.nim |
19:31:21 | dom96 | so i'm curious what is going wrong there |
19:31:25 | Araq_ | and it goes downhill from there, structs may have some fields, but may have more |
19:31:45 | Araq_ | no sizes are specified, constant values have no value |
19:31:51 | Araq_ | alignments are unknown |
19:32:21 | cheatfate | dom96, do you remember some months ago we got one guy with openbsd which just put aliases on some system commands, because he dont used it, but nim installation script uses? |
19:32:51 | cheatfate | skrzyp, do you have aliases on your shell? |
19:33:25 | dom96 | cheatfate: yes, but I doubt this is the issue here |
19:33:29 | skrzyp | lots of them |
19:33:40 | dom96 | install.sh worked fine for skrzyp |
19:33:42 | cheatfate | skrzyp, could you please disable them all and try again? |
19:33:52 | skrzyp | but I've already fixed Nimble with install_nimble.nims |
19:34:26 | namnguyen | while we're here, can we make it so that nimble works similarly to virtualenv? |
19:34:38 | skrzyp | that was throwing an "SIGABRT not supported" error today's morning, but someone fixed that |
19:34:38 | dom96 | Ahh, so Araq's magical script fixed your problem? |
19:34:50 | dom96 | the "Can't find nimscriptapi.nim" problem? |
19:34:56 | skrzyp | yes |
19:35:03 | skrzyp | still can't figure why |
19:35:07 | skrzyp | the fucking magic happens |
19:35:09 | skrzyp | sometimes |
19:35:44 | dom96 | can you reproduce the error? |
19:35:51 | dom96 | I would really love to know why |
19:35:58 | * | benwbooth quit (Quit: Textual IRC Client: www.textualapp.com) |
19:36:04 | * | euantor joined #nim |
19:36:08 | dom96 | The likely problem is that you've moved the nimble binary to some strange location |
19:37:24 | skrzyp | dom96: yes. but I've added it to $PATH, not symlinked |
19:37:35 | skrzyp | and used nimbleDir in nimble.ini |
19:38:01 | dom96 | so you moved the binary and just expected it to work? :P |
19:38:16 | skrzyp | not the binary, but whole .nimble |
19:38:39 | dom96 | hrm |
19:38:49 | skrzyp | as someone else said here, you can move it safely when it's on your $PATH and relevant nimble.ini options are configured |
19:39:00 | dom96 | I said that |
19:39:13 | skrzyp | I think I should test some larger project with nimble and nim |
19:39:24 | skrzyp | to test if everything else works as intended |
19:39:28 | skrzyp | any suggestions? |
19:39:28 | dom96 | And yes, that should be the case. But to be fair I never tested it personally. |
19:39:35 | dom96 | Aporia perhaps |
19:39:45 | dom96 | nimble install aporia |
19:40:38 | skrzyp | anything else? |
19:41:03 | euantor | Depends on how big you want |
19:41:23 | euantor | There's this whole list: https://github.com/nim-lang/packages/blob/master/packages.json |
19:42:02 | skrzyp | Error: execution of an external compiler program 'gcc -c -w -pthread -O3 -fno-strict-aliasing -I/home/skrzyp/src/lang/nim/nim/lib -o /tmp/nimb |
19:42:04 | skrzyp | le_64088/githubcom_nimlangAporia/nimcache/stdlib_system.o /tmp/nimble_64088/githubcom_nimlangAporia/nimcache/stdlib_system.c' failed with exit code: 256 |
19:42:15 | skrzyp | I think I should figure out how to use egcc instead of gcc… |
19:42:31 | skrzyp | (it's the same thing, but 4.9 instead of backported 4.2.1) |
19:42:35 | dom96 | skrzyp: Is nimble installing packages to the nimble dir that you configured now? |
19:43:11 | dom96 | Only reason I can think of for the missing nimscriptapi error is if you moved the .nimble dir and didn't configure it correctly (placed the config in the wrong dir or something). |
19:43:55 | skrzyp | dom96: no, Araq_' s script had created both directories: <git sources>/bin/nimblepkgs/… and ~/.nimble and I haven't moved it yet, I'm going to try it in a moment |
19:44:37 | dom96 | skrzyp: Yes, but does running `nimble install sdl2` (for example) install sdl2 into `.nimble`? |
19:44:45 | dom96 | or does it install it into the directory that you configured? |
19:46:23 | dom96 | Unless I'm missing something then this is the only explanation for your error. |
19:46:28 | skrzyp | dom96: I'm doing it again from scratch now, so we'll see |
19:46:37 | skrzyp | is that 'r' before path needed? |
19:46:49 | dom96 | no, unless you're on windows. |
19:46:49 | skrzyp | nimbleDir = r"C:\Nimble\" - readme.md says |
19:47:03 | dom96 | or have \ in your path somehow on Unix |
19:47:13 | * | Europa joined #nim |
19:47:29 | dom96 | Nimble should also output something like "Using config file from ..." |
19:48:37 | skrzyp | yes, now everything in that matter works okay, I've just installed 'sdl2' and looks like it was being placed in correct directory |
19:48:49 | skrzyp | I'm wondering what was wrong previously |
19:49:16 | skrzyp | but I used a nimble from official "unix" install method instead of install_nimble.nims |
19:49:32 | skrzyp | maybe that was hardcoded or sth |
19:50:24 | skrzyp | anyway, aporia fails to build due to GCC error, maybe GCC 4.9 will help with that, but I should figure how to tell Nim to use /usr/local/bin/egcc as a C compiler |
19:50:52 | * | BitPuffin quit (Ping timeout: 264 seconds) |
19:51:10 | dom96 | I'm going to improve the "Cannot find nimscriptapi.nim" error so that it specifies the directories it attempted to find it in. |
19:51:19 | dom96 | Should help with fixing it. |
19:53:06 | * | mahasamoot_ joined #nim |
19:53:28 | skrzyp | The moment when OpenBSD will finally switch to LLVM toolchain might a very good time for such issues like that, while LLVM is a bit more consistent with their decisions than GCC team |
19:53:43 | * | mahasamoot quit (Ping timeout: 252 seconds) |
19:53:49 | skrzyp | (there are 3 actively developed GCC branchews -.-) |
19:54:58 | * | Europa left #nim (#nim) |
19:55:22 | Araq_ | skrzyp: MorphOS! I want it, can you port it? |
19:55:37 | dom96 | skrzyp: why is there 3 branches? |
20:00:00 | * | deavmi quit (Ping timeout: 250 seconds) |
20:02:20 | * | euantor quit (Remote host closed the connection) |
20:09:32 | * | akaisora__ quit (Read error: Connection reset by peer) |
20:23:33 | deavmi_mobile | Araq_: what is MorphOS? |
20:23:54 | Araq_ | something that eventually will morph into an OS |
20:23:55 | deavmi_mobile | oh I see |
20:24:00 | deavmi_mobile | lol |
20:26:44 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
20:31:44 | edub4rt | I am trying to use var parameter in async proc, but getting the error "Error: illegal capture", var parameters in async procs are not supported? is there a workaround? |
20:34:30 | * | cnu- quit (Ping timeout: 260 seconds) |
20:35:28 | Araq_ | edub4rt: workaround: use 'ptr' and be very careful |
20:36:32 | edub4rt | what you mean by "be vary careful"? what I cannot do? |
20:39:33 | edub4rt | the code I am planning to do it's going to use a lot of async routines, is there something that I need to know? some limitation? |
20:40:08 | Araq_ | well if you modify something on the stack via ptr, then it cannot really work |
20:40:22 | Araq_ | because the stacks are gone in async mode |
20:40:57 | Araq_ | (which is kind of the point of this whole "no threads, no blocking" business) |
20:48:43 | * | Demos quit (Ping timeout: 252 seconds) |
20:51:33 | * | cnu- joined #nim |
20:51:34 | * | cnu- quit (Excess Flood) |
20:52:06 | * | tankfeeder quit (Quit: Leaving) |
20:52:11 | * | cnu- joined #nim |
20:52:11 | * | cnu- quit (Excess Flood) |
20:52:40 | * | cnu- joined #nim |
20:52:41 | * | cnu- quit (Excess Flood) |
20:53:59 | * | euantor joined #nim |
20:54:06 | * | cnu- joined #nim |
20:54:07 | * | cnu- quit (Excess Flood) |
20:54:37 | * | cnu- joined #nim |
20:54:39 | * | cnu- quit (Excess Flood) |
20:55:00 | * | euantor_ joined #nim |
20:55:06 | * | cnu- joined #nim |
20:58:37 | * | euantor quit (Ping timeout: 252 seconds) |
20:59:58 | dom96 | Araq_: edub4rt: no, don't use `ptr`. Use `FutureVar[T]` |
21:01:23 | * | Demos joined #nim |
21:07:16 | * | mostworst joined #nim |
21:09:34 | edub4rt | dom96: thanks, that will work better |
21:10:31 | * | Sembei quit (Read error: Connection reset by peer) |
21:10:38 | edub4rt | the asyncdispatch operations are runned in the same thread of runForever() right? |
21:11:39 | * | Sembei joined #nim |
21:12:21 | Araq_ | for now. |
21:13:10 | edub4rt | dom96: maybe you can help me with this too, in the asyncnet chat server example (http://nim-lang.org/docs/asyncnet.html) the "var clients" is maked as {.threadvar.}, what is the point? aren't all operations done in the same thread? |
21:13:29 | Araq_ | for now. |
21:14:21 | edub4rt | what you mean Araq_? there are plans to to run the asyncdispatch in another thread (not the same as runForever()) ? |
21:14:59 | Araq_ | we're working on moving async tasks around between threads |
21:15:03 | dom96 | yeah |
21:15:14 | dom96 | you don't need the 'threadvar' but it might be needed in the future |
21:15:17 | dom96 | bbl |
21:20:40 | edub4rt | hmm I see why, the roadmap states that network io multiplexing is on the plan, good to know |
21:23:41 | * | Matthias247 quit (Read error: Connection reset by peer) |
21:24:00 | * | xet7 joined #nim |
21:32:58 | * | BitPuffin joined #nim |
21:34:37 | * | BitPuffin quit (Disconnected by services) |
21:34:40 | * | itPuffinB joined #nim |
21:35:01 | * | euantor_ quit () |
21:35:58 | * | itPuffinB is now known as BitPuffin |
21:36:44 | cheatfate | Araq_, i'm still in trouble :( |
21:37:17 | cheatfate | i still can't get seq[int <----- parameter] from varargs[typed] |
21:39:54 | * | Demon_Fox quit (Remote host closed the connection) |
21:51:12 | cheatfate | Araq_, nm i found it |
21:53:12 | * | mostworst quit (Ping timeout: 276 seconds) |
21:53:57 | * | elrood quit (Quit: Leaving) |
21:59:07 | * | Demos quit (Ping timeout: 252 seconds) |
22:05:43 | cheatfate | Araq_, is it possible to get NimNode row and col? |
22:06:03 | cheatfate | to generate nice error like nim |
22:06:07 | * | BitPuffin quit (Read error: Connection reset by peer) |
22:06:09 | Araq_ | dunno, perhaps |
22:08:19 | Araq_ | macros.lineinfo or something |
22:09:24 | * | PMunch quit (Quit: leaving) |
22:11:22 | cheatfate | nice :) |
22:30:16 | * | Jesin quit (Remote host closed the connection) |
22:38:36 | * | francisl joined #nim |
22:42:03 | * | Jesin joined #nim |
22:43:42 | * | francisl quit (Quit: francisl) |
22:44:00 | * | francisl joined #nim |
22:45:13 | * | francisl quit (Client Quit) |
22:45:30 | * | francisl joined #nim |
22:45:34 | namnguyen | speaking of crazy OSes, is Emacs among them? |
22:45:55 | * | francisl quit (Client Quit) |
22:46:16 | ldleworker | that wit |
22:46:49 | * | Demos joined #nim |
22:49:07 | Araq_ | Emacs? that programming system that uses sexprs rather than untyped, unsafe, archaic, primitive, pathetic streams of bytes? nope, that one is great. |
22:50:25 | Araq_ | took us 3 decades to copy that design, it's now called JSON, I believe |
22:50:51 | * | mahasamoot_ quit (Ping timeout: 240 seconds) |
22:51:23 | * | GangstaCat quit (Quit: Leaving) |
22:53:23 | Araq_ | meanwhile in Unix land, "commit messages should not be longer than 80 characters because my tool doesn't know how to word wrap and I cannot even imagine a non-broken tool" |
22:55:18 | * | Jesin quit (Quit: Leaving) |
22:55:43 | * | Jesin joined #nim |
22:55:58 | * | Trustable quit (Quit: Leaving) |
22:58:06 | * | Demos quit (Ping timeout: 250 seconds) |
23:06:27 | * | Demos joined #nim |
23:06:41 | edub4rt | quick question, does nim copy the string or use raw pointers in the following case: I have "proc f(data: string)", then I call this proc casting a slice of uint8 array casting to string, like "f(cast[string](myarray[0..8]))" |
23:08:04 | edub4rt | what I want to know will nim optimize to avoid duplication in this case? |
23:08:59 | renesac_ | I would guess that the slice copies the data and you cast over that copied data |
23:09:48 | edub4rt | the nim manual states: "Slices are optimized so that no copy is performed" |
23:10:01 | renesac_ | where? |
23:10:04 | * | deavmi_mobile quit (Read error: Connection reset by peer) |
23:10:04 | edub4rt | however say nothing about casting a slice to a string |
23:10:20 | edub4rt | http://nim-lang.org/docs/manual.html |
23:11:04 | renesac_ | following that: |
23:11:04 | renesac_ | This optimization is not yet performed for ordinary slices outside of a parallel section. |
23:11:18 | renesac_ | are you inside a parallel section? |
23:12:10 | edub4rt | I do not now what that really mean, but I think i'm not |
23:12:14 | * | mahasamoot joined #nim |
23:12:15 | edub4rt | know* |
23:13:10 | edub4rt | just read, I don't make use of the parallel keyword in my codes |
23:21:51 | * | yglukhov quit (Remote host closed the connection) |
23:26:53 | edub4rt | I've just compiled a simple test case of that in release, read the generated C code, and does look like its duplicating |
23:27:56 | edub4rt | cheatfate: this is ralated with the async UDP net that you are working, in your PR currently there are only sendTo methods that accepts string and none that accepts cstring |
23:28:26 | cheatfate | edub4rt, mostly you dont need this methods |
23:28:40 | cheatfate | edub4rt, and possible in release version they will be deleted |
23:28:45 | edub4rt | cheatfate: this in my case would lead to memory duplication when calling sendTo because my buffers are in array[uint8] while the methods accepts only string |
23:29:33 | cheatfate | edub4rt, you need to read caution about dns resolution, if you need speed use another one method with SockAddr |
23:29:33 | edub4rt | how so? I need async sendTo/recvFrom |
23:29:44 | cheatfate | there 2 sendTo procs |
23:30:00 | edub4rt | i am using the one with SockAddr |
23:30:29 | cheatfate | so why you are asking me about string one? |
23:31:17 | edub4rt | I am asking about a one with cstring, I didn't found one |
23:31:17 | cheatfate | sorry i misunderstood you |
23:33:33 | cheatfate | ok, i dont understand why you are using array[uint8] because you can easily use string? |
23:34:33 | cheatfate | even with 0 bytes inside |
23:34:40 | cheatfate | i mean \x00 |
23:34:56 | edub4rt | my stream class, which i made, uses array[1480,uint8], more than that I usually send only a slice of it |
23:35:06 | edub4rt | I am using your PR, currently working fine, just that I am having trouble with, I do not want memory duplicating as the app I am working on will deal with huge amounts of udp data |
23:36:33 | edub4rt | the net module have a send() with cstring and one with string |
23:36:53 | edub4rt | I suggest the same for sendTo async |
23:37:35 | edub4rt | and ofcouse the one with cstring have a size parameter |
23:37:49 | cheatfate | edub4rt, but why you can't use string with size 1480? |
23:38:37 | edub4rt | I can, but I will check if does duplicate when getting a slice of it |
23:40:40 | edub4rt | looking the C code, it does duplicate the memory |
23:43:10 | renesac_ | I have a module called memViews (not released) for shallow slices, but not really ready for use |
23:43:34 | edub4rt | cheatfate: so nothing will change if I work with string, will be still duplicating my buffer when calling sendTo with a slice of other string |
23:44:12 | renesac_ | theorically it could be made safe for some use cases, and theorically it could be used where an openarray is expected, but that would need compiler support I think |
23:44:17 | dom96 | You can easily convert a string to a cstring |
23:44:29 | dom96 | addr myString[0] |
23:45:26 | renesac_ | and I don't konw how to call the random proc |
23:45:29 | edub4rt | dom96: indeed, what I am saying is that there is not method for sendTo that accepts cstring and length, just the one that accepts string |
23:46:52 | renesac_ | and I think the random proc should not have an internal overflow error... right? |
23:47:22 | dom96 | edub4rt: hrm, I see. I think you're right. |
23:47:44 | cheatfate | dom96, he is right but we using strings everywhere |
23:49:35 | edub4rt | cheatfate: I changed my code to string instead of array[uint8], tons of GC code and overhead was added in my code, the binary size also increased, I guess working with array[uint8] is best for what I am doing, its very low level stuff, and I don't need GC messing with |
23:50:45 | dom96 | The net module defines a 'sentTo' proc which takes a 'pointer' |
23:51:05 | dom96 | *sendTo |
23:51:27 | dom96 | I think it's fair to provide the same proc in asyncdispatch |
23:51:33 | renesac_ | ``echo random[int](low(int) .. high(int))`` fails for me with: Error: expression 'random' has no type (or is ambiguous) |
23:51:39 | cheatfate | edub4rt, i will make this changes, but you will need to merge it again by yourself, because dom96 will never approve it to mainstream... |
23:52:08 | dom96 | cheatfate: what makes you think that? |
23:52:15 | edub4rt | cool, I will merge myself in my fork |
23:52:31 | cheatfate | edub4rt, is it ok if data will be pointer? |
23:53:16 | renesac_ | but ``echo random[T](low(T) .. high(T))```works |
23:53:26 | edub4rt | yes, a pointer to the data and the length of the data |
23:53:27 | renesac_ | oops |
23:53:49 | renesac_ | I mean, that compiles and gives an over or underflow |
23:54:15 | cheatfate | dom96, maybe because you hate me? |
23:55:00 | renesac_ | I will file a bug |
23:58:37 | dom96 | cheatfate: what? Why do you think I hate you? |