<<18-06-2017>>

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:22ElronndAraq: yeah I figured out before long that it wasn't the magic unicorn I was hoping it was
01:35:29ElronndAraq: (re: seed7)
01:35:42Elronndbut 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:53FromGitter<zacharycarter> ¯\_(ツ)_/¯
03:31:02FromGitter<zacharycarter> ``````
03:31:05FromGitter<zacharycarter> haha there we go
03:38:22FromGitter<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:39FromGitter<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:19Elronndzacharycarter: it's not *just* that
04:41:51Elronndbut 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:55Elronnd¯\_(ツ)_/¯
04:45:26FromGitter<zacharycarter> Those things don't change without people using Nim
04:46:29Elronndsignificant whitespace won't change no matter what. That's been made clear
04:46:44ElronndMaybe I'll take another look at nim if support is added
04:46:47FromGitter<zacharycarter> correct and no one can make you like that more or less
04:47:02FromGitter<zacharycarter> it's a design feature of the language for better or worse
04:49:03FromGitter<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:19FromGitter<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:40FromGitter<zacharycarter> It also makes adapting to significant whitespace much easier than other editors
05:14:36ElronndI'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:21ElronndI'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:32FromGitter<TiberiumN> use 4 then
05:56:38FromGitter<TiberiumN> Nim isn't strict to space count
05:59:31*yglukhov joined #nim
05:59:36Elronndnah 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:14def-As a compromise use 3 spaces
06:39:16Elronndlmao
06:39:29ElronndI 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:39stefan1Elronnd, you can use tabs for indentation in Nim by using Nim's text substitution. see
09:16:43stefan1https://github.com/nim-lang/Nim/wiki/Unofficial-FAQ
09:17:22stefan1However, if you insist on using tabs in your code, putting this at the top of your code will change
09:17:36stefan1the tabs into spaces when compiling #? replace(sub = "\t", by = " ")
09:17:56*stefan1 quit (Client Quit)
09:51:28skrylari begrugingly set up space indentation but, eeeh.
09:51:51skrylarhonestly i would rather see tab indents and also the ascii horizontal spacer
09:52:44skrylarhttp://nickgravgaard.com/elastic-tabstops/
09:58:27*Arrrr quit (Ping timeout: 240 seconds)
10:04:33*nsf joined #nim
10:05:46Calinouskrylar: language-level standards are a very good thing to have, really
10:06:10Calinoulook at languages which don't have such things like C++, it's a mess
10:10:49skrylarthat's not why C++ is amess though
10:11:09skrylarbeing designed by a committee of morons is why its a mess
10:11:45*stefan1 joined #nim
10:12:33stefan1There are indeed two good reasons to not allow tabs in Nim:
10:12:46skrylar"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:46skrylarbut it doesn't matter because we still have to support the broken junk we approved last cycle"
10:12:57stefan1First is github, which uses 8 chars for a tab.
10:14:10stefan1And second: Proc with many arguments, aligned under each other. That is not axactly possible with tabs > 1.
10:15:05stefan1proc manyArgs(a: int;
10:15:10skrylara programming language's job is to help me do what i tell it to do, not tell me what to do
10:15:24stefan1 b: float;
10:16:40*nightmared quit (Ping timeout: 258 seconds)
10:17:19*nightmared joined #nim
10:17:28skrylari 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:49stefan1But yes, I regret that tabs are not allowed.
10:18:03skrylarAlthough 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:19skrylarthat's possibly Good Think, because the compiler doesn't care (although hey, gofmt makes a neat filter)
10:18:24stefan1I generally use a proportional font, and there often two spaces are tiny.
10:18:57*vlad1777d quit (Ping timeout: 240 seconds)
10:20:10stefan1Araq is right of course, mixing spaces and tabs at the beginning of lines gives trouble.
10:20:30skrylarheh
10:20:44stefan1But as long as only tabs are used at beginning of lines, there is no real problem.
10:20:59skrylari 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:15skrylarthe reason for that is because that's the excuse used to say not allow macros in most places
10:21:48skrylar"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:53skrylarbut that's enough of that rant
10:23:00stefan1Bye. (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:29FromGitter<zacharycarter> @dom96 : so I guess I'm going to use redis / mongo to store snippets
13:20:49FromGitter<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:03skrylar_i would plug rethinkdb but i don't think we have an adapter
13:21:43FromGitter<dom96> Why not just reuse gist?
13:21:54FromGitter<dom96> Also, what's a real-time architecture?
13:22:04skrylar_event pub/sub probably
13:22:08FromGitter<zacharycarter> yup
13:22:31FromGitter<zacharycarter> I could re-use gist but I'm worried about scalability / abusing gist
13:22:49skrylarwell first off what is it you are trying to implement
13:23:07FromGitter<zacharycarter> so we have https://play.nim-lang.org/
13:23:15FromGitter<zacharycarter> we want to add the ability to share snippets
13:23:17FromGitter<dom96> You don't even need to store snippets, you could just let people pass the code in the URL.
13:23:35FromGitter<dom96> Rust's playground allows this v
13:24:02FromGitter<zacharycarter> I can add that feature very quickly @dom96
13:24:03FromGitter<dom96> That would be very simple to implement too.
13:24:24FromGitter<zacharycarter> I guess I'll just get that out the door first and then we can talk snippets
13:24:34FromGitter<zacharycarter> I was thinking it'd be very cool if you were on the site and I was
13:24:41FromGitter<zacharycarter> and I post / share a snippet
13:24:45FromGitter<zacharycarter> and it showed up in a feed on your session
13:24:56FromGitter<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:16FromGitter<AjBreidenbach> Is there an alternative to reading a file at compile time other than using `const foo = readFile(bar)`?
13:46:52FromGitter<AjBreidenbach> It doesn't work for the javascript target
14:04:38FromGitter<zacharycarter> @dom96 : https://play.nim-lang.org/compile?code=echo "Hello Nim!"
14:04:44FromGitter<zacharycarter> errr
14:05:26FromGitter<zacharycarter> needs to be a post
14:05:27FromGitter<zacharycarter> but it should work
14:06:10def-AJBreidenbach: staticRead?
14:07:56FromGitter<AjBreidenbach> That's it, thanks!
14:14:59skrylar_gorge and static read make me nervous
14:15:40skrylar_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:44captainkraftzacharycarter: the entire code of the snippet would be in the url?
14:43:05FromGitter<zacharycarter> @CaptainKraft: I think that's what @dom96 is describing
14:43:50FromGitter<zacharycarter> I'm not done yet though I need to integrate this with the frontend
14:44:02FromGitter<zacharycarter> so you can go to
14:44:21FromGitter<zacharycarter> https://play.nim-lang.org?code=echo "Hello World"
14:44:24captainkraftThat could make some insane urls
14:44:41FromGitter<zacharycarter> maybe there's a better way to do this
14:44:51FromGitter<zacharycarter> let's see how rust does it
14:45:03captainkraftIs there some technical limit to the characters in a url?
14:45:29FromGitter<zacharycarter> good question
14:46:08FromGitter<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:49FromGitter<dom96> Huh. The back end already supported that post.
14:47:01FromGitter<zacharycarter> it did I just made it accept a query parameter
14:47:09FromGitter<zacharycarter> or query string rather than a json body
14:47:13FromGitter<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:12FromGitter<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:26johnny_bhello
14:56:29*couven92 joined #nim
14:57:00captainkraftftsf: 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:38evizaerWhy 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:59evizaer(the body of the concept being simply `(x < x) is bool`)
16:15:40evizaerI 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:21evizaeroh. duh. the reason why my test of that didn't work is because I need to define int < float.
16:16:53evizaerstupid habituated assumption of coercion.
16:17:52FromGitter<zacharycarter> @dom96 https://play.nim-lang.org/?code=echo%20%22Hello%20Nim!%22
16:18:26evizaerOh. That doesn't actually fix it.
16:19:07evizaerThe 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:10Araqis bluenote here?
16:37:42FromGitter<dom96> I don't think you should make the back end support a get.
16:37:54FromGitter<dom96> @zacharycarter ^
16:42:02*murych joined #nim
16:43:09demi-dom96: i tried out building my webserver using [email protected] like you suggested and i'm still seeing the same behavior of it causing everything to hang up and time out
16:45:08FromGitter<dom96> No. Jester devel, not head.
16:45:33demi-oh, one sec let me try that then
16:47:20FromGitter<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:27demi-dom96: ok, tried that and it seems that the server didn't die but the request still times out
16:51:16FromGitter<dom96> Ok. That's something. I guess I'll need to test it with a large file. It's 550 mb right?
16:51:24demi-yup
16:51:43demi-it seems to time out the request regardless if i make a GET or a HEAD request
16:52:02demi-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:04FromGitter<zacharycarter> @dom96 yeah I just wasn't thinking correctly earlier
17:12:28FromGitter<dom96> Demi-: please do
17:12:30demi-dom96: https://github.com/dom96/jester/issues/115
17:13:06demi-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:39Elronndskrylar: I feel like the problem with c++ is it had a bad beginning that it never recovered from
17:48:13Elronndskrylar: (re: go) the difference is, I actually *like* the prescribed style guide ;)
17:54:55demi-C++ is bad, and i don't know why people insist on keeping it alive
17:55:16Elronndbecause change is hard
17:55:46Elronndfor 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:16skrylarits more insidious than that
17:56:50skrylarthey are forced to learn it because its already in use and the horrid complexity invokes the ikea effect
17:57:04Elronndright, that too
17:57:24Elronndalthough c# is starting to take over one of the main places c++ is currently used (gamedev)
17:57:30skrylarmeh
17:57:41skrylari wrote a baby AI framework in Mono/C#.
17:57:51skrylarIt's okay but nim is still less aggravating
17:57:57Elronndlol
17:58:10ElronndI'm not promoting c#, but it's infinitely better than c++
17:58:26Elronnd(of course, it has a huge company and a medium company backing it)
17:58:31skrylaralso 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:34koppehHello o/
19:33:32*chemist69 joined #nim
19:34:00koppehI 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:47demi-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:43koppehYes.
19:37:41demi-not that i know of, have you checked the nimble manual?
19:38:35koppehYes, 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:04demi-yeah that could be an option, or having a task generate a version file for you
19:40:20koppehI'm assuming here by nimble manual you're talking about the README on the nimple repo.
19:40:34koppehnimble*
19:40:47Araqkoppeh: have a common include file for this
19:40:56koppeh(That's like writing nipple instead of nibble, isn't it?)
19:41:59Araqor 'include' the .nimble file directly into your source though that requires some 'when' in order to not cause compilation errors
19:42:08koppehAhh.. that could work. Include the the nim file in both the .nimble and the main .nim?
19:42:20Araqyes
19:42:23Araqexactly
19:42:36Araqbut you can also just include the .nimble file into your nim sources
19:42:45Araqand use within the .nimble file:
19:42:50Araqwhen defined(nimble): ...
19:43:02Araqfor the nimble specific stuff. could get ulgy though
19:43:29koppehI'm used to having a build.properties file so I might do something similar here.
19:45:08koppehI'd have to define the values before including the file though..?
19:45:38koppehlet version: string
19:45:43koppehinclude "../build.properties"
19:45:46koppeh?
19:47:23*yglukhov quit (Remote host closed the connection)
19:48:12Araqdepends on how you do it
19:48:32Araq# config.nim
19:48:39Araqconst version = "0.3"
19:48:46Araq# foo.nimble
19:48:50Araqimport config
19:48:57Araqversion = config.version
19:49:53*daaf quit (Ping timeout: 246 seconds)
19:50:33koppehI 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:18Araqpretty in the small, ugly in the large.
19:53:35Araqnimble is pretty in the large, it uses Nim's syntax, not yet another microlanguage to learn
19:53:45dom96I do it in Nimble's nimble file :) https://github.com/nim-lang/nimble/blob/master/nimble.nimble
19:54:13dom96It's kinda ugly at the minute
19:56:45Araqdom96: so you do it like I suggested :-)
19:57:00Araq*as I
19:58:34*Neomex quit (Quit: Leaving)
19:59:16koppehI guess you can't define in one file and initialize in another using include?
20:03:30Araqyou can, use 'var' instead of 'let'
20:03:51*yglukhov joined #nim
20:04:19koppeh.nimble: include "build.properties"
20:04:32koppehbuild.properties: version = "0.2"
20:04:36koppehThat's what I meant.
20:05:14koppehAnd 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:34koppehAnd I suppose since name is optional in .nimble, it's possible to access it..?
20:08:49koppehFor example to have a task to run the generated binary file.
20:08:55Araqworks if you use 'var' in your main .nim instead of 'const'
20:11:07koppehI tried both let and const, doesn't pre-defining work in this situation or not at all?
20:11:19koppehSorry, I should just try to confirm this.
20:12:32koppehYeah, I guess I might've mistook this feature. I guess it works only for procs?
20:17:29dom96huh? 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:09Araqyou tried let and const but I told you to use 'var'
20:18:22koppehI'm trying to define in one file and set it in another, included file.
20:18:40dom96I see. Yeah, you need 'var' for that.
20:18:47koppehSo the syntax in my "build.configuration" file would just be: version = "0.1"
20:18:54*PMunch joined #nim
20:19:19koppehOr, rather, *was* trying. I somply did a config.nim with a const.
20:19:26koppehLike you guys recommended. Thanks ^^
20:19:27*yglukhov quit (Remote host closed the connection)
20:19:32koppehsimply*
20:23:40*ofelas quit (Quit: shutdown -h now)
20:31:43*Trustable quit (Remote host closed the connection)
20:32:27FromGitter<abijahm> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5946e35b02c480e672587e50]
20:34:18koppehNew here, but I might be able to help.
20:34:41koppehThat method returns a string, and you appear to use it without making use of the return value.
20:35:29FromGitter<abijahm> @FromIRC
20:35:51koppehSo for example default(content) instead of foo = default(content)
20:36:12koppehCan you show the part of the code that calls this proc?
20:36:38FromGitter<abijahm> sorry for that , but i thought you could use result as a replacement for return
20:37:12koppehYou can.
20:37:27FromGitter<abijahm> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5946e487caf4d68d6f48d7ce]
20:38:13FromGitter<abijahm> this is the example
20:38:48koppehAh, I guess I read the error message incorrectly.
20:39:53koppehThat is indeed odd. From what I can see that should work..?
20:40:23koppehPerhaps the indentation / whitespace is not allowed like this.
20:40:38koppehTry placing the html: on the same line as result =
20:42:52dom96Pretty sure you need to wrap the "html: ..." in parethesis.
20:42:55dom96*parenthesis
20:47:02*yglukhov joined #nim
20:48:28*Vladar quit (Quit: Leaving)
20:50:59Araqa:
20:51:02Araq b:
20:51:08Araq c
20:51:13Araq d:
20:51:16Araq e
20:51:31Araqdoesn't pass (b...) and (d...) arguments to 'a'
20:52:00Araqinstead it passes a stmt list ((b...), (d...)) to 'a'
20:52:21Araqso ... a version of htmlgen that doesn't suck could handle this
20:52:52FromGitter<abijahm> ok this works
20:52:57Araqbut not the current htmlgen which was written before Nim stabilized
20:53:12FromGitter<abijahm> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5946e83702c480e672588d60]
20:54:00Araqyeah but a better htmlgen would support your first attempt and would be like karax does it
20:56:27PMunchYeah, why does Karax have it's own htmlgen?
20:58:45Araqbecause htmlgen produces strings, karax produces a virtual DOM
20:58:52Araqand because htmlgen is archaic
21:02:20PMunchYeah, 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:13Araqwe can't fix it, it's in the stdlib :P
21:03:24Araqit needs a decent deprecation cycle etc etc
21:04:03*nsf joined #nim
21:04:32PMunchHmm, 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:06dom96Pretty sure Araq isn't serious.
21:05:11dom96We can fix it and we will.
21:05:17PMunchHaha, okay :P
21:05:19PMunchYou never know
21:05:51dom96The ':P' is a tell-tale sign heh
21:06:11PMunchGood point
21:08:19dom96For people waiting for the printed copy of Nim in Action. I just got the "print edition" to review.
21:08:33dom96But it's looking like it'll slide into July D:
21:12:11PMunchOh yeah, just thought about that today :)
21:12:20PMunchToo bad I never got my notes of the Kindle..
21:13:20dom96oh right, but hopefully others have gave feedback about the same things and they're fixed now :)
21:13:26dom96*given
21:13:30PMunchHopefully :)
21:24:52*smt quit (Ping timeout: 260 seconds)
21:26:48*skrylar quit (Ping timeout: 240 seconds)
21:33:21koppehA friend of mine and me are working on a project which uses SDL2 and they get a strange error when calling init.
21:34:28koppehError: unhandled exception: sdl2.init19) error: XAudio2: SDL was built without20) XAudio2 support (old DirectX SDK).21) [Exception]
21:35:11koppehApparently she's just throwing a try/catch around the thing and ignores the error, but I don't think that's right.
21:36:09koppehCan'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:33koppeh(Ignore the 19), 20), and 21), I did a messy job at copying this from my IRC client.)
21:37:09PMunchhttps://www.libsdl.org/tmp/SDL/src/audio/xaudio2/SDL_xaudio2.c
21:37:15PMunchError appears to come from there
21:37:30*chemist69 quit (Ping timeout: 240 seconds)
21:37:31PMunch#ifndef SDL_XAUDIO2_HAS_SDK
21:37:31PMunch SDL_SetError("XAudio2: SDL was built without XAudio2 support (old DirectX SDK).");
21:37:31PMunch return 0; /* no XAudio2 support, ever. Update your SDK! */
21:38:05PMunchSDL sets it as an error, and the Nim wrapper turns those into exceptions I would guess
21:38:58koppehBut where does it get turned into an exception?
21:39:11PMunchI'd guess somewhere in the SDL wrapper for Nim
21:39:38*Matthias247 joined #nim
21:40:17*chemist69 joined #nim
21:40:21koppehThere's no mention of it throwing anywhere in the source.
21:41:51PMunchHmm
21:41:55PMunchCode snippet?
21:42:01koppehFrom what I understand, init returns just a success code and geterror needs to be used separately.
21:42:14PMunchYeah, that's what seemed weird to me
21:42:23koppehsdl.init(sdl.INIT_VIDEO or sdl.INIT_AUDIO or sdl.INIT_EVENTS)
21:42:28koppehJust this, I guess.
21:42:55koppehShe had to wrap this in a try statement to not have it crash on her, though the rest appeared to work.
21:43:14koppeh... I wonder if it's the custom SDL library she compiled or got from another project.
21:43:30koppehMaybe in debug mode it simply throws those errors on its own?
21:43:43PMunchBut that looks like a Nim error message..
21:44:48koppehShe called echo getCurrentExceptionMsg()
21:44:53koppehIn the except block.
21:45:51koppehI 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:00PMunchI have something like this in most of my SDL2 code: http://ix.io/xEl
21:46:23PMunchAnd then call eg. sdlFailIf(not sdl2.init(INIT_VIDEO or INIT_TIMER or INIT_EVENTS or INIT_JOYSTICK or INIT_HAPTIC)):
21:46:23PMunch "SDL2 initialization failed"
21:46:37koppehOkay, yeah. It totally was her fuckup.
21:46:42PMunchHaha :P
21:47:03*vlad1777d quit (Ping timeout: 255 seconds)
21:47:05koppehThe return value doesn coerce to true so it ran the statement which was meant to be the error statement.
21:47:35koppehAnd as error it printed the warning message I showed, wrapped into an exception.
21:47:43PMunchAah :P
21:48:33koppehThanks for the help o/
21:48:53PMunchNo problem :) And tell her that she's welcome here if she needs help herself :P
21:49:08PMunchIt's always a bit confusing to talk through an intermediary
21:49:43*vivus joined #nim
21:50:43koppehOnly she had the error due to the self-compiled SDL lib (for .. debugging, apparently?).
21:50:57koppehBut I will let her know :)
21:57:10PMunchWhat are you doing with SDL by the way?
21:57:35PMunchIt's interesting to see so much interest from the game creation community for Nim :)
21:58:42koppehWe'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:05dom96Sounds like a lot of fun, and Nim is indeed perfect for games :)
21:59:14koppehAnd 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:40PMunchCool
21:59:42koppehMhh.. I guess maybe kinda like mini metro in some ways?
22:00:12PMunchOoh, Mini metro is nice. Spent quite some time playing that :P
22:00:41PMunchAre you guys using Frag?
22:01:48dom96oooh, also a big fan of Mini Metro.
22:02:13koppehIt's 3D, didn't seem like 3D support was quite fleshed out yet?
22:02:23koppehWe're going raw OpenGL, I guess?
22:02:34PMunchAh right, no I believe 3D isn't in Frag just yet
22:02:45koppehLooked around a bit, Horde3D was an option but we didn't get it set up.
22:03:51PMunchIf 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:33koppehNeat, I'll link that to my friend.
22:24:48*murych_ quit (Read error: Connection reset by peer)
22:29:02PMunchIt'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:45FromGitter<zacharycarter> @koppen I'm working on a Horde3d port to Nim
23:31:54FromGitter<zacharycarter> @koppeh sory
23:42:30*chemist69 quit (Ping timeout: 240 seconds)