00:06:50 | Araq | the nimblepkg directory actually removed by koch because it's not used anymore |
00:11:22 | UxerUospr | I 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:50 | UxerUospr | the compiler seems to hit os.nim and skip on to my code file. Here's the output with verbosity 3 |
00:15:52 | UxerUospr | https://gist.github.com/optik-aper/2a599807c30a4482bd565006715ef370 |
00:17:28 | dom96 | @philip-wernersbach what other output does koch give? |
00:17:42 | UxerUospr | When 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:11 | dom96 | 'night |
00:21:25 | UxerUospr | Originally 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:16 | Araq | UxerUospr: the compiler doesn't process os.nim |
00:22:40 | Araq | Hint: os [Processing] |
00:22:40 | Araq | os.nim(1, 1) Hint: 121003 [Processing] |
00:22:40 | Araq | import.nim(3, 1) Hint: 122001 [Processing] |
00:22:42 | Araq | import.nim(4, 6) Hint: 122002 [Processing] |
00:22:44 | Araq | import.nim(4, 1) Error: undeclared identifier: 'sleep' |
00:22:51 | UxerUospr | Yeah, it seems to skip it |
00:22:56 | UxerUospr | and I'm not sure why |
00:23:07 | Araq | do you use --import ? |
00:24:47 | Araq | well just post your code here |
00:24:58 | * | PMunch quit (Quit: leaving) |
00:25:13 | UxerUospr | I added it to the gist but it's small enough so |
00:25:23 | UxerUospr | import times, os |
00:25:23 | UxerUospr | var start = epochTime() |
00:25:23 | UxerUospr | sleep(1000) |
00:25:27 | UxerUospr | echo epochTime() - start |
00:26:17 | UxerUospr | I just run `nim compile import.nim` |
00:27:47 | Araq | works for me |
00:28:41 | Araq | rename the module to something else perhaps, but 'import.nim' works for me here on OSX |
00:28:49 | Araq | sorry, have to sleep now, good night |
00:29:06 | UxerUospr | Thanks! night! |
00:30:40 | UxerUospr | The filename change doesn't make a difference. Still the same output. |
00:38:13 | cheatfate | UxerUospr, it looks like you have installed `nim` from package, am i right? |
00:44:37 | UxerUospr | That's right |
00:45:10 | UxerUospr | a few nights ago I did compile nim from source and had the same problem. |
00:45:17 | UxerUospr | I think I might be in the clear. |
00:45:46 | UxerUospr | I can do pretty much the same operation in a new file (call sleep, do something else) and it compiles |
00:46:51 | UxerUospr | Does 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:37 | cheatfate | nim c -f import.nim will force to rebuild nimcache |
00:47:48 | UxerUospr | Good to know |
00:48:42 | zachcarter | http://imgur.com/a/M1why |
00:48:45 | zachcarter | going to start working on animations |
00:54:31 | * | themagician quit () |
01:04:26 | * | UxerUospr quit (Quit: Lost terminal) |
01:04:52 | krux02 | zachcarter: what type of format are you using? |
01:05:36 | krux02 | I wrote a loader for iqm, a binary format with animations |
01:05:41 | zachcarter | assimp |
01:05:51 | krux02 | does it handle animations well? |
01:05:52 | zachcarter | so a variety of formats |
01:05:55 | zachcarter | oh yeah |
01:06:03 | krux02 | and what do you use for a wrapper? |
01:06:42 | zachcarter | https://github.com/zacharycarter/nimassimp |
01:07:09 | zachcarter | I’ve made some more modifications I believe to the lib I’ll check them in now |
01:07:48 | zachcarter | actually nevermind it’s current |
01:08:11 | krux02 | I also wrapped assimp once: https://github.com/krux02/assimp |
01:08:18 | krux02 | but it's for go |
01:08:43 | zachcarter | when we both have time we should work on that bullet wrapper - I’m going to need your help in a major way |
01:09:07 | krux02 | last change is 4 years ago (ignoring the pull request two weeks ago) |
01:09:17 | zachcarter | I’ll compensate you for it too, since I’m going to be using it directly in my engine |
01:09:24 | zachcarter | and I honestly don’t know where to start |
01:10:40 | krux02 | I 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:53 | krux02 | which is a shame if you ask me |
01:11:22 | zachcarter | ah that stinks |
01:11:37 | krux02 | because 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:50 | zachcarter | yeah that’s no good :/ |
01:12:07 | zachcarter | if only bullet had a c-api |
01:12:20 | zachcarter | ;) |
01:12:24 | zachcarter | since it says it does |
01:12:29 | krux02 | mean it's not impossible to solve, the problem is just that the solution is a fix for nim |
01:12:50 | zachcarter | right |
01:12:50 | krux02 | well they are working on that (or not working on that) for years now |
01:13:03 | zachcarter | yeah |
01:13:08 | krux02 | I wrote an ODE wrapper because the c api was not fixed |
01:13:20 | krux02 | https://github.com/krux02/gode |
01:13:33 | krux02 | ode has a c api |
01:13:43 | zachcarter | yeah there’s a nim ODE wrapper |
01:13:50 | zachcarter | I can’t get it to work 100% |
01:13:59 | zachcarter | but that’s probably because I don’t understand ODE completely |
01:14:06 | zachcarter | apparently bullet is way faster than ODE though |
01:14:55 | krux02 | and 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:10 | zachcarter | ah okay - had no idea world of goo used it too |
01:15:20 | zachcarter | pretty physics heavy game |
01:15:31 | krux02 | yes 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:01 | zachcarter | IMO we’d be best off with - https://github.com/RandyGaul/qu3e |
01:16:01 | krux02 | what matters it, that it is stable, and correct |
01:16:05 | zachcarter | I agree |
01:17:41 | krux02 | I know someone, who wrote his own physics engine that had an entirely different approach to solving physics |
01:17:58 | krux02 | all physics engines basically to pairwise resolution |
01:18:23 | krux02 | he build equation systems for all connected components |
01:18:50 | krux02 | so that he had a matrix to solve when more than two objects collided at the same time |
01:19:07 | zachcarter | sounds like an interesting approach |
01:19:48 | krux02 | https://www.youtube.com/watch?v=o7tXgkSWfXI |
01:20:39 | krux02 | that game is getting nausious instantly |
01:20:57 | zachcarter | lol |
01:21:21 | krux02 | it is running on Linux, back in the day when oculus rift still had linux support |
01:21:27 | krux02 | it was developed on linux |
01:21:40 | zachcarter | I need to figure out how to do - https://github.com/nem0/lumixengine_data/blob/9d334668fa0b2d842d979bafda1fd87a9dbabe70/pipelines/rigid/rigid_vs.sc#L1 |
01:22:06 | zachcarter | w/ bgfx |
01:22:40 | krux02 | i don't know what you mean |
01:23:10 | zachcarter | he’s passing custom defines to the shader |
01:23:25 | zachcarter | to determine whether the vertex is skinned or not |
01:24:23 | krux02 | the best part from the tricky trike video is at 2:30 to 3:00 |
01:24:40 | krux02 | why do you need custom defines? |
01:25:09 | zachcarter | yeah that last bit is cool |
01:25:16 | zachcarter | where he gets thrown in the air and rotates |
01:25:34 | zachcarter | well ideally I’m writing one shader for both static and non static meshes |
01:25:34 | krux02 | horrible when you have the goggles on |
01:25:41 | zachcarter | lol I bet |
01:26:09 | zachcarter | if the shader can figure out whether the vertex is skinned or not then perks |
01:29:02 | krux02 | https://github.com/nem0/lumixengine_data/search?utf8=%E2%9C%93&q=SKINNED |
01:29:12 | krux02 | looks like it is defined in the materials |
01:29:49 | zachcarter | yeah but also - https://github.com/nem0/lumixengine_data/blob/9d334668fa0b2d842d979bafda1fd87a9dbabe70/pipelines/rigid/rigid.shd |
01:30:07 | zachcarter | no idea how this all works |
01:30:34 | zachcarter | I sent him a PM on gitter hopefully he gets back to me |
01:30:52 | krux02 | hopefully |
01:31:14 | zachcarter | what do you think about a unity esque engine for nim? |
01:31:14 | krux02 | btw I updated my github repo |
01:31:25 | krux02 | I hope everything is buildable now |
01:31:41 | zachcarter | if we could get you, myself, and a few others working on something together, I think it’d be possible |
01:31:42 | krux02 | well I don't see the point |
01:32:11 | krux02 | what benefit do you have as a unitiy user, when unity is written in Nim? It doesn't make you develop in nim. |
01:32:37 | zachcarter | oh no I don’t mean th engine would have any relationship to unity whatsoever |
01:32:44 | zachcarter | I mean the arcitecture would be similar to unity |
01:32:48 | zachcarter | architecture* |
01:32:54 | zachcarter | so node / component based |
01:32:55 | krux02 | So 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:14 | krux02 | so more a library kind of engine, not an engine in the classical style |
01:33:18 | zachcarter | right |
01:33:49 | krux02 | and unity was written with the limitations of c++ plus a lot of manpower |
01:34:20 | zachcarter | agreed |
01:34:45 | zachcarter | stil when it comes to 3d you need some basic functionality to make your library / framework usable beyond your project |
01:35:12 | zachcarter | look at libgdx and why people don’t use it - it lacks an editor |
01:35:15 | krux02 | I 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:40 | zachcarter | it’s not so much about copying anything, it’s about making a 2d / 3d engine available to nim |
01:35:55 | krux02 | I think more in the direction of processing |
01:36:06 | krux02 | something should be as simple to get staretd as processing |
01:36:10 | zachcarter | I 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:17 | krux02 | it should be suitable as your first program you ever write |
01:36:36 | zachcarter | in nim* |
01:36:48 | krux02 | sure you can bundle an editor, but pirmarily there should be a rock solid and easy to get into basis |
01:37:08 | krux02 | and the basis needs to cover something all other engines lack to implement |
01:37:21 | zachcarter | right |
01:37:38 | krux02 | in my opinion it is actually what I have done with the binding of uniforms and attributes |
01:37:57 | krux02 | it is by far not complete, but that's the direction that needs to be taken |
01:38:08 | krux02 | you don't get anywhere when you just try to copy something |
01:38:41 | krux02 | you will always be the open source clone that is not quite what the real package offers |
01:39:27 | krux02 | sorry, I did not read your message entirely |
01:40:20 | krux02 | I don't know the unity experience. Because Unity on Linux, it kind of was always was a horrible experience. |
01:40:21 | zachcarter | np |
01:40:35 | zachcarter | Unity sucks, but the architecture is pretty simple |
01:40:46 | zachcarter | scenes - > nodes - > components |
01:41:26 | krux02 | well, what is a scene, what is a node, what is a component? |
01:41:28 | zachcarter | yguklov or however you spell his / her name is establishing a similar architecture for their engine |
01:42:01 | zachcarter | scene 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:33 | krux02 | ok, sounds flexible |
01:42:39 | krux02 | entity component model? |
01:42:42 | zachcarter | essentially |
01:42:58 | zachcarter | and assimp would work flawlessly with it |
01:44:11 | krux02 | well, 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:20 | zachcarter | I agree it’s tough |
01:44:55 | krux02 | I think the only reason, why unity is so successful, is because the road on low level programming with OpenGL is tough |
01:44:59 | zachcarter | I think a 3d engine and a 2d engine both specialized for their own domain would be the better option |
01:45:38 | krux02 | 2d 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:43 | zachcarter | yeah |
01:45:50 | krux02 | simplified |
01:45:50 | zachcarter | I essentially already have a 2d engine |
01:46:12 | zachcarter | I just need to write an example game with it |
01:46:18 | krux02 | I just remember back my times when I wrote games in Blitz Basic |
01:46:25 | krux02 | it was awesome |
01:46:29 | zachcarter | :D |
01:46:40 | krux02 | it I did not feel like I was using an engine |
01:46:46 | krux02 | I had control over the main loop |
01:46:54 | krux02 | I implemented everything |
01:47:21 | zachcarter | that’s what I’m doing, but trying to implement all those things in a generic way |
01:47:38 | krux02 | everything 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:55 | krux02 | and everything was immediate |
01:48:02 | zachcarter | ah yeah |
01:48:06 | zachcarter | I’m trying to optimize |
01:48:15 | zachcarter | just got what bgfx = VAOs working |
01:48:23 | zachcarter | for static meshes anyway |
01:51:27 | krux02 | yea my game is still online in the forum: https://www.blitzforum.de/forum/viewtopic.php?t=9865&highlight= |
01:51:49 | krux02 | if you have blitz basic installed you can just copy paste and there go go |
01:51:51 | krux02 | no assets |
01:51:55 | krux02 | all line art |
01:52:36 | krux02 | well just that you know, animations are horrible |
01:52:49 | krux02 | they look nice, but it's hard to get them right |
01:53:06 | krux02 | the concept seems to be easy, but then it's not |
01:55:10 | zachcarter | I’m sure |
01:55:53 | FromGitter | <zetashift> makes me appreciate things like Pico-8 |
01:56:03 | FromGitter | <zetashift> unfortunately not a big fan of lua |
01:56:14 | krux02 | I just got nostalgic reading my code from 2005 |
01:56:22 | zachcarter | :) |
01:56:22 | krux02 | it so damn readable |
01:56:42 | krux02 | i was a bloody beginner, but intuitively just programmed the right way |
01:57:00 | krux02 | it was only after that, that I got to learn object oriented programming |
01:57:08 | krux02 | well, object oriented programming it sucks |
01:57:21 | krux02 | the stuff I wrote 2005 is much more readable and maintainable |
01:58:02 | krux02 | I mean it's has german and engish stuff mixed up, but apart from that |
01:59:19 | * | pregressive joined #nim |
02:02:34 | FromGitter | <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:09 | FromGitter | <krux02> well that code should work |
02:12:02 | krux02 | I tried the program it just works |
02:12:18 | FromGitter | <jacobdufault> Sorry, the above example works |
02:12:24 | FromGitter | <jacobdufault> It's in a larger program which breaks it |
02:12:36 | FromGitter | <jacobdufault> Program works fine with small input data sets, for but large ones I start getting memory failures |
02:13:32 | FromGitter | <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:54 | FromGitter | <jacobdufault> (ie, the alloc call is updating/changing the free list) |
02:14:00 | FromGitter | <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:20 | FromGitter | <krux02> what do you mean it is changing the free list? |
02:14:54 | FromGitter | <jacobdufault> allocator free list |
02:15:02 | FromGitter | <jacobdufault> I'm guessing free blocks of memory |
02:15:09 | FromGitter | <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:07 | Vladar | Let's say the string has a sequence of Whitespace chars: echo " foo bar ".split() |
08:22:08 | Vladar | shouldn't the result be @[foo, bar] instead of @[, , foo, , bar, , ] ? |
08:24:36 | FromGitter | <dom96> No, because ``join`` should give you the same seq back. |
08:24:48 | FromGitter | <dom96> *the same string |
08:26:02 | * | rokups joined #nim |
08:28:14 | Vladar | hm, interesting. I think it worked differently previously. |
08:29:55 | * | couven92 joined #nim |
08:32:10 | Araq | Vladar: it did, use splitWhitespace for the old behaviour |
08:32:20 | Araq | (which made much more sense but *shrug*) |
08:33:18 | * | arnetheduck quit (Ping timeout: 240 seconds) |
08:35:44 | Vladar | Araq: 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:22 | Araq | Vladar: newlines are part of the definition of Whitespace |
08:43:31 | Araq | so you should be lucky |
08:43:47 | Vladar | Oh, then it might work, thanks |
08:44:02 | * | yglukhov quit (Remote host closed the connection) |
08:47:19 | Araq | Vladar: also I'm sure we documented this breaking change in some news ;-) |
08:49:33 | * | filcuc quit (Ping timeout: 260 seconds) |
08:49:44 | Vladar | yep, 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:27 | demi- | Araq: i updated the issue i created with a much better code example that should repro on any platform. |
12:23:35 | kulelu88 | Hello all |
12:25:16 | flyx | hello kulelu88 |
12:26:21 | kulelu88 | I get this error when trying to execute the HTTPserver server executable on linux: Error: unhandled exception: Permission denied [OSError] |
12:27:45 | flyx | are you trying to bind to a privileged port? |
12:28:05 | kulelu88 | port 80 |
12:28:52 | flyx | try 8080 |
12:28:59 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
12:29:22 | flyx | ports below 1024 are privileged and subject of OS restrictions |
12:29:29 | kulelu88 | aah 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:57 | kulelu88 | documentation is sparse for nim httpserver |
12:31:34 | flyx | yeah because it will be deprecated in favor of asynchttpserver |
12:32:34 | kulelu88 | should I use that instead? flyx |
12:33:20 | * | bjz joined #nim |
12:33:29 | flyx | well 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:49 | flyx | *serve() |
12:35:53 | kulelu88 | flyx: I don't see that in the docs here: https://nim-lang.org/docs/httpserver.html#port,Server |
12:36:38 | flyx | I mean this: https://nim-lang.org/docs/asynchttpserver.html#serve,AsyncHttpServer,Port,proc(Request),string |
12:37:06 | kulelu88 | oh. 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:23 | flyx | I would guess that asynchttp is more performant, but I didn't follow the discussion about it |
12:38:40 | * | yglukhov joined #nim |
12:39:59 | FromGitter | <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:11 | FromGitter | <dom96> Already got some nice ideas out of there (opencollective looks intriguing) |
12:41:01 | FromGitter | <dom96> kulelu88: A synchronous httpserver doesn't really make sense. |
12:41:20 | FromGitter | <dom96> And the way that ``httpserver`` was implemented has multiple issues. |
12:41:48 | * | vlad1777d joined #nim |
12:42:01 | zevlg | hey guys, I've got here compilation error - https://gist.github.com/fbb67b6e2984e1ad5911523f9bb7d439 |
12:42:02 | kulelu88 | Does that restrict Nims asynchttp-lib to node.js use-cases ? |
12:42:10 | kulelu88 | dom96: ^^ |
12:42:38 | zevlg | nim generates uncompilable C code |
12:42:48 | zevlg | is it nim's error or mine ? |
12:43:10 | * | yglukhov quit (Ping timeout: 260 seconds) |
12:43:12 | flyx | zevlg: well you declare that your object is inheritable when it's not |
12:43:44 | flyx | afaik m_type is an internal field Nim needs on a struct to make it inheritable. the imported struct misses this field. |
12:44:35 | flyx | zevlg: make MyObject contain a my_struct value instead of deriving from it |
12:44:47 | flyx | and remove the {.inheritable.} |
12:44:57 | kulelu88 | flyx: something like: waitFor server.serve(Port(8080), address = 0.0.0.0, cb) ?? |
12:45:13 | flyx | kulelu88: address must be a string, so "0.0.0.0" |
12:45:22 | zevlg | I 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:32 | zevlg | i need m_type at the tail of the object |
12:45:39 | zevlg | how do I do this ? |
12:45:42 | kulelu88 | flyx: I tried that first and got a compilation error |
12:46:00 | flyx | kulelu88: well then look at what the compiler complains about and fix that |
12:46:36 | flyx | zevlg: 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:43 | kulelu88 | flyx: nothing I try fixes it. see the error here: https://www.zerobin.net/?abd039b2c03f1f1f#lTvUjNo4gzgkvjs0tNnF8hMA1gXWgUfTj3t11K3O2BM= |
12:49:16 | flyx | kulel |
12:49:27 | flyx | kulelu88: well your arguments are in the wrong order |
12:49:41 | flyx | the address must come after the callback |
12:50:55 | kulelu88 | wow, order mattered 0.o |
12:51:15 | flyx | of course. do you know a language where it doesn't? |
12:52:37 | kulelu88 | Lots of them. you input the port and binding anywhere within serve(...) and it won't matter |
12:52:44 | flyx | o.O |
12:52:57 | flyx | which would those be? |
12:53:12 | kulelu88 | Flask |
12:54:49 | FromGitter | <dom96> kulelu88: what are "node.js use cases"? |
12:55:20 | * | Arrrr joined #nim |
12:55:22 | kulelu88 | long-polled apps like chat-apps |
12:55:23 | flyx | Flask is Python, in Python, order matters: http://flask.pocoo.org/docs/0.12/api/#flask.Flask.run |
12:55:52 | flyx | of course, you can assign parameter values by name, then the order does not matter |
12:56:13 | FromGitter | <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:08 | flyx | like `waitFor server.serve(port=Port(8080), address="0.0.0.0", callback=cb) |
12:58:08 | FromGitter | <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:27 | kulelu88 | dom96: you guys get good coverage on HN. Does that translate into more adoption of Nim each time? |
12:58:52 | flyx | I don't think we have any reliable metrics for that |
12:59:09 | flyx | mentions on HN itself are a metric of adaption |
13:00:59 | kulelu88 | flyx: I prefer the assigning by name method. much cleaner to understand what is happening |
13:01:11 | flyx | kulelu88: well you're welcome to use it |
13:01:19 | * | yglukhov joined #nim |
13:02:52 | zevlg | Araq: 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:49 | Araq | zevlg: how else would the runtime determine correct "of" (instanceof) usages? |
13:07:44 | zevlg | ah, ok, a see |
13:07:50 | zevlg | I see now |
13:15:17 | * | zachcarter quit (Quit: zachcarter) |
13:16:49 | Araq | zevlg: you can use .inheritable and not 'of RootObj' to enable inheritance without the m_type fields |
13:17:06 | Araq | but this is dangerous since then the compiler cannot emit runtime type checks |
13:17:25 | Araq | it's very useful for C++ interop though |
13:22:54 | zevlg | thanks, 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:46 | zachcarter | hmm my #def directives inside my c2nim block don’t seem to be being read |
14:42:34 | zachcarter | https://gist.github.com/zacharycarter/6808b813d65df41758ae21bed2d9f16b |
14:44:07 | Araq | ifndef? |
14:44:39 | Araq | that should be #ifdef |
14:44:49 | * | yglukhov joined #nim |
14:45:18 | zachcarter | oh whoops |
14:45:20 | zachcarter | thank you |
14:45:30 | zachcarter | I 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:13 | FromGitter | <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:41 | dom96 | weird. Any ideas Araq? |
16:41:47 | Araq | well that doesn't build koch with the recent Nim |
16:42:00 | Araq | that builds koch with the old Nim |
16:42:29 | Araq | and koch nimble too uses the old Nim, the whole 'koch boot -d:release' step is missing |
16:43:25 | Araq | I'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:58 | dom96 | hrm, 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:20 | demi- | 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:47 | demi- | 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:12 | federico3 | demi-: isn't TravisCI the one with free osx builds? afaik osx on CircleCI is paid |
17:22:58 | demi- | 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:20 | federico3 | right, there's some fine print on the pricing page |
17:23:41 | demi- | i use it for all my OSS stuff |
17:23:55 | federico3 | demi-: do you have to ping them for each project or once? |
17:24:16 | demi- | just once iirc, it unlocks for your account |
17:24:22 | Araq | we already use travis |
17:24:34 | Araq | seems easier to use travis for OSX too |
17:24:57 | demi- | 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:49 | cheatfate | demi-, 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:46 | demi- | i think that would put you in the higher bucket of build time on them tbh |
18:06:30 | cheatfate | and of course it will be nice to have circleCi too, just because we can run 3 test runs concurrently |
18:07:04 | demi- | 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:28 | cheatfate | demi-, i'm not a part of nim team, i'm just volunteer |
18:10:20 | * | libman joined #nim |
18:13:22 | Araq | I patched .travis.yml |
18:13:35 | Araq | I'll see what it complains about |
18:13:45 | Araq | on 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:07 | FromGitter | <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:19 | FromGitter | <raydf> Any ideas? |
19:47:26 | * | yglukhov joined #nim |
19:49:50 | * | nsf joined #nim |
19:53:49 | * | Snircle joined #nim |
19:56:17 | Araq | echo jobj{"missing key"}.getFNum(0.1) # read a float value using a default |
19:56:22 | Araq | https://nim-lang.org/docs/json.html |
19:56:37 | * | xet7 quit (Quit: Leaving) |
19:56:55 | Araq | https://nim-lang.org/docs/json.html#{},JsonNode,varargs[string] |
19:57:45 | * | yglukhov quit (Remote host closed the connection) |
19:58:53 | FromGitter | <raydf> is there any fuent dsl like jobj{"test"}{"subtest"}{"subsubtest"}? |
19:59:46 | FromGitter | <raydf> ok i tried, i'm reading the source code, thanks @Araq |
20:00:03 | FromGitter | <raydf> didn't catch the `{}` operator |
20:00:12 | Araq | jobj{"field", "subfield", "etc"} |
20:00:14 | FromGitter | <raydf> nice |
20:00:40 | Araq | yeah the json module is really nice |
20:01:55 | FromGitter | <raydf> what the nim way to handle nulls? |
20:02:08 | FromGitter | <raydf> if? |
20:04:36 | Araq | I 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:49 | FromGitter | <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:00 | Salewski | Araq, 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:04 | Salewski | In the examples only module ui is imported. I think import ui and rawui will give name conflicts, for example for symbol button. |
20:34:43 | Salewski | One solution may be to put enums and consts in a third separate module? |
20:35:37 | Araq | another 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:41 | Salewski | Or to put all in only one module, as Jason Masour did for his gobject introspection attempt. |
20:37:06 | Salewski | Yes, of course I can use module prefix. So always write ui.Button? |
20:37:14 | Araq | or from rawui import Enum |
20:37:21 | Araq | or import rawui except Button |
20:39:05 | Salewski | from rawui import Enum! That is possible? So I can import all the enums from rawui, and only ENUMS? |
20:39:28 | Araq | no, that would be from rawui import ConcreteEnumTypeHere |
20:40:50 | Salewski | OK. But for GTK related stuff we have hundreds of enums and consts which we really need. |
20:41:01 | Araq | aha, sorry. |
20:41:21 | Araq | so the question is not about ui.nim but how to do it when things are bigger :-) |
20:41:55 | Salewski | Yes of course, my concern is still GTK... |
20:43:02 | Salewski | Jason Masour has done nice work with his smart-gi gobject introspection module, but I dont think he will continue the work. |
20:43:19 | Araq | oh yeah, you can do commongtk, rawgtk, gtk |
20:43:21 | Salewski | So I am playing with some high level stuff |
20:43:33 | Araq | and 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:27 | Salewski | OK, I wanted just to check that I did not miss something. Bye... |
20:44:51 | Araq | bye |
20:45:00 | * | Salewski left #nim (#nim) |
20:59:18 | subsetpark | Can someone correct my understanding of templates? This fails compilation with "undeclared identifier" |
20:59:22 | subsetpark | https://www.irccloud.com/pastebin/097wPob5/ |
20:59:44 | subsetpark | oh wait, that's wrong for other reasons... |
21:00:34 | subsetpark | https://www.irccloud.com/pastebin/Vkgm1FPK/ |
21:02:33 | subsetpark | In 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:30 | subsetpark | Is this possible without doing a full macro? I don't see any examples in the manual... |
21:16:47 | * | yglukhov joined #nim |
21:17:36 | dom96 | subsetpark: You might need to do something like this https://gist.github.com/dom96/e7c7db53dab41795a4604569e06c2fef |
21:20:45 | subsetpark | hm yeah, that works. can you explain what's going on there? |
21:24:37 | subsetpark | I'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:49 | dom96 | The `inject` pragma lets the identifiers be accessed via the code inside the `body` |
21:27:28 | dom96 | Better yet: https://gist.github.com/dom96/2d182398a08e3e753be0c00145bb249e |
21:27:47 | dom96 | by default templates are hygienic |
21:28:12 | dom96 | so any variables/params declared inside the template are not visible to the outside scope |
21:28:23 | dom96 | {.dirty.} changes these semantics |
21:29:01 | subsetpark | cool, i like that - i still get this weird "identifier expected" error, though. What does that usually refer to? |
21:29:12 | dom96 | Show me the code |
21:29:54 | subsetpark | https://www.irccloud.com/pastebin/xDgr0koH/ |
21:31:26 | dom96 | settings.xScale = (settings.xMax - settings.xMin) |
21:31:49 | dom96 | becomes: settings.xScale = (settings.-3.0 - settings.4.0) |
21:32:11 | subsetpark | oh shoot, i see |
21:32:16 | subsetpark | so i need to bind all those within scope? |
21:32:52 | subsetpark | ah, or just pick better names |
21:32:53 | dom96 | just change the names of the params |
21:33:00 | subsetpark | that don't conflict with the attributes of the object |
21:33:48 | subsetpark | got it! This is powerful stuff... |
21:33:55 | subsetpark | thanks as always dom96 |
21:35:38 | dom96 | np :) |
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:43 | yay | Not 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:50 | zachcarter | can 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:05 | zachcarter | https://irclogs.nim-lang.org/21-01-2017.html#04:07:43 |
22:40:08 | * | gangstacat quit (Ping timeout: 255 seconds) |
22:40:11 | zachcarter | there’s the original convo b/w Araq and myself |
22:40:13 | zachcarter | for context |
22:40:29 | Araq | I'm still here |
22:40:36 | zachcarter | oh hey |
22:40:39 | Araq | whats the error? |
22:41:11 | zachcarter | value of type 'typedesc[int]' has to be discarded |
22:41:36 | zachcarter | ah wait |
22:41:41 | zachcarter | I think I get it |
22:41:58 | zachcarter | I need to seperate this into three lines and then throw discards in front of type(a) and (a.cint or b.cint) |
22:41:59 | zachcarter | ? |
22:42:31 | zachcarter | not really understanding how this works - I don’t get what type(a) does |
22:42:36 | * | rauss quit (Quit: WeeChat 1.7) |
22:43:07 | Araq | it's like C++'s typeof() |
22:43:23 | Araq | it converts the result back to a's type |
22:43:27 | Araq | which should be the enum type |
22:43:33 | zachcarter | ahhh okay |
22:43:42 | zachcarter | man that is magical |
22:44:18 | * | chemist69 quit (Ping timeout: 240 seconds) |
22:44:20 | zachcarter | okay thank you Araq I think that explanation gets me going |
22:44:34 | zachcarter | was 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) |