<< 13-10-2017 >>

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:38FromGitter<zacharycarter> is the building too small?
00:27:42FromGitter<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:34FromGitter<zacharycarter> https://imgur.com/a/Rm2rd yeah that looks way better
00:59:47*Etheco quit (Quit: Leaving)
01:25:47shashlick@zacharycarter : I vote for sci-fi, was a big fan of Total Annihilation back in the day
01:26:09FromGitter<zacharycarter>  I think that's the route I'm going
01:26:14FromGitter<zacharycarter> here's the current scale I'm going for
01:26:36FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/t9eT/Screen-Shot-2017-10-12-at-8.50.03-PM.png)
01:27:52FromGitter<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:06FromGitter<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:38Araqzacharycarter: use the Cylons from Battlestar Galactica as one race
04:10:56Araqthe other race can be the humans
04:11:52Araqthe Cylons have the 13 humanoid models that can infiltrate terran buildings
05:12:04Araqomg 'nimbench' is awesome
05:12:15Araqdon't know how I could live without it
05:35:01Araqyay my new custom strings are 30% slower than Nim's builtin string
05:35:25Araqand 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:46FromGitter<Varriount> Araq: Nimbench?
05:43:35*yglukhov quit (Ping timeout: 240 seconds)
05:54:26Araqhttps://github.com/ivankoster/nimbench.git
05:58:13FromGitter<mratsim> Prepare for another series of bug report Araq :P
06:00:49FromGitter<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:22FromGitter<gokr> @Yardanico I usually use this style: ⏎ ⏎ ```pro newStatistics*(): Statistics = ⏎ Statistics(newestUser: "alfred")``` [https://gitter.im/nim-lang/Nim?at=59e0631eb20c642429f7fb5c]
06:55:14FromGitter<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:37Araqtemp.nim relative time/iter iters/s
07:46:37Araq============================================================================
07:46:37Araqidiomatic 9.37ms 106.73
07:46:39Araqmanual 10.61ms 94.23
07:46:55Araqstupid idiomatic Nim string handling code
07:47:32Araqbeating 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:06FromGitter<Varriount> Araq: What is your custom string type for?
07:57:25FromGitter<Yardanico> No GC IIRC
07:57:39FromGitter<Yardanico> It works without GC
08:00:10Araqyes
08:10:06*claudiuinberlin joined #nim
08:14:09FromGitter<Bennyelg> @Arak
08:14:25FromGitter<Bennyelg> @Araq When we are going to make Nim Shirts?!
08:14:32FromGitter<Bennyelg> Nim Stickers
08:15:03FromGitter<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:58FromGitter<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:18Araqwell ok? let's make shirts. what is my task?
08:20:01FromGitter<Bennyelg> @Araq Choose the logo, I'll speak with the guy in alibaba see how much it will cost us
08:24:10Araqour logo is the crown
08:24:48Araqbtw is there a single good benchmark out there?
08:25:31AraqI can't find any
08:25:42Araqjson -- tests the json stdlib
08:25:51Araqbrainfuck -- yeah, whatever
08:26:51Araqhavlak -- at least it's trying
08:28:16*solitudesf quit (Ping timeout: 255 seconds)
08:28:23euantorI see this repository posted on HN fairly often: https://github.com/kostya/benchmarks
08:28:41Araqthat's what I just described
08:28:45euantoryeah
08:28:52euantorIt's pretty useless
08:29:51AraqPython has "pybench" which is used to look at Python performance improvements/regressions
08:29:58euantorAT least Nim does quite well in most of them though 
08:31:20AraqI beg to differ but also can't be bothered to take a closer look
08:31:47PMunchBennyelg, 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:30FromGitter<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:01PMunch?
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:24skrylarzacharycarter: the joys of loading DDS files :b
09:36:16PMunch@Bennyelg, what did you mean?
09:38:11*NimBot joined #nim
09:39:30FromGitter<Bennyelg> Sorry I probably did not understand correctly what did you ment
09:41:38ArrrrWhat comes next after destroyer feature?
09:44:38PMunch@Bennyelg, I was just saying that mugs would be cool merch :)
09:45:06FromGitter<Bennyelg> Yea, correct, but how we manage all the logistic behind it?
09:45:41FromGitter<Bennyelg> I think it's time to create simple shop using Karax and new link from the nim-website
10:14:08PMunchHmm, how does others do this kinda stuff? I would imagine that there is a fairly streamlined process of doing it
10:15:35skrylarwhat, storefronts?
10:16:48skrylarusually 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:07skrylarthe REALLY advanced ones log the hell out of everything
10:19:19skrylartime viewing a listing, order of views, etc
10:19:24FromGitter<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:40FromGitter<mratsim> Commented the test and stumbled on something else: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e0942cf7299e8f53e10725]
10:24:03FromGitter<mratsim> (C backend works fine)
10:28:14*jjido joined #nim
10:28:49skrylarmeh. 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:39PMunchskrylar, 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:15PMunchHmm, Araq is static too broken to do this: https://github.com/PMunch/genui/blob/master/genuiLayoutGtk.nim#L20
10:39:21skrylarPMunch, easy version is stuff like cafepress.
10:39:44skrylarharder version is drop shipping
10:40:21PMunchI'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:31PMunchskrylar, drop shipping?
10:41:37*zolk3ri joined #nim
10:44:31PMunchskrylar, problem with cafepress is price overhead would probably not leave a lot of profit for Nim
10:48:12jjidoWhat does static mean in that context ?
10:49:32PMunchStatic means that it is only done on compile time
10:50:20PMunchIf 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:53AraqPMunch: 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:38skrylarPMunch, well. thems the breaks :/
11:07:01skrylaryou 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:19skrylardrop shipping is basically having the other company store it in their warehouse and ship it on demand
11:15:03PMunchMaybe we could do a group buy of some kind?
11:15:10skrylarmassdrop is a thing
11:15:28skrylarthey specialize in infrequent group orders
11:15:44FromGitter<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:52PMunchYeah I've heard about those
11:16:19PMunchAraq, but why? Seems a bit counter intuitive
11:16:24skrylarmratsim: c++ libraries are infinitely more likely to do something stupid with a pointer that nobody knows about imho
11:16:46skrylar"oh i put it in this auto pointer box i don't understand how works, now interop is broked"
11:17:13skrylarin some ways thats why i chose fltk with nim. fltk does absolutely nothing clever.
11:17:24Araqmratsim: 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:27FromGitter<mratsim> It’s the seq concatenation that out of 50 seq concatenation that works just breaks at the 51
11:17:51skrylarpet peeve: c++ code that uses new, memcopy, delete instead of realloc
11:18:13skrylari 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:15Araqyou can put GC_ref / GC_unref around your seq
11:18:19PMunchDoes something like strVal exist for objects?
11:18:31skrylarrepr or $?
11:18:43AraqPMunch: well these are nnkObjConstr or something
11:18:57Araqbut it doesn't look like you actually inspect these
11:19:22Araqskrylar: realloc is irrelevant. ;-)
11:19:30PMunchThe layout argument? I use it all the time in that macro..
11:19:45Araqdo you actually *inspect* it?
11:20:01skrylarAraq, i still used it when i wrote C code
11:20:18skrylarit's not my fault if the underlying tools herp the derp and ignore semantic information i give them
11:21:07Araqit's your fault for caring what you never measured :P
11:22:03FromGitter<mratsim> This is driving me nuts ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ will try GC_ref [https://gitter.im/nim-lang/Nim?at=59e0a1db3cb340a2611cb1e6]
11:22:11PMunchUhm, yes? I use the various fields in the layout object to determine which code to generate..
11:22:21skrylarright now i'm measuring the amount of antidepressants needed when dealing with microsoft formats
11:22:31Araqbesides, modern C++ vectors could do 'if pod: realloc else: new(); copy(); delete'
11:22:37skrylarso many uint32s and not one is just "how many channels does this image have?"
11:22:45skrylarnope, gotta have a massive table of fourcc codes
11:22:53PMunchIf 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:21skrylarfortunately almost all of these can be ignored because the only reason to USE dds is for dxt
11:24:54skrylarapparently Khronos formalized ECT1/2 and ASTC but they aren't really widespread
11:26:22FromGitter<mratsim> Khronos agrees on standard 3 years after everyone basically (probably not their fault though)
11:26:43skrylarwell i blame android for sucking :P
11:27:22skrylarOpenGL 3/4+ and GLES2/3 are required to support ECT1/2 because no patents
11:27:39skrylarbut since the patents just expired, there's no reason to use them anymore :|
11:28:34skrylaranyway.
11:28:38skrylartrying to load textures in native nim
11:29:00PMunchIs there another way I should do it Araq?
11:29:27Araqif you iterate over the fields use a 'typed' parameter?
11:31:40PMunchHmm, I changed it to a proc and it stopped complaining
11:32:44PMunchBut 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:50PMunchWhat 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:49PMunchHmm, 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:24FromGitter<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:16AraqPMunch_: 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:46PMunchAraq, 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:10Araqok
12:21:31skrylarhidden globals... seizure time
12:21:38skrylaradmittedly FLTK did that for events
12:21:44skrylarwell its a very visible global
12:22:10PMunchYeah I know.. Globals are bad
12:22:17skrylarthey just stuff UI events in a global "Fl" class and then have a 'handle' function with an enum for the event type
12:22:20PMunchBut right now I just want a system that works
12:22:23skrylarwhich i thought was amusing
12:22:51*ShalokShalom_ joined #nim
12:23:39skrylartsk
12:23:44*gokr joined #nim
12:23:46skrylarthe code must be good or it must not exist
12:25:41*ShalokShalom quit (Ping timeout: 240 seconds)
12:26:21skrylarsometimes using other people's nim code makes me scared
12:26:23skrylari tried nico
12:26:36skrylarfor some reason the compile time with nico is higher than just doing the same things with raw SDL
12:26:50PMunchHaha, I'm just checking the feasability of something like this. Then I can worry about implementation details later
12:27:22PMunchMight be using some converters, they can be slow as balls..
12:30:43skrylarit is a mystery
12:30:59skrylarI do twitch a little, wishing we just had a jit or something, but meh
12:31:26PMunchJust In Time compiler?
12:31:26skrylarI am a massive fan of livecoding because i tend to invoke the program and test it every couple lines
12:31:31YardanicoPMunch, for VM
12:31:33Yardanicomaybe
12:31:44skrylarno, its just me being weird
12:32:17skrylarin 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:24skrylareiffel apparently tried something similar
12:32:37skrylardownside is that its awkward to code such a vm
12:32:54PMunchIsn't that sorta the idea behind nimcache?
12:33:04skrylaryou still pay linker costs
12:33:38Yardanicowe will have very fast incremental compilation with rod files :)
12:33:46zolk3rihey Yardanico!
12:33:51Yardanicozolk3ri, hi
12:33:59skrylari'm just pipe dreaming. i solve it by writing compact nim code and cherrypicking my deps :)
12:34:26FromGitter<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:00skrylari don't think so
12:35:13Araqmratsim: Nim supports that with a "mixed" mode (use 'nim c' instead of 'nim cpp') but there are dragons
12:36:06skrylarthat mode detonated when i tried it with fltk
12:36:12FromGitter<mratsim> I guess importcpp does not work with C++ template in that case right?
12:36:32Araqany file that uses .importcpp gets compiled as C++ code
12:36:42FromGitter<mratsim> Cool!
12:36:59FromGitter<mratsim> I'll try that.
12:40:45*gokr quit (Ping timeout: 246 seconds)
12:43:00*Jesin quit (Quit: Leaving)
12:43:12FromGitter<kinokasai> Hey again.
12:43:29FromGitter<kinokasai> Sorry for the newbs question again.
12:43:56Yardanicoit's fine
12:44:04Yardanicoask your questions :)
12:44:04FromGitter<kinokasai> In the tutorial, there's written `# no need to write n[].data; in fact n[].data is highly discouraged!` for refs
12:44:18FromGitter<Yardanico> yeah
12:44:39Yardanicoso?
12:45:13FromGitter<kinokasai> However, this is incorrect? : ⏎ ⏎ ```proc ex(x: ref string) = ⏎ var l = x.len()``` [https://gitter.im/nim-lang/Nim?at=59e0b5595c40c1ba79972daa]
12:45:30FromGitter<kinokasai> But it does work with `x[].len()`
12:46:41*couven92 quit (Quit: Client disconnecting)
12:53:59FromGitter<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:14FromGitter<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:37FromGitter<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:38FromGitter<kinokasai> Okay!
13:17:59FromGitter<kinokasai> Is there a function call syntax akin to `->` in C?
13:18:08FromGitter<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:00FromGitter<Yardanico> what do you mean?
13:35:12FromGitter<Yardanico> [] is for indexed access and dereferencing
13:39:07*endragor quit (Remote host closed the connection)
13:42:34FromGitter<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:30Araqif 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:52FromGitter<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:57Araqcertainly
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:11PMunchHmm, now I remember why I didn't use a global variable in the first place
14:14:53PMunchThe 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:40PMunchAraq, 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:01FromGitter<exts> hmm, does anyone have an example of connecting to a remote server using nim and ssh?
14:48:31PMunchhttps://github.com/ba0f3/libssh2.nim/blob/master/examples/ssh.nim
14:48:48FromGitter<exts> thanks :)
14:48:50PMunchSomething like that?
14:49:05FromGitter<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:32ArrrrWhat do you think about this? https://news.ycombinator.com/item?id=15461891
15:34:34YardanicoThe control flow is so labyrinthine that some of the code is actually indented by 23 tabs.
15:34:41YardanicoForget the 80-column rule -- these lines don't even start until column 92!
15:34:57Yardanicowell a bad programmer can always write spaghetti code
15:35:02Yardanicoeven in Nim (saw some of it :D)
15:36:35*gokr quit (Ping timeout: 240 seconds)
15:37:18cremDid 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:32Yardanicomaybe nim v2 ? :)
15:39:50cremThere should be another v0.* sequence :)
15:40:03Yardaniconah
15:40:03cremMaybe nimv2 v0.*, that's fine )
15:40:13Yardanicoaraq is already doing a lot of stuff preparing 1.0
15:40:23cremYeah, that's frustrating.
15:40:33Yardanicowhy ? :)
15:41:29cremNo breaking changes anymore. :)
15:41:49Yardanicowhy not ? maybe in major patches
15:42:04Yardanicothere wasn't many breaking changes from 0.16.0 to 0.17.2 btw
15:42:55Yardanicothis was the last breaking change: https://github.com/nim-lang/Nim/commit/ddc131cf07972decc206e033b2dd85a42eb1c98d
15:43:09YardanicoI don't remember other very big breaking changes
15:43:16Yardanicowell 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:04cremAnyway, 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:46Araqcrem: I regularly start new programming languages
15:48:04*yglukhov quit (Remote host closed the connection)
15:48:08Araqthen I abandom them and continue on Nim, sometimes taking features from them
15:48:42Yardanicoreally?
15:48:54Yardanicois there any of them in public?
15:49:03Araqyep.
15:49:26Araqer, that 'yep' refers to your "really?" question.
15:49:51dom96It's not as if he implements full-fledged compilers for these languages
15:49:58dom96he just imagines how they would be designed
15:49:59cremOnce 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:57Araqdesigning new and better things is not the hard part, the hard part is removing things again
16:00:27*stisa joined #nim
16:06:09Araqbtw which tools do you guys for profiling on osx?
16:09:30*obadz quit (Quit: WeeChat 1.9.1)
16:09:41dom96Araq: You can use valgrind for that
16:10:01dom96You've read my blog post, right? :P
16:10:33*yay joined #nim
16:10:41Yardanicowould be really cool if someone would make a GUI analyzer for nimprof output :P
16:10:58*Trustable joined #nim
16:11:14PMunchHmm, is there any way to take in typed/untyped and return a static object?
16:11:19Araqdom96: yes I did, I wanted to hear some other opinions
16:11:40AraqPMunch: produce a nkObjConstr tree, where is the problem
16:11:53yayHi! I wonder if anybody tried using Nim with Web Assembly, Emscripten: https://github.com/kripken/emscripten
16:12:18yayDoes Nim GC work there?
16:12:27Yardanicoyes, why not?
16:12:33PMunchAh, of course
16:12:36Yardanicohttps://github.com/Jipok/Nim-SDL2-and-Emscripten
16:12:45Yardanicoas an example
16:13:02Yardanicoalso this library has WASM support
16:13:02Yardanicohttps://github.com/zacharycarter/zengine
16:13:41yayoh, nice! thanks for the links! I'll check them out
16:13:56yaythe 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:14Yardanicowell it's emscripten portable GC
16:14:17Yardaniconim has it's own GC
16:14:22Yardanicowhich is very portable AFAIK
16:14:53Araqyay: 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:31Araqthe 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:52Araqyglukhov knows more
16:16:55yaythanks, this is very good to know :)
16:22:57*PMunch quit (Quit: leaving)
16:35:38FromGitter<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:09Yardanicomratsim: https://github.com/mratsim/Arraymancer/blob/fa9bbb79d64d8538ca1f504b515d23dde4fe6cff/src/tensor/aggregate.nim#L28
16:41:09Yardanico:D
16:41:14Yardanicodouble {.noInit,noInit.} =
16:41:19Yardanicoto be sure ? :)
16:42:06FromGitter<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:21FromGitter<mratsim> Is there something better than rmate to code Nim on a remote machine via VS code?
17:01:52Yardanicoftp-sync?
17:05:36*vlad1777d quit (Remote host closed the connection)
17:07:08*vlad1777d joined #nim
17:23:18Yardanicotrue(1) - do nothing, successfully
17:25:12*TjYoco joined #nim
17:27:58*JappleAck quit (Quit: Leaving)
17:35:32Arrrrint40 when
17:38:05*jjido quit (Ping timeout: 240 seconds)
17:40:13*Jesin joined #nim
17:43:03*claudiuinberlin joined #nim
17:49:49dom96Starting another stream soon https://go.twitch.tv/d0m96 :)
17:55:10*couven92 joined #nim
17:58:03FromGitter<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:30FromGitter<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:48Yardanicoyeah I know, just said about it
18:14:05Yardanicoso 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:17FromGitter<mratsim> -funroll-loops -O9 -ffast-math !!
18:44:12Yardanico-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:47dddddddom96, that W3C is from the point of view of the implementator, not the user of the API, AFAIU
19:48:58dddddd*W3C doc
19:54:46*sz0 quit (Quit: Connection closed for inactivity)
19:55:54*manjaro-kde5_ quit (Quit: Konversation terminated!)
19:57:51SusWombatCan i overload types?
20:00:01YardanicoSusWombat, example?
20:00:18Yardanicoof the thing you're trying to do
20:00:54SusWombatYardanico, 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:06YardanicoSusWombat, I think no
20:01:11SusWombatOk 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:57FromGitter<zacharycarter> yay matching units and buildings
22:30:59FromGitter<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:08darkn0dehi!! 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:01darkn0de(and then access userdata["name"] and other data in that object.)
23:08:37tj_yocodarkn0de any sample code? Why isnt `for user in users["users"] working?
23:08:46*def-pri-pub joined #nim
23:09:13darkn0detj_yoco, it's a jsonNode. Do I need to convert it to an object first?
23:11:16*JappleAck joined #nim
23:11:23darkn0detj_yoco, I get Error: type mismatch: got (string, JsonNode)
23:13:40darkn0detj_yoco, https://pastebin.com/9F60Y3BC
23:14:10tj_yocoit looks like your json layout might be wrong.
23:14:42tj_yocooh wait nvm, looking at it wrong
23:15:22tj_yocoyou're missing a `{` before `"alice"` though just in case your actually using that example in your code
23:15:41darkn0deoh right good call :)
23:16:03darkn0debut that' snot it (not actuall using this)
23:16:49darkn0dehere fixed :0 https://pastebin.com/CAByn4pZ
23:17:07darkn0desorry, it's always weird trying to come up with similar example :)
23:17:09*Jesin quit (Quit: Leaving)
23:17:32darkn0debasically it's a mapping of keys to values where the values are more mappings :)
23:18:03darkn0deack still bad! hopefully you get the gist
23:18:51tj_yocoOh i see the error
23:19:03darkn0dehttps://pastebin.com/tXby87X5
23:19:41darkn0deawesome. you probably meant errors ;)
23:20:01tj_yocousername is a string but you need to do something like userdata["name"].getStr() I think
23:20:29darkn0deis there any way to walk through the usernames?
23:21:21*couven92 joined #nim
23:22:04tj_yocosorry, Im a noob give me a min to copy the code over and paste something to you
23:22:32darkn0deno problem thank you me too :)
23:23:48darkn0dehmm, 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:59tj_yocoyeah try importing tables and see what you can get still just guessing over here lol
23:29:45FromGitter<zacharycarter> I need rts game name ideas :P
23:29:54tj_yocodarkn0de here https://pastebin.com/v42h0Sgs
23:30:40tj_yocoI'm getting `bob {"name":"Bob"}` and then `Bob` for each user
23:30:45tj_yocojust to show what each thing is
23:31:56tj_yocozacharycarter do you have a theme?
23:34:10*yglukhov quit (Remote host closed the connection)
23:34:45FromGitter<zacharycarter> well so far the first faction is looking like
23:35:01FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/9NJt/Screen-Shot-2017-10-13-at-6.30.27-PM.png)
23:35:35tj_yoconice! so, military
23:35:36darkn0deThanks tj_yoco !!!
23:38:19darkn0dewow this is cool...
23:39:32*couven92 quit (Quit: Client Disconnecting)
23:41:53darkn0detj_yoco, you did it!! thank you! looks like i needed tables
23:42:25tj_yocodarkn0de glad we could solve that
23:42:33darkn0dety :)
23:43:32FromGitter<zacharycarter> tj_yoco I need to figure out the other faction
23:45:00tj_yoco@zacharycarter you modelling these or using presets?
23:45:24FromGitter<zacharycarter> nah I'm just buying assets off the unity asset store and then prerendering them
23:46:21tj_yocoahh, 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:57FromGitter<zacharycarter> I could...
23:47:00FromGitter<zacharycarter> I could also use something like - https://www.assetstore.unity3d.com/en/#!/content/85399
23:47:05FromGitter<zacharycarter> orrrr
23:47:31FromGitter<zacharycarter> https://www.assetstore.unity3d.com/en/#!/content/74088
23:48:02tj_yocoif you insist on it then the droids look pretty sweet
23:48:24tj_yocobut the regular soldiers dont stand a chance against them
23:49:15FromGitter<zacharycarter> :P
23:53:25tj_yoco@zacharycarter you could find some the free/cheap zombie models and do like a Left4Dead RTS type of thing
23:54:28FromGitter<zacharycarter> that'd be kinda cool but I guess only one faction would be controllable?
23:55:06tj_yocowhy's that? Left 4 Dead has multiplayer between humans and zombies I think
23:55:25FromGitter<zacharycarter> yeah I guess I'd just have to get creative with the zombie structures
23:57:30tj_yocoyeah like everything is just made of dead bodies but your getting into M-rated material and possibly being banned in australia
23:57:41FromGitter<zacharycarter> lol