<< 22-04-2017 >>

00:01:15*couven92 quit (Quit: Client Disconnecting)
00:02:52*rupil quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
00:02:55*alectic joined #nim
00:08:11zachcarternevermind :/
00:08:14*devted quit (Quit: Sleeping.)
00:15:15zachcarterI figured it out!
00:15:19zachcarterit was the word far
00:15:33zachcarterwtf......
00:15:37ldleworkwhat
00:15:41zachcarterseriously
00:16:03zachcarterin a source file I had the variable name far everywhere
00:16:12zachcarterchanging it to faaar fixed my compilation issues
00:16:28ldleworkhow the fuck did you even come to think it was the issue and to change it
00:17:05zachcarterwell this was only happening when cross compiling from debian to windows amd64
00:17:10ldleworkNim: "Oh strange, it compiles now"
00:17:46zachcarterbasically what clued me in was every line was failing on some reference to far
00:17:48ldleworkzachcarter: I bet the underlying reason why is interesting.
00:17:54zachcarteroh I guarantee it’s a doozer
00:17:57zachcarterdoozie
00:17:58zachcarterwhatever
00:17:58ldleworkhehe
00:18:09ldleworklike "far pointer" or something
00:18:12zachcarteryeah
00:19:54zachcarterthe source file compiles fine by itself to, only when referenced from another module do compilation issues crop up
00:51:44FromGitter<Varriount> zachcarter: 'far' is a nonstandard qualifier for pointer types.
00:52:14ldleworkYou'd think that compiling Nim would cause name-mangling to ocurr
00:52:33FromGitter<Varriount> ldlework: It does. But only for standard keyword
00:52:44FromGitter<Varriount> 'far' isn't standard
00:57:30*ftsf joined #nim
01:03:46*vlad1777d quit (Quit: Leaving)
01:13:11*bjz joined #nim
01:25:44*alectic quit (Quit: leaving)
01:39:00*chemist69 quit (Ping timeout: 252 seconds)
01:52:46*chemist69 joined #nim
02:10:06*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
02:44:53*rupil joined #nim
03:08:36*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:11:43*Snircle joined #nim
03:15:01*bjz joined #nim
03:15:09zachcarterinteresting
03:17:25ftsfo/ morning yall
03:17:35zachcartero/
03:18:31ftsfhow goes it zachcarter?
03:18:48zachcartermmm we’ll see shortly ;P attempting to cross compile using docker atm
03:18:56ftsfoh cool
03:18:57zachcarterhow about you?
03:19:00ftsfa docker cross compiler would be rad
03:19:10ftsfjust working on my LDJAM game idea
03:19:14ftsf40 hours left
03:19:17zachcarteroh nice!
03:19:30zachcarteryay! I’m down to linking errors in my docker cross compile
03:19:42ftsfneed any help?
03:19:50zachcarternot yet but I might
03:19:58zachcarterI was fighting compile errors previously
03:20:09zachcartertook me all day to get through those :/
03:20:14ftsfaww
03:21:54zachcarterdoh well
03:21:57zachcartergetting there :D
03:31:13*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
03:32:53FromGitter<Varriount> zachcarter: Where can the space invaders game be downloaded?
03:33:10zachcarterVarriount: I’m working on that now :)
03:33:17zachcarterwhat OS are you looking for?
03:33:45FromGitter<Varriount> OSX
03:33:54zachcarteroh I can give you a binary now
03:34:04zachcarterthe game’s not complete yet though
03:34:12zachcarterI still need to add levels and a HUD
03:35:41zachcarterVarriount: I’m working on a dockerfile that will allow users to cross compile to whatever target without having to install anything but docker
03:37:53zachcarterwewt
03:38:07zachcarterI think the cross compile for windows just worked
03:39:25ftsf\o/
03:44:13*xet7 quit (Quit: Leaving)
03:47:08zachcarterVarriount: https://drive.google.com/drive/folders/0B2CfYyfxKriOb1NaNFh4S1ZCRlE?usp=sharing
03:48:26*xet7 joined #nim
03:59:20FromGitter<Varriount> zachcarter: could not load: libbgfx-shared-lib(Debug|Release).dylib
03:59:45zachcarterwhoops forgot to include that
04:00:46zachcarterVarriount: https://drive.google.com/file/d/0B2CfYyfxKriOeHVFdHNNc1RoLWc/view?usp=sharing
04:01:02zachcarterneeds to go in /usr/local/lib
04:01:26FromGitter<Varriount> blah. I like Window's dll search model
04:01:33zachcarterI agree
04:02:27FromGitter<Varriount> So, I've finally started learning Javascript. :|
04:02:55ldleworkIts not as bad as the social currency you get from being edgy about it.
04:03:14ldleworkBut its no real great joy either.
04:05:09zachcarterhrm I’ve run into a situation with docker
04:05:11zachcarteragain
04:05:43zachcarterI have a dockerfile building and compiling my project for windows on debian but I can’t figure out how to get the binaries off
04:06:37zachcarterI know I can do docker run with a volume option, but the thing is, my container doesn’t do anything it just builds the project so when I do docker run, it exist immediately
04:06:53FromGitter<Varriount> zachcarter: Would you mind if I submitted a sandbox file?
04:07:06FromGitter<Varriount> For OS X's sandbox-exec
04:07:19zachcarternope
04:09:35zachcarterIdlework: any idea how to deal with ^
04:10:26zachcarteroh -t and d flags apparently, sorry nevermind
04:11:21*rupil quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
04:11:43shashlickis it possible to kill a thread that is spawn()'d or created via the threads module
04:14:36FromGitter<Varriount> shashlick: You mean, end it from another thread, forcibly?
04:15:03FromGitter<Varriount> Why do that, rather than send a signal to end?
04:15:20shashlickya, i meant end
04:16:58zachcartermeh still confused
04:17:28FromGitter<Varriount> shashlick, have the worker thread read from a channel/data source. When it receives the end signal, have the main thread function return.
04:17:58FromGitter<Varriount> There are ways to 'kill' a thread (forcibly stop it) but you usually don't want to do that.
04:18:28FromGitter<Varriount> You end up with possible resource leaks, inconsistent state, etc.
04:21:39shashlickVarriount: cool, will look at channels
04:22:13ldleworkzachcarter: just run a container `docker cp`
04:22:39zachcarterokay let me try that
04:22:40zachcarterthanks
04:22:57ldleworkzachcarter: you can also do the bind mount
04:23:04ldleworkso that it compile the binary into the volume mount
04:23:23zachcarterokay
04:24:04ldleworkas a third choice, there is undocker
04:24:14ldleworkI would personally likely go with the volume mount
04:24:38FromGitter<Varriount> docker seems really complex
04:26:24ldleworkI don't mind answering any conceptual questions you mind have if you can author them.
04:26:29ldleworks/mind/might
04:27:04ldleworkA good roadmap for understanding everything is
04:27:28ldleworkLinux Kernel support for namespaces/cgroups -> Containerization -> Image distribution -> orchestration
04:28:29nchambersI'm looking at docker for a project of mine right now
04:28:43nchambersalso, hello idlework. not sure if you remember me
04:32:28ldleworknchambers: name looks familiar, don't know what we talked about
04:32:42nchambersI was in here a long time ago
04:32:44nchambersmany cycles
04:34:40zachcarterVarriount: did you manage to get it working?
04:34:48FromGitter<Varriount> zachcarter: One moment
04:34:51zachcartersure
04:42:25FromGitter<Varriount> zachcarter: Ok, it works.
04:42:31zachcarterLD
04:42:35zachcartererr :D
04:42:48FromGitter<Varriount> zachcarter: It's probably the retina display, but the font was pixellated
04:43:20zachcarterhrm okay
04:44:21FromGitter<Varriount> How does the game detect/deal with fonts and resolution?
04:45:06zachcartercurrently the only text in the game is rendered through one of two ways - nuklear or an image
04:45:14zachcarterso the buttons with the text are nuklear
04:45:19zachcarterwithout any skinning
04:45:53zachcarternanovg support is on my short list which should give us TTF antialiased text
04:46:02zachcarterand then bitmap fonts will follow shortly thereafter
04:46:54FromGitter<Varriount> What is nuklear doing to render text?
04:47:14FromGitter<Varriount> I can't find any asset files with bitmap fonts in them, nor OT/TTF fonts
04:48:19zachcarterah the font is actually stored in source
04:51:08*libman quit (Quit: Connection closed for inactivity)
04:51:24FromGitter<Varriount> Ok, I thought Python tutorials were good, but MDN tutorials on Javascript are just wonderful.
04:53:23nchambersVarriount: They're amazing!
04:54:06FromGitter<Varriount> Perhaps, one day, Nim documentation can be this good. :D
04:56:32ldleworkMDN is really really good
04:56:45ldleworkOnly other resource as good, for a decade or so longer, was MSDN
05:13:20*Jesin joined #nim
05:24:50shashlickhow do you get channels to work? var flag = Channel[bool] => Error: 'typedesc' metatype is not valid here; typed '=' instead of ':'?
05:36:03shashlickugh never mind
05:42:46shashlickVarriount: how do you modify NimLime to handle --threads:on?
05:43:45FromGitter<Varriount> shashlick: try looking in user preferences
05:45:11FromGitter<Varriount> Otherwise, I can add something
05:51:00*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
05:53:00shashlickVarriount: don't see anything - there's a user settings file for NimLime but it's empty, not quite sure what to put in it
06:01:38FromGitter<Varriount> Look at the default
06:02:10FromGitter<Varriount> shashlick: default file contains the default settings. You copy those over to the user file and modify them.
06:02:37shashlickwhere do you define the nim command line? it's not in the settings?
06:03:37FromGitter<Varriount> Is there any relevant entry in the default settings file?
06:03:46shashlickI don't see anything
06:03:51FromGitter<Varriount> If not, then I'll need to modify NimLime
06:04:09FromGitter<Varriount> What OS are you on?
06:05:01FromGitter<Varriount> I'll need an hour (I'm baking at the moment) but you can create a bash file/shell script that invokes Nim with the right arguments as a workaround
06:06:03shashlicksure, i'll be fine, just curious no rush
06:06:05shashlickam on Win
06:12:47*yglukhov joined #nim
06:41:50*zachcarter quit (Quit: zachcarter)
06:43:11*yglukhov quit (Remote host closed the connection)
07:01:21*adeohluwa joined #nim
07:10:56*yglukhov joined #nim
07:30:41*gggs joined #nim
07:34:18*yglukhov quit (Remote host closed the connection)
07:40:06*bjz joined #nim
07:40:08*yglukhov joined #nim
07:42:37*shashlick quit (Ping timeout: 240 seconds)
07:44:19*shashlick joined #nim
08:00:41*willprice joined #nim
08:10:59*yglukhov quit (Remote host closed the connection)
08:13:32*couven92 joined #nim
08:18:32*yglukhov joined #nim
08:31:18*vlad1777d joined #nim
08:43:58*Tiberium joined #nim
08:44:54*Tiberium quit (Remote host closed the connection)
08:45:11*Tiberium joined #nim
08:46:34*Tiberium quit (Remote host closed the connection)
08:46:46*Tiberium joined #nim
08:47:16*Tiberium quit (Remote host closed the connection)
08:47:28*Tiberium joined #nim
08:49:22*Tiberium quit (Remote host closed the connection)
08:49:34*Tiberium joined #nim
08:50:25*Tiberium quit (Remote host closed the connection)
08:54:14*Tiberium joined #nim
08:54:16Araqhttps://github.com/pragmagic/karax check it out
08:55:34*Tiberium quit (Remote host closed the connection)
08:57:27*Tiberium joined #nim
09:00:26dom96Araq: Why are some bars pink and others blue?
09:00:38Araq"Pink" == optimized version
09:01:02AraqI don't have a better screenshot right now, will update it later
09:01:27dom96yeah, needs a legend :)
09:02:48dom96also, add it to the package index
09:02:55dom96and change your instructions to "nimble install karax"
09:03:23dom96or include the git clone command
09:03:38dom96since you want people to compile your examples
09:03:44dom96Nimble doesn't support that (yet) :)
09:05:32dom96Nice job though, looks awesome.
09:05:32*Matthias247 joined #nim
09:06:02dom96I can tweet about it if you'd like
09:07:22dom96Guys, I want to include some troubleshooting info in my book for the installation of Nim. Any common problems that you ran into or saw other users run into?
09:07:59couven92git clone Nim does not include the dependency binaries on Windows
09:08:25couven92like zlib, sqlite, openssl, etc
09:08:46dom96Ahh, good one.
09:09:15dom96I've got two so far, one is just "command not found: nim" when the user didn't put it in their PATH correctly.
09:09:27dom96The other is the "Nim and C compiler disagree on target architecture" error
09:10:36couven92I also found that it is convenient to let the Nim installation be under git, and therefore create a nim.cfg in APPDATA instead of modifing the installation nim.cfg
09:17:38couven92ah, dom96, when you git clone Nim it ight make sense to checkout the latest release tag instead of the devel branch
09:17:59dom96That's not how you should install a release
09:18:07couven92ok... :P
09:18:08dom96You should download it from nim-lang.org
09:19:03*adeohluwa quit (Quit: Connection closed for inactivity)
09:30:07*BennyElg quit (Remote host closed the connection)
09:30:43*rokups joined #nim
09:31:13*BennyElg joined #nim
09:46:51Araqdom96: please tweet later, I like more comments from the friendly Nim community first before the HN crowd destroys my work ;-)
09:47:55FromGitter<Varriount> Araq: That must mean we don't criticize you enough. :P
09:50:57FromGitter<Varriount> Though, I must say that this is rather timely - I'm currently learning JavaScript and node.js for work
09:59:48Araqdo yourself a favour and go right after TypeScript (if you cannot convince others to try Nim)
10:00:08Araqthere are language warts in JavaScript that no framework out there can fix
10:22:39*chemist69 quit (Ping timeout: 258 seconds)
10:45:19couven92It is true though, that the nim community is friendly... Over in #csharp people keep telling rather gruesome stories about how hostile #java is :)
10:49:25*chemist69 joined #nim
10:59:25*xet7 quit (Quit: Leaving)
11:03:06FromGitter<Varriount> couven92: The room, or the language?
11:03:17couven92the room
11:03:27*alectic joined #nim
11:04:31*Snircle joined #nim
11:06:19*yglukhov quit (Remote host closed the connection)
11:32:51*yglukhov joined #nim
11:34:23*yglukhov quit (Remote host closed the connection)
11:34:36*yglukhov joined #nim
11:49:42*Tiberium quit (Remote host closed the connection)
11:50:34*zachcarter joined #nim
11:50:38*Tiberium joined #nim
12:15:18*Arrrr joined #nim
12:15:18*Arrrr quit (Changing host)
12:15:18*Arrrr joined #nim
12:27:14*chemist69 quit (Ping timeout: 258 seconds)
12:28:18*chemist69 joined #nim
12:40:03*willprice quit (Remote host closed the connection)
12:47:37*Trustable joined #nim
12:59:58Tiberiumcan I somehow see normal Nim code generated by my macro? not AST tree
13:02:26FromGitter<hbakhtiyor> anyone using nim on production? and what kind of domain (rest api, desktop, ...) are you using?
13:03:22Tiberiumhbakhtiyor: Araq uses Nim in production :)
13:04:36zachcarteryes
13:04:40zachcarterthere are people that use nim in production
13:04:44zachcarterUnicredit does
13:05:02zachcarterI believe there’s another guy in here who works for a company that uses it in production but I’m sparse on the details I’m sorry
13:05:49*yglukhov quit (Remote host closed the connection)
13:07:58FromGitter<hbakhtiyor> @Tiberium, for what kind of domain?
13:08:19Tiberiumhbakhtiyor: http://www.3dicc.com/
13:08:30TiberiumAraq, is the creator of Nim
13:09:13FromGitter<hbakhtiyor> i see ))
13:13:25FromGitter<hbakhtiyor> i stuck with choosing between crystal & nim, but i think crystal has more active communities especially for web development
13:15:43Tiberiumbut Nim can compile to JS :)
13:16:24Tiberiumbut anyway, it's up to you
13:17:04FromGitter<gokr> Web dev these days ... IMHO html5 reigns and what you need on the server side is either a REST API or something based on websockets. The client is all js in some form or the other.
13:17:53FromGitter<gokr> Of course you can compile to js etc, but... I hesitate on the usefulness of such an approach.
13:18:17*DebugMan97 joined #nim
13:18:17FromGitter<hbakhtiyor> yeah, i need for rest api side only
13:18:48DebugMan97Whats the idiomatic way to handle errors? I want to initialize some bindings on the toplevel. Should i raise some exception?
13:19:13FromGitter<gokr> Jester IIRC handles that quite fine. Dom96 knows more.
13:23:03DebugMan97How do i return failure from toplevel to the os? I neet some equivalent to C's return EXIT_FAILURE;
13:23:13dom96jester handles what fine?
13:23:14TiberiumDebugMan97, quit(1)
13:23:43FromGitter<gokr> Building REST apis
13:23:51dom96Sure, of course.
13:23:57dom96And it's used by many people already
13:24:10dom96I should have some time to give it some well deserved love soon
13:24:26dom96As for JS backend, it's definitely useful. I created this game using it: http://picheta.me/snake/
13:24:33FromGitter<gokr> Another quite nice approach we use for Cordova apps is to use MQTT over websockets.
13:25:14DebugMan97Tiberium: quit() is too agressive and harsh, and i guess it even skips all defer statements in the current block
13:26:01TiberiumDebugMan97, I don't know then. you can make some variable "failedCode" and at the end of the program exit with "quit(failedCode)"
13:26:02*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
13:26:15dom96DebugMan97: You can define a "QuitError" or similar and just catch it at the top level.
13:26:19dom96That's what I do in Nimble
13:26:36dom96when an unrecoverable error occurs I just raise a NimbleError.
13:30:22*TheLemonMan joined #nim
13:30:57*bjz joined #nim
13:31:33DebugMan97does calling quit(...) as the last toplevel statement has any hidden consequences?
13:33:43TiberiumWhat can be the reason of "???(???, 0) Error: internal error: genLiteral: ty is nil" in macro?
13:33:50Tiberiuminternal compiler error
13:40:50ftsfmaking my Ludum Dare game in Nim at the moment, it's so dreamy and productive to use <3
13:41:34AraqTiberium: it means you should file a bug report
13:41:41TiberiumAraq, ok
13:44:00FromGitter<hbakhtiyor> @dom96 how is fast compare with http://kemalcr.com/ crystal version?
13:44:06DebugMan97why doesn't error() write anything by default? Should i prefer stderr.write()
13:44:36AraqDebugMan97: quit() is C's exit(), error() is for the macro system
13:45:12DebugMan97i mean logger's error
13:49:55*alectic quit (Quit: leaving)
13:50:46Araqdunno, I don't use logging, but it should work
13:52:47TiberiumAraq, maybe it's not a compiler bug but my stupidity? this is a repro - https://gist.github.com/TiberiumN/66dcf68e71578f01936ea868c687088f
13:53:42TiberiumAraq, it happens only if I do strCmds.add(anything) on line 16
13:53:49Tiberiumso even strCmds.add("a") produces an error
13:53:55zachcarterDebugMan97: you need to add handlers
13:53:59Araqhow is an internal error not a compiler bug?
13:55:41*nightmared quit (Quit: WeeChat 1.7)
13:57:29Araqhbakhtiyor dunno, it's fast enough anyway
13:57:48Araqyou're rich before its performance becomes an issue
13:58:38TiberiumAraq, oh wait, my Nim was on zahary branch, I'll try on devel now. If it will be OK, I'll report it to zah
13:59:33DebugMan97nim feels quite lispy and crispy despite having python syntax <3
14:00:07*yglukhov joined #nim
14:00:20TheLemonManwhere's the lispyness?
14:00:24TiberiumAraq, eh, it crashes on devel too :( Will submit an issue now
14:00:48DebugMan97TheLemonMan: just look at the cool stuff one can do with template, macros, const expressions
14:01:15zachcarterDebugMan97: did you figure out logging?
14:01:33dom96ftsf: what you making? :)
14:01:57TheLemonMana spoonful of metaprogramming features don't make a language lispy, at least IMO
14:01:58*yglukhov quit (Remote host closed the connection)
14:02:12DebugMan97zachcarter: setting up a logger would be overkill. I just print to stderr and return 1
14:02:25TiberiumDone - https://github.com/nim-lang/Nim/issues/5746
14:02:26zachcarterright but you were asking why error didn’t do anything
14:02:27dom96hbakhtiyor: not sure, but what Araq said is true.
14:02:43TheLemonManthis said I'm enjoying my trip inside the compiler
14:02:57zachcarterjust wanted to make sure you understood why
14:03:07ftsfdom96, a little puzzle game about making aliens happy.
14:03:16DebugMan97zachcarter: i've read your answer but didn't reply ^^
14:03:20DebugMan97thanks
14:03:29zachcarterhaha np I just didn’t want you to be confused
14:04:22dom96I see new people. Welcome everyone :)
14:04:58DebugMan97and i see nim functions have implicite return values :O
14:05:01zachcarterdom96: if you get a chance this weekend maybe we can talk about the nim playground
14:05:29zachcarterbecause the extremely little effort I put into it, actually produced something that works locally anyway
14:05:30dom96zachcarter: sure, I'll have more time tomorrow.
14:05:36zachcartersweet :D
14:06:29zachcarterftsf: docker cross compiling is working well
14:06:50ftsfzachcarter, awesome!
14:06:52zachcarterI think it might be the answer to how to distribute games built with frag
14:07:35ftsfhttps://twitter.com/impbox/status/855777847281041408
14:08:13zachcarterlooks cool!
14:08:45*nightmared joined #nim
14:17:09*DebugMan97 quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
14:40:53zachcarterdoes anyone have any recommendations for setting up a gnu toolchain on windows?
14:41:16zachcarter64 bit
14:41:50zachcarteris winbuilds the best option?
14:52:41ftsfzachcarter, i just used mingw64, seemed to work fine
14:52:49ftsfmingw-w64
14:52:56zachcarterhrm it does work but it doesn’t come with make
14:53:05ftsftrue, i installed make separately
14:53:17zachcarterdid you use anything to install make or did you just go find it and install it?
14:53:31ftsfhmm http://gnuwin32.sourceforge.net/packages/make.htm
14:53:37zachcarterthanks!
14:55:51*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
15:10:25TheLemonManuhh, I guess #5764 happens because `strCmds` expands to a nkBracket of nkStrLit where the semExpr hasn't been run on yet thus the typ is nil at that point
15:11:33TheLemonManI must admit the macro system is pretty sick
15:15:31*yglukhov joined #nim
15:27:39TiberiumTheLemonMan, yeah, it is :)
15:27:49TiberiumTheLemonMan, this crash is fine for me, since I've chose another approach anyway
15:32:26zachcarterhttp://community.fragworks.io/t/recruiting-help-wanted/15
15:33:29FromGitter<hbakhtiyor> anyone know any dom manipulation library? ⏎ e.g. for golang https://github.com/PuerkitoBio/goquery
15:34:24FromGitter<stisa> zachcarter : mingw comes with mingw32-make no?
15:34:45zachcarterI wasn’t finding it but I could have veryw ell missed it
15:36:16*gokr joined #nim
15:41:31FromGitter<stisa> @hbakhtiyor with the js backend you can use dom, but it's lower level than jquery, with c I don't know, try looking on https://nim-lang.org/docs/lib.html
15:49:48TheLemonManTiberium, a simple workaround is to use 'var tmp = $strCmd'
15:52:40*libman joined #nim
15:58:08*Arrrr quit (Ping timeout: 240 seconds)
15:58:44*Trustable quit (Remote host closed the connection)
16:04:21FromGitter<Varriount> @hbakhtiyor There's also the parsexml module
16:08:27*yglukhov quit (Remote host closed the connection)
16:18:55FromGitter<Varriount> @stisa Mingw doesn't always come with make installed.
16:24:43FromGitter<stisa> @Varriount interesting, I got it from https://mingw-w64.org/doku.php/download so I thought it was in the standard bundle
16:29:34*Vladar joined #nim
16:35:38FromGitter<Varriount> @stisa there's several variants of mingw floating around
16:46:22*couven92 quit (Quit: Client Disconnecting)
17:06:00*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
17:11:38*TheLemonMan quit (Quit: "It's now safe to turn off your computer.")
17:12:50demi-hmmm, is there a method for normalizing a file path?
17:13:27demi-i see that there is `expandFilename` but that only works for paths that already exist, I want to normalize two file paths to compare them
17:29:55*Arrrr joined #nim
17:29:55*Arrrr quit (Changing host)
17:29:55*Arrrr joined #nim
17:30:43*krux02 joined #nim
17:38:02*Matthias247 quit (Read error: Connection reset by peer)
17:39:55Tiberiumehm, how to get string value from nnkIdent?
17:40:28*krux02 quit (Disconnected by services)
17:40:28*krux02- joined #nim
17:40:31*krux02- is now known as krux02
17:40:46Tiberium"Error: field 'strVal' cannot be found"
17:41:01*krux02_ joined #nim
17:42:26Tiberiumah, nvm
17:43:22Tiberium$ident
17:56:10*gokr quit (Read error: Connection reset by peer)
17:56:47*nsf joined #nim
17:59:20*krux02 quit (Remote host closed the connection)
18:11:10krux02_Tiberium, repr also works
18:14:32dom96please don't use repr for that
18:19:06krux02_dom96: why?
18:19:15krux02_is repr only for debugging?
18:20:07krux02_anyway I have to go
18:20:11*krux02_ quit (Remote host closed the connection)
18:26:20demi-dom96: do you have any preferences on how i should implement tests for my PR?
18:32:17*rokups quit (Quit: Connection closed for inactivity)
18:43:20*McSoFake joined #nim
18:45:25*Snircle joined #nim
19:22:22TiberiumIt seems I've found something like pygame in python - https://github.com/oprypin/nim-csfml
19:22:44Tiberiumlook at this! https://github.com/oprypin/nim-csfml/blob/master/examples/typing.nim
19:24:24zachcarterTiberium: you should just use frag :P
19:24:34Tiberiumzachcarter, it's not that easy at the moment :)
19:25:05zachcarterhopefully it will be easy to use soon
19:25:12Tiberiumzachcarter, really?
19:25:21Tiberiumzachcarter, you'll start developing high-level API?
19:25:35zachcarteroh it’s already about as high level as libgdx, do you want something more high level than that?
19:26:12zachcarterI guess the thing it needs is documentation
19:27:12zachcarterright now what I’m working on is distribution
19:27:22zachcarterthen I’ll need to refocus on documentation again
19:27:40zachcarterbut this docker thing is working - it’s quite easy now to cross compile the space invaders demo to windows from whatever os you’re on
19:40:54*chemist69 quit (Ping timeout: 255 seconds)
19:41:01Tiberiumehm, lol
19:41:02Tiberiumhttps://jscheid.github.io/nim-sandbox/index.html
19:41:10Tiberiumit's working for simplest code examples
19:41:13Tiberiumhttps://github.com/jscheid/nim-sandbox
19:43:46zachcarteroh it’s generating javascript
19:43:47zachcartercool
19:44:02zachcarterwell I guess I can throw mine away :P
19:44:42zachcarteroh maybe not
19:44:43zachcarter2 years ago
19:45:54FromGitter<stisa> Tiberium: Interesting, nim 0.12.0, and it looks like it compiles the compiler with emscripten?
19:46:00Tiberiumyes
19:46:12TiberiumI don't know how I found it
19:46:14Tiberiumah, I know
19:46:26Tiberium"dll inject language:Nim" github
19:46:28Tiberiumlatest result
19:46:33Tiberium(on the first page)
19:53:19*DebugDude12 joined #nim
19:54:03DebugDude12Whats the proper way to get the size of a float matrix [array of an array]?
19:54:09DebugDude12I need to allocate its amount on the gpu
19:54:20Tiberiumzachcarter, i'm trying to use it with latest nim out of curiosity :)
19:54:31zachcarternice!
19:55:49DebugDude12my naive approach would be to: a.len * sizeof(a[0][0]) or something like that
19:57:09FromGitter<stisa> DebugDude12 : did you try `sizeof(a)` ? If you aren't using ref types in `a` it I think it should work
19:57:28*Jesin quit (Quit: Leaving)
19:57:50DebugDude12stisa: i didn't try anything yet, since i don't know whether sizeof() also considers an array's metatada, length, etc
19:58:29zachcarteropenal is annoying
19:58:42zachcarterin that they don’t publish just a dll for their stuff they have an installer
20:01:35DebugDude12Tiberium: you use opengl. How did you determine the size of a matrix to push as VBO via glBufferdata?
20:01:50TiberiumDebugDude12, I don't use opengl?
20:01:55Tiberium(really)
20:02:12DebugDude12ah, i tought it was you who is writing game engines here ^^
20:02:21Tiberiumno, it's zachcarter
20:02:28DebugDude12sorry
20:03:51zachcarterhrm I don’t think you should be buffering matrices
20:04:07zachcarterunless you’re doing something crazy I don’t know about
20:04:28zachcartergenerally you have a struct representing your vertex / tex coord / color / whatever data
20:04:46zachcarterand the size of the buffer is the number of vertices you’re buffering * the size of the struct
20:04:54DebugDude12just pushing a triangle to the gpu and considered using a matrix. I don't know if a simple array would be more nim-my
20:06:18DebugDude12i guess i stick to an array then, since all the C++ tuts do this. Just hoped there was a nim way™
20:06:39zachcarterkrux02 does all sorts of crazy buffering stuff with nim macros
20:06:46zachcarterI don’t even use opengl actually
20:06:52zachcarterI mean I do, but through an abstraction layer
20:06:58ftsfso adding to a seq while iterating is bad apparently, what's the alternative way?
20:07:14zachcarteruse a for loop
20:07:15zachcarteror
20:07:23zachcarteruse 2 seqs and concat them
20:07:33zachcarterwhen I say for loop I mean
20:07:37zachcarterfor i in 0..<seq.len:
20:07:49DebugDude12what does sizeof( some_array ) return? The number of elements? Or the whole internal C struct/wrapper?
20:08:00*chemist69 joined #nim
20:08:09zachcarterthe size of the array and the elements
20:08:13zachcarternot the count of elements
20:08:19ftsfahh
20:08:42zachcarterbest way DebugDude12 is:
20:09:01zachcartersome_array.len * sizeof(type_of_some_array_member)
20:09:27ftsfthat works
20:10:07DebugDude12zachcarter: i guess thats the way to go. Anything else doesn't seem to be specified and may break in future.
20:10:41zachcarter*nods
20:11:32FromGitter<stisa> Dunno, I like sizeof(arr) : https://glot.io/snippets/ep6p12ftv8
20:12:51zachcarterhttps://gist.github.com/zacharycarter/66b5dc47ab0cfd677585fc389c0046df
20:12:53DebugDude12stisa: sizeof seems to ignore an arrays internal representation in your case
20:12:55zachcarterDockerfiles
20:18:20Tiberiumzachcarter, well, new nim compiler compiled to js (it seems) successfully, but I can't launch local dev server because of some very strange react error
20:18:31Tiberiumso I'll replace remove files from https://jscheid.github.io/nim-sandbox/index.html with my local ones :D
20:18:31zachcartergotta love react :/
20:18:36zachcarter:D
20:19:52TiberiumI hope it will be successfull
20:27:29libmanJS sandbox doesn't support `import`...
20:28:56Tiberiumthis is two years old sandbox btw
20:29:08TiberiumI think with enough work we can port current compiler to emscripten :)
20:31:44*Vladar quit (Quit: Leaving)
20:32:38Tiberiumzachcarter, it works
20:32:50zachcarternice!
20:33:02Tiberiumzachcarter, but it's made without any modules
20:33:08Tiberium(In build config as I think)
20:33:31dom96It would still be nice to have a C-backed playground site.
20:33:44Tiberiumyeah, it would be better anyway
20:33:46Tiberiumbut woah - http://imgur.com/a/wjX4o
20:34:29*sz0 quit (Quit: Connection closed for inactivity)
20:37:28Tiberiumwait, resulting code for echo "Hello Nim " & $NimVersion is only 400 lines of JS
20:37:32Tiberiumhow is this possible?
20:40:28Tiberiumdom96, wow :) http://dom96.github.io/
20:40:59dom96heh, that's at least 5 years old
20:41:15*Arrrr quit (Quit: Leaving.)
20:41:44dom96how did you find it?
20:41:46Tiberiumdom96, 6 years
20:41:58Tiberiumdom96, https://github.com/search?utf8=%E2%9C%93&q=dom96&type=
20:42:51dom96hah, I wonder if Haskell has a better IRC library nowadays
20:47:40*Tiberium quit (Read error: Connection reset by peer)
20:50:04zachcarterwewt
20:50:13zachcartergot a automated windows build of space invaders working : https://drive.google.com/file/d/0B2CfYyfxKriOUVBKWTdrbGh5cmM/view?usp=sharing
20:50:21zachcarterneed 64 bits
20:51:39*Matthias247 joined #nim
20:53:16*DebugDude12 quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
20:55:37*Tiberium joined #nim
20:59:29zachcarterhmmm
20:59:57FromGitter<stisa> zachcarter : ``could not load: OpenAL32.dll``, but it's in the folder? I guess I need to install it
20:59:57zachcartergetWMInfo which calls SDL_GetWindowWMInfo returns SysWM_Unknown when the release flag is set on the compiler
21:00:17zachcartercrap, I guess so I was hoping to avoid that
21:00:36zachcarterI’ll have to figure out how to fix that stisa
21:04:22FromGitter<stisa> zachcarter : works after installing openal
21:04:27zachcartersweet!
21:04:38zachcarterthanks for trying it out
21:05:49zachcarterstisa: was it slow loading?
21:05:53FromGitter<stisa> Pretty nice! Is there a way to quit to menu ? Even after winning/losing it just continues running
21:06:09zachcarteryou just have to exit the appliation
21:06:14zachcarterI haven’t finished the game yet
21:06:26zachcarterand thank you!
21:06:29FromGitter<stisa> Yes actually, a couple seconds of blank screen on starttup, and a couple seconds to load the level
21:06:42zachcarterokay I have a feeling this is due to the debug flag
21:07:06zachcarterhrm I need to figure out why the release flag makes the sdl2 bindings behave this way
21:10:47zachcarterthis is going to be difficult to debug to since I need to set the release flag to reproduce it :/
21:15:22zachcarterAraq: any idea what I can do here?
21:23:00*PMunch joined #nim
21:25:14*devted joined #nim
21:27:42*vivus quit (Quit: Leaving)
21:29:02dom96zachcarter: one thing you can look for is assert calls
21:29:07dom96remember, they disappear in release mode.
21:39:36zachcarterahh okay thanks dom96 that’s probably it
21:39:47zachcarterin fact that is it
21:43:35dom96cool :)
21:43:36dom96'night
21:54:43PMunchAnyone knows what's up with the graph for Karax: https://github.com/pragmagic/karax
21:55:17zachcartergood night
21:55:50zachcarterI think Araq explained it in the forum
21:55:54zachcarterforum thread*
21:58:19PMunchhttps://forum.nim-lang.org/t/2926
21:58:21PMunchThat one?
21:58:35zachcartermmhmm
21:58:50PMunchI get what it's showing. But what is the teal vs. pink bars?
21:59:41*McSoFake quit (Ping timeout: 260 seconds)
22:00:42FromGitter<stisa> This morning he wrote > "Pink" == optimized version < , don't know what he means by optimized
22:01:07PMunchAh, interesting
22:01:14PMunchShould say so in the graph though :P
22:07:50*McSoFake joined #nim
22:24:05*bjz joined #nim
22:28:51zachcarterthreading seems super slow on windows
22:28:55zachcarteror I”m doing something very wrong
22:33:48PMunchDefine slow
22:35:01zachcarterI think it’s something I”m doing
22:35:26zachcarterbecause other code using the same threading logic is executing very quickly
22:35:52zachcarterah I figured it out
22:36:09zachcarterI think it has to do maybe with this sound library I’m using
22:37:06*vlad1777d quit (Quit: Leaving)
22:38:47zachcarteryup!
22:38:53zachcartertook out the sound loading and it’s very quick on windows
22:38:55zachcarterhrm that’s troubling
22:48:02*nsf quit (Quit: WeeChat 1.7)
22:50:44*McSoFake quit (Quit: leaving)
22:56:55zachcarterdoes anyone have a link to the nimble package scanner
22:57:16zachcartererr search rather
22:57:17zachcartersorry
22:57:45zachcarteroh it’s on the homepage now nevermind
23:00:03PMunchLooking for a new sound engine? :P
23:00:41zachcarterwell I’m definitely looking for options haha
23:01:50zachcarterI’d like to keep using sound.nim or whatever but it’s literally taking like 5+ seconds to load a single ogg file on windows
23:02:06PMunchWell that's no good..
23:02:42zachcarternope
23:03:14*Tiberium quit (Remote host closed the connection)
23:13:14*Ven joined #nim
23:13:25*Ven quit (Client Quit)