00:02:02 | * | PMunch joined #nim |
00:15:58 | FromGitter | <ivankoster> @dom96 ah, making the proc a template makes it compile time and then the compiler can check the generated assignment and if the user tries to assign an int to a string it wont compile. |
00:25:10 | * | Nobabs27 joined #nim |
00:26:29 | * | zachcarter quit (Read error: Connection reset by peer) |
00:27:56 | FromGitter | <ivankoster> https://gist.github.com/ivankoster/6a9e0587d8e7a3df17b0111edcdde582 seems good enough for now, pretty happy with it. When i've updated the protoc compiler and the runtime library i think it will be most userfriendly one_of implementation that is type safe. Well, compared to C++ and C# at least |
00:27:58 | * | _yeeve quit (Ping timeout: 240 seconds) |
00:28:50 | * | zachcarter joined #nim |
00:29:17 | * | _yeeve joined #nim |
00:38:49 | * | sz0 joined #nim |
00:43:51 | * | Nobabs27 quit (Quit: Leaving) |
01:03:20 | * | pie__ quit (Ping timeout: 246 seconds) |
01:25:14 | * | rauss joined #nim |
01:34:44 | * | vlad1777d quit (Remote host closed the connection) |
02:11:17 | zachcarter | well I managed to get an android app started but it crashes |
02:11:22 | zachcarter | something about SDL and EGL |
02:44:23 | * | sz0 quit (Quit: Connection closed for inactivity) |
02:56:59 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
02:59:06 | * | chemist69 quit (Ping timeout: 240 seconds) |
03:02:39 | * | chemist69 joined #nim |
03:02:55 | * | brson quit (Quit: leaving) |
03:16:07 | * | PMunch quit (Quit: leaving) |
03:32:50 | * | def-pri-pub quit (Quit: leaving) |
03:40:05 | * | Serenit0r joined #nim |
03:43:29 | * | Serenitor quit (Ping timeout: 240 seconds) |
03:48:21 | * | zachcarter left #nim (#nim) |
03:49:27 | * | zachcarter joined #nim |
03:50:46 | * | zachcarter left #nim (#nim) |
04:02:52 | * | zachcarter joined #nim |
04:09:43 | * | Serenit0r quit (Quit: Leaving) |
04:52:36 | * | rauss quit (Quit: WeeChat 1.7) |
05:01:29 | * | chemist69 quit (Ping timeout: 240 seconds) |
05:19:51 | * | chemist69 joined #nim |
05:30:12 | * | vlad1777d joined #nim |
05:50:55 | * | vlad1777d quit (Quit: Leaving) |
06:37:54 | FromGitter | <Varriount> zachcarter: You could try looking at other engines (I think the unreal engine source is open?) And see what they do. |
06:38:08 | zachcarter | yeah |
06:38:12 | zachcarter | I think I’m making progress |
06:38:22 | zachcarter | on the android front with sdl2 |
06:38:29 | FromGitter | <Varriount> Also keep in mind that phone support for OpenGL is very... splotchy |
06:38:31 | zachcarter | but man is it painful |
06:38:41 | zachcarter | yeah :/ |
06:39:38 | * | roygbiv joined #nim |
06:40:14 | * | nsf joined #nim |
06:56:08 | * | djellemah joined #nim |
07:01:12 | * | tankfeeder joined #nim |
07:07:22 | * | arnetheduck joined #nim |
07:44:58 | * | Vladar joined #nim |
07:58:56 | * | rokups joined #nim |
08:13:08 | * | gokr joined #nim |
08:18:45 | * | girvo joined #nim |
08:24:28 | * | Andris_zbx joined #nim |
08:24:34 | * | bjz joined #nim |
08:32:05 | * | couven92 joined #nim |
08:39:24 | * | Arrrr joined #nim |
08:39:53 | * | couven92 quit (Quit: Client disconnecting) |
08:40:20 | * | couven92 joined #nim |
09:10:30 | cheatfate | rokups, have you seen coroutines `SIGSEGV: Illegal storage access. (Attempt to read from nil?)` on Travis CI macos tests? |
09:10:37 | cheatfate | https://travis-ci.org/nim-lang/Nim/jobs/212032516 |
09:11:05 | cheatfate | https://travis-ci.org/nim-lang/Nim/jobs/212032516#L2048 |
09:11:50 | rokups | i havent |
09:18:58 | Araq | yeah time to make osx travis tests non-optional |
09:23:46 | * | girvo_ joined #nim |
09:24:54 | * | PMunch joined #nim |
09:26:25 | * | girvo quit (Ping timeout: 260 seconds) |
09:28:34 | * | jjido joined #nim |
09:44:11 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
09:44:12 | * | JStoker quit (Quit: JStoker is gone :() |
09:46:22 | * | bjz joined #nim |
09:47:23 | * | JStoker joined #nim |
09:50:52 | Arrrr | There is some issue with the forum, once i post i get an 404 error. |
09:52:45 | euantor | What URL is it taking you to after posting? |
09:55:07 | Arrrr | It was after posting in the mascot thread |
09:55:09 | Arrrr | https://forum.nim-lang.org/t/2866/2#17849 |
09:55:12 | Arrrr | https://i.imgur.com/gcOB7k7.gif |
09:57:05 | Araq | Arrrr: works for me and I can see your recent post |
09:58:13 | Arrrr | Yes, i can too. Also, if i press on page 2, i get the same error |
09:58:34 | Arrrr | But i see my post, which is the last one of this thread, on page 1 |
10:04:50 | * | girvo_ quit (Ping timeout: 240 seconds) |
10:12:23 | FromGitter | <Almynic> is there an easy way to create a mock of a folder structure for testing? I want to test if my program works correctly |
10:14:01 | Araq | almynic: no idea what that means, you can have patchFile in a config.nims to override modules |
10:14:06 | Araq | when defined(mock): |
10:14:16 | Araq | patchFile(...) |
10:14:23 | Araq | nim c -r -d:mock ... |
10:16:16 | FromGitter | <Almynic> @araq I have a proc and instead of using a real directory I want to use a mock ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=58cbb76ffe6a638b1ad59b44] |
10:17:51 | FromGitter | <Araq> why? should restructure the code to take a dataToBeProcessed. split it in 2 procs. |
10:20:31 | FromGitter | <Almynic> @araq ok that works too. |
10:26:26 | cheatfate | rokups, interesting but dragonflybsd (which is based on freebsd as macos) passes tests without problems |
10:26:57 | * | brechtm joined #nim |
10:28:31 | brechtm | Having another look at nim after a long time. Can't seem to install nake using nimble. |
10:29:31 | Araq | what's the error message? |
10:29:52 | brechtm | http://pastebin.com/bzv40SgC |
10:30:37 | brechtm | Using nim 0.16.0 on macOS Sierra (from Homebrew) |
10:31:27 | Araq | use Nim devel and Nimble 0.8.4 |
10:33:34 | brechtm | "nimble list -i" also prints some warning about outdated/corrupt packages |
10:33:45 | brechtm | ok, trying "brew install --HEAD nim" |
10:35:46 | brechtm | Thanks Araq, that worked. |
10:36:30 | Araq | you're welcome |
10:47:49 | * | brechtm quit (Ping timeout: 240 seconds) |
10:57:44 | * | girvo joined #nim |
11:02:09 | * | girvo quit (Ping timeout: 240 seconds) |
11:02:25 | * | Snircle joined #nim |
11:26:50 | * | zachcarter quit (Quit: zachcarter) |
11:36:41 | * | couven92 quit (Quit: Leaving) |
11:42:51 | * | couven92 joined #nim |
12:01:49 | * | Vladar quit (Remote host closed the connection) |
12:10:18 | * | PMunch quit (Remote host closed the connection) |
12:30:36 | * | Vladar joined #nim |
12:35:51 | * | brechtm joined #nim |
12:36:30 | brechtm | When printing opengl error numbers (GLenum), I get "type mismatch: got (GLenum)" |
12:37:03 | brechtm | shouldn't a "proc `$`*(x: GLenum): string" be defined in the opengl module? |
12:39:09 | * | elrood joined #nim |
12:39:10 | Araq | brechtm: well that seems tedious to write. but you can convert to 'int' to print it |
12:40:25 | brechtm | I came up with this implementation for the $ proc: result = $(cast[int](x)) |
12:40:43 | brechtm | but that may not be a good way to do it... |
12:42:40 | FromGitter | <dom96> Arrrr: That's because the user that created the post was moderated and so only admins can see it. |
12:42:49 | FromGitter | <dom96> This feature needs to be improved. |
12:43:01 | FromGitter | <dom96> That user's posts should now be visible |
12:43:26 | * | brechtm quit (Remote host closed the connection) |
12:47:01 | * | brechtm joined #nim |
12:47:43 | FromGitter | <brechtm> The $ proc was not needed back when I was using Nim 0.14-ish |
12:48:06 | FromGitter | <brechtm> bbl |
12:48:08 | * | brechtm quit (Remote host closed the connection) |
12:48:29 | Araq | well code evolves, OpenGL wrapper might have made it a distinct int for better type checking |
12:48:43 | * | brechtm joined #nim |
12:49:40 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
12:52:49 | * | brechtm quit (Ping timeout: 240 seconds) |
12:54:27 | * | bjz joined #nim |
13:02:24 | * | couven92 quit (Quit: Client disconnecting) |
13:14:19 | * | jjido quit (Read error: Connection reset by peer) |
13:23:56 | * | shashlick quit (Ping timeout: 246 seconds) |
13:24:36 | * | bjz quit (Ping timeout: 240 seconds) |
13:24:56 | * | bjz_ joined #nim |
13:25:53 | * | shashlick joined #nim |
13:33:44 | * | zachcarter joined #nim |
13:42:18 | * | gokr quit (Ping timeout: 268 seconds) |
13:45:27 | * | brechtm joined #nim |
13:50:36 | * | zachcarter quit (Ping timeout: 240 seconds) |
13:51:25 | * | zachcarter joined #nim |
14:04:37 | * | bjz joined #nim |
14:05:01 | * | bjz_ quit (Ping timeout: 260 seconds) |
14:33:32 | * | rauss joined #nim |
14:41:23 | * | gokr joined #nim |
14:44:59 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:48:06 | * | brechtm quit (Remote host closed the connection) |
15:02:28 | * | nsf quit (Quit: WeeChat 1.7) |
15:10:28 | * | rauss quit (Ping timeout: 240 seconds) |
15:12:13 | * | tankfeeder quit (Quit: Leaving) |
15:12:54 | * | rauss joined #nim |
15:17:46 | * | Ven joined #nim |
15:18:09 | * | Ven is now known as Guest64566 |
15:28:30 | * | gokr quit (Ping timeout: 258 seconds) |
15:28:42 | * | brson joined #nim |
15:34:09 | * | ofelas quit (Ping timeout: 260 seconds) |
15:36:31 | ftsf | hmm is basic3d missing * for Matrix3d intentionally? seems a pretty common operation |
15:39:24 | * | krux02 joined #nim |
15:44:29 | * | arnetheduck quit (Ping timeout: 240 seconds) |
15:50:00 | * | ofelas joined #nim |
16:07:59 | * | rauss quit (Quit: WeeChat 1.7) |
16:08:14 | Araq | ftsf: maybe it's called dot or something |
16:09:20 | ftsf | hmm there's dot for Vector3d, but not Matrix3d. |
16:09:41 | * | BitPuffin|osx quit (Ping timeout: 268 seconds) |
16:12:29 | ftsf | https://github.com/nim-lang/Nim/pull/5108 ahh someone attempted previously |
16:15:00 | * | gmpreussner_ quit (Quit: kthxbye) |
16:21:40 | * | brechtm joined #nim |
16:24:59 | * | gmpreussner joined #nim |
16:26:42 | krux02 | I don't recommend using the standard library matrix vector math library |
16:26:48 | * | girvo joined #nim |
16:27:02 | ftsf | krux02, why is that? |
16:27:50 | krux02 | several reasons |
16:29:00 | krux02 | the number one reason for me not to use it, it does not use a Mat4 Vec4 for 3D operations |
16:30:06 | ftsf | by the "standard library matrix vector math library" do you mean the stuff in basic2d/3d ? or are you talking about another library? |
16:30:22 | krux02 | I talk about that |
16:30:23 | krux02 | yes |
16:31:17 | * | girvo quit (Ping timeout: 260 seconds) |
16:31:39 | krux02 | this is my recommendation: https://github.com/krux02/nim-glm |
16:31:43 | ftsf | i'm not really sure what you mean by "for 3d operations" |
16:33:41 | ftsf | i see, i had a look at that but saw that it said the example doesn't compile so i figured it wasn't ready to be used |
16:35:20 | krux02 | actually I use it regularly |
16:35:44 | krux02 | when the examples don't compile it might happen that I just did not notice it, because I never automated testing the examples |
16:35:55 | krux02 | but it is in heavy use in another project |
16:36:10 | ftsf | ahh, i just saw the comment in the examples that said it doesn't compile, didn't actually try to run it |
16:36:18 | ftsf | will give it a try |
16:36:24 | krux02 | this project here: https://github.com/krux02/opengl-sandbox |
16:36:31 | * | PMunch joined #nim |
16:36:35 | krux02 | uses those matrices/vectors for everything |
16:36:48 | krux02 | the thing is only, it's not documented at all |
16:36:52 | ftsf | cool |
16:37:09 | * | gmpreussner quit (Quit: kthxbye) |
16:37:09 | krux02 | but on the other side it only implements standard stuff |
16:37:16 | krux02 | so you should be able to look up everything |
16:37:28 | ftsf | if it's comparable to glm that's cool |
16:37:35 | krux02 | and it tries to replicate what glsl does in shaders |
16:37:52 | krux02 | well glm has a ton of features that I just could not implement in my time |
16:38:22 | krux02 | I also never spend time to do performance optimizations |
16:38:37 | krux02 | it just is written in the style of glm, so that fast performance is possible |
16:38:48 | * | couven92 joined #nim |
16:38:58 | krux02 | I just didn't need it for my examples, correctness, and extensibility were more important |
16:39:09 | krux02 | the performace critical stuff is all written in glsl anyway |
16:39:39 | krux02 | but i's not super slow or semething like that |
16:41:59 | krux02 | and remember, matrices are not magical rectangles of numbers, they are linear mappings from vector space to vector space. |
16:43:10 | * | gmpreussner joined #nim |
16:46:45 | * | Trustable joined #nim |
16:51:04 | ftsf | krux02, awesome it works =) |
16:51:19 | ftsf | much easier to use than basic3d |
16:53:19 | * | jjido joined #nim |
16:53:36 | krux02 | ftsf: where are you using it? |
16:53:56 | ftsf | krux02, just playing around with sdl2 + opengl in nim at the moment |
16:54:43 | krux02 | yes, especially for opengl you need mat4 |
16:54:59 | krux02 | I almost never use mat3 |
16:55:15 | ftsf | basic3d's Matrix3D is a 4x4 matrix |
16:55:30 | krux02 | well, that's weird |
16:55:33 | ftsf | yep =) |
16:55:52 | krux02 | also a point type is weird |
16:56:09 | krux02 | a point is a vec4 with the last component set to 1 |
16:56:26 | krux02 | In my university I learned the coordinate system |
16:56:35 | krux02 | the last component is not limited to be 1 |
16:57:07 | ftsf | yeah having separate vector/point type is strange |
16:57:15 | couven92 | How do I write my name in a comment (or string literal) in Nim? I got æ and ø in my name... Is Nim code UTF-8? |
16:57:54 | def- | couven92: yeah, just use utf8 |
16:58:07 | couven92 | oki doki |
16:58:09 | krux02 | a point (x y z) can be represented for any w>0 as (x*w y*w z*w w) |
16:58:20 | krux02 | so a every point has infinite representations |
16:58:52 | krux02 | all transformations like translation rotation sheer etc still work |
16:59:12 | krux02 | only when you need a meaningful xyz component, then you need to normalize |
16:59:52 | ftsf | interesting |
17:00:05 | krux02 | and most interesting |
17:00:20 | krux02 | what do you think happens when you set w to 0? |
17:00:46 | * | roygbiv quit (Quit: ™) |
17:00:47 | krux02 | wait I main in this context |
17:00:53 | krux02 | (x y z w) |
17:00:56 | ftsf | i've heard that's useful for direction vectors but i don't really know |
17:01:11 | ftsf | most 3d math is beyond me |
17:01:16 | krux02 | normally when you want to use vectors, you set the last component to 0 |
17:01:26 | krux02 | then translation does not have an effect anymore |
17:02:00 | krux02 | so you can apply a translation/rotation matrix to a vector by multiplying it, and the vector is just multiplied |
17:02:28 | ftsf | so it will be rotated but not translated |
17:02:29 | krux02 | but when you have a point (x' y' z') represented as (x y z w) |
17:02:31 | * | nsf joined #nim |
17:02:36 | krux02 | when you shring just w |
17:02:50 | krux02 | then in the normalization step x' y' z' grow |
17:03:02 | krux02 | and when you would go all the way to 0 |
17:03:12 | krux02 | x' y' z' would grow to infinity |
17:04:24 | krux02 | and that is exactly whas is defined in opengl, when you write a vertex with w component as 0 |
17:04:33 | krux02 | you have a point that is infinitively far away |
17:04:45 | krux02 | that is something, that you normally don't see in any application |
17:05:03 | krux02 | texture mapping doesn't really work that well on infititively far away points |
17:05:09 | ftsf | yes, can't say i've ever used the w component |
17:05:19 | krux02 | you can use it |
17:05:37 | ftsf | but i've mostly done 2d stuff in opengl in the past |
17:05:43 | krux02 | I actually did use it, to create an infinitve plane |
17:06:14 | krux02 | I guess you did it with the opengl 1.4 matrix stack? |
17:06:31 | ftsf | yes, and i've done a bit of modern opengl before |
17:06:41 | ftsf | but first time in nim |
17:06:50 | krux02 | yes modern opengl is very tedious with all that shader compilation stuff |
17:07:06 | ftsf | yeah, got that working, much nicer in nim than c++ |
17:07:13 | krux02 | old opengl is much nicer to write, no shader compilation |
17:07:34 | ftsf | yeah, old opengl is much easier to get started with |
17:07:43 | ftsf | but shaders are very fun |
17:07:53 | krux02 | but you gen nim macros to generate all your glue code for opengl |
17:07:58 | * | jjido quit (Read error: Connection reset by peer) |
17:08:34 | ftsf | i'm hoping to make a simple 3d game, low poly, block colour models, but with skeletal animation, that might be tricky |
17:08:45 | krux02 | well |
17:08:51 | krux02 | I have an example |
17:08:55 | krux02 | in nim |
17:08:57 | krux02 | that works |
17:09:06 | krux02 | with skeletal animation |
17:09:11 | * | Guest64566 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:09:34 | ftsf | cool |
17:09:35 | krux02 | it's not complete in the sense, that it can play different animations, it just loads a mesh and one animation |
17:09:40 | krux02 | but it works |
17:10:29 | ftsf | so far I have a hard coded triangle and can move the camera around =) |
17:10:33 | krux02 | https://github.com/krux02/opengl-sandbox/blob/master/examples/mesh_loading_tiny.nim |
17:11:01 | krux02 | it has lot's of debug output for me, so that I see that I load the correct data |
17:11:38 | krux02 | it renders the bones and their names, and also the mesh |
17:12:12 | krux02 | I've written a macro that generates all the opengl glue code |
17:12:15 | ftsf | awesome |
17:12:37 | krux02 | it just doesn't work on a mac |
17:13:16 | ftsf | i guess i'll need some simple collision stuff too, might look into bullet or something |
17:13:24 | krux02 | I can't support mac, because mac doesn't support opengl anymore, the latest opengl version they support is 7 years old |
17:13:35 | krux02 | yea bullet is hard to wrap |
17:13:45 | ftsf | really =( that's depressing |
17:13:48 | krux02 | I can tell you, you don't need bullet |
17:14:02 | couven92 | when else? |
17:14:15 | krux02 | I all depends on what you want to do |
17:14:17 | couven92 | how to do else for a when statement? |
17:14:29 | krux02 | I also thought for a long time, just include bullet and all your problems are gone |
17:14:45 | krux02 | I have used bullet, and no it dosn't really solve any of the interesting problems |
17:14:50 | ftsf | couven92, when(foo): ... else: ... |
17:14:56 | krux02 | and introduces a big set of new problems |
17:15:27 | couven92 | ftsf, okay... does else when work? |
17:15:29 | krux02 | couven92, yes just put an else it is no different than the else from if |
17:15:45 | ftsf | couven92, i'm sure i've used it before. are you having problems with it? |
17:15:52 | PMunch | What about elif? |
17:16:00 | krux02 | elif works |
17:16:12 | PMunch | So there's no special elwh: :P |
17:16:17 | krux02 | when ...: ... elif: ... else: ... |
17:16:50 | krux02 | yes no special elif |
17:17:01 | krux02 | elwhen: |
17:17:11 | krux02 | sounds like an elvish name |
17:17:17 | PMunch | Haha :P |
17:18:18 | krux02 | ftsf: to go back to you bullet problem |
17:18:33 | krux02 | what do you think bullet helps you to solve |
17:18:44 | * | Ven joined #nim |
17:19:00 | krux02 | I tried to use it for my character controller, but that really did not work out, bullet does not solve that for you |
17:19:01 | ftsf | collision response |
17:19:07 | * | Ven is now known as Guest36584 |
17:19:15 | krux02 | collision response of what |
17:19:35 | ftsf | character against the world and other moving objects |
17:19:49 | krux02 | yes, that is exactly what bullet does not solve for you |
17:20:09 | krux02 | you can have a ball against the world |
17:20:11 | krux02 | or a box |
17:20:14 | krux02 | or a cone |
17:20:20 | krux02 | or a whatever |
17:20:26 | krux02 | also ragdoll |
17:20:41 | krux02 | but there is no human-like |
17:20:55 | ftsf | ahh, well that's fine |
17:21:04 | ftsf | human can be approximated by a ball |
17:21:12 | krux02 | no it can't |
17:21:31 | ftsf | for this case it's fine |
17:21:42 | * | jjido joined #nim |
17:21:45 | krux02 | how would you do accelerate |
17:22:41 | ftsf | i haven't looked at it recently |
17:23:08 | krux02 | well the initial idea is to add force to the player |
17:23:24 | krux02 | and then the player grinds on the floor |
17:23:43 | krux02 | and then all of a sudden you have better control as long as you are in air, but not on the ground |
17:24:21 | krux02 | and when you want to add something like an ice surface, the ice surface gives you better control than anything with friction |
17:24:28 | krux02 | even though it should be the other way around |
17:25:26 | * | Guest36584 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:25:42 | krux02 | the cleanest solution that I know, is that you have two main states for you player, one is attached2ground and one is inAir |
17:25:57 | krux02 | then you can control air and on ground differently |
17:26:10 | krux02 | and you can tread on ground as a 2D problem |
17:27:54 | krux02 | the player can become a circle on the navigation mesh, and you can't fall through the floor anymore |
17:28:15 | krux02 | also the physics doesn't need to constantly push the player away from the ground anymore |
17:28:26 | ftsf | yes that will be fine for this |
17:28:29 | krux02 | that is also used in 2D games |
17:28:37 | ftsf | it's basically a 2d game with 3d graphics |
17:28:52 | krux02 | and for that you don't need bullet |
17:30:24 | krux02 | when you want to shoot balls in a pile of boxes, bullet can really help your game, but you don't want to do that, bullet might not be worth it |
17:30:32 | krux02 | or you can do it for visual effects |
17:30:51 | krux02 | but I guess that is not what you intend to do |
17:30:58 | ftsf | yeah |
17:31:02 | ftsf | bedtime, night o/ |
17:31:14 | couven92 | hmmm... in a passL pragma... how to resolve a relative path? |
17:31:40 | couven92 | I want a path relative to file I am in, not relative to file I am compiling... |
17:31:40 | * | mjanssen left #nim (#nim) |
17:31:57 | krux02 | couven92, I do something smart staticExec("readlink -f .") |
17:32:26 | krux02 | that works (on unix machines) |
17:32:40 | demi- | couven92: why do you need relative paths? |
17:33:12 | krux02 | demi-, because he probably bundles his executable with some library |
17:33:16 | couven92 | krux02, howto? and the whole reason I am doing this is because I need link paths for wxWidgets |
17:33:59 | * | Andris_zbx quit (Remote host closed the connection) |
17:34:01 | demi- | is there no -rpath style command to say "look relative to the executable" on linux? |
17:34:10 | * | brson quit (Ping timeout: 268 seconds) |
17:35:10 | krux02 | demi-, https://github.com/krux02/tblis-nim/blob/master/tblis.nim#L10 |
17:35:30 | krux02 | it's a hack |
17:35:32 | demi- | that seems like a gross hack |
17:35:38 | krux02 | I don't like it |
17:35:46 | krux02 | but I don't know any better |
17:36:12 | krux02 | I don't even understand the linker flags |
17:36:21 | demi- | hence my question, on os x we have something called @executable_path/ and @loader_path/ which tell the linker to look relative to the executable or loading location |
17:36:25 | krux02 | it is just what cmake generated |
17:36:34 | krux02 | and it also works for gcc/clang only |
17:36:34 | demi- | you should look at the linker's man page |
17:36:46 | demi- | there should be more info there |
17:36:48 | krux02 | compile on windows, both readlink and the compiler flags would just fail |
17:37:02 | krux02 | I know the linkers man page |
17:37:18 | krux02 | at some point I was "ah screw this, copy paste" |
17:37:51 | krux02 | I failed to link statically |
17:38:29 | couven92 | I should really simply define a wxWidgets path variable |
17:38:37 | couven92 | and then do a path join |
17:39:43 | demi- | are you shipping this as source or as binary? |
17:40:20 | demi- | because if it is source you should just provide standard search locations to link against the library, possibly using an environment variable if you need to get something user-defined |
17:42:47 | * | rauss joined #nim |
17:43:16 | * | PMunch quit (Quit: leaving) |
17:44:23 | demi- | presumably this isn't the first time this problem is needed to be solved, so surely wxWidgets dos have some guidance about this |
17:44:52 | * | jjido quit (Read error: Connection reset by peer) |
17:45:54 | krux02 | demi-, I am shipping as source, but I can't assume at all, that the source I am wrapping is something that is installed, it's too obscure and rare |
17:46:34 | krux02 | I bundle the dependency in the exact version that I know that compiles |
17:46:35 | demi- | you should be able to safely assume standard search paths, or as i said, use an environment variable |
17:47:02 | krux02 | demi-, no environment variables are horrible and ugly |
17:47:13 | demi- | better than what you showed me |
17:47:26 | krux02 | I doubt it |
17:48:03 | * | libman joined #nim |
17:48:04 | * | brechtm_ joined #nim |
17:48:31 | krux02 | If you want anybody to be able to reproduce your build, you should not assume 20 environment variables set correctly with libraries compiled in exactly the one version you had |
17:48:53 | krux02 | it just pushes the propability of a reproducable build to almost 0 |
17:49:25 | krux02 | better something that does not work on all platforms, than something that doesn't work at all |
17:49:46 | * | Trustable quit (Remote host closed the connection) |
17:50:08 | krux02 | my mantra is more "come with batteries included, or don't come at all" |
17:51:23 | * | brechtm quit (Ping timeout: 264 seconds) |
17:51:42 | krux02 | I would agree, when there would be a package for this library for major distributions and it would have some level of adoption, for for things that are very rare, it doesn't make sense to not bundle it |
17:52:30 | demi- | believe it or not, my comments were directed at couven92, not you :) |
17:52:49 | krux02 | demi-, well we had the same problem |
17:53:27 | krux02 | but yes wxWidgets is available for distributions |
17:53:45 | krux02 | but it's ugly is several ways, I am happy I don't have to mess with it |
17:55:36 | demi- | tbqh, i think your problem here is you are using a language's constructs in-place of an actual build tool; which is why this is so ugly. |
18:00:06 | couven92 | But I still go for the path configured through the .cfg for you application... Considering all the options and how wxNim is done, it seems like the best way to do it... It's a fork from Araq anyways, so we'll see what he has to say about it :P |
18:12:09 | * | smt_ joined #nim |
18:12:45 | * | brson joined #nim |
18:13:01 | * | BitPuffin|osx joined #nim |
18:14:37 | * | BitPuffin|osx quit (Remote host closed the connection) |
18:14:59 | * | girvo joined #nim |
18:15:42 | * | smt quit (Ping timeout: 260 seconds) |
18:19:28 | * | girvo quit (Ping timeout: 240 seconds) |
18:34:26 | * | brechtm_ quit (Remote host closed the connection) |
18:42:25 | * | brechtm joined #nim |
18:42:25 | * | avsej quit (Quit: Quit) |
18:43:14 | * | avsej joined #nim |
18:43:14 | * | avsej quit (Changing host) |
18:43:14 | * | avsej joined #nim |
18:44:07 | * | avsej left #nim (#nim) |
18:45:04 | * | pie__ joined #nim |
18:46:21 | couven92 | uhm... how do you define a define in a nim.cfg file? |
18:47:10 | demi- | what do you mean? |
18:47:33 | couven92 | `--define:wxWidgetsPath:"../../wxWidgets-3.0.2"` gives me: `nim.cfg(1, 24) Error: identifier expected, but found ':'` |
18:48:19 | stisa | -d:<something> I think? |
18:48:32 | * | krux02 quit (Quit: Leaving) |
18:49:17 | stisa | I think the second : should be an = |
18:49:39 | demi- | you may need to do encapsulate it in quotes properly or not use a `:` there |
18:49:42 | couven92 | hmm... stisa nope, neither work |
18:50:12 | demi- | `--define:"wxWidgetsPath:'../../wxWidgets-3.0.2'"` |
18:50:43 | couven92 | demi-, yeah! :) |
18:51:01 | couven92 | But now I get: `lib\pure\os.nim(83, 15) Error: undeclared identifier: 'os'` |
18:51:26 | couven92 | (and yes, my source includes os) |
18:55:46 | dom96 | What is this define for? |
18:56:17 | couven92 | to optionally specify the path for wxWidgets |
18:56:56 | dom96 | ahh, Nim supports key-value defines too. |
18:57:04 | dom96 | It looks weird with the : |
18:57:29 | dom96 | So you have your own 'os' module? |
18:57:34 | couven92 | nope |
18:57:40 | couven92 | standard library os |
18:57:49 | dom96 | weird |
18:57:58 | dom96 | Try isolating this problem |
18:58:27 | couven92 | I'm running nim compiled from the devel branch, compiled March 1st 2017 (Version 0.16.1) |
18:58:39 | couven92 | Maybe switch back to the release? |
19:00:22 | * | brechtm quit (Remote host closed the connection) |
19:00:36 | couven92 | Ah, ok, I simply changed `os` to `ospaths` (since I only use os for joinPath) |
19:01:45 | couven92 | But now I am having troble checking whether this wxWidgetsPath define has a value... `when len(wxWidgetsPath) < 1:` gives me undeclared identifier: 'wxWidgetsPath' |
19:02:18 | * | mwbrown joined #nim |
19:02:20 | couven92 | How do I verfiy the presence of a value of a define? |
19:02:54 | * | krux02 joined #nim |
19:04:08 | def- | couven92: when defined(wxWidgetsPath) maybe |
19:04:38 | couven92 | def-, yeah of course, but how to check whether wxWidgetsPath actually has a value? |
19:04:43 | def- | wait, misread the question, not sure |
19:04:45 | couven92 | and how to use that value? |
19:07:14 | def- | couven92: google leads me here: https://forum.nim-lang.org/t/2398 |
19:08:16 | couven92 | Why does Araq set the value of line in that example? |
19:08:32 | def- | not sure, try without defining it |
19:08:49 | stisa | https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compile-time-define-pragmas |
19:08:51 | def- | without a surrounding when you could use that as a default value |
19:09:09 | couven92 | ahhh |
19:11:50 | couven92 | ok, thanks... now everything works beautifully! :) |
19:21:40 | * | krux02 quit (Quit: Leaving) |
19:34:06 | Arrrr | strange that shuffle doesn't accept an openArray |
19:38:32 | FromGitter | <raydf> Hi everyone |
19:38:47 | FromGitter | <raydf> what kind of encoding string has? |
19:38:51 | FromGitter | <raydf> utf8? |
19:39:50 | dom96 | none |
19:42:00 | FromGitter | <raydf> i'm writing a string in a webservice with json and some strings has latin accents like ú, how can i make sure i can output utf8 bytes seq? |
19:59:10 | * | couven92 quit (Quit: Client disconnecting) |
20:03:08 | * | girvo joined #nim |
20:04:20 | dom96 | raydf: isn't that an html encoding? |
20:04:52 | * | xet7 joined #nim |
20:07:19 | * | girvo quit (Ping timeout: 240 seconds) |
20:13:25 | * | nsf quit (Quit: WeeChat 1.7) |
20:16:40 | * | BitPuffin|osx joined #nim |
20:19:09 | * | couven92 joined #nim |
20:25:42 | * | Arrrr quit (Quit: Leaving.) |
20:29:05 | * | user0____ joined #nim |
20:37:21 | * | user0____ quit (Quit: user0____) |
20:37:30 | * | user0____ joined #nim |
20:41:56 | zachcarter | Question - I’ve built a little test SDL app that runs on android |
20:42:15 | zachcarter | I have a third party library that I’d like to use with this app, and I’ve written bindings to it |
20:42:35 | zachcarter | now in my bindings I’m doing this: |
20:42:53 | zachcarter | https://github.com/zacharycarter/bgfx.nim/blob/master/bgfxdotnim.nim#L2-L10 |
20:43:07 | zachcarter | however for android - I don’t want to link dynamically |
20:43:25 | zachcarter | I know I can do the dynlib override thing when compiling and substitue a static lib for the shared library |
20:43:41 | zachcarter | but my question is this - let’s say I have another project which depends on these bindings and I’ve referenced it in my nimble file |
20:43:46 | * | nsf joined #nim |
20:43:51 | zachcarter | how am I supposed to handle that situation? |
20:44:01 | * | user0____ quit (Quit: user0____) |
20:44:12 | zachcarter | Is there a way to do the dynlib override and static linking inside the nim code of my bindings when android is the OS? |
20:44:28 | zachcarter | otherwise I’m clueless as to how to handle this type of situation |
20:48:05 | * | Trustable joined #nim |
20:48:42 | * | bjz joined #nim |
20:51:02 | * | nsf quit (Quit: WeeChat 1.7) |
20:52:15 | * | rokups quit (Quit: Connection closed for inactivity) |
20:54:28 | subsetpark | Is Jester the most robust solution for a REST server? |
21:04:14 | * | MyMind joined #nim |
21:06:53 | * | Sembei quit (Ping timeout: 260 seconds) |
21:09:33 | * | rauss quit (Quit: WeeChat 1.7) |
21:17:02 | demi- | zachcarter: you might be able to use a nimble task for that |
21:17:18 | zachcarter | demi- hmm okay |
21:18:05 | * | Sentreen quit (Ping timeout: 260 seconds) |
21:24:02 | * | onionhammer quit (Quit: WeeChat 1.0.1) |
21:30:37 | * | Sentreen joined #nim |
21:35:25 | * | pie____ joined #nim |
21:37:54 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:38:25 | * | pie__ quit (Ping timeout: 258 seconds) |
21:41:00 | * | onionhammer joined #nim |
21:51:17 | * | girvo joined #nim |
21:55:29 | * | girvo quit (Ping timeout: 240 seconds) |
22:03:46 | zachcarter | demi-: okay I can define a nimble task to clone my project and compile it with the flags to make it link statically but then what |
22:04:05 | zachcarter | how do I make project B depend on it? |
22:06:29 | * | ofelas quit (Ping timeout: 240 seconds) |
22:07:25 | dom96 | You should be able to do it inside a config.nims file |
22:07:40 | dom96 | when defined(android): --dynlibOverride |
22:07:43 | dom96 | or something like that |
22:08:34 | demi- | yeah, that is what i meant |
22:09:53 | * | couven92 quit (Quit: Client Disconnecting) |
22:10:44 | zachcarter | hmm okay thanks |
22:10:49 | * | ggVGc joined #nim |
22:12:48 | * | elrood quit (Quit: Leaving) |
22:18:20 | * | tankfeeder joined #nim |
22:20:28 | * | Vladar quit (Quit: Leaving) |
22:23:07 | * | ofelas joined #nim |
22:56:58 | * | mwbrown quit (Ping timeout: 240 seconds) |
23:01:00 | * | libman quit (Quit: Connection closed for inactivity) |
23:12:19 | * | ofelas quit (Ping timeout: 240 seconds) |
23:15:09 | * | Trustable quit (Remote host closed the connection) |
23:22:10 | * | kulelu88 joined #nim |
23:27:29 | * | ofelas joined #nim |
23:27:44 | * | bjz joined #nim |
23:35:43 | * | tankfeeder quit (Quit: Leaving) |
23:39:29 | * | girvo joined #nim |
23:44:01 | * | girvo quit (Ping timeout: 256 seconds) |
23:54:47 | * | Nobabs27 joined #nim |
23:56:42 | * | bjz_ joined #nim |
23:57:37 | * | bjz quit (Ping timeout: 256 seconds) |