<< 02-10-2015 >>

00:00:06Araqthe status is: not gonna happen anytime soon.
00:00:16tmm1staticExec would require i call out to the compiler myself right? maybe another proc like that but with the copmiler boilerplate would be simpler for now
00:00:49Araqwell the question is how can we avoid calling out to the C compiler? we cannot.
00:01:00Araqwe need to ask it for its version number
00:01:10tmm1right definitely
00:01:40tmm1i just mean doing so manually with staticExec is a lot of work, staticExec("echo code > file.c; gcc -o file file.c....")
00:01:43AraqstaticExec is actually really sweet for this since it allows to pass a caching key
00:01:50*saml_ joined #nim
00:02:30Araqer ... you don't have to generate C code at all
00:02:43Araqjust staticExec("gcc -v")
00:10:57*bjz joined #nim
00:13:32*shodan45 joined #nim
00:15:45*rollo joined #nim
00:17:23*Kingsquee joined #nim
00:37:04*strcmp1 joined #nim
00:39:07tmm1that's true
00:40:11tmm1although that assumes gcc is the binary and not cc or mingw32-gcc etc
00:41:01tmm1where is staticExec defined, i see it says magic:"StaticExec" but i can't figure out where thats implemented
00:41:16*shodan45 quit (Quit: Konversation terminated!)
00:41:51Araqsearch for mStaticExec in the compiler if it says magic: "StaticExec"
00:42:23Araqit's built into the VM
00:47:30tmm1gotcha, found opGorge now
00:48:09*jaco60 quit (Remote host closed the connection)
00:48:34*jakesyl quit (Ping timeout: 246 seconds)
00:53:53tmm1i'm imagining a new compileTime proc like tryCompile(s: string): bool, it will use the underlying compiler and replace most common functions of autoconf/configure
00:54:24tmm1when tryCompile("#if GCC_MAJOR < 4\n#error to old gcc\n#endif"):
00:56:11Araqtmm1: this idea has come up a couple of times already
00:57:26*Sahnvour quit (Read error: Connection reset by peer)
00:57:36tmm1do you think it's a good idea?
00:58:58AraqI don't really like it.
00:59:57Araqbut I don't see much better solutions either
01:00:48tmm1maybe i'll try to implement it
01:01:02Araqdon't name it tryCompile please. name it probeC
01:01:12Araqand don't make it part of system.
01:01:40tmm1okay
01:01:45*jakesyl joined #nim
01:03:27Araqbtw you don't have to patch the compiler to implement probeC
01:03:36Araqstatic:
01:03:49Araq writeFile(...)
01:04:00Araq gorge("gcc c file.c")
01:04:23Araqyou only need to expose the C compiler's binary somehow
01:04:52Araqwell, that requires patching the compiler I guess
01:07:14Araqgood night
01:11:42*aw1231 quit (Ping timeout: 246 seconds)
01:12:33tmm1good point, it doesn't need to be an opcode
01:20:40*chemist69 joined #nim
01:21:48*FedeOmoto quit (Quit: Leaving)
01:23:48*chemist69_ quit (Ping timeout: 264 seconds)
01:31:34*pregressive joined #nim
01:42:51*CryptoToad joined #nim
02:01:45*rollo quit (Quit: Leaving)
02:21:38*X67r quit (Quit: leaving)
02:25:05*strcmp2 joined #nim
02:25:39*CryptoToad quit (Quit: Leaving)
02:27:06*strcmp1 quit (Ping timeout: 240 seconds)
02:38:21*pregressive quit (Read error: Connection reset by peer)
02:38:37*pregressive joined #nim
02:46:06*pregressive quit ()
02:51:59*jakesyl quit (Ping timeout: 240 seconds)
03:05:42*saml_ quit (Ping timeout: 265 seconds)
03:11:10*BitPuffin|osx quit (Ping timeout: 244 seconds)
03:19:56*darkf joined #nim
03:49:10*vendethiel joined #nim
04:01:06*silven quit (Ping timeout: 272 seconds)
04:32:13*silven joined #nim
04:34:19*strcmp2 quit (Ping timeout: 256 seconds)
04:38:48*Jesin quit (Quit: Leaving)
04:51:45*vendethiel quit (Ping timeout: 240 seconds)
05:32:42ryu0who
05:32:44ryu0err
05:58:29*bjz quit (Ping timeout: 252 seconds)
06:02:32*bjz joined #nim
06:45:06*bjz quit (Ping timeout: 260 seconds)
06:50:10*bjz joined #nim
07:23:33*Ven joined #nim
07:27:25*Trustable joined #nim
07:44:58*Varriount quit (Read error: Connection reset by peer)
07:49:01*OmIkRoNiXz joined #nim
08:07:01*coffeepot joined #nim
08:17:37*tmm1 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:01:41*enamex joined #nim
09:03:02*AvinashSnl joined #nim
09:05:26*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:05:29r-kuwhy is some kind of artificial order enforced in enums? it complicates wrapping c++ libs a lot.
09:07:26reactormonkr-ku, they don't have an order?
09:07:49r-kutype # This is the FILE * or void * the regular output should be written to.
09:07:49r-ku CURLoption* = enum
09:07:49r-ku CURLOPT_WRITEDATA = 10000 + 1, # The full URL to get/put
09:07:49r-ku CURLOPT_URL = 10000 + 2, # Port number to connect to,
09:08:09r-ku CURLOPT_PORT = 0 + 3, # Name of proxy to use.
09:08:14r-kulast one is a problem
09:09:53Araqr-ku: c2nim reorders the enum fields for you
09:10:17r-kuwell this is c2nim output
09:10:37Araqwell it cannot do the additions then -.-
09:10:55r-kuguess thats the problem..
09:10:59Araqalso we have a curl wrapper in nimble or the stdlib
09:11:13r-kuyeah, its old
09:11:38Araqso? you think they rewrote their API?
09:12:46r-kuprobably not, but still
09:13:07r-kuwould it not be better to have a solution that generates wrapper from new lib headers?
09:14:03*enamex quit (Ping timeout: 255 seconds)
09:14:19*jakesyl__ joined #nim
09:14:38Araqdepends
09:15:21Araqif the new curl just adds procs that nobody uses anyway, it's good that the "old" wrapper stays slim.
09:15:26*M-max1 joined #nim
09:15:57AraqI claim 70% of a typical wrapper is never used by anybody.
09:16:06r-kui dont think they add procs, more like constants used to control lib
09:16:27*PyHedgehog-work quit (Ping timeout: 246 seconds)
09:16:46*profan_ joined #nim
09:16:54*reactormonk_ joined #nim
09:16:55*rektide_ joined #nim
09:17:49*M-max quit (Ping timeout: 250 seconds)
09:17:57*rektide quit (Ping timeout: 250 seconds)
09:17:57*reactormonk quit (Ping timeout: 250 seconds)
09:17:57*jakesyl_ quit (Ping timeout: 250 seconds)
09:17:57*profan quit (Ping timeout: 250 seconds)
09:17:58*M-max1 quit (Changing host)
09:17:58*M-max1 joined #nim
09:18:20Araqwell I usually just add the new definitions I need and patch the wrapper
09:18:25*enamex joined #nim
09:18:52*Ven joined #nim
09:54:47*coffeepot quit (Ping timeout: 264 seconds)
10:20:59*AvinashSnl is now known as Avinash|away
10:24:19*Avinash|away quit (Quit: Leaving.)
10:29:33*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:34:59*enamex quit (Ping timeout: 244 seconds)
10:39:37*Ven joined #nim
10:41:34*elrood joined #nim
10:46:20*bjz quit (Quit: Textual IRC Client: www.textualapp.com)
10:46:58*bjz joined #nim
10:56:30*wuehlmaus joined #nim
10:59:56*razaaa joined #nim
11:00:44*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:06:56*enamex joined #nim
11:19:11*X67r joined #nim
11:21:50NimBotnim-lang/Nim devel 9f33baf Aman Gupta [+0 ±1 -0]: add afterRunEvent callback to execProcesses
11:21:50NimBotnim-lang/Nim devel ded5753 Aman Gupta [+0 ±1 -0]: remove "rerun with --parallelBuild:1" message and show error inline
11:21:50NimBotnim-lang/Nim devel b093c0a Aman Gupta [+0 ±1 -0]: show full compiler output with reNimcCrash
11:21:50NimBotnim-lang/Nim devel 08843c6 Aman Gupta [+0 ±1 -0]: remove echo() from compiler
11:21:50NimBot1 more commits.
11:22:31*razaaa quit (Ping timeout: 244 seconds)
11:22:45*AvinashSnl joined #nim
11:23:43flyxthat would be not much different from usual application software. @ 70% unused
11:38:06*reactormonk_ is now known as reactormonk
11:44:23*Kingsquee quit (Quit: http://i.imgur.com/EsXzoum.png)
11:46:26*Sahnvour joined #nim
12:08:37*drewsrem joined #nim
12:13:33*Ven joined #nim
12:14:42*AvinashSnl quit (Read error: Connection reset by peer)
12:15:17*AvinashSnl joined #nim
12:15:29*Demon_Fox quit (Quit: Leaving)
12:16:06*silven quit (Remote host closed the connection)
12:16:10*M-max1 quit (Ping timeout: 246 seconds)
12:16:43drewsremIs something planned to convert an AST (/NimNode) back to its text-representation? - Would this even be possible?
12:17:50*Pisuke joined #nim
12:18:21*silven joined #nim
12:19:16reactormonkdrewsrem, nim-pretty?
12:20:03drewsremreactormonk, what's that?
12:20:23*MyMind quit (Ping timeout: 244 seconds)
12:20:39reactormonkdrewsrem, compiler/nimfix/pretty.nim
12:21:56drewsremreactormonk, I don't think this converts an AST back to some text-representation?
12:22:16*M-max joined #nim
12:22:36flyxdrawsrem: tried repr(node)?
12:23:23drewsremflyx, that just builds a pretty-printed tree of the NimNodes?
12:23:23reactormonkdrewsrem, there's also render(node) IIRC
12:24:06flyxwell there *was* a possibility to get Nim-like code. I used it once
12:24:14drewsremMaybe I'm phrasing my question wrong, I'm talking about e.g. a function that takes a nimnode and outputs nim-code that when parsed produces the same AST
12:24:14flyxbut if it wasn't repr, I can't remember
12:24:37Araqdrewsrem: repr(n) does work
12:24:54drewsremOh, then excuse me
12:25:00flyxif it was repr, well, it has some issues
12:25:16flyxeg. it doesn't `` identifier names that need to
12:25:51*PyHedgehog-work joined #nim
12:26:02Araqpretty sure it does `` identifier names
12:26:35flyxI used it with some genSym'd names like ":whatever", they were just outputted as-is
12:26:44*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:27:04Araqwell `:whatever` is not valid either
12:27:09drewsremOn that note, is there something to let me see the "unfolded" version of a module where all the immediate-macros are expanded?
12:27:12Araqthat's the point of genSym.
12:27:23Araqto produce something that cannot be written down.
12:27:30Araqso that no conflict can happen.
12:27:32drewsrems/immediate-macros/immediate-templates
12:27:44flyxwell okay. then you just can't use genSym with repr
12:30:47*Ven joined #nim
12:36:00softinio@Araq @dom96 and everyone: I am thinking of putting together a talk for a python meetup on how to use nim and ffi to create python modules. Thought this would be a good indirect way of introducing python dev to nim. What do you think? A good topic ?
12:36:41Araqsoftinio: of course! will you also show nimborg?
12:38:20softinioNeed to look into nimborg. Sure! @Araq
12:41:52dom96softinio: Sounds brilliant!
12:43:37softinio@Araq @dom96 Great I will work on doing one then. May trouble you to have a look at what I prepare so it can be perfect. Thx. So glad to have discovered nim and be part of this community.
12:44:28dom96softinio: no problem, will love to take a look :)
12:44:33Araqsure, it's always a good idea to let us look at your slides :-)
13:10:00softinio@Araq @dom96 great! Thanks.
13:32:13*FedeOmoto joined #nim
13:51:00*jck quit (Remote host closed the connection)
13:57:31*jck joined #nim
14:01:26*razaaa joined #nim
14:04:35NimBotnim-lang/Nim devel 437603a Hans Raaf [+0 ±1 -0]: Added ReadIOEffect because thats what happens on OSX.
14:04:35NimBotnim-lang/Nim devel 27aaa39 Andreas Rumpf [+0 ±1 -0]: Merge pull request #3411 from oderwat/fix-osx-ospaths... 2 more lines
14:26:46*jaco60 joined #nim
14:29:35*AvinashSnl quit (Quit: Leaving.)
14:41:48*AvinashSnl joined #nim
14:44:52*Varriount|Busy joined #nim
14:59:25*darkf quit (Quit: Leaving)
15:03:06*smodo joined #nim
15:03:34Varriount|BusyHello smodo
15:18:34smodogr頷ohl ;)
15:18:45*AvinashSnl left #nim (#nim)
15:30:02*ray- quit (Changing host)
15:30:02*ray- joined #nim
15:30:04*ray- is now known as \u
15:35:04Varriount|Busy\u: Interesting nickname.
15:40:56*UberLambda joined #nim
16:04:48*nim-buildbot quit (Quit: buildmaster reconfigured: bot disconnecting)
16:14:40*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:37:20*Jesin joined #nim
16:37:59*rleblic quit (Ping timeout: 264 seconds)
16:44:56*rleblic joined #nim
17:02:45*brson joined #nim
17:03:53*UberLambda quit (Quit: GTG)
17:18:03*Varriount|Busy quit (Ping timeout: 246 seconds)
17:18:17*brson quit (Quit: leaving)
17:18:37*brson joined #nim
17:19:13*bjz quit (Quit: Textual IRC Client: www.textualapp.com)
17:29:42*r-ku is now known as bit
17:30:08*bit is now known as r-ku
17:42:09*tmm1 joined #nim
17:42:16tmm1morning
17:44:20tmm1araq could you merge https://github.com/nim-lang/c2nim/pull/54
17:45:32Araqdone.
17:45:51tmm1thanks
17:46:20*brson quit (Quit: Changing server)
17:47:12*brson joined #nim
17:48:27tmm1any comment on https://github.com/nim-lang/Nim/pull/3403#issuecomment-144825148
17:49:28Araqthere is msg: "Instantiation from here: file(line, col)" you can use instead of 'errormsg'
17:49:33Araqiirc
17:55:17tmm1but i want to verify the error message "type mismatch", not the instantiation message
17:59:07Araqyou want both.
17:59:28Araqyou can use both errormsg and msg. I hope. if not, well you know the tester ;-)
18:01:24tmm1yea it will require some patching
18:01:25tmm1of "errormsg": result.msg = e.value
18:05:22tmm1i'm still having a hard time figuring out how this works: when declared(gcc):
18:05:48tmm1where is gcc is declared? i only see "compiler gcc" as a local symbol in extccomp
18:06:06tmm1how is gcc undeclared when using clang for instance
18:07:00tmm1aha, setCC() will undefSymbol and defineSymbol
18:07:07tmm1ok the pieces are starting to fit together now
18:07:48*boopsiesisaway is now known as boopsies
18:13:48*Matthias247 joined #nim
18:16:43*bjz joined #nim
18:24:21*joelmo joined #nim
18:34:16*boopsies is now known as boopsiesisaway
18:35:28*boopsiesisaway is now known as boopsies
18:36:51*CryptoToad joined #nim
19:08:05*xificurC joined #nim
19:10:50*strcmp1 joined #nim
19:14:52*drewsrem quit (Quit: Leaving)
19:34:36*brson quit (Quit: leaving)
19:34:45*brson joined #nim
19:40:06*strcmp1 quit ()
20:22:26*jakesyl__ quit (Ping timeout: 240 seconds)
20:23:14*jakesyl_mac joined #nim
20:27:17*jakesyl_mac quit (Max SendQ exceeded)
20:27:50*jakesyl_mac joined #nim
20:31:34tmm1is there any way to fix these errors: https://travis-ci.org/nim-lang/Nim/builds/83372518#L2588-L2605
20:31:44tmm1assigning to 'NCSTRING' (aka 'char *') from incompatible type 'const char *'
20:42:49Araqtmm1: we currently fix these by importing gai_strerror differently when we compile to C++
20:42:53Araqlike so:
20:43:41Araq proc gai_strerror() {.importc: "(char*)gai_strerror", header: "<foo.h>".}
20:43:56Araqwhich is a hack of course
20:50:33tmm1i see, yea definitely a hack
20:51:01tmm1i tried to use type cstring_const {.importc:"const char *".} = distinct cstring
20:51:26tmm1but the generated code still using plain NCSTRING so it didn't help
20:54:06*FedeOmoto quit (Ping timeout: 250 seconds)
20:59:29AraqIMO c++'s 'const' makes it impossible to use as a portable assembler.
21:00:11*boopsies is now known as boopsiesisaway
21:00:30Araqnote that for GCC we pass -fpermissive to make it compile
21:00:50Araqbut clang doesn't interpret this flag the same way as GCC
21:06:07*FedeOmoto joined #nim
21:14:03*Mat4 joined #nim
21:14:05Mat4hello
21:16:51Araqhi Mat4
21:17:02Mat4hi Araq
21:22:39*smodo quit (Ping timeout: 240 seconds)
21:30:42*yglukhov joined #nim
21:39:56*Kingsquee joined #nim
21:43:06*Guest15556 joined #nim
21:48:35*enquora joined #nim
21:56:21*FedeOmoto quit (Quit: Leaving)
22:00:37*Trustable quit (Remote host closed the connection)
22:09:21*Guest15556 quit (Quit: Leaving)
22:10:39*saml quit (Quit: Leaving)
22:12:31*enquora quit (Quit: enquora)
22:19:36*yglukhov quit (Remote host closed the connection)
22:34:46*CryptoToad quit (Quit: Leaving)
22:42:02*tmm1 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:43:21*elrood quit (Quit: Leaving)
22:48:58*tmm1 joined #nim
22:55:06Mat4ciao
22:55:30*Mat4 quit (Quit: Leaving)
22:57:03*razaaa quit (Quit: Leaving)
23:28:03*Matthias247 quit (Read error: Connection reset by peer)
23:49:49*solidsnack joined #nim
23:50:30*solidsnack quit (Max SendQ exceeded)
23:56:38*Sahnvour quit (Read error: Connection reset by peer)