<< 25-05-2017 >>

00:08:28*Elronnd joined #nim
00:08:39*Ven joined #nim
00:09:02*Ven is now known as Guest30373
00:14:13*Guest30373 quit (Ping timeout: 272 seconds)
00:27:16*rauss joined #nim
00:29:31*Kingsquee joined #nim
00:37:01FromGitter<zacharycarter> I seem to be having issues on this line - https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-c/spine-c/src/spine/Skeleton.c#L65
00:37:15FromGitter<zacharycarter> at least that's what asan is pointing me to
00:39:35FromGitter<zacharycarter> I think it's a false positive, but I definitely believe i have some memory corruption going on w/ my spine bindings
00:42:01*daaf quit (Ping timeout: 240 seconds)
01:15:32*brson quit (Ping timeout: 246 seconds)
01:23:55FromGitter<zacharycarter> no idea how to debug this :/
01:36:50*brson joined #nim
01:37:46*brson quit (Client Quit)
01:44:08*WhiskyRyan joined #nim
01:50:28*chemist69 quit (Ping timeout: 240 seconds)
01:51:25*adeohluwa quit (Quit: Connection closed for inactivity)
01:51:47*def-pri-pub joined #nim
02:04:16*chemist69 joined #nim
02:06:30*daaf joined #nim
02:34:09ftsfzacharycarter =\ it's tricky to debug when you've got mem corruption misleading you
02:34:30ftsftried valgrind?
02:34:35FromGitter<zacharycarter> I'm on osx :/
02:34:47FromGitter<zacharycarter> I've tried address sanitizer but I'm not sure if it's memory corruption or what
02:35:07FromGitter<zacharycarter> my app crashes and segfaults but I believe it's definitely something wrong with my bindings
02:35:15FromGitter<zacharycarter> I'm just not sure where / how to start troubleshooting
02:35:29ftsfi had some issues with my bindings when i wasn't specifying the calling convention
02:35:41ftsfbut the issue was very obvious rather than insidious
02:35:43FromGitter<zacharycarter> seems similar to the bycopy problem I was having with my bindings to NanoVG
02:36:07FromGitter<zacharycarter> but I can't find anything not passed as a pointer
02:37:19*def-pri-pub quit (Quit: leaving)
02:42:59*pilne quit (Quit: Quitting!)
02:43:33ftsfif you've got a method to reproduce the issue i can run on linux under valgrind and see what's up?
02:46:38FromGitter<zacharycarter> that would be awesome
02:46:50FromGitter<zacharycarter> hrm though I could probably do the same
02:47:00FromGitter<zacharycarter> it's quite a bit of setup work
02:47:30FromGitter<zacharycarter> requires building everything for frag and then also spine
02:47:43ftsfdang
02:47:44FromGitter<zacharycarter> I'll play around with it a little bit more tonight and if I can't figure it out I may enlist your help
02:47:51ftsfok
02:47:59FromGitter<zacharycarter> thanks for the offer :D
02:59:25*WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:59:54*BennyElg quit (Read error: Connection reset by peer)
03:00:11*BennyElg joined #nim
03:01:38*WhiskyRyan joined #nim
03:10:18*Neomex quit (Quit: Leaving)
03:12:00*noethics quit (Remote host closed the connection)
03:19:04*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:42:04*daaf quit (Ping timeout: 268 seconds)
03:44:22*daaf joined #nim
03:48:11*Nobabs27 quit (Quit: Leaving)
03:53:31*BennyElg quit (Ping timeout: 240 seconds)
04:11:43*WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
04:13:07*daaf quit (Ping timeout: 260 seconds)
04:20:18*arnetheduck quit (Ping timeout: 268 seconds)
05:02:13FromGitter<zacharycarter> the problem definitely seems to be in that method I linked earlier
05:20:53*skrylar joined #nim
05:20:58skrylarmeep
05:21:12skrylarPMunch, it's not that hard to do what wx does
05:22:02skrylarused to try and find a nice UI toolkit and they tend to be disappointing. mostly because they just tend to wrap OS stuff and then leave you stranded for the rest. Qt might be an exception
05:26:23FromGitter<Varriount> skrylar: If you can manage to wrap all of Qt, I will give you $500
05:28:41skrylarjesus
05:31:45*BennyElg joined #nim
05:31:46FromGitter<Varriount> I'm completely serious. Having even a low-level Qt wrapper would be a boon for the community.
05:34:59skrylari'm not actually sure how one extends a C++ class from within nim
05:35:17skrylari remember this being a weird problem swig had a pseudo solution for in C#
05:36:11FromGitter<zacharycarter> http://imgur.com/a/F5eNk
05:36:23FromGitter<zacharycarter> I'm not sure if that's memory corruption or not
05:37:04skrylaroh god stack errors
05:50:39*Hekatonkiros joined #nim
05:52:20*Hekaton joined #nim
05:54:58*Hekaboi joined #nim
05:55:19*Hekatonkiros quit (Ping timeout: 260 seconds)
05:56:14*rauss quit (Quit: WeeChat 1.8)
05:57:53*Hekaton quit (Ping timeout: 255 seconds)
05:59:17*Hekatonkiros joined #nim
06:00:27*Hekaton joined #nim
06:01:20*Vladar joined #nim
06:01:57*Hekaboi quit (Ping timeout: 240 seconds)
06:03:31*Hekatonkiros quit (Ping timeout: 240 seconds)
06:08:55FromGitter<Varriount> Skrylar: You implement an extended class that takes in another structure and dispatches to it
06:09:44*nsf joined #nim
06:09:51skrylar@Varriount i think that's what swig did.
06:09:59skrylarthey said something about "director support" but i have no idea what that meant
06:10:03skrylarbring your own vtable?
06:10:44FromGitter<Varriount> Something like that
06:13:01*Hekaton quit (Ping timeout: 240 seconds)
06:17:26FromGitter<Varriount> @zacharycarter That second error makes it seem like something is being mis-typed or casted to a larger type
06:19:55FromGitter<Varriount> Then the program reads some invalid data
06:40:01*xet7 quit (Ping timeout: 240 seconds)
06:52:18skrylartrying another stab at porting this miglayout thingy
06:52:25skrylartried hirise but i couldn't understand the paper well enough
06:57:59*rokups joined #nim
07:07:16*xet7 joined #nim
07:24:14*yglukhov joined #nim
07:30:33*xet7 quit (Ping timeout: 260 seconds)
07:33:07*Trustable joined #nim
07:47:55*Trioxin2 joined #nim
07:50:49*Trioxin quit (Ping timeout: 246 seconds)
07:55:51*SusWombat_ quit (Remote host closed the connection)
08:01:30*SusWombat joined #nim
08:31:21*Matthias247 joined #nim
08:32:55*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
09:09:54*gokr joined #nim
09:16:36*Arrrr joined #nim
09:30:26*chemist69 quit (Ping timeout: 246 seconds)
09:30:57*chemist69 joined #nim
10:09:19FromGitter<zacharycarter> @Varriount maybe something in this section then: ?https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-c/spine-c/src/spine/Skeleton.c#L61-L63
10:26:11*NimBot joined #nim
10:32:19*couven92 joined #nim
10:35:31*arnetheduck joined #nim
11:00:42*Ven joined #nim
11:01:06*Ven is now known as Guest58223
11:02:23*Snircle joined #nim
11:05:11*kunev quit (Ping timeout: 272 seconds)
11:05:57*kunev joined #nim
11:09:26*Sembei quit (Read error: No route to host)
11:37:27*Guest58223 quit (Ping timeout: 240 seconds)
11:43:29*Ven_ joined #nim
11:44:46FromGitter<mratsim> @cooldome oh, interesting, that would simplify everything
11:45:34*bjz joined #nim
11:50:05*Ven_ quit (Read error: Connection reset by peer)
11:50:49*Ven_ joined #nim
11:55:14PMunchskrylar, sorry I was AFK. It isn't really hard to do what wxWidgets does, but it's a lot of work and testing to make sure it looks the same on all endpoints
11:56:01PMunchAnd I'm not sure what you mean with "wrap OS stuff and then leave you stranded for the rest"
11:59:23FromGitter<mratsim> @cooldome I’m trying to get that to work but it seems like s.it is returning returning an int instead of an iterator: ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5926c71b9f4f4ab05bfcfd7f]
11:59:37FromGitter<mratsim> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5926c7280a783b6c0ad3af0b]
12:00:20skrylarPMunch, oh. it's just me being bitter in that my experience those toolkits don't help much when you need anything custom
12:00:31skrylarQt does do some things regarding text layout for you though
12:09:49FromGitter<mratsim> @cooldome I think I’m stuck with the issue here described here: https://forum.nim-lang.org/t/2027 ⏎ ⏎ According to manual: "An inline iterator is an iterator that's always inlined by the compiler leading to zero overhead for the abstraction, but may result in a heavy increase in code size. Inline iterators are second class citizens; They can be passed as parameters only to other inlining code facilities like
12:09:49FromGitter... templates, macros and *other inline iterators.*” ⏎ ⏎ But in practice I didn’t manage to do pass inline iterators to other inline iterators (and I tried lots of things to implement a `zip` and finally resorted to closures) [https://gitter.im/nim-lang/Nim?at=5926c98df3001cd342599f26]
12:15:29PMunchWell, the idea behind a toolkit like wxWidgets is that you shouldn't do anything too crazy. It is meant for creating user interfaces that looks and feels like the programs you already use.
12:21:01*Ven_ quit (Ping timeout: 240 seconds)
12:23:25*ffffionn joined #nim
12:23:29*ffffionn left #nim ("WeeChat 1.0.1")
12:24:46*Ven joined #nim
12:25:10*Ven is now known as Guest96562
12:25:12FromGitter<mratsim> Other try fails with the same error `Error: type mismatch: got (int) ⏎ but expected one of: ⏎ iterator enumerateT (it: iterator): auto` ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5926cd28fcbbe1891c43be63]
12:31:38*Guest96562 quit (Ping timeout: 255 seconds)
12:32:15*Ven_ joined #nim
12:36:37*Ven_ quit (Ping timeout: 240 seconds)
12:39:12*Ven_ joined #nim
12:47:28*Ven_ quit (Ping timeout: 245 seconds)
12:47:41FromGitter<mratsim> @cooldome: I’ve created a topic on the forum as I am not the first one to struggle with inline iterator to inline iterators: https://forum.nim-lang.org/t/2972, you can give your solution here so that everyone profits
12:49:38*Ven_ joined #nim
12:53:49*rokups quit (Quit: Connection closed for inactivity)
12:54:18*Ven_ quit (Ping timeout: 260 seconds)
12:54:53*Ven_ joined #nim
12:56:13*Ven joined #nim
12:56:37*Ven is now known as Guest32458
12:59:27*Ven_ quit (Ping timeout: 240 seconds)
13:15:51FromGitter<ephja> speaking of which, I should augment my foreach proof of concept with concepts now (no pun intended). it's probably doable now with the recent patches
13:21:07*Trioxin2 quit (Ping timeout: 268 seconds)
13:22:23*Guest32458 quit (Ping timeout: 260 seconds)
13:23:15*krux02 joined #nim
13:24:33*Ven_ joined #nim
13:34:03FromGitter<andreaferretti> I have a situtation generated by c2nim where a function `f` is first declared, then, later in the file, defined
13:34:25FromGitter<andreaferretti> after that a function `g` tries to call `f` and gets an error because the call is ambiguous
13:34:32FromGitter<andreaferretti> is there a way to fix this?
13:36:41FromGitter<Varriount> @andreaferretti I would have to see the generated code
13:41:39FromGitter<andreaferretti> here it is https://github.com/unicredit/nimcuda/blob/master/nimcuda/cuda_occupancy.nim
13:42:04FromGitter<andreaferretti> the function is `cudaOccMaxActiveBlocksPerMultiprocessor`
13:42:11FromGitter<andreaferretti> I decided to just comment it
13:42:18*BennyElg quit (Read error: Connection reset by peer)
13:42:27*krux02 quit (Ping timeout: 240 seconds)
13:42:31FromGitter<andreaferretti> but in general I prefer to make the smallest possible manual modifications
13:42:39*BennyElg joined #nim
13:42:44FromGitter<andreaferretti> because it is all work to be done again on future versions of CUDA
13:43:31*BennyElg quit (Remote host closed the connection)
13:43:57*BennyElg joined #nim
13:48:00*BennyElg quit (Ping timeout: 240 seconds)
13:51:55*nsf quit (Quit: WeeChat 1.7.1)
13:52:57euantorhttp://dlang.org/blog/2017/05/24/faster-command-line-tools-in-d/ - might be interesting to see how much Nim can beat D by :D
13:53:43FromGitter<zacharycarter> @Varriount did you have a chance to look at that section of code I linked this morning? Still trying to figure out this stack corruption thing
13:55:01PMunchHmm, little problem with the db_mysql module
13:55:11PMunchI wanted to have paginated results
13:55:54PMunchSo I created a query like "SELECT * FROM table LIMIT 100 OFFSET ?" And when I use it I would add the number for the offset based on the page.
13:57:19PMunchBut the dbFormat function adds '' around everything, which means that the query becomes "SELECT * FROM table LIMIT 100 OFFSET '0'" for the first page. This creates a MySQL syntax error..
13:58:18*bjz_ joined #nim
13:58:51*shmup joined #nim
13:59:24shmupwhy is there a user record gist?
14:00:12*bjz quit (Ping timeout: 260 seconds)
14:03:39FromGitter<mratsim> @euantor, the fastest CSV/TSV processing tool by far is in Rust: https://github.com/BurntSushi/xsv . I tried a lot of different ones to process an 1.3G csv file with 3000+ columns and none came close.
14:04:15euantorYeah, I've heard about xsv, it was mentioned in the HN comments for the above article too
14:04:42euantorWould still be interested to see if Nim can beat D since both languages occupy similar spaces
14:06:42FromGitter<mratsim> I’m trying to beat D’s ndslices =), I let you beat D CSV parser ;)
14:08:07euantorWe already have CSV parsing in the stdlib, so I might give it a go tonight and see how it does
14:11:25FromGitter<mratsim> if it’s not multithreaded, it won’t beat xsv. (XSV creates an index with the byte position of each lines in the file, and then it can process everything on multithread). This is an in-depth post on perf optimization by the authour of XSV. (but this time for a `grep`tool): http://blog.burntsushi.net/ripgrep/ Very informative
14:12:12FromGitter<mratsim> and his less indepth review of XSV: http://blog.burntsushi.net/csv/#performance
14:12:23shmuprg++
14:12:35FromGitter<Varriount> I think Nim could do something similar
14:17:44euantorYeah, the D version is single threaded, so I'll focus on just trying to beat that first ;)
14:19:33FromGitter<mratsim> Good luck :)
14:27:02PMunchHmm, with objects like the JsonNodeObj that has a kind which varies which fields are in it. How can you define a distinct type of that object with a certain type?
14:27:48*rauss joined #nim
14:35:15FromGitter<ephja> you could encapsulate it by creating a new object type containing a field of the type in question, and then not export that field, which allows you to only expose certain details with procs, templates etc
14:36:04PMunchHmm, I found a different solution to my problem. But thanks for the answer :)
14:36:23PMunchhttp://ix.io/uS7
14:36:27PMunchThat's what I was writing
14:36:46PMunchA better dbFormat
14:39:49*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
14:51:57*Ven_ quit (Ping timeout: 240 seconds)
14:55:28*Ven joined #nim
14:56:10*Ven is now known as Guest58622
15:00:23*Guest58622 quit (Ping timeout: 260 seconds)
15:01:00*Ven_ joined #nim
15:01:06shmupxo ix.io
15:01:11shmup(friends with author)
15:02:10shmupPMunch: another thing rupa wrote http://awards.butts.institute/heRw6Q
15:02:57*bjz joined #nim
15:03:06PMunchHaha :P
15:03:20PMunchI like it since it's so easy to use over terminal
15:03:26PMunchcat a file into it and voila
15:03:48skrylarpfff. actually saw "mybutt" in a technical document
15:05:04PMunchNow I even have a shortcut "Meta + C" that takes my current selection, pipes it to ix, and puts the result in my clipboard :)
15:05:32*Ven_ quit (Ping timeout: 260 seconds)
15:05:58shmupnice PMunch yeah it's a good tool. his first iteration of a pastebin was https://github.com/rupa/sprunge
15:06:09shmuprupa really writes nice things. v and z are v good
15:08:09*Ven joined #nim
15:08:32*Ven is now known as Guest96298
15:09:57*aedigix quit (Remote host closed the connection)
15:10:23*aedigix joined #nim
15:11:49*kunev quit (Ping timeout: 246 seconds)
15:12:06*sz0 quit (Quit: Connection closed for inactivity)
15:12:48*Guest96298 quit (Ping timeout: 258 seconds)
15:12:57*skrylar quit (Ping timeout: 240 seconds)
15:13:25*kunev joined #nim
15:15:07*Ven_ joined #nim
15:17:11*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
15:19:28*Ven_ quit (Ping timeout: 240 seconds)
15:21:32*Ven_ joined #nim
15:21:37*mwbrown quit (Ping timeout: 240 seconds)
15:22:52*Ven_ quit (Read error: Connection reset by peer)
15:23:09*mwbrown joined #nim
15:24:34*skrylar joined #nim
15:25:55skrylarah now the less fun part
15:26:04skrylaractually implementing the miglayout engine x.x
15:26:12skrylarprobably worth it though
15:26:43FromGitter<Varriount> skrylar: What are you doing?
15:26:53skrylarVarriount: http://miglayout.com/ this
15:29:11*smt quit (Remote host closed the connection)
15:29:27skrylarits basically a "this is the only layout manager you ever need" kind of thing
15:29:50*smt joined #nim
15:29:58FromGitter<Varriount> Are you tying it to a specific GUI framework?
15:30:01skrylarno
15:30:05skrylardoesn't need to be
15:30:31skrylarthe original one isn't either. it just needs a couple of delegates
15:30:51skrylarbut instead of the weird parser they did, i used functional options. at least when i partly did that in Go
15:31:01skrylarwill probably also use functional options in nim, because they are nicer
15:31:12skrylarhttp://ix.io/uwo
15:31:13*Ven_ joined #nim
15:31:39skrylarnow what nim really needs as well is the parse dialect from red
15:32:04skrylarthat's basically a PEG parser but you get to use it at compile time for macros
15:32:14skrylarwell for any inputs, but especially those
15:32:36*smt quit (Read error: Connection reset by peer)
15:33:03*smt joined #nim
15:33:22skrylarVarriount: but anyway functional options are nice. started as a Go thing, but it's really just "return a closure from a function, have the receiver call the varargs of closures." Lets you fiddle with the APIs without breaking code or having a million versions of init
15:36:40*Ven_ quit (Ping timeout: 255 seconds)
15:39:07*Arrrr1 joined #nim
15:39:07*Arrrr quit (Disconnected by services)
15:39:13*Arrrr1 quit (Client Quit)
15:39:23*onionhammer quit (Ping timeout: 260 seconds)
15:39:44*Ven_ joined #nim
15:44:14*Ven_ quit (Ping timeout: 246 seconds)
15:47:12*Ven_ joined #nim
15:47:57*MonsterAbyss quit (Ping timeout: 240 seconds)
15:49:08*MonsterAbyss joined #nim
15:51:31*Matthias247 quit (Read error: Connection reset by peer)
15:51:40shmupI like that pattern skrylar, wasn't familiar
15:51:46shmupread this https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis
15:53:03skrylar:)
15:53:41skrylarshmup, yes that's where i learned it
15:53:46*nsf joined #nim
15:53:47skrylara little more overhead maybe
15:55:05shmupI meant "I read this" heh
15:58:21skrylarah
15:58:52skrylarI can't imagine it would work across ABI boundaries very well though. not unless closures were well defined
16:11:28*libman joined #nim
16:14:33skrylari still get a chuckle out of "x.parent = y" as a form of attachment in a graph
16:16:32skrylaroh jeez, i just thought of a weird form of debugging
16:17:41skrylarif you integrated like, a TOML parser/generator with a 9p connection. Export structures over 9p and have it dump/read toml through that. So you could actually do something insane like "ls by-type/fooble"
16:17:49skrylarcat by-type/fooble/32
16:18:25*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:21:10*brson joined #nim
16:24:31*Ven joined #nim
16:24:55*Ven is now known as Guest4882
16:28:11*xet7 joined #nim
16:29:08FromGitter<Varriount> debug-over-filesystem?
16:29:49FromGitter<Varriount> I suppose a filesystem is as good as anything for representing the state of a program
16:38:31skrylarvarriount: well the beauty behind 9p is mostly that its easy to build other stuff on top of it
16:38:31PMunchCrap, I managed to mess up the CodeRepr branch..
16:39:47*Guest4882 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:41:40*onionhammer joined #nim
16:49:00*Ven_ joined #nim
16:49:36*onionhammer quit (Ping timeout: 240 seconds)
16:57:28*BennyElg joined #nim
17:00:44*BennyElg quit (Remote host closed the connection)
17:00:49*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:01:05FromGitter<zacharycarter> Anyone around who can attempt to help me with some stack corruption issue I'm facing with some bindings I wrote?
17:05:28*yglukhov quit (Remote host closed the connection)
17:10:39*onionhammer joined #nim
17:11:50*pilne joined #nim
17:21:13*chemist69 quit (Ping timeout: 245 seconds)
17:26:20skrylaridonno, make sure you are using the right types? cints, csizes and such
17:26:57*rauss quit (Ping timeout: 240 seconds)
17:28:27FromGitter<Varriount> @zacharycarter Is this separate from the asset loading code?
17:28:39FromGitter<Varriount> I'm still unsure about all those casts
17:30:24FromGitter<zacharycarter> @Varriount yes it is - this is from the thing last night
17:30:47FromGitter<zacharycarter> https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-c/spine-c/src/spine/Skeleton.c#L61-L63 and http://imgur.com/a/F5eNk
17:38:09PMunchhttps://github.com/nim-lang/Nim/pull/5885
17:38:19PMunchThere, fixed the MySQL escaping bugs
17:39:31*chemist69 joined #nim
17:45:08euantorRegarding the CSV thing i was talking about earlier, my Nim implementation runs in 1.16s. Need to benchmark the Python/D implementations to see how that compares
17:46:05euantorPMunch: Massive improvement. I was thinking of opening a PR for the sqlite module to use https://www.sqlite.org/c3ref/bind_blob.html
17:46:52PMunchOoh, not a bad idea
17:47:04euantorAlso might be nice to have an option to use the MYSQL version: https://dev.mysql.com/doc/refman/5.7/en/c-api-prepared-statement-data-structures.html
17:48:53*enthus1ast quit (Ping timeout: 260 seconds)
17:49:26*dddddd joined #nim
17:50:22PMunchHmm, now I'm having a little trouble with BiggestInt
17:50:50PMunchWould I have to add all the int kinds? And all the float kinds? And all the char kinds?
17:51:56FromGitter<Varriount> PMunch: What about converting to BiggestInt?
17:52:11PMunchHmm, I guess that would work
17:53:40*couven92 quit (Quit: Client disconnecting)
17:54:26PMunchHmm, that wouldn't work with unsigned though would it
17:54:41PMunchSo I would still need both signed and unsigned integer type
17:55:12FromGitter<Varriount> Hm, that's a problem.
17:55:42FromGitter<Varriount> Well, you would need to cover two types then, the biggest signed integer type, and the biggest unsigned integer type
17:55:51*yglukhov joined #nim
17:58:28PMunchHmm, server2.nim(97, 61) Error: ambiguous call; both mydb_mysql.toSQLInput(x: SomeUnsignedInt) and mydb_mysql.toSQLInput(x: SomeSignedInt) match for: (int literal(0))
17:59:27euantorI wonder if you can just use `SomeInteger`?
17:59:38PMunchNot as a type
17:59:42euantorAh, damn
17:59:55euantorSome results from that CSV comparison for http://dlang.org/blog/2017/05/24/faster-command-line-tools-in-d/
18:00:04euantorhttps://www.irccloud.com/pastebin/2yA98IUi/
18:00:13*yglukhov quit (Ping timeout: 255 seconds)
18:00:18PMunchI can have it as an input, but not as a type in the SQLInput type
18:01:00PMunchThat's great euantor!
18:01:39euantorJust rebuilt the LDC version with the -O flag as in their blog post
18:01:42euantorWe still win :)
18:01:53euantorhttps://www.irccloud.com/pastebin/HSKVhhCg/
18:05:25PMunchCan I write "proc toSQLInput*(x: SomeInteger): SQLInput =" and then have a check if it is SomeSignedInt or SomeUnsignedInt in the procedure?
18:05:52FromGitter<Varriount> I think so - you can use 'of'
18:07:16FromGitter<Varriount> Sorry, `is`
18:07:43FromGitter<Varriount> `when X is SomeInteger: ...`
18:08:15PMunchAaah, when did it
18:08:23PMunchI had it in an if, but that didn't work :P
18:08:45FromGitter<Varriount> Huh. 'if' works for me in my snippet
18:08:52FromGitter<Varriount> What error did you get?
18:10:32PMunchGot BiggestInt but expected BiggestUInt in the assignment within the if x is SomeUnsignedInt...
18:10:35PMunchStrange error
18:11:35FromGitter<Varriount> It's because the 'if' body is still being tyepchecked
18:11:48FromGitter<Varriount> I wonder how such an error message could be improved.
18:15:59*yglukhov joined #nim
18:24:35*noethics joined #nim
18:26:47*xaxisx joined #nim
18:28:19*yglukhov quit (Remote host closed the connection)
18:28:32*xet7 quit (Ping timeout: 260 seconds)
18:34:28FromGitter<mratsim> @euantor Great job ! Now you can brag for us on HN :P
18:34:37euantorhttps://github.com/euantorano/faster-command-line-tools-in-nim
18:34:52euantorI'm writing up a blog post at the minute, and will post something on the forum before I submit to HN
18:35:01euantorI'd need to create an account there first :)
18:37:12FromGitter<mratsim> It reminds me, in neural network for object detection, one paper was called, R-CNN, the other Fast R-CNN, a third one Faster R-CNN, and then someone published YOLO (not joking: https://pjreddie.com/darknet/yolo/)
18:37:26*couven92 joined #nim
18:41:48*xet7 joined #nim
18:42:20PMunchHuh, that's really good performance :)
18:47:07*noethics quit (Remote host closed the connection)
18:47:27*noethics joined #nim
18:48:09*yglukhov joined #nim
18:48:45euantorInitial implementation as well, didn't take 3 tries to get it to beat D ;)
18:49:09FromGitter<mratsim> You should time the compilation time too, :P
18:49:12euantorThe D implementation failed to beat PyPy until he tried again
18:49:17euantorYeah, I can do that too
18:49:55FromGitter<mratsim> Memory usage as well
18:52:05*PMunch quit (Quit: leaving)
18:52:15dom96euantor: nice!
18:52:27dom96euantor: If you'd like, you can post it on nim-lang.org :)
18:54:39skrylarinteresting
18:58:12euantorThat would be nice @dom96 I'll post it to my blog then send you the Markdown
18:58:39skrylari still need to fiddle around with and learn convnets
18:58:40dom96Please just create a PR here: https://github.com/nim-lang/website
18:59:31*Vladar quit (Remote host closed the connection)
19:00:04*nsf quit (Quit: WeeChat 1.7.1)
19:00:16*aedigix quit (Remote host closed the connection)
19:00:36*aedigix joined #nim
19:01:46euantorAh, that'll be easier :)
19:01:53euantorHadn't realised the blog was there too
19:02:10euantorI need to work out the best way to check memory usage/CPU usage
19:02:27*bodie_ quit (Ping timeout: 240 seconds)
19:05:14*bodie_ joined #nim
19:08:59*Hekatonkiros joined #nim
19:09:28*chemist69 quit (Ping timeout: 240 seconds)
19:11:19FromGitter<mratsim> @euantor i use that for timing + memory: https://github.com/kostya/benchmarks/blob/master/xtime.rb
19:11:36euantorAh, I'll give that a go thanks
19:22:38*xet7 quit (Quit: Leaving)
19:29:40*chemist69 joined #nim
19:33:10*Matthias247 joined #nim
19:36:34*rkjy joined #nim
19:37:12FromGitter<mratsim> Are there some recommendations/guidelines for the order of parameters? Especially in the context of proc that accepts proc as arguments
19:37:36FromGitter<ephja> who knows how much machine learning will have progressed 10 years from now
19:39:09FromGitter<ephja> https://neil.fraser.name/writing/tank/
19:39:45*yglukhov quit (Remote host closed the connection)
19:39:52federico3ephja: only well learned machines will know
19:43:01gokrskrylar: Extra points for mentioning parse dialect ;)
19:45:06*rkjy quit (Quit: ChatZilla 0.9.93 [Firefox 53.0.2/20170508124022])
19:46:11*Nobabs27 joined #nim
19:46:55Nobabs27yo I have this error: lib/nim/pure/os.nim(802, 33) Error: cannot evaluate at compile time: environment I'm assuming I just need to put in some compile time argument?
19:49:31dom96Nobabs27: are you on Arch Linux?
19:49:41*yglukhov joined #nim
19:50:01dom96https://github.com/nim-lang/Nim/issues/5867
19:50:51Nobabs27yes I am
19:53:10dom96I would suggest installing Nim using choosenim: https://github.com/dom96/choosenim#unix
19:55:04Nobabs27alrighty I'll give it a go thanks
19:55:47Nobabs27oh and also, the Nim syntax extension for Atom is always crashing, is there something better?
19:56:12Nobabs27it was last updated like Jan 2016
19:57:50*skrylar quit (Quit: Leaving)
20:00:25dom96VS Code's extension is pretty widely used and stable
20:02:02Nobabs27huh never thought I would have a reason to use VS Code
20:05:47FromGitter<Jeff-Ciesielski> nim-mode in emacs is pretty great if you're willing to endure the carpal tunnel that comes with using emacs :)
20:07:32Nobabs27lol
20:12:11euantorhttps://www.euantorano.co.uk/posts/faster-command-line-tools-in-nim/
20:14:13FromGitter<mratsim> Someone knows how to use Nim coroutines? This is probably the most cryptic Nim PR I have seen so far: https://github.com/nim-lang/Nim/pull/5317
20:17:05FromGitter<mratsim> @euantor, quick and nice post. There is a `benchamrk` typo. Also was Nim compiled with GCC or Clang ?
20:19:10euantorThanks. I just used the default compiler on the Mac, so it'll be Clang. I'll update the post to include that information and fix the typo in a bit
20:21:32*Etheco joined #nim
20:24:27*Nobabs27 quit (Quit: Leaving)
20:25:34EthecoI was looking at learning ether Nim or C++, Would Nim actually be easier to learn?
20:25:44*mawkish joined #nim
20:26:22gokrEtheco: yes, IMHO definitely.
20:27:24*beatmox quit (Remote host closed the connection)
20:27:25*derlafff quit (Remote host closed the connection)
20:27:36*beatmox joined #nim
20:28:05EthecoAwesome, And I will overall just benefit from the GC etc anyway won't I
20:28:06*Nobabs27 joined #nim
20:28:13Ethecoits sold ill attack Nim head on :D
20:28:32Nobabs27how would I concatenate a string and a tainted string?
20:28:45FromGitter<mratsim> beware of the walls :P don’t bash your head in
20:28:54*derlafff joined #nim
20:29:52FromGitter<ephja> C++ in introductory courses - worst decision ever
20:32:01gokrEtheco: Some good places to start may be http://howistart.org/posts/nim and perhaps https://nim-by-example.github.io
20:32:23gokrNot sure what the current recommendations are - of course there are the official tutorials and the lang manual.
20:32:57gokrBut the lang manual may feel a bit overwhelming, but you don't need to learn everything to get productive.
20:32:59Ethecosweet, I currently code PHP/JS
20:33:20Ethecobeen doing PHP for 10 years or something silly now
20:33:21gokrI also wrote a bunch of articles, not sure how fresh they are these days.
20:33:50Ethecobut want to learn something that is more robust so i can dabble in game development and write proper server scripts etc
20:34:19FromGitter<mratsim> Well for game dev, it seems like half of the people using Nim are game devs :O
20:35:18gokrEtheco: Nim is indeed a very nice choice. Really good performance. Reasonably productive (compared to dynamic langs). And covers lots of use cases and platforms.
20:35:38FromGitter<mratsim> I guess your first hurdle would be to deal with a strict type system. Love him, he will help you a lot to find bugs under cover
20:35:43EthecoI did see Frag and someone has wrote the plugin for Unreal 4 so its seems good
20:36:11gokrAraq and I did a wrap of Urho3D also, but it needs refreshing.
20:36:30EthecoYeh, I feel ill need to start from bare coding and work up to understand the strict types etc
20:36:35gokrAnd I am interested in actually moving that wrapper to AtomicGameEngine (which is a Urho3D derivative).
20:37:02Ethecois that a opensource engine ?
20:37:12gokrYep, and a darn good one.
20:37:17FromGitter<ephja> gokr: does that mean that you find dynamically typed languages more productive?
20:37:22Etheconice, have to keep a eye on that then
20:38:08gokrephja: For me, yeah. I am a Smalltalker at heart and Nim doesn't come close yet, but of course it also has to do with proficiency.
20:39:23EthecoWhat would you suggest if I want to build a gui program ?
20:39:30Ethecosomething that looked nice also
20:39:49gokrAt the moment I think I would suggest wxNim (although I haven't tried it myself) - check with PMunch
20:40:06*Jesin quit (Quit: Leaving)
20:41:01Ethecoah sweet
20:41:08Ethecothanks gokr
20:41:11gokrEtheco: Or if you are fine with Gtk I think the Gtk2 and Gtk3 wrappers are well maintained.
20:41:35gokrAnd there is also QML stuff.
20:41:49gokrAnd libui - but... I fear it has stalled upstream.
20:42:08Ethecoso plenty to pick from :D
20:42:26gokrYeah, it depends on your requirements. Cross platform? True and tested?
20:42:38Ethecothink cross platform would be good
20:43:28EthecoI looked into Electron awhile back but obviously that is memory heavy!
20:43:37Ethecofor a basic app it uses 150MB straight of the bat lol
20:43:43gokrI work in electron and yeah, its a beast.
20:44:03gokrI wouldn't have picked it myself, but hey.
20:44:44Ethecowhat wrapper would you say is best for cross platform?
20:45:00gokrI think wxNim is probably the safer choice.
20:45:23EthecoPMunch version seems more fleshed out
20:45:36gokrI think his is the one to look at yeah.
20:45:51gokrI think I will try it myself later on.
20:45:59Ethecohe forked Araq's and looks more updated
20:46:16EthecoAraq one hasn't been touched in 2years so
20:46:35gokrYeah, Araq has so much stuff to do anyway :)
20:46:41Ethecoaye I can imagine :D
20:46:53EthecoI looked at Nim a good while ago, when it used to be nimrod
20:46:57Ethecojust never got anywhere with it
20:47:26Etheco100% feel its more mature now and more resources to learn off :D
20:49:52Nobabs27type mismatch: got (string, TaintedString) What if I don't care if they are mismatched or not?
20:51:04*vlad1777d joined #nim
20:53:42FromGitter<ephja> I assume the signature in question is (string, string)
21:00:08FromGitter<ephja> Nobabs27: TaintedString is a distinct type if you have activated taint mode; otherwise it's just an alias for 'string' in which case you need to convert it to a string (string(foo) or foo.string). I'm going to need more context if this isn't relevant
21:00:49Nobabs27hmm ok
21:01:01*Hekaton joined #nim
21:02:10Nobabs27var installPkg = "abc" + paramStr(2)
21:02:21Nobabs27@ ephja
21:03:29FromGitter<ephja> oh I see. well, strings are concatenated with &
21:04:51*Hekatonkiros quit (Ping timeout: 268 seconds)
21:06:05*Hekaton quit (Ping timeout: 268 seconds)
21:06:23Nobabs27ephja: "is of type 'TaintedString' and has to be discarded"
21:06:35*nsf joined #nim
21:07:57*Jesin joined #nim
21:12:21*vivus joined #nim
21:12:51vivusHello. is anyone familiar with this lib: https://github.com/c-blake/cligen
21:13:58FromGitter<Varriount> vivus: A little. What's your question?
21:16:20vivusI'm using dispatchMulti and have the following: import cligen; dispatchMulti("test", [display]). my proc is declared as so: proc display(name: string = "", option: int) = ... However, "option" does not appear/work as a command when I try: ./some_executable display --name="something" --option=0
21:16:38FromGitter<ephja> Nobabs: Any expression that yields a value has to either be used (assigned to a variable for example) or discarded (discard foo)
21:17:38Nobabs27ehpja: var installPkg = "abc" & paramStr(2) I get the feeling its not converted ...
21:20:27vivus@Varriount ^^
21:22:42FromGitter<ephja> Nobabs27: Is the error message really for that statement? Anyway, it'll be easier to help if you upload a test case so that we can read the code
21:24:11*Neomex joined #nim
21:30:25dom96euantor: that Simpson's reference is hilarious, even my SO is finding it super funny. :)
21:31:24euantordom96: Hah, I decided to leave it out of the post on the Nim blog in case it seemed in poor taste ;)
21:31:46euantorI've just made the changes you requested, and fixed the couple of typos. I actually did better than I usually do :)
21:31:48dom96Feel free to add it as a link, just don't embed it :)
21:32:26dom96I found some other typos
21:33:11dom96also, you must have missed my edit
21:34:00dom96(to my suggestion for the note)
21:34:43dom96also you missed out on the links in that note
21:36:11dom96otherwise I'm ready to merge
21:36:41euantorAlright, I'll fix that. I was going off the emails I got for your comments
21:37:12FromGitter<Varriount> vivus: I'd file a bug report and/or try to fix the code then.
21:38:40euantorOk, should be all sorted now
21:40:18vivus@Varriount initializing it with a "0" seems to work
21:40:47FromGitter<Varriount> Huh
21:42:52*Trustable quit (Remote host closed the connection)
21:44:57vivuswhat is the method to convert an int to a string? string(myvar) ?
21:46:53FromGitter<ephja> vivus: https://nim-lang.org/docs/system.html#$,int
21:48:19vivusthanks. $ seems to do it
21:50:08dom96https://nim-lang.org/blog/2017/05/25/faster-command-line-tools-in-nim.html
21:50:10dom96posted :)
21:50:27vivushttps://forum.nim-lang.org/t/933
21:54:01*bjz joined #nim
21:55:42euantorNice, thanks
22:00:17libmanhttps://www.reddit.com/r/programming/comments/6dct6e/faster_command_line_tools_in_nim/
22:10:28Nobabs27ps://gist.github.com/Nobabs27/4eace7b09e458115befb7aac7aabe713#file-test2-nim
22:10:50Nobabs27ephja: is of type 'TaintedString' and has to be discarded (same error as before)
22:11:10*daaf joined #nim
22:11:17*PMunch joined #nim
22:17:42FromGitter<ephja> Nobabs27: so the error message was not for the line in question indeed
22:19:02libmanThe numbers in that blog post don't really catch the eye, I'd add a graph. Perhaps the output binary size differences between D and Nim are also worth mentioning...
22:19:15FromGitter<ephja> Nobabs27: It's the line after. execProcess returns a value
22:20:35FromGitter<ephja> either use it or discard it, though I assume that you are interested in the output
22:21:18Nobabs27yes
22:21:34Nobabs27ephja: im still unclear on the solution though
22:24:41*Trioxin joined #nim
22:25:45Trioxinthinking about wrapping this https://www.youtube.com/watch?v=EViG0Q4lTeA
22:28:07Trioxinneed to fork C2Nim to support Holy C
22:32:09Nobabs27cool another compiler
22:32:40FromGitter<ephja> Nobabs27: you use it by either storing the return value in a variable or by doing something else with it. what you are doing now is discarding the result of execProcess, which you must do with 'discard'(discard execProcess(foobar)). you must tell the compiler about every value that you don't want to use.
22:33:09Nobabs27ohhh I get it
22:33:16Nobabs27hm well I was missing that
22:33:49FromGitter<ephja> the purpose of which is to prevent mistakes
22:41:37*yglukhov quit (Remote host closed the connection)
22:42:11*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:50:30*couven92 quit (Ping timeout: 240 seconds)
22:51:37*vivus quit (Quit: Leaving)
23:12:08*Jesin quit (Quit: Leaving)
23:26:16*nsf quit (Quit: WeeChat 1.7.1)
23:57:49*couven92 joined #nim
23:58:01*Matthias247 quit (Read error: Connection reset by peer)
23:59:44*couven92 quit (Client Quit)