00:03:12 | * | WhiskyRyan joined #nim |
00:05:04 | * | WhiskyRyan quit (Client Quit) |
00:05:58 | * | WhiskyRyan joined #nim |
00:14:25 | * | couven92 quit (Quit: Client Disconnecting) |
00:20:04 | * | [ui] quit (Quit: Connection closed for inactivity) |
00:24:16 | * | yglukhov joined #nim |
00:27:36 | krux02 | what is $('\0') supposed to return? |
00:28:00 | krux02 | it returns a string of length 1 but with a null terminator at intex 0 and that is kind of an invalid string |
00:28:27 | * | yglukhov quit (Ping timeout: 240 seconds) |
00:59:55 | * | Nobabs27 joined #nim |
01:08:43 | * | Nobabs27 quit (Quit: Leaving) |
01:11:01 | dom96 | demi-: no, the first 'pkgname' is already the encapsulating directory. |
01:11:22 | * | Nobabs27 joined #nim |
01:11:31 | demi- | ah, yeah i see; i was able to work it out -- thanks |
01:13:05 | * | yingjun joined #nim |
01:14:12 | * | chemist69 quit (Ping timeout: 240 seconds) |
01:17:30 | * | yingjun quit (Ping timeout: 245 seconds) |
01:25:27 | * | krux02 quit (Remote host closed the connection) |
01:28:25 | * | chemist69 joined #nim |
01:33:58 | * | WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
01:35:51 | * | WhiskyRyan joined #nim |
01:37:35 | * | WhiskyRyan quit (Client Quit) |
01:45:19 | * | mosORadi joined #nim |
02:03:34 | * | WhiskyRyan joined #nim |
02:04:33 | * | WhiskyRyan quit (Client Quit) |
02:06:06 | * | WhiskyRyan joined #nim |
02:08:15 | * | WhiskyRyan quit (Client Quit) |
02:09:11 | * | WhiskyRyan joined #nim |
02:09:21 | * | Nobabs27 quit (Quit: Leaving) |
02:11:21 | * | WhiskyRyan quit (Client Quit) |
02:14:48 | * | WhiskyRyan joined #nim |
02:14:53 | * | WhiskyRyan quit (Client Quit) |
02:25:57 | * | yglukhov joined #nim |
02:30:08 | * | yglukhov quit (Ping timeout: 240 seconds) |
02:35:46 | * | WhiskyRyan joined #nim |
02:36:01 | * | WhiskyRyan quit (Client Quit) |
02:44:22 | * | WhiskyRyan joined #nim |
02:47:24 | * | WhiskyRyan quit (Client Quit) |
03:07:35 | * | sz0 quit (Quit: Connection closed for inactivity) |
03:33:33 | ftsf | def-pri-pub, updated the PR |
03:33:35 | ftsf | err issue |
03:33:59 | ftsf | shmup, min max with 3 args seemed to go away in nim 0.17 |
03:34:01 | * | pilne quit (Quit: Quitting!) |
03:36:35 | * | girvo joined #nim |
04:03:53 | * | def-pri-pub quit (Quit: leaving) |
04:15:28 | * | yingjun joined #nim |
04:19:57 | * | yingjun quit (Ping timeout: 240 seconds) |
04:28:03 | * | yglukhov joined #nim |
04:32:47 | * | yglukhov quit (Ping timeout: 260 seconds) |
04:40:04 | * | mosORadi quit (Quit: Connection closed for inactivity) |
04:53:52 | * | yingjun joined #nim |
04:58:05 | * | yingjun quit (Ping timeout: 240 seconds) |
05:28:44 | * | dexterk__ quit (Read error: Connection reset by peer) |
05:29:11 | * | dexterk__ joined #nim |
05:35:35 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
05:52:19 | FromGitter | <Varriount> @krux02 Man, you just keep cranking out these compiler improvements. |
05:52:28 | FromGitter | <Varriount> And I can't accept them. >_< |
05:52:41 | FromGitter | <Varriount> Or rather, Araq is the one that must review them |
05:53:29 | * | Vladar joined #nim |
05:54:36 | * | yingjun joined #nim |
05:56:32 | Araq | I'm alive :-) |
05:57:09 | FromGitter | <ephja> oh hello |
05:59:23 | * | yingjun quit (Ping timeout: 260 seconds) |
06:00:13 | Araq | shmup: min([1,2,3]) continues to work, varargs was replaced by openArray |
06:34:31 | * | Arrrr joined #nim |
06:34:31 | * | Arrrr quit (Changing host) |
06:34:31 | * | Arrrr joined #nim |
06:35:20 | ftsf | Araq, aha, thanks |
06:40:47 | * | nsf joined #nim |
06:49:57 | * | Arrrr quit (Ping timeout: 240 seconds) |
06:50:24 | * | ftsf quit (Read error: Connection reset by peer) |
06:53:03 | * | Arrrr joined #nim |
06:53:03 | * | Arrrr quit (Changing host) |
06:53:03 | * | Arrrr joined #nim |
06:56:54 | * | girvo quit (Quit: leaving) |
07:18:02 | FromGitter | <ephja> @Araq https://gist.github.com/ephja/36d23a923dba403fe99f54e0e998a0e0 do you know about this one? |
07:23:00 | Araq | seems easy enough to fix |
07:23:03 | Araq | but it's a new one |
07:23:11 | FromGitter | <ephja> ok |
07:23:18 | * | yglukhov joined #nim |
07:24:13 | * | yglukhov quit (Remote host closed the connection) |
07:24:28 | * | yglukhov joined #nim |
07:27:46 | * | rauss quit (Quit: WeeChat 1.8) |
07:40:34 | * | benny___ joined #nim |
07:41:26 | benny___ | Hey, I implemented Mergesort on nim for my students next lecture. I need a quick review please |
07:41:29 | benny___ | https://gist.github.com/Bennyelg/da85a34c535f16d94633f494ed4720c4 |
07:45:00 | Araq | benny___: looks super slow :-) |
07:45:12 | benny___ | :D |
07:45:22 | Araq | floor + / is 'div' |
07:45:51 | benny___ | can you comment / modify the code? I'll be greatful |
07:47:53 | Araq | https://github.com/nim-lang/Nim/blob/devel/lib/pure/algorithm.nim#L163 |
07:48:18 | Araq | remove stuff you don't understand from this implementation and you'll get a decent implementation of it, I think |
07:51:27 | Araq | if you want it simpler, use at least 'lo, m, hi: int' instead of slicing (expensive) and avoid all these temporary sequence creations (expensive) |
07:51:55 | * | Parashurama joined #nim |
07:52:14 | * | noethics quit (Remote host closed the connection) |
07:52:35 | * | noethics joined #nim |
07:52:55 | Parashurama | hello everyone. |
07:53:02 | Araq | or start with your version and introduce the optimizations I mentioned step by step |
07:54:11 | Parashurama | Araq: Hey, I'm trying to add pragma support in VM. (mostly to add the possibility of disabling rangechecks at compiletime) |
07:55:17 | Parashurama | I think I found most of the needed steps for this, but I don't think I should modify gOptions, maybe a separate option stack? |
07:55:42 | Araq | depends on what you want to teach, but arguably these toy Haskell'ish sort implementations contain 50% of the design ideas behind the full sort algorithms ;-) |
07:56:35 | * | yingjun joined #nim |
07:56:35 | Araq | Parashurama: hmmm, want to do some heavier refactoring too? |
07:57:18 | Parashurama | Why not? It depends what need to be done. |
07:59:41 | Araq | .push/.pop pair should produce a better AST representation |
08:00:00 | Araq | and then it can be per statement, not only per proc |
08:00:09 | Araq | in fact, something like |
08:00:26 | Araq | with(checks=off): body |
08:00:50 | * | yingjun quit (Ping timeout: 245 seconds) |
08:00:50 | Araq | is the much better design but was avoided due to the excessive indentation it would require for long things |
08:01:17 | Araq | anyway, we can translate the pragma to a 'with' AST |
08:02:27 | Parashurama | That's interesting. I'm not sure how to start, but I'm willing to try. |
08:03:24 | Parashurama | Araq: btw I replied on https://github.com/nim-lang/Nim/issues/5903 |
08:04:20 | Parashurama | Also perhaps allow casting in VM between integer of the same size? |
08:06:11 | Parashurama | Araq: The new AST representation would now need a TOptions field per statement. |
08:07:53 | Araq | Parashurama: nah, just leave it as nested list of nkIdents and make a helper proc toOptions(n: PNode): tuple[on, off: TOptions] |
08:08:16 | Araq | the TOption stack still needs to be kept separately |
08:08:37 | Araq | for every pass that handles it but most passes have that (vmgen being an exception) |
08:10:08 | Araq | Parashurama: yeah some forms of 'cast' can easily be supported by the VM and are memorysafe |
08:13:29 | Parashurama | I'm still not really getting the full picture on how to implement the push/.pop change. |
08:21:20 | * | vlad1777d joined #nim |
08:22:57 | FromGitter | <mratsim> @Araq Is there any plan to push the `unroll` pragma in the near future? |
08:28:04 | Araq | mratsim, as a workaround do something like |
08:28:39 | Araq | iterator unroll(x: T): T = yield x; yield x; yield x; yield x or check what gc.nim does (helper template) |
08:29:00 | * | irrequietus joined #nim |
08:29:11 | FromGitter | <mratsim> Cool excellent idea |
08:31:52 | * | ftsf joined #nim |
08:44:57 | * | rokups joined #nim |
08:46:46 | Parashurama | Araq: Quick question do new optcodes in VM (ie opcCastInt) need to be appended in enum? (I doing the cast in VM thing for the moment) |
08:49:12 | Araq | Parashurama: meh, just use some existing opcCode |
08:49:19 | Araq | opcNarrow maybe |
08:49:35 | Araq | check what genConv() does |
08:49:54 | Araq | in fact, you might want to delegate all the work to genConv |
08:50:28 | * | sz0 joined #nim |
09:00:06 | FromGitter | <Varriount> benny___: Does it have to be recursive? |
09:01:41 | Araq | Varriount: The recursion could be left intact without much slowdown |
09:13:37 | * | irrequietus quit () |
09:13:48 | * | irrequietus joined #nim |
09:17:08 | FromGitter | <Varriount> @Araq Any ideas on how I can get either: A) get the JSON modules working at compile-time, or B) preventing "interpretation requires too many iterations"? |
09:18:04 | FromGitter | <Varriount> I'm just about ready to compile and call a utility program at compile time to do the JSON parsing for me. |
09:20:09 | Araq | marshal.to and 'from' or whatever it's called works at compiletime |
09:20:35 | Araq | got special VM love |
09:21:32 | Araq | I know we tell people "don't use marshal for json" but it works better than most other solutions for now and so will get some nice deprecation path |
09:21:38 | FromGitter | <Varriount> I guess I'll have to use that and a utility program. I'm reading non-marshal-format JSON |
09:21:59 | Araq | it's been designed for utility programs, in fact, so yeah |
09:22:04 | FromGitter | <Varriount> Araq: https://github.com/boto/botocore/tree/develop/botocore/data |
09:22:24 | FromGitter | <Varriount> Each of those directories contains JSON files describing an AWS service's API |
09:23:14 | FromGitter | <Varriount> And of course, the description schema is completely undocumented |
09:23:37 | * | chemist69 quit (Ping timeout: 255 seconds) |
09:26:18 | * | chemist69 joined #nim |
09:27:37 | FromGitter | <zacharycarter> wb Araq |
09:31:03 | * | enthus1ast joined #nim |
09:39:39 | * | benny___ quit (Remote host closed the connection) |
09:41:06 | * | couven92 joined #nim |
09:42:08 | * | Neomex joined #nim |
09:43:23 | * | benny___ joined #nim |
09:43:33 | * | benny___ quit (Remote host closed the connection) |
09:43:40 | * | benny___ joined #nim |
10:01:38 | * | Neomex quit (Quit: Leaving) |
10:05:26 | * | adeohluwa joined #nim |
10:13:02 | * | Neomex joined #nim |
10:55:17 | * | yglukhov quit (Remote host closed the connection) |
10:55:20 | rokups | Araq: this probably flew under your radar.. but be nice if you know.. some time.. https://github.com/nim-lang/Nim/issues/5507 ;) |
10:57:19 | * | yglukhov_ joined #nim |
10:58:47 | * | yingjun joined #nim |
10:58:55 | * | yglukhov_ quit (Remote host closed the connection) |
10:59:09 | * | yglukhov_ joined #nim |
10:59:43 | * | yglukhov_ quit (Remote host closed the connection) |
11:00:01 | * | fredrik92 joined #nim |
11:01:20 | * | skrylar joined #nim |
11:01:28 | * | fredrik92 quit (Client Quit) |
11:02:38 | * | Snircle joined #nim |
11:03:53 | * | yingjun quit (Ping timeout: 268 seconds) |
11:04:37 | * | fredrik92 joined #nim |
11:06:17 | * | couven92 quit (Disconnected by services) |
11:06:18 | * | fredrik92 is now known as couven92 |
11:06:19 | * | yglukhov joined #nim |
11:06:47 | * | fredrik92 joined #nim |
11:12:34 | * | couven92 quit (Quit: couven92) |
11:18:32 | * | Andris_zbx joined #nim |
11:22:28 | * | fredrik92 quit (Quit: Client disconnecting) |
11:30:08 | * | chemist69 quit (Ping timeout: 240 seconds) |
11:33:03 | * | chemist69 joined #nim |
11:35:07 | m712 | how can i echo without a newline? |
11:35:19 | Araq | stdout.write |
11:35:25 | m712 | okay |
11:35:55 | m712 | another question, how do I echo varargs as arguments? |
11:36:08 | m712 | can I "unpack" a vararg into arguments? |
11:41:00 | FromGitter | <zacharycarter> https://nim-by-example.github.io/varargs/ |
11:41:16 | FromGitter | <zacharycarter> think that's what you're looking to do m712 |
11:42:08 | FromGitter | <zacharycarter> and if not, I'm not quite sure I understand what you're trying to do |
11:42:34 | m712 | i'm trying to echo a vararg as a string |
11:43:55 | m712 | yeah that works |
11:44:08 | FromGitter | <zacharycarter> cool :D |
11:44:19 | ftsf | does closing a filestream close the file? |
11:44:34 | * | FromGitter * zacharycarter has no idea |
11:45:05 | ftsf | https://github.com/nim-lang/Nim/blob/master/lib/pure/streams.nim#L376 looks kinda like it does |
11:45:12 | ftsf | which explains the behaviour i'm seeing with writeConfig |
11:45:30 | FromGitter | <zacharycarter> looks like it definitely does if the file isn't nil |
11:45:35 | ftsf | https://github.com/cdunn2001/Nim/blob/117c983d13d4e6ff76c09d988cd5114294852ff0/lib/pure/parsecfg.nim#L539 writeConfig closes the filestream then closes the file (which is already closed) and it crashes |
11:45:54 | * | arnetheduck joined #nim |
11:45:57 | FromGitter | <zacharycarter> mmmm |
11:45:59 | FromGitter | <zacharycarter> good catch |
11:47:44 | ftsf | but do i remove the close file or close filestream? ;) |
11:48:22 | * | PMunch joined #nim |
11:49:20 | m712 | remove close file |
11:49:21 | m712 | because the filestream wouldn't be closed otherwise (?) |
11:49:21 | m712 | just guessing |
11:50:07 | ftsf | i'd go with removing the close filestream because the file is opened first, if newFileStream fails the file is still open |
11:50:42 | m712 | or just do if file == nil: or something |
11:51:15 | ftsf | it annoys me that newFileStream returns nil on failure rather than raising an exception like open does |
11:51:38 | m712 | inconsistent STL, nice |
11:57:14 | Araq | fits your abbrevs then :P |
11:57:26 | Araq | Nim "standard template library"? |
12:01:52 | * | yglukhov quit (Remote host closed the connection) |
12:02:49 | * | yglukhov joined #nim |
12:07:02 | PMunch | Hmm, after talking to coldtea over on HackerNews (https://news.ycombinator.com/item?id=14434900#14436245) I realised that it would be nice if the Nim doc generation tool could create a toggle on the generated output that changed between snake_case and camelCase. |
12:12:18 | * | benny___ quit (Remote host closed the connection) |
12:14:37 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
12:15:05 | * | benny___ joined #nim |
12:15:32 | Araq | PMunch: yeah but there are more interesting things left to do. |
12:16:35 | PMunch | Might PR it if I find the time |
12:22:18 | ftsf | any idea why nextNormal = (next - v).normal() causes an error where nextNormal = normal(next - v) does not? type mismatch: got (Vec2, Vec2) expected one of proc `-`[T](a, b: Vec2[T]): Vec2[T] |
12:27:05 | Araq | normal takes an untyped parameter and you didn't read the manual? |
12:28:21 | ftsf | proc normal*[T](a: Vec2[T]): Vec2[T] = is a generic type "untyped"? |
12:29:31 | Araq | no |
12:30:31 | Araq | sounds interesting, report it on github? |
12:30:39 | * | pilne joined #nim |
12:31:10 | Parashurama | Araq: tentative PR for int casting in VM: https://github.com/nim-lang/Nim/pull/5908 |
12:31:49 | ftsf | Araq, ok, will try and cut it down as much as I can for a test case. |
12:34:47 | Araq | Parashurama: so ... opcCastInt is 22 lines implementing a nop? |
12:37:54 | Parashurama | :) kinda! this kind of casting really means changing to node type, and not the integer value. |
12:42:17 | * | xet7 joined #nim |
12:43:05 | ftsf | https://gist.github.com/ftsf/37c93b0fbd768ea9122b5513e6d1b348 aha, so the problem is a variable with the same name as the proc |
13:09:38 | PMunch | Huh, that's weird :P |
13:25:47 | * | benny____ joined #nim |
13:26:05 | * | xet7 quit (Ping timeout: 240 seconds) |
13:27:30 | * | krux02 joined #nim |
13:29:26 | * | benny___ quit (Ping timeout: 246 seconds) |
13:41:14 | * | couven92 joined #nim |
13:55:22 | * | skrylar quit (Remote host closed the connection) |
13:59:37 | FromGitter | <zacharycarter> does anyone know of a decent website for doing screenshares? |
14:03:31 | * | benny____ quit (Remote host closed the connection) |
14:04:46 | krux02 | appear.in |
14:05:31 | FromGitter | <zacharycarter> thanks |
14:05:45 | * | yglukhov quit (Remote host closed the connection) |
14:06:13 | * | yglukhov joined #nim |
14:08:08 | * | yglukhov quit (Remote host closed the connection) |
14:11:17 | * | yglukhov joined #nim |
14:11:29 | * | yglukhov quit (Remote host closed the connection) |
14:11:42 | * | yglukhov joined #nim |
14:12:32 | * | yglukhov quit (Remote host closed the connection) |
14:18:07 | * | yglukhov joined #nim |
14:18:45 | krux02 | is there a way in nim to print the stacktrace instantly? |
14:31:59 | Parashurama | you can use getStackTrace() in system.nim in debug build |
14:32:19 | FromGitter | <ephja> this as well: https://nim-lang.org/docs/system.html#writeStackTrace, |
14:43:38 | * | couven92 quit (Ping timeout: 246 seconds) |
14:49:07 | shmup | ah, thanks Araq |
14:49:56 | shmup | ftsf: figured out most of my probs. didn't realize I'd have to compile my own sdl2_gfx and for the longest time was trying to compile sdl_gfx (not sdl2) and was a no go. learning a lot of non-nim-related-things :) |
14:50:34 | ftsf | shmup, sorry the process isn't very streamlined at the moment =( |
14:51:56 | shmup | heh it's realyl just about knowledge gaps I have. not to mention I'm not used to doing this stuff from windows, needing to use visual studio to compile needed dlls, adding them to my system32, etc. normally on macos. |
14:52:00 | shmup | @ ftsf |
14:52:14 | shmup | where things are kinda hand-fed to me :P |
14:52:17 | ftsf | mmm yeah i do all my dev on linux, windows seems like a pain |
14:52:47 | ftsf | you can get the SDL2.dll from https://www.libsdl.org/download-2.0.php shouldn't have to compile it |
14:52:53 | ftsf | runtime binaries |
14:53:27 | shmup | something I found odd is, I compiled an example sdl thing with --cpu:i386 and yet it still looks in my SysWOW64 for SDL2.dll, not system32 |
14:53:41 | shmup | yeah ftsf I was able to grab sdl2 that way, just not sdl2_gfx |
14:54:28 | ftsf | oh ok, don't think anything really uses sdl2_gfx |
14:55:21 | shmup | ha oh?? dang, was just sdl2-nim example then. not nico |
14:55:32 | shmup | i'll make those changes to nico if you'd like |
14:55:37 | shmup | unless you already did |
14:55:42 | shmup | re: min/max |
14:55:49 | ftsf | ahh i haven't yet, but i shall do that |
14:57:55 | FromGitter | <zacharycarter> think I'm going to start working on 3d for frag this evening |
14:58:01 | ftsf | shmup, pushed |
14:58:13 | ftsf | zacharycarter \o/ awesome |
14:58:25 | ftsf | i'm about to start work on my 3d game! |
14:58:31 | FromGitter | <zacharycarter> nice! |
14:58:33 | ftsf | maybe i should use frag |
14:58:37 | shmup | i am just really impressed with vektor2089, how long have you been working on it? |
14:58:41 | shmup | ty xo ftsf |
14:58:51 | ftsf | shmup, cheers, started the pico8 prototype about 2 years ago |
14:58:54 | FromGitter | <zacharycarter> ftsf: I'd wait until I get 3 fleshed out haha |
14:58:57 | FromGitter | <zacharycarter> 3d* |
14:59:08 | FromGitter | <zacharycarter> although I do plan on doing quite a bit with 3d if I can find the time / energy |
14:59:16 | krux02 | I found a very interesting video about the internals of super mario 64 |
14:59:27 | krux02 | it explains how the physics work |
14:59:31 | ftsf | krux02, yeah i just watched that! so cool |
14:59:47 | FromGitter | <zacharycarter> we need a good 3d physics engine |
14:59:53 | FromGitter | <zacharycarter> who wants to wrap bullet |
14:59:55 | * | FromGitter * zacharycarter puts finger on nose |
15:00:06 | krux02 | it is targeted towards speedrunners (and glich seekers) but it also explains a lot when you want to build an engine |
15:00:09 | ftsf | homegrown physics is much more fun! ;) |
15:00:20 | ftsf | like that mario 64 one |
15:00:49 | krux02 | homegrown physics is not only much more fun, it is also a requirement when you want to have a human |
15:00:52 | FromGitter | <zacharycarter> port https://github.com/RandyGaul/qu3e |
15:00:52 | FromGitter | <zacharycarter> ? |
15:01:08 | krux02 | humans in games are hacked in, they never behave physically correct |
15:01:58 | * | yingjun joined #nim |
15:02:55 | FromGitter | <zacharycarter> ftsf: you could use krux02's opengl playground mabye |
15:02:58 | FromGitter | <zacharycarter> maybe* |
15:03:04 | FromGitter | <zacharycarter> sandbox rather |
15:04:46 | shmup | ftsf: oh, right. same problem with your paintout example. the sdl2.gamecontroller gameControllerAddMappingsFromFile is an undeclared identifier |
15:04:55 | krux02 | yea the playground |
15:05:03 | krux02 | new version of Nim broke the compatibility |
15:05:13 | krux02 | doesn't compile anymore |
15:05:53 | krux02 | https://github.com/nim-lang/Nim/issues/5845 |
15:06:05 | * | yingjun quit (Ping timeout: 240 seconds) |
15:07:10 | ftsf | shmup, get the sdl2 from https://github.com/ftsf/sdl2 |
15:08:26 | shmup | oh, opposed to the wrapper in nim-lang/sdl2 ? |
15:08:29 | shmup | @ ftsf |
15:08:46 | krux02 | Well I use the wrapper nim-lang/sdl2 |
15:08:58 | ftsf | yep, it's the same, just i've added some missing functions |
15:08:59 | krux02 | I can't really recommend it, it feels like a bad quality wrapper |
15:09:11 | krux02 | it works, but it doesn't feel well crafted |
15:09:13 | ftsf | krux02, i agree, it needs a lot of work |
15:09:17 | shmup | there is another one but haven't looked really |
15:09:20 | shmup | https://github.com/Vladar4/sdl2_nim |
15:09:31 | ftsf | and it doesn't really keep up to date with SDL2 development |
15:12:13 | krux02 | I think the version in nimble should match the SDL version it wrapps |
15:12:15 | FromGitter | <zacharycarter> what compiler does Nim try to use by default on Windows? |
15:12:28 | FromGitter | <zacharycarter> whatever is in the PATH? |
15:12:31 | krux02 | I think it is mingw |
15:12:58 | FromGitter | <zacharycarter> hrm, seems like with a Nim 64 bit install it's using the VC++ 32 bit compiler |
15:13:02 | FromGitter | <zacharycarter> if mingw isn't installed |
15:13:23 | FromGitter | <zacharycarter> or whatever the 32 bit c compiler is in the VC++ toolchain |
15:13:28 | krux02 | isn't mingw bundled in windows? |
15:13:34 | FromGitter | <zacharycarter> nope |
15:15:35 | * | nsf quit (Quit: WeeChat 1.7.1) |
15:19:39 | * | Trustable joined #nim |
15:21:10 | shmup | I'll have to explore more later ftsf, did see I needed SDL2_Mixer, but now its just: |
15:21:13 | shmup | system.nim(2656) sysFatal |
15:21:14 | shmup | Error: unhandled exception: index out of bounds [IndexError] |
15:21:44 | FromGitter | <andreaferretti> I am trying to mangle some identifiers using c2nim |
15:22:07 | FromGitter | <andreaferretti> The rule I use is simply `#mangle "{.*}'_'" "$1"` |
15:22:08 | ftsf | shmup, i think that's because of a bug in stb_image i just reported. it means it can't find the font.png |
15:22:20 | FromGitter | <andreaferretti> It is meant to strip a `_` prefix |
15:22:29 | FromGitter | <andreaferretti> but it seems it doesn't work |
15:22:37 | ftsf | shmup, what are you running? |
15:23:59 | shmup | windows 10, if that's what you meant |
15:24:07 | ftsf | ahh i mean the command you run when you get that error? |
15:24:18 | shmup | ./examples/paintout.exe |
15:24:41 | ftsf | cp assets into examples |
15:25:08 | ftsf | or paintout into the nico dir |
15:25:15 | shmup | ftsf: https://gist.github.com/shmup/37c285c12ebaa0d5dfec8e2aaf3561cd |
15:25:19 | shmup | for more stacktrace |
15:25:23 | shmup | okay will do |
15:25:48 | shmup | lol ftsf++ ok |
15:25:54 | shmup | works. |
15:26:05 | ftsf | yeah, known issue with stb_image, it gets an index error when the file can't be opened |
15:26:20 | ftsf | excellent |
15:26:24 | shmup | we just wanna throw an exception yeah? |
15:27:14 | FromGitter | <andreaferretti> nevermind, I have done with `#suffix` |
15:27:55 | demi- | I seem to be having an issue with how my macros are getting parsed: https://gist.github.com/samdmarshall/7cb67d131893c87683a2d6581390c18b |
15:33:41 | ftsf | shmup, i think so |
15:39:02 | * | FromGitter * zacharycarter wishes frag was as easy to get going with as nico |
15:39:08 | FromGitter | <zacharycarter> I need an automated installer :P |
15:39:30 | ftsf | i haven't tried frag yet, nico isn't exactly easy to get going... hopefully soon it'll just be a nimble install nico |
15:39:38 | FromGitter | <zacharycarter> frag relies on bgfx |
15:39:44 | FromGitter | <zacharycarter> so no matter what you'll have to build bgfx |
15:39:53 | ftsf | ahh |
15:40:00 | FromGitter | <zacharycarter> for better or worse we tied ourselves to bgfx |
15:40:11 | ftsf | no distro packages |
15:40:30 | FromGitter | <zacharycarter> unfortunately not, plus I've customized bgfx somewhat |
15:40:40 | FromGitter | <zacharycarter> so we maintain our own fork |
15:41:28 | ftsf | ahh |
15:41:36 | ftsf | not accepting your changes upstream? |
15:42:17 | FromGitter | <zacharycarter> I'm doing a bit of hacky things to get android / NanoVG working |
15:42:21 | FromGitter | <zacharycarter> so I don't expect him to |
15:42:33 | krux02 | zacharycarter do you put bgfx in a subtree/submodule then? |
15:42:45 | FromGitter | <zacharycarter> yup |
15:42:55 | krux02 | that's good |
15:43:03 | FromGitter | <zacharycarter> I just need to write automated install scripts to build / install it for every os |
15:43:19 | FromGitter | <zacharycarter> the problem is the whole gcc toolchain on windows |
15:43:26 | FromGitter | <zacharycarter> I expect users to have that installed |
15:43:41 | FromGitter | <zacharycarter> otherwise it's rather trivial |
15:43:57 | FromGitter | <zacharycarter> once you get frag working though it's quite powerful |
15:44:03 | krux02 | I am currently fixing creating a few pull requests for things in Nim that always bothered me, but never got to a point where I said, "now I fix it" |
15:44:10 | FromGitter | <zacharycarter> you have a physics system, spine, and an optimized sprite batch at your disposal |
15:44:13 | FromGitter | <zacharycarter> sprite batch* |
15:44:20 | FromGitter | <zacharycarter> also nuklear, nanovg |
15:44:39 | FromGitter | <zacharycarter> hell I still haven't used everything frag offers yet |
15:44:56 | FromGitter | <zacharycarter> working on that now :P with a propper spine demo |
15:45:09 | krux02 | one thing I am doing, is `$` for arrays :P |
15:45:21 | FromGitter | <zacharycarter> yesss |
15:45:45 | krux02 | there is a problem with bootstrapping though, because `$` was used on array[..., char] like if it was C code |
15:46:13 | FromGitter | <zacharycarter> ah okay I see |
15:46:18 | krux02 | I made that ``newString`` |
15:46:45 | krux02 | maybe it does work with bootstrapping |
15:47:39 | krux02 | one thing that becomes a bit weird is the `$` operator on array[..., char] |
15:48:04 | krux02 | the array normally contains a terminating '\0' |
15:48:51 | krux02 | but when I create a string, the string has a '\0' somewher in the middle |
15:49:13 | krux02 | not a huge deal though |
15:49:20 | krux02 | other programming languages are not better there |
15:51:37 | * | arnetheduck quit (Ping timeout: 272 seconds) |
15:53:36 | * | Andris_zbx quit (Remote host closed the connection) |
15:54:21 | * | krux02 quit (Remote host closed the connection) |
15:57:52 | * | krux02 joined #nim |
15:58:43 | krux02 | https://github.com/nim-lang/Nim/pull/5910 |
15:58:50 | krux02 | echo([1,2,3]) |
15:58:52 | krux02 | yay |
15:58:55 | krux02 | finally |
15:58:59 | krux02 | ok I have to go |
15:59:02 | krux02 | have a nice day |
15:59:05 | ftsf | \o/ |
15:59:06 | * | krux02 quit (Remote host closed the connection) |
16:03:50 | FromGitter | <andreaferretti> what is the status of rewrite macros? |
16:04:22 | * | yglukhov quit (Remote host closed the connection) |
16:04:25 | FromGitter | <andreaferretti> is there a way to debug whether they are actually applied? |
16:05:54 | * | yglukhov_ joined #nim |
16:10:13 | * | yglukhov_ quit (Ping timeout: 246 seconds) |
16:11:38 | * | captain-adequate quit (Quit: Lost terminal) |
16:12:23 | * | yglukhov joined #nim |
16:14:46 | Araq | andreaferretti: pegs are eager by nature, .* matches everything and then there cannot be a '_' |
16:15:06 | Araq | the compiler reports TR macros applications per default |
16:15:18 | Araq | usually the problem is that something does *not* match ;-) |
16:17:29 | * | yglukhov quit (Remote host closed the connection) |
16:18:05 | FromGitter | <AjBreidenbach> hey, can somebody tell me why `[]` allows indexing, but `[]=` requires a key in the json module? |
16:19:32 | FromGitter | <andreaferretti> @Araq thank you |
16:25:18 | * | yglukhov joined #nim |
16:29:46 | Araq | AjBreidenbach: I don't understand the question, pretty sure json.nim comes with []= operators |
16:30:06 | * | yglukhov quit (Ping timeout: 268 seconds) |
16:30:55 | FromGitter | <AjBreidenbach> Sorry, what I said was probably unclear |
16:31:43 | FromGitter | <AjBreidenbach> I meant how would you deal with an array, because it is indexed with integers and the []= operator only accepts a string as an argument |
16:38:46 | Araq | but JSon is a ref object, []= can be overloaded for that |
16:38:51 | Araq | bbl |
16:39:40 | * | nsf joined #nim |
16:56:11 | Parashurama | Araq: Also, apparently the VM only does arithmetic right shift even with unsigned ints. |
16:58:08 | Parashurama | something else to fix then... should I make all right shifts logical? or add another magic like mShrU and corresponding optcode opcShrUInt |
17:00:12 | Araq | Parashurama: there are no arithmetic shifts in Nim, they are all bitwise. sounds like a weird codegen bug |
17:01:26 | rokups | Araq: i do not want to be annoying but could you comment on https://github.com/nim-lang/Nim/issues/5507 ? |
17:01:51 | Parashurama | Araq: Well I believe that for gcc, clang (int)x >> 2 will do an arithmetic shift in all cases. |
17:02:03 | Araq | sorry, but I don't know. an nkIdent node with sfSem flags seems inherently wrong |
17:02:04 | * | yglukhov joined #nim |
17:02:45 | Araq | Parashurama: as if I wouldn't know. check what Nim generates |
17:03:49 | * | yingjun joined #nim |
17:04:26 | rokups | yeah this is a tough one.. AST produced by macro is identical to AST of manually written code that macro should produce.. |
17:06:15 | * | yglukhov quit (Ping timeout: 245 seconds) |
17:08:28 | * | yingjun quit (Ping timeout: 260 seconds) |
17:09:48 | Araq | rokups: it's not identical, one has a wrong nfSem flag |
17:10:39 | * | yglukhov joined #nim |
17:13:59 | Parashurama | the generated C code appear to be fine: |
17:14:00 | Parashurama | result = ((NU32) ((NI32)((NU64)(k) >> (NU64)(((NI) 2))))); |
17:14:02 | Parashurama | so I'm not sure where the problem is yet. |
17:17:31 | * | yglukhov quit (Remote host closed the connection) |
17:22:08 | * | madmalik quit (Quit: Connection closed for inactivity) |
17:25:23 | * | pilne quit (Quit: Quitting!) |
17:27:30 | * | yglukhov joined #nim |
17:28:30 | * | pilne joined #nim |
17:32:46 | * | yglukhov quit (Remote host closed the connection) |
17:33:55 | * | yglukhov joined #nim |
17:36:58 | SusWombat | Is there a crossplatform tui library for nim? |
17:37:24 | * | def-pri-pub joined #nim |
17:38:16 | demi- | i think there are a couple of curses wrappers and a few for termbox |
17:39:58 | demi- | anyone around that could help me with some macro stuff? |
17:40:45 | * | elrood joined #nim |
17:54:58 | Araq | demi-: I am |
17:55:54 | demi- | i'm a bit confused by the behavior here: https://gist.github.com/samdmarshall/7cb67d131893c87683a2d6581390c18b |
17:56:07 | * | Arrrr quit (Ping timeout: 240 seconds) |
18:05:19 | * | rauss joined #nim |
18:05:52 | * | yglukhov quit (Remote host closed the connection) |
18:06:44 | * | nsf quit (Quit: WeeChat 1.7.1) |
18:07:07 | * | chemist69 quit (Ping timeout: 240 seconds) |
18:14:31 | Araq | demi-: n{i} is CurlyExpr(n, i) |
18:15:21 | Araq | and currently n {i} is the same as n{i} but this will change, hence the compiler warning |
18:16:56 | Araq | but it's an undiomatic DSL, nim doesn't use braces like that and DSLs reflect Nim's rules |
18:19:41 | demi- | is there any way i could get my desired behavior? i wasn't aware that you could do `n{i}` outside of custom operators |
18:22:23 | Araq | what is the desired behaviour? why misuse curlies here? |
18:23:02 | demi- | i would like to embed a snippet of a markup language that i convert to a string |
18:23:21 | Araq | dsl: |
18:23:25 | Araq | foo: |
18:23:27 | Araq | bar |
18:23:51 | Araq | is the Nim'ish way. |
18:24:50 | demi- | right and i would normally follow that; except i'd like to embed the markup language directly rather than create an abstraction of that language |
18:25:24 | Araq | dsl""" foo { bar } """ is the way to do it if you think that sticking to the original language is better |
18:26:58 | demi- | yeah; i wanted to avoid stringifying it all but i guess that isn't avoidable right now |
18:27:16 | Araq | you then have to write a little compiletime parser perhaps, but this way it's nice for humans to see it's not Nim syntax at all |
18:28:23 | * | chemist69 joined #nim |
18:28:24 | demi- | yeah i was hoping to do the compile-time parser with the macros, but due to current behavior that doesn't seem possible |
18:32:55 | demi- | ok thanks for the help Araq |
18:35:46 | * | pigmej quit (Quit: Leaving...) |
18:39:31 | * | couven92 joined #nim |
18:42:17 | * | xet7 joined #nim |
18:57:32 | * | fredrik92 joined #nim |
19:00:20 | * | couven92 quit (Ping timeout: 260 seconds) |
19:05:28 | * | yingjun joined #nim |
19:05:56 | * | yglukhov joined #nim |
19:09:35 | * | yingjun quit (Ping timeout: 240 seconds) |
19:10:12 | * | rokups quit (Quit: Connection closed for inactivity) |
19:37:39 | * | fredrik92 quit (Ping timeout: 258 seconds) |
19:48:52 | * | fredrik92 joined #nim |
19:49:53 | * | Trustable quit (Ping timeout: 246 seconds) |
19:50:39 | * | nsf joined #nim |
19:52:53 | * | yglukhov quit (Remote host closed the connection) |
19:57:03 | * | Trustable joined #nim |
20:09:00 | * | Hekatonkiros joined #nim |
20:13:29 | * | yglukhov joined #nim |
20:15:19 | * | murych joined #nim |
20:23:43 | * | Trustable quit (Remote host closed the connection) |
20:25:29 | * | chemist69 quit (Ping timeout: 255 seconds) |
20:28:15 | * | chemist69 joined #nim |
20:32:33 | * | dmi0 joined #nim |
20:33:07 | * | yglukhov quit (Remote host closed the connection) |
20:42:20 | * | yglukhov joined #nim |
20:42:37 | * | elrood quit (Quit: Leaving) |
21:07:10 | * | yingjun joined #nim |
21:11:26 | * | yingjun quit (Ping timeout: 246 seconds) |
21:11:56 | * | Vladar quit (Quit: Leaving) |
21:16:40 | * | Parashurama quit (Ping timeout: 245 seconds) |
21:22:27 | PMunch | Hmm, who's maintaining the Nim tools for Atom? |
21:35:26 | * | vlad1777d quit (Remote host closed the connection) |
21:45:46 | * | fredrik92 is now known as couven92 |
21:48:53 | * | Neomex quit (Quit: Leaving) |
21:49:47 | * | irrequietus quit () |
22:04:53 | * | LeNsTR joined #nim |
22:09:28 | * | kunev quit (Ping timeout: 240 seconds) |
22:10:29 | * | kunev joined #nim |
22:11:11 | * | skrylar joined #nim |
22:16:28 | skrylar | oh noes. the gtk bindings are outdated ._. |
22:17:49 | skrylar | oh stefan has some apparently. neat |
22:20:20 | skrylar | yay, the arch version of nim .17 compiles hello world now |
22:20:21 | skrylar | \o/ |
22:25:29 | skrylar | and they aren't in nimble anymore /o\ |
22:25:35 | * | skrylar quit (Quit: Leaving) |
22:25:58 | * | Nobabs27 joined #nim |
22:34:25 | * | murych quit (Read error: Connection reset by peer) |
22:34:50 | * | jsgrant__ quit (Quit: Peace Peeps. o/ If you need me asap, message me at msg[(at)]jsgrant.io & I'll try to get back to you within 24 hours.) |
22:44:45 | * | Nobabs27 quit (Quit: Leaving) |
22:48:37 | * | couven92 quit (Quit: Client Disconnecting) |
22:49:20 | shmup | ftsf: anything requiring nico doesn't compile because it cannot find nimcache/gifenc.h. paintout doesnt compile unless i am compiling it from nico/examples (like if i'd move it to another location, it wouldnt). what does this tell me? nimble list -i does show nico and gifenc (your gifenc) |
22:51:44 | * | yglukhov quit (Remote host closed the connection) |
23:00:27 | * | dmi0 quit (Ping timeout: 240 seconds) |
23:01:38 | * | Jesin quit (Quit: Leaving) |
23:04:55 | * | nsf quit (Quit: WeeChat 1.7.1) |
23:05:28 | * | Jesin joined #nim |
23:28:10 | def-pri-pub | ftsf: Hey, I made a pull requestion for your one issue. If you could take a look at it and see if it's fine, I'll go ahead and merge it, then bump the .nimble version numbers. |
23:52:16 | * | yglukhov joined #nim |
23:56:40 | * | yglukhov quit (Ping timeout: 245 seconds) |