<< 29-05-2017 >>

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:36krux02what is $('\0') supposed to return?
00:28:00krux02it 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:01dom96demi-: no, the first 'pkgname' is already the encapsulating directory.
01:11:22*Nobabs27 joined #nim
01:11:31demi-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:33ftsfdef-pri-pub, updated the PR
03:33:35ftsferr issue
03:33:59ftsfshmup, 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:19FromGitter<Varriount> @krux02 Man, you just keep cranking out these compiler improvements.
05:52:28FromGitter<Varriount> And I can't accept them. >_<
05:52:41FromGitter<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:32AraqI'm alive :-)
05:57:09FromGitter<ephja> oh hello
05:59:23*yingjun quit (Ping timeout: 260 seconds)
06:00:13Araqshmup: 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:20ftsfAraq, 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:02FromGitter<ephja> @Araq https://gist.github.com/ephja/36d23a923dba403fe99f54e0e998a0e0 do you know about this one?
07:23:00Araqseems easy enough to fix
07:23:03Araqbut it's a new one
07:23:11FromGitter<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:26benny___Hey, I implemented Mergesort on nim for my students next lecture. I need a quick review please
07:41:29benny___https://gist.github.com/Bennyelg/da85a34c535f16d94633f494ed4720c4
07:45:00Araqbenny___: looks super slow :-)
07:45:12benny___:D
07:45:22Araqfloor + / is 'div'
07:45:51benny___can you comment / modify the code? I'll be greatful
07:47:53Araqhttps://github.com/nim-lang/Nim/blob/devel/lib/pure/algorithm.nim#L163
07:48:18Araqremove stuff you don't understand from this implementation and you'll get a decent implementation of it, I think
07:51:27Araqif 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:55Parashuramahello everyone.
07:53:02Araqor start with your version and introduce the optimizations I mentioned step by step
07:54:11ParashuramaAraq: Hey, I'm trying to add pragma support in VM. (mostly to add the possibility of disabling rangechecks at compiletime)
07:55:17ParashuramaI 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:42Araqdepends 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:35AraqParashurama: hmmm, want to do some heavier refactoring too?
07:57:18ParashuramaWhy not? It depends what need to be done.
07:59:41Araq.push/.pop pair should produce a better AST representation
08:00:00Araqand then it can be per statement, not only per proc
08:00:09Araqin fact, something like
08:00:26Araqwith(checks=off): body
08:00:50*yingjun quit (Ping timeout: 245 seconds)
08:00:50Araqis the much better design but was avoided due to the excessive indentation it would require for long things
08:01:17Araqanyway, we can translate the pragma to a 'with' AST
08:02:27ParashuramaThat's interesting. I'm not sure how to start, but I'm willing to try.
08:03:24ParashuramaAraq: btw I replied on https://github.com/nim-lang/Nim/issues/5903
08:04:20ParashuramaAlso perhaps allow casting in VM between integer of the same size?
08:06:11ParashuramaAraq: The new AST representation would now need a TOptions field per statement.
08:07:53AraqParashurama: nah, just leave it as nested list of nkIdents and make a helper proc toOptions(n: PNode): tuple[on, off: TOptions]
08:08:16Araqthe TOption stack still needs to be kept separately
08:08:37Araqfor every pass that handles it but most passes have that (vmgen being an exception)
08:10:08AraqParashurama: yeah some forms of 'cast' can easily be supported by the VM and are memorysafe
08:13:29ParashuramaI'm still not really getting the full picture on how to implement the push/.pop change.
08:21:20*vlad1777d joined #nim
08:22:57FromGitter<mratsim> @Araq Is there any plan to push the `unroll` pragma in the near future?
08:28:04Araqmratsim, as a workaround do something like
08:28:39Araqiterator 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:11FromGitter<mratsim> Cool excellent idea
08:31:52*ftsf joined #nim
08:44:57*rokups joined #nim
08:46:46ParashuramaAraq: 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:12AraqParashurama: meh, just use some existing opcCode
08:49:19AraqopcNarrow maybe
08:49:35Araqcheck what genConv() does
08:49:54Araqin fact, you might want to delegate all the work to genConv
08:50:28*sz0 joined #nim
09:00:06FromGitter<Varriount> benny___: Does it have to be recursive?
09:01:41AraqVarriount: The recursion could be left intact without much slowdown
09:13:37*irrequietus quit ()
09:13:48*irrequietus joined #nim
09:17:08FromGitter<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:04FromGitter<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:09Araqmarshal.to and 'from' or whatever it's called works at compiletime
09:20:35Araqgot special VM love
09:21:32AraqI 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:38FromGitter<Varriount> I guess I'll have to use that and a utility program. I'm reading non-marshal-format JSON
09:21:59Araqit's been designed for utility programs, in fact, so yeah
09:22:04FromGitter<Varriount> Araq: https://github.com/boto/botocore/tree/develop/botocore/data
09:22:24FromGitter<Varriount> Each of those directories contains JSON files describing an AWS service's API
09:23:14FromGitter<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:37FromGitter<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:20rokupsAraq: 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:07m712how can i echo without a newline?
11:35:19Araqstdout.write
11:35:25m712okay
11:35:55m712another question, how do I echo varargs as arguments?
11:36:08m712can I "unpack" a vararg into arguments?
11:41:00FromGitter<zacharycarter> https://nim-by-example.github.io/varargs/
11:41:16FromGitter<zacharycarter> think that's what you're looking to do m712
11:42:08FromGitter<zacharycarter> and if not, I'm not quite sure I understand what you're trying to do
11:42:34m712i'm trying to echo a vararg as a string
11:43:55m712yeah that works
11:44:08FromGitter<zacharycarter> cool :D
11:44:19ftsfdoes closing a filestream close the file?
11:44:34*FromGitter * zacharycarter has no idea
11:45:05ftsfhttps://github.com/nim-lang/Nim/blob/master/lib/pure/streams.nim#L376 looks kinda like it does
11:45:12ftsfwhich explains the behaviour i'm seeing with writeConfig
11:45:30FromGitter<zacharycarter> looks like it definitely does if the file isn't nil
11:45:35ftsfhttps://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:57FromGitter<zacharycarter> mmmm
11:45:59FromGitter<zacharycarter> good catch
11:47:44ftsfbut do i remove the close file or close filestream? ;)
11:48:22*PMunch joined #nim
11:49:20m712remove close file
11:49:21m712because the filestream wouldn't be closed otherwise (?)
11:49:21m712just guessing
11:50:07ftsfi'd go with removing the close filestream because the file is opened first, if newFileStream fails the file is still open
11:50:42m712or just do if file == nil: or something
11:51:15ftsfit annoys me that newFileStream returns nil on failure rather than raising an exception like open does
11:51:38m712inconsistent STL, nice
11:57:14Araqfits your abbrevs then :P
11:57:26AraqNim "standard template library"?
12:01:52*yglukhov quit (Remote host closed the connection)
12:02:49*yglukhov joined #nim
12:07:02PMunchHmm, 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:32AraqPMunch: yeah but there are more interesting things left to do.
12:16:35PMunchMight PR it if I find the time
12:22:18ftsfany 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:05Araqnormal takes an untyped parameter and you didn't read the manual?
12:28:21ftsfproc normal*[T](a: Vec2[T]): Vec2[T] = is a generic type "untyped"?
12:29:31Araqno
12:30:31Araqsounds interesting, report it on github?
12:30:39*pilne joined #nim
12:31:10ParashuramaAraq: tentative PR for int casting in VM: https://github.com/nim-lang/Nim/pull/5908
12:31:49ftsfAraq, ok, will try and cut it down as much as I can for a test case.
12:34:47AraqParashurama: so ... opcCastInt is 22 lines implementing a nop?
12:37:54Parashurama:) kinda! this kind of casting really means changing to node type, and not the integer value.
12:42:17*xet7 joined #nim
12:43:05ftsfhttps://gist.github.com/ftsf/37c93b0fbd768ea9122b5513e6d1b348 aha, so the problem is a variable with the same name as the proc
13:09:38PMunchHuh, 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:37FromGitter<zacharycarter> does anyone know of a decent website for doing screenshares?
14:03:31*benny____ quit (Remote host closed the connection)
14:04:46krux02appear.in
14:05:31FromGitter<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:45krux02is there a way in nim to print the stacktrace instantly?
14:31:59Parashuramayou can use getStackTrace() in system.nim in debug build
14:32:19FromGitter<ephja> this as well: https://nim-lang.org/docs/system.html#writeStackTrace,
14:43:38*couven92 quit (Ping timeout: 246 seconds)
14:49:07shmupah, thanks Araq
14:49:56shmupftsf: 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:34ftsfshmup, sorry the process isn't very streamlined at the moment =(
14:51:56shmupheh 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:00shmup@ ftsf
14:52:14shmupwhere things are kinda hand-fed to me :P
14:52:17ftsfmmm yeah i do all my dev on linux, windows seems like a pain
14:52:47ftsfyou can get the SDL2.dll from https://www.libsdl.org/download-2.0.php shouldn't have to compile it
14:52:53ftsfruntime binaries
14:53:27shmupsomething 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:41shmupyeah ftsf I was able to grab sdl2 that way, just not sdl2_gfx
14:54:28ftsfoh ok, don't think anything really uses sdl2_gfx
14:55:21shmupha oh?? dang, was just sdl2-nim example then. not nico
14:55:32shmupi'll make those changes to nico if you'd like
14:55:37shmupunless you already did
14:55:42shmupre: min/max
14:55:49ftsfahh i haven't yet, but i shall do that
14:57:55FromGitter<zacharycarter> think I'm going to start working on 3d for frag this evening
14:58:01ftsfshmup, pushed
14:58:13ftsfzacharycarter \o/ awesome
14:58:25ftsfi'm about to start work on my 3d game!
14:58:31FromGitter<zacharycarter> nice!
14:58:33ftsfmaybe i should use frag
14:58:37shmupi am just really impressed with vektor2089, how long have you been working on it?
14:58:41shmupty xo ftsf
14:58:51ftsfshmup, cheers, started the pico8 prototype about 2 years ago
14:58:54FromGitter<zacharycarter> ftsf: I'd wait until I get 3 fleshed out haha
14:58:57FromGitter<zacharycarter> 3d*
14:59:08FromGitter<zacharycarter> although I do plan on doing quite a bit with 3d if I can find the time / energy
14:59:16krux02I found a very interesting video about the internals of super mario 64
14:59:27krux02it explains how the physics work
14:59:31ftsfkrux02, yeah i just watched that! so cool
14:59:47FromGitter<zacharycarter> we need a good 3d physics engine
14:59:53FromGitter<zacharycarter> who wants to wrap bullet
14:59:55*FromGitter * zacharycarter puts finger on nose
15:00:06krux02it is targeted towards speedrunners (and glich seekers) but it also explains a lot when you want to build an engine
15:00:09ftsfhomegrown physics is much more fun! ;)
15:00:20ftsflike that mario 64 one
15:00:49krux02homegrown physics is not only much more fun, it is also a requirement when you want to have a human
15:00:52FromGitter<zacharycarter> port https://github.com/RandyGaul/qu3e
15:00:52FromGitter<zacharycarter> ?
15:01:08krux02humans in games are hacked in, they never behave physically correct
15:01:58*yingjun joined #nim
15:02:55FromGitter<zacharycarter> ftsf: you could use krux02's opengl playground mabye
15:02:58FromGitter<zacharycarter> maybe*
15:03:04FromGitter<zacharycarter> sandbox rather
15:04:46shmupftsf: oh, right. same problem with your paintout example. the sdl2.gamecontroller gameControllerAddMappingsFromFile is an undeclared identifier
15:04:55krux02yea the playground
15:05:03krux02new version of Nim broke the compatibility
15:05:13krux02doesn't compile anymore
15:05:53krux02https://github.com/nim-lang/Nim/issues/5845
15:06:05*yingjun quit (Ping timeout: 240 seconds)
15:07:10ftsfshmup, get the sdl2 from https://github.com/ftsf/sdl2
15:08:26shmupoh, opposed to the wrapper in nim-lang/sdl2 ?
15:08:29shmup@ ftsf
15:08:46krux02Well I use the wrapper nim-lang/sdl2
15:08:58ftsfyep, it's the same, just i've added some missing functions
15:08:59krux02I can't really recommend it, it feels like a bad quality wrapper
15:09:11krux02it works, but it doesn't feel well crafted
15:09:13ftsfkrux02, i agree, it needs a lot of work
15:09:17shmupthere is another one but haven't looked really
15:09:20shmuphttps://github.com/Vladar4/sdl2_nim
15:09:31ftsfand it doesn't really keep up to date with SDL2 development
15:12:13krux02I think the version in nimble should match the SDL version it wrapps
15:12:15FromGitter<zacharycarter> what compiler does Nim try to use by default on Windows?
15:12:28FromGitter<zacharycarter> whatever is in the PATH?
15:12:31krux02I think it is mingw
15:12:58FromGitter<zacharycarter> hrm, seems like with a Nim 64 bit install it's using the VC++ 32 bit compiler
15:13:02FromGitter<zacharycarter> if mingw isn't installed
15:13:23FromGitter<zacharycarter> or whatever the 32 bit c compiler is in the VC++ toolchain
15:13:28krux02isn't mingw bundled in windows?
15:13:34FromGitter<zacharycarter> nope
15:15:35*nsf quit (Quit: WeeChat 1.7.1)
15:19:39*Trustable joined #nim
15:21:10shmupI'll have to explore more later ftsf, did see I needed SDL2_Mixer, but now its just:
15:21:13shmupsystem.nim(2656) sysFatal
15:21:14shmupError: unhandled exception: index out of bounds [IndexError]
15:21:44FromGitter<andreaferretti> I am trying to mangle some identifiers using c2nim
15:22:07FromGitter<andreaferretti> The rule I use is simply `#mangle "{.*}'_'" "$1"`
15:22:08ftsfshmup, 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:20FromGitter<andreaferretti> It is meant to strip a `_` prefix
15:22:29FromGitter<andreaferretti> but it seems it doesn't work
15:22:37ftsfshmup, what are you running?
15:23:59shmupwindows 10, if that's what you meant
15:24:07ftsfahh i mean the command you run when you get that error?
15:24:18shmup./examples/paintout.exe
15:24:41ftsfcp assets into examples
15:25:08ftsfor paintout into the nico dir
15:25:15shmupftsf: https://gist.github.com/shmup/37c285c12ebaa0d5dfec8e2aaf3561cd
15:25:19shmupfor more stacktrace
15:25:23shmupokay will do
15:25:48shmuplol ftsf++ ok
15:25:54shmupworks.
15:26:05ftsfyeah, known issue with stb_image, it gets an index error when the file can't be opened
15:26:20ftsfexcellent
15:26:24shmupwe just wanna throw an exception yeah?
15:27:14FromGitter<andreaferretti> nevermind, I have done with `#suffix`
15:27:55demi-I seem to be having an issue with how my macros are getting parsed: https://gist.github.com/samdmarshall/7cb67d131893c87683a2d6581390c18b
15:33:41ftsfshmup, i think so
15:39:02*FromGitter * zacharycarter wishes frag was as easy to get going with as nico
15:39:08FromGitter<zacharycarter> I need an automated installer :P
15:39:30ftsfi 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:38FromGitter<zacharycarter> frag relies on bgfx
15:39:44FromGitter<zacharycarter> so no matter what you'll have to build bgfx
15:39:53ftsfahh
15:40:00FromGitter<zacharycarter> for better or worse we tied ourselves to bgfx
15:40:11ftsfno distro packages
15:40:30FromGitter<zacharycarter> unfortunately not, plus I've customized bgfx somewhat
15:40:40FromGitter<zacharycarter> so we maintain our own fork
15:41:28ftsfahh
15:41:36ftsfnot accepting your changes upstream?
15:42:17FromGitter<zacharycarter> I'm doing a bit of hacky things to get android / NanoVG working
15:42:21FromGitter<zacharycarter> so I don't expect him to
15:42:33krux02zacharycarter do you put bgfx in a subtree/submodule then?
15:42:45FromGitter<zacharycarter> yup
15:42:55krux02that's good
15:43:03FromGitter<zacharycarter> I just need to write automated install scripts to build / install it for every os
15:43:19FromGitter<zacharycarter> the problem is the whole gcc toolchain on windows
15:43:26FromGitter<zacharycarter> I expect users to have that installed
15:43:41FromGitter<zacharycarter> otherwise it's rather trivial
15:43:57FromGitter<zacharycarter> once you get frag working though it's quite powerful
15:44:03krux02I 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:10FromGitter<zacharycarter> you have a physics system, spine, and an optimized sprite batch at your disposal
15:44:13FromGitter<zacharycarter> sprite batch*
15:44:20FromGitter<zacharycarter> also nuklear, nanovg
15:44:39FromGitter<zacharycarter> hell I still haven't used everything frag offers yet
15:44:56FromGitter<zacharycarter> working on that now :P with a propper spine demo
15:45:09krux02one thing I am doing, is `$` for arrays :P
15:45:21FromGitter<zacharycarter> yesss
15:45:45krux02there is a problem with bootstrapping though, because `$` was used on array[..., char] like if it was C code
15:46:13FromGitter<zacharycarter> ah okay I see
15:46:18krux02I made that ``newString``
15:46:45krux02maybe it does work with bootstrapping
15:47:39krux02one thing that becomes a bit weird is the `$` operator on array[..., char]
15:48:04krux02the array normally contains a terminating '\0'
15:48:51krux02but when I create a string, the string has a '\0' somewher in the middle
15:49:13krux02not a huge deal though
15:49:20krux02other 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:43krux02https://github.com/nim-lang/Nim/pull/5910
15:58:50krux02echo([1,2,3])
15:58:52krux02yay
15:58:55krux02finally
15:58:59krux02ok I have to go
15:59:02krux02have a nice day
15:59:05ftsf\o/
15:59:06*krux02 quit (Remote host closed the connection)
16:03:50FromGitter<andreaferretti> what is the status of rewrite macros?
16:04:22*yglukhov quit (Remote host closed the connection)
16:04:25FromGitter<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:46Araqandreaferretti: pegs are eager by nature, .* matches everything and then there cannot be a '_'
16:15:06Araqthe compiler reports TR macros applications per default
16:15:18Araqusually the problem is that something does *not* match ;-)
16:17:29*yglukhov quit (Remote host closed the connection)
16:18:05FromGitter<AjBreidenbach> hey, can somebody tell me why `[]` allows indexing, but `[]=` requires a key in the json module?
16:19:32FromGitter<andreaferretti> @Araq thank you
16:25:18*yglukhov joined #nim
16:29:46AraqAjBreidenbach: I don't understand the question, pretty sure json.nim comes with []= operators
16:30:06*yglukhov quit (Ping timeout: 268 seconds)
16:30:55FromGitter<AjBreidenbach> Sorry, what I said was probably unclear
16:31:43FromGitter<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:46Araqbut JSon is a ref object, []= can be overloaded for that
16:38:51Araqbbl
16:39:40*nsf joined #nim
16:56:11ParashuramaAraq: Also, apparently the VM only does arithmetic right shift even with unsigned ints.
16:58:08Parashuramasomething else to fix then... should I make all right shifts logical? or add another magic like mShrU and corresponding optcode opcShrUInt
17:00:12AraqParashurama: there are no arithmetic shifts in Nim, they are all bitwise. sounds like a weird codegen bug
17:01:26rokupsAraq: i do not want to be annoying but could you comment on https://github.com/nim-lang/Nim/issues/5507 ?
17:01:51ParashuramaAraq: Well I believe that for gcc, clang (int)x >> 2 will do an arithmetic shift in all cases.
17:02:03Araqsorry, but I don't know. an nkIdent node with sfSem flags seems inherently wrong
17:02:04*yglukhov joined #nim
17:02:45AraqParashurama: as if I wouldn't know. check what Nim generates
17:03:49*yingjun joined #nim
17:04:26rokupsyeah 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:48Araqrokups: it's not identical, one has a wrong nfSem flag
17:10:39*yglukhov joined #nim
17:13:59Parashuramathe generated C code appear to be fine:
17:14:00Parashuramaresult = ((NU32) ((NI32)((NU64)(k) >> (NU64)(((NI) 2)))));
17:14:02Parashuramaso 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:58SusWombatIs there a crossplatform tui library for nim?
17:37:24*def-pri-pub joined #nim
17:38:16demi-i think there are a couple of curses wrappers and a few for termbox
17:39:58demi-anyone around that could help me with some macro stuff?
17:40:45*elrood joined #nim
17:54:58Araqdemi-: I am
17:55:54demi-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:31Araqdemi-: n{i} is CurlyExpr(n, i)
18:15:21Araqand currently n {i} is the same as n{i} but this will change, hence the compiler warning
18:16:56Araqbut it's an undiomatic DSL, nim doesn't use braces like that and DSLs reflect Nim's rules
18:19:41demi-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:23Araqwhat is the desired behaviour? why misuse curlies here?
18:23:02demi-i would like to embed a snippet of a markup language that i convert to a string
18:23:21Araqdsl:
18:23:25Araq foo:
18:23:27Araq bar
18:23:51Araqis the Nim'ish way.
18:24:50demi-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:24Araqdsl""" foo { bar } """ is the way to do it if you think that sticking to the original language is better
18:26:58demi-yeah; i wanted to avoid stringifying it all but i guess that isn't avoidable right now
18:27:16Araqyou 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:24demi-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:55demi-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:27PMunchHmm, 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:28skrylaroh noes. the gtk bindings are outdated ._.
22:17:49skrylaroh stefan has some apparently. neat
22:20:20skrylaryay, the arch version of nim .17 compiles hello world now
22:20:21skrylar\o/
22:25:29skrylarand 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:20shmupftsf: 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:10def-pri-pubftsf: 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)