<< 30-09-2017 >>

00:00:05FromGitter<zacharycarter> IMO anyways
00:00:17FromGitter<zacharycarter> having global access to the timer is way too convenient not to do it that way IMO
00:00:20def-pri-pubWhat was the problem that the timer was causing?
00:00:38*ipjk quit (Read error: Connection reset by peer)
00:00:59FromGitter<zacharycarter> I was writing some network code and I needed it in global scope because I needed to access it in callbacks
00:02:28def-pri-pubWell, the problem is that I need that Timer for many other things.
00:02:33def-pri-pubi'm trying to think of a compromise
00:02:39def-pri-pubWhat if there was one global "main," timer
00:03:37FromGitter<zacharycarter> I don't love the idea but let me think about it
00:03:44def-pri-pubI think I talked about creating a global engine object in the ticket:
00:03:45def-pri-pubhttps://github.com/zacharycarter/zengine/issues/21#issuecomment-323240865
00:03:54FromGitter<zacharycarter> yeah this I don't really want to do :/
00:04:09FromGitter<zacharycarter> I went this direction with frag and I really didn't like it
00:04:17def-pri-pubThere are many terrible things we have to get something to work.
00:04:56def-pri-pubWhat are the alternatives? timers are necessary for animations. And in the ticket I think I outlined the other use cases that game devs would need timers for.
00:05:21FromGitter<zacharycarter> the alternatives are bring your own timer and let zengine expose a single timer
00:05:33FromGitter<zacharycarter> IMO zengine doesn't need to provide everything
00:06:07skrylardont animations get handed timesteps from update()
00:06:16def-pri-pubyeha
00:06:20def-pri-pubyeah*
00:06:29FromGitter<zacharycarter> there is no update called from the game engine
00:06:35FromGitter<zacharycarter> you implement your own game loop
00:07:12FromGitter<zacharycarter> zengine is strictly a bunch of modules you import - each module exposes different functionality but what it doesn't do is tie you to some overarching game loop pattern
00:07:23skrylarso gamebryo :)
00:07:48FromGitter<zacharycarter> I'm not familiar
00:08:30def-pri-pubWell, I need to go make dinner (I'm starving), but get me a decision so I know how to precede forward. I'd like to keep the timer module, and keeping one "main timer," I think is the best option.
00:08:42FromGitter<zacharycarter> okay I'll think about it
00:10:02FromGitter<zacharycarter> skrylar: zengine is supposed to be akin to XNA
00:10:10FromGitter<zacharycarter> for Nim
00:10:22FromGitter<zacharycarter> I hope that it's good for prototyping ideas
00:11:36skrylarive never used it. gamebryo is supposed to be a collection of modules you tie together. was used in most every bethesda game and some civ ones.
00:11:42skrylaralthough it also had a lot of bugs from what i've heard
00:12:00FromGitter<zacharycarter> let me show you some example code from zengine
00:12:02FromGitter<zacharycarter> you'll get the idea
00:12:09skrylari'm vaguely familiar with xna
00:12:41skrylari just seem to be rather crap at game design lol
00:13:17FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59cee19dcfeed2eb656959c1]
00:13:31ehmryhas anyone done a libretro core in nim yet?
00:16:14FromGitter<zacharycarter> don't know / haven't heard of one
00:27:08*skrylar wonders why people get mad when you show them art these days
00:28:05FromGitter<zacharycarter> ?
00:29:11skrylarjust a depressing world we live in, nevermind.
00:29:17skrylartrying to figure out how this hirise thing works
00:31:57skrylarI'm starting to consider just having a tree of conditions and just do toposorting to make sure they make sense, because that sounds like something that could be built in 1-3 days, and then have a UI solver for stuff like "this button goes here, this label's right side is X from that"
00:32:01*taaperotassu quit (Ping timeout: 248 seconds)
00:32:09skrylarallegedly hirise is really fast/good at this, but i'm finding the paper hard to read
00:37:45skrylarthey are making this coefficient matrix, which i understand each row is a constraint; and then the columns appear to be for the number of variables, but i'm not getting what the values actually *are*
00:38:18*taaperotassu joined #nim
00:38:30skrylarI guess they're just a learned matrix
00:56:19FromGitter<zacharycarter> def-pri-pub: https://github.com/zacharycarter/zengine/issues/51
01:03:33*zachk quit (Quit: night zzzzZZzzzz)
01:12:16def-pri-pubzacharycarter: Okay, I've read the issue and gone through your PR a little. I'm going to say that the final decision lands on you, but I think that we do need a Timer object, and the best thing would be to have one global "main timer."
01:12:43skrylari don't see why you need a global timer, but sdl has one so /shrug
01:12:49skrylarwell, theirs is a 'seconds since sdl was initialized'
01:13:29*chemist69_ quit (Ping timeout: 255 seconds)
01:13:50def-pri-pubI also have to do some house cleaning now, so I'll be in and out
01:15:01def-pri-pubskrylar: yeah, that's all that SDL offers. It doesn't give you anything that complex, but you can build things off of it.
01:15:20def-pri-pubzc wants a global timer for the networking stuff
01:15:28def-pri-pub(or global timing functions)
01:15:39def-pri-pubBut I need a timing object for managing animations
01:16:44def-pri-pubAnd I think down the road game devs will need timers for things like cooldowns, (cut-scene animations), effects, etc.
01:17:11def-pri-pubMost app frameworks provide some sort of time measuring system, so I think it's only natural that we provide one as well.
01:17:17def-pri-pubAnd we need it.
01:26:27def-pri-pubzacharycarter: I skimmed over the PR, left some comments inline.
01:26:34def-pri-pub(I need to clean now...)
01:27:17*chemist69 joined #nim
01:42:38*skrylar quit (Remote host closed the connection)
01:45:56*relax joined #nim
02:05:12*def-pri-pub quit (Quit: Leaving.)
02:28:05*Ven`` joined #nim
02:34:59*vendethiel- joined #nim
02:35:09*Ven`` quit (Ping timeout: 240 seconds)
02:39:22*vendethiel- quit (Ping timeout: 260 seconds)
03:13:08*def-pri-pub joined #nim
03:17:11*Nobabs27 joined #nim
03:31:38*def-pri-pub quit (Quit: Leaving.)
04:45:19*libman quit (Quit: Connection closed for inactivity)
04:52:07*def-pri-pub joined #nim
04:53:45*def-pri-pub left #nim (#nim)
05:02:09*relax quit (Ping timeout: 240 seconds)
05:19:31*miran joined #nim
05:21:19FromGitter<Varriount> Ugh, why is it that npm projects have so many duplicate files
05:38:48*jsgrant quit (Remote host closed the connection)
05:45:48*Nobabs27 quit (Quit: Leaving)
06:03:43*solitudesf joined #nim
06:41:36*Trustable joined #nim
06:50:16*claudiuinberlin joined #nim
06:50:43*nsf joined #nim
06:56:08*yglukhov joined #nim
06:56:09*yglukhov quit (Remote host closed the connection)
06:56:14*solitudesf quit (Ping timeout: 258 seconds)
06:56:43*yglukhov joined #nim
06:59:13*Trustable quit (Remote host closed the connection)
07:01:08*yglukhov quit (Ping timeout: 240 seconds)
07:25:06*dddddd quit (Remote host closed the connection)
07:42:58*Arrrr joined #nim
07:42:58*Arrrr quit (Changing host)
07:42:58*Arrrr joined #nim
07:45:18*nsf quit (Quit: WeeChat 1.9)
08:00:59*kunev quit (Quit: е те!)
08:06:19*kunev joined #nim
08:13:05FromGitter<mratsim> why is it that npm projects pull 1GB of dependencies ….
08:15:58*taaperotassu quit (Ping timeout: 258 seconds)
08:17:41*smt` joined #nim
08:20:35*smt quit (Ping timeout: 240 seconds)
08:23:42*taaperotassu joined #nim
08:43:51*PMunch joined #nim
08:45:57*gokr joined #nim
08:47:28*plexigras joined #nim
08:51:34*Vladar joined #nim
09:17:19*Ven`` joined #nim
09:18:32PMunchHmm, if you do "let (a,b) = (line[0], line[1])" would that copy the characters into a and b, or simply store a reference?
09:18:45PMunchThis is in a proc where the string is not marked as var
09:22:08*yglukhov joined #nim
09:24:14*yglukhov quit (Remote host closed the connection)
09:29:31Arrrri think let doesn't copy.
09:32:18PMunchThat's what I thought as well, but it seems to speed up the program..
09:32:19PMunchHold on
09:34:07PMunchIt seems it was only the normal variance in speed I was seeing
09:34:17PMunchRunning it many times showed no significant difference
09:34:38miranPMunch: do you ask that because that's the line i use in my AoC solutions? :)
09:34:50PMunchHaha, yes
09:35:01miranthank you for your comment, much appreciated!
09:35:38PMunchHmm, running it without --opt:size and -d:release did show a slight increase in speed when not using the let statement
09:36:32PMunchBut as I said on Reddit, moving the regex compilation out of your loops, and compiling with -d:release and --opt:speed certainly gives a great speedup
09:36:39Arrrrmm maybe i was wrong https://glot.io/snippets/eu3pwvq9bt
09:38:18miranPMunch: i am compiling with -d:release, but i didn't know about --opt:speed - will try to use it in the future
09:38:31*vlad1777d joined #nim
09:38:43PMunch-d:release get's you halfway there, but --opt:speed gives a boost on top of that
09:38:48PMunchYou also have --opt:size
09:39:03*yglukhov joined #nim
09:40:49miranfor the most tasks, `time` shows 0.000s even without --opt:speed :)
09:41:38PMunchArrrr, https://glot.io/snippets/eu3q1naish
09:41:44*yglukhov quit (Remote host closed the connection)
09:41:48PMunchThat's closer to what the code was doing, and it seems like it copies
09:42:37PMunchmiran, 0.000s for these tasks?
09:42:39*couven92 joined #nim
09:43:09mirannot for day05 :)
09:43:29miranbut for day01 and day02 sure
09:43:31ArrrrAh yes, in that case it always copy by value
09:46:28miranPMunch: just tried your suggestion for moving the regex pattern out and the speedup is quite nice
09:46:51miranPMunch: on the other hand, i see no difference if i use --opt:speed or not
09:46:53PMunchYeah, you're saving yourself from compiling an identical regex over and over
09:48:40PMunchHmm, looking at the nre module it seems to return a RegexMatch with the original string in it, meaning it copies the string..
09:49:20miranbtw, is there a way to have a subgroups in a regex?
09:49:31*salewski joined #nim
09:49:55miranfor example, in python i had this regex: r'\((\d+)x(\d+)\)'
09:50:15salewskiPMunch, what are you talking?
09:50:26salewski>>>> -d:release get's you halfway there, but --opt:speed gives a boost on top of that
09:50:31miranand with `.group(1)` and `.group(2)` it is easy to extract each number
09:50:57PMunchYeah, when I tried to compile with only the -d:release I got a speedup. But throwing on --opt:speed made it even faster
09:50:59salewski-d:release give fastest executable, see https://nim-lang.org/faq.html
09:51:11PMunchOr wait, maybe it was the other way around
09:51:33salewskiIf that is true, than we have to fix the docs!
09:52:06PMunchOkay, just checked and it was the other way round
09:52:12PMunchI first compiled with only --opt:speed
09:52:51PMunchIn fact running with both -d:release and --opt:speed gave no discernible difference
09:52:54salewskiOK. (We really should not confuse people.)
09:53:15*salewski quit (Client Quit)
09:53:15PMunchYeah, sorry about that
09:53:48PMunchHard to not confuse people when you've already confused yourself
09:53:53miran:)
09:56:15PMunchmiran, just by looking at the documentation and seeing the data structures and such it is probably faster to use PEGs over NRE
09:56:24PMunchAssuming that their actual search speed is the same
09:58:53miranthanks, will look into that
10:03:01FromGitter<dandevelop> Just read this article from 2015: https://gradha.github.io/articles/2015/01/writing-c-libraries-with-nim.html and it states that creating C libraries with Nim is not really supported. Has anything changed lately? How are things today? Is creating C libraries possible with Nim?
10:06:21PMunchWait, can pegs only capture up to 20 strings?
10:12:54*kobi7 joined #nim
10:12:59kobi7hi
10:13:08*yglukhov joined #nim
10:14:59kobi7let's say I want every executed function to echo "entering x", and "exiting x" -- or another idea, to have simple profiling by counting execution time of each function
10:15:06*ccgo joined #nim
10:15:08kobi7does nim have an existing solution for that?
10:16:19kobi7iow, hooking to the proc in some way
10:16:39mirankobi7: something like decorators in python, i assume?
10:16:43*r4d0mbit joined #nim
10:17:50kobi7truth is I don't know python very well
10:18:07kobi7no, I mean implicitly without declaring anything
10:18:37kobi7like setting a global variable or compiler directive
10:18:49miranok
10:18:55PMunchkobi7, you can probably use a C profiling tool
10:19:26kobi7oh, right
10:19:47PMunchhttps://github.com/nim-lang/Nim/wiki/Profiling
10:20:34PMunchAnd that links to this as well: https://nim-lang.org/docs/estp.html
10:20:43kobi7Thanks
10:20:58PMunchSo either valgrind (C profiling tool), or a built-in Nim solution :)
10:21:18*yglukhov quit (Remote host closed the connection)
10:22:28kobi7cool
10:22:38kobi7see you, thanks for the help
10:22:41*kobi7 quit (Quit: Leaving)
10:32:20*r4d0mbit quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
10:35:09*ccgo quit (Ping timeout: 260 seconds)
10:52:27FromGitter<Yardanico> PMunch: are you sure about --opt:speed ?
10:52:38PMunchWhat do you mean?
10:52:59PMunchI already corrected myself and said that -d:release gives the same increase as -d:release --opt:speed
10:53:06FromGitter<Yardanico> ah, ok
10:53:10PMunch-d:release seems to imply --opt:speed
10:53:47FromGitter<Yardanico> yeah, because otherwise it would be slow :D
10:56:33FromGitter<Yardanico> also yeah, I saw "opt:speed" many times in nim repositories on github, it seems to be a pretty common mistake
10:58:26PMunchWell it's not really apparent what happens with -d:release..
10:58:42PMunchSo it's easier to just add --opt:speed than to try and figure it out :P
10:59:13FromGitter<Yardanico> well I always knew "release" would include "fast" speed :) because who needs release without speed? :P
10:59:45*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:02:44*Snircle joined #nim
11:07:20*MyMind joined #nim
11:08:15*Sembei quit (Ping timeout: 246 seconds)
11:08:19*jsgrant joined #nim
11:23:28Arrrris defined here https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg#L50
11:31:26FromGitter<dom96> @andreaferretti Your neo library doesn't seem to support common Vector operations like cross/dot product, is this by-design?
11:39:50dom96And arraymancer has dot product but no cross product? :\
11:41:12dom96Looks like nim-glm is what I want
11:42:05*vlad1777d quit (Ping timeout: 240 seconds)
11:52:55*solitudesf joined #nim
11:54:23PMunchHmm, when my server is back up I should do a write-up of my new workflow. Using terminal tools properly is such fun
12:08:15dom96Anddd showstopper :\ https://github.com/nim-lang/Nim/issues/6455
12:09:03FromGitter<mratsim> @dom96 neo dot product is `*`
12:10:18FromGitter<mratsim> I didn’t add cross product because I never used it in Data Science (though it is often needed in physics)
12:10:53*vlad1777d joined #nim
12:12:04FromGitter<mratsim> I don’t think neo has cross product either though
12:17:00FromGitter<mratsim> also I don’t really know how to do a cross product of n-d vectors like cross([a,b,c,d,e], [u,v,w,x,y])
12:20:07federico3well... you can't
12:22:04FromGitter<ephja> there's a cross product operation for 3 and 7 dimensions
12:22:17FromGitter<ephja> I'm not sure how common the latter is :p
12:22:26dom96oh well, I think these are overkill for my purposes anyway
12:22:34dom96glm seems perfect
12:22:40dom96if it worked with the cpp backend...
12:31:15FromGitter<zacharycarter> dom96: what are you making?
12:32:09dom96https://github.com/dom96/tinyrenderer.nim
12:32:31FromGitter<zacharycarter> ah the software renderer cool
12:33:12FromGitter<zacharycarter> just FYI glm is suited for OpenGL
12:33:28FromGitter<zacharycarter> in that I believe it uses column major orientation for its matrices
12:33:43FromGitter<zacharycarter> so you need to account for that in your math
12:34:25FromGitter<zacharycarter> the transpose function may prove useful to you
12:35:28dom96Ahh, good to know, thanks
12:35:41FromGitter<zacharycarter> np
12:39:01*Vladar quit (Remote host closed the connection)
12:39:08*miran quit (Ping timeout: 240 seconds)
12:44:03*ShalokShalom_ joined #nim
12:46:57*ShalokShalom quit (Ping timeout: 248 seconds)
12:59:02federico3I need to slice a 3D tensor, which lib do you suggest between Arraymancer, neo, glm?
12:59:36FromGitter<zacharycarter> arraymancer IMO
12:59:40FromGitter<zacharycarter> I have zero experience with any of them
12:59:51FromGitter<zacharycarter> but arraymancer is actively worked on by @mratsim
12:59:57FromGitter<zacharycarter> and he's active which is important
13:00:18FromGitter<zacharycarter> plus I don't think glm has anything to do with tensors - not that it couldn't
13:00:43federico3so it looks like
13:01:08FromGitter<mratsim> I don’t think you can slice in glm and neo oly has Vectors and matrices
13:02:22*dddddd joined #nim
13:02:22FromGitter<mratsim> Arraymancer’s slice syntax is there: https://mratsim.github.io/Arraymancer/#features-slicing
13:03:18FromGitter<mratsim> 3d tensors display is like this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59cf9615cfeed2eb656c18ff]
13:10:05FromGitter<zacharycarter> @dom96 I think I found a bug in the example sdl2 code
13:10:10FromGitter<exts> Is there a ffmpeg library out there for nim?
13:10:31FromGitter<zacharycarter> https://github.com/nim-lang/sdl2/blob/master/examples/sdl_opengl_example.nim#L102-L109
13:10:34FromGitter<zacharycarter> frametime never gets reset to 0
13:12:34FromGitter<zacharycarter> I dont' think so @exts
13:12:38FromGitter<mratsim> @exts I don’t think so
13:12:40*relax joined #nim
13:13:11FromGitter<mratsim> What do you need it for?
13:13:53FromGitter<exts> video stuff
13:14:32FromGitter<exts> technically i could just call the binary directly from nim to do what i want, but was just curious to see if there were any libraries out there
13:15:14FromGitter<mratsim> I will probably wrap ffms2 in the future to load videos and manipulate them at the frame level but that will be in a couple months
13:15:29FromGitter<exts> just split a video into two parts via cmd line, was going to use nim to simplify that cmd
13:15:47FromGitter<zacharycarter> @exts you could wrap the ffmpeg c library
13:15:51FromGitter<zacharycarter> probably would be a lot of work
13:15:58FromGitter<exts> yeah
13:16:16FromGitter<exts> I'm rusty, haven't done any of that in a while as well. >1year
13:16:27FromGitter<zacharycarter> I could help / offer guidance
13:16:28FromGitter<mratsim> This should be easier than pure ffmpeg: https://github.com/FFMS/ffms2
13:16:53FromGitter<zacharycarter> yeah looks easier
13:17:02FromGitter<exts> interesting
13:17:29FromGitter<mratsim> usage in a python lib ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59cf9968177fb9fe7e203c5e]
13:17:34FromGitter<mratsim> and there is a trim function
13:18:11FromGitter<mratsim> api is there: https://github.com/FFMS/ffms2/blob/master/doc/ffms2-api.md
13:19:36FromGitter<mratsim> but to be honest, for just splitting videos, A nimscript or bash script that calls CLI ffmpeg can be done in a couple of minutes
13:20:34FromGitter<exts> yeah that's what I said I was going to do, was mostly curious if it existed already as a library though
13:22:01*relax quit (Ping timeout: 240 seconds)
13:23:59*relax joined #nim
13:25:35*yglukhov joined #nim
13:28:23*relax quit (Ping timeout: 258 seconds)
13:29:15*relax joined #nim
13:29:41*yglukhov quit (Ping timeout: 240 seconds)
13:33:53*relax quit (Ping timeout: 248 seconds)
13:34:29*relax joined #nim
13:40:38*relax quit (Ping timeout: 240 seconds)
13:42:08FromGitter<zacharycarter> hrm using the realtime gc with emscripten and wasm causes issues :/
13:42:14FromGitter<mratsim> How to compare if 2 ref objects are the same without doing deep comparisons?
13:42:27FromGitter<mratsim> Do I have to cast it to ByteAddress?
13:42:35FromGitter<zacharycarter> ```#include <mach/mach.h>``````
13:42:38FromGitter<mratsim> (https://files.gitter.im/nim-lang/Nim/Xx66/2017-09-30_15-40-56.png)
13:47:53FromGitter<zacharycarter> @mratsim I can't think of a better way than doing what you just asked
13:48:13Araqyou guys need to test --gc:v2 and report issues
13:48:32FromGitter<zacharycarter> okay
13:48:54FromGitter<zacharycarter> can you explain a little bit about this GC to me Araq?
13:49:43Araqit supports -d:useRealtimeGC too
13:49:54Araqusing an incremental M&S GC
13:50:02FromGitter<zacharycarter> okay
13:50:02Araqso cycles don't matter
13:50:36Araqand it can only free stuff after a full cycle, pathetic, but I will add support for immediate reclamations
13:57:51FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/ORHv/Screen-Shot-2017-09-30-at-9.57.35-AM.png)
13:57:54FromGitter<zacharycarter> 59fps in the browser - pretty good
13:58:16FromGitter<zacharycarter> I'll update nim and test with your new gc araq
14:07:53FromGitter<zacharycarter> glm apparently doesn't work with devel nim
14:11:09FromGitter<zacharycarter> this is going to be problematic for me and others I imagine
14:11:23FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59cfa60b177fb9fe7e206e6f]
14:11:41FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59cfa61db59d55b82357962a]
14:13:53*sz0 joined #nim
14:15:08Araqzacharycarter: fix it, I changed quote do behaviour :P
14:15:17FromGitter<zacharycarter> help me
14:15:19FromGitter<zacharycarter> what do I do?
14:16:13FromGitter<zacharycarter> I don't even know what quote do did in the first place :P
14:23:05FromGitter<mratsim> Me too, I’m using quote do like this dog here: http://www.dumpaday.com/wp-content/uploads/2013/05/i-have-no-idea-what-Im-doing-meme-8.jpg
14:24:07Araqvar x = quote do: ...
14:24:09FromGitter<zacharycarter> hahaha
14:24:17Araqx[0] # skip nnkStmtList
14:24:24Araqnow it's just 'x'
14:25:11FromGitter<zacharycarter> ah okay thanks
14:27:22FromGitter<Yardanico> Araq: so if I have some code snippet which echoes something like "introduced bug" with gc:v2, I should report it?
14:30:08FromGitter<zacharycarter> well I fixed glm - not sure if I fixed it correctly or not
14:30:10Araqyardanico: yes
14:35:27FromGitter<zacharycarter> https://github.com/stavenko/nim-glm/pull/31
14:37:23Araqzacharycarter: that looks correct but not compatible with older Nim's
14:37:26Araqinstead do
14:37:42Araqproc myhead(n: NimNode): NimNode =
14:37:58Araq if n.kind == nnkStmtList and n.len == 1: result = n[0]
14:38:01Araq else: result = n
14:38:10Araqand replace 'head' with 'myhead'
14:41:10FromGitter<zacharycarter>  thanks Araq
14:44:56FromGitter<Yardanico> hmmm, is there a way to do "for" loop like this in C? (I'm porting a small library): ⏎ ⏎ ``` token->type != TOKEN_NONE; previous = token, token = next++) {``` [https://gitter.im/nim-lang/Nim?at=59cfade8177fb9fe7e209227]
14:45:16dom96That might break my book's code :\
14:45:39FromGitter<Yardanico> I don't really get that this for loop does
14:45:51FromGitter<Yardanico> (I mean I don't understand it)
14:46:42FromGitter<zacharycarter> gcv2 seems to be running fine with zengine :shipit: :P
14:46:53FromGitter<Yardanico> any messages "introduced bug" ?
14:46:56FromGitter<Yardanico> if no, it's very good :)
14:47:07FromGitter<Yardanico> I mean in console
14:47:24FromGitter<zacharycarter> nope!
14:47:42FromGitter<zacharycarter> still can't compile with -d:useRealtimeGC - dunno
14:50:43FromGitter<zacharycarter> any idea why I'd be getting these errors with that flag?
14:51:00FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59cfaf53177fb9fe7e209a0d]
14:56:31FromGitter<zacharycarter> so weird I get errors even trying to compile ```echo "hello world"``` with that flag
14:56:44FromGitter<zacharycarter> time to reinstall Nim maybe
14:58:19FromGitter<zacharycarter> ooo it has something to do with emcc setenv I think
15:03:11*Trustable joined #nim
15:03:18*azur_kind joined #nim
15:09:43FromGitter<mratsim> @Araq All tests green with gc:v2
15:10:38FromGitter<Yardanico> @Araq: it seems you want to make gc:v2 a new default gc (in the near future)?
15:15:07FromGitter<zacharycarter> I guess it has nothing to do with setenv.sh
15:15:17FromGitter<zacharycarter> does anyone else have emscripten installed and mind running a quick test for me?
15:15:23FromGitter<zacharycarter> trying to see if this problem is machine isolated or not
15:26:44Araqdom96: your book's code needs to be part of the testsuite
15:27:33*yglukhov joined #nim
15:29:43*def-pri-pub joined #nim
15:32:01*azur_kind quit (Ping timeout: 240 seconds)
15:32:12*yglukhov quit (Ping timeout: 258 seconds)
15:38:36FromGitter<Yardanico> LOL, I just had found why my ported to nim version of https://github.com/bmars/shunting-yard/blob/master/src/shunting-yard.c didn't work: I've put "while" in parse proc at the same ident level as for loop (was sleepy porting it)
15:39:08FromGitter<Yardanico> took me more than one hour to figure it out :P (well, it's my fault anyway)
15:39:21FromGitter<Yardanico> btw this C code is nice for me
15:39:27FromGitter<Yardanico> I can port it to nim :P
15:40:13FromGitter<brentp> hi all. I have a reduced example here: https://gist.github.com/brentp/3b85d9b307decd176d185851068a72d7 of a problem I'm hitting in wrapping a C lib. I'm initializing stuff in `make` but it's not being maintained outside the function. what am I missing?
15:51:01FromGitter<brentp> i I make it so that CSI.tbx is not a pointer, it works fine.
15:54:09FromGitter<mratsim> you should use result or return what you initialized
15:54:30FromGitter<Yardanico> is there a way to do something like "if (sscanf(c, "%m[0-9.]", &token.value)" in Nim? ⏎ I use ```nim ⏎ if (let data = parseWhile(expr, temp, {'0'..'9', '.'}, pos); data != 0) ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=59cfbe36f7299e8f53900882]
15:55:27FromGitter<Yardanico> so what would be the best way to do something like "(sscanf(c, "%m[0-9.]", &token.value)", and also fast? wrap it?
15:55:56FromGitter<Yardanico> I think parseWhile here copies string every time, maybe it's the case?
15:56:31FromGitter<Yardanico> You can see usage of C sscanf here: https://github.com/bmars/shunting-yard/blob/master/src/shunting-yard.c#L143
15:56:42FromGitter<zacharycarter> strscans
15:57:04FromGitter<zacharycarter> https://nim-lang.org/docs/strscans.html
15:57:10FromGitter<Yardanico> nah, it wouldn't work for this :( I can't understand how to match a set of chars with scanf macro
15:57:30FromGitter<zacharycarter> why wouldn't it work?
15:57:51FromGitter<Yardanico> well I can try with slices, but they require copy too (they will work with scanf then)
15:58:17*relax joined #nim
15:59:59Araqyardanico: parseutils.parseInt
16:02:15*claudiuinberlin joined #nim
16:05:02FromGitter<Yardanico> also, does "var seq" in proc arguments make a copy of sequence or not?
16:06:37FromGitter<Yardanico> hmm, it seems it doesn
16:15:17Araqhow could it make a copy? its point is to make the seq mutable so that changes write through
16:18:02*def-pri-pub quit (Quit: Leaving.)
16:20:47*relax quit (Ping timeout: 248 seconds)
16:22:34*sz0 quit (Quit: Connection closed for inactivity)
16:32:50*Sentreen quit (Ping timeout: 255 seconds)
16:39:46*solitudesf quit (Remote host closed the connection)
16:46:03*Sentreen joined #nim
17:29:28*yglukhov joined #nim
17:30:32*nsf joined #nim
17:32:11FromGitter<mratsim> Any idea to remove this insane XDeclaredButNotUsed when wrapping external libs? push does not work
17:32:22FromGitter<mratsim> (https://files.gitter.im/nim-lang/Nim/4Y1T/2017-09-30_19-31-24.png)
17:32:32*zachk joined #nim
17:33:41FromGitter<Yardanico> nim.cfg ?
17:34:06*yglukhov quit (Ping timeout: 258 seconds)
17:38:30FromGitter<mratsim> It would only works for me. seems like deactivating all hints with {.push hints:off.} works
17:45:41*miran joined #nim
17:48:04FromGitter<stisa> I think there's a `used` pragma for procs, I don't know if it works with enums
17:48:59FromGitter<mratsim> I think I would have to tag each of the possible values
17:52:58dom96Have you tried: {.push hints[XDeclaredButNotUsed]: off.}?
17:53:48*def-pri-pub joined #nim
17:54:24FromGitter<Yardanico> ahh
17:54:25FromGitter<Yardanico> yes
17:54:31FromGitter<Yardanico> it's probably "hints", not "hint"
18:03:48*TjYoco joined #nim
18:04:01Araqeither remove the enum fields that are unused or export the enum type
18:04:15Araqit's not a wrong warning, it's spot on.
18:08:01ArrrrWhat is this? https://github.com/nim-lang/Nim/blob/devel/compiler/parser.nim#L1042
18:09:04AraqArrrr: type X = distinct int with `+`, `==`, `-`
18:09:17Araqa secret untested feature
18:09:41ArrrrDamn
18:09:54Araqwhy damn?
18:10:01ArrrrLooks better than borrow pragma thing
18:12:49Araqit's not as flexible but I agree.
18:17:32FromGitter<Yardanico> woah
18:17:33FromGitter<Yardanico> :D
18:17:49FromGitter<Yardanico> I never imagined there are hidden features in the compilers, goddamn!
18:20:23FromGitter<Yardanico> but yeah, it's not very flexible it seems
18:20:38FromGitter<Yardanico> I can't do that with it: https://nim-lang.org/docs/manual.html#distinct-type-modelling-currencies :)
18:21:13FromGitter<Yardanico> ```type Euro = distinct int with `+`, `-`, `*`, `div`, `mod`, `<`, `<=`, `==```` ⏎ ⏎ Euro can be added to int then [https://gitter.im/nim-lang/Nim?at=59cfe099177fb9fe7e2181b7]
18:22:48FromGitter<Yardanico> but still cool
18:24:08FromGitter<Yardanico> yay! https://github.com/nim-lang/Nim/commit/b2c358be96e496c37f4d02b0e886a06ed503af9e
18:26:15Araqyardanico: so ... --gc:v2 bug report?
18:27:00FromGitter<Yardanico> well, it was in 1 or 2 days old devel, but after updating it today I don't get this bug message anymore
18:27:18FromGitter<Yardanico> oh wait
18:27:37Araqoh I forgot to tell you, you need to compile with -d:useSysAssert -d:useGcAssert for extra stress testing
18:27:51FromGitter<Yardanico> ok, I'll update to newer devel now, and then test it again :)
18:28:23*yglukhov joined #nim
18:30:43*def-pri-pub quit (Quit: Leaving.)
18:32:19dom96oh, so `with` is a keyword? :\
18:32:29Araqdom96: not anymore
18:32:34FromGitter<Yardanico> not anymore, there's a blanket!
18:32:54FromGitter<Yardanico> (phrase from offtopic: https://www.youtube.com/watch?v=xuCn8ux2gbs)
18:33:27*n0xff joined #nim
18:37:21FromGitter<Yardanico> hmm, @Araq, I'm getting "lib\system\gc2.nim(42, 1) Error: undeclared identifier: 'iterToProc'" while trying to compile with gc v2
18:38:24FromGitter<Yardanico> ah, sorry
18:38:34FromGitter<Yardanico> there was an "--gc:stack" in my old nim.cfg
18:39:19FromGitter<Yardanico> @Araq, yeah, it doesn't error anymore even with asserts
18:46:23*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:49:20*dhalinar joined #nim
18:52:56*claudiuinberlin joined #nim
18:56:53FromGitter<edubart> what's the difference between gc2 and gc?
18:58:59FromGitter<edubart> hmm just read above in the chat, it works incrementally, for realtime usage
19:02:38FromGitter<Yardanico> not only for it
19:12:35*ShalokShalom_ is now known as ShalokShalom
19:13:07subsetparkCan I get access to to the value of `--app` in my source?
19:21:46FromGitter<stisa> subsetpark https://nim-lang.org/docs/system.html#appType maybe?
19:22:37subsetparkyep, should do it!
19:23:08*SunDwarf quit (Quit: Discord > IRC)
19:23:50*SunDwarf joined #nim
19:43:53*vlad1777d quit (Ping timeout: 246 seconds)
19:44:04*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
19:45:09*vlad1777d joined #nim
19:46:39*Snircle joined #nim
19:52:54*Ven`` quit (Ping timeout: 246 seconds)
19:59:39*libman joined #nim
20:03:14*def-pri-pub joined #nim
20:08:04*def-pri-pub quit (Client Quit)
20:13:18*solitudesf joined #nim
20:32:43*vlad1777d quit (Remote host closed the connection)
20:35:27*xet7 joined #nim
20:38:05*miran quit (Ping timeout: 240 seconds)
20:43:54FromGitter<Yardanico> yay, everything with bad style of spacing between calls will be broken :P ⏎ e.g. some ( call ("hello"))
20:43:58FromGitter<Yardanico> nothing bad tho
20:45:14Araqit caused deprecation warnings for a long time
20:45:36FromGitter<Yardanico> yeah, I know
20:45:42FromGitter<Yardanico> so nothing bad :)
20:50:01FromGitter<Yardanico> so yeah, I'm fine with that, I understand that you want to remove all old & deprecated cruft before 1.0
20:59:22FromGitter<Yardanico> hmm, I don't know if it's right, but nim x64 compiled with mingw-w64 (gcc 7.1) on windows is faster (to compile code) than nim x32 compiled with mingw gcc 4.9
21:06:41*dddddd quit (Ping timeout: 248 seconds)
21:09:49*dddddd joined #nim
21:10:09*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
21:12:40FromGitter<Varriount> How is that a surprise?
21:17:09Araqfun fact: in "Prey" the ingame PCs show Rust source code listings
21:17:23FromGitter<Yardanico> is it written in Rust?
21:17:36FromGitter<Yardanico> ah, no
21:17:40FromGitter<Yardanico> it's CryEngine 4
21:17:52FromGitter<Yardanico> @Varriount well I thought it wouldn't be a lot faster :P
21:18:55Araqit's a dystopia, hence Rust. for utopias they would use Nim
21:19:05AraqXD
21:19:44*Arrrr quit (Read error: Connection reset by peer)
21:19:51*Ven`` joined #nim
21:19:59FromGitter<Yardanico> fair point!
21:20:24Araqbut it's cool that they assume in the future it won't be C++ anymore :D
21:22:59FromGitter<Yardanico> woah, I wonder how many years it would be before we'll get any AAA-level engine written not in C++/C :P
21:23:04FromGitter<Yardanico> (game engine)
21:23:12FromGitter<Bennyelg> Hey, I need help, Something weird is happening :D ⏎ I wrote package called nimPresto. ⏎ I tested it, I ran it from the model itself, all is fine, but when I installed it using nimble I am trying to do the same thing but instead of seq[Table[string, string]] I get something very weird! ⏎ @[(data: ...counter: ...)] Any clue? [https://gitter.im/nim-lang/Nim?at=59d00b3f7b7d98d30d582172]
21:23:31FromGitter<Yardanico> @Bennyelg your package needs to "export tables" so user don't need to import tables
21:23:40FromGitter<Yardanico> but usually it's better to say to the user that he should import it explicitely
21:24:09*Demos joined #nim
21:24:31*Demos quit (Client Quit)
21:24:47FromGitter<Bennyelg> Oh so I just need import tables?
21:25:08FromGitter<Yardanico> @Bennyelg yes
21:25:10FromGitter<Bennyelg> If I want it to be imported inside my package
21:25:15*Demos joined #nim
21:25:19FromGitter<Bennyelg> and let the user no worries about it ?
21:25:25FromGitter<Yardanico> use "export tables" then
21:25:45FromGitter<Yardanico> @Bennyelg https://nim-lang.org/docs/manual.html#modules-export-statement
21:25:50FromGitter<Bennyelg> cheers
21:29:03*Demos quit (Client Quit)
21:29:19*Demos joined #nim
21:30:11FromGitter<Yardanico> wtf are these people: https://github.com/codeplea/tinyexpr/issues/30
21:30:28FromGitter<Yardanico> he wants this project to have GNU license instead of Zlib :D
21:30:34FromGitter<Yardanico> sorry, no more offtop
21:30:45FromGitter<Yardanico> need to benchmark my math expression evaluator vs this one
21:32:12FromGitter<Yardanico> also, is it true for all evaluators that parsing + evaluating a parsed expression is slower than just evaluating it in-place?
21:33:53*Sentreen quit (Ping timeout: 248 seconds)
21:37:00*yglukhov quit (Remote host closed the connection)
21:38:16FromGitter<Bennyelg> @Yardanico any chance that Nim parse a "json" like string to big `HASH` res ?
21:38:44FromGitter<Bennyelg> example: ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=59d00ee4f7299e8f5391707c]
21:38:56FromGitter<Bennyelg> eyJhY2NvdW50X3R5cGUiOiJ ⏎ wcml2YXRlIiwiYXJyaXZlZF9hdCI6MCwiYXZhaWxhYmxlX2JhbGFuY2UiOjQ1MCwiY2FuY2VsbGF0aW9uX3Njb3JlIjozLCJjb
21:38:57FromGitter<Bennyelg> ...
21:39:05FromGitter<Yardanico> well maybe you want base64?
21:39:22FromGitter<Yardanico> yeah
21:39:24FromGitter<Yardanico> it seems so
21:39:24FromGitter<Bennyelg> I didnt ask for it but it's look like something like that
21:39:35FromGitter<Yardanico> your string is base64-encoded, and nim has module for that
21:39:53FromGitter<Yardanico> @Bennyelg first example here https://nim-lang.org/docs/base64.html#encoding-data
21:40:24FromGitter<Bennyelg> Its very funny he encode the data when I fetch it
21:40:31FromGitter<Bennyelg> very interesting
21:40:34FromGitter<Yardanico> then decode it ? :)
21:40:50FromGitter<Yardanico> but decode and parse are different things
21:41:10FromGitter<Bennyelg> Yea, The strange thing is I didn't encode it in the first place
21:42:10FromGitter<Yardanico> well maybe your server sends it like that?
21:43:06FromGitter<Bennyelg> maybe
21:43:11FromGitter<Bennyelg> I'll check
21:43:36*plexigras left #nim ("WeeChat 1.9")
21:47:59*Sentreen joined #nim
21:48:50*yglukhov joined #nim
21:52:05*solitudesf quit (Ping timeout: 258 seconds)
21:53:46*yglukhov quit (Ping timeout: 264 seconds)
21:54:35*nhywyll joined #nim
21:58:31*TjYoco quit (Quit: Leaving)
22:01:51*derlafff quit (Quit: No Ping reply in 180 seconds.)
22:03:16*derlafff joined #nim
22:07:04*TjYoco joined #nim
22:10:09*derlafff quit (Quit: No Ping reply in 180 seconds.)
22:11:18*derlafff joined #nim
22:13:28*crem quit (Ping timeout: 240 seconds)
22:15:41*gokr quit (Ping timeout: 240 seconds)
22:23:52*Demos_ joined #nim
22:24:32*Demos_ quit (Client Quit)
22:27:45*Demos quit (Ping timeout: 248 seconds)
22:32:28FromGitter<Yardanico> would "parseFloat" from strutils fail to parse a 64-bit float on 32bit system?
22:33:44FromGitter<Yardanico> ah, yes
22:34:18FromGitter<Yardanico> (since it uses parseFloat from parseutils, which uses parseBiggestFloat from parseutils)
22:36:06*jsgrant left #nim (#nim)
22:38:51*jsgrant joined #nim
22:42:48*mahsav joined #nim
22:44:30*PMunch quit (Quit: leaving)
22:51:30*dhalinar quit (Ping timeout: 258 seconds)
22:58:09*enthus1ast- joined #nim
23:06:31*Trustable quit (Remote host closed the connection)
23:09:02enthus1ast-does anyone has tried the NESM macros with -d:release flag? This seems to break it. Or is this not intendet to be used in production?
23:10:13enthus1ast-is the generated code maybe for "copy and paste"?
23:18:20*dhalinar joined #nim
23:19:42*Demos joined #nim
23:25:21*Ven`` quit (Ping timeout: 240 seconds)
23:26:10*Ven`` joined #nim
23:28:01*taaperotassu quit (Ping timeout: 248 seconds)
23:30:18*Demos_ joined #nim
23:32:22*Demos quit (Ping timeout: 260 seconds)
23:36:40*taaperotassu joined #nim
23:42:51*Demos_ quit (Quit: Demos_)
23:50:52*yglukhov joined #nim
23:51:16*nsf quit (Quit: WeeChat 1.9)
23:55:01*yglukhov quit (Ping timeout: 240 seconds)
23:57:13enthus1ast-if compiled with the -d:release flag no NESM implementation gets written in the nimcache *.c files.