<< 17-02-2017 >>

00:06:50Araqthe nimblepkg directory actually removed by koch because it's not used anymore
00:11:22UxerUosprI wrote a few days ago becuase I was having problems with `import os` not pulling in headers for the `sleep` function. I'm still having problems and I wonder if anyone has advice on how to troubleshoot imports
00:14:50UxerUosprthe compiler seems to hit os.nim and skip on to my code file. Here's the output with verbosity 3
00:15:52UxerUosprhttps://gist.github.com/optik-aper/2a599807c30a4482bd565006715ef370
00:17:28dom96@philip-wernersbach what other output does koch give?
00:17:42UxerUosprWhen I specifically add `import posix` I get further and compile. Looking in /usr/lib/nim/lib/pure/os.nim posix.nim should be importing normally just from importing os.nim
00:18:11dom96'night
00:21:25UxerUosprOriginally I was thinking it was because of my OS uses musl but I set up a glibc filesystem and ran into the same problems
00:22:12*yglukhov quit (Remote host closed the connection)
00:22:16AraqUxerUospr: the compiler doesn't process os.nim
00:22:40AraqHint: os [Processing]
00:22:40Araqos.nim(1, 1) Hint: 121003 [Processing]
00:22:40Araqimport.nim(3, 1) Hint: 122001 [Processing]
00:22:42Araqimport.nim(4, 6) Hint: 122002 [Processing]
00:22:44Araqimport.nim(4, 1) Error: undeclared identifier: 'sleep'
00:22:51UxerUosprYeah, it seems to skip it
00:22:56UxerUosprand I'm not sure why
00:23:07Araqdo you use --import ?
00:24:47Araqwell just post your code here
00:24:58*PMunch quit (Quit: leaving)
00:25:13UxerUosprI added it to the gist but it's small enough so
00:25:23UxerUosprimport times, os
00:25:23UxerUosprvar start = epochTime()
00:25:23UxerUosprsleep(1000)
00:25:27UxerUosprecho epochTime() - start
00:26:17UxerUosprI just run `nim compile import.nim`
00:27:47Araqworks for me
00:28:41Araqrename the module to something else perhaps, but 'import.nim' works for me here on OSX
00:28:49Araqsorry, have to sleep now, good night
00:29:06UxerUosprThanks! night!
00:30:40UxerUosprThe filename change doesn't make a difference. Still the same output.
00:38:13cheatfateUxerUospr, it looks like you have installed `nim` from package, am i right?
00:44:37UxerUosprThat's right
00:45:10UxerUospra few nights ago I did compile nim from source and had the same problem.
00:45:17UxerUosprI think I might be in the clear.
00:45:46UxerUosprI can do pretty much the same operation in a new file (call sleep, do something else) and it compiles
00:46:51UxerUosprDoes the nim compiler cache the source code or something? I was noticing some strange things happening, like statements from a different code file getting compiled when they weren't in the source file I was compiling
00:47:30*zachcarter joined #nim
00:47:37cheatfatenim c -f import.nim will force to rebuild nimcache
00:47:48UxerUosprGood to know
00:48:42zachcarterhttp://imgur.com/a/M1why
00:48:45zachcartergoing to start working on animations
00:54:31*themagician quit ()
01:04:26*UxerUospr quit (Quit: Lost terminal)
01:04:52krux02zachcarter: what type of format are you using?
01:05:36krux02I wrote a loader for iqm, a binary format with animations
01:05:41zachcarterassimp
01:05:51krux02does it handle animations well?
01:05:52zachcarterso a variety of formats
01:05:55zachcarteroh yeah
01:06:03krux02and what do you use for a wrapper?
01:06:42zachcarterhttps://github.com/zacharycarter/nimassimp
01:07:09zachcarterI’ve made some more modifications I believe to the lib I’ll check them in now
01:07:48zachcarteractually nevermind it’s current
01:08:11krux02I also wrapped assimp once: https://github.com/krux02/assimp
01:08:18krux02but it's for go
01:08:43zachcarterwhen we both have time we should work on that bullet wrapper - I’m going to need your help in a major way
01:09:07krux02last change is 4 years ago (ignoring the pull request two weeks ago)
01:09:17zachcarterI’ll compensate you for it too, since I’m going to be using it directly in my engine
01:09:24zachcarterand I honestly don’t know where to start
01:10:40krux02I thought of the bullet wrapper and a bit of the way nim handles things, and I don't think it is possible to just put bullet in c++ mode, c++ mode needs to be enabled globally
01:10:53krux02which is a shame if you ask me
01:11:22zachcarterah that stinks
01:11:37krux02because with the current compilation medel the compile praga then tries to compile C files in c++ mode, and that is not guaranteed to succseed
01:11:50zachcarteryeah that’s no good :/
01:12:07zachcarterif only bullet had a c-api
01:12:20zachcarter;)
01:12:24zachcartersince it says it does
01:12:29krux02mean it's not impossible to solve, the problem is just that the solution is a fix for nim
01:12:50zachcarterright
01:12:50krux02well they are working on that (or not working on that) for years now
01:13:03zachcarteryeah
01:13:08krux02I wrote an ODE wrapper because the c api was not fixed
01:13:20krux02https://github.com/krux02/gode
01:13:33krux02ode has a c api
01:13:43zachcarteryeah there’s a nim ODE wrapper
01:13:50zachcarterI can’t get it to work 100%
01:13:59zachcarterbut that’s probably because I don’t understand ODE completely
01:14:06zachcarterapparently bullet is way faster than ODE though
01:14:55krux02and even though ode seems pretty much unupdated, it already has proven itself as reliable, it is used in World of Goo and for Stalker
01:15:10zachcarterah okay - had no idea world of goo used it too
01:15:20zachcarterpretty physics heavy game
01:15:31krux02yes it's faster and stuff, but that doesn't really matter that much if you ask me as long as it's not magnitudes faster
01:16:01zachcarterIMO we’d be best off with - https://github.com/RandyGaul/qu3e
01:16:01krux02what matters it, that it is stable, and correct
01:16:05zachcarterI agree
01:17:41krux02I know someone, who wrote his own physics engine that had an entirely different approach to solving physics
01:17:58krux02all physics engines basically to pairwise resolution
01:18:23krux02he build equation systems for all connected components
01:18:50krux02so that he had a matrix to solve when more than two objects collided at the same time
01:19:07zachcartersounds like an interesting approach
01:19:48krux02https://www.youtube.com/watch?v=o7tXgkSWfXI
01:20:39krux02that game is getting nausious instantly
01:20:57zachcarterlol
01:21:21krux02it is running on Linux, back in the day when oculus rift still had linux support
01:21:27krux02it was developed on linux
01:21:40zachcarterI need to figure out how to do - https://github.com/nem0/lumixengine_data/blob/9d334668fa0b2d842d979bafda1fd87a9dbabe70/pipelines/rigid/rigid_vs.sc#L1
01:22:06zachcarterw/ bgfx
01:22:40krux02i don't know what you mean
01:23:10zachcarterhe’s passing custom defines to the shader
01:23:25zachcarterto determine whether the vertex is skinned or not
01:24:23krux02the best part from the tricky trike video is at 2:30 to 3:00
01:24:40krux02why do you need custom defines?
01:25:09zachcarteryeah that last bit is cool
01:25:16zachcarterwhere he gets thrown in the air and rotates
01:25:34zachcarterwell ideally I’m writing one shader for both static and non static meshes
01:25:34krux02horrible when you have the goggles on
01:25:41zachcarterlol I bet
01:26:09zachcarterif the shader can figure out whether the vertex is skinned or not then perks
01:29:02krux02https://github.com/nem0/lumixengine_data/search?utf8=%E2%9C%93&q=SKINNED
01:29:12krux02looks like it is defined in the materials
01:29:49zachcarteryeah but also - https://github.com/nem0/lumixengine_data/blob/9d334668fa0b2d842d979bafda1fd87a9dbabe70/pipelines/rigid/rigid.shd
01:30:07zachcarterno idea how this all works
01:30:34zachcarterI sent him a PM on gitter hopefully he gets back to me
01:30:52krux02hopefully
01:31:14zachcarterwhat do you think about a unity esque engine for nim?
01:31:14krux02btw I updated my github repo
01:31:25krux02I hope everything is buildable now
01:31:41zachcarterif we could get you, myself, and a few others working on something together, I think it’d be possible
01:31:42krux02well I don't see the point
01:32:11krux02what benefit do you have as a unitiy user, when unity is written in Nim? It doesn't make you develop in nim.
01:32:37zachcarteroh no I don’t mean th engine would have any relationship to unity whatsoever
01:32:44zachcarterI mean the arcitecture would be similar to unity
01:32:48zachcarterarchitecture*
01:32:54zachcarterso node / component based
01:32:55krux02So I think the only engine that really is useful for nim, is the one that uses macros to it's fullest potential to miximize the productivity of the developer
01:33:14krux02so more a library kind of engine, not an engine in the classical style
01:33:18zachcarterright
01:33:49krux02and unity was written with the limitations of c++ plus a lot of manpower
01:34:20zachcarteragreed
01:34:45zachcarterstil when it comes to 3d you need some basic functionality to make your library / framework usable beyond your project
01:35:12zachcarterlook at libgdx and why people don’t use it - it lacks an editor
01:35:15krux02I don't that that when you try to copy it, that you will be successful in any way, because when you do not really abuse your metaprogramming abilities in Nim, there is little chance that it will ever compete with the well established brand Unity
01:35:40zachcarterit’s not so much about copying anything, it’s about making a 2d / 3d engine available to nim
01:35:55krux02I think more in the direction of processing
01:36:06krux02something should be as simple to get staretd as processing
01:36:10zachcarterI really didn’t mean like - take unity and port it to nim - i meant make a 2d / 3d engine nim Nim that has the usability of unity
01:36:17krux02it should be suitable as your first program you ever write
01:36:36zachcarterin nim*
01:36:48krux02sure you can bundle an editor, but pirmarily there should be a rock solid and easy to get into basis
01:37:08krux02and the basis needs to cover something all other engines lack to implement
01:37:21zachcarterright
01:37:38krux02in my opinion it is actually what I have done with the binding of uniforms and attributes
01:37:57krux02it is by far not complete, but that's the direction that needs to be taken
01:38:08krux02you don't get anywhere when you just try to copy something
01:38:41krux02you will always be the open source clone that is not quite what the real package offers
01:39:27krux02sorry, I did not read your message entirely
01:40:20krux02I don't know the unity experience. Because Unity on Linux, it kind of was always was a horrible experience.
01:40:21zachcarternp
01:40:35zachcarterUnity sucks, but the architecture is pretty simple
01:40:46zachcarterscenes - > nodes - > components
01:41:26krux02well, what is a scene, what is a node, what is a component?
01:41:28zachcarteryguklov or however you spell his / her name is establishing a similar architecture for their engine
01:42:01zachcarterscene would be global space, node would be anything inside the scene, component would be any data structure attached to the node, like a mesh, a sprite, an animation, etc….
01:42:33krux02ok, sounds flexible
01:42:39krux02entity component model?
01:42:42zachcarteressentially
01:42:58zachcarterand assimp would work flawlessly with it
01:44:11krux02well, I think it is quite a flexible system, but I not think that you can make a general engine for basically everyting in the first place.
01:44:20zachcarterI agree it’s tough
01:44:55krux02I think the only reason, why unity is so successful, is because the road on low level programming with OpenGL is tough
01:44:59zachcarterI think a 3d engine and a 2d engine both specialized for their own domain would be the better option
01:45:38krux022d programming is easy, all you need is a bunch of sprite blitting operations, but as soon as it gets 3d, it really becomes hard
01:45:43zachcarteryeah
01:45:50krux02simplified
01:45:50zachcarterI essentially already have a 2d engine
01:46:12zachcarterI just need to write an example game with it
01:46:18krux02I just remember back my times when I wrote games in Blitz Basic
01:46:25krux02it was awesome
01:46:29zachcarter:D
01:46:40krux02it I did not feel like I was using an engine
01:46:46krux02I had control over the main loop
01:46:54krux02I implemented everything
01:47:21zachcarterthat’s what I’m doing, but trying to implement all those things in a generic way
01:47:38krux02everything was based on simple routines that provide things that you need to put together your game, but it did not try to give you the behavor
01:47:55krux02and everything was immediate
01:48:02zachcarterah yeah
01:48:06zachcarterI’m trying to optimize
01:48:15zachcarterjust got what bgfx = VAOs working
01:48:23zachcarterfor static meshes anyway
01:51:27krux02yea my game is still online in the forum: https://www.blitzforum.de/forum/viewtopic.php?t=9865&highlight=
01:51:49krux02if you have blitz basic installed you can just copy paste and there go go
01:51:51krux02no assets
01:51:55krux02all line art
01:52:36krux02well just that you know, animations are horrible
01:52:49krux02they look nice, but it's hard to get them right
01:53:06krux02the concept seems to be easy, but then it's not
01:55:10zachcarterI’m sure
01:55:53FromGitter<zetashift> makes me appreciate things like Pico-8
01:56:03FromGitter<zetashift> unfortunately not a big fan of lua
01:56:14krux02I just got nostalgic reading my code from 2005
01:56:22zachcarter:)
01:56:22krux02it so damn readable
01:56:42krux02i was a bloody beginner, but intuitively just programmed the right way
01:57:00krux02it was only after that, that I got to learn object oriented programming
01:57:08krux02well, object oriented programming it sucks
01:57:21krux02the stuff I wrote 2005 is much more readable and maintainable
01:58:02krux02I mean it's has german and engish stuff mixed up, but apart from that
01:59:19*pregressive joined #nim
02:02:34FromGitter<jacobdufault> I'm getting crashes when assigning a string to a value, ie, ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ When I run with -d:useSysAssert, I hit this failure ... [https://gitter.im/nim-lang/Nim?at=58a659b900c00c3d4f4ca07a]
02:03:59*pregressive quit (Ping timeout: 255 seconds)
02:06:48*brson quit (Quit: leaving)
02:08:36*gokr quit (Ping timeout: 240 seconds)
02:11:09FromGitter<krux02> well that code should work
02:12:02krux02I tried the program it just works
02:12:18FromGitter<jacobdufault> Sorry, the above example works
02:12:24FromGitter<jacobdufault> It's in a larger program which breaks it
02:12:36FromGitter<jacobdufault> Program works fine with small input data sets, for but large ones I start getting memory failures
02:13:32FromGitter<jacobdufault> If you look a alloc.nim(550), it's the actual allocator internals which implies to me a language/stdlibrary issue, but the sysAssert concerns me
02:13:54FromGitter<jacobdufault> (ie, the alloc call is updating/changing the free list)
02:14:00FromGitter<krux02> well when you can create a program that is reduced to this error, but it can create it at any time, then you have a great bug report
02:14:20FromGitter<krux02> what do you mean it is changing the free list?
02:14:54FromGitter<jacobdufault> allocator free list
02:15:02FromGitter<jacobdufault> I'm guessing free blocks of memory
02:15:09FromGitter<jacobdufault> didn't look at the code too closely
02:20:05*vlad1777d quit (Quit: Leaving)
02:24:37*def-pri-pub joined #nim
02:56:35*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:34:34*dexterk joined #nim
03:40:59*deepbook5broo joined #nim
03:40:59*deepbook5broo left #nim (#nim)
03:59:16*hcorion joined #nim
04:13:47*krux02 quit (Remote host closed the connection)
04:16:23*rauss joined #nim
05:04:38*zachcarter quit (Quit: zachcarter)
05:22:58*def-pri-pub quit (Quit: Lost terminal)
06:09:29*shashlick quit (Ping timeout: 240 seconds)
06:10:32*shashlick joined #nim
06:15:56*djellemah_ joined #nim
06:48:14*yglukhov joined #nim
06:52:35*yglukhov quit (Ping timeout: 260 seconds)
06:54:58*rauss quit (Quit: WeeChat 1.7)
07:15:37*yglukhov joined #nim
07:20:00*yglukhov quit (Ping timeout: 260 seconds)
07:23:26*filcuc joined #nim
07:30:52*libman quit (Quit: Connection closed for inactivity)
07:44:17*nsf joined #nim
07:47:41*bjz joined #nim
08:01:08*hcorion quit (Quit: Konversation terminated!)
08:14:21*Vladar joined #nim
08:16:50*yglukhov joined #nim
08:22:07VladarLet's say the string has a sequence of Whitespace chars: echo " foo bar ".split()
08:22:08Vladar shouldn't the result be @[foo, bar] instead of @[, , foo, , bar, , ] ?
08:24:36FromGitter<dom96> No, because ``join`` should give you the same seq back.
08:24:48FromGitter<dom96> *the same string
08:26:02*rokups joined #nim
08:28:14Vladarhm, interesting. I think it worked differently previously.
08:29:55*couven92 joined #nim
08:32:10AraqVladar: it did, use splitWhitespace for the old behaviour
08:32:20Araq(which made much more sense but *shrug*)
08:33:18*arnetheduck quit (Ping timeout: 240 seconds)
08:35:44VladarAraq: splitWhitespace not letting me to select different separators though. I spent an hour this night trying to locate the bug in lisnim: https://github.com/Vladar4/lisnim/commit/d56e5aba436e8322643832ae1a55fe6727f0dc20
08:35:54*gokr joined #nim
08:43:22AraqVladar: newlines are part of the definition of Whitespace
08:43:31Araqso you should be lucky
08:43:47VladarOh, then it might work, thanks
08:44:02*yglukhov quit (Remote host closed the connection)
08:47:19AraqVladar: also I'm sure we documented this breaking change in some news ;-)
08:49:33*filcuc quit (Ping timeout: 260 seconds)
08:49:44Vladaryep, 0.15.0, it was long time since I touched lisnim project )
08:53:19*yglukhov joined #nim
09:01:35*yglukhov quit (Remote host closed the connection)
09:02:37*Andris_zbx joined #nim
10:02:18*yglukhov joined #nim
10:06:57*yglukhov quit (Ping timeout: 268 seconds)
10:29:22*PMunch joined #nim
10:29:47*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
10:39:31*yglukhov joined #nim
10:40:50*yglukhov quit (Remote host closed the connection)
10:41:26*yglukhov joined #nim
10:45:55*yglukhov quit (Ping timeout: 260 seconds)
10:57:56*zachcarter joined #nim
10:58:36*yglukhov joined #nim
11:03:27*yglukhov quit (Remote host closed the connection)
11:04:18*zachcarter quit (Ping timeout: 240 seconds)
11:06:56*bjz joined #nim
11:18:54*yglukhov joined #nim
11:22:14*Ven joined #nim
11:23:50*bjz quit (Ping timeout: 260 seconds)
11:24:43*bjz_ joined #nim
11:30:31*chemist69 joined #nim
11:40:12*smt quit (Quit: Leaving)
11:46:10*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:50:33*Ven joined #nim
11:51:24*PMunch quit (Quit: leaving)
11:57:57*Ven quit (Ping timeout: 268 seconds)
12:02:24*Snircle joined #nim
12:06:03*libman joined #nim
12:07:20*zachcarter joined #nim
12:13:42*Snircle_ joined #nim
12:14:09*Snircle quit (Read error: Connection reset by peer)
12:20:28*bjz_ quit (Ping timeout: 240 seconds)
12:20:45*bjz joined #nim
12:23:12*kulelu88 joined #nim
12:23:27demi-Araq: i updated the issue i created with a much better code example that should repro on any platform.
12:23:35kulelu88Hello all
12:25:16flyxhello kulelu88
12:26:21kulelu88I get this error when trying to execute the HTTPserver server executable on linux: Error: unhandled exception: Permission denied [OSError]
12:27:45flyxare you trying to bind to a privileged port?
12:28:05kulelu88port 80
12:28:52flyxtry 8080
12:28:59*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
12:29:22flyxports below 1024 are privileged and subject of OS restrictions
12:29:29kulelu88aah 80 is privileged. interesting. how do I bind the server to 0.0.0.0 ?
12:30:28*djellemah_ quit (Ping timeout: 240 seconds)
12:30:57kulelu88documentation is sparse for nim httpserver
12:31:34flyxyeah because it will be deprecated in favor of asynchttpserver
12:32:34kulelu88should I use that instead? flyx
12:33:20*bjz joined #nim
12:33:29flyxwell its server() proc can take an address which is what you want
12:33:42*flyx has not done any http stuff with the stdlib yet
12:33:49flyx*serve()
12:35:53kulelu88flyx: I don't see that in the docs here: https://nim-lang.org/docs/httpserver.html#port,Server
12:36:38flyxI mean this: https://nim-lang.org/docs/asynchttpserver.html#serve,AsyncHttpServer,Port,proc(Request),string
12:37:06kulelu88oh. asynchttp . alright, let me try that 1 instead. why is httpserver being deprecated ?
12:38:04*yglukhov quit (Remote host closed the connection)
12:38:23flyxI would guess that asynchttp is more performant, but I didn't follow the discussion about it
12:38:40*yglukhov joined #nim
12:39:59FromGitter<dom96> I didn't realise it but the open source guide actually has some relevant advice for us: https://opensource.guide/getting-paid/
12:40:11FromGitter<dom96> Already got some nice ideas out of there (opencollective looks intriguing)
12:41:01FromGitter<dom96> kulelu88: A synchronous httpserver doesn't really make sense.
12:41:20FromGitter<dom96> And the way that ``httpserver`` was implemented has multiple issues.
12:41:48*vlad1777d joined #nim
12:42:01zevlghey guys, I've got here compilation error - https://gist.github.com/fbb67b6e2984e1ad5911523f9bb7d439
12:42:02kulelu88Does that restrict Nims asynchttp-lib to node.js use-cases ?
12:42:10kulelu88dom96: ^^
12:42:38zevlgnim generates uncompilable C code
12:42:48zevlgis it nim's error or mine ?
12:43:10*yglukhov quit (Ping timeout: 260 seconds)
12:43:12flyxzevlg: well you declare that your object is inheritable when it's not
12:43:44flyxafaik m_type is an internal field Nim needs on a struct to make it inheritable. the imported struct misses this field.
12:44:35flyxzevlg: make MyObject contain a my_struct value instead of deriving from it
12:44:47flyxand remove the {.inheritable.}
12:44:57kulelu88flyx: something like: waitFor server.serve(Port(8080), address = 0.0.0.0, cb) ??
12:45:13flyxkulelu88: address must be a string, so "0.0.0.0"
12:45:22zevlgI need it, I can't inherit from RootObject because it puts m_type at the head of object, preventing me from using struct aggregation technique
12:45:32zevlgi need m_type at the tail of the object
12:45:39zevlghow do I do this ?
12:45:42kulelu88flyx: I tried that first and got a compilation error
12:46:00flyxkulelu88: well then look at what the compiler complains about and fix that
12:46:36flyxzevlg: I would guess that you simply cannot derive from imported structs, but I may be wrong. perhaps this is possible when importing it as C++?
12:48:43kulelu88flyx: nothing I try fixes it. see the error here: https://www.zerobin.net/?abd039b2c03f1f1f#lTvUjNo4gzgkvjs0tNnF8hMA1gXWgUfTj3t11K3O2BM=
12:49:16flyxkulel
12:49:27flyxkulelu88: well your arguments are in the wrong order
12:49:41flyxthe address must come after the callback
12:50:55kulelu88wow, order mattered 0.o
12:51:15flyxof course. do you know a language where it doesn't?
12:52:37kulelu88Lots of them. you input the port and binding anywhere within serve(...) and it won't matter
12:52:44flyxo.O
12:52:57flyxwhich would those be?
12:53:12kulelu88Flask
12:54:49FromGitter<dom96> kulelu88: what are "node.js use cases"?
12:55:20*Arrrr joined #nim
12:55:22kulelu88long-polled apps like chat-apps
12:55:23flyxFlask is Python, in Python, order matters: http://flask.pocoo.org/docs/0.12/api/#flask.Flask.run
12:55:52flyxof course, you can assign parameter values by name, then the order does not matter
12:56:13FromGitter<dom96> kulelu88: i'm sure you can use node.js for much more than that.
12:57:17*Snircle_ quit (Quit: Textual IRC Client: www.textualapp.com)
12:58:08flyxlike `waitFor server.serve(port=Port(8080), address="0.0.0.0", callback=cb)
12:58:08FromGitter<dom96> in fact, you can use it for most things just like you can use Nim's async capabilities for any async-use-cases.
12:58:27kulelu88dom96: you guys get good coverage on HN. Does that translate into more adoption of Nim each time?
12:58:52flyxI don't think we have any reliable metrics for that
12:59:09flyxmentions on HN itself are a metric of adaption
13:00:59kulelu88flyx: I prefer the assigning by name method. much cleaner to understand what is happening
13:01:11flyxkulelu88: well you're welcome to use it
13:01:19*yglukhov joined #nim
13:02:52zevlgAraq: hey is there some reason to put `m_type' at the head of the nim object struct ?
13:05:20*kulelu88 quit (Ping timeout: 260 seconds)
13:06:49Araqzevlg: how else would the runtime determine correct "of" (instanceof) usages?
13:07:44zevlgah, ok, a see
13:07:50zevlgI see now
13:15:17*zachcarter quit (Quit: zachcarter)
13:16:49Araqzevlg: you can use .inheritable and not 'of RootObj' to enable inheritance without the m_type fields
13:17:06Araqbut this is dangerous since then the compiler cannot emit runtime type checks
13:17:25Araqit's very useful for C++ interop though
13:22:54zevlgthanks, I'll try
13:29:47*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
13:44:42*Snircle joined #nim
13:51:18*Arrrr quit (Ping timeout: 240 seconds)
13:52:25*gokr quit (Ping timeout: 260 seconds)
13:56:20*zachcarter joined #nim
14:10:01*Arrrr joined #nim
14:20:52*libman quit (Quit: Connection closed for inactivity)
14:25:45*gokr joined #nim
14:27:57*yglukhov quit (Remote host closed the connection)
14:28:34*yglukhov joined #nim
14:33:21*yglukhov quit (Ping timeout: 268 seconds)
14:36:31*gokr quit (Read error: Connection reset by peer)
14:36:37*gokr1 joined #nim
14:41:46zachcarterhmm my #def directives inside my c2nim block don’t seem to be being read
14:42:34zachcarterhttps://gist.github.com/zacharycarter/6808b813d65df41758ae21bed2d9f16b
14:44:07Araqifndef?
14:44:39Araqthat should be #ifdef
14:44:49*yglukhov joined #nim
14:45:18zachcarteroh whoops
14:45:20zachcarterthank you
14:45:30zachcarterI need a break / coffee
14:47:49*PMunch joined #nim
15:02:40*couven92 quit (Quit: Client disconnecting)
15:11:44*xet7 joined #nim
15:21:17*UxerUospr joined #nim
15:22:02*rauss joined #nim
15:23:34*gokr1 quit (Ping timeout: 260 seconds)
15:41:33*nsf quit (Quit: WeeChat 1.7)
16:21:33*yglukhov quit (Remote host closed the connection)
16:22:21*yglukhov joined #nim
16:27:13FromGitter<philip-wernersbach> @dom96 Here is the full output when I build nimble with nim 0.16.0: https://gist.github.com/philip-wernersbach/1ae6064624753457587c5c71cd4346f3
16:32:18*Arrrr quit (Read error: Connection reset by peer)
16:34:41dom96weird. Any ideas Araq?
16:41:47Araqwell that doesn't build koch with the recent Nim
16:42:00Araqthat builds koch with the old Nim
16:42:29Araqand koch nimble too uses the old Nim, the whole 'koch boot -d:release' step is missing
16:43:25AraqI'm not saying that it is the problem, but it since I never heard of this issue before, I'm out of ideas
16:47:06*yglukhov quit (Remote host closed the connection)
16:49:40*Kingsquee joined #nim
16:50:18*chemist69 quit (Ping timeout: 240 seconds)
16:50:58dom96hrm, yeah, that's fishy.
16:51:21*chemist69 joined #nim
16:52:03*yglukhov joined #nim
16:54:20*Andris_zbx quit (Remote host closed the connection)
16:55:52*Trustable joined #nim
16:55:58*yglukhov quit (Ping timeout: 240 seconds)
16:59:12*yglukhov joined #nim
17:03:28*yglukhov quit (Ping timeout: 240 seconds)
17:05:56*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
17:06:16*Jesin quit (Quit: Leaving)
17:11:19*Jesin joined #nim
17:13:24*brson joined #nim
17:18:20demi-dom96: CircleCI has free OS X instances for open source projects and allows artifact collection after a build/upload back to a github release/nightly
17:18:47demi-and free linux instances for open source stuff, so you could probably build linux+windows stuff on that
17:20:16*couven92 joined #nim
17:22:12federico3demi-: isn't TravisCI the one with free osx builds? afaik osx on CircleCI is paid
17:22:58demi-no, circleci is free for open source projects, you don't automatically get the os x instance, but all you have to do is ping support and they will give it to you if you are building mac software
17:23:20federico3right, there's some fine print on the pricing page
17:23:41demi-i use it for all my OSS stuff
17:23:55federico3demi-: do you have to ping them for each project or once?
17:24:16demi-just once iirc, it unlocks for your account
17:24:22Araqwe already use travis
17:24:34Araqseems easier to use travis for OSX too
17:24:57demi-I have no opinion one way or another, wanted to present it as an option
17:32:07*Arrrr joined #nim
17:32:07*Arrrr quit (Changing host)
17:32:07*Arrrr joined #nim
17:48:06*trusion joined #nim
18:00:10*yglukhov joined #nim
18:02:09*rokups quit (Quit: Connection closed for inactivity)
18:03:49cheatfatedemi-, when we have troubles with travis ci, i've made some research and circle ci offers free `1,500 build minutes per month`, so if one build is like 40 minutes, so we can only make 37 free builds using circle ci.
18:04:18*yglukhov quit (Ping timeout: 240 seconds)
18:04:22*zachcarter quit (Ping timeout: 240 seconds)
18:04:46demi-i think that would put you in the higher bucket of build time on them tbh
18:06:30cheatfateand of course it will be nice to have circleCi too, just because we can run 3 test runs concurrently
18:07:04demi-cheatfate: use whatever is best for you folks -- i don't believe any of those are hard caps on circle, if you talk to them i think most of that stuff can be bumped within reason.
18:08:28cheatfatedemi-, i'm not a part of nim team, i'm just volunteer
18:10:20*libman joined #nim
18:13:22AraqI patched .travis.yml
18:13:35AraqI'll see what it complains about
18:13:45Araqon my machine only coroutines tests fail
18:16:31*gokr joined #nim
18:39:40*Matthias247 joined #nim
18:44:31*Arrrr quit (Disconnected by services)
18:44:31*Arrrr1 joined #nim
18:44:44*Arrrr1 quit (Client Quit)
18:50:33*brson quit (Read error: Connection reset by peer)
18:51:15*roygbiv joined #nim
18:51:17*yglukhov joined #nim
18:55:47*brson joined #nim
18:57:36*yglukhov quit (Read error: Connection reset by peer)
18:58:09*yglukhov joined #nim
19:21:42*roygbiv quit (Read error: Connection reset by peer)
19:22:14*roygbiv joined #nim
19:39:04*yglukhov quit (Remote host closed the connection)
19:45:07FromGitter<raydf> What the best way to manage json dynamically, for example to search for a nested field that could be inside the parsed document or not and handling the exceptions raised when the node is not found.
19:45:19FromGitter<raydf> Any ideas?
19:47:26*yglukhov joined #nim
19:49:50*nsf joined #nim
19:53:49*Snircle joined #nim
19:56:17Araqecho jobj{"missing key"}.getFNum(0.1) # read a float value using a default
19:56:22Araqhttps://nim-lang.org/docs/json.html
19:56:37*xet7 quit (Quit: Leaving)
19:56:55Araqhttps://nim-lang.org/docs/json.html#{},JsonNode,varargs[string]
19:57:45*yglukhov quit (Remote host closed the connection)
19:58:53FromGitter<raydf> is there any fuent dsl like jobj{"test"}{"subtest"}{"subsubtest"}?
19:59:46FromGitter<raydf> ok i tried, i'm reading the source code, thanks @Araq
20:00:03FromGitter<raydf> didn't catch the `{}` operator
20:00:12Araqjobj{"field", "subfield", "etc"}
20:00:14FromGitter<raydf> nice
20:00:40Araqyeah the json module is really nice
20:01:55FromGitter<raydf> what the nim way to handle nulls?
20:02:08FromGitter<raydf> if?
20:04:36AraqI guess
20:07:49*Sentreen quit (Read error: Connection reset by peer)
20:07:53*brson quit (Read error: Connection reset by peer)
20:08:24*Sentreen joined #nim
20:08:49FromGitter<raydf> I really like the json module for dynamically generated API, nice work.
20:14:07*brson joined #nim
20:18:40*roygbiv quit (Quit: ™)
20:20:03*trusion quit (Remote host closed the connection)
20:24:16*sz0 quit (Quit: Connection closed for inactivity)
20:28:06*bjz joined #nim
20:29:09*Salewski joined #nim
20:30:58*sz0 joined #nim
20:31:30*yglukhov joined #nim
20:33:00SalewskiAraq, I still wonder about your split of libui in ui.nim and rawui.nim. How should a user use the enums defined in rawui.nim? Import each single needed enum?
20:34:04SalewskiIn the examples only module ui is imported. I think import ui and rawui will give name conflicts, for example for symbol button.
20:34:43SalewskiOne solution may be to put enums and consts in a third separate module?
20:35:37Araqanother solution is to learn the language. module.foo can be used to disambiguate. also I dunno why you would want to import both modules at the same time, that's against its design
20:35:41SalewskiOr to put all in only one module, as Jason Masour did for his gobject introspection attempt.
20:37:06SalewskiYes, of course I can use module prefix. So always write ui.Button?
20:37:14Araqor from rawui import Enum
20:37:21Araqor import rawui except Button
20:39:05Salewskifrom rawui import Enum! That is possible? So I can import all the enums from rawui, and only ENUMS?
20:39:28Araqno, that would be from rawui import ConcreteEnumTypeHere
20:40:50SalewskiOK. But for GTK related stuff we have hundreds of enums and consts which we really need.
20:41:01Araqaha, sorry.
20:41:21Araqso the question is not about ui.nim but how to do it when things are bigger :-)
20:41:55SalewskiYes of course, my concern is still GTK...
20:43:02SalewskiJason Masour has done nice work with his smart-gi gobject introspection module, but I dont think he will continue the work.
20:43:19Araqoh yeah, you can do commongtk, rawgtk, gtk
20:43:21SalewskiSo I am playing with some high level stuff
20:43:33Araqand have the consts and enums in commongtk
20:43:36*gokr quit (Remote host closed the connection)
20:44:17*yglukhov quit (Remote host closed the connection)
20:44:27SalewskiOK, I wanted just to check that I did not miss something. Bye...
20:44:51Araqbye
20:45:00*Salewski left #nim (#nim)
20:59:18subsetparkCan someone correct my understanding of templates? This fails compilation with "undeclared identifier"
20:59:22subsetparkhttps://www.irccloud.com/pastebin/097wPob5/
20:59:44subsetparkoh wait, that's wrong for other reasons...
21:00:34subsetparkhttps://www.irccloud.com/pastebin/Vkgm1FPK/
21:02:33subsetparkIn other words, I'd like to have a proc declaration in a template, which I can pass a body into when I call the template
21:12:29*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:13:30subsetparkIs this possible without doing a full macro? I don't see any examples in the manual...
21:16:47*yglukhov joined #nim
21:17:36dom96subsetpark: You might need to do something like this https://gist.github.com/dom96/e7c7db53dab41795a4604569e06c2fef
21:20:45subsetparkhm yeah, that works. can you explain what's going on there?
21:24:37subsetparkI'm also not sure why my code (which superficially resembles that exactly) still doesn't work... I get "identifier expected, but found '-3.0'" - where -3.0 is one of my arguments to defProc
21:26:49dom96The `inject` pragma lets the identifiers be accessed via the code inside the `body`
21:27:28dom96Better yet: https://gist.github.com/dom96/2d182398a08e3e753be0c00145bb249e
21:27:47dom96by default templates are hygienic
21:28:12dom96so any variables/params declared inside the template are not visible to the outside scope
21:28:23dom96{.dirty.} changes these semantics
21:29:01subsetparkcool, i like that - i still get this weird "identifier expected" error, though. What does that usually refer to?
21:29:12dom96Show me the code
21:29:54subsetparkhttps://www.irccloud.com/pastebin/xDgr0koH/
21:31:26dom96settings.xScale = (settings.xMax - settings.xMin)
21:31:49dom96becomes: settings.xScale = (settings.-3.0 - settings.4.0)
21:32:11subsetparkoh shoot, i see
21:32:16subsetparkso i need to bind all those within scope?
21:32:52subsetparkah, or just pick better names
21:32:53dom96just change the names of the params
21:33:00subsetparkthat don't conflict with the attributes of the object
21:33:48subsetparkgot it! This is powerful stuff...
21:33:55subsetparkthanks as always dom96
21:35:38dom96np :)
21:44:39*UxerUospr quit (Quit: Lost terminal)
21:48:52*bjz joined #nim
22:10:52*libman quit (Quit: Connection closed for inactivity)
22:14:14*brson quit (Read error: Connection reset by peer)
22:15:05*brson joined #nim
22:16:51*bjz_ joined #nim
22:18:56*bjz quit (Ping timeout: 268 seconds)
22:35:00*zachcarter joined #nim
22:37:05*yay joined #nim
22:37:43yayNot sure if this is related to the VS Code plugin itself or Nimsuggest, so I'll also post it here: https://github.com/pragmagic/vscode-nim/issues/38
22:38:50zachcartercan anyone help me with this template definition? - https://gist.github.com/zacharycarter/be673a8cab062c448ab2c724e138a006 - I’m trying to write a template that I can use with c2nim to convert c enums like in the example I linked, to valid nim enums. Araq was helping me with this at one point, but the code he suggested doesn’t quite work. Not sure how to do this exactly
22:39:43*yay quit (Client Quit)
22:40:05zachcarterhttps://irclogs.nim-lang.org/21-01-2017.html#04:07:43
22:40:08*gangstacat quit (Ping timeout: 255 seconds)
22:40:11zachcarterthere’s the original convo b/w Araq and myself
22:40:13zachcarterfor context
22:40:29AraqI'm still here
22:40:36zachcarteroh hey
22:40:39Araqwhats the error?
22:41:11zachcartervalue of type 'typedesc[int]' has to be discarded
22:41:36zachcarterah wait
22:41:41zachcarterI think I get it
22:41:58zachcarterI need to seperate this into three lines and then throw discards in front of type(a) and (a.cint or b.cint)
22:41:59zachcarter?
22:42:31zachcarternot really understanding how this works - I don’t get what type(a) does
22:42:36*rauss quit (Quit: WeeChat 1.7)
22:43:07Araqit's like C++'s typeof()
22:43:23Araqit converts the result back to a's type
22:43:27Araqwhich should be the enum type
22:43:33zachcarterahhh okay
22:43:42zachcarterman that is magical
22:44:18*chemist69 quit (Ping timeout: 240 seconds)
22:44:20zachcarterokay thank you Araq I think that explanation gets me going
22:44:34zachcarterwas able to get the nim const declared correctly
22:45:27*gangstacat joined #nim
22:47:01*chemist69 joined #nim
22:50:26*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:03:02*nsf quit (Quit: WeeChat 1.7)
23:12:18*shashlick quit (Ping timeout: 240 seconds)
23:13:07*shashlick joined #nim
23:24:16*sz0 quit (Quit: Connection closed for inactivity)
23:36:13*PMunch quit (Quit: leaving)
23:40:00*libman joined #nim
23:43:36*yglukhov quit (Remote host closed the connection)
23:54:46*Trustable quit (Remote host closed the connection)