00:07:48 | * | chemist69 joined #nim |
00:08:51 | krux02 | zachcarter: not today it is already 2:00 here |
00:09:14 | krux02 | well 2:08 |
00:09:23 | zachcarter | haha yeah that’s late, I wouldn’t want you to haha |
00:09:26 | zachcarter | should go to sleep :P |
00:09:41 | krux02 | yes |
00:10:07 | krux02 | one question, do you only have a mac computer? |
00:10:31 | zachcarter | yeah but I test with VMs usually |
00:10:53 | zachcarter | I have a windows laptop but it’s got issues |
00:11:03 | zachcarter | I need to go purchase another |
00:11:24 | krux02 | would be nice if you could test my tetris version, too |
00:11:54 | krux02 | but you need the ARB extension, and as far as I know virtual machines are not the best when it comes to 3D rendering |
00:11:59 | zachcarter | I’ll try to get my windows laptop going |
00:12:10 | zachcarter | by this weekend |
00:12:13 | zachcarter | I’m going to need it anyway |
00:12:18 | krux02 | ok |
00:12:51 | krux02 | I created a version tag, because I realized that I constantly break things when I evolve my library |
00:13:06 | krux02 | so I wanted to have a version that easily works |
00:13:19 | * | Matthias247 quit (Read error: Connection reset by peer) |
00:13:36 | zachcarter | makes sense |
00:14:05 | krux02 | maybe at some point in time I will also bundle the vector math library |
00:15:26 | krux02 | what do you think about this codebase https://github.com/krux02/opengl-sandbox/blob/master/examples/tetris.nim |
00:19:31 | * | krux02 quit (Remote host closed the connection) |
00:20:26 | FromGitter | <krux02> well it's late enough I need to sleep |
00:27:55 | zachcarter | gn |
00:28:00 | zachcarter | sorry I’ll look now |
00:28:21 | zachcarter | looks nice and clean |
00:28:25 | zachcarter | better than mine :P |
00:31:45 | * | vlad1777d quit (Quit: Leaving) |
01:26:00 | * | zachcarter_ joined #nim |
01:29:48 | * | zachcarter quit (Ping timeout: 268 seconds) |
01:29:49 | * | zachcarter_ is now known as zachcarter |
01:40:22 | * | chemist69 quit (Ping timeout: 258 seconds) |
01:42:40 | * | tyler569 joined #nim |
01:43:16 | FromGitter | <ftsf> morning! |
01:47:33 | FromGitter | <ftsf> so i got a new laptop, and it's running windows so far, so i figured i'd try set up my nim dev environment on it. i've got nim installed with mingw-w64. trying to build a hello world. i get the 'Nim_and_C_compiler_disagree_on_target_architecture' error. How do I tell nim which target architecture to use? |
01:52:54 | * | smt joined #nim |
01:53:01 | * | chemist69 joined #nim |
01:55:34 | FromGitter | <ftsf> ahh had to set --cpu:i386 |
01:56:57 | * | smt_ quit (Ping timeout: 260 seconds) |
02:07:35 | * | couven92 quit (Quit: Client Disconnecting) |
02:19:31 | FromGitter | <ftsf> hmm in windows when i get a runtime exception it pops up a windows with an error rather than logging to the terminal even when using --app:console, is that a windows thing or a controlled by nim? if the latter it seems like a bug |
02:43:00 | * | yglukhov joined #nim |
02:46:45 | * | smt quit (Read error: Connection reset by peer) |
02:47:30 | * | yglukhov quit (Ping timeout: 268 seconds) |
02:50:27 | FromGitter | <Varriount> Technically it's a built-in windows thing. |
02:50:57 | FromGitter | <Varriount> ftsf: There's a way to disable it via the Windows API. It only happens for certain classes of error. |
02:52:12 | * | smt joined #nim |
02:52:18 | * | smt quit (Remote host closed the connection) |
02:55:28 | FromGitter | <ftsf> @Varriount ahh i see, silly behaviour, I guess I need to register a top level exception handler to log to the console. |
02:56:00 | * | smt joined #nim |
03:23:53 | FromGitter | <jacksarick> Question: When defining a new type, why do I get "proc is not a concrete type" error? Does nim not have first class function? |
03:25:55 | FromGitter | <ftsf> what's the type definition you're using? |
03:25:55 | ldlework | show some code |
03:26:34 | FromGitter | <jacksarick> ```type ⏎ Name = string ⏎ Fn = proc ⏎ Action = tuple[name: Name, fn: Fn]``` [https://gitter.im/nim-lang/Nim?at=58f97bec08c00c092a9ee4a0] |
03:27:01 | FromGitter | <ftsf> try proc() |
03:27:24 | FromGitter | <jacksarick> That fixed it. Thanks. What's the difference? |
03:27:36 | FromGitter | <ftsf> you can't just use any proc, you need to define what arguments it takes and its return value |
03:28:12 | FromGitter | <jacksarick> What if want to pass different functions into one variable? |
03:28:13 | FromGitter | <ftsf> `proc`is ambigious, `proc()`means a proc that takes no arguments and returns nothing |
03:28:34 | FromGitter | <ftsf> you can pass different functions, as long as they all have the same arguments and return type |
03:32:21 | FromGitter | <jacksarick> OK. That seems a bit weird to me, but I guess it makes sense |
03:32:49 | FromGitter | <ftsf> pretty similar to C and family |
03:33:19 | FromGitter | <ftsf> hmm writeStackTrace seems to write to a windows popup instead of stderr on windows... |
03:33:33 | FromGitter | <ftsf> but i can't find where it's defined. appears to be empty in system.nim |
03:34:07 | FromGitter | <ftsf> doesn't claim to be magic though |
03:34:12 | FromGitter | <Varriount> @jacksarick Nim is statically typed. You can't have sequences with multiple procedure types (without some kind of discriminator) |
03:35:35 | FromGitter | <Varriount> @ftsf https://github.com/nim-lang/Nim/search?l=Nim&q=writeStackTrace&type=&utf8=%E2%9C%93 |
03:35:42 | FromGitter | <jacksarick> It makes sense, I'm just used to lisp |
03:36:14 | FromGitter | <ftsf> ahh, it's in excpt.nim, and doesn't do what the docs say |
03:36:17 | FromGitter | <Varriount> @jacksarick (welcome(to nim (!))) |
03:36:24 | ldlework | In lisp you can pass a function with arbitrary arguments and return values, and somehow call it? |
03:36:38 | ldlework | I thought lisp at least enforced function arity |
03:37:42 | FromGitter | <ftsf> `writes the current stack trace to stderr. This is only works for debug builds` but it uses showerrormessage which on windows uses a popup |
03:37:42 | FromGitter | <jacksarick> Not really. In lisp, you can write a function that takes in a function, runs it with arbitrary arguments, and spits out the return value with no issue. |
03:38:35 | pydsigner | ldlework: lisp is dynamically typed |
03:38:46 | pydsigner | Same as you could do in Python |
03:41:26 | * | chemist69 quit (Ping timeout: 260 seconds) |
03:43:35 | * | chemist69 joined #nim |
03:46:31 | ldlework | pydsigner: if you pass me a function in Python I can't just call it randomly |
03:46:40 | ldlework | I need to know how many args there are or else an error is thrown |
03:47:13 | ldlework | I assume in Lisp it is the same... |
03:47:31 | FromGitter | <jacksarick> Nope |
03:47:32 | ldlework | The only language I know that will let you call any function at any time with or without the right arguments is Javascript |
03:48:14 | FromGitter | <Varriount> PHP also lets you call functions without the correct arguments, if I recall correctly. |
03:48:28 | ldlework | I doubt it |
03:50:23 | * | kunev joined #nim |
03:50:38 | ldlework | Varriount ah you're right |
03:50:47 | FromGitter | <jacksarick> Take the following python code for example: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ The first `runner` will run fine. The second will fail because the `lambda` function got the wrong number of arg [https://gitter.im/nim-lang/Nim?at=58f9819acfec9192725d5f2f] |
03:51:20 | pydsigner | ldlework: No you'll error out |
03:51:33 | FromGitter | <ftsf> the advantage in nim is that you get an error before you run it |
03:51:34 | ldlework | pydsigner: "No" what? |
03:51:36 | pydsigner | Lisp allows you to pass whatever |
03:51:39 | pydsigner | But you'll error |
03:51:46 | pydsigner | If you pass the wrong number of args |
03:51:47 | FromGitter | <ftsf> in python you have to run the code to get an error |
03:51:50 | ldlework | Sure, the worst of cases. |
03:51:56 | pydsigner | ... |
03:52:11 | ldlework | What are you ...'ing about? |
03:52:19 | pydsigner | < ldlework> I need to know how many args there are or else an error is thrown |
03:52:25 | pydsigner | What did you mean by this then? |
03:52:26 | ldlework | Yes, when the call is performed. |
03:52:42 | ldlework | lol there are three options |
03:52:45 | ldlework | compile time error |
03:52:46 | ldlework | runtime error |
03:52:52 | ldlework | pass undefined values to the function |
03:52:53 | pydsigner | logic error |
03:53:01 | ldlework | I'm not sure why anyone here is confused about what I'm saying or anything |
03:53:30 | FromGitter | <Varriount> @jacksarick So, any questions about Nim? |
03:54:15 | pydsigner | ldlework: hrrrrm I might be trying to argue with the wrong person lol |
03:54:18 | FromGitter | <jacksarick> I'm figuring it out pretty well. Super great so far |
03:54:25 | ldlework | I don't know what there is to argue about |
05:24:53 | * | adeohluwa joined #nim |
05:37:53 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
05:45:25 | FromGitter | <Moodge> howdy |
05:45:52 | FromGitter | <ftsf> o/ |
05:47:27 | FromGitter | <Moodge> Would I be crazy for picking Nim as a first language (beyond the basics)? |
05:47:44 | FromGitter | <ftsf> that's a good question! |
05:48:16 | FromGitter | <ftsf> personally i wouldn't at this point. but in the future i think my answer would change to yes. |
05:48:52 | FromGitter | <Moodge> Yeah that's the impression I get in general |
05:48:55 | FromGitter | <Moodge> but I am stubborn |
05:49:18 | FromGitter | <Moodge> and it's the most interesting of what I've researched |
05:49:34 | FromGitter | <ftsf> i usually recommend python as a first language. and nim has a lot of similarities |
05:49:57 | ldlework | I think TypeScript is also a good choice these days. |
05:50:12 | FromGitter | <Moodge> Typescript also caught my eye |
05:50:28 | FromGitter | <Moodge> I wanted to learn something new |
05:50:40 | FromGitter | <Moodge> I'm not professional at all so it doesn't matter if it's wide spread as much |
05:51:06 | FromGitter | <ftsf> yeah type safety would be a good thing to have in a first language which python doesn't really have |
05:51:20 | ldlework | Moodge, Nim can be confusing and buggy when it isn't otherwise amazing and awesome. |
05:51:34 | FromGitter | <Moodge> I looked at rust and the syntax was really confusing |
05:52:08 | ldlework | You probably wont run into to many bugs with Rust, but yeah it is a hard language to learn and unless you really need critical memory safety, not sure its worth it |
05:52:11 | FromGitter | <Moodge> Ahh yeah, I am not sure I'd be at a level that would create problems too soon. |
05:52:20 | FromGitter | <Moodge> I'm interested for hobby games |
05:52:38 | FromGitter | <Moodge> roguelikes/TBS stuff |
05:52:40 | ldlework | Moodge, both Nim and TypeScript are great for that |
05:52:44 | FromGitter | <ftsf> if you're happy to hang around in here and ask qs when you get stuck then you'll probably be fine. |
05:53:16 | ldlework | Moodge, Nim can compile to JS but you have to do some work to get it working with the JS libraries you want to use. |
05:53:28 | FromGitter | <Moodge> Thanks guys! I am pretty happy with the response I've gotten so far. I'll try Nim until it doesn't work for me. |
05:53:59 | FromGitter | <ftsf> i'm also doing game stuff in nim and it's a lot of fun |
05:54:05 | ldlework | same, and agreed |
05:54:07 | FromGitter | <ftsf> mostly painless |
05:54:22 | FromGitter | <Moodge> Oh sweet |
05:54:28 | FromGitter | <Moodge> are you writing your own engine stuff? |
05:54:34 | ldlework | I am |
05:54:37 | ldlework | For a roguelike I want to make |
05:54:38 | FromGitter | <Moodge> I saw there was a shared engine on the forums |
05:54:42 | FromGitter | <Moodge> Oh sick! |
05:54:48 | FromGitter | <ftsf> yep, writing a thing on top of SDL2 |
05:54:49 | ldlework | And Frag also exists |
05:55:02 | FromGitter | <Moodge> Oh cool as, other roguelike/game dev's. =D |
05:55:15 | ldlework | Moodge, have you played Cataclysm DDA |
05:55:21 | FromGitter | <Moodge> yes! I suck at it |
05:55:36 | FromGitter | <Moodge> I think I have it installed somewhere |
05:55:41 | ldlework | I want to remake a game like that, but more focused on naturalism, and maybe some magical realism. |
05:55:51 | ldlework | Where you get stronger over time, but weaker as you age. |
05:56:02 | FromGitter | <Moodge> That's a really cool mechanic |
05:56:14 | FromGitter | <Moodge> I was going to make something super basic to start with |
05:56:15 | ldlework | But the world is filled with desconstructable things and recombinable materials |
05:56:28 | FromGitter | <Moodge> but eventually I'd love to create a worldsim/roguelike combination |
05:56:38 | ldlework | Moodge, ping me when you have nim and nimble and sdl2 installed |
05:56:43 | FromGitter | <Moodge> where you work in a town and deal with adventurers that pass through town |
05:56:47 | FromGitter | <ftsf> moodge, also highly recommend pico8 as a way to get into game development |
05:56:56 | FromGitter | <Moodge> I did check out pico-8 |
05:56:56 | FromGitter | <ftsf> it uses lua |
05:57:16 | FromGitter | <Moodge> I have their voxel engine from the humblebundle a million years ago |
05:57:30 | FromGitter | <ftsf> yeah, same |
05:57:52 | FromGitter | <ftsf> my "engine" is basically pico8 api but for nim. |
05:57:58 | FromGitter | <Moodge> Oh that's great |
05:58:07 | FromGitter | <Moodge> I love lua but wanted to try something a bit more language-y |
05:58:21 | FromGitter | <Moodge> I was messing with love2d and having a bit of fun doing it |
05:58:32 | ldlework | I love love2d but I hate lua |
05:58:41 | FromGitter | <ftsf> yep, i find having type safety a huge improvement over using lua |
05:58:58 | * | yglukhov joined #nim |
05:59:03 | FromGitter | <Moodge> I love love2d but keep seeing the same responses everywhere which made me look for something similarish |
05:59:10 | FromGitter | <Moodge> python came up but a lot of problems with python too |
05:59:13 | ldlework | I recently put down Nim to try out TypeScript + Phaser |
05:59:19 | ldlework | Its been amazingly productive. |
05:59:24 | FromGitter | <Moodge> phaser is super cool as well |
05:59:31 | FromGitter | <Moodge> I wasn't sure how to pick up typescript but I had a look at JS |
05:59:32 | FromGitter | <ftsf> yeah i think python sucks for games unfortunately, so slow |
05:59:37 | ldlework | Like, I haven't fought the language not even a single time |
05:59:46 | ldlework | And phaser just does everything you could hope |
05:59:51 | ldlework | and instant reload |
06:00:01 | FromGitter | <Moodge> and you can use brackets as an editor! |
06:00:03 | FromGitter | <Moodge> which I like |
06:00:11 | FromGitter | <Moodge> =P |
06:00:17 | ldlework | Moodge, I just used https://github.com/eduardonunesp/phaser-typescript-webpack-boilerplate |
06:00:25 | ldlework | npm install; npm start |
06:00:27 | ldlework | boom |
06:00:33 | ldlework | I just started hacking the source from there |
06:00:51 | FromGitter | <Moodge> I have so much to learn |
06:00:57 | ldlework | vscode + typescript plugin |
06:01:21 | ldlework | Moodge, but yah when you get nim/nimble/sdl2 I'll show you my wip roguelike |
06:01:30 | FromGitter | <Moodge> Ok cool beans |
06:01:35 | FromGitter | <Moodge> gotta get minigw installed first |
06:01:57 | FromGitter | <Moodge> I didn't know about node |
06:02:03 | FromGitter | <Moodge> man |
06:02:05 | FromGitter | <Moodge> I feel so dumb |
06:03:24 | ldlework | eh, there's enough for many lifetimes so basically everyone is dumb relative to people who learned different stuff |
06:03:29 | * | yglukhov quit (Ping timeout: 260 seconds) |
06:04:26 | FromGitter | <Moodge> Last time I attempted programming I was like 18 |
06:04:31 | FromGitter | <Moodge> and it was over 10 years ago |
06:04:33 | FromGitter | <Moodge> a lot has changed |
06:04:54 | FromGitter | <Moodge> but Java is still here |
06:05:29 | ldlework | Well the JVM has decades of work on it |
06:05:34 | ldlework | There's no reason to throw it away |
06:05:44 | ldlework | Also new languages targeting the JVM have sprung up |
06:05:50 | FromGitter | <Moodge> I did see that |
06:05:50 | ldlework | Kotlin is a legitimately great language |
06:05:52 | FromGitter | <Moodge> Scala |
06:06:00 | FromGitter | <Moodge> Kotlin is one I havent checked out |
06:09:41 | FromGitter | <Moodge> Ohhh Kotlin is the intellij language |
06:09:52 | FromGitter | <Moodge> IDK why I didn't check it out |
06:10:44 | ldlework | Because its JVM |
06:10:47 | ldlework | ^_^ |
06:12:23 | * | Arrrr joined #nim |
06:12:23 | * | Arrrr quit (Changing host) |
06:12:23 | * | Arrrr joined #nim |
06:12:29 | FromGitter | <Moodge> OK I think I have everything installed |
06:26:29 | ldlework | Moodge, nimble install perlin |
06:26:31 | ldlework | clone https://github.com/dustinlacewell/dadren |
06:26:41 | ldlework | cd to the root |
06:26:42 | ldlework | nimble install |
06:26:47 | ldlework | cd examples/hatchet |
06:26:48 | ldlework | make run |
06:33:47 | FromGitter | <Moodge> make run step |
06:34:02 | FromGitter | <Moodge> everything else worked but I can't figure out this part |
06:34:35 | ldlework | what's the output |
06:34:43 | FromGitter | <Moodge> unrecognised command |
06:34:55 | ldlework | oh you need make |
06:35:00 | ldlework | what OS do you use |
06:35:05 | FromGitter | <Moodge> windows 10 |
06:35:17 | ldlework | ah |
06:35:19 | ldlework | try |
06:35:21 | ldlework | nim run |
06:35:36 | FromGitter | <Moodge> that workedish |
06:35:50 | ldlework | ? |
06:35:53 | FromGitter | <Moodge> execution of an external program faled gcc.exe |
06:36:02 | FromGitter | <Moodge> failed* |
06:36:13 | ldlework | well you need a c compiler to use Nim right? |
06:36:20 | FromGitter | <Moodge> yeah |
06:36:33 | FromGitter | <Moodge> I have one installed I believe but I am unsure if I set it up properly |
06:36:36 | FromGitter | <Moodge> I'll go figure that out |
06:36:42 | ldlework | The Nim compiler needs a C compiler in order to compile software. You must install this separately and ensure that it is in your PATH. |
06:37:26 | FromGitter | <Moodge> any reccomendations? |
06:37:38 | ldlework | Yes, add the C compiler to your path |
06:37:43 | ldlework | you should be able to run it from anywhere |
06:38:10 | FromGitter | <Moodge> mingw is a c compiler right? |
06:38:15 | ldlework | yeah |
06:38:16 | FromGitter | <Moodge> or msys |
06:38:19 | FromGitter | <Moodge> Ok cool |
06:42:34 | FromGitter | <Moodge> hmm I cant figure out why it's not working, it's in path but clearly I've done it wrong |
06:42:49 | ldlework | Moodge you can run gcc.exe from anywhere? |
06:43:01 | FromGitter | <Moodge> yeah |
06:43:12 | FromGitter | <ftsf> what's the error? |
06:43:23 | FromGitter | <Moodge> I'll give you the error for run |
06:44:16 | FromGitter | <Moodge> warning wall of text |
06:44:20 | FromGitter | <Moodge> C:\dev\Projects\dadren-master\examples\hatchet>nim run ⏎ Hint: used config file 'C:\dev\Nim\config\nim.cfg' [Conf] ⏎ main.nim(245, 8) Warning: method has lock level <unknown>, but another method has 0 [LockLevel] ⏎ C:/dev/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file C:\dev\Projects\dadren-master\examples\hatchet\bin\hatchet.exe: No such file or direc |
06:44:20 | FromGitter | ... collect2.exe: error: ld returned 1 exit status ... [https://gitter.im/nim-lang/Nim?at=58f9aa46881b89e1016f9386] |
06:44:23 | ldlework | bad |
06:44:27 | ldlework | use gist |
06:44:31 | FromGitter | <Moodge> what's gist? |
06:44:38 | ldlework | https://gist.github.com/ |
06:44:49 | ldlework | Moodge make a "bin" folder in the hatchet folder |
06:45:03 | ldlework | that's my bad |
06:45:09 | FromGitter | <Moodge> https://gist.github.com/Moodge/f89e1519476f3e103a8cf4bc9e0d8c69 |
06:45:11 | FromGitter | <Moodge> ahh ok |
06:45:16 | FromGitter | <Moodge> sweet |
06:45:50 | FromGitter | <Moodge> now it says |
06:46:04 | FromGitter | <Moodge> execution of an external program failed: 'bin\hatchet ' |
06:46:43 | FromGitter | <Moodge> but there is an exe I can run |
06:46:48 | FromGitter | <Moodge> that doesn't work |
06:47:16 | ldlework | when you run the binary what happens? |
06:48:28 | ldlework | fricken windows |
06:48:56 | FromGitter | <Moodge> haha I might just install linux |
06:49:14 | FromGitter | <Moodge> it just closes immediately |
06:49:39 | ldlework | Moodge, I've never done Nim development on Windows so I'm failing to think of advice |
06:49:50 | FromGitter | <Moodge> It's fine |
06:49:58 | FromGitter | <Moodge> I was thinking about installing a dif os anyways |
06:49:59 | ldlework | If it successfully compiled.... but doesn't run.... |
06:50:12 | FromGitter | <Moodge> because all this language dev stuff |
06:50:16 | ldlework | Moodge, do you have sdl2 installed? |
06:50:26 | FromGitter | <Moodge> I think I do but I am unsure now |
06:50:29 | FromGitter | <Moodge> so I will double check |
06:50:37 | ldlework | try putting the SDL2 and SDL2_Image DLL's next to the binary |
06:50:39 | ldlework | and running it |
06:50:40 | FromGitter | <Moodge> I just add that to path right? |
06:50:43 | FromGitter | <Moodge> ahh ok |
06:51:29 | FromGitter | <Moodge> so that workedish |
06:51:36 | FromGitter | <Moodge> it lasted longer before it closed |
06:51:51 | FromGitter | <Moodge> that might have just been an anomaly however it seems to close instantly again |
06:52:29 | * | nsf joined #nim |
06:59:44 | * | chemist69 quit (Ping timeout: 252 seconds) |
06:59:50 | ldlework | Moodge try running one of the other examples |
06:59:55 | ldlework | to ensure it isn't a bug in the example |
07:00:00 | ldlework | though I'm fairly sure they're all working |
07:00:02 | FromGitter | <Moodge> ok |
07:00:07 | ldlework | remember to create bin folder |
07:00:14 | FromGitter | <Moodge> it's most likely my fault |
07:00:47 | ldlework | Moodge, its most likely the fault of OS differences I didn't foresee |
07:01:55 | FromGitter | <Moodge> its my fault |
07:02:01 | FromGitter | <Moodge> I didnt copy over sdl2_image.dll |
07:02:01 | ldlework | lol why? |
07:02:03 | ldlework | Ah |
07:02:08 | FromGitter | <Moodge> just sdl2 |
07:02:27 | ldlework | So it works now? |
07:02:42 | FromGitter | <Moodge> I need to download sdl2_image from somewhere |
07:02:44 | ldlework | ah |
07:02:54 | ldlework | https://www.libsdl.org/projects/SDL_image/ |
07:03:51 | FromGitter | <Moodge> cheers |
07:05:01 | FromGitter | <Moodge> is elementaryos a good linux distro? |
07:06:10 | ldlework | I just use Ubuntu |
07:06:22 | ldlework | Most popular, so good packages and able to find support. |
07:06:40 | FromGitter | <Moodge> I think elementary is based off ubuntu so it'd be mostly the same |
07:06:46 | FromGitter | <Moodge> just a different ui |
07:06:57 | ldlework | I replace Ubuntu's UI with Qtile first thing |
07:07:04 | FromGitter | <Moodge> yeah that ui is so ugly XD |
07:07:47 | FromGitter | <Moodge> hey that's sweet |
07:08:19 | FromGitter | <Moodge> i'll install ubuntu with qtile |
07:08:22 | FromGitter | <Moodge> hah |
07:08:44 | ldlework | let me get my config for you |
07:10:30 | ldlework | https://gist.github.com/dustinlacewell/3ad67a33eba9b686f5c6a8e000598cec |
07:10:36 | ldlework | I probably could clean it up |
07:11:02 | ldlework | It gives you 10 virtual desktops |
07:11:09 | FromGitter | <Moodge> nice |
07:11:11 | FromGitter | <Moodge> I gotta get used to that |
07:11:15 | ldlework | Win + [a-g,z-b] |
07:11:17 | FromGitter | <Moodge> I have a mac and I still struggle with the virtual desktops |
07:11:21 | ldlework | And you manipulate the windows around |
07:11:24 | ldlework | with things like |
07:11:30 | ldlework | Win + hjkluinm |
07:11:33 | FromGitter | <Moodge> it doesnt help that I am learning to use a hhkb |
07:11:45 | FromGitter | <Moodge> and jumping between os's confuses me |
07:12:05 | ldlework | Moodge, here's what it looks like, https://www.youtube.com/watch?v=NE6IQdwjzso |
07:12:25 | ldlework | Well it'll look a little different now |
07:12:35 | ldlework | video is very old now |
07:12:44 | FromGitter | <Moodge> sweet |
07:14:00 | ldlework | Moodge, did sdl_image work?! |
07:14:07 | ldlework | suspense is killing me mate |
07:14:08 | ldlework | :D |
07:14:20 | FromGitter | <Moodge> Umm I got it |
07:14:23 | FromGitter | <Moodge> but it's complicated |
07:14:24 | FromGitter | <Moodge> lol |
07:14:56 | FromGitter | <Moodge> I thought it'd be a DLL |
07:15:48 | * | gokr joined #nim |
07:16:28 | ldlework | it is |
07:16:38 | ldlework | https://www.libsdl.org/projects/SDL_image/ |
07:16:40 | ldlework | runtime binaries |
07:16:53 | ldlework | noob. |
07:16:55 | ldlework | :P |
07:20:45 | FromGitter | <Moodge> lol! |
07:21:51 | ldlework | :) |
07:22:02 | FromGitter | <Moodge> works! |
07:22:05 | FromGitter | <Moodge> I see trees! |
07:22:07 | ldlework | yay!!!! |
07:22:11 | ldlework | you can move around and explore |
07:22:16 | ldlework | FOREVERRRR |
07:22:23 | ldlework | just don't go left into negative space... |
07:22:25 | FromGitter | <Moodge> this is a roguelike? |
07:22:26 | ldlework | wierd shit happens over there |
07:22:34 | ldlework | Moodge, its the biome generation I built for it |
07:22:40 | FromGitter | <Moodge> make vi keys work! |
07:22:41 | FromGitter | <Moodge> =P |
07:22:46 | ldlework | I was suffering from Nim bugs in the past so I put it down |
07:22:50 | FromGitter | <Moodge> yeah this is cool |
07:22:52 | FromGitter | <Moodge> cool as hell |
07:22:55 | ldlework | Thanks :) |
07:23:02 | ldlework | The biome generator is extremely powerful |
07:23:07 | ldlework | I need to write an article about it some day |
07:23:23 | ldlework | Moodge feel free to look at the code of the examples |
07:23:31 | ldlework | I think you will appreciate how clean Dadren is as a game library |
07:23:45 | FromGitter | <Moodge> sweet |
07:24:06 | FromGitter | <Moodge> wow |
07:24:08 | FromGitter | <Moodge> that's very readble |
07:24:12 | FromGitter | <Moodge> *readable |
07:24:21 | FromGitter | <Moodge> for someone who knows nothing about the language or language much in general |
07:24:26 | ldlework | thanks |
07:24:35 | ldlework | I spent days just thinking about one interface lol |
07:24:45 | ldlework | I'm obsessive over aesthetic and expression |
07:24:56 | ldlework | For function and performance see zachcarter's Frag :) |
07:25:00 | FromGitter | <Moodge> that's a good thing |
07:25:08 | FromGitter | <Moodge> I think Nim is great for newbies |
07:25:11 | FromGitter | <Moodge> in the same way python is |
07:25:15 | ldlework | I agree |
07:25:17 | * | yglukhov joined #nim |
07:25:44 | ldlework | I think TypeScript is also good for the same reason |
07:26:04 | ldlework | Here's some typescript I wrote recently, https://gist.github.com/dustinlacewell/5009a6388cd4f01817ef864f30456ac6 |
07:26:22 | ldlework | Its also pretty clean and I could refactor that code quite a bit too |
07:27:23 | * | chemist69 joined #nim |
07:27:46 | FromGitter | <Moodge> the problem I have with typescript |
07:27:53 | FromGitter | <Moodge> is that I am unsure of where to learn it |
07:28:10 | ldlework | https://www.typescriptlang.org/docs/handbook/basic-types.html |
07:28:15 | ldlework | this is how I learned it |
07:28:24 | FromGitter | <Moodge> typescript and js syntax are interchangeable right |
07:28:27 | ldlework | Took like a half hour to read. |
07:28:34 | ldlework | TypeScript is a super-set of Javascript |
07:28:41 | FromGitter | <Moodge> that means.. I assume that means |
07:28:42 | ldlework | So all javascript is valid TypeScript but not the other way around |
07:28:47 | FromGitter | <Moodge> Yeah |
07:28:48 | FromGitter | <Moodge> ok cool |
07:28:57 | FromGitter | <Moodge> so if I import a library in typescript |
07:29:02 | ldlework | TypeScript is neat because like |
07:29:06 | FromGitter | <Moodge> then it works in typescript the same as it would work in javascript |
07:29:07 | * | xmonader2 joined #nim |
07:29:14 | ldlework | If you're lazy you can just skip the type stuff lol and use javascript |
07:29:21 | FromGitter | <Moodge> hahaha |
07:29:46 | ldlework | Moodge, yes. But to get type safety and stuff for external libraries you need to download the TypeScript definition file for that library |
07:29:55 | ldlework | Its no big deal. |
07:30:07 | FromGitter | <Moodge> but that boilerplate you gave me is essentially that |
07:30:10 | FromGitter | <Moodge> for phaser and pixi.js |
07:30:17 | FromGitter | <Moodge> with everything already laid out |
07:30:23 | * | TheLemonMan joined #nim |
07:30:29 | FromGitter | <Moodge> I wanted to mess with rot.js as well |
07:30:46 | ldlework | yes, that boilerplate is very nice |
07:30:51 | ldlework | I was just in the mood to learn TypeScript |
07:30:57 | FromGitter | <Moodge> yeah that's fair |
07:30:59 | FromGitter | <Moodge> tbh |
07:31:02 | ldlework | I downloaded that, read the TS handbook in a half hour and I had stuff on screen within two hours. |
07:31:11 | FromGitter | <Moodge> to get access to javascript stuff |
07:31:14 | FromGitter | <Moodge> with a safer language |
07:31:16 | FromGitter | <Moodge> super cool |
07:31:18 | ldlework | yep |
07:31:23 | ldlework | easy to share with people too |
07:31:35 | ldlework | Nim compiles to JS but its a bit more work |
07:31:38 | * | xmonader quit (Ping timeout: 252 seconds) |
07:31:41 | FromGitter | <Moodge> yeah does typescript have the same issues as JS |
07:31:43 | ldlework | I haven't even attempted it yet |
07:31:46 | FromGitter | <Moodge> in the way that its hard to hide code |
07:31:52 | ldlework | hide code? |
07:31:57 | FromGitter | <Moodge> I read a reddit thread on it |
07:32:02 | FromGitter | <Moodge> I dont understand it fully |
07:32:10 | FromGitter | <Moodge> but its hard to hide your source |
07:32:22 | ldlework | Oh well, that's because its an interpreted language |
07:32:23 | FromGitter | <Moodge> I am assuming I misunderstood now |
07:32:25 | ldlework | so you ship the source |
07:32:28 | FromGitter | <Moodge> ahh I see |
07:32:34 | ldlework | you can obsfucate it and minimize it |
07:32:36 | TheLemonMan | yo, I'm playing a bit with the compiler and am using koch boot to rebuild it every time but it seems to build everything twice, is there a faster alternative? |
07:32:47 | ldlework | but I can't really see a real need to hide code like that for a game |
07:32:55 | ldlework | I mean, even C# can be decompiled back to natural source, etc |
07:33:00 | ldlework | There are CPP decompilers and so on |
07:33:05 | ldlework | Hiding source is a waste of time |
07:33:05 | FromGitter | <Moodge> Yeah fair enough |
07:33:06 | FromGitter | <Varriount> TheLemonMan: `koch debug` |
07:33:38 | TheLemonMan | varriount, there's no such command |
07:33:51 | ldlework | Hi Varriount, hope you're well. |
07:33:57 | FromGitter | <Varriount> Have you tried it? |
07:34:09 | FromGitter | <Varriount> I know there was a |
07:34:34 | flyx | you probably mean koch temp |
07:34:35 | FromGitter | <Varriount> command (which might be hidden) that built the compiler once |
07:34:50 | TheLemonMan | yes, it just shows the help message |
07:34:52 | flyx | koch temp is for creating a compiler with debugging information |
07:35:22 | flyx | it's main purpose is to compile the compiler anew for each execution |
07:35:35 | flyx | so you do ./koch temp c -r myfile.nim |
07:36:03 | TheLemonMan | oh, that's pretty handy |
07:36:33 | flyx | it doesn't replace the compiler in bin |
07:36:34 | FromGitter | <Varriount> I quiver |
07:36:45 | FromGitter | <Varriount> Gah, stupid screen |
07:39:11 | * | rokups joined #nim |
07:46:26 | FromGitter | <Varriount> Anyone want some sentinel values? https://blogs.msdn.microsoft.com/oldnewthing/20170420-00/?p=96005 |
07:59:01 | Arrrr | Will this line of code `var s: seq[int] = newSeq()` be compilable before 1.0 ? |
08:02:32 | FromGitter | <Varriount> Why wouldn't it be? |
08:13:19 | Arrrr | It's been like this for a long time, which suggest me it may lack of an easy solution. |
08:13:50 | * | yglukhov quit (Remote host closed the connection) |
08:14:05 | FromGitter | <ftsf> newSeq needs [int]? |
08:14:25 | FromGitter | <ftsf> can't infer based on return type? |
08:16:21 | Arrrr | The above snippet cannot be compiled: |
08:16:25 | Arrrr | "lib/system.nim(658, 14) Error: cannot instantiate: 'T'" |
08:29:02 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
08:34:53 | * | gokr quit (Ping timeout: 252 seconds) |
08:41:32 | * | ftsf quit (Ping timeout: 240 seconds) |
08:47:33 | * | yglukhov joined #nim |
08:49:05 | * | yglukhov quit (Remote host closed the connection) |
08:52:42 | * | yglukhov joined #nim |
08:52:55 | * | yglukhov quit (Remote host closed the connection) |
08:55:38 | * | BennyElg joined #nim |
08:58:08 | FromGitter | <Moodge> righteo now to install ubuntu and remember I needed windows program x for something and cry a little |
08:58:44 | * | yglukhov joined #nim |
08:58:48 | * | yglukhov quit (Remote host closed the connection) |
08:59:24 | * | yglukhov joined #nim |
09:00:16 | FromGitter | <ftsf> linux subsystem for windows? |
09:00:34 | FromGitter | <Moodge> ahh I've wanted to switch over for a bit |
09:00:44 | FromGitter | <Moodge> I dont think I will have anything to worry about |
09:00:49 | FromGitter | <Moodge> but I still always end up forgetting something |
09:01:04 | FromGitter | <ftsf> are you on windows now? |
09:01:10 | FromGitter | <Moodge> yes |
09:01:38 | FromGitter | <ftsf> I see, I think working in nim on linux is much nicer. but I'm just trying windows again for the first time in ~15 years |
09:02:06 | FromGitter | <Moodge> I get annoyed with lots of things, like the command prompt |
09:02:14 | FromGitter | <Moodge> but I am a gamer at heart and often miss the games |
09:02:42 | FromGitter | <ftsf> plenty of games on linux now, but yeah, not all |
09:02:47 | FromGitter | <Moodge> that has been getting a lot better recently |
09:02:48 | FromGitter | <Moodge> yeah |
09:03:23 | FromGitter | <Moodge> BRB! |
09:03:46 | * | yglukhov quit (Ping timeout: 255 seconds) |
09:04:35 | FromGitter | <TiberiumPY> Can I create proc with a unique name in macro? |
09:07:36 | * | yglukhov joined #nim |
09:07:50 | * | yglukhov quit (Remote host closed the connection) |
09:09:48 | * | ftsf joined #nim |
09:09:59 | * | yglukhov joined #nim |
09:10:48 | FromGitter | <evacchi> how much a space is a Channel[T] (e.g. T=int) expected to use ? `echo sizeof(Channel[int])` prints `6424`. It seems very large. Is this by design ? (v0.16.0) |
09:12:52 | FromGitter | <evacchi> I was trying to implement the Skynet (https://github.com/atemerev/skynet) microbenchmark using channels but it seems heavyweight for this task |
09:16:23 | * | Ven joined #nim |
09:16:47 | * | Ven is now known as Guest37478 |
09:21:07 | * | yglukhov quit (Read error: Connection reset by peer) |
09:21:37 | * | yglukhov joined #nim |
09:21:39 | * | gokr joined #nim |
09:21:40 | FromGitter | <Varriount> @evacchi I'd look at the channel implementation. sizeof may be things. |
09:21:49 | FromGitter | <Varriount> *may be overestimating |
09:32:24 | * | zachcarter quit (Ping timeout: 240 seconds) |
09:32:40 | ldlework | Moodge my desktop runs windows, my laptop runs linux |
09:32:54 | ldlework | never the twain shall meet |
09:33:00 | * | ldlework wonders wtf twain means |
09:33:13 | * | bjz joined #nim |
09:33:19 | ldlework | ah just 'two' |
09:33:46 | * | gokr quit (Ping timeout: 260 seconds) |
09:39:02 | * | gokr joined #nim |
09:44:54 | * | gokr quit (Ping timeout: 258 seconds) |
09:45:37 | * | Tiberium joined #nim |
09:47:10 | * | Vladar joined #nim |
09:48:37 | * | Guest37478 quit (Ping timeout: 240 seconds) |
09:49:24 | * | Tiberium quit (Remote host closed the connection) |
09:51:20 | * | Ven joined #nim |
09:51:43 | * | Ven is now known as Guest2485 |
09:56:31 | * | couven92 joined #nim |
10:00:11 | * | willprice joined #nim |
10:01:46 | * | gokr joined #nim |
10:08:22 | * | yglukhov_ joined #nim |
10:08:22 | * | yglukhov quit (Read error: Connection reset by peer) |
10:12:02 | * | zachcarter joined #nim |
10:13:38 | * | zachcarter quit (Read error: Connection reset by peer) |
10:14:20 | * | zachcarter joined #nim |
10:31:41 | * | PMunch joined #nim |
10:34:20 | * | vlad1777d joined #nim |
10:34:54 | * | bjz quit (Ping timeout: 240 seconds) |
10:36:28 | * | Kingsquee joined #nim |
10:37:18 | * | bjz joined #nim |
10:39:25 | * | PMunch quit (Quit: leaving) |
10:43:07 | * | gokr quit (Ping timeout: 240 seconds) |
10:44:14 | * | gokr joined #nim |
10:46:25 | zachcarter | anyone have any experience cross compiling for windows on osx with Nim? |
10:47:14 | FromGitter | <ftsf> @zachcarter only from linux -> osx and windows |
10:47:16 | * | Guest2485 quit (Ping timeout: 260 seconds) |
10:47:24 | zachcarter | :/ |
10:47:27 | FromGitter | <ftsf> but it was a mostly nice experience |
10:47:41 | FromGitter | <ftsf> so i suspect going back the other way won't be too bad |
10:47:44 | zachcarter | yeah |
10:47:56 | zachcarter | I just cross compiled bgfx for windows on osx that was relatively easy |
10:48:11 | zachcarter | trying to produce a windows executable for my space invaders demo |
10:48:36 | zachcarter | running into missing includes though, I’m guessing I need to let the compiler know where my mingw environment is |
10:50:45 | FromGitter | <ftsf> seems likely, keep adding `-Is` until it works |
10:56:43 | Vladar | does osx has wine though? |
10:58:50 | zachcarter | probably |
10:58:55 | zachcarter | I don’t know |
10:59:13 | zachcarter | https://www.davidbaumgold.com/tutorials/wine-mac/ |
10:59:24 | zachcarter | hrm what cpu should I be specifying for windows? |
10:59:49 | zachcarter | 64 bit |
11:00:06 | FromGitter | <ftsf> amd64 |
11:00:30 | FromGitter | <ftsf> i386 for 32 bit windows, if that's still a thing |
11:00:42 | zachcarter | thanks :) |
11:02:29 | * | Snircle joined #nim |
11:02:39 | * | Ven joined #nim |
11:03:02 | * | Ven is now known as Guest98008 |
11:04:21 | Vladar | I usually make both 32 and 64 bit ones ) |
11:11:58 | zachcarter | hrm |
11:12:13 | zachcarter | this is pissing me off - I’m including the correct mingw headers I believe but I keep getting a compile error |
11:12:20 | zachcarter | #error Only Win32 target is supported! |
11:12:44 | ldlework | do your cross compilation in docker using the same techniques ftsf does |
11:13:11 | zachcarter | not privy to those atm |
11:13:30 | ldlework | to what |
11:13:30 | zachcarter | care to shine some light ftsf? |
11:13:41 | zachcarter | ftsf uses |
11:13:51 | * | Guest98008 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:13:58 | ldlework | https://github.com/ftsf/nimsynth/blob/master/Makefile |
11:14:00 | zachcarter | err ftsf techniques |
11:14:02 | zachcarter | thanks |
11:16:31 | * | krux02 joined #nim |
11:20:28 | couven92 | zachcarter, you can also use the vcc compiler backend with my vccexe tool... That works very well for both 32-bit and 64-bit Windows |
11:20:44 | zachcarter | hrm okay |
11:20:49 | couven92 | But then you'd need to compile on Windows |
11:21:24 | zachcarter | atm I’m trying to come up with simple options that let users distribute binaries from and to whatever os need be |
11:21:47 | * | Matthias247 joined #nim |
11:21:56 | zachcarter | so hopefully I can get mingw working |
11:22:01 | zachcarter | or at least get the right include paths working |
11:22:14 | zachcarter | but maybe docker is the answer here |
11:22:21 | couven92 | zachcarter, with compiler bootstrapping as well? or do you require users to have the right xplat compiler installed? |
11:22:29 | zachcarter | the latter |
11:22:31 | ldlework | zachcarter: mingw inside docker is totally the answer ;) |
11:23:00 | ldlework | then no one needs nothin |
11:23:19 | zachcarter | how do I get the binary off the container |
11:23:23 | zachcarter | I’m such a docker noob |
11:23:46 | zachcarter | oh wait I’m mounting the filesystem on the container |
11:23:46 | zachcarter | duh |
11:23:53 | FromGitter | <Moodge> so uhh I am up and running sorta |
11:23:54 | FromGitter | <TiberiumPY> YAY first full hd monitor in my life |
11:23:55 | FromGitter | <Moodge> except |
11:24:02 | FromGitter | <Moodge> linux failed me and my sound isnt working |
11:24:23 | FromGitter | <Moodge> and so I am going to try the more up to date version and see if that works, and if that doesn't work then I am going to idk.. cry a bit probably |
11:24:55 | zachcarter | I need a docker consultant working on frag with me ;P |
11:26:15 | * | Matthias247 quit (Read error: Connection reset by peer) |
11:33:46 | * | gokr quit (Ping timeout: 258 seconds) |
11:35:04 | zachcarter | oh wow https://github.com/dockcross/dockcross looks nice |
11:35:18 | federico3 | zachcarter: if it's just a chroot that you need, firejail does more than enough |
11:35:46 | ldlework | noice |
11:36:02 | ldlework | zachcarter: good find! |
11:36:19 | * | gokr joined #nim |
11:36:21 | * | ldlework stars |
11:37:01 | zachcarter | thanks |
11:37:06 | zachcarter | federico3: not following |
11:50:15 | * | randude joined #nim |
11:50:50 | randude | I have installed nim and build nimble. If i want to install nimble via nimble, it starts cloning the Nim repo again :S |
11:51:02 | randude | how do i tell it, i already have it? |
11:52:14 | zachcarter | why are you trying to install nimble via nimble? |
11:52:34 | ldlework | ^_^ |
11:52:45 | randude | Its the second approach described here: https://github.com/nim-lang/nimble#installation |
11:52:46 | ldlework | I woke my girlfriend up at 4:52 AM laughing at that |
11:52:59 | randude | src/nimble install |
11:53:11 | zachcarter | okay that’s not using nimble |
11:53:16 | zachcarter | just fyi |
11:53:27 | zachcarter | that’s calling the install command on the makefile inside src/nimble |
11:53:47 | ldlework | what? |
11:53:57 | * | Tiberium joined #nim |
11:53:57 | zachcarter | actually what is that doing |
11:54:04 | zachcarter | oh it’s calling nimble instlal I see |
11:54:06 | ldlework | lol |
11:54:14 | Araq | just ignore that "second approach" |
11:54:20 | randude | but why is it cloning Nim itself again? Its in my path |
11:55:06 | zachcarter | I guess ignore it A) and b) I don’t know but my guess would be it’s not checking your path to see if nim exists before cloning |
11:55:45 | zachcarter | Idlework: ferico3 brought up a good point - native compilation on a vm might be advantageous to cross compilation |
11:55:55 | zachcarter | federico3* |
11:56:31 | randude | The `./koch nimble` approach worked, but why is it doing a debug build? |
11:56:52 | ldlework | zachcarter: why is that |
11:58:04 | zachcarter | well for one users can test the compiled binary on the emulated device |
11:58:42 | randude | I see nimble doesn't have a `clean` counterpart to the `nimble build` command. |
11:58:57 | federico3 | most likely you want to run functional tests straight after the build |
11:59:31 | zachcarter | not to mention how much of a pita cross compilation is |
12:00:58 | Araq | randude: because nimble is fast enough? could update koch.nim though to produce a release build |
12:01:16 | couven92 | I guess it clones nim to be sure that it gets the correct version of nim... in the PATH could be anything... even some random executable that unfortunately is called nim |
12:02:08 | zachcarter | the one big downside is I’m going to have to expect users to have images for whatever OS they want to release to |
12:03:13 | couven92 | zachcarter, or a xplat compiler that is installed on the OS they're on atm |
12:03:38 | zachcarter | couven92: this is to avoid cross compilation |
12:03:54 | zachcarter | and instead natively compile for whatever platform using something like qemu |
12:03:57 | couven92 | ah, sry I didn't read the backlog... :P |
12:04:01 | zachcarter | np :) |
12:04:10 | FromGitter | <andreaferretti> any news on when https://github.com/nim-lang/Nim/pull/5677 is going to land? |
12:04:30 | * | randude is puzzled how nimble doesn't pre-compile the stuff it installs |
12:05:38 | FromGitter | <andreaferretti> it cannot |
12:05:45 | FromGitter | <andreaferretti> most of them libraries |
12:05:58 | couven92 | randude, because nimble uses the nim compiler. And the nim compiler always compiles everything from scratch (unless the nimcache already got it) |
12:05:58 | FromGitter | <andreaferretti> possibly containing generic function |
12:06:12 | FromGitter | <andreaferretti> that will be specialized in the final executable |
12:06:45 | FromGitter | <andreaferretti> in fact, I think that `nimble install` should be avoided, unless you actually want to install a program, such as c2nim |
12:07:18 | Tiberium | how can I generate unique ident for proc declaration at compile time? in macro |
12:07:43 | ldlework | andreaferetti, huh? why would you avoid `nimble install` as it relates to fetching source libraries? |
12:07:49 | couven92 | Tiberium, [name]+randomNumber to string? |
12:07:51 | * | Ven joined #nim |
12:08:01 | Tiberium | couven92, how can I generate random numbers at compile time? |
12:08:15 | * | Ven is now known as Guest49446 |
12:08:23 | couven92 | uhm... can't you call the default random function in stdlib? |
12:08:29 | Tiberium | couven92, doesn't work |
12:08:32 | couven92 | ah... |
12:08:54 | Tiberium | oh wait it does lol |
12:08:59 | Tiberium | it didn't with template thought |
12:09:31 | couven92 | :) |
12:12:11 | * | nsf quit (Quit: WeeChat 1.7) |
12:12:13 | randude | i see nimble packages are just simple plain old nim projects which are passed to nim via -p:... |
12:12:29 | couven92 | randude, exactly |
12:12:57 | FromGitter | <andreaferretti> @Idlework you can list them as dependencies in a nimble file |
12:13:04 | FromGitter | <andreaferretti> nimble will then install them for you |
12:13:14 | FromGitter | <andreaferretti> and point to the correct version if you have more than one |
12:13:39 | FromGitter | <andreaferretti> for instance https://github.com/nim-lang/nimble#dependencies |
12:13:50 | ldlework | oh you're saying don't manually install stuff, sure |
12:13:52 | * | kier quit (Remote host closed the connection) |
12:14:47 | randude | nimble doesn't seem to be too minimal to be a build system |
12:14:52 | randude | -doesn't- |
12:15:54 | FromGitter | <andreaferretti> well, most build systems need a way to fetch dependencies as well |
12:16:30 | * | kier joined #nim |
12:16:35 | FromGitter | <andreaferretti> maven, sbt, leiningen, npm, cargo, stack... |
12:17:06 | * | ftsf quit (Ping timeout: 260 seconds) |
12:17:12 | FromGitter | <andreaferretti> this is because building stuff and retrieving dependencies are tightly related |
12:18:56 | randude | But they don't put the final executables inside the source dir and have a cleanup command |
12:20:00 | FromGitter | <andreaferretti> on that point I agree with you |
12:20:46 | Tiberium | hmm, is this AST correct? https://gist.github.com/TiberiumN/722e53c6bb57609770d9f005d947a2c1 |
12:20:51 | Tiberium | it looks like it is for me |
12:21:02 | Araq | Tiberium: use gensym |
12:21:27 | Tiberium | Araq, but I need nnkIdent for proc name |
12:21:55 | Araq | you dont |
12:22:04 | * | Jesin quit (Ping timeout: 260 seconds) |
12:22:38 | Tiberium | Araq, genSym(nskProc) ? |
12:22:49 | Araq | ye |
12:23:15 | Tiberium | I just wanted to use it with "quote do:", so it seems I need to use manual ast construction :) |
12:23:28 | randude | andreaferretti: and since nim can build entire projects by itself i see less of a need of nimble as a build system. |
12:23:55 | Tiberium | Araq, and is this AST correct? https://gist.github.com/TiberiumN/722e53c6bb57609770d9f005d947a2c1 |
12:24:11 | Tiberium | it says that "msg" is undeclared identifier in proc body |
12:24:20 | FromGitter | <andreaferretti> well, nimble does one thing more for you, which is retrieve your (transitive) dependencies and put them on the path for you |
12:24:45 | FromGitter | <andreaferretti> it also allow to write custom tasks for more complex builds, but nimscript does that as well |
12:26:11 | * | Jesin joined #nim |
12:28:25 | Araq | randude: I created 'nawabs' fwiw ;-) |
12:29:28 | randude | I agree that build systems suck :D |
12:29:56 | randude | Which is why i love how loosely nim packages are coupled to nimble. |
12:30:42 | randude | And since i generally dislike language package managers, i guess i just clone the 2 binding repos manually and go with a 5 line makefile :P |
12:30:45 | * | randude runs |
12:31:32 | * | zachcarter quit (Quit: zachcarter) |
12:31:42 | Araq | Tiberium: the compiler doesn't like gensym'ed parameters, use idents for these? |
12:31:52 | * | zachcarter joined #nim |
12:32:14 | * | bjz_ joined #nim |
12:33:25 | Araq | randude: write a 'nakefile' instead of a makefile :P |
12:33:56 | * | bjz quit (Ping timeout: 255 seconds) |
12:34:18 | * | Guest49446 quit (Ping timeout: 255 seconds) |
12:35:15 | * | Ven_ joined #nim |
12:36:15 | * | zachcarter quit (Ping timeout: 258 seconds) |
12:37:49 | Tiberium | I know I need to use genSym, but firstly I want to just make it work: https://gist.github.com/TiberiumN/19e6dfb06bd68f078de5f3f4bde98b15 count is "var count {.compiletime.} = 1". So compilation fails at C compilation |
12:37:55 | Tiberium | what is wrong with this macro? |
12:38:25 | Tiberium | it's used like that: "command "something", "another":\n <body>" |
12:39:00 | randude | Do i put my tests in a seperate file/directory or does nim has some test{ ... } type of construct? |
12:42:34 | BennyElg | Hey guys |
12:42:50 | BennyElg | Any ETA for Nim debugger? |
12:43:38 | * | SusWombat joined #nim |
12:43:51 | def- | BennyElg: what's wrong with gdb? |
12:43:56 | ldlework | ... |
12:44:57 | Tiberium | Reproduce script: https://gist.github.com/TiberiumN/4e5f9886ae9f8763b2bcc1fc04540e5c |
12:45:02 | Tiberium | it fails for me at C compilation |
12:47:08 | Tiberium | it fails at "`uniqName`.handle(`cmds`)" in macro |
12:48:03 | Tiberium | oh it seems I fixed it |
12:48:09 | Araq | Tiberium: dunno, if you're after an async RPC library, use 'zerno' |
12:48:40 | Tiberium | yay I fixed it |
12:48:42 | Tiberium | it seems |
12:48:53 | Tiberium | I needed "let cmds = cmds[0]" in macro |
12:49:03 | Tiberium | oh wait no |
12:49:11 | * | Ven_ quit (Ping timeout: 260 seconds) |
12:49:45 | Tiberium | it *fixed* crash, but now I pass only one argument from varargs to .handle |
12:50:55 | Tiberium | ok, how to convert varargs to array? |
12:51:09 | Tiberium | hmm no |
12:54:30 | * | Ven_ joined #nim |
12:58:02 | Tiberium | yay I fixed it finally! |
12:59:05 | Tiberium | inside "quote do" i needed to add "let a = `cmds`" and then pass "a" to my proc instead of " `cmds` " |
13:16:48 | * | zachcarter joined #nim |
13:16:54 | * | randude quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
13:20:45 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
13:24:32 | FromGitter | <dom96> Araq: please do change Koch to compile a release Nimble. |
13:24:49 | FromGitter | <dom96> End users shouldn't be getting a debug build, and it's not about speed. |
13:25:41 | Calinou | yeah, I wondered about how to get a release Nimble from source too |
13:33:47 | * | Ven_ quit (Ping timeout: 268 seconds) |
13:35:34 | * | Ven joined #nim |
13:35:59 | * | Ven is now known as Guest54785 |
13:37:57 | zachcarter | dom96: I ran into a wall yesterday with the nim playground thing |
13:44:59 | * | Guest54785 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:46:32 | FromGitter | <dom96> Tell me more :) |
13:51:25 | * | smt_ joined #nim |
13:51:36 | * | smt quit (Ping timeout: 240 seconds) |
13:51:55 | * | smt_ quit (Read error: Connection reset by peer) |
13:52:49 | * | smt joined #nim |
13:54:20 | * | Ven_ joined #nim |
13:59:10 | * | Sentreen quit (Quit: WeeChat 1.4) |
14:00:57 | * | gokr quit (Quit: Leaving.) |
14:05:50 | * | Tiberium quit (Remote host closed the connection) |
14:06:13 | * | Tiberium joined #nim |
14:10:53 | * | Tiberium quit (Remote host closed the connection) |
14:11:26 | * | Tiberium joined #nim |
14:11:29 | * | Tiberium quit (Remote host closed the connection) |
14:11:46 | zachcarter | dom96: sorry meeting |
14:12:17 | zachcarter | I was trying to find a good solution to package up and deploy the app on digital ocean, but the only solution I could come up with was… docker |
14:12:29 | zachcarter | so it became a docker in docker situation |
14:12:45 | * | Ven_ quit (Ping timeout: 240 seconds) |
14:14:21 | ldlework | zachcarter: why would it be docker in docker? |
14:14:33 | zachcarter | well unless I use the api like you were suggesting |
14:14:34 | zachcarter | the rest api |
14:14:35 | ldlework | oh you're talking about the socket |
14:14:40 | zachcarter | yeah |
14:14:47 | ldlework | even if you include the binary, its not docker-in-docker per se |
14:14:57 | ldlework | that refers to literally running the daemon inside of a container |
14:15:07 | zachcarter | oh |
14:15:07 | ldlework | that is, you can spawn containers with the containerized docker daemon |
14:15:12 | zachcarter | ah okay |
14:15:15 | ldlework | for testing docker itself, and other things |
14:15:17 | FromGitter | <dom96> Why is docker required for deployment? |
14:15:28 | zachcarter | dom96: it’s not but I don’t want to manually have to set up ngnix and all that stuff |
14:15:30 | ldlework | Its not required for anything. It just makes deployment easier. |
14:15:38 | zachcarter | ^ |
14:15:52 | ldlework | zachcarter: I would go the cheap route just as a PoC |
14:16:04 | ldlework | put the docker binary inside the image and use it as a client by shelling out to it |
14:16:09 | zachcarter | okay |
14:16:23 | * | Tiberium joined #nim |
14:16:28 | zachcarter | what image should I use then for installing docker? |
14:16:30 | ldlework | We can make nim-docker some other time |
14:16:40 | zachcarter | actually I have a queston about good base images |
14:16:44 | ldlework | What OS is the official nim based on |
14:16:50 | ldlework | zachcarter: no you can't do multiple inheritance |
14:16:52 | ldlework | ;) |
14:17:08 | zachcarter | haha |
14:17:32 | zachcarter | I think I’m going to go this route for frag - cross compile with docker |
14:17:36 | zachcarter | and install an emu inside docker |
14:18:08 | zachcarter | is the alpine base image suitable for this task? |
14:18:22 | zachcarter | or should I use a propper os image like ubuntu? |
14:18:29 | FromGitter | <dom96> Yeah... That seems like more trouble than it's worth. Setting up nginx isn't that hard. |
14:18:33 | * | Tiberium quit (Remote host closed the connection) |
14:18:51 | zachcarter | hrm okay |
14:19:06 | * | Tiberium joined #nim |
14:19:06 | * | Tiberium_ joined #nim |
14:19:07 | * | Ven joined #nim |
14:19:17 | zachcarter | I’ve never used nginx before so I wasn’t sure how to set it up on digital ocean and expose my app |
14:19:31 | * | Ven is now known as Guest78706 |
14:20:03 | * | Tiberium_ quit (Client Quit) |
14:20:54 | zachcarter | I’ll work on figuring that out though |
14:22:35 | ldlework | zachcarter: use jwilder's nginx |
14:22:51 | ldlework | it acts as a virtual host proxy |
14:23:27 | ldlework | any other container that is started with the environment variable VIRTUAL_HOST=some.sub.domain will automatically be detected by the nginx image and it will route requests to the other image |
14:23:37 | ldlework | the other image I think has to run an exposed port 80 or something |
14:24:11 | ldlework | [jwilder] -> [nim-repl-manager] -> [nim-repl-instance] |
14:24:22 | FromGitter | <dom96> Digital ocean has nice guides. |
14:24:37 | FromGitter | <dom96> I can't help now I'm afraid. |
14:24:50 | FromGitter | <dom96> In any case, deployment should be the least of your problems |
14:26:00 | zachcarter | well the prototype works locally dom96 |
14:26:33 | zachcarter | when you have time we can chat more |
14:30:07 | * | Tiberium quit (Remote host closed the connection) |
14:30:42 | * | Tiberium_ joined #nim |
14:30:42 | * | Tiberium joined #nim |
14:31:12 | * | Tiberium quit (Remote host closed the connection) |
14:31:12 | * | Tiberium_ quit (Remote host closed the connection) |
14:31:29 | * | Tiberium joined #nim |
14:33:51 | * | Tiberium quit (Remote host closed the connection) |
14:34:09 | * | Tiberium joined #nim |
14:37:10 | * | Tiberium quit (Remote host closed the connection) |
14:39:52 | * | Tiberium joined #nim |
14:42:38 | * | Guest78706 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:14:58 | Tiberium | how to do "import plugins/ something" from macro? |
15:15:06 | Tiberium | there's no examples in docs |
15:15:24 | Tiberium | for this type of import |
15:16:24 | * | fvs joined #nim |
15:16:52 | demi- | Tiberium: what do you want to do? |
15:17:09 | Tiberium | demi-, I want to generate import statements in macro |
15:17:14 | Tiberium | like "import plugins/somestring" |
15:18:59 | demi- | https://nim-lang.org/docs/macros.html#statements-import-section ? |
15:19:51 | Tiberium | demi-, yeah, that worked, but there's another strange error |
15:20:13 | Tiberium | I have macro defined in one file, macro is called "importPlugins". and in main file I simply call "importPlugins()" |
15:20:21 | krux02 | my tetris is finished |
15:20:30 | Tiberium | and it says "cannot open plugins/calc", however "plugins" folder is present and "calc.nim" is here |
15:20:47 | demi- | can you show code? |
15:20:51 | krux02 | yes |
15:21:02 | krux02 | https://forum.nim-lang.org/t/2924 |
15:21:14 | demi- | er, that was at Tiberium |
15:21:21 | krux02 | haha |
15:21:23 | krux02 | ok |
15:22:20 | Tiberium | demi-, https://gist.github.com/TiberiumN/a8ece8ec42745b1a0e59fa13d10b87f3 |
15:22:30 | Tiberium | create a folder "plugins" and create "calc.nim" inside it |
15:22:36 | krux02 | I almost thought someone was interested in my tetris in nim |
15:23:21 | zachcarter | Idlework: I have another q about Docker if you have a second |
15:23:57 | Tiberium | demi-, ah, I forgot to add some imports at the top of utils.nim: "import strutils, macros, sequtils, os" |
15:24:02 | demi- | Tiberium: so the `main.nim` and `utils.nim` are in a directory called `src` which has a subdirectory called `plugins`? |
15:24:22 | Tiberium | demi-, yes |
15:24:51 | demi- | Tiberium: it is my understanding that files operate relative to where they are, so i'm not sure why you are including the `src` component in the path you have there |
15:24:55 | Tiberium | demi-, If I explicitly write "import plugins/calc" in main.nim, it works |
15:25:24 | Tiberium | demi-, ah, but it doesnt solve the error |
15:25:48 | Tiberium | macro emits "import plugins/calc", but then says "cannot open plugins/calc" |
15:26:35 | * | Andris_zbx quit (Remote host closed the connection) |
15:27:22 | * | xmonader2 quit (Quit: Leaving) |
15:27:34 | demi- | tbh i am not sure; building the code this way would mean the plugins get baked into the executable binary tho |
15:27:46 | Tiberium | demi-, yeah it's not the real "plugins" :) |
15:27:51 | Tiberium | I will rename them |
15:27:51 | demi- | are you trying to avoid maintaining import statements then? |
15:27:55 | Tiberium | demi-, yes |
15:28:01 | demi- | i see |
15:28:25 | Tiberium | I want to generate "import plugins/file" for every file in plugins folder except files in IgnoreFilenames array |
15:28:45 | demi- | that might be a shortcut worth avoiding imo, clever tricks typically end up being difficult to maintain |
15:30:22 | Tiberium | demi-, btw, if I have "utils.nim" in src folder, and I'm calling "nim c src/utils.nim" outside of it, then I need to walkDir over "src/plugins" folder, not just "plugins" |
15:30:41 | * | couven92 quit (Read error: Connection reset by peer) |
15:30:51 | demi- | oh i see, so you aren't using nimble or something to build it for you |
15:31:15 | Tiberium | demi-, I have nimble |
15:31:29 | Tiberium | (nimble.install file) |
15:33:10 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
15:33:20 | Tiberium | ah I think I got it |
15:34:28 | Tiberium | so I needed to use "import src/plugins/calc" if I'm outside of src directory |
15:34:47 | Tiberium | so imports from macro are relative to current working dir |
15:34:50 | Tiberium | and usual import are not |
15:38:40 | * | yglukhov_ quit (Remote host closed the connection) |
15:38:46 | * | PMunch joined #nim |
15:45:32 | * | yglukhov joined #nim |
15:45:56 | zachcarter | I think i’m going to end up building nim from source in my docker container as nim latest is v 0.16.0 for the docker images and I need 16.1 |
15:47:41 | * | yglukhov quit (Read error: Connection reset by peer) |
15:47:42 | demi- | there is a nim-latest docker |
15:47:58 | * | yglukhov joined #nim |
15:49:29 | * | miNIMal joined #nim |
15:49:38 | * | miNIMal is now known as mi-nim-al |
15:50:23 | zachcarter | hrm okay |
15:50:41 | mi-nim-al | Please explain this arcane form of sorcery: https://github.com/nim-lang/opengl/blob/master/src/opengl.nim#L106-L110 |
15:50:44 | * | mi-nim-al is amazed |
15:52:02 | * | yglukhov quit (Ping timeout: 240 seconds) |
15:52:08 | mi-nim-al | ive seen a lot of extension loaders, which all needed like thousands of lines to do this |
15:57:28 | krux02 | mi-nim-al: I don't know exactly what is going on there, but opengl in nim loads all extensions that are used in a program |
15:57:37 | krux02 | so it does use metainformation about the program itself |
15:57:48 | krux02 | and when it can't find an extenion, it fails |
15:58:28 | mi-nim-al | :-O now thats some meta stuff |
15:58:30 | krux02 | that is bad, because that does not allow to implement fallback solutions in case an extension is missing |
15:58:52 | zachcarter | demi-: nim:latest still points to v0.16.0 |
16:00:10 | Araq | krux02: yeah but there is an alternative opengl wrapper that doesn't use Nim's extension loader |
16:00:26 | Tiberium | zachcarter, nim:devel probably |
16:00:39 | zachcarter | I don’t think there’s a nim:devel docker image :/ |
16:00:47 | Tiberium | or nimlang/nim:onbuild |
16:01:03 | zachcarter | oh wait |
16:01:07 | zachcarter | you’re right there is nim:devel |
16:01:15 | Tiberium | ah nvm |
16:01:17 | Araq | or you compile with -d:useGlew |
16:01:20 | Tiberium | https://hub.docker.com/r/nimlang/nim/ |
16:01:25 | Tiberium | last pushed - two months ago |
16:01:29 | Araq | boy, openGL is such a clusterfuck |
16:01:43 | zachcarter | this is why I use BGFX :P |
16:01:56 | zachcarter | let someone else handle the cluster fuck for me |
16:02:03 | krux02 | mi-nim-al: when I think about it, it is actually nothing different from what a normal linker does |
16:02:43 | mi-nim-al | krux02: but a normal linker doesn't fetch all extensions and sets up like 1000 function pointers. |
16:02:45 | krux02 | Araq: which is the alternative opengl? |
16:06:01 | krux02 | mi-nim-al: well a normal linker links only functions, that are actually used, and that is what the opengl binding does, too. it does nto set up 1000 function pointers it only sets those that are used. |
16:06:54 | Araq | https://github.com/yglukhov/nimsl ? dunno |
16:07:28 | mi-nim-al | so it looks into some linking metadata and generates a bunch of glGetProc("foo") calls? |
16:08:51 | krux02 | Araq: well, no, that is just a nim to glsl compiler and doesn't even have an opengl dependency. |
16:08:51 | mi-nim-al | im just curious about whether i need something like glew with these bindings |
16:09:38 | krux02 | mi-nim-al: yes it calls glGetProc for you |
16:09:41 | Araq | mi-nim-al: well originally it worked without glew |
16:10:11 | Araq | not sure what people changed, iirc I was the original author |
16:12:21 | krux02 | it should also work without glew by now |
16:12:30 | krux02 | at least that is what the documentation says |
16:13:02 | zachcarter | Tiberium: tried nim:devel not 16.1 either :/ |
16:13:03 | krux02 | it seems like glew was necessary for a time, when nim's version did cause problems |
16:13:21 | Tiberium | zachcarter, as I said - https://hub.docker.com/r/nimlang/nim/ - last pushed 2 months ago |
16:14:13 | krux02 | well i am not aware of any other opengl binding except the original |
16:14:44 | Tiberium | I don't see why nim docker doesn't have auto building for devel |
16:14:47 | Araq | krux02: that's good because all improvements should flow into the official binding |
16:14:47 | Tiberium | https://docs.docker.com/docker-hub/builds/#create-an-automated-build |
16:14:56 | demi- | zachcarter: hmm i thought there was a HEAD version of the nim docker |
16:15:28 | zachcarter | let me try head haha |
16:15:30 | krux02 | Araq: yes I agree |
16:15:33 | Tiberium | https://docs.docker.com/docker-hub/builds/#create-an-automated-build maybe we can ask nimlang/nim docker creators? |
16:15:56 | krux02 | does load extensions throw an exception when a function can't be loaded? |
16:16:02 | krux02 | I don't remember anymore |
16:16:31 | Araq | I doubt it |
16:17:42 | zachcarter | for now I guess I’m stuck compiling nim myself in docker |
16:17:46 | krux02 | I don't remember anymore what exactly happens when load extension fails, but I think it should be documented, whet happens when an extenison can't be loaded, and one should be able to know what extensions are missing, so that the user can decide to continue even when some extensions are missing. |
16:17:55 | mi-nim-al | the age old question: should i pick SDL2 over GLFW? <.< the latter one is leaner, but the first one has a nice event loop. |
16:18:09 | zachcarter | GLFW has an event loop too |
16:18:31 | krux02 | Well I go for SDL2 and I don't miss anything |
16:18:32 | mi-nim-al | really? Afaik it has only callbacks or isKeyPressed() type of stupp |
16:18:44 | mi-nim-al | stuff* |
16:18:46 | zachcarter | it’s easy enough to create an event loop with GLFW |
16:18:58 | zachcarter | I’d make the determination based on what else you need besides windowing |
16:19:00 | krux02 | glfw is nice but it has no image loading and it does not have environment pointers for the callback functions |
16:19:07 | zachcarter | and if you plan to release for mobile good luck |
16:19:29 | zachcarter | with glfw I mean |
16:19:34 | zachcarter | sdl2 supports mobile well |
16:20:51 | zachcarter | there are a number of game frameworks in development mi-nim-al: krux02 and myself both have projects geared towards creating games |
16:21:20 | krux02 | yes I just realeasd a tetris example |
16:21:35 | mi-nim-al | i don't want to make a game. Just demo some graphics i have to implement as a project |
16:21:42 | krux02 | https://forum.nim-lang.org/t/2924 |
16:21:42 | zachcarter | ah okay |
16:22:05 | krux02 | well then I recommend you my opengl sandbox |
16:22:18 | PMunch | mi-nim-al, then you can probably just use the SDL2 bindings as-is |
16:22:21 | krux02 | only requirement decent graphcis drivers (no mac osx) |
16:22:25 | zachcarter | krux02: now you can worry about cross compilation nightmares with me |
16:22:32 | PMunch | If you're doing 2D at least |
16:23:03 | mi-nim-al | Does nim have some type of scope(exit) { ... } type of construct? |
16:23:09 | krux02 | well at some point I hope to have a 'bundle it up' button |
16:23:20 | PMunch | mi-nim-al, to do what? |
16:23:25 | zachcarter | what are you going to use to “bundle it up” though? |
16:23:29 | mi-nim-al | like atexit(), but when leaving the current scope/block |
16:23:35 | PMunch | Hmm |
16:23:36 | krux02 | mi-nim-al: defer |
16:23:38 | zachcarter | like a defer |
16:23:42 | PMunch | defer yeah |
16:23:47 | mi-nim-al | ^ i will check that out |
16:24:09 | PMunch | There is also block I think if you want to be able to jump out of a block at will. A bit like goto |
16:24:13 | mi-nim-al | i want to `let foo = newFoo() defer: foo.destroy()` or something like that |
16:24:15 | zachcarter | krux02: I’m experimenting with using docker for this |
16:24:45 | zachcarter | to prevent users from having to have a bunch of toolchains installed |
16:24:46 | PMunch | mi-nim-al, yeah that's a defer |
16:25:03 | PMunch | https://nim-lang.org/docs/manual.html#exception-handling-defer-statement |
16:25:07 | krux02 | zachcarter: I hope in the future I can use WebAssembly without the browser package |
16:25:19 | krux02 | then I have a package that can be executed on any platform |
16:25:33 | zachcarter | that would be neat |
16:25:56 | krux02 | I have high expectations on that WebAssembly |
16:26:03 | PMunch | Hmm, can you do a block-defer? To not wrap anything after your defer in the try statement? |
16:26:26 | krux02 | well I don't know docker |
16:26:40 | * | vivus joined #nim |
16:26:47 | zachcarter | I don’t know docker either really |
16:27:04 | zachcarter | but so far I’ve been able to spin up a container and move my project to it and compile all my dependencies on it for windows using a linux docker container |
16:27:20 | krux02 | interesting |
16:27:45 | * | Matthias247 joined #nim |
16:29:24 | vivus | what is a linux docker container ? |
16:29:44 | zachcarter | a docker container running linux? I guess I could have been more specific and said debian |
16:30:05 | vivus | a docker container or an LXC container ? |
16:30:17 | zachcarter | not sure what a LXC container is |
16:30:56 | * | PMunch quit (Quit: leaving) |
16:30:57 | zachcarter | ah, vivus: it’s def a docker container |
16:31:00 | zachcarter | running debian |
16:31:19 | zachcarter | https://gist.github.com/zacharycarter/c12f078d49c5573683e9b1ff7e97a9f8 |
16:33:52 | * | yglukhov joined #nim |
16:34:22 | * | alectic joined #nim |
16:35:30 | * | chemist69 quit (Ping timeout: 255 seconds) |
16:35:55 | krux02 | I |
16:35:59 | krux02 | well I have to go |
16:37:58 | * | chemist69 joined #nim |
16:38:09 | * | yglukhov quit (Ping timeout: 260 seconds) |
16:43:58 | * | krux02 quit (Remote host closed the connection) |
16:51:24 | * | mi-nim-al quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:52:40 | * | zachcarter quit (Quit: zachcarter) |
16:53:38 | * | captain-adequate joined #nim |
16:54:49 | * | shashlick quit (Ping timeout: 268 seconds) |
16:55:03 | * | shashlick joined #nim |
16:57:36 | * | krux02 joined #nim |
17:13:53 | * | zachcarter joined #nim |
17:20:10 | * | nchambers joined #nim |
17:23:55 | * | Trustable joined #nim |
17:26:20 | * | couven92 joined #nim |
17:29:45 | * | krux02 quit (Quit: Leaving) |
17:29:45 | * | zachcarter quit (Quit: zachcarter) |
17:42:13 | * | tigerfinch joined #nim |
17:59:31 | * | zachcarter joined #nim |
18:01:52 | zachcarter | I’m trying to compile for windows on debian, the compilation process seems to hang at : CC: stdlib_sharedlist |
18:01:55 | zachcarter | not sure why :/ |
18:02:16 | Tiberium | zachcarter, can you provide short script? I can try on my mingw-w64 + manjaro |
18:02:47 | zachcarter | hrm if you’re willing to clone frag I could give you the compile commands |
18:02:53 | zachcarter | although I’m running this inside docker |
18:03:08 | Tiberium | zachcarter, ok, I can try, so I just need to clone frag? |
18:03:36 | zachcarter | hrm Tiberium: might not be worth the time |
18:03:43 | Tiberium | zachcarter, why? |
18:04:03 | zachcarter | Now i’m hanging at a different point in the compilation process :/ |
18:04:18 | zachcarter | oh wait I”m not I’m just getting more verbose output nevermind |
18:04:31 | zachcarter | yeah if you could clone frag that’d be awesome |
18:04:58 | Tiberium | zachcarter, i'm cloning it right now :) |
18:05:16 | zachcarter | sweet thank you :) |
18:05:55 | Tiberium | zachcarter, done, what I need to do next? |
18:06:09 | zachcarter | okay the command I’m trying to run is: |
18:06:17 | zachcarter | well first nimble install |
18:06:20 | zachcarter | inside frag |
18:06:41 | zachcarter | then `nim c --os:windows --cpu:amd64 --passC:-I/usr/x86_64-w64-mingw32/include ./frag-samples/desktop/space-shooter/src/space_shooter.nim` |
18:06:54 | zachcarter | not sure where your mingw install is but that will have to be changed |
18:07:23 | Tiberium | zachcarter, I don't even need includes |
18:07:30 | zachcarter | oh nice! |
18:10:06 | zachcarter | I imagine if you get further than me, you’ll be running into linker errors |
18:10:11 | Tiberium | zachcarter, and you forgot that I need to clone https://github.com/fragworks/frag-samples too :) I did it |
18:10:16 | zachcarter | oh sorry |
18:10:18 | zachcarter | doh |
18:10:19 | Tiberium | doing main command right now |
18:10:20 | zachcarter | thank you |
18:10:24 | zachcarter | okay sweet :D |
18:10:54 | Tiberium | zachcarter, well it hangs for me too |
18:11:07 | zachcarter | stdlib_sharedlist ? |
18:11:16 | Tiberium | zachcarter, yes |
18:11:26 | zachcarter | okay cool :D thanks for reproducing |
18:11:48 | zachcarter | Araq / dom96: any ideas why this might be happening? |
18:12:01 | Tiberium | zachcarter, I'll try with my cross-compile compiler options |
18:12:11 | zachcarter | okay |
18:14:33 | Tiberium | zachcarter, well, compilation failed with C level errors |
18:14:40 | Tiberium | but not with shared_list |
18:14:44 | zachcarter | well that’s good |
18:15:02 | zachcarter | so this wasn’t with the Nim compiler? |
18:15:30 | Tiberium | zachcarter, https://gist.github.com/TiberiumN/725e78c969d542f4f0b054be9cb14717 |
18:15:44 | Tiberium | you can run it "nim c -d:crosswin <your nim file>" |
18:16:09 | Tiberium | if you have this gcc executable in your /usr/bin thought |
18:16:18 | zachcarter | ah okay thanks I’ll try that |
18:16:51 | Tiberium | zachcarter, ah sorry for russian error log, I'll run it again with english locale :) |
18:16:59 | zachcarter | all good :) |
18:17:27 | Tiberium | zachcarter, done: https://gist.github.com/TiberiumN/725e78c969d542f4f0b054be9cb14717 |
18:17:43 | zachcarter | thank you! :) |
18:44:44 | * | fvs left #nim ("leaving") |
18:46:39 | zachcarter | I have NO idea what these errors are caused by |
18:46:47 | zachcarter | but now I’m getting the same ones Tiberium |
18:46:58 | zachcarter | so that’s good news at least |
18:49:50 | * | McSoFake joined #nim |
18:59:42 | * | Arrrr quit (Read error: Connection reset by peer) |
19:02:01 | * | devted joined #nim |
19:31:09 | * | Vladar quit (Quit: Leaving) |
19:34:19 | * | libman joined #nim |
19:37:53 | zachcarter | installing debian now to debug this :/ |
19:40:49 | * | nsf joined #nim |
19:43:46 | * | throwaway2384 joined #nim |
19:44:46 | throwaway2384 | If i use `--path="~/foo"` in my nim.cfg, the ~ gets expanded properly but the whole string gets appended to $PWD |
19:45:09 | throwaway2384 | this doesn't happen if i specify the full path instead of ~ |
19:47:23 | * | Matthias247 quit (Read error: Connection reset by peer) |
19:48:34 | throwaway2384 | Can i use wildcards in the nim.cfg? I can't find any documentation to its syntax. |
19:50:05 | couven92 | throwaway2384, I think you can use environment variables... like $HOME instead of ~ |
19:50:49 | throwaway2384 | couven92: the expansion of ~ works, its just that the whole string gets appended to PWD. |
19:50:55 | throwaway2384 | wait i'll give an example |
19:51:05 | couven92 | throwaway2384, no I get what you mean |
19:51:19 | couven92 | as I said, try to use $HOME instead of ~ |
19:52:05 | throwaway2384 | works, but ~ is still broken |
19:52:17 | * | rokups quit (Quit: Connection closed for inactivity) |
19:53:28 | couven92 | well, I guess, it's because the path does not start with a / and thus is recognised as a relative path |
19:53:47 | throwaway2384 | can you be my friend and report this bug? ^^ |
19:54:17 | couven92 | I don't use Linux! :P |
19:54:54 | throwaway2384 | do i get it right, the nim.cfg just contains cmd line flags for nim? |
19:55:19 | throwaway2384 | maybe its even evaluated by the shell |
19:55:33 | couven92 | nope... |
19:55:59 | couven92 | the nim.cfg is actually parsed and executed by the compiler during compilation |
19:56:31 | * | throwaway2384 wishes for some nim.cfg documentation |
19:56:47 | throwaway2384 | so its a normal nim program? |
19:57:02 | couven92 | no |
19:57:51 | couven92 | it's parsed by a config reader or sth... But there are some commands you can execute there nevertheless |
19:58:10 | couven92 | like @putenv, @if and so on... |
20:00:58 | TheLemonMan | uhh, is there a way to speed up the test suite? |
20:03:29 | * | zachcarter quit (Quit: zachcarter) |
20:05:18 | throwaway2384 | Is it idiomatic to use the defer statemant often for cleanup stuff? |
20:10:55 | throwaway2384 | or maybe there is some C# style using statement? |
20:20:56 | * | alectic quit (Quit: leaving) |
20:23:39 | * | Tiberium quit (Ping timeout: 255 seconds) |
20:23:44 | * | Tiberium_ joined #nim |
20:35:33 | * | nsf quit (Quit: WeeChat 1.7) |
20:37:53 | * | Tiberium joined #nim |
20:40:20 | * | Tiberium_ quit (Ping timeout: 252 seconds) |
20:41:25 | throwaway2384 | How do i create an uninitialized variable for later use? This doesn't seem to work: https://github.com/nim-lang/sdl2/commit/c2655af4d6776108601fccdf8fce40be6dce6234 |
20:41:50 | couven92 | var x: SomeType |
20:42:09 | throwaway2384 | still gives warnings |
20:42:18 | throwaway2384 | which will become errors in the future* |
20:42:37 | * | Tiberium quit (Remote host closed the connection) |
20:42:49 | couven92 | what kind of warning? |
20:43:08 | throwaway2384 | Cannot prove that 'event' is initialized. This will become a compile time error in the future. [ProveInit] |
20:44:23 | throwaway2384 | I need to create an unitialized variable, to use it for event pulling using sdl2 C bindings |
20:44:55 | throwaway2384 | https://github.com/nim-lang/sdl2/blob/master/examples/sdl_skeleton.nim#L14 |
20:51:05 | * | adeohluwa joined #nim |
20:57:03 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
20:57:08 | * | zachcarter joined #nim |
21:00:15 | * | zachcarter quit (Read error: Connection reset by peer) |
21:00:41 | * | zachcarter joined #nim |
21:02:16 | * | yglukhov joined #nim |
21:03:12 | throwaway2384 | Well, wrapping my code in a main() proc solved this in a mysterious way |
21:06:23 | zachcarter | looking for some help with these compile errors: https://gist.github.com/zacharycarter/3d43db07d8c7dc94c2fae22b5f2f77f0 - trying to cross compile for win64 on debian |
21:06:49 | zachcarter | I don’t get these errors when compiling for debian, I get linker errors like I expect |
21:18:16 | zachcarter | I guess I should confirm I can natively compile this on windows first, even though I’ve tried in the past and it’s worked |
21:18:42 | * | throwaway2384 quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
21:21:49 | * | yglukhov quit (Remote host closed the connection) |
21:22:04 | zachcarter | it’s almost like it’s trying to use the c++ compiler |
21:28:00 | * | Jesin quit (Quit: Leaving) |
21:30:21 | * | yglukhov joined #nim |
21:30:55 | FromGitter | <Varriount> zachcarter: Or a different standard of C |
21:31:05 | zachcarter | yeah :/ |
21:31:29 | zachcarter | this stinks |
21:32:29 | zachcarter | I tried cross compiling a simple echo “Hello world” and that worked |
21:32:34 | zachcarter | or at least it seemed to |
21:32:53 | zachcarter | I’m going to make sure this natively compiles on windows and if it does, then I’m not sure what to do :/ |
21:34:28 | zachcarter | I wonder if there are windows docker containers I can use on osx |
21:34:35 | zachcarter | then I wouldn’t have to cross compile |
21:35:17 | zachcarter | oh bleh |
21:35:20 | zachcarter | I’d have to use virtualbox |
21:38:31 | zachcarter | Varriount: it’d be weird though, I’m positive I’ve built frag before on windows using mingw-w64 |
21:48:27 | * | Trustable quit (Remote host closed the connection) |
21:57:41 | zachcarter | Araq is the ultimate troll - https://forum.nim-lang.org/t/2925 lol |
21:59:02 | zachcarter | I guess he doesn’t exactly troll but whatever the internet smartass meme is Araq fits that to a T |
22:11:36 | * | yglukhov quit (Read error: Connection reset by peer) |
22:12:07 | * | yglukhov joined #nim |
22:22:47 | FromGitter | <Varriount> It's the grumpy developer with zero tact stereotype |
22:22:54 | * | bjz joined #nim |
22:24:04 | FromGitter | <Varriount> Well, maybe not zero tact. He just doesn't suffer fools lightly. |
22:24:41 | FromGitter | <Varriount> Which is understandable, given what he's accomplished. |
22:26:03 | zachcarter | yeah |
22:26:22 | zachcarter | makes me laugh though, I love it |
22:27:19 | * | McSoFake quit (Quit: leaving) |
22:28:45 | * | willprice quit (Ping timeout: 255 seconds) |
22:30:37 | zachcarter | dom96: would it be difficult to add an os filter to nimble dependencies? |
22:32:43 | * | tigerfinch quit (Ping timeout: 258 seconds) |
22:45:43 | * | yglukhov quit (Remote host closed the connection) |
22:45:51 | FromGitter | <dom96> If i understand you correctly then that's already supported |
22:46:17 | * | yglukhov joined #nim |
22:46:24 | FromGitter | <dom96> Nimble files support a subset of Nim. |
22:46:34 | FromGitter | <dom96> So you can use a when statement |
22:50:36 | * | yglukhov quit (Ping timeout: 260 seconds) |
22:55:04 | zachcarter | ah okay cool |
22:55:16 | zachcarter | thanks |
22:57:03 | * | bozaloshtsh joined #nim |
22:57:03 | * | bozaloshtsh quit (Changing host) |
22:57:03 | * | bozaloshtsh joined #nim |
22:59:03 | * | adeohluwa quit (Quit: Connection closed for inactivity) |
23:01:07 | * | libman quit (Quit: Connection closed for inactivity) |
23:06:24 | * | Lord_Nightmare quit (Ping timeout: 240 seconds) |
23:33:05 | * | libman joined #nim |
23:43:36 | * | Nobabs27 joined #nim |
23:47:01 | * | Nobabs27 quit (Client Quit) |
23:52:03 | * | rupil joined #nim |
23:55:23 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:57:08 | * | arnetheduck joined #nim |
23:57:20 | zachcarter | I think I figured out what was causing all my cross compilation issues |