01:18:31 | DAddYE_ | http://forum.nimrod-code.org/t/182 |
01:41:30 | * | q66 quit (Quit: Leaving) |
02:59:22 | * | XAMPP joined #nimrod |
03:32:29 | * | DAddYE_ quit (Remote host closed the connection) |
03:47:40 | * | DAddYE joined #nimrod |
03:48:44 | * | DAddYE quit (Remote host closed the connection) |
03:49:18 | * | DAddYE joined #nimrod |
03:53:48 | * | DAddYE quit (Ping timeout: 260 seconds) |
04:39:11 | * | DAddYE joined #nimrod |
04:41:49 | * | DAddYE quit (Remote host closed the connection) |
05:02:10 | * | DAddYE joined #nimrod |
05:18:23 | DAddYE | Araq: how hard will be if I use from foo import nil be able to use foo.Type.proc_that_match_it() |
05:18:38 | DAddYE | aka preserve chain-ability |
05:29:44 | DAddYE | also what is the nim way to map hashes/tables https://github.com/joyent/node/blob/master/lib/_http_server.js#L40-L59 ? |
05:30:00 | DAddYE | I know there are table but I don't know if there is a better way |
05:40:42 | DAddYE | haaaa here we are http://build.nimrod-code.org/docs/manual.html#table-constructor |
05:40:45 | DAddYE | nvm |
07:55:48 | Araq | DAddYE: I don't know how hard it'll be and frankly I don't care, you want explicit 'module.' prefixes everywhere except that you don't |
07:57:03 | DAddYE | two reasons |
07:57:09 | DAddYE | in the module where I'm working |
07:57:19 | DAddYE | I will not need to prefix with module name |
07:57:54 | DAddYE | in the module that import it I'll need and it's idiomatic since I don't need to know where a thing come frome |
07:57:57 | DAddYE | *from |
07:58:10 | DAddYE | and I also don't have (not sure if allowed by compiler) |
07:58:28 | DAddYE | redefinition of types/enum/procs |
07:59:14 | Araq | 'from module import nil' is not idiomatic, it's very new and nobody uses it |
08:00:26 | DAddYE | yea in nimrod and usually before meet other languages also in ruby |
08:00:44 | DAddYE | is the same (except you have more fine grain control) |
08:01:23 | DAddYE | btw the big thing is enclose in a namespace |
08:01:33 | Araq | use .pure enums then |
08:01:55 | DAddYE | I had to |
08:02:04 | Araq | I don't like if x.callingConvention in {CallingConvention.Cdecl, CallingConvention.Stdcall} |
08:02:36 | Araq | it's verbose and only helps people who wouldn't understand the compiler's source code anyway |
08:03:08 | DAddYE | yea so you have the option to do: use my_module |
08:03:41 | DAddYE | yea so you have the option to do: use CallingConventions |
08:03:47 | DAddYE | haha |
08:04:03 | Araq | yeah but with my way I dont need it |
08:04:26 | Araq | look |
08:04:41 | Araq | what you perceive as asthetic is well known to me |
08:04:52 | Araq | I called the 'dot' disease |
08:04:55 | Araq | *call it |
08:05:02 | Araq | GC_disable() # bad, ugly |
08:05:08 | Araq | GC.disable() # nice and clean |
08:05:14 | DAddYE | exactly |
08:05:15 | Araq | ccDefault # bad, ugly |
08:05:24 | Araq | CallingConvention.Defautl # nice and clean |
08:05:34 | DAddYE | you know why? |
08:05:48 | DAddYE | you put here your code |
08:05:58 | DAddYE | but here I (will) be able to say |
08:06:04 | DAddYE | that disable is in gc.nim |
08:06:12 | DAddYE | Default is in cc.nim |
08:06:20 | Araq | but you can't and it's not important anyway |
08:06:38 | Araq | *why* do you read code? |
08:06:58 | DAddYE | usually I don't use anything where I'm not able to read the code |
08:07:02 | Araq | you seem to imply it's always about reading *unknown new code* |
08:07:04 | DAddYE | (now you know) |
08:07:11 | DAddYE | but also for me |
08:07:21 | DAddYE | I'd like to have every thing separated |
08:07:22 | DAddYE | in files |
08:07:23 | Araq | whereas in practice it's always *known* and old code |
08:07:38 | DAddYE | small portion of code |
08:07:41 | DAddYE | in many files |
08:07:42 | Araq | it's always "lets add a feature" |
08:07:47 | Araq | or "fix the bug" |
08:07:59 | Araq | "where does this symbol come from?" is not an important question |
08:08:14 | DAddYE | for me that I'm reading your code YES |
08:08:19 | DAddYE | what it does? |
08:08:25 | DAddYE | where is the proc? |
08:08:40 | DAddYE | and so on |
08:08:46 | Araq | and btw the navigability you seek DOESN'T exist in Ruby at all |
08:08:52 | Araq | and yet you don't mind |
08:09:05 | Araq | because Ruby's very *semantics* prevent it |
08:09:43 | DAddYE | mmm /dir/lib/module_name/foo.rb => Module::Foo |
08:10:18 | DAddYE | mmm /dir/lib/module_name/foo.rb => ModuleName::Foo |
08:10:23 | DAddYE | is pretty standard |
08:11:17 | DAddYE | also I can write modules named with the same name of nimrod/lib ? |
08:11:58 | DAddYE | and btw I prefer much more Python module system |
08:12:07 | DAddYE | or clojure |
08:12:31 | DAddYE | than ruby |
08:13:53 | Araq | obj.method() # which 'method' is it? |
08:13:56 | Araq | you don't know |
08:14:07 | Araq | and it's a feature in these languages |
08:14:30 | Araq | it depends on 'obj's *runtime* type |
08:19:27 | Araq | and fyi I wasn't desperate to write my own RST parser, I looked at the Python implementation and wanted to re-use it or re-code it in Nimrod. It was faster to start from scratch because as soon as something gets more complicated Python and other scripting languages break very quickly. |
08:19:44 | Araq | It doesn't scale at all. |
08:19:56 | Araq | ymmv of course |
08:20:40 | DAddYE | yea |
08:20:48 | DAddYE | I know a bit better clojure |
08:21:03 | DAddYE | and recently they got some problems with the module system |
08:21:16 | DAddYE | for the reloader |
08:21:27 | DAddYE | hard to track changes |
08:21:49 | DAddYE | and in jvm you know that respawn a jvm is slow like compile 40K lines of nimcode |
08:36:03 | DAddYE | is a thing var buf = "".setLen(suggested_size) |
08:36:05 | DAddYE | valid? |
08:36:17 | Araq | it was invalid yesterday |
08:36:31 | Araq | what makes you think it's valid now? |
08:38:23 | DAddYE | ???????? |
08:38:40 | Araq | in other words: no it's not valid |
08:38:53 | DAddYE | in term of syntax or |
08:39:00 | DAddYE | code? |
08:39:21 | DAddYE | *terms |
08:39:22 | Araq | syntax is fine bug setLen returns void |
08:40:13 | DAddYE | haaaaa |
08:40:44 | DAddYE | sorry I mean "".setLen(xx) => (char*) malloc(size) |
09:14:40 | reactormonk | Araq, remember the times when I trolled around? |
09:34:20 | * | DAddYE quit (Remote host closed the connection) |
09:34:47 | * | DAddYE joined #nimrod |
09:39:22 | dom96 | hello |
09:39:31 | * | DAddYE quit (Ping timeout: 276 seconds) |
09:39:36 | dom96 | ping Araq |
09:53:49 | * | EXetoC joined #nimrod |
09:54:00 | dom96 | yo EXetoC |
09:55:11 | EXetoC | ohai |
10:08:25 | NimBot | Araq/Nimrod master 838c35e Dominik Picheta [+0 ±1 -0]: Fixes OSError deprecation warning. |
10:09:01 | NimBot | Araq/Nimrod asyncmacro 838c35e Dominik Picheta [+0 ±1 -0]: Fixes OSError deprecation warning. |
10:09:01 | NimBot | Araq/Nimrod asyncmacro 406edb0 Dominik Picheta [+0 ±1 -0]: Merge branch 'master' into asyncmacro |
10:13:00 | * | BitPuffin joined #nimrod |
10:17:32 | EXetoC | daddye really does whatever he can to avoid those prefixes :> |
10:20:10 | EXetoC | BitPuffin: lo |
10:20:18 | BitPuffin | EXetoC: howdy! |
10:20:31 | BitPuffin | EXetoC: considering using Nimrod to do some magic |
10:21:23 | EXetoC | ok |
10:21:53 | BitPuffin | EXetoC: what are you up to? |
10:22:44 | dom96 | hey BitPuffin |
10:22:50 | BitPuffin | hey dom96! |
10:23:03 | EXetoC | writing some UI code |
10:23:29 | BitPuffin | coolio |
10:26:28 | EXetoC | c(:)-< |
10:38:12 | BitPuffin | EXetoC: shouldn't you bump the revision number of glfw3 to 1? |
10:41:16 | * | q66 joined #nimrod |
10:41:18 | EXetoC | no one other than me has even tested it I think. it's not exactly a complicated API though, so I guess I'll bump it in a couple of days |
10:42:26 | BitPuffin | I will use it |
10:42:40 | * | DAddYE joined #nimrod |
10:43:56 | BitPuffin | I thought of another project though that might have the possibility to become quite popular, not the kind of game I thought I'd be making but I kind of like the genre, so I might use Allegro to get desktop, android and iOS support and then compile to js for webgl support |
10:44:38 | BitPuffin | However I might just write my own Nimrod library that does this for easier portability to additional platforms (like Sailfish, Ubuntu Phone etc) |
10:46:06 | BitPuffin | But I guess it would also work to contribute additional platforms to allegro, but then I have to write C |
10:49:07 | * | DAddYE quit (Ping timeout: 260 seconds) |
10:55:36 | BitPuffin | EXetoC: did you use c2nim to generate the glfw bindings? |
11:00:47 | EXetoC | I probably did. takes so much time otherwise |
11:08:41 | EXetoC | there are about 3-4 things I want to change, and then I should add documentation for at least newWindow and a couple of other things |
11:44:06 | BitPuffin | EXetoC: did you use the --header option? |
11:44:13 | BitPuffin | apparently that's discouraged |
11:45:55 | * | DAddYE joined #nimrod |
11:48:50 | EXetoC | BitPuffin: nah |
11:49:01 | BitPuffin | EXetoC: but you ran it on the header? |
11:51:38 | EXetoC | BitPuffin: yes |
11:51:43 | BitPuffin | I see |
11:52:29 | * | DAddYE quit (Ping timeout: 245 seconds) |
12:00:17 | EXetoC | shouldn't be too hard in general, assuming that said header doesn't resemble, say... FreeImage.h in any way :> |
12:04:57 | * | Araq0 joined #nimrod |
12:05:18 | Araq0 | Hey dom96 |
12:05:30 | dom96 | oh no it's Araq's evil twin! |
12:06:23 | Araq0 | Wup? |
12:06:48 | dom96 | When are you going to be back at your desktop? |
12:07:13 | Araq0 | Tonight |
12:07:51 | dom96 | I'm having a barbecue at 5pm my time. |
12:08:16 | Araq0 | I dont |
12:08:22 | dom96 | Not sure how long it will take. |
12:08:35 | EXetoC | oh, I thought it was an invitation |
12:08:54 | dom96 | EXetoC: sure, if you can get to Northern Ireland in 4 hours. |
12:09:12 | EXetoC | :> |
12:10:35 | Araq0 | Well you said yoi need me... |
12:10:49 | dom96 | I did? |
12:10:53 | dom96 | I pinged you. |
12:10:58 | Araq0 | Yeah |
12:11:04 | dom96 | I wish you would read the logs... |
12:11:15 | dom96 | <dom96> [23:49:20] Araq: This is how I do the arg passing: https://github.com/Araq/Nimrod/blob/9f297120d1622dd9f6b08ec7cab582419bb811d2/tests/compile/tasynciterraw.nim#L35 |
12:11:15 | dom96 | <dom96> [23:49:23] Thoughts? |
12:11:47 | Araq0 | I did read the logs |
12:14:10 | dom96 | well, what are your thoughts? |
12:15:37 | Araq0 | Dunno why you need the cast |
12:15:50 | dom96 | maybe it's a bug? |
12:16:15 | dom96 | I'm not sure how the safe casting is done at runtime. |
12:16:21 | Araq0 | Ordinary conversion shoild be fine |
12:16:50 | Araq0 | But you need to declare ptest once |
12:17:15 | Araq0 | Not twice for it to work |
12:17:32 | dom96 | yes, but how does processServer know the type then? |
12:19:39 | Araq0 | Processserver knows the type already |
12:19:57 | Araq0 | No idea what you mean |
12:20:40 | dom96 | it only knows it because I define it there |
12:20:44 | Araq0 | How does redeclaring the type avoid knowimg it? |
12:21:13 | dom96 | how else am I suppose to cast it if I don't have the concrete type? |
12:21:24 | dom96 | the PTest below is inaccessible |
12:22:32 | dom96 | hrm, unless I generate the PTest above the proc definition. |
12:27:34 | EXetoC | the order of declaration is important, by default anyway, if that's what you mean |
12:33:01 | Araq0 | Bbl |
12:43:02 | dom96 | yay an infinite loop... |
12:43:18 | * | zahary__ quit (Ping timeout: 240 seconds) |
12:47:03 | dom96 | yay, it works |
12:49:01 | * | DAddYE joined #nimrod |
12:55:24 | * | DAddYE quit (Ping timeout: 245 seconds) |
13:16:49 | BitPuffin | EXetoC: so you basically just did c2nim glfw.h ? |
13:26:17 | EXetoC | BitPuffin: I might've had to add one or more #def. chances are you need to if an error message says something about a missing ';' |
13:26:43 | BitPuffin | EXetoC: it says expected ')' where there is one :s |
13:26:56 | BitPuffin | local/include/allegro5/allegro_color.h(6, 29) Error: ')' expected |
13:28:13 | NimBot | Araq/Nimrod asyncmacro 426fbdb Dominik Picheta [+0 ±2 -0]: Better param passing. Implemented send, readLine and support for... 1 more lines |
13:28:13 | NimBot | Araq/Nimrod asyncmacro b3673c2 Dominik Picheta [+1 ±2 -0]: Calling an async proc with invalid arguments will now fail at compile-time. |
13:30:06 | BitPuffin | EXetoC: man I'm not sure if this will work as expected, it's adding a bunch of when not defined stuff etc |
13:31:11 | EXetoC | you can always remove the conditionals if you think they aren't needed |
13:31:28 | EXetoC | and replace them with c2nim-specific stuff of course, if necessary |
13:31:55 | BitPuffin | EXetoC: I suppose, but I'm not sure what I'm gonna do with this error I got where it expects a ) where there is a ) :( |
13:33:37 | BitPuffin | EXetoC: I get it in almost every file |
13:34:09 | BitPuffin | Araq0: is this a known issue? |
13:36:51 | EXetoC | Araq0: http://subversion.assembla.com/svn/procedural-tree-generation/trunk/project/ProceduralTreeGenerator/ProceduralTreeGenerator/lib/allegro-5.0.5/allegro/include/allegro5/allegro_color.h |
13:37:30 | EXetoC | gotta love this stuff. too bad they aren't using begin/end headers |
13:37:58 | EXetoC | anyway, it's not present in that many headers, is it? |
13:41:33 | BitPuffin | EXetoC: I don't see what's wrong with it |
13:45:57 | EXetoC | c2nim might not be able to handle it for whatever reason. I removed most such conditionals, but I don't know if that's necessary |
13:46:18 | BitPuffin | EXetoC: so you think I should ditch the importing stuff? |
13:47:52 | BitPuffin | or the conditionals, guess I can't skip importing |
13:48:33 | BitPuffin | EXetoC: if allegro.nim imports a bunch of other stuff like allegro.h does, is this stuff available to me if I only import allegro.nim? |
13:50:30 | BitPuffin | EXetoC: doesn't seem like there is a flag to skip the conditionals :( |
13:50:35 | BitPuffin | only includes |
13:51:23 | NimBot | Araq/Nimrod asyncmacro 2e3ef1f Dominik Picheta [+0 ±1 -0]: Fixes problems with async docs. |
13:52:31 | BitPuffin | is it Araq0 or Araq or Araq__ one should ping |
13:53:48 | dom96 | Araq0 I think |
13:53:52 | EXetoC | I haven't dealt with this crap much at all unfortunately, but I'm pretty sure that much of it can just be removed :> |
13:54:29 | BitPuffin | EXetoC: well that doesn't really help when the conversion fails because of it |
13:54:38 | BitPuffin | EXetoC: it doesn't keep going or anything |
13:59:42 | BitPuffin | EXetoC: maybe I need to do: import allegro_blabla \n export allegro_blabla |
14:44:02 | BitPuffin | EXetoC: guess I'm gonna have to write the binding manually huh |
14:44:22 | fowl | I thought someone else did allegro already |
14:44:55 | fowl | I tried once, it was too much work |
14:45:19 | fowl | It was gradha IIRC |
14:45:56 | BitPuffin | fowl: really? latest allegro? |
14:46:04 | BitPuffin | I searched for it on google and nothing showed up |
14:46:40 | EXetoC | were you thinking of this https://github.com/nimrod-code/packages/blob/master/packages.json#L38 ? |
14:47:03 | EXetoC | I couldn't find anything more relevant when googling |
14:48:41 | fowl | Allegro sux compared to sdl2 |
14:48:53 | BitPuffin | nope |
14:49:02 | fowl | They require hijacking main() iirc |
14:49:04 | BitPuffin | why? |
14:49:32 | BitPuffin | mmmmmm nah only on OSX I think, and that's not their fault, it's OSX's iirc |
14:50:57 | fowl | Any lib with convoluted headers sucks IMO.. ncurses may be useful but it still sux |
14:52:40 | * | DAddYE joined #nimrod |
14:57:05 | BitPuffin | fowl: convoluted? |
14:57:41 | dom96 | maybe try grabbing a pascal wrapper and using pas2nim :P |
14:59:10 | fowl | BitPuffin the c is ugly and hard for c2nim to get through |
14:59:13 | * | DAddYE quit (Ping timeout: 246 seconds) |
14:59:23 | fowl | Parsing c is not trivial |
14:59:25 | BitPuffin | fowl: I think it looks alright |
15:00:28 | BitPuffin | dom96: no pascal bindings for allegro either haha |
15:00:39 | BitPuffin | only for allegro4 |
15:00:51 | * | Araq__ quit (Read error: Connection timed out) |
15:00:59 | BitPuffin | fowl: more trivial than C++ :P |
15:01:27 | BitPuffin | are there bindings to SDL2 available though? |
15:01:36 | EXetoC | yup |
15:01:52 | EXetoC | https://github.com/fowlmouth/nimlibs/tree/master/fowltek |
15:01:55 | * | Araq_ joined #nimrod |
15:02:11 | BitPuffin | of course he did D:<! |
15:02:13 | BitPuffin | haha |
15:02:25 | BitPuffin | Well |
15:02:39 | BitPuffin | the only reason I'd consider it would be to not have to mess around with writing bindings |
15:02:45 | BitPuffin | time is precious |
15:02:46 | BitPuffin | hrm |
15:03:21 | dom96 | why not sfml? |
15:03:56 | BitPuffin | Well |
15:03:58 | BitPuffin | why sfml? |
15:04:04 | fowl | Sdl2 is niiice compared to sdl1 |
15:04:18 | BitPuffin | Oh, I guess it's worth mentioning I'm not even making anything 2d here |
15:04:41 | dom96 | oh, well then sdl2 is fine I guess. |
15:05:40 | BitPuffin | I'm just looking to write OpenGL ES 2 code and have touch and audio API stuff cross platform and have desktop version with audio |
15:05:44 | Araq0 | Bitpuffin the header looks trivial to me |
15:05:45 | fowl | BitPuffin I have horde3d wrapped and assimp |
15:05:57 | BitPuffin | Araq0: yeah same |
15:06:08 | BitPuffin | Araq0: but c2nim can't handle the truth |
15:06:16 | Araq0 | For c2nim to handle |
15:06:35 | fowl | Ah also I started on window management for a 3d engine, that's in fowltek too |
15:06:58 | Araq0 | Just make the define a def |
15:07:28 | BitPuffin | Araq0: Well, I wasn't lying when it was expecting a ) where there was a ) and for some reason that's an error |
15:07:50 | BitPuffin | fowl: window management? |
15:08:39 | Araq0 | Well i am not lying when i say i can easily get it to work |
15:08:57 | fowl | BitPuffin well i was going to do more there's a scene graph and WM just the basics |
15:09:22 | BitPuffin | Araq0: well then go for it :P |
15:09:48 | Araq0 | Whats the error msg |
15:09:56 | BitPuffin | fowl: well what kind of window management are we talking |
15:10:23 | BitPuffin | Araq0: local/include/allegro5/allegro_color.h(6, 29) Error: ')' expected |
15:10:33 | EXetoC | creating, destroying, handling events? |
15:10:46 | fowl | ^ |
15:12:07 | BitPuffin | yeah that's what I was thinking |
15:12:22 | BitPuffin | I was thinking maybe he ment OpenGL windows (GUI stuff) |
15:13:11 | fowl | U could use it as a starting point or something, I likely won't work on it further |
15:13:14 | Araq0 | Make it defined(x) instead of (defined x) then |
15:14:06 | fowl | BitPuffin the window stuff is xorg, gl context is created though |
15:14:22 | BitPuffin | Araq0: so you mean I need to go in to every header and change it manually? |
15:14:44 | Araq0 | God is there a single header out there without arcane bs... |
15:14:45 | BitPuffin | fowl: well if I needed that I'd use glfw |
15:15:01 | BitPuffin | fowl: but since I also want touch I'll use either allegro or sdl2 |
15:15:20 | Araq0 | Bitpuffin yes |
15:15:40 | BitPuffin | Well then no thanks, I think c2nim should be able to understand it as it is |
15:15:41 | Araq0 | Headers always need tweaking for c2nim |
15:16:15 | fowl | BitPuffin sure use whatever, I thought u were talking about writing ur own tho |
15:16:43 | BitPuffin | fowl: hmm maybe I mentioned that earlier, but even then I was thinking putting libs in the background |
15:17:05 | Araq0 | Bitpuffin its not c2nims fault c is bs |
15:17:45 | BitPuffin | Well |
15:17:46 | Araq0 | And hostile to interop |
15:17:47 | BitPuffin | yes |
15:17:50 | BitPuffin | C is total bs |
15:18:06 | BitPuffin | But c2nim is trying to handle C, so it is c2nims fault |
15:18:06 | BitPuffin | or rather both |
15:19:02 | * | Araq_ quit (Read error: Connection timed out) |
15:19:33 | Araq0 | C2nim is still more useful than wrapping by hand |
15:19:55 | * | Araq_ joined #nimrod |
15:21:00 | BitPuffin | Yeah it is |
15:21:19 | BitPuffin | But it needs more work |
15:22:22 | BitPuffin | fowl: I guess I'll go with SDL2 then, I don't really love how blitting and all that stuff is in the same header as window creating and all that jazz |
15:22:44 | EXetoC | what doesn't? |
15:23:19 | fowl | You don't blit in sdl2 unless u work with software renderer |
15:24:16 | fowl | Also if ur doing 3d all u use from sdl is event handling right |
15:25:27 | BitPuffin | fowl: exactly so why would I want it to clutter my namespace |
15:25:38 | BitPuffin | I guess I'm gonna have to from bla import bla |
15:26:01 | fowl | What lol clutter ur namespace |
15:27:57 | fowl | I don't understand |
15:27:59 | EXetoC | very few things are going to collide, if any |
15:28:48 | BitPuffin | Well, I know |
15:28:59 | BitPuffin | but still! :P |
15:29:08 | BitPuffin | they shouldn't keep them in the same header |
15:29:13 | BitPuffin | Imo |
15:29:51 | dom96 | BitPuffin: fix c2nim then |
15:29:51 | BitPuffin | fowl: sdl2 runs on android and ios right? |
15:30:36 | fowl | That's what I hear |
15:30:49 | BitPuffin | dom96: well I'm no expert at parsing C and don't have time to become one :P |
15:43:01 | EXetoC | well, there's this time thing that you mentioned earlier :> |
15:44:31 | BitPuffin | EXetoC: the lack of? :D |
15:53:00 | fowl | I'll wrap a library if u need me to and I can have it done in a day, probably, price based on complexity |
15:55:46 | * | DAddYE joined #nimrod |
15:59:59 | * | DAddYE quit (Ping timeout: 245 seconds) |
16:00:26 | BitPuffin | fowl: ah, sorry, can't afford to pay anything right now :) |
16:02:34 | BitPuffin | fowl: but I'll keep that in mind :D |
16:02:58 | fowl | Ok |
16:09:10 | dom96 | see you later guys |
16:14:44 | BitPuffin | dom96: don't leave us! |
16:14:47 | BitPuffin | the world needs you |
16:16:34 | BitPuffin | Okay so help me out |
16:16:56 | BitPuffin | When I install a package with babel |
16:17:10 | BitPuffin | how do I import it in my project later |
16:17:25 | BitPuffin | like with fowl's fowltek binding to sdl2 |
16:17:27 | fowl | Import modulename |
16:17:28 | BitPuffin | how do I import it |
16:17:52 | fowl | The compiler knows about babel |
16:18:31 | fowl | Import fowltek/sdl2 |
16:19:07 | fowl | That's just because all modules in fowltek are in that folder, I want my name in ur source |
16:19:52 | Araq | credit where credit is due, fowl ;-) |
16:21:50 | fowl | My commercial stuff will be import com/fowl/is/awesome/libraryname lol |
16:23:12 | * | BitPuffin_ joined #nimrod |
16:23:44 | * | BitPuffin quit (Ping timeout: 245 seconds) |
16:24:22 | BitPuffin_ | kinda strange syntax to have / in the import statement |
16:24:27 | BitPuffin_ | most languages use . |
16:25:35 | Araq | yeah I'll support '.' too I think |
16:25:44 | * | BitPuffin_ is now known as BitPuffin |
16:25:47 | Araq | import fowltek.sdl2 |
16:26:03 | Araq | that import fowltek doesn't work doesn't matter, does it? |
16:26:21 | BitPuffin | Araq: but it's not supported currently then? |
16:26:26 | fowl | Fowltek isn't a module it's a directory |
16:26:48 | BitPuffin | Would be pretty rocking if we could import fowltek.* |
16:27:05 | BitPuffin | (says the guy who was earlier bitching about cluttered namespace :$) |
16:27:21 | Araq | fowl: people decided '.' is good enough for everything and I feel like supporting it |
16:27:43 | Araq | if only to tell them later "wie man sich bettet so ruht man" |
16:28:00 | BitPuffin | enguarish prease |
16:28:32 | fowl | 4 years of German in hs and I learned nothing |
16:28:57 | BitPuffin | same here with spanish |
16:29:26 | EXetoC | me too, but I passed anyway! |
16:29:40 | fowl | Oh I know: du bits ein verdammter idiot |
16:29:49 | fowl | Du bist* |
16:29:50 | BitPuffin | EXetoC: Yeah I got a VG :s |
16:30:00 | EXetoC | :> |
16:30:35 | BitPuffin | Is there any OpenGL ES wrappers for nimrod? |
16:30:43 | BitPuffin | just use the regular openGL stuff or what |
16:31:19 | fowl | Bp u should try to work.it into the.opengl module |
16:32:13 | Araq | "As one makes his bed, so he must lie." |
16:32:30 | Araq | not sure if it conveys the same meaning ... |
16:32:48 | BitPuffin | fowl: huh? Does that mean I should use what's in the opengl module or contribute it? :s |
16:34:10 | BitPuffin | Araq: how far back does the opengl stuff go in terms of compability, I know it stops at 4.2, but does it support everything back to OpenGL 1.0? |
16:34:32 | Araq | I think so |
16:34:37 | BitPuffin | I see |
16:34:42 | BitPuffin | well then it probably already works |
16:34:48 | Araq | but I'm not sure nor do I see why it is important |
16:34:48 | EXetoC | it has glBegin. does that answer your question? :p |
16:34:49 | fowl | Use what u can, contribute if u can |
16:35:15 | BitPuffin | Since OpenGL ES 2 is OpenGL 2(.1?) without the fixed function bs |
16:53:19 | EXetoC | ~2.0 |
16:56:54 | * | DAddYE joined #nimrod |
16:57:24 | * | DAddYE quit (Remote host closed the connection) |
16:57:31 | * | DAddYE joined #nimrod |
16:58:38 | * | xilo joined #nimrod |
16:59:16 | * | Mat2 joined #nimrod |
16:59:20 | Mat2 | hi @ all |
16:59:43 | EXetoC | hi @ you |
17:00:16 | Mat2 | how's work going ? |
17:00:55 | BitPuffin | hi Mat2! |
17:01:16 | Mat2 | hi BitPuffin |
17:01:37 | * | DAddYE quit (Remote host closed the connection) |
17:04:14 | EXetoC | work? well, I'm not getting paid for this :( but it's going well |
17:04:33 | Mat2 | Araq; It was needed to mark the reserved memory-areas for machine-code as executable for calling without generating an exception but otherwise it worked as you suggested |
17:06:01 | Araq | what? I did suggest something? |
17:07:03 | Mat2 | EXetoC: Well, I assumed the word 'work' includes unpaid programming |
17:07:43 | Mat2 | Araq: Sorry, wrong translation :( |
17:08:06 | Araq | say it in german then |
17:08:53 | Mat2 | ansonsten funktionierte alles so wie Du beschrieben hattest |
17:12:09 | Araq | well I don't remember describing anything but alright |
17:16:25 | Mat2 | anyhow, I can now compile vm-code sequences at run-time. Now I'm exploring the thread and process interfaces Nimrod offer |
17:16:54 | Araq | er ... does that mean your VM is now in Nimrod? |
17:17:18 | Mat2 | yes |
17:17:30 | Araq | o.o wow aweseom |
17:17:51 | Araq | how come I hear no complaints from you? |
17:18:46 | Mat2 | because it works at this point |
17:19:46 | EXetoC | operations on two float32's gives me a float. is that intended? |
17:21:28 | Araq | no |
17:21:33 | EXetoC | ok |
17:49:56 | Araq | Mat2: one more thing |
17:51:06 | Araq | if you need to put your VM object types on the heap a register based VM has another advantage |
17:51:40 | Araq | python for instance caches the integer objects < 255 or something to avoid excessive allocations |
17:52:06 | Araq | but with a register based VM you always have a destination slot that's likely to already point to appropriate memory |
17:53:04 | Araq | because you can easily assign a fixed type to a temporary slot |
17:53:18 | Araq | in a register based vm |
17:54:26 | Mat2 | Araq: That's a problem by design - the language design. You think in terms of languages which compile static code sequences (even if this may happen embedded in a dynamic context) |
17:55:53 | Araq | well I surely don't think in Forth :-) |
17:57:10 | Mat2 | yes. Look how expensive the Java VM for example handles dynamic code-generation |
17:59:56 | Mat2 | I would say, if a VM need to cache object references for performance, this is led by result of flawed language-design decisions |
18:00:17 | Araq | maybe but I dunno |
18:00:30 | Araq | it's very common for smalltalk like object systems |
18:01:39 | BitPuffin | Araq: can I load a dynamic library at runtime manually with some proc? |
18:02:00 | Araq | BitPuffin: yeah but I forgot the name |
18:02:33 | Araq | dynlib.nim |
18:02:50 | * | DAddYE joined #nimrod |
18:02:56 | Mat2 | I think the IO language is a nice example how to avoid such problems by design |
18:03:00 | BitPuffin | Araq: do you think that will work on platforms like android (with NDK) and iOS? |
18:03:35 | Araq | whenever you ask me "will it work on iOS" my default answer is "No" |
18:03:50 | Araq | iOS is the new unoperating system |
18:03:55 | BitPuffin | lol |
18:03:58 | BitPuffin | But it can run C! |
18:04:05 | Araq | it should work in theory |
18:04:12 | Araq | it's been ported to mac os x |
18:04:26 | Mat2 | have here some one experiences with iOS ? |
18:04:44 | Araq | Mat2: ask gradha when he's around |
18:05:05 | Mat2 | thanks |
18:05:17 | Mat2 | brb |
18:05:28 | BitPuffin | it appears that it works with the operating system |
18:05:34 | BitPuffin | but is not permitted on the appstore.. |
18:05:46 | BitPuffin | hrm |
18:05:52 | BitPuffin | I hate apple |
18:06:04 | BitPuffin | How am I supposed to make this then |
18:08:28 | BitPuffin | I was hoping to package the worlds in to packages with assets and a dynamic library for the compiled nimrod "scripts" |
18:09:11 | * | DAddYE quit (Ping timeout: 260 seconds) |
18:09:40 | BitPuffin | I guess I could make some workaround for iOS so that it comes with all the worlds by default, and if you log in or buy or whatever it unlocks the other content somehow |
18:26:24 | Araq | why does a "world" reside in a dll anyway, BitPuffin? (I use DLL for shared object because it makes more sense) |
18:27:03 | BitPuffin | Araq: well if you think of a game like Diablo or Torchlight 2 which has Acts |
18:27:34 | Araq | Diablo, Torchlight 2? never heard of them |
18:27:38 | BitPuffin | Araq: Each act has special scripts for each acts that has nothing to do with the other acts, and each act can be compiled to a library |
18:28:25 | BitPuffin | Araq: well okay then think of acts as worlds then, but basically each act has it's own environment and its own objectives and events in those objectives, so why not package it all in a neat little package and load it at runtime |
18:28:36 | Araq | BitPuffin: I'm kidding |
18:28:56 | BitPuffin | Araq: lol, I was like, are you serious :P |
18:29:45 | BitPuffin | Araq: I kind of want to make it so that you only have to buy the game once via the website, so you download a free client that contains the demo data and then when you've bought it you download the other acts |
18:29:55 | BitPuffin | and I can't think of any other way to achieve this |
18:30:03 | Araq | well most games include a scripting engine for these things |
18:30:17 | Araq | and most of the game is then "scripted" |
18:30:32 | BitPuffin | Araq: yeah but I plan to write the scripts in nimrod that way |
18:31:20 | Araq | well I'm working on a nimrod VM but it'll run nimrod slower of course |
18:31:44 | BitPuffin | Araq: hmm, but I'm not even sure iOS let's you use scripting engines even lol |
18:32:01 | Araq | it can't prevent it properly |
18:32:16 | BitPuffin | Araq: either way, I was thinking this would be nice, because it gives full performance |
18:32:37 | EXetoC | can't you just load everything and make it accessible based on some flag? or is cracking common on mobile platforms? |
18:32:54 | BitPuffin | EXetoC: well with jailbroken devices they sure could crack away |
18:33:13 | BitPuffin | EXetoC: but I might have to do that exclusively for iOS :( |
18:33:34 | Araq | BitPuffin: well you have "pure data" like maps that is not code anyway |
18:33:43 | Araq | it suffices to exclude those |
18:34:30 | BitPuffin | Araq: hm? Yeah |
18:34:34 | Araq | you can keep the logic monolithic and it'll crash when it can't load level 10 |
18:34:46 | BitPuffin | But I probably can't download those either |
18:34:54 | Araq | s/level/map |
18:35:19 | Araq | why not? it's just some binary blob or even a simple text file |
18:35:33 | BitPuffin | Araq: well it's obviously technically possible |
18:35:40 | BitPuffin | but I'm wondering about app store terms |
18:35:49 | BitPuffin | but actually |
18:35:57 | BitPuffin | I think there is a game that does that (pocket legends) |
18:36:09 | Araq | I can't follow |
18:36:16 | BitPuffin | on iOS |
18:36:20 | Araq | either downloading files is problematic or it's not |
18:36:31 | BitPuffin | there is a game that I think even updates itself inside the client |
18:36:36 | Araq | if it is downloading code is as problematic as downloading data |
18:36:40 | BitPuffin | called pocket legends |
18:48:47 | * | NimBot joined #nimrod |
18:49:33 | BitPuffin | Araq: well it's not like it's shipping today lol |
18:49:52 | * | dom96 joined #nimrod |
18:49:58 | BitPuffin | Araq: okay so dylib is not allowed, but scripting engines totally fine, what bullshit |
18:50:16 | Araq | well that's what I'm saying, create the game and then worry about iOS |
18:51:05 | BitPuffin | Araq: well I don't want to reach a point where I suddenly have to redo all the scripts in order to comply with some stupid shit |
18:51:17 | Araq | well I would buy it for PC |
18:52:01 | * | mario-goulart quit (Ping timeout: 273 seconds) |
18:52:01 | BitPuffin | Araq: I intend to Run it on Phones and Desktop and Web :) ES 2 will give me all of that with no pain |
18:52:12 | BitPuffin | "no pain" |
18:52:14 | BitPuffin | some pain |
18:52:26 | BitPuffin | but not a whole lot |
18:52:46 | Araq | we'll see about that |
18:52:51 | BitPuffin | I guess |
18:52:57 | Araq | the controls are vastly different for a start |
18:53:05 | Araq | and can't be abstracted over |
18:53:09 | BitPuffin | For sure |
18:53:13 | Araq | well I don't believe they can |
18:53:30 | BitPuffin | Well I was thinking on desktop and web use traditional diablo style control scheme |
18:54:12 | BitPuffin | and on handhelds, if touch only use an on screen joystick with buttons for attack and special attacks etc and some targeting assistance |
18:54:48 | Araq | I always thought Diablo would be much more fun with keyboard input |
18:55:05 | BitPuffin | Araq: How do you mean? |
18:55:16 | Araq | pressing the arrow keys for walking is much more natural than clicking a single unit around |
18:55:21 | BitPuffin | Hmm |
18:55:23 | BitPuffin | Well |
18:55:33 | BitPuffin | if I do that then it's closer to the touch counterpart |
18:58:49 | BitPuffin | Araq: then add gamepad support, and I've got myself a console version :P |
18:58:55 | Mat2 | hmm, that depends on habituation I think. People which grows with smartphones and tablets may tend to touch on everything, so clicking a single unit would be more natural for them |
18:59:41 | Mat2 | (or there try to touch on there displays in use of some mouse emulation) |
18:59:45 | BitPuffin | Mat2: I did consider that |
19:00:10 | BitPuffin | Mat2: But I always feel it's a shame when the fingers get in the way of the graphics |
19:00:14 | Araq | Mat2: Diablo predates smartphones by decades |
19:01:01 | Mat2 | how old is this game ? |
19:01:05 | BitPuffin | Diablo? |
19:01:10 | Mat2 | yes |
19:01:17 | BitPuffin | 1996 |
19:01:48 | BitPuffin | 17 years then? |
19:02:14 | Mat2 | ok, I think there play it inside an emulator :D |
19:02:46 | BitPuffin | Mat2? |
19:03:50 | BitPuffin | Araq: I don't think it seems like too much work to support the various control schemes |
19:05:20 | * | mario-goulart joined #nimrod |
19:05:46 | Mat2 | as historical remark, the virtual-device-interface (VDI) of GEM was specially designed for abstracting all kinds of input *and* output devices (ther is always a way) |
19:05:49 | * | DAddYE joined #nimrod |
19:07:03 | Mat2 | (GEM was also unfortunately notorious for its performance) |
19:08:27 | BitPuffin | haha :) |
19:08:29 | Araq | dunno abstracting away all kinds of input looks like abstracting away the user experience to me |
19:08:46 | BitPuffin | not really looking to abstract it so it's fine |
19:08:53 | BitPuffin | I'm looking to provide options |
19:08:59 | BitPuffin | they differ from each other |
19:09:04 | Araq | sure |
19:09:21 | BitPuffin | if you use a mouse to click on things you don't need help targeting mobs |
19:09:30 | BitPuffin | but if you are using a gamepad it could be useful |
19:09:41 | BitPuffin | (or on screen joystick) |
19:12:45 | * | DAddYE quit (Ping timeout: 264 seconds) |
19:13:04 | BitPuffin | So I wouldn't call it abstraction |
19:13:15 | BitPuffin | I think torchlight has an xbox version actually |
19:14:05 | BitPuffin | http://youtu.be/4fIjmKFCTpQ |
19:14:55 | * | apotheon_ joined #nimrod |
19:17:51 | EXetoC | I played an FPS once on a console once. that was rubbish |
19:18:17 | BitPuffin | well |
19:18:30 | BitPuffin | some people swear by using a game pad for fps games |
19:18:31 | BitPuffin | I don't but |
19:18:33 | BitPuffin | yeah |
19:19:39 | * | Raynes_ joined #nimrod |
19:20:08 | * | xilo quit (*.net *.split) |
19:20:10 | * | apotheon quit (*.net *.split) |
19:20:10 | * | Raynes quit (*.net *.split) |
19:20:15 | EXetoC | those people can sod off :p |
19:21:00 | BitPuffin | EXetoC: they'll play the game they want and you won't care since you only have to write a few lines of code for those additional customers |
19:21:31 | * | Raynes_ is now known as Raynes |
19:22:01 | * | Raynes quit (Changing host) |
19:22:01 | * | Raynes joined #nimrod |
19:22:20 | * | xilo joined #nimrod |
19:22:59 | EXetoC | sure $$ |
19:23:15 | BitPuffin | EXetoC: and hapiness all over the place |
19:23:38 | BitPuffin | Like prince Daniel's feelings |
19:25:56 | EXetoC | ål åver! |
19:27:03 | BitPuffin | ål åver de plejs |
19:28:31 | * | NimBot joined #nimrod |
19:29:59 | BitPuffin | Mat2: Förhoppningsvis lättare att läsa än att prata |
19:32:17 | * | NimBot joined #nimrod |
19:32:31 | BitPuffin | Mat2: säkert? Isf är det kanske bara jag hahaha |
19:33:07 | * | DAddYE joined #nimrod |
19:33:23 | EXetoC | English or German! Don't upset the general! |
19:33:46 | DAddYE | hello world |
19:34:15 | EXetoC | hello.. human? |
19:34:23 | BitPuffin | EXetoC: I don't see why they get to speak German if we don't get to speak Swedish :( |
19:34:27 | Mat2 | BitPuffin: ;) |
19:35:51 | Mat2 | how much swedish speakers are around here ? |
19:35:54 | Araq | BitPuffin: quod licet iovi non licet bovi ;-) |
19:36:13 | BitPuffin | Mat2: from what I know me, you and EXetoC |
19:37:03 | BitPuffin | Araq: now I don't even know what that is |
19:37:14 | Araq | Latin |
19:38:15 | EXetoC | it means, stop watching those cat videos |
19:38:36 | BitPuffin | "allowed Jupiter not allowed" |
19:38:51 | Araq | just start a #nimrod-swedish channel or whatever |
19:39:04 | Araq | in fact German is not really fine here either |
19:39:07 | BitPuffin | Factus a universus sors of sensu |
19:39:25 | BitPuffin | Araq: well then stop speaking it :) |
19:39:34 | Araq | I always provide a translation afterwards |
19:39:48 | Araq | often it's hard to translate :P |
19:39:48 | BitPuffin | Araq: what if we do the same? |
19:40:03 | Araq | then you're allowed single swedish sentences |
19:40:17 | Araq | like I'm allowed single German sentences |
19:41:10 | BitPuffin | dealio |
19:41:24 | BitPuffin | now help me find the definition of PWindow in fowl's lib |
19:41:32 | BitPuffin | for SDL2 |
19:42:09 | Mat2 | BitPuffin: I'm a german speaker (that mean I can read and understand swedish and better danish to some extend but you would likely not understand me if I try to speak it) |
19:42:29 | BitPuffin | Mat2: but then why doesn't Araq understand swedish |
19:42:37 | * | DAddYE_ joined #nimrod |
19:44:08 | Araq | BitPuffin: maybe I should try |
19:45:12 | BitPuffin | If you can, doesn't that mean we can speak more swedish than you can speak german? :P |
19:45:43 | * | apotheon_ is now known as apotheon |
19:45:43 | * | apotheon quit (Changing host) |
19:45:43 | * | apotheon joined #nimrod |
19:46:04 | BitPuffin | Seriously where the heck did he get PWindow from :s |
19:46:24 | EXetoC | does it compile? |
19:47:10 | BitPuffin | yeah |
19:47:19 | EXetoC | I see some header imports, but that's only evaluated when SDL_Static is defined |
19:47:43 | BitPuffin | EXetoC: are you looking at this? https://github.com/fowlmouth/nimlibs/blob/2511e6fa0f965669d26f815f78167603003446ae/fowltek/sdl2.nim |
19:47:49 | * | XAMPP quit (Read error: Connection reset by peer) |
19:48:27 | BitPuffin | EXetoC: and in those headers it's not even called PWindow most likely |
19:49:13 | EXetoC | "t_type.add parseExpr("type P$1* = ptr T$1" % structName_s)[0]" ? |
19:49:33 | * | Araq__ joined #nimrod |
19:49:35 | EXetoC | in the sdl_struct macro, which is used a couple of times |
19:51:15 | BitPuffin | EXetoC: what does it do? |
19:51:37 | BitPuffin | I haven't learned nimrod100%, I thought I'd learn by doing from now on |
19:52:03 | EXetoC | I don't know exactly, but that must be the relevant part. I guess it generates type declarations automatically |
19:52:49 | * | DAddYE quit (Ping timeout: 264 seconds) |
19:52:57 | BitPuffin | EXetoC: you might be right |
19:52:59 | BitPuffin | oh well |
19:53:12 | * | Araq_ quit (*.net *.split) |
19:53:39 | EXetoC | maybe it shows up in the generated documentation |
19:54:21 | BitPuffin | woop there is generated documentation? |
19:55:25 | BitPuffin | okay so since nimrod "hates" oop, is it better to just have procs for creating and destroying and manipulating windows rather than an object? |
19:56:14 | EXetoC | oo is such a broad time |
19:56:27 | BitPuffin | term*? |
19:56:33 | EXetoC | oops |
19:56:49 | EXetoC | and I don't even use auto-correction |
19:56:56 | EXetoC | and yes, you'd use regular functions for ctors, and there's a destructor pragma |
19:57:15 | BitPuffin | hmm |
19:57:39 | EXetoC | proc newFoo*(x: int): TFoo = result.x = x |
19:58:45 | EXetoC | proc destruct(o: var TFoo) {.destructor.} |
19:58:54 | BitPuffin | aha |
19:59:10 | * | q66 quit (Excess Flood) |
19:59:19 | * | q66 joined #nimrod |
19:59:56 | BitPuffin | EXetoC: does it have to be called newFoo? |
20:00:02 | EXetoC | no |
20:00:56 | Araq | in fact the convention is initFoo for TFoo, newFoo for PFoo |
20:02:03 | BitPuffin | aha |
20:02:05 | BitPuffin | I see |
20:02:13 | BitPuffin | well, I decided to not do a new type |
20:02:30 | BitPuffin | just createContext and destroyContext, and have the module manage a window variable |
20:06:10 | Mat2 | that's the classical handler approach |
20:06:43 | BitPuffin | yep, seemed appropriate |
20:10:36 | * | gradha joined #nimrod |
20:11:53 | * | Araq__ quit (Read error: Connection timed out) |
20:12:50 | * | Araq_ joined #nimrod |
20:14:02 | BitPuffin | so in nimrod, where you'd traditionally do FLAG | FLAG2 etc how does that work out in nimrod? FLAG xor FLAG2? |
20:14:13 | BitPuffin | or is it just or |
20:14:30 | BitPuffin | ah no it's not xor |
20:14:32 | BitPuffin | is it or? |
20:14:43 | EXetoC | I think so |
20:15:57 | EXetoC | pretty much all of that is in system.nim |
20:16:32 | Araq | it's 'or' but the idiomatic way is to use a bitset |
20:16:52 | Araq | thankfully C doesn't know about bit sets or type safety |
20:17:06 | Araq | so you often have no choice when you're wrapping |
20:18:20 | BitPuffin | Araq: but then what is logical or instead of bitwise? |
20:18:33 | BitPuffin | also or? |
20:18:36 | EXetoC | "/ proc `or` n n..." :-) |
20:19:12 | * | XAMPP joined #nimrod |
20:19:12 | * | XAMPP quit (Changing host) |
20:19:12 | * | XAMPP joined #nimrod |
20:20:27 | dom96 | hello |
20:20:42 | Mat2 | hi dom96 |
20:20:52 | Araq | BitPuffin: it's 'or' indeed |
20:20:54 | EXetoC | so it's logical for bools only as is indicated by the argument passed to the 'magic' pragma. '.magic: "Or"' for the bool variant, '.magic: "BitorI"' for all the int types (except int64, where it is "BitorI64") |
20:20:58 | BitPuffin | Araq: neato |
20:21:16 | Araq | EXetoC: the 'magic' is an implementation detail |
20:21:19 | EXetoC | I might've misinterpreted what you say, but whatever |
20:21:31 | EXetoC | Araq: right |
20:22:51 | EXetoC | but the arguments give you a clue. it's all documented though |
20:24:45 | dom96 | Araq: I generate a proc blah() = nil and call it, does the compiler simply get rid of the proc definition and call? |
20:24:50 | dom96 | *if I |
20:25:11 | Araq | not yet |
20:25:18 | Araq | it does it for a template though |
20:27:46 | dom96 | what if I make the proc {.inline.} |
20:27:48 | dom96 | ? |
20:29:58 | Araq | then the C compiler will do that for you, but not Nimrod |
20:30:04 | Araq | but sure, that's fine too |
20:30:57 | dom96 | cool |
20:31:44 | dom96 | Not curious as to why i'm asking? :P |
20:32:06 | Araq | not really ... |
20:32:27 | * | Araq_ quit (Read error: Connection timed out) |
20:34:51 | * | Araq_ joined #nimrod |
20:36:33 | dom96 | pity |
20:36:43 | dom96 | It's pretty clever. |
20:37:22 | BitPuffin | dom96: tell uss!! |
20:38:12 | dom96 | It's how I get the compiler to make sure that when the user calls an async proc they pass it the correct params. |
20:39:24 | dom96 | I do it by generating a dummy proc which does nothing when an async proc is defined (remember that the async proc is actually converted into an iterator which has very different params) |
20:40:06 | dom96 | Then when the user calls the async proc I just generate a dummy call to it so that the compiler can check the params. |
20:41:12 | * | dom96 wonders if his explanation is clear |
20:41:13 | Araq | that works with clean templates too, no need for inline procs |
20:41:25 | dom96 | but then the error message isn't as nice :P |
20:41:32 | Mat2 | I am right to interpret this as some kind of dynamic type-checking ? |
20:41:33 | Araq | how so? |
20:41:48 | Araq | error: got (int, char) but expected one of: |
20:41:58 | Araq | template typecheck(x: int, b: bool) |
20:42:01 | Araq | vs. |
20:42:02 | dom96 | yeah, expected one of 'template ...' instead of 'proc ...' |
20:42:05 | Araq | proc typecheck ... |
20:42:08 | Araq | lol |
20:44:51 | dom96 | I'm pretty proud of that though :P |
20:45:30 | Araq | C++ does the same for type checking in its generics |
20:45:51 | dom96 | cool |
20:46:03 | Araq | well it's considered to be good style by Stroustrup |
20:46:15 | Mat2 | ehm, ok |
20:48:38 | dom96 | Araq: btw I noticed that with the old doc gen I can get nice docs for my {.async.} procs generated, but not with the new one. |
20:48:57 | dom96 | but i'm sure we can figure something out |
20:49:23 | Araq | well the new one expands macros ... |
20:49:28 | dom96 | indeed |
20:50:11 | Araq | doc generation is hard with meta programming |
20:50:25 | Araq | sometimes you want to expand what's generated, sometimes you don't |
20:50:52 | Araq | I'm afraid you need to live with doc1 for now |
20:50:56 | dom96 | I managed to change what is generated if 'nimdoc' is defined though IIRC |
20:51:24 | dom96 | This was only for documenting the built in async functions. |
20:51:36 | dom96 | Haven't tried the actual custom ones yet. |
20:55:06 | Mat2 | ciao |
20:55:22 | * | Mat2 quit (Quit: Verlassend) |
20:56:45 | Araq | hmm |
20:56:53 | Araq | cool that can work |
20:56:59 | Araq | nice work, dom96 |
20:57:31 | dom96 | thanks :D |
21:08:10 | * | DAddYE_ quit (Remote host closed the connection) |
21:52:26 | * | gradha quit (Quit: bbl, need to watch https://www.youtube.com/watch?v=1ZZC82dgJr8 again) |
21:54:53 | * | DAddYE joined #nimrod |
22:25:21 | dom96 | noooo, did github get rid of the pink unicorn for their 500 page? :( |
22:25:56 | EXetoC | I've never encountered that |
22:26:35 | dom96 | Never saw this? https://github.com/images/error/angry_unicorn.png |
22:26:51 | EXetoC | ok maybe |
22:27:36 | EXetoC | maybe my brain is better at dealing with images |
22:27:45 | EXetoC | I should make a programming language with that in mind |
22:27:56 | dom96 | try scratch :P |
22:34:34 | EXetoC | :> |
23:01:42 | NimBot | Araq/Nimrod asyncmacro 95dcabc Dominik Picheta [+0 ±1 -0]: Another docs fix for asyncio. |
23:02:19 | * | Araq__ joined #nimrod |
23:03:01 | * | Araq_ quit (Ping timeout: 248 seconds) |
23:03:09 | BitPuffin | dom96: I've seen it :) It was epic, I think they had it because they're using the Unicorn web server |
23:03:20 | dom96 | indeed |
23:07:37 | BitPuffin | okay |
23:07:42 | BitPuffin | time to work on linagl |
23:13:22 | BitPuffin | can parameterized types have more than one parameter? |
23:14:27 | dom96 | yes |
23:21:25 | BitPuffin | good |
23:21:34 | BitPuffin | otherwise this vector would kind of suck :) |
23:25:01 | EXetoC | type parameters can't yet hold values though |
23:25:14 | BitPuffin | EXetoC: hmm? |
23:25:32 | BitPuffin | EXetoC: So I can't have a dimension parameter? |
23:26:01 | BitPuffin | What do you guys think, should elements of a vector start being counted from 0 or 1 |
23:26:39 | BitPuffin | so the first element is 1 or 0 |
23:28:37 | dom96 | good night |
23:28:42 | EXetoC | cya |
23:28:52 | EXetoC | I prefer 0. are you also going with arrays? |
23:29:02 | BitPuffin | type |
23:29:02 | BitPuffin | TVector[T,D]* = object of TObject |
23:29:02 | BitPuffin | elements: array[1..D, T] |
23:29:09 | BitPuffin | nighty night dom96 |
23:29:16 | BitPuffin | EXetoC: hmm yeah perhaps 0 |
23:29:18 | BitPuffin | I dunno |
23:29:30 | EXetoC | that implies inheritance |
23:29:31 | BitPuffin | people who like math will probably prefer 1..D |
23:29:33 | EXetoC | " of..." |
23:29:38 | BitPuffin | EXetoC: sure |
23:29:55 | BitPuffin | EXetoC: I was thinking why not give the option :P |
23:30:05 | BitPuffin | but maybe that's ridiculous |
23:30:38 | * | Araq__ quit (Read error: Connection timed out) |
23:31:14 | BitPuffin | EXetoC: but will the D parameter not work now or is that what you are saying? |
23:32:54 | * | Araq_ joined #nimrod |
23:34:03 | EXetoC | it won't. you can use type classes though, but it's a little buggy for me |
23:34:30 | BitPuffin | EXetoC: how would I do it with type classes? |
23:34:32 | EXetoC | unless you want to allow arbitrary dimensions of course, because then you can't have a fixed set of types |
23:35:22 | EXetoC | TVT*[T:TReal] = TV2|TV3|TV4 |
23:35:53 | BitPuffin | EXetoC: I want arbitrary dimensions |
23:36:20 | BitPuffin | So now the final workaround I can think of is using sequences.. |
23:36:22 | BitPuffin | but that sucks |
23:36:31 | BitPuffin | because this should really work |
23:39:45 | * | DAddYE quit (Remote host closed the connection) |
23:40:15 | * | DAddYE joined #nimrod |
23:40:43 | BitPuffin | Araq, Araq_ or Araq0 Is this true? |
23:41:48 | EXetoC | they haven't gotten around to it yet |
23:42:18 | EXetoC | "But then the compiler doesn't support values as generic parameters for now ... It's better to wait until the compiler is ready for it." |
23:42:45 | BitPuffin | :( |
23:42:46 | BitPuffin | when is that |
23:42:52 | BitPuffin | because I need it like, now lol |
23:44:17 | BitPuffin | does this mean that I'm gonna have to go in to the compiler? because I don't really know how to code a compiler :'( |
23:44:37 | * | DAddYE quit (Ping timeout: 248 seconds) |
23:44:51 | BitPuffin | EXetoC: wait a sec, what does it mean when the compiler whines about implementation of blah expected |
23:46:37 | EXetoC | exactly that. if you forget = and the stuff after, then all you have is a forward declaration |
23:46:45 | * | DAddYE joined #nimrod |
23:47:09 | EXetoC | is that the issue? I got it just now, for that very reason |
23:47:22 | EXetoC | type Ohai |
23:47:55 | BitPuffin | EXetoC: I was doing this |
23:48:09 | BitPuffin | type Vector = object (and stuff) |
23:48:14 | BitPuffin | with params |
23:48:20 | BitPuffin | so Vector[T, D] |
23:48:24 | BitPuffin | and then: |
23:48:44 | BitPuffin | Vec3 = Vector[float, 3] for example |
23:49:56 | BitPuffin | EXetoC: is it because I haven't yet created a constructor for TVector? |
23:50:28 | EXetoC | constructors aren't required. let me try that |
23:51:17 | EXetoC | that literal can't be there. I just get "type expected" |
23:51:50 | EXetoC | and your error if I do "Vector[T, D]" without specifying an impl |
23:52:42 | BitPuffin | EXetoC: literal? |
23:52:47 | BitPuffin | what literal? |
23:53:31 | EXetoC | or value (the number) |
23:54:44 | BitPuffin | EXetoC: I'm not sure I get it, you mean the dimension? |
23:56:20 | EXetoC | yes, it simply doesn't work |
23:56:36 | EXetoC | I'm sure it's possible with some macro magic |
23:56:47 | * | DAddYE quit (Remote host closed the connection) |
23:57:03 | * | Araq_ quit (Read error: Connection timed out) |
23:57:20 | * | DAddYE joined #nimrod |
23:57:27 | BitPuffin | EXetoC: But is it valid if the dimension wasn't there? |
23:58:39 | EXetoC | not without an implementation, unless it's found at a later stage |
23:58:53 | * | Araq_ joined #nimrod |
23:59:15 | BitPuffin | EXetoC: well but what is implementation? |