<< 14-12-2015 >>

00:55:31onionhammerno 1 reason why i dont like crystal is it isnt x-platform
01:01:44kulelu88what does that mean? onionhammer
01:02:11onionhammermeaning theres no windows version of the compiler
01:02:54onionhammerhttp://crystal-lang.org/docs/installation/index.html
01:03:49*Sornaensis quit (Excess Flood)
01:04:12*Sornaensis joined #nim
01:04:28kulelu88Does that matter much though? I would assume most devs are using some OS related to a linux kernel
01:04:35M-Quora^
01:05:19*jaco60 quit (Quit: Leaving)
01:16:32*kulelu88 left #nim ("Leaving")
01:33:48*nicktick joined #nim
01:34:44*vendethiel quit (Ping timeout: 256 seconds)
01:36:35*kniteli quit (Ping timeout: 240 seconds)
01:42:50*Demon_Fox joined #nim
01:48:53cryzedSo is it just me or does...
01:49:49cryzedah nevermind
01:51:10cryzedI ran into something like
01:51:15cryzedif not dimensions.len == 3
01:51:16cryzeda few times now
01:51:30cryzedI expected it to be if not (dimensions.len == 3), but in reality it is if (not dimensions.len) == 3
01:51:38cryzedand not actually works on ints, as a binary operation
02:00:38*solidsnack joined #nim
02:05:44cryzedDo tuples have something like .values?
02:06:01cryzedah I guess they are just sequences
02:08:35cryzedah I guess they are just sequences
02:12:38cryzedWhoops
02:20:25*xiongxin joined #nim
02:28:02*phao quit (Ping timeout: 272 seconds)
02:30:05cryzedIs there a reason why system.cmp isn't the default argument for algorithm.sorted(cmp=)?
03:00:23cryzedhttps://gist.github.com/cryzed/4fc4ab0b36a0a2caed69 I'm getting (14, 11) Error: cannot instantiate: 'T'
03:00:25cryzedAny idea as to why?
03:01:41cryzedah I got it, I forgot to specify [T] for matrix
03:09:47cryzedah I got it, I forgot to specify [T] for matrix
03:09:50cryzedgoddamit
03:11:55*vendethiel joined #nim
03:14:46*BitPuffin|osx quit (Ping timeout: 240 seconds)
03:15:24*nicktick quit (Quit: Leaving.)
03:16:23*nicktick joined #nim
03:22:24*ephja quit (Ping timeout: 256 seconds)
03:32:35*vendethiel quit (Ping timeout: 240 seconds)
03:35:16*nicktick quit (Read error: Connection reset by peer)
03:40:51*nicktick joined #nim
03:42:15*jakesyl quit (Ping timeout: 240 seconds)
03:55:36*jakesyl joined #nim
04:02:02*jakesyl quit (Ping timeout: 250 seconds)
04:05:51*yglukhov joined #nim
04:10:06*yglukhov quit (Ping timeout: 240 seconds)
04:16:23cryzedhttps://gist.github.com/cryzed/04258b914db2f1c69b25 I might have overengineered the beginning of one of the "advent of code" solutions
04:18:45cryzedI definitely feel I've gotten better at Nim recently though :). Sorry for spamming this channel so much
04:21:13def-cryzed: cool, someone else solving them in Nim. For comparison, my solutions are over here, all rather simple and hacked together quickly: https://github.com/def-/nim-advent-of-code-2015
04:21:32cryzedwait
04:21:37cryzedan infinitematrix thing existed?
04:22:08def-ehm, i think i just used a hash table
04:22:25cryzedah yes
04:22:27cryzedmight have been smarter
04:22:29cryzedit probably is.
04:22:39cryzedugh.
04:23:12cryzedwhatever, now it's done
04:23:43cryzedthe advantage of yours is less memory consumption, lazy initializing, probably O(1) access time and support of negative indexing
04:23:46cryzedmine... sucks
04:23:51cryzed:C
04:25:06*nicktick quit (Ping timeout: 240 seconds)
04:29:42cryzeddef-, thanks for your link -- I'll take a look at it as soon as I have solved them on my own. I'm scrapping the current code, but at least I did a bit more complex with generic types
04:30:31*nicktick joined #nim
04:49:37onionhammerkulelu88 Does that matter much though? I would assume most devs are using some OS related to a linux kernel
04:49:39onionhammerumm
04:49:41onionhammeryeah no i doubt that
04:49:44onionhammermost devs are probably on windows
04:50:13onionhammeralso even devs who dont use windows still like being able to deploy their programs to windows
04:52:06*xiongxin quit (Ping timeout: 252 seconds)
04:53:56onionhammer9% of desktop users are on OS X, linux are even smaller portions
04:54:20onionhammer48% win, 30% nix based
04:56:16strcmp1those stats are from where
04:56:18strcmp1the NSA?
04:56:30onionhammerwikipedia
04:56:39strcmp1and where are those stats from
04:56:51onionhammergo to wikipedia and find out
04:57:00strcmp1could you provide the link
04:58:03strcmp1windows has only become more irrelevent as time has gone by, and id be suspicious about those stats in general.
04:59:42strcmp1if the stats are based on purchases, theyre obviously very flawed
05:00:06cryzeddef-, https://gist.github.com/cryzed/82e13ed5e51a4e0f01c0 improved version
05:00:09cryzedthanks for the set tip :)
05:00:14cryzedmakes for much better code
05:00:24cryzedday 03 for the record
05:00:40cryzedyour solution is still a bit neater
05:01:08onionhammeryou're mad if you think windows is any way irrelevant
05:01:18onionhammeror just completely misinformed
05:01:41strcmp1i said it has become more irrelevent as time has gone by, not that it is irrelevent, and relevancy is subjective to who you are and what your target market is(if you even have one)
05:03:36onionhammerless relevant then?
05:03:40onionhammernot "more irrelevant"
05:03:53strcmp1sorry yes
05:03:54strcmp1less
05:03:58strcmp1less relevent
05:04:06strcmp1thank you for the grammar correction
05:05:22onionhammerlogic correction ;)
05:05:45strcmp1yeah, i dont see that it that way
05:05:59strcmp1and youre now entering a space of gibberish to avoid the actual topic
05:06:00strcmp1so adios
05:33:03*nicktick1 joined #nim
05:34:46*nicktick quit (Ping timeout: 250 seconds)
05:40:35*solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…)
05:46:01*solidsnack joined #nim
06:18:19*tester2000 joined #nim
06:19:59*tester2000 left #nim (#nim)
06:30:04*solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…)
06:36:45*darkf joined #nim
06:38:32*solidsnack joined #nim
07:06:17*vqrs quit (Ping timeout: 250 seconds)
07:09:10*vqrs joined #nim
07:23:10*solidsnack quit (Ping timeout: 272 seconds)
07:27:24*kniteli joined #nim
07:28:07*solidsnack joined #nim
07:42:09*yglukhov joined #nim
07:43:29*ehaliewicz joined #nim
07:46:26*yglukhov quit (Ping timeout: 240 seconds)
07:47:29*nicktick joined #nim
07:49:06*nicktick1 quit (Ping timeout: 250 seconds)
08:00:02*gokr joined #nim
08:03:52*ephja joined #nim
08:06:48*HakanD_____ joined #nim
08:17:05*krux_ quit (Quit: Page closed)
08:17:28*desophos quit (Read error: Connection reset by peer)
08:29:23*Ven joined #nim
08:45:47*Trustable joined #nim
08:59:17*nicktick1 joined #nim
09:01:50*nicktick quit (Ping timeout: 256 seconds)
09:02:59*yglukhov joined #nim
09:05:39*solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…)
09:14:26dv-how do I return a reference or pointer to an array element? for elem in array: if ...: return (addr elem) ?
09:14:42*nicktick joined #nim
09:16:09*avsej quit (Quit: Quit)
09:16:59Araqdv-: use mitems as iterator
09:17:28*nicktick quit (Client Quit)
09:18:26*nicktick1 quit (Ping timeout: 272 seconds)
09:18:31*avsej joined #nim
09:18:32*avsej quit (Changing host)
09:18:32*avsej joined #nim
09:19:11dv-thanks
09:20:48*coffeepot joined #nim
09:21:24*allan0 quit (Ping timeout: 250 seconds)
09:22:54*allan0 joined #nim
09:42:56*sepisoad joined #nim
09:56:46*sepisoad quit (Read error: Connection reset by peer)
10:09:41*phao joined #nim
10:13:48*kniteli quit (Ping timeout: 256 seconds)
10:22:46*ehaliewicz quit (Ping timeout: 240 seconds)
10:50:55*phao quit (Ping timeout: 240 seconds)
10:54:18*Ven quit (Disconnected by services)
10:54:57*Ven_ joined #nim
10:56:17*sxi joined #nim
10:57:30*vqrs quit (Quit: ZNC 1.6.1 - http://znc.in)
10:57:34sxihi guys, do you still need anyone to work on the GSoC projects?
10:58:10sxii discovered nim recently and it's my favorite so far with the lot of new languages aiming to replace C++, so i'm really interested in this
11:00:38coffeepotAll the items on the GSoC were great. My personal fav is the one to create a subset of nim that compiles to a shader. That'd be amazing :)
11:01:20coffeepotfor opencl
11:01:30coffeepotrather, not shader
11:01:50sxiah i just realized it's already over isnt it :D
11:02:22coffeepotyes, but doesn't mean any of those items wouldn't be incredible to have in the language
11:02:33*jackv quit (Quit: ZNC - 1.6.0 - http://znc.in)
11:02:53sxiyes true
11:03:05sxii'm also doing some gpu related work in deep learning
11:03:26coffeepotooo interesting! Are you using opencl?
11:03:40sxinah just theano
11:03:50sxithe "standard" python library which uses cuda
11:04:39sxithe gpu speedup is quite amazing
11:05:39sxia big weakness in python for scientific computing is it's speed
11:06:30coffeepotlearning to use the gpu is definitely on my todo list, the benefits can be incredible for certain tasks
11:06:54coffeepotyeah I really got into python before i realise it wasn't very fast at all
11:07:25sxii actually haven't learnt cuda but theano is so high level you don't need to touch that much :)
11:07:59sxiwith what i've seen in nim so far it combines python's tight syntax with low level optimizations, which is quite fascinating
11:08:27coffeepotyeah, plus something that isn't mentioned enough is the metaprogramming in nim, it's really impressive
11:09:28coffeepotand the generics, i mean it's great being able to write proc a(val: int|string|float) for example
11:10:10coffeepotand still have type safety
11:10:22sxiyeah
11:10:37sxidoes nim still have GSoC or is that over?
11:11:05coffeepotI don't know, def- you about to comment?
11:12:05coffeepotor perhaps dom96 ?
11:12:50dom96sxi: We didn't get accepted for GSoC
11:13:04dom96You're more than welcome to work on the GSoC projects in your spare time though
11:13:18sxiouch google likes go too much doesnt it
11:14:06sxiso the GSoC 2015 projects are still all up for grabs?
11:16:55coffeepotI would say so yes :)
11:17:33coffeepotI know there's been much talk of high level gaming frameworks
11:17:45coffeepotNim being well suited to games
11:18:13coffeepotplenty of examples but no overriding favourite as yet
11:19:52sxii don't know games all that well, used to program flash games back in primary school but that was a long time ago
11:20:51coffeepotno probs, just that's one people have been taking about of the forums. There's a nice selection in the GSoC page tho
11:20:54sxii'm quite interested in applying it to do scientific programming
11:21:36coffeepothave you seen the list? https://github.com/nim-lang/Nim/wiki/GSoC-2015-Ideas
11:21:55sxiyeah that was why i came here asking about GSoC :)
11:22:24coffeepothehe thought so XD Anything in there that tickles your fancy?
11:24:36sxifrom a glance: "nimfmt: Automatically format Nim code" "Add a code generator for OpenCL" "Improve the JavaScript backend"
11:25:09sxialso saw this project yesterday: https://github.com/unicredit/linear-algebra
11:25:26sxii think it's a "numpy for nim" starter
11:25:42coffeepotYeah I saw that on the forums, looks really interesting
11:26:51*jackv joined #nim
11:27:06coffeepotwell they all sound like a great addition to Nim. Personally I'm interested in the OpenCl addition but all are good :D
11:28:11coffeepotopencl could be a great way to parallelise algorithms
11:28:45sxiyup nvidia i think tends to do everything in cuda
11:29:09sxiso a cuda one could also be useful
11:29:19coffeepotit's annoying amd and nvidia both have different interfaces to them!
11:29:23coffeepotyeah definitely
11:30:05coffeepotdoesn't opencl work on both cards?
11:30:21sxiyea but i think cuda might have more nvidia optimizations
11:30:41coffeepotand cuda just nvidia? Tho I've heard cuda is nicer, but i don't know the details
11:31:49sxiyes cuda just nvidia
11:33:00sxii'll definitely try and contribute if i have time, though GSoC does make things easier by having these set tasks and deadlines
11:33:30sxiso without GSoC is the mentors thing off and contributing is github as usual?
11:34:23coffeepotI'd imagine people would be fairly willing to help even if they're not 'mentoring'
11:34:40coffeepotany questions just ask here or on the forums :)
11:34:58sxibut then would it be the more github way of helping, i.e. PR - comment - update
11:35:52coffeepotgithub, yes definitely but this channel is also often pretty helpful too :)
11:36:03sxiok got it
11:36:17coffeepotbesides, it sounds like interesting stuff! I'm sure people who can will be glad to help :D
11:36:59coffeepotthere's a few people using nim for scientific computing so a CUDA interface would likely be used well, I think :)
11:38:09*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
11:39:03*coffeepot joined #nim
11:40:03coffeepotdidn't realise linear-algebra does have some cuda support :-o
11:40:38coffeepotmight be useful for examples
11:40:42sxiindeed, though i think that was what gpus were meant for in the first place
11:40:58sxiyou an active contributor coffeepot ?
11:41:34coffeepotnot really, made an odbc lib (https://github.com/coffeepots/odbc) so far but not much else!
11:42:07coffeepothoping to make some headway on some gaming related projects over xmas
11:43:10sxii got to get some results out over xmas for uni
11:43:36coffeepotah fair enough, don't envy you - been a long time since I was at uni XD
11:44:06coffeepotwould the linear algebra lib help?
11:44:38sxiit's like a prereq for scientific anything so it's a great starting point for nim
11:44:50coffeepotyeah :)
11:45:24sxibtw nim doesn't have classes does it?
11:45:40coffeepotyeah, basically object is class
11:46:21coffeepotif you want it with pointer semantics (as in not copy on read) then ref object :)
11:46:56coffeepotobjects support inheritence
11:47:07coffeepot*inheritance
11:47:26coffeepotwith methods you get dynamic binding
11:47:29sxiso does it have mixins?
11:47:55sxii read somewhere the inheritance is just single
11:48:08sxibut mixins are often handy
11:48:50coffeepotlike this? http://nim-lang.org/docs/manual.html#generics-symbol-lookup-in-generics
11:51:02coffeepotthere are also typeclasses for defining generic objects
11:52:45sxiok i think the "concepts" section could be a kind of mixin
11:52:57sxibut nim has no syntactic sugar for classes?
11:53:00coffeepotyes, sorry that's what i meant by typeclasses
11:53:16coffeepotwhat kind of sugar do you mean?
11:53:30sxiwell javascript for example, used to have prototype to implement classes
11:53:37sxibut it bowed in to pressure eventually
11:53:42sxiand ES6 now has the "class" keyword
11:54:06coffeepotnot sure if it's needed really
11:54:17*HakanD_____ quit (Quit: Be back later ...)
11:54:22coffeepotthere's UFCS of course, which is great
11:54:53sxiwell it might not be, but my point is that simple to use syntax is very important at the end of the day
11:54:59coffeepotyou know, like myProc(myClass) can be written as myClass.myProc
11:55:07dom96sxi: You can implement syntax sugar for classes with macros.
11:55:15coffeepotoh yes definitely agree syntax is important
11:55:26dom96http://nim-by-example.github.io/oop_macro/
11:56:38*matkuki joined #nim
11:57:08coffeepothas anyone thought of having an OOP module people can import in?
11:57:16coffeepotin the stdlib
11:57:25sxilooks great!
11:57:51sxiso theses macros are standard in the stdlib as coffeepot has mentioned?
11:58:16dom96They are not. Make a PR to add them and they will likely be added to the stdlib.
11:58:30dom96Even creating a Nimble package for this stuff would be good...
11:59:00coffeepotyeah, even if it's just that class macro, though sure there's plenty of things people could do with macros and OOP
11:59:19*HakanD_____ joined #nim
11:59:48coffeepotwhich reminds me, I need to add my odbc lib to nimble at some stage
12:03:37*nicktick joined #nim
12:06:43matkukiAnyone tried the opengl example 'glut_example.nim' on windows with mingw?
12:06:45matkukiIt compiles ok, but when executed, it throws: 'SIGSEGV: Illegal storage access. (Attempt to read from nil?)' on line 'glutInit()' ?
12:08:57ephjahttps://github.com/nim-lang/opengl/issues/19
12:09:18ephjaTL;DR I'm not sure what causes this
12:09:35ephjaI recommend glfw, but there are several alternatives
12:10:14ephjathe event handling in SDL is awkward. that's nothing a high-level API couldn't fix though
12:10:20matkukiephja: freeglut?
12:11:10ephjahttp://freeglut.sourceforge.net/
12:11:19dom96ephja: TIL you're EXetoC.
12:12:22matkukiThanks! dom96, you read my mind! ephja == EXetoC ?
12:12:27ephjadom96: yo!
12:22:34*sxi quit (Quit: Leaving)
12:23:10*BitPuffin joined #nim
12:30:56*coopernurse quit (Ping timeout: 256 seconds)
12:31:22*coopernurse joined #nim
12:35:32*tankfeeder joined #nim
12:35:52matkukiephja: glfw uses the same functions as glut: glBegin, glVertex3f, ... ?
12:46:33*tankfeeder left #nim ("Leaving")
12:50:18ephjamatkuki: not so much uses them as enables them to be used by setting up an opengl context
13:01:37*HakanD_____ quit (Quit: Be back later ...)
13:02:44*HakanD_____ joined #nim
13:07:42*HakanD_____ quit (Ping timeout: 272 seconds)
13:33:02*Ven_ quit (Ping timeout: 272 seconds)
13:42:57*darkf quit (Read error: Connection reset by peer)
13:43:46*sepisoad joined #nim
13:43:53*darkf joined #nim
13:46:24yglukhovdom96, Araq, what's the policy for unmaintained nimble packages? Can I take one over and rewrite url to my own? At least until original author shows up?
13:46:55dom96Hrm. Something we should think about.
13:47:21dom96Have you tried making PRs to the original author's repo?
13:47:58yglukhovyep. 5 days of silence.
13:48:06*brson joined #nim
13:48:29yglukhovthe package just doesn't compile because of a typo. "pointer" misspeleld as "Pointer"
13:49:05yglukhovhttps://bitbucket.org/BitPuffin/nim-vorbis/pull-requests/2/made-nim-vorbis-work-on-linux/diff
13:49:06*sepisoad quit (Quit: Leaving)
13:49:35*sepisoad joined #nim
13:52:32BitPuffinyglukhov: hmm?
13:52:39yglukhovwow!
13:52:45yglukhovthats cool =)
13:52:48BitPuffinwant me to merge something?
13:53:08yglukhovyes please
13:53:18BitPuffinI'll check
13:53:24yglukhovthanks :)
13:53:35BitPuffin:)
13:55:34BitPuffinyglukhov: should be merged now, ping me if you need anything :)
13:55:54yglukhovgreat, thanks a bunch!
13:56:00*kniteli joined #nim
13:56:08ephjait does compile with earlier versions
14:07:30matkukiephja: Any simple examples of drawing a rectangle or other objects with glfw?
14:11:26yglukhovmatkuki, wanna try nimx? ;)
14:12:09yglukhovBitPuffin, could you please update the tag on nim-vorbis? nimble still seems to fetch the old version :( I'm not sure what to do about that.
14:12:41*Ven joined #nim
14:13:17matkukiyglukhov: Nice, will look at it, but I need openGL for the thing I'm trying.
14:17:24*Ven quit (Client Quit)
14:17:36flyxmatkuki: glfw is not for drawing anything, it is for creating an OpenGL context in your environment. you just use the OpenGL API for drawing.
14:19:32flyxif you want a drawing library that's less low-level, you can probably try SDL
14:22:18*Ven joined #nim
14:22:20matkukiflyx: So I need the opengl library to draw something, right? I can't get Nim's opengl library to work on windows.
14:22:43ephjamatkuki: no, but you could modify the glut example
14:23:08matkukiephja: What needs to be modified?
14:25:16flyxmatkuki: yes. GLUT just provides some convenience functions which also just call OpenGL, so you need to have OpenGL available on your system.
14:25:35ephjamatkuki: I'll port the example
14:25:50*zepolen joined #nim
14:25:54matkukiephja: Thanks!
14:26:20ephjabut everything with the glut prefix would need to be replaced with the equivalent glfw functionality
14:27:00*Ven quit (Client Quit)
14:27:21yglukhovmatkuki, nimx creates gl for you
14:27:27BitPuffinyglukhov: ah you mean the hg tag?
14:28:01yglukhovBitPuffin: yep
14:28:33ephjafoo@#head can be specified in that case
14:30:26yglukhovmatkuki: you can subclass a view and then just use currentContext().gl in nimx. As a bonus you will also be able to compile to webgl.
14:31:01BitPuffinyglukhov: do you know if that's doable from the bitbucket web interface or do I need to clone
14:31:28yglukhovBitPuffin, no idea, sorry. I normally use github =)
14:32:24flyxyglukhov: nimx seems to be a great effort.
14:36:06yglukhovthanks =). You may want to also try rod. We're using nimx+rod for our game.
14:37:34yglukhovBitPuffin, i don't know how hg works, but it seems that you can modify .hgtags from the bitbucket web face. If that helps...
14:38:10BitPuffinyglukhov: I'll just clone it I suppose :P
14:39:17*Ven joined #nim
14:39:55flyxyglukhov: what's rod? it doesn't have a very informative README
14:40:12BitPuffinyglukhov: please try again now
14:40:19yglukhovyeah, sorry for that. Thats a scene-graph 3d/2d engine
14:40:21*nicktick quit (Read error: Connection reset by peer)
14:40:32flyxah, I see
14:41:56*nicktick joined #nim
14:42:07flyxwell if I ever want to build a GUI, I'd much rather use the target system's native toolkits, but for a game which just needs some GUI elements, it seems appropriate.
14:42:10yglukhovBitPuffin: works, thatnks!
14:42:37yglukhovflyx, why?
14:42:41BitPuffinyglukhov: cool, cheers. Nudge me if you ever want more stuff merged
14:43:37flyxyglukhov: user experience. it's very hard for non-native GUI frameworks to duplicate the behavior and style of the native framework.
14:44:16*boopisaway is now known as boop
14:45:49yglukhovflyx. some time ago i was thinking the same ;) but i've changed my opinion. I strongly beleive it's possible to make a cross-platform app with gui that is no worse that native. maybe even better :)
14:46:17yglukhovtake blender for example. i think its really nice.
14:46:47yglukhovgiven that i use macos. windows and linux are way easier to beat :D
14:47:38flyxyglukhov: the point is that it's different. even if it is better, users must adapt to the differences to the native framework. I personally dislike applications that do not follow the standards set by the platform, and so I wouldn't build one.
14:49:55flyxI do agree that special applications which need a complex user interface may be better off using their own, as users must learn how to use it anyway.
14:51:49yglukhovwell the only difference you get is custom-looking controls, which with some effort could be stylized to native-looking, but who cares, if they are already better looking? ;) the difference one should care about is more about behavior. e.g. whould application quit when last window closed? should you use CMD key instead of CTRL? should you support system-wide search buffer on Mac? Maybe a couple more concerns, but that's pretty much it.
14:51:49yglukhov It's pretty easy to keep it portable with tine behavioral changes that are platform dependant.
14:52:37yglukhov* tiny
14:56:14flyxI would say that it is important for controls to look like the native controls. the brain can comprehend the affordances of the GUI elements more easily if they have a familiar look. this may sound like a minor issue, but psychologically, I think it's a rather big one. but ymmv
15:02:32ephjamatkuki: the glut example was buggy
15:03:45ephjaI pushed the fix
15:04:03ephjaif you even need it anymore
15:05:36*pregressive joined #nim
15:06:23*pregressive quit (Client Quit)
15:07:58*pregressive joined #nim
15:09:23*pregressive quit (Read error: Connection reset by peer)
15:09:41*pregressive joined #nim
15:16:19*boop is now known as boopisaway
15:19:13*saml joined #nim
15:23:12*arnetheduck_ joined #nim
15:31:06yglukhovflyx, it was kinda true some time ago. E.g. there was an AHIG (Aqua Human Interface Guideline) for MacOS development, and we tried to follow it as much as we could. But later on Apple started to violate it. And so did i =). Also our company has done a lot of tests, and they showed that users are not really concerned with the controls looking not exactly the same as "native" ones, as long as they remain nice =)
15:31:07*kerze joined #nim
15:32:36yglukhovBesides, every internet user (read "every single user") is used to see different control styles on every different website =)
15:33:39ephjayeah
15:39:25matkukiephja: tried your fix, still no go. When using the freeglut mingw precompiled dll, it shows a black borderless window and then crashes.
15:42:47*nicktick quit (Quit: Leaving.)
15:44:14*Demon_Fox quit (Quit: Leaving)
15:44:51*Amun_Ra quit (Quit: WeeChat 1.0.1)
15:47:36*xiongxin joined #nim
15:52:14*arnetheduck_ quit (Quit: Leaving)
15:54:41matkukigdb gives me an error: Program received signal SIGILL, Illegal instruction. 0x00434a08 in TMP102 ()
16:01:00ephjano nim stack trace?
16:01:32*phao joined #nim
16:05:00matkukiephja: https://bpaste.net/show/3c17781a800b
16:05:01matkukiused --debuginfo and --linedir:on
16:07:39matkukiusing GCC 5.2.0 and GDB 7.9.1
16:11:40cryzedI think I might have found a compiler bug
16:11:45cryzedas unlikely as that sounds
16:13:28ephjanot that unlikely :p
16:14:25cryzedephja, https://gist.github.com/cryzed/a70620d862505feec765
16:14:45cryzedwhen I use line 62 instead of line 50 the compiler crashes with a SIGSEGV
16:15:42cryzedUsing line 50 compiles perfectly fine
16:16:20cryzedam I overlooking something?
16:24:23ephjaI dunno, but it's a bug in any case
16:24:38ephjamatkuki: is it caused by a glut call?
16:24:40*brson quit (Ping timeout: 272 seconds)
16:25:41matkukiephja: Yes, glutMainLoop
16:26:06*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:26:08ephjaoh well
16:26:36matkukiThe glut calls above it work if I 'quit' before the 'glutMainLoop()' line
16:27:13ephjaand this is the version where loadExtensions is followed by glClearColor?
16:27:21cryzedAraq, dom96 ping
16:27:45matkukiephja: yes
16:27:53Araqcryzed: pong
16:28:25cryzedAraq, https://gist.github.com/cryzed/a70620d862505feec765
16:28:28cryzedcheck the discard-comment
16:28:42cryzedI got the compiler to crash finally :D
16:28:59ephjacongratulations
16:29:02cryzednim -v == git hash: 6f09282352341d750332592fa06988102992a276
16:29:20dom96Looks like a problem with template/proc overloading
16:29:29dom96definitely a bug
16:30:43ephjais it possible to use a variable at both compile time and runtime?
16:37:07*xiongxin quit (Quit: Page closed)
16:38:13Araqephja: I don't think so.
16:38:32Araqcryzed: that is the most bizzare bug I have seen in a while
16:39:10cryzedAraq, that's uhm... good to hear? I'm glad I found a bug and hopefully have somehow helped, but I feel I just created more work for you
16:39:11ephjagotta catche mall
16:39:14cryzed:)
16:41:06ephjalet's just shove this one under the rug
16:41:14cryzedhahaha
16:42:12ephjaAraq: is it difficult to implement?
16:43:05Araqephja: the compiler used to support it, but it creates a language that is harder for newbies
16:43:31Araqand it's usually questionable code
16:46:43coffeepotspeaking of bugs, I have this dodgy code that causes a compiler error. It's rubbish, but still https://gist.github.com/coffeepots/f886e46f1a30b1906b09
16:50:32ephjaAraq: I would just like to add some functionality similar to loadExtensions in userland
16:51:22Araqephja: loadExtensions doesn't use compile-time/runtime variables
16:52:34coffeepotare generics a bit funky with templates?
16:53:08Araqcoffeepot: yeah there is a PR that I finally need to review and merge thouhg
16:53:11Araq*though
16:53:26*yglukhov quit (Remote host closed the connection)
16:54:36coffeepotaraq: cool :) well I gather templates are a bit of a special (generic) case anyway, since you have expr and stmt
16:54:37ephjaAraq: yeah beacuse there's compiler support
16:55:21Araqcryzed: found the bug
16:55:30cryzedgreat, that was really quick :)
16:55:41cryzedglad I could help in some way
16:56:28ephjaeither some convenience will have to be removed or I'll have to modify the compiler in order to implement selective loading
16:57:15*matkuki quit (Quit: ChatZilla 0.9.92 [Firefox 42.0/20151029151421])
17:21:44*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
17:28:06Araqephja: well I'd rather have a .lazy or .selective pragma in the language than a .compileAndRunTime
17:28:22Araqbut what problem are you trying to solve?
17:29:30ephjaok
17:30:00*gour joined #nim
17:32:04ephjaAraq: many engines provide fallbacks for cases where certain extensions can't be loaded
17:32:51ephjarather than exiting the program
17:42:31*yglukhov joined #nim
17:44:23cryzedquick question, is it possible to assign the "return" value of a case statement?
17:44:26cryzedI guess I could check
17:47:00*yglukhov quit (Ping timeout: 272 seconds)
17:57:26*vendethiel joined #nim
18:00:35*Senketsu quit (Quit: Leaving)
18:02:22cryzedIs there something like a really simple parsing module, that's not quite regex?
18:02:30cryzedI was thinking the reverse of string formatting
18:02:46cryzedonly characters in the format string count as delimiters, and {} or $1 $2 etc. are the parsed results
18:08:14strcmp1maybe http://nim-lang.org/docs/pegs.html
18:17:34*mtj_ quit (Ping timeout: 260 seconds)
18:18:06*Senketsu joined #nim
18:21:38*gour_ joined #nim
18:22:06*Senketsu quit (Client Quit)
18:22:13*pregress_ joined #nim
18:22:15*pregressive quit (Read error: Connection reset by peer)
18:22:46ephjathe problem is, it doesn't output a tree
18:23:01ephjahttp://nim-lang.org/docs/parseutils.html
18:23:04ephjahttps://github.com/Araq/lexim
18:25:00*gour quit (Ping timeout: 272 seconds)
18:27:06cryzedstrcmp1, ephja! thanks
18:27:15cryzedvar grid: array[1000, array[1000, int]] -- by the way, does this allocate too much ram for a 32bit version?
18:27:30cryzedit shouldn't right? each int is 4 bytes, so that's 1mil times 4 bytes... 4mb?
18:27:49cryzedbecause when I try to use it my compiled program crashes after starting
18:30:22ephjayou might have hit the stack limit
18:30:42cryzedIs there a way to avoid that?
18:31:01cryzedsmarter data structure?
18:31:48ephjadynamic allocation: new(array[1000, array[1000, int]])
18:32:23ephjait's possible to increase the stack size, but it would be overkill
18:32:44*sepisoad quit (Read error: Connection reset by peer)
18:33:11cryzedSo this data structure would be put on the heap?
18:38:07ephjayes, on the GC heap (ref T). create/alloc gives you an untraced pointer (ptr T)
18:38:31cryzedephja, thank you. I also had to use mitems explicitly instead of the regular for x in y, since that would copy the whole dereferenced data-structure
18:38:44*gour_ is now known as gour
18:38:46cryzed... right? I'm just saying stuff in hopes of you contradciting me
18:38:52cryzedwith a better solution
18:39:29*aziz joined #nim
18:42:12*yglukhov joined #nim
18:46:55cryzedAlso where is the end keyword used in nim
18:47:18def-cryzed: maybe it's reserved just in case
18:47:28cryzedah ok
19:00:25cryzeddom96, waiting for that Nim IRC Nyx client
19:00:28cryzed;)
19:00:49*Senketsu joined #nim
19:00:53dom96hah, won't happen. I've grown to hate GTK.
19:01:16cryzedI didn't specify GTK :D
19:01:30cryzedWhat do you like now?
19:03:22*ephja quit (Ping timeout: 250 seconds)
19:06:03*ephja joined #nim
19:06:51dom96Still need to give Qt, WxWidgets and anything else I can find a try.
19:07:03dom96So I don't know what I like :P
19:08:11cryzedQt is pretty neat, except the namespace pollution with the Q thing
19:09:37ephjacryzed: did you get my response?
19:09:39*solidsnack joined #nim
19:09:41ephjathe logs to the rescue
19:09:58cryzedephja, only the : <ephja> yes, on the GC heap (ref T). create/alloc gives you an untraced pointer (ptr T)
19:10:31ephjacryzed: if an iterator is not passed to for, then it's going to look for either 'items' or 'pairs' depending on whether one or two arguments have been specified
19:10:44ephjaand the dereference isn't really relevant
19:11:07cryzedephja, this: for row in grid[]: crashes my code
19:11:10cryzedthis: for row in mitems(grid[]):
19:11:11cryzeddoesn't
19:11:22cryzedI assume because for mitems the type is specified as var seq[T] instead of seq[T]
19:11:38cryzedso it doesn't copy the whole data-structure when passing it to items implicitly
19:12:03cryzed(this is after I used dynamic allocation)
19:13:35ephjaright
19:13:35*solidsnack quit (Ping timeout: 240 seconds)
19:14:00ephjaso it's copied to the stack then? it would have been nice if that wasn't the case
19:14:07cryzedephja, it seems to be, yes
19:14:13cryzedand I agree
19:14:32*Senketsu quit (Quit: Leaving)
19:21:38*phao left #nim ("Leaving")
19:21:43*yglukhov quit (Remote host closed the connection)
19:27:09*matkuki joined #nim
19:28:03*jaco60 joined #nim
19:29:17*Matthias247 joined #nim
19:29:20*mtj_ joined #nim
19:30:46*Matthias247 quit (Read error: Connection reset by peer)
19:38:44matkukicompiling on windows with vc++ gives me this error:
19:38:45matkukiC:\Nim\lib\nimbase.h(183) : fatal error C1083: Cannot open include file: 'limits.h': No such file or directory
19:38:47matkukiAnyone?
19:40:52*Matthias247 joined #nim
19:40:59matkukiAraq?
19:41:04*kerze quit (Ping timeout: 250 seconds)
19:45:58matkukiOk, my path was wrong.
19:48:16matkukiNow I have a linker error: LINK : fatal error LNK1104: cannot open file 'LIBC.lib'
19:50:40*BitPuffin quit (Ping timeout: 256 seconds)
20:09:26def-matkuki: maybe your linker path is wrong now
20:10:10matkukidef-: where is this set?
20:11:10def-matkuki: not the slightest idea, sorry
20:11:59matkukiI'm compiling from the vc command line now, so I think that the path are setup automatically.
20:12:17*vendethiel- joined #nim
20:13:54*vendethiel quit (Ping timeout: 256 seconds)
20:14:52*brson joined #nim
20:15:02*zepolen quit (Remote host closed the connection)
20:16:54*zepolen joined #nim
20:17:35matkukiThanks anyway def-, I'm giving up on using glut and opengl directly.
20:17:36matkukiCuriously, opengl works through the sdl2 library using mingw-64 compiler. Go figure.
20:18:00*zepolen quit (Remote host closed the connection)
20:19:18ephjayes but glut was the culprit, not opengl, right?
20:27:38*yglukhov joined #nim
20:29:03*yglukhov quit (Remote host closed the connection)
20:29:47*desophos joined #nim
20:44:50*zepolen joined #nim
20:45:11*Amun_Ra joined #nim
20:47:03*krux02 joined #nim
20:48:09krux02does anybody know how I can get the element type of a seq in a template?
20:49:06krux02I have a template with a type argument that is only allowed to be a seq type, and I would like to know the element type of its elemnt that I can use in template metaprogramming
20:52:30def-krux02: type(mySeq[0])?
20:54:07ephjas[0].type?
20:57:19*HakanD_____ joined #nim
21:04:29krux02if that evaluated at compile time? It should work on empty seq, too
21:08:04def-krux02: yes
21:10:07krux02def-: cool thank you
21:18:02*darkf quit (Quit: Leaving)
21:20:21matkukiephja: In your glfw 'events' example, what needs to be added so that opengl can be used?
21:23:02matkukisomething like this: https://bpaste.net/show/23cea92e5500
21:26:49krux02def-: what do I do in a context, where I only have the type, not a valve, and I would like to get the type of the elements then
21:27:22krux02def-: something like this template elementType(t : type seq): type = [...]
21:28:32*Senketsu joined #nim
21:29:35*gour quit (Ping timeout: 240 seconds)
21:34:34*Jesin joined #nim
21:41:45*mat4 joined #nim
21:47:42matkukiephja?
21:47:43ephjamatkuki: while not window.shouldClose: render(); window.update()
21:48:04matkukiok, let me try...
21:48:06ephjaand loadExtensions after the window has been created I think
21:55:19matkukiYes, it works! Also had to add window.makeContextCurrent(), otherwise I get 'Error: unhandled exception: OpenGL error: invalid operation [GLerror]'. Why?
22:02:29matkukiephja: What does window.makeContextCurrent() do?
22:06:02ephjathat's what was missing in my example!
22:07:24ephjamatkuki: it sets the active window for the current thread
22:07:44ephjaI forgot it and so any opengl operations that I tried to execute were being ignored
22:08:39matkukiIt happens, I'm just glad it works. Thanks for the help!
22:13:23matkukiephja: You OK with a PR with more examples later this week, when I play with glfw some more?
22:18:12*Trustable quit (Remote host closed the connection)
22:25:13ephjasure
22:32:02*mat4 quit (Quit: Verlassend)
22:47:39*matkuki quit (Quit: ChatZilla 0.9.92 [Firefox 42.0/20151029151421])
22:51:44*vendethiel- quit (Ping timeout: 250 seconds)
22:52:28cryzedHas anyone been planning to create a Qt5 binding for Nim?
23:06:39*HakanD_____ quit (Quit: Be back later ...)
23:16:52*BitPuffin|osx joined #nim
23:19:02*aziz quit (Remote host closed the connection)
23:20:48*ephja quit (Quit: WeeChat 1.3)
23:22:57*zepolen quit (Remote host closed the connection)
23:24:48*brson quit (Quit: leaving)
23:39:36*krux02 quit (Ping timeout: 252 seconds)
23:49:55*jaco60 quit (Ping timeout: 240 seconds)
23:58:20Araqcryzed: hrm, are you sure this doesn't exist already?