00:01:18 | FromGitter | <rayman22201> lol. sure. |
00:01:42 | FromGitter | <rayman22201> ok. I have to take off. ttyl everyone. |
00:05:30 | * | kapil____ joined #nim |
00:05:54 | * | vlad1777d quit (Remote host closed the connection) |
00:06:46 | * | vlad1777d joined #nim |
00:08:37 | * | vlad1777d quit (Remote host closed the connection) |
00:09:28 | * | vlad1777d joined #nim |
00:11:44 | * | auxym` joined #nim |
00:12:27 | * | gmpreussner_ joined #nim |
00:14:13 | * | bozaloshtsh_ joined #nim |
00:16:30 | * | zama_ joined #nim |
00:18:28 | * | gmpreussner quit (Ping timeout: 240 seconds) |
00:18:28 | * | bozaloshtsh quit (Ping timeout: 240 seconds) |
00:18:28 | * | gsingh93 quit (Ping timeout: 240 seconds) |
00:18:28 | * | AlexMax quit (Ping timeout: 240 seconds) |
00:18:28 | * | fthe quit (Ping timeout: 240 seconds) |
00:18:28 | * | xet7 quit (Ping timeout: 240 seconds) |
00:18:29 | * | zama quit (Ping timeout: 240 seconds) |
00:19:00 | * | AlexMax joined #nim |
00:19:05 | * | gsingh93 joined #nim |
00:19:44 | * | xet7 joined #nim |
00:21:05 | * | zama_ quit (Changing host) |
00:21:05 | * | zama_ joined #nim |
00:21:07 | * | zama_ is now known as zama |
01:14:01 | FromGitter | <dom96> @mratsim Nim is also the core of your product, are yoi going to create nim2 as well? ;P |
01:53:03 | * | auxym` quit (Ping timeout: 246 seconds) |
02:03:45 | * | endragor joined #nim |
02:07:47 | * | endragor quit (Ping timeout: 240 seconds) |
02:17:31 | * | auxym` joined #nim |
02:18:07 | * | ng0 quit (Ping timeout: 256 seconds) |
02:32:56 | * | auxym` quit (Ping timeout: 246 seconds) |
02:41:08 | FromGitter | <citycide> @dom96 *mic drop* |
02:49:23 | * | dddddd quit (Remote host closed the connection) |
02:56:12 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
03:04:15 | * | thomasross joined #nim |
03:07:43 | * | banc quit (Quit: Bye) |
03:17:24 | * | theelous3_ quit (Ping timeout: 250 seconds) |
03:23:49 | * | banc joined #nim |
03:30:57 | * | Tyresc quit (Quit: WeeChat 2.3-dev) |
04:16:07 | * | vlad1777d quit (Remote host closed the connection) |
04:16:55 | * | vlad1777d joined #nim |
04:43:25 | * | narimiran joined #nim |
04:54:23 | * | nsf joined #nim |
05:10:56 | * | vlad1777d quit (Ping timeout: 250 seconds) |
05:19:54 | * | nsf quit (Quit: WeeChat 2.3) |
05:24:13 | * | nsf joined #nim |
05:37:29 | * | martin1_ joined #nim |
06:00:07 | * | vlad1777d joined #nim |
06:16:22 | * | vlad1777d quit (Ping timeout: 250 seconds) |
06:22:25 | * | anamok joined #nim |
06:22:26 | anamok | hi |
06:23:59 | anamok | I would like something like this: http://ix.io/1vvk/nim . That is, I need a function that yields a value on each call. Here I get an error. I guess because I don't use the iterator in a loop. |
06:24:41 | anamok | Can it be done somehow? |
06:25:13 | narimiran | anamok: make main an iterator? |
06:25:56 | anamok | Call `read()` several times and it yields a value. |
06:28:38 | anamok | In Python it's possible. There it's called a generator function. |
06:31:17 | anamok | Here is a Python example: http://ix.io/1vvo/python . I would need it in Nim too. |
06:34:27 | * | martin1_ quit (Ping timeout: 240 seconds) |
06:55:00 | FromDiscord_ | <technicallyagd> You need to use {.closure.} |
06:56:11 | narimiran | anamok: https://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-first-class-iterators |
06:56:33 | FromDiscord_ | <technicallyagd> https://gist.github.com/technicallyagd/743ba344d185f168b932962309f3b919 |
06:57:00 | FromDiscord_ | <technicallyagd> @anamok Modified your first code to work |
06:57:36 | FromDiscord_ | <technicallyagd> It doesn't work in js backend though if I read the manual correctly |
06:59:06 | FromDiscord_ | <technicallyagd> I just released `unpack` v0.3.0 https://github.com/technicallyagd/unpack |
06:59:40 | FromDiscord_ | <technicallyagd> Adds rest operator support. |
07:00:19 | narimiran | uuuu, niiiceee |
07:01:19 | FromDiscord_ | <technicallyagd> haha, didn't know I would need to implement this so soon. |
07:01:24 | anamok | technicallyagd: Thanks! Modified your code to my need: http://ix.io/1vvt/nim |
07:01:36 | narimiran | i don't use JS, so `{job: someJob, name: otherName}` is backwards to me. maybe some other (clearer) syntax can be used? |
07:01:52 | FromDiscord_ | <technicallyagd> @anamok sounds good! glad it works. |
07:01:58 | FromDiscord_ | <technicallyagd> @narimiran any suggestion? |
07:02:05 | anamok | thnaks guys, problem solved |
07:02:35 | narimiran | i need to have a breakfast before making any meaningful suggestions :) but i'll think about it |
07:03:52 | FromDiscord_ | <technicallyagd> lol, nice, I am not attached to any particular syntax, so any idea is welcome đ |
07:04:36 | FromDiscord_ | <technicallyagd> as long as it is allowed by the compiler that is. |
07:07:10 | shashlick | https://github.com/nim-lang/Nim/issues/9893 - if anyone has any clues, will greatly appreciate it |
07:20:43 | narimiran | @technicallyagd i thing even `->` would be better/clearer (`job -> someJob`) than the current syntax. maybe use `@` like gara does? |
07:51:19 | anamok | technicallyagd: I have another question, please see http://ix.io/1vvv/nim . How can I pass an argument to the closure iterator? Here, with `read()` calls I want to go through the seq `ages`. |
07:52:53 | * | awal quit (Quit: ZNC 1.6.4 - http://znc.in) |
07:54:47 | FromDiscord_ | <technicallyagd> @narimiran but `->` is two key strokes though lol. I will take a look at `@` later. |
07:55:57 | narimiran | how many strokes is "open my browser, go to `unpack` documentation, `ctrl+f {`, ah that's the correct syntax"? ;) |
07:58:22 | FromDiscord_ | <technicallyagd> haha i see |
07:58:28 | FromDiscord_ | <technicallyagd> that's valid point |
08:03:14 | FromDiscord_ | <technicallyagd> @anamok https://gist.github.com/technicallyagd/3385f63ae7df889184457d46164f16cf here you go |
08:03:42 | FromDiscord_ | <technicallyagd> you can take a look at the manual https://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-first-class-iterators |
08:04:04 | anamok | thanks a lot |
08:04:44 | FromDiscord_ | <technicallyagd> np |
08:23:45 | Araq | does anybody remember the syntax to pass a filelist.txt file to the linker? |
08:25:33 | FromDiscord_ | <technicallyagd> @araq not me |
08:26:14 | FromDiscord_ | <technicallyagd> @narimiran would `{job as newJob, name} <- tim` be a bad idea? |
08:27:07 | Araq | https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html it's @file |
08:27:18 | narimiran | @technicallyagd it would be much better and clearer than it is now. `as` syntax should be familiar to people and there's no ambiguity what is what |
08:27:21 | FromDiscord_ | <technicallyagd> @narimiran I think it's the clearest syntax, but I am not sure if it will collide with any other popular package. |
08:29:08 | Araq | yay, all 3 big compilers support this syntax on Windows, excellent |
08:50:29 | * | dddddd joined #nim |
09:38:04 | * | stefanos82 joined #nim |
09:40:31 | * | Trustable joined #nim |
10:00:58 | * | vlad1777d joined #nim |
10:02:08 | narimiran | there's a discussion about @xmonader's article on r/programming. anybody wants to guess what the top comment is about? |
10:07:35 | FromGitter | <mratsim> case insensitivity? |
10:08:16 | narimiran | well how did you manage to guess it, wow :P |
10:11:01 | FromGitter | <mratsim> Iâve been here for a long enough time :P |
10:13:24 | * | kapil____ quit (Quit: Connection closed for inactivity) |
10:27:15 | * | martin1_ joined #nim |
10:31:57 | * | martin1_ quit (Ping timeout: 244 seconds) |
10:46:44 | * | seni joined #nim |
10:49:19 | FromGitter | <Varriount> People always complain about the case rules without giving them a chance. I've never had the rules bite me. |
10:52:26 | FromGitter | <mratsim> I think some had issues with sdl_quit vs SDL_quit but thatâs poorly named API. |
11:02:21 | * | auxym` joined #nim |
11:02:59 | * | auxym` quit (Remote host closed the connection) |
11:21:54 | * | dddddd quit (Remote host closed the connection) |
11:24:04 | * | endragor joined #nim |
11:24:53 | * | endragor quit (Remote host closed the connection) |
11:27:08 | * | endragor joined #nim |
11:35:38 | Zevv | I considered complaining, but after getting started with the language kind of forget doing that |
11:36:37 | Zevv | I am not case agnostig, never saw that coming |
11:36:44 | Zevv | /agnostic/ |
11:38:16 | FromGitter | <alehander42> well, I think the main thing is that people expect nothing stops you from mixing styles |
11:38:54 | FromGitter | <alehander42> if we always give examples that you actually shouldn't be able to mix styles in the same codebase it wouldn't be so problematic |
11:43:52 | * | theelous3_ joined #nim |
11:44:13 | * | nsf quit (Quit: WeeChat 2.3) |
11:45:06 | * | endragor_ joined #nim |
11:46:51 | * | martin1_ joined #nim |
11:48:07 | * | endragor quit (Ping timeout: 240 seconds) |
11:50:32 | * | endragor_ quit (Remote host closed the connection) |
11:53:23 | * | PMunch joined #nim |
11:57:38 | * | anamok quit (Remote host closed the connection) |
12:02:11 | * | martin1_ quit (Ping timeout: 268 seconds) |
12:05:43 | FromGitter | <alehander42> ah for the first time i built a parser generator in nim that actually works |
12:05:46 | FromGitter | <alehander42> kinda*** |
12:22:07 | FromGitter | <zacharycarter> anyone have any experience with - https://icculus.org/physfs/ - or see a benefit to using it? |
12:22:16 | FromGitter | <zacharycarter> over just like - having someone run your binary from a specific directory? |
12:27:51 | PMunch | Well, as he says it contains all write operations to that one directory |
12:28:09 | PMunch | So if you have mods or a scripting interface in a game it can't write outside of that directory |
12:28:30 | PMunch | As long as they can only write files through that API |
12:29:39 | PMunch | Plus the zip -> folder abstraction is pretty neat |
12:30:08 | PMunch | So each mod for example could be it's own zip file, but all their data could be stored in the same virtual folders |
12:30:18 | FromGitter | <zacharycarter> I didn't think about the mods / scripting idea |
12:30:39 | PMunch | Yeah I think that's the main point of this |
12:30:44 | PMunch | At least the greatest benefit I can see |
12:30:59 | FromGitter | <zacharycarter> good for games then - not really needed for an engine |
12:31:25 | PMunch | Well, it depends how deep your engine is |
12:31:40 | PMunch | If you want some kind of mod support in the engine then I'd say this would be a nice feature |
12:32:07 | PMunch | Putting together a new game engine? |
12:32:10 | FromGitter | <zacharycarter> games need mod support |
12:32:13 | FromGitter | <zacharycarter> not engines |
12:32:41 | FromGitter | <zacharycarter> yup! - https://github.com/zacharycarter/zeal |
12:33:42 | PMunch | Well a lot of smaller games have become huge partly because of their architectures inherent mod "support" |
12:34:10 | PMunch | Take Minecraft for example, it wasn't really written to support mods. But since it was written in Java it was easy to inject code into the game |
12:34:12 | FromGitter | <zacharycarter> I'd say if you can handle plugins - you can support mods |
12:34:24 | FromGitter | <zacharycarter> user plugins tha tis |
12:34:27 | FromGitter | <zacharycarter> that* |
12:34:48 | PMunch | So someone set out to de-obfuscate the different procedures in the real source code and managed to reverse engineer it enough to create mods |
12:35:00 | * | martin1_ joined #nim |
12:35:33 | PMunch | I remember back in the days where to install a Minecraft mod you needed to manually open the .jar archive and muck about with the files before zipping it all up again :P |
12:35:51 | FromGitter | <zacharycarter> heh |
12:36:24 | PMunch | Kerbal Space Program is the same, lot's of mods, but no actual "support". It's just that the Unity3D engine is relatively easy to mod things into |
12:37:54 | PMunch | Looking forward to see what comes out of your engine though :) |
12:38:02 | FromGitter | <zacharycarter> thanks - me too |
12:38:05 | FromGitter | <zacharycarter> :P |
12:39:30 | PMunch | And feel free to borrow code from SDLGamelib when you get to collisions and tweens and such :) |
12:39:42 | PMunch | Hmm, maybe I should actually split those parts into their own libraries.. |
12:39:46 | FromGitter | <zacharycarter> đ I appreciate that |
12:41:29 | PMunch | Problem is that collisions uses SDLs Point and Rect types.. Which makes it easy to use with SDL, but which would of course need to be implemented elsewhere if I were to split it out |
12:43:03 | PMunch | I remember someone proposing Rect and Point types for the stdlib |
12:43:13 | PMunch | To ensure that all libs were using the same types for this |
12:43:28 | PMunch | So annoying to have to unpack one Rect just to construct another from another library |
12:46:15 | FromGitter | <zacharycarter> PMunch: https://github.com/zacharycarter/zeal/blob/JobScheduler/src/zealpkg/math_utils.nim :P |
12:47:12 | FromGitter | <zacharycarter> not dealing with rects and point types |
12:47:16 | FromGitter | <zacharycarter> but to your point |
12:47:20 | FromGitter | <zacharycarter> pardon the pun |
12:47:27 | PMunch | Haha yeah |
12:47:39 | PMunch | I mean just having those vectors as a built in type |
12:48:01 | PMunch | Would mean that you could import that file in a different project and use it without any mapping between different types |
12:48:11 | * | Gertm joined #nim |
12:48:16 | PMunch | I mean most of them will be defined as the same type, but that's no guarantee |
12:48:45 | FromGitter | <zacharycarter> yeah - although you have to assume the person wants to work with 32 bit floating point numbers |
12:48:58 | FromGitter | <zacharycarter> at least if they're using the code I linked |
12:48:59 | PMunch | Hmm, yeah |
12:49:12 | PMunch | I guess you could have a vec3_32 type :P |
12:49:26 | PMunch | And of course then a _64 counterpart |
12:49:49 | FromGitter | <zacharycarter> or just add like - Vec3_64 |
12:49:55 | FromGitter | <zacharycarter> and Vec3 is 32 by default |
12:50:12 | PMunch | Well that could be annoying if you only care about the _64 variant.. |
12:50:35 | PMunch | Maybe have a compile-time switch for it, or base it on the underlying architecture like int does today |
12:51:39 | FromGitter | <zacharycarter> sure - lots of possibilities |
12:51:47 | * | literal joined #nim |
12:55:11 | PMunch | Oh well, I'm off. Good luck with zeal |
12:55:13 | * | PMunch quit (Remote host closed the connection) |
12:56:31 | * | kapil____ joined #nim |
12:59:47 | * | martin1_ quit (Ping timeout: 240 seconds) |
13:01:39 | FromGitter | <mratsim> @zacharycarter why are you reinventing Pi? https://nim-lang.org/docs/math.html#PI |
13:02:22 | FromGitter | <mratsim> also use const and let, why so much var? |
13:03:39 | narimiran | +1 |
13:05:24 | FromGitter | <mratsim> it seems like c2nim code actually |
13:06:03 | narimiran | btw, @mratsim: will you have the time to maybe join us doing AoC? i would love to see your optimizations for these problems |
13:06:37 | FromGitter | <zacharycarter> @mratsim - I didn't write that code |
13:06:44 | FromGitter | <mratsim> I didnât plan to but if you have a specific problem that needs optimizations I can give it a go. |
13:07:06 | FromGitter | <zacharycarter> it works with bgfx so it's a temporary solution |
13:07:09 | FromGitter | <mratsim> Iâm trying to release a new version of Arraymancer this weekend before I break all backward compat :P |
13:07:15 | FromGitter | <mratsim> @zacharycarter ah I see |
13:07:25 | FromGitter | <zacharycarter> so many casts lol |
13:07:40 | narimiran | oh, i guess AM might be more important to you than AoC :) |
13:08:06 | FromGitter | <mratsim> @narimiran so my target is to implement a high level embedding layer and create an example to do sentiment analysis on movie reviews from IMDB. |
13:08:35 | narimiran | @mratsim 8 tasks are already out, but even i have managed to make them 'fast enough', so i guess nothing special yet that would benefit greatly from your attention |
13:09:42 | narimiran | @mratsim please please write a blog post about that! |
13:09:50 | FromGitter | <mratsim> you ould be surprised. Iâve been benchmarking math.h lately. And you can speed up the exponential function in there by about 9x. |
13:10:00 | FromGitter | <mratsim> https://github.com/numforge/laser/blob/master/benchmarks/vector_math/bench_exp_avx2.nim#L256-L262 |
13:10:24 | FromGitter | <mratsim> I expect 4~5x gains minimum on logarithm as well. |
13:10:37 | FromGitter | <mratsim> You canât trust anyone :/ |
13:10:51 | narimiran | well, i can. you can't. :D |
13:11:03 | narimiran | i'm mere mortal |
13:12:00 | FromGitter | <mratsim> After I finish the main parts of laser, I guess I need to do a HPC in Nim blog series. |
13:12:18 | narimiran | yes!! |
13:19:10 | FromGitter | <zacharycarter> if I'm using `importobjc` how do I do something like - `NSAlert *alert = [[NSAlert alloc] init];` |
13:19:28 | FromGitter | <zacharycarter> `proc newAlert: NSAlert {.importobjc: "NSAlert init", nodecl.}` ? |
13:19:43 | FromGitter | <zacharycarter> not sure how - `[[NSAlert alloc] init]` works with `importobjc` |
13:21:00 | FromGitter | <zacharycarter> or I guess I just call init after? |
13:23:22 | FromGitter | <zacharycarter> I didn't realize NSRunAlertPanel existed - much simpler |
13:25:37 | * | Snircle joined #nim |
13:31:31 | FromGitter | <alehander42> oh yes, now almost working with indented input |
14:05:54 | * | fthe joined #nim |
14:06:48 | fthe | If anyone cares to have a look, I'd be interested in understanding why I'm getting compiler warnings here: https://gist.github.com/auxym/5d41ff558e8d5cc5258f653e5dbdd2c9 |
14:07:00 | fthe | (sequtils.map with times.parse) |
14:12:59 | leorize | a small tip: you don't have to annotate the type, since the compiler can figure it out automatically |
14:13:41 | leorize | and you should use the implicit `result` instead of `return` in this case |
14:14:01 | * | nsf joined #nim |
14:16:59 | * | nc-x joined #nim |
14:17:32 | fthe | Yeah, I was trying out a few things (including return vs result, and type declaration vs inference) in the hopes of figuring out what the compiler is trying to tell me... |
14:18:29 | nc-x | That warning should not be related to your using return instead of result. Because the line number is in sequtils. |
14:19:37 | fthe | I see. So should I brush it off as a stdlib bug for now? |
14:19:44 | nc-x | Yes |
14:19:52 | nc-x | Please open an issue on github |
14:20:07 | nc-x | Acc. to be it is definitely a (minor) bug. |
14:20:14 | nc-x | *me |
14:20:49 | fthe | I'll open an issue. thank you |
14:21:08 | narimiran | sequtils, line 238 is `map` |
14:21:19 | narimiran | `newSeq(result, s.len)` |
14:23:52 | fthe | it seems to be triggered by my call to `times.parse` though, removing that removes the warnings |
14:33:30 | fthe | FYI: https://github.com/nim-lang/Nim/issues/9901 |
14:35:00 | * | stefanos82 quit (Remote host closed the connection) |
14:52:25 | federico3 | https://libreplanet.org/wiki/FOSDEM2019-devroom-minimalism relevant to Nim |
14:53:35 | narimiran | "Nov 25th 2018: submission deadline for talk proposals" |
14:55:30 | federico3 | I doubt it's written in stone |
14:58:58 | * | Jesin quit (Ping timeout: 250 seconds) |
15:07:05 | * | elb_ joined #nim |
15:16:46 | shashlick | Folks any tips on how to debug https://github.com/nim-lang/Nim/issues/9893 |
15:17:02 | shashlick | I don't get anything with gdb either |
15:18:00 | shashlick | Works just fine with 0.18.0 |
15:18:22 | shashlick | But broken on 0.19.0 and devel |
15:18:39 | leorize | maybe you should debug the underlying C code directly |
15:19:06 | leorize | use `--linedirs:off` to prevent the compiler from inserting `#line` directives |
15:20:12 | elb_ | nim newbie here, just started playing with the lang. Does nim have associative arrays / dictionaries? I didn't see any while skimming the manual |
15:20:27 | shashlick | tables |
15:20:57 | elb_ | @shashlick ahh there we go. Thanks |
15:21:48 | shashlick | leorize: how does linedirs:off help? |
15:22:23 | leorize | it'll cause GDB to not refer to the `.nim` files while debugging |
15:22:24 | narimiran | elb_: from which language do you come from? |
15:23:11 | leorize | shashlick: sometimes the bug might be in the C codegen, so looking at the C code might give us a clue |
15:23:46 | leorize | or... you could compile with `-d:noSignalHandler` |
15:23:55 | leorize | that should disable the default SIGSEGV handler |
15:24:14 | leorize | then you could easily look at the stacktrace from gdb when it crashes |
15:25:00 | elb_ | harimiran: lots, though day job is .NET |
15:25:01 | shashlick | Ok will try thanks |
15:26:14 | shashlick | It's just unhelpful when you get ?? In the stack trace |
15:27:59 | FromGitter | <alehander42> shashlick: you can also try rr : it's like gdb, but you can step/continue back in time |
15:28:09 | FromGitter | <alehander42> if you're having trouble stopping on the correct plac |
15:30:20 | shashlick | Neat |
15:40:00 | fthe | narimiran: I have to say, your AOC solutions are a pleasure to read |
15:40:31 | narimiran | fthe: thanks, i'm trying my best :) |
15:41:08 | narimiran | fthe: anything in particular that catched your eye? |
15:43:12 | fthe | nothing in particular, they just seem very simple and easy to read, and more often than not in half the LOC as mine! I'm just starting to learn nim for fun however |
15:47:57 | narimiran | fthe: well, as popular youtubers would say: subscribe and like :D |
15:48:52 | FromGitter | <alehander42> the best nim teeth in the gaame |
15:49:17 | FromGitter | <alehander42> i'd love to see fontana rating languages |
15:50:03 | * | nsf quit (Quit: WeeChat 2.3) |
15:50:44 | FromGitter | <alehander42> fantano, holy fuck am i bad at names |
16:00:50 | * | couven92 joined #nim |
16:11:35 | * | stefanos82 joined #nim |
16:12:14 | * | Trustable quit (Remote host closed the connection) |
16:20:57 | * | dddddd joined #nim |
16:22:00 | * | Vladar joined #nim |
16:23:26 | * | couven92 quit (Quit: Client disconnecting) |
16:25:56 | * | elb_ quit (Quit: WeeChat 2.3) |
16:35:35 | * | couven92 joined #nim |
16:49:59 | * | Tyresc joined #nim |
16:51:30 | * | leorize quit (Ping timeout: 252 seconds) |
16:54:18 | * | leorize joined #nim |
16:54:43 | * | nc-x quit (Quit: Page closed) |
17:04:19 | * | martin1_ joined #nim |
17:04:37 | * | Ven`` joined #nim |
17:07:11 | FromGitter | <alehander42> nim is actually nice for writing compiler |
17:07:13 | FromGitter | <alehander42> s |
17:07:35 | FromGitter | <alehander42> finally finished my first prototype of pseudolang: it can check complexity annotations in very simple cases |
17:07:38 | FromGitter | <alehander42> :D https://github.com/pseudo-lang/pseudolang#for-now |
17:09:24 | FromGitter | <alehander42> (also started a naive parser generator in https://github.com/alehander42/helpful_parser for it) |
17:09:44 | FromGitter | <alehander42> and also including some symbolic math logic for the complexity thing, maybe it can be separated eventually |
17:11:59 | narimiran | @alehander42 so that's why you only sporadically solve AoC? :) btw, today's task is, IMO, right behind day5 fun-wise |
17:13:12 | FromGitter | <alehander42> narimiran: overally i am very busy these days: also work and stuff :D |
17:13:31 | narimiran | eh, wrong priorities.... :P |
17:14:00 | FromGitter | <alehander42> well, you can't deny a algocomplexity type system would help a lot with stuff like AOC :D :D |
17:15:51 | narimiran | true :) |
17:16:32 | FromGitter | <alehander42> but I'll take a look this evening in the car |
17:24:06 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzzâŚ) |
17:31:07 | * | vlad1777d quit (Ping timeout: 240 seconds) |
17:32:12 | martin1_ | is there any sort of guide to cross compiling to windows from a macOS? |
17:32:41 | martin1_ | I'm basically missing some heeader files (windows.h), but I'm not sure where to start |
17:32:46 | * | vlad1777d joined #nim |
17:38:02 | * | NimBot joined #nim |
17:43:32 | leorize | martin1_: do you have a cross-compiler setup? |
17:46:35 | * | Vladar quit (Remote host closed the connection) |
17:47:44 | fthe | AOC day 5 was quick, day 6 seems much harder. I'm late, don't get much time during the week to mess around with AOC |
17:49:05 | * | narimiran quit (Remote host closed the connection) |
17:53:05 | * | Ven`` joined #nim |
17:55:36 | * | zakora_ joined #nim |
17:57:09 | * | zakora_ quit (Client Quit) |
17:59:37 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzzâŚ) |
18:03:50 | * | zakora joined #nim |
18:11:25 | * | zakora quit (Quit: WeeChat 2.2) |
18:11:48 | * | zakora joined #nim |
18:21:43 | * | martin1_ quit (Ping timeout: 245 seconds) |
18:23:25 | * | ng0 joined #nim |
18:23:27 | * | ng0 quit (Client Quit) |
18:25:46 | FromGitter | <zacharycarter> if anyone is familiar with obj-c and Nim on macos: https://gist.github.com/zacharycarter/e14e647ab6cb818675326d137d6f94f0 |
18:26:02 | FromGitter | <zacharycarter> why would I get undeclared identifier errors with that code? |
18:28:42 | FromGitter | <zacharycarter> nevermind - I think I know |
18:35:55 | * | nsf joined #nim |
18:37:53 | * | martin1_ joined #nim |
18:42:07 | FromGitter | <zacharycarter> going to eventually just rip sdl2 out of this thing and write my own windowing code |
18:42:15 | FromGitter | <zacharycarter> todo list / pipe dreams |
18:53:02 | * | ng0 joined #nim |
18:53:23 | * | ng0 quit (Client Quit) |
18:53:42 | * | ng0 joined #nim |
18:55:34 | FromGitter | <mratsim> congrats on your parser generator @alehander42, that would be super useful to craft DSL and interpreters. |
18:57:25 | FromGitter | <alehander42> Very wip, but yeah, the cool thing is the current rules api can be targeted by different dsls:e.g. Grammars or macros or others |
18:57:54 | FromGitter | <mratsim> Some EBNF parser or whatever popular grammar exists would be cool |
18:58:22 | FromGitter | <mratsim> I hav ea feeling that a parser generator for Lox would be super popular: http://www.craftinginterpreters.com/contents.html |
18:59:40 | FromGitter | <zacharycarter> question - if I'm passing data b/w threads and leveraging the shared heap and pointers - can I copy the memory pointed at into a ref object on a thread-local heap? |
18:59:44 | FromGitter | <zacharycarter> do I just use deepCopy? |
19:00:06 | FromGitter | <mratsim> you need to define your custom deepCopy |
19:00:21 | FromGitter | <alehander42> Mratsim I won't go generate the ebnf_like grammar parser with the lob itself |
19:00:25 | FromGitter | <alehander42> Want |
19:00:28 | FromGitter | <zacharycarter> okay - I think I'll just suffer channels here |
19:00:34 | FromGitter | <alehander42> With the lib' |
19:00:38 | FromGitter | <zacharycarter> it's for editor resource loading anyway |
19:00:42 | FromGitter | <mratsim> similar to this: https://github.com/numforge/laser/blob/master/laser/tensor/initialization.nim#L38-L71 @zacharycarter |
19:00:48 | FromGitter | <zacharycarter> thanks |
19:01:13 | FromGitter | <mratsim> deep copy doesnât resolve pointers, only ref types and POD/stack objects |
19:01:28 | FromGitter | <zacharycarter> gotcha |
19:05:20 | FromGitter | <zacharycarter> @mratsim - ``` â The HPC toolbox: fused matrix multiplication, convolution, data-parallel strided tensor primitives, OpenMP facilities, SIMD, JIT Assembler, CPU detection, state-of-the-art vectorized BLAS for floats and integers â â `````` [https://gitter.im/nim-lang/Nim?at=5c0c15f033d9e119919fcc8f] |
19:05:48 | FromGitter | <zacharycarter> quite the mouthful |
19:05:51 | FromGitter | <zacharycarter> :P |
19:06:03 | FromGitter | <mratsim> well, it has a lot of functionalities :P |
19:06:07 | FromGitter | <zacharycarter> I can tell |
19:06:43 | FromGitter | <zacharycarter> we need a SIMD linalg lib |
19:06:45 | FromGitter | <mratsim> itâs like the culmination of what I did in Nim for the past 2 years |
19:07:04 | FromGitter | <zacharycarter> well - you're one of the baddest of asses in the Nim dev community |
19:07:18 | FromGitter | <mratsim> ^^ |
19:08:35 | FromGitter | <zacharycarter> I just know how to cobble together existing C libraries and build things that die with them :P but I'm looking forward to destructors and hot reloading of code |
19:09:19 | FromGitter | <zacharycarter> using multiple threads in Nim - regardless of anyone's counter-argument - is more difficult than in C++ |
19:10:27 | FromGitter | <mratsim> I have to retry. I tried one month ago but I was stuck due to a weird error - https://github.com/nim-lang/Nim/issues/9489 |
19:10:31 | FromGitter | <zacharycarter> and the - `you can ditch the gc and allocate memory manually` - logic doesn't really work until there is a stdlib for Nim that doesn't rely on the GC |
19:10:58 | FromGitter | <mratsim> but openmp works fine for my use cases |
19:11:18 | FromGitter | <mratsim> even when I need to allocate GC-ed memory in another thread |
19:11:32 | FromGitter | <zacharycarter> openmp I don't think will work well in a game engine |
19:11:39 | FromGitter | <zacharycarter> for specific things sure |
19:11:57 | FromGitter | <mratsim> probably. I didnât dive much into their task parallelism construct. |
19:12:51 | FromGitter | <mratsim> I plan to push Nim parallelism there: https://github.com/mratsim/golem-prime |
19:13:08 | FromGitter | <mratsim> but Iâve paused for the moment (itâs a go playing bot) |
19:14:15 | FromGitter | <zacharycarter> will be neat to play with the new features coming up |
19:14:47 | FromGitter | <zacharycarter> I don't mind resorting to passing pointers around and using the shared heap - but I don't want users of my engine to have to do such things |
19:14:58 | FromGitter | <mratsim> yeah for sure. |
19:15:45 | FromGitter | <mratsim> but shared memory parallelism is that. I donât see how you can do it differently. |
19:16:50 | FromGitter | <zacharycarter> well - that's why I was asking the question about deepCopy earlier |
19:17:46 | FromGitter | <mratsim> channels are good if you can sync with minimal data communications (like for game engine, just send the position) |
19:18:01 | FromGitter | <zacharycarter> I'm mostly concerned with resource loading |
19:18:05 | FromGitter | <zacharycarter> like quick async tasks |
19:18:10 | FromGitter | <zacharycarter> but I don't want to do this on the main thread |
19:18:16 | FromGitter | <mratsim> but if you need to send more than a couple dozens of bytes, I think it would be very slow (though Iâm not a game dev) |
19:18:32 | FromGitter | <zacharycarter> gotcha |
19:18:41 | FromGitter | <zacharycarter> then they might not be ideal for this purpose either |
19:18:41 | ldlework | zacharycarter i feel like you'd love some of the CSP systems on ML |
19:18:43 | FromGitter | <mratsim> just spawn a new thread with createThread |
19:19:09 | FromGitter | <zacharycarter> but then I'm going to have to use the shared heap and createShared right? |
19:19:22 | FromGitter | <zacharycarter> and then pass what back to the person that calls like - `texture.load("foo")` |
19:19:28 | FromGitter | <zacharycarter> a pointer to data allocated on the shared heap? |
19:19:32 | FromGitter | <mratsim> yes |
19:19:51 | FromGitter | <zacharycarter> yeah :/ I guess people if they want to use this engine are just going to have to get used to disposing of their resources |
19:20:02 | FromGitter | <mratsim> passing a texture of 100MB by channels is not good. |
19:20:21 | FromGitter | <zacharycarter> ldlework: ML like the functional PL? |
19:20:30 | ldlework | yeah! |
19:20:56 | FromGitter | <zacharycarter> I've thought about playing with scheme before |
19:20:58 | FromGitter | <zacharycarter> and forth |
19:21:38 | FromGitter | <zacharycarter> honestly - if I'm going to switch hobbyist languages, I'll either go to Rust or C |
19:22:07 | FromGitter | <zacharycarter> maybe guile or chicken scheme if I really want to punish myself |
19:23:21 | FromGitter | <zacharycarter> if I'm writing a game engine in Nim though - and no one using Nim wants to use pointers or unsafe features |
19:23:25 | FromGitter | <zacharycarter> what's the point then? |
19:23:33 | FromGitter | <zacharycarter> people are just going to complain... |
19:23:41 | ldlework | zacharycarter, I studied this classic book which uses the original SML, but I used F# instead and it was one of the funnest couple of months: http://ldlework.com/projects/media/books/read.html#concurrent-programming-in-ml |
19:24:04 | ldlework | you learn absolutely there is to know about concurrency starting from primitives on to research techniques |
19:24:26 | ldlework | F# has a beautiful CSP library which is inspired directly by SML so that worked out |
19:24:43 | ldlework | (called hopac, https://github.com/Hopac/Hopac) |
19:24:49 | FromGitter | <zacharycarter> I've heard of hopac before |
19:25:33 | ldlework | zacharycarter[m]: I ported the code examples in the book to F#/Hopac as I went through it, http://ldlework.com/projects/fsharp/CMLFS/index.html |
19:25:56 | ldlework | like here's the sieve of eratothenes, https://github.com/dustinlacewell/CMLFS/blob/master/3.2a-sieve-of-eratosthenes.fsx |
19:26:15 | ldlework | from the outsite it's like "ew those operators!" |
19:26:19 | ldlework | outside* |
19:26:44 | ldlework | but once you start studying CSP and you learn how absolutely bonkers amount of control you have to orchestrate concurrent processes using their semantics it like wowowow |
19:27:02 | ldlework | you'll also have to learn about some monads |
19:27:20 | ldlework | if you never know what they are, or for, you'll get a good practical lesson |
19:27:52 | FromGitter | <zacharycarter> I've worked with Clojure, some Erlang and a bit of Common Lisp before |
19:28:23 | ldlework | nice |
19:29:04 | FromGitter | <zacharycarter> https://github.com/AlexCharlton/Hypergiant |
19:29:10 | FromGitter | <zacharycarter> piqued my interest a while ago |
19:33:22 | ldlework | I'm fairly sure I like ML's more than lisps |
19:33:36 | ldlework | Though I can get work done in lisps, I don't hate them |
19:35:18 | ldlework | cool engine |
19:36:16 | ldlework | zacharycarter nice, http://alex-charlton.com/posts/Prototype_to_polish_Making_games_in_CHICKEN_Scheme_with_Hypergiant/ |
19:37:49 | FromGitter | <zacharycarter> yup - although from my experience using it - some of his code doesn't work anymore |
19:38:32 | FromGitter | <zacharycarter> but yeah - that article is what had me exploring the project in the first place |
19:43:26 | * | stefanos82 quit (Remote host closed the connection) |
19:51:51 | * | Jesin joined #nim |
19:54:14 | FromDiscord_ | <Pilvinen> So, anyway. I just bumped into this on Google. |
19:54:56 | FromDiscord_ | <Pilvinen> I'm looking for a potential scripting language for a game written in Java. Am I on the right track here or is this a bad idea? |
19:55:20 | FromDiscord_ | <Pilvinen> And what's the sandboxing status? Is that possible? |
19:55:48 | FromDiscord_ | <Pilvinen> Wouldn't want the blackhats to wield too much power. |
19:57:16 | FromDiscord_ | <Pilvinen> I guess I kind of like the syntax. |
19:59:41 | FromDiscord_ | <Pilvinen> At least some of it. |
20:01:04 | ldlework | Pilvinen you know Nim compiles to C? |
20:01:14 | ldlework | And Javascript |
20:02:16 | FromDiscord_ | <Pilvinen> No. I haven't gotten that far yet on the web pages, but I saw the Discord link. |
20:02:34 | * | martin1_ quit (Ping timeout: 268 seconds) |
20:02:54 | FromDiscord_ | <Pilvinen> Well, thanks. I'll keep looking. |
20:10:54 | * | nsf quit (Quit: WeeChat 2.3) |
20:19:57 | * | martin1_ joined #nim |
20:21:09 | * | Jesin quit (Quit: Leaving) |
20:25:18 | * | Jesin joined #nim |
20:27:47 | * | lritter joined #nim |
20:31:20 | * | platoff joined #nim |
20:31:44 | * | Jesin quit (Quit: Leaving) |
20:48:21 | martin1_ | leorize: I have clang installed, but I dunno if that's enough |
20:49:15 | * | vlad1777d quit (Remote host closed the connection) |
20:50:01 | * | vlad1777d joined #nim |
20:50:16 | martin1_ | I also installed mingw-w64 via homebrew |
20:50:56 | FromGitter | <mratsim> @dom96 is there any way for a user to add a progress bar to untar? https://github.com/dom96/untar â â zlib is too slow :/, Iâm untaring a 85MB tar.gz with 100k files containing a single line and it takes like 5+ minutes: http://ai.stanford.edu/~amaas/data/sentiment/ |
20:51:46 | FromGitter | <mratsim> actually I think progress bars for streams would be useful |
21:01:56 | FromGitter | <mratsim> @Pilvinen, apparently it works for Beamdog and their Neverwinter nights 1 enhanced edition: https://github.com/niv/neverwinter.nim though I donât think they use Nim in a sandbox for scripting. |
21:02:04 | FromGitter | <mratsim> but more for tooling |
21:03:26 | * | kapil____ quit (Quit: Connection closed for inactivity) |
21:10:24 | * | vlad1777d quit (Ping timeout: 268 seconds) |
21:45:45 | * | zakora quit (Quit: WeeChat 2.2) |
21:52:07 | * | seni quit (Ping timeout: 240 seconds) |
21:57:13 | shashlick | leorize: neither --lineDir:off nor -d:noSignalHandler worked to provide any further details |
21:57:27 | shashlick | @alehander42: this is on Windows so rr didn't really help |
22:05:05 | FromGitter | <alehander42> Well, windbg had something similar in newer versions I think but I don't use win |
22:13:48 | * | platoff quit (Ping timeout: 245 seconds) |
22:31:38 | * | zachk joined #nim |
22:32:57 | * | Xe quit (Ping timeout: 252 seconds) |
22:34:47 | * | zachk quit (Changing host) |
22:34:47 | * | zachk joined #nim |
22:36:19 | * | Jesin joined #nim |
22:39:00 | * | Jesin quit (Remote host closed the connection) |
22:41:14 | * | Jesin joined #nim |
22:44:39 | * | Ven`` joined #nim |
22:53:01 | * | snowolf quit (Ping timeout: 260 seconds) |
22:54:52 | * | kapil____ joined #nim |
22:54:58 | * | snowolf joined #nim |
23:00:43 | * | Xe joined #nim |
23:04:18 | * | martin1_ quit (Ping timeout: 250 seconds) |
23:09:57 | * | ghost64 quit (Read error: Connection reset by peer) |
23:10:02 | * | martin1_ joined #nim |
23:13:04 | FromDiscord_ | <deech> I'm trying to understand and contribute to the Nim compiler. Can I get some pointers on how I would go about fixing this issue? I've done the leg work of figuring out what is wrong but need some help with navigating the compiler code. Please comment on the issue. https://github.com/nim-lang/Nim/issues/9817 |
23:13:53 | * | ghost64 joined #nim |
23:14:31 | * | whaletechno joined #nim |
23:28:08 | * | martin1_ quit (Ping timeout: 250 seconds) |
23:32:12 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzzâŚ) |
23:38:30 | * | ghost64 quit (Quit: See you!) |
23:39:17 | * | ghost64 joined #nim |
23:56:43 | Araq | https://nim-lang.org/docs/intern.html do you know this? |