dkubb changed the topic of #datamapper to: Datamapper v1.2.0 | Mailing List: http://is.gd/aa9D | Logs: http://is.gd/qWAL7V | DataMapper 2 Renamed to ROM, see #rom-rb for development
v0n has quit [Ping timeout: 248 seconds]
rafaelfranca has joined #datamapper
rsim has joined #datamapper
rsim has quit [Ping timeout: 240 seconds]
onewheelskyward has quit [Ping timeout: 248 seconds]
xybre has quit [Ping timeout: 248 seconds]
xybre has joined #datamapper
onewheelskyward has joined #datamapper
cored has quit [Ping timeout: 248 seconds]
snusnu has quit [Quit: Leaving.]
cored_ has quit [Ping timeout: 276 seconds]
dkubb has joined #datamapper
ckrailo has quit [Quit: Computer has gone to sleep.]
zombor has quit [Remote host closed the connection]
<dkubb>
!memo mbj I'm curious if you're open to the idea of converting Buffer into a Stream-like object, compatible with the IO/StringIO type interface
<Cinchy>
dkubb: Memo recorded for mbj.
brainopia has joined #datamapper
brainopia has quit [Client Quit]
brainopia has joined #datamapper
rsim has joined #datamapper
<dkubb>
!memo mbj if you're worried about how to handle indentation, that should be relatively simple with a proxy that represents indentation, and it's #unindent returns the proxied object (and of course #indent would return itself wrapped in another indentation object
<Cinchy>
dkubb: Memo recorded for mbj.
<dkubb>
!memo mbj then the append (<<) operator in that object would just do @output << ' ' << string
<Cinchy>
dkubb: Memo recorded for mbj.
rsim has quit [Quit: Leaving.]
brainopia has quit [Quit: brainopia]
solnic has joined #datamapper
viranch has joined #datamapper
dawkirst has joined #datamapper
<dawkirst>
Hi, anyone awake?
mbj has joined #datamapper
<mbj>
.
<Cinchy>
mbj: [4h 0m 53s ago] <dkubb> I'm curious if you're open to the idea of converting Buffer into a Stream-like object, compatible with the IO/StringIO type interface
<Cinchy>
mbj: [1h 50m 46s ago] <dkubb> if you're worried about how to handle indentation, that should be relatively simple with a proxy that represents indentation, and it's #unindent returns the proxied object (and of course #indent would return itself wrapped in another indentation object
<Cinchy>
mbj: [1h 49m 15s ago] <dkubb> then the append (<<) operator in that object would just do @output << ' ' << string
<mbj>
dkubb: This is the 4th generation of unparsers I wrote. And I tried man approaches.
<mbj>
dkubb: Passing an unaugmented buffer around just adds code complexity in the emitters.
<mbj>
dkubb: s/man/many
<mbj>
dkubb: Feel free to try optimize yourself, I dont think you'll come up with an "easier" solution. But I'd happy to see it!
<mbj>
dkubb: The emitters are very straitforward now, you dont have to pass the buffer (or an indented buffer) anywhere.
<mbj>
dkubb: Using a plain IO object is IMHO primitive obsession.
<mbj>
dkubb: We can also move Generator.generate logic to Node#to_sql
<mbj>
dkubb: Than move app specs to Node#to_sql and kill mutations in Emitter.visit via that spec (symlink for mutant 0.2) kill configuration for mutant-0.3
<dawkirst>
mbj, in which cases would .sum => nil?
<mbj>
dawkirst: Can you give me a context?
<dawkirst>
mbj, So I have Foo with property bar (Integer) and I try Foo.sum(:bar) => nil. Some of bar's values are negative though, don't know if that makes the difference.
<dawkirst>
mbj, not sure if that is what you meant with "context"? Sorry.
mikecmpbll has joined #datamapper
slainer68 has joined #datamapper
<mbj>
dawkirst: The context of your problem ;)
<mbj>
dawkirst: You gave it already.
<mbj>
dawkirst: I never used the sum feature, sorry.
slainer68 has quit [Remote host closed the connection]
slainer68 has joined #datamapper
<dawkirst>
mbj, ok, thanks :)
brainopia has joined #datamapper
kleech has joined #datamapper
slainer6_ has joined #datamapper
onewheelskyward has quit [Ping timeout: 246 seconds]
<mongrelion>
I'm trying to create an instance of a class that includes DataMapper::Resource via params on a Sinatra application and it happens that this class belongs_to :foo and in the params you can find the foo's id as { name: 'meh', foo_id: '1' } but it doesn't get assigned because it's a string rather than an number. Before hacking I first wanna make sure that DataMapper doesn't have anything for handling these cases. Any thoughts/suggestions?
mikecmpbll has joined #datamapper
ngw has quit [Quit: Bye!]
zaidan has joined #datamapper
snusnu has quit [Quit: Leaving.]
cored has joined #datamapper
cored has joined #datamapper
cored_ has joined #datamapper
snusnu has joined #datamapper
v0n has joined #datamapper
rsim has joined #datamapper
rafaelfranca has quit [Remote host closed the connection]