00:00:09 | gokr | def-: Don't call Andreas Araq in the application :) |
00:00:40 | gokr | def-: I can give more feedback privately also |
00:03:56 | matkuki | Araq: Have I told you how much I love Nim. Really glad you made it. I use it every chance I get. |
00:04:14 | * | EulersBackup joined #nim |
00:04:23 | Araq | I don't think so. Thanks. :-) |
00:04:53 | Araq | hi EulersBackup wb |
00:05:22 | * | OnwardEuler quit (Ping timeout: 250 seconds) |
00:05:51 | * | reem joined #nim |
00:08:35 | * | vendethiel joined #nim |
00:17:00 | * | johnsoft quit (Read error: Connection reset by peer) |
00:22:50 | gokr | flaviu: First fork! :) |
00:24:46 | * | Jesin joined #nim |
00:26:05 | flaviu | gokr: It's traditional to start with a typo fix PR :P |
00:26:27 | * | reem quit (Remote host closed the connection) |
00:30:07 | * | reem joined #nim |
00:30:56 | * | perturbation joined #nim |
00:31:21 | * | vendethiel quit (Ping timeout: 256 seconds) |
00:35:20 | Araq | hrm swf converts a 400MB avi to a 200MB swf |
00:35:33 | Araq | but the quality is absurd |
00:38:42 | * | matkuki quit (Quit: ChatZilla 0.9.91.1 [Firefox 35.0.1/20150122214805]) |
00:38:50 | * | vendethiel joined #nim |
00:43:00 | flaviu | Araq: Use mpeg. |
00:43:40 | * | JinShil joined #nim |
00:45:01 | Araq | flaviu: too late |
00:45:02 | Araq | https://www.youtube.com/watch?v=-T0MrJkLB8Y&feature=youtu.be |
00:45:09 | * | filwit joined #nim |
00:45:44 | gokr | Wow, did you guys read jwecker's post on https://news.ycombinator.com/item?id=9049698 ? |
00:45:52 | gokr | That was interesting. |
00:47:57 | gokr | Araq: Already works to google "Urhonimo" :) |
00:48:25 | Araq | gokr: watch my awesome vid! |
00:48:42 | gokr | Way ahead of you. Spielberg all over. |
00:48:48 | filwit | congrats on the release of Urhonimo, Araq |
00:48:52 | Araq | my very first youtube video |
00:48:52 | filwit | (and gokr) |
00:48:59 | gokr | Yeah, its fun stuff |
00:49:17 | Araq | tried to jump onto that box |
00:49:21 | Araq | and failed :P |
00:49:26 | gokr | Hehe |
00:50:31 | Araq | filwit: will you be here tomorrow? it's late so I'll merge and upload the website changes tomorrow |
00:50:33 | gokr | Of course, Urhonimo is all Andreas. I just tested and harassed him with errors |
00:50:57 | gokr | gnite folks |
00:50:59 | filwit | Araq: i'll be here tomorrow, was busy today |
00:51:15 | filwit | Araq: no rush on the PR though, take your time |
00:51:42 | perturbation | the character kind of reminds me of the engineer from Prometheus |
00:52:55 | Araq | perturbation: yeah, I thought the same, lol |
00:55:54 | * | reem quit (Remote host closed the connection) |
00:56:31 | * | reem joined #nim |
00:59:23 | * | gokr quit (Ping timeout: 246 seconds) |
01:00:32 | * | irrequietus quit () |
01:01:53 | Araq | good night |
01:01:57 | * | vendethiel quit (Ping timeout: 245 seconds) |
01:06:30 | perturbation | 'night Araq - Urhonimo looks really cool (and I'm really excited about the improved C++ wrapping) |
01:08:57 | dom96 | Araq: That looks awesome. That character really needs some clothes on though lol. |
01:10:48 | dom96 | def-: I found and fixed a little spelling mistake. |
01:12:19 | * | perturbation quit (Ping timeout: 245 seconds) |
01:13:08 | dom96 | def-: Here is last year's application, maybe you could get some ideas out of it: https://gist.github.com/dom96/f24b4e82fce7d46c57ec |
01:15:33 | * | johnsoft joined #nim |
01:22:03 | dom96 | yay, I get to ban the first spammer. |
01:22:13 | * | reem quit (Remote host closed the connection) |
01:22:26 | * | darkf joined #nim |
01:23:40 | reactormonk | Araq, how far away until we can use the javascript backend to compile the compiler? |
01:24:50 | Araq | reactormonk: I'm sleeping. |
01:25:03 | reactormonk | Araq, you seem to be a rather active sleeper. |
01:25:26 | Araq | how far away? 2 months of hard intensive work. |
01:25:42 | * | wb quit (Read error: Connection reset by peer) |
01:25:49 | Araq | and yes, I totally made that up. |
01:26:27 | filwit | i wonder if my Nim -> ECC raytrace benchmark would run correctly with 0.10... |
01:27:14 | filwit | anyways, g2g |
01:27:15 | * | filwit quit (Quit: Leaving) |
01:27:31 | * | reem joined #nim |
01:29:01 | * | reem quit (Remote host closed the connection) |
01:30:27 | reactormonk | dom96, did you build the IRC eval stuff? |
01:30:35 | dom96 | reactormonk: nope |
01:31:06 | dom96 | Araq: I'm trying to nimble install urhonimo but it's not working! |
01:31:53 | reactormonk | now that's an accurate problem description /s |
01:31:58 | flaviu | reactormonk: dtscode did that |
01:32:00 | Varriount | dom96: What error do you get? |
01:32:20 | reactormonk | flaviu, nice |
01:32:36 | dom96 | Varriount: FAILURE: Package not found. |
01:32:59 | * | Trustable quit (Quit: Leaving) |
01:33:41 | flaviu | dom96: Well, you're the expert :P |
01:33:48 | Varriount | dom96: Maybe because it hasn't been added to the package list? |
01:34:00 | dom96 | Varriount: Precisely. |
01:37:14 | flaviu | dom96: Shouldn't the issue on the packages repo be migrated to nimble? |
01:39:35 | dom96 | probably yeah |
01:41:26 | * | vendethiel joined #nim |
01:55:10 | onionhammer | Varriount u around? |
02:00:13 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
02:01:39 | * | reem joined #nim |
02:06:32 | * | vendethiel quit (Ping timeout: 245 seconds) |
02:11:04 | * | vendethiel joined #nim |
02:13:32 | * | reem quit (Remote host closed the connection) |
02:14:00 | * | chemist69_ joined #nim |
02:16:39 | * | bjz joined #nim |
02:16:54 | * | chemist69 quit (Ping timeout: 245 seconds) |
02:23:25 | * | perturbation joined #nim |
02:24:10 | * | reem joined #nim |
02:33:53 | * | vendethiel quit (Ping timeout: 244 seconds) |
02:40:48 | * | VinceAddons quit (Read error: Connection reset by peer) |
02:44:06 | * | vendethiel joined #nim |
02:55:15 | * | JinShil quit (Quit: Konversation terminated!) |
03:05:58 | * | vendethiel quit (Ping timeout: 252 seconds) |
03:13:10 | * | vendethiel joined #nim |
03:17:23 | * | reem quit (Read error: Connection reset by peer) |
03:17:59 | * | reem joined #nim |
03:18:21 | * | perturbation quit (Quit: goodnight everyone) |
03:18:28 | * | JinShil joined #nim |
03:32:00 | * | reem quit (Remote host closed the connection) |
03:36:13 | * | vendethiel quit (Ping timeout: 245 seconds) |
03:38:00 | * | vendethiel joined #nim |
03:41:04 | * | infinity0 quit (Ping timeout: 255 seconds) |
03:41:08 | * | infinity0_ joined #nim |
03:41:08 | * | infinity0_ quit (Changing host) |
03:41:08 | * | infinity0_ joined #nim |
03:41:08 | * | infinity0_ is now known as infinity0 |
03:42:21 | * | reem joined #nim |
04:22:05 | * | vendethiel quit (Ping timeout: 246 seconds) |
04:24:48 | * | reem quit (Remote host closed the connection) |
04:29:13 | * | reem_ joined #nim |
04:31:26 | * | vendethiel joined #nim |
04:53:37 | * | vendethiel quit (Ping timeout: 252 seconds) |
04:54:14 | * | Associat0r joined #nim |
04:57:51 | * | JinShil quit (Quit: Konversation terminated!) |
05:09:36 | * | shevy joined #nim |
05:16:57 | * | Sornaensis quit (Excess Flood) |
05:17:16 | * | reem_ is now known as reem |
05:17:39 | * | Sornaensis joined #nim |
05:30:08 | * | vendethiel joined #nim |
05:53:23 | * | vendethiel quit (Ping timeout: 246 seconds) |
06:10:05 | * | Associat0r left #nim (#nim) |
06:16:00 | * | JinShil joined #nim |
06:27:14 | * | dyu joined #nim |
06:27:40 | * | vendethiel joined #nim |
06:47:38 | DecoPerson | Is there a way to use sizeof at compile-time? https://gist.github.com/Deco/5588752a880f054c28b2 |
06:50:59 | fowl | DecoPerson, sometimes |
06:51:23 | fowl | for ex sizeof(ptr T) should work |
06:51:24 | * | vendethiel quit (Ping timeout: 250 seconds) |
06:51:43 | DecoPerson | hmm, but no way to find the size of a tuple? |
06:52:42 | fowl | DecoPerson, no way to tell how gcc would represent it |
06:52:55 | fowl | for ex tuple[a:int8, b:int32] -- is it 5 bytes? |
06:54:50 | * | gokr joined #nim |
06:54:59 | * | gokr quit (Remote host closed the connection) |
06:56:03 | * | TEttinger joined #nim |
06:56:36 | DecoPerson | right, of course, I keep forgetting that "compile-time" is the NimVM stage, prior to C code generation |
06:56:39 | DecoPerson | thanks |
06:57:55 | * | vendethiel joined #nim |
06:59:22 | * | JinShil quit (Quit: Konversation terminated!) |
07:00:20 | TEttinger | I'm curious about Nim. It looks like a well-made compiler design, and it seems like there's a lot of polish being applied to the build/project-management process, which is always valuable. |
07:02:01 | TEttinger | I'm wondering if I could bind a C++ library with a fairly small API to Nim without much trouble. The library provides a C binding as well. |
07:02:42 | TEttinger | https://bitbucket.org/cfyzium/bearlibterminal/src/3d2d0fbe11831d71d9b2c84f7c4479430b065aa3/Terminal/Include/C/BearLibTerminal.h?at=default is the C binding |
07:03:20 | TEttinger | Could I just run c2nim on the C binding? would there be a performance hit? |
07:06:01 | * | Demon_Fox joined #nim |
07:10:25 | TEttinger | the macro-in-macro expansion stuff it uses looks concerning |
07:11:36 | reactormonk | TEttinger, you could run c2nim on the header file |
07:11:51 | TEttinger | yeah, I'll try now |
07:19:42 | reactormonk | TEttinger, gotta mess with it a bit, it's not parsing everything |
07:22:22 | TEttinger | I need to install Nim first, having some issues with a number of things (windows and C funtimes) |
07:24:04 | * | dashed quit (Quit: Connection closed for inactivity) |
07:25:22 | DecoPerson | Letting the Nim installer installer MinGW works well (on Win8.1 for me) |
07:33:40 | TEttinger | I'm hoping to use Aporia, which seems to want the latest sources |
07:33:43 | * | vendethiel quit (Ping timeout: 255 seconds) |
07:34:24 | TEttinger | using the mingw-builds version of mingw-64 seems to work fine so far |
07:46:07 | * | Demon_Fox quit (Quit: Leaving) |
07:54:32 | * | flaviu quit (Ping timeout: 246 seconds) |
07:59:29 | * | flaviu joined #nim |
08:05:47 | DecoPerson | I am greatly confused: https://gist.github.com/Deco/cbb3b7f4453604c3d6ff |
08:06:41 | DecoPerson | In C++, you'd use template magic to make a matrix of a static dimensionality and size known at compile-time; how would you do it in Nim? |
08:10:14 | DecoPerson | updated gist with even more confusion: https://gist.github.com/Deco/cbb3b7f4453604c3d6ff |
08:12:43 | Triplefox | hmm, challenging. definitely outside of my own nim experience |
08:12:57 | fowl | DecoPerson, 1 sec |
08:13:30 | DecoPerson | If the matrix was AxB in size, it'd be array[A*B, type] |
08:13:38 | fowl | https://gist.github.com/fowlmouth/e9e99a427e56b427b34e |
08:14:43 | DecoPerson | Thanks |
08:15:08 | DecoPerson | But how would you do it for ANY dimensionality? |
08:15:36 | DecoPerson | e.g: var a = initMatrix(4, 4, 4, 4, float) |
08:15:49 | fowl | theres no way to use vararg templates, you could use a macro |
08:18:15 | DecoPerson | Vararg templates work; I've used them while trying to make a dynamically-sizable matrix class |
08:18:43 | DecoPerson | Or do you mean vararg generic parameters? |
08:23:08 | * | HakanD joined #nim |
08:24:18 | fowl | you did? |
08:25:26 | fowl | heres a macro to do it https://gist.github.com/fowlmouth/26348dfd68fb44d3d023 |
08:28:11 | DecoPerson | Example of vararg template: https://gist.github.com/Deco/0827f2e27dda2cc5fcd2 |
08:29:43 | DecoPerson | Ha, that's a neat macro! I imagine it'd be very difficult to make procs for, though.. |
08:30:43 | DecoPerson | e.g: how would you make an "add" proc that takes two "matrixTypes" and checks that they're the same size before operating on their data |
08:30:59 | * | vendethiel joined #nim |
08:31:09 | fowl | DecoPerson, the two types would be the same |
08:32:38 | DecoPerson | different case: when multiplying two matrices, assert matrixTypeA.columnCount == matrixTypeB.rowCout |
08:35:00 | fowl | DecoPerson, that left fold is happening at run-time |
08:35:57 | DecoPerson | yikes |
08:36:00 | fowl | also column count and row count are static properties, they are known at runtime |
08:36:21 | fowl | er i mean compiletime |
08:36:38 | fowl | so.. an assert would be easy |
08:37:07 | * | gokr joined #nim |
08:37:42 | fowl | you probably want to create overloads for operators for common matrix types |
08:46:51 | * | reem quit (Remote host closed the connection) |
08:49:00 | TEttinger | Odd.... I'm following the instructions to compile Nim from source, and I'm getting "fatal: write error: Invalid argument" on the git clone of csources |
08:50:04 | * | reem joined #nim |
08:50:09 | TEttinger | the directions here http://nim-lang.org/download.html |
08:50:42 | TEttinger | I'm on windows 7, 64-bit, using MSYS2 as my shell |
08:53:22 | fowl | TEttinger, use devel branch for nim and csources |
08:53:30 | TEttinger | ah, it's the git:// that tripped it up |
08:53:43 | TEttinger | it needed https:// |
08:53:59 | * | vendethiel quit (Ping timeout: 245 seconds) |
08:54:36 | * | fowl quit (Read error: Connection reset by peer) |
08:57:16 | * | fowl joined #nim |
08:58:45 | TEttinger | wb fowl, it seems to be working |
08:58:50 | TEttinger | hot damn koch is fast |
08:59:26 | def- | DecoPerson: here's how to do a matrix: https://github.com/def-/nim-unsorted/blob/master/matrixarithmetic.nim |
09:00:14 | DecoPerson | Yeah, I've been referring to that. Thanks for the repo of great examples, really helps Nim newcomers! |
09:01:59 | * | reem quit (Remote host closed the connection) |
09:05:56 | * | VinceAddons joined #nim |
09:10:35 | * | vendethiel joined #nim |
09:19:22 | * | HakanD_ joined #nim |
09:21:05 | gokr | TEttinger: If you want some info on what you just did: http://goran.krampe.se/2014/10/15/bootstrapping-nim/ |
09:21:28 | TEttinger | thanks gokr |
09:21:35 | gokr | TEttinger: Also other articles may be of interest: http://goran.krampe.se/category/nim |
09:21:47 | TEttinger | I'm having trouble with nimble now, it seems the same git thing is coming up |
09:22:32 | TEttinger | nimble install aporia@#head gives: fatal: write error: Invalid argument |
09:22:48 | def- | TEttinger: "aporia@#head" |
09:22:53 | gokr | dom96: Regarding Urhonimo on Windows, check with Araq, I only tried on Linux and OSX so far. |
09:22:55 | TEttinger | could this be related to openssl stuff? |
09:22:57 | def- | your shell is using @ or # as something special |
09:23:07 | TEttinger | msys2 on windows |
09:23:20 | def- | TEttinger: just put it inside "" and it should work |
09:23:49 | TEttinger | nimble install "aporia@#head" is the same |
09:24:14 | TEttinger | I'll try with another shell |
09:24:35 | fowl | TEttinger, try https://github.com/..aporia.git@#head |
09:24:46 | TEttinger | hm, cmd seems to work |
09:24:54 | fowl | full path to the .git |
09:25:06 | TEttinger | "aporia installed successfully." |
09:31:41 | * | HakanD quit (*.net *.split) |
09:31:42 | * | jokra quit (*.net *.split) |
09:32:19 | * | vendethiel quit (Ping timeout: 250 seconds) |
09:34:28 | * | vendethiel joined #nim |
09:36:04 | TEttinger | sweet, everything works |
09:36:22 | TEttinger | this channel is much more helpful than slashdot wants me to think :) |
09:36:38 | DecoPerson | Is this a bug with Nim or unittest? https://gist.github.com/Deco/83601d1cd01515afcbb6 |
09:37:51 | * | JinShil joined #nim |
09:38:17 | * | davidlt_ joined #nim |
09:38:40 | * | davidlt_ left #nim (#nim) |
09:41:31 | * | BlaXpirit joined #nim |
09:47:21 | * | gmpreussner|work quit (Read error: Connection reset by peer) |
09:49:23 | * | pafmaf joined #nim |
09:50:33 | * | jokra joined #nim |
09:51:25 | Araq | DecoPerson: that's always hard to tell and one of the reasons I'd like to abandon the unittest module |
09:51:27 | DecoPerson | fowl: do you have a moment to help? https://gist.github.com/Deco/b2b5c4310e0d7164e614 |
09:52:02 | DecoPerson | line 23, as instantiated from line 33 |
09:52:04 | Araq | DecoPerson: I made varargs+following parameters work |
09:52:12 | Araq | does it work for you too? |
09:52:44 | DecoPerson | I saw, thanks for doing it so quick |
09:52:45 | def- | DecoPerson: it compiles and runs for me with Nim from current devel branch |
09:53:02 | DecoPerson | and I haven't tried, on Windows so getting devel Nim is difficult |
09:53:40 | def- | try leaving away the static[int] in line 20 |
09:54:07 | fowl | static int used like doesnt work |
09:55:49 | TEttinger | DecoPerson: it wasn't that hard! |
09:56:06 | def- | DecoPerson: looks like a problem with the unittest module |
09:56:58 | DecoPerson | def-: forgot to say, I think the issue is here: https://github.com/Araq/Nim/blob/master/lib/pure/unittest.nim#L174 |
09:57:22 | DecoPerson | putting brackets around the parameter passed to require works, so should that line be "check (conditions)"? |
09:57:25 | * | dumdum joined #nim |
09:57:50 | def- | no, that's not it |
09:57:53 | DecoPerson | actually, it seems like "conditions: stmt" should be "conditions: expr" |
10:00:52 | * | koz_ joined #nim |
10:01:35 | koz_ | If I want to compile Nim code for Windows, but don't want to actually install it on a computer, can I still do that somehow? |
10:02:32 | * | reem joined #nim |
10:06:41 | TEttinger | koz_: cross-compiling? |
10:06:54 | * | reem quit (Ping timeout: 245 seconds) |
10:07:07 | koz_ | TEttinger: How would I set up Nim for cross-compilation to Windows? |
10:07:19 | koz_ | I've never had to do this kind of thing before, with *any* language. |
10:09:30 | Araq | koz_: run it via wine |
10:09:44 | Araq | everything else is just stupid. imho. |
10:10:58 | koz_ | Araq: You mean the Nim compiler? |
10:11:13 | * | pafmaf quit (Ping timeout: 264 seconds) |
10:11:20 | Araq | yes and the gcc it ships with |
10:11:40 | koz_ | Cool, thanks. |
10:12:05 | * | pafmaf joined #nim |
10:14:56 | Araq | oh wait, maybe I misunderstood you |
10:15:14 | Araq | oh no, ok lol |
10:15:39 | gokr | TEttinger: Yeah, the channel is actually quite friendly ;) |
10:16:22 | gokr | Araq: So using wine to build works fine? |
10:21:17 | * | reem joined #nim |
10:23:34 | * | woadwarrior joined #nim |
10:24:15 | * | jj2baile joined #nim |
10:24:24 | * | jj2baile left #nim (#nim) |
10:24:31 | * | jj2baile joined #nim |
10:30:10 | DecoPerson | def-: regarding terminal.getch, conio.h isn't a part of the C standard library or POSIX, and so isn't guaranteed to be available |
10:30:47 | DecoPerson | I'm currently having issues on Win8.1 with mingw |
10:32:08 | * | reem quit (Remote host closed the connection) |
10:33:22 | * | wb joined #nim |
10:36:24 | * | HakanD_ quit (Quit: Be back later ...) |
10:36:51 | * | HakanD_ joined #nim |
10:39:13 | * | Matthias247 joined #nim |
10:39:40 | * | TEttinger quit (Quit: Leaving) |
10:40:05 | * | vendethiel quit (Ping timeout: 246 seconds) |
10:40:52 | * | JinShil quit (Quit: Konversation terminated!) |
10:41:39 | * | HakanD_ quit (Ping timeout: 256 seconds) |
10:45:15 | * | davidhq joined #nim |
10:51:29 | * | HakanD_ joined #nim |
10:52:19 | * | kuzy000_ joined #nim |
10:55:29 | def- | DecoPerson: that's bad. I'm wondering how to do getch() on windows then |
10:55:50 | DecoPerson | About to submit a pull request changing it to getchar in stdio.h |
10:56:09 | DecoPerson | getchar is part of the standard library, and as far as I can tell has the same behaviour |
10:56:42 | DecoPerson | C standard library, that is: http://en.wikipedia.org/wiki/C_file_input/output#Overview_of_functions |
11:04:43 | DecoPerson | https://github.com/Araq/Nim/pull/2137 |
11:08:37 | * | reem joined #nim |
11:12:18 | * | vendethiel joined #nim |
11:30:34 | * | JinShil joined #nim |
11:31:26 | * | keyle joined #nim |
11:32:53 | keyle | gday |
11:34:05 | * | vendethiel quit (Ping timeout: 250 seconds) |
11:34:52 | * | koz_ quit (Ping timeout: 245 seconds) |
11:40:26 | * | wb quit (Ping timeout: 250 seconds) |
11:42:09 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
11:46:04 | * | wb joined #nim |
11:47:25 | keyle | Websocketd is interesting |
11:50:24 | * | vendethiel joined #nim |
11:50:39 | * | bjz joined #nim |
11:50:48 | * | Trustable joined #nim |
11:53:23 | Trixar_za | Which is better to learn: C or C++? |
11:54:49 | keyle | C |
11:55:08 | * | darkf_ joined #nim |
11:55:30 | dv- | if you have to ask... javascript |
11:57:05 | Trixar_za | I know enough of both to do quick hacks, but I want to formally focus on one of them so I can go for quick hacks to actually coding something from scratch. |
11:57:21 | Trixar_za | from* |
11:57:52 | dv- | what type of software? |
11:58:00 | * | darkf quit (Ping timeout: 252 seconds) |
11:58:33 | keyle | Trixar_za, nim is actually a suitable choice to learn. Or python. |
11:59:33 | Trixar_za | At the moment, IRC services to start. I want to modify a current services base to work like I want. There's Anope in C++ and Atheme in C. So I can go either way. |
12:00:41 | Trixar_za | Basically, I want to recreate the Janus IRC linker in a proper language and to make it act more like a server, so I'll probably have to rewrite a larger part of the base code. |
12:04:06 | keyle | I'd go C for sanity. |
12:06:15 | * | reem quit (Remote host closed the connection) |
12:08:34 | * | keyle quit (Quit: <Morbo> Chitchat achieved!) |
12:09:17 | * | wb quit (Ping timeout: 246 seconds) |
12:12:07 | * | HakanD_ quit (Quit: Be back later ...) |
12:12:21 | * | wb joined #nim |
12:13:13 | * | JinShil quit (Quit: Konversation terminated!) |
12:14:47 | * | sillesta joined #nim |
12:19:09 | * | BlaXpirit quit (Quit: Quit Konversation) |
12:21:02 | * | BlaXpirit joined #nim |
12:22:47 | dom96 | Trixar_za: Why not use Nim? |
12:23:08 | * | HakanD_ joined #nim |
12:23:18 | * | darkf_ is now known as darkf |
12:24:47 | dumdum | proc contains(s: string, words: varargs[string]): bool = |
12:24:47 | dumdum | any(words, (word) => s.contains(word)) |
12:25:03 | dumdum | Error: illegal capture 'result' |
12:25:16 | dumdum | What am I doing wrong? |
12:28:16 | Trixar_za | dom96: It would mean a complete from scratch protect that will include writing the the linking protocol files modules - which can be a drag. Also nim can be very unyielding in some regards, which leads to weird errors if your coding in a way contrary to what the standard libaries are expecting. |
12:31:34 | dom96 | dumdum: what's 'any' defined as? |
12:32:47 | dumdum | proc any[T](list: varargs[T], pred: (T) -> bool): bool = |
12:32:47 | dumdum | for item in list: |
12:32:47 | dumdum | if pred(item): |
12:32:47 | dumdum | result = true |
12:32:47 | dumdum | break |
12:33:19 | * | VinceAddons quit (Quit: Leaving) |
12:33:21 | dom96 | please use gist when sending code |
12:33:31 | dumdum | sure |
12:33:51 | dumdum | http://pastebin.com/JCXA40Vf |
12:34:35 | dom96 | hrm, I get a cgen error. |
12:34:40 | dom96 | Seems like a compiler bug to me. |
12:34:53 | * | vince- joined #nim |
12:35:40 | dom96 | it works if you specify the types: |
12:35:49 | * | vendethiel quit (Ping timeout: 264 seconds) |
12:35:58 | dom96 | https://gist.github.com/dom96/124521e17f4d99faf43f |
12:36:45 | gokr | We should really add some of these procs to sequtils before everyone reinvents them |
12:37:18 | gokr | I have some in this article: http://goran.krampe.se/2014/12/03/nim-seq/ |
12:37:36 | gokr | Like anySatisfy (which is your "any") etc Although implemented slightly differently. |
12:38:50 | dom96 | yes, we definitely need to improve our FP-style functionality in the stdlib. |
12:39:38 | * | vince- quit (Quit: quit) |
12:40:33 | dumdum | Thank you both |
12:41:44 | * | vince- joined #nim |
12:42:12 | * | Mimbus joined #nim |
12:42:34 | * | NhanH joined #nim |
12:43:00 | dom96 | dumdum: I submitted your code as a bug report so that you don't need to report it yourself. |
12:43:08 | flaviu | koz_: I did cross compilation with mingw-w64 once, everything worked great! |
12:43:33 | dumdum | dom96: Ok, thanks |
12:45:11 | flaviu | When cross compiling, I passed the --os:windows --cpu:i386 options to nim and set the mingw executable as the CC in the config file. |
12:49:08 | * | vendethiel joined #nim |
12:54:54 | NhanH | I'm looking for some projects that has been built in Nim -- does anyone have any suggestion for what I should be looking at? |
12:55:36 | dv- | there's an IDE written in nim |
12:57:08 | dom96 | This should list some popular projects: https://github.com/trending?l=nimrod |
12:58:10 | NhanH | oh didn't realize github has them ... thanks! |
13:02:26 | * | VinceAddons joined #nim |
13:06:47 | * | reem joined #nim |
13:06:57 | gokr | NhanH: "some projects", anything specific you are after? |
13:07:24 | NhanH | I just went through the tutorial and nim has a lovely syntax. I'm trying to figure out if it will fit my need: basically I was looking for something (that isn't C++) to write some machine learning code that will probably be using CUDA/Xeon Phi in the future, so I needed a C target language. And so far nim seems to fit the bill. |
13:07:30 | * | wb quit (Ping timeout: 264 seconds) |
13:07:40 | NhanH | Basically, would there be any reason nim is not suitable for number-crunching job? |
13:07:54 | * | VinceAddons quit (Quit: Leaving) |
13:08:15 | def- | NhanH: I've used it on the Xeon Phi. There will soon be a fix to the Nim compiler, then you can get 2 TFlops/s |
13:08:24 | def- | https://github.com/def-/nim-mic |
13:08:47 | gokr | NhanH: |
13:08:49 | gokr | Oops |
13:09:13 | gokr | NhanH: Some article that may be of interest: http://goran.krampe.se/category/nim |
13:09:40 | gokr | dom96: Can we perhaps... list the known articles on the website? One of mine is there, but only one. |
13:09:48 | NhanH | thanks! |
13:10:00 | def- | gokr: filwit is working on that |
13:10:05 | gokr | Ah, cool |
13:10:15 | gokr | And I should get that planet up. |
13:10:47 | def- | gokr: yes, definitely! |
13:11:08 | def- | I'm too lazy to setup an rss feed for each blog |
13:11:26 | * | reem quit (Ping timeout: 250 seconds) |
13:11:27 | gokr | I did set one up, but I didn't like it. |
13:12:07 | gokr | http://padme.krampe.se/planetnim/nim.html |
13:12:24 | gokr | But I ... mmm, nah. Doesn't click with me. |
13:12:41 | NhanH | I saw that article earlier this week |
13:13:07 | NhanH | I didn't get further than the template part ... but it's because I got distracted and actually go to checkout the language |
13:18:37 | * | dumdum quit (Ping timeout: 256 seconds) |
13:18:41 | NhanH | so I take it that there is no reason nimrod will be bad for number-crunching, right? |
13:18:45 | NhanH | *nim |
13:19:29 | def- | i don't see one |
13:30:30 | * | vendethiel quit (Ping timeout: 250 seconds) |
13:31:46 | * | Guest20112 left #nim ("WeeChat 0.3.7") |
13:32:35 | * | dumdum joined #nim |
13:34:22 | * | vendethiel joined #nim |
13:55:17 | * | vendethiel quit (Ping timeout: 245 seconds) |
14:02:46 | * | BlaXpirit_ joined #nim |
14:05:39 | * | BlaXpirit quit (Ping timeout: 256 seconds) |
14:06:01 | Araq | wow fowl "patch 2". you're diligent. ;-) |
14:11:25 | * | vendethiel joined #nim |
14:11:30 | Araq | dom96: btw the reason why aporia generated way too many thread safety warnings was your --threadAnalysis:off switch which didn't work properly |
14:11:51 | Araq | and I don't think anything uses that switch except Aporia ... |
14:24:16 | * | HakanD_ quit (Quit: Be back later ...) |
14:24:42 | * | HakanD_ joined #nim |
14:29:43 | * | HakanD_ quit (Ping timeout: 264 seconds) |
14:34:01 | * | vendethiel quit (Ping timeout: 255 seconds) |
14:35:02 | def- | Ha, made it on slashdot: http://developers.slashdot.org/story/15/02/15/0411217/nim-programming-language-gaining-traction |
14:36:31 | Araq | but nobody watches my video :-( |
14:36:48 | Araq | come on guys, I need the money! 3 million views are possible! |
14:37:06 | Araq | (just kidding) |
14:37:41 | BlaXpirit_ | this will be a good year for Nim. |
14:39:25 | * | woadwarrior quit (Ping timeout: 264 seconds) |
14:40:35 | NhanH | the HN comment linked is interesting (https://news.ycombinator.com/item?id=9050114) |
14:41:10 | NhanH | I can't imagine a project that would evaluate Nim, Rust, Go, Erlang as the potential languages |
14:43:33 | def- | The comments are a bit strange on slashdot, never read them before, wondering if that's normal |
14:45:26 | * | irrequietus joined #nim |
14:45:44 | * | Matthias247 quit (Read error: Connection reset by peer) |
14:47:29 | * | gmpreussner|work joined #nim |
14:48:24 | * | vendethiel joined #nim |
14:52:45 | shevy | :) |
14:52:50 | shevy | it's language warfare |
14:53:14 | shevy | Araq what video? |
14:54:38 | Trixar_za | Oo |
14:54:40 | Trixar_za | Video? |
14:56:12 | * | reem joined #nim |
14:57:39 | Trixar_za | Quick Qs: Do the 0.10.2 zip file for Linux come with the c-sources? I don't want to do the git pull again because it's kind of huge. Also does the Windows binary come with Mingw-w64? |
14:58:20 | BlaXpirit_ | Trixar_za, if you have old git repository, you can update it and it won't be huge |
14:58:43 | BlaXpirit_ | windows download comes with compiler (or at least installs it, maybe it's downloaded not included) |
14:59:12 | def- | This video: http://youtu.be/-T0MrJkLB8Y |
14:59:30 | BlaXpirit_ | "Installation based on generated C code" nim-0.10.2.zip it includes C sources by definition |
15:00:27 | Trixar_za | Also I've been hearing about about tdm-gcc. Mostly because apparently somebody took over dev for DevC++ with a fork that uses it. |
15:00:28 | Trixar_za | :P |
15:01:01 | * | reem quit (Ping timeout: 265 seconds) |
15:05:12 | Trixar_za | Hmmm - does the windows library include the registry? |
15:05:23 | shevy | is this Araq dancing in the video there? |
15:06:07 | Trixar_za | Oh, nevermind - there it is |
15:11:09 | Trixar_za | And yeah, it downloads mingw if you select the option. I already have gcc on Linux though |
15:16:08 | * | pr3d4t0r joined #nim |
15:22:28 | * | kapil__ quit (Quit: Connection closed for inactivity) |
15:22:38 | novist | love comments on slashdot: "Such potential just thrown directly into the trash because of a bizarre obsession with python's Forced Indentation Of Code model. It's sad." |
15:22:50 | novist | this guy must love writing code like one found in openssl. |
15:24:58 | Trixar_za | Hmm, so you can use nim to make virtual locations and have customers interact or even receive a seminar via it? |
15:25:27 | * | darkf quit (Quit: Leaving) |
15:26:10 | novist | its a programming language. your program will do whatever you write it to do |
15:26:35 | novist | even javascript can do amazing things... nim even more so then hehe |
15:28:53 | Trixar_za | I checked Araq's video and googled the project's name. It led me to Turf, so that's why I asked. I wonder if more can be done with the engine since it looks flexiable in the video. |
15:32:44 | * | qqr joined #nim |
15:34:07 | * | sillesta quit (Remote host closed the connection) |
15:34:30 | * | sillesta joined #nim |
15:36:19 | * | dumdum quit (Ping timeout: 256 seconds) |
15:37:02 | Araq | novist: http://i1.kym-cdn.com/photos/images/original/000/043/917/hatersgonnapanda.jpg |
15:39:34 | Araq | Trixar_za: yes, we are working on that. |
15:40:13 | * | gmpreussner joined #nim |
15:49:34 | * | wb joined #nim |
15:50:53 | * | remline joined #nim |
15:53:02 | * | NfNitloop joined #nim |
15:54:21 | * | Araq0 joined #nim |
16:12:30 | infinity0 | https://mentors.debian.net/package/nim |
16:19:22 | Araq | infinity0: PRs accepted for your bug reports |
16:19:30 | Araq | I mean please make PRs |
16:32:05 | * | wepy joined #nim |
16:32:18 | wepy | lol, website says to use #nimlang.. but you get auto-kicked there |
16:32:43 | wepy | anyway--Why build.sh? Makefile would be much shorter |
16:34:01 | shevy | ah which part of the website? I guess it will be fixed soon once they are aware of it |
16:34:19 | wepy | bottom |
16:34:20 | shevy | the renaming did not happen that long ago ;) |
16:34:41 | shevy | oh yes you are right |
16:34:49 | shevy | http://nim-lang.org/ |
16:34:51 | shevy | "Online IRC" |
16:34:55 | shevy | I guess that will be fixed soon |
16:34:56 | wepy | ya |
16:35:05 | dom96 | You don't get kicked. |
16:35:20 | shevy | dunno why Araq likes build.sh, I'll guess he'll soon be about to answer :) |
16:35:22 | dom96 | The channel is invite only, it should redirect you to here but I guess that doesn't work. |
16:35:35 | wepy | he probably hates make |
16:35:55 | wepy | but really, no need to list all obj files anymore :) |
16:36:26 | wepy | nim builds the same way on windows with cygwin or something, right? |
16:37:48 | * | vendethiel- joined #nim |
16:38:10 | Araq | wepy: in my world "make" that abomination that distinguishes between \t and space, does not exist and shell scipts are only acceptable as there is a posix standard for them |
16:38:30 | Araq | I used to generate a Python script |
16:38:42 | Araq | but with Python 3 that became infeasible |
16:38:47 | * | vendethiel quit (Ping timeout: 246 seconds) |
16:39:04 | wepy | heh |
16:39:10 | Araq | plus Python does not ship Damn Small Linux iirc |
16:39:16 | Araq | *ship with |
16:39:27 | wepy | why spaces? |
16:39:34 | wepy | waste of chars |
16:39:41 | shevy | curious that you did not like Python 3, I thought that is the future :D |
16:40:06 | dom96 | Araq: Any ideas about https://github.com/3dicc/Urhonimo/issues/2 ? |
16:40:08 | shevy | wepy we may soon run out of chars |
16:40:15 | wepy | also, the posixness of shell scripting is overrated |
16:40:16 | Araq | wepy: tabs don't work but that is another story |
16:40:29 | Araq | no it's not, it means the scripts continue to work |
16:40:31 | wepy | whereas gnu make can be had everywhere |
16:40:42 | Araq | btw these are generated |
16:40:48 | wepy | saw that |
16:40:51 | Araq | that they list every .o file is irrelevant |
16:41:20 | wepy | i guess if you never have to troubleshoot the script, it doesnt matter |
16:41:36 | wepy | not that troubleshooting makefiles is fun either... |
16:41:44 | Araq | it's still friendly to editing |
16:41:52 | * | hasta joined #nim |
16:41:53 | wepy | at least it's not autotools? |
16:42:15 | hasta | do i have to be nimble to use Nim? |
16:42:15 | Araq | oh autotools are even worse than make ... |
16:42:37 | wepy | :) |
16:42:40 | * | hasta came here from Slashdot and is curious |
16:43:02 | dom96 | hasta: You don't have to have it. |
16:43:05 | wepy | so, can you easily get nim to segfault? |
16:43:23 | * | nd2015 joined #nim |
16:43:25 | Araq | hasta: I'm working on making it more friendly for newcomers |
16:43:35 | wepy | was jjust reading the rust-lang docs and nim's docs.. seems like nim has fewer protections? |
16:43:49 | Araq | wepy: that's debatable. |
16:44:24 | hasta | Araq: can i try it on a Mac? |
16:44:29 | wepy | ya |
16:44:34 | wepy | grab the zip |
16:44:41 | nd2015 | Hi, according to you, in which programming area nim would shine ? |
16:44:42 | hasta | woot, no brew? |
16:44:43 | wepy | sh build.sh |
16:45:06 | wepy | you dont need brew, its easy |
16:45:18 | * | hasta does it |
16:45:19 | wepy | also, brew sux |
16:45:37 | Araq | Nim is in brew I think? |
16:45:38 | hasta | brew rocks for me, easy to keep things up to date |
16:45:43 | hasta | i have zero problems with brew |
16:45:52 | Araq | nd2015: that's always a tricky question. |
16:46:03 | Araq | I believe in the "one language to rule them all" |
16:46:14 | hasta | nimrod 0.10.2 was in brew |
16:46:25 | Araq | there is no inherent reason why a language cannot scale from scripting tasks to large systems |
16:46:28 | nd2015 | yeah, I know, I just wondered if you originally had something in mind ? |
16:46:28 | wepy | can you debug nim programs w/out looking at the generated C? |
16:46:56 | Araq | wepy: many manage to just do that |
16:47:11 | Araq | nd2015: I had gaming in mind. |
16:47:19 | wepy | ok |
16:47:28 | gokr | wepy: GDB debuggers work fine, and there are lots of nice frontends for GDB. |
16:47:38 | wepy | will you have a native compiler/debugger some day? |
16:47:40 | hasta | So what's the #1 tutorial i should step through as a 1st time nim user? |
16:47:40 | * | vendethiel joined #nim |
16:47:53 | hasta | for learning the toolchain etc |
16:47:55 | gokr | I should have said "GDB debugging works fine". |
16:48:24 | * | Kensan joined #nim |
16:48:32 | wepy | i'm ok with gdb and lldb, just not sure it will be easy to debug code i didn't write directly |
16:48:41 | * | vendethiel- quit (Ping timeout: 250 seconds) |
16:48:50 | * | Kensan left #nim (#nim) |
16:48:52 | gokr | wepy: No, you misunderstand. You debug nim code. |
16:48:54 | wepy | depends on how monstrous the code in the cached c files is |
16:48:57 | wepy | oh |
16:49:05 | gokr | It works just fine, breakpoints and all. |
16:49:10 | wepy | cool :) |
16:49:12 | gokr | What platform are you on? |
16:49:26 | wepy | mac, sometimes linux and bsd |
16:49:30 | wepy | so lldb |
16:49:40 | wepy | do i need a custom lldb build? |
16:49:53 | gokr | Ok, I tried a few gdb frontends a while back - KDevelop worked very well. |
16:50:21 | gokr | Not sure about lldb. |
16:50:38 | gokr | But... I suspect it works just fine. |
16:50:43 | wepy | k |
16:50:45 | wepy | weird |
16:51:11 | whitenoise | Nim is in need of its own Rack/WSGI |
16:51:12 | gokr | Nim sprinkles the code with linedir directives. The rest is done by the C compiler and GDB. |
16:51:28 | gokr | One thing that does not work well though is inspecting data. |
16:51:34 | gokr | But Araq has a plan for that ;) |
16:51:55 | wepy | also.. how do people use the GC in like 3d FPS games where you can't wait many milliseconds for gc between frames? |
16:52:08 | wepy | i saw the realtime gc doc |
16:52:27 | wepy | but i suspect you'd just disable/step sometimes |
16:52:32 | gokr | Regarding tutorials, I am not sure, I read tut1 and tut2 + the more important parts of the lang manual. |
16:52:43 | gokr | There is Nim by example too. |
16:52:51 | wepy | neat |
16:52:54 | gokr | And quite a few articles by now. |
16:53:17 | gokr | This is one blog: http://hookrace.net/blog/ |
16:53:29 | wepy | read the tut.. was goos until the end of part 2 where it talks about macros and AST's |
16:53:30 | gokr | And mine has a range of articles too: http://goran.krampe.se/category/nim |
16:53:32 | wepy | :) |
16:53:37 | wepy | <-- not a compiler guy |
16:53:56 | gokr | You don't need to think about macros and ASTs if you don't want to. |
16:54:04 | gokr | I haven't looked much at it myself yet. |
16:54:33 | hasta | Araq: so is this a one-man band or do you have a lot of contributors? |
16:54:39 | wepy | so i feel like in terms of performance, nim is like D perhaps |
16:54:45 | wepy | youc an disable/enable GC in D as well |
16:54:59 | wepy | and in a high performance game, you'd have to avoid GC ops most of the time |
16:55:07 | wepy | they didn't have the step/timed stuff tho |
16:55:16 | wepy | but i feel like that ruined D for game development |
16:55:21 | wepy | also the global thread locking crap |
16:55:28 | gokr | Slashdot? nice |
16:55:55 | wepy | Rust variable lifetimes looked horrible, so, nope. |
16:56:45 | def- | hasta: you can see that Araq has done most work, but there are other contributors as well: https://github.com/Araq/Nim/graphs/contributors |
16:56:53 | hasta | thanks |
16:57:23 | wepy | whitenoise: what's Rack? WSGI is like a CGI protocol? |
16:58:22 | dom96 | def-: The slashdot comments are really awful until you scroll down a bit it seems. |
16:58:27 | gokr | wepy: Btw, you did see Urhonimo, right? |
16:58:45 | def- | dom96: maybe they just comment before reading anything that's linked |
16:58:46 | gokr | Sorry if I missed out - was building a ... small cottage for my daughter in the sofa. |
16:59:09 | wepy | surprised nobody commented about the python indentation and required use of spaces ;) |
16:59:09 | whitenoise | wepy: WSGI is a CGI protocol written in Python, yes. It now has Nginx and Apache plugins, which is why Python web apps of various frameworks can be served from so many different common web server options. |
16:59:13 | hasta | so nim compile for an "echo" program produces a 160K executable. I assume the size is due to debug symbols, what's the switch for release builds? |
16:59:20 | def- | hasta: -d:release |
16:59:28 | hasta | aha |
16:59:54 | wepy | oops, spoke too soon: "Forcing code indentation is a sign you're going to be working with a bunch of "coders" who took a weekend course and not actual software engineers." |
16:59:57 | wepy | haha |
17:00:00 | hasta | 37K now, still bigish, but fair enuff |
17:00:09 | wepy | the indentation does bother me tho.. just a curley braces kinda guy i guess |
17:00:28 | hasta | wepy: yup, my only gripe so far |
17:00:42 | def- | hasta: you can try --cc:clang or look here: http://forum.nim-lang.org/t/679/1 |
17:01:15 | hasta | def-: about same size with clang, looking at link |
17:02:33 | wepy | anyway, gona take nim and rust for a drive :) |
17:02:43 | def- | but 30 KB doesn't sound that bad anyway |
17:03:14 | wepy | 30K for what, hello world? |
17:03:22 | hasta | yes |
17:04:36 | wepy | all of the new languages are like that |
17:04:44 | hasta | same code in C about 8K at O3 with no stripping flags |
17:04:52 | wepy | cuz they're all static binaries |
17:05:21 | gokr | I may be wrong, but... Nim links the runtime lib (GC etc) doesn't it? |
17:05:24 | hasta | taking out the GC in nim takes it down to 26K. Totally reasonable for a scriptish-lang :) |
17:05:51 | hasta | gokr: linker should be able to strip out what's not used though |
17:06:01 | hasta | i think at least lld does that |
17:06:10 | hasta | (llvm's ld) |
17:06:58 | wepy | no |
17:07:06 | wepy | on osx, my hello world only links to libsystem |
17:07:31 | wepy | remove GC? hehe |
17:07:40 | wepy | can you still concatenate strings? |
17:07:43 | wepy | just leak? |
17:07:58 | reactormonk | wepy, exactly |
17:08:22 | hasta | wepy: just fine when implementing compilers for instance |
17:08:33 | hasta | or other one-shot executables |
17:08:38 | wepy | sad |
17:08:46 | hasta | no |
17:08:53 | reactormonk | hasta, you compiling with -d:release ? |
17:08:54 | wepy | i've only done that in C for non-production code |
17:08:57 | hasta | reactormonk: yup |
17:09:00 | reactormonk | kk |
17:09:07 | hasta | wepy: production compilers doesn't care about leaks |
17:09:10 | * | [exa] joined #nim |
17:09:21 | hasta | it's cleaned up when it exits... |
17:09:24 | dom96 | whitenoise: using asynchttpserver plus nginx as a proxy works pretty well. |
17:09:26 | nd2015 | Araq: thank you and good luck with nim :) |
17:09:32 | gokr | hasta: --opt:size ? |
17:09:37 | nd2015 | bye for now |
17:09:43 | wepy | anyway, i guess you develop with GC, then remove it for release |
17:09:49 | wepy | so you'll still find all the bugs ;) |
17:09:57 | * | nd2015 quit (Quit: Page closed) |
17:10:01 | hasta | gokr: thanks for opt:size, down to 22K now :) |
17:10:20 | hasta | nim compile -d:release --cc:clang --lineTrace:off --stackTrace:off --opt:size --gc:none echo.nim |
17:10:36 | hasta | anything else i can try? |
17:11:22 | gokr | --deadCodeElim:on --checks:off (but not sure) |
17:11:29 | flaviu | hasta: This discussion has come up before, let me try to find the relevent gist. |
17:11:29 | wepy | i think go binaries were bigger, no? |
17:11:54 | hasta | gokr: those didn't do anything |
17:12:12 | hasta | gokr: not much to eliminate on a straight-line echo program :) |
17:12:15 | gokr | Trixar_za: Regarding Urho3D, Urhonimo, Terf - Terf is a fully fledged collaborative system. It exists today with lots of customers, but is not using Nim or Urho3D. |
17:12:23 | flaviu | https://gist.github.com/flaviut/0c3c0feae6b0b609cffd |
17:12:24 | whitenoise | dom96: Yes, for an application I figured I would just have a socket that nginx passes right into. I am trying to figure out how WSGI provides anything over this. |
17:12:27 | hasta | flaviu: thanks |
17:12:52 | gokr | Trixar_za: Urho3D has lots of capabilities, you can check its own examples. They are even running in Emscripten now. |
17:13:12 | gokr | Trixar_za: The next generation of Terf is meant to use Urhonimo (Urho3D and Nim). |
17:13:26 | * | xet7 quit (Quit: Leaving) |
17:13:29 | * | dyu quit (Quit: Leaving) |
17:13:33 | * | zahary1 quit (Read error: Connection reset by peer) |
17:13:37 | hasta | flaviu: what does the strip option look like? can't seem to find it in the help output |
17:13:56 | flaviu | just running the strip command on the executable. |
17:14:00 | * | zahary joined #nim |
17:14:20 | wepy | strip -x |
17:14:20 | flaviu | nim c ...; strip myexecutable |
17:14:21 | wepy | ? |
17:14:31 | hasta | flaviu: right. 19K |
17:14:40 | gokr | Trixar_za: Try this one for example: http://di01.wwweb3d.net/urho/19_VehicleDemo.html |
17:16:36 | flaviu | I'm getting 4896 bytes on a hello world. |
17:16:50 | flaviu | nim c -d:release --gc:none --os:standalone --stacktrace:off ./small.nim; strip -s small; wc -c small; ./small |
17:17:18 | hasta | flaviu: weird |
17:17:36 | hasta | oh, i don't have standalone. Is that relevant for normal executables? |
17:17:50 | flaviu | Yes. It removes lots of nim runtime stuff. |
17:17:56 | hasta | i figured it was standalone in the GCC sense |
17:18:42 | hasta | flaviu: lib/system.nim(2154, 10) Error: cannot open 'panicoverride' when using --os:standalone on mac |
17:18:52 | flaviu | https://gist.github.com/flaviut/83389c566b658b8d72dc |
17:20:57 | hasta | flaviu: that helped, 9K now. That suffices for me :) |
17:20:59 | hasta | thanks |
17:21:39 | hasta | flaviu: it's a bit of a concern initially that it magically picks up panicoverride.nim without mention in the cmd line. What's going on? |
17:22:08 | flaviu | os:standalone has no idea what to do in case of a crash, panicoverride.nim tells it what to do. |
17:23:43 | hasta | i know, but is panicoverride.nim special to the compiler or does nim compile ick u nim files automagically |
17:23:57 | hasta | my concern is the build system |
17:24:18 | hasta | pick up * |
17:25:26 | flaviu | system.nim has the following lines in it: `when hostOS == "standalone": include panicoverride` |
17:25:46 | hasta | ugh, i hate magic like that, but okay :) |
17:27:04 | flaviu | It's documented though: http://nim-lang.org/nimc.html#nim-for-embedded-systems |
17:27:04 | flaviu | And multiple panicoverride files make no sense: you can't run a the same program on multiple OSes |
17:27:59 | flaviu | same executable might be better wording. |
17:28:02 | hasta | flaviu: no, my point is that I like to specifically include the files i want the compilers to see |
17:28:27 | hasta | but hey, this is a special case anyway |
17:29:35 | hasta | flaviu: so version 0.10.x. I'd like to now ask if the compiler at this stage is considered good enough to create production quality stuff? |
17:30:19 | hasta | i've burned myself on Rust, dislike Go and am looking for alternatives for systems programming |
17:31:15 | flaviu | Nim has lots of bugs, but at least two companies are using it now. |
17:31:30 | * | ChrisMAN joined #nim |
17:31:50 | hasta | flaviu: ok... :) |
17:32:14 | flaviu | You might be better off asking gokr, Araq, or jwecker |
17:32:32 | hasta | ok. last question: good support for unicode? |
17:32:57 | hasta | i'm hoping for a icu wrapper |
17:33:54 | flaviu | There's no special handling for unicode in strings, but it's common to assume they're UTF-8 |
17:34:21 | hasta | not used codepoints, but collation, calendars, etc |
17:34:37 | hasta | i actually meant i18n |
17:35:19 | flaviu | I haven't looked into i18n at all myself. |
17:35:35 | flaviu | I've been using nim for hobby projects, where it isn't a big concern |
17:35:42 | hasta | fair enuff |
17:36:07 | flaviu | I don't see why it shouldn't be possible to wrap ICU though. |
17:36:10 | hasta | flaviu: what's your impression so far? plusses and minuses, if you could elaborate a bit |
17:36:27 | hasta | flaviu: yeah, just hoping someone wrote the wrapper, ICU is huge |
17:37:11 | hasta | and autogenerated wrappers tend to be non-idiomatic |
17:37:21 | flaviu | I like the ideas in Nim, the implementation has bugs when you start getting into the into the more complicated stuff. |
17:37:45 | flaviu | Lots of effort in reducing bugs recently and marking things that tend to be buggy as experimental though |
17:39:05 | hasta | alrighty |
17:39:20 | flaviu | some libraries are better than others, but that's not too atypical. |
17:39:23 | * | vendethiel quit (Ping timeout: 246 seconds) |
17:39:38 | * | Woflox joined #nim |
17:41:07 | flaviu | If you're going to wrap ICU, it might be a good plan to wrap single modules as needed. I doubt that all features of it are immediately necessary. |
17:41:36 | hasta | aye |
17:42:38 | hasta | gonna play some more with Nim tomorrow. Maybe I'll eventually be able to stop adding curly braces using muscle memory, but i'm dubious :) |
17:47:17 | gmpreussner | flaviu: you should write up your findings for small executable sizes in a blog post. this seems to be coming up at least once a week :) |
17:49:12 | BlaXpirit_ | is it correct that C++ destructors work better in Nim than Nim's destructors? |
17:58:13 | * | Matthias247 joined #nim |
18:02:20 | Woflox | Hey all! I am new to nim and having some issues with the sdl2 wrapper. I would like to use the GameController API but it seems like everything but the events is missing... I don't see SDL_GameControllerOpen() and related functions, or any of the button/axis constants. Or maybe I'm not looking in the right place? |
18:03:51 | def- | Woflox: indeed looks like it hasn't been wrapped yet. I only see joystick |
18:05:15 | BlaXpirit_ | D: |
18:05:33 | * | Araq0 quit (Quit: Leaving) |
18:07:37 | Woflox | Okay, maybe I will try to figure out how to do it myself then! |
18:23:48 | wepy | did you guys see this article? http://arthurtw.github.io/2015/01/12/quick-comparison-nim-vs-rust.html |
18:23:56 | wepy | seems like rust was faster? |
18:24:28 | wepy | maybe it's more of a hashtable/regex speed comparison |
18:24:32 | def- | i didn't look at the reasons because i didn't like the benchmark |
18:24:34 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
18:24:46 | def- | yeah, it's different libraries/algos underneath |
18:25:11 | def- | I have collected a few benchmarks down here: https://github.com/def-/nim-benchmarksgame |
18:25:44 | wepy | any more meaningful? |
18:29:18 | wepy | the rust implementations were so verbose ;) |
18:29:31 | shevy | perhaps because rust is verbose! |
18:30:31 | * | reem joined #nim |
18:31:10 | dom96 | Lot's of pretty nice tweets about Nim: https://twitter.com/search?q=nim%20lang&src=typd |
18:32:07 | BlaXpirit_ | very important now to spark people's interest somehow |
18:34:09 | wepy | does nim have structs? or just object? |
18:35:08 | * | reem quit (Ping timeout: 250 seconds) |
18:35:14 | shevy | yeah dom96 what is the channel record by the way? |
18:35:20 | shevy | just were at 115 |
18:35:26 | gokr | wepy: tuple = struct (kinda) and object is object |
18:35:42 | dom96 | shevy: 120 |
18:35:45 | dom96 | shevy: git.io/gHZGCg |
18:36:38 | onionhammer | araq nimsuggest stop working altogether? |
18:38:42 | shevy | dom96 ah cool; that may become into a historic document one day, every time it gets obsoleted :> |
18:39:08 | * | Woflox quit (Quit: Page closed) |
18:39:24 | dom96 | shevy: I really need to implement user count tracking in NimBot so that we get a pretty graph. |
18:39:40 | gokr | ChrisMAN: Welcome man ;) |
18:40:08 | * | Woflox joined #nim |
18:44:57 | * | Woflox quit (Quit: Leaving) |
18:48:36 | dom96 | Araq: Any ideas about https://github.com/3dicc/Urhonimo/issues/2 ? |
18:48:39 | * | NfNitloop left #nim ("WeeChat 1.0.1") |
18:50:13 | gokr | I think Andreas use... an older VS. |
18:50:25 | Araq | dom96: yeah you need visual studio 2013 |
18:50:36 | gokr | Oh, newer then :) |
18:50:42 | Araq | older versions cannot compile urho easily thanks to missing directX stuff |
18:51:01 | Araq | and I didn't try with GCC on windows. |
18:51:05 | Araq | well I tried |
18:51:08 | Araq | but gave up soon |
18:51:14 | gokr | Araq: Btw, did you see that Urho examples runs in emscripten? |
18:51:29 | Araq | yeah but that's not surprising |
18:51:31 | dom96 | Araq: I think I have VS 2013 |
18:51:34 | def- | gokr: looks nice, works fluidly even |
18:51:55 | gokr | http://di01.wwweb3d.net/urho/ |
18:53:43 | Araq | dom96: you also need to run cl.exe from the "Developer Command Prompt" |
18:54:08 | Araq | I open that and run 'nim cpp -r character' in there and it works |
18:54:15 | dom96 | Araq: I see. |
18:54:23 | dom96 | Araq: Is it not possible to use mingw? |
18:55:48 | * | dumdum joined #nim |
18:56:08 | Araq | dom96: I don't know 'cmake' well enough for this |
18:56:26 | * | Woflox joined #nim |
18:57:01 | Araq | gokr: I used to use VS 2010 but thanks to Urho, I'm not using that anymore ;-) |
18:58:39 | * | dumdum quit (Read error: Connection reset by peer) |
19:00:00 | * | Woflox quit (Quit: Leaving) |
19:00:56 | * | dumdum joined #nim |
19:01:28 | * | gokr_ joined #nim |
19:02:22 | * | wepy quit (Quit: leaving) |
19:02:23 | hasta | lot of core dumps on OSX :/ |
19:03:01 | dom96 | Araq: Getting access denied now. |
19:03:13 | dom96 | During linking. |
19:03:21 | def- | hasta: with some specific nim code or what? |
19:04:18 | hasta | def-: yeah, trying various things, gets a lot of runtime crashes. Admittedly I don't know the language well yet. |
19:04:40 | hasta | but the same source seems to work on windows |
19:04:42 | * | Woflox joined #nim |
19:04:42 | * | irrequietus quit () |
19:05:05 | flaviu | hasta: Have you tried fsanitize? |
19:05:11 | def- | hasta: strange, would be interesting to see the code |
19:05:23 | flaviu | --passC:-fsanitize=address --passL:-fsanitize=address |
19:06:06 | * | HakanD_ joined #nim |
19:06:34 | hasta | def-: sure, i'm collecting some snippets and i'll setup an issue on github |
19:06:50 | * | kktr__ joined #nim |
19:07:52 | * | qqr quit (Quit: Leaving) |
19:13:05 | * | davidhq joined #nim |
19:18:38 | * | kktr__ quit (Quit: Leaving) |
19:19:00 | * | vendethiel joined #nim |
19:21:24 | dom96 | Araq: Looks like the Access Denied error I was getting was because I specified the path to VC++ in my nim.cfg file. |
19:21:25 | * | wb quit (Ping timeout: 264 seconds) |
19:24:41 | dom96 | Araq: Now I get this: https://gist.github.com/dom96/e0fe7d3157f600fa17f1 |
19:26:24 | * | wb joined #nim |
19:31:08 | gokr_ | you didn't build urho yourself? |
19:31:16 | * | filwit joined #nim |
19:31:34 | dom96 | gokr_: Yep, I cheated a bit. |
19:32:17 | gokr_ | Although urho is quite easy to build. At least on Linux and OSX |
19:32:53 | gokr_ | There are binary downloads also |
19:34:05 | dom96 | yeah, I downloaded the shared binary. Doesn't include a .lib it seems. |
19:34:15 | gokr_ | ah |
19:35:27 | dom96 | Neither does the static download. |
19:42:42 | * | gokr_ quit (Remote host closed the connection) |
19:43:21 | * | gokr_ joined #nim |
19:46:26 | * | Woflox quit (Quit: Leaving) |
19:46:58 | * | Woflox joined #nim |
19:58:16 | dom96 | gokr_: Built it into a .lib using VS 2013 and now i'm getting lots of linking errors. Any ideas? |
20:03:49 | * | lavender joined #nim |
20:05:58 | dom96 | hello lavender |
20:09:12 | * | pwernersbach joined #nim |
20:09:44 | pwernersbach | Hey, does @Araq leave his client on? I need to ask him something |
20:10:47 | pwernersbach | Actually, I can ask @dom96 if he's on as well |
20:10:53 | lavender | hi i heard about this on /. and it sounds like a better idea than asm.js so i'm just lurking for now :) |
20:11:12 | dom96 | lavender: cool, let us know if you have any questions :) |
20:11:16 | dom96 | pwernersbach: I'm here, what's up? |
20:12:32 | * | gokr_ quit (Read error: Connection reset by peer) |
20:13:09 | * | gokr_ joined #nim |
20:13:25 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
20:15:51 | * | gokr_ quit (Remote host closed the connection) |
20:16:04 | BlaXpirit_ | never do what pwernersbach just did |
20:16:11 | * | gokr_ joined #nim |
20:17:40 | * | Matthias247 quit (Quit: Matthias247) |
20:18:05 | pwernersbach | BLaXpirit_: I can't ask questions to specific people? |
20:18:31 | * | UberLambda joined #nim |
20:18:53 | * | koz_ joined #nim |
20:19:50 | flaviu | pwernersbach: it's generally better etiquette to ask instead of asking to ask, no big deal though. |
20:21:06 | dom96 | flaviu: BlaXpirit_: In this case it's fine because pwernersbach wanted to discuss it via PM. |
20:21:19 | * | Ainieco joined #nim |
20:21:33 | * | Ainieco quit (Quit: leaving) |
20:22:29 | pwernersbach | My bad, sorry. I'll keep that in mind next time. |
20:24:14 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
20:24:32 | BlaXpirit_ | sorry |
20:24:43 | BlaXpirit_ | i didn't understand |
20:24:49 | gokr | dom96: Not really, well, I might recognize it - but Windows is generally Araq's territory |
20:26:32 | * | filwit quit (Read error: Connection reset by peer) |
20:26:54 | gokr | pwernersbach: I can't see you did anything wrong. |
20:28:33 | gokr | dom96: Can you... paste the link error somewhere? |
20:28:57 | pwernersbach | Anyways, someone submitted us to /. today. |
20:29:03 | pwernersbach | Good to see the community growing |
20:29:36 | dom96 | gokr: https://gist.github.com/dom96/5f9bffc508f728f37fcc |
20:29:43 | dom96 | gokr: There is a lot of errors, I assume they repeat. |
20:29:53 | dom96 | They all didn't fit in my terminal. |
20:31:27 | gokr | dom96: Perhaps this or something http://stackoverflow.com/questions/7668200/error-lnk2038-mismatch-detected-for-iterator-debug-level-value-0-doesnt |
20:31:34 | * | HakanD_ quit (Quit: Be back later ...) |
20:31:36 | * | pwernersbach left #nim (#nim) |
20:32:01 | * | HakanD_ joined #nim |
20:32:11 | gokr | dom96: Did you build Nim with the same compiler? |
20:32:32 | dom96 | gokr: nope. |
20:32:56 | gokr | Or wait... that can't matter. The runtime lib is compiled when you ... compile, or is it? |
20:33:19 | * | irrequietus joined #nim |
20:33:29 | * | irrequietus quit (Changing host) |
20:33:29 | * | irrequietus joined #nim |
20:34:23 | gokr | I am just grasping, you should know all this better than me :) Cleared out nimcache I suppose. |
20:35:22 | * | HakanD__ joined #nim |
20:36:22 | dom96 | gokr: well, i've taken a break to eat watermelon heh. Thank you trying to help. |
20:36:25 | dom96 | *you for |
20:36:28 | * | HakanD_ quit (Ping timeout: 250 seconds) |
20:37:27 | gokr | I am just glad you are testing it out. :) |
20:38:41 | * | Ainieco joined #nim |
20:39:44 | dom96 | gokr: I will compile Urho3D in release mode and see if that helps |
20:40:10 | gokr | If you try Linux or OSX I can be of more help ;) |
20:40:54 | Ainieco | hello, i'm impressed with that example of num's "automated proof" technology(what is that some subset of dependent types?) from home page, where can i find more about what else can it check? |
20:41:41 | Ainieco | s/num/nim/ |
20:44:14 | * | Matthias247 joined #nim |
20:54:31 | Ainieco | is disjoint check an only automated proof thing yet? |
20:56:35 | * | brson joined #nim |
20:56:54 | def- | Ainieco: I guess Araq knows best about it. I think it's pretty new, haven't tried it out yet |
20:59:37 | UberLambda | Is there any interest in a LLVM backend for the compiler? |
20:59:59 | UberLambda | (Just to know how much it could theoretically take to write one) |
21:00:03 | BlaXpirit_ | someone answered a few days ago |
21:00:09 | BlaXpirit_ | LLVM backend has been abandoned |
21:00:24 | UberLambda | Oh, so it was tried... |
21:00:30 | UberLambda | Codebase too huge to be ported over? |
21:00:51 | BlaXpirit_ | irclogs.nim-lang.org/12-02-2015.html 16:07:18 |
21:01:03 | dom96 | UberLambda: I think there is still some LLVM code-gen code left over in the compiler. |
21:01:53 | Ainieco | reading tut1 currently, and having good old Ada feeling about language, eg, fixed length array types, custom indexes, multidimensional arrays are very Ada-esque :) |
21:02:00 | UberLambda | BlaXpirit_, dom96: oh well, I guess it would have been nice |
21:02:43 | * | dumdum quit (Ping timeout: 256 seconds) |
21:10:09 | * | UberLambda quit (Remote host closed the connection) |
21:16:36 | * | vegai quit (Ping timeout: 244 seconds) |
21:16:57 | * | Mat4 joined #nim |
21:17:00 | Mat4 | hello |
21:17:24 | * | vegai joined #nim |
21:19:52 | * | reem joined #nim |
21:23:33 | gokr | dom96: 119? Record? :) |
21:23:42 | * | EulersBackup quit (Ping timeout: 250 seconds) |
21:23:55 | dom96 | gokr: 120 is the record :) |
21:23:59 | gokr | But ok, my phone is still here too so... that's cheatin. |
21:24:34 | * | reem quit (Ping timeout: 250 seconds) |
21:25:42 | dom96 | gokr: hehe, let's not worry about that. |
21:29:41 | dom96 | gokr: Now I am only getting these 3 errors: https://gist.github.com/dom96/5f9bffc508f728f37fcc |
21:30:09 | dom96 | VC++ needs to work on formatting their errors. |
21:30:44 | gokr | Don't recognize those either, again Windows stuff. |
21:31:44 | Mat4 | I have build Rust today for some comparisions with Nim |
21:31:59 | * | avshalom joined #nim |
21:32:50 | dom96 | Mat4: Cool. Let us know what you find out! |
21:37:04 | Mat4 | I have only compiled some tests at moment to get firm with this language. What I can say is that Rust's type system get in the way much earlier ;) |
21:39:12 | * | irrequietus quit () |
21:39:20 | reactormonk | Ainieco, welcome to nim :-) |
21:39:31 | Mat4 | hi |
21:43:42 | * | HakanD__ quit (Quit: Be back later ...) |
21:44:09 | * | HakanD__ joined #nim |
21:48:16 | * | infinity0 quit (Ping timeout: 255 seconds) |
21:49:01 | * | HakanD__ quit (Ping timeout: 264 seconds) |
21:49:56 | * | atgnag left #nim ("WeeChat 1.1.1") |
21:50:01 | * | infinity0 joined #nim |
21:50:22 | Araq | hi Ainieco what do you want to know about the "proof technology"? |
21:51:54 | dom96 | Araq: https://gist.github.com/dom96/5f9bffc508f728f37fcc Any ideas? |
21:52:17 | Araq | nope |
21:52:34 | Araq | these linker errors are always a source of frustration |
21:52:34 | dom96 | I had to build Urho3D in release mode. |
21:52:41 | Araq | well |
21:52:45 | dom96 | otherwise I got lot's of other errors |
21:52:50 | Araq | I had to fix the VS setup |
21:53:00 | Araq | and add some missing defines |
21:53:21 | Araq | but since I don't know cmake, I didn't know how to fix them properly and do a PR for Urho |
21:53:38 | dom96 | Which defines? |
21:54:15 | Araq | wait a sec |
22:04:12 | Araq | well you need to tell VS that build\Engine is a path for #include |
22:06:54 | Araq | and some projects required a missing URHO3D_WIN define |
22:06:54 | dom96 | How do I do that? |
22:07:18 | dom96 | Araq: Did you get compile errors for the Urho3d project without these changes? |
22:07:34 | Araq | I got a couple of errors, yes |
22:07:43 | Araq | without these changes |
22:07:49 | Araq | so ... run cmake_vs2013.bat |
22:07:52 | dom96 | It built fine for me. |
22:08:08 | dom96 | Until I enabled the INSTALL and PACKAGE projects. |
22:08:16 | dom96 | But a .lib was generated anyway |
22:08:42 | Araq | I never enabled INSTALL and PACKAGE |
22:09:05 | Araq | did you run cmake_vs2013.bat ? |
22:09:12 | dom96 | yes |
22:09:51 | dom96 | perhaps we're on different versions of the Urho3D source? |
22:10:12 | Araq | I'm using 1.32 |
22:10:27 | dom96 | Perhaps I shouldn't be using git HEAD heh |
22:11:31 | gokr | I think the readme mentions specifically 1.32 :) |
22:11:57 | dom96 | Yeah, my bad. |
22:12:14 | gokr | But we should improve the readme. Helping out some Urho3D people shows me its too short on how to get Nim devel. |
22:12:32 | * | kuzy000_ quit (Ping timeout: 252 seconds) |
22:12:42 | Araq | well I wanted to release 0.10.4 last weekend ... |
22:13:19 | dom96 | gokr: I will improve it once I get it working :) |
22:13:28 | gokr | dom96: I managed to install aporia via nimble, but only via head. |
22:13:49 | dom96 | gokr: Yeah, only head currently works. |
22:13:58 | gokr | ok, then you know ;) |
22:15:12 | dom96 | Yeah. I need to release a new version soon. |
22:17:20 | dom96 | Araq: Now i'm getting "The source directory "C:/Users/Dominik/git/Urho3D" does not appear to contain CMakeLists.txt." |
22:18:54 | Araq | I got urho 1.32 from some zip |
22:19:00 | * | HakanD__ joined #nim |
22:19:03 | Araq | that had the CMake stuff |
22:19:24 | dom96 | ok, i'll try that. |
22:23:05 | * | Ainieco quit (Quit: leaving) |
22:24:09 | * | reem joined #nim |
22:27:10 | gokr | Araq: I am improving the readme |
22:29:46 | * | Demos joined #nim |
22:36:08 | dom96 | Araq: That worked. I still had to build in release mode though, any ideas why that is? |
22:37:23 | Araq | dom96: nope, I never build in release |
22:37:36 | Araq | I get ~120 FPS anyway |
22:38:19 | * | kjo joined #nim |
22:38:52 | dom96 | Araq: I had to build Urho3D in release mode I mean. |
22:39:12 | dom96 | The character demo works though, really cool! |
22:40:15 | dom96 | mush doesn't compile |
22:40:23 | kjo | Hey folks, first-timer, learned about nim this weekend and have been playing around with the opencv wrapper |
22:40:35 | dom96 | hello kjo, welcome! |
22:40:38 | gokr | welcome! |
22:40:41 | Mat4 | hi |
22:40:55 | gokr | dom96: Great! mush has rotted. |
22:41:09 | gokr | dom96: But mush is ... just a subset of character I think |
22:41:29 | gokr | dom96: Now, go forth and port one of the other cool samples :) |
22:41:55 | * | pwernersbach joined #nim |
22:42:17 | pwernersbach | Can I make a template that contains an emit pragma? |
22:42:31 | gokr | dom96: If you have collected notes for Windows, feel free to stuff them into the readme somehow. |
22:43:09 | kjo | my first question: in service of getting face detection working, OpenCV uses the C++ vector class (std::vector<Rect>) any chance of easily interacting with C++ vectors in nim? |
22:43:16 | gokr | dom96: (and I just improved it so pull) |
22:43:17 | dom96 | gokr: I shall do that. Urho looks very fun. |
22:43:31 | gokr | Yeah, its quite impressive. |
22:45:20 | Araq | kjo: std::vector is easy to wrap with Nim devel. did it as some exercise |
22:45:30 | Araq | but threw away the code :P |
22:45:39 | * | Woflox quit (Read error: Connection reset by peer) |
22:45:52 | Mat4 | dom96: I fugured out, Rust has no range type :( |
22:46:10 | kjo | araq: That's good to hear! |
22:46:37 | Araq | pwernersbach: I think so, why wouldn't you? |
22:47:42 | pwernersbach | Araq: When I do something like: "template bar: expr {.immediate.} = {.emit: "foo".}", it emits twice |
22:48:07 | pwernersbach | Once when evaluated and once when used |
22:48:38 | Mat4 | sorry, figured |
22:48:42 | kjo | araq: any docs to look at or any hint you can offer? |
22:51:31 | Araq | kjo: https://github.com/Araq/Nim/blob/devel/doc/nimc.txt#L390 |
22:52:06 | Araq | pwernersbach: I don't think so |
22:53:23 | pwernersbach | Araq: Hmm, let me check… |
22:53:43 | Araq | template foo = |
22:53:45 | Araq | {.emit: "bar".} |
22:53:46 | Araq | foo() |
22:53:53 | Araq | produces 1 bar in the C code |
22:54:31 | Araq | and since the C code generator doesn't deal with templates at all, it's hard to imagine anything else |
22:55:02 | kjo | araq: Thanks! |
22:55:22 | Araq | dom96: I know that you talk about building urho3d.lib in release mode. as I said, I don't have to do that |
22:55:38 | dom96 | Araq: strange |
22:56:19 | * | koz_desktop joined #nim |
22:58:01 | * | vendethiel quit (Ping timeout: 264 seconds) |
23:00:56 | pwernersbach | Araq you're right. I was getting two sets of header includes, apparently Nim's compiler is smart enough to include FFI headers when it needs them, so I don't need to explicitly emit headers with a template |
23:01:32 | Araq | yeah, the compiler does these things for you |
23:02:25 | pwernersbach | That's awesome, thanks. |
23:02:27 | Araq | (it is not a "transpiler" :P ) |
23:03:38 | Araq | dom96: so you got the character demo to run? that's awesome! |
23:03:58 | dom96 | Araq: yeah. :D |
23:05:01 | dom96 | Araq: It's different then the CharacterDemo bundled with Urho3D. |
23:05:18 | gokr | Yeah, Andreas got carried away ;) |
23:05:38 | gokr | Threw in terrain and water, and then a console... |
23:05:51 | * | hasta left #nim (#nim) |
23:05:52 | gokr | Also, you have ... F1 and F2 IIRC |
23:06:33 | Araq | and 'F' to switch into first person view |
23:07:05 | dom96 | Araq: The water has some artifacts for me. |
23:08:14 | Araq | and I added a cheat code, when you type "allgirlsbelongtous" the male model is turned into a female model |
23:09:01 | Araq | dom96: yeah same here, but I think that's just because the water is really primitive |
23:09:19 | dom96 | Araq: or because you hacked it into the character demo :P |
23:09:30 | dom96 | i'll definitely port some of these examples to Nim |
23:09:37 | dom96 | they are all very vool |
23:09:38 | dom96 | *cool |
23:10:28 | Araq | yeah, one spends way too much time with them ... |
23:11:22 | dom96 | lol |
23:11:27 | dom96 | You're right about that |
23:13:34 | * | Buttons840 joined #nim |
23:14:52 | * | pafmaf quit (Quit: This computer has gone to sleep) |
23:15:08 | dom96 | Araq: Is there a reason why there already is a .lib file in the repo? |
23:15:35 | * | filwit joined #nim |
23:15:43 | Araq | gokr can tell you why |
23:15:56 | Araq | I thought it's using blimp |
23:16:07 | gokr | Hum? |
23:17:26 | gokr | Oh, hehe. Well... blimp doesn't fly for github repos. I mean, thats for our stuff. |
23:17:34 | gokr | I will nuke |
23:18:14 | filwit | i took a look at Urho in more depth, and was pretty impressed. I didn't realize it had an editor, fully cross-platform no less.. that's very cool. |
23:18:29 | gokr | Yeah, its a "hidden gem" |
23:18:38 | gokr | That editor is quite impressive all in itself. |
23:19:04 | filwit | it should be more of a advertised gem, really. That's a pretty big selling point. |
23:19:16 | filwit | I haven't actually tried it out yet, i plan on doing that sometime this week |
23:19:30 | gokr | There are some slick movies on youtube. |
23:19:45 | gokr | Also a commercialized tool exists now, Atomic Games something |
23:19:46 | filwit | yeah I was just looking at those :) |
23:19:49 | gokr | Ah |
23:20:35 | filwit | I'm pretty impressed with the framework too.. seems pretty close in basic features for Unity, minus a few platforms and rendering features |
23:20:50 | kjo | I ran into some trouble with this snippet: |
23:20:50 | kjo | type |
23:20:50 | kjo | StdMap {.importcpp: "std::map", header: "<map>".} [K, V] = object |
23:20:50 | kjo | proc `[]=`[K, V](this: var StdMap[K, V]; key: K; val: V) {.importcpp: "#[#] = #".} |
23:20:50 | kjo | var x: StdMap[cint, cdouble] |
23:20:51 | kjo | x[6] = 91.4 |
23:20:53 | kjo | argh |
23:21:15 | * | Mat4 quit (Quit: Verlassend) |
23:21:20 | gokr | Also, Lasse (the primary author) is adding D3D11 now I think. And they just got emscripten working. |
23:21:25 | kjo | error: expected unqualified-id |
23:21:25 | kjo | N_NIMCALL(void, #[#] = #)(std::map<int, double> & this_89051, int key_89055, double val_89057); |
23:21:25 | kjo | ^ |
23:21:25 | kjo | nim/Nim/lib/nimbase.h:146:44: note: expanded from macro 'N_NIMCALL' |
23:21:25 | kjo | # define N_NIMCALL(rettype, name) rettype name /* no modifier */ |
23:21:26 | kjo | ^ |
23:21:26 | kjo | 1 error generated. |
23:21:28 | gokr | kjo: Use a pastebin service |
23:21:33 | kjo | ok sorry |
23:21:51 | Araq | kjo: compile with 'nim cpp', not with 'nim c' |
23:22:08 | filwit | but the fact that it's open-source (no liscense fees for Android/iOS) is a big plus.. and now that Nim can be used for scripting is very good.. Unity still uses Mono 2.6, which is very inefficient compared to Nim |
23:22:15 | kjo | I used nim cpp --parallelBuild:1 test.nim |
23:22:33 | gokr | filwit: yup |
23:23:01 | Araq | kjo: you also need Nim devel for it to work |
23:23:38 | Araq | def-: I have the for loop detection code, but don't have the time to finish it. do you want to try to incorporate it into the compiler? |
23:23:40 | NhanH | how do you *convert*/ *cast* a byte variable to a float in nim? |
23:23:43 | filwit | gokr: actually, my brother just benchmarked the raytracer with Unity's new il2cpp backend, but it's still ~3x as slow as the Nim/C++ version |
23:23:52 | gokr | filwit: Here it is http://atomicgameengine.com |
23:24:04 | filwit | thanks, let me take a look |
23:24:06 | gokr | filwit: nice! |
23:24:55 | * | sillesta quit (Ping timeout: 264 seconds) |
23:25:35 | kjo | here's a pastebin |
23:25:35 | kjo | http://pastebin.com/siunSRAG |
23:25:40 | * | zama joined #nim |
23:25:58 | filwit | gokr: just curious, do you contribute to Urho in any form, or do you folks mostly use it? |
23:26:00 | * | reem quit (Remote host closed the connection) |
23:26:26 | filwit | (ie, do you work on the rendering pipe or anything) |
23:26:27 | gokr | filwit: No, we just got started. Araq is the one who knows it the best ;) |
23:26:48 | filwit | gokr: okay :) |
23:26:55 | gokr | Our current system doesn't use Urho, this is for Next Gen |
23:27:20 | Araq | kjo: ah, my bad, the '[]=' needs .header: "<map>" too |
23:27:28 | dom96 | gokr: https://github.com/3dicc/Urhonimo/pull/4 |
23:27:59 | filwit | it's unfortunate that Atomic editor is not supported on Linux (though that makes sense from a business standpoint) |
23:29:24 | Araq | dom96: " to ``'_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0'`` then |
23:29:25 | Araq | +you may need to compile Urho3D in release mode or vice versa." |
23:29:57 | Araq | no, we deal with that by adding /MD in vcc.cfg |
23:30:16 | Araq | maybe you need /MS or whatever it's called then |
23:30:24 | Araq | but it's not a release vs debug issue |
23:32:05 | kjo | araq: that did the trick, thanks |
23:35:47 | dom96 | Araq: Doesn't change anything. |
23:36:10 | Araq | dom96: you might need to use -f |
23:37:55 | dom96 | Araq: where? |
23:37:55 | filwit | gokr: hm, I thought the Atomic GE was using Urho3D, but taking a look at the github repo that doesn't appear to be the case, so I'm confused as to why you linked me (besides it being a very cool open-source project). Is someone working on wiring Nim to this (or are there plans for that)? |
23:38:34 | gokr | filwit: Are you sure? |
23:38:38 | Araq | dom96: "nim cpp -f character" |
23:38:57 | * | vendethiel joined #nim |
23:39:09 | filwit | gokr: unless they forked the entire Urho repo and renamed things, than it sure looks like a different code-base |
23:39:30 | dom96 | Araq: nope, although I do see it saying that /MS is unknown. |
23:39:30 | filwit | they're using Bullet physics directly, for instance (not Urho's physics abstraction) |
23:39:43 | gokr | They list Urho3D here, and the new emscripten stuff evidently comes from Atomic: http://atomicgameengine.com/about/ |
23:40:20 | filwit | gokr: i just started taking a look, perhaps I'm wrong. Let me investigate further. |
23:41:14 | dom96 | Araq: It also doesn't work if I go back to /MD. |
23:41:34 | gokr | filwit: It sure is Urho, but it may be heavily restructured: https://github.com/AtomicGameEngine/AtomicGameEngine/blob/master/Source/Atomic/Graphics/AnimatedModel.cpp |
23:42:03 | * | Trustable quit (Quit: Leaving) |
23:42:04 | gokr | I mainly mentioned it since its nice to see it being used as a platform. |
23:43:26 | Araq | dom96: ok, I'm wrong then. too bad. |
23:45:29 | filwit | yes it looks promising. I'm a little confused as to how they're getting away with using a refactored and rebranded Urho3D engine with a different license. I'm not seeing anything similar to Urho3D's license in the Atomic License.txt.. |
23:47:19 | dom96 | Araq: I'll see if I can get it working with Mingw at some point perhaps. |
23:50:43 | Araq | filwit: MIT allows you to do that, I think |
23:51:18 | filwit | ah, of course. |
23:52:05 | * | remline left #nim ("Leaving") |
23:52:27 | dom96 | good night |
23:53:58 | filwit | it looks like Atomic chose Javascript as the defacto scripting because of WebGL as a focus target. It would really cool to see Nim work it's way into that eventually, given that it compiles to JS and all. |
23:55:07 | filwit | although since they changed all the names, it's would definitely take some work to get the new Urho3D wrappers to work there, unfortunately |
23:56:32 | filwit | anyways, just musings. What this really shows is how well Urho3D is as a game-engine and how far Nim can be taken with it. |
23:58:24 | koz_desktop | If I did want to make a game in Nim, what would be a good engine to use? |
23:58:46 | filwit | koz_desktop: Urho3D of course :) |
23:59:10 | koz_desktop | How is it licensed? |
23:59:17 | filwit | MIT apparently |
23:59:18 | flaviu | We've just been talking about how https://github.com/3dicc/Urhonimo will be supported by Nim officially. |
23:59:29 | koz_desktop | That would be *awesome*. |
23:59:42 | koz_desktop | I'm thinking of using Nim for a game project of mine, and such an engine would make life *much* easier. |
23:59:47 | koz_desktop | I just need to find an artist. :( |