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:01 | FromGitter | <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:15 | FromGitter | <zacharycarter> at least that's what asan is pointing me to |
00:39:35 | FromGitter | <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:55 | FromGitter | <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:09 | ftsf | zacharycarter =\ it's tricky to debug when you've got mem corruption misleading you |
02:34:30 | ftsf | tried valgrind? |
02:34:35 | FromGitter | <zacharycarter> I'm on osx :/ |
02:34:47 | FromGitter | <zacharycarter> I've tried address sanitizer but I'm not sure if it's memory corruption or what |
02:35:07 | FromGitter | <zacharycarter> my app crashes and segfaults but I believe it's definitely something wrong with my bindings |
02:35:15 | FromGitter | <zacharycarter> I'm just not sure where / how to start troubleshooting |
02:35:29 | ftsf | i had some issues with my bindings when i wasn't specifying the calling convention |
02:35:41 | ftsf | but the issue was very obvious rather than insidious |
02:35:43 | FromGitter | <zacharycarter> seems similar to the bycopy problem I was having with my bindings to NanoVG |
02:36:07 | FromGitter | <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:33 | ftsf | if you've got a method to reproduce the issue i can run on linux under valgrind and see what's up? |
02:46:38 | FromGitter | <zacharycarter> that would be awesome |
02:46:50 | FromGitter | <zacharycarter> hrm though I could probably do the same |
02:47:00 | FromGitter | <zacharycarter> it's quite a bit of setup work |
02:47:30 | FromGitter | <zacharycarter> requires building everything for frag and then also spine |
02:47:43 | ftsf | dang |
02:47:44 | FromGitter | <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:51 | ftsf | ok |
02:47:59 | FromGitter | <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:13 | FromGitter | <zacharycarter> the problem definitely seems to be in that method I linked earlier |
05:20:53 | * | skrylar joined #nim |
05:20:58 | skrylar | meep |
05:21:12 | skrylar | PMunch, it's not that hard to do what wx does |
05:22:02 | skrylar | used 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:23 | FromGitter | <Varriount> skrylar: If you can manage to wrap all of Qt, I will give you $500 |
05:28:41 | skrylar | jesus |
05:31:45 | * | BennyElg joined #nim |
05:31:46 | FromGitter | <Varriount> I'm completely serious. Having even a low-level Qt wrapper would be a boon for the community. |
05:34:59 | skrylar | i'm not actually sure how one extends a C++ class from within nim |
05:35:17 | skrylar | i remember this being a weird problem swig had a pseudo solution for in C# |
05:36:11 | FromGitter | <zacharycarter> http://imgur.com/a/F5eNk |
05:36:23 | FromGitter | <zacharycarter> I'm not sure if that's memory corruption or not |
05:37:04 | skrylar | oh 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:55 | FromGitter | <Varriount> Skrylar: You implement an extended class that takes in another structure and dispatches to it |
06:09:44 | * | nsf joined #nim |
06:09:51 | skrylar | @Varriount i think that's what swig did. |
06:09:59 | skrylar | they said something about "director support" but i have no idea what that meant |
06:10:03 | skrylar | bring your own vtable? |
06:10:44 | FromGitter | <Varriount> Something like that |
06:13:01 | * | Hekaton quit (Ping timeout: 240 seconds) |
06:17:26 | FromGitter | <Varriount> @zacharycarter That second error makes it seem like something is being mis-typed or casted to a larger type |
06:19:55 | FromGitter | <Varriount> Then the program reads some invalid data |
06:40:01 | * | xet7 quit (Ping timeout: 240 seconds) |
06:52:18 | skrylar | trying another stab at porting this miglayout thingy |
06:52:25 | skrylar | tried 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:19 | FromGitter | <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:46 | FromGitter | <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:14 | PMunch | skrylar, 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:01 | PMunch | And I'm not sure what you mean with "wrap OS stuff and then leave you stranded for the rest" |
11:59:23 | FromGitter | <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:37 | FromGitter | <mratsim> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5926c7280a783b6c0ad3af0b] |
12:00:20 | skrylar | PMunch, oh. it's just me being bitter in that my experience those toolkits don't help much when you need anything custom |
12:00:31 | skrylar | Qt does do some things regarding text layout for you though |
12:09:49 | FromGitter | <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:49 | FromGitter | ... 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:29 | PMunch | Well, 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:12 | FromGitter | <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:41 | FromGitter | <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:51 | FromGitter | <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:03 | FromGitter | <andreaferretti> I have a situtation generated by c2nim where a function `f` is first declared, then, later in the file, defined |
13:34:25 | FromGitter | <andreaferretti> after that a function `g` tries to call `f` and gets an error because the call is ambiguous |
13:34:32 | FromGitter | <andreaferretti> is there a way to fix this? |
13:36:41 | FromGitter | <Varriount> @andreaferretti I would have to see the generated code |
13:41:39 | FromGitter | <andreaferretti> here it is https://github.com/unicredit/nimcuda/blob/master/nimcuda/cuda_occupancy.nim |
13:42:04 | FromGitter | <andreaferretti> the function is `cudaOccMaxActiveBlocksPerMultiprocessor` |
13:42:11 | FromGitter | <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:31 | FromGitter | <andreaferretti> but in general I prefer to make the smallest possible manual modifications |
13:42:39 | * | BennyElg joined #nim |
13:42:44 | FromGitter | <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:57 | euantor | http://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:43 | FromGitter | <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:01 | PMunch | Hmm, little problem with the db_mysql module |
13:55:11 | PMunch | I wanted to have paginated results |
13:55:54 | PMunch | So 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:19 | PMunch | But 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:24 | shmup | why is there a user record gist? |
14:00:12 | * | bjz quit (Ping timeout: 260 seconds) |
14:03:39 | FromGitter | <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:15 | euantor | Yeah, I've heard about xsv, it was mentioned in the HN comments for the above article too |
14:04:42 | euantor | Would still be interested to see if Nim can beat D since both languages occupy similar spaces |
14:06:42 | FromGitter | <mratsim> I’m trying to beat D’s ndslices =), I let you beat D CSV parser ;) |
14:08:07 | euantor | We already have CSV parsing in the stdlib, so I might give it a go tonight and see how it does |
14:11:25 | FromGitter | <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:12 | FromGitter | <mratsim> and his less indepth review of XSV: http://blog.burntsushi.net/csv/#performance |
14:12:23 | shmup | rg++ |
14:12:35 | FromGitter | <Varriount> I think Nim could do something similar |
14:17:44 | euantor | Yeah, the D version is single threaded, so I'll focus on just trying to beat that first ;) |
14:19:33 | FromGitter | <mratsim> Good luck :) |
14:27:02 | PMunch | Hmm, 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:15 | FromGitter | <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:04 | PMunch | Hmm, I found a different solution to my problem. But thanks for the answer :) |
14:36:23 | PMunch | http://ix.io/uS7 |
14:36:27 | PMunch | That's what I was writing |
14:36:46 | PMunch | A 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:06 | shmup | xo ix.io |
15:01:11 | shmup | (friends with author) |
15:02:10 | shmup | PMunch: another thing rupa wrote http://awards.butts.institute/heRw6Q |
15:02:57 | * | bjz joined #nim |
15:03:06 | PMunch | Haha :P |
15:03:20 | PMunch | I like it since it's so easy to use over terminal |
15:03:26 | PMunch | cat a file into it and voila |
15:03:48 | skrylar | pfff. actually saw "mybutt" in a technical document |
15:05:04 | PMunch | Now 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:58 | shmup | nice PMunch yeah it's a good tool. his first iteration of a pastebin was https://github.com/rupa/sprunge |
15:06:09 | shmup | rupa 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:55 | skrylar | ah now the less fun part |
15:26:04 | skrylar | actually implementing the miglayout engine x.x |
15:26:12 | skrylar | probably worth it though |
15:26:43 | FromGitter | <Varriount> skrylar: What are you doing? |
15:26:53 | skrylar | Varriount: http://miglayout.com/ this |
15:29:11 | * | smt quit (Remote host closed the connection) |
15:29:27 | skrylar | its basically a "this is the only layout manager you ever need" kind of thing |
15:29:50 | * | smt joined #nim |
15:29:58 | FromGitter | <Varriount> Are you tying it to a specific GUI framework? |
15:30:01 | skrylar | no |
15:30:05 | skrylar | doesn't need to be |
15:30:31 | skrylar | the original one isn't either. it just needs a couple of delegates |
15:30:51 | skrylar | but instead of the weird parser they did, i used functional options. at least when i partly did that in Go |
15:31:01 | skrylar | will probably also use functional options in nim, because they are nicer |
15:31:12 | skrylar | http://ix.io/uwo |
15:31:13 | * | Ven_ joined #nim |
15:31:39 | skrylar | now what nim really needs as well is the parse dialect from red |
15:32:04 | skrylar | that's basically a PEG parser but you get to use it at compile time for macros |
15:32:14 | skrylar | well 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:22 | skrylar | Varriount: 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:40 | shmup | I like that pattern skrylar, wasn't familiar |
15:51:46 | shmup | read this https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis |
15:53:03 | skrylar | :) |
15:53:41 | skrylar | shmup, yes that's where i learned it |
15:53:46 | * | nsf joined #nim |
15:53:47 | skrylar | a little more overhead maybe |
15:55:05 | shmup | I meant "I read this" heh |
15:58:21 | skrylar | ah |
15:58:52 | skrylar | I 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:33 | skrylar | i still get a chuckle out of "x.parent = y" as a form of attachment in a graph |
16:16:32 | skrylar | oh jeez, i just thought of a weird form of debugging |
16:17:41 | skrylar | if 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:49 | skrylar | cat 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:08 | FromGitter | <Varriount> debug-over-filesystem? |
16:29:49 | FromGitter | <Varriount> I suppose a filesystem is as good as anything for representing the state of a program |
16:38:31 | skrylar | varriount: well the beauty behind 9p is mostly that its easy to build other stuff on top of it |
16:38:31 | PMunch | Crap, 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:05 | FromGitter | <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:20 | skrylar | idonno, make sure you are using the right types? cints, csizes and such |
17:26:57 | * | rauss quit (Ping timeout: 240 seconds) |
17:28:27 | FromGitter | <Varriount> @zacharycarter Is this separate from the asset loading code? |
17:28:39 | FromGitter | <Varriount> I'm still unsure about all those casts |
17:30:24 | FromGitter | <zacharycarter> @Varriount yes it is - this is from the thing last night |
17:30:47 | FromGitter | <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:09 | PMunch | https://github.com/nim-lang/Nim/pull/5885 |
17:38:19 | PMunch | There, fixed the MySQL escaping bugs |
17:39:31 | * | chemist69 joined #nim |
17:45:08 | euantor | Regarding 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:05 | euantor | PMunch: 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:52 | PMunch | Ooh, not a bad idea |
17:47:04 | euantor | Also 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:22 | PMunch | Hmm, now I'm having a little trouble with BiggestInt |
17:50:50 | PMunch | Would I have to add all the int kinds? And all the float kinds? And all the char kinds? |
17:51:56 | FromGitter | <Varriount> PMunch: What about converting to BiggestInt? |
17:52:11 | PMunch | Hmm, I guess that would work |
17:53:40 | * | couven92 quit (Quit: Client disconnecting) |
17:54:26 | PMunch | Hmm, that wouldn't work with unsigned though would it |
17:54:41 | PMunch | So I would still need both signed and unsigned integer type |
17:55:12 | FromGitter | <Varriount> Hm, that's a problem. |
17:55:42 | FromGitter | <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:28 | PMunch | Hmm, 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:27 | euantor | I wonder if you can just use `SomeInteger`? |
17:59:38 | PMunch | Not as a type |
17:59:42 | euantor | Ah, damn |
17:59:55 | euantor | Some results from that CSV comparison for http://dlang.org/blog/2017/05/24/faster-command-line-tools-in-d/ |
18:00:04 | euantor | https://www.irccloud.com/pastebin/2yA98IUi/ |
18:00:13 | * | yglukhov quit (Ping timeout: 255 seconds) |
18:00:18 | PMunch | I can have it as an input, but not as a type in the SQLInput type |
18:01:00 | PMunch | That's great euantor! |
18:01:39 | euantor | Just rebuilt the LDC version with the -O flag as in their blog post |
18:01:42 | euantor | We still win :) |
18:01:53 | euantor | https://www.irccloud.com/pastebin/HSKVhhCg/ |
18:05:25 | PMunch | Can I write "proc toSQLInput*(x: SomeInteger): SQLInput =" and then have a check if it is SomeSignedInt or SomeUnsignedInt in the procedure? |
18:05:52 | FromGitter | <Varriount> I think so - you can use 'of' |
18:07:16 | FromGitter | <Varriount> Sorry, `is` |
18:07:43 | FromGitter | <Varriount> `when X is SomeInteger: ...` |
18:08:15 | PMunch | Aaah, when did it |
18:08:23 | PMunch | I had it in an if, but that didn't work :P |
18:08:45 | FromGitter | <Varriount> Huh. 'if' works for me in my snippet |
18:08:52 | FromGitter | <Varriount> What error did you get? |
18:10:32 | PMunch | Got BiggestInt but expected BiggestUInt in the assignment within the if x is SomeUnsignedInt... |
18:10:35 | PMunch | Strange error |
18:11:35 | FromGitter | <Varriount> It's because the 'if' body is still being tyepchecked |
18:11:48 | FromGitter | <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:28 | FromGitter | <mratsim> @euantor Great job ! Now you can brag for us on HN :P |
18:34:37 | euantor | https://github.com/euantorano/faster-command-line-tools-in-nim |
18:34:52 | euantor | I'm writing up a blog post at the minute, and will post something on the forum before I submit to HN |
18:35:01 | euantor | I'd need to create an account there first :) |
18:37:12 | FromGitter | <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:20 | PMunch | Huh, 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:45 | euantor | Initial implementation as well, didn't take 3 tries to get it to beat D ;) |
18:49:09 | FromGitter | <mratsim> You should time the compilation time too, :P |
18:49:12 | euantor | The D implementation failed to beat PyPy until he tried again |
18:49:17 | euantor | Yeah, I can do that too |
18:49:55 | FromGitter | <mratsim> Memory usage as well |
18:52:05 | * | PMunch quit (Quit: leaving) |
18:52:15 | dom96 | euantor: nice! |
18:52:27 | dom96 | euantor: If you'd like, you can post it on nim-lang.org :) |
18:54:39 | skrylar | interesting |
18:58:12 | euantor | That would be nice @dom96 I'll post it to my blog then send you the Markdown |
18:58:39 | skrylar | i still need to fiddle around with and learn convnets |
18:58:40 | dom96 | Please 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:46 | euantor | Ah, that'll be easier :) |
19:01:53 | euantor | Hadn't realised the blog was there too |
19:02:10 | euantor | I 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:19 | FromGitter | <mratsim> @euantor i use that for timing + memory: https://github.com/kostya/benchmarks/blob/master/xtime.rb |
19:11:36 | euantor | Ah, 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:12 | FromGitter | <mratsim> Are there some recommendations/guidelines for the order of parameters? Especially in the context of proc that accepts proc as arguments |
19:37:36 | FromGitter | <ephja> who knows how much machine learning will have progressed 10 years from now |
19:39:09 | FromGitter | <ephja> https://neil.fraser.name/writing/tank/ |
19:39:45 | * | yglukhov quit (Remote host closed the connection) |
19:39:52 | federico3 | ephja: only well learned machines will know |
19:43:01 | gokr | skrylar: 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:55 | Nobabs27 | yo 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:31 | dom96 | Nobabs27: are you on Arch Linux? |
19:49:41 | * | yglukhov joined #nim |
19:50:01 | dom96 | https://github.com/nim-lang/Nim/issues/5867 |
19:50:51 | Nobabs27 | yes I am |
19:53:10 | dom96 | I would suggest installing Nim using choosenim: https://github.com/dom96/choosenim#unix |
19:55:04 | Nobabs27 | alrighty I'll give it a go thanks |
19:55:47 | Nobabs27 | oh and also, the Nim syntax extension for Atom is always crashing, is there something better? |
19:56:12 | Nobabs27 | it was last updated like Jan 2016 |
19:57:50 | * | skrylar quit (Quit: Leaving) |
20:00:25 | dom96 | VS Code's extension is pretty widely used and stable |
20:02:02 | Nobabs27 | huh never thought I would have a reason to use VS Code |
20:05:47 | FromGitter | <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:32 | Nobabs27 | lol |
20:12:11 | euantor | https://www.euantorano.co.uk/posts/faster-command-line-tools-in-nim/ |
20:14:13 | FromGitter | <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:05 | FromGitter | <mratsim> @euantor, quick and nice post. There is a `benchamrk` typo. Also was Nim compiled with GCC or Clang ? |
20:19:10 | euantor | Thanks. 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:34 | Etheco | I was looking at learning ether Nim or C++, Would Nim actually be easier to learn? |
20:25:44 | * | mawkish joined #nim |
20:26:22 | gokr | Etheco: 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:05 | Etheco | Awesome, And I will overall just benefit from the GC etc anyway won't I |
20:28:06 | * | Nobabs27 joined #nim |
20:28:13 | Etheco | its sold ill attack Nim head on :D |
20:28:32 | Nobabs27 | how would I concatenate a string and a tainted string? |
20:28:45 | FromGitter | <mratsim> beware of the walls :P don’t bash your head in |
20:28:54 | * | derlafff joined #nim |
20:29:52 | FromGitter | <ephja> C++ in introductory courses - worst decision ever |
20:32:01 | gokr | Etheco: Some good places to start may be http://howistart.org/posts/nim and perhaps https://nim-by-example.github.io |
20:32:23 | gokr | Not sure what the current recommendations are - of course there are the official tutorials and the lang manual. |
20:32:57 | gokr | But the lang manual may feel a bit overwhelming, but you don't need to learn everything to get productive. |
20:32:59 | Etheco | sweet, I currently code PHP/JS |
20:33:20 | Etheco | been doing PHP for 10 years or something silly now |
20:33:21 | gokr | I also wrote a bunch of articles, not sure how fresh they are these days. |
20:33:50 | Etheco | but want to learn something that is more robust so i can dabble in game development and write proper server scripts etc |
20:34:19 | FromGitter | <mratsim> Well for game dev, it seems like half of the people using Nim are game devs :O |
20:35:18 | gokr | Etheco: 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:38 | FromGitter | <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:43 | Etheco | I did see Frag and someone has wrote the plugin for Unreal 4 so its seems good |
20:36:11 | gokr | Araq and I did a wrap of Urho3D also, but it needs refreshing. |
20:36:30 | Etheco | Yeh, I feel ill need to start from bare coding and work up to understand the strict types etc |
20:36:35 | gokr | And I am interested in actually moving that wrapper to AtomicGameEngine (which is a Urho3D derivative). |
20:37:02 | Etheco | is that a opensource engine ? |
20:37:12 | gokr | Yep, and a darn good one. |
20:37:17 | FromGitter | <ephja> gokr: does that mean that you find dynamically typed languages more productive? |
20:37:22 | Etheco | nice, have to keep a eye on that then |
20:38:08 | gokr | ephja: 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:23 | Etheco | What would you suggest if I want to build a gui program ? |
20:39:30 | Etheco | something that looked nice also |
20:39:49 | gokr | At 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:01 | Etheco | ah sweet |
20:41:08 | Etheco | thanks gokr |
20:41:11 | gokr | Etheco: Or if you are fine with Gtk I think the Gtk2 and Gtk3 wrappers are well maintained. |
20:41:35 | gokr | And there is also QML stuff. |
20:41:49 | gokr | And libui - but... I fear it has stalled upstream. |
20:42:08 | Etheco | so plenty to pick from :D |
20:42:26 | gokr | Yeah, it depends on your requirements. Cross platform? True and tested? |
20:42:38 | Etheco | think cross platform would be good |
20:43:28 | Etheco | I looked into Electron awhile back but obviously that is memory heavy! |
20:43:37 | Etheco | for a basic app it uses 150MB straight of the bat lol |
20:43:43 | gokr | I work in electron and yeah, its a beast. |
20:44:03 | gokr | I wouldn't have picked it myself, but hey. |
20:44:44 | Etheco | what wrapper would you say is best for cross platform? |
20:45:00 | gokr | I think wxNim is probably the safer choice. |
20:45:23 | Etheco | PMunch version seems more fleshed out |
20:45:36 | gokr | I think his is the one to look at yeah. |
20:45:51 | gokr | I think I will try it myself later on. |
20:45:59 | Etheco | he forked Araq's and looks more updated |
20:46:16 | Etheco | Araq one hasn't been touched in 2years so |
20:46:35 | gokr | Yeah, Araq has so much stuff to do anyway :) |
20:46:41 | Etheco | aye I can imagine :D |
20:46:53 | Etheco | I looked at Nim a good while ago, when it used to be nimrod |
20:46:57 | Etheco | just never got anywhere with it |
20:47:26 | Etheco | 100% feel its more mature now and more resources to learn off :D |
20:49:52 | Nobabs27 | type mismatch: got (string, TaintedString) What if I don't care if they are mismatched or not? |
20:51:04 | * | vlad1777d joined #nim |
20:53:42 | FromGitter | <ephja> I assume the signature in question is (string, string) |
21:00:08 | FromGitter | <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:49 | Nobabs27 | hmm ok |
21:01:01 | * | Hekaton joined #nim |
21:02:10 | Nobabs27 | var installPkg = "abc" + paramStr(2) |
21:02:21 | Nobabs27 | @ ephja |
21:03:29 | FromGitter | <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:23 | Nobabs27 | ephja: "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:51 | vivus | Hello. is anyone familiar with this lib: https://github.com/c-blake/cligen |
21:13:58 | FromGitter | <Varriount> vivus: A little. What's your question? |
21:16:20 | vivus | I'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:38 | FromGitter | <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:38 | Nobabs27 | ehpja: var installPkg = "abc" & paramStr(2) I get the feeling its not converted ... |
21:20:27 | vivus | @Varriount ^^ |
21:22:42 | FromGitter | <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:25 | dom96 | euantor: that Simpson's reference is hilarious, even my SO is finding it super funny. :) |
21:31:24 | euantor | dom96: Hah, I decided to leave it out of the post on the Nim blog in case it seemed in poor taste ;) |
21:31:46 | euantor | I've just made the changes you requested, and fixed the couple of typos. I actually did better than I usually do :) |
21:31:48 | dom96 | Feel free to add it as a link, just don't embed it :) |
21:32:26 | dom96 | I found some other typos |
21:33:11 | dom96 | also, you must have missed my edit |
21:34:00 | dom96 | (to my suggestion for the note) |
21:34:43 | dom96 | also you missed out on the links in that note |
21:36:11 | dom96 | otherwise I'm ready to merge |
21:36:41 | euantor | Alright, I'll fix that. I was going off the emails I got for your comments |
21:37:12 | FromGitter | <Varriount> vivus: I'd file a bug report and/or try to fix the code then. |
21:38:40 | euantor | Ok, should be all sorted now |
21:40:18 | vivus | @Varriount initializing it with a "0" seems to work |
21:40:47 | FromGitter | <Varriount> Huh |
21:42:52 | * | Trustable quit (Remote host closed the connection) |
21:44:57 | vivus | what is the method to convert an int to a string? string(myvar) ? |
21:46:53 | FromGitter | <ephja> vivus: https://nim-lang.org/docs/system.html#$,int |
21:48:19 | vivus | thanks. $ seems to do it |
21:50:08 | dom96 | https://nim-lang.org/blog/2017/05/25/faster-command-line-tools-in-nim.html |
21:50:10 | dom96 | posted :) |
21:50:27 | vivus | https://forum.nim-lang.org/t/933 |
21:54:01 | * | bjz joined #nim |
21:55:42 | euantor | Nice, thanks |
22:00:17 | libman | https://www.reddit.com/r/programming/comments/6dct6e/faster_command_line_tools_in_nim/ |
22:10:28 | Nobabs27 | ps://gist.github.com/Nobabs27/4eace7b09e458115befb7aac7aabe713#file-test2-nim |
22:10:50 | Nobabs27 | ephja: 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:42 | FromGitter | <ephja> Nobabs27: so the error message was not for the line in question indeed |
22:19:02 | libman | The 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:15 | FromGitter | <ephja> Nobabs27: It's the line after. execProcess returns a value |
22:20:35 | FromGitter | <ephja> either use it or discard it, though I assume that you are interested in the output |
22:21:18 | Nobabs27 | yes |
22:21:34 | Nobabs27 | ephja: im still unclear on the solution though |
22:24:41 | * | Trioxin joined #nim |
22:25:45 | Trioxin | thinking about wrapping this https://www.youtube.com/watch?v=EViG0Q4lTeA |
22:28:07 | Trioxin | need to fork C2Nim to support Holy C |
22:32:09 | Nobabs27 | cool another compiler |
22:32:40 | FromGitter | <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:09 | Nobabs27 | ohhh I get it |
22:33:16 | Nobabs27 | hm well I was missing that |
22:33:49 | FromGitter | <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) |