Index

Show enters and exits. Hide enters and exits.

00:01:05cremesaniero: i tried to fix fattr a few months back but i couldn't figure it out; that code was hard for me to grok
00:01:08cremesgood luck with it
00:12:07anierocremes: heh, thanks
00:43:24boyscoutCleanup loading extensions, provide MRI extension detection - cac8158 - Evan Phoenix
00:48:57evandbussink: you're asleep, I assume.
00:52:41boyscoutCI: rubinius: cac8158 successful: 3456 files, 13603 examples, 41167 expectations, 0 failures, 0 errors
01:45:19boyscoutRemove custom sorting logic in Enumerable, use Array. - ddc4d8a - Evan Phoenix
01:53:26boyscoutCI: rubinius: ddc4d8a successful: 3456 files, 13603 examples, 41167 expectations, 0 failures, 0 errors
03:58:18DeM0nFiReHello
03:59:27DeM0nFiReI am wondering if anyone here has a lot of experience working with object oriented VMs (like Ruby's) from the C/C++ side
04:06:08postmodernis there a channel just for RubySpec?
04:06:30DeM0nFiReYeah
04:06:32DeM0nFiRe#rubyspec :P
04:26:25brixenDeM0nFiRe: what do you mean by experience?
04:26:59DeM0nFiReWell, ideally I would like someone who's programmed an OOVM, but at least someone who's done a lot of poking around in them and knows the concepts behind it
04:27:20DeM0nFiReThere's probably all of about seven people in the world who have actually programmed one, haha
04:27:56brixenwell, Rubinius is an OOVM, if by OOVM you mean implemented in an OO language (which C++ qualifies, I think)
04:29:00slavawhat's an OOVM?
04:29:01DeM0nFiReWell, for what I am talking about C++ does not qualify since the actual data is not processed as objects. By an OOVM I mean the virtual machine itself is object oriented
04:29:40DeM0nFiReSo the virtual machine's memory stores objects, and the opcodes would be for manipulating objects, not data, if that makes sense
04:29:52slavayou're thinking about things in the wrong way
04:30:06DeM0nFiReWhy would you say that?
04:30:18slavainterpreter opcodes are an implementation detail
04:30:46slavawhether or not the language running on the VM is object oriented, the choice of opcodes doesn't really matter
04:32:31brixenis still lost on opcodes manipulating objects, not data
04:32:42slavausually data is objects is data :)
04:32:43DeM0nFiReI probably just didn't use the right word. What I need is a virtual machine that manipulates objects as objects, not as data. Obviously this virtual machine itself would be running in the native environment which is not object oriented
04:32:50brixenhas a nice head-cold haze too though
04:33:04slavaterms such as data and object are pretty vague
04:33:20brixenindeed
04:33:21DeM0nFiReYeah, I know, it's not easy to communicate what I am thinking because of that, haha
04:33:22slavadoes your language have an Object type at the root of the hierarchy or not? :)
04:33:43DeM0nFiReYes, the language will have Object as being the lowest level you can get. No primitives
04:34:22slavaactually why is that an advantage?
04:34:51DeM0nFiReWell, for what I have planned, it will make it easier to go from C++ to script
04:34:59slavathe JVM's primitive support allows you to pack binary data more efficiently in memory
04:35:07slavayou can store numbers directly in objects and arrays without boxing everything
04:35:29DeM0nFiReYeah, for sure doing it other ways is faster and more memory efficient, but I am willing to sacrifice some of that for this
04:35:30slavaas far as the java language's support for primitives and how they're exposed at the syntax, that's a different matter
04:35:42DeM0nFiReBy easier to go from C++ to script I mean
04:35:52DeM0nFiReThat you could take some existing C++ engine. say Irrlicht
04:36:45DeM0nFiReAnd easily be able to create a C++ app using Irrlicht which lets the script actually create and destroy objects. If anyone's used Irrlicht here, that would be letting the script easily create and modify SceneNodes
04:37:12slavaif you want to script existing C libraries and embed a dynamic language interpreter in your app, you might want to take a look at Lua
04:37:39DeM0nFiReI have taken a look at Lua, I decided against it because of the syntax of the language itself, but thanks for the suggestion
04:37:58slavaJavaScript can be embedded too
04:38:06slavaJavaScriptCore and V8 have embedding APIs
04:39:10DeM0nFiReYeah, I have looked at those as well, but that's more of where you define a JavaScript object as being a group of otherwise disjointed C or C++ functions and such, it's not easy to embed in an existing engine because you have to manually define each object in a kind of long process
04:39:31slavawell, there's no easy automated way to bind to C or C++ libraries anyway
04:39:45DeM0nFiReI know there isn't, that's why I want to make it :P
04:39:47DeM0nFiReWell
04:40:06DeM0nFiReSort of, obviously there will have to be some kind of process
04:40:09slavaevery dynamic language has its own way of interfacing with native code
04:40:32DeM0nFiReYep, exactly
04:40:49slavasounds like all you need to do is look around and find one that matches what you need
04:41:11DeM0nFiReWell, I am pretty sure at this point that one doesn't exist, I've been looking for quite some time now, hehe
04:41:13slavafor embedded scripting another one to look at is Io
04:41:39slavaare you sure that between Lua, JS and Io you can't find a decent scripting engine to embed inside your app?
04:41:52slavawhat about Guile
04:42:05slavathat's Scheme-based so it might be a bit more flexible
04:42:22slavaeveryone wants to make their own language :)
04:42:32DeM0nFiReWhat's the license? Is it GPL?
04:42:57slavaask google
04:43:07DeM0nFiReThe license is kind of important, because if I get anywhere with what I am doing, I'd like to MIT/zlib it
04:44:13DeM0nFiReAnyway, it's also not a bad idea for me to try this project from the ground up as a learning experience, anyway
04:44:18slavasure
04:44:21slavait depends on what your goals are
04:44:33slavado you want to spend a few years working on an OSS project or do you take an off the shelf solution and build your app around it
04:45:09slavaif you're more interested in interfacing with C code than with language design, you might want to help out one of the FFI projects for an existing language implementation in any case
04:45:13DeM0nFiReWell, I've been saying an existing engine like Irrlicht but really it's because I am wiorking on my own engine. and I really don't want to have to change how I code the engine for the language I use for scripting
04:45:48DeM0nFiReWhen you take all of my goals, they add up to something that definitely has not been done before. I can live without most of them, since they were added once I decided to try to make the language and VM myself
04:46:29DeM0nFiReBut the key is that it's got to be easy for someone to write normal C++ code and then script the app with the language without having to spend a bunch of time and effort bridging the two
04:46:47DeM0nFiReOh, and it has to be an OO language that isn't retarded, haha XD
04:46:57Defilerpeople generally just embed Lua and call it a day :)
04:46:59slavawhat if you just kill two birds with one stone and use something like C# or Ocaml for the project :)
04:47:01Defilerit's quite good for this
04:47:13slavainstead of using C++ with a scripting language
04:47:15DeM0nFiReI mean, JavaScript isn't retarded, but prototypical OO isn't my thing
04:47:32DeM0nFiReWell, I definitely want C++, the stuff I need to do, I need to do in C#, I can't imagine this engine being coded in C#
04:47:47slavayou'd be surprised how fast modern C# and Java implementations are
04:47:55DefilerC++ is the most painful scripting language imaginable
04:47:57slavadon't pick a language prematurely
04:48:00DeM0nFiReI know it sounds strange saying I am sacrificing performance in the scripting language, but for the engine I can't
04:48:17Defilerbut if you're building a game engine you have to be able to twiddle words
04:48:25slavanot necessarily
04:48:36slavanothing in the problem domain inherently requires low level memory access, etc
04:48:39DeM0nFiReslava: I didn't pick it prematurely, heh, I really really like C++ for doing core programming
04:49:02slavaits not like device driver programming where you really do need to touch memory to get anything done
04:49:10slavaa game engine manipulates objects like most other things
04:49:11Defilerquake, for example, uses the trick of operating on subsets of the bits of ieee floats
04:49:17Defilergood luck doing that in C#
04:49:18slavayou can do that in Java
04:49:20slavaeh
04:49:26DeM0nFiReslava actually, my engine will be able to theoretically run cross platform (atm, Linux cannot support the OpenGL versions I am using, so technically it can't run there yet)
04:49:36Defilerwithout getting it handled as an IEEE float by the cpu?
04:49:38slavaboth JVM and CLR support double <-> long and float <-> int puns
04:49:49Defilerthe whole point is to avoid that, and just treat it as a region of memory
04:49:52slavaso you can definitely do bitwise math on floats very cheaply
04:49:53DeM0nFiReAnd so I will be doing a sort of mini lightweight file system that will require working with void memory pointers and such
04:50:13slavaDefiler: I'm pretty sure Java's Double.doubleToLongBits() and longBitsToDouble() compile as no-ops or register moves only
04:51:12DeM0nFiReFor what I am doing, C++ is definitely what I need. Especially since the way I am coding it is like other existing engines, so even though I don't want to use Lua, someone else could use Lua just fine with it
04:51:34DefilerI mean for
04:51:34Defilerhttp://scholar.google.com/scholar?hl=en&lr=&cites=10407872751027742461&um=1&ie=UTF -8&sa=X&ei=wJIhTNXlM8T_lgfmrfDHAQ&ved=0CBQQzgIwAA
04:51:42DeM0nFiReC++ will give me the best performance, portability, low level access etc. that I need, I'm definitely in the right language heh
04:51:45Defilerhttp://scholar.google.com/scholar?cluster=10407872751027742461&hl=en&as_sdt=20000000000
04:52:01Defilergame engine C++ isn't going to be all that portable heh
04:52:06slavaand the best compile time and the best compile error messages
04:52:30DeM0nFiReDefiler: Nah, if you know how to write portable code you are good
04:53:09DeM0nFiReBasically the only 2 things in my plans thus far that limit where it can work are OpenGL support in other OSes (Nothing I can do about that) and my file system will load files from an encrypted MS cab, which only works on Windows
04:53:17DeM0nFiReBut later, if I want, I can replace that file format
04:53:30DeM0nFiReI am just using it because it's the most secure I could find that was easy to work with
04:53:42slavasecure?
04:53:48DefilerI mean when you take advantage of platform-specific features for performance reasons, you by necessity become something that needs porting
04:54:07DeM0nFiReslava: It's not the normal compression algorithm I am using
04:54:16DeM0nFiReI am using a full 16 round blowfish with a 592 bit key
04:54:35slavawhy are you encrypting your data file?
04:54:41slavaif your code can decrypt it, so can another progrma
04:54:47slavayou can't hide the key in the executable in any meaningful way
04:54:57DeM0nFiReWell, it makes it harder, that's all.
04:55:13DeM0nFiReIe, joe schmoe can't just take the stuff and start using
04:55:28DeM0nFiReObviously it's impossible to protect it 100%
04:55:59DeM0nFiReEven if you could hide the key in a meaningful way, the data's got to be unencrypted in memory at some point. someone could nab it then
04:56:27matthewdDeM0nFiRe: Then why not use a trivial xor or something?
04:57:12DeM0nFiReHeh, sounds better for marketing this way. I mean, if you have the right key, it's a reasonably fast algorithm, but also currently impossible to break without knowing thekey or a brute force
04:57:14matthewdIs there a real subset of people who'd get past "I can't just grab this and use it as is", but not think to go looking for the decryption key?
04:57:24DeM0nFiReAnd unless you get lucky, a brute force isn't gonna break a 592 bit key :P{
04:57:37Defileralso, why not just aes block cipher a gzip blob
04:57:54Defilerand use your mother's maiden name and the sha1 of the release binary as the key
04:57:58DeM0nFiReThe cab file also has really good compression
04:58:04Defilerand then magically hash-collide it into the binary
04:58:17Defiler:)
04:58:56DeM0nFiReOn one test I saw, the file size was half of like zip
04:59:31DeM0nFiReAbout 15 percent or so smaller than Tar + Gzip
04:59:38DeM0nFiReAnyway, I mean
04:59:48DeM0nFiReI will make it modular, won't be hard to pick different file types later but
04:59:50Defilercab is a good format, yeah
05:00:01Defilerthere are better things now though
05:00:35DeM0nFiReI found a publically available library that does it, which is great because even though everyone knows the exact algorithm for ecnryption, no one knows how to break it
05:01:00DeM0nFiReSo a publicly available library will suffice, I can just pop it in, so there's tons less thinking involed
05:01:28DeM0nFiReI don't plan to support macs, and Linux can't support OGL 3.3/4.0 so I don't need to worry about CP yet, I just have to make sure it's easy to make it CP later
05:01:39DeM0nFiReWhich so far will mean just changing to a different file format
05:02:01Defileractually, do you know about this? http://sourceforge.net/projects/libxad/
05:02:13Defilersupports everything ever
05:02:23DeM0nFiReHaha
05:02:33DeM0nFiReWhat type of ecnryption algorithms does it have?
05:05:53DeM0nFiReAnyway, back to the original discussion, anyone here have any experience with how to actually implement an OOVM? I mean, I am not totally lost, there's just some ideas I want to bounce around
05:06:13slavayou might want to start by studying some classic texts
05:06:18slavasuch as the Smalltalk blue book
05:06:22slavathat's how evan got started anyway
05:06:47brixenDeM0nFiRe: I'm still trying to understand what issues are specific to an OOVM
05:07:03brixenopcodes just mutate some stuff typically
05:07:04DeM0nFiReWell, like I said, I am not needing someone to talk about the basics of it with, I'm pretty well set on that. I just mainly want to talk with someone about keeping it easily accesible thorugh C++
05:07:09brixenwhy does the format matter?
05:07:30DeM0nFiReWell, there will be no bytecode, so opcodes are the lowest level of instruction
05:07:40Defilerand read this http://www.amazon.com/Virtual-Machines-Versatile-Platforms-Architecture/dp/1558609105
05:07:41brixenkeeping what easily accessible?
05:07:57DeM0nFiReKeeping the objects and classes that are exposed to the script easily accessible
05:07:58brixenDeM0nFiRe: I'm using opcode/bytecode/instruction as synonyms
05:08:02Defiler(which, by the way, has a kindle edition now)
05:08:23DeM0nFiReWell, like I said, I am not looking for someone to help me with the basics of VMs or even with OOVMs
05:08:41Defilerwhat are you looking for? you're probably in the right channel to talk about vms
05:08:57brixenso, you want a calling convention in your script that will transparently bind/call a C++ method?
05:09:14Defilerok, I see what you are asking
05:09:18DeM0nFiRebrixen, that's pretty close to what I want, but not quite
05:09:19Defilerok, your 'scripts' will be C++
05:09:38Defilerand your engine just uses, say, LLVM to take in that C++ at runtime and link it into memory
05:09:50DeM0nFiReI don't need the scripts to be able to arbitratily call C++ methods and such, I am OK with C++ having to explicitly allow it (Actually, that's what I prefer)
05:10:12DeM0nFiReBut I just want the actual code to expose C++ to the script to be non intrusive
05:10:24Defileryeah, check out LLVM
05:10:52brixenDeM0nFiRe: we have a way of calling C++ primitives from Ruby
05:11:02brixenDeM0nFiRe: it requires a bit of infrastructure
05:11:14DeM0nFiReSpecifically for Rubinius or from the Ruby C API?
05:11:22brixenfor Rubinius
05:11:28brixenthe MRI C-API is in C
05:11:36DeM0nFiReOh, got any docs or anything I can look at?
05:11:57brixennot any really up-to-date docs, but I can take you through it
05:12:09brixendo you happen to have the rbx repo cloned locally?
05:12:18DeM0nFiRebrixen, you are not by any chance familiar with Irrlicht, are you?
05:12:26brixenno I'm not
05:12:42DeM0nFiReNo, I actually don't even have Rubinius, I came here because I knew people here would know at least generally what I am talking about, haha
05:12:58brixenwell, it would be easiest to show you in code
05:13:03brixenbut I can also describe it
05:13:24brixenbasically, we want to be able to call a Ruby method, but in effect, we are calling a C++ method
05:13:40brixenso, we have a special construct that the Ruby compiler recognizes
05:13:54brixenand we parse the C++ .hpp files to pick up the C++ method signatures
05:14:12brixenthen we generate a bunch of C++ code as glue that actually invokes the C++ method
05:14:23DeM0nFiReOh, Rubinius can do this automatically?
05:14:34brixenkinda automatically
05:14:39brixenthere is some ceremony
05:14:49brixenI'll show you some code...
05:14:50DeM0nFiReBecause my plan involved doing something kind of similar, yeah, obviously there's some work involved
05:15:23Defilerhttp://clang.llvm.org/features.html#libraryarch
05:15:31DeM0nFiReIn my idea, the C++ developer would create a factory of factories that would define which C++ objects you can create, and then in that factory of factories you would actually define how the C++ works with the script
05:15:41brixenDeM0nFiRe: would you be able to do: git clone git://github.com/evanphx/rubinius.git
05:15:48brixenDeM0nFiRe: I could take you through some files
05:16:03DeM0nFiReI don't have git installed atm, sorry
05:16:08brixenok
05:16:39DeM0nFiReI mean, if it would make it that much easier, I can get it tomorrow and you can wait to walk me through it til then
05:16:57Defilerhttp://llvm.org/docs/FAQ.html#translatecxx
05:17:22DeM0nFiRethe question I have, brixen, is how would Rubinius handle a fairly complex inheritance structure
05:17:42Defilerrubinius doesn't do it the way you're talking about
05:17:52Defiler(nor does any existing language vm that I know of)
05:18:03DeM0nFiReI know it doesn't do it with a factory of factories
05:18:16DeM0nFiReBUt I mean when it looks through hpp code to generate the glue
05:18:22brixenDeM0nFiRe: rbx binds a Ruby method directly to a C++ method
05:18:29Defilerobjects are sequences of bits, some of which are used as a header
05:18:39brixenDeM0nFiRe: http://github.com/evanphx/rubinius/blob/master/kernel/bootstrap/fixnum.rb#L48
05:19:23Defilerit doesn't sound to me like you want a VM at all
05:19:24DeM0nFiReSo brixen is that the ceremony, having to call Ruby,primitve :symbolname
05:19:37Defileryou just want to be able to include external C++ code as 'scripts' at runtime
05:19:41DeM0nFiRe. not ,
05:19:48DeM0nFiReDefiler: No, that's not what I want
05:19:48brixenDeM0nFiRe: http://github.com/evanphx/rubinius/blob/master/vm/builtin/fixnum.hpp#L81-82
05:19:50Defilerthat's just a hint to the compiler essentially
05:20:06Defilerthat emits a call to the c++ method behind the scenes
05:20:20brixenDeM0nFiRe: the // Ruby.primitive! :fixnum_div comment is processed
05:20:27DeM0nFiReI don't want to run C++ as script, I want to set up the application using C++ and then let the script work with C++ objects at the same times as being able to creat eit's own
05:20:58DefilerI thought you wanted to script it in the same language
05:21:03DeM0nFiReNo, I don't
05:21:16Defilerif not, just embed Lua, and include primitive functions for doing the domain work your engine needs
05:21:21DefilerI dunno, Scene.new etc etc
05:21:25DeM0nFiReI don't like Lua
05:21:34Defilerok, embed your favorite scripting language
05:21:35DeM0nFiReOh, you werent' the one I was talking to when I said that, hehe
05:21:36brixenDeM0nFiRe: this is the script that generates the C++ glue code http://github.com/evanphx/rubinius/blob/master/vm/codegen/field_extract.rb
05:21:49DeM0nFiReNah, no existing language combines a syntax I like all the other features I need
05:22:05Defilerwell, your users are the ones that need to like it
05:22:20Defilerand lua is used for engine scripting all around, so it would make your code more applicable
05:22:24Defilerbut up to you of course
05:22:35DeM0nFiReHaha, well, if someone else wants to use Lua, they can, the engine will be one that is coded similarly to existing engines
05:22:43Defilerbuilding an engine and designing and implementing a scripting language don't seem like projects I'd want to take on simultaneously
05:22:53DeM0nFiReSo if someone wants to embed lua and do the bindings etc. they can do that just as they normally would
05:23:01DeM0nFiReHehe, well, I am a masochist :D
05:23:07DeM0nFiReNo, actually, I just HATE game logic scripting
05:23:20Defilerok, then you just need to design and implement your scripting language
05:23:26Defilerand when you do that, do it as a c++ shared library
05:23:33Defilerthen embed it in your engine and you are done
05:23:57Defileryou won't need to study up on any technique for invoking your C++ functions
05:24:03DeM0nFiReWell, I need to design my language, but to implement it I need a new VM to implement the features I want
05:24:04Defilersince they will be right there in process with you
05:24:15DeM0nFiReI mean
05:24:15DefilerI don't see how this is a VM problem
05:24:39Defilerjust build an interpreter and have every thing it does call a C++ function
05:24:47DeM0nFiReBut that's not what I want
05:24:55DeM0nFiReI need the script to be able to create it's own objects
05:25:01DeM0nFiReAnd it's own classes
05:25:02Defilerit can't. it's a script.
05:25:05DeM0nFiReetc. etc.
05:25:19Defilerall it can do is ask something more powerful to do that for it
05:25:32brixenDeM0nFiRe: for that one primitive, this is the glue code 449539
05:25:37brixener http://gist.github.com/449539
05:25:39DeM0nFiReDefiler: That isn't what I want
05:26:00DeM0nFiReBrixen the glue code is generate after you do the other code?
05:26:18brixenthat glue code is generated by the field_extract.rb script
05:26:28brixenfrom parsing the C++ .hpp files
05:26:30Defilerbuild time, in other words
05:26:50Defilerbrixen: what he wants is for user scripts to be able to declare new primitives, essentially
05:27:00brixensure
05:27:02Defilerfor which llvm is the correct answer
05:27:05brixenyou could do that
05:27:10brixenyep, with llv
05:27:11brixenm
05:27:27DeM0nFiReI am looking at LLVM as well right now
05:27:45brixenllvm is just probably the easiest way to do it
05:27:49DeM0nFiRebrixen that seems pretty cool, but like it would still be a bit too much for something as large as a whole game engine
05:27:50Defilerwith llvm, all you need to do is write a translator from your scripting language into calls to set up a function in memory via LLVM
05:27:51brixenyou could do it various ways
05:28:00Defilerand then you just call it like a C++ function
05:28:15Defileror, in this case, save a reference to it and call it many times later
05:28:18DeM0nFiReWell, Defiler will I also still be able to have the language itself be a full OOP language?
05:28:29Defilersure
05:28:38Defileryou'll be implementing it, so do whatever you want
05:28:54Defilerit's all opcodes in the end
05:29:04Defilerwhether it's forth or java or ocaml
05:30:00Defilerif you make your grammar restrictive enough you can probably have a trivial mapping to prefab llvm functions
05:30:02scooprare you doing this game engine with consoles in mind?
05:30:19Defilerbut if you want it all fancy you will need an interpreter that calls llvm at runtime
05:30:22DeM0nFiReI am not, consoles don't have support for OpenGL 3.3/4.0 which is the primary target rendering API
05:30:53Defileryou'd just need a runtime assembler of a different flavor on a console anyway
05:31:34Defiler(and a pile of extra code to do some of the other things llvm does for you)
05:31:46DeM0nFiReI don't have any legal rights to develop on a console, I don't have any current gen consoles to work with, and consoles can't do OpenGL 3.3/4.0 so consoles are out for sure
05:31:47Defilerwhich would all be console-specific anyway
05:31:49scooprbecause consoles, and some console-like platforms stricly restrict all jit-type of shenannigans.. also handling of memory needs a lot more care
05:32:17Defilerwell, I think he knows this design is pretty far off the beaten path
05:32:18DeM0nFiReYeah, scoopr I know, another reason why I am not relaly interested in doing consoles
05:32:39scooprright
05:32:51DeM0nFiReYeah, haha, I fully understand my design is pretty weird compared to... anything that exists currently :P
05:32:54scoopryou've chosen your battles wisely =)
05:33:32DeM0nFiReHaha, yeah, I mean, I am all for trying crazy stuff, like what I am trying now, but I am really not interested in fighting legal battles and corporate rules and all of that stuff that's required to develop on consoles
05:33:53DeM0nFiReHowever, I am interested in trying to develop for OpenPandora when it comes out XD
05:34:34scooprthere goes your opengl4 requirement ;)
05:34:40DeM0nFiReOh, of course
05:34:51DeM0nFiReI would write a new renderer that uses OpenGL ES 2
05:34:59scooprnot that wrapping a rendering api is that difficult usually
05:35:05DeM0nFiReYeah, exactly
05:35:21DeM0nFiReI mean, I am already writing the engine in a way so that it won't even bee too diffficult to perhaps explore a DX11 renderer later
05:35:56DeM0nFiReadding an OpenGL ES 2 renderer would be even easier, since it would largely be stripping down the 3.3/4.0 renderer
05:36:43scooprbut hopefully you have an actual project that you do that guides the engine development.. engines developed in isolation are usually useless
05:37:27DeM0nFiReWell, I don't have a specific project, but I am being mindful of the problem of over abstraction
05:38:40DeM0nFiReI have a couple of existing commercial games I am using as guidelines, to make sure it could make that sort of game without needing to twist it around or anything
05:40:56DeM0nFiReIn any case, thanks for the help guys. I know I'm not doing a very good job of communicating my ideas :P
05:41:43brixenis checking if the ruby bindings for irrlicht work with rbx
05:42:01DeM0nFiReI don't even know if the ruby bindings for irrlicht work with ruby :P
05:42:26DeM0nFiReThey are for like RUby 0.3 and Irrlicht 0.2 (an exaggeration, of course :P )
05:43:16scooprI once tried embedded mri+mostly ruby code as a engine of sorts
05:43:23scooprkinda worked nicely
05:44:11DeM0nFiReWell, before I ruled out Ruby, I actually started writing a small engine and the ruby bindings for it simultaneously, and it was like wiritng the same thing 3 or 4 times
05:44:25scooprbut in the end, there are quite many performance sensitive parts that I preferred to write in the ruby side, which made it a bit of a mess
05:44:40DeM0nFiReYou had to write the engine in C++, then the C code to get Ruby to understand it, then the interfacing Ruby code
05:45:04Defileroh man I am totally doing this upgrade
05:45:05Defilerhttp://vimeo.com/5851280
05:45:14Defilermust have air jacks
05:45:18scooprheh, I did api interfacing parts directly in c, like it was an extension
05:45:33DeM0nFiReAlso the way I am writing it and the way the Ruby interacts with C++ I was getting reasonable performance
05:45:53DeM0nFiRe1000 sprites was 8500 FPS or thereabouts
05:46:01DeM0nFiReNo, sorry
05:46:06DeM0nFiRehehe, that was only 3 sprites
05:46:23DeM0nFiRe1000 sprites is about 500FPS
05:47:12DeM0nFiReI made it so you could add a sprite from either C++ or Ruby and then the graphics module would automatically sort it by z, and that worked pretty well, only a problem if you need to sort frequently
05:47:53DeM0nFiReHehe, here was the test rb script http://pastebin.com/NE3sPsbR
05:48:47DeM0nFiReI was happy with the performance, but it was getting to be a real pain to code on the C/C++ side
05:49:39Defilerohhh yeah http://www.hrpworld.com/index.cfm?form_prod_id=1673&action=product
05:49:52Defilerman why don't I already have air jacks :)
05:50:45DeM0nFiReIN that script, Engine is a class entirely defined in C++ and it interfaces with a running instance of the engine's main device, which was cool
05:50:53DeM0nFiReBut a PITA to do with Ruby's C API :(
05:51:06DeM0nFiReAnd then you can see Graphics is a mix of C/C++ and Ruby
05:51:09scoopryeah, I tried to do only the lowlevel stuff in c and the engine in ruby
05:51:45DeM0nFiReYeah, I did a mix because there was a lot of stuff in the main device that would have no real reason to have exposed to ruby and would really kill the performance
05:51:46DeM0nFiReI mean
05:52:11DeM0nFiRe1000 sprites in 500 FPS seems OK, but even then that's on an i7 and HD5850, which si well above the average case
05:52:12DeM0nFiReis*\
05:54:05scooprwell, anything over 60fps is meaningless as a performance measurement, you need to talk in terms of milliseconds used for some particular task
05:54:30DeM0nFiReHehe, 500FPS, 2 miliseconds, lol
05:54:32DeM0nFiReActually
05:54:39DeM0nFiReThe way I did it this way
05:55:00DeM0nFiReThe code for stepping the engine is << 1ms
05:55:45DeM0nFiReOh, hmm
05:55:49DeM0nFiReless bad ass than I though
05:55:57DeM0nFiRe10000FPS, so you are talking 1/10 of a ms
05:56:12scoopryes, and that's noise
05:56:44scoopressentially measuring how fast the driver can do buffer swaps and other synchronization
05:56:55DeM0nFiReWell, not necessarily
05:57:32DeM0nFiReBecause that is also lower because Ruby is just there for reach frame, which slows it down
05:58:02scooprsure it "slows" it, but it's immeasurable in that scale
05:58:12DeM0nFiReLike, the real engine I was talking about earlier, no ruby and better optimized code and it's something like 0.025 ms per frame
05:58:31DeM0nFiReWhen all you are doing is clearing with glClear and swapping buffers
05:58:45DeM0nFiReNow, that may not sound like a lot
05:59:10DeM0nFiReBut drawing, say, an individual pixel takes even less time
06:00:53DeM0nFiReSo the difference between 0.1ms and 0.025 ms for that one part of the engine translates to like another few hundred sprites or so
06:03:10DeM0nFiReBut I mean, doing that kind of low level stuff is what I like. I hate scripting game logic, which is why I want to make a language that makes it as easy as possible
06:03:26DeM0nFiReHey guys, now would I go about implementing a makeGame() function?
09:14:21bakkdoorthe compiler & codegen tools in rubinius are all written in ruby, correct?
10:17:02dbussinkbakkdoor: most of it yeah, the parser is take from mri though
10:17:22dbussinkbakkdoor: but after a structure comes out of that, everything from there is compiled in ruby
10:24:11bakkdoordbussink: yeah i knew that about the parser. does the parser simply output stuff as text or how does it work exactly?
10:27:25dbussinkbakkdoor: it returns an ast
10:29:11bakkdoordbussink: yeah but i mean does it ouput that ast as text somehow or how does the ruby code use it? the parser is written in c (or c++) right?
10:29:35bakkdoordbussink: or it the parser simply used as an extension within ruby?
10:35:50dbussinkbakkdoor: it's an extension in ruby and you get a ruby structure back from it
10:36:00dbussinkbakkdoor: you can "a = 1".to_ast to see what you get back
10:36:08bakkdoorah ok. thanks!
15:24:04goyox86Hi all , i've recently switched to develop in rails, i'm trying to build the ruby-debug gem but, it doesn't build
15:24:42goyox86I think this is due to ruby-debug is tightly coupled with MRI?
15:25:17goyox86Hi all , i've recently switched to develop in rails with Rubinius, i'm trying to build the ruby-debug gem but, it doesn't build **
15:46:14goyox86I insert a call to debugger, in the code but it doesn´t start the debugger :-s
15:47:13kstephensrubninus has its own debugger, AFIAK.
15:49:46goyox86kstephens: i understand, i'm checking at the rubinius docs, and it tells me that if i want to debug ruby code i just need to inser a call +debugger+ or +breakpoint+
15:50:13goyox86kstephens: but it doesn´t work
16:21:36brixenmorning
16:21:53evanbrixen: morning
16:21:54brixengoyox86: ruby-debug does not work with rbx
16:22:09evanbrixen: you might want to warn people in rake that they need to rerun configure
16:22:15evanatm, they're just getting a warning about needing MRI
16:22:24brixenerg, ok
16:22:27evanwhich is confusing them.
16:22:36brixenundoubtedly
16:22:59evanbut hey! USA won! WOOOO
16:23:06brixenWOOOO
16:23:19brixenso, yesterday, I basically slept from 10am to 6:30
16:23:26brixenI'm trying the sitting up thing again
16:23:39brixenmy head feels like 6 cubic meters of cotton atm
16:23:51evan:( :(
16:24:03evani figured you were sick yesterday.
16:24:24brixenyeah, I thought I'd have a little rest
16:24:29brixenwoke up at 6:30
16:24:38evan:D
16:24:44evanthats your body telling you something
16:24:49evanguess what your body is telling you today?
16:24:52evanUSA WOOOOOOOOOOOOOOOOOO!
16:26:05brixenhaha
16:26:14brixengoyox86: http://gist.github.com/450160
16:27:22brixengoyox86: right now you can inspect stuff and set a new breakpoint
16:27:31brixengoyox86: then type 'c' to continue running
16:27:45brixengoyox86: step and other stuff isn't done yet
16:53:13evanmontywilliams: monty!
16:53:18boyscoutEnsure Rakefile checks configure version before anything. Closes #385. - e846db9 - Brian Ford
17:01:25boyscoutCI: rubinius: e846db9 successful: 3456 files, 13603 examples, 41167 expectations, 0 failures, 0 errors
17:04:42ChebaHello. I'm having troubles building rubinius from git. First error message is "undefined reference to `ruby_xmalloc'". Any insights on how can I fix it?
17:05:07brixenCheba: gist the output from your terminal
17:13:14Chebahttp://gist.github.com/450214
17:13:59brixenCheba: could you please run ./configure --show and gist that
17:15:18ChebaSame gist.
17:15:57brixencould you run rake extensions:clean; rake
17:16:25ChebaSure.
17:16:29Chebabrb
17:16:32brixenk
17:40:41ChebaNope, no luck. http://gist.github.com/450214#file_rake%20extensions:clean;%20rake
17:43:06evanCheba: for some reason it's not linking right...
17:43:53dbussinkmaybe ruby is stripped from symbols?
17:44:03dbussinkCheba: which platform?
17:44:09ChebaLinux.
17:44:18dbussinkwhich linux?
17:44:26ChebaGentoo.
17:44:28tarcierihow long until Rubinius has 10 virtual machines inside of every metaclass?
17:44:40Chebai686
17:44:53dbussinki've heard other people having issues with gentoo stripping library symbols
17:44:56dbussinkthat was with sqlite3
17:45:04dbussinkmaybe it happened with your ruby install
17:45:19dbussinkCheba: to other c gems work?
17:45:41ChebaYes. Have no problems with c gems.
17:45:55ChebaI can try build not stripped mri and try again.
17:46:16ChebaShould I?
17:46:55dbussinkCheba: you could try that first yeah
17:46:57dbussinkto see if that works
17:47:13dbussinkbut if you're mri is like this, i can hardly imagine that other c gems work :S
17:48:29evanCheba: run it with --trace
17:48:31evanand gist the output
17:48:48ChebaSec.
17:51:29Chebaevan: http://gist.github.com/450214#file_rake%20extensions:clean;%20rake%20__trace
17:52:16evanerp
17:52:17evanone sec.
17:54:35evanCheba: ok, run again with -v
17:54:36evannot --trace
17:54:38evansorry
17:55:02evani'm to get the command used to link it to be printed
17:55:04evannot just LDSHARED
17:55:36Chebaevan: rake -v?
17:55:41evanyes.
17:56:10dbussinkevan: it's at the bottom
17:56:15dbussinkCommand failed with status (1): [g++ -shared -lstdc++ ruby/bstrlib.o ruby/quark.o ruby/var_table.o ruby/node_types.o ruby/visitor.o ruby/melbourne.o ruby/grammar.o ruby/symbols.o -shared -L. -Wl,-O1 -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -L. -lpthread -lrt -ldl -lcrypt -lm -lc -o ruby/melbourne.so > /dev/null]
17:56:40evanoh oh.
17:56:59evanwhy the heck doesn't that work
17:57:08evanoh wait
17:57:09goyox86brixen: i supposed ruby-debug doesn't work with rubinius since it is tightly coupled tom MRI internals
17:57:12evanthere is no -lruby in there.
17:57:21evanthats why.
17:58:00evanI guess normally thats fine.
17:58:06evansince the symbols are bound at dlopen time.
17:58:22evanbut your g++ doesn't seem to like that.
17:59:31dbussinkgoyox86: yeah
17:59:45evangoyox86: yes.
17:59:56dbussinkgoyox86: but we want to have a debugger infrastructure so people might be able to write a ruby-debug compatible layer on top of that
18:00:05evanthe same reason there is a completely different of ruby-debug for 1.9
18:00:11dbussinkbut we want to have a more awesome debugger ourselves :P
18:00:46dbussinkevan: dunno if you saw it, but dan removed that stuff from veritas too
18:01:03evanhe sent me a message that he changed it
18:01:05evani didn't see what he did
18:01:07evani'll pull and see.
18:01:55goyox86evan: you mean some wrapper in ruby-debug, to use the Rubinius debugger? faking the program being run? or something like that
18:02:04Chebaevan: Adding -lruby to failed command doesn't make it work.
18:02:22evanCheba: what about -lruby18
18:02:30evangoyox86: eh?
18:02:37evangoyox86: i mean that ruby-debug doesn't work on 1.9 directly either
18:02:38ChebaNope. It complains that it can't find a bunch of .o files.
18:02:39evanthey had to port it.
18:02:43evanhm.
18:03:25dbussinkgoyox86: guess you replied to my remark :)
18:03:31Chebaevan: http://gist.github.com/450214#file_g++
18:03:33goyox86evan: I know, ruby-debug is only compatible with 1.8
18:03:46dbussinkgoyox86: what we want to do is to have a debugging infrastucture available and provide a standard debugger for that in rbx
18:04:05dbussinkgoyox86: other people could perhaps use that infrastructure to build another debugger api on top of it at some moment
18:04:55evanCheba: you're running that in the wrong directory
18:04:57evanCheba: i'm betting.
18:05:08evanyou need to be in lib/ext/melbourne
18:05:18goyox86dbussink: BTW i prefer the Rubinuis aproach, that implementation dependent thins like ruby-debug
18:05:35evangoyox86: i want us to have a custom backend to ruby-debug
18:05:36evaneventually
18:05:44evani'm going to basically build a reference debugger
18:05:55evanthat someone can use to patch in support to ruby-debug
18:06:10goyox86evan: neat
18:12:37goyox86What is the best way to determine from inside a ruby program, that i'm running on Rubinius, such the example of requiring "debugger",available on rubinius but not in MRI 1.8.7?
18:13:03goyox86checking the RUBY_DESCRIPTION global?
18:13:48dbussinkgoyox86: defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
18:15:01goyox86RUBY_ENGINE is only used in rubinius right?
18:15:29brixenRUBY_ENGINE is used in every alt impl and in mri 1.9
18:15:32evangoyox86: no.
18:15:38brixenit does not exist in mri 1.8.x
18:16:14brixenif it's not defined ore == 'ruby' that is mri
18:16:32brixenrbx is rubinius, ironruby is ironruby, jruby is jruby, maglev is maglev
18:17:26evanwe should have been rubinius, but oh well.
18:17:37evanI gotta be flashy.
18:17:42brixenyep
18:17:47brixenall that flash
18:17:48brixenhehe
18:17:55Chebaevan: you're right.
18:18:10ChebaIn right dir with -lruby it worked.
18:18:34goyox86brixen: good. I was testing it just between MRI 1.8.7, and rubinius, sorry for that :-s, lol
18:18:56evanCheba: oh good! ok.
18:19:01dbussinkevan: just remember all the power saved by only having three bytes in there instead of 8
18:19:19evani'm doing my part to stop global warming.
18:19:36goyox86evan: lol
18:20:07goyox86rbx is nicer BTW
18:20:13dbussinkevan: would it be possible for me to add that module ivar packing myself?
18:20:21evandbussink: i've just finished :)
18:20:23evani'm about to commit it.
18:20:33dbussinkevan: ah, too bad :P
18:20:47evanbut when you see the commit, you'll understand
18:20:56evanthe way it works is pretty straight forward
18:21:02Chebaevan: after compiling Melbourne rake went on.
18:21:05evanI taught it to recognize attr_* too
18:21:14dbussinkevan: ok, cool, well, understanding is often a lot easier than writing it though ;)
18:21:14evanCheba: ok, we need to fix something in there.
18:21:33dbussinkevan: ah, knowing about accessors is nice too yeah :)
18:21:35ChebaThough, it stopped with "no such file to load -- auto_gem". Probably, that's Gentoo specific.
18:21:36brixenevan: working on a fix
18:21:41evanbrixen: danku.
18:21:53evanCheba: must be
18:21:56evannever heard of auto_gem.
18:22:54ChebaIt's the way Gentoo solved multiple ruby versions/implementations. They added that for some reason to make gems work when they're installed by gentoo package manager.
18:23:07ChebaNice backtrace. =)
18:23:08dbussinkthey add it to RUBYOPT by default
18:23:14dbussinkhttp://groups.google.com/group/emm-ruby/browse_thread/thread/d64eae647d7aa136
18:23:56Chebadbussink: thanks.
18:23:58evanthats a crappy solution.
18:24:03evanauto_gem itself
18:24:09evannot undef'ing RUBY_OPT
18:24:13evanbecause it means you hit this constantly
18:24:21evanif you install something outside the gentoo sandbox.
18:24:32dbussinkman, nocode is good at finding obscure stuff :P
18:24:38dbussinklooking at the tickets
18:24:40evandbussink: yeah.
18:24:58dbussinki thought i was able to, but this guy surely beats me :p
18:25:19brixenCheba: could you apply this patch, then run: rake extensions:clean; rake build
18:25:23brixenCheba: http://gist.github.com/450322
18:25:48evanbrixen: you should be able to get the proper name from rbconfig
18:26:16dbussinki bet there are distro's that make -lruby1.9 or -lruby1.8 out of it
18:26:28evanyeah
18:26:31brixenoh, for -lruby18...
18:27:06dbussinkLIBRUBYARG
18:27:10brixenCheba: one sec
18:27:11goyox86people, i jsut asked about "auto_gem" to ruby-gentoo people here is the answer: "yep. it does 'require "rubygems"' on ruby 1.8 where it it not loaded by default"
18:29:45dbussinkevan: i'm awaiting anxiously ;)
18:29:54evanit's rebuilding and testing
18:30:14evangoyox86: :/
18:30:20evangoyox86: why did they not put -rrubygems in RUBYOPT then?
18:30:27evan*eyeroll*
18:30:37brixenCheba: http://gist.github.com/450322
18:31:31goyox86evan: I'm just digging depper in the gentoo-ruby channel :-), just wait for the details, hehe
18:32:20evangoyox86: 10-4
18:33:11Chebabrixen: This fixes the issue. Thanks.
18:33:23brixenCheba: ok, cool
18:34:49goyox86evan: "the way is more flexible, i.e. you can specify per-ruby-version commands."
18:35:09evan*eyeroll*
18:35:22goyox86evan: i just asked him exactly waht you asked me lol
18:36:32ChebaOh, yeah. Gentoo has a few commands for gem. I.e. gem18, gem19. And you can choose active ruby version. Than it will ink ruby -> ruby18, gem -> gem18, rake -> rake18.
18:37:19brixenthey should just use rvm :)
18:37:27brixenthe whole build from source thing fits right in
18:37:48ChebaThough, they do it only with this executables. Other bins from installed gems just use simple wrappers that get correct bin based on current ruby version.
18:38:21wayneeseguinw00t w00t!
18:38:31brixenwayneeseguin: :)
18:38:32Chebabrixen: there was a few propositions on that. Probably, rvm handles building on its own and that's the show stopper for gentoo folks.
18:38:52wayneeseguinheh
18:38:58wayneeseguinGentoo folks are a show stopper for gentoo folks.
18:39:04wayneeseguinask Pistos in #rvm
18:39:13wayneeseguinhe had a "wonderful" experience with them.
18:39:39wayneeseguinActually due to that I highly recommend against Gentoo for all of my clients.
18:39:43wayneeseguinAnyway.
18:40:59boyscoutHave autopacking take included modules and attrs into account - 1756eea - Evan Phoenix
18:41:30goyox86brixen: well, i just told some of that, "what about using rvm?"
18:41:54dbussinkevan: woohoo
18:41:58goyox86brixen: or even support it in their package manager
18:42:35Chebagoyox86: hehe, what was the answer?
18:43:18goyox86brixen: here is the answer: https://gist.github.com/d9e87b436714c3bb047b
18:43:24goyox86.s
18:43:38goyox86brixen: :-s
18:44:07brixenwell, the situation with different distros and versions is just asinine IMO
18:44:13Chebagoyox86: who was that?
18:44:17dbussinkevan: any reason for the 25 elements limit or just to have a somewhat sane limit for now?
18:44:24brixenthe analogy is having a different receptacle standard in every building you visit
18:44:44goyox86Cheba: Mmm let me check
18:44:48brixenso every program has in it's build system a zillion adapters to handle these different platforms
18:44:51evandbussink: safety.
18:44:54brixenwhich is stupid as hell
18:45:02evandbussink: just a sane limit for now.
18:45:06brixenplatforms should agree on standards and stick to them
18:45:07evanthere had to be some limit
18:45:10evan25 seemed fine.
18:45:28evanafter 25, it's pretty clear that the class does something weird with ivars.
18:45:33goyox86Cheba: a3li
18:45:54goyox86Cheba: Alex Legler
18:46:11wayneeseguingoyox86: Actually, http://github.com/wayneeseguin/rvm/tree/master/pkg/gentoo/ ;)
18:46:16wayneeseguingoyox86: User contributed but.
18:46:18ChebaYeah, I know him. Not personal, though.
18:46:30dbussinkevan: btw, algeria - usa was pretty much a thriller game i guess :P
18:46:37evandbussink: yeah
18:46:39wayneeseguinbrixen: I'm trying like hell to unify it all ;)
18:46:39evanit was crazy.
18:46:48wayneeseguinbrixen: Once I have binary installs... should be all set.
18:46:55brixenwayneeseguin: yeah, crazy isn't it
18:47:01brixenwayneeseguin: but bravo on that :)
18:47:13wayneeseguinNot easy problem I'll admit
18:47:31goyox86wayneeseguin: neat!
18:47:44brixenwayneeseguin: a perfect example of trying to handle complexity with more complexity
18:48:01brixenwayneeseguin: instead of making a standard, we make autotools
18:48:19brixenif that doesn't tell you how ridiculous the situation is, nothing will
18:49:22goyox86brixen: autotools == GNU autotools?
18:49:38brixenyes
18:49:39ChebaWell, there's LSB. It's in version 4 now and about decade old. But nobody still really cares.
18:50:02dbussinkevan: do you follow tennis a bit?
18:50:17brixenCheba: right, a standard with no conformance is no standard
18:50:35goyox86brixen: agree
18:50:57Chebabrixen: I beliseve RedHat is the closest one to LSB.
18:50:58evandbussink: you mean the 47-48 match going on now?
18:51:01evandbussink: :)
18:51:05evandbussink: I follow somewhat, yes.
18:51:19goyox86brixen: and about autotools, is just insane, i think
18:51:22evanoh 49-48 now.
18:51:40brixengoyox86: about as insane as you can get, yes
18:51:41dbussinkevan: yeah, it's already the longest match ever with most games ever :)
18:51:53dbussinkfunny to see in progress for records on wikipedia :P
18:51:58evanthe current set is longer than most matches
18:52:24evani wonder if they're going to hold on
18:52:30evanand get postponed for another day
18:52:59goyox86brixen: Libtool is the king of insanity, lol, this is just understanted by the folks who actually wrote it :-s
18:53:13boyscoutCI: rubinius: 1756eea successful: 3456 files, 13603 examples, 41167 expectations, 0 failures, 0 errors
18:56:41dbussinkevan: yay, it's picking up properties now in packed ivars :)
19:01:15evansweet.
19:01:29evandbussink: hah
19:01:45evanthe scoreboard in the isner game broke
19:01:49evanthey've gone so long.
19:01:52evanit's almost 51-50
19:03:56dbussinkevan: hmm, it's slower with autopack enabled :S
19:05:05evanthat happens, yes.
19:05:10evanif you can extract it at all
19:05:12evani'll see what I can do.
19:10:07boyscoutAdd ruby as a link library when building Melbourne for MRI. - 83690bb - Brian Ford
19:16:25brixenexcerpt of alan kay to the fonc list http://gist.github.com/450411
19:16:36brixenthat is just a priceless paragraph
19:17:03brixenM$ clueless all these years and CIA all over tech
19:17:18brixenI wonder what the CIA folder on rbx looks like :)
19:25:33BrianRice-workhuh
19:26:22BrianRice-workoh now I see the email
19:30:34wayneeseguinbrixen: Yeah... autotools...
19:35:24boyscoutCI: rubinius: 83690bb successful: 3456 files, 13603 examples, 41167 expectations, 0 failures, 0 errors
19:44:08tarcierisooooo
19:44:09tarcierithis is odd
19:44:33tarcierirbx-1.0.1-20100603 > class Foo; end; module Foo; end => nil
19:44:40tarcieriblah newslines :(
19:44:44tarcierinew... lines...
19:45:54tarcierianywho MRI raises a TypeError if you do that
19:48:10Defilerbrixen: wow.
19:48:22Defilerre: that gist
19:52:04brixentarcieri: hrm, could you file a ticket on that
19:52:28brixengrabs lunch
19:52:32brixenbbiab...
20:02:46tarcieribrixen: http://github.com/evanphx/rubinius/issues/issue/386
20:02:54tarcieriungh @ formatting
20:07:45goyox86people, Where can look for a guide about the Rubinius debugger commands, use?
20:08:26brixengoyox86: http://gist.github.com/450160
20:08:47brixen09:27 brixen >> goyox86: right now you can inspect stuff and set a new breakpoint
20:08:50brixen09:27 brixen >> goyox86: then type 'c' to continue running
20:08:53brixen09:27 brixen >> goyox86: step and other stuff isn't done yet
20:08:58brixentarcieri: thanks man
20:09:37brixenfinally leaves for lunch
20:10:08goyox86brixen: thx man, i've not read this line: "right now you can inspect stuff and set a new breakpoint"
20:31:26evantarcieri: fixing that now
20:31:31evanit's because I did
20:31:34evanunless obj.kind_of? Module
20:31:41evanand a class is a module.
20:50:38rueDefiler: How are your plans coming along for the ultimate metal hexperience?
20:51:59tarcierievan: aah
20:52:09tarcierigot sucked into the meeting monster
20:52:24Defilerrue: sadly I have had to cancel the trip :(
20:52:31Defilerfor numerous irritating reasons
20:52:42Defilerbut I'm consoling myself with numerous motorsports events later in the year
20:53:04tarcierievan: heh, wrote some code that did that accidentally, worked on rbx then broke on our CI server
20:53:07Defilergoing to try to get to colorado this weekend somehow for the Pikes Peak hill climb
20:53:10Defilerbut may fail at that
20:53:14tarcieriheh
20:53:14evantarcieri: ha.
20:53:17tarcierihooray for Colorado
20:53:58dbussinkevan: if you want i have a really basic benchmark script that allocates datamapper objects
20:54:05dbussinkevan: that you can also compare to mri performance
20:54:16evandbussink: please
20:54:41evanDefiler: somehow? I'd suggest airtravel.
20:55:27Defilerheh yeah
20:57:01dbussinkevan: https://gist.github.com/de660c29f0e1b316fc4f
20:57:08dbussinkevan: added some basic numbers in the comments
20:57:43evanDefiler: please rerun with -Xgc.autopack=no
20:58:09dbussinkevan: added that too
20:58:16Defilerok! :)
20:58:23evanhm.
20:58:25evanack.
20:58:29evanDefiler: :)
20:58:40evandbussink: how much fucking code runs for .new
20:58:41evangeez.
20:58:54dbussinkevan: quite a big i guess :P
20:58:59dbussinkbut it's all ruby stuff
20:59:02dbussinkno C code here
20:59:06evanwell
20:59:07Defilernew should use Module.new to make a new anonymous new object maker and then call make_object on it
20:59:11evanthats obviously not completely true
20:59:14evansince 1.9 is 0.9
20:59:16dbussinkbut it's something that probably could very well be optimized
20:59:24evanso you're clearly hitting a lot of core class methods
20:59:26dbussinkwell, no explicit C extensions, let put it that way
20:59:27evanwhich are C.
20:59:31dbussinkthat's probably true yeah
20:59:37evanrun with -Xprofile
20:59:42rueDefiler: Motorsports works for that
21:00:09Defileryeah. I'm going to get my regional racing license this year as well
21:00:16Defilerand hopefully a national one in 2011
21:00:38dbussinkevan: https://gist.github.com/404a2dd8378ee4980b4b
21:00:49Defilerhttp://www.scca.com/contentpage.aspx?content=47
21:01:02evanor
21:01:07evanso very, very heavy Hash write.
21:01:14dbussinkevan: yeah, looks like it
21:02:36dbussinkevan: is the iterator hash writing? or do you mean the number of tuple writes?
21:02:55evan 2.81 3.85 0.77 1001363 0.00 0.00 Hash.new_from_literal
21:02:56dbussinkmore in general hash heavy it looks like
21:03:08evancreated 1 million Hashes
21:03:18evanwhich makes me assume it used them all
21:04:51dbussinkevan: it uses a hash to initialize all the attributes
21:04:55dbussinkwhich is probably to blame then
21:05:12evanbecause you're also creating them then throwing them away
21:05:13dbussinkevan: it actually doesn't do that much
21:05:21dbussinkbut it could be optimized
21:07:02dbussinkevan: but i guess creating empty hashes is a lot more light weight on mri then
21:07:11dbussinki wonder if it's something worth optimizing in rbx for
21:07:12coredh/whois dbussink
21:07:18dbussinkif it happens a lot
21:07:22dbussinkcored: curious? ;)
21:07:28coreddbussink: yes :-)
21:07:28evanhahahhaha
21:07:31evanwow, BUSTED.
21:07:54coredI typed too fast
21:08:24dbussinkcored i can tell you stuff myself :P
21:09:36cored:-)
21:09:59coredI thought I saw you in #padrino the other day, that's was it
21:17:07boyscoutFix EBADF spec failure - 15faaca - Evan Phoenix
21:17:08boyscoutAdd spec for module trying to reopen a class - 5c18c14 - Evan Phoenix
21:17:08boyscoutCheck only for Module, not Class too. Fixes #386. - 8e2195f - Evan Phoenix
21:18:05Defilerempty hashes are created a LOT in many styles of ruby code
21:18:10Defilere.g. def zazz(options = {})
21:18:23dbussinkyeah, so hence i was wondering if it's a case worth optimizing for
21:18:32evani'm writing some benchmarks for it right now
21:18:38evandbussink: what would be written to the hash?
21:18:53Defilerbut optimizing for the common case of 'hash with two or three keys' is probably just as important
21:18:54dbussinkevan: in this case nothing actually
21:18:56kstephensI use def zazz(options = EMPTY_HASH) wherever possible, because of the allocation/GC costs.
21:19:02dbussinkit used as a default value
21:19:10Defileryeah, same here
21:19:25Defilerthough I generally do options = nil to avoid having to normalize for when people deliberately pass in a nil
21:19:38Defilerthen options ||= empty hash
21:19:54kstephensyea that too
21:20:05evana raw loop doing {} is about the same
21:20:54evan1.4s vs 1.9s for 3M iterations
21:20:59evanso it must be something else in the DM case
21:21:11dbussinkevan: this also iterates over the empty hash
21:21:47dbussinkevan: ok, small optimization turned it from 10 secs into 2.3 secs :)
21:21:55dbussinkremoving the {} allocation and the iteration over it
21:22:07evanoh? what did you change and where?
21:22:09evanin DM?
21:22:13dbussinkin DM yeah
21:22:17evanshow me the gist
21:22:18evani'm curious.
21:22:20evaner.
21:22:21evandiff.
21:22:39dbussinkevan: https://gist.github.com/8fbbfd2a7cd0c5ebf73e
21:22:46dbussinkself.attributes is a method call here
21:22:59dbussinkthat iterates over the hash and sets the ivars through the accessors
21:23:14evanthere are ivars and a hash?
21:23:32DefilerFoo.new :attr1 => 1, :attr2 => 2
21:23:35dbussinkno, the hash is used for initialization
21:23:36Defilersets @attr1 = 1
21:23:38Defileretc etc
21:23:54dbussinkquite a diff between auto packing enabled / disabled here though: https://gist.github.com/24a12e488c5db16d101a
21:23:55evanum
21:23:57evanto me
21:24:04rueDefiler: For the regional licence you just have to drive from Bronx to Brooklyn through the city?
21:24:07evanyour diff just assigns a hash to @attributes
21:24:08Defilerrue: hah
21:24:32dbussinkevan: no, attributes is a method that is called
21:24:40evanright
21:24:45evanwhich does what with the hash?
21:25:13Defilerit does hash.each {|k,v| instance_variable_set("@#{k}", v}
21:25:13boyscoutCI: rubinius: 8e2195f successful: 3456 files, 13605 examples, 41169 expectations, 0 failures, 0 errors
21:25:14Defilerbasically
21:25:32evanoh for fucks sake guys.
21:25:40dbussinkevan: http://github.com/datamapper/dm-core/blob/master/lib/dm-core/resource.rb#L339-353
21:25:44evanshakes his head
21:25:45Defileryeah it's retarded but it's how every damn ruby library works now
21:25:51Defilerso it has to be fast :(
21:25:59Defilerrails *shakefist*
21:26:09dbussinkthat's how people expect stuff to work..
21:26:31kstephensmaybe setter = :"#{name}=" ?
21:26:51Defileryeah you avoid ivar_set if you can
21:27:06dbussinkevan: btw, that __send__ there is because people wanted to use send as a datamapper model property
21:27:09Defilerbut lots of things let you pass arbitrary attributes and then create accessors for them
21:27:24dbussinkevan: although i think that people who do that should shoot themselves in the foot now
21:27:28evandbussink: ok, so if you could dig in a bit and see where it's slow
21:27:34evani'll work it backwards into benchmarks and such
21:27:38evansome friends showed up
21:27:42evanbrb
21:27:46dbussinkevan: well, what surprises me now is that autopacking makes it slower
21:27:56dbussinkwithout it, it's faster than 1.9.2 actually
21:28:00dbussinkwith this optimization fix
21:28:20dbussinkbut i guess allocating a bigger object is heavier on memory pressure
21:28:23dbussinkwhich would explain
21:29:35kstephensclass Symbol; def setter; @setter ||= :"#{self}="; end; end
21:33:34dbussinklooks like mri has some pretty fast empty hash optimizations
21:34:02dbussinkgoing from no hash argument to using one entry makes it a lot slower
22:59:49evani'm back
23:00:01evandbussink: my friend and his 6 month old came over
23:01:05slavawho's the better programmer?
23:01:12brixenheh
23:01:27spastorinobrixen: how are you?
23:01:30slavakids learn fast these days
23:01:33evanthan my friends 6 month old? me.
23:01:42evanshe can't crawl yet.
23:01:44brixenspastorino: good, you?
23:03:06spastorinogood
23:03:20spastorinotrying some things on rubinius :)
23:03:29brixenexcellent
23:03:32brixenhow's that going?
23:03:34spastorinorails on rbx to be more exact
23:03:42spastorinorails tests
23:03:49spastorinoit's quite good
23:03:50spastorino;)
23:03:58spastorinofor me awesome
23:04:05evanspastorino: woo!
23:04:07spastorinoi want rbx to be the default ruby
23:04:08spastorino:D:
23:04:13brixenheh
23:04:47spastorinobrixen: don't tell to nicksieger :P
23:04:50evandbussink: did you go to bed?
23:04:57brixenspastorino: my lips are sealed :)
23:05:28brixenspastorino: pero el esta aqui tambien ;)
23:05:47spastorinohahahaha
23:06:14spastorinohe want to copy you guys :P
23:06:17slavarbx is the tupac of ruby vms
23:06:24brixenspastorino: ya se!
23:06:33spastorinohahaha
23:06:41brixenspastorino: sorry, I don't type accents :(
23:06:51spastorinohehe no problem
23:06:54brixenI'm a lazy estadounidense
23:07:18parndtso it's soon to die in a drive by?
23:07:22spastorinohehehe it's nice at least you're trying to say something in spanish ;)
23:07:26bcgbrixen: I followed your instructions and updated RubySpecs with RBIGNUM_SIGN and all the tests seem to work just fine in rbx. I wanted to test 1.9 against my RubySpec changes but a ton of stuff was breaking ... should I be able to run mspec against my 1.9 target successfully?
23:07:35spastorinoyou have to steal some good things of JVM
23:07:38spastorino:P
23:07:58brixenbcg: usually 1.9 head works ok
23:08:14brixenbcg: anything less than 1.9.2preview3 is an unknown quantity
23:08:27brixenparndt: let's hope not!
23:08:28bcgbrixen: I tried ruby-head too, something else must be going on ...
23:08:39brixenbcg: how did you run it?
23:09:53bcgrvm system ruby-head ; mspec -tr ...
23:10:03brixenhmm
23:10:07brixenI'll try here
23:10:29brixenusually I have a separate 1.9 build so I do: bin/mspec -truby1.9 ...
23:10:59brixenbcg: ohhh, wait, this is c-api specs
23:11:06goyox86spanish por aqui tambien, and using rbx for rails too ;-)
23:11:07brixenthey are really broken on 1.9 atm
23:11:09brixensorry :(
23:11:53goyox86spastorino: where are you from?
23:11:56brixenbcg: I need to work on getting the c-api specs running on 1.9
23:12:07brixengoyox86: where are you from? :)
23:12:25goyox86brixen: Venezuela here!
23:12:37brixengoyox86: awesome! thanks for trying out rbx :)
23:13:10brixenI need to come to the next rails/rubyconf in sudamerica
23:13:26bcgbrixen: so c-api doesn't work on 1.9?
23:13:55brixenbcg: most of it should work ok since 1.9 didn't change that much from 1.8 in the C-API
23:14:11brixenbcg: but for some reason the c-api specs have a bunch of errors
23:14:32brixenbcg: I just need to look into it
23:14:48bcgbrixen: ok, well I'll see if I can verify that it behaves the same way as 1.9 if I can't fix the 1.9 c-api issues myself. Thanks for the info!
23:15:04bcgbrixen: well if you do let me know. Thanks!
23:15:44brixenbcg: for one thing, it looks like the specs use stuff that is a syntax error on 1.9
23:16:06goyox86brixen: I'm an Alan Kay/Goldberg/Ingalls fan ;-) , and i remember the old rubinius site, when i read that rubinius implementation was Blue-Book based!
23:16:27evanbcg: btw, on your work
23:16:28brixengoyox86: ahh yes, it started there in evan's brain :)
23:16:32evanyou didn't need to change msgpack at all.
23:16:46evanbcg: nor should you directly expose rb_big_sign() in msgpack
23:16:59evani was saying that you should define the RBIGNUM_SIGN macro in rubinius
23:17:05evanin our ruby.h
23:18:24goyox86brixen: i really liked it (Blue book stuff), but i was pretty busy by that days, so i checked out the sources and gave a try, but i left rubinius until a few days ago
23:18:30bcgevan: yea brixen mentioned that to me, I misunderstood you guys in our last chat. I thought thats what you had told me to do ...
23:18:40evanno prob.
23:19:09brixenbcg: ok, looks like mainly 2 things re c-api specs with 1.9: it's not finding ruby.h correctly and some syntax errors in the specs
23:19:10evanI don't want people to have to do #ifdef RUBINIUS in their extensions unless it's the only way to do something
23:19:29brixenbcg: I'll look into fixing that soon
23:19:43goyox86by the way yesterday i was watchin the docs and i realized that there is some compiler documentation pending
23:19:48bcgI have rectified it but have not updated my msgpack branch yet ... I actually I haven't pushed a thing yet ... will send you guys patches when I get a chance
23:20:27brixengoyox86: yeah, I need to document the basics of the bytecode compiler
23:20:52brixenbcg: awesome! thanks for working on it
23:21:42goyox86brixen: give some start guidelines, i think this will help me to understand more quickly the implementation
23:22:20brixengoyox86: start guidelines for?
23:22:37goyox86brixen: so what exactly do you think is the aproach?, to the bytecode compiler?
23:23:13brixengoyox86: do you mean, how does the bytecode compiler work? or something else?
23:23:29goyox86brixen: about how it works? how it's implemented?, or the API for extending? (ByteCodecompiler)
23:24:15goyox86brixen: i know that it is implemented in ruby
23:24:18brixengoyox86: I'll write a short doc on how it works
23:25:01brixenbasically, the melbourne C ext calls the methods in lib/melbourne/processor.rb to create an AST
23:25:15brixenthe classes for the AST are all in lib/compiler/ast/*.rb
23:26:02goyox86brixen: ok, so what are the main files inside the source tree? That i need to check out to have an idea of the big picture
23:26:30brixenthe compiler calls the #bytecode(g) method on the AST nodes, passing g, in insntance of Rubinius::Generator (see lib/compiler/generator.rb)
23:27:24goyox86brixen: i see
23:27:26brixengoyox86: the compiler is all in lib/compiler
23:27:50brixenthe parser is the melbourne ext, lib/melbourne and lib/ext/melbourne
23:28:37goyox86brixen: melbourne is a port from the MRI 1.8.7 grammar, i mean that grammar?
23:28:40brixenlib/compiler/compiler.rb and lib/compiler/stages.rb are a good start
23:28:55brixenyes, melbourne is the MRI parser wrapped up in a C ext
23:29:46brixenlib/ext/melbourne/visitor.cpp implements a visitor pattern over the C struct parse tree that the MRI parser produces
23:30:10goyox86brixen: as i see, the parser is not the most important thing to document right?, is the ByteCodeCompiler?
23:30:23goyox86brixen how is the melbourne documentation?
23:30:33brixenyeah, the bytecode compiler is what most folks want to know about
23:31:01brixengoyox86_: http://gist.github.com/450732
23:31:17brixengoyox86_: there is not melbourne documentation, sorry :(
23:32:09brixenmost of melbourne that is relevant is in lib/ext/melbourne/visitor.cpp and lib/melbourne/processor.rb
23:32:42goyox86brixen: good, but i agree you the ByteCodeCompiler is most important, than melbourne at this point
23:33:04brixengoyox86_: do this: put some ruby code that you're curious about in a file, then do bin/rbx compile -ABS file.rb
23:33:35brixenyou'll get the AST, bytecode, and a s-exp output
23:33:54brixenthen use whichever is most relevant to what you are trying to do
23:34:03goyox86brixen: neat :-)
23:34:26brixenie, sometimes you just want to see the bytecode, sometimes the whole AST, and sometimes just what it parses to, the s-exp
23:35:19goyox86brixen: the bytecode instruction set is documented?, primitives and taht stuff?
23:35:42brixensee vm/instructions.def
23:36:07brixenthere are a few insns that don't have docs, but they are pretty easy to understand
23:36:10evanprimitives aren't in the instruction set.
23:36:23brixenprimitives aren't really documented yet either
23:36:43goyox86was just a question :-)
23:37:42evanbrixen: the ones hooked up to ruby methods basically use the ruby method as documentation
23:38:03brixenwell, yeah :)
23:38:24brixenthe primitives system is a bit more complex
23:51:00brixenevan: did you see that dan ingalls joined SAP?
23:51:34evanoh really?
23:51:37evanno, i didn't.
23:51:42evandan's great
23:51:47brixenaccording to this http://www.infoq.com/interviews/ingalls-smalltalk
23:51:54evanoh, i watched bits of that
23:51:58evanmust have missed when the talked about that
23:52:02brixenI wonder how blue ruby is going
23:52:12brixenI just saw the SaP bit in the bio
23:52:14evanthey've been pretty underground
23:52:24brixenI haven't watched any yet
23:53:03evanbrixen: i'm going to selectively change using to_iter in Hash to direct iteration over the Entries
23:53:05evanfor performance reasons
23:53:18evanjust going to change #each for now
23:53:31brixenok
23:54:00evani love the idea, and I need to investigate how we can get the overhead donw
23:54:48evanI think escape detection is a ways off
23:54:49brixenmostly, it was for code quality
23:54:54evanyeah, i know.
23:55:05brixenit's hard to beat a pure loop in code
23:55:14brixenI tried :)
23:55:56evanactually, you know
23:55:59evanwith block inlining turned on
23:55:59brixenit will be fun to work on this in the JIT
23:56:03evanwe could probably use each {} in methods
23:56:16evanI should do a few experiments
23:56:21brixencool
23:58:33evanoh actually
23:58:34evanman
23:58:36evanin a hot loop
23:58:44evanan each_entry {} method is faster than to_iter