00:55:31 | onionhammer | no 1 reason why i dont like crystal is it isnt x-platform |
01:01:44 | kulelu88 | what does that mean? onionhammer |
01:02:11 | onionhammer | meaning theres no windows version of the compiler |
01:02:54 | onionhammer | http://crystal-lang.org/docs/installation/index.html |
01:03:49 | * | Sornaensis quit (Excess Flood) |
01:04:12 | * | Sornaensis joined #nim |
01:04:28 | kulelu88 | Does that matter much though? I would assume most devs are using some OS related to a linux kernel |
01:04:35 | M-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:53 | cryzed | So is it just me or does... |
01:49:49 | cryzed | ah nevermind |
01:51:10 | cryzed | I ran into something like |
01:51:15 | cryzed | if not dimensions.len == 3 |
01:51:16 | cryzed | a few times now |
01:51:30 | cryzed | I expected it to be if not (dimensions.len == 3), but in reality it is if (not dimensions.len) == 3 |
01:51:38 | cryzed | and not actually works on ints, as a binary operation |
02:00:38 | * | solidsnack joined #nim |
02:05:44 | cryzed | Do tuples have something like .values? |
02:06:01 | cryzed | ah I guess they are just sequences |
02:08:35 | cryzed | ah I guess they are just sequences |
02:12:38 | cryzed | Whoops |
02:20:25 | * | xiongxin joined #nim |
02:28:02 | * | phao quit (Ping timeout: 272 seconds) |
02:30:05 | cryzed | Is there a reason why system.cmp isn't the default argument for algorithm.sorted(cmp=)? |
03:00:23 | cryzed | https://gist.github.com/cryzed/4fc4ab0b36a0a2caed69 I'm getting (14, 11) Error: cannot instantiate: 'T' |
03:00:25 | cryzed | Any idea as to why? |
03:01:41 | cryzed | ah I got it, I forgot to specify [T] for matrix |
03:09:47 | cryzed | ah I got it, I forgot to specify [T] for matrix |
03:09:50 | cryzed | goddamit |
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:23 | cryzed | https://gist.github.com/cryzed/04258b914db2f1c69b25 I might have overengineered the beginning of one of the "advent of code" solutions |
04:18:45 | cryzed | I definitely feel I've gotten better at Nim recently though :). Sorry for spamming this channel so much |
04:21:13 | def- | 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:32 | cryzed | wait |
04:21:37 | cryzed | an infinitematrix thing existed? |
04:22:08 | def- | ehm, i think i just used a hash table |
04:22:25 | cryzed | ah yes |
04:22:27 | cryzed | might have been smarter |
04:22:29 | cryzed | it probably is. |
04:22:39 | cryzed | ugh. |
04:23:12 | cryzed | whatever, now it's done |
04:23:43 | cryzed | the advantage of yours is less memory consumption, lazy initializing, probably O(1) access time and support of negative indexing |
04:23:46 | cryzed | mine... sucks |
04:23:51 | cryzed | :C |
04:25:06 | * | nicktick quit (Ping timeout: 240 seconds) |
04:29:42 | cryzed | def-, 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:37 | onionhammer | kulelu88 Does that matter much though? I would assume most devs are using some OS related to a linux kernel |
04:49:39 | onionhammer | umm |
04:49:41 | onionhammer | yeah no i doubt that |
04:49:44 | onionhammer | most devs are probably on windows |
04:50:13 | onionhammer | also 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:56 | onionhammer | 9% of desktop users are on OS X, linux are even smaller portions |
04:54:20 | onionhammer | 48% win, 30% nix based |
04:56:16 | strcmp1 | those stats are from where |
04:56:18 | strcmp1 | the NSA? |
04:56:30 | onionhammer | wikipedia |
04:56:39 | strcmp1 | and where are those stats from |
04:56:51 | onionhammer | go to wikipedia and find out |
04:57:00 | strcmp1 | could you provide the link |
04:58:03 | strcmp1 | windows has only become more irrelevent as time has gone by, and id be suspicious about those stats in general. |
04:59:42 | strcmp1 | if the stats are based on purchases, theyre obviously very flawed |
05:00:06 | cryzed | def-, https://gist.github.com/cryzed/82e13ed5e51a4e0f01c0 improved version |
05:00:09 | cryzed | thanks for the set tip :) |
05:00:14 | cryzed | makes for much better code |
05:00:24 | cryzed | day 03 for the record |
05:00:40 | cryzed | your solution is still a bit neater |
05:01:08 | onionhammer | you're mad if you think windows is any way irrelevant |
05:01:18 | onionhammer | or just completely misinformed |
05:01:41 | strcmp1 | i 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:36 | onionhammer | less relevant then? |
05:03:40 | onionhammer | not "more irrelevant" |
05:03:53 | strcmp1 | sorry yes |
05:03:54 | strcmp1 | less |
05:03:58 | strcmp1 | less relevent |
05:04:06 | strcmp1 | thank you for the grammar correction |
05:05:22 | onionhammer | logic correction ;) |
05:05:45 | strcmp1 | yeah, i dont see that it that way |
05:05:59 | strcmp1 | and youre now entering a space of gibberish to avoid the actual topic |
05:06:00 | strcmp1 | so 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:26 | dv- | 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:59 | Araq | dv-: 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:11 | dv- | 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:34 | sxi | hi guys, do you still need anyone to work on the GSoC projects? |
10:58:10 | sxi | i 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:38 | coffeepot | All 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:20 | coffeepot | for opencl |
11:01:30 | coffeepot | rather, not shader |
11:01:50 | sxi | ah i just realized it's already over isnt it :D |
11:02:22 | coffeepot | yes, 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:53 | sxi | yes true |
11:03:05 | sxi | i'm also doing some gpu related work in deep learning |
11:03:26 | coffeepot | ooo interesting! Are you using opencl? |
11:03:40 | sxi | nah just theano |
11:03:50 | sxi | the "standard" python library which uses cuda |
11:04:39 | sxi | the gpu speedup is quite amazing |
11:05:39 | sxi | a big weakness in python for scientific computing is it's speed |
11:06:30 | coffeepot | learning to use the gpu is definitely on my todo list, the benefits can be incredible for certain tasks |
11:06:54 | coffeepot | yeah I really got into python before i realise it wasn't very fast at all |
11:07:25 | sxi | i actually haven't learnt cuda but theano is so high level you don't need to touch that much :) |
11:07:59 | sxi | with what i've seen in nim so far it combines python's tight syntax with low level optimizations, which is quite fascinating |
11:08:27 | coffeepot | yeah, plus something that isn't mentioned enough is the metaprogramming in nim, it's really impressive |
11:09:28 | coffeepot | and the generics, i mean it's great being able to write proc a(val: int|string|float) for example |
11:10:10 | coffeepot | and still have type safety |
11:10:22 | sxi | yeah |
11:10:37 | sxi | does nim still have GSoC or is that over? |
11:11:05 | coffeepot | I don't know, def- you about to comment? |
11:12:05 | coffeepot | or perhaps dom96 ? |
11:12:50 | dom96 | sxi: We didn't get accepted for GSoC |
11:13:04 | dom96 | You're more than welcome to work on the GSoC projects in your spare time though |
11:13:18 | sxi | ouch google likes go too much doesnt it |
11:14:06 | sxi | so the GSoC 2015 projects are still all up for grabs? |
11:16:55 | coffeepot | I would say so yes :) |
11:17:33 | coffeepot | I know there's been much talk of high level gaming frameworks |
11:17:45 | coffeepot | Nim being well suited to games |
11:18:13 | coffeepot | plenty of examples but no overriding favourite as yet |
11:19:52 | sxi | i 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:51 | coffeepot | no 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:54 | sxi | i'm quite interested in applying it to do scientific programming |
11:21:36 | coffeepot | have you seen the list? https://github.com/nim-lang/Nim/wiki/GSoC-2015-Ideas |
11:21:55 | sxi | yeah that was why i came here asking about GSoC :) |
11:22:24 | coffeepot | hehe thought so XD Anything in there that tickles your fancy? |
11:24:36 | sxi | from a glance: "nimfmt: Automatically format Nim code" "Add a code generator for OpenCL" "Improve the JavaScript backend" |
11:25:09 | sxi | also saw this project yesterday: https://github.com/unicredit/linear-algebra |
11:25:26 | sxi | i think it's a "numpy for nim" starter |
11:25:42 | coffeepot | Yeah I saw that on the forums, looks really interesting |
11:26:51 | * | jackv joined #nim |
11:27:06 | coffeepot | well they all sound like a great addition to Nim. Personally I'm interested in the OpenCl addition but all are good :D |
11:28:11 | coffeepot | opencl could be a great way to parallelise algorithms |
11:28:45 | sxi | yup nvidia i think tends to do everything in cuda |
11:29:09 | sxi | so a cuda one could also be useful |
11:29:19 | coffeepot | it's annoying amd and nvidia both have different interfaces to them! |
11:29:23 | coffeepot | yeah definitely |
11:30:05 | coffeepot | doesn't opencl work on both cards? |
11:30:21 | sxi | yea but i think cuda might have more nvidia optimizations |
11:30:41 | coffeepot | and cuda just nvidia? Tho I've heard cuda is nicer, but i don't know the details |
11:31:49 | sxi | yes cuda just nvidia |
11:33:00 | sxi | i'll definitely try and contribute if i have time, though GSoC does make things easier by having these set tasks and deadlines |
11:33:30 | sxi | so without GSoC is the mentors thing off and contributing is github as usual? |
11:34:23 | coffeepot | I'd imagine people would be fairly willing to help even if they're not 'mentoring' |
11:34:40 | coffeepot | any questions just ask here or on the forums :) |
11:34:58 | sxi | but then would it be the more github way of helping, i.e. PR - comment - update |
11:35:52 | coffeepot | github, yes definitely but this channel is also often pretty helpful too :) |
11:36:03 | sxi | ok got it |
11:36:17 | coffeepot | besides, it sounds like interesting stuff! I'm sure people who can will be glad to help :D |
11:36:59 | coffeepot | there'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:03 | coffeepot | didn't realise linear-algebra does have some cuda support :-o |
11:40:38 | coffeepot | might be useful for examples |
11:40:42 | sxi | indeed, though i think that was what gpus were meant for in the first place |
11:40:58 | sxi | you an active contributor coffeepot ? |
11:41:34 | coffeepot | not really, made an odbc lib (https://github.com/coffeepots/odbc) so far but not much else! |
11:42:07 | coffeepot | hoping to make some headway on some gaming related projects over xmas |
11:43:10 | sxi | i got to get some results out over xmas for uni |
11:43:36 | coffeepot | ah fair enough, don't envy you - been a long time since I was at uni XD |
11:44:06 | coffeepot | would the linear algebra lib help? |
11:44:38 | sxi | it's like a prereq for scientific anything so it's a great starting point for nim |
11:44:50 | coffeepot | yeah :) |
11:45:24 | sxi | btw nim doesn't have classes does it? |
11:45:40 | coffeepot | yeah, basically object is class |
11:46:21 | coffeepot | if you want it with pointer semantics (as in not copy on read) then ref object :) |
11:46:56 | coffeepot | objects support inheritence |
11:47:07 | coffeepot | *inheritance |
11:47:26 | coffeepot | with methods you get dynamic binding |
11:47:29 | sxi | so does it have mixins? |
11:47:55 | sxi | i read somewhere the inheritance is just single |
11:48:08 | sxi | but mixins are often handy |
11:48:50 | coffeepot | like this? http://nim-lang.org/docs/manual.html#generics-symbol-lookup-in-generics |
11:51:02 | coffeepot | there are also typeclasses for defining generic objects |
11:52:45 | sxi | ok i think the "concepts" section could be a kind of mixin |
11:52:57 | sxi | but nim has no syntactic sugar for classes? |
11:53:00 | coffeepot | yes, sorry that's what i meant by typeclasses |
11:53:16 | coffeepot | what kind of sugar do you mean? |
11:53:30 | sxi | well javascript for example, used to have prototype to implement classes |
11:53:37 | sxi | but it bowed in to pressure eventually |
11:53:42 | sxi | and ES6 now has the "class" keyword |
11:54:06 | coffeepot | not sure if it's needed really |
11:54:17 | * | HakanD_____ quit (Quit: Be back later ...) |
11:54:22 | coffeepot | there's UFCS of course, which is great |
11:54:53 | sxi | well it might not be, but my point is that simple to use syntax is very important at the end of the day |
11:54:59 | coffeepot | you know, like myProc(myClass) can be written as myClass.myProc |
11:55:07 | dom96 | sxi: You can implement syntax sugar for classes with macros. |
11:55:15 | coffeepot | oh yes definitely agree syntax is important |
11:55:26 | dom96 | http://nim-by-example.github.io/oop_macro/ |
11:56:38 | * | matkuki joined #nim |
11:57:08 | coffeepot | has anyone thought of having an OOP module people can import in? |
11:57:16 | coffeepot | in the stdlib |
11:57:25 | sxi | looks great! |
11:57:51 | sxi | so theses macros are standard in the stdlib as coffeepot has mentioned? |
11:58:16 | dom96 | They are not. Make a PR to add them and they will likely be added to the stdlib. |
11:58:30 | dom96 | Even creating a Nimble package for this stuff would be good... |
11:59:00 | coffeepot | yeah, 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:48 | coffeepot | which reminds me, I need to add my odbc lib to nimble at some stage |
12:03:37 | * | nicktick joined #nim |
12:06:43 | matkuki | Anyone tried the opengl example 'glut_example.nim' on windows with mingw? |
12:06:45 | matkuki | It compiles ok, but when executed, it throws: 'SIGSEGV: Illegal storage access. (Attempt to read from nil?)' on line 'glutInit()' ? |
12:08:57 | ephja | https://github.com/nim-lang/opengl/issues/19 |
12:09:18 | ephja | TL;DR I'm not sure what causes this |
12:09:35 | ephja | I recommend glfw, but there are several alternatives |
12:10:14 | ephja | the event handling in SDL is awkward. that's nothing a high-level API couldn't fix though |
12:10:20 | matkuki | ephja: freeglut? |
12:11:10 | ephja | http://freeglut.sourceforge.net/ |
12:11:19 | dom96 | ephja: TIL you're EXetoC. |
12:12:22 | matkuki | Thanks! dom96, you read my mind! ephja == EXetoC ? |
12:12:27 | ephja | dom96: 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:52 | matkuki | ephja: glfw uses the same functions as glut: glBegin, glVertex3f, ... ? |
12:46:33 | * | tankfeeder left #nim ("Leaving") |
12:50:18 | ephja | matkuki: 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:24 | yglukhov | dom96, 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:55 | dom96 | Hrm. Something we should think about. |
13:47:21 | dom96 | Have you tried making PRs to the original author's repo? |
13:47:58 | yglukhov | yep. 5 days of silence. |
13:48:06 | * | brson joined #nim |
13:48:29 | yglukhov | the package just doesn't compile because of a typo. "pointer" misspeleld as "Pointer" |
13:49:05 | yglukhov | https://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:32 | BitPuffin | yglukhov: hmm? |
13:52:39 | yglukhov | wow! |
13:52:45 | yglukhov | thats cool =) |
13:52:48 | BitPuffin | want me to merge something? |
13:53:08 | yglukhov | yes please |
13:53:18 | BitPuffin | I'll check |
13:53:24 | yglukhov | thanks :) |
13:53:35 | BitPuffin | :) |
13:55:34 | BitPuffin | yglukhov: should be merged now, ping me if you need anything :) |
13:55:54 | yglukhov | great, thanks a bunch! |
13:56:00 | * | kniteli joined #nim |
13:56:08 | ephja | it does compile with earlier versions |
14:07:30 | matkuki | ephja: Any simple examples of drawing a rectangle or other objects with glfw? |
14:11:26 | yglukhov | matkuki, wanna try nimx? ;) |
14:12:09 | yglukhov | BitPuffin, 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:17 | matkuki | yglukhov: Nice, will look at it, but I need openGL for the thing I'm trying. |
14:17:24 | * | Ven quit (Client Quit) |
14:17:36 | flyx | matkuki: 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:32 | flyx | if you want a drawing library that's less low-level, you can probably try SDL |
14:22:18 | * | Ven joined #nim |
14:22:20 | matkuki | flyx: So I need the opengl library to draw something, right? I can't get Nim's opengl library to work on windows. |
14:22:43 | ephja | matkuki: no, but you could modify the glut example |
14:23:08 | matkuki | ephja: What needs to be modified? |
14:25:16 | flyx | matkuki: yes. GLUT just provides some convenience functions which also just call OpenGL, so you need to have OpenGL available on your system. |
14:25:35 | ephja | matkuki: I'll port the example |
14:25:50 | * | zepolen joined #nim |
14:25:54 | matkuki | ephja: Thanks! |
14:26:20 | ephja | but everything with the glut prefix would need to be replaced with the equivalent glfw functionality |
14:27:00 | * | Ven quit (Client Quit) |
14:27:21 | yglukhov | matkuki, nimx creates gl for you |
14:27:27 | BitPuffin | yglukhov: ah you mean the hg tag? |
14:28:01 | yglukhov | BitPuffin: yep |
14:28:33 | ephja | foo@#head can be specified in that case |
14:30:26 | yglukhov | matkuki: 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:01 | BitPuffin | yglukhov: do you know if that's doable from the bitbucket web interface or do I need to clone |
14:31:28 | yglukhov | BitPuffin, no idea, sorry. I normally use github =) |
14:32:24 | flyx | yglukhov: nimx seems to be a great effort. |
14:36:06 | yglukhov | thanks =). You may want to also try rod. We're using nimx+rod for our game. |
14:37:34 | yglukhov | BitPuffin, 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:10 | BitPuffin | yglukhov: I'll just clone it I suppose :P |
14:39:17 | * | Ven joined #nim |
14:39:55 | flyx | yglukhov: what's rod? it doesn't have a very informative README |
14:40:12 | BitPuffin | yglukhov: please try again now |
14:40:19 | yglukhov | yeah, sorry for that. Thats a scene-graph 3d/2d engine |
14:40:21 | * | nicktick quit (Read error: Connection reset by peer) |
14:40:32 | flyx | ah, I see |
14:41:56 | * | nicktick joined #nim |
14:42:07 | flyx | well 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:10 | yglukhov | BitPuffin: works, thatnks! |
14:42:37 | yglukhov | flyx, why? |
14:42:41 | BitPuffin | yglukhov: cool, cheers. Nudge me if you ever want more stuff merged |
14:43:37 | flyx | yglukhov: 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:49 | yglukhov | flyx. 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:17 | yglukhov | take blender for example. i think its really nice. |
14:46:47 | yglukhov | given that i use macos. windows and linux are way easier to beat :D |
14:47:38 | flyx | yglukhov: 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:55 | flyx | I 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:49 | yglukhov | well 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:49 | yglukhov | It's pretty easy to keep it portable with tine behavioral changes that are platform dependant. |
14:52:37 | yglukhov | * tiny |
14:56:14 | flyx | I 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:32 | ephja | matkuki: the glut example was buggy |
15:03:45 | ephja | I pushed the fix |
15:04:03 | ephja | if 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:06 | yglukhov | flyx, 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:36 | yglukhov | Besides, every internet user (read "every single user") is used to see different control styles on every different website =) |
15:33:39 | ephja | yeah |
15:39:25 | matkuki | ephja: 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:41 | matkuki | gdb gives me an error: Program received signal SIGILL, Illegal instruction. 0x00434a08 in TMP102 () |
16:01:00 | ephja | no nim stack trace? |
16:01:32 | * | phao joined #nim |
16:05:00 | matkuki | ephja: https://bpaste.net/show/3c17781a800b |
16:05:01 | matkuki | used --debuginfo and --linedir:on |
16:07:39 | matkuki | using GCC 5.2.0 and GDB 7.9.1 |
16:11:40 | cryzed | I think I might have found a compiler bug |
16:11:45 | cryzed | as unlikely as that sounds |
16:13:28 | ephja | not that unlikely :p |
16:14:25 | cryzed | ephja, https://gist.github.com/cryzed/a70620d862505feec765 |
16:14:45 | cryzed | when I use line 62 instead of line 50 the compiler crashes with a SIGSEGV |
16:15:42 | cryzed | Using line 50 compiles perfectly fine |
16:16:20 | cryzed | am I overlooking something? |
16:24:23 | ephja | I dunno, but it's a bug in any case |
16:24:38 | ephja | matkuki: is it caused by a glut call? |
16:24:40 | * | brson quit (Ping timeout: 272 seconds) |
16:25:41 | matkuki | ephja: Yes, glutMainLoop |
16:26:06 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:26:08 | ephja | oh well |
16:26:36 | matkuki | The glut calls above it work if I 'quit' before the 'glutMainLoop()' line |
16:27:13 | ephja | and this is the version where loadExtensions is followed by glClearColor? |
16:27:21 | cryzed | Araq, dom96 ping |
16:27:45 | matkuki | ephja: yes |
16:27:53 | Araq | cryzed: pong |
16:28:25 | cryzed | Araq, https://gist.github.com/cryzed/a70620d862505feec765 |
16:28:28 | cryzed | check the discard-comment |
16:28:42 | cryzed | I got the compiler to crash finally :D |
16:28:59 | ephja | congratulations |
16:29:02 | cryzed | nim -v == git hash: 6f09282352341d750332592fa06988102992a276 |
16:29:20 | dom96 | Looks like a problem with template/proc overloading |
16:29:29 | dom96 | definitely a bug |
16:30:43 | ephja | is it possible to use a variable at both compile time and runtime? |
16:37:07 | * | xiongxin quit (Quit: Page closed) |
16:38:13 | Araq | ephja: I don't think so. |
16:38:32 | Araq | cryzed: that is the most bizzare bug I have seen in a while |
16:39:10 | cryzed | Araq, 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:11 | ephja | gotta catche mall |
16:39:14 | cryzed | :) |
16:41:06 | ephja | let's just shove this one under the rug |
16:41:14 | cryzed | hahaha |
16:42:12 | ephja | Araq: is it difficult to implement? |
16:43:05 | Araq | ephja: the compiler used to support it, but it creates a language that is harder for newbies |
16:43:31 | Araq | and it's usually questionable code |
16:46:43 | coffeepot | speaking 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:32 | ephja | Araq: I would just like to add some functionality similar to loadExtensions in userland |
16:51:22 | Araq | ephja: loadExtensions doesn't use compile-time/runtime variables |
16:52:34 | coffeepot | are generics a bit funky with templates? |
16:53:08 | Araq | coffeepot: yeah there is a PR that I finally need to review and merge thouhg |
16:53:11 | Araq | *though |
16:53:26 | * | yglukhov quit (Remote host closed the connection) |
16:54:36 | coffeepot | araq: cool :) well I gather templates are a bit of a special (generic) case anyway, since you have expr and stmt |
16:54:37 | ephja | Araq: yeah beacuse there's compiler support |
16:55:21 | Araq | cryzed: found the bug |
16:55:30 | cryzed | great, that was really quick :) |
16:55:41 | cryzed | glad I could help in some way |
16:56:28 | ephja | either 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:06 | Araq | ephja: well I'd rather have a .lazy or .selective pragma in the language than a .compileAndRunTime |
17:28:22 | Araq | but what problem are you trying to solve? |
17:29:30 | ephja | ok |
17:30:00 | * | gour joined #nim |
17:32:04 | ephja | Araq: many engines provide fallbacks for cases where certain extensions can't be loaded |
17:32:51 | ephja | rather than exiting the program |
17:42:31 | * | yglukhov joined #nim |
17:44:23 | cryzed | quick question, is it possible to assign the "return" value of a case statement? |
17:44:26 | cryzed | I 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:22 | cryzed | Is there something like a really simple parsing module, that's not quite regex? |
18:02:30 | cryzed | I was thinking the reverse of string formatting |
18:02:46 | cryzed | only characters in the format string count as delimiters, and {} or $1 $2 etc. are the parsed results |
18:08:14 | strcmp1 | maybe 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:46 | ephja | the problem is, it doesn't output a tree |
18:23:01 | ephja | http://nim-lang.org/docs/parseutils.html |
18:23:04 | ephja | https://github.com/Araq/lexim |
18:25:00 | * | gour quit (Ping timeout: 272 seconds) |
18:27:06 | cryzed | strcmp1, ephja! thanks |
18:27:15 | cryzed | var grid: array[1000, array[1000, int]] -- by the way, does this allocate too much ram for a 32bit version? |
18:27:30 | cryzed | it shouldn't right? each int is 4 bytes, so that's 1mil times 4 bytes... 4mb? |
18:27:49 | cryzed | because when I try to use it my compiled program crashes after starting |
18:30:22 | ephja | you might have hit the stack limit |
18:30:42 | cryzed | Is there a way to avoid that? |
18:31:01 | cryzed | smarter data structure? |
18:31:48 | ephja | dynamic allocation: new(array[1000, array[1000, int]]) |
18:32:23 | ephja | it'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:11 | cryzed | So this data structure would be put on the heap? |
18:38:07 | ephja | yes, on the GC heap (ref T). create/alloc gives you an untraced pointer (ptr T) |
18:38:31 | cryzed | ephja, 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:46 | cryzed | ... right? I'm just saying stuff in hopes of you contradciting me |
18:38:52 | cryzed | with a better solution |
18:39:29 | * | aziz joined #nim |
18:42:12 | * | yglukhov joined #nim |
18:46:55 | cryzed | Also where is the end keyword used in nim |
18:47:18 | def- | cryzed: maybe it's reserved just in case |
18:47:28 | cryzed | ah ok |
19:00:25 | cryzed | dom96, waiting for that Nim IRC Nyx client |
19:00:28 | cryzed | ;) |
19:00:49 | * | Senketsu joined #nim |
19:00:53 | dom96 | hah, won't happen. I've grown to hate GTK. |
19:01:16 | cryzed | I didn't specify GTK :D |
19:01:30 | cryzed | What do you like now? |
19:03:22 | * | ephja quit (Ping timeout: 250 seconds) |
19:06:03 | * | ephja joined #nim |
19:06:51 | dom96 | Still need to give Qt, WxWidgets and anything else I can find a try. |
19:07:03 | dom96 | So I don't know what I like :P |
19:08:11 | cryzed | Qt is pretty neat, except the namespace pollution with the Q thing |
19:09:37 | ephja | cryzed: did you get my response? |
19:09:39 | * | solidsnack joined #nim |
19:09:41 | ephja | the logs to the rescue |
19:09:58 | cryzed | ephja, only the : <ephja> yes, on the GC heap (ref T). create/alloc gives you an untraced pointer (ptr T) |
19:10:31 | ephja | cryzed: 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:44 | ephja | and the dereference isn't really relevant |
19:11:07 | cryzed | ephja, this: for row in grid[]: crashes my code |
19:11:10 | cryzed | this: for row in mitems(grid[]): |
19:11:11 | cryzed | doesn't |
19:11:22 | cryzed | I assume because for mitems the type is specified as var seq[T] instead of seq[T] |
19:11:38 | cryzed | so it doesn't copy the whole data-structure when passing it to items implicitly |
19:12:03 | cryzed | (this is after I used dynamic allocation) |
19:13:35 | ephja | right |
19:13:35 | * | solidsnack quit (Ping timeout: 240 seconds) |
19:14:00 | ephja | so it's copied to the stack then? it would have been nice if that wasn't the case |
19:14:07 | cryzed | ephja, it seems to be, yes |
19:14:13 | cryzed | and 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:44 | matkuki | compiling on windows with vc++ gives me this error: |
19:38:45 | matkuki | C:\Nim\lib\nimbase.h(183) : fatal error C1083: Cannot open include file: 'limits.h': No such file or directory |
19:38:47 | matkuki | Anyone? |
19:40:52 | * | Matthias247 joined #nim |
19:40:59 | matkuki | Araq? |
19:41:04 | * | kerze quit (Ping timeout: 250 seconds) |
19:45:58 | matkuki | Ok, my path was wrong. |
19:48:16 | matkuki | Now 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:26 | def- | matkuki: maybe your linker path is wrong now |
20:10:10 | matkuki | def-: where is this set? |
20:11:10 | def- | matkuki: not the slightest idea, sorry |
20:11:59 | matkuki | I'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:35 | matkuki | Thanks anyway def-, I'm giving up on using glut and opengl directly. |
20:17:36 | matkuki | Curiously, opengl works through the sdl2 library using mingw-64 compiler. Go figure. |
20:18:00 | * | zepolen quit (Remote host closed the connection) |
20:19:18 | ephja | yes 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:09 | krux02 | does anybody know how I can get the element type of a seq in a template? |
20:49:06 | krux02 | I 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:30 | def- | krux02: type(mySeq[0])? |
20:54:07 | ephja | s[0].type? |
20:57:19 | * | HakanD_____ joined #nim |
21:04:29 | krux02 | if that evaluated at compile time? It should work on empty seq, too |
21:08:04 | def- | krux02: yes |
21:10:07 | krux02 | def-: cool thank you |
21:18:02 | * | darkf quit (Quit: Leaving) |
21:20:21 | matkuki | ephja: In your glfw 'events' example, what needs to be added so that opengl can be used? |
21:23:02 | matkuki | something like this: https://bpaste.net/show/23cea92e5500 |
21:26:49 | krux02 | def-: 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:22 | krux02 | def-: 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:42 | matkuki | ephja? |
21:47:43 | ephja | matkuki: while not window.shouldClose: render(); window.update() |
21:48:04 | matkuki | ok, let me try... |
21:48:06 | ephja | and loadExtensions after the window has been created I think |
21:55:19 | matkuki | Yes, it works! Also had to add window.makeContextCurrent(), otherwise I get 'Error: unhandled exception: OpenGL error: invalid operation [GLerror]'. Why? |
22:02:29 | matkuki | ephja: What does window.makeContextCurrent() do? |
22:06:02 | ephja | that's what was missing in my example! |
22:07:24 | ephja | matkuki: it sets the active window for the current thread |
22:07:44 | ephja | I forgot it and so any opengl operations that I tried to execute were being ignored |
22:08:39 | matkuki | It happens, I'm just glad it works. Thanks for the help! |
22:13:23 | matkuki | ephja: 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:13 | ephja | sure |
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:28 | cryzed | Has 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:20 | Araq | cryzed: hrm, are you sure this doesn't exist already? |