00:01:38 | * | ipjk quit (Quit: Leaving) |
00:17:03 | * | gmpreussner quit (Quit: kthxbye) |
00:19:56 | * | gmpreussner joined #nim |
00:20:24 | * | Snircle_ quit (Quit: Textual IRC Client: www.textualapp.com) |
00:23:41 | * | Snircle joined #nim |
00:27:38 | FromGitter | <zacharycarter> is the building too small? |
00:27:42 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/5mz1/Screen-Shot-2017-10-12-at-8.27.23-PM.png) |
00:34:33 | * | Nobabs27 quit (Quit: Leaving) |
00:38:50 | * | couven92 quit (Quit: Client Disconnecting) |
00:43:34 | FromGitter | <zacharycarter> https://imgur.com/a/Rm2rd yeah that looks way better |
00:59:47 | * | Etheco quit (Quit: Leaving) |
01:25:47 | shashlick | @zacharycarter : I vote for sci-fi, was a big fan of Total Annihilation back in the day |
01:26:09 | FromGitter | <zacharycarter> I think that's the route I'm going |
01:26:14 | FromGitter | <zacharycarter> here's the current scale I'm going for |
01:26:36 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/t9eT/Screen-Shot-2017-10-12-at-8.50.03-PM.png) |
01:27:52 | FromGitter | <zacharycarter> just waiting on the modo forums for someone to help me figure out how to assign my material correctly to that model :/ |
01:34:42 | * | yglukhov joined #nim |
01:39:01 | * | yglukhov quit (Ping timeout: 240 seconds) |
01:39:43 | * | marcux quit (Ping timeout: 248 seconds) |
01:45:31 | * | chemist69 quit (Ping timeout: 255 seconds) |
01:59:39 | * | chemist69 joined #nim |
02:21:58 | * | smt` is now known as smt |
02:27:49 | * | user0_ quit (Quit: user0_) |
02:32:23 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
02:35:43 | * | NimBot joined #nim |
03:10:49 | * | endragor joined #nim |
03:11:06 | FromGitter | <zacharycarter> https://imgur.com/a/Q1b7E |
03:18:20 | * | JappleAck quit (Quit: Leaving) |
03:30:26 | * | dddddd quit (Remote host closed the connection) |
03:37:16 | * | yglukhov joined #nim |
03:41:21 | * | yglukhov quit (Ping timeout: 240 seconds) |
04:10:38 | Araq | zacharycarter: use the Cylons from Battlestar Galactica as one race |
04:10:56 | Araq | the other race can be the humans |
04:11:52 | Araq | the Cylons have the 13 humanoid models that can infiltrate terran buildings |
05:12:04 | Araq | omg 'nimbench' is awesome |
05:12:15 | Araq | don't know how I could live without it |
05:35:01 | Araq | yay my new custom strings are 30% slower than Nim's builtin string |
05:35:25 | Araq | and if I use C's malloc it's 500% slower |
05:37:31 | * | libman quit (Quit: Connection closed for inactivity) |
05:39:15 | * | yglukhov joined #nim |
05:42:46 | FromGitter | <Varriount> Araq: Nimbench? |
05:43:35 | * | yglukhov quit (Ping timeout: 240 seconds) |
05:54:26 | Araq | https://github.com/ivankoster/nimbench.git |
05:58:13 | FromGitter | <mratsim> Prepare for another series of bug report Araq :P |
06:00:49 | FromGitter | <mratsim> btw in https://github.com/nim-lang/Nim/issues/6501. Using {.noinit.} in the core of the library improved training speed than 30% (and only I still have to use noinit in the neural net module). So this is huge! |
06:01:32 | * | couven92 joined #nim |
06:05:05 | * | solitudesf joined #nim |
06:21:26 | * | Vladar joined #nim |
06:34:20 | * | nsf joined #nim |
06:40:25 | * | PMunch joined #nim |
06:46:07 | * | gokr joined #nim |
06:54:22 | FromGitter | <gokr> @Yardanico I usually use this style: ⏎ ⏎ ```pro newStatistics*(): Statistics = ⏎ Statistics(newestUser: "alfred")``` [https://gitter.im/nim-lang/Nim?at=59e0631eb20c642429f7fb5c] |
06:55:14 | FromGitter | <gokr> Although, such constructor procs would typically usually take params, so in this case I would have a newestUser param, or whatever. |
06:58:28 | * | Ven joined #nim |
06:58:51 | * | Ven is now known as Guest43745 |
07:27:00 | * | yglukhov joined #nim |
07:28:21 | * | yglukhov quit (Remote host closed the connection) |
07:28:36 | * | yglukhov joined #nim |
07:31:00 | * | claudiuinberlin joined #nim |
07:45:06 | * | PMunch_ joined #nim |
07:46:37 | Araq | temp.nim relative time/iter iters/s |
07:46:37 | Araq | ============================================================================ |
07:46:37 | Araq | idiomatic 9.37ms 106.73 |
07:46:39 | Araq | manual 10.61ms 94.23 |
07:46:55 | Araq | stupid idiomatic Nim string handling code |
07:47:32 | Araq | beating my new shiny toy |
07:47:41 | * | PMunch quit (Ping timeout: 258 seconds) |
07:53:20 | * | PMunch_ is now known as PMunch |
07:54:55 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:57:06 | FromGitter | <Varriount> Araq: What is your custom string type for? |
07:57:25 | FromGitter | <Yardanico> No GC IIRC |
07:57:39 | FromGitter | <Yardanico> It works without GC |
08:00:10 | Araq | yes |
08:10:06 | * | claudiuinberlin joined #nim |
08:14:09 | FromGitter | <Bennyelg> @Arak |
08:14:25 | FromGitter | <Bennyelg> @Araq When we are going to make Nim Shirts?! |
08:14:32 | FromGitter | <Bennyelg> Nim Stickers |
08:15:03 | FromGitter | <Bennyelg> come-on, I need talk to some Alibaba guy in china, this is probably cheap and another source of extra money for the project |
08:17:58 | FromGitter | <Bennyelg> Forums system in progress: ⏎ https://imgur.com/a/iq7W1 # Main page. ⏎ https://imgur.com/a/dZJRx # Inside forum. ⏎ https://imgur.com/a/QEh7F # Inside Thread. [https://gitter.im/nim-lang/Nim?at=59e076b53cb340a2611bc7b0] |
08:18:18 | Araq | well ok? let's make shirts. what is my task? |
08:20:01 | FromGitter | <Bennyelg> @Araq Choose the logo, I'll speak with the guy in alibaba see how much it will cost us |
08:24:10 | Araq | our logo is the crown |
08:24:48 | Araq | btw is there a single good benchmark out there? |
08:25:31 | Araq | I can't find any |
08:25:42 | Araq | json -- tests the json stdlib |
08:25:51 | Araq | brainfuck -- yeah, whatever |
08:26:51 | Araq | havlak -- at least it's trying |
08:28:16 | * | solitudesf quit (Ping timeout: 255 seconds) |
08:28:23 | euantor | I see this repository posted on HN fairly often: https://github.com/kostya/benchmarks |
08:28:41 | Araq | that's what I just described |
08:28:45 | euantor | yeah |
08:28:52 | euantor | It's pretty useless |
08:29:51 | Araq | Python has "pybench" which is used to look at Python performance improvements/regressions |
08:29:58 | euantor | AT least Nim does quite well in most of them though |
08:31:20 | Araq | I beg to differ but also can't be bothered to take a closer look |
08:31:47 | PMunch | Bennyelg, on the topic of merch, how 'bout mugs: http://www.alibaba.com/product-detail/12oz-Cone-Shape-Sublimation-White-Latte_60680260984.html?spm=a2700.7724838.2017115.45.133e8b59CtWNwe |
08:46:57 | * | endragor quit (Remote host closed the connection) |
08:48:39 | * | endragor joined #nim |
08:50:19 | * | endragor quit (Remote host closed the connection) |
08:50:48 | * | endragor joined #nim |
08:52:00 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:54:06 | * | claudiuinberlin joined #nim |
08:56:08 | * | claudiuinberlin quit (Client Quit) |
08:58:46 | * | Arrrr joined #nim |
08:58:46 | * | Arrrr quit (Changing host) |
08:58:46 | * | Arrrr joined #nim |
08:59:30 | FromGitter | <Bennyelg> @PMunch better to do drop shipping instead of buying everything to some one place |
09:01:04 | * | claudiuinberlin joined #nim |
09:30:26 | * | Guest43745 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:32:01 | PMunch | ? |
09:33:58 | * | vlad1777d joined #nim |
09:34:45 | * | Ven joined #nim |
09:35:11 | * | Ven is now known as Guest53747 |
09:35:17 | * | skrylar joined #nim |
09:35:24 | skrylar | zacharycarter: the joys of loading DDS files :b |
09:36:16 | PMunch | @Bennyelg, what did you mean? |
09:38:11 | * | NimBot joined #nim |
09:39:30 | FromGitter | <Bennyelg> Sorry I probably did not understand correctly what did you ment |
09:41:38 | Arrrr | What comes next after destroyer feature? |
09:44:38 | PMunch | @Bennyelg, I was just saying that mugs would be cool merch :) |
09:45:06 | FromGitter | <Bennyelg> Yea, correct, but how we manage all the logistic behind it? |
09:45:41 | FromGitter | <Bennyelg> I think it's time to create simple shop using Karax and new link from the nim-website |
10:14:08 | PMunch | Hmm, how does others do this kinda stuff? I would imagine that there is a fairly streamlined process of doing it |
10:15:35 | skrylar | what, storefronts? |
10:16:48 | skrylar | usually a database. table for products, table for listings, table for shopping cart references back to listings, orders, etc. ANS backend for whoever is doing the fulfillment |
10:17:25 | * | skrylar was amused by the dbase format as of late. turns out its still around, and there are still xbase compilers one of which was open source. lol |
10:18:51 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:19:07 | skrylar | the REALLY advanced ones log the hell out of everything |
10:19:19 | skrylar | time viewing a listing, order of views, etc |
10:19:24 | FromGitter | <mratsim> I’m having strange issue. I have a nil exception but only in the unittest module and only with the C++ backend ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e0932cf7299e8f53e10299] |
10:19:54 | * | claudiuinberlin joined #nim |
10:23:40 | FromGitter | <mratsim> Commented the test and stumbled on something else: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e0942cf7299e8f53e10725] |
10:24:03 | FromGitter | <mratsim> (C backend works fine) |
10:28:14 | * | jjido joined #nim |
10:28:49 | skrylar | meh. going to uess the best way to read dds is to just hand the user a cursor struct and say good luck |
10:31:06 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:34:05 | * | claudiuinberlin joined #nim |
10:38:39 | PMunch | skrylar, wasn't really thinking about storefront, more about actually getting customized products |
10:39:14 | * | Guest53747 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:39:15 | PMunch | Hmm, Araq is static too broken to do this: https://github.com/PMunch/genui/blob/master/genuiLayoutGtk.nim#L20 |
10:39:21 | skrylar | PMunch, easy version is stuff like cafepress. |
10:39:44 | skrylar | harder version is drop shipping |
10:40:21 | PMunch | I'm trying to recurse over my data structure and create code from it, and it doesn't appear to realize that variables in a macro are static by nature (aren't they) |
10:40:31 | PMunch | skrylar, drop shipping? |
10:41:37 | * | zolk3ri joined #nim |
10:44:31 | PMunch | skrylar, problem with cafepress is price overhead would probably not leave a lot of profit for Nim |
10:48:12 | jjido | What does static mean in that context ? |
10:49:32 | PMunch | Static means that it is only done on compile time |
10:50:20 | PMunch | If a macro has just eg. string as an input time you would actually get a NimNode of a string. When it's static you get a regular string and it has to be available on compile-time |
10:52:35 | * | jjido quit (Ping timeout: 240 seconds) |
10:54:53 | Araq | PMunch: don't use the static here, access it as n.strVal or something |
11:01:56 | * | Snircle joined #nim |
11:02:39 | * | jjido joined #nim |
11:06:38 | skrylar | PMunch, well. thems the breaks :/ |
11:07:01 | skrylar | you either lose margin to them printing on demand / managing the inventory, or you have to pay up front to manufacture the reserve stock |
11:07:19 | skrylar | drop shipping is basically having the other company store it in their warehouse and ship it on demand |
11:15:03 | PMunch | Maybe we could do a group buy of some kind? |
11:15:10 | skrylar | massdrop is a thing |
11:15:28 | skrylar | they specialize in infrequent group orders |
11:15:44 | FromGitter | <mratsim> @Araq Are there differences between C++ GC and C GC? I get rawAlloc segfaults all over the place with the C++ backend. ⏎ ⏎ For example I “solved” this one: ⏎ ⏎ ```code paste, see link``` ... [https://gitter.im/nim-lang/Nim?at=59e0a0603cb340a2611ca8bd] |
11:15:52 | PMunch | Yeah I've heard about those |
11:16:19 | PMunch | Araq, but why? Seems a bit counter intuitive |
11:16:24 | skrylar | mratsim: c++ libraries are infinitely more likely to do something stupid with a pointer that nobody knows about imho |
11:16:46 | skrylar | "oh i put it in this auto pointer box i don't understand how works, now interop is broked" |
11:17:13 | skrylar | in some ways thats why i chose fltk with nim. fltk does absolutely nothing clever. |
11:17:24 | Araq | mratsim: there are no differences but the produced C++ code tends to contain fewer temporaries and maybe this allows the C++ backend to hide roots on the stack from us much better |
11:17:27 | FromGitter | <mratsim> It’s the seq concatenation that out of 50 seq concatenation that works just breaks at the 51 |
11:17:51 | skrylar | pet peeve: c++ code that uses new, memcopy, delete instead of realloc |
11:18:13 | skrylar | i mean realloc at least gives the allocator a *chance* to go woops we actually had more space for your seq, here you go |
11:18:15 | Araq | you can put GC_ref / GC_unref around your seq |
11:18:19 | PMunch | Does something like strVal exist for objects? |
11:18:31 | skrylar | repr or $? |
11:18:43 | Araq | PMunch: well these are nnkObjConstr or something |
11:18:57 | Araq | but it doesn't look like you actually inspect these |
11:19:22 | Araq | skrylar: realloc is irrelevant. ;-) |
11:19:30 | PMunch | The layout argument? I use it all the time in that macro.. |
11:19:45 | Araq | do you actually *inspect* it? |
11:20:01 | skrylar | Araq, i still used it when i wrote C code |
11:20:18 | skrylar | it's not my fault if the underlying tools herp the derp and ignore semantic information i give them |
11:21:07 | Araq | it's your fault for caring what you never measured :P |
11:22:03 | FromGitter | <mratsim> This is driving me nuts ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ will try GC_ref [https://gitter.im/nim-lang/Nim?at=59e0a1db3cb340a2611cb1e6] |
11:22:11 | PMunch | Uhm, yes? I use the various fields in the layout object to determine which code to generate.. |
11:22:21 | skrylar | right now i'm measuring the amount of antidepressants needed when dealing with microsoft formats |
11:22:31 | Araq | besides, modern C++ vectors could do 'if pod: realloc else: new(); copy(); delete' |
11:22:37 | skrylar | so many uint32s and not one is just "how many channels does this image have?" |
11:22:45 | skrylar | nope, gotta have a massive table of fourcc codes |
11:22:53 | PMunch | If you look at the line I sent that's a call to the macro it's in, so it's recursively going through all the elements in the layout object |
11:24:21 | skrylar | fortunately almost all of these can be ignored because the only reason to USE dds is for dxt |
11:24:54 | skrylar | apparently Khronos formalized ECT1/2 and ASTC but they aren't really widespread |
11:26:22 | FromGitter | <mratsim> Khronos agrees on standard 3 years after everyone basically (probably not their fault though) |
11:26:43 | skrylar | well i blame android for sucking :P |
11:27:22 | skrylar | OpenGL 3/4+ and GLES2/3 are required to support ECT1/2 because no patents |
11:27:39 | skrylar | but since the patents just expired, there's no reason to use them anymore :| |
11:28:34 | skrylar | anyway. |
11:28:38 | skrylar | trying to load textures in native nim |
11:29:00 | PMunch | Is there another way I should do it Araq? |
11:29:27 | Araq | if you iterate over the fields use a 'typed' parameter? |
11:31:40 | PMunch | Hmm, I changed it to a proc and it stopped complaining |
11:32:44 | PMunch | But now I have a different error: "Error: request to generate code for .compileTime proc: initUILayout" |
11:32:49 | * | endragor quit (Remote host closed the connection) |
11:32:50 | PMunch | What does that mean? |
11:37:35 | * | jjido quit (Ping timeout: 240 seconds) |
11:46:10 | * | Ven joined #nim |
11:46:34 | * | Ven is now known as Guest45011 |
11:47:34 | * | Yardanico joined #nim |
11:47:50 | * | sleepyqt joined #nim |
11:53:20 | * | endragor joined #nim |
11:53:49 | PMunch | Hmm, I could try to do it the same way as for the UI widgets. But I really didn't want to use a hidden global variable.. |
11:56:28 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
11:56:51 | * | Snircle joined #nim |
11:57:07 | * | PMunch_ joined #nim |
11:58:23 | * | endragor quit (Ping timeout: 258 seconds) |
11:58:24 | FromGitter | <mratsim> Global variable are evil, use a Monad transformation ;) |
11:59:42 | * | PMunch quit (Ping timeout: 260 seconds) |
11:59:59 | * | endragor joined #nim |
12:02:56 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:04:01 | * | endragor quit (Ping timeout: 240 seconds) |
12:04:16 | Araq | PMunch_: it means you need to annotate your proc with .compileTime |
12:05:19 | * | gokr quit (Ping timeout: 248 seconds) |
12:05:32 | * | vlad1777d quit (Ping timeout: 260 seconds) |
12:10:15 | * | endragor joined #nim |
12:10:56 | * | marcux joined #nim |
12:13:12 | * | solitudesf joined #nim |
12:17:21 | * | PMunch_ is now known as PMunch |
12:18:46 | PMunch | Araq, it is annotated with {.compileTime.} but the issue seems to be that Nim doesn't want to have it in a code block. I'll implement this like I did with the UIWidgets with a hidden global var and then I can fix it later. |
12:21:10 | Araq | ok |
12:21:31 | skrylar | hidden globals... seizure time |
12:21:38 | skrylar | admittedly FLTK did that for events |
12:21:44 | skrylar | well its a very visible global |
12:22:10 | PMunch | Yeah I know.. Globals are bad |
12:22:17 | skrylar | they just stuff UI events in a global "Fl" class and then have a 'handle' function with an enum for the event type |
12:22:20 | PMunch | But right now I just want a system that works |
12:22:23 | skrylar | which i thought was amusing |
12:22:51 | * | ShalokShalom_ joined #nim |
12:23:39 | skrylar | tsk |
12:23:44 | * | gokr joined #nim |
12:23:46 | skrylar | the code must be good or it must not exist |
12:25:41 | * | ShalokShalom quit (Ping timeout: 240 seconds) |
12:26:21 | skrylar | sometimes using other people's nim code makes me scared |
12:26:23 | skrylar | i tried nico |
12:26:36 | skrylar | for some reason the compile time with nico is higher than just doing the same things with raw SDL |
12:26:50 | PMunch | Haha, I'm just checking the feasability of something like this. Then I can worry about implementation details later |
12:27:22 | PMunch | Might be using some converters, they can be slow as balls.. |
12:30:43 | skrylar | it is a mystery |
12:30:59 | skrylar | I do twitch a little, wishing we just had a jit or something, but meh |
12:31:26 | PMunch | Just In Time compiler? |
12:31:26 | skrylar | I am a massive fan of livecoding because i tend to invoke the program and test it every couple lines |
12:31:31 | Yardanico | PMunch, for VM |
12:31:33 | Yardanico | maybe |
12:31:44 | skrylar | no, its just me being weird |
12:32:17 | skrylar | in smalltalk/lisp you just have images, so you write a function and that function is compiled, everything sorta stays linked and built incrementally, so you don't pay linker costs for ex. OGRE |
12:32:24 | skrylar | eiffel apparently tried something similar |
12:32:37 | skrylar | downside is that its awkward to code such a vm |
12:32:54 | PMunch | Isn't that sorta the idea behind nimcache? |
12:33:04 | skrylar | you still pay linker costs |
12:33:38 | Yardanico | we will have very fast incremental compilation with rod files :) |
12:33:46 | zolk3ri | hey Yardanico! |
12:33:51 | Yardanico | zolk3ri, hi |
12:33:59 | skrylar | i'm just pipe dreaming. i solve it by writing compact nim code and cherrypicking my deps :) |
12:34:26 | FromGitter | <mratsim> Is it possible to compile part of the code to C and only the necessary part to C++ and link them together without jumping through hoops. I'm growing uneasy about the number of when not defined(cpp) in my code AND my test suite. |
12:35:00 | skrylar | i don't think so |
12:35:13 | Araq | mratsim: Nim supports that with a "mixed" mode (use 'nim c' instead of 'nim cpp') but there are dragons |
12:36:06 | skrylar | that mode detonated when i tried it with fltk |
12:36:12 | FromGitter | <mratsim> I guess importcpp does not work with C++ template in that case right? |
12:36:32 | Araq | any file that uses .importcpp gets compiled as C++ code |
12:36:42 | FromGitter | <mratsim> Cool! |
12:36:59 | FromGitter | <mratsim> I'll try that. |
12:40:45 | * | gokr quit (Ping timeout: 246 seconds) |
12:43:00 | * | Jesin quit (Quit: Leaving) |
12:43:12 | FromGitter | <kinokasai> Hey again. |
12:43:29 | FromGitter | <kinokasai> Sorry for the newbs question again. |
12:43:56 | Yardanico | it's fine |
12:44:04 | Yardanico | ask your questions :) |
12:44:04 | FromGitter | <kinokasai> In the tutorial, there's written `# no need to write n[].data; in fact n[].data is highly discouraged!` for refs |
12:44:18 | FromGitter | <Yardanico> yeah |
12:44:39 | Yardanico | so? |
12:45:13 | FromGitter | <kinokasai> However, this is incorrect? : ⏎ ⏎ ```proc ex(x: ref string) = ⏎ var l = x.len()``` [https://gitter.im/nim-lang/Nim?at=59e0b5595c40c1ba79972daa] |
12:45:30 | FromGitter | <kinokasai> But it does work with `x[].len()` |
12:46:41 | * | couven92 quit (Quit: Client disconnecting) |
12:53:59 | FromGitter | <kinokasai> Anything I missed? |
12:55:10 | * | Laon joined #nim |
12:59:47 | * | zolk3ri quit (Quit: Lost terminal) |
13:00:12 | * | zolk3ri joined #nim |
13:08:14 | FromGitter | <stisa> @kinokasai in your example, `data` is a field of the ref, while `len` is a proc that expects a string |
13:10:50 | * | ShalokShalom_ is now known as ShalokShalom |
13:13:37 | FromGitter | <mratsim> `x[]` dereference the `ref string` string to give you the string. For ref objects field access, dereferencing is implicit. |
13:16:06 | * | dddddd joined #nim |
13:17:38 | FromGitter | <kinokasai> Okay! |
13:17:59 | FromGitter | <kinokasai> Is there a function call syntax akin to `->` in C? |
13:18:08 | FromGitter | <kinokasai> Or is it just `[].` |
13:19:43 | * | claudiuinberlin joined #nim |
13:27:23 | * | Ven joined #nim |
13:27:47 | * | Laon quit (Ping timeout: 260 seconds) |
13:27:48 | * | Ven is now known as Guest83577 |
13:27:58 | * | jjido joined #nim |
13:28:20 | * | Guest45011 quit (Read error: No route to host) |
13:28:39 | * | Ven_ joined #nim |
13:31:43 | * | Guest83577 quit (Ping timeout: 248 seconds) |
13:33:06 | * | manjaro-kde5_ joined #nim |
13:35:00 | FromGitter | <Yardanico> what do you mean? |
13:35:12 | FromGitter | <Yardanico> [] is for indexed access and dereferencing |
13:39:07 | * | endragor quit (Remote host closed the connection) |
13:42:34 | FromGitter | <Yardanico> you just would do x.len() if you have "len" proc which accepts a "ref string" |
13:42:52 | * | endragor_ joined #nim |
13:43:30 | Araq | if you use 'ref string' you're using Nim wrong |
13:44:59 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:47:04 | * | kafke joined #nim |
13:47:46 | * | endragor_ quit (Ping timeout: 264 seconds) |
13:47:52 | FromGitter | <Yardanico> Araq: will you write here https://nim-lang.org/araq/ when you would finish most of your "destroyer" module work? |
13:48:43 | * | gokr joined #nim |
13:55:12 | * | endragor joined #nim |
13:55:33 | * | claudiuinberlin joined #nim |
13:55:39 | * | claudiuinberlin quit (Client Quit) |
13:55:57 | Araq | certainly |
13:57:07 | * | Ven joined #nim |
13:57:31 | * | Ven is now known as Guest22988 |
13:57:42 | * | claudiuinberlin joined #nim |
13:59:17 | * | Ven_ quit (Ping timeout: 260 seconds) |
13:59:29 | * | endragor quit (Ping timeout: 248 seconds) |
14:01:59 | * | ShalokShalom_ joined #nim |
14:02:12 | * | ShalokShalom quit (Ping timeout: 260 seconds) |
14:12:38 | * | kafke_ joined #nim |
14:12:43 | * | kafke_ quit (Remote host closed the connection) |
14:12:45 | * | kafke quit (Read error: Connection reset by peer) |
14:13:17 | * | kafke joined #nim |
14:14:11 | PMunch | Hmm, now I remember why I didn't use a global variable in the first place |
14:14:53 | PMunch | The macros need to pass the layer at which to add the new element to. So I need to pass around a static object anyways |
14:16:40 | PMunch | Araq, how would you do this? Is it possible? The idea is that I have multiple calls which return the node they create and this node is passed to further calls wanting to add more to that node. This is however all done on compile-time with one final call actually realizing the entire structure. |
14:24:08 | * | tax joined #nim |
14:28:04 | * | Jesin joined #nim |
14:31:04 | * | d10n-work joined #nim |
14:31:23 | * | sz0 joined #nim |
14:33:55 | * | Ven_ joined #nim |
14:35:46 | * | Guest22988 quit (Ping timeout: 264 seconds) |
14:36:36 | * | Ven_ quit (Client Quit) |
14:39:29 | * | Ven_ joined #nim |
14:48:01 | FromGitter | <exts> hmm, does anyone have an example of connecting to a remote server using nim and ssh? |
14:48:31 | PMunch | https://github.com/ba0f3/libssh2.nim/blob/master/examples/ssh.nim |
14:48:48 | FromGitter | <exts> thanks :) |
14:48:50 | PMunch | Something like that? |
14:49:05 | FromGitter | <exts> taking a look, but it seems to be in the right direction |
14:49:16 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:49:50 | * | claudiuinberlin joined #nim |
14:51:38 | * | claudiuinberlin quit (Read error: Connection reset by peer) |
15:07:01 | * | PMunch quit (Quit: Leaving) |
15:11:57 | * | libman joined #nim |
15:14:20 | * | kafke quit () |
15:30:21 | * | PMunch joined #nim |
15:30:47 | * | nsf quit (Quit: WeeChat 1.9) |
15:33:32 | Arrrr | What do you think about this? https://news.ycombinator.com/item?id=15461891 |
15:34:34 | Yardanico | The control flow is so labyrinthine that some of the code is actually indented by 23 tabs. |
15:34:41 | Yardanico | Forget the 80-column rule -- these lines don't even start until column 92! |
15:34:57 | Yardanico | well a bad programmer can always write spaghetti code |
15:35:02 | Yardanico | even in Nim (saw some of it :D) |
15:36:35 | * | gokr quit (Ping timeout: 240 seconds) |
15:37:18 | crem | Did you consider starting to work on a new programming language, now that you have learnt from all mistakes you had while designing nim? |
15:38:32 | Yardanico | maybe nim v2 ? :) |
15:39:50 | crem | There should be another v0.* sequence :) |
15:40:03 | Yardanico | nah |
15:40:03 | crem | Maybe nimv2 v0.*, that's fine ) |
15:40:13 | Yardanico | araq is already doing a lot of stuff preparing 1.0 |
15:40:23 | crem | Yeah, that's frustrating. |
15:40:33 | Yardanico | why ? :) |
15:41:29 | crem | No breaking changes anymore. :) |
15:41:49 | Yardanico | why not ? maybe in major patches |
15:42:04 | Yardanico | there wasn't many breaking changes from 0.16.0 to 0.17.2 btw |
15:42:55 | Yardanico | this was the last breaking change: https://github.com/nim-lang/Nim/commit/ddc131cf07972decc206e033b2dd85a42eb1c98d |
15:43:09 | Yardanico | I don't remember other very big breaking changes |
15:43:16 | Yardanico | well this isn't very big too |
15:43:34 | * | TjYoco joined #nim |
15:43:46 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:45:04 | crem | Anyway, I don't use nim yet. I like it from documentation and constantly plan to do it for the next project, but every time so far it happens that it doesn't really fit. |
15:45:59 | * | user0_ joined #nim |
15:47:46 | Araq | crem: I regularly start new programming languages |
15:48:04 | * | yglukhov quit (Remote host closed the connection) |
15:48:08 | Araq | then I abandom them and continue on Nim, sometimes taking features from them |
15:48:42 | Yardanico | really? |
15:48:54 | Yardanico | is there any of them in public? |
15:49:03 | Araq | yep. |
15:49:26 | Araq | er, that 'yep' refers to your "really?" question. |
15:49:51 | dom96 | It's not as if he implements full-fledged compilers for these languages |
15:49:58 | dom96 | he just imagines how they would be designed |
15:49:59 | crem | Once you start writing compilers, you cannot stop doing that. It's like tunnel digging in Switzerland. When they have a free minute they dig a tunnel somewhere. |
15:51:48 | * | miran joined #nim |
15:56:57 | Araq | designing new and better things is not the hard part, the hard part is removing things again |
16:00:27 | * | stisa joined #nim |
16:06:09 | Araq | btw which tools do you guys for profiling on osx? |
16:09:30 | * | obadz quit (Quit: WeeChat 1.9.1) |
16:09:41 | dom96 | Araq: You can use valgrind for that |
16:10:01 | dom96 | You've read my blog post, right? :P |
16:10:33 | * | yay joined #nim |
16:10:41 | Yardanico | would be really cool if someone would make a GUI analyzer for nimprof output :P |
16:10:58 | * | Trustable joined #nim |
16:11:14 | PMunch | Hmm, is there any way to take in typed/untyped and return a static object? |
16:11:19 | Araq | dom96: yes I did, I wanted to hear some other opinions |
16:11:40 | Araq | PMunch: produce a nkObjConstr tree, where is the problem |
16:11:53 | yay | Hi! I wonder if anybody tried using Nim with Web Assembly, Emscripten: https://github.com/kripken/emscripten |
16:12:18 | yay | Does Nim GC work there? |
16:12:27 | Yardanico | yes, why not? |
16:12:33 | PMunch | Ah, of course |
16:12:36 | Yardanico | https://github.com/Jipok/Nim-SDL2-and-Emscripten |
16:12:45 | Yardanico | as an example |
16:13:02 | Yardanico | also this library has WASM support |
16:13:02 | Yardanico | https://github.com/zacharycarter/zengine |
16:13:41 | yay | oh, nice! thanks for the links! I'll check them out |
16:13:56 | yay | the reason I asked about the GC, is because from what I've read it's a WIP: https://github.com/WebAssembly/design/issues/1079 |
16:14:14 | Yardanico | well it's emscripten portable GC |
16:14:17 | Yardanico | nim has it's own GC |
16:14:22 | Yardanico | which is very portable AFAIK |
16:14:53 | Araq | yay: actually you need to watch out when using the GC, but it's possible to use it |
16:14:55 | * | ShalokShalom_ quit (Ping timeout: 248 seconds) |
16:15:31 | Araq | the problem is that the GC cannot reliably examine the stack, so you have to disable it and enable it at the end of your frame when you know there are no pointers left on the stack |
16:15:52 | Araq | yglukhov knows more |
16:16:55 | yay | thanks, this is very good to know :) |
16:22:57 | * | PMunch quit (Quit: leaving) |
16:35:38 | FromGitter | <mratsim> @Araq for profiling on OSX, I use Apple Instruments which can give you call stack like that: https://github.com/mratsim/Arraymancer/issues/111 and even dive into the assembler code: https://github.com/mratsim/Arraymancer/issues/104 and also compare traces between run |
16:39:28 | * | TjYoco quit (Ping timeout: 240 seconds) |
16:41:01 | * | JappleAck joined #nim |
16:41:09 | Yardanico | mratsim: https://github.com/mratsim/Arraymancer/blob/fa9bbb79d64d8538ca1f504b515d23dde4fe6cff/src/tensor/aggregate.nim#L28 |
16:41:09 | Yardanico | :D |
16:41:14 | Yardanico | double {.noInit,noInit.} = |
16:41:19 | Yardanico | to be sure ? :) |
16:42:06 | FromGitter | <mratsim> lol, 30% perf is nothing to sneeze at ;) |
16:45:55 | * | ShalokShalom joined #nim |
16:47:18 | * | Trustable quit (Remote host closed the connection) |
16:50:28 | * | Jesin quit (Ping timeout: 240 seconds) |
16:55:35 | * | vlad1777d joined #nim |
16:56:29 | * | yglukhov joined #nim |
16:58:21 | FromGitter | <mratsim> Is there something better than rmate to code Nim on a remote machine via VS code? |
17:01:52 | Yardanico | ftp-sync? |
17:05:36 | * | vlad1777d quit (Remote host closed the connection) |
17:07:08 | * | vlad1777d joined #nim |
17:23:18 | Yardanico | true(1) - do nothing, successfully |
17:25:12 | * | TjYoco joined #nim |
17:27:58 | * | JappleAck quit (Quit: Leaving) |
17:35:32 | Arrrr | int40 when |
17:38:05 | * | jjido quit (Ping timeout: 240 seconds) |
17:40:13 | * | Jesin joined #nim |
17:43:03 | * | claudiuinberlin joined #nim |
17:49:49 | dom96 | Starting another stream soon https://go.twitch.tv/d0m96 :) |
17:55:10 | * | couven92 joined #nim |
17:58:03 | FromGitter | <mratsim> @Yardanico will go with that: https://github.com/axkibe/lsyncd |
18:02:01 | * | Arrrr quit (Ping timeout: 240 seconds) |
18:05:10 | * | Jesin quit (Ping timeout: 264 seconds) |
18:12:12 | * | yay quit (Quit: Page closed) |
18:13:30 | FromGitter | <edubart> @Yardanico the double noInit is a typo mistake, I placed noInit in too many functions, I guess two times in that one |
18:13:48 | Yardanico | yeah I know, just said about it |
18:14:05 | Yardanico | so others wouldn't think "why there's noinit pragma two times? more performance" ? |
18:16:24 | * | Jesin joined #nim |
18:27:48 | * | tj_yoco joined #nim |
18:31:08 | * | TjYoco quit (Ping timeout: 240 seconds) |
18:34:35 | * | tax quit (Quit: Leaving) |
18:43:17 | FromGitter | <mratsim> -funroll-loops -O9 -ffast-math !! |
18:44:12 | Yardanico | -O42 is da best :) |
19:05:58 | * | Serenitor joined #nim |
19:10:47 | * | Jesin quit (Ping timeout: 260 seconds) |
19:11:53 | * | gokr joined #nim |
19:12:54 | * | Jesin joined #nim |
19:15:48 | * | Demos joined #nim |
19:22:44 | * | scriptum joined #nim |
19:39:37 | * | Vladar quit (Remote host closed the connection) |
19:48:47 | dddddd | dom96, that W3C is from the point of view of the implementator, not the user of the API, AFAIU |
19:48:58 | dddddd | *W3C doc |
19:54:46 | * | sz0 quit (Quit: Connection closed for inactivity) |
19:55:54 | * | manjaro-kde5_ quit (Quit: Konversation terminated!) |
19:57:51 | SusWombat | Can i overload types? |
20:00:01 | Yardanico | SusWombat, example? |
20:00:18 | Yardanico | of the thing you're trying to do |
20:00:54 | SusWombat | Yardanico, like i have the type sdl.Color can i overload it so i can have one being a object and the seond one being a tuple |
20:01:06 | Yardanico | SusWombat, I think no |
20:01:11 | SusWombat | Ok thank you |
20:03:31 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
20:05:53 | * | miran quit (Ping timeout: 248 seconds) |
20:42:15 | * | skrylar quit (Remote host closed the connection) |
20:43:56 | * | couven92 quit (Ping timeout: 255 seconds) |
20:48:03 | * | zolk3ri quit (Remote host closed the connection) |
21:09:02 | * | Yardanico quit (Remote host closed the connection) |
21:40:16 | * | solitudesf quit (Remote host closed the connection) |
21:40:53 | * | tj_yoco quit (Ping timeout: 246 seconds) |
21:42:46 | * | Demos quit (Quit: Demos) |
21:43:07 | * | Demos joined #nim |
21:49:04 | * | tj_yoco joined #nim |
21:54:03 | * | nsf joined #nim |
22:12:42 | * | yglukhov quit (Read error: Connection reset by peer) |
22:13:17 | * | yglukhov joined #nim |
22:23:59 | * | Demos quit (Remote host closed the connection) |
22:30:57 | FromGitter | <zacharycarter> yay matching units and buildings |
22:30:59 | FromGitter | <zacharycarter> https://imgur.com/a/rJ6Ug |
22:54:55 | * | gokr quit (Ping timeout: 248 seconds) |
22:56:58 | * | Nobabs27 joined #nim |
22:57:59 | * | sleepyqt quit (Read error: Connection reset by peer) |
23:02:54 | * | darkn0de joined #nim |
23:03:12 | * | ipjk joined #nim |
23:05:08 | darkn0de | hi!! does anyone know how to walk the users in a jsonNode that looks like {"users": {"bob": {"name": "Bob"}, "alice": {"name": "Alice"}}? I was trying to do for username, userdata in users["users"] but obviously that didn't work so well ;) |
23:06:01 | darkn0de | (and then access userdata["name"] and other data in that object.) |
23:08:37 | tj_yoco | darkn0de any sample code? Why isnt `for user in users["users"] working? |
23:08:46 | * | def-pri-pub joined #nim |
23:09:13 | darkn0de | tj_yoco, it's a jsonNode. Do I need to convert it to an object first? |
23:11:16 | * | JappleAck joined #nim |
23:11:23 | darkn0de | tj_yoco, I get Error: type mismatch: got (string, JsonNode) |
23:13:40 | darkn0de | tj_yoco, https://pastebin.com/9F60Y3BC |
23:14:10 | tj_yoco | it looks like your json layout might be wrong. |
23:14:42 | tj_yoco | oh wait nvm, looking at it wrong |
23:15:22 | tj_yoco | you're missing a `{` before `"alice"` though just in case your actually using that example in your code |
23:15:41 | darkn0de | oh right good call :) |
23:16:03 | darkn0de | but that' snot it (not actuall using this) |
23:16:49 | darkn0de | here fixed :0 https://pastebin.com/CAByn4pZ |
23:17:07 | darkn0de | sorry, it's always weird trying to come up with similar example :) |
23:17:09 | * | Jesin quit (Quit: Leaving) |
23:17:32 | darkn0de | basically it's a mapping of keys to values where the values are more mappings :) |
23:18:03 | darkn0de | ack still bad! hopefully you get the gist |
23:18:51 | tj_yoco | Oh i see the error |
23:19:03 | darkn0de | https://pastebin.com/tXby87X5 |
23:19:41 | darkn0de | awesome. you probably meant errors ;) |
23:20:01 | tj_yoco | username is a string but you need to do something like userdata["name"].getStr() I think |
23:20:29 | darkn0de | is there any way to walk through the usernames? |
23:21:21 | * | couven92 joined #nim |
23:22:04 | tj_yoco | sorry, Im a noob give me a min to copy the code over and paste something to you |
23:22:32 | darkn0de | no problem thank you me too :) |
23:23:48 | darkn0de | hmm, config.getFields() gives (OrderedTable[system.string, json.JsonNode]) |
23:24:40 | * | wishi quit (Quit: No Ping reply in 180 seconds.) |
23:27:02 | * | wishi joined #nim |
23:27:59 | tj_yoco | yeah try importing tables and see what you can get still just guessing over here lol |
23:29:45 | FromGitter | <zacharycarter> I need rts game name ideas :P |
23:29:54 | tj_yoco | darkn0de here https://pastebin.com/v42h0Sgs |
23:30:40 | tj_yoco | I'm getting `bob {"name":"Bob"}` and then `Bob` for each user |
23:30:45 | tj_yoco | just to show what each thing is |
23:31:56 | tj_yoco | zacharycarter do you have a theme? |
23:34:10 | * | yglukhov quit (Remote host closed the connection) |
23:34:45 | FromGitter | <zacharycarter> well so far the first faction is looking like |
23:35:01 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/9NJt/Screen-Shot-2017-10-13-at-6.30.27-PM.png) |
23:35:35 | tj_yoco | nice! so, military |
23:35:36 | darkn0de | Thanks tj_yoco !!! |
23:38:19 | darkn0de | wow this is cool... |
23:39:32 | * | couven92 quit (Quit: Client Disconnecting) |
23:41:53 | darkn0de | tj_yoco, you did it!! thank you! looks like i needed tables |
23:42:25 | tj_yoco | darkn0de glad we could solve that |
23:42:33 | darkn0de | ty :) |
23:43:32 | FromGitter | <zacharycarter> tj_yoco I need to figure out the other faction |
23:45:00 | tj_yoco | @zacharycarter you modelling these or using presets? |
23:45:24 | FromGitter | <zacharycarter> nah I'm just buying assets off the unity asset store and then prerendering them |
23:46:21 | tj_yoco | ahh, im assuming this is for the sake of example to use your engine so why not just use the same guys but red |
23:46:57 | FromGitter | <zacharycarter> I could... |
23:47:00 | FromGitter | <zacharycarter> I could also use something like - https://www.assetstore.unity3d.com/en/#!/content/85399 |
23:47:05 | FromGitter | <zacharycarter> orrrr |
23:47:31 | FromGitter | <zacharycarter> https://www.assetstore.unity3d.com/en/#!/content/74088 |
23:48:02 | tj_yoco | if you insist on it then the droids look pretty sweet |
23:48:24 | tj_yoco | but the regular soldiers dont stand a chance against them |
23:49:15 | FromGitter | <zacharycarter> :P |
23:53:25 | tj_yoco | @zacharycarter you could find some the free/cheap zombie models and do like a Left4Dead RTS type of thing |
23:54:28 | FromGitter | <zacharycarter> that'd be kinda cool but I guess only one faction would be controllable? |
23:55:06 | tj_yoco | why's that? Left 4 Dead has multiplayer between humans and zombies I think |
23:55:25 | FromGitter | <zacharycarter> yeah I guess I'd just have to get creative with the zombie structures |
23:57:30 | tj_yoco | yeah like everything is just made of dead bodies but your getting into M-rated material and possibly being banned in australia |
23:57:41 | FromGitter | <zacharycarter> lol |