solnic changed the topic of #rom-rb to: Ruby Object Mapper | Mailing List: https://groups.google.com/forum/?fromgroups#!forum/rom-rb | Logs: http://irclog.whitequark.org/rom-rb
jfredett1 has joined #rom-rb
jfredett1 has quit [Quit: Leaving.]
jfredett1 has joined #rom-rb
jfredett1 has quit [Client Quit]
postmodern has quit [Quit: Leaving]
cored has joined #rom-rb
snusnu has quit [Quit: Leaving.]
mbj has quit [Quit: leaving]
cored has quit [Ping timeout: 245 seconds]
dkubb has joined #rom-rb
dkubb has quit [Quit: Linkinus - http://linkinus.com]
kleech has joined #rom-rb
skade has joined #rom-rb
cored has joined #rom-rb
zekefast has joined #rom-rb
zekefast has quit [Remote host closed the connection]
zekefast has joined #rom-rb
kleech has quit [Remote host closed the connection]
breakingthings has joined #rom-rb
bf4 has quit [Ping timeout: 245 seconds]
knowtheory has quit [Quit: Computer has gone to sleep]
kleech has joined #rom-rb
cored has quit [Read error: Connection reset by peer]
jfredett1 has joined #rom-rb
snusnu has joined #rom-rb
bf4 has joined #rom-rb
cored has joined #rom-rb
cored has joined #rom-rb
cored has quit [Changing host]
knowtheory has joined #rom-rb
cored has quit [Quit: leaving]
cored has joined #rom-rb
cored has joined #rom-rb
marcosdsanchez has joined #rom-rb
zekefast has quit [Quit: Leaving.]
dkubb has joined #rom-rb
<dkubb> good morning
marcosdsanchez has quit [Ping timeout: 250 seconds]
bf4 has quit [Ping timeout: 240 seconds]
kleech has quit [Remote host closed the connection]
<jfredett1> mornin'
bf4 has joined #rom-rb
breakingthings has quit [Ping timeout: 256 seconds]
breakingthings has joined #rom-rb
snusnu has quit [Ping timeout: 260 seconds]
<cored> morning
<cored> dkubb: thanks for the advice on devtools
<cored> will update the code in a couple of hours and keep working on that
snusnu has joined #rom-rb
<dkubb> ahh ok, no problem
<dkubb> I appreciate that you're taking the time to work on that. devtools being untested has bothered me but I haven't been able to work on it since my todo list is already a mile long ;)
<cored> yeap
mbj has joined #rom-rb
zekefast has joined #rom-rb
kleech has joined #rom-rb
knowtheory has quit [Ping timeout: 248 seconds]
snusnu has quit [Quit: Leaving.]
snusnu has joined #rom-rb
snusnu has quit [Quit: Leaving.]
knowtheory has joined #rom-rb
cored has quit [Ping timeout: 248 seconds]
cored has joined #rom-rb
mbj has quit [Ping timeout: 245 seconds]
mbj has joined #rom-rb
jfredett1 has quit [Quit: Leaving.]
skade_ has joined #rom-rb
skade has quit [Ping timeout: 248 seconds]
<mbj> Random thought: Would you guys use a "def" alternative for command/query methods?
<mbj> class Foo
<mbj> command bar(value)
<mbj> @value = value
<mbj> end
<mbj> end
<mbj> It would automatically return self
<mbj> for command methods.
<mbj> query baz
<mbj> @ivar + something
<mbj> end
<dkubb> I'd be more likely to want to use an annotation rather than a method dsl
<dkubb> like def bar(value) .. end; command :bar
<mbj> Would that annotation augment the method body to return self ?
<dkubb> yeah it could
<dkubb> although I do wonder how much it would buy above just explicitly returning self
<mbj> I'm just thinking loud, I never thought about designing a language and just exchanging random toughts.
<dkubb> query :bar makes a bit more sense, since it could memoize the return value
<dkubb> oh I see, you're thinking about language design, not necessarily ruby code
<mbj> yeah
<mbj> query baz
<mbj> body_here
<mbj> end
<mbj> is NOT possible via a ruby DSL.
<dkubb> I think it would be interesting to have methods default to a command or query
zekefast has quit [Quit: Leaving.]
<mbj> yes, you could forbid calls to commands from query
<mbj> forbid ivar assignment
<mbj> and you could co furser
<mbj> you coukd define funs (functions)
<mbj> fun foo
<mbj> body_here
<mbj> end
<dkubb> yeah, the object should be frozen for the scope of the query method
<dkubb> and all other objects
<dkubb> you shouldn't be able to change any system state in a query
<mbj> and the compiler knows the result is immutable.
<dkubb> yeah
<dkubb> on the ruby side, it might be nice to have yard annotations for commands and queries
<dkubb> you could use that as hints to rewrite the code
<mbj> Just to learn about language design and exercising my coding skills I'll try to implement a playground language on top of rubinius.
<mbj> Not now, but I thik I should do it once (and fail).
<mbj> Will help me a lot to critize languages better ;)
<dkubb> many of which are adopted by ruby
<dkubb> you could also try doing something like coffeescript, but for ruby
<mbj> I dont like the syntax, but readong the ideas (talking about eiffel)
<dkubb> this is where the idea of command/query separation comes from: http://en.wikipedia.org/wiki/Eiffel_(programming_language)#Features.2C_commands.2C_and_queries
<dkubb> the uniform-access principle is also really nice
<dkubb> and not spoken of much
<dkubb> I wish coffeescript had it tbh, but I understand why it can't and still interop with js
<mbj> Yeah
<dkubb> I love the brevity of cs
<mbj> Too bad we only have JS in the browser. And not a unified / more low level VM.
<dkubb> I still think there's room for something that compiles to js and is more consistent than cs
<mbj> You know the opal project? They compile ruby to js.
<dkubb> oh neat
<mbj> The implementation is (from a tool author who works a lot with AST transforms), horrible.
<mbj> I could do lots of better / feature rich / correct.
<dkubb> does it use parser?
<mbj> Its basically an unparser to another language.
<mbj> And it should be AST basted, transforming a ruby AST to a JS ast.
<mbj> dkubb: The last time I checked they used ruby_parser.
<mbj> And ruby_parser cannot parse ruby. It parses a subset.
<mbj> parser can.
<mbj> dkubb: its not ruby_parser, its something "homebrew / ruby_parser_a_like" via MRIs grammar.y
<dkubb> ahh ok
<mbj> dkubb: And its a giant klass, emitting a string directly.
<mbj> dkubb: Recursively visiting the ruby AST. It must fail.
<mbj> Complexity explosion. Uneasy to separate transformation contexts etc.
<mbj> It has improved since the last time I visited it.
<mbj> But I think it would benefit a lot from doing an ruby-ast => js-ast => unparsing design.
<mbj> Its is VERY easy to produce syntax errors / miss something with direct string emiting.
<mbj> JS syntax is far more primitive than ruby.
<mbj> I'd love to write such a took in unparser / mutant style.
<mbj> s/took/tool/
zekefast has joined #rom-rb
Urizen has joined #rom-rb
<Urizen> Quick question about ruby object mapper... can it already persist to something like a sqlite database?
<Urizen> or is it just memory now?
<mbj> Urizen: Currently it is only in memory - sorry.
<Urizen> No problem, I'll stick to datamapper for this project im starting
<Urizen> thanks
breakingthings has quit []
Urizen has quit [Quit: leaving]
mbj has quit [Quit: leaving]
dkubb has quit [Quit: Linkinus - http://linkinus.com]
bf4 has quit [Ping timeout: 260 seconds]
kleech has quit [Ping timeout: 240 seconds]
cored has quit [Ping timeout: 245 seconds]
cored has joined #rom-rb
bf4 has joined #rom-rb
snusnu1 has joined #rom-rb
snusnu1 has quit [Client Quit]
snusnu1 has joined #rom-rb
snusnu1 has quit [Client Quit]
snusnu has joined #rom-rb