00:01:44 | def- | tstm: thanks, fixed |
00:03:27 | flaviu | #2266, #2245, #2242, #2157, #2212, #2044 could not possibly be issues with a spec. |
00:06:07 | Araq | indeed a more detailed spec wouldn't have prevented none of these bugs. |
00:06:26 | Araq | *would have prevented none |
00:06:33 | * | reem quit (Remote host closed the connection) |
00:07:40 | Araq | in fact the original "spec" didn't include generic converters at all. |
00:07:55 | Araq | then people requested the feature, it got implemented |
00:08:02 | Araq | https://github.com/Araq/Nim/issues/2044 resulted |
00:08:48 | Araq | and now the very same guy who wanted the feature blames me for having implemented it |
00:09:03 | EXetoC | what -.- |
00:09:41 | EXetoC | how silly :p |
00:09:48 | Araq | and tells me he recently discovered ML and that's the way to do language design. |
00:09:56 | flaviu | I haven't blamed you for implementing it. |
00:10:02 | flaviu | ML? |
00:10:55 | Araq | ML is the only language that meets your criteria of how to do it. ;-) |
00:11:09 | flaviu | Looks like #271 involves generic converters predates my having come across Nim anyway. |
00:12:25 | Araq | quite possible |
00:13:02 | * | TEttinger joined #nim |
00:17:20 | * | zipR4ND joined #nim |
00:17:35 | * | Matthias247 quit (Read error: Connection reset by peer) |
00:28:07 | * | reem joined #nim |
00:28:37 | * | zipR4ND quit (Ping timeout: 264 seconds) |
00:29:53 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
00:36:38 | * | fizzbooze quit (Quit: WeeChat 1.1.1) |
00:36:58 | * | fizzbooze joined #nim |
00:36:59 | * | davidhq joined #nim |
00:39:22 | tstm | def-: I don't get it. I tried your version, and it seems to be slower every time than mine. And there's no reasonable difference. Could you try it on your machine? |
00:39:45 | * | flaviu quit (Remote host closed the connection) |
00:39:47 | tstm | The version you cleaned up, compared to my non-cleaned-up version. |
00:40:05 | * | flaviu joined #nim |
00:41:51 | def- | tstm: my guess would be that the alignment changed because of your "of RootObj" |
00:42:13 | def- | on my machine they're the exact same speed |
00:42:44 | tstm | def-: Indeed that seems to have done the trick, the of RootObj. |
00:43:24 | tstm | Interesting. |
00:43:56 | * | brson quit (Quit: leaving) |
00:46:00 | def- | I guess you have a pretty modern CPU? |
00:48:22 | * | fizzbooze quit (Ping timeout: 240 seconds) |
00:48:47 | adu_ | hi all |
00:51:29 | def- | hi adu_ |
00:51:41 | tstm | def-: A reasonably modern one, yes. i7-3820QM |
00:51:52 | tstm | Horrible model names. |
00:53:36 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
00:54:08 | adu_ | so I have a cursory interest in Nim |
00:54:44 | adu_ | I've just devoted about 1 year to Go and 1 year go Rust, should I devote another year of my life to learning Nim? |
00:56:19 | tstm | adu_: I'm sure you've learned to pick up languages more quickly by now. =) |
00:57:22 | tstm | adu_: I've never written Nim in my life, and today I ported an nbody benchmark to Nim, and it's faster than a highly optimized C version on a mac. |
00:57:22 | adu_ | tstm, for my it's not about "picking up", it's more about developing an intuition for what works, and what doesn't |
00:57:40 | adu_ | tstm, that's pretty impressive |
00:57:49 | * | Trustable quit (Remote host closed the connection) |
00:58:10 | adu_ | s/my/me/ |
00:58:25 | tstm | I was pretty impressed as well. Seems that at least in some cases nim can be quite performant. |
00:58:46 | adu_ | I've heard Julia is also quite performant |
00:59:07 | TEttinger | for scientific code, yah |
00:59:29 | TEttinger | I don't think Julia can actually release binaries of your application yet |
00:59:31 | adu_ | linalg-heavy code? |
00:59:35 | TEttinger | yep |
01:00:17 | TEttinger | Julia is meant to be used in an interpreter, and it actually is an interpreted language, that mostly makes calls to heavily optimized linalg libs |
01:00:37 | TEttinger | well, JIT-compiled interpreted language |
01:01:29 | adu_ | I'm starting to think that VMs are a leaky abstraction |
01:01:59 | * | saml_ joined #nim |
01:02:12 | adu_ | like blas? |
01:03:04 | adu_ | so what am I interested you ask? |
01:03:06 | adu_ | hmm |
01:03:44 | adu_ | math, http, ssl, crypto, hashes, and distributed files systems |
01:03:54 | TEttinger | yeah, it defaults to BLAS but can be compiled with the Intel equivalent to BLAS that's often faster and much more expensive |
01:04:23 | * | darkf joined #nim |
01:04:32 | adu_ | IPP? |
01:04:44 | TEttinger | I don't recall the name |
01:04:55 | adu_ | IPP = Intel equivalent to BLAS |
01:05:09 | TEttinger | yeah that then :) |
01:05:13 | adu_ | Intel Performance Primitives |
01:05:17 | TEttinger | yep |
01:05:48 | adu_ | it's got Image, Crypto, FFT, DFT, DWT, DSP, and a bunch of other stuff in one lib |
01:05:53 | TEttinger | I think Nim could use some work on a few HTTP things, but the rest of that seems like a solid use for the language |
01:06:29 | adu_ | I'm trying to find a language to replace what I do at work |
01:07:03 | adu_ | which is web scraping |
01:07:03 | TEttinger | (the only real Nim performance weakness that's been mentioned in the channel was related to an async http function) |
01:07:10 | * | reem quit (Remote host closed the connection) |
01:07:22 | adu_ | I don't actually care about sync/async |
01:07:24 | TEttinger | and that could probably be fixed in an upcoming version |
01:07:32 | adu_ | because to me, that's a server issue |
01:07:58 | adu_ | granted, async clients are desirable for web scraping on the large scale |
01:08:13 | adu_ | but not for on the order of 5 websites |
01:09:05 | adu_ | HTTP is really complicated |
01:09:05 | tstm | For smaller scraping I use ruby. It's expressive. Dog-slow at runtime, but fun to write and it has decent libraries for html parsing and such. |
01:10:05 | TEttinger | I do barely any scraping, but the only thing I use for that is Clojure, since the scraping is done for a clojure IRC bot |
01:11:52 | adu_ | lots of edge cases are really hard to handle, even with really nice APIs, like HTML meta tag http-equiv refresh links (which should be handled as auto-redirects in most cases), combination of content-encoding: gzip and transfer-encoding: chunked, and ensuring that timeouts are respected by openssl (when the server decides to crap out between hello and crypto negotiation) |
01:12:28 | * | reem joined #nim |
01:12:31 | adu_ | reem! |
01:12:52 | reem | adu_: Ya I lurk here |
01:13:08 | reem | interesting languages are interesting |
01:13:18 | adu_ | reem, you and your language-promiscuity |
01:14:13 | reem | :P |
01:14:45 | EXetoC | flaviu: getAst is just yet another part of the macro interface used in the OOP macro document, which uses other parts of that interface, and why not demonstrate as much as possible, regardless of whether or not the intent is to demonstrate a language feature. it just needs to be structured well |
01:15:26 | EXetoC | there's a lot of nim code on rosetta code though which is nice |
01:17:14 | * | jholland quit (Quit: Connection closed for inactivity) |
01:21:48 | * | davidhq joined #nim |
01:24:09 | * | reem quit (Remote host closed the connection) |
01:26:05 | * | banister joined #nim |
01:26:14 | * | banister is now known as banisterfiend |
01:26:31 | flaviu | EXetoC: Ah, sorry for the delay responding. I didn't see your reply to the PR. |
01:26:45 | * | reem joined #nim |
01:33:21 | * | davidhq quit (Read error: Connection reset by peer) |
01:33:52 | * | davidhq joined #nim |
01:39:36 | * | reem quit (Remote host closed the connection) |
01:40:38 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
01:42:50 | * | reem joined #nim |
01:47:26 | EXetoC | flaviu: "result[0][0][0][2][0][2] = recList" nice :p |
01:47:45 | TEttinger | whaaaat |
01:48:10 | flaviu | EXetoC: I know, it's beautiful :') |
01:48:53 | flaviu | But before you make too much fun of me, look at the 20-line comment above it |
01:48:57 | EXetoC | can't the accesses be made more symbolic? |
01:49:35 | flaviu | Nim doesn't have pattern matching. |
01:50:04 | * | fizzbooze joined #nim |
01:50:25 | fowl | normally quote: is better than doing that but you cant do quote: type X = object `reclist` |
01:50:27 | EXetoC | no but the interface has symbolic equivalents of the array indexing. does it not apply to this case? |
01:51:35 | EXetoC | foo.bar rather than foo[i] |
01:52:22 | fowl | no |
01:52:32 | flaviu | EXetoC: Even if it does, see the comment above. |
01:52:46 | fowl | because what that line is digging into is a type section / type def / object type |
01:53:03 | flaviu | I'd rather not mix named fields and subscripting. |
01:55:17 | * | reem quit (Remote host closed the connection) |
01:55:33 | * | davidhq joined #nim |
01:57:10 | * | davidhq quit (Client Quit) |
01:58:31 | * | reem joined #nim |
02:09:40 | * | davidhq joined #nim |
02:28:14 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
02:35:22 | * | davidhq joined #nim |
02:41:32 | adu_ | whaaaaaaaaat |
02:42:56 | shalabh | ? |
02:43:40 | adu_ | shalabh, sorry |
02:44:14 | adu_ | it was a ref to TEttinger |
02:45:23 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
02:54:21 | * | reem quit (Remote host closed the connection) |
02:55:00 | * | reem joined #nim |
03:08:05 | * | mnemonikk quit (Ping timeout: 276 seconds) |
03:08:31 | * | mnemonikk joined #nim |
03:12:38 | * | adu_ quit (Ping timeout: 265 seconds) |
03:22:40 | * | Demon_Fox joined #nim |
03:49:00 | * | a5i quit (Quit: Connection closed for inactivity) |
03:58:43 | * | reem quit (Remote host closed the connection) |
04:05:08 | * | reem joined #nim |
04:21:54 | * | fizzbooze quit (Ping timeout: 245 seconds) |
04:26:38 | * | saml_ quit (Quit: Leaving) |
04:31:05 | * | vendethiel quit (Ping timeout: 252 seconds) |
04:40:37 | * | vendethiel joined #nim |
04:51:54 | * | Demon_Fox quit (Ping timeout: 245 seconds) |
04:52:19 | * | Demon_Fox joined #nim |
04:55:13 | * | reem quit (Remote host closed the connection) |
05:03:30 | * | vendethiel quit (Ping timeout: 256 seconds) |
05:15:05 | * | bcinman quit (Ping timeout: 252 seconds) |
05:15:34 | * | johnsoft quit (Ping timeout: 255 seconds) |
05:15:54 | * | johnsoft joined #nim |
05:16:09 | * | bcinman joined #nim |
05:17:37 | * | reem joined #nim |
05:21:48 | * | vendethiel joined #nim |
05:38:44 | * | elbow_jason joined #nim |
05:38:58 | * | elbow_jason quit (Client Quit) |
05:57:07 | * | girvo quit (Ping timeout: 244 seconds) |
06:43:38 | * | kashyap_ joined #nim |
06:45:18 | * | Demon_Fox quit (Quit: Leaving) |
06:53:17 | * | girvo joined #nim |
06:57:53 | * | girvo quit (Ping timeout: 250 seconds) |
06:59:03 | * | xificurC joined #nim |
07:21:21 | * | wb quit (Ping timeout: 256 seconds) |
07:23:29 | * | girvo joined #nim |
07:27:52 | * | girvo quit (Ping timeout: 240 seconds) |
07:34:25 | * | elbow_jason joined #nim |
07:41:21 | * | banisterfiend quit (Quit: Textual IRC Client: www.textualapp.com) |
07:41:52 | * | banister joined #nim |
07:42:12 | * | reem quit (Remote host closed the connection) |
07:43:33 | * | gsingh93 quit (Ping timeout: 244 seconds) |
07:52:21 | * | darkf quit (Read error: Connection reset by peer) |
07:52:45 | * | darkf joined #nim |
07:58:47 | * | elbow_jason quit (Quit: Leaving) |
08:11:20 | * | wb joined #nim |
08:19:37 | * | Senketsu quit (Ping timeout: 255 seconds) |
08:26:31 | * | allan0 quit (Quit: WeeChat 1.1.1) |
08:32:31 | * | dewdrop quit (Quit: No Ping reply in 180 seconds.) |
08:47:25 | * | dewdrop joined #nim |
08:52:51 | * | irrequietus joined #nim |
08:58:07 | * | kashyap_ quit (Ping timeout: 246 seconds) |
08:58:48 | * | BlaXpirit joined #nim |
08:58:49 | * | reem joined #nim |
09:03:29 | * | reem quit (Remote host closed the connection) |
09:05:48 | * | reem joined #nim |
09:05:49 | * | Trustable joined #nim |
09:08:00 | * | reem quit (Remote host closed the connection) |
09:12:14 | * | girvo joined #nim |
09:16:29 | * | girvo quit (Ping timeout: 245 seconds) |
09:23:24 | * | reem joined #nim |
09:26:35 | * | reem quit (Remote host closed the connection) |
09:28:04 | * | reem joined #nim |
09:30:02 | * | reem quit (Remote host closed the connection) |
09:31:07 | * | BlaXpirit quit (Read error: Connection reset by peer) |
09:31:45 | * | BlaXpirit joined #nim |
09:33:19 | * | reem joined #nim |
09:37:49 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:47:44 | * | reem quit (Remote host closed the connection) |
09:52:14 | * | reem joined #nim |
10:02:42 | * | reem quit (Remote host closed the connection) |
10:05:35 | * | Aszarsha joined #nim |
10:05:41 | * | bcinman quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
10:08:49 | * | reem joined #nim |
10:11:26 | * | reem quit (Remote host closed the connection) |
10:13:48 | * | reem joined #nim |
10:23:22 | * | vendethiel quit (Ping timeout: 240 seconds) |
10:23:29 | * | reem quit (Remote host closed the connection) |
10:28:39 | * | a5i joined #nim |
10:30:09 | * | Senketsu joined #nim |
10:30:13 | * | vendethiel joined #nim |
10:49:07 | * | banister joined #nim |
10:57:21 | * | a5i quit () |
10:59:42 | * | gimireh joined #nim |
11:01:00 | * | girvo joined #nim |
11:05:40 | * | girvo quit (Ping timeout: 255 seconds) |
11:08:31 | * | shmickname-la-la joined #nim |
11:09:17 | * | shmickname-la-la left #nim (#nim) |
11:19:50 | * | tmku quit (Ping timeout: 265 seconds) |
11:26:09 | * | tmku joined #nim |
11:30:22 | Araq | def-: for me the spawn server example still compiles |
11:31:29 | Araq | onionhammer: I think the program filwit posted is the same bug as the GC leaks you experience |
11:31:55 | Araq | onionhammer: it only leaks with --gc:refc (the default), right? |
11:34:15 | def- | Araq: then I guess it's Linux specific |
11:36:23 | def- | Araq: oh no, it's my fault |
11:36:36 | def- | I called the file "spawn.nim"... |
11:42:23 | * | anonybro joined #nim |
11:46:49 | anonybro | Hello! Is anyone here? |
11:50:03 | federico3 | hi anonybro |
11:58:23 | anonybro | Hi, federico3! I recently stumbled upon Nim lang and was pretty impressed. One of the claims were that Nim has short GC pause. In presentation infoq Araq mentions numbers like 1-2ms if I recall correctly, but then I remembered about this benchmark https://www.techempower.com/benchmarks/#section=data-r9. |
11:58:23 | * | flaviu quit (Remote host closed the connection) |
11:58:29 | anonybro | Average latency times was an order of magnitude bigger than ones for Java. So I am wondering now if those claim about GC are true or maybe there is another reason for Nim to show much smaller throughput and latency times in this particular benchmark. |
11:58:58 | anonybro | *and bigger latency |
12:06:19 | def- | anonybro: That should be inefficiencies in jester and the async libraries |
12:06:46 | def- | I'm trying to speed up the asynchttpserver: https://github.com/def-/nim-http-speedup |
12:10:19 | def- | from my experiments I'd say it should be possible to beat cpoll_cppsp if you write your server carefully (and from scratch probably) |
12:11:58 | anonybro | Yeah, I thought that much of the performance loss due to the fact that jester seem to not use any polling mechanism like netty does, if I understood netty and jester right. |
12:12:01 | wb | The great part about Nim's GC is that if it causes problems, you have a lot of options. It can be tweaked, time-limited, paused, delayed, and turned off. |
12:13:37 | * | gimireh quit (Ping timeout: 255 seconds) |
12:15:28 | Araq | anonybro: that benchmark doesn't use the realtime GC iirc |
12:16:17 | Araq | and the GC is not the only thing that can cause huge latencies |
12:18:32 | EXetoC | does the time spent on freeing memory not average out over time? can't it be disabled? |
12:25:57 | Araq | EXetoC: "freeing memory" is already only some O(1) linked list insertion most of the time |
12:26:27 | Araq | it's harder to do better unless you go for a generational GC where can can dealloc a whole region in O(1) |
12:26:36 | Araq | *where you can |
12:44:53 | * | mwbrown joined #nim |
12:45:28 | EXetoC | ok |
12:49:48 | * | girvo joined #nim |
12:54:04 | * | girvo quit (Ping timeout: 244 seconds) |
12:59:30 | * | jfchevrette joined #nim |
13:05:49 | * | Aszarsha quit (Ping timeout: 264 seconds) |
13:09:00 | * | arnetheduck joined #nim |
13:10:44 | arnetheduck | hi, I notice that there's a ropes module in the compiler and another one in the lib part - how come? thanks btw for all answers - I hope I can contribute something back soon |
13:10:46 | * | BlaXpirit quit (Remote host closed the connection) |
13:12:44 | * | BlaXpirit joined #nim |
13:13:34 | arnetheduck | I mean, the one in lib looks more modern and convenient to use (operators etc), so is there a reason for keeping another version in the compiler? |
13:14:04 | EXetoC | lack of time to deal with it perhaps |
13:16:18 | arnetheduck | well, it could also be something like avoiding to use the std lib in the compiler to keep them sort of separate, ie avoid dep cycles or something |
13:17:45 | * | anonybro left #nim (#nim) |
13:24:03 | * | reem joined #nim |
13:28:41 | * | reem quit (Ping timeout: 244 seconds) |
13:28:41 | * | davidhq joined #nim |
13:28:56 | * | banister is now known as banisterfiend |
13:34:52 | * | chemist69 joined #nim |
13:35:58 | * | mwbrown quit (Ping timeout: 255 seconds) |
13:38:27 | * | a5i joined #nim |
13:40:58 | Araq | arnetheduck: when I wrote the compiler there was no stdlib ;-) |
13:41:13 | * | jfchevre_ joined #nim |
13:41:18 | Araq | and now the compiler's ropes module has a few features that the stdlib lacks |
13:43:48 | arnetheduck | ah, yeah, that's kind of what it looked like, but I thought I'd ask to make sure ;) would you be interested in patches to make the two more similar? ie making the compiler one more lib-like in naming and ops, to ease a future migration? |
13:43:48 | * | jfchevrette quit (Ping timeout: 252 seconds) |
13:46:45 | Araq | as long as the diffs are not too overwhelming to review, it's fine with me |
13:48:01 | Araq | but eventually the codegen will be rewritten |
13:51:01 | arnetheduck | oh, I'm trying to understand a little more how the compiler & language works, so writing a patch or two usually helps in picking it up ;) |
13:52:24 | arnetheduck | I'll go slow anyway, nothing drastic.. I'm guessing that if there's a ropes.nim in compiler and another in lib, the one in lib gets completely ignored, per some path precedence? |
13:52:28 | EXetoC | I wish I had been notified of the gdb support when I tried to make sense of some compiler problem :p |
13:59:46 | Araq | EXetoC: why? I almost never use gdb to debug the compiler |
14:05:37 | EXetoC | so possibly just lack of logical though then? that could be it :p |
14:05:57 | * | pregressive joined #nim |
14:07:10 | EXetoC | it is difficult to figure out which paths are taken. it was just impossible to keep track |
14:09:29 | Araq | maybe but how does gdb help with that? |
14:11:03 | EXetoC | with the help of stepping, but I might have approached things the wrong way |
14:14:21 | EXetoC | variable introspection too. I tried to print something, but I didn't know what condition to check for first, so I ended up with too much output |
14:16:27 | EXetoC | the bug might have been more complex than I thought though. A lot of steps were involved in generating code for "echo integer-known-at-compile-time" |
14:18:43 | EXetoC | but I don't think I'll give it another go since there's so much userland code I'd like to write |
14:38:35 | * | girvo joined #nim |
14:42:51 | * | girvo quit (Ping timeout: 250 seconds) |
14:54:24 | * | jholland joined #nim |
15:02:41 | * | TEttinger quit (Ping timeout: 264 seconds) |
15:04:31 | * | gokr quit (Quit: Leaving.) |
15:21:00 | * | Demos joined #nim |
15:21:59 | * | darkf quit (Quit: Leaving) |
15:25:12 | * | pregressive quit (Remote host closed the connection) |
15:33:22 | * | pregressive joined #nim |
15:39:22 | * | girvo joined #nim |
15:43:42 | * | girvo quit (Ping timeout: 252 seconds) |
16:00:23 | * | Demos quit (Read error: Connection reset by peer) |
16:04:05 | * | gokr joined #nim |
16:39:05 | BlaXpirit | ok today I'm determined to do something about math.random |
16:39:37 | BlaXpirit | if it's not gonna be removed, gotta try to fix it |
16:39:46 | BlaXpirit | for this i will definitely need RAND_MAX |
16:40:05 | BlaXpirit | it doesn't seem to be exposed currently |
16:44:43 | BlaXpirit | also, how about renaming the branch "master" to "stable"? |
16:45:02 | BlaXpirit | i'm sure it will help avoid many mistakes |
16:45:41 | * | kjo1 joined #nim |
16:45:49 | EXetoC | so nothing is getting deprecated? |
16:47:23 | BlaXpirit | i dunno |
16:47:30 | BlaXpirit | i can only wish |
17:02:24 | * | gsingh93 joined #nim |
17:07:53 | * | brson joined #nim |
17:08:34 | BlaXpirit | emit doesnt work :| |
17:08:44 | BlaXpirit | still no idea how to get rand_max |
17:09:27 | fowl | importc it |
17:09:29 | def- | BlaXpirit: what's the problem? can't import it? |
17:09:54 | BlaXpirit | quote from math.nim: "importcing macros is extremely problematic" |
17:11:08 | * | banisterfiend quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:11:50 | * | bcinman joined #nim |
17:11:57 | * | banister joined #nim |
17:12:02 | * | banister quit (Max SendQ exceeded) |
17:12:28 | fowl | var RAND_MAX* {.importc,header:..}: cuint |
17:12:35 | BlaXpirit | var RAND_MAX {.importc: "RAND_MAX", header: "<stdlib.h>".}: int |
17:12:38 | BlaXpirit | yeah, just got it |
17:12:40 | BlaXpirit | but it's var! |
17:15:38 | fowl | you can |
17:15:53 | fowl | var rm{.stuff.}; let RAND_MAX* = rm |
17:16:25 | BlaXpirit | let is better, but not much |
17:18:39 | fowl | blame obama for letting RAND_MAX be a macro |
17:19:44 | EXetoC | omg inline such performance |
17:19:46 | * | MagusOTB quit (Ping timeout: 252 seconds) |
17:22:20 | kjo1 | Hi folks, are there any resources for integrating nim (w/ javascript backend) and javascript libraries? |
17:25:03 | fowl | kjo1, dom.nim is a wrapper for the DOM, it just uses importc |
17:26:05 | BlaXpirit | a good idea to look at it |
17:26:18 | fowl | looks like member methods are wrapped as fields |
17:28:00 | kjo1 | @fowl thanks I'll take a look |
17:28:08 | * | girvo joined #nim |
17:28:16 | * | fizzbooze joined #nim |
17:32:26 | * | girvo quit (Ping timeout: 246 seconds) |
17:33:52 | * | CryptoToad joined #nim |
17:34:06 | CryptoToad | o/ |
17:35:17 | CryptoToad | hey all, sorry to ask such a simple question but documentation is sparse and google seldom works, is there any way to set my program as a windows app or something so it doesn't show the console window? I'm trying to develop a program that lets you have virtual clipboards, but it looks ugly when there's a console window you can't get rid of. |
17:35:41 | dom96 | CryptoToad: --app:gui |
17:35:49 | CryptoToad | Oh, thanks dom :) |
17:35:54 | CryptoToad | figured it was something silly |
17:38:44 | CryptoToad | This is such a great language though, I'm really excited to learn it better. |
17:39:36 | dom96 | That's good to hear :) |
17:39:39 | dom96 | bbl |
17:40:43 | * | Jesin quit (Quit: Leaving) |
17:41:41 | EXetoC | is there a FAQ section where it can be answered in? |
17:42:12 | EXetoC | yep |
17:44:01 | * | Jesin joined #nim |
17:45:02 | * | Matthias247 joined #nim |
17:45:51 | CryptoToad | I get a compile error with --app:gui, do i need an import to use it? Dies at linking with "Error: execution of an external program failed" |
17:48:31 | def- | CryptoToad: --parallelBuild:1 should show you what's failing at least |
17:51:58 | CryptoToad | no dice, compiling now with verbosity set to 3 |
17:53:25 | def- | Maybe --app:gui only works with Microsoft Visual C (I don't have Windows to test) |
17:53:36 | CryptoToad | oh that's possible |
17:53:39 | CryptoToad | I'm using Aporia |
17:55:51 | CryptoToad | could i just pass -mwindows to gcc instead? |
17:57:45 | CryptoToad | worked |
17:59:48 | EXetoC | ok I'll add that too. just gonna look for the FAQ document |
18:00:04 | CryptoToad | I may have spoke too soon, it compiled but i still get a window :( |
18:00:29 | EXetoC | did you include both switches? |
18:00:35 | EXetoC | if it even works |
18:01:02 | CryptoToad | nope it fails with both |
18:05:03 | * | jfchevrette joined #nim |
18:06:22 | * | Stefan____ joined #nim |
18:08:09 | * | jfchevre_ quit (Ping timeout: 245 seconds) |
18:10:14 | Stefan____ | Nimsuggest install seems to be still impossible on Linux with latest Nim devel, see http://ssalewski.de/tmp/nimsuggestinstall.txt. Also tried manually install, but also failed. Not a big problem, but sad :-( |
18:11:33 | Stefan____ | Nimble install itself worked without problems. |
18:14:20 | * | gokr quit (Quit: Leaving.) |
18:14:32 | Stefan____ | nimble c2nim install worked fine also -- but it asked to overwrite just installed compiler. I typed y, and all worked fine. |
18:15:26 | * | fizzbooze quit (Ping timeout: 244 seconds) |
18:17:33 | * | Stefan____ quit () |
18:21:17 | * | epichero joined #nim |
18:35:58 | Araq | CryptoToad: --app:gui does work with mingw |
18:36:23 | Araq | but you need to type it in before your mainmodule.nim |
18:36:33 | Araq | nim c --app:gui mainmodule.nim |
18:39:39 | CryptoToad | I am :\ |
18:39:44 | CryptoToad | sec ill send exact args |
18:40:30 | CryptoToad | $findExe(nimrod) c --app:gui --d:release --opt:size --parallelBuild:1 --gc:none --deadCodeElim:on --checks:off $# |
18:41:19 | def- | --deadCodeElim:on and --checks:off are useless in this case btw, they should be implied by -d:release |
18:41:44 | CryptoToad | ahh, i guess i only need gc none then |
18:41:46 | CryptoToad | ok |
18:42:36 | CryptoToad | now using $findExe(nimrod) c --d:release --opt:size --parallelBuild:1 --gc:none --app:gui $# |
18:42:39 | CryptoToad | same error |
18:42:44 | CryptoToad | but without app:gui it works fine |
18:43:27 | Araq | well what's the error message? |
18:43:37 | fowl | BlaXpirit, proc RAND_MAX():int {.importcpp:"RAND_MAX@".} works but only in cpp mode |
18:43:47 | BlaXpirit | fowl, well that's definitely not an option\ |
18:44:00 | CryptoToad | Error: execution of an external program failed |
18:44:01 | CryptoToad | > Process terminated with exit code 1 |
18:44:07 | CryptoToad | it's a gcc error |
18:44:16 | Araq | CryptoToad: run it from command line please |
18:44:45 | fowl | BlaXpirit, it makes sense to use let the way i described earlier, the rm variable wont even exist the let will just capture RAND_MAX from c |
18:45:07 | CryptoToad | that's the output log in aporia, isn't it essentially the same thing? |
18:45:10 | BlaXpirit | fowl, good point, i was wondering if that might be the case |
18:45:25 | CryptoToad | i set verbosity to 3 |
18:45:30 | CryptoToad | so ill get you the exact gcc args |
18:45:32 | CryptoToad | that did it |
18:46:24 | CryptoToad | gcc.exe -mwindows -o c:\users\owner\documents\nim\downloader\downloader.exe c:\users\owner\documents\nim\downloader\nimcache\stdlib_sets.o c:\users\owner\documents\nim\downloader\nimcache\stdlib_macros.o c:\users\owner\documents\nim\downloader\nimcache\stdlib_math.o c:\userC:/Nim/dist/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgdi32 |
18:46:25 | CryptoToad | C:/Nim/dist/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.9.1/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lcomdlg32 |
18:46:25 | CryptoToad | s\owner\documents\nim\downloader\nimcache\stdlib_tables.o c:\users\owner\documents\nim\downloader\nimcache\stdlib_endians.o c:\users\owner\documents\nim\downloader\nimcache\stdlib_oids.o c:\users\owner\documents\nim\downloader\nimcache\stdlib_asyncdispatch.o c:\users\owner\documents\nim\downloader\nimcache\stdlib_asyncnet.o c:\users\owner\documents\nim\downloader\nimcache\stdlib_base64.o c:\users\owner\documents\nim\downloader\nimcache\stdlib_uri.o |
18:46:28 | CryptoToad | c:\users\owner\documents\nim\downloader\nimcache\stdlib_unsigned.o c:\users\owner\documents\nim\downloader\nimcache\stdlib_rawsockets.o c:\users\owner\documents\nim\downloader\nimcache\stdlib_net.o c:\users\owner\documents\nim\downloader\nimcache\stdlib_httpclient.o c:\users\owner\documents\nim\downloader\nimcache\stdlib_cpuinfo.o c:\users\owner\documents\nim\downloader\nimcache\stdlib_streams.o c:\users\owner\documents\nim\downloader\nimcache\stdlib_hashes.o |
18:46:33 | CryptoToad | c:\users\owner\documents\nim\downloader\nimcache\stdlib_strtabs.o c:\users\owner\documents\nim\downloader\nimcache\stdlib_osproc.o c:\users\owner\documents\nim\downloader\nimcache\stdlib_winlean.o c:\users\owner\documents\nim\downloader\nimcache\stdlib_times.o c:\users\owner\documents\nim\downloader\nimcache\stdlib_parseutils.o c:\users\owner\documents\nim\downloader\nimcache\stdlib_strutils.o c:\users\owner\documents\nim\downloader\nimcache\stdlib_os.o |
18:46:40 | CryptoToad | c:\users\owner\documents\nim\downloader\nimcache\stdlib_system.o c:\users\owner\documents\nim\downloader\nimcache\downloader.o |
18:46:43 | CryptoToad | Error: execution of an external program failed |
18:46:45 | CryptoToad | No stack traceback available |
18:46:47 | CryptoToad | > Process terminated with exit code 1 |
18:46:49 | CryptoToad | oh |
18:46:51 | CryptoToad | cannot find -lcomdlg32 |
18:46:53 | CryptoToad | that would do it |
18:47:53 | fowl | im guessing you should use msvc for that |
18:48:03 | CryptoToad | found a relevant thread on the issue, if you want the link for the FAQ |
18:48:03 | CryptoToad | https://bugs.launchpad.net/nimrod/+bug/540795 |
18:48:36 | fowl | oh |
18:49:12 | EXetoC | that's old |
18:49:40 | CryptoToad | yeah but hopefully still relevant |
18:49:59 | EXetoC | use something like gist if the output exceeds a few lines |
18:50:10 | fowl | in the future dont paste in here |
18:50:14 | CryptoToad | unfortunately i'm on winbloat at the moment, sorry. |
18:50:17 | BlaXpirit | nope, can't do anything based on rand() |
18:50:22 | CryptoToad | i'll pastebin in the future |
18:50:25 | BlaXpirit | RAND_MAX is not even guaranteed to be a power of 2 |
18:50:29 | CryptoToad | didn't realize how long the output was |
18:50:50 | * | vendethiel quit (Ping timeout: 246 seconds) |
18:50:54 | * | fizzbooze joined #nim |
18:52:32 | * | vendethiel joined #nim |
18:52:35 | BlaXpirit | I also thought about calling rand() N times until max < (RAND_MAX+1)^N |
18:52:48 | BlaXpirit | but that is subject to integer overflow |
18:52:50 | Araq | CryptoToad: my mingw has a libcomdlg32.a |
18:53:15 | Araq | where did you get your mingw from? |
18:53:32 | CryptoToad | the nim site |
18:53:41 | CryptoToad | followed all links they provided |
18:54:04 | CryptoToad | hmm i have a libcomdlg32 now but i get same error |
18:55:43 | fowl | CryptoToad, the ex from that link compiles with me for mingw32 |
18:56:45 | CryptoToad | i get "skipping incompatible" then a link to my a file |
18:56:49 | CryptoToad | maybe it's just wrong ver? |
18:57:08 | CryptoToad | i'll try to find the current one |
18:57:14 | fowl | you should do a proper install of mingw32 |
18:57:34 | fowl | if you havent already |
18:59:13 | CryptoToad | Doing that now. Thanks a ton for the help. |
19:03:36 | * | bcinman quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
19:04:15 | * | bcinman joined #nim |
19:07:46 | * | banister joined #nim |
19:07:51 | * | banister quit (Max SendQ exceeded) |
19:10:00 | * | banister joined #nim |
19:10:43 | * | banister is now known as banisterfiend |
19:16:56 | * | girvo joined #nim |
19:21:53 | * | girvo quit (Ping timeout: 264 seconds) |
19:35:27 | * | shodan45 joined #nim |
19:39:36 | * | jholland quit (Ping timeout: 265 seconds) |
19:41:28 | * | CryptoToad quit (Quit: Leaving) |
19:41:55 | * | jholland joined #nim |
19:42:52 | * | Stefan____ joined #nim |
19:44:31 | Stefan____ | Is it really intended that nimsuggest and nimfix are installed by nimble inside of directory .nimble/pkgs/compiler-0.10.3/compiler/ |
19:45:18 | Stefan____ | c2nim is in .nimble/pkgs/ and works. |
19:45:33 | EXetoC | it's not in /bin? |
19:45:43 | EXetoC | ok it's in both |
19:46:45 | EXetoC | but it's bin that should be added to the path. are the binaries symlinked there? |
19:48:28 | Stefan____ | I mean nimsuggest and nimfix directories are created inside of .nimble/pkgs/compiler-0.10.3/compiler/ when nimble tries to install it, and it fails. |
19:50:48 | Stefan____ | I think I will try to move that nimsuggest and nimfix directories to .nimble/pkgs/ and then try manually compilation |
19:51:42 | Stefan____ | Will try that, bye. |
19:51:45 | * | Stefan____ quit () |
19:54:08 | * | fizzbooze quit (Ping timeout: 252 seconds) |
19:57:22 | * | bcinman quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
19:58:11 | * | bcinman joined #nim |
20:06:21 | * | fizzbooze joined #nim |
20:12:10 | * | reem joined #nim |
20:19:58 | * | reem quit (Remote host closed the connection) |
20:22:29 | * | jfchevrette quit (Ping timeout: 246 seconds) |
20:22:59 | * | elrood joined #nim |
20:23:46 | * | reem joined #nim |
20:38:06 | * | UberLambda joined #nim |
20:43:46 | kjo1 | does the importcpp pragmas work with the javascript backend? |
20:44:12 | kjo1 | (do rather) |
20:45:15 | reactormonk | kjo1, yup, use it for infix notation (e.g. x.foo(bar)) |
20:45:51 | Araq | hrm? they do? interesting |
20:46:50 | kjo1 | having trouble with this: proc `()`*(this:d3Scale, i:int): int {.importcpp: "#(#)".} |
20:47:02 | kjo1 | it just generates #(#) in the resulting javascript |
20:47:29 | Araq | javascript does not support c++ patterns |
20:48:07 | reactormonk | kjo1, try just the name of the function you want to call |
20:50:09 | kjo1 | for some reason I thought wrapping javascript functions objects would be a fun time :) |
20:50:29 | kjo1 | I'm playing around with generating D3 from nim js backend |
20:50:52 | * | mpthrapp joined #nim |
20:51:49 | reactormonk | kjo1, yeah, importing infix operations might be troublesome |
20:52:02 | reactormonk | but since you can't customize them anyway |
20:54:05 | kjo1 | there is probably a better/smarter way to wrap javascript function objects |
20:54:15 | kjo1 | I just don't know nim (or javascript, for that matter) well enough |
20:54:27 | reactormonk | kjo1, what do you want to call? |
20:55:11 | kjo1 | I'm interacting with this scale function from D3 |
20:55:11 | kjo1 | http://pastebin.com/dsNMjB8V |
20:55:23 | kjo1 | https://github.com/mbostock/d3 |
20:57:18 | reactormonk | kjo1, yeah, define a type e.g. type D3ScaleLinear and then proc rescale(scale: D3ScaleLinear): D3ScaleLinear {.importcpp: "rescale".} |
20:57:40 | kjo1 | it almost works, just treating scale as a function |
20:57:40 | kjo1 | http://pastebin.com/E6bqdMTi |
20:59:37 | reactormonk | doesn't look too bad |
21:00:40 | kjo1 | the trouble I'm having is that in javascript, "scales" are objects & functions. I'm not sure how to replicate that interface in nim |
21:01:05 | reactormonk | looks like you went the type & importc style |
21:02:15 | reactormonk | Araq, is the type X = object\n foo: proc (foo: bar): X described somewhere? any implicit object type around? |
21:02:53 | reactormonk | kjo1, I just went full namespace. |
21:03:08 | EXetoC | implicit? |
21:03:17 | reactormonk | ehh object value |
21:03:32 | reactormonk | kjo1, so scale -> d3.scale.linear.scale |
21:04:27 | reactormonk | kjo1, if it's a function that's bound to an object (e.g. because it uses this) just make a new type and attach them via that and go either importc or importcpp |
21:05:19 | EXetoC | reactormonk: so it holds a field that takes a proc of a certain signature. is there anything special about that? |
21:05:31 | reactormonk | EXetoC, probably not. just wondering. |
21:05:42 | * | girvo joined #nim |
21:08:11 | EXetoC | var x = X(foo: proc(foo: int): X = result = X(foo: nil)) |
21:08:30 | reactormonk | yup, I see your point |
21:09:25 | reactormonk | kjo1, yeah, I stand corrected. If it's a function (so no scope reference), use importc with the full path. If it's a method (bound by scope), make an object and use importcpp |
21:09:55 | fowl | reactormonk, no |
21:09:59 | fowl | look at dom.nim |
21:10:14 | * | girvo quit (Ping timeout: 256 seconds) |
21:11:17 | reactormonk | oh yeah, nodecl might be necessary |
21:11:47 | reactormonk | fowl, so nimcall it is? |
21:11:51 | reactormonk | with importc |
21:12:04 | reactormonk | I did it with importcpp a while back, worked as expected |
21:18:40 | * | banisterfiend quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:21:58 | * | filwit joined #nim |
21:22:14 | * | epichero quit () |
21:22:35 | * | epichero joined #nim |
21:23:26 | * | fizzbooze quit (Ping timeout: 272 seconds) |
21:23:40 | * | reem quit (Remote host closed the connection) |
21:29:14 | * | reem joined #nim |
21:29:16 | * | reem quit (Remote host closed the connection) |
21:30:32 | * | ehaliewicz joined #nim |
21:33:14 | * | bcinman_ joined #nim |
21:33:25 | * | bcinman quit (Ping timeout: 264 seconds) |
21:34:16 | * | pregressive quit (Remote host closed the connection) |
21:37:07 | * | jfchevrette joined #nim |
21:38:43 | * | gokr joined #nim |
21:42:47 | * | flaviu joined #nim |
21:42:47 | * | pregressive joined #nim |
21:45:41 | * | Salewski joined #nim |
21:49:11 | Salewski | Moved nimsuggest and nimfix dir two layers up to /home/stefan/.nimble/pkgs where working c2nim dir was already and compiled nimsuggest manually -- compiled fine! |
21:49:28 | * | Salewski quit (Client Quit) |
21:53:29 | * | bcinman_ quit (Ping timeout: 265 seconds) |
21:57:36 | * | bcinman joined #nim |
21:58:34 | * | pregressive quit (Remote host closed the connection) |
22:03:13 | * | S_Salewski joined #nim |
22:04:50 | S_Salewski | Copied nimsuggest binary to Nim compiler location: /home/stefan/Nim/bin |
22:05:40 | * | UberLambda quit (Remote host closed the connection) |
22:06:16 | S_Salewski | But with gradhas test command from latest github issue: bin/nimsuggest.nim(13, 7) Error: cannot open 'options' and more errors. |
22:06:28 | * | girvo joined #nim |
22:06:29 | * | Demon_Fox joined #nim |
22:06:41 | * | EXetoC is now known as notexetoc |
22:06:47 | S_Salewski | So it does not work with Linux. |
22:07:08 | * | jfchevrette quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
22:07:49 | Araq | S_Salewski: hi |
22:08:20 | S_Salewski | Hi Araq! |
22:09:47 | * | jfchevrette joined #nim |
22:11:01 | * | girvo quit (Ping timeout: 256 seconds) |
22:11:34 | fowl | it doesnt work for me either .nimble\pkgs\compiler-0.10.3\compiler\nimfix\prettybase.nim(10, 7) Error: cannot open 'ast' |
22:11:54 | * | fizzbooze joined #nim |
22:13:34 | * | bcinman quit (Ping timeout: 245 seconds) |
22:14:13 | * | kjo1 quit (Quit: Leaving.) |
22:15:50 | * | jfchevrette quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
22:17:03 | * | elrood quit (Quit: de chelonian mobile) |
22:17:10 | * | bcinman joined #nim |
22:17:21 | S_Salewski | fowl: Great! That is exactly the error I got when I tried nimble install! The nimsuggset dir is two layers to deep, moving up and manually compile works. |
22:17:48 | Araq | aha |
22:18:44 | S_Salewski | But even after sucessfully compile nimsuggest and moving to Nim dir it does not really work. |
22:19:19 | * | fizzbooze quit (Quit: WeeChat 1.1.1) |
22:19:37 | * | fizzbooze joined #nim |
22:20:28 | shalabh | I can't even install nimsuggest |
22:20:38 | S_Salewski | Maybe partly works, after error messages there may be some usefull stuff like: bin/nimsuggest.nim(14, 12) Error: cannot open 'condsyms' def skProc parseutils.parseUntil proc (string, |
22:20:45 | * | notexetoc is now known as EXetoC |
22:20:56 | shalabh | nimble install nimsuggest says 'compiler-0.10.3 already exists. Overwrite? [y/N]' |
22:21:00 | shalabh | N - doesn't do anything |
22:21:05 | shalabh | Y - errors |
22:21:21 | shalabh | er/msgs.nim(789, 22) Error: undeclared identifier: 'spaces |
22:22:27 | S_Salewski | Shalabh: Note, you need latest Nim devel to build nimsuggest. |
22:22:52 | shalabh | right, trying to pull and rebuild now |
22:23:10 | shalabh | koch update sounded nifty |
22:23:27 | shalabh | but it gives ' this Koch has not been compiled with -d:withUpdate' |
22:23:31 | shalabh | um why isn't that the default? |
22:24:43 | shalabh | I think I just have to git pull, then do the bootstrap stuff again.. |
22:24:44 | shalabh | that's fine |
22:24:51 | shalabh | hey, the new website.. |
22:24:55 | fowl | dunno what koch update is |
22:25:03 | shalabh | looks like someone washed the old website with bleach |
22:25:40 | shalabh | fowl: 'koch help' update updates nim to the latest version from github |
22:25:53 | fowl | shalabh, if you're on nix give nim-vm a shot |
22:26:02 | fowl | https://github.com/ekarlso/nim-vm |
22:26:18 | shalabh | ah ok, maybe later |
22:26:24 | shalabh | sounds like virtual machine |
22:27:27 | shalabh | vm is probably not a good choice of name here |
22:27:33 | * | mpthrapp quit (Remote host closed the connection) |
22:27:43 | fowl | well its named like rvm |
22:27:48 | fowl | ruby version manager |
22:28:05 | shalabh | it should be nvm then. |
22:28:06 | reactormonk | Then call it nvm - nim-vm is vritual machine. |
22:28:11 | shalabh | it's not called ruby-vm :) |
22:28:48 | shalabh | anyway, can't build devel even after pull |
22:29:03 | reactormonk | I'd say pull some new csources, someone broke bootstrapping again |
22:29:03 | shalabh | lib/pure/collections/tables.nim(98, 39) Error: type expected |
22:29:04 | shalabh | lib/pure/collections/tables.nim(98, 39) Error: type expected |
22:29:12 | shalabh | ah |
22:29:17 | shalabh | let me try.. |
22:31:42 | shalabh | ok, i built the latest nim. nimble install nimsuggest still fails |
22:33:32 | reactormonk | I just rebuilt from the latest csources and when booting koch.nim, I get lib/pure/osproc.nim(647, 4) Error: undeclared identifier: 'defer' |
22:34:05 | def- | reactormonk: devel branch of csources? |
22:34:19 | reactormonk | nope, thanks |
22:38:33 | reactormonk | .nimble/pkgs/compiler-0.10.3/compiler/nimfix/prettybase.nim(10, 7) Error: cannot open 'ast' |
22:38:35 | reactormonk | ^ yup |
22:40:10 | * | kjo1 joined #nim |
22:45:05 | * | reem joined #nim |
22:45:09 | * | reem quit (Remote host closed the connection) |
22:45:46 | * | reem joined #nim |
22:51:45 | * | reem quit (Remote host closed the connection) |
22:54:26 | * | girvo joined #nim |
22:54:28 | * | reem joined #nim |
22:55:07 | * | reem_ joined #nim |
22:56:13 | * | onionhammer quit (Ping timeout: 255 seconds) |
22:57:01 | * | pregressive joined #nim |
22:58:45 | * | Woflox_ joined #nim |
22:59:02 | * | reem quit (Ping timeout: 256 seconds) |
22:59:05 | * | davidhq quit (Ping timeout: 244 seconds) |
23:00:16 | * | Woflox quit (Ping timeout: 255 seconds) |
23:01:27 | * | davidhq joined #nim |
23:03:44 | * | Woflox_ quit (Ping timeout: 244 seconds) |
23:05:20 | * | S_Salewski quit () |
23:10:27 | * | onionhammer joined #nim |
23:10:33 | kjo1 | fowl & reactormonk: here's a distillation of the javascript I'm trying to wrap: http://jsbin.com/fokoka/1/edit?html,js,output any thoughts? |
23:11:16 | reactormonk | kjo1, apparently I have a slightly different idea how to do things :-) |
23:11:45 | kjo1 | diversity of perspective is a good thing! |
23:12:00 | kjo1 | (if nothing else it keeps it interesting) |
23:12:11 | * | pregressive quit (Remote host closed the connection) |
23:13:42 | fowl | no clue what this does |
23:13:49 | * | mwbrown joined #nim |
23:15:19 | kjo1 | the punchline is that the object in question acts like both an object and a function; and what's the best way to replicate this in nim |
23:15:53 | kjo1 | (the code is idiomatic of d3: http://d3js.org/) |
23:19:32 | BlaXpirit | went ahead and made nice documentation for https://github.com/BlaXpirit/nim-random#manual |
23:20:11 | EXetoC | there's a documentation page generator |
23:20:46 | reactormonk | kjo1, ok, I'll give it ago |
23:20:49 | EXetoC | but then you can't have sections |
23:20:51 | fowl | kjo1, not tested https://gist.github.com/fowlmouth/d6711a76e37dd660d607 |
23:20:59 | flaviu | EXetoC: Yep, but it's possible to get better organized docs if you do it by hand |
23:21:19 | kjo1 | thanks fowl, any hint is great |
23:26:52 | reactormonk | kjo1, https://gist.github.com/reactormonk/a7d2e16c11a09547b4ff I have no idea if this would work, but that how I'd do it |
23:28:05 | flaviu | BlaXpirit: Scanned over that page, looks very nice! |
23:28:11 | BlaXpirit | thx |
23:29:52 | kjo1 | @fowl, breaks exactly where my other crack at this broke: calling s as a function, generates weird javascript ()(….) |
23:30:03 | kjo1 | proc `()` (obj:jsobj; scale:float): float {.importc.} doesn't seem to be working correctly in javascript mode |
23:30:22 | kjo1 | I'll try and create a simpler example |
23:30:30 | kjo1 | to make sure it's a bug |
23:30:49 | fowl | is there a primitive you can use instead |
23:30:52 | fowl | like __call |
23:31:25 | kjo1 | I'm sure there is |
23:31:36 | kjo1 | a call() method |
23:34:17 | * | bcinman_ joined #nim |
23:34:32 | * | bcinman quit (Read error: Connection reset by peer) |
23:35:29 | * | irrequietus quit () |
23:36:24 | reactormonk | it's called apply IIRC |
23:37:22 | reactormonk | call is for splashed parameters, apply is for array of parameters |
23:37:31 | kjo1 | here's a way around the function call thing |
23:37:32 | kjo1 | http://pastebin.com/9fBWBw63 |
23:37:54 | kjo1 | bummer the `()` doesn't work though |
23:38:21 | reactormonk | ... I just don't like using types for displaying the prototype namespacing |
23:38:35 | * | Trustable quit (Remote host closed the connection) |
23:39:09 | * | pregressive joined #nim |
23:41:15 | fowl | kjo1, proc `()` (obj:jsobj; scale:float): float = obj.call(obj, scale) |
23:43:34 | * | pregressive quit (Ping timeout: 245 seconds) |
23:45:00 | kjo1 | nice that worked |
23:47:39 | k1i | is there an easy way to convert a raw `pointer` to a string? |
23:48:28 | EXetoC | a cstring? cast to it |
23:48:40 | flaviu | yep, you can convert it directly to a cstring |
23:48:49 | EXetoC | convert even? ok |
23:48:49 | flaviu | string has a length field, so you have to copy there. |
23:49:25 | EXetoC | assuming that it's not one already, but I'd assume not |
23:49:51 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:51:03 | * | Mimbus joined #nim |
23:51:14 | flaviu | .eval discard cstring(alloc0(20)) |
23:51:16 | Mimbus | flaviu: eval.nim(3, 15) Error: conversion from pointer to cstring is invalid |
23:51:49 | EXetoC | .eval cast[cstring](alloc0(20)) |
23:51:50 | Mimbus | EXetoC: eval.nim(3, 0) Error: value of type 'cstring' has to be discarded |
23:52:13 | k1i | .eval cast[uint](alloc0(20)) |
23:52:14 | Mimbus | k1i: eval.nim(3, 0) Error: value of type 'uint' has to be discarded |
23:52:24 | k1i | .eval $(cast[uint](alloc0(20))) |
23:52:25 | Mimbus | k1i: eval.nim(3, 0) Error: value of type 'string' has to be discarded |
23:54:27 | shalabh | did anyone announce a new eta for 1.0? |
23:54:58 | EXetoC | k1i: it doesn't print for you |
23:55:22 | k1i | EXetoC: requires echo? |
23:55:28 | BlaXpirit | requires echo |
23:55:38 | k1i | .eval echo $(cast[uint](alloc0(20))) |
23:55:39 | Mimbus | k1i: eval.nim(3, 5) Error: type mismatch: got (proc (varargs[expr]){.gcsafe, locks: 0.}, uint) |
23:55:40 | EXetoC | and if you want to test things until it compiles, do it in #nim-offtopic |
23:55:55 | EXetoC | .eval echo cast[uint](alloc0(20)) |
23:55:56 | k1i | (tested it locally, works fine) |
23:55:58 | Mimbus | EXetoC: 140488944873552 |
23:56:11 | EXetoC | .eval echo($(cast[uint](alloc0(20))) |
23:56:12 | Mimbus | EXetoC: eval.nim(4, 0) Error: ')' expected |
23:56:18 | EXetoC | k1i: the exact same code? |
23:56:22 | BlaXpirit | now this is a typical error where it tries to use `$` as a binary operator |
23:56:26 | k1i | w/ the working parens |
23:57:28 | * | fizzbooze quit (Ping timeout: 244 seconds) |
23:57:29 | EXetoC | fortunately you don't need it |
23:57:57 | EXetoC | because of varargs[`$`, T] rather than varargs[T]. I think I got the order right |
23:58:36 | * | reem_ quit (Remote host closed the connection) |
23:58:39 | kjo1 | ok, here's a summary of my d3 & nim excursion: https://gist.github.com/keithohara/071ff88942cf0a728ebf (thanks fowl & reactormonk). |
23:59:01 | * | fizzbooze joined #nim |
23:59:17 | fowl | kjo1, you can get rid of all those importcs on fields and just put them on the types |
23:59:35 | k1i | trying to interface w/ CoreFoundation, wanted to sanity check my CF allocations |
23:59:57 | fowl | glad that works for you |