<< 08-12-2018 >>

00:01:18FromGitter<rayman22201> lol. sure.
00:01:42FromGitter<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:01FromGitter<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:08FromGitter<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:26anamokhi
06:23:59anamokI 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:41anamokCan it be done somehow?
06:25:13narimirananamok: make main an iterator?
06:25:56anamokCall `read()` several times and it yields a value.
06:28:38anamokIn Python it's possible. There it's called a generator function.
06:31:17anamokHere 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:00FromDiscord_<technicallyagd> You need to use {.closure.}
06:56:11narimirananamok: https://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-first-class-iterators
06:56:33FromDiscord_<technicallyagd> https://gist.github.com/technicallyagd/743ba344d185f168b932962309f3b919
06:57:00FromDiscord_<technicallyagd> @anamok Modified your first code to work
06:57:36FromDiscord_<technicallyagd> It doesn't work in js backend though if I read the manual correctly
06:59:06FromDiscord_<technicallyagd> I just released `unpack` v0.3.0 https://github.com/technicallyagd/unpack
06:59:40FromDiscord_<technicallyagd> Adds rest operator support.
07:00:19narimiranuuuu, niiiceee
07:01:19FromDiscord_<technicallyagd> haha, didn't know I would need to implement this so soon.
07:01:24anamoktechnicallyagd: Thanks! Modified your code to my need: http://ix.io/1vvt/nim
07:01:36narimirani don't use JS, so `{job: someJob, name: otherName}` is backwards to me. maybe some other (clearer) syntax can be used?
07:01:52FromDiscord_<technicallyagd> @anamok sounds good! glad it works.
07:01:58FromDiscord_<technicallyagd> @narimiran any suggestion?
07:02:05anamokthnaks guys, problem solved
07:02:35narimirani need to have a breakfast before making any meaningful suggestions :) but i'll think about it
07:03:52FromDiscord_<technicallyagd> lol, nice, I am not attached to any particular syntax, so any idea is welcome 😄
07:04:36FromDiscord_<technicallyagd> as long as it is allowed by the compiler that is.
07:07:10shashlickhttps://github.com/nim-lang/Nim/issues/9893 - if anyone has any clues, will greatly appreciate it
07:20:43narimiran@technicallyagd i thing even `->` would be better/clearer (`job -> someJob`) than the current syntax. maybe use `@` like gara does?
07:51:19anamoktechnicallyagd: 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:47FromDiscord_<technicallyagd> @narimiran but `->` is two key strokes though lol. I will take a look at `@` later.
07:55:57narimiranhow many strokes is "open my browser, go to `unpack` documentation, `ctrl+f {`, ah that's the correct syntax"? ;)
07:58:22FromDiscord_<technicallyagd> haha i see
07:58:28FromDiscord_<technicallyagd> that's valid point
08:03:14FromDiscord_<technicallyagd> @anamok https://gist.github.com/technicallyagd/3385f63ae7df889184457d46164f16cf here you go
08:03:42FromDiscord_<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:04anamokthanks a lot
08:04:44FromDiscord_<technicallyagd> np
08:23:45Araqdoes anybody remember the syntax to pass a filelist.txt file to the linker?
08:25:33FromDiscord_<technicallyagd> @araq not me
08:26:14FromDiscord_<technicallyagd> @narimiran would `{job as newJob, name} <- tim` be a bad idea?
08:27:07Araqhttps://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html it's @file
08:27:18narimiran@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:21FromDiscord_<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:08Araqyay, 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:08narimiranthere's a discussion about @xmonader's article on r/programming. anybody wants to guess what the top comment is about?
10:07:35FromGitter<mratsim> case insensitivity?
10:08:16narimiranwell how did you manage to guess it, wow :P
10:11:01FromGitter<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:19FromGitter<Varriount> People always complain about the case rules without giving them a chance. I've never had the rules bite me.
10:52:26FromGitter<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:38ZevvI considered complaining, but after getting started with the language kind of forget doing that
11:36:37ZevvI am not case agnostig, never saw that coming
11:36:44Zevv/agnostic/
11:38:16FromGitter<alehander42> well, I think the main thing is that people expect nothing stops you from mixing styles
11:38:54FromGitter<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:43FromGitter<alehander42> ah for the first time i built a parser generator in nim that actually works
12:05:46FromGitter<alehander42> kinda***
12:22:07FromGitter<zacharycarter> anyone have any experience with - https://icculus.org/physfs/ - or see a benefit to using it?
12:22:16FromGitter<zacharycarter> over just like - having someone run your binary from a specific directory?
12:27:51PMunchWell, as he says it contains all write operations to that one directory
12:28:09PMunchSo if you have mods or a scripting interface in a game it can't write outside of that directory
12:28:30PMunchAs long as they can only write files through that API
12:29:39PMunchPlus the zip -> folder abstraction is pretty neat
12:30:08PMunchSo 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:18FromGitter<zacharycarter> I didn't think about the mods / scripting idea
12:30:39PMunchYeah I think that's the main point of this
12:30:44PMunchAt least the greatest benefit I can see
12:30:59FromGitter<zacharycarter> good for games then - not really needed for an engine
12:31:25PMunchWell, it depends how deep your engine is
12:31:40PMunchIf you want some kind of mod support in the engine then I'd say this would be a nice feature
12:32:07PMunchPutting together a new game engine?
12:32:10FromGitter<zacharycarter> games need mod support
12:32:13FromGitter<zacharycarter> not engines
12:32:41FromGitter<zacharycarter> yup! - https://github.com/zacharycarter/zeal
12:33:42PMunchWell a lot of smaller games have become huge partly because of their architectures inherent mod "support"
12:34:10PMunchTake 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:12FromGitter<zacharycarter> I'd say if you can handle plugins - you can support mods
12:34:24FromGitter<zacharycarter> user plugins tha tis
12:34:27FromGitter<zacharycarter> that*
12:34:48PMunchSo 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:33PMunchI 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:51FromGitter<zacharycarter> heh
12:36:24PMunchKerbal 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:54PMunchLooking forward to see what comes out of your engine though :)
12:38:02FromGitter<zacharycarter> thanks - me too
12:38:05FromGitter<zacharycarter> :P
12:39:30PMunchAnd feel free to borrow code from SDLGamelib when you get to collisions and tweens and such :)
12:39:42PMunchHmm, maybe I should actually split those parts into their own libraries..
12:39:46FromGitter<zacharycarter> 👍 I appreciate that
12:41:29PMunchProblem 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:03PMunchI remember someone proposing Rect and Point types for the stdlib
12:43:13PMunchTo ensure that all libs were using the same types for this
12:43:28PMunchSo annoying to have to unpack one Rect just to construct another from another library
12:46:15FromGitter<zacharycarter> PMunch: https://github.com/zacharycarter/zeal/blob/JobScheduler/src/zealpkg/math_utils.nim :P
12:47:12FromGitter<zacharycarter> not dealing with rects and point types
12:47:16FromGitter<zacharycarter> but to your point
12:47:20FromGitter<zacharycarter> pardon the pun
12:47:27PMunchHaha yeah
12:47:39PMunchI mean just having those vectors as a built in type
12:48:01PMunchWould 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:16PMunchI mean most of them will be defined as the same type, but that's no guarantee
12:48:45FromGitter<zacharycarter> yeah - although you have to assume the person wants to work with 32 bit floating point numbers
12:48:58FromGitter<zacharycarter> at least if they're using the code I linked
12:48:59PMunchHmm, yeah
12:49:12PMunchI guess you could have a vec3_32 type :P
12:49:26PMunchAnd of course then a _64 counterpart
12:49:49FromGitter<zacharycarter> or just add like - Vec3_64
12:49:55FromGitter<zacharycarter> and Vec3 is 32 by default
12:50:12PMunchWell that could be annoying if you only care about the _64 variant..
12:50:35PMunchMaybe have a compile-time switch for it, or base it on the underlying architecture like int does today
12:51:39FromGitter<zacharycarter> sure - lots of possibilities
12:51:47*literal joined #nim
12:55:11PMunchOh 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:39FromGitter<mratsim> @zacharycarter why are you reinventing Pi? https://nim-lang.org/docs/math.html#PI
13:02:22FromGitter<mratsim> also use const and let, why so much var?
13:03:39narimiran+1
13:05:24FromGitter<mratsim> it seems like c2nim code actually
13:06:03narimiranbtw, @mratsim: will you have the time to maybe join us doing AoC? i would love to see your optimizations for these problems
13:06:37FromGitter<zacharycarter> @mratsim - I didn't write that code
13:06:44FromGitter<mratsim> I didn’t plan to but if you have a specific problem that needs optimizations I can give it a go.
13:07:06FromGitter<zacharycarter> it works with bgfx so it's a temporary solution
13:07:09FromGitter<mratsim> I’m trying to release a new version of Arraymancer this weekend before I break all backward compat :P
13:07:15FromGitter<mratsim> @zacharycarter ah I see
13:07:25FromGitter<zacharycarter> so many casts lol
13:07:40narimiranoh, i guess AM might be more important to you than AoC :)
13:08:06FromGitter<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:35narimiran@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:42narimiran@mratsim please please write a blog post about that!
13:09:50FromGitter<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:00FromGitter<mratsim> https://github.com/numforge/laser/blob/master/benchmarks/vector_math/bench_exp_avx2.nim#L256-L262
13:10:24FromGitter<mratsim> I expect 4~5x gains minimum on logarithm as well.
13:10:37FromGitter<mratsim> You can’t trust anyone :/
13:10:51narimiranwell, i can. you can't. :D
13:11:03narimirani'm mere mortal
13:12:00FromGitter<mratsim> After I finish the main parts of laser, I guess I need to do a HPC in Nim blog series.
13:12:18narimiranyes!!
13:19:10FromGitter<zacharycarter> if I'm using `importobjc` how do I do something like - `NSAlert *alert = [[NSAlert alloc] init];`
13:19:28FromGitter<zacharycarter> `proc newAlert: NSAlert {.importobjc: "NSAlert init", nodecl.}` ?
13:19:43FromGitter<zacharycarter> not sure how - `[[NSAlert alloc] init]` works with `importobjc`
13:21:00FromGitter<zacharycarter> or I guess I just call init after?
13:23:22FromGitter<zacharycarter> I didn't realize NSRunAlertPanel existed - much simpler
13:25:37*Snircle joined #nim
13:31:31FromGitter<alehander42> oh yes, now almost working with indented input
14:05:54*fthe joined #nim
14:06:48ftheIf 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:00fthe(sequtils.map with times.parse)
14:12:59leorizea small tip: you don't have to annotate the type, since the compiler can figure it out automatically
14:13:41leorizeand 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:32ftheYeah, 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:29nc-xThat warning should not be related to your using return instead of result. Because the line number is in sequtils.
14:19:37ftheI see. So should I brush it off as a stdlib bug for now?
14:19:44nc-xYes
14:19:52nc-xPlease open an issue on github
14:20:07nc-xAcc. to be it is definitely a (minor) bug.
14:20:14nc-x*me
14:20:49ftheI'll open an issue. thank you
14:21:08narimiransequtils, line 238 is `map`
14:21:19narimiran`newSeq(result, s.len)`
14:23:52ftheit seems to be triggered by my call to `times.parse` though, removing that removes the warnings
14:33:30ftheFYI: https://github.com/nim-lang/Nim/issues/9901
14:35:00*stefanos82 quit (Remote host closed the connection)
14:52:25federico3https://libreplanet.org/wiki/FOSDEM2019-devroom-minimalism relevant to Nim
14:53:35narimiran"Nov 25th 2018: submission deadline for talk proposals"
14:55:30federico3I doubt it's written in stone
14:58:58*Jesin quit (Ping timeout: 250 seconds)
15:07:05*elb_ joined #nim
15:16:46shashlickFolks any tips on how to debug https://github.com/nim-lang/Nim/issues/9893
15:17:02shashlickI don't get anything with gdb either
15:18:00shashlickWorks just fine with 0.18.0
15:18:22shashlickBut broken on 0.19.0 and devel
15:18:39leorizemaybe you should debug the underlying C code directly
15:19:06leorizeuse `--linedirs:off` to prevent the compiler from inserting `#line` directives
15:20:12elb_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:27shashlicktables
15:20:57elb_@shashlick ahh there we go. Thanks
15:21:48shashlickleorize: how does linedirs:off help?
15:22:23leorizeit'll cause GDB to not refer to the `.nim` files while debugging
15:22:24narimiranelb_: from which language do you come from?
15:23:11leorizeshashlick: sometimes the bug might be in the C codegen, so looking at the C code might give us a clue
15:23:46leorizeor... you could compile with `-d:noSignalHandler`
15:23:55leorizethat should disable the default SIGSEGV handler
15:24:14leorizethen you could easily look at the stacktrace from gdb when it crashes
15:25:00elb_harimiran: lots, though day job is .NET
15:25:01shashlickOk will try thanks
15:26:14shashlickIt's just unhelpful when you get ?? In the stack trace
15:27:59FromGitter<alehander42> shashlick: you can also try rr : it's like gdb, but you can step/continue back in time
15:28:09FromGitter<alehander42> if you're having trouble stopping on the correct plac
15:30:20shashlickNeat
15:40:00fthenarimiran: I have to say, your AOC solutions are a pleasure to read
15:40:31narimiranfthe: thanks, i'm trying my best :)
15:41:08narimiranfthe: anything in particular that catched your eye?
15:43:12fthenothing 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:57narimiranfthe: well, as popular youtubers would say: subscribe and like :D
15:48:52FromGitter<alehander42> the best nim teeth in the gaame
15:49:17FromGitter<alehander42> i'd love to see fontana rating languages
15:50:03*nsf quit (Quit: WeeChat 2.3)
15:50:44FromGitter<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:11FromGitter<alehander42> nim is actually nice for writing compiler
17:07:13FromGitter<alehander42> s
17:07:35FromGitter<alehander42> finally finished my first prototype of pseudolang: it can check complexity annotations in very simple cases
17:07:38FromGitter<alehander42> :D https://github.com/pseudo-lang/pseudolang#for-now
17:09:24FromGitter<alehander42> (also started a naive parser generator in https://github.com/alehander42/helpful_parser for it)
17:09:44FromGitter<alehander42> and also including some symbolic math logic for the complexity thing, maybe it can be separated eventually
17:11:59narimiran@alehander42 so that's why you only sporadically solve AoC? :) btw, today's task is, IMO, right behind day5 fun-wise
17:13:12FromGitter<alehander42> narimiran: overally i am very busy these days: also work and stuff :D
17:13:31narimiraneh, wrong priorities.... :P
17:14:00FromGitter<alehander42> well, you can't deny a algocomplexity type system would help a lot with stuff like AOC :D :D
17:15:51narimirantrue :)
17:16:32FromGitter<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:12martin1_is there any sort of guide to cross compiling to windows from a macOS?
17:32:41martin1_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:32leorizemartin1_: do you have a cross-compiler setup?
17:46:35*Vladar quit (Remote host closed the connection)
17:47:44ftheAOC 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:46FromGitter<zacharycarter> if anyone is familiar with obj-c and Nim on macos: https://gist.github.com/zacharycarter/e14e647ab6cb818675326d137d6f94f0
18:26:02FromGitter<zacharycarter> why would I get undeclared identifier errors with that code?
18:28:42FromGitter<zacharycarter> nevermind - I think I know
18:35:55*nsf joined #nim
18:37:53*martin1_ joined #nim
18:42:07FromGitter<zacharycarter> going to eventually just rip sdl2 out of this thing and write my own windowing code
18:42:15FromGitter<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:34FromGitter<mratsim> congrats on your parser generator @alehander42, that would be super useful to craft DSL and interpreters.
18:57:25FromGitter<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:54FromGitter<mratsim> Some EBNF parser or whatever popular grammar exists would be cool
18:58:22FromGitter<mratsim> I hav ea feeling that a parser generator for Lox would be super popular: http://www.craftinginterpreters.com/contents.html
18:59:40FromGitter<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:44FromGitter<zacharycarter> do I just use deepCopy?
19:00:06FromGitter<mratsim> you need to define your custom deepCopy
19:00:21FromGitter<alehander42> Mratsim I won't go generate the ebnf_like grammar parser with the lob itself
19:00:25FromGitter<alehander42> Want
19:00:28FromGitter<zacharycarter> okay - I think I'll just suffer channels here
19:00:34FromGitter<alehander42> With the lib'
19:00:38FromGitter<zacharycarter> it's for editor resource loading anyway
19:00:42FromGitter<mratsim> similar to this: https://github.com/numforge/laser/blob/master/laser/tensor/initialization.nim#L38-L71 @zacharycarter
19:00:48FromGitter<zacharycarter> thanks
19:01:13FromGitter<mratsim> deep copy doesn’t resolve pointers, only ref types and POD/stack objects
19:01:28FromGitter<zacharycarter> gotcha
19:05:20FromGitter<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:48FromGitter<zacharycarter> quite the mouthful
19:05:51FromGitter<zacharycarter> :P
19:06:03FromGitter<mratsim> well, it has a lot of functionalities :P
19:06:07FromGitter<zacharycarter> I can tell
19:06:43FromGitter<zacharycarter> we need a SIMD linalg lib
19:06:45FromGitter<mratsim> it’s like the culmination of what I did in Nim for the past 2 years
19:07:04FromGitter<zacharycarter> well - you're one of the baddest of asses in the Nim dev community
19:07:18FromGitter<mratsim> ^^
19:08:35FromGitter<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:19FromGitter<zacharycarter> using multiple threads in Nim - regardless of anyone's counter-argument - is more difficult than in C++
19:10:27FromGitter<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:31FromGitter<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:58FromGitter<mratsim> but openmp works fine for my use cases
19:11:18FromGitter<mratsim> even when I need to allocate GC-ed memory in another thread
19:11:32FromGitter<zacharycarter> openmp I don't think will work well in a game engine
19:11:39FromGitter<zacharycarter> for specific things sure
19:11:57FromGitter<mratsim> probably. I didn’t dive much into their task parallelism construct.
19:12:51FromGitter<mratsim> I plan to push Nim parallelism there: https://github.com/mratsim/golem-prime
19:13:08FromGitter<mratsim> but I’ve paused for the moment (it’s a go playing bot)
19:14:15FromGitter<zacharycarter> will be neat to play with the new features coming up
19:14:47FromGitter<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:58FromGitter<mratsim> yeah for sure.
19:15:45FromGitter<mratsim> but shared memory parallelism is that. I don’t see how you can do it differently.
19:16:50FromGitter<zacharycarter> well - that's why I was asking the question about deepCopy earlier
19:17:46FromGitter<mratsim> channels are good if you can sync with minimal data communications (like for game engine, just send the position)
19:18:01FromGitter<zacharycarter> I'm mostly concerned with resource loading
19:18:05FromGitter<zacharycarter> like quick async tasks
19:18:10FromGitter<zacharycarter> but I don't want to do this on the main thread
19:18:16FromGitter<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:32FromGitter<zacharycarter> gotcha
19:18:41FromGitter<zacharycarter> then they might not be ideal for this purpose either
19:18:41ldleworkzacharycarter i feel like you'd love some of the CSP systems on ML
19:18:43FromGitter<mratsim> just spawn a new thread with createThread
19:19:09FromGitter<zacharycarter> but then I'm going to have to use the shared heap and createShared right?
19:19:22FromGitter<zacharycarter> and then pass what back to the person that calls like - `texture.load("foo")`
19:19:28FromGitter<zacharycarter> a pointer to data allocated on the shared heap?
19:19:32FromGitter<mratsim> yes
19:19:51FromGitter<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:02FromGitter<mratsim> passing a texture of 100MB by channels is not good.
19:20:21FromGitter<zacharycarter> ldlework: ML like the functional PL?
19:20:30ldleworkyeah!
19:20:56FromGitter<zacharycarter> I've thought about playing with scheme before
19:20:58FromGitter<zacharycarter> and forth
19:21:38FromGitter<zacharycarter> honestly - if I'm going to switch hobbyist languages, I'll either go to Rust or C
19:22:07FromGitter<zacharycarter> maybe guile or chicken scheme if I really want to punish myself
19:23:21FromGitter<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:25FromGitter<zacharycarter> what's the point then?
19:23:33FromGitter<zacharycarter> people are just going to complain...
19:23:41ldleworkzacharycarter, 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:04ldleworkyou learn absolutely there is to know about concurrency starting from primitives on to research techniques
19:24:26ldleworkF# has a beautiful CSP library which is inspired directly by SML so that worked out
19:24:43ldlework(called hopac, https://github.com/Hopac/Hopac)
19:24:49FromGitter<zacharycarter> I've heard of hopac before
19:25:33ldleworkzacharycarter[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:56ldleworklike here's the sieve of eratothenes, https://github.com/dustinlacewell/CMLFS/blob/master/3.2a-sieve-of-eratosthenes.fsx
19:26:15ldleworkfrom the outsite it's like "ew those operators!"
19:26:19ldleworkoutside*
19:26:44ldleworkbut 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:02ldleworkyou'll also have to learn about some monads
19:27:20ldleworkif you never know what they are, or for, you'll get a good practical lesson
19:27:52FromGitter<zacharycarter> I've worked with Clojure, some Erlang and a bit of Common Lisp before
19:28:23ldleworknice
19:29:04FromGitter<zacharycarter> https://github.com/AlexCharlton/Hypergiant
19:29:10FromGitter<zacharycarter> piqued my interest a while ago
19:33:22ldleworkI'm fairly sure I like ML's more than lisps
19:33:36ldleworkThough I can get work done in lisps, I don't hate them
19:35:18ldleworkcool engine
19:36:16ldleworkzacharycarter nice, http://alex-charlton.com/posts/Prototype_to_polish_Making_games_in_CHICKEN_Scheme_with_Hypergiant/
19:37:49FromGitter<zacharycarter> yup - although from my experience using it - some of his code doesn't work anymore
19:38:32FromGitter<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:14FromDiscord_<Pilvinen> So, anyway. I just bumped into this on Google.
19:54:56FromDiscord_<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:20FromDiscord_<Pilvinen> And what's the sandboxing status? Is that possible?
19:55:48FromDiscord_<Pilvinen> Wouldn't want the blackhats to wield too much power.
19:57:16FromDiscord_<Pilvinen> I guess I kind of like the syntax.
19:59:41FromDiscord_<Pilvinen> At least some of it.
20:01:04ldleworkPilvinen you know Nim compiles to C?
20:01:14ldleworkAnd Javascript
20:02:16FromDiscord_<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:54FromDiscord_<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:21martin1_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:16martin1_I also installed mingw-w64 via homebrew
20:50:56FromGitter<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:46FromGitter<mratsim> actually I think progress bars for streams would be useful
21:01:56FromGitter<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:04FromGitter<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:13shashlickleorize: neither --lineDir:off nor -d:noSignalHandler worked to provide any further details
21:57:27shashlick@alehander42: this is on Windows so rr didn't really help
22:05:05FromGitter<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:04FromDiscord_<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:43Araqhttps://nim-lang.org/docs/intern.html do you know this?