00:00:05 | FromGitter | <zacharycarter> IMO anyways |
00:00:17 | FromGitter | <zacharycarter> having global access to the timer is way too convenient not to do it that way IMO |
00:00:20 | def-pri-pub | What was the problem that the timer was causing? |
00:00:38 | * | ipjk quit (Read error: Connection reset by peer) |
00:00:59 | FromGitter | <zacharycarter> I was writing some network code and I needed it in global scope because I needed to access it in callbacks |
00:02:28 | def-pri-pub | Well, the problem is that I need that Timer for many other things. |
00:02:33 | def-pri-pub | i'm trying to think of a compromise |
00:02:39 | def-pri-pub | What if there was one global "main," timer |
00:03:37 | FromGitter | <zacharycarter> I don't love the idea but let me think about it |
00:03:44 | def-pri-pub | I think I talked about creating a global engine object in the ticket: |
00:03:45 | def-pri-pub | https://github.com/zacharycarter/zengine/issues/21#issuecomment-323240865 |
00:03:54 | FromGitter | <zacharycarter> yeah this I don't really want to do :/ |
00:04:09 | FromGitter | <zacharycarter> I went this direction with frag and I really didn't like it |
00:04:17 | def-pri-pub | There are many terrible things we have to get something to work. |
00:04:56 | def-pri-pub | What 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:21 | FromGitter | <zacharycarter> the alternatives are bring your own timer and let zengine expose a single timer |
00:05:33 | FromGitter | <zacharycarter> IMO zengine doesn't need to provide everything |
00:06:07 | skrylar | dont animations get handed timesteps from update() |
00:06:16 | def-pri-pub | yeha |
00:06:20 | def-pri-pub | yeah* |
00:06:29 | FromGitter | <zacharycarter> there is no update called from the game engine |
00:06:35 | FromGitter | <zacharycarter> you implement your own game loop |
00:07:12 | FromGitter | <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:23 | skrylar | so gamebryo :) |
00:07:48 | FromGitter | <zacharycarter> I'm not familiar |
00:08:30 | def-pri-pub | Well, 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:42 | FromGitter | <zacharycarter> okay I'll think about it |
00:10:02 | FromGitter | <zacharycarter> skrylar: zengine is supposed to be akin to XNA |
00:10:10 | FromGitter | <zacharycarter> for Nim |
00:10:22 | FromGitter | <zacharycarter> I hope that it's good for prototyping ideas |
00:11:36 | skrylar | ive 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:42 | skrylar | although it also had a lot of bugs from what i've heard |
00:12:00 | FromGitter | <zacharycarter> let me show you some example code from zengine |
00:12:02 | FromGitter | <zacharycarter> you'll get the idea |
00:12:09 | skrylar | i'm vaguely familiar with xna |
00:12:41 | skrylar | i just seem to be rather crap at game design lol |
00:13:17 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59cee19dcfeed2eb656959c1] |
00:13:31 | ehmry | has anyone done a libretro core in nim yet? |
00:16:14 | FromGitter | <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:05 | FromGitter | <zacharycarter> ? |
00:29:11 | skrylar | just a depressing world we live in, nevermind. |
00:29:17 | skrylar | trying to figure out how this hirise thing works |
00:31:57 | skrylar | I'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:09 | skrylar | allegedly hirise is really fast/good at this, but i'm finding the paper hard to read |
00:37:45 | skrylar | they 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:30 | skrylar | I guess they're just a learned matrix |
00:56:19 | FromGitter | <zacharycarter> def-pri-pub: https://github.com/zacharycarter/zengine/issues/51 |
01:03:33 | * | zachk quit (Quit: night zzzzZZzzzz) |
01:12:16 | def-pri-pub | zacharycarter: 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:43 | skrylar | i don't see why you need a global timer, but sdl has one so /shrug |
01:12:49 | skrylar | well, theirs is a 'seconds since sdl was initialized' |
01:13:29 | * | chemist69_ quit (Ping timeout: 255 seconds) |
01:13:50 | def-pri-pub | I also have to do some house cleaning now, so I'll be in and out |
01:15:01 | def-pri-pub | skrylar: 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:20 | def-pri-pub | zc wants a global timer for the networking stuff |
01:15:28 | def-pri-pub | (or global timing functions) |
01:15:39 | def-pri-pub | But I need a timing object for managing animations |
01:16:44 | def-pri-pub | And I think down the road game devs will need timers for things like cooldowns, (cut-scene animations), effects, etc. |
01:17:11 | def-pri-pub | Most app frameworks provide some sort of time measuring system, so I think it's only natural that we provide one as well. |
01:17:17 | def-pri-pub | And we need it. |
01:26:27 | def-pri-pub | zacharycarter: I skimmed over the PR, left some comments inline. |
01:26:34 | def-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:19 | FromGitter | <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:05 | FromGitter | <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:32 | PMunch | Hmm, 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:45 | PMunch | This 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:31 | Arrrr | i think let doesn't copy. |
09:32:18 | PMunch | That's what I thought as well, but it seems to speed up the program.. |
09:32:19 | PMunch | Hold on |
09:34:07 | PMunch | It seems it was only the normal variance in speed I was seeing |
09:34:17 | PMunch | Running it many times showed no significant difference |
09:34:38 | miran | PMunch: do you ask that because that's the line i use in my AoC solutions? :) |
09:34:50 | PMunch | Haha, yes |
09:35:01 | miran | thank you for your comment, much appreciated! |
09:35:38 | PMunch | Hmm, running it without --opt:size and -d:release did show a slight increase in speed when not using the let statement |
09:36:32 | PMunch | But 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:39 | Arrrr | mm maybe i was wrong https://glot.io/snippets/eu3pwvq9bt |
09:38:18 | miran | PMunch: 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:43 | PMunch | -d:release get's you halfway there, but --opt:speed gives a boost on top of that |
09:38:48 | PMunch | You also have --opt:size |
09:39:03 | * | yglukhov joined #nim |
09:40:49 | miran | for the most tasks, `time` shows 0.000s even without --opt:speed :) |
09:41:38 | PMunch | Arrrr, https://glot.io/snippets/eu3q1naish |
09:41:44 | * | yglukhov quit (Remote host closed the connection) |
09:41:48 | PMunch | That's closer to what the code was doing, and it seems like it copies |
09:42:37 | PMunch | miran, 0.000s for these tasks? |
09:42:39 | * | couven92 joined #nim |
09:43:09 | miran | not for day05 :) |
09:43:29 | miran | but for day01 and day02 sure |
09:43:31 | Arrrr | Ah yes, in that case it always copy by value |
09:46:28 | miran | PMunch: just tried your suggestion for moving the regex pattern out and the speedup is quite nice |
09:46:51 | miran | PMunch: on the other hand, i see no difference if i use --opt:speed or not |
09:46:53 | PMunch | Yeah, you're saving yourself from compiling an identical regex over and over |
09:48:40 | PMunch | Hmm, looking at the nre module it seems to return a RegexMatch with the original string in it, meaning it copies the string.. |
09:49:20 | miran | btw, is there a way to have a subgroups in a regex? |
09:49:31 | * | salewski joined #nim |
09:49:55 | miran | for example, in python i had this regex: r'\((\d+)x(\d+)\)' |
09:50:15 | salewski | PMunch, what are you talking? |
09:50:26 | salewski | >>>> -d:release get's you halfway there, but --opt:speed gives a boost on top of that |
09:50:31 | miran | and with `.group(1)` and `.group(2)` it is easy to extract each number |
09:50:57 | PMunch | Yeah, 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:59 | salewski | -d:release give fastest executable, see https://nim-lang.org/faq.html |
09:51:11 | PMunch | Or wait, maybe it was the other way around |
09:51:33 | salewski | If that is true, than we have to fix the docs! |
09:52:06 | PMunch | Okay, just checked and it was the other way round |
09:52:12 | PMunch | I first compiled with only --opt:speed |
09:52:51 | PMunch | In fact running with both -d:release and --opt:speed gave no discernible difference |
09:52:54 | salewski | OK. (We really should not confuse people.) |
09:53:15 | * | salewski quit (Client Quit) |
09:53:15 | PMunch | Yeah, sorry about that |
09:53:48 | PMunch | Hard to not confuse people when you've already confused yourself |
09:53:53 | miran | :) |
09:56:15 | PMunch | miran, just by looking at the documentation and seeing the data structures and such it is probably faster to use PEGs over NRE |
09:56:24 | PMunch | Assuming that their actual search speed is the same |
09:58:53 | miran | thanks, will look into that |
10:03:01 | FromGitter | <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:21 | PMunch | Wait, can pegs only capture up to 20 strings? |
10:12:54 | * | kobi7 joined #nim |
10:12:59 | kobi7 | hi |
10:13:08 | * | yglukhov joined #nim |
10:14:59 | kobi7 | let'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:08 | kobi7 | does nim have an existing solution for that? |
10:16:19 | kobi7 | iow, hooking to the proc in some way |
10:16:39 | miran | kobi7: something like decorators in python, i assume? |
10:16:43 | * | r4d0mbit joined #nim |
10:17:50 | kobi7 | truth is I don't know python very well |
10:18:07 | kobi7 | no, I mean implicitly without declaring anything |
10:18:37 | kobi7 | like setting a global variable or compiler directive |
10:18:49 | miran | ok |
10:18:55 | PMunch | kobi7, you can probably use a C profiling tool |
10:19:26 | kobi7 | oh, right |
10:19:47 | PMunch | https://github.com/nim-lang/Nim/wiki/Profiling |
10:20:34 | PMunch | And that links to this as well: https://nim-lang.org/docs/estp.html |
10:20:43 | kobi7 | Thanks |
10:20:58 | PMunch | So either valgrind (C profiling tool), or a built-in Nim solution :) |
10:21:18 | * | yglukhov quit (Remote host closed the connection) |
10:22:28 | kobi7 | cool |
10:22:38 | kobi7 | see 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:27 | FromGitter | <Yardanico> PMunch: are you sure about --opt:speed ? |
10:52:38 | PMunch | What do you mean? |
10:52:59 | PMunch | I already corrected myself and said that -d:release gives the same increase as -d:release --opt:speed |
10:53:06 | FromGitter | <Yardanico> ah, ok |
10:53:10 | PMunch | -d:release seems to imply --opt:speed |
10:53:47 | FromGitter | <Yardanico> yeah, because otherwise it would be slow :D |
10:56:33 | FromGitter | <Yardanico> also yeah, I saw "opt:speed" many times in nim repositories on github, it seems to be a pretty common mistake |
10:58:26 | PMunch | Well it's not really apparent what happens with -d:release.. |
10:58:42 | PMunch | So it's easier to just add --opt:speed than to try and figure it out :P |
10:59:13 | FromGitter | <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:28 | Arrrr | is defined here https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg#L50 |
11:31:26 | FromGitter | <dom96> @andreaferretti Your neo library doesn't seem to support common Vector operations like cross/dot product, is this by-design? |
11:39:50 | dom96 | And arraymancer has dot product but no cross product? :\ |
11:41:12 | dom96 | Looks like nim-glm is what I want |
11:42:05 | * | vlad1777d quit (Ping timeout: 240 seconds) |
11:52:55 | * | solitudesf joined #nim |
11:54:23 | PMunch | Hmm, 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:15 | dom96 | Anddd showstopper :\ https://github.com/nim-lang/Nim/issues/6455 |
12:09:03 | FromGitter | <mratsim> @dom96 neo dot product is `*` |
12:10:18 | FromGitter | <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:04 | FromGitter | <mratsim> I don’t think neo has cross product either though |
12:17:00 | FromGitter | <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:07 | federico3 | well... you can't |
12:22:04 | FromGitter | <ephja> there's a cross product operation for 3 and 7 dimensions |
12:22:17 | FromGitter | <ephja> I'm not sure how common the latter is :p |
12:22:26 | dom96 | oh well, I think these are overkill for my purposes anyway |
12:22:34 | dom96 | glm seems perfect |
12:22:40 | dom96 | if it worked with the cpp backend... |
12:31:15 | FromGitter | <zacharycarter> dom96: what are you making? |
12:32:09 | dom96 | https://github.com/dom96/tinyrenderer.nim |
12:32:31 | FromGitter | <zacharycarter> ah the software renderer cool |
12:33:12 | FromGitter | <zacharycarter> just FYI glm is suited for OpenGL |
12:33:28 | FromGitter | <zacharycarter> in that I believe it uses column major orientation for its matrices |
12:33:43 | FromGitter | <zacharycarter> so you need to account for that in your math |
12:34:25 | FromGitter | <zacharycarter> the transpose function may prove useful to you |
12:35:28 | dom96 | Ahh, good to know, thanks |
12:35:41 | FromGitter | <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:02 | federico3 | I need to slice a 3D tensor, which lib do you suggest between Arraymancer, neo, glm? |
12:59:36 | FromGitter | <zacharycarter> arraymancer IMO |
12:59:40 | FromGitter | <zacharycarter> I have zero experience with any of them |
12:59:51 | FromGitter | <zacharycarter> but arraymancer is actively worked on by @mratsim |
12:59:57 | FromGitter | <zacharycarter> and he's active which is important |
13:00:18 | FromGitter | <zacharycarter> plus I don't think glm has anything to do with tensors - not that it couldn't |
13:00:43 | federico3 | so it looks like |
13:01:08 | FromGitter | <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:22 | FromGitter | <mratsim> Arraymancer’s slice syntax is there: https://mratsim.github.io/Arraymancer/#features-slicing |
13:03:18 | FromGitter | <mratsim> 3d tensors display is like this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59cf9615cfeed2eb656c18ff] |
13:10:05 | FromGitter | <zacharycarter> @dom96 I think I found a bug in the example sdl2 code |
13:10:10 | FromGitter | <exts> Is there a ffmpeg library out there for nim? |
13:10:31 | FromGitter | <zacharycarter> https://github.com/nim-lang/sdl2/blob/master/examples/sdl_opengl_example.nim#L102-L109 |
13:10:34 | FromGitter | <zacharycarter> frametime never gets reset to 0 |
13:12:34 | FromGitter | <zacharycarter> I dont' think so @exts |
13:12:38 | FromGitter | <mratsim> @exts I don’t think so |
13:12:40 | * | relax joined #nim |
13:13:11 | FromGitter | <mratsim> What do you need it for? |
13:13:53 | FromGitter | <exts> video stuff |
13:14:32 | FromGitter | <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:14 | FromGitter | <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:29 | FromGitter | <exts> just split a video into two parts via cmd line, was going to use nim to simplify that cmd |
13:15:47 | FromGitter | <zacharycarter> @exts you could wrap the ffmpeg c library |
13:15:51 | FromGitter | <zacharycarter> probably would be a lot of work |
13:15:58 | FromGitter | <exts> yeah |
13:16:16 | FromGitter | <exts> I'm rusty, haven't done any of that in a while as well. >1year |
13:16:27 | FromGitter | <zacharycarter> I could help / offer guidance |
13:16:28 | FromGitter | <mratsim> This should be easier than pure ffmpeg: https://github.com/FFMS/ffms2 |
13:16:53 | FromGitter | <zacharycarter> yeah looks easier |
13:17:02 | FromGitter | <exts> interesting |
13:17:29 | FromGitter | <mratsim> usage in a python lib ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59cf9968177fb9fe7e203c5e] |
13:17:34 | FromGitter | <mratsim> and there is a trim function |
13:18:11 | FromGitter | <mratsim> api is there: https://github.com/FFMS/ffms2/blob/master/doc/ffms2-api.md |
13:19:36 | FromGitter | <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:34 | FromGitter | <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:08 | FromGitter | <zacharycarter> hrm using the realtime gc with emscripten and wasm causes issues :/ |
13:42:14 | FromGitter | <mratsim> How to compare if 2 ref objects are the same without doing deep comparisons? |
13:42:27 | FromGitter | <mratsim> Do I have to cast it to ByteAddress? |
13:42:35 | FromGitter | <zacharycarter> ```#include <mach/mach.h>`````` |
13:42:38 | FromGitter | <mratsim> (https://files.gitter.im/nim-lang/Nim/Xx66/2017-09-30_15-40-56.png) |
13:47:53 | FromGitter | <zacharycarter> @mratsim I can't think of a better way than doing what you just asked |
13:48:13 | Araq | you guys need to test --gc:v2 and report issues |
13:48:32 | FromGitter | <zacharycarter> okay |
13:48:54 | FromGitter | <zacharycarter> can you explain a little bit about this GC to me Araq? |
13:49:43 | Araq | it supports -d:useRealtimeGC too |
13:49:54 | Araq | using an incremental M&S GC |
13:50:02 | FromGitter | <zacharycarter> okay |
13:50:02 | Araq | so cycles don't matter |
13:50:36 | Araq | and it can only free stuff after a full cycle, pathetic, but I will add support for immediate reclamations |
13:57:51 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/ORHv/Screen-Shot-2017-09-30-at-9.57.35-AM.png) |
13:57:54 | FromGitter | <zacharycarter> 59fps in the browser - pretty good |
13:58:16 | FromGitter | <zacharycarter> I'll update nim and test with your new gc araq |
14:07:53 | FromGitter | <zacharycarter> glm apparently doesn't work with devel nim |
14:11:09 | FromGitter | <zacharycarter> this is going to be problematic for me and others I imagine |
14:11:23 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59cfa60b177fb9fe7e206e6f] |
14:11:41 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59cfa61db59d55b82357962a] |
14:13:53 | * | sz0 joined #nim |
14:15:08 | Araq | zacharycarter: fix it, I changed quote do behaviour :P |
14:15:17 | FromGitter | <zacharycarter> help me |
14:15:19 | FromGitter | <zacharycarter> what do I do? |
14:16:13 | FromGitter | <zacharycarter> I don't even know what quote do did in the first place :P |
14:23:05 | FromGitter | <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:07 | Araq | var x = quote do: ... |
14:24:09 | FromGitter | <zacharycarter> hahaha |
14:24:17 | Araq | x[0] # skip nnkStmtList |
14:24:24 | Araq | now it's just 'x' |
14:25:11 | FromGitter | <zacharycarter> ah okay thanks |
14:27:22 | FromGitter | <Yardanico> Araq: so if I have some code snippet which echoes something like "introduced bug" with gc:v2, I should report it? |
14:30:08 | FromGitter | <zacharycarter> well I fixed glm - not sure if I fixed it correctly or not |
14:30:10 | Araq | yardanico: yes |
14:35:27 | FromGitter | <zacharycarter> https://github.com/stavenko/nim-glm/pull/31 |
14:37:23 | Araq | zacharycarter: that looks correct but not compatible with older Nim's |
14:37:26 | Araq | instead do |
14:37:42 | Araq | proc myhead(n: NimNode): NimNode = |
14:37:58 | Araq | if n.kind == nnkStmtList and n.len == 1: result = n[0] |
14:38:01 | Araq | else: result = n |
14:38:10 | Araq | and replace 'head' with 'myhead' |
14:41:10 | FromGitter | <zacharycarter> thanks Araq |
14:44:56 | FromGitter | <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:16 | dom96 | That might break my book's code :\ |
14:45:39 | FromGitter | <Yardanico> I don't really get that this for loop does |
14:45:51 | FromGitter | <Yardanico> (I mean I don't understand it) |
14:46:42 | FromGitter | <zacharycarter> gcv2 seems to be running fine with zengine :shipit: :P |
14:46:53 | FromGitter | <Yardanico> any messages "introduced bug" ? |
14:46:56 | FromGitter | <Yardanico> if no, it's very good :) |
14:47:07 | FromGitter | <Yardanico> I mean in console |
14:47:24 | FromGitter | <zacharycarter> nope! |
14:47:42 | FromGitter | <zacharycarter> still can't compile with -d:useRealtimeGC - dunno |
14:50:43 | FromGitter | <zacharycarter> any idea why I'd be getting these errors with that flag? |
14:51:00 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59cfaf53177fb9fe7e209a0d] |
14:56:31 | FromGitter | <zacharycarter> so weird I get errors even trying to compile ```echo "hello world"``` with that flag |
14:56:44 | FromGitter | <zacharycarter> time to reinstall Nim maybe |
14:58:19 | FromGitter | <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:43 | FromGitter | <mratsim> @Araq All tests green with gc:v2 |
15:10:38 | FromGitter | <Yardanico> @Araq: it seems you want to make gc:v2 a new default gc (in the near future)? |
15:15:07 | FromGitter | <zacharycarter> I guess it has nothing to do with setenv.sh |
15:15:17 | FromGitter | <zacharycarter> does anyone else have emscripten installed and mind running a quick test for me? |
15:15:23 | FromGitter | <zacharycarter> trying to see if this problem is machine isolated or not |
15:26:44 | Araq | dom96: 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:36 | FromGitter | <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:08 | FromGitter | <Yardanico> took me more than one hour to figure it out :P (well, it's my fault anyway) |
15:39:21 | FromGitter | <Yardanico> btw this C code is nice for me |
15:39:27 | FromGitter | <Yardanico> I can port it to nim :P |
15:40:13 | FromGitter | <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:01 | FromGitter | <brentp> i I make it so that CSI.tbx is not a pointer, it works fine. |
15:54:09 | FromGitter | <mratsim> you should use result or return what you initialized |
15:54:30 | FromGitter | <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:27 | FromGitter | <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:56 | FromGitter | <Yardanico> I think parseWhile here copies string every time, maybe it's the case? |
15:56:31 | FromGitter | <Yardanico> You can see usage of C sscanf here: https://github.com/bmars/shunting-yard/blob/master/src/shunting-yard.c#L143 |
15:56:42 | FromGitter | <zacharycarter> strscans |
15:57:04 | FromGitter | <zacharycarter> https://nim-lang.org/docs/strscans.html |
15:57:10 | FromGitter | <Yardanico> nah, it wouldn't work for this :( I can't understand how to match a set of chars with scanf macro |
15:57:30 | FromGitter | <zacharycarter> why wouldn't it work? |
15:57:51 | FromGitter | <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:59 | Araq | yardanico: parseutils.parseInt |
16:02:15 | * | claudiuinberlin joined #nim |
16:05:02 | FromGitter | <Yardanico> also, does "var seq" in proc arguments make a copy of sequence or not? |
16:06:37 | FromGitter | <Yardanico> hmm, it seems it doesn |
16:15:17 | Araq | how 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:11 | FromGitter | <mratsim> Any idea to remove this insane XDeclaredButNotUsed when wrapping external libs? push does not work |
17:32:22 | FromGitter | <mratsim> (https://files.gitter.im/nim-lang/Nim/4Y1T/2017-09-30_19-31-24.png) |
17:32:32 | * | zachk joined #nim |
17:33:41 | FromGitter | <Yardanico> nim.cfg ? |
17:34:06 | * | yglukhov quit (Ping timeout: 258 seconds) |
17:38:30 | FromGitter | <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:04 | FromGitter | <stisa> I think there's a `used` pragma for procs, I don't know if it works with enums |
17:48:59 | FromGitter | <mratsim> I think I would have to tag each of the possible values |
17:52:58 | dom96 | Have you tried: {.push hints[XDeclaredButNotUsed]: off.}? |
17:53:48 | * | def-pri-pub joined #nim |
17:54:24 | FromGitter | <Yardanico> ahh |
17:54:25 | FromGitter | <Yardanico> yes |
17:54:31 | FromGitter | <Yardanico> it's probably "hints", not "hint" |
18:03:48 | * | TjYoco joined #nim |
18:04:01 | Araq | either remove the enum fields that are unused or export the enum type |
18:04:15 | Araq | it's not a wrong warning, it's spot on. |
18:08:01 | Arrrr | What is this? https://github.com/nim-lang/Nim/blob/devel/compiler/parser.nim#L1042 |
18:09:04 | Araq | Arrrr: type X = distinct int with `+`, `==`, `-` |
18:09:17 | Araq | a secret untested feature |
18:09:41 | Arrrr | Damn |
18:09:54 | Araq | why damn? |
18:10:01 | Arrrr | Looks better than borrow pragma thing |
18:12:49 | Araq | it's not as flexible but I agree. |
18:17:32 | FromGitter | <Yardanico> woah |
18:17:33 | FromGitter | <Yardanico> :D |
18:17:49 | FromGitter | <Yardanico> I never imagined there are hidden features in the compilers, goddamn! |
18:20:23 | FromGitter | <Yardanico> but yeah, it's not very flexible it seems |
18:20:38 | FromGitter | <Yardanico> I can't do that with it: https://nim-lang.org/docs/manual.html#distinct-type-modelling-currencies :) |
18:21:13 | FromGitter | <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:48 | FromGitter | <Yardanico> but still cool |
18:24:08 | FromGitter | <Yardanico> yay! https://github.com/nim-lang/Nim/commit/b2c358be96e496c37f4d02b0e886a06ed503af9e |
18:26:15 | Araq | yardanico: so ... --gc:v2 bug report? |
18:27:00 | FromGitter | <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:18 | FromGitter | <Yardanico> oh wait |
18:27:37 | Araq | oh I forgot to tell you, you need to compile with -d:useSysAssert -d:useGcAssert for extra stress testing |
18:27:51 | FromGitter | <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:19 | dom96 | oh, so `with` is a keyword? :\ |
18:32:29 | Araq | dom96: not anymore |
18:32:34 | FromGitter | <Yardanico> not anymore, there's a blanket! |
18:32:54 | FromGitter | <Yardanico> (phrase from offtopic: https://www.youtube.com/watch?v=xuCn8ux2gbs) |
18:33:27 | * | n0xff joined #nim |
18:37:21 | FromGitter | <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:24 | FromGitter | <Yardanico> ah, sorry |
18:38:34 | FromGitter | <Yardanico> there was an "--gc:stack" in my old nim.cfg |
18:39:19 | FromGitter | <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:53 | FromGitter | <edubart> what's the difference between gc2 and gc? |
18:58:59 | FromGitter | <edubart> hmm just read above in the chat, it works incrementally, for realtime usage |
19:02:38 | FromGitter | <Yardanico> not only for it |
19:12:35 | * | ShalokShalom_ is now known as ShalokShalom |
19:13:07 | subsetpark | Can I get access to to the value of `--app` in my source? |
19:21:46 | FromGitter | <stisa> subsetpark https://nim-lang.org/docs/system.html#appType maybe? |
19:22:37 | subsetpark | yep, 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:54 | FromGitter | <Yardanico> yay, everything with bad style of spacing between calls will be broken :P ⏎ e.g. some ( call ("hello")) |
20:43:58 | FromGitter | <Yardanico> nothing bad tho |
20:45:14 | Araq | it caused deprecation warnings for a long time |
20:45:36 | FromGitter | <Yardanico> yeah, I know |
20:45:42 | FromGitter | <Yardanico> so nothing bad :) |
20:50:01 | FromGitter | <Yardanico> so yeah, I'm fine with that, I understand that you want to remove all old & deprecated cruft before 1.0 |
20:59:22 | FromGitter | <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:40 | FromGitter | <Varriount> How is that a surprise? |
21:17:09 | Araq | fun fact: in "Prey" the ingame PCs show Rust source code listings |
21:17:23 | FromGitter | <Yardanico> is it written in Rust? |
21:17:36 | FromGitter | <Yardanico> ah, no |
21:17:40 | FromGitter | <Yardanico> it's CryEngine 4 |
21:17:52 | FromGitter | <Yardanico> @Varriount well I thought it wouldn't be a lot faster :P |
21:18:55 | Araq | it's a dystopia, hence Rust. for utopias they would use Nim |
21:19:05 | Araq | XD |
21:19:44 | * | Arrrr quit (Read error: Connection reset by peer) |
21:19:51 | * | Ven`` joined #nim |
21:19:59 | FromGitter | <Yardanico> fair point! |
21:20:24 | Araq | but it's cool that they assume in the future it won't be C++ anymore :D |
21:22:59 | FromGitter | <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:04 | FromGitter | <Yardanico> (game engine) |
21:23:12 | FromGitter | <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:31 | FromGitter | <Yardanico> @Bennyelg your package needs to "export tables" so user don't need to import tables |
21:23:40 | FromGitter | <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:47 | FromGitter | <Bennyelg> Oh so I just need import tables? |
21:25:08 | FromGitter | <Yardanico> @Bennyelg yes |
21:25:10 | FromGitter | <Bennyelg> If I want it to be imported inside my package |
21:25:15 | * | Demos joined #nim |
21:25:19 | FromGitter | <Bennyelg> and let the user no worries about it ? |
21:25:25 | FromGitter | <Yardanico> use "export tables" then |
21:25:45 | FromGitter | <Yardanico> @Bennyelg https://nim-lang.org/docs/manual.html#modules-export-statement |
21:25:50 | FromGitter | <Bennyelg> cheers |
21:29:03 | * | Demos quit (Client Quit) |
21:29:19 | * | Demos joined #nim |
21:30:11 | FromGitter | <Yardanico> wtf are these people: https://github.com/codeplea/tinyexpr/issues/30 |
21:30:28 | FromGitter | <Yardanico> he wants this project to have GNU license instead of Zlib :D |
21:30:34 | FromGitter | <Yardanico> sorry, no more offtop |
21:30:45 | FromGitter | <Yardanico> need to benchmark my math expression evaluator vs this one |
21:32:12 | FromGitter | <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:16 | FromGitter | <Bennyelg> @Yardanico any chance that Nim parse a "json" like string to big `HASH` res ? |
21:38:44 | FromGitter | <Bennyelg> example: ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=59d00ee4f7299e8f5391707c] |
21:38:56 | FromGitter | <Bennyelg> eyJhY2NvdW50X3R5cGUiOiJ ⏎ wcml2YXRlIiwiYXJyaXZlZF9hdCI6MCwiYXZhaWxhYmxlX2JhbGFuY2UiOjQ1MCwiY2FuY2VsbGF0aW9uX3Njb3JlIjozLCJjb |
21:38:57 | FromGitter | <Bennyelg> ... |
21:39:05 | FromGitter | <Yardanico> well maybe you want base64? |
21:39:22 | FromGitter | <Yardanico> yeah |
21:39:24 | FromGitter | <Yardanico> it seems so |
21:39:24 | FromGitter | <Bennyelg> I didnt ask for it but it's look like something like that |
21:39:35 | FromGitter | <Yardanico> your string is base64-encoded, and nim has module for that |
21:39:53 | FromGitter | <Yardanico> @Bennyelg first example here https://nim-lang.org/docs/base64.html#encoding-data |
21:40:24 | FromGitter | <Bennyelg> Its very funny he encode the data when I fetch it |
21:40:31 | FromGitter | <Bennyelg> very interesting |
21:40:34 | FromGitter | <Yardanico> then decode it ? :) |
21:40:50 | FromGitter | <Yardanico> but decode and parse are different things |
21:41:10 | FromGitter | <Bennyelg> Yea, The strange thing is I didn't encode it in the first place |
21:42:10 | FromGitter | <Yardanico> well maybe your server sends it like that? |
21:43:06 | FromGitter | <Bennyelg> maybe |
21:43:11 | FromGitter | <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:28 | FromGitter | <Yardanico> would "parseFloat" from strutils fail to parse a 64-bit float on 32bit system? |
22:33:44 | FromGitter | <Yardanico> ah, yes |
22:34:18 | FromGitter | <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:02 | enthus1ast- | 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:13 | enthus1ast- | 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:13 | enthus1ast- | if compiled with the -d:release flag no NESM implementation gets written in the nimcache *.c files. |