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:34 | transfuturist | echo isn't working in macros anymore for some reason |
00:30:42 | Varriount | transfuturist: Can you test which revision it broke at? |
00:32:38 | Varriount | (And possible document how to test the compiler with git bisect? |
00:32:39 | * | ChrisMAN quit (Ping timeout: 256 seconds) |
00:32:48 | Varriount | *and if possible |
00:34:44 | transfuturist | sure |
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:04 | transfuturist | not sure how to do it |
00:41:06 | transfuturist | lib/system.nim(1659, 38) Warning: unknown magic 'MaxI64' might crash the compiler [UnknownMagic] |
00:41:10 | transfuturist | lib/system.nim(666, 6) Error: implementation of 'system.+(x: int64)' expected |
00:41:12 | transfuturist | FAILURE |
00:46:30 | Varriount | transfuturist: Hm. It would probably require a complex script (to take into account downloading csources) |
00:46:43 | transfuturist | nah, i just switched from koch temp to koch boot |
00:47:29 | transfuturist | aaaand it stopped working |
00:47:43 | Varriount | ;O |
00:49:24 | transfuturist | i have no idea what i'm doing |
01:11:45 | * | BitPuffin quit (Ping timeout: 256 seconds) |
01:26:57 | onionhammer | varriount what are you trying to finish before releasing? |
01:32:35 | * | transfuturist quit (Quit: leaving) |
01:39:28 | Varriount | onionhammer: The college semester. I would release it now, If I had the time. |
01:43:30 | onionhammer | 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:48 | filwit | transfuturist: 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:17 | HakanD__ | 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:44 | iamd3vil | Hi 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:01 | iamd3vil | Can anyone help? |
07:45:21 | novist | sounds like a crash |
07:46:32 | def- | iamd3vil: what compiler version? tried the devel branch? |
07:47:07 | iamd3vil | def- : I am running the compiler from devel branch |
07:47:58 | iamd3vil | def-: Compiler version is 0.10.3 |
07:48:33 | iamd3vil | I tried importing this in two different systems both running Ubuntu 14.04 and the same thing happens. |
07:52:56 | def- | strange, works for me. Did you by chance install Nim? |
07:53:08 | def- | instead of running it in a local directory |
07:55:34 | iamd3vil | def-: 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:54 | iamd3vil | After showing "No stack traceback is available" it is saying that "To create a stacktrace, rerun compilation with ./koch temp i <file>" |
07:59:08 | def- | 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:38 | iamd3vil | def-: Do I have to provide a file name or just type the command? |
08:00:55 | * | banister joined #nim |
08:01:13 | iamd3vil | I tried running that command and it says "bash: syntax error near unexpected token `newline'" |
08:04:52 | def- | filename |
08:05:03 | def- | <file> should be the file you're using |
08:05:18 | xificurC_ | 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:12 | xificurC_ | randomly browsing through nim source code and wondering, is this proc needed? |
08:17:13 | xificurC_ | https://github.com/Araq/Nim/blob/devel/compiler/ropes.nim#L111 |
08:17:48 | def- | Just to make sure the ropes aren't corrupted |
08:19:40 | xificurC_ | def-: and how does that check work, all I see is if condition then true else true |
08:20:52 | def- | oh right, that should probably be fixed |
08:21:24 | xificurC_ | def-: fixed as in removed as deprecated or the else branch needs a rewrite |
08:22:26 | def- | 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:32 | xificurC_ | 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:02 | xificurC_ | how can I know if the compilation finished successfully? |
08:29:31 | def- | I guess for some reason they may never be equal on windows |
08:29:49 | def- | the output looks ok, but I'm wondering why there isn't more diagnostics |
08:30:20 | xificurC_ | I only copied the last couple of lines |
08:30:43 | xificurC_ | never equal? Ain't that just the way windows is.. |
08:32:23 | * | ingsoc joined #nim |
08:33:07 | * | Sembei joined #nim |
08:33:22 | xificurC_ | if anyone is interested here is a cloc run on the latest devel branch with a custom definition for nim code |
08:33:24 | xificurC_ | http://sprunge.us/IDCg |
08:39:03 | * | iamd3vil joined #nim |
08:40:09 | iamd3vil | xificurC_ : I have cloned and then compiled it. I have followed the instructions given at http://nim-lang.org/download.html |
08:40:17 | HakanD_ | hey, i was looking for nim definitions for cloc |
08:40:44 | HakanD_ | xificurC_: btw it is a blank page for me |
08:41:35 | * | Sembei quit (Quit: WeeChat 1.1.1) |
08:41:46 | xificurC_ | HakanD_: I just wrote a crude definition |
08:41:51 | xificurC_ | blank? strange |
08:41:53 | HakanD_ | iamd3vil: can you show us your code? |
08:42:42 | iamd3vil | Sorry if this question is stupid. Can i paste the code somewhere else and provide you the link? |
08:42:59 | xificurC_ | HakanD_: http://lpaste.net/131619 |
08:43:00 | HakanD_ | iamd3vil: yup, that's the preferred way |
08:43:40 | HakanD_ | xificurC_: that's cool |
08:43:58 | xificurC_ | HakanD_: this is the definition I wrote |
08:44:01 | xificurC_ | http://lpaste.net/131620 |
08:44:08 | HakanD_ | iamd3vil: you can use gist.github.com, or some pastebin or whatever they are called |
08:44:34 | HakanD_ | xificurC_: thank you |
08:44:37 | iamd3vil | here is my code - http://pastebin.com/rE2Eg5qb |
08:44:50 | xificurC_ | I guess the high level of C code is from tynic? |
08:45:37 | xificurC_ | tinyc too |
08:46:00 | HakanD_ | on github its Nimrod 77.5% C 18.1% |
08:46:14 | xificurC_ | iamd3vil: did you use master or devel branch |
08:47:00 | iamd3vil | xificurC_: I used the devel branch |
08:48:14 | xificurC_ | HakanD_: strange, the file count is similar |
08:50:10 | HakanD_ | iamd3vil: "output_tuple: tuple" tuple is not a concrete type by itself |
08:50:15 | HakanD_ | and nim can infer types |
08:50:17 | HakanD_ | https://gist.github.com/hakanderyal/618364b6f765f3a96abf |
08:50:20 | HakanD_ | this one works |
08:52:22 | * | EastByte joined #nim |
08:52:49 | HakanD_ | agreed that "Error: internal error: getUniqueType" is not the best error message for newcomers |
08:53:32 | iamd3vil | HakanD_: 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:32 | HakanD_ | http://nim-lang.org/manual.html#tuples-and-object-types |
08:54:44 | * | Tennis quit (Read error: Connection reset by peer) |
08:54:58 | HakanD_ | http://nim-lang.org/documentation.html reading docs is generally a good way to learn (: |
08:55:28 | * | Ven joined #nim |
08:55:49 | HakanD_ | https://nim-by-example.github.io/getting_started/ this page is good for basics also |
08:57:02 | HakanD_ | tuple in nim is not the same thing as in python |
08:57:47 | iamd3vil | HakanD_: Ok. I am actually reading them. I thought tuple in nim is the same thing in python. My bad. |
08:58:06 | HakanD_ | there is sequence, and array in nim for sequence types |
08:58:26 | HakanD_ | and var, let for mutability, immutability |
08:58:28 | * | ggVGc is now known as functional_duck |
08:59:08 | iamd3vil | HakanD_: 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:23 | HakanD_ | interactive mod is not supported anymore |
08:59:43 | HakanD_ | so, don't use it :p |
09:00:35 | xificurC_ | too bad there is no repl in the core |
09:00:51 | iamd3vil | HakanD_: 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:22 | def- | 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:25 | xificurC | def-: 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:37 | xificurC | def-: 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:46 | xificurC | or is a repl usually ran against an interpreter |
09:18:02 | * | OnwardEuler joined #nim |
09:18:02 | Araq | xificurC: I don't know why it's never equal on windows but iirc it's also never equal for clang either |
09:18:52 | Araq | timestamps etc in the .exe |
09:18:53 | Araq | and clang does unpredictable linking as it's threaded I think |
09:19:38 | * | xificurC_ joined #nim |
09:19:58 | * | milosn joined #nim |
09:20:09 | xificurC_ | dc'd |
09:20:33 | * | yglukhov quit (Quit: Lingo: www.lingoirc.com) |
09:20:48 | * | yglukhov joined #nim |
09:21:01 | def- | 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:18 | xificurC_ | 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:55 | Araq | well things are easier when you have a native codgen. which Ocaml does have. |
09:25:42 | xificurC_ | Araq: don't you have nim->c->native? |
09:26:15 | Araq | yeah but essentially you need a JIT-like component |
09:26:53 | Araq | you can get that from a native codegen, but it's some effort too |
09:27:14 | Araq | with an intermediate C step it's harder |
09:29:02 | xificurC_ | I see |
09:31:34 | * | OnwardEuler quit (Read error: Connection reset by peer) |
09:31:46 | * | iamd3vil joined #nim |
09:32:55 | TEttinger | TinyCC is pretty fast at compiling C though |
09:33:10 | TEttinger | the trick is compiling the Nim to C fast as well, I imagine |
09:34:28 | Araq | TEttinger: Nim compiles 80K lines in ~4 seconds, that's not the problem at all |
09:35:09 | * | HakanD_ joined #nim |
09:35:20 | TEttinger | well then the trick is that TinyCC doesn't have the same behavior with libraries as other compilers... |
09:35:41 | Araq | no. the problem is you don't understand REPLs ;-) |
09:35:48 | Araq | I didn't either. |
09:35:51 | TEttinger | indeed I don't |
09:36:04 | xificurC_ | feel free to explain them :p |
09:36:35 | Araq | the problem that a REPL solves is changing the code but leaving the data untouched |
09:36:50 | Araq | var someData = readFile("bigfile") |
09:37:00 | yglukhov | Araq, how about doing REPL on Nim's own VM? |
09:37:03 | Araq | # lots of changes |
09:37:16 | Araq | # nevertheless 'someData' remains intact |
09:37:22 | yglukhov | and improving Nim's VM to handle more constructs. methods etc. |
09:37:24 | yglukhov | =) |
09:37:54 | Araq | yglukhov: that's what 'nim i' does, it's too much work. |
09:38:32 | Araq | the 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:54 | xificurC_ | I guess you'd need more devs |
09:40:01 | yglukhov | Ok, I'm pretty fine with current VM and REPL missing, if you ask me =) |
09:40:27 | Araq | xificurC_: dunno, I implemented FFI support for the VM twice. |
09:41:01 | xificurC_ | Araq: if you have so much spare time to code nim, what do you live from |
09:41:56 | xificurC_ | you don't have to answer this one if it's too personal |
09:42:12 | yglukhov | Btw, 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:55 | Araq | xificurC_: 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:58 | Araq | xificurC_: nah screw this. we need more devs. :P |
09:44:02 | yglukhov | And then, a REPL could be done in JS |
09:44:10 | xificurC_ | :( |
09:45:00 | * | xificurC_ is awaiting queries about Araq's income |
09:45:45 | Araq | yglukhov: not sure I get what you mean |
09:45:56 | * | BitPuffin joined #nim |
09:45:58 | xificurC_ | my top tips right now: 1) online hold'em; 2) famous porn star |
09:45:59 | Araq | lots of stuff doesn't work with the JS backend |
09:47:09 | Araq | yglukhov: you can import compiler/ast.nim, compiler/parser.nim and get a parser for Nim, for instance. |
09:47:26 | yglukhov | Well, I would suggest the following stuff. Factor out parsing+semantic+VM+codegen part to a separate lib, that may compile to JS. |
09:47:45 | yglukhov | * not stuff, but a plan! =) |
09:49:01 | Araq | xificurC_: http://forum.nim-lang.org/t/870 |
09:49:06 | * | endragor joined #nim |
09:49:55 | Araq | yglukhov: but how does a codegen that compiles to C help on the JavaScript platform? |
09:50:49 | yglukhov | can think of any usecase for C codegen. just for consistency, maybe? =) |
09:51:14 | yglukhov | but JS codegen in JS could open some possibilities. |
09:52:31 | * | endragor quit (Remote host closed the connection) |
09:53:02 | Araq | like what? most of the stdlib uses some underlying C based library and so cannot be used for the JS target |
09:53:32 | Araq | emscripten would be a nice solution I think |
09:54:36 | yglukhov | Nim is not valuable for it's std lib, imho. It's the language itself that's a great thing. |
09:55:22 | yglukhov | E.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:03 | Araq | yglukhov: 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:41 | yglukhov | Araq, 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:53 | yglukhov | Do you want to get rid of JS codegen? |
10:13:12 | Araq | emscripten is a different target really |
10:13:17 | * | BitPuffin quit (Remote host closed the connection) |
10:13:41 | Araq | the 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:49 | filwit | yglukhov: the Nim JS backend doesn't support pointers. the emscripten way does. |
10:14:15 | Araq | emscripten compiles it to accesses of a byte array |
10:14:42 | Araq | big 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:14 | Araq | speaking of which ... why is '--os:emscripten' not supported in platform.nim? |
10:17:34 | filwit | that would be very cool :) |
10:17:54 | Araq | filwit: do it. |
10:18:07 | filwit | sigh, one day |
10:19:15 | filwit | it'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:09 | yglukhov | Errm... 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:08 | yglukhov | Also, I suspect, that emscripten generated code would not be readable and comparable to original Nim code? |
10:25:40 | gokr | emscripten 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:29 | yglukhov | gokr, emscripten is a great project for apps that were written in a non-JS compatible language. |
10:26:47 | yglukhov | while Nim is pretty compatible, as far as i can see |
10:27:38 | yglukhov | this is all IMHO, of course, I'm not pushing =) Just want to make it clear for myself |
10:27:51 | gokr | Sure, 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:20 | yglukhov | good point. |
10:28:33 | * | mnemonikk joined #nim |
10:28:40 | gokr | Hmmm, but... what was the question now again? Since Nim produces C++ it should all just work with emscripten already. |
10:28:57 | Araq | gokr: it doesn't according to filwit |
10:29:06 | gokr | oh, ok. |
10:29:14 | Araq | but we have theories of why that is |
10:29:14 | * | HakanD__ joined #nim |
10:29:56 | gokr | (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:54 | yglukhov | ok, do I understand correclty, that the current problem with emscripten is that nim generates C sources, that are incompatible with emscripten? |
10:33:26 | yglukhov | does nim run emscripten itself somehow? |
10:33:30 | filwit | yglukhov: 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:31 | filwit | by "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:31 | filwit | asm.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:07 | Araq | asm.js is however the weirdest IL on this planet |
10:36:06 | filwit | lags... |
10:40:59 | filwit | yglukhov: i have an Nim -> Emscripten project online you can take a look at: http://reign-studios.net/philipwitte/nimrod/emcc-raytracer/ |
10:41:30 | filwit | yglukhov: 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:14 | filwit | the makefile gives you a pretty good idea of how to setup Nim -> Emscripten |
10:42:49 | * | shodan45 quit (Quit: Konversation terminated!) |
10:43:30 | filwit | also: 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:42 | yglukhov | filwit, are you on MacOS? |
10:58:47 | yglukhov | can't get it working |
10:59:10 | filwit | yglukhov: no, linux |
10:59:29 | filwit | you should be able to just open main.html |
10:59:52 | filwit | (drag into your browser: Firefox or Chrome only right now, I think) |
11:00:21 | filwit | if you're trying to compile it, you'll need to build the latest Emscripten really, and that takes a bit |
11:01:20 | filwit | once you have that installed, you just run 'make' inside the dir and it should rebuild the 'main.html' file |
11:05:03 | yglukhov | hm... 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:09 | yglukhov | could you fix it please? =) |
11:05:17 | yglukhov | a single zip would be nice =) |
11:05:23 | filwit | yeah, let me zip it up and upload, one sec |
11:07:48 | filwit | yglukhov: http://www.reign-studios.net/philipwitte/RayTracer_emcc.zip |
11:09:00 | yglukhov | Ok, i can see a couple of balls. What's the expected result? :) |
11:09:05 | filwit | yglukhov: 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:40 | filwit | yglukhov: expected result: https://github.com/zezba9000/RayTraceBenchmark/blob/master/ReferenceImage.jpg |
11:10:01 | filwit | yglukhov: the 'nimjs' version is more accurate than the emcc version |
11:10:37 | filwit | yglukhov: ps, there's no makefile in the nimjs version, just compile with `$ nim js -d:release main` |
11:10:41 | yglukhov | Hm.. both versions are far from expected, I'd say =) |
11:11:02 | filwit | yes, 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:35 | xificurC_ | 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:35 | yglukhov | filwit, do you know if your raytracer works properly when compiled with C backend? |
11:46:40 | filwit | yglukhov: 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:08 | filwit | bbl |
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:39 | xificurC_ | any tips on the dll? |
12:20:19 | * | pregressive joined #nim |
12:21:59 | * | gokr joined #nim |
12:24:07 | federico3 | how can I get an array from a string? |
12:25:13 | * | vikaton joined #nim |
12:28:14 | Araq | xificurC_: the nim installer ships with that DLL |
12:29:43 | * | BlaXpirit joined #nim |
12:29:46 | xificurC_ | Araq: installer? you mean the windows binaries? |
12:30:18 | Araq | http://nim-lang.org/download.html |
12:30:24 | xificurC_ | I compiled from source and would not like to reinstall with an older binary |
12:30:27 | Araq | 32 bit: nim-0.10.2_x32.exe |
12:30:28 | Araq | 64 bit: nim-0.10.2_x64.exe |
12:30:47 | Araq | well you can get his DLL from the net too |
12:31:15 | Araq | http://gnuwin32.sourceforge.net/packages/pcre.htm for instance |
12:31:30 | xificurC_ | I tried that one but got an error with it |
12:31:44 | xificurC_ | could not import: pcre_free_substring |
12:31:59 | xificurC_ | will try the one that comes with the binaries then |
12:38:10 | Araq | hrm ok |
12:42:35 | xificurC_ | Araq: worked with the dll from the binary |
12:46:28 | Araq | I wonder where we got that from then :-) |
12:46:32 | Araq | but 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:26 | yglukhov | aha! |
14:17:39 | yglukhov | fixed raytracer =) |
14:17:47 | yglukhov | and found a bug in JS codegen =)) |
14:22:25 | * | itPuffinB is now known as BitPuffin |
14:25:04 | yglukhov | filwit, 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:53 | federico3 | is there a way to get an array from a string? |
14:48:29 | yglukhov | an array of what? ;) |
14:49:37 | yglukhov | Araq, is there a reason why operator $ is not defined for unsigned in JS? |
14:50:04 | yglukhov | I mean, it definitely seems like so, according to system.nim. But why? |
14:52:20 | Araq | yglukhov: JS has no unsigned |
14:54:04 | federico3 | yglukhov: 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:06 | Araq | federico3: what do you need that for? a string is already very array-like |
15:01:46 | federico3 | to pass it to a posix socket's send |
15:02:11 | Araq | cstring(nimstring) works |
15:02:20 | federico3 | thank you! |
15:06:55 | federico3 | hm, it works with send(), however SockAddr expects an array for sa_data |
15:07:34 | Araq | well you have copyMem into that field I guess |
15:11:06 | yglukhov | federico3, are you using sockets module from Nim std lib? |
15:11:12 | * | iamd3vil joined #nim |
15:11:33 | federico3 | the posix module from the std lib |
15:13:52 | yglukhov | have 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:21 | federico3 | I'm writing to a unix domain socket :) |
15:15:52 | yglukhov | I think that the net mudule might work for that as well. |
15:17:22 | yglukhov | ah, 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:41 | leru | Is 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:56 | repax | leru: --nimcache:mydir |
16:50:13 | def- | leru: -o |
16:50:22 | repax | leru: or --out: |
16:51:44 | * | iamd3vil quit (Ping timeout: 250 seconds) |
16:53:09 | * | vendethiel quit (Ping timeout: 245 seconds) |
16:56:11 | leru | def- / 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:43 | repax | leru: 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:43 | Araq | repax, 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:18 | leru | Araq: Call me stupid, but what are PRs? |
18:11:43 | BlaXpirit | leru, https://help.github.com/articles/using-pull-requests/ |
18:14:41 | leru | I see. If I ever get in touch with the code it will probably destroy the universe. :S |
18:17:41 | ldlework | lol |
18:23:45 | * | ir2ivps10 joined #nim |
18:42:29 | * | HakanD___ quit (Quit: Be back later ...) |
18:45:08 | repax | A 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:19 | filwit | yglukhov: hey, awesome! |
18:45:57 | filwit | yglukhov: 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:19 | EXetoC | leru: just remember to activate the safety mechanism |
19:09:10 | yglukhov | filwit, yes, the result is correct |
19:09:30 | yglukhov | just add the missing fields to Sphere constructors |
19:09:38 | filwit | cool :) thanks |
19:10:42 | yglukhov | and please confirm it's working for you =) |
19:10:58 | filwit | yes testing now.. |
19:11:28 | * | paulmadore joined #nim |
19:12:51 | filwit | yglukhov: it works! |
19:12:59 | yglukhov | great! =) |
19:13:29 | filwit | this 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:40 | leru | EXetoC: Please don't tell me anything about any mechanisms. I can't even compile the nim compiler. x( |
19:16:12 | yglukhov | when the same code behaves differently for C and JS it's usually pretty simple to trace down the difference. |
19:16:25 | yglukhov | * from my experience with nim =) |
19:18:02 | ldlework | http://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:16 | filwit | it's interesting.. the JS ray-tracer runs faster than the Mono version.. |
19:23:44 | * | HakanD___ joined #nim |
19:24:15 | filwit | at least on Chrome's V8 JS engine.. Firefox is over twice as slow as Chrome |
19:24:51 | yglukhov | do you test a cold run? or subsequent runs? |
19:25:44 | yglukhov | chrome might run jit early |
19:25:56 | filwit | well 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:32 | filwit | actually i think that's in the code there already.. just compile with "-d:{release,avgRuns} |
19:29:02 | yglukhov | also maybe it's worth not counting the first run at all... |
19:29:05 | filwit | it'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:38 | yglukhov | filwit, you might want to have a look at my nimx pet project. |
19:29:46 | filwit | got a link? |
19:29:47 | yglukhov | yglukhov/nimx |
19:29:55 | yglukhov | then nimble install |
19:29:57 | yglukhov | then nake js |
19:30:34 | yglukhov | there's a whole bunch of matrixes, opengl, stencil buffers, font textures, etc =) |
19:30:40 | yglukhov | all working just fine =) |
19:30:55 | yglukhov | * with latest nim devel =) |
19:31:29 | filwit | oh, 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:42 | filwit | woah what? you can use `asm` to inject native JS code? that's cool.. |
19:34:47 | yglukhov | yeah. 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:32 | federico3 | would 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:24 | Joe-T | hmm would nim be good for a web server that does reactjs server side rendering then |
23:31:08 | Joe-T | I 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:12 | dom96 | federico3: We are interested in all modules. |
23:40:03 | * | brson joined #nim |
23:40:10 | federico3 | should this be linked in the wiki? http://hookrace.net/blog/what-is-special-about-nim/ |
23:40:23 | federico3 | maybe in a "introductory links" page? |
23:43:17 | def- | federico3: I won't object to that |
23:44:18 | federico3 | Then 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 |