<< 18-03-2015 >>

00:01:44def-tstm: thanks, fixed
00:03:27flaviu#2266, #2245, #2242, #2157, #2212, #2044 could not possibly be issues with a spec.
00:06:07Araqindeed a more detailed spec wouldn't have prevented none of these bugs.
00:06:26Araq*would have prevented none
00:06:33*reem quit (Remote host closed the connection)
00:07:40Araqin fact the original "spec" didn't include generic converters at all.
00:07:55Araqthen people requested the feature, it got implemented
00:08:02Araqhttps://github.com/Araq/Nim/issues/2044 resulted
00:08:48Araqand now the very same guy who wanted the feature blames me for having implemented it
00:09:03EXetoCwhat -.-
00:09:41EXetoChow silly :p
00:09:48Araqand tells me he recently discovered ML and that's the way to do language design.
00:09:56flaviuI haven't blamed you for implementing it.
00:10:02flaviuML?
00:10:55AraqML is the only language that meets your criteria of how to do it. ;-)
00:11:09flaviuLooks like #271 involves generic converters predates my having come across Nim anyway.
00:12:25Araqquite 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:22tstmdef-: 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:47tstmThe version you cleaned up, compared to my non-cleaned-up version.
00:40:05*flaviu joined #nim
00:41:51def-tstm: my guess would be that the alignment changed because of your "of RootObj"
00:42:13def-on my machine they're the exact same speed
00:42:44tstmdef-: Indeed that seems to have done the trick, the of RootObj.
00:43:24tstmInteresting.
00:43:56*brson quit (Quit: leaving)
00:46:00def-I guess you have a pretty modern CPU?
00:48:22*fizzbooze quit (Ping timeout: 240 seconds)
00:48:47adu_hi all
00:51:29def-hi adu_
00:51:41tstmdef-: A reasonably modern one, yes. i7-3820QM
00:51:52tstmHorrible model names.
00:53:36*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
00:54:08adu_so I have a cursory interest in Nim
00:54:44adu_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:19tstmadu_: I'm sure you've learned to pick up languages more quickly by now. =)
00:57:22tstmadu_: 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:22adu_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:40adu_tstm, that's pretty impressive
00:57:49*Trustable quit (Remote host closed the connection)
00:58:10adu_s/my/me/
00:58:25tstmI was pretty impressed as well. Seems that at least in some cases nim can be quite performant.
00:58:46adu_I've heard Julia is also quite performant
00:59:07TEttingerfor scientific code, yah
00:59:29TEttingerI don't think Julia can actually release binaries of your application yet
00:59:31adu_linalg-heavy code?
00:59:35TEttingeryep
01:00:17TEttingerJulia 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:37TEttingerwell, JIT-compiled interpreted language
01:01:29adu_I'm starting to think that VMs are a leaky abstraction
01:01:59*saml_ joined #nim
01:02:12adu_like blas?
01:03:04adu_so what am I interested you ask?
01:03:06adu_hmm
01:03:44adu_math, http, ssl, crypto, hashes, and distributed files systems
01:03:54TEttingeryeah, 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:32adu_IPP?
01:04:44TEttingerI don't recall the name
01:04:55adu_IPP = Intel equivalent to BLAS
01:05:09TEttingeryeah that then :)
01:05:13adu_Intel Performance Primitives
01:05:17TEttingeryep
01:05:48adu_it's got Image, Crypto, FFT, DFT, DWT, DSP, and a bunch of other stuff in one lib
01:05:53TEttingerI 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:29adu_I'm trying to find a language to replace what I do at work
01:07:03adu_which is web scraping
01:07:03TEttinger(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:22adu_I don't actually care about sync/async
01:07:24TEttingerand that could probably be fixed in an upcoming version
01:07:32adu_because to me, that's a server issue
01:07:58adu_granted, async clients are desirable for web scraping on the large scale
01:08:13adu_but not for on the order of 5 websites
01:09:05adu_HTTP is really complicated
01:09:05tstmFor 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:05TEttingerI 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:52adu_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:31adu_reem!
01:12:52reemadu_: Ya I lurk here
01:13:08reeminteresting languages are interesting
01:13:18adu_reem, you and your language-promiscuity
01:14:13reem:P
01:14:45EXetoCflaviu: 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:26EXetoCthere'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:31flaviuEXetoC: 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:26EXetoCflaviu: "result[0][0][0][2][0][2] = recList" nice :p
01:47:45TEttingerwhaaaat
01:48:10flaviuEXetoC: I know, it's beautiful :')
01:48:53flaviuBut before you make too much fun of me, look at the 20-line comment above it
01:48:57EXetoCcan't the accesses be made more symbolic?
01:49:35flaviuNim doesn't have pattern matching.
01:50:04*fizzbooze joined #nim
01:50:25fowlnormally quote: is better than doing that but you cant do quote: type X = object `reclist`
01:50:27EXetoCno but the interface has symbolic equivalents of the array indexing. does it not apply to this case?
01:51:35EXetoCfoo.bar rather than foo[i]
01:52:22fowlno
01:52:32flaviuEXetoC: Even if it does, see the comment above.
01:52:46fowlbecause what that line is digging into is a type section / type def / object type
01:53:03flaviuI'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:32adu_whaaaaaaaaat
02:42:56shalabh?
02:43:40adu_shalabh, sorry
02:44:14adu_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:22Araqdef-: for me the spawn server example still compiles
11:31:29Araqonionhammer: I think the program filwit posted is the same bug as the GC leaks you experience
11:31:55Araqonionhammer: it only leaks with --gc:refc (the default), right?
11:34:15def-Araq: then I guess it's Linux specific
11:36:23def-Araq: oh no, it's my fault
11:36:36def-I called the file "spawn.nim"...
11:42:23*anonybro joined #nim
11:46:49anonybroHello! Is anyone here?
11:50:03federico3hi anonybro
11:58:23anonybroHi, 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:29anonybroAverage 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:58anonybro*and bigger latency
12:06:19def-anonybro: That should be inefficiencies in jester and the async libraries
12:06:46def-I'm trying to speed up the asynchttpserver: https://github.com/def-/nim-http-speedup
12:10:19def-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:58anonybroYeah, 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:01wbThe 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:28Araqanonybro: that benchmark doesn't use the realtime GC iirc
12:16:17Araqand the GC is not the only thing that can cause huge latencies
12:18:32EXetoCdoes the time spent on freeing memory not average out over time? can't it be disabled?
12:25:57AraqEXetoC: "freeing memory" is already only some O(1) linked list insertion most of the time
12:26:27Araqit's harder to do better unless you go for a generational GC where can can dealloc a whole region in O(1)
12:26:36Araq*where you can
12:44:53*mwbrown joined #nim
12:45:28EXetoCok
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:44arnetheduckhi, 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:34arnetheduckI 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:04EXetoClack of time to deal with it perhaps
13:16:18arnetheduckwell, 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:58Araqarnetheduck: when I wrote the compiler there was no stdlib ;-)
13:41:13*jfchevre_ joined #nim
13:41:18Araqand now the compiler's ropes module has a few features that the stdlib lacks
13:43:48arnetheduckah, 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:45Araqas long as the diffs are not too overwhelming to review, it's fine with me
13:48:01Araqbut eventually the codegen will be rewritten
13:51:01arnetheduckoh, 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:24arnetheduckI'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:28EXetoCI wish I had been notified of the gdb support when I tried to make sense of some compiler problem :p
13:59:46AraqEXetoC: why? I almost never use gdb to debug the compiler
14:05:37EXetoCso possibly just lack of logical though then? that could be it :p
14:05:57*pregressive joined #nim
14:07:10EXetoCit is difficult to figure out which paths are taken. it was just impossible to keep track
14:09:29Araqmaybe but how does gdb help with that?
14:11:03EXetoCwith the help of stepping, but I might have approached things the wrong way
14:14:21EXetoCvariable 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:27EXetoCthe 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:43EXetoCbut 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:05BlaXpiritok today I'm determined to do something about math.random
16:39:37BlaXpiritif it's not gonna be removed, gotta try to fix it
16:39:46BlaXpiritfor this i will definitely need RAND_MAX
16:40:05BlaXpiritit doesn't seem to be exposed currently
16:44:43BlaXpiritalso, how about renaming the branch "master" to "stable"?
16:45:02BlaXpiriti'm sure it will help avoid many mistakes
16:45:41*kjo1 joined #nim
16:45:49EXetoCso nothing is getting deprecated?
16:47:23BlaXpiriti dunno
16:47:30BlaXpiriti can only wish
17:02:24*gsingh93 joined #nim
17:07:53*brson joined #nim
17:08:34BlaXpiritemit doesnt work :|
17:08:44BlaXpiritstill no idea how to get rand_max
17:09:27fowlimportc it
17:09:29def-BlaXpirit: what's the problem? can't import it?
17:09:54BlaXpiritquote 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:28fowlvar RAND_MAX* {.importc,header:..}: cuint
17:12:35BlaXpiritvar RAND_MAX {.importc: "RAND_MAX", header: "<stdlib.h>".}: int
17:12:38BlaXpirityeah, just got it
17:12:40BlaXpiritbut it's var!
17:15:38fowlyou can
17:15:53fowlvar rm{.stuff.}; let RAND_MAX* = rm
17:16:25BlaXpiritlet is better, but not much
17:18:39fowlblame obama for letting RAND_MAX be a macro
17:19:44EXetoComg inline such performance
17:19:46*MagusOTB quit (Ping timeout: 252 seconds)
17:22:20kjo1Hi folks, are there any resources for integrating nim (w/ javascript backend) and javascript libraries?
17:25:03fowlkjo1, dom.nim is a wrapper for the DOM, it just uses importc
17:26:05BlaXpirita good idea to look at it
17:26:18fowllooks like member methods are wrapped as fields
17:28:00kjo1@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:06CryptoToado/
17:35:17CryptoToadhey 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:41dom96CryptoToad: --app:gui
17:35:49CryptoToadOh, thanks dom :)
17:35:54CryptoToadfigured it was something silly
17:38:44CryptoToadThis is such a great language though, I'm really excited to learn it better.
17:39:36dom96That's good to hear :)
17:39:39dom96bbl
17:40:43*Jesin quit (Quit: Leaving)
17:41:41EXetoCis there a FAQ section where it can be answered in?
17:42:12EXetoCyep
17:44:01*Jesin joined #nim
17:45:02*Matthias247 joined #nim
17:45:51CryptoToadI 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:31def-CryptoToad: --parallelBuild:1 should show you what's failing at least
17:51:58CryptoToadno dice, compiling now with verbosity set to 3
17:53:25def-Maybe --app:gui only works with Microsoft Visual C (I don't have Windows to test)
17:53:36CryptoToadoh that's possible
17:53:39CryptoToadI'm using Aporia
17:55:51CryptoToadcould i just pass -mwindows to gcc instead?
17:57:45CryptoToadworked
17:59:48EXetoCok I'll add that too. just gonna look for the FAQ document
18:00:04CryptoToadI may have spoke too soon, it compiled but i still get a window :(
18:00:29EXetoCdid you include both switches?
18:00:35EXetoCif it even works
18:01:02CryptoToadnope 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:14Stefan____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:33Stefan____Nimble install itself worked without problems.
18:14:20*gokr quit (Quit: Leaving.)
18:14:32Stefan____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:58AraqCryptoToad: --app:gui does work with mingw
18:36:23Araqbut you need to type it in before your mainmodule.nim
18:36:33Araqnim c --app:gui mainmodule.nim
18:39:39CryptoToadI am :\
18:39:44CryptoToadsec ill send exact args
18:40:30CryptoToad$findExe(nimrod) c --app:gui --d:release --opt:size --parallelBuild:1 --gc:none --deadCodeElim:on --checks:off $#
18:41:19def---deadCodeElim:on and --checks:off are useless in this case btw, they should be implied by -d:release
18:41:44CryptoToadahh, i guess i only need gc none then
18:41:46CryptoToadok
18:42:36CryptoToadnow using $findExe(nimrod) c --d:release --opt:size --parallelBuild:1 --gc:none --app:gui $#
18:42:39CryptoToadsame error
18:42:44CryptoToadbut without app:gui it works fine
18:43:27Araqwell what's the error message?
18:43:37fowlBlaXpirit, proc RAND_MAX():int {.importcpp:"RAND_MAX@".} works but only in cpp mode
18:43:47BlaXpiritfowl, well that's definitely not an option\
18:44:00CryptoToadError: execution of an external program failed
18:44:01CryptoToad> Process terminated with exit code 1
18:44:07CryptoToadit's a gcc error
18:44:16AraqCryptoToad: run it from command line please
18:44:45fowlBlaXpirit, 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:07CryptoToadthat's the output log in aporia, isn't it essentially the same thing?
18:45:10BlaXpiritfowl, good point, i was wondering if that might be the case
18:45:25CryptoToadi set verbosity to 3
18:45:30CryptoToadso ill get you the exact gcc args
18:45:32CryptoToadthat did it
18:46:24CryptoToadgcc.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:25CryptoToadC:/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:25CryptoToads\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:28CryptoToadc:\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:33CryptoToad 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:40CryptoToadc:\users\owner\documents\nim\downloader\nimcache\stdlib_system.o c:\users\owner\documents\nim\downloader\nimcache\downloader.o
18:46:43CryptoToadError: execution of an external program failed
18:46:45CryptoToadNo stack traceback available
18:46:47CryptoToad> Process terminated with exit code 1
18:46:49CryptoToadoh
18:46:51CryptoToad cannot find -lcomdlg32
18:46:53CryptoToadthat would do it
18:47:53fowlim guessing you should use msvc for that
18:48:03CryptoToadfound a relevant thread on the issue, if you want the link for the FAQ
18:48:03CryptoToadhttps://bugs.launchpad.net/nimrod/+bug/540795
18:48:36fowloh
18:49:12EXetoCthat's old
18:49:40CryptoToadyeah but hopefully still relevant
18:49:59EXetoCuse something like gist if the output exceeds a few lines
18:50:10fowlin the future dont paste in here
18:50:14CryptoToadunfortunately i'm on winbloat at the moment, sorry.
18:50:17BlaXpiritnope, can't do anything based on rand()
18:50:22CryptoToadi'll pastebin in the future
18:50:25BlaXpiritRAND_MAX is not even guaranteed to be a power of 2
18:50:29CryptoToaddidn'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:35BlaXpiritI also thought about calling rand() N times until max < (RAND_MAX+1)^N
18:52:48BlaXpiritbut that is subject to integer overflow
18:52:50AraqCryptoToad: my mingw has a libcomdlg32.a
18:53:15Araqwhere did you get your mingw from?
18:53:32CryptoToadthe nim site
18:53:41CryptoToadfollowed all links they provided
18:54:04CryptoToadhmm i have a libcomdlg32 now but i get same error
18:55:43fowlCryptoToad, the ex from that link compiles with me for mingw32
18:56:45CryptoToadi get "skipping incompatible" then a link to my a file
18:56:49CryptoToadmaybe it's just wrong ver?
18:57:08CryptoToadi'll try to find the current one
18:57:14fowlyou should do a proper install of mingw32
18:57:34fowlif you havent already
18:59:13CryptoToadDoing 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:31Stefan____Is it really intended that nimsuggest and nimfix are installed by nimble inside of directory .nimble/pkgs/compiler-0.10.3/compiler/
19:45:18Stefan____c2nim is in .nimble/pkgs/ and works.
19:45:33EXetoCit's not in /bin?
19:45:43EXetoCok it's in both
19:46:45EXetoCbut it's bin that should be added to the path. are the binaries symlinked there?
19:48:28Stefan____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:48Stefan____I think I will try to move that nimsuggest and nimfix directories to .nimble/pkgs/ and then try manually compilation
19:51:42Stefan____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:46kjo1does the importcpp pragmas work with the javascript backend?
20:44:12kjo1(do rather)
20:45:15reactormonkkjo1, yup, use it for infix notation (e.g. x.foo(bar))
20:45:51Araqhrm? they do? interesting
20:46:50kjo1having trouble with this: proc `()`*(this:d3Scale, i:int): int {.importcpp: "#(#)".}
20:47:02kjo1it just generates #(#) in the resulting javascript
20:47:29Araqjavascript does not support c++ patterns
20:48:07reactormonkkjo1, try just the name of the function you want to call
20:50:09kjo1for some reason I thought wrapping javascript functions objects would be a fun time :)
20:50:29kjo1I'm playing around with generating D3 from nim js backend
20:50:52*mpthrapp joined #nim
20:51:49reactormonkkjo1, yeah, importing infix operations might be troublesome
20:52:02reactormonkbut since you can't customize them anyway
20:54:05kjo1there is probably a better/smarter way to wrap javascript function objects
20:54:15kjo1I just don't know nim (or javascript, for that matter) well enough
20:54:27reactormonkkjo1, what do you want to call?
20:55:11kjo1I'm interacting with this scale function from D3
20:55:11kjo1http://pastebin.com/dsNMjB8V
20:55:23kjo1https://github.com/mbostock/d3
20:57:18reactormonkkjo1, yeah, define a type e.g. type D3ScaleLinear and then proc rescale(scale: D3ScaleLinear): D3ScaleLinear {.importcpp: "rescale".}
20:57:40kjo1it almost works, just treating scale as a function
20:57:40kjo1http://pastebin.com/E6bqdMTi
20:59:37reactormonkdoesn't look too bad
21:00:40kjo1the 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:05reactormonklooks like you went the type & importc style
21:02:15reactormonkAraq, is the type X = object\n foo: proc (foo: bar): X described somewhere? any implicit object type around?
21:02:53reactormonkkjo1, I just went full namespace.
21:03:08EXetoCimplicit?
21:03:17reactormonkehh object value
21:03:32reactormonkkjo1, so scale -> d3.scale.linear.scale
21:04:27reactormonkkjo1, 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:19EXetoCreactormonk: so it holds a field that takes a proc of a certain signature. is there anything special about that?
21:05:31reactormonkEXetoC, probably not. just wondering.
21:05:42*girvo joined #nim
21:08:11EXetoCvar x = X(foo: proc(foo: int): X = result = X(foo: nil))
21:08:30reactormonkyup, I see your point
21:09:25reactormonkkjo1, 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:55fowlreactormonk, no
21:09:59fowllook at dom.nim
21:10:14*girvo quit (Ping timeout: 256 seconds)
21:11:17reactormonkoh yeah, nodecl might be necessary
21:11:47reactormonkfowl, so nimcall it is?
21:11:51reactormonkwith importc
21:12:04reactormonkI 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:11SalewskiMoved 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:50S_SalewskiCopied nimsuggest binary to Nim compiler location: /home/stefan/Nim/bin
22:05:40*UberLambda quit (Remote host closed the connection)
22:06:16S_SalewskiBut 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:47S_SalewskiSo it does not work with Linux.
22:07:08*jfchevrette quit (Quit: My Mac has gone to sleep. ZZZzzz…)
22:07:49AraqS_Salewski: hi
22:08:20S_SalewskiHi Araq!
22:09:47*jfchevrette joined #nim
22:11:01*girvo quit (Ping timeout: 256 seconds)
22:11:34fowlit 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:21S_Salewskifowl: 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:48Araqaha
22:18:44S_SalewskiBut 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:28shalabhI can't even install nimsuggest
22:20:38S_SalewskiMaybe 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:56shalabhnimble install nimsuggest says 'compiler-0.10.3 already exists. Overwrite? [y/N]'
22:21:00shalabhN - doesn't do anything
22:21:05shalabhY - errors
22:21:21shalabher/msgs.nim(789, 22) Error: undeclared identifier: 'spaces
22:22:27S_SalewskiShalabh: Note, you need latest Nim devel to build nimsuggest.
22:22:52shalabhright, trying to pull and rebuild now
22:23:10shalabhkoch update sounded nifty
22:23:27shalabhbut it gives ' this Koch has not been compiled with -d:withUpdate'
22:23:31shalabhum why isn't that the default?
22:24:43shalabhI think I just have to git pull, then do the bootstrap stuff again..
22:24:44shalabhthat's fine
22:24:51shalabhhey, the new website..
22:24:55fowldunno what koch update is
22:25:03shalabhlooks like someone washed the old website with bleach
22:25:40shalabhfowl: 'koch help' update updates nim to the latest version from github
22:25:53fowlshalabh, if you're on nix give nim-vm a shot
22:26:02fowlhttps://github.com/ekarlso/nim-vm
22:26:18shalabhah ok, maybe later
22:26:24shalabhsounds like virtual machine
22:27:27shalabhvm is probably not a good choice of name here
22:27:33*mpthrapp quit (Remote host closed the connection)
22:27:43fowlwell its named like rvm
22:27:48fowlruby version manager
22:28:05shalabhit should be nvm then.
22:28:06reactormonkThen call it nvm - nim-vm is vritual machine.
22:28:11shalabhit's not called ruby-vm :)
22:28:48shalabhanyway, can't build devel even after pull
22:29:03reactormonkI'd say pull some new csources, someone broke bootstrapping again
22:29:03shalabhlib/pure/collections/tables.nim(98, 39) Error: type expected
22:29:04shalabhlib/pure/collections/tables.nim(98, 39) Error: type expected
22:29:12shalabhah
22:29:17shalabhlet me try..
22:31:42shalabhok, i built the latest nim. nimble install nimsuggest still fails
22:33:32reactormonkI 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:05def-reactormonk: devel branch of csources?
22:34:19reactormonknope, thanks
22:38:33reactormonk.nimble/pkgs/compiler-0.10.3/compiler/nimfix/prettybase.nim(10, 7) Error: cannot open 'ast'
22:38:35reactormonk^ 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:33kjo1fowl & 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:16reactormonkkjo1, apparently I have a slightly different idea how to do things :-)
23:11:45kjo1diversity of perspective is a good thing!
23:12:00kjo1(if nothing else it keeps it interesting)
23:12:11*pregressive quit (Remote host closed the connection)
23:13:42fowlno clue what this does
23:13:49*mwbrown joined #nim
23:15:19kjo1the 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:53kjo1(the code is idiomatic of d3: http://d3js.org/)
23:19:32BlaXpiritwent ahead and made nice documentation for https://github.com/BlaXpirit/nim-random#manual
23:20:11EXetoCthere's a documentation page generator
23:20:46reactormonkkjo1, ok, I'll give it ago
23:20:49EXetoCbut then you can't have sections
23:20:51fowlkjo1, not tested https://gist.github.com/fowlmouth/d6711a76e37dd660d607
23:20:59flaviuEXetoC: Yep, but it's possible to get better organized docs if you do it by hand
23:21:19kjo1thanks fowl, any hint is great
23:26:52reactormonkkjo1, https://gist.github.com/reactormonk/a7d2e16c11a09547b4ff I have no idea if this would work, but that how I'd do it
23:28:05flaviuBlaXpirit: Scanned over that page, looks very nice!
23:28:11BlaXpiritthx
23:29:52kjo1@fowl, breaks exactly where my other crack at this broke: calling s as a function, generates weird javascript ()(….)
23:30:03kjo1proc `()` (obj:jsobj; scale:float): float {.importc.} doesn't seem to be working correctly in javascript mode
23:30:22kjo1I'll try and create a simpler example
23:30:30kjo1to make sure it's a bug
23:30:49fowlis there a primitive you can use instead
23:30:52fowllike __call
23:31:25kjo1I'm sure there is
23:31:36kjo1a 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:24reactormonkit's called apply IIRC
23:37:22reactormonkcall is for splashed parameters, apply is for array of parameters
23:37:31kjo1here's a way around the function call thing
23:37:32kjo1http://pastebin.com/9fBWBw63
23:37:54kjo1bummer the `()` doesn't work though
23:38:21reactormonk... 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:15fowlkjo1, proc `()` (obj:jsobj; scale:float): float = obj.call(obj, scale)
23:43:34*pregressive quit (Ping timeout: 245 seconds)
23:45:00kjo1nice that worked
23:47:39k1iis there an easy way to convert a raw `pointer` to a string?
23:48:28EXetoCa cstring? cast to it
23:48:40flaviuyep, you can convert it directly to a cstring
23:48:49EXetoCconvert even? ok
23:48:49flaviustring has a length field, so you have to copy there.
23:49:25EXetoCassuming 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:14flaviu.eval discard cstring(alloc0(20))
23:51:16Mimbusflaviu: eval.nim(3, 15) Error: conversion from pointer to cstring is invalid
23:51:49EXetoC.eval cast[cstring](alloc0(20))
23:51:50MimbusEXetoC: eval.nim(3, 0) Error: value of type 'cstring' has to be discarded
23:52:13k1i.eval cast[uint](alloc0(20))
23:52:14Mimbusk1i: eval.nim(3, 0) Error: value of type 'uint' has to be discarded
23:52:24k1i.eval $(cast[uint](alloc0(20)))
23:52:25Mimbusk1i: eval.nim(3, 0) Error: value of type 'string' has to be discarded
23:54:27shalabhdid anyone announce a new eta for 1.0?
23:54:58EXetoCk1i: it doesn't print for you
23:55:22k1iEXetoC: requires echo?
23:55:28BlaXpiritrequires echo
23:55:38k1i.eval echo $(cast[uint](alloc0(20)))
23:55:39Mimbusk1i: eval.nim(3, 5) Error: type mismatch: got (proc (varargs[expr]){.gcsafe, locks: 0.}, uint)
23:55:40EXetoCand if you want to test things until it compiles, do it in #nim-offtopic
23:55:55EXetoC.eval echo cast[uint](alloc0(20))
23:55:56k1i(tested it locally, works fine)
23:55:58MimbusEXetoC: 140488944873552
23:56:11EXetoC.eval echo($(cast[uint](alloc0(20)))
23:56:12MimbusEXetoC: eval.nim(4, 0) Error: ')' expected
23:56:18EXetoCk1i: the exact same code?
23:56:22BlaXpiritnow this is a typical error where it tries to use `$` as a binary operator
23:56:26k1iw/ the working parens
23:57:28*fizzbooze quit (Ping timeout: 244 seconds)
23:57:29EXetoCfortunately you don't need it
23:57:57EXetoCbecause 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:39kjo1ok, 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:17fowlkjo1, you can get rid of all those importcs on fields and just put them on the types
23:59:35k1itrying to interface w/ CoreFoundation, wanted to sanity check my CF allocations
23:59:57fowlglad that works for you