00:07:19 | * | libman joined #nim |
00:15:29 | * | SusWombat joined #nim |
00:15:35 | SusWombat | Hey everyone |
00:18:03 | libman | hi SusWombat |
00:23:56 | FromGitter | <zacharycarter> o/ |
00:32:32 | * | couven92 quit (Quit: Client Disconnecting) |
00:38:36 | * | bjz joined #nim |
00:44:02 | libman | New compiler from AMD is (like the one from Intel) sometimes faster than Clang or GCC. This is good for Nim compared to languages married to a single compiler backend. |
00:44:12 | libman | http://www.phoronix.com/scan.php?page=article&item=amd-ryzen-aocc |
00:44:54 | * | chemist69 joined #nim |
00:54:41 | * | yglukhov quit (Remote host closed the connection) |
00:57:41 | * | bjz_ joined #nim |
00:58:46 | * | bjz quit (Ping timeout: 246 seconds) |
01:00:52 | * | Ven joined #nim |
01:01:12 | * | Ven quit (Client Quit) |
01:01:32 | FromGitter | <zacharycarter> @stisa : http://imgur.com/a/6uG2A your webgl example one produced with frag |
01:01:56 | FromGitter | <zacharycarter> working on writing a webgl sprite batch now |
01:03:21 | * | yglukhov joined #nim |
01:03:26 | * | nsf quit (Quit: WeeChat 1.7.1) |
01:08:13 | * | yglukhov quit (Ping timeout: 272 seconds) |
01:43:55 | * | chemist69 quit (Ping timeout: 246 seconds) |
01:58:03 | * | chemist69 joined #nim |
02:16:29 | * | dddddd quit (Quit: Hasta otra..) |
02:17:03 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
03:05:47 | * | pilne quit (Quit: Quitting!) |
03:46:08 | * | chemist69 quit (Ping timeout: 240 seconds) |
03:48:47 | * | krux02 quit (Remote host closed the connection) |
03:50:41 | * | chemist69 joined #nim |
04:02:35 | * | bjz joined #nim |
04:15:50 | FromGitter | <mratsim> @libman interesting, benchmark choice is so-so though, they should use a benchmark where icc shines like OpenCV. |
04:51:59 | * | rauss joined #nim |
05:05:22 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
05:07:29 | * | bjz joined #nim |
05:26:13 | * | libman quit (Quit: Connection closed for inactivity) |
05:37:05 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
05:44:21 | * | kier quit (Quit: No Ping reply in 180 seconds.) |
05:49:45 | * | kier joined #nim |
05:50:46 | * | Tiberium joined #nim |
05:55:37 | * | yglukhov joined #nim |
05:59:36 | * | yglukhov quit (Ping timeout: 240 seconds) |
06:37:59 | * | bjz joined #nim |
06:54:47 | FromGitter | <mratsim> Regarding, inlining, proc, templates. Following the discussion in https://forum.nim-lang.org/t/879#5218 ⏎ "Use the least powerful construct that works, which means in this order: ⏎ procs ⏎ templates ⏎ macros” ... [https://gitter.im/nim-lang/Nim?at=591fe83700efc2bb3e871644] |
07:02:52 | FromGitter | <Varriount> @mratsim I was just about to talk to you. |
07:03:01 | FromGitter | <Varriount> For your refactored code, did you consider doing this: https://gist.github.com/Varriount/352df3399e13f889d989f620d16fa762 |
07:04:18 | FromGitter | <Varriount> Don't explicitly mark procedures as inline unless you are doing it for performance reasons. Use procedures rather than templates, because template overloading can be a bit finicky. |
07:05:19 | FromGitter | <mratsim> @Varriount: Actually yes, but I placed the parenthesis in the wrong place ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=591feaaf5e34568d5e7216ce] |
07:06:02 | FromGitter | <Varriount> I like boolean logic rather than inline if statements. |
07:07:20 | FromGitter | <mratsim> I wasn’t sure I wouldn’t get tripped by out of bounds exception |
07:08:11 | FromGitter | <Varriount> <3 short circuiting logic |
07:08:45 | FromGitter | <Varriount> @mratsim Have you taken a look at term-rewriting macros? |
07:09:10 | * | yglukhov joined #nim |
07:09:11 | FromGitter | <Varriount> https://nim-lang.org/docs/manual.html#term-rewriting-macros |
07:10:13 | FromGitter | <Varriount> You might petition Araq on instructions for modifying the compiler to expose a 'matchesAstPattern' procedures |
07:11:51 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
07:13:32 | * | yglukhov quit (Ping timeout: 260 seconds) |
07:15:18 | * | bjz joined #nim |
07:15:37 | FromGitter | <mratsim> I’ve looked into Term rewriting macros yes but to fuse operation like AX + B in a single optimized call. ⏎ For slicing I didn’t want to have side effects on a normal sequence slicing so I choose to directly manipulate the AST tree. It might be possible with TRM but since my code is working :P |
07:18:03 | FromGitter | <Varriount> Couldn't you use term-rewriting macros for all that desugering? |
07:22:16 | * | xet7 quit (Quit: Leaving) |
07:23:19 | * | xet7 joined #nim |
07:25:49 | FromGitter | <mratsim> Like I said, it might be possible, but I had 2 concerns, not impacting normal sequences, i.e. not rewriting seq[1..10] into seq[1..10|1] and second traversing the input as few times as possible. First concern is easy but for second concern it seemed easier to manipulate the AST tree. ⏎ And it’s obviously a good excuse to learn Nim AST manipulation ;) |
07:28:21 | FromGitter | <Varriount> True |
07:31:17 | FromGitter | <Varriount> @mratsim I'm working with a really nice data validation library at the moment |
07:31:28 | FromGitter | <Varriount> https://github.com/kolypto/py-good |
07:31:36 | FromGitter | <Varriount> I wonder if I could port it to Nim |
07:43:34 | FromGitter | <mratsim> @Varriount: interesting, what do you use it for? |
07:43:48 | FromGitter | <Varriount> Configuration normalization and validation |
07:44:51 | FromGitter | <Varriount> For things like JSON and YAML, I often prefer to give users as much freedom as possible (like accepting both a single values or a list of value for a given key) |
07:49:55 | FromGitter | <Varriount> @mratsim https://gist.github.com/Varriount/642802396582bee73c1065471d7b3e70 |
07:57:51 | FromGitter | <mratsim> I see, that is indeed very useful. |
08:06:48 | * | Matthias247 joined #nim |
08:08:21 | FromGitter | <Varriount> @mratsim Did you ever manage to get arrays to support heterogenous types? |
08:09:14 | FromGitter | <mratsim> I didn’t try and it’s not a target, but my ndarrays support objects |
08:09:39 | * | Trustable joined #nim |
08:09:51 | FromGitter | <mratsim> You can do arbitrary transformations with slicing and fmap |
08:11:56 | FromGitter | <mratsim> The heterogeneous issue I had 2 months ago was with Andrea’s lining. Creating a list of BackProp closures with Matrix[2,3] and Matrix[3,3] 2, and 3 being static int part of the type |
08:13:48 | FromGitter | <mratsim> That was one of the reason I started my own + I needed 4D and 5D arrays anyway for Deep Learning |
08:14:58 | FromGitter | <Varriount> I think linalg is more for game dev stuff |
08:16:04 | FromGitter | <mratsim> Actually no, andrea published Neurotic, and experimental neural net library using linalg: https://github.com/unicredit/neurotic It can do digit recognition |
08:17:54 | FromGitter | <Varriount> Huh. |
08:19:00 | FromGitter | <mratsim> In hindsight, after playing with PyTorch a lot (new framework from Facebook from Jan this year) I think closures are not the best way, I should probably use objects with `forward` and `backward` method/proc instead of `forward`procs that creates a seq of closure. |
08:23:09 | FromGitter | <mratsim> Or the new and shiny vtref |
08:26:09 | * | kunev quit (Ping timeout: 268 seconds) |
08:26:33 | FromGitter | <stisa> @Varriount in nimble there's both linalg ( fast linear algebra, BLAS etc, some cuda I think? ) and linagl (OpenGL Matrix stuff) |
08:26:38 | * | kunev joined #nim |
08:29:31 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
08:35:57 | * | tigerfinch joined #nim |
08:40:01 | Tiberium | ehm, what does it mean if I add "--gc:none" and my project compiles with many warnings "x uses GC'ed memory"? So does it remove a GC or not? |
08:41:36 | FromGitter | <Varriount> Tiberium: '--gc:none' removes the GC from the code. |
08:42:03 | Tiberium | oh I understand now :) |
08:42:10 | Tiberium | memory usage of my app is just growing |
08:42:20 | Tiberium | (because my app is made for usual nim - with gc) |
08:43:34 | * | kunev quit (Ping timeout: 246 seconds) |
08:45:08 | * | kunev joined #nim |
08:45:35 | * | tigerfinch quit (Ping timeout: 240 seconds) |
08:48:54 | * | bjz joined #nim |
08:58:23 | * | couven92 joined #nim |
09:01:28 | * | Tiberium quit (Ping timeout: 260 seconds) |
09:03:27 | * | Tiberium joined #nim |
09:09:19 | * | Tiberium quit (Remote host closed the connection) |
09:09:36 | * | kunev quit (Ping timeout: 240 seconds) |
09:11:09 | * | kunev joined #nim |
09:11:29 | * | Arrrr joined #nim |
09:11:29 | * | Arrrr quit (Changing host) |
09:11:29 | * | Arrrr joined #nim |
09:14:00 | Arrrr | https://github.com/nim-lang/Nim/pull/5852/files I think everyone will look at it as a misspelled `if`. I would replace it with `if and only if` |
09:17:20 | * | tigerfinch joined #nim |
09:19:55 | * | zidsal joined #nim |
09:20:06 | zidsal | hi there |
09:20:15 | * | Tiberium joined #nim |
09:20:56 | * | bjz quit (Ping timeout: 272 seconds) |
09:27:59 | * | bjz joined #nim |
09:32:23 | * | yglukhov joined #nim |
09:32:31 | * | yglukhov quit (Remote host closed the connection) |
09:32:55 | * | chemist69 quit (Ping timeout: 246 seconds) |
09:37:33 | * | yglukhov joined #nim |
09:39:56 | * | couven92 quit (Ping timeout: 272 seconds) |
09:41:01 | * | yglukhov quit (Remote host closed the connection) |
09:51:37 | * | chemist69 joined #nim |
09:53:04 | FromGitter | <Varriount> hello! |
10:07:44 | * | vlad1777d joined #nim |
10:34:30 | FromGitter | <cooldome> Guys, i am trying to debug typerel from the sigmatch in the compiler. The problem I am facing that too much goes this function, I trying to find a way to filter only type relations from my test file and every type pair. With NimNode you can use info field to filter but types don't have it. Any ideas? |
10:37:52 | * | Ven joined #nim |
10:38:16 | * | Ven is now known as Guest55917 |
10:39:43 | Tiberium | lol, rust has 1.17.0 version (released in april) |
10:44:02 | * | zidsal quit (Remote host closed the connection) |
10:44:53 | * | nsf joined #nim |
10:46:07 | FromGitter | <ephja> :o |
10:46:30 | * | zidsal joined #nim |
10:47:16 | * | Guest55917 quit (Ping timeout: 260 seconds) |
10:47:51 | * | Ven_ joined #nim |
10:52:22 | * | Ven_ quit (Ping timeout: 246 seconds) |
10:54:06 | * | Ven_ joined #nim |
10:59:05 | * | Ven_ quit (Ping timeout: 268 seconds) |
11:01:02 | * | Ven_ joined #nim |
11:03:29 | * | Snircle joined #nim |
11:05:40 | * | Ven_ quit (Ping timeout: 246 seconds) |
11:07:21 | * | Ven_ joined #nim |
11:14:33 | FromGitter | <mratsim> I’m happy I’m not coding in Rust anymore. Looking at a (well coded) library, I see things like this: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Can you count how many `unwrap`there is? [https://gitter.im/nim-lang/Nim?at=59202519eec422e415cf73ed] |
11:16:00 | * | planhths joined #nim |
11:17:46 | Arrrr | That's sick. |
11:17:58 | Arrrr | Maybe is not that well coded |
11:18:36 | FromGitter | <zacharycarter> that looks like a test |
11:18:48 | FromGitter | <zacharycarter> or an example or something |
11:19:07 | FromGitter | <zacharycarter> still it doesn't defeat the point that Rust has syntax problems |
11:20:03 | * | Ven_ quit (Ping timeout: 268 seconds) |
11:20:13 | FromGitter | <mratsim> It’s an example in the README for https://github.com/autumnai/collenchyma. It was a machine learning library that was faster or at least as fast as Facebook’s and Google's back in 2016. (They stopped working on it though) |
11:21:29 | * | Ven_ joined #nim |
11:21:33 | FromGitter | <zacharycarter> it's more than a syntax issue it's a verbosity issue, Rust stumbles in a number of areas IMO. The lifecycle feature is difficult to grasp / get right, it's too verbose, syntax is ugly. |
11:21:39 | FromGitter | <mratsim> The `unwrap` is because everything is wrapped in an Option type that can have either Nothing or an actual value. I guess this is one way to avoid null pointers but the boiler plate ... |
11:21:58 | FromGitter | <zacharycarter> yes |
11:22:31 | * | dddddd joined #nim |
11:22:37 | FromGitter | <zacharycarter> I considered Rust for a moment, went through a few OpenGL tutorials, looked at gfx-rs and then came here |
11:22:53 | FromGitter | <mratsim> I’m not even talking about all the sigils `::` `<Vec<f32>>`… I have cognitive overload |
11:23:05 | FromGitter | <zacharycarter> :P |
11:23:51 | FromGitter | <zacharycarter> it is a prime example of how ugly the language can be |
11:24:06 | FromGitter | <ephja> yeah ownership semantics etc seems too verbose for such tasks |
11:24:12 | FromGitter | <mratsim> I wrote a go bot in Rust last year but the way arrays works in Rust is just crazy. Beyong 32 elements in your array you are on your own. You have to implement Copy, Clone, Display, everything ... |
11:24:23 | FromGitter | <zacharycarter> what? |
11:24:32 | FromGitter | <zacharycarter> that doesn't seem right |
11:24:34 | FromGitter | <mratsim> My full rant with details: https://andre-ratsimbazafy.com/why-rust-fails-hard-at-scientific-computing/ |
11:24:56 | FromGitter | <mratsim> https://andre-ratsimbazafy.com/wp-content/uploads/2017/04/2017-04-01_15-31-14.png |
11:24:59 | * | couven92 joined #nim |
11:25:46 | FromGitter | <zacharycarter> wow |
11:26:06 | * | Ven_ quit (Ping timeout: 240 seconds) |
11:26:17 | FromGitter | <mratsim> Rust still (?) doesn’t have generics with integer parameters so that’s how they implement Arrays in the official repo: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=592027d9fa63ba2f766010dd] |
11:27:15 | FromGitter | <ephja> hmm |
11:28:25 | FromGitter | <mratsim> Sorry edited, pasted the code twice |
11:30:43 | FromGitter | <zacharycarter> I remember when i used to write a bit of JS and I loved browserify |
11:30:58 | FromGitter | <zacharycarter> now I'm not so sure |
11:33:59 | FromGitter | <zacharycarter> I'd like to leverage some modules in http://stack.gl/ |
11:34:26 | FromGitter | <zacharycarter> and I've successfully gotten some modules to import but getting them to actually work is another bear all together |
11:34:27 | * | zidsal quit (Quit: Leaving) |
11:42:37 | FromGitter | <dom96> @mratsim nice, post it to Reddit/HN :) |
11:43:12 | FromGitter | <mratsim> If I post that to HN people will say I’m a Nim troll :D |
11:58:22 | * | nsf quit (Quit: WeeChat 1.7.1) |
12:00:21 | FromGitter | <zacharycarter> @dom96: any idea how you'd bind to something like this - |
12:00:29 | * | Ven joined #nim |
12:00:31 | FromGitter | <zacharycarter> https://github.com/mattdesl/gl-shader-core#api |
12:00:52 | * | Ven is now known as Guest16010 |
12:00:59 | FromGitter | <zacharycarter> it's the extra parameters I have no idea how to pass |
12:01:36 | FromGitter | <TiberiumN> maybe "from x import y"? but I don't know :) |
12:02:12 | FromGitter | <zacharycarter> hrm well here's what I have so far |
12:02:25 | FromGitter | <zacharycarter> proc require(moduleName: string): JsObject {.importcpp: "require(@)".} |
12:02:34 | FromGitter | <zacharycarter> which works if there are no extra args |
12:05:21 | * | BennyElg quit (Ping timeout: 245 seconds) |
12:06:07 | FromGitter | <dom96> Overloading maybe? |
12:06:21 | FromGitter | <dom96> On phone now so can't help much |
12:08:14 | FromGitter | <zacharycarter> okay thanks |
12:08:18 | FromGitter | <zacharycarter> I'll give that a shot |
12:14:05 | * | Guest16010 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:30:43 | * | nsf joined #nim |
12:40:42 | FromGitter | <mratsim> Got an issue in a macro: ⏎ ⏎ Trying to typematch `foo[1,3] = 999` ⏎ ⏎ This works ... [https://gitter.im/nim-lang/Nim?at=5920394a00efc2bb3e8824ce] |
12:46:12 | * | BennyElg joined #nim |
12:47:57 | FromGitter | <cooldome> varargs[untyped] consumes all inputs including last one |
12:51:34 | FromGitter | <ephja> try an openarray instead |
12:51:41 | FromGitter | <mratsim> Actually it works now I messed up the order of my args inside the macro, and the error message didn’t match with that |
12:52:20 | FromGitter | <mratsim> argh no forget it I was still testing with varargs[int] |
12:54:17 | FromGitter | <ephja> val=999? |
12:54:46 | FromGitter | <ephja> I wonder if it works, but it might be confusing in any case |
12:54:47 | FromGitter | <mratsim> I really need a varargs though, foo[@[1,3]] = 999 isn’t nice. val = 999 is just for testing |
12:55:35 | FromGitter | <cooldome> I don't have a better idea then macro `[]=`*B, T (t: var Tensor[B,T], args: varargs[untyped]) |
12:56:48 | FromGitter | <cooldome> then unpack last argument manually and check it's type is T |
12:57:02 | FromGitter | <mratsim> yes that’s what I will do |
12:57:07 | FromGitter | <ephja> oh right, can't do val=999 with that syntax. perhaps that signature could be allowed as a special case for those operators |
12:57:38 | FromGitter | <ephja> and it might be unnecessary to pass in a sequence rather than an array |
12:57:39 | FromGitter | <mratsim> I’ll post a feature request |
13:03:28 | * | BennyElg_ joined #nim |
13:03:35 | * | BennyElg quit (Ping timeout: 240 seconds) |
13:04:27 | * | planhths quit (Ping timeout: 240 seconds) |
13:05:59 | * | Ven joined #nim |
13:06:22 | * | Ven is now known as Guest87036 |
13:07:05 | * | skrylar joined #nim |
13:09:03 | FromGitter | <cooldome> that would be a useful feature |
13:09:16 | * | skrylar splashes water and arrives |
13:10:48 | enthus1ast | have you ever iterate a (Ordered) table in reverse order? |
13:11:19 | enthus1ast | tables does not seem to be able to do it |
13:18:17 | FromGitter | <cooldome> Guys, did anyone tried or have seen a library in Nim that implements physics units of measurements. The idea is quite old, to use `distinct float` to represents things like velocity, acceleration, force and make sure at compile time that things that make sense only composable? So you can some force with velocity and you can't mess up the calculation. Ideally support differentiating, types like dt. |
13:18:52 | skrylar | i am not aware of that but it could probably be done |
13:19:07 | skrylar | well.. automatic differential stuff might be harder |
13:20:31 | FromGitter | <Varriount> @mratsim If you're really brave, submit your post to reddit and hacker news |
13:22:18 | FromGitter | <mratsim> @Varriount, lol, I don’t have a HN account so feel free ;) |
13:22:39 | FromGitter | <mratsim> Issue posted for the varargs[untyped] - https://github.com/nim-lang/Nim/issues/5855 |
13:23:48 | FromGitter | <mratsim> @skrylar I wrote an autodifferentiation library, it only works for scalars for now but you might be able to retrofit it (or ideas) for your need: https://github.com/mratsim/nim-rmad |
13:27:02 | FromGitter | <cooldome> nim-rmad looks somewhat relevant, will have a look |
13:28:32 | FromGitter | <stisa> @zacharycarter just seen you got webgl to draw something, nice! Do you have a repo/branch I can look at? |
13:29:03 | FromGitter | <zacharycarter> @stisa one sec |
13:29:17 | FromGitter | <zacharycarter> http://imgur.com/a/jAO74 |
13:29:35 | FromGitter | <zacharycarter> I'm kind of doing some crazy stuff @stisa - I'm only barely using your webgl wrapper now |
13:29:50 | FromGitter | <zacharycarter> most of the heavy lifting of the drawing is done by a sprite batch module I'm wrapping using requirejs |
13:30:46 | * | bjz_ joined #nim |
13:31:37 | * | bjz quit (Ping timeout: 246 seconds) |
13:33:39 | * | Trioxin quit (Ping timeout: 272 seconds) |
13:33:43 | FromGitter | <zacharycarter> @stisa I'm going to do a bit more work on this branch and then I'll commit it |
13:36:54 | FromGitter | <stisa> oh interesting,I'll wait for it then. I just finished building bgfx, I hope I got it right |
13:37:03 | FromGitter | <ephja> @cooldome it does? |
13:37:11 | FromGitter | <ephja> https://github.com/def-/nim-units |
13:37:31 | FromGitter | <ephja> it did not compile a couple of months ago. the error message was confusing |
13:39:19 | FromGitter | <ephja> apparently the samples at the bottom do compile now. great! |
13:41:23 | * | pilne joined #nim |
13:43:39 | FromGitter | <zacharycarter> @stisa I'm sure you did and if not it's easy to remedy |
13:44:01 | FromGitter | <zacharycarter> going to take a break for a bit, be back in a few |
13:48:12 | skrylar | i think my power cable died. hmm |
13:49:07 | skrylar | oh good it didn't |
13:49:29 | * | krux02 joined #nim |
13:50:16 | * | Vladar joined #nim |
13:51:33 | FromGitter | <Varriount> @zacharycarter What's requirejs? |
13:53:01 | FromGitter | <cooldome> Wow, nim-utils really cool |
13:53:30 | FromGitter | <cooldome> Oops, I meant nim-units |
13:53:59 | FromGitter | <cooldome> thanks ephja |
14:01:50 | FromGitter | <zacharycarter> @Varriount I'm not using requirejs I'm using browserify but requirejs is a way to load javascript modules |
14:02:12 | FromGitter | <zacharycarter> browserify lets you create node modules and require them in the browser |
14:02:13 | FromGitter | <Varriount> Ah, it's like webpack |
14:02:20 | FromGitter | <zacharycarter> similar yes |
14:04:50 | FromGitter | <zacharycarter> I'd say webpack is better but this framework uses browserify / gulp so I'm at it's mercy |
14:07:46 | Tiberium | zacharycarter: did you found a solution to your require problem? |
14:07:57 | Tiberium | because you can just emit JS code AFAIK |
14:09:01 | FromGitter | <zacharycarter> I did |
14:09:38 | FromGitter | <zacharycarter> thank you for asking though |
14:09:42 | FromGitter | <zacharycarter> I didn't have to resort to that |
14:15:06 | * | tigerfinch quit (Quit: Leaving.) |
14:30:01 | FromGitter | <zacharycarter> @stisa I just pushed up the html5 branchhttps://github.com/fragworks/frag/tree/html5 |
14:31:40 | FromGitter | <mratsim> There is no proc in the standard lib that creates a closure iterator from an openarray right? |
14:35:32 | * | skrylar quit (Ping timeout: 268 seconds) |
14:38:28 | * | Arrrr quit (Ping timeout: 240 seconds) |
14:38:46 | FromGitter | <Varriount> Not that I can recall |
14:41:02 | * | skrylar joined #nim |
14:42:21 | FromGitter | <mratsim> okay |
14:50:52 | * | benoliver999 quit (Ping timeout: 260 seconds) |
14:52:22 | FromGitter | <mratsim> build mine, but I get illegal capture when I try to use it so that may be why it doesn’t exist. |
14:52:51 | * | Matthias247 quit (Read error: Connection reset by peer) |
14:53:27 | * | skrylar quit (Ping timeout: 272 seconds) |
15:10:04 | * | Guest87036 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:15:21 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
15:26:17 | * | nsf quit (Quit: WeeChat 1.7.1) |
15:27:58 | * | jsgrant_ joined #nim |
15:31:15 | FromGitter | <mratsim> Finished slice assignments with syntactic sugar and arbitrary steps: http://img.ctrlv.in/img/17/05/20/5920611548d00.png |
15:38:21 | * | bjz joined #nim |
15:44:52 | * | adeohluwa joined #nim |
15:46:04 | FromGitter | <Varriount> @mratsim You can't capture openarrays, as they might be located on the stack |
15:48:10 | * | skrylar joined #nim |
15:50:20 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
15:55:58 | * | Arrrr joined #nim |
15:55:58 | * | Arrrr quit (Changing host) |
15:55:58 | * | Arrrr joined #nim |
15:59:19 | * | Trioxin joined #nim |
16:09:06 | * | Tiberium quit (Remote host closed the connection) |
16:15:47 | Arrrr | https://github.com/nim-lang/Nim/issues/5827 +1 |
16:23:33 | * | Trustable quit (Read error: Connection reset by peer) |
16:32:52 | * | JHonaker joined #nim |
16:33:34 | JHonaker | Is there any way to use a tuple as the arguments to a function call? |
16:33:44 | couven92 | yup |
16:33:59 | JHonaker | do tell |
16:34:06 | couven92 | exactly as you would with a regular argument |
16:34:24 | couven92 | proc foo(t: tuple[f1, f2: int]) |
16:34:37 | JHonaker | Ah, not what I meant |
16:34:50 | JHonaker | say I have proc(r, g, b: int) |
16:35:03 | JHonaker | and I have a tuple, (r, g, b: int) |
16:35:21 | JHonaker | can I say thatproc(thattuple) |
16:35:27 | JHonaker | or something similar |
16:35:32 | couven92 | ah, deconstruct the tuple into three variables and use them as arguments |
16:35:35 | JHonaker | Yea |
16:35:52 | couven92 | I don't think you can auto-deconstruct a tuple in a call... |
16:36:24 | JHonaker | That's disappointing |
16:36:43 | JHonaker | I guess I can do it with a template |
16:36:49 | couven92 | yup |
16:37:12 | JHonaker | Err, would it have to be a macro |
16:37:35 | couven92 | nope, a template should do fine |
16:40:13 | FromGitter | <mratsim> (a,b,c) = tuple ⏎ proc(a,b,c) |
16:40:31 | FromGitter | <mratsim> with a let of course |
16:41:31 | couven92 | @mratsim, I think he wanted to deconstruct the tuple in the argument side of the proc call, not on the return side |
16:41:56 | * | Tiberium joined #nim |
16:43:20 | FromGitter | <mratsim> Yeah, I understand, a,b,c are argument here ;) |
16:49:03 | JHonaker | Yea, I wanted to unpack the tuple as the arguments |
16:51:55 | * | nsf joined #nim |
16:57:50 | * | fredrik92 joined #nim |
16:58:12 | * | couven92 quit (Disconnected by services) |
16:58:19 | * | fredrik92 is now known as couven92 |
17:09:36 | * | skrylar quit (Ping timeout: 240 seconds) |
17:32:08 | * | yglukhov joined #nim |
17:36:28 | * | yglukhov quit (Ping timeout: 240 seconds) |
17:55:46 | mindB | Hey everyone. Just starting trying to learn nim. Anyone have a slackbuild for Nim or other advice on getting Nim installed on slackware? |
17:56:58 | couven92 | mindB, what's slackware? (That's a no btw :P ) |
17:57:18 | dom96 | mindB: You might wanna try choosenim https://github.com/dom96/choosenim#installation |
17:58:47 | * | Matthias247 joined #nim |
18:01:24 | * | libman joined #nim |
18:03:52 | Tiberium | mindB, nim is actually changing very fast at the moment, so you would like to stay at devel and update every few days :) you can do that via choosenim that dom96 suggested |
18:07:54 | mindB | Will check choosenim out. Sounds better than my current solution of just adding things to my PATH manually anyway. |
18:09:29 | mindB | Most of the articles I've seen on nim are from several years ago. Interesting to hear that things are still fairly unstable; is the language not nearing a 1.0.0 release? |
18:10:21 | mindB | (though I guess Rust isn't really stable yet either, so I shouldn't be too surprised.) |
18:15:16 | * | skrylar joined #nim |
18:24:31 | * | nsf quit (Quit: WeeChat 1.7.1) |
18:28:19 | * | skrylar quit (Ping timeout: 246 seconds) |
18:28:33 | FromGitter | <zacharycarter> @stisa I think I'm going to have to scrap the html5 backend - it was a fun experiment but I don't think I'll be able to make it very usable without having a totally different API from the desktop |
18:28:41 | FromGitter | <mratsim> In my newbie experience, I find Nim stable enough but rough on the edges, edges being static parameters, generics. Can’t comment on multiprocessing as I only used `||` but I think it’s rough as well. |
18:36:47 | * | skrylar joined #nim |
18:36:58 | FromGitter | <zacharycarter> maybe I keep it and just say that you can't use this functionality with it - |
18:41:12 | * | vlad1777d_ joined #nim |
18:42:08 | * | vlad1777d quit (Ping timeout: 240 seconds) |
18:49:47 | * | Jesin quit (Quit: Leaving) |
18:55:42 | * | Jesin joined #nim |
18:58:53 | * | vlad1777d__ joined #nim |
18:59:27 | * | vlad1777d_ quit (Ping timeout: 240 seconds) |
19:01:26 | * | tigerfinch joined #nim |
19:01:54 | * | tigerfinch quit (Remote host closed the connection) |
19:10:25 | * | skrylar quit (Quit: Leaving) |
19:11:27 | JHonaker | How do I create a new object that is of type World[N] = array[N, bool]? |
19:11:37 | JHonaker | I'm not quite sure how new works |
19:12:13 | JHonaker | say I'm wanting to make a proc newWorld(n: int): World[n]? |
19:12:32 | JHonaker | Is that even possible? Using the n in an argument and as the generic types return type? |
19:15:33 | def- | JHonaker: well, if n is determined at runtime, then how can the compiler know what it will be? |
19:15:58 | Tiberium | JHonaker, you can create arrays only with length known at compile time |
19:17:03 | Tiberium | JHonaker, if you want something like arrays but with dynamic creating at runtime - use sequences |
19:18:16 | * | Tiberium quit (Remote host closed the connection) |
19:20:48 | def- | JHonaker: but wit works if N is known at compiletime |
19:20:51 | def- | proc newWorld(N: static[int]): World[N] = discard |
19:22:58 | JHonaker | Ah, that makes sense |
19:23:36 | JHonaker | I keep trying to make arrays fit work, instead of just using seqs |
19:24:02 | def- | careful with arrays though or you copy around large structures |
19:24:08 | JHonaker | I didn't think about needing to know at compile time for type, which makes total sense. Thanks Tiberium, def- |
19:24:57 | JHonaker | Yea, I'm making an implementation of Wireworld (a cellular automata) |
19:25:16 | JHonaker | Only one array in the whole program, minus the copy I have to make for updating each cycle |
19:25:31 | def- | sounds more like a seq to me for the World |
19:25:42 | def- | since you might want the user to change the size of the world without recompiling |
19:26:34 | JHonaker | I wasn't going to make it resizable ^_^ |
19:26:45 | JHonaker | But that's a good point I'll keep in mind for the future |
19:28:36 | * | JHonaker quit (Remote host closed the connection) |
19:30:48 | * | Arrrr quit (Read error: Connection reset by peer) |
19:39:27 | * | gangstacat quit (Quit: Ĝis!) |
19:42:20 | * | rosshadden quit (Quit: WeeChat 1.7) |
19:46:15 | * | yglukhov joined #nim |
19:54:07 | * | gangstacat joined #nim |
20:15:56 | libman | http://excel.fit.vutbr.cz/submissions/2017/018/18.pdf - This paper mentions Nim but not enough. |
20:29:07 | SusWombat | libman, its about their own language why should they focus on a different one more? |
20:29:12 | * | Sentreen quit (Ping timeout: 260 seconds) |
20:31:56 | libman | Not a big deal. It references "D programming language, c1999-2017" and "Nim programming language, c2015". |
20:34:13 | * | yglukhov quit (Remote host closed the connection) |
20:35:40 | libman | Weird how D gets a year range from when it was first conceived (and wasn't released until two years later) to the present. |
20:43:04 | * | Sentreen joined #nim |
20:48:10 | * | Matthias247 quit (Read error: Connection reset by peer) |
20:56:28 | couven92 | Me and PMunch have actually tried to spread the word more and more at the Computer Science department... We're planning on doing a workshop/presentation with Nim next semester :) |
20:57:15 | * | yglukhov joined #nim |
20:59:05 | couven92 | But IMHO Nim deserves much more attention than it currently gets, it's a real awesome language! :) |
21:05:15 | * | jsgrant_ quit (Read error: Connection reset by peer) |
21:34:46 | * | yglukhov quit (Remote host closed the connection) |
21:38:10 | * | krux02 quit (Remote host closed the connection) |
21:38:26 | * | krux02 joined #nim |
21:38:55 | krux02 | is there interest to remove stmt and expr from the standard library? |
21:39:30 | couven92 | they are deprecated, aren't they? |
21:41:19 | * | Trioxin quit (Ping timeout: 272 seconds) |
21:49:37 | * | Vladar quit (Remote host closed the connection) |
21:50:10 | krux02 | yes they are deprecated sice 0.15 |
21:50:41 | krux02 | well I removed all occurences of them and wanted to do a pull request |
21:50:52 | krux02 | problem I did a wrong git command and everything is gone |
21:51:07 | couven92 | ah... my guess is that is wouldn't hurt :P |
21:52:43 | * | bjz joined #nim |
22:01:03 | * | BennyElg joined #nim |
22:02:04 | * | BennyElg_ quit (Ping timeout: 260 seconds) |
22:34:37 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
22:36:26 | krux02 | well fixing all those use cases I see inconsistencies in the typed untyped stuff |
22:36:36 | krux02 | generally for macros it's weird |
22:37:15 | krux02 | this typed/untyped for return values of macros/templates doesn't make a lot of sense |
22:39:22 | * | Kingsquee joined #nim |
22:42:29 | krux02 | the test case tusingstatement doesn't pass when I port it to untyped/typed |
22:47:01 | * | libman quit (Quit: Connection closed for inactivity) |
23:04:32 | * | Ven joined #nim |
23:04:57 | * | Ven is now known as Guest81488 |
23:12:20 | * | BennyElg_ joined #nim |
23:12:27 | * | BennyElg quit (Ping timeout: 240 seconds) |
23:38:40 | krux02 | well I made the pull request |
23:38:48 | krux02 | I know there is a test that won't pass |
23:38:56 | krux02 | it is basically I bug that I detected. |
23:39:40 | krux02 | something that did work with the old syntax, but not with the new syntax |
23:51:43 | * | chemist69 quit (Ping timeout: 246 seconds) |
23:55:24 | * | bjz_ joined #nim |
23:56:22 | * | bjz quit (Ping timeout: 246 seconds) |