00:00:01 | Skrylar | main difference between winforms and morphic is that morphic lets you re-compose the little pieces to make new widgets, whereas winforms tends to make you start completely over every time you want a new control |
00:00:13 | Matthias247 | dom96: such classic window toolkits are currently a dieing thing |
00:00:22 | dom96 | I'm not really familiar with morphic, got any good links? |
00:00:28 | Skrylar | there aren't any. lol |
00:00:32 | Matthias247 | everybody moves to declarative stuff |
00:00:42 | Skrylar | http://en.wikipedia.org/wiki/Morphic_%28software%29 has some clones |
00:01:12 | Skrylar | Some of the implementations are basically just event code over canvas calls |
00:01:31 | Skrylar | Matthias247: eh, they aren't dying on the mac |
00:02:00 | Skrylar | I think poorly designed GUIs are being replaced with anything that happens to be on hand, but stuff like Qt is still healthy |
00:02:35 | Skrylar | Some of them are moving more towards GUIs people wanted all along; like Scaleform where the designers can just shove the pixels together in flash and use it |
00:02:52 | dom96 | The majority of apps I use on Windows still use this classic GUI. |
00:03:03 | dom96 | The exceptions are Spotify, Steam and Battle.Net |
00:03:30 | Matthias247 | dom96: It will also stay for some time that way, because nobody will rewrite the old stuff |
00:03:44 | dom96 | Perhaps what we should do is create a limited but efficient html rendering engine :P |
00:03:53 | Skrylar | I use a lot of classic GUI stuff too |
00:04:09 | Matthias247 | i use winforms for tools |
00:04:11 | Skrylar | HTML5 isn't doing things like Renoise any favors |
00:04:33 | Matthias247 | dom96: there's librocket |
00:04:55 | Skrylar | why I picked such a weird design for library-i-should-really-name is because people seem to like the way the DOM handles events/theming, but need something that isn't a glorified postscript printer |
00:05:50 | Matthias247 | the problem with HTML/QML/etc. is that you will easily get an inconsistent UI style |
00:06:49 | Skrylar | part of why i was considering using Cairo is because its easier to get things running with that |
00:06:52 | dom96 | Inconsistent with the OS sure. |
00:06:59 | Matthias247 | biggest benefit of these is probable that they can handle different monitor resolutions better than classical toolkits |
00:07:06 | dom96 | But as long as it's close, users won't care. |
00:07:12 | Matthias247 | and animations |
00:07:30 | Skrylar | I don't think users actually care that much if things look native. |
00:07:33 | Skrylar | I mean, Linux is GUI soup |
00:07:41 | Skrylar | Windows has themed crap in all manners of inconsistent |
00:07:47 | Skrylar | Mac users care a LOT though |
00:07:55 | Matthias247 | Skrylar: linux is a soup in all ways, not only gui :) |
00:08:21 | dom96 | Yeah, and Mac users are also the ones who are rich. |
00:08:31 | dom96 | I would be willing to write custom GUI code for them. |
00:08:33 | dom96 | :P |
00:08:33 | Matthias247 | but I think most users want a consistent look for feel, because it also makes the handling easier |
00:09:04 | Matthias247 | dom96: they are not necessarily rich - but they like to spend money :) |
00:10:03 | dom96 | It depends what you consider rich I guess. |
00:10:56 | Matthias247 | most people own an iphone. That's expensive, but you don't have to be rich to own one :) |
00:11:33 | Skrylar | eh mac users will pay for quality in apps :\ |
00:11:40 | dom96 | True. |
00:11:41 | dom96 | Anyway |
00:11:46 | dom96 | Good night for real. |
00:11:49 | Skrylar | they WILL get mad if you ask 500$ for undocumented garbage |
00:11:51 | Skrylar | good night dom96 |
00:12:07 | Skrylar | whereas on Windows people seem kinda complacent with expensive and poorly supported software |
00:12:28 | Matthias247 | gn8 |
00:12:42 | * | carum quit (Remote host closed the connection) |
00:12:58 | Skrylar | I'm starting to think I don't really need this gap buffer |
00:13:11 | Skrylar | I was just thinking about multi-caret support and thinking about how thats better suited for ropes |
00:13:43 | * | Matthias247 quit (Read error: Connection reset by peer) |
00:13:45 | Skrylar | Guess it doesn't hurt to have both. |
00:16:45 | * | carum joined #nimrod |
00:20:24 | Demos | one thing that I think makes mac GUIs so unified is that they got something that was battletested but where they did not have to maintain compatibility |
00:20:41 | Demos | and objective-c seems to be quite a good language for doing GUIs |
00:21:48 | Skrylar | Yeah, and they get tools for free :) |
00:21:58 | Skrylar | I guess we do too now with Qt Creator |
00:23:47 | Demos | I wager that obj-c may be a bit nicer to deal with that c++ for GUIs, Apple has added some nice features like modules |
00:24:08 | Demos | and QTc's completion and debugger support is pretty bad |
00:24:14 | Skrylar | there's a heavy MVC bias in Cocoa |
00:24:15 | Demos | but yeah. Qt is great |
00:24:26 | Skrylar | Qt still does that "oh well the GUI designer will emit C++ code!" thing |
00:24:41 | Skrylar | And while signals + slots are nice, Obj-C fully decouples the GUI layout from the code |
00:24:51 | Skrylar | its literally an external data file |
00:25:02 | Demos | well it is still kinda MVC, the V is just code |
00:25:04 | Demos | which is fine |
00:25:28 | Skrylar | I also like the way they name things over there; it feels more readable/smalltalkish than C++ code does |
00:25:39 | Skrylar | but I can't think of too much that Qt doesn't do that Cocoa does |
00:25:45 | Skrylar | Presentation I guess |
00:26:20 | Demos | Qt is also like the java standard library for c++ |
00:26:38 | * | zielmicha quit (Quit: Connection closed for inactivity) |
00:28:24 | Varriount | Meep |
00:28:34 | EXetoC | eep |
00:28:39 | Varriount | ep |
00:36:47 | Varriount | Skrylar: Can you explain Cocoa to me? |
00:37:23 | * | darkf joined #nimrod |
00:37:25 | Varriount | I mean, how is it decoupled? |
00:44:12 | Varriount | Araq: ping |
00:44:26 | * | nequitans_ joined #nimrod |
00:44:32 | Varriount | Hey nequitans_ |
00:44:43 | nequitans_ | hello Varriount! |
00:47:16 | Varriount | Hm, this is interesting -> http://ssp.impulsetrain.com/goto.html |
00:51:06 | Skrylar | Varriount: Cocoa is basically the OS X apis in objective-c |
00:51:16 | Varriount | Skrylar: Ah. |
00:51:17 | Skrylar | though Cocoa is specifically the GUIs as I understand it |
00:51:44 | Skrylar | they have classes for control types, but usually you don't instantiate those because the GUI designer makes data files that do it for you at runtime |
00:52:14 | Skrylar | you usually set a delegate for objects if you need to override behavior, and the delegate handles the "windowWillClose" style events |
00:53:46 | * | q66 quit (Quit: Leaving) |
01:00:52 | EXetoC | http://www.di.fm/spacemusic |
01:04:27 | EXetoC | Just some coding-friendly ambient |
01:05:43 | * | Varriount gives a cookie to EXetoC |
01:09:36 | * | nequitans_ quit (Ping timeout: 240 seconds) |
01:10:07 | * | carum quit (Read error: Connection reset by peer) |
01:10:24 | * | carum joined #nimrod |
01:11:45 | * | nequitans_ joined #nimrod |
01:17:54 | Discoloda | does the cookie ever expire? |
01:18:43 | * | carum quit () |
01:25:27 | * | xenagi joined #nimrod |
01:27:22 | * | nequitans_ quit (Ping timeout: 252 seconds) |
01:32:01 | Varriount | Hi xenagi |
01:34:49 | xenagi | hi Varriount |
01:53:27 | * | flaviu joined #nimrod |
01:54:38 | flaviu | This is probably in the docs somewhere and I missed it, but how/can do I create a local scoped expression? |
01:55:33 | flaviu | Something like `let x = block: |
01:55:33 | flaviu | let tmp = 1+2 |
01:55:33 | flaviu | tmp + 5` |
02:01:05 | EXetoC | flaviu: I think templates fit that description: http://build.nimrod-lang.org/docs/manual.html#templates |
02:15:50 | flaviu | EXetoC: I might have phrased my question poorly. I want to define variables in a scope (like a function scope), and have them disposed of as they leave the scope. |
02:16:41 | flaviu | with braces, something like `let x = {let t = 2+3; return t+4}` |
02:16:42 | EXetoC | I guess your example is incorrect then. anyway, 'block' will do then |
02:16:52 | * | Mordecai joined #nimrod |
02:17:14 | * | Mordecai is now known as Guest96546 |
02:17:26 | * | psquid quit (Ping timeout: 252 seconds) |
02:17:32 | EXetoC | let x = (let y = 1; y + 1) |
02:18:34 | EXetoC | ok it wasn't incorrect, but I don't know if 'block' can be used in that way. it didn't work when I tried |
02:20:23 | Demos | flaviu, why not use a function |
02:21:13 | Demos | proc foo(t) = t+2+3+4 |
02:22:29 | flaviu | Yes, I'll do that. I was just wondering if the language had a local scope creation construct, but it appears not. |
02:23:39 | * | DAddYE quit (Ping timeout: 265 seconds) |
02:23:57 | Demos | well block does that |
02:24:36 | EXetoC | see my last snippet |
02:25:31 | EXetoC | and yes there are blocks, but I don't think you can return a value from one. |
02:25:36 | EXetoC | and then you have templates |
02:26:30 | flaviu | Sorry EXetoC, I'm also playing around with the vim plugin and I was confused by the error highlighting |
02:26:31 | Demos | you could probably cook up a template that does what you want |
02:26:50 | Demos | the vim plugin has error highlighting? |
02:27:48 | flaviu | Demos: Yep, http://i.imgur.com/f11mnJU.png |
02:28:15 | Demos | is that zah's plugin? |
02:28:44 | Varriount | flaviu: Nimrod has expression lists. |
02:28:49 | * | Guest96546 quit (Ping timeout: 240 seconds) |
02:28:57 | EXetoC | replace || with 'or' |
02:29:23 | EXetoC | well, you could also use a set. that should be more idiomatic |
02:29:23 | flaviu | Demos, yes. Do you have synastic installed? |
02:29:34 | Demos | I guess not |
02:29:48 | EXetoC | ch in {'a', 'e', 'i', 'o', 'u'} |
02:30:50 | * | Guest96546 joined #nimrod |
02:35:40 | flaviu | EXetoC: I'm very new and had no idea, thanks |
02:38:36 | * | flaviu left #nimrod (#nimrod) |
02:38:50 | * | flaviu joined #nimrod |
02:56:23 | * | psquid joined #nimrod |
02:56:59 | * | Guest96546 quit (Ping timeout: 240 seconds) |
03:03:07 | Varriount | fowl: ping |
03:04:28 | fowl | ponhg |
03:04:33 | fowl | bong* |
03:19:49 | * | DAddYE joined #nimrod |
03:23:59 | * | DAddYE quit (Ping timeout: 240 seconds) |
03:28:32 | Skrylar | I do miss KWin when I'm using Windows |
03:31:05 | Demos | the window manager? |
03:31:10 | Skrylar | Yeah. |
03:31:16 | Demos | dwm is pretty good (the windows dwm not the suckless one) |
03:31:43 | Skrylar | KWin has a nice thing where you can edit window properties with this big editor sheet, which lets you apply the changes now or make them permanent |
03:32:10 | Demos | that should be possible on windows.... dont know if that utility exists though |
03:32:21 | Demos | procexp has something kinda like that |
03:32:34 | Skrylar | I know there are a few tools for making windows specific sizes |
03:32:50 | Skrylar | I just really like the KWin way of dealing with it; you can just pin a window to a region and turn off the chrome |
03:33:04 | Skrylar | Really handy for recording for instance |
03:33:10 | * | carum joined #nimrod |
03:33:13 | flaviu | No tiling window manager love here? |
03:33:26 | Skrylar | tiling window managers move my windows around :( |
03:34:15 | Skrylar | i got along with the division window managers where you get the little option to shove windows in a quadrant though |
03:34:34 | flaviu | I deal with that by using more workspaces |
03:34:35 | Skrylar | its kind of like a tiling window manager except you lock the windows on a grid and then popups/etc don't cause the whole desktop to reflow |
03:35:06 | flaviu | Oh, I see. my WM isn't purely tiling, utility dialogs are floating |
03:35:30 | Skrylar | i used kwin's tiling mode for a little while and it was weird |
03:39:32 | Skrylar | If I were a person writing a text editor, I would probably use Blender's concept for the GUI |
03:39:43 | Skrylar | where you have a subdivision interface and a drop-down icon to change that division's content |
03:48:44 | Demos | you should be able to turn off chrome by changeing the window style in winodws |
03:49:10 | * | DAddYE joined #nimrod |
03:52:45 | * | ddl_smurf quit (Quit: ddl_smurf) |
04:02:30 | * | DAddYE quit (Remote host closed the connection) |
04:02:57 | * | DAddYE joined #nimrod |
04:03:53 | * | flaviu quit (Remote host closed the connection) |
04:07:21 | * | BitPuffin quit (Ping timeout: 244 seconds) |
04:07:34 | * | DAddYE quit (Ping timeout: 265 seconds) |
04:11:43 | * | carum quit (Remote host closed the connection) |
04:12:44 | * | DAddYE joined #nimrod |
04:15:34 | * | carum joined #nimrod |
04:16:13 | * | xenagi quit (Quit: Leaving) |
04:16:28 | * | DAddYE quit (Remote host closed the connection) |
04:16:55 | * | DAddYE joined #nimrod |
04:21:13 | * | DAddYE quit (Ping timeout: 240 seconds) |
04:26:50 | * | carum quit (Remote host closed the connection) |
04:28:10 | * | carum joined #nimrod |
04:28:58 | * | r0b4 quit (Ping timeout: 240 seconds) |
04:44:52 | * | nequitans_ joined #nimrod |
04:51:16 | * | nequitans_ quit (Ping timeout: 244 seconds) |
04:51:51 | * | DAddYE joined #nimrod |
04:55:24 | * | DAddYE quit (Remote host closed the connection) |
04:55:50 | * | DAddYE joined #nimrod |
05:00:24 | Skrylar | Varriount: do you think a set of iterator templates would be any useful in nimrod? |
05:00:38 | Skrylar | Rust had some neat combinator things for iterators |
05:00:44 | * | DAddYE quit (Ping timeout: 265 seconds) |
05:00:49 | Skrylar | blah.items().take(5).join(someOtherIter) |
05:02:21 | * | DAddYE joined #nimrod |
05:06:04 | Demos | are those done with no overhead? |
05:06:56 | Skrylar | Demos: "no" |
05:07:12 | Skrylar | by "no" I mean like almost everything in Rust, "well the compiler ought to optimize those down" |
05:07:23 | Demos | oh... wonderful |
05:07:28 | Demos | the best kind of optimization |
05:07:43 | Skrylar | Yeaaah, I got weary of just how often they invoke the sufficiently smart compiler parable |
05:07:55 | * | carum quit (Remote host closed the connection) |
05:08:09 | Demos | you really, really, really, really need to 100% garentee zero overhead iterators |
05:08:58 | Skrylar | from what I remember of their iterators it was basically a chain that just went "if remaining < 1: invoke the next iterator" |
05:09:08 | Skrylar | so there was an overhead in the call stack |
05:09:32 | Demos | but if you are calling functions in an iterator you are totally screwed |
05:09:45 | Demos | or rather if the iterator is a call |
05:10:02 | Demos | also it would need to store the stuff to pass to the next iterator right? |
05:10:31 | Skrylar | in a nimrod template i would think you could do all of that in a block |
05:10:55 | Skrylar | block thisArea: var remaining = X; block(); dec remaining; if ... break thisArea |
05:11:28 | * | DAddYE quit (Remote host closed the connection) |
05:11:50 | Demos | yeha probably |
05:11:53 | Skrylar | One of the things I liked with their combinators was an instance where for a string you could say string.chars.take(73).join("...".chars) |
05:11:57 | * | DAddYE joined #nimrod |
05:12:08 | Skrylar | or something similar |
05:12:20 | Skrylar | basically meant it would read up to X many items and then automatically chop the string and replace the rest with an ellipsis |
05:13:09 | Skrylar | all though they had them as objects which meant you could add rules as you went along in the method |
05:13:17 | Skrylar | not something i used all that much though |
05:15:01 | Demos | had what as objects? |
05:16:04 | * | DAddYE quit (Ping timeout: 244 seconds) |
05:32:29 | * | carum joined #nimrod |
05:35:42 | * | carum_ joined #nimrod |
05:35:48 | * | carum quit (Read error: Connection reset by peer) |
05:37:04 | * | Varriount|Mobile joined #nimrod |
05:39:47 | Varriount|Mobile | We really need a way to iterate iterators easily without having to explicitly pass parameters |
05:40:49 | Varriount|Mobile | Skrylar: Unfortunately, you can't easily chain iterators like that unless they are explicitly designed to work with each other |
05:53:21 | Skrylar | Varriount|Mobile: a handful of templates would probably cover most of the chains |
05:53:57 | Skrylar | i'm not really overwhelmed with use-cases for that |
05:54:47 | * | brson joined #nimrod |
06:04:04 | * | DAddYE joined #nimrod |
06:21:41 | * | xtagon quit (Ping timeout: 244 seconds) |
06:36:44 | * | ddl_smurf joined #nimrod |
06:37:07 | * | brson quit (Ping timeout: 252 seconds) |
06:38:31 | * | brson joined #nimrod |
06:40:58 | * | ddl_smurf quit (Ping timeout: 240 seconds) |
07:21:41 | * | carum_ quit (Remote host closed the connection) |
07:22:37 | Varriount | Anyone know if nimrod has wrappers for GLEW (or a wrapper for a suitable alternative)? |
07:28:15 | Demos | I think the opengl package will deal with all that for you |
07:31:34 | Varriount|Mobile | Demos: Are you sure? |
07:31:48 | Demos | it looks like it is based off gl loader generator |
07:32:13 | Varriount|Mobile | I'm following some C++ tutorials on opengl, and they use glew and glfw |
07:32:15 | Demos | try something like a UBO and see |
07:32:37 | Demos | which tutorials, opengl tutorials are usually pretty bad |
07:32:57 | Demos | just call the init functions mentioned in the opengl module docs |
07:33:11 | Varriount|Mobile | Ones meant for opengl 3.3 |
07:33:55 | Varriount|Mobile | Demos: http://www.opengl-tutorial.org/beginners-tutorials/tutorial-1-opening-a-window/ |
07:34:57 | Demos | OK that one looks OK |
07:35:11 | Demos | just make sure to call the init function for the opengl module and you will probably be fine |
07:35:33 | Demos | if it does not work the probable outcome is trying to follow a null function pointer |
07:36:34 | Skrylar | i do not look forward to dealing with thst atuff again :< |
07:36:51 | Varriount|Mobile | Demos: I want to learn some opengl, for knowledge's sake if nothing else. |
07:37:42 | Varriount|Mobile | Plus, even if all I come up with is a little toy, it's something I can post on reddit. |
07:38:21 | Demos | yeah, and the best way to do it is to let opengl (which looks to be generated from a glloadergen header) deal with the loading |
07:39:21 | Varriount|Mobile | glloadergen? |
07:39:35 | Demos | lua program to generate openGL header files |
07:39:52 | Skrylar | i thought one of the nimrod modules said it was based on the XML definitions |
07:40:03 | Demos | I find 90% of ogl/d3d work is at the interface between c/c++ and glsl/hlsl |
07:40:18 | Demos | yeah glloadgen is based on the xml definitions |
07:40:31 | Skrylar | would be nice to have a mini-nim for GLSL |
07:40:39 | Demos | I am not actually positive of this but the function nameing and the way to need to initialize it is the same as with glloadgen |
07:41:01 | Demos | yeah, both me and filwit want to do that, although he is probably more qualified |
07:44:15 | Demos | in the mean time I am probably just going to write out all the binding, it is a lot of code but it is not very complex |
07:44:39 | Varriount|Mobile | The binding? |
07:45:52 | Demos | yeah, setting up your shader, binding textures, uniforms, and various * buffer objects |
07:46:06 | Demos | and dealing with VAOs |
07:46:45 | Skrylar | I suppose distinct types could lead to some fun with GL |
07:47:06 | Skrylar | at least as far as being able to pretend like you had actual handles to things |
07:47:43 | Demos | yeah, I actually use distinct ints in my entity system as entity and scenes |
07:48:16 | Skrylar | i've never been a huge fan of using integer IDs for things, partly because i've always wondered how people dealt with the overflow problem |
07:48:25 | Skrylar | most people i've seen just say "well hope you don't use them all" |
07:50:35 | Skrylar | i think once i wrote the equivalent of a free list for integer IDs, so it would track them as they were freed and recycle those to keep the arrays small |
07:53:47 | * | brson quit (Quit: leaving) |
07:55:53 | Demos | yeah I am thinking of doing that, I mean it is the same as using pointers |
07:55:58 | Demos | you can run out of memory |
07:56:24 | Demos | you can check when to generate a new id |
07:58:49 | * | DAddYE quit (Remote host closed the connection) |
07:59:15 | * | DAddYE joined #nimrod |
07:59:43 | Skrylar | the only time i really see using int handles as a good idea is when you need to cross barriers where a pointer is wholly inappropriate |
08:00:11 | Demos | or like as an index into an array, that extra deref is almost always worth it for the stability |
08:00:23 | Skrylar | like in netcode where you may have an ID pool for one specific client, so that client can still refer to things it is privileged to and you wouldn't trust a pointer to |
08:01:04 | Skrylar | Demos: the extra deref doesn't buy you much though; you could have a different object in that slot and code with a wild handle would still derp |
08:01:20 | Skrylar | unless you never recycle IDs, but then you have to answer the "what happens when I run out?" problem |
08:01:27 | Demos | true, but if you need to ralloc the array |
08:01:31 | Demos | *realloc |
08:02:17 | Demos | anyway I use an Id because entities are really just tags for me. |
08:02:41 | Demos | there is literally nothing that a ptr TEntity could possibly point to |
08:02:50 | Skrylar | when i was curious about tcl the lack of a proper opaque type was a massive downer for me |
08:03:12 | Skrylar | thats one thing lua does really well; being able to make usertypes |
08:03:28 | * | DAddYE quit (Ping timeout: 244 seconds) |
08:04:25 | Skrylar | thats one reason i always liked pascal-like type systems too; you can remove a lot of magic number fiddling and just use the type system for it |
08:04:36 | Skrylar | now its suddenly impossible to use a handle for a sound file that was meant for a graphic |
08:06:46 | Demos | yeah, never used lua but I thought it only really had hashtables |
08:08:16 | Demos | I like that nimrod keeps data structures and procedures fairly seperate |
08:08:49 | Skrylar | hash tables, numbers and strings |
08:09:13 | Skrylar | there is a 'light' and 'heavy' userdata which is basically a hashtable with a meta-blob that lua can't access |
08:09:40 | Skrylar | so you can give it a handle to toss around, store, think about, and hand back to you, but it can't edit it |
08:09:56 | Demos | gaah I should learn lua, for some reason I just never get around to learning these scripting languages |
08:10:09 | Skrylar | the only difference is that 'light' is nothing more than a pointer object, while 'heavy' is for data allocated by lua |
08:10:27 | Skrylar | you can ask lua to allocate memory from the lua pool which will get GC'd when nobody cares about it anymore |
08:10:33 | Skrylar | but store C structs in that |
08:10:44 | Demos | that is actually pretty cool |
08:11:00 | Skrylar | lua is pretty cool. :> |
08:11:23 | Skrylar | there's "moonscript" which is defined as "coffeescript for lua" that i've been wondering about using with nimrod |
08:11:39 | Skrylar | basically gives the significant whitespace style of syntax to lua which doesn't look *that* far from nimrod source |
08:12:34 | Demos | eaghhhhhhhh I would rather use nimrod for all the things |
08:12:41 | Demos | or just use python for scripting |
08:12:49 | Demos | since the syntax of python is pretty close the nimrod |
08:12:52 | Skrylar | python can fall offacliff |
08:12:54 | Skrylar | :< |
08:13:17 | Skrylar | i don't get how people stand embedding that; it basically doesn't support it |
08:14:36 | Skrylar | I remember looking in to embedding python once, and tried to look up how to do basic security stuff with the VM and the answer was basically "you don't" while in lua its pretty trivial to prevent an untrusted script from doing things you don't want (including excessive RAM usage or spinning the CPU) |
08:14:49 | * | Varriount|Mobile quit (Remote host closed the connection) |
08:15:04 | * | Varriount|Mobile joined #nimrod |
08:16:24 | Varriount|Mobile | Skrylar: Have you seen micklat's NimBorg? |
08:16:57 | Skrylar | I'm sort of baffled at how people give Guido so much praise when Python's runtime manages to be a massive dogpile of crap, and Lua's VM can do practically the same behavior yet runs faster O_o |
08:17:02 | Skrylar | Varriount|Mobile: no, whats that? |
08:17:40 | Demos | python makes no effort to be fast |
08:17:51 | Demos | like totally zero effort |
08:17:54 | Skrylar | Lua didn't really intend to be fast. lol |
08:18:00 | Demos | oops :D |
08:18:05 | Varriount|Mobile | Skrylar: It's a high level interface for nimrod to interact with scripting langs |
08:18:27 | Skrylar | they made it to control industrial processes and shove inside programs, it just turns out that really simple code tends to be pretty efficient |
08:18:51 | Skrylar | i knew a hardware guy who went on once about how they used python in a lot of testing environments, and were embedding Lua to get around python's derpy GC |
08:18:52 | Varriount|Mobile | Demos: I'm not quite so sure about that. There's a reason the GIL exists you know. |
08:20:21 | Skrylar | Now Ruby.. thats a language that never had 'speed' as a design decision. lol |
08:20:32 | Skrylar | Matz said himself he designed it to be fun above all else |
08:22:53 | * | ddl_smurf joined #nimrod |
08:47:16 | * | frza joined #nimrod |
08:49:53 | * | Demos quit (Read error: Connection reset by peer) |
08:51:04 | Araq | hi frza welcome |
08:59:52 | * | DAddYE joined #nimrod |
09:04:01 | * | DAddYE quit (Ping timeout: 240 seconds) |
09:11:02 | Skrylar | interesting |
09:11:09 | Skrylar | check $buffer == "test" |
09:11:18 | Skrylar | makes the check macro crash with an out of bounds error |
09:21:39 | Skrylar | well now i'm spooked. that code actually worked out of the box |
09:21:53 | Skrylar | Spent all day writing a module, wrote some tests, tests all passed. o_O |
09:22:55 | Araq | test it without the unittest module |
09:23:08 | Araq | there is a reason I don't want to use it for our tests/ ... |
09:23:20 | Araq | we should mark it unstable ... |
09:23:25 | Skrylar | is there a better test harness? |
09:23:33 | Araq | doAssert |
09:23:40 | Skrylar | i thought doasserts were deprecated |
09:23:47 | Araq | they are not |
09:26:13 | Skrylar | aside from the use of unittest; i wrote a unicode-safe gap buffer |
09:26:19 | Skrylar | also highlighted some stuff i had to add to skutf |
09:26:30 | Skrylar | tomorrow i'll have to fiddle around with unicode safe ropes |
09:26:43 | Skrylar | i saw we had a rope module |
09:29:25 | Araq | ok, just fyi ropes are slow and ultimately the compiler won't use them anymore |
09:33:23 | * | frza quit (Quit: frza) |
09:34:48 | Skrylar | they're useful for text editors |
09:35:19 | Skrylar | all though it looked like ropes were implemented kind of weird; normally you don't concatenate the whole rope in to a string when you use it, and it looked like thats what the rope module did |
09:38:06 | Araq | not sure what you mean |
09:38:26 | Araq | you can't do much better than the ropes module and keep ropes immutable |
09:38:44 | Araq | boehm's ropes are not immutable and so can be made much faster |
09:44:25 | Skrylar | it didn't look like you could render partials of the rope |
09:44:35 | Skrylar | i'd have to go back and look |
09:50:33 | * | frza joined #nimrod |
09:50:40 | Araq | oh you mean it doesn't support slicing ... yeah, that should be added |
09:52:14 | Skrylar | i've been doing some code involving slicing lately; its beneficial for a text editor to be able to store slice ranges since it helps with redraw |
09:52:21 | Skrylar | well, GUIs in general |
10:00:30 | * | DAddYE joined #nimrod |
10:04:37 | Araq | Skrylar: feel free to modify ropes.nim, afaict it's not used |
10:05:05 | Araq | and it's nice if this thing at least supports editors efficiently |
10:05:14 | * | DAddYE quit (Ping timeout: 265 seconds) |
10:51:10 | * | ddl_smurf quit (Quit: ddl_smurf) |
11:19:39 | * | frza quit (Quit: frza) |
11:49:52 | * | frza joined #nimrod |
11:51:39 | frza | hi all, I've a problem with babel while installing sfml |
11:52:05 | frza | it complains that the "Versions may only consist of number and the '.' character but found '-'" |
11:52:39 | frza | also, I'm on mac, and it looks like that library doesn't this platform yet |
11:53:00 | frza | but I tend to try to solve one problem at a time.. |
12:06:50 | * | ddl_smurf joined #nimrod |
12:07:59 | Araq | hi frza welcome! I can't help you unfortunately. when dom96 or fowl are around they will be able to help you |
12:08:30 | frza | I see, but what is the problem? |
12:08:51 | frza | I mean, it's a babel bug or a wrong configuration of the sgml bindings? |
12:08:55 | frza | *sfml |
12:09:01 | frza | (damn autocorrect) |
12:11:22 | * | ddl_smurf quit (Client Quit) |
12:12:10 | Araq | I'd say it's an issue with the sfml package |
12:12:30 | Araq | perhaps babel got more strict and this broke sfml |
12:14:10 | * | vendethiel quit (Read error: Connection reset by peer) |
12:15:05 | * | vendethiel joined #nimrod |
12:15:43 | EXetoC | it hasn't been updated in a year so who knows if it works |
12:15:59 | EXetoC | you could clone the repository, modify the babel file and then do "babel install" |
12:16:48 | Araq | Varriount, Varriount|Mobile I changed my mind, the tester should only produce a warning if there is no babel installed |
12:17:13 | Araq | it's rude to stop nimbuild because of this ... |
12:18:12 | * | psquid quit (Ping timeout: 264 seconds) |
12:18:20 | * | psquid joined #nimrod |
12:19:19 | * | vendethiel quit (Ping timeout: 252 seconds) |
12:20:03 | * | vendethiel joined #nimrod |
12:20:36 | frza | EXetoC: I'll try that when I'll be back home this evening |
12:21:54 | * | io2 joined #nimrod |
12:25:39 | * | BitPuffin joined #nimrod |
12:25:53 | EXetoC | ok. it should be fixed pretty soon if you report it |
12:58:10 | * | r0b4 joined #nimrod |
13:14:03 | * | zielmicha joined #nimrod |
13:18:02 | * | zielmicha quit (Changing host) |
13:18:02 | * | zielmicha joined #nimrod |
13:32:15 | * | nequitans_ joined #nimrod |
13:37:46 | * | Mat3 joined #nimrod |
13:37:57 | Mat3 | hello |
13:41:25 | * | faassen joined #nimrod |
13:51:37 | * | nequitans_ quit (Ping timeout: 240 seconds) |
13:52:24 | * | darkf quit (Quit: Leaving) |
14:00:00 | * | Duck__ joined #nimrod |
14:06:35 | * | Duck__ quit (Quit: Page closed) |
14:15:25 | * | Mat3 quit (Quit: Verlassend) |
14:18:59 | * | frza quit (Ping timeout: 240 seconds) |
14:38:21 | Varriount|Mobile | Araq: Do you want failure to find babel to be visible in the test results? |
14:39:21 | Varriount|Mobile | Araq: Also, I would like to talk with you later about changing how options are passed to tests. |
15:10:03 | NimBot | Araq/Nimrod devel bc551b0 Varriount [+0 ±1 -0]: Changed behavior when babel cannot be found/run... 2 more lines |
15:15:28 | * | ddl_smurf joined #nimrod |
15:16:42 | * | OrionPK joined #nimrod |
15:20:49 | Varriount | Araq: ^ |
15:23:32 | * | Endy joined #nimrod |
15:25:29 | * | silven quit (Remote host closed the connection) |
15:30:44 | * | silven joined #nimrod |
15:42:05 | NimBot | Araq/Nimrod devel 834704b Araq [+0 ±1 -0]: added a warning for htmlgen |
15:42:05 | NimBot | Araq/Nimrod devel bc658d8 Araq [+0 ±1 -0]: don't produce nested indents for nested stmt lists |
15:42:05 | NimBot | Araq/Nimrod devel 1d2214f Araq [+0 ±1 -0]: removed dead code |
15:42:05 | NimBot | Araq/Nimrod devel 7e32079 Araq [+0 ±3 -0]: fixes #968 |
15:42:05 | NimBot | 1 more commits. |
15:53:12 | * | awestroke quit (Remote host closed the connection) |
16:10:14 | Araq | Varriount|Mobile: well I'm here now |
16:17:49 | Varriount|Mobile | Araq: Yes, but I'm getting ready to leave for class. |
16:20:50 | Varriount|Mobile | Araq: In short, I think there needs to be a better way to pass options to tests. At the moment, all that happens is that the rest of the cmd line is passed in. |
16:21:24 | Araq | yeah and that already suffices |
16:21:43 | Araq | can't imagine what limitation you have in mind |
16:23:28 | * | Discoloda quit (Quit: Lost terminal) |
16:25:15 | * | [1]Endy joined #nimrod |
16:26:46 | * | Discoloda joined #nimrod |
16:28:29 | * | Endy quit (Ping timeout: 240 seconds) |
16:28:29 | * | [1]Endy is now known as Endy |
16:28:36 | Varriount|Mobile | Araq: Well, compiler options for individual tests can't be specified. For the babel tests, you can't name specific packages to download |
16:34:05 | Araq | yes they can |
16:34:24 | Araq | well individual options are entirely possible |
16:34:45 | Araq | however adding babel dependencies is not possible, that's true |
16:48:49 | EXetoC | overloading realloc and dealloc too would be nice, but ptr T is implicitly convertible to pointer so that would introduce subtle bugs |
16:50:58 | EXetoC | I wouldn't mind not having this implicit relationship. Anyway, I guess I'll append Type or something to the names |
16:51:53 | * | icebattle joined #nimrod |
16:53:15 | Araq | EXetoC: huh? alloc just takes a size, how can you overload that? |
16:55:30 | EXetoC | Araq: What did you have in mind? we did discuss it before. cast[ptr T](alloc(T.sizeof * n)) |
17:00:24 | * | brson joined #nimrod |
17:01:27 | Araq | EXetoC: it will become alloc(T, optionalNumberOfElements) |
17:01:32 | Araq | I think |
17:03:17 | * | faassen left #nimrod (#nimrod) |
17:03:26 | EXetoC | Araq: yes but I didn't mention alloc. and I didn't mean to include dealloc in that sentence |
17:03:36 | EXetoC | and realloc isn't used very often is it? so it's no big deal then |
17:03:46 | EXetoC | reallocType*[T]... |
17:03:58 | Araq | I see |
17:04:22 | Araq | well this needs to be changed once we got tagged pointers |
17:04:40 | Araq | dealloc accepting any pointer is indeed not acceptable |
17:27:37 | * | Varriount|Mobile quit (Ping timeout: 240 seconds) |
17:38:06 | * | DAddYE joined #nimrod |
17:48:16 | Varriount | Araq: How exactly do you want the JSON output of the tester modified? You stated that it currently only outputs the dirrerences between two commits, but you didn't specify what you wanted changed. |
17:48:50 | dom96 | Varriount: He wants the JSON output to contain all test results. |
17:48:58 | dom96 | Similar to the html but in json format |
17:49:03 | Araq | no |
17:49:09 | Araq | only the failing tests |
17:49:20 | Araq | or perhaps |
17:49:28 | Araq | every test whatever is better for nimbuild |
17:49:30 | Araq | bbl |
17:49:36 | dom96 | Yes, every test. |
17:53:06 | * | Kelet quit (*.net *.split) |
17:53:32 | fowl | frz |
18:01:41 | EXetoC | qrb |
18:10:10 | * | Kelet joined #nimrod |
18:10:52 | * | ddl_smurf quit (Quit: ddl_smurf) |
18:13:11 | EXetoC | I'm using lua now. I wanna go back to nimrod :( |
18:13:51 | fowl | why are you luaing |
18:15:10 | fowl | ah hmm |
18:15:30 | fowl | what would be the reason why my local repos is ahead of github |
18:16:14 | EXetoC | love2d |
18:16:53 | fowl | ah.. i forgot to push.. |
18:18:13 | EXetoC | makes sense |
18:18:30 | * | q66 joined #nimrod |
18:21:08 | EXetoC | death to late type errors |
18:30:35 | dom96 | EXetoC: Why don't you use sfml or sdl or something in Nimrod? |
18:36:48 | Varriount | How up-to-date is the opengl wrapper? |
18:37:21 | EXetoC | Varriount: 4.0+ or something like that |
18:43:30 | EXetoC | dom96: I just wanted to try out something different/more complete |
18:43:49 | * | ddl_smurf joined #nimrod |
18:51:39 | Varriount | EXetoC: Any idea what initialization function I need to call to load opengl? |
18:51:56 | dom96 | loadExtensions |
18:54:58 | Varriount | dom96: I can't find loadExtensions in the documentation |
18:55:12 | * | ddl_smurf quit (Quit: ddl_smurf) |
18:55:31 | EXetoC | Araq: about loadExtensions... were you implying before that it cannot determine whether or not an extension has been referenced, so as to avoid a linker error? |
18:56:02 | EXetoC | surely there's a way to make that work, so that's why I'm asking what it is you actually meant |
18:56:20 | Araq | EXetoC: I said it cannot reasonably be called as a top level statement in opengl itself |
18:56:25 | dom96 | Varriount: It does exist though. I'm not sure why it's not in the docs |
18:56:28 | Araq | so you have to call it on your own |
18:56:44 | Araq | EXetoC: it loads extensions depending on how you setup your render context |
18:57:00 | Araq | so ... there is no way to automate that |
18:57:00 | EXetoC | I don't think that's what I asked, but ok I'll report that then |
18:58:34 | Araq | what? |
18:58:43 | Varriount | And... now I get a linker error. |
18:58:51 | EXetoC | I was going to clarify, but nevermind, it was just a misunderstanding before |
18:59:04 | EXetoC | Varriount: yup, because you haven't referenced an extension |
18:59:14 | * | shodan45 joined #nimrod |
18:59:20 | Varriount | And how do I reference an extension? |
18:59:37 | EXetoC | Varriount: just by name |
18:59:42 | Araq | Varriount: if you don't reference an extension you don't need to call loadExtensions |
18:59:57 | Araq | it's confusing but we can only improve the docs |
19:00:08 | fowl | correction, if you dont reference an extension you can't call loadExtensions |
19:00:13 | Varriount | I'm trying to follow this tutorial -> http://www.opengl-tutorial.org/beginners-tutorials/tutorial-1-opening-a-window/#Opening_a_window |
19:00:15 | Araq | it's this complex for technical reasons |
19:01:48 | EXetoC | *that* you said though, and know I'm sure what you mean. So just a more helpful error message then, if possible |
19:02:01 | fowl | EXetoC, love2d isnt more complete than sfml >:( |
19:04:31 | * | carum joined #nimrod |
19:12:32 | OrionPK | i need to write a 2d/3d lib in nimrod ... |
19:12:38 | OrionPK | god I miss having free time |
19:12:55 | EXetoC | get rich |
19:18:42 | * | carum quit (Remote host closed the connection) |
19:18:54 | * | carum joined #nimrod |
19:19:11 | Varriount | OrionPK: Help filwit |
19:20:07 | Varriount | renesac: How goes the BigNum lib? |
19:25:16 | * | Demos joined #nimrod |
19:27:14 | renesac | Varriount, haven't really touched it this week... |
19:27:46 | renesac | I'm also thinking on making bindings for libmpdec |
19:28:34 | * | Endy quit (Ping timeout: 244 seconds) |
19:28:45 | renesac | it is a very fine piece of code: readable, 100% test coverage, formal proofs for many of the algorithms, etc |
19:29:37 | renesac | I don't think it is worth translating it |
19:30:10 | renesac | my bignum is more like gmp, but slower of course |
19:31:13 | Varriount | renesac: I'm pondering if I can use your bignum code for storing file sizes and ID's |
19:31:39 | Demos | that sound like a bad idea to me |
19:31:57 | renesac | a int64 is probably sufficient for filesizes |
19:32:39 | renesac | it is good for a couple of exabits |
19:32:47 | EXetoC | fowl: but it doesn't have helper libs with awesome names |
19:33:04 | Demos | also, you want to be able to pass around the id/size |
19:33:13 | Demos | and I think that may be hard with a bignum |
19:33:38 | fowl | EXetoC, love doesnt? |
19:34:28 | EXetoC | sfml |
19:35:40 | Varriount | Hm. Is quasi-quoting still broken? |
19:36:01 | OrionPK | Varriount kinda think i'd want to go w/ my own approach |
19:36:09 | * | carum_ joined #nimrod |
19:36:10 | OrionPK | Varriount i dont want to make a game engine really |
19:36:23 | fowl | EXetoC, what library do you need |
19:36:28 | renesac | for IDs, if they are random, you may have some problems with birthday paradox with only 64bits |
19:36:38 | fowl | love is like python it comes with a big std lib |
19:37:00 | Varriount | renesac: Most file system ID's are 64 bits. However there is at least one I know of that's 128 bits |
19:37:03 | Demos | usually if you want unique ids you dont make them totally random |
19:37:12 | renesac | but usually 128bits are sufficient, and you normally want those things to be variable size |
19:37:17 | Varriount | I'm not making ID's, I'm getting them from the host system. |
19:37:27 | Varriount | But the size varies from system to system |
19:37:56 | Demos | also I dont think handles for kernel objects are generally globally unique |
19:39:48 | * | carum quit (Ping timeout: 264 seconds) |
19:41:24 | Varriount | Demos: Think stat() |
19:41:56 | renesac | nirmod don't have a UUID module, does it? |
19:42:08 | renesac | if it does, you could steal it's UUID type |
19:42:18 | EXetoC | fowl: dunno |
19:42:27 | Demos | what are we using UUIDs for, stat does not seem to use them |
19:42:40 | renesac | nothing on index |
19:43:37 | Demos | there is an OID type I think, but UUIDs are a very special case of thing that you probably dont need in a filesystem |
19:44:36 | renesac | well, I mean some 128bit type that already has some methods, like `$` |
19:49:48 | Varriount | Hm. Is there any benefit to creating multiple emptyNodes in the AST, vs using just one? |
19:56:07 | fowl | what kind of node are you talking about |
19:56:48 | EXetoC | fowl: a UI lib and a particle system maybe, but we'll see. |
19:58:54 | Varriount | fowl: An emptyNode, like, what's returned by newEmptyNode() |
20:01:36 | fowl | Varriount, depends on what youre doing |
20:02:01 | fowl | nnkprocdef full of emptynodes doesnt make sense |
20:03:38 | Varriount | fowl: I'm erasing values from the fields of type definitions |
20:03:43 | EXetoC | I think I'll keep re-inventing the wheel whenever I go back to nimrod, but probably with the exception of networking |
20:04:55 | * | shodan45 quit (Quit: Konversation terminated!) |
20:05:36 | * | ddl_smurf joined #nimrod |
20:07:04 | fowl | EXetoC, im telling u man, enet |
20:07:25 | EXetoC | that was the plan |
20:14:05 | * | carum_ quit (Remote host closed the connection) |
20:17:59 | * | sale4one joined #nimrod |
20:19:05 | EXetoC | fowl: those are some ugly enumerators, but at least you have a helper module |
20:19:41 | * | skyfex quit (Remote host closed the connection) |
20:20:19 | fowl | ill clean it up some day |
20:20:51 | fowl | lol |
20:20:58 | fowl | ugly enums :( |
20:23:49 | sale4one | are tuples mutable in nimrod ? |
20:24:58 | dom96 | depends how you define them |
20:25:27 | dom96 | or wait, do you mean whether you can add fields at runtime to tuples? |
20:25:33 | dom96 | You can't. |
20:25:35 | sale4one | yeah |
20:25:55 | sale4one | oh, does nimrod have some type like python dictionary ? |
20:26:53 | dom96 | Yes. strtabs and tables modules provide them. |
20:27:09 | sale4one | so I should look there :) okay |
20:27:19 | sale4one | anyone have a example where its used ? |
20:27:54 | dom96 | hrm, the tables module could use some examples. |
20:28:22 | sale4one | Could you make a brief example ? |
20:28:35 | dom96 | But it's easy: var x = %{"blah": 5}.toTable[string, int]() |
20:28:48 | fowl | var t = {"key":"val"}.toTable ; echo t["key"]; t["otherkey"] = "other val" |
20:29:00 | sale4one | okay :) thanks |
20:29:20 | fowl | dom96, just toTable works |
20:29:31 | sale4one | and how do I define a field for it when I want to make an object ? |
20:29:37 | dom96 | fowl: cool |
20:29:41 | sale4one | variable (no field) |
20:30:07 | sale4one | not * |
20:31:34 | dom96 | var x = newTable[A, B]() # where A is the key type and B is the value type. |
20:32:07 | dom96 | If you want a string, string table then use strtabs, it's more efficient. |
20:32:27 | sale4one | yeah, I want to make that session library |
20:32:28 | dom96 | And then it's just: var x = newStringTable() |
20:32:33 | sale4one | so I need a place to store user data |
20:34:22 | * | io2_ joined #nimrod |
20:34:46 | * | io2 quit (Disconnected by services) |
20:34:51 | * | io2_ is now known as io2 |
20:39:20 | reactormonk | sale4one, you might use int64 and newTable[int64, <value>]() and to some parseHex stuff |
20:39:27 | NimBot | Araq/Nimrod devel e25fe4a Zahary Karadjov [+1 ±0 -0]: failing test case for static evaluation |
20:40:15 | * | Matthias247 joined #nimrod |
20:40:50 | reactormonk | sale4one, or, you might even consider sticking it into a specialized DB of some kind. |
20:43:10 | sale4one | reactormonk, I just want to make an object that will store the session id type of the session ( limited or persistent), and user data ( for this I wanted somekind of high lvl data type, like py dicts). Session id will be stored in cookie and the object will be somehow serialized and stored in a file |
20:53:07 | sale4one | oh, I could just easily write all informations into string table, no need to create an object ? How can I serialize it so I can write it in a file ? |
20:55:21 | reactormonk | sale4one, I suppose for that you'd have to write your own code |
20:55:32 | reactormonk | sale4one, maybe write a toJson |
20:56:31 | sale4one | that would be perfect, which module is that ? |
20:56:57 | * | ddl_smurf quit (Read error: Connection reset by peer) |
20:57:36 | reactormonk | sale4one, muh, json.nim only does parsing |
20:58:10 | sale4one | so no way I could serialize it somehow? |
20:58:18 | reactormonk | sale4one, I recommend adding toJson and writing something recursive that traverses the object tree... |
20:58:30 | reactormonk | sounds like templates/macros to me |
20:58:39 | fowl | marshals module |
20:58:42 | fowl | marshal |
20:59:12 | reactormonk | cool |
20:59:24 | reactormonk | pretty sure that will bail though |
21:01:02 | reactormonk | sale4one, there's your toJson. |
21:01:39 | sale4one | yeah :) I will try it, I was afraid i will need to save the data by iterating and making key = value pairs XD |
21:01:55 | * | ddl_smurf joined #nimrod |
21:03:03 | * | carum joined #nimrod |
21:03:20 | sale4one | BTW, you should really use somekind of wiki software, and make better docs :D |
21:03:38 | reactormonk | sale4one, nah, there's plenty of wikis around. And better docs - feel free to add them. |
21:04:02 | reactormonk | I'll accept any PR that adds documentation for you |
21:04:58 | reactormonk | s/for/from/ |
21:09:32 | sale4one | Restriction: For objects their type is not serialized. This means essentially that it does not work if the object has some other runtime type than its compiletime type. Will this make a problem with String Tables ? |
21:10:24 | sale4one | http://nimrod-lang.org/marshal.html |
21:11:47 | reactormonk | sale4one, try it. |
21:12:47 | sale4one | Error: type mismatch: got (proc (varargs[T]), PStringTable) |
21:12:47 | sale4one | but expected one of: |
21:12:47 | sale4one | marshal.$$(x: T): string |
21:12:52 | sale4one | :( |
21:13:16 | reactormonk | fuck™ |
21:14:07 | sale4one | lol |
21:14:14 | sale4one | lets find another way :D |
21:14:27 | reactormonk | sale4one, actually, if you could hack it to work, that would be great |
21:14:36 | reactormonk | sale4one, can you give me your code? |
21:16:21 | sale4one | https://gist.github.com/anonymous/9355838 |
21:16:27 | sale4one | its the testing code |
21:26:07 | * | flaviu joined #nimrod |
21:27:35 | fowl | sale4one, u need parens around $$sessiondata |
21:27:44 | Araq | hi flaviu welcome |
21:28:12 | flaviu | Hey, Araq, I'm new here |
21:28:36 | flaviu | Hopefully I'll be able to contribute some to docs when I figure everything out |
21:29:46 | Araq | I know you're new that's why I welcomed you :P |
21:30:01 | Araq | though sometimes I get wrong ;-) |
21:30:12 | flaviu | Thanks, I appreciate the warm welcome |
21:31:51 | sale4one | fowl, damn and I really wanted to put those there XD |
21:32:38 | Araq | sale4one: with the planned strong spaces feature your code will work |
21:33:33 | Araq | it's a common gotcha |
21:33:44 | Araq | in fact even I had to learn it ;-) |
21:33:53 | sale4one | fowl: still, same error type missmatch :( |
21:34:21 | sale4one | Araq: I will try my best to learn it too :) but you will get it all done by then :D |
21:35:16 | fowl | sale4one, echo ($$session_data) |
21:38:17 | sale4one | oh :/ all around, now it works. But it creates so much junk text :( |
21:40:47 | * | carum quit (Remote host closed the connection) |
21:51:55 | sale4one | exit |
21:51:58 | * | sale4one left #nimrod ("ERC Version 5.3 (IRC client for Emacs)") |
21:53:02 | flaviu | This isn't mentioned anywhere so I'd assume not, but I sequtils lazy? |
21:54:07 | Araq | no |
21:58:12 | * | brson quit (Quit: leaving) |
22:04:24 | Matthias247 | what are strong spaces? |
22:06:48 | Araq | "horizontal parsing" |
22:07:14 | Araq | the consequent next step if you have indentation based parsing |
22:07:48 | Araq | in other words x&y | z is parsed as (x&y) | y regardless of & and |'s precedence |
22:08:08 | flaviu | http://forum.nimrod-lang.org/t/209 |
22:08:09 | * | noam joined #nimrod |
22:08:13 | * | sale4one joined #nimrod |
22:10:48 | Matthias247 | Hmm, don't know if I like this. I would expect basic math precedence to be always valid (+-*/). But for other operators (where I can't remember precedence anyway) it might be useful |
22:13:15 | * | Kelet quit (Read error: Connection reset by peer) |
22:14:19 | Araq | we can make the compiler produce an error for i+4 * 5 if it concerns you that much |
22:15:05 | Demos | I like it even for basic math actually... but maybe I am just crazy |
22:15:08 | Araq | but frankly "basic math precedence" is just some set of arbitrary archaic rules. Oh and it's ambiguous too. |
22:15:30 | EXetoC | Demos: same. it should be a common use case |
22:15:38 | flaviu | Is the name of tuple elements important? I'm trying something like foo.zip(bar).toTable, no dice, type mismatch |
22:15:49 | Matthias247 | of course it is. But these archaic rules are well known and expected :) |
22:16:05 | Demos | flaviu, I do not think so, their types are however |
22:16:31 | Demos | right and i+4*5 will parse as i+(4*5) |
22:17:04 | EXetoC | yeah? |
22:17:29 | EXetoC | sure, that seems reasonable |
22:18:25 | * | Kelet joined #nimrod |
22:21:51 | OrionPK | eek |
22:22:02 | OrionPK | the horizontal space parsing thing frightens me |
22:22:34 | OrionPK | I think it'd be preferable to give have a precedence over pragma on custom operators or something.. put that work on the library designer |
22:23:50 | Araq | so instead of looking at how the code looks like I should look up how the precedences have been influenced via pragmas? |
22:24:06 | flaviu | I personally like it, in many cases this will be clearer than (())()))(()) |
22:24:16 | Araq | I can't see how that is a better solution by any means |
22:25:19 | OrionPK | araq just spitballing |
22:25:37 | OrionPK | I dont know of a good design yet, just know what I dont like |
22:28:05 | OrionPK | I can think of a half-dozen things I know you'd hate though :p |
22:28:35 | OrionPK | I just think the onus should be on the library writer to define precedence |
22:28:37 | OrionPK | rather than the user |
22:28:45 | flaviu | OrionPK: Haskell's system is pretty neat: http://www.haskell.org/onlinereport/decls.html#fixity |
22:30:06 | OrionPK | http://forum.nimrod-lang.org/t/209/2#2100 |
22:31:24 | Araq | "ixity is a property of a particular entity (constructor or variable), just like its type; fixity is not a property of that entity's name." |
22:31:30 | EXetoC | inexperienced people will definitely be confused by its use in math-heavy code |
22:31:37 | Araq | "Fixity is a property of a particular entity (constructor or variable), just like its type; fixity is not a property of that entity's name." |
22:31:47 | Araq | that's awful imho |
22:31:53 | OrionPK | refresh |
22:32:17 | Araq | and doesn't really work with nimrod anyway (excessive overloading, complex lookup rules) |
22:33:12 | Araq | OrionPK: what if foo.`%` and bar.`%` don't agree on %'s precedence? |
22:33:29 | OrionPK | go with the module's set precedence |
22:33:59 | Araq | well no, these rules can be imported |
22:38:17 | zahary1 | we've discussed this before - it's not practical to set precedence on the level of types, but it's possible to set it on the level of tokens |
22:39:03 | dom96 | Let's just add a prefix notation macro. It'll solve all the problems with precedence. |
22:39:33 | Araq | dom96: are you serious? and if so what's a prefix notation macro? |
22:40:09 | Skrylar | it sounds like something lispish |
22:40:29 | dom96 | Araq: I'm not really serious. But I wonder if this would be possible: prefix: 5 5 + |
22:40:43 | dom96 | Skrylar: It's the opposite of Lisp :P |
22:40:55 | Skrylar | isn't that postfix notation? :) |
22:41:02 | Araq | brb |
22:41:10 | dom96 | oh yeah. You're right |
22:41:10 | dom96 | lol |
22:41:12 | flaviu | Reverse Polish Notation: https://en.wikipedia.org/wiki/Reverse_Polish_notation |
22:41:22 | * | dom96 looked up Polish notation |
22:41:31 | dom96 | Forgot the 'reverse' |
22:43:50 | * | sale4one quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
22:50:26 | * | noam quit (Read error: Connection reset by peer) |
22:50:52 | * | noam joined #nimrod |
22:53:18 | flaviu | Sorry for bothering you all with elementary mistakes, but I can't make anything out of Error: type mismatch: got (seq[tuple[a: TVowelConsonants, b: string]]) but expected one of: tables.toTable(pairs: openarray[tuple[key: A, val: B]]): TTable[A, B] |
22:53:18 | flaviu | Isn't seq usable as an openarray? |
22:54:44 | * | OrionPK quit (Ping timeout: 265 seconds) |
22:55:23 | Skrylar | I don't think it is; if I remember an openarray just makes an array out of all the parameters given to it |
22:55:28 | Skrylar | like a more type-safe varargs |
22:55:46 | dom96 | According to the manual it is. "A sequence may be passed to a parameter that is of type open array." |
22:55:48 | zahary1 | seq should be passable to an openarray |
22:56:06 | zahary1 | this could be a bug - better upload a more detailed gist |
22:56:33 | dom96 | flaviu: Make sure your TVowelConsonants and string match the types in your TTable |
22:56:38 | * | zielmicha quit (Quit: Connection closed for inactivity) |
22:57:54 | zahary1 | toTable is generic, but I now notice the problem - your tuple uses a: and b: as keys, while toTable expects key: and val: |
22:58:32 | Demos | I thought tuples were supposed to be structurally typed? |
22:58:33 | zahary1 | nimrod insists in general the tuple fields names to match unless you are using anonymous fields |
22:59:10 | flaviu | I don't think there is any way to tell zip that, so I'll pack it manually |
22:59:16 | flaviu | thanks |
23:02:55 | NimBot | Varriount/NimLime master acfabf5 Matthias Einwag [+0 ±5 -0]: Added an option to set the compiler executable. |
23:14:38 | Araq | zahary1: if we ever rewrite the C codegen, we should make a simple AST -> AST transformation plus a renderer that renders the AST in C syntax... |
23:16:05 | zahary1 | yes, I've considered this too |
23:16:31 | Araq | hey, it took me years to come up with this idea |
23:16:51 | Araq | you can't simply say "yeah me too" :P |
23:17:58 | zahary1 | :) many other compiler that I've looked at have such a output AST - in some of them, it differs from the source AST |
23:18:08 | EXetoC | yeah me too |
23:18:17 | dom96 | I thought that's how it currently works. |
23:18:40 | Discoloda | dom96: same here |
23:19:12 | Araq | dom96: no we produce some shitty rope based tree from the AST directly and then have no chance to optimize it afterwards |
23:19:38 | Araq | so every optimization needs to be done before the final pass to ropes happens |
23:20:46 | * | io2 quit () |
23:21:11 | Skrylar | oO |
23:21:12 | dom96 | bbl |
23:21:32 | Skrylar | i thought ast->ast was the standard for that |
23:21:37 | Skrylar | i guess i've been overengineering all this time |
23:21:47 | * | ddl_smurf quit (Quit: ddl_smurf) |
23:22:05 | Araq | Skrylar: we use ast->ast pretty much everywhere else |
23:22:14 | Araq | but not for the final codegen, unfortunately |
23:23:44 | zahary1 | well, there is the transf pass, so it's not that different than the norm |
23:42:42 | flaviu | I think its a bad idea for tuples to be typechecked based on value names |
23:45:16 | fowl | agreed |
23:45:20 | Demos | AAHAHAHAHAHAHAHAHHHHHHHHHHHHH I just spent 3 hours on something that turned out to be the echo precidence bug |
23:45:29 | * | Demos facedesks |
23:45:36 | fowl | noob |
23:45:42 | fowl | wat u working on now demos |
23:46:11 | zahary1 | fowl, flaviu, if you use the field names inside the proc that accepts the tuple, then you'll want them to match |
23:46:34 | Demos | my ecs. I can make a component out of any type, but often I want to treat type T as type TComponent[T] if T is not a component itself |
23:46:35 | zahary1 | I think that toTable should be written to accept anon tuple |
23:46:59 | fowl | Demos, what makes T a component |
23:47:15 | Demos | you have called MakeComponent(T) for it |
23:48:01 | fowl | whats TComponent[T] then |
23:48:02 | Demos | MakeComponent just makes a global data structure with the identifer TSceneNode, so like intSceneNode or TComponent_int_SceneNode for a TComponent[int] |
23:48:31 | Demos | type TComponent[T] = object[ent: int; data: T] |
23:48:40 | Demos | just a structure to associate components with entities |
23:50:22 | flaviu | zahary1: I would say that no, I actually don't. The way every other language does it is requiring indexed access, this makes tuples universal. So names should just be aliases for an index, if you want names enforced you should be using an object. |
23:51:04 | fowl | zahary1, i thought tuple[float,float] will always match tuple[float,float] |
23:51:11 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:51:24 | fowl | Demos, i dont get it, id love to take a look at it thoug |
23:51:44 | zahary1 | tuple[float, float] will match tuple[a: float, b: float] and tuple[x: float, y:float] |
23:52:35 | zahary1 | my point was that nimrod already supports the behaviour you want, but it also has a more strict mode |
23:52:53 | Demos | the idea is to be able to "do" and ecs /without/ type erasure |
23:53:23 | flaviu | Demos: ecs? |
23:53:49 | Demos | entity component system |
23:55:08 | Araq | flaviu: field names are part of the type in TAPL |
23:55:30 | Araq | which is *the* reference when it comes to type systems, so you're wrong :P |
23:57:11 | flaviu | For objects sure. But I feel that tuples are just a universal way to encapsulate arity, wikipedia defines them as "In set theory, an (ordered) -tuple is a sequence (or ordered list) of elements, where is a non-negative integer" |
23:57:48 | flaviu | The names are just syntactic sugar to keep code clean and document intentions |
23:58:41 | fowl | Demos, gotta go smoke then read more about type erasure |
23:58:44 | fowl | brb |
23:59:32 | zahary1 | fowl, you are using type erasure in the message dispatching code |