<< 02-04-2017 >>

00:01:45*yglukhov quit (Ping timeout: 256 seconds)
00:19:31*smt joined #nim
00:19:55*Guest36204 is now known as Ven`
00:22:50*Matthias247 quit (Read error: Connection reset by peer)
00:45:08*nsf quit (Quit: WeeChat 1.7)
00:57:06*harrisi left #nim (#nim)
01:04:28*Ven` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:26:38ftsfo/
01:26:40ftsfldlework, aww
01:40:01*couven92 quit (Quit: Client Disconnecting)
01:59:08*chemist69 quit (Ping timeout: 260 seconds)
02:00:02*yglukhov joined #nim
02:02:47*perturbation quit (Quit: Leaving)
02:04:33*yglukhov quit (Ping timeout: 264 seconds)
02:08:45*arnetheduck joined #nim
02:12:30*chemist69 joined #nim
02:33:01*zachcarter joined #nim
02:46:01*Nobabs27 quit (Quit: Leaving)
02:52:33*zachcarter_ joined #nim
02:56:17*zachcarter quit (Ping timeout: 256 seconds)
02:56:17*zachcarter_ is now known as zachcarter
03:27:22zachcarterI have a reference to a generic object being passed into a method and I need to know if it contains a field of a certain type. Is this possible?
03:27:43zachcarterkrux02 recommended getTypeImpl but I can’t figure out how to get to the fields on a ref object
03:41:17ldleworkzachcarter: Isn't that what user typeclasses are for?
03:41:21ldleworkRather than using reflection
03:41:35ldleworkYou define a typeclass that has what you require, and instead of using a generic T, you use your typeclass
03:41:41ldleworknow only types that have that field can be passed in
03:42:09zachcarterhmm sounds like maybe that would work for my use case
03:42:54zachcarterthank you Idlework I’ll check them out
03:43:02*madgoat joined #nim
03:45:00*madgoat left #nim (#nim)
03:49:45zachcarteractually Idlework: thinking about it more it’s not exactly what I want
03:50:08zachcarterbut doing what I’m doing might also be a bad idea…
03:50:32ldleworkwhy isn't a typeclass what you want
03:50:40ldleworkbecause you don't always want the field?
03:50:41zachcarterwhat I was trying to accomplish is allowing the user to potentially have that field defined on the generic object
03:50:43zachcarteryeah exactly
03:50:51zachcarterbut that might not be such a great thing to do either :/
03:50:57ldleworkhave an overload that takes types that don't have the field
03:51:08ldleworknim will use the right one based on the passed in type
03:51:11zachcarterah good call
03:51:15zachcarterthank you :D
03:51:21ldleworkother thing I think
03:51:24zachcartermmhmm
03:51:29ldleworkis that you can use T as your generic discriminator
03:51:39ldleworkbut then inside, do a type switch case or whatever
03:51:39zachcarterokay
03:51:43zachcarterright
03:51:45ldleworkon the typeclass that requires the field
03:51:54ldleworkbut maybe I'm thinking of golang
03:51:57ldleworkI'm sure nim can do it too
03:52:15zachcarterokay I’ll try both and see what works best thank you for that advice, much appreciated sir
03:53:07ldleworkdom96: is there a way to install a nimble package from a local git repo?
03:53:53ldleworknevermind
03:53:54ldleworkjust found the docs
04:01:41*yglukhov joined #nim
04:06:21*yglukhov quit (Ping timeout: 264 seconds)
04:23:29*kunev quit (Ping timeout: 268 seconds)
04:23:45*kunev joined #nim
04:30:48*kunev quit (Ping timeout: 260 seconds)
04:32:42*kunev joined #nim
05:07:23*zachcarter_ joined #nim
05:09:57*zachcarter quit (Ping timeout: 264 seconds)
05:09:58*zachcarter_ is now known as zachcarter
06:03:44*yglukhov joined #nim
06:07:47*yglukhov quit (Ping timeout: 240 seconds)
06:21:57*zachcarter quit (Quit: zachcarter)
07:19:27*fastrom joined #nim
07:34:49*nsf joined #nim
08:02:12*chemist69 quit (Ping timeout: 260 seconds)
08:03:44*toaoMgeorge joined #nim
08:03:51*toaoMgeorge quit (Client Quit)
08:04:19*chemist69 joined #nim
08:05:45*yglukhov joined #nim
08:05:58*smt_ joined #nim
08:09:30*smt quit (Ping timeout: 240 seconds)
08:11:45*yglukhov quit (Ping timeout: 264 seconds)
08:37:02*Matthias247 joined #nim
08:41:07*rokups joined #nim
08:42:31*zachcarter joined #nim
08:50:03*zachcarter quit (Ping timeout: 260 seconds)
08:51:11*zachcarter joined #nim
09:10:17*byte512 quit (Ping timeout: 256 seconds)
09:13:07*vlad1777d joined #nim
09:13:09FromGitter<TiberiumPY> nimble install
09:13:25FromGitter<TiberiumPY> If you're i package folder
09:13:32FromGitter<TiberiumPY> *in
09:25:18*rauss quit (Quit: WeeChat 1.7)
09:32:53dom96hello
09:34:06FromGitter<TiberiumPY> Hi
09:35:56*nsf quit (Quit: WeeChat 1.7)
09:36:02ftsfo/ howdy
09:38:44*zachcarter quit (Read error: Connection reset by peer)
09:38:57*toaoMgeorge joined #nim
09:39:03*zachcarter joined #nim
09:40:03*toaoMgeorge quit (Client Quit)
09:40:22*toaoMgeorge joined #nim
09:42:10*zachcarter quit (Client Quit)
09:43:20*toaoMgeorge quit (Client Quit)
10:03:21*yglukhov joined #nim
10:11:51*yglukhov quit (Remote host closed the connection)
10:26:14*yglukhov joined #nim
10:30:53*yglukhov quit (Remote host closed the connection)
10:32:19ftsfhmm i guess dynamic dispatch can't work if you load a nim object from a library
10:33:58*chemist69 quit (Ping timeout: 264 seconds)
10:36:07*chemist69 joined #nim
10:38:53*Tiberium joined #nim
10:41:23*Ven joined #nim
10:41:47*Ven is now known as Guest92517
10:42:05*Serenitor joined #nim
10:45:11*byte512 joined #nim
10:48:30*arnetheduck quit (Ping timeout: 258 seconds)
10:48:55*arnetheduck joined #nim
11:16:14Tiberiumcan I return tuple from async proc?
11:16:50Tiberiumreturn (sess, sig, question, step, 0) it says " Error: expression 'complete' cannot be called"
11:17:25Tiberiumah, nvm
11:17:57Tiberiumwrong types
11:30:28*byte512 quit (Quit: Bye.)
11:31:44*azur_kind joined #nim
11:33:45*byte512 joined #nim
11:47:06*zachcarter joined #nim
11:50:12zachcartero/
11:55:07ftsfyo
12:06:15*Guest92517 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:29:30*Ven joined #nim
12:29:53*Ven is now known as Guest99962
12:36:09zachcarterflyx: I’m writing documentation for my game thing - the rst preprocessor you wrote among other things looks particularly useful
12:39:08*chemist69 quit (Ping timeout: 240 seconds)
12:41:44*chemist69 joined #nim
12:49:31*Vladar joined #nim
12:56:20*krux02 joined #nim
13:01:35*Guest99962 quit (Ping timeout: 240 seconds)
13:02:09*Ven_ joined #nim
13:09:30*Ven_ quit (Ping timeout: 268 seconds)
13:12:15*Ven_ joined #nim
13:32:44*PMunch joined #nim
13:37:57*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:44:24zachcarterI just upgraded to the latest Nim devel and now all my calls to create / createShared are failing I don’t really understand the error
13:44:50zachcartertype mismatch: got (ptr bgfx_platform_data_t) but expected 'ptr None'
13:47:48zachcartervar pd: ptr bgfx_platform_data_t = create(bgfx_platform_data_t)
13:47:55zachcarterthat’s the line that’s failing now
13:48:43*couven92 joined #nim
13:54:06*Matthias247 quit (Read error: Connection reset by peer)
13:58:57*Ven joined #nim
13:59:21*Ven is now known as Guest83349
14:01:44zachcarterI’m clueless - doesn’t look like those procs have changed anytime recently in system.nim
14:04:46zachcarterthis is failing to compile for me with nim devel : https://gist.github.com/zacharycarter/f6c2b73afef782269ae728ad03b8adc9
14:05:21*Tiberium quit (Remote host closed the connection)
14:05:49zachcarterwould someone else mind trying?
14:06:02*krux02 quit (Remote host closed the connection)
14:06:49*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
14:07:07*krux02 joined #nim
14:10:05*shashlick quit (Ping timeout: 240 seconds)
14:11:57*shashlick joined #nim
14:16:54*krux02 quit (Remote host closed the connection)
14:19:41*Guest83349 quit (Ping timeout: 256 seconds)
14:22:48*Ven_ joined #nim
14:27:16*zachcarter quit (Read error: Connection reset by peer)
14:27:40*zachcarter joined #nim
14:28:40*xet7 quit (Quit: Leaving)
14:40:06zachcarterdom96 / Araq: if you’re around and could help I’d appreciate it
14:41:49dom96zachcarter: seems like a recent regression?
14:42:03zachcartershould I put in an issue?
14:42:14zachcarterI can try to figure out what’s causing it
14:42:15dom96My devel compiled on 03-18 is fine
14:42:25zachcarteryeah :/
14:42:34zachcarterI looked through changes to system.nim and couldn’t spot anything
14:42:46dom96Yeah, create an issue
14:42:51zachcarteralright will do
14:45:53zachcarterhttps://github.com/nim-lang/Nim/issues/5651
14:45:57*chemist69 quit (Ping timeout: 264 seconds)
14:48:24*xet7 joined #nim
14:52:55arnetheduckhey, is there an autoformatter for nim, like clang-format?
14:54:14cheatfatezachcarter, have you seen duplicate of your issue?
14:54:16dom96nimfix but it's not ready for serious use AFAIK
14:54:20cheatfatehttps://github.com/nim-lang/Nim/issues/5648
14:55:17zachcarterah cheatfate my bad I’ll close mine
14:55:32cheatfatejust comment why you are closing
14:55:44cheatfateplease
14:55:46zachcarterI did
15:00:38*yglukhov joined #nim
15:00:49*yglukhov quit (Remote host closed the connection)
15:01:03*yglukhov joined #nim
15:01:44*Ven_ quit (Ping timeout: 260 seconds)
15:03:45*Ven joined #nim
15:04:09*Ven is now known as Guest20500
15:04:25*PMunch quit (Quit: leaving)
15:05:40*PMunch joined #nim
15:08:44*Guest20500 quit (Ping timeout: 260 seconds)
15:10:32*Ven_ joined #nim
15:12:56*chemist69 joined #nim
15:17:58*Ven_ quit (Ping timeout: 260 seconds)
15:19:37*Ven_ joined #nim
15:24:36*Ven_ quit (Ping timeout: 260 seconds)
15:25:01*yglukhov quit (Remote host closed the connection)
15:27:03*Ven_ joined #nim
15:29:19*fastrom quit (Quit: Leaving.)
15:29:35*fastrom joined #nim
15:30:06*fastrom quit (Client Quit)
15:30:42*yglukhov joined #nim
15:32:03*PMunch quit (Quit: leaving)
15:33:54ftsflib/nim/system/alloc.nim(733, 8) Error: 'alloc' is not GC-safe as it calls 'alloc' hmm when compiling with --memTracker:on
15:35:16*Ven_ quit (Read error: Connection reset by peer)
15:35:27*Ven_ joined #nim
15:40:04FromGitter<TiberiumPY> sounds pretty hard to fix :D
15:41:17FromGitter<TiberiumPY> BTW, I added some bad thing into my app - after some time it hangs fully using 1 core of processor (because it's not multi-threaded)
15:45:30*Tiberium joined #nim
15:50:31*yglukhov quit (Remote host closed the connection)
15:50:56*yglukhov joined #nim
15:53:08flyxzachcarter: I wrote an rst preprocessor?
15:53:34zachcarterhaha I see one in the doc folder - it may just be from Nim, I actually took a closer look at it and I don’t think it does what I thought it did
15:55:02flyxah, that thing
15:55:24flyxI never intended it to be used outside NimYAML ^^
15:55:27*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:56:26zachcarteryeah I don’t think I’ll need it
15:56:54zachcarterI thought it was formatting the hyperlinks in nimyaml to include like new window targets and such
15:57:00zachcarterbut I realize that’s not the case
15:58:03flyxno, it just puts the code snippets together. I wrote it to be able to have the snippets all in own files so I can test them on travis
15:58:19zachcarterah okay
15:58:47zachcarterI’ve never done documentation for a Nim project before and yours is really good so I’m trying to follow your example :D
16:00:04*arnetheduck quit (Ping timeout: 260 seconds)
16:01:33Tiberiumlol, I thought github lagged - my commit hash has only digits in his first 7 chars - "0092778"
16:05:35flyxzachcarter: well I'm basically only using Nim's doctools and docgen along with that preproc script and put it all together with some sub-par HTML. but feel free to be copy stuff you like
16:06:23zachcarterflyx: thank you - I’m not really looking to copy much just more or less figure out how yours is put together but so far I”m getting along okay just using the rst2html and normal rst capabilities
16:06:30zachcartera few things are bugging me but nothing too major
16:13:24*chemist69 quit (Quit: WeeChat 1.7)
16:21:56Serenitori noticed that the generated C can differ depending on the host-os. i feel like it should only matter what the target-os is though. can we do anything about that?
16:21:56Serenitorreason being, currently i have code that runs fine when I compile Nim -> via Linux -> C -> via Windows -> Executable, but crashes when Nim -> via Windows -> C -> via Windows -> Executable. :(
16:23:23TiberiumSerenitor, maybe you can try to compile with vcc?
16:29:38*Trustable joined #nim
16:32:02Serenitori'm new to vcc, so checking that now, thx Tiberium
16:32:37TiberiumSerenitor, if you want native windows compilation, you should always compile your programs on Windows with VCC (it's Visual Studio compiler)
16:33:52Serenitorah, that one's been called msvc or cl in my book, so many different names..
16:37:35TiberiumSerenitor, if you've installed it and you've opened special visual studio command prompt, you can use it like this: "nim c --cc:vcc program.nim"
16:48:25*nsf joined #nim
16:49:27SerenitorTiberium, all i'm aware of is how to open a prompt with access to the cl command
16:49:39Serenitorwhich would be something like: call "C:\Program Files (x86)\Microsoft Visual Studio\VC\vcvarsall.bat"
16:49:44Tiberiumyeah
16:49:49TiberiumSerenitor, you need exactly this :)
16:50:18Serenitorgreat. though i'm getting "Requested command not found: 'vccexe.exe ..."
16:50:25Tiberiumyou need to build it
16:50:35TiberiumSerenitor, navigate to folder where you built Nim
16:50:36Tiberiumand run
16:50:40Tiberiumkoch tools
16:50:52Tiberiumit will build some tools including vccexe.exe
16:52:07Tiberiumdom96, your solution worked :) https://github.com/nim-lang/Nim/pull/5652
16:53:49*yglukhov quit (Remote host closed the connection)
17:08:45Serenitorthx Tiberium, though I'm still getting the same issue with vcc. seems like the worm really is in the Nim->C compilation, and not in C->Binary.
17:09:11TiberiumSerenitor, hmmm, I don't know... I compiled Nim using mingw-w64 and then used vcc to compile my programs
17:14:15dom96Tiberium: awesome, thanks :)
17:32:38*libman joined #nim
17:40:34*gangstacat quit (Read error: Connection reset by peer)
17:41:11*Vladar quit (Quit: Leaving)
17:50:48*yglukhov joined #nim
17:55:39*gangstacat joined #nim
17:57:56*chemist69 joined #nim
17:59:50*yglukhov quit (Remote host closed the connection)
18:01:52*vendethiel joined #nim
18:10:02*azur_kind quit (Remote host closed the connection)
18:18:48*nsf quit (Quit: WeeChat 1.7)
18:33:29*Tiberium quit (Remote host closed the connection)
18:42:26libmanhttps://lists.freedesktop.org/archives/wayland-devel/2017-April/033635.html - Is that an April Fools joke, an opportunity to pitch Nim, or both?
18:50:22*Matthias247 joined #nim
18:52:15FromGitter<Varriount> We aren't supported by a major player. :(
19:02:45libmanWe should create one. What do Billy and Larry have that we don't? :P
19:04:26cheatfatelibman, they have much more then we have...
19:04:38libmanI mean when they got started.
19:04:57libmanSadly ever since I started hating government and liking free software, I just can't come up with a viable business model...
19:28:30*Jesin quit (Ping timeout: 240 seconds)
19:31:08*perturbation joined #nim
19:34:58Araqlol Wayland, https://itvision.altervista.org/why.linux.is.not.ready.for.the.desktop.current.html
19:35:14Araqread the section under "Wayland:"
19:36:47*Jesin joined #nim
19:49:30*zachcarter quit (Quit: zachcarter)
19:49:39*Trustable quit (Remote host closed the connection)
19:52:16*rokups quit (Quit: Connection closed for inactivity)
19:56:01*PMunch joined #nim
20:04:49*krux02 joined #nim
20:42:23perturbationI have a Nim program with a large heap > 4 GB and the Boehm GC is complaining with "Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS" - can I recompile libgc from scratch, or is there a runtime flag I can pass in?
20:43:21perturbationlooks to be a compile setting (for Boehm) but I haven't seen good advice about how to do this for Nim programs using the boehm GC
20:43:32perturbation(most advice is about workarounds for Unity games heh)
20:47:05Araqperturbation: why do you use boehm?
20:49:01perturbationmarkAndSweep works as well, but I found to be less efficient in testing... I have a CPU-bound program that's easily parallelizable so Boehm works well
20:49:25Araqfair enough
20:49:49Araqbut I can't answer your question.
20:50:00perturbationalso fair enough :)
21:22:05*nsf joined #nim
21:28:43perturbationdon't want to jinx it, but it looks like re-compiling libgc from scratch did the track :)
21:28:46perturbation*trick
21:31:41*MyMind joined #nim
21:32:43*bjz joined #nim
21:33:37*Sembei quit (Ping timeout: 260 seconds)
21:36:35*perturbation quit (Quit: Leaving)
21:56:19*bjz quit (Read error: Connection reset by peer)
22:13:05*bjz joined #nim
22:29:39*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:44:25*couven92 quit (Quit: Client Disconnecting)
23:00:21*nsf quit (Quit: WeeChat 1.7)
23:00:28*vlad1777d quit (Quit: Leaving)
23:00:32*yglukhov joined #nim
23:01:04*libman quit (Quit: Connection closed for inactivity)
23:04:27*zachcarter joined #nim
23:05:04*yglukhov quit (Ping timeout: 240 seconds)
23:11:00*zachcarter quit (Ping timeout: 246 seconds)
23:11:21*zachcarter joined #nim
23:21:23*Matthias247 quit (Read error: Connection reset by peer)
23:43:39ldleworkzachcarter: I wish I knew a little more about frag as to know whether to use it for nimsynth
23:43:54zachcarterIdlework maybe I can help answer questions
23:44:06zachcarterI’m working on docs at the moment, but they’re not quite close enough to being ready
23:44:43ldleworkzachcarter: we'd need to retain our fast pixel drawing style
23:45:05zachcarterokay that could potentially be done
23:45:39ldleworkzachcarter: if we wrote something on frag, how hard are we talking to get that same thing running on the web on the js backend?
23:45:41zachcartercurrently the sprite batch I’ve written discards draw data per frame
23:45:55ldleworkI know that's a ways off
23:46:01zachcarterso we’d have to make a retainedspritebatch which wouldn’t be a big deal - or something similar
23:46:03ldleworkBut I get the impression you've thought about it
23:46:31zachcarterWe were actually talking about that more today - and I think we may be bumping it up on the radar since it seems a lot of folks like having support for it especially for prototyping / sharing prototypes
23:46:40zachcarterit’s something I could start looking into this week
23:46:58zachcarterIdeally we’re supporting webassembly if possible and I think it should be
23:47:09zachcarterthe web js backend I’m not sure of
23:47:16ldleworkwhat's driving development on this?
23:47:21ldleworkfrag as a whole I mean
23:47:54zachcartermostly the community and lack of a solid cross platform 2d game framework that isn’t using the SDL2 renderer
23:48:23ldleworkah so there isn't some other thing you're working on, that you're building frag out of nessecity for?
23:48:31ldleworkJust curious is all
23:48:50zachcartersure - I do have a game that I was working on however I’d need to port a lot of code to Nim in order to continue working on it
23:49:07ldleworkWhat if you helped us with nimsynth?
23:49:11zachcarterbut it’s more out of a desire to build something others can use and I can use in future projects
23:49:19ldleworkIt wont use all the fancy features of frag, but it could focus the core
23:49:25ldleworkRight
23:49:47zachcarterthat’s definitely something that could potentially be worked out. My plan for frag for the near future was this -
23:49:48ldleworkBut perhaps our tiny scope makes the idea of working with us attractive
23:49:59*libman joined #nim
23:50:16ldlework(and could give you a reason to cover the audio api's too)
23:50:16zachcarterget documentation to where it needs to be for someone to clone / install the project within the next week or so
23:50:27ldleworkgood idea
23:50:43zachcarterand then when I get the first couple of users, work to support their projects
23:50:53zachcarterso I could technically I think work hand in hand with you guys and still be adding value to frag
23:51:04ldleworkzachcarter: we're currently using this: https://github.com/ftsf/nimsynth/blob/master/src/pico.nim
23:51:37ldleworkyeah..
23:51:50zachcarteryeah you could potentially do a lot of this already with frag
23:51:52*Serenitor quit (Ping timeout: 260 seconds)
23:51:59ldleworkI guess its based off this, http://www.lexaloffle.com/pico-8.php
23:52:15ldleworkwhich is cool...
23:52:26zachcarteryeah I’ve seen ftsf’s project it’s quite neat
23:52:41zachcarterand that pico-8 project is as well
23:53:09zachcarterso for audio, frag is using : https://github.com/yglukhov/sound
23:54:04ldleworkI assume that would allow us to do the kind of audio we're doing?
23:54:12ldleworkprocedural audio
23:55:10zachcarterhmm is there example code of the procedural audio in the link source you shared?
23:57:55zachcarterI think sound’s capabilities are fairly limited, but it does wrap OpenAL which is quite capable so I’m guessing we could expose more of OpenAL and get you what you need
23:57:57ldleworkzachcarter: https://github.com/ftsf/nimsynth/blob/master/src/main.nim#L160
23:58:01zachcarterthanks