00:02:08 | * | yglukhov quit (Ping timeout: 240 seconds) |
00:16:55 | * | pilne quit (Ping timeout: 246 seconds) |
00:19:03 | * | pilne joined #nim |
00:27:12 | * | vlad1777d quit (Remote host closed the connection) |
00:31:28 | * | bahtiyar joined #nim |
00:39:21 | * | Matthias247 quit (Read error: Connection reset by peer) |
00:49:30 | * | yglukhov joined #nim |
00:53:34 | * | yglukhov quit (Ping timeout: 240 seconds) |
01:35:22 | Elronnd | Araq: yeah I figured out before long that it wasn't the magic unicorn I was hoping it was |
01:35:29 | Elronnd | Araq: (re: seed7) |
01:35:42 | Elronnd | but I've gone back to d for now |
01:40:08 | * | arnetheduck joined #nim |
01:41:28 | * | chemist69 quit (Ping timeout: 255 seconds) |
01:49:38 | * | gmpreussner quit (Quit: kthxbye) |
01:52:27 | * | Neomex quit (Quit: Leaving) |
01:54:10 | * | gmpreussner joined #nim |
01:55:24 | * | chemist69 joined #nim |
02:23:01 | * | ipjk quit (Quit: Leaving) |
02:36:24 | * | def-pri-pub joined #nim |
02:52:31 | * | Trioxin joined #nim |
02:56:11 | * | WhiskyRyan joined #nim |
02:57:44 | * | WhiskyRyan quit (Client Quit) |
02:58:18 | * | WhiskyRyan joined #nim |
03:01:37 | * | yglukhov joined #nim |
03:03:17 | * | bahtiyar quit (Remote host closed the connection) |
03:05:57 | * | yglukhov quit (Ping timeout: 240 seconds) |
03:09:16 | * | bahtiyar joined #nim |
03:20:22 | * | sleepyqt joined #nim |
03:30:53 | FromGitter | <zacharycarter> ¯\_(ツ)_/¯ |
03:31:02 | FromGitter | <zacharycarter> `````` |
03:31:05 | FromGitter | <zacharycarter> haha there we go |
03:38:22 | FromGitter | <zacharycarter> if braces and significant whitespace are going to turn you off from a language, I don't know what to tell you |
03:38:39 | FromGitter | <zacharycarter> but you wouldn't be the first person either so |
04:04:48 | * | WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
04:23:07 | * | WhiskyRyan joined #nim |
04:29:28 | * | onionhammer quit (Ping timeout: 240 seconds) |
04:29:57 | * | onionhammer joined #nim |
04:31:04 | * | libman quit (Quit: Connection closed for inactivity) |
04:39:28 | * | vlad1777d joined #nim |
04:41:19 | Elronnd | zacharycarter: it's not *just* that |
04:41:51 | Elronnd | but at the same time...if I'm going to be programming in it every day, the significant whitespace just gets to be an eyesore. And I'm more comfortable with d. Also it has a bigger ecosystem, bigger community |
04:41:55 | Elronnd | ¯\_(ツ)_/¯ |
04:45:26 | FromGitter | <zacharycarter> Those things don't change without people using Nim |
04:46:29 | Elronnd | significant whitespace won't change no matter what. That's been made clear |
04:46:44 | Elronnd | Maybe I'll take another look at nim if support is added |
04:46:47 | FromGitter | <zacharycarter> correct and no one can make you like that more or less |
04:47:02 | FromGitter | <zacharycarter> it's a design feature of the language for better or worse |
04:49:03 | FromGitter | <zacharycarter> there are answers to your struggles, like using a different editor, but if you're just stone cold about only using Vim or not adapting to significant whitespace I'm afraid there is little that is going to change your mind with the resources the community has |
04:49:19 | FromGitter | <zacharycarter> I don't use VS Code because I love it - I use it because it has the best support for Nim at the moment |
04:49:40 | FromGitter | <zacharycarter> It also makes adapting to significant whitespace much easier than other editors |
05:14:36 | Elronnd | I'm not willing to use vscode because 1) I can't run it in screen, 2) the vimulation probably doesn't support all the features, 3) my vim plugins probably aren't there, and 4) it uses a lot of memory (electron), and I don't have much as I have a low-end computer |
05:15:21 | Elronnd | I'm not necessarily opposed to significant whitespace, but only two spaces isn't quite enough for me |
05:24:28 | * | sleepyqt quit (Quit: WeeChat 1.8) |
05:37:17 | * | WhiskyRyan quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
05:43:14 | * | chemist69 quit (Ping timeout: 246 seconds) |
05:43:51 | * | chemist69 joined #nim |
05:56:32 | FromGitter | <TiberiumN> use 4 then |
05:56:38 | FromGitter | <TiberiumN> Nim isn't strict to space count |
05:59:31 | * | yglukhov joined #nim |
05:59:36 | Elronnd | nah but 2 seems to be the number people generally use |
06:01:17 | * | pilne quit (Quit: Quitting!) |
06:03:25 | * | bahtiyar quit (Ping timeout: 246 seconds) |
06:03:54 | * | yglukhov quit (Remote host closed the connection) |
06:17:13 | * | def-pri-pub quit (Quit: leaving) |
06:38:14 | def- | As a compromise use 3 spaces |
06:39:16 | Elronnd | lmao |
06:39:29 | Elronnd | I think I read that the compiler chokes on anything but 1, 2, 4, and 8 |
06:40:50 | * | vivus quit (Quit: Leaving) |
07:37:53 | * | SusWombat quit (Remote host closed the connection) |
07:47:51 | * | rokups joined #nim |
08:01:32 | * | Arrrr joined #nim |
08:01:32 | * | Arrrr quit (Changing host) |
08:01:32 | * | Arrrr joined #nim |
08:05:00 | * | gokr joined #nim |
08:36:02 | * | SusWombat joined #nim |
08:37:07 | * | SusWombat quit (Remote host closed the connection) |
08:38:55 | * | SusWombat joined #nim |
08:39:34 | * | couven92 joined #nim |
08:46:53 | * | SusWombat_ joined #nim |
08:48:52 | * | SusWombat quit (Ping timeout: 260 seconds) |
08:49:18 | * | skrylar joined #nim |
08:49:24 | * | skrylar makes a tactical re-appearance \o/ |
08:49:35 | * | SusWombat_ quit (Remote host closed the connection) |
08:49:59 | * | SusWombat_ joined #nim |
09:10:15 | * | Matthias247 joined #nim |
09:14:06 | * | stefan1 joined #nim |
09:16:39 | stefan1 | Elronnd, you can use tabs for indentation in Nim by using Nim's text substitution. see |
09:16:43 | stefan1 | https://github.com/nim-lang/Nim/wiki/Unofficial-FAQ |
09:17:22 | stefan1 | However, if you insist on using tabs in your code, putting this at the top of your code will change |
09:17:36 | stefan1 | the tabs into spaces when compiling #? replace(sub = "\t", by = " ") |
09:17:56 | * | stefan1 quit (Client Quit) |
09:51:28 | skrylar | i begrugingly set up space indentation but, eeeh. |
09:51:51 | skrylar | honestly i would rather see tab indents and also the ascii horizontal spacer |
09:52:44 | skrylar | http://nickgravgaard.com/elastic-tabstops/ |
09:58:27 | * | Arrrr quit (Ping timeout: 240 seconds) |
10:04:33 | * | nsf joined #nim |
10:05:46 | Calinou | skrylar: language-level standards are a very good thing to have, really |
10:06:10 | Calinou | look at languages which don't have such things like C++, it's a mess |
10:10:49 | skrylar | that's not why C++ is amess though |
10:11:09 | skrylar | being designed by a committee of morons is why its a mess |
10:11:45 | * | stefan1 joined #nim |
10:12:33 | stefan1 | There are indeed two good reasons to not allow tabs in Nim: |
10:12:46 | skrylar | "oh we STILL don't have modules. i mean everyone and their dog's toy language figured this out, but we're going to push it another couple years every year, and by the way we added a butchered version of what compiler macros do, because you can't have compiler macros since we all failed computer science; so you get an overcomplicated templating system instead! but hey, now on top of our LAST heap of garbage, we tried to put a nicer heap of garbage on it, |
10:12:46 | skrylar | but it doesn't matter because we still have to support the broken junk we approved last cycle" |
10:12:57 | stefan1 | First is github, which uses 8 chars for a tab. |
10:14:10 | stefan1 | And second: Proc with many arguments, aligned under each other. That is not axactly possible with tabs > 1. |
10:15:05 | stefan1 | proc manyArgs(a: int; |
10:15:10 | skrylar | a programming language's job is to help me do what i tell it to do, not tell me what to do |
10:15:24 | stefan1 | b: float; |
10:16:40 | * | nightmared quit (Ping timeout: 258 seconds) |
10:17:19 | * | nightmared joined #nim |
10:17:28 | skrylar | i don't have anything else to say about space/tabs since i posted the elastic link. just that trying to regulate behavior through technical means is often a sign of Wrong Think |
10:17:49 | stefan1 | But yes, I regret that tabs are not allowed. |
10:18:03 | skrylar | Although if you do what Go does and provide a "this is what we use, this is our standard, here is gofmt to auto-fix your stuff to what we like" |
10:18:19 | skrylar | that's possibly Good Think, because the compiler doesn't care (although hey, gofmt makes a neat filter) |
10:18:24 | stefan1 | I generally use a proportional font, and there often two spaces are tiny. |
10:18:57 | * | vlad1777d quit (Ping timeout: 240 seconds) |
10:20:10 | stefan1 | Araq is right of course, mixing spaces and tabs at the beginning of lines gives trouble. |
10:20:30 | skrylar | heh |
10:20:44 | stefan1 | But as long as only tabs are used at beginning of lines, there is no real problem. |
10:20:59 | skrylar | i have a personal parable from using a LOT of languages and being very adhd about it: if the reason something is not allowed is discipline, the reason is poor |
10:21:15 | skrylar | the reason for that is because that's the excuse used to say not allow macros in most places |
10:21:48 | skrylar | "well having 100% hygiene is difficult, so you don't get to have nice things at all." "but i only have to be vigilant *once*, and this whole problem is reduced to 10 lines" "too bad, use boilerplate instead." |
10:21:53 | skrylar | but that's enough of that rant |
10:23:00 | stefan1 | Bye. (stefan, also known as salewski.) |
10:23:03 | * | stefan1 quit (Quit: WeeChat 1.4) |
10:23:17 | * | skrylar wonders if weechat has a trigger to speak when closing, hm |
10:38:52 | * | bahtiyar joined #nim |
10:39:48 | * | vlad1777d joined #nim |
11:11:46 | * | gokr quit (Ping timeout: 246 seconds) |
11:16:36 | * | chemist69 quit (Ping timeout: 255 seconds) |
11:34:58 | * | chemist69 joined #nim |
11:41:15 | * | Trustable joined #nim |
11:48:22 | * | sadun joined #nim |
12:24:41 | * | nsf quit (Quit: WeeChat 1.7.1) |
12:27:14 | * | Neomex joined #nim |
12:46:27 | * | couven92 quit (Ping timeout: 240 seconds) |
12:50:19 | * | couven92 joined #nim |
13:10:46 | * | Trioxin2 joined #nim |
13:11:12 | * | pilne joined #nim |
13:12:32 | * | Trioxin quit (Ping timeout: 260 seconds) |
13:17:05 | * | dddddd joined #nim |
13:18:59 | * | skrylar_ joined #nim |
13:20:29 | FromGitter | <zacharycarter> @dom96 : so I guess I'm going to use redis / mongo to store snippets |
13:20:49 | FromGitter | <zacharycarter> I was hoping to achieve a real-time architecture but I think there are some things missing from Nim's ecosystem that I'd need |
13:21:03 | skrylar_ | i would plug rethinkdb but i don't think we have an adapter |
13:21:43 | FromGitter | <dom96> Why not just reuse gist? |
13:21:54 | FromGitter | <dom96> Also, what's a real-time architecture? |
13:22:04 | skrylar_ | event pub/sub probably |
13:22:08 | FromGitter | <zacharycarter> yup |
13:22:31 | FromGitter | <zacharycarter> I could re-use gist but I'm worried about scalability / abusing gist |
13:22:49 | skrylar | well first off what is it you are trying to implement |
13:23:07 | FromGitter | <zacharycarter> so we have https://play.nim-lang.org/ |
13:23:15 | FromGitter | <zacharycarter> we want to add the ability to share snippets |
13:23:17 | FromGitter | <dom96> You don't even need to store snippets, you could just let people pass the code in the URL. |
13:23:35 | FromGitter | <dom96> Rust's playground allows this v |
13:24:02 | FromGitter | <zacharycarter> I can add that feature very quickly @dom96 |
13:24:03 | FromGitter | <dom96> That would be very simple to implement too. |
13:24:24 | FromGitter | <zacharycarter> I guess I'll just get that out the door first and then we can talk snippets |
13:24:34 | FromGitter | <zacharycarter> I was thinking it'd be very cool if you were on the site and I was |
13:24:41 | FromGitter | <zacharycarter> and I post / share a snippet |
13:24:45 | FromGitter | <zacharycarter> and it showed up in a feed on your session |
13:24:56 | FromGitter | <zacharycarter> like glot.io does |
13:27:06 | * | kunev quit (Ping timeout: 255 seconds) |
13:29:20 | * | kunev joined #nim |
13:35:50 | * | enthus1ast quit (Ping timeout: 240 seconds) |
13:44:35 | * | sadun quit (Remote host closed the connection) |
13:46:16 | FromGitter | <AjBreidenbach> Is there an alternative to reading a file at compile time other than using `const foo = readFile(bar)`? |
13:46:52 | FromGitter | <AjBreidenbach> It doesn't work for the javascript target |
14:04:38 | FromGitter | <zacharycarter> @dom96 : https://play.nim-lang.org/compile?code=echo "Hello Nim!" |
14:04:44 | FromGitter | <zacharycarter> errr |
14:05:26 | FromGitter | <zacharycarter> needs to be a post |
14:05:27 | FromGitter | <zacharycarter> but it should work |
14:06:10 | def- | AJBreidenbach: staticRead? |
14:07:56 | FromGitter | <AjBreidenbach> That's it, thanks! |
14:14:59 | skrylar_ | gorge and static read make me nervous |
14:15:40 | skrylar_ | 1) you're introduing undefined behavior in a build chain and making it less safe 2) builds are already unsafe so the downside is you were already screwed but hey you can auto insert git tags 8) |
14:22:50 | * | enthus1ast joined #nim |
14:28:11 | * | kunev quit (Ping timeout: 255 seconds) |
14:29:24 | * | kunev joined #nim |
14:36:27 | * | couven92 quit (Ping timeout: 240 seconds) |
14:36:27 | * | nsf joined #nim |
14:40:43 | * | daaf joined #nim |
14:42:44 | captainkraft | zacharycarter: the entire code of the snippet would be in the url? |
14:43:05 | FromGitter | <zacharycarter> @CaptainKraft: I think that's what @dom96 is describing |
14:43:50 | FromGitter | <zacharycarter> I'm not done yet though I need to integrate this with the frontend |
14:44:02 | FromGitter | <zacharycarter> so you can go to |
14:44:21 | FromGitter | <zacharycarter> https://play.nim-lang.org?code=echo "Hello World" |
14:44:24 | captainkraft | That could make some insane urls |
14:44:41 | FromGitter | <zacharycarter> maybe there's a better way to do this |
14:44:51 | FromGitter | <zacharycarter> let's see how rust does it |
14:45:03 | captainkraft | Is there some technical limit to the characters in a url? |
14:45:29 | FromGitter | <zacharycarter> good question |
14:46:08 | FromGitter | <zacharycarter> https://play.rust-lang.org/?code=fn%20main()%20%7B%0A%20%20%20%20println!(%22Hello%2C%20world!%22)%3B%0A%7D&version=stable&backtrace=0 |
14:46:49 | FromGitter | <dom96> Huh. The back end already supported that post. |
14:47:01 | FromGitter | <zacharycarter> it did I just made it accept a query parameter |
14:47:09 | FromGitter | <zacharycarter> or query string rather than a json body |
14:47:13 | FromGitter | <zacharycarter> I guess I need to make this a get instead |
14:47:39 | * | daaf quit (Quit: Konversation terminated!) |
14:47:53 | * | daaf joined #nim |
14:48:12 | FromGitter | <CaptainKraft> Haha, that's a short snippet and it already is crazy. I can't imagine a real snippet :-P |
14:53:02 | * | johnny_b joined #nim |
14:53:26 | johnny_b | hello |
14:56:29 | * | couven92 joined #nim |
14:57:00 | captainkraft | ftsf: you name your machines after the Norse worlds as well? :-) |
15:06:24 | * | arnetheduck quit (Ping timeout: 260 seconds) |
15:16:41 | * | Matthias247 quit (Read error: Connection reset by peer) |
15:25:27 | * | Neomex quit (Quit: Leaving) |
15:29:37 | * | gangstacat quit (Ping timeout: 260 seconds) |
15:34:43 | * | ofelas joined #nim |
15:34:56 | * | gokr joined #nim |
15:52:35 | * | gokr quit (Ping timeout: 246 seconds) |
15:57:49 | * | gangstacat joined #nim |
15:58:30 | * | skrylar_ quit (Quit: Textual IRC Client: www.textualapp.com) |
16:13:16 | * | evizaer joined #nim |
16:14:21 | * | Vladar joined #nim |
16:14:38 | evizaer | Why is the "comparable" concept in the manual defined with `concept x, y` instead of just `concept x`? I played with it a little and didn't see a difference in behavior. |
16:14:59 | evizaer | (the body of the concept being simply `(x < x) is bool`) |
16:15:40 | evizaer | I was guessing that you could maybe compare an int and a float or something like that using the `x, y` decl but that would be impossible using `x` since `x` implies that both types are the same... |
16:16:21 | evizaer | oh. duh. the reason why my test of that didn't work is because I need to define int < float. |
16:16:53 | evizaer | stupid habituated assumption of coercion. |
16:17:52 | FromGitter | <zacharycarter> @dom96 https://play.nim-lang.org/?code=echo%20%22Hello%20Nim!%22 |
16:18:26 | evizaer | Oh. That doesn't actually fix it. |
16:19:07 | evizaer | The semnatics of concept syntax is the weirdest thing in nim, but I also find it amazingly powerful. If only I could develop a good mental model for it |
16:24:17 | * | daaf quit (Ping timeout: 255 seconds) |
16:37:10 | Araq | is bluenote here? |
16:37:42 | FromGitter | <dom96> I don't think you should make the back end support a get. |
16:37:54 | FromGitter | <dom96> @zacharycarter ^ |
16:42:02 | * | murych joined #nim |
16:43:09 | demi- | dom96: i tried out building my webserver using jester@head like you suggested and i'm still seeing the same behavior of it causing everything to hang up and time out |
16:45:08 | FromGitter | <dom96> No. Jester devel, not head. |
16:45:33 | demi- | oh, one sec let me try that then |
16:47:20 | FromGitter | <dom96> @zacharycarter regarding the front end though: nice, it seems to be working well. |
16:49:12 | * | bahtiyar quit (Ping timeout: 258 seconds) |
16:49:27 | demi- | dom96: ok, tried that and it seems that the server didn't die but the request still times out |
16:51:16 | FromGitter | <dom96> Ok. That's something. I guess I'll need to test it with a large file. It's 550 mb right? |
16:51:24 | demi- | yup |
16:51:43 | demi- | it seems to time out the request regardless if i make a GET or a HEAD request |
16:52:02 | demi- | if that helps, i can definitely open an issue this afternoon with all the details |
16:55:27 | * | Ven joined #nim |
16:56:09 | * | Ven is now known as Guest85118 |
16:59:28 | * | gokr joined #nim |
17:02:02 | * | Neomex joined #nim |
17:04:04 | FromGitter | <zacharycarter> @dom96 yeah I just wasn't thinking correctly earlier |
17:12:28 | FromGitter | <dom96> Demi-: please do |
17:12:30 | demi- | dom96: https://github.com/dom96/jester/issues/115 |
17:13:06 | demi- | heh, just finished writing it up |
17:25:02 | * | chemist69 quit (Ping timeout: 255 seconds) |
17:27:28 | * | chemist69 joined #nim |
17:37:58 | * | Guest85118 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:40:43 | * | Ven joined #nim |
17:41:08 | * | Ven is now known as Guest66547 |
17:47:39 | Elronnd | skrylar: I feel like the problem with c++ is it had a bad beginning that it never recovered from |
17:48:13 | Elronnd | skrylar: (re: go) the difference is, I actually *like* the prescribed style guide ;) |
17:54:55 | demi- | C++ is bad, and i don't know why people insist on keeping it alive |
17:55:16 | Elronnd | because change is hard |
17:55:46 | Elronnd | for many people, they don't consider a change from c++ to something better, because just the act of changing takes too much effort |
17:56:05 | * | Guest66547 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:56:16 | skrylar | its more insidious than that |
17:56:50 | skrylar | they are forced to learn it because its already in use and the horrid complexity invokes the ikea effect |
17:57:04 | Elronnd | right, that too |
17:57:24 | Elronnd | although c# is starting to take over one of the main places c++ is currently used (gamedev) |
17:57:30 | skrylar | meh |
17:57:41 | skrylar | i wrote a baby AI framework in Mono/C#. |
17:57:51 | skrylar | It's okay but nim is still less aggravating |
17:57:57 | Elronnd | lol |
17:58:10 | Elronnd | I'm not promoting c#, but it's infinitely better than c++ |
17:58:26 | Elronnd | (of course, it has a huge company and a medium company backing it) |
17:58:31 | skrylar | also what are these lies. "this will continue to work even if the servers are down" -> goes to a manual activation screen |
18:17:20 | * | Ven_ joined #nim |
18:34:00 | * | yglukhov joined #nim |
18:39:09 | * | daaf joined #nim |
18:40:10 | * | daaf quit (Remote host closed the connection) |
18:41:14 | * | daaf joined #nim |
18:57:15 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:58:51 | * | murych_ joined #nim |
19:01:35 | * | murych quit (Ping timeout: 240 seconds) |
19:14:59 | * | yglukhov quit (Remote host closed the connection) |
19:27:07 | * | nsf quit (Quit: WeeChat 1.7.1) |
19:30:17 | * | koppeh joined #nim |
19:30:30 | * | chemist69 quit (Ping timeout: 240 seconds) |
19:32:34 | koppeh | Hello o/ |
19:33:32 | * | chemist69 joined #nim |
19:34:00 | koppeh | I was wondering if there's a way to access the version field of the .nimble file. Does it create a constant I can use? |
19:34:47 | demi- | you mean so that you can embed the version in the code and not update it in two places kind of thing/ |
19:35:31 | * | yglukhov joined #nim |
19:36:43 | koppeh | Yes. |
19:37:41 | demi- | not that i know of, have you checked the nimble manual? |
19:38:35 | koppeh | Yes, it does not seem so. I suppose there might be a way to set a compile constant by creating a build task manually, perhaps. |
19:40:04 | demi- | yeah that could be an option, or having a task generate a version file for you |
19:40:20 | koppeh | I'm assuming here by nimble manual you're talking about the README on the nimple repo. |
19:40:34 | koppeh | nimble* |
19:40:47 | Araq | koppeh: have a common include file for this |
19:40:56 | koppeh | (That's like writing nipple instead of nibble, isn't it?) |
19:41:59 | Araq | or 'include' the .nimble file directly into your source though that requires some 'when' in order to not cause compilation errors |
19:42:08 | koppeh | Ahh.. that could work. Include the the nim file in both the .nimble and the main .nim? |
19:42:20 | Araq | yes |
19:42:23 | Araq | exactly |
19:42:36 | Araq | but you can also just include the .nimble file into your nim sources |
19:42:45 | Araq | and use within the .nimble file: |
19:42:50 | Araq | when defined(nimble): ... |
19:43:02 | Araq | for the nimble specific stuff. could get ulgy though |
19:43:29 | koppeh | I'm used to having a build.properties file so I might do something similar here. |
19:45:08 | koppeh | I'd have to define the values before including the file though..? |
19:45:38 | koppeh | let version: string |
19:45:43 | koppeh | include "../build.properties" |
19:45:46 | koppeh | ? |
19:47:23 | * | yglukhov quit (Remote host closed the connection) |
19:48:12 | Araq | depends on how you do it |
19:48:32 | Araq | # config.nim |
19:48:39 | Araq | const version = "0.3" |
19:48:46 | Araq | # foo.nimble |
19:48:50 | Araq | import config |
19:48:57 | Araq | version = config.version |
19:49:53 | * | daaf quit (Ping timeout: 246 seconds) |
19:50:33 | koppeh | I guess it would be prettier to just have name = value, and it would mean compile errors if anything was missing or shouldn't be there. |
19:52:18 | Araq | pretty in the small, ugly in the large. |
19:53:35 | Araq | nimble is pretty in the large, it uses Nim's syntax, not yet another microlanguage to learn |
19:53:45 | dom96 | I do it in Nimble's nimble file :) https://github.com/nim-lang/nimble/blob/master/nimble.nimble |
19:54:13 | dom96 | It's kinda ugly at the minute |
19:56:45 | Araq | dom96: so you do it like I suggested :-) |
19:57:00 | Araq | *as I |
19:58:34 | * | Neomex quit (Quit: Leaving) |
19:59:16 | koppeh | I guess you can't define in one file and initialize in another using include? |
20:03:30 | Araq | you can, use 'var' instead of 'let' |
20:03:51 | * | yglukhov joined #nim |
20:04:19 | koppeh | .nimble: include "build.properties" |
20:04:32 | koppeh | build.properties: version = "0.2" |
20:04:36 | koppeh | That's what I meant. |
20:05:14 | koppeh | And in my main .nim file I would've done: const version: string; include "../build.properties" |
20:05:15 | * | rokups quit (Quit: Connection closed for inactivity) |
20:07:34 | koppeh | And I suppose since name is optional in .nimble, it's possible to access it..? |
20:08:49 | koppeh | For example to have a task to run the generated binary file. |
20:08:55 | Araq | works if you use 'var' in your main .nim instead of 'const' |
20:11:07 | koppeh | I tried both let and const, doesn't pre-defining work in this situation or not at all? |
20:11:19 | koppeh | Sorry, I should just try to confirm this. |
20:12:32 | koppeh | Yeah, I guess I might've mistook this feature. I guess it works only for procs? |
20:17:29 | dom96 | huh? you can use 'const'. Did you take a look at my example? Here is the common.nim file it includes as well: https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/common.nim#L64 |
20:18:09 | Araq | you tried let and const but I told you to use 'var' |
20:18:22 | koppeh | I'm trying to define in one file and set it in another, included file. |
20:18:40 | dom96 | I see. Yeah, you need 'var' for that. |
20:18:47 | koppeh | So the syntax in my "build.configuration" file would just be: version = "0.1" |
20:18:54 | * | PMunch joined #nim |
20:19:19 | koppeh | Or, rather, *was* trying. I somply did a config.nim with a const. |
20:19:26 | koppeh | Like you guys recommended. Thanks ^^ |
20:19:27 | * | yglukhov quit (Remote host closed the connection) |
20:19:32 | koppeh | simply* |
20:23:40 | * | ofelas quit (Quit: shutdown -h now) |
20:31:43 | * | Trustable quit (Remote host closed the connection) |
20:32:27 | FromGitter | <abijahm> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5946e35b02c480e672587e50] |
20:34:18 | koppeh | New here, but I might be able to help. |
20:34:41 | koppeh | That method returns a string, and you appear to use it without making use of the return value. |
20:35:29 | FromGitter | <abijahm> @FromIRC |
20:35:51 | koppeh | So for example default(content) instead of foo = default(content) |
20:36:12 | koppeh | Can you show the part of the code that calls this proc? |
20:36:38 | FromGitter | <abijahm> sorry for that , but i thought you could use result as a replacement for return |
20:37:12 | koppeh | You can. |
20:37:27 | FromGitter | <abijahm> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5946e487caf4d68d6f48d7ce] |
20:38:13 | FromGitter | <abijahm> this is the example |
20:38:48 | koppeh | Ah, I guess I read the error message incorrectly. |
20:39:53 | koppeh | That is indeed odd. From what I can see that should work..? |
20:40:23 | koppeh | Perhaps the indentation / whitespace is not allowed like this. |
20:40:38 | koppeh | Try placing the html: on the same line as result = |
20:42:52 | dom96 | Pretty sure you need to wrap the "html: ..." in parethesis. |
20:42:55 | dom96 | *parenthesis |
20:47:02 | * | yglukhov joined #nim |
20:48:28 | * | Vladar quit (Quit: Leaving) |
20:50:59 | Araq | a: |
20:51:02 | Araq | b: |
20:51:08 | Araq | c |
20:51:13 | Araq | d: |
20:51:16 | Araq | e |
20:51:31 | Araq | doesn't pass (b...) and (d...) arguments to 'a' |
20:52:00 | Araq | instead it passes a stmt list ((b...), (d...)) to 'a' |
20:52:21 | Araq | so ... a version of htmlgen that doesn't suck could handle this |
20:52:52 | FromGitter | <abijahm> ok this works |
20:52:57 | Araq | but not the current htmlgen which was written before Nim stabilized |
20:53:12 | FromGitter | <abijahm> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5946e83702c480e672588d60] |
20:54:00 | Araq | yeah but a better htmlgen would support your first attempt and would be like karax does it |
20:56:27 | PMunch | Yeah, why does Karax have it's own htmlgen? |
20:58:45 | Araq | because htmlgen produces strings, karax produces a virtual DOM |
20:58:52 | Araq | and because htmlgen is archaic |
21:02:20 | PMunch | Yeah, that's my point. Shouldn't htmlgen be fixed rather than making something new? It wouldn't be a bad idea for htmlgen to return a DOM and implement a $ proc for it |
21:03:13 | Araq | we can't fix it, it's in the stdlib :P |
21:03:24 | Araq | it needs a decent deprecation cycle etc etc |
21:04:03 | * | nsf joined #nim |
21:04:32 | PMunch | Hmm, it should be done thought.. Better to do it now as Nim is still not on 1.0 rather than having to patch it down the road and have everything break.. |
21:05:06 | dom96 | Pretty sure Araq isn't serious. |
21:05:11 | dom96 | We can fix it and we will. |
21:05:17 | PMunch | Haha, okay :P |
21:05:19 | PMunch | You never know |
21:05:51 | dom96 | The ':P' is a tell-tale sign heh |
21:06:11 | PMunch | Good point |
21:08:19 | dom96 | For people waiting for the printed copy of Nim in Action. I just got the "print edition" to review. |
21:08:33 | dom96 | But it's looking like it'll slide into July D: |
21:12:11 | PMunch | Oh yeah, just thought about that today :) |
21:12:20 | PMunch | Too bad I never got my notes of the Kindle.. |
21:13:20 | dom96 | oh right, but hopefully others have gave feedback about the same things and they're fixed now :) |
21:13:26 | dom96 | *given |
21:13:30 | PMunch | Hopefully :) |
21:24:52 | * | smt quit (Ping timeout: 260 seconds) |
21:26:48 | * | skrylar quit (Ping timeout: 240 seconds) |
21:33:21 | koppeh | A friend of mine and me are working on a project which uses SDL2 and they get a strange error when calling init. |
21:34:28 | koppeh | Error: unhandled exception: sdl2.init19) error: XAudio2: SDL was built without20) XAudio2 support (old DirectX SDK).21) [Exception] |
21:35:11 | koppeh | Apparently she's just throwing a try/catch around the thing and ignores the error, but I don't think that's right. |
21:36:09 | koppeh | Can't find where the error actually comes from though. SDL shouldn't throw anything, and the wrapper doesn't appear to throw any exceptions either. |
21:36:33 | koppeh | (Ignore the 19), 20), and 21), I did a messy job at copying this from my IRC client.) |
21:37:09 | PMunch | https://www.libsdl.org/tmp/SDL/src/audio/xaudio2/SDL_xaudio2.c |
21:37:15 | PMunch | Error appears to come from there |
21:37:30 | * | chemist69 quit (Ping timeout: 240 seconds) |
21:37:31 | PMunch | #ifndef SDL_XAUDIO2_HAS_SDK |
21:37:31 | PMunch | SDL_SetError("XAudio2: SDL was built without XAudio2 support (old DirectX SDK)."); |
21:37:31 | PMunch | return 0; /* no XAudio2 support, ever. Update your SDK! */ |
21:38:05 | PMunch | SDL sets it as an error, and the Nim wrapper turns those into exceptions I would guess |
21:38:58 | koppeh | But where does it get turned into an exception? |
21:39:11 | PMunch | I'd guess somewhere in the SDL wrapper for Nim |
21:39:38 | * | Matthias247 joined #nim |
21:40:17 | * | chemist69 joined #nim |
21:40:21 | koppeh | There's no mention of it throwing anywhere in the source. |
21:41:51 | PMunch | Hmm |
21:41:55 | PMunch | Code snippet? |
21:42:01 | koppeh | From what I understand, init returns just a success code and geterror needs to be used separately. |
21:42:14 | PMunch | Yeah, that's what seemed weird to me |
21:42:23 | koppeh | sdl.init(sdl.INIT_VIDEO or sdl.INIT_AUDIO or sdl.INIT_EVENTS) |
21:42:28 | koppeh | Just this, I guess. |
21:42:55 | koppeh | She had to wrap this in a try statement to not have it crash on her, though the rest appeared to work. |
21:43:14 | koppeh | ... I wonder if it's the custom SDL library she compiled or got from another project. |
21:43:30 | koppeh | Maybe in debug mode it simply throws those errors on its own? |
21:43:43 | PMunch | But that looks like a Nim error message.. |
21:44:48 | koppeh | She called echo getCurrentExceptionMsg() |
21:44:53 | koppeh | In the except block. |
21:45:51 | koppeh | I can't wrap my head around this. (Also she's a bit difficult to talk with. That's making hunting this error a lot more difficult.) |
21:46:00 | PMunch | I have something like this in most of my SDL2 code: http://ix.io/xEl |
21:46:23 | PMunch | And then call eg. sdlFailIf(not sdl2.init(INIT_VIDEO or INIT_TIMER or INIT_EVENTS or INIT_JOYSTICK or INIT_HAPTIC)): |
21:46:23 | PMunch | "SDL2 initialization failed" |
21:46:37 | koppeh | Okay, yeah. It totally was her fuckup. |
21:46:42 | PMunch | Haha :P |
21:47:03 | * | vlad1777d quit (Ping timeout: 255 seconds) |
21:47:05 | koppeh | The return value doesn coerce to true so it ran the statement which was meant to be the error statement. |
21:47:35 | koppeh | And as error it printed the warning message I showed, wrapped into an exception. |
21:47:43 | PMunch | Aah :P |
21:48:33 | koppeh | Thanks for the help o/ |
21:48:53 | PMunch | No problem :) And tell her that she's welcome here if she needs help herself :P |
21:49:08 | PMunch | It's always a bit confusing to talk through an intermediary |
21:49:43 | * | vivus joined #nim |
21:50:43 | koppeh | Only she had the error due to the self-compiled SDL lib (for .. debugging, apparently?). |
21:50:57 | koppeh | But I will let her know :) |
21:57:10 | PMunch | What are you doing with SDL by the way? |
21:57:35 | PMunch | It's interesting to see so much interest from the game creation community for Nim :) |
21:58:42 | koppeh | We're trying to do a project together for the first time. I've been interested in Nim for a while. Taking it slow and going for a procedurally generated terrain + city "demo", maybe, eventually. |
21:59:05 | dom96 | Sounds like a lot of fun, and Nim is indeed perfect for games :) |
21:59:14 | koppeh | And if we like it.. I guess her goal is to turn it into a city manager type of game..? Not quite my thing. But I'll be able to learn from in nonetheless! |
21:59:40 | PMunch | Cool |
21:59:42 | koppeh | Mhh.. I guess maybe kinda like mini metro in some ways? |
22:00:12 | PMunch | Ooh, Mini metro is nice. Spent quite some time playing that :P |
22:00:41 | PMunch | Are you guys using Frag? |
22:01:48 | dom96 | oooh, also a big fan of Mini Metro. |
22:02:13 | koppeh | It's 3D, didn't seem like 3D support was quite fleshed out yet? |
22:02:23 | koppeh | We're going raw OpenGL, I guess? |
22:02:34 | PMunch | Ah right, no I believe 3D isn't in Frag just yet |
22:02:45 | koppeh | Looked around a bit, Horde3D was an option but we didn't get it set up. |
22:03:51 | PMunch | If you end up writing some good boilerplate/generic code you could PR it to https://github.com/PMunch/SDLGamelib/tree/master/gamelib |
22:03:57 | * | gokr quit (Ping timeout: 260 seconds) |
22:05:33 | koppeh | Neat, I'll link that to my friend. |
22:24:48 | * | murych_ quit (Read error: Connection reset by peer) |
22:29:02 | PMunch | It's meant to be a collection of light, stand-alone things that most games need. There are some SDL specific stuff in there, but I'm thinking of introducing a withoutSDL flag to the compilation to remove them if you don't need them. There's also some dependency between the TextureAtlas and Texture/Animation/NinePatch stuff which might not be the prettiest. |
22:49:31 | * | PMunch quit (Quit: leaving) |
22:51:22 | * | nsf quit (Quit: WeeChat 1.7.1) |
22:59:34 | * | yglukhov quit (Remote host closed the connection) |
23:04:28 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:31:45 | FromGitter | <zacharycarter> @koppen I'm working on a Horde3d port to Nim |
23:31:54 | FromGitter | <zacharycarter> @koppeh sory |
23:42:30 | * | chemist69 quit (Ping timeout: 240 seconds) |