<< 28-04-2015 >>

00:05:41*saml_ joined #nim
00:07:42*gsingh93 joined #nim
00:09:00*JinShil joined #nim
00:10:13*Sharcho quit (Quit: Leaving)
00:15:45*Demon_Fox joined #nim
00:19:19*transfuturist joined #nim
00:19:34transfuturistecho isn't working in macros anymore for some reason
00:30:42Varriounttransfuturist: Can you test which revision it broke at?
00:32:38Varriount(And possible document how to test the compiler with git bisect?
00:32:39*ChrisMAN quit (Ping timeout: 256 seconds)
00:32:48Varriount*and if possible
00:34:44transfuturistsure
00:38:44*brson quit (Quit: leaving)
00:39:34*EXetoC quit (Quit: WeeChat 1.1.1)
00:40:44*JinShil quit (Quit: Konversation terminated!)
00:41:04transfuturistnot sure how to do it
00:41:06transfuturistlib/system.nim(1659, 38) Warning: unknown magic 'MaxI64' might crash the compiler [UnknownMagic]
00:41:10transfuturistlib/system.nim(666, 6) Error: implementation of 'system.+(x: int64)' expected
00:41:12transfuturistFAILURE
00:46:30Varriounttransfuturist: Hm. It would probably require a complex script (to take into account downloading csources)
00:46:43transfuturistnah, i just switched from koch temp to koch boot
00:47:29transfuturistaaaand it stopped working
00:47:43Varriount;O
00:49:24transfuturisti have no idea what i'm doing
01:11:45*BitPuffin quit (Ping timeout: 256 seconds)
01:26:57onionhammervarriount what are you trying to finish before releasing?
01:32:35*transfuturist quit (Quit: leaving)
01:39:28Varriountonionhammer: The college semester. I would release it now, If I had the time.
01:43:30onionhammer ah k
02:20:14*johnsoft quit (Ping timeout: 245 seconds)
02:21:06*johnsoft joined #nim
02:23:18*JinShil joined #nim
02:24:05*pregressive quit (Remote host closed the connection)
02:35:09*jholland quit (Quit: Connection closed for inactivity)
02:37:27*pregressive joined #nim
02:43:00*darkf joined #nim
02:59:48filwittransfuturist: echo is working from within macros for me (just pulled latest devel)
03:00:16*elbow_jason joined #nim
03:21:44*saml_ quit (Quit: Leaving)
03:26:49*ehaliewicz quit (Ping timeout: 264 seconds)
03:32:01*JinShil quit (Quit: Konversation terminated!)
03:32:08*adu quit (Ping timeout: 256 seconds)
03:35:07*JinShil joined #nim
03:35:58*JinShil quit (Client Quit)
03:42:41*vendethiel joined #nim
04:02:46*pregressive quit (Remote host closed the connection)
04:12:46*TEttinger joined #nim
04:48:11*Demon_Fox quit (Quit: Leaving)
04:51:02*Demon_Fox joined #nim
04:58:28*vendethiel quit (Ping timeout: 250 seconds)
05:03:21*vikaton quit (Quit: Connection closed for inactivity)
05:07:08*vendethiel joined #nim
05:09:42*endragor joined #nim
05:21:26*johnsoft quit (Ping timeout: 250 seconds)
05:21:43*johnsoft joined #nim
05:28:48*vendethiel quit (Ping timeout: 250 seconds)
05:36:06*vendethiel joined #nim
05:37:02*yglukhov________ joined #nim
05:41:07*yglukhov________ quit (Ping timeout: 244 seconds)
05:59:12*vendethiel quit (Ping timeout: 276 seconds)
06:02:34*BlaXpirit joined #nim
06:08:46*HakanD__ joined #nim
06:11:17HakanD__morning
06:16:33*yglukhov________ joined #nim
06:20:38*bogen joined #nim
06:20:59*yglukhov________ quit (Ping timeout: 250 seconds)
06:27:28*Demon_Fox quit (Quit: Leaving)
06:32:19*HakanD__ is now known as HakanD
06:35:14*HakanD_ joined #nim
06:38:59*HakanD quit (Ping timeout: 244 seconds)
06:39:40*vendethiel joined #nim
06:47:18*gsingh93 quit (Ping timeout: 276 seconds)
06:58:24*yglukhov________ joined #nim
07:02:45*vendethiel quit (Ping timeout: 244 seconds)
07:07:16*endragor_ joined #nim
07:09:01*Ven joined #nim
07:10:18*endragor quit (Ping timeout: 256 seconds)
07:19:30*endragor_ quit (Remote host closed the connection)
07:22:19*bjz joined #nim
07:26:22*banister quit (Ping timeout: 264 seconds)
07:26:25*bjz quit (Ping timeout: 250 seconds)
07:35:46*Trustable joined #nim
07:36:50*iamd3vil joined #nim
07:39:26*BlaXpirit quit (Quit: Quit Konversation)
07:39:44iamd3vilHi guys. I am a newbie to Nim and generally to Programming. I am well versed with Python. So my problem is when I try to import osproc module, the compiler is saying No stack traceback is available. I don't know what I am doing wrong.
07:40:01iamd3vilCan anyone help?
07:45:21novistsounds like a crash
07:46:32def-iamd3vil: what compiler version? tried the devel branch?
07:47:07iamd3vildef- : I am running the compiler from devel branch
07:47:58iamd3vildef-: Compiler version is 0.10.3
07:48:33iamd3vilI tried importing this in two different systems both running Ubuntu 14.04 and the same thing happens.
07:52:56def-strange, works for me. Did you by chance install Nim?
07:53:08def-instead of running it in a local directory
07:55:34iamd3vildef-: I have git cloned it into my local directory and then added the path to the system PATH.
07:55:37*RushPL quit (Ping timeout: 264 seconds)
07:57:54iamd3vilAfter showing "No stack traceback is available" it is saying that "To create a stacktrace, rerun compilation with ./koch temp i <file>"
07:59:08def-really strange, it works for me on linux. you can try ./koch temp i <file>
07:59:27*yglukhov________ is now known as yglukhov
08:00:38iamd3vildef-: Do I have to provide a file name or just type the command?
08:00:55*banister joined #nim
08:01:13iamd3vilI tried running that command and it says "bash: syntax error near unexpected token `newline'"
08:04:52def-filename
08:05:03def-<file> should be the file you're using
08:05:18xificurC_iamd3vil: stupid question but did you compile nim or just cloned the repo
08:09:34*iamd3vil quit (Ping timeout: 246 seconds)
08:15:23*coffeepot joined #nim
08:17:12xificurC_randomly browsing through nim source code and wondering, is this proc needed?
08:17:13xificurC_https://github.com/Araq/Nim/blob/devel/compiler/ropes.nim#L111
08:17:48def-Just to make sure the ropes aren't corrupted
08:19:40xificurC_def-: and how does that check work, all I see is if condition then true else true
08:20:52def-oh right, that should probably be fixed
08:21:24xificurC_def-: fixed as in removed as deprecated or the else branch needs a rewrite
08:22:26def-I guess the else branch should be fixed, but I'm not sure why it's even commented out
08:25:17*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:25:21*EastByte quit (Ping timeout: 250 seconds)
08:27:32xificurC_compiling under mingw64 ended with this: http://sprunge.us/iXYZ . I don't see the "executables are equal: SUCCESS!" print at the end and nim2 is different from nim1. I see in koch there is a line at the end saying `when not defined(windows): echo "[Warning] executables are still not equal"', any specific reason why windows is skipped?
08:27:39*RushPL joined #nim
08:28:02xificurC_how can I know if the compilation finished successfully?
08:29:31def-I guess for some reason they may never be equal on windows
08:29:49def-the output looks ok, but I'm wondering why there isn't more diagnostics
08:30:20xificurC_I only copied the last couple of lines
08:30:43xificurC_never equal? Ain't that just the way windows is..
08:32:23*ingsoc joined #nim
08:33:07*Sembei joined #nim
08:33:22xificurC_if anyone is interested here is a cloc run on the latest devel branch with a custom definition for nim code
08:33:24xificurC_http://sprunge.us/IDCg
08:39:03*iamd3vil joined #nim
08:40:09iamd3vilxificurC_ : I have cloned and then compiled it. I have followed the instructions given at http://nim-lang.org/download.html
08:40:17HakanD_hey, i was looking for nim definitions for cloc
08:40:44HakanD_xificurC_: btw it is a blank page for me
08:41:35*Sembei quit (Quit: WeeChat 1.1.1)
08:41:46xificurC_HakanD_: I just wrote a crude definition
08:41:51xificurC_blank? strange
08:41:53HakanD_iamd3vil: can you show us your code?
08:42:42iamd3vilSorry if this question is stupid. Can i paste the code somewhere else and provide you the link?
08:42:59xificurC_HakanD_: http://lpaste.net/131619
08:43:00HakanD_iamd3vil: yup, that's the preferred way
08:43:40HakanD_xificurC_: that's cool
08:43:58xificurC_HakanD_: this is the definition I wrote
08:44:01xificurC_http://lpaste.net/131620
08:44:08HakanD_iamd3vil: you can use gist.github.com, or some pastebin or whatever they are called
08:44:34HakanD_xificurC_: thank you
08:44:37iamd3vilhere is my code - http://pastebin.com/rE2Eg5qb
08:44:50xificurC_I guess the high level of C code is from tynic?
08:45:37xificurC_tinyc too
08:46:00HakanD_on github its Nimrod 77.5% C 18.1%
08:46:14xificurC_iamd3vil: did you use master or devel branch
08:47:00iamd3vilxificurC_: I used the devel branch
08:48:14xificurC_HakanD_: strange, the file count is similar
08:50:10HakanD_iamd3vil: "output_tuple: tuple" tuple is not a concrete type by itself
08:50:15HakanD_and nim can infer types
08:50:17HakanD_https://gist.github.com/hakanderyal/618364b6f765f3a96abf
08:50:20HakanD_this one works
08:52:22*EastByte joined #nim
08:52:49HakanD_agreed that "Error: internal error: getUniqueType" is not the best error message for newcomers
08:53:32iamd3vilHakanD_: Ok. Your code works now. What should I do if I have to declare a new Tuple? Should I use 'type' or var'?
08:54:32HakanD_http://nim-lang.org/manual.html#tuples-and-object-types
08:54:44*Tennis quit (Read error: Connection reset by peer)
08:54:58HakanD_http://nim-lang.org/documentation.html reading docs is generally a good way to learn (:
08:55:28*Ven joined #nim
08:55:49HakanD_https://nim-by-example.github.io/getting_started/ this page is good for basics also
08:57:02HakanD_tuple in nim is not the same thing as in python
08:57:47iamd3vilHakanD_: Ok. I am actually reading them. I thought tuple in nim is the same thing in python. My bad.
08:58:06HakanD_there is sequence, and array in nim for sequence types
08:58:26HakanD_and var, let for mutability, immutability
08:58:28*ggVGc is now known as functional_duck
08:59:08iamd3vilHakanD_: When I try to import osproc in nim intercative mode. I get the 'No stack traceback is avilable' error. Shouldn't I import it in intercative mode?
08:59:23HakanD_interactive mod is not supported anymore
08:59:43HakanD_so, don't use it :p
09:00:35xificurC_too bad there is no repl in the core
09:00:51iamd3vilHakanD_: I didn't know that. I won't use it.
09:03:24*HakanD_ is now known as HakanD
09:07:09*functional_duck is now known as ggVGc
09:09:27*xificurC_ quit (Quit: WeeChat 1.1.1)
09:09:51*xificurC joined #nim
09:15:42*iamd3vil quit (Quit: Page closed)
09:16:22def-If you're interested in Nim REPLs: https://github.com/wheineman/nrpl https://github.com/Araq/Nim/wiki/GSoC-2015-Ideas#create-a-new-repl-for-nim-using-tinycc
09:17:25xificurCdef-: I checked nrpl's source code, it's basically writing input into a temporary file and compiling it in the background with a small&fast c compiler
09:17:37xificurCdef-: that made me wonder - is that how other compiled languages do it as well?
09:17:38*milosn quit (Read error: Connection reset by peer)
09:17:46xificurCor is a repl usually ran against an interpreter
09:18:02*OnwardEuler joined #nim
09:18:02AraqxificurC: I don't know why it's never equal on windows but iirc it's also never equal for clang either
09:18:52Araqtimestamps etc in the .exe
09:18:53Araqand clang does unpredictable linking as it's threaded I think
09:19:38*xificurC_ joined #nim
09:19:58*milosn joined #nim
09:20:09xificurC_dc'd
09:20:33*yglukhov quit (Quit: Lingo: www.lingoirc.com)
09:20:48*yglukhov joined #nim
09:21:01def-xificurC: i only know about GHCi (Haskell REPL) and it brings an interpreter just for the REPL
09:21:55*handsome_feng joined #nim
09:22:11*handsome_feng left #nim ("离开")
09:23:14*xificurC quit (Ping timeout: 250 seconds)
09:24:18xificurC_def-: hm, checking the ocaml toplevel (REPL), doc says `he system repeatedly reads OCaml phrases from the input, then typechecks, compile and evaluate them, then prints the inferred type and result value, if any.'
09:24:55Araqwell things are easier when you have a native codgen. which Ocaml does have.
09:25:42xificurC_Araq: don't you have nim->c->native?
09:26:15Araqyeah but essentially you need a JIT-like component
09:26:53Araqyou can get that from a native codegen, but it's some effort too
09:27:14Araqwith an intermediate C step it's harder
09:29:02xificurC_I see
09:31:34*OnwardEuler quit (Read error: Connection reset by peer)
09:31:46*iamd3vil joined #nim
09:32:55TEttingerTinyCC is pretty fast at compiling C though
09:33:10TEttingerthe trick is compiling the Nim to C fast as well, I imagine
09:34:28AraqTEttinger: Nim compiles 80K lines in ~4 seconds, that's not the problem at all
09:35:09*HakanD_ joined #nim
09:35:20TEttingerwell then the trick is that TinyCC doesn't have the same behavior with libraries as other compilers...
09:35:41Araqno. the problem is you don't understand REPLs ;-)
09:35:48AraqI didn't either.
09:35:51TEttingerindeed I don't
09:36:04xificurC_feel free to explain them :p
09:36:35Araqthe problem that a REPL solves is changing the code but leaving the data untouched
09:36:50Araqvar someData = readFile("bigfile")
09:37:00yglukhovAraq, how about doing REPL on Nim's own VM?
09:37:03Araq# lots of changes
09:37:16Araq# nevertheless 'someData' remains intact
09:37:22yglukhovand improving Nim's VM to handle more constructs. methods etc.
09:37:24yglukhov=)
09:37:54Araqyglukhov: that's what 'nim i' does, it's too much work.
09:38:32Araqthe VM is as good as it'll get for quite some time. bugs will be fixed, but there will be no FFI support.
09:38:49*HakanD quit (Ping timeout: 264 seconds)
09:39:54xificurC_I guess you'd need more devs
09:40:01yglukhovOk, I'm pretty fine with current VM and REPL missing, if you ask me =)
09:40:27AraqxificurC_: dunno, I implemented FFI support for the VM twice.
09:41:01xificurC_Araq: if you have so much spare time to code nim, what do you live from
09:41:56xificurC_you don't have to answer this one if it's too personal
09:42:12yglukhovBtw, Araq, did you think of splitting Nim to libs? I would love to see a separate lib for codegen, without calling external tools and such. I tried compiling Nim to JS, but apparently there's a lot of stuff tied to FS, processes, etc.
09:42:55AraqxificurC_: it's widely known now how I make money :P
09:43:09*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:43:27*xificurC_ is interested to hear
09:43:58AraqxificurC_: nah screw this. we need more devs. :P
09:44:02yglukhovAnd then, a REPL could be done in JS
09:44:10xificurC_:(
09:45:00*xificurC_ is awaiting queries about Araq's income
09:45:45Araqyglukhov: not sure I get what you mean
09:45:56*BitPuffin joined #nim
09:45:58xificurC_my top tips right now: 1) online hold'em; 2) famous porn star
09:45:59Araqlots of stuff doesn't work with the JS backend
09:47:09Araqyglukhov: you can import compiler/ast.nim, compiler/parser.nim and get a parser for Nim, for instance.
09:47:26yglukhovWell, I would suggest the following stuff. Factor out parsing+semantic+VM+codegen part to a separate lib, that may compile to JS.
09:47:45yglukhov* not stuff, but a plan! =)
09:49:01AraqxificurC_: http://forum.nim-lang.org/t/870
09:49:06*endragor joined #nim
09:49:55Araqyglukhov: but how does a codegen that compiles to C help on the JavaScript platform?
09:50:49yglukhovcan think of any usecase for C codegen. just for consistency, maybe? =)
09:51:14yglukhovbut JS codegen in JS could open some possibilities.
09:52:31*endragor quit (Remote host closed the connection)
09:53:02Araqlike what? most of the stdlib uses some underlying C based library and so cannot be used for the JS target
09:53:32Araqemscripten would be a nice solution I think
09:54:36yglukhovNim is not valuable for it's std lib, imho. It's the language itself that's a great thing.
09:55:22yglukhovE.g, I'm playing with a GUI framework, that may be both native and webgl
09:56:47*endragor joined #nim
09:58:34*endragor quit (Remote host closed the connection)
10:01:03Araqyglukhov: if you like to help, make Nim work with emscripten. Not sure why it doesn't work, my guess would be to replace mmap with malloc in system/alloc.nim
10:01:45*endragor joined #nim
10:07:07*ARCADIVS joined #nim
10:12:41yglukhovAraq, I know nothing about emscripten except it's an LLVM-to-JS compiler. If that's so, why would Nim need it? It already does JS codegen.
10:12:53yglukhovDo you want to get rid of JS codegen?
10:13:12Araqemscripten is a different target really
10:13:17*BitPuffin quit (Remote host closed the connection)
10:13:41Araqthe JS codegen translates Nim into JavaScript Objects
10:13:42*BitPuffin joined #nim
10:13:46*BitPuffin quit (Remote host closed the connection)
10:13:49filwityglukhov: the Nim JS backend doesn't support pointers. the emscripten way does.
10:14:15Araqemscripten compiles it to accesses of a byte array
10:14:42Araqbig difference. this means emscripten is compatible with all that low level hacking that C programs do
10:15:00*ARCADIVS quit (Quit: ARCADIVS)
10:17:14Araqspeaking of which ... why is '--os:emscripten' not supported in platform.nim?
10:17:34filwitthat would be very cool :)
10:17:54Araqfilwit: do it.
10:18:07filwitsigh, one day
10:19:15filwitit's not the most important thing I want to accomplish with Nim, so it'll have to wait.. eventually I definitely do want it though, so if it's not done by that point I'll try my hand at it
10:21:27*isak- joined #nim
10:22:02*isak- quit (Remote host closed the connection)
10:23:09yglukhovErrm... I'm a bit sceptic about emscripten. Maybe I don't know enough though. But if it's needed just to handle low-level stuff (which is unsafe, btw), why bother? A programmer writing low-level stuff should definitely know what he is doing, and how it will compile to JS. No?
10:23:48*BitPuffin|osx joined #nim
10:24:08yglukhovAlso, I suspect, that emscripten generated code would not be readable and comparable to original Nim code?
10:25:40gokremscripten is interesting. I also felt "naaahh" but seeing the demos of Urho3D running perfectly fine inside a browser - well - it kinda seems to be an interesting path for some kind of apps.
10:26:29yglukhovgokr, emscripten is a great project for apps that were written in a non-JS compatible language.
10:26:47yglukhovwhile Nim is pretty compatible, as far as i can see
10:27:38yglukhovthis is all IMHO, of course, I'm not pushing =) Just want to make it clear for myself
10:27:51gokrSure, but lets say... I use a game engine like Urho3D (written in C++ using lots of libs) and Nim. Then... if Nim would produce js on its own - then i would need to figure out how to glue that to "emscripten js".
10:28:15*mnemonikk quit (Ping timeout: 265 seconds)
10:28:20yglukhovgood point.
10:28:33*mnemonikk joined #nim
10:28:40gokrHmmm, but... what was the question now again? Since Nim produces C++ it should all just work with emscripten already.
10:28:57Araqgokr: it doesn't according to filwit
10:29:06gokroh, ok.
10:29:14Araqbut we have theories of why that is
10:29:14*HakanD__ joined #nim
10:29:56gokr(and of course, compiling Nim -> C++ -> js just to be able to run inside V8 in a browser - is of course madness, but hey, the world is mad)
10:31:42*amaurea quit (Ping timeout: 272 seconds)
10:32:13*amaurea joined #nim
10:32:54yglukhovok, do I understand correclty, that the current problem with emscripten is that nim generates C sources, that are incompatible with emscripten?
10:33:26yglukhovdoes nim run emscripten itself somehow?
10:33:30filwityglukhov: emscripten (more specifically, asm.js) should technically be faster, especially for larger applications that move a lot of memory around. Asm.js manages it's own type-safe heap, which can be optimized better by the browser (eventually) and allows you do anything C can (eg, pointers).. so if you're software makes use of those (often the case) you can just target emscripten as a backend and not have to rewrite code (theoretically).
10:33:31filwitby "type-safe" heap, I mean it's specifically working with a byte heap, and not regular JS objects (which are hard to optimize, due to their dynamic nature.. though I'm a bit out-of-the-loop on modern JS optimization).
10:33:31filwitasm.js code is also a "typed" subset of regular Javascript code, eg, it's more of a byte-code than human readable code.. but it means in the future browsers should be able to optimize it much more than regular JS.
10:34:54*HakanD_ quit (Ping timeout: 265 seconds)
10:35:07Araqasm.js is however the weirdest IL on this planet
10:36:06filwitlags...
10:40:59filwityglukhov: i have an Nim -> Emscripten project online you can take a look at: http://reign-studios.net/philipwitte/nimrod/emcc-raytracer/
10:41:30filwityglukhov: unfortunately I messed up the permissions of the site, so you can't view the HTML online right now.. just download the files and run them locally
10:42:14filwitthe makefile gives you a pretty good idea of how to setup Nim -> Emscripten
10:42:49*shodan45 quit (Quit: Konversation terminated!)
10:43:30filwitalso: don't know exactly how new the code is (i have a couple copies of this project locally), so if you end up trying to compile that and it doesn't work, that's why (and I have a version that does work that I could upload)
10:54:23*Sharcho joined #nim
10:56:39*gokr left #nim (#nim)
10:58:42yglukhovfilwit, are you on MacOS?
10:58:47yglukhovcan't get it working
10:59:10filwityglukhov: no, linux
10:59:29filwityou should be able to just open main.html
10:59:52filwit(drag into your browser: Firefox or Chrome only right now, I think)
11:00:21filwitif you're trying to compile it, you'll need to build the latest Emscripten really, and that takes a bit
11:01:20filwitonce you have that installed, you just run 'make' inside the dir and it should rebuild the 'main.html' file
11:05:03yglukhovhm... I can download a bunch of files from your URL, so I've downloaded the zip which is one dir up. and looks like it lacks some files from your url
11:05:03*JinShil joined #nim
11:05:09yglukhovcould you fix it please? =)
11:05:17yglukhova single zip would be nice =)
11:05:23filwityeah, let me zip it up and upload, one sec
11:07:48filwityglukhov: http://www.reign-studios.net/philipwitte/RayTracer_emcc.zip
11:09:00yglukhovOk, i can see a couple of balls. What's the expected result? :)
11:09:05filwityglukhov: inside the main folder there's a 'nimjs' folder which is the same ray-tracer but modified to work with Nim's JS backend instead of Emscripten
11:09:40filwityglukhov: expected result: https://github.com/zezba9000/RayTraceBenchmark/blob/master/ReferenceImage.jpg
11:10:01filwityglukhov: the 'nimjs' version is more accurate than the emcc version
11:10:37filwityglukhov: ps, there's no makefile in the nimjs version, just compile with `$ nim js -d:release main`
11:10:41yglukhovHm.. both versions are far from expected, I'd say =)
11:11:02filwityes, unfortunately :\
11:16:31*mal`` quit (Ping timeout: 248 seconds)
11:17:22*TEttinger quit (Ping timeout: 264 seconds)
11:18:40*mal`` joined #nim
11:21:51*Ven joined #nim
11:22:24*BitPuffin|osx quit (Ping timeout: 250 seconds)
11:23:03*vendethiel joined #nim
11:33:35xificurC_aporia for windows says pcre.dll can be found in nim's repo's dist directory. I can't see a dist directory, nor the mentioned dll
11:40:11*Sharcho quit (Quit: Leaving)
11:45:35yglukhovfilwit, do you know if your raytracer works properly when compiled with C backend?
11:46:40filwityglukhov: yes it does, you can find the native version here: https://github.com/zezba9000/RayTraceBenchmark/tree/master/Nim
11:46:58*leru joined #nim
11:47:09*saml_ joined #nim
12:00:08filwitbbl
12:00:39*Ven quit (Read error: No route to host)
12:02:02*Jesin quit (Read error: Connection reset by peer)
12:03:30*Kingsquee quit (Quit: Konversation terminated!)
12:08:13*vendethiel quit (Ping timeout: 255 seconds)
12:09:45*NimBot joined #nim
12:10:39xificurC_any tips on the dll?
12:20:19*pregressive joined #nim
12:21:59*gokr joined #nim
12:24:07federico3 how can I get an array from a string?
12:25:13*vikaton joined #nim
12:28:14AraqxificurC_: the nim installer ships with that DLL
12:29:43*BlaXpirit joined #nim
12:29:46xificurC_Araq: installer? you mean the windows binaries?
12:30:18Araqhttp://nim-lang.org/download.html
12:30:24xificurC_I compiled from source and would not like to reinstall with an older binary
12:30:27Araq32 bit: nim-0.10.2_x32.exe
12:30:28Araq64 bit: nim-0.10.2_x64.exe
12:30:47Araqwell you can get his DLL from the net too
12:31:15Araqhttp://gnuwin32.sourceforge.net/packages/pcre.htm for instance
12:31:30xificurC_I tried that one but got an error with it
12:31:44xificurC_could not import: pcre_free_substring
12:31:59xificurC_will try the one that comes with the binaries then
12:38:10Araqhrm ok
12:42:35xificurC_Araq: worked with the dll from the binary
12:46:28AraqI wonder where we got that from then :-)
12:46:32Araqbut cool.
12:49:15*mpthrapp joined #nim
12:52:37*saml_ quit (Ping timeout: 264 seconds)
13:16:50*iamd3vil quit (Quit: Leaving)
13:20:32*pregressive quit ()
13:33:04*JinShil quit (Read error: Connection reset by peer)
13:33:19*JinShil joined #nim
13:50:49*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:57:03*banister joined #nim
14:02:30*Ven joined #nim
14:06:11*vendethiel joined #nim
14:06:47*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:07:27*darkf quit (Quit: Leaving)
14:10:48*JinShil quit (Quit: Konversation terminated!)
14:11:45*HakanD__ quit (Quit: Be back later ...)
14:12:55*itPuffinB joined #nim
14:17:26yglukhovaha!
14:17:39yglukhovfixed raytracer =)
14:17:47yglukhovand found a bug in JS codegen =))
14:22:25*itPuffinB is now known as BitPuffin
14:25:04yglukhovfilwit, your raytracer doesn't work with nim's JS codegen because of this: https://github.com/Araq/Nim/issues/2617
14:35:46*HakanD__ joined #nim
14:37:53federico3is there a way to get an array from a string?
14:48:29yglukhovan array of what? ;)
14:49:37yglukhovAraq, is there a reason why operator $ is not defined for unsigned in JS?
14:50:04yglukhovI mean, it definitely seems like so, according to system.nim. But why?
14:52:20Araqyglukhov: JS has no unsigned
14:54:04federico3yglukhov: well, of chars!
14:56:31*key_ joined #nim
14:57:02*askatasuna joined #nim
14:57:08*ChrisMAN joined #nim
14:58:05*vendethiel quit (Ping timeout: 244 seconds)
14:58:17*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:00:06Araqfederico3: what do you need that for? a string is already very array-like
15:01:46federico3to pass it to a posix socket's send
15:02:11Araqcstring(nimstring) works
15:02:20federico3thank you!
15:06:55federico3hm, it works with send(), however SockAddr expects an array for sa_data
15:07:34Araqwell you have copyMem into that field I guess
15:11:06yglukhovfederico3, are you using sockets module from Nim std lib?
15:11:12*iamd3vil joined #nim
15:11:33federico3the posix module from the std lib
15:13:52yglukhovhave you considered using the net module? It's a bit more handy then posix.
15:14:13*banister joined #nim
15:14:18*banister quit (Max SendQ exceeded)
15:14:21federico3I'm writing to a unix domain socket :)
15:15:52yglukhovI think that the net mudule might work for that as well.
15:17:22yglukhovah, however, I'm not sure how to bind with it...
15:32:59*elbow joined #nim
15:39:55*ChrisMAN quit (Remote host closed the connection)
15:43:27*aboisvert joined #nim
15:46:04*ChrisMAN joined #nim
16:01:26*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:04:49*aboisvert quit (Quit: aboisvert)
16:12:35*wb quit (Ping timeout: 264 seconds)
16:12:53*ggVGc quit (Read error: Connection reset by peer)
16:15:44*aboisvert joined #nim
16:17:20*ggVGc joined #nim
16:26:41leruIs it possible to set the path, where the compiled file will be saved? I haven't found it in the compiler user guide.
16:30:07*vendethiel joined #nim
16:30:10*HakanD___ joined #nim
16:32:01*HakanD__ quit (Ping timeout: 256 seconds)
16:35:51*\u joined #nim
16:38:18*endragor quit (Ping timeout: 250 seconds)
16:49:56repaxleru: --nimcache:mydir
16:50:13def-leru: -o
16:50:22repaxleru: or --out:
16:51:44*iamd3vil quit (Ping timeout: 250 seconds)
16:53:09*vendethiel quit (Ping timeout: 245 seconds)
16:56:11lerudef- / repax: thanks, -o / --out does the trick. must have overseen that. sadly it doesn't create the specified folder automatically.
16:57:28*endragor joined #nim
16:58:43repaxleru: Although it is kind of unorthodox I usually create the directory beforehand with a shell script: mkdir -p $BINARIES_DIR
17:04:04*iamd3vil joined #nim
17:07:32*yglukhov quit (Quit: Be back later ...)
17:10:37*endragor quit (Remote host closed the connection)
17:10:45*vendethiel joined #nim
17:11:07*ir2ivps10 quit (Ping timeout: 256 seconds)
17:14:56*endragor joined #nim
17:16:51*EXetoC joined #nim
17:34:20*ir2ivps10 joined #nim
17:37:03*yglukhov joined #nim
17:40:55*gsingh93 joined #nim
17:41:48*OnO joined #nim
17:43:29*wb joined #nim
17:43:35*aboisvert quit (Quit: aboisvert)
17:45:19*aboisvert joined #nim
17:49:43Araqrepax, leru PRs welcome
17:55:06*brson joined #nim
17:55:32*aboisvert quit (Quit: aboisvert)
17:59:13*ir2ivps10 quit (Ping timeout: 264 seconds)
18:10:18leruAraq: Call me stupid, but what are PRs?
18:11:43BlaXpiritleru, https://help.github.com/articles/using-pull-requests/
18:14:41leruI see. If I ever get in touch with the code it will probably destroy the universe. :S
18:17:41ldleworklol
18:23:45*ir2ivps10 joined #nim
18:42:29*HakanD___ quit (Quit: Be back later ...)
18:45:08repaxA reference counted object is prefixed by a Cell header that also contains type information. Is it possible to access this information, saving me a few bytes in not having to include it in the referenced object itself?
18:45:19filwityglukhov: hey, awesome!
18:45:57filwityglukhov: I would love to see the changes you made to fix the ray-tracer (the resulting image looks correct?)
18:52:46*filwit left #nim ("Leaving")
18:52:50*filwit joined #nim
18:56:26*aboisvert joined #nim
18:56:44*OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…)
19:04:19EXetoCleru: just remember to activate the safety mechanism
19:09:10yglukhovfilwit, yes, the result is correct
19:09:30yglukhovjust add the missing fields to Sphere constructors
19:09:38filwitcool :) thanks
19:10:42yglukhovand please confirm it's working for you =)
19:10:58filwityes testing now..
19:11:28*paulmadore joined #nim
19:12:51filwityglukhov: it works!
19:12:59yglukhovgreat! =)
19:13:29filwitthis is great! I didn't think it was such a simple fix, thanks for looking into this.
19:14:30*paulmadore left #nim ("Leaving")
19:14:40leruEXetoC: Please don't tell me anything about any mechanisms. I can't even compile the nim compiler. x(
19:16:12yglukhovwhen the same code behaves differently for C and JS it's usually pretty simple to trace down the difference.
19:16:25yglukhov* from my experience with nim =)
19:18:02ldleworkhttp://www.polyglotweekly.com/2015/04/24/thoughts-of-a-rustacean-learning-go.html
19:18:40*endragor quit (Remote host closed the connection)
19:20:16filwitit's interesting.. the JS ray-tracer runs faster than the Mono version..
19:23:44*HakanD___ joined #nim
19:24:15filwitat least on Chrome's V8 JS engine.. Firefox is over twice as slow as Chrome
19:24:51yglukhovdo you test a cold run? or subsequent runs?
19:25:44yglukhovchrome might run jit early
19:25:56filwitwell good point, I need to add these changes to the official repo code which has an 'average runs' setting to run 20 times for more accurate results
19:27:32filwitactually i think that's in the code there already.. just compile with "-d:{release,avgRuns}
19:29:02yglukhovalso maybe it's worth not counting the first run at all...
19:29:05filwitit's really great to see somewhat complex math Nim code fully working in JS. This means the JS backend is definitely useful, especially once the bug is fixed (I think I'll take a look at that later).
19:29:38yglukhovfilwit, you might want to have a look at my nimx pet project.
19:29:46filwitgot a link?
19:29:47yglukhovyglukhov/nimx
19:29:55yglukhovthen nimble install
19:29:57yglukhovthen nake js
19:30:34yglukhovthere's a whole bunch of matrixes, opengl, stencil buffers, font textures, etc =)
19:30:40yglukhovall working just fine =)
19:30:55yglukhov* with latest nim devel =)
19:31:29filwitoh, very cool :) I didn't release someone had already got all that compiling with the JS backend
19:32:40*HakanD___ quit (Quit: Be back later ...)
19:32:42filwitwoah what? you can use `asm` to inject native JS code? that's cool..
19:34:47yglukhovyeah. it has some gotchas though, like don't refer global vars from that asm code, but otherwise very handy
19:36:45*BitPuffin quit (Ping timeout: 256 seconds)
19:38:56*wb quit (Ping timeout: 240 seconds)
19:43:40*banister joined #nim
19:51:41*HakanD___ joined #nim
19:54:43*Senketsu quit (Read error: Connection reset by peer)
19:58:27*aboisvert quit (Quit: aboisvert)
20:01:16*aboisvert joined #nim
20:06:12*Senketsu joined #nim
20:12:00*Matthias247 joined #nim
20:17:07*thotypous quit (Quit: WeeChat 1.1.1)
20:17:32*thotypous joined #nim
20:17:51*iamd3vil quit (Ping timeout: 276 seconds)
20:18:12*BlaXpirit quit (Read error: Connection reset by peer)
20:19:10*BlaXpirit joined #nim
20:37:50*Kingsquee joined #nim
20:38:41*renesac joined #nim
20:48:46*Demon_Fox joined #nim
20:52:28*HakanD___ quit (Quit: Be back later ...)
20:58:25*mpthrapp quit (Remote host closed the connection)
21:01:57*filcuc joined #nim
21:25:01*ingsoc quit (Quit: Leaving.)
21:26:29*BlaXpirit quit (Quit: Quit Konversation)
21:27:13*leru quit (Ping timeout: 246 seconds)
21:36:42*yglukhov quit (Quit: Be back later ...)
21:36:43*Jesin joined #nim
22:06:31*filcuc quit (Quit: Konversation terminated!)
22:07:12*vendethiel quit (Ping timeout: 250 seconds)
22:24:25*johnsoft quit (Ping timeout: 264 seconds)
22:24:47*johnsoft joined #nim
22:37:23*EXetoC quit (Quit: WeeChat 1.1.1)
22:54:32federico3would you guys be interested in a syslog module?
23:04:50*Matthias247 quit (Read error: Connection reset by peer)
23:07:33*saml_ joined #nim
23:14:45*TEttinger joined #nim
23:14:59*brson quit (Quit: leaving)
23:18:49*BitPuffin|osx joined #nim
23:20:08*Trustable quit (Remote host closed the connection)
23:30:24Joe-Thmm would nim be good for a web server that does reactjs server side rendering then
23:31:08Joe-TI wanted to do that for a site, so for users that don't have javascript, they can just load a new page with the results applied by the server
23:33:12dom96federico3: We are interested in all modules.
23:40:03*brson joined #nim
23:40:10federico3should this be linked in the wiki? http://hookrace.net/blog/what-is-special-about-nim/
23:40:23federico3maybe in a "introductory links" page?
23:43:17def-federico3: I won't object to that
23:44:18federico3Then I will refer to that
23:53:03*HakanD___ joined #nim
23:57:25*HakanD___ quit (Ping timeout: 255 seconds)
23:57:36*Sembei joined #nim