<< 04-03-2014 >>

00:00:01Skrylarmain 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:13Matthias247dom96: such classic window toolkits are currently a dieing thing
00:00:22dom96I'm not really familiar with morphic, got any good links?
00:00:28Skrylarthere aren't any. lol
00:00:32Matthias247everybody moves to declarative stuff
00:00:42Skrylarhttp://en.wikipedia.org/wiki/Morphic_%28software%29 has some clones
00:01:12SkrylarSome of the implementations are basically just event code over canvas calls
00:01:31SkrylarMatthias247: eh, they aren't dying on the mac
00:02:00SkrylarI think poorly designed GUIs are being replaced with anything that happens to be on hand, but stuff like Qt is still healthy
00:02:35SkrylarSome 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:52dom96The majority of apps I use on Windows still use this classic GUI.
00:03:03dom96The exceptions are Spotify, Steam and Battle.Net
00:03:30Matthias247dom96: It will also stay for some time that way, because nobody will rewrite the old stuff
00:03:44dom96Perhaps what we should do is create a limited but efficient html rendering engine :P
00:03:53SkrylarI use a lot of classic GUI stuff too
00:04:09Matthias247i use winforms for tools
00:04:11SkrylarHTML5 isn't doing things like Renoise any favors
00:04:33Matthias247dom96: there's librocket
00:04:55Skrylarwhy 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:50Matthias247the problem with HTML/QML/etc. is that you will easily get an inconsistent UI style
00:06:49Skrylarpart of why i was considering using Cairo is because its easier to get things running with that
00:06:52dom96Inconsistent with the OS sure.
00:06:59Matthias247biggest benefit of these is probable that they can handle different monitor resolutions better than classical toolkits
00:07:06dom96But as long as it's close, users won't care.
00:07:12Matthias247and animations
00:07:30SkrylarI don't think users actually care that much if things look native.
00:07:33SkrylarI mean, Linux is GUI soup
00:07:41SkrylarWindows has themed crap in all manners of inconsistent
00:07:47SkrylarMac users care a LOT though
00:07:55Matthias247Skrylar: linux is a soup in all ways, not only gui :)
00:08:21dom96Yeah, and Mac users are also the ones who are rich.
00:08:31dom96I would be willing to write custom GUI code for them.
00:08:33dom96:P
00:08:33Matthias247but I think most users want a consistent look for feel, because it also makes the handling easier
00:09:04Matthias247dom96: they are not necessarily rich - but they like to spend money :)
00:10:03dom96It depends what you consider rich I guess.
00:10:56Matthias247most people own an iphone. That's expensive, but you don't have to be rich to own one :)
00:11:33Skrylareh mac users will pay for quality in apps :\
00:11:40dom96True.
00:11:41dom96Anyway
00:11:46dom96Good night for real.
00:11:49Skrylarthey WILL get mad if you ask 500$ for undocumented garbage
00:11:51Skrylargood night dom96
00:12:07Skrylarwhereas on Windows people seem kinda complacent with expensive and poorly supported software
00:12:28Matthias247gn8
00:12:42*carum quit (Remote host closed the connection)
00:12:58SkrylarI'm starting to think I don't really need this gap buffer
00:13:11SkrylarI 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:45SkrylarGuess it doesn't hurt to have both.
00:16:45*carum joined #nimrod
00:20:24Demosone 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:41Demosand objective-c seems to be quite a good language for doing GUIs
00:21:48SkrylarYeah, and they get tools for free :)
00:21:58SkrylarI guess we do too now with Qt Creator
00:23:47DemosI 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:08Demosand QTc's completion and debugger support is pretty bad
00:24:14Skrylarthere's a heavy MVC bias in Cocoa
00:24:15Demosbut yeah. Qt is great
00:24:26SkrylarQt still does that "oh well the GUI designer will emit C++ code!" thing
00:24:41SkrylarAnd while signals + slots are nice, Obj-C fully decouples the GUI layout from the code
00:24:51Skrylarits literally an external data file
00:25:02Demoswell it is still kinda MVC, the V is just code
00:25:04Demoswhich is fine
00:25:28SkrylarI also like the way they name things over there; it feels more readable/smalltalkish than C++ code does
00:25:39Skrylarbut I can't think of too much that Qt doesn't do that Cocoa does
00:25:45SkrylarPresentation I guess
00:26:20DemosQt is also like the java standard library for c++
00:26:38*zielmicha quit (Quit: Connection closed for inactivity)
00:28:24VarriountMeep
00:28:34EXetoCeep
00:28:39Varriountep
00:36:47VarriountSkrylar: Can you explain Cocoa to me?
00:37:23*darkf joined #nimrod
00:37:25VarriountI mean, how is it decoupled?
00:44:12VarriountAraq: ping
00:44:26*nequitans_ joined #nimrod
00:44:32VarriountHey nequitans_
00:44:43nequitans_hello Varriount!
00:47:16VarriountHm, this is interesting -> http://ssp.impulsetrain.com/goto.html
00:51:06SkrylarVarriount: Cocoa is basically the OS X apis in objective-c
00:51:16VarriountSkrylar: Ah.
00:51:17Skrylarthough Cocoa is specifically the GUIs as I understand it
00:51:44Skrylarthey 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:14Skrylaryou 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:52EXetoChttp://www.di.fm/spacemusic
01:04:27EXetoCJust 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:54Discolodadoes 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:01VarriountHi xenagi
01:34:49xenagihi Varriount
01:53:27*flaviu joined #nimrod
01:54:38flaviuThis is probably in the docs somewhere and I missed it, but how/can do I create a local scoped expression?
01:55:33flaviuSomething like `let x = block:
01:55:33flaviu let tmp = 1+2
01:55:33flaviu tmp + 5`
02:01:05EXetoCflaviu: I think templates fit that description: http://build.nimrod-lang.org/docs/manual.html#templates
02:15:50flaviuEXetoC: 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:41flaviuwith braces, something like `let x = {let t = 2+3; return t+4}`
02:16:42EXetoCI 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:32EXetoClet x = (let y = 1; y + 1)
02:18:34EXetoCok 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:23Demosflaviu, why not use a function
02:21:13Demosproc foo(t) = t+2+3+4
02:22:29flaviuYes, 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:57Demoswell block does that
02:24:36EXetoCsee my last snippet
02:25:31EXetoCand yes there are blocks, but I don't think you can return a value from one.
02:25:36EXetoCand then you have templates
02:26:30flaviuSorry EXetoC, I'm also playing around with the vim plugin and I was confused by the error highlighting
02:26:31Demosyou could probably cook up a template that does what you want
02:26:50Demosthe vim plugin has error highlighting?
02:27:48flaviuDemos: Yep, http://i.imgur.com/f11mnJU.png
02:28:15Demosis that zah's plugin?
02:28:44Varriountflaviu: Nimrod has expression lists.
02:28:49*Guest96546 quit (Ping timeout: 240 seconds)
02:28:57EXetoCreplace || with 'or'
02:29:23EXetoCwell, you could also use a set. that should be more idiomatic
02:29:23flaviuDemos, yes. Do you have synastic installed?
02:29:34DemosI guess not
02:29:48EXetoCch in {'a', 'e', 'i', 'o', 'u'}
02:30:50*Guest96546 joined #nimrod
02:35:40flaviuEXetoC: 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:07Varriountfowl: ping
03:04:28fowlponhg
03:04:33fowlbong*
03:19:49*DAddYE joined #nimrod
03:23:59*DAddYE quit (Ping timeout: 240 seconds)
03:28:32SkrylarI do miss KWin when I'm using Windows
03:31:05Demosthe window manager?
03:31:10SkrylarYeah.
03:31:16Demosdwm is pretty good (the windows dwm not the suckless one)
03:31:43SkrylarKWin 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:10Demosthat should be possible on windows.... dont know if that utility exists though
03:32:21Demosprocexp has something kinda like that
03:32:34SkrylarI know there are a few tools for making windows specific sizes
03:32:50SkrylarI 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:04SkrylarReally handy for recording for instance
03:33:10*carum joined #nimrod
03:33:13flaviuNo tiling window manager love here?
03:33:26Skrylartiling window managers move my windows around :(
03:34:15Skrylari got along with the division window managers where you get the little option to shove windows in a quadrant though
03:34:34flaviuI deal with that by using more workspaces
03:34:35Skrylarits 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:06flaviuOh, I see. my WM isn't purely tiling, utility dialogs are floating
03:35:30Skrylari used kwin's tiling mode for a little while and it was weird
03:39:32SkrylarIf I were a person writing a text editor, I would probably use Blender's concept for the GUI
03:39:43Skrylarwhere you have a subdivision interface and a drop-down icon to change that division's content
03:48:44Demosyou 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:24SkrylarVarriount: do you think a set of iterator templates would be any useful in nimrod?
05:00:38SkrylarRust had some neat combinator things for iterators
05:00:44*DAddYE quit (Ping timeout: 265 seconds)
05:00:49Skrylarblah.items().take(5).join(someOtherIter)
05:02:21*DAddYE joined #nimrod
05:06:04Demosare those done with no overhead?
05:06:56SkrylarDemos: "no"
05:07:12Skrylarby "no" I mean like almost everything in Rust, "well the compiler ought to optimize those down"
05:07:23Demosoh... wonderful
05:07:28Demosthe best kind of optimization
05:07:43SkrylarYeaaah, 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:09Demosyou really, really, really, really need to 100% garentee zero overhead iterators
05:08:58Skrylarfrom what I remember of their iterators it was basically a chain that just went "if remaining < 1: invoke the next iterator"
05:09:08Skrylarso there was an overhead in the call stack
05:09:32Demosbut if you are calling functions in an iterator you are totally screwed
05:09:45Demosor rather if the iterator is a call
05:10:02Demosalso it would need to store the stuff to pass to the next iterator right?
05:10:31Skrylarin a nimrod template i would think you could do all of that in a block
05:10:55Skrylarblock thisArea: var remaining = X; block(); dec remaining; if ... break thisArea
05:11:28*DAddYE quit (Remote host closed the connection)
05:11:50Demosyeha probably
05:11:53SkrylarOne 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:08Skrylaror something similar
05:12:20Skrylarbasically meant it would read up to X many items and then automatically chop the string and replace the rest with an ellipsis
05:13:09Skrylarall though they had them as objects which meant you could add rules as you went along in the method
05:13:17Skrylarnot something i used all that much though
05:15:01Demoshad 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:47Varriount|MobileWe really need a way to iterate iterators easily without having to explicitly pass parameters
05:40:49Varriount|MobileSkrylar: Unfortunately, you can't easily chain iterators like that unless they are explicitly designed to work with each other
05:53:21SkrylarVarriount|Mobile: a handful of templates would probably cover most of the chains
05:53:57Skrylari'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:37VarriountAnyone know if nimrod has wrappers for GLEW (or a wrapper for a suitable alternative)?
07:28:15DemosI think the opengl package will deal with all that for you
07:31:34Varriount|MobileDemos: Are you sure?
07:31:48Demosit looks like it is based off gl loader generator
07:32:13Varriount|MobileI'm following some C++ tutorials on opengl, and they use glew and glfw
07:32:15Demostry something like a UBO and see
07:32:37Demoswhich tutorials, opengl tutorials are usually pretty bad
07:32:57Demosjust call the init functions mentioned in the opengl module docs
07:33:11Varriount|MobileOnes meant for opengl 3.3
07:33:55Varriount|MobileDemos: http://www.opengl-tutorial.org/beginners-tutorials/tutorial-1-opening-a-window/
07:34:57DemosOK that one looks OK
07:35:11Demosjust make sure to call the init function for the opengl module and you will probably be fine
07:35:33Demosif it does not work the probable outcome is trying to follow a null function pointer
07:36:34Skrylari do not look forward to dealing with thst atuff again :<
07:36:51Varriount|MobileDemos: I want to learn some opengl, for knowledge's sake if nothing else.
07:37:42Varriount|MobilePlus, even if all I come up with is a little toy, it's something I can post on reddit.
07:38:21Demosyeah, 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:21Varriount|Mobileglloadergen?
07:39:35Demoslua program to generate openGL header files
07:39:52Skrylari thought one of the nimrod modules said it was based on the XML definitions
07:40:03DemosI find 90% of ogl/d3d work is at the interface between c/c++ and glsl/hlsl
07:40:18Demosyeah glloadgen is based on the xml definitions
07:40:31Skrylarwould be nice to have a mini-nim for GLSL
07:40:39DemosI 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:01Demosyeah, both me and filwit want to do that, although he is probably more qualified
07:44:15Demosin 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:39Varriount|MobileThe binding?
07:45:52Demosyeah, setting up your shader, binding textures, uniforms, and various * buffer objects
07:46:06Demosand dealing with VAOs
07:46:45SkrylarI suppose distinct types could lead to some fun with GL
07:47:06Skrylarat least as far as being able to pretend like you had actual handles to things
07:47:43Demosyeah, I actually use distinct ints in my entity system as entity and scenes
07:48:16Skrylari'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:25Skrylarmost people i've seen just say "well hope you don't use them all"
07:50:35Skrylari 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:53Demosyeah I am thinking of doing that, I mean it is the same as using pointers
07:55:58Demosyou can run out of memory
07:56:24Demosyou 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:43Skrylarthe 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:11Demosor like as an index into an array, that extra deref is almost always worth it for the stability
08:00:23Skrylarlike 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:04SkrylarDemos: 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:20Skrylarunless you never recycle IDs, but then you have to answer the "what happens when I run out?" problem
08:01:27Demostrue, but if you need to ralloc the array
08:01:31Demos*realloc
08:02:17Demosanyway I use an Id because entities are really just tags for me.
08:02:41Demosthere is literally nothing that a ptr TEntity could possibly point to
08:02:50Skrylarwhen i was curious about tcl the lack of a proper opaque type was a massive downer for me
08:03:12Skrylarthats one thing lua does really well; being able to make usertypes
08:03:28*DAddYE quit (Ping timeout: 244 seconds)
08:04:25Skrylarthats 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:36Skrylarnow its suddenly impossible to use a handle for a sound file that was meant for a graphic
08:06:46Demosyeah, never used lua but I thought it only really had hashtables
08:08:16DemosI like that nimrod keeps data structures and procedures fairly seperate
08:08:49Skrylarhash tables, numbers and strings
08:09:13Skrylarthere is a 'light' and 'heavy' userdata which is basically a hashtable with a meta-blob that lua can't access
08:09:40Skrylarso 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:56Demosgaah I should learn lua, for some reason I just never get around to learning these scripting languages
08:10:09Skrylarthe only difference is that 'light' is nothing more than a pointer object, while 'heavy' is for data allocated by lua
08:10:27Skrylaryou can ask lua to allocate memory from the lua pool which will get GC'd when nobody cares about it anymore
08:10:33Skrylarbut store C structs in that
08:10:44Demosthat is actually pretty cool
08:11:00Skrylarlua is pretty cool. :>
08:11:23Skrylarthere's "moonscript" which is defined as "coffeescript for lua" that i've been wondering about using with nimrod
08:11:39Skrylarbasically gives the significant whitespace style of syntax to lua which doesn't look *that* far from nimrod source
08:12:34Demoseaghhhhhhhh I would rather use nimrod for all the things
08:12:41Demosor just use python for scripting
08:12:49Demossince the syntax of python is pretty close the nimrod
08:12:52Skrylarpython can fall offacliff
08:12:54Skrylar:<
08:13:17Skrylari don't get how people stand embedding that; it basically doesn't support it
08:14:36SkrylarI 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:24Varriount|MobileSkrylar: Have you seen micklat's NimBorg?
08:16:57SkrylarI'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:02SkrylarVarriount|Mobile: no, whats that?
08:17:40Demospython makes no effort to be fast
08:17:51Demoslike totally zero effort
08:17:54SkrylarLua didn't really intend to be fast. lol
08:18:00Demosoops :D
08:18:05Varriount|MobileSkrylar: It's a high level interface for nimrod to interact with scripting langs
08:18:27Skrylarthey 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:51Skrylari 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:52Varriount|MobileDemos: I'm not quite so sure about that. There's a reason the GIL exists you know.
08:20:21SkrylarNow Ruby.. thats a language that never had 'speed' as a design decision. lol
08:20:32SkrylarMatz 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:04Araqhi frza welcome
08:59:52*DAddYE joined #nimrod
09:04:01*DAddYE quit (Ping timeout: 240 seconds)
09:11:02Skrylarinteresting
09:11:09Skrylarcheck $buffer == "test"
09:11:18Skrylarmakes the check macro crash with an out of bounds error
09:21:39Skrylarwell now i'm spooked. that code actually worked out of the box
09:21:53SkrylarSpent all day writing a module, wrote some tests, tests all passed. o_O
09:22:55Araqtest it without the unittest module
09:23:08Araqthere is a reason I don't want to use it for our tests/ ...
09:23:20Araqwe should mark it unstable ...
09:23:25Skrylaris there a better test harness?
09:23:33AraqdoAssert
09:23:40Skrylari thought doasserts were deprecated
09:23:47Araqthey are not
09:26:13Skrylaraside from the use of unittest; i wrote a unicode-safe gap buffer
09:26:19Skrylaralso highlighted some stuff i had to add to skutf
09:26:30Skrylartomorrow i'll have to fiddle around with unicode safe ropes
09:26:43Skrylari saw we had a rope module
09:29:25Araqok, just fyi ropes are slow and ultimately the compiler won't use them anymore
09:33:23*frza quit (Quit: frza)
09:34:48Skrylarthey're useful for text editors
09:35:19Skrylarall 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:06Araqnot sure what you mean
09:38:26Araqyou can't do much better than the ropes module and keep ropes immutable
09:38:44Araqboehm's ropes are not immutable and so can be made much faster
09:44:25Skrylarit didn't look like you could render partials of the rope
09:44:35Skrylari'd have to go back and look
09:50:33*frza joined #nimrod
09:50:40Araqoh you mean it doesn't support slicing ... yeah, that should be added
09:52:14Skrylari'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:21Skrylarwell, GUIs in general
10:00:30*DAddYE joined #nimrod
10:04:37AraqSkrylar: feel free to modify ropes.nim, afaict it's not used
10:05:05Araqand 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:39frzahi all, I've a problem with babel while installing sfml
11:52:05frzait complains that the "Versions may only consist of number and the '.' character but found '-'"
11:52:39frzaalso, I'm on mac, and it looks like that library doesn't this platform yet
11:53:00frzabut I tend to try to solve one problem at a time..
12:06:50*ddl_smurf joined #nimrod
12:07:59Araqhi frza welcome! I can't help you unfortunately. when dom96 or fowl are around they will be able to help you
12:08:30frzaI see, but what is the problem?
12:08:51frzaI mean, it's a babel bug or a wrong configuration of the sgml bindings?
12:08:55frza*sfml
12:09:01frza(damn autocorrect)
12:11:22*ddl_smurf quit (Client Quit)
12:12:10AraqI'd say it's an issue with the sfml package
12:12:30Araqperhaps 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:43EXetoCit hasn't been updated in a year so who knows if it works
12:15:59EXetoCyou could clone the repository, modify the babel file and then do "babel install"
12:16:48AraqVarriount, Varriount|Mobile I changed my mind, the tester should only produce a warning if there is no babel installed
12:17:13Araqit'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:36frzaEXetoC: 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:53EXetoCok. 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:57Mat3hello
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:21Varriount|MobileAraq: Do you want failure to find babel to be visible in the test results?
14:39:21Varriount|MobileAraq: Also, I would like to talk with you later about changing how options are passed to tests.
15:10:03NimBotAraq/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:49VarriountAraq: ^
15:23:32*Endy joined #nimrod
15:25:29*silven quit (Remote host closed the connection)
15:30:44*silven joined #nimrod
15:42:05NimBotAraq/Nimrod devel 834704b Araq [+0 ±1 -0]: added a warning for htmlgen
15:42:05NimBotAraq/Nimrod devel bc658d8 Araq [+0 ±1 -0]: don't produce nested indents for nested stmt lists
15:42:05NimBotAraq/Nimrod devel 1d2214f Araq [+0 ±1 -0]: removed dead code
15:42:05NimBotAraq/Nimrod devel 7e32079 Araq [+0 ±3 -0]: fixes #968
15:42:05NimBot1 more commits.
15:53:12*awestroke quit (Remote host closed the connection)
16:10:14AraqVarriount|Mobile: well I'm here now
16:17:49Varriount|MobileAraq: Yes, but I'm getting ready to leave for class.
16:20:50Varriount|MobileAraq: 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:24Araqyeah and that already suffices
16:21:43Araqcan'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:36Varriount|MobileAraq: Well, compiler options for individual tests can't be specified. For the babel tests, you can't name specific packages to download
16:34:05Araqyes they can
16:34:24Araqwell individual options are entirely possible
16:34:45Araqhowever adding babel dependencies is not possible, that's true
16:48:49EXetoCoverloading realloc and dealloc too would be nice, but ptr T is implicitly convertible to pointer so that would introduce subtle bugs
16:50:58EXetoCI 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:15AraqEXetoC: huh? alloc just takes a size, how can you overload that?
16:55:30EXetoCAraq: 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:27AraqEXetoC: it will become alloc(T, optionalNumberOfElements)
17:01:32AraqI think
17:03:17*faassen left #nimrod (#nimrod)
17:03:26EXetoCAraq: yes but I didn't mention alloc. and I didn't mean to include dealloc in that sentence
17:03:36EXetoCand realloc isn't used very often is it? so it's no big deal then
17:03:46EXetoCreallocType*[T]...
17:03:58AraqI see
17:04:22Araqwell this needs to be changed once we got tagged pointers
17:04:40Araqdealloc 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:16VarriountAraq: 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:50dom96Varriount: He wants the JSON output to contain all test results.
17:48:58dom96Similar to the html but in json format
17:49:03Araqno
17:49:09Araqonly the failing tests
17:49:20Araqor perhaps
17:49:28Araqevery test whatever is better for nimbuild
17:49:30Araqbbl
17:49:36dom96Yes, every test.
17:53:06*Kelet quit (*.net *.split)
17:53:32fowlfrz
18:01:41EXetoCqrb
18:10:10*Kelet joined #nimrod
18:10:52*ddl_smurf quit (Quit: ddl_smurf)
18:13:11EXetoCI'm using lua now. I wanna go back to nimrod :(
18:13:51fowlwhy are you luaing
18:15:10fowlah hmm
18:15:30fowlwhat would be the reason why my local repos is ahead of github
18:16:14EXetoClove2d
18:16:53fowlah.. i forgot to push..
18:18:13EXetoCmakes sense
18:18:30*q66 joined #nimrod
18:21:08EXetoCdeath to late type errors
18:30:35dom96EXetoC: Why don't you use sfml or sdl or something in Nimrod?
18:36:48VarriountHow up-to-date is the opengl wrapper?
18:37:21EXetoCVarriount: 4.0+ or something like that
18:43:30EXetoCdom96: I just wanted to try out something different/more complete
18:43:49*ddl_smurf joined #nimrod
18:51:39VarriountEXetoC: Any idea what initialization function I need to call to load opengl?
18:51:56dom96loadExtensions
18:54:58Varriountdom96: I can't find loadExtensions in the documentation
18:55:12*ddl_smurf quit (Quit: ddl_smurf)
18:55:31EXetoCAraq: 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:02EXetoCsurely there's a way to make that work, so that's why I'm asking what it is you actually meant
18:56:20AraqEXetoC: I said it cannot reasonably be called as a top level statement in opengl itself
18:56:25dom96Varriount: It does exist though. I'm not sure why it's not in the docs
18:56:28Araqso you have to call it on your own
18:56:44AraqEXetoC: it loads extensions depending on how you setup your render context
18:57:00Araqso ... there is no way to automate that
18:57:00EXetoCI don't think that's what I asked, but ok I'll report that then
18:58:34Araqwhat?
18:58:43VarriountAnd... now I get a linker error.
18:58:51EXetoCI was going to clarify, but nevermind, it was just a misunderstanding before
18:59:04EXetoCVarriount: yup, because you haven't referenced an extension
18:59:14*shodan45 joined #nimrod
18:59:20VarriountAnd how do I reference an extension?
18:59:37EXetoCVarriount: just by name
18:59:42AraqVarriount: if you don't reference an extension you don't need to call loadExtensions
18:59:57Araqit's confusing but we can only improve the docs
19:00:08fowlcorrection, if you dont reference an extension you can't call loadExtensions
19:00:13VarriountI'm trying to follow this tutorial -> http://www.opengl-tutorial.org/beginners-tutorials/tutorial-1-opening-a-window/#Opening_a_window
19:00:15Araqit's this complex for technical reasons
19:01:48EXetoC*that* you said though, and know I'm sure what you mean. So just a more helpful error message then, if possible
19:02:01fowlEXetoC, love2d isnt more complete than sfml >:(
19:04:31*carum joined #nimrod
19:12:32OrionPKi need to write a 2d/3d lib in nimrod ...
19:12:38OrionPKgod I miss having free time
19:12:55EXetoCget rich
19:18:42*carum quit (Remote host closed the connection)
19:18:54*carum joined #nimrod
19:19:11VarriountOrionPK: Help filwit
19:20:07Varriountrenesac: How goes the BigNum lib?
19:25:16*Demos joined #nimrod
19:27:14renesacVarriount, haven't really touched it this week...
19:27:46renesacI'm also thinking on making bindings for libmpdec
19:28:34*Endy quit (Ping timeout: 244 seconds)
19:28:45renesacit is a very fine piece of code: readable, 100% test coverage, formal proofs for many of the algorithms, etc
19:29:37renesacI don't think it is worth translating it
19:30:10renesacmy bignum is more like gmp, but slower of course
19:31:13Varriountrenesac: I'm pondering if I can use your bignum code for storing file sizes and ID's
19:31:39Demosthat sound like a bad idea to me
19:31:57renesaca int64 is probably sufficient for filesizes
19:32:39renesacit is good for a couple of exabits
19:32:47EXetoCfowl: but it doesn't have helper libs with awesome names
19:33:04Demosalso, you want to be able to pass around the id/size
19:33:13Demosand I think that may be hard with a bignum
19:33:38fowlEXetoC, love doesnt?
19:34:28EXetoCsfml
19:35:40VarriountHm. Is quasi-quoting still broken?
19:36:01OrionPKVarriount kinda think i'd want to go w/ my own approach
19:36:09*carum_ joined #nimrod
19:36:10OrionPKVarriount i dont want to make a game engine really
19:36:23fowlEXetoC, what library do you need
19:36:28renesacfor IDs, if they are random, you may have some problems with birthday paradox with only 64bits
19:36:38fowllove is like python it comes with a big std lib
19:37:00Varriountrenesac: Most file system ID's are 64 bits. However there is at least one I know of that's 128 bits
19:37:03Demosusually if you want unique ids you dont make them totally random
19:37:12renesacbut usually 128bits are sufficient, and you normally want those things to be variable size
19:37:17VarriountI'm not making ID's, I'm getting them from the host system.
19:37:27VarriountBut the size varies from system to system
19:37:56Demosalso I dont think handles for kernel objects are generally globally unique
19:39:48*carum quit (Ping timeout: 264 seconds)
19:41:24VarriountDemos: Think stat()
19:41:56renesacnirmod don't have a UUID module, does it?
19:42:08renesacif it does, you could steal it's UUID type
19:42:18EXetoCfowl: dunno
19:42:27Demoswhat are we using UUIDs for, stat does not seem to use them
19:42:40renesacnothing on index
19:43:37Demosthere 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:36renesacwell, I mean some 128bit type that already has some methods, like `$`
19:49:48VarriountHm. Is there any benefit to creating multiple emptyNodes in the AST, vs using just one?
19:56:07fowlwhat kind of node are you talking about
19:56:48EXetoCfowl: a UI lib and a particle system maybe, but we'll see.
19:58:54Varriountfowl: An emptyNode, like, what's returned by newEmptyNode()
20:01:36fowlVarriount, depends on what youre doing
20:02:01fowlnnkprocdef full of emptynodes doesnt make sense
20:03:38Varriountfowl: I'm erasing values from the fields of type definitions
20:03:43EXetoCI 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:04fowlEXetoC, im telling u man, enet
20:07:25EXetoCthat was the plan
20:14:05*carum_ quit (Remote host closed the connection)
20:17:59*sale4one joined #nimrod
20:19:05EXetoCfowl: 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:19fowlill clean it up some day
20:20:51fowllol
20:20:58fowlugly enums :(
20:23:49sale4oneare tuples mutable in nimrod ?
20:24:58dom96depends how you define them
20:25:27dom96or wait, do you mean whether you can add fields at runtime to tuples?
20:25:33dom96You can't.
20:25:35sale4oneyeah
20:25:55sale4oneoh, does nimrod have some type like python dictionary ?
20:26:53dom96Yes. strtabs and tables modules provide them.
20:27:09sale4oneso I should look there :) okay
20:27:19sale4oneanyone have a example where its used ?
20:27:54dom96hrm, the tables module could use some examples.
20:28:22sale4oneCould you make a brief example ?
20:28:35dom96But it's easy: var x = %{"blah": 5}.toTable[string, int]()
20:28:48fowlvar t = {"key":"val"}.toTable ; echo t["key"]; t["otherkey"] = "other val"
20:29:00sale4oneokay :) thanks
20:29:20fowldom96, just toTable works
20:29:31sale4oneand how do I define a field for it when I want to make an object ?
20:29:37dom96fowl: cool
20:29:41sale4onevariable (no field)
20:30:07sale4onenot *
20:31:34dom96var x = newTable[A, B]() # where A is the key type and B is the value type.
20:32:07dom96If you want a string, string table then use strtabs, it's more efficient.
20:32:27sale4oneyeah, I want to make that session library
20:32:28dom96And then it's just: var x = newStringTable()
20:32:33sale4oneso 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:20reactormonksale4one, you might use int64 and newTable[int64, <value>]() and to some parseHex stuff
20:39:27NimBotAraq/Nimrod devel e25fe4a Zahary Karadjov [+1 ±0 -0]: failing test case for static evaluation
20:40:15*Matthias247 joined #nimrod
20:40:50reactormonksale4one, or, you might even consider sticking it into a specialized DB of some kind.
20:43:10sale4onereactormonk, 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:07sale4oneoh, 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:21reactormonksale4one, I suppose for that you'd have to write your own code
20:55:32reactormonksale4one, maybe write a toJson
20:56:31sale4onethat would be perfect, which module is that ?
20:56:57*ddl_smurf quit (Read error: Connection reset by peer)
20:57:36reactormonksale4one, muh, json.nim only does parsing
20:58:10sale4oneso no way I could serialize it somehow?
20:58:18reactormonksale4one, I recommend adding toJson and writing something recursive that traverses the object tree...
20:58:30reactormonksounds like templates/macros to me
20:58:39fowlmarshals module
20:58:42fowlmarshal
20:59:12reactormonkcool
20:59:24reactormonkpretty sure that will bail though
21:01:02reactormonksale4one, there's your toJson.
21:01:39sale4oneyeah :) 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:20sale4oneBTW, you should really use somekind of wiki software, and make better docs :D
21:03:38reactormonksale4one, nah, there's plenty of wikis around. And better docs - feel free to add them.
21:04:02reactormonkI'll accept any PR that adds documentation for you
21:04:58reactormonks/for/from/
21:09:32sale4oneRestriction: 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:24sale4onehttp://nimrod-lang.org/marshal.html
21:11:47reactormonksale4one, try it.
21:12:47sale4one Error: type mismatch: got (proc (varargs[T]), PStringTable)
21:12:47sale4onebut expected one of:
21:12:47sale4onemarshal.$$(x: T): string
21:12:52sale4one :(
21:13:16reactormonkfuck™
21:14:07sale4onelol
21:14:14sale4onelets find another way :D
21:14:27reactormonksale4one, actually, if you could hack it to work, that would be great
21:14:36reactormonksale4one, can you give me your code?
21:16:21sale4onehttps://gist.github.com/anonymous/9355838
21:16:27sale4oneits the testing code
21:26:07*flaviu joined #nimrod
21:27:35fowlsale4one, u need parens around $$sessiondata
21:27:44Araqhi flaviu welcome
21:28:12flaviuHey, Araq, I'm new here
21:28:36flaviuHopefully I'll be able to contribute some to docs when I figure everything out
21:29:46AraqI know you're new that's why I welcomed you :P
21:30:01Araqthough sometimes I get wrong ;-)
21:30:12flaviuThanks, I appreciate the warm welcome
21:31:51sale4onefowl, damn and I really wanted to put those there XD
21:32:38Araqsale4one: with the planned strong spaces feature your code will work
21:33:33Araqit's a common gotcha
21:33:44Araqin fact even I had to learn it ;-)
21:33:53sale4onefowl: still, same error type missmatch :(
21:34:21sale4oneAraq: I will try my best to learn it too :) but you will get it all done by then :D
21:35:16fowlsale4one, echo ($$session_data)
21:38:17sale4oneoh :/ all around, now it works. But it creates so much junk text :(
21:40:47*carum quit (Remote host closed the connection)
21:51:55sale4oneexit
21:51:58*sale4one left #nimrod ("ERC Version 5.3 (IRC client for Emacs)")
21:53:02flaviuThis isn't mentioned anywhere so I'd assume not, but I sequtils lazy?
21:54:07Araqno
21:58:12*brson quit (Quit: leaving)
22:04:24Matthias247what are strong spaces?
22:06:48Araq"horizontal parsing"
22:07:14Araqthe consequent next step if you have indentation based parsing
22:07:48Araqin other words x&y | z is parsed as (x&y) | y regardless of & and |'s precedence
22:08:08flaviu http://forum.nimrod-lang.org/t/209
22:08:09*noam joined #nimrod
22:08:13*sale4one joined #nimrod
22:10:48Matthias247Hmm, 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:19Araqwe can make the compiler produce an error for i+4 * 5 if it concerns you that much
22:15:05DemosI like it even for basic math actually... but maybe I am just crazy
22:15:08Araqbut frankly "basic math precedence" is just some set of arbitrary archaic rules. Oh and it's ambiguous too.
22:15:30EXetoCDemos: same. it should be a common use case
22:15:38flaviuIs the name of tuple elements important? I'm trying something like foo.zip(bar).toTable, no dice, type mismatch
22:15:49Matthias247of course it is. But these archaic rules are well known and expected :)
22:16:05Demosflaviu, I do not think so, their types are however
22:16:31Demosright and i+4*5 will parse as i+(4*5)
22:17:04EXetoCyeah?
22:17:29EXetoCsure, that seems reasonable
22:18:25*Kelet joined #nimrod
22:21:51OrionPKeek
22:22:02OrionPKthe horizontal space parsing thing frightens me
22:22:34OrionPKI 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:50Araqso instead of looking at how the code looks like I should look up how the precedences have been influenced via pragmas?
22:24:06flaviuI personally like it, in many cases this will be clearer than (())()))(())
22:24:16AraqI can't see how that is a better solution by any means
22:25:19OrionPKaraq just spitballing
22:25:37OrionPKI dont know of a good design yet, just know what I dont like
22:28:05OrionPKI can think of a half-dozen things I know you'd hate though :p
22:28:35OrionPKI just think the onus should be on the library writer to define precedence
22:28:37OrionPKrather than the user
22:28:45flaviuOrionPK: Haskell's system is pretty neat: http://www.haskell.org/onlinereport/decls.html#fixity
22:30:06OrionPKhttp://forum.nimrod-lang.org/t/209/2#2100
22:31:24Araq"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:30EXetoCinexperienced people will definitely be confused by its use in math-heavy code
22:31:37Araq"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:47Araqthat's awful imho
22:31:53OrionPKrefresh
22:32:17Araqand doesn't really work with nimrod anyway (excessive overloading, complex lookup rules)
22:33:12AraqOrionPK: what if foo.`%` and bar.`%` don't agree on %'s precedence?
22:33:29OrionPKgo with the module's set precedence
22:33:59Araqwell no, these rules can be imported
22:38:17zahary1we'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:03dom96Let's just add a prefix notation macro. It'll solve all the problems with precedence.
22:39:33Araqdom96: are you serious? and if so what's a prefix notation macro?
22:40:09Skrylarit sounds like something lispish
22:40:29dom96Araq: I'm not really serious. But I wonder if this would be possible: prefix: 5 5 +
22:40:43dom96Skrylar: It's the opposite of Lisp :P
22:40:55Skrylarisn't that postfix notation? :)
22:41:02Araqbrb
22:41:10dom96oh yeah. You're right
22:41:10dom96lol
22:41:12flaviuReverse Polish Notation: https://en.wikipedia.org/wiki/Reverse_Polish_notation
22:41:22*dom96 looked up Polish notation
22:41:31dom96Forgot 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:18flaviuSorry 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:18flaviuIsn't seq usable as an openarray?
22:54:44*OrionPK quit (Ping timeout: 265 seconds)
22:55:23SkrylarI don't think it is; if I remember an openarray just makes an array out of all the parameters given to it
22:55:28Skrylarlike a more type-safe varargs
22:55:46dom96According to the manual it is. "A sequence may be passed to a parameter that is of type open array."
22:55:48zahary1seq should be passable to an openarray
22:56:06zahary1this could be a bug - better upload a more detailed gist
22:56:33dom96flaviu: Make sure your TVowelConsonants and string match the types in your TTable
22:56:38*zielmicha quit (Quit: Connection closed for inactivity)
22:57:54zahary1toTable is generic, but I now notice the problem - your tuple uses a: and b: as keys, while toTable expects key: and val:
22:58:32DemosI thought tuples were supposed to be structurally typed?
22:58:33zahary1nimrod insists in general the tuple fields names to match unless you are using anonymous fields
22:59:10flaviuI don't think there is any way to tell zip that, so I'll pack it manually
22:59:16flaviuthanks
23:02:55NimBotVarriount/NimLime master acfabf5 Matthias Einwag [+0 ±5 -0]: Added an option to set the compiler executable.
23:14:38Araqzahary1: 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:05zahary1yes, I've considered this too
23:16:31Araqhey, it took me years to come up with this idea
23:16:51Araqyou can't simply say "yeah me too" :P
23:17:58zahary1:) 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:08EXetoCyeah me too
23:18:17dom96I thought that's how it currently works.
23:18:40Discolodadom96: same here
23:19:12Araqdom96: no we produce some shitty rope based tree from the AST directly and then have no chance to optimize it afterwards
23:19:38Araqso every optimization needs to be done before the final pass to ropes happens
23:20:46*io2 quit ()
23:21:11SkrylaroO
23:21:12dom96bbl
23:21:32Skrylari thought ast->ast was the standard for that
23:21:37Skrylari guess i've been overengineering all this time
23:21:47*ddl_smurf quit (Quit: ddl_smurf)
23:22:05AraqSkrylar: we use ast->ast pretty much everywhere else
23:22:14Araqbut not for the final codegen, unfortunately
23:23:44zahary1well, there is the transf pass, so it's not that different than the norm
23:42:42flaviuI think its a bad idea for tuples to be typechecked based on value names
23:45:16fowlagreed
23:45:20DemosAAHAHAHAHAHAHAHAHHHHHHHHHHHHH I just spent 3 hours on something that turned out to be the echo precidence bug
23:45:29*Demos facedesks
23:45:36fowlnoob
23:45:42fowlwat u working on now demos
23:46:11zahary1fowl, flaviu, if you use the field names inside the proc that accepts the tuple, then you'll want them to match
23:46:34Demosmy 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:35zahary1I think that toTable should be written to accept anon tuple
23:46:59fowlDemos, what makes T a component
23:47:15Demosyou have called MakeComponent(T) for it
23:48:01fowlwhats TComponent[T] then
23:48:02DemosMakeComponent just makes a global data structure with the identifer TSceneNode, so like intSceneNode or TComponent_int_SceneNode for a TComponent[int]
23:48:31Demostype TComponent[T] = object[ent: int; data: T]
23:48:40Demosjust a structure to associate components with entities
23:50:22flaviuzahary1: 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:04fowlzahary1, i thought tuple[float,float] will always match tuple[float,float]
23:51:11*Matthias247 quit (Read error: Connection reset by peer)
23:51:24fowlDemos, i dont get it, id love to take a look at it thoug
23:51:44zahary1tuple[float, float] will match tuple[a: float, b: float] and tuple[x: float, y:float]
23:52:35zahary1my point was that nimrod already supports the behaviour you want, but it also has a more strict mode
23:52:53Demosthe idea is to be able to "do" and ecs /without/ type erasure
23:53:23flaviuDemos: ecs?
23:53:49Demosentity component system
23:55:08Araqflaviu: field names are part of the type in TAPL
23:55:30Araqwhich is *the* reference when it comes to type systems, so you're wrong :P
23:57:11flaviuFor 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:48flaviuThe names are just syntactic sugar to keep code clean and document intentions
23:58:41fowlDemos, gotta go smoke then read more about type erasure
23:58:44fowlbrb
23:59:32zahary1fowl, you are using type erasure in the message dispatching code