apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste >3 lines of text on gist.github.com || Rails is in #rubyonrails || Log: http://irclog.whitequark.org/ruby
_whitelogger has joined #ruby
<catphish> can anyone explain why this doesn't work? Resolv::DNS.new(:nameserver => '202.12.27.33', :search => [], :ndots => 0).getresource('com.', Resolv::DNS::Resource::IN::NS)
<catphish> it raises: Resolv::ResolvError: DNS result has no information for com.
kpshek has joined #ruby
<catphish> (where 202.12.27.33 is a root nameserver)
<apeiros_> 'com.'?
chomp has joined #ruby
<catphish> apeiros_: it's a GTLD
<catphish> it should be resolved to h.gtld-servers.net.
<JonnieCache> catphish: does it work when you try a less unusual domain name?
<catphish> JonnieCache: no, root nameservers only resolve first level domains
<JonnieCache> oh right im with you
<catphish> it works with google's resolvers though: Resolv::DNS.new(:nameserver => '8.8.8.8', :search => [], :ndots => 0).getresource('com.', Resolv::DNS::Resource::IN::NS)
ph^ has joined #ruby
<catphish> i guess i'm sending the wrong query
<JonnieCache> maybe break out wireshark and compare the outgoing requests or some such
<catphish> that's a good idea
<catphish> "dig @202.12.27.33 -t ns com" works fine
kizzx2 has joined #ruby
ben_alman has quit [Excess Flood]
<catphish> actually, on second thoughts, i don't need to do a root lookup
ben_alman has joined #ruby
<bnagy> how big is the response?
thisirs has quit [Remote host closed the connection]
jeax has joined #ruby
<bnagy> large responses kick over to tcp, afair, maybe the ruby lib doesn't
<jeax> why am I getting a "Can't find EOF anywhere before EOF" error on this? : http://pastie.org/private/ps5m6swcvlehr0zhansq
<catphish> i want uncached dns results, but its sufficient to do a cached request for the domain's NS records, then do a request to those for the data i want :)
<catphish> bnagy: it's incredibly unlikely that root responses require TCP
Ontolog has joined #ruby
<catphish> but its possible i guess
<bnagy> jeax: I think you need <<-EOF
<bnagy> cause your heredoc ends are indented, try that
<jeax> bnagy, add the dash to the beginning or end EOF?
<bnagy> start
theRoUS has joined #ruby
<jeax> bnagy, that fixes the highlighting, lets see how it goes.
kenperkins has quit [Quit: Computer has gone to sleep.]
<Dreamer3> ah
<Dreamer3> it's different method_missing or different *args behavior
<jeax> bnagy, tada! thanks.
<bnagy> np
<Dreamer3> the assignment is happing with method_missing and that's what's messing things up
<kizzx2> hey guys, i attached to a running instance of ruby using gdb, and then did `call rb_eval_string("p 3")` `detach`, STDOUT gives "3" but then the ruby program seems to have halted after i detached.... ideas?
TPFC-SYSTEM has joined #ruby
asobrasil has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
raja has joined #ruby
yekta has joined #ruby
gibsonfs has joined #ruby
raja is now known as Guest13353
lxsameer has quit [Quit: Leaving]
randomautomator has joined #ruby
theRoUS has quit [Ping timeout: 240 seconds]
<Dreamer3> does * not work the same in ruby 1.9?
<Dreamer3> for expanding arrays
<banisterfiend> Dreamer3: it works slightly differently in some contexts
<bnagy> kizzx2: I odn't know gdb, but do you need to go before you detach?
<Dreamer3> @attributes[att] = *args
Ontolog has quit [Remote host closed the connection]
<Dreamer3> seems diff
<Dreamer3> how can i get the previous behavior?
<kizzx2> bnagy: usually no, but i did a `continue` and the same
<banisterfiend> Dreamer3: what behaviour do u want, can u describe it
strk has left #ruby [#ruby]
<kizzx2> the interesting thing is... i was using test.rb which is `sleep 10000`, so when I broke in ruby was in a blocking system call...
<kizzx2> when i tried test2.rb `(1..Float::INFINITY).each { |i| p i }` and do `call rb_eval_string("p 3")`, i get "recursive deadlock" exception from ruby immediately
<kizzx2> i suspect it has to do with GIL
<bnagy> try waiting another 9930 seconds then?
<Dreamer3> previous something.key = "test" would set it to "test"… now it sets it to ["test"]
macmartine has joined #ruby
<banisterfiend> Dreamer3: yes, the return is now always an array, it's more consistent
<kizzx2> bnagy: sorry for the lame example, i tried `(1..Float::FININITY).each { |i| p i; sleep 1 }` and it's the same :P
<banisterfiend> Dreamer3: better than sometimes an array and sometimes not, imo
PaciFisT has joined #ruby
<Dreamer3> banisterfiend: so how can i make method missing support arrays or not arrays?
<Dreamer3> check args.size i guess?
<banisterfiend> Dreamer3: Yeah.
yekta has quit [Quit: yekta]
ackz has joined #ruby
macmartine has quit [Read error: Connection reset by peer]
hashpuppy has left #ruby [#ruby]
<banisterfiend> Dreamer3: that's cleaner IMO, since the old behaviour relied on an edge case
Niamkik has quit [Quit: leaving]
<lectrick> Is there a way to check for matching open/close symbols (parens, brackets etc) in a string using regex?
<Hanmac> kizzx2 i do: (1..Float::INFINITY).each { |i| p i; sleep 1 } and it works for me
shadoi has joined #ruby
atmosx has quit [Ping timeout: 276 seconds]
<Dreamer3> banisterfiend: before i just assumed that *args a magic pass thru :) and ruby always did what i expected
minijupe has joined #ruby
<kizzx2> Hanmac: attaching gdb, `call rb_eval_string("p 3")` `detach` and the ruby program would continue as normal as if nothing happened?
<Dreamer3> guess i never ran into the unexpected case previously
RainbowDashh has quit [Quit: SLEEP MODE. <@suborbital> no i filtered out RainbowDashh join quit msgs - appearantly it filtered out everything]
macmartine has joined #ruby
<bnagy> lectrick: use a stack imho, regexp wasn't made for that
itnomad has joined #ruby
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
atmosx has joined #ruby
jchauncey has joined #ruby
mdhopkins has joined #ruby
<JonnieCache> lectrick: bnagy is right, regular expressions cant do that, you need to combine it with a stack
hackeron_ has quit [Quit: leaving]
<shevy> aha so he used * ?
tk___ has quit [Quit: ばいばい]
<JonnieCache> pedants: yes I know some regex libs can do it, thats no reason not to just use your own stack
hackeron has joined #ruby
luxurymode has joined #ruby
Enekoos has joined #ruby
quest88 has joined #ruby
soulcake has joined #ruby
kpshek has quit [Ping timeout: 255 seconds]
markab has quit [Quit: Leaving.]
markab has joined #ruby
iocor has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<lectrick> bnagy: JonnieCache: Watch me.
<bnagy> I'd rather not, I see enough retarded code as it is
robotmay has quit [Ping timeout: 246 seconds]
<JonnieCache> lol i think you need perl's regex engine to do it
<JonnieCache> so good luck
<JonnieCache> stack parsers are so easy to write as well...
wmoxam_ has quit [Quit: leaving]
wmoxam_ has joined #ruby
banisterfiend has quit [Ping timeout: 252 seconds]
yeggeps_ has joined #ruby
jeax is now known as whitenoise
robotmay has joined #ruby
ePirat has joined #ruby
kpshek has joined #ruby
<shevy> ewww
yeggeps has quit [Ping timeout: 248 seconds]
Niamkik has joined #ruby
Niamkik has quit [Client Quit]
Niamkik has joined #ruby
peterhil has joined #ruby
Allerious has joined #ruby
Allerious has quit [Client Quit]
yannis has joined #ruby
hasse has quit [Ping timeout: 245 seconds]
cousine has quit [Remote host closed the connection]
mikepack has joined #ruby
qwerxy has quit [Ping timeout: 244 seconds]
cousine has joined #ruby
_iMBA has quit [Ping timeout: 245 seconds]
qwerxy has joined #ruby
RainbowDashh has joined #ruby
thomas has quit [Remote host closed the connection]
tdubz_ has joined #ruby
hunglin has joined #ruby
Vert has joined #ruby
Niamkik has quit [Quit: leaving]
Niamkik has joined #ruby
the_jeebster has joined #ruby
thone has joined #ruby
<enroxorz> can anyone here suggest a good GUI toolkit that is cross platform?
<enroxorz> wxRuby and tk are a pain
<JonnieCache> QT
<enroxorz> There's a QT lib?
skyjumper has left #ruby [#ruby]
<shevy> ruby-gtk
<JonnieCache> and theres other stuff
<JonnieCache> im no expert though
Niamkik has quit [Client Quit]
<shevy> Hanmac also uses wxruby btw
<JonnieCache> theres always html ;)
<Hanmac> shevy you are half right ... i wrote my own "wxruby"
<enroxorz> i have an app with wxruby but i havent found a good designer that helps.
_iMBA has joined #ruby
thone_ has quit [Ping timeout: 264 seconds]
Targen has joined #ruby
<shevy> so you search not only a GUI toolkit, but also a good designer :)
<shevy> I found glade really unusable, so I can no longer recommend ruby-gtk
<enroxorz> shevy: i would be sarcastic at this point but damn you are right on that one.
<enroxorz> i havent even looked for a good designer
<Hanmac> enroxorz wxformbuilder should be work for wxruby too
<shevy> you'll only get disappointed
baroquebobcat has joined #ruby
<bnagy> swing!
<shevy> yeah!
<shevy> oh swing
<enroxorz> damn it! i was trying to avoid swing...
<shevy> I thought swig
<shevy> Hanmac loves swig
<JonnieCache> swing is actually great its just java that sucks
<enroxorz> remind me, i remember a while back talks about having tk bindings default for windows ruby installer. is that the case now?
<shadoi> I kinda wish there was a flag that told Hash to initialize all instances with symbolized keys…
<bnagy> if only there was some way we could use java libs really easily from ruby
<xclite> You mean like
<workmad3> bnagy: </sarcasm>? ;)
<shevy> dunno. I use ruby-gtk on windows too. every time I tried tk, I could not stand the crap it is, especially how the looks. I am quite superficial
<xclite> something like
<xclite> we could combine the names
<xclite> juby?
rippa has joined #ruby
<xclite> rava?
<shevy> jing
<bnagy> Rava
<bnagy> :P
<shevy> jing my ding
<workmad3> xclite: ruva
<shevy> and rava my lover
<Sigma00> juby muby, etc
<xclite> ooh ruva
<xclite> that's good
<enroxorz> shevy: i understand. when it comes to UI I want a toolkit that looks great
baroquebobcat_ has joined #ruby
<workmad3> jaby?
<enroxorz> juby?
<shevy> enroxorz, hmm. the best look is with ruby-qt but if you ask me, ruby qt is dead. there is #qtruby though, the main dev is there
baroquebobcat has quit [Read error: Connection reset by peer]
baroquebobcat_ is now known as baroquebobcat
<enroxorz> let me look into qt. i havent touched qt before so it will be fun to use!
<bnagy> shadoi: that would be dumb, because not everything can be symbolized
<workmad3> bnagy: you could symbolize the inspect string and use that!
<enroxorz> :everything!!!!
<shevy> enroxorz, have a look at the examples for the latest rubyqt, they look best
<enroxorz> shevy: will do
<bnagy> workmad3: ... yes I suppose you could :<
ryan0x2_ has joined #ruby
<enroxorz> im trying to extend my gem to be a good desktop app with desktop notifications
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
apeiros_ has quit [Remote host closed the connection]
jimeh4 has quit [Ping timeout: 264 seconds]
MasterIdler has quit [Quit: MasterIdler]
<enroxorz> i gotta go gents. be back in 1 hour. until then, dream of blocks and mixins for me
ben_m has joined #ruby
<shevy> i dont wanna have nightmares
<shevy> I'll dream of rubyOS instead
<JonnieCache> shadoi: check out HashWithIndifferentAccess
<shevy> is so much to type!
<Hanmac> :"i am a long string with whitespace"
<shevy> why not ... SymbolHash or HashSymbols or ... hmm
<workmad3> shevy: A = HashWithIndifferentAccess
<shevy> Hasher! class Hasher!!!
<bnagy> HashWithBenefits
<shevy> workmad3, dunno, I never really do that :)
<JonnieCache> or just get a decent text editor
ckrailo has joined #ruby
<shevy> vim?
red-panda has joined #ruby
<JonnieCache> anything that can do completions really
<Sigma00> notepad.exe!!
<Sigma00> :V
<shevy> vim!
<shadoi> bnagy: every hash KEY can be symbolized.
<shevy> :V starts vim
<shevy> there is only vim, vim and vim
<shevy> any emacs users here?
jprovazn is now known as jprovazn_away
<workmad3> shadoi: you can use arbitrary objects as hash keys
<Sigma00> I thought I was using windows once, turns out it was vim
andreime has quit [Quit: Lost terminal]
<shevy> I used to use gvim
<shadoi> workmad3: yeah I realized after I said that that it's probably not true.. lol
<workmad3> shadoi: :)
maesbn has quit [Remote host closed the connection]
<workmad3> b = {Object.new => "mwahahaha"}
<shadoi> bnagy: workmad3: still, I'd like a more performant way to standardize my hash keys.
<shadoi> doing it after initialization is nasty
<JonnieCache> class Object; def to_sym; to_s.to_sym; end; end
<JonnieCache> there we are now you can symbolize all your keys
prometheus has joined #ruby
<JonnieCache> doesnt make it a good idea though
* Sigma00 twitches in horror
<workmad3> shadoi: why are you standardising your keys?
Drewch has quit [Read error: Connection reset by peer]
<Mon_Ouie> Why can't you just make sure to only use strings or symbols?
<workmad3> shadoi: why aren't you coding it so they are all symbols initially?
<Mon_Ouie> That'd indicate you're using them wrong in some cases
<shadoi> workmad3: because I do a lot of serialization/deserialization
jeff_sebring has quit [Quit: Leaving]
<shadoi> And I get input from API clients that can send either native ruby or json
<workmad3> shadoi: use a serialisation mechanism that records that the keys are symbols? standardise on strings? make sure you serialise HashWithIndifferentAccess objects instead of plain hashes? :)
<JonnieCache> i told my python friend that in ruby one can globally redefine the random number generator to always return 3. he freaked out haha
<shadoi> workmad3: yeah, the proper place to do it is probably in the JSON lib.
<shadoi> I use symbols everywhere else.
<bnagy> shadoi: use strings
<workmad3> shadoi: hmm... you do not want to patch the JSON library to create hashes with symbols
<bnagy> it's just better
jeff_sebring has joined #ruby
<shadoi> bnagy: strings take up quite a bit more memory when you're talking about a LOT of fairly big hashes.
<workmad3> shadoi: that way is a great way to open a potential DoS attack on your server :)
<bnagy> works with all serialisation libs etc
ckrailo has quit [Ping timeout: 276 seconds]
jimeh4 has joined #ruby
<bnagy> shadoi: not if they're in a hash
<shadoi> bnagy: lots of different hashes using symbols as keys is more memory efficient.
<shadoi> But… maybe it's not worth it.
<bnagy> like :thisisalongsymbol takes up about the same as 'thisisalongstring' if there are only one copy of each, right?
<JonnieCache> workmad3 makes a good point. if you do too much funky stuff with your deserialization of user input it can cause big security problems
<bnagy> JonnieCache: no way, just look at PHP they've never had a problem with....wait
<shadoi> bnagy: I have quite a few fairly large hashes in memory at a given time depending on workload.
<Spaceghostc2c> bnagy: Ha.
<shadoi> bnagy: and they all use almost identical keys
wvms has quit [Quit: wvms]
<workmad3> shadoi: if you get the JSON lib to just symbolise the keys for the objects it creates, then it is trivial to fire json with permuted keys at the endpoint and, because symbols are by definition never GCed (they never go out of scope essentially) then you run out of memory
kenperkins has joined #ruby
<JonnieCache> best to let other peoples deserialization code do the work. theyre probably more compentant than you and if theyre not, at least you can blame them when it goes wrong ;)
M00kaw has joined #ruby
<shadoi> workmad3: true enough, and probably COULD be exploited in some rare case, but if malicious people even have network access to this service, they've already owned the network.
tintin has joined #ruby
<workmad3> shadoi: fair enough :)
<tintin> Hi
<tintin> I have a question?
<workmad3> shadoi: so it isn't arbitrary JSON that's being fired then... that's alright :)
databyte has joined #ruby
schovi has quit [Remote host closed the connection]
<tintin> Is ruby portable/platform independent?
ipoval has joined #ruby
<shadoi> workmad3: yeah, it's just that I provide 2 API client types, native-over-0mq and REST.
maletor has joined #ruby
<catphish> tintin: it's certainly been ported to several platforms
<shadoi> so I'd like to make them have standard keys
<tintin> But isn't the inside .c file of ruby source code compiled? So if it's compiled then how is it portable? Or how is it platform independent?
<shadoi> I'll probably switch back to strings.
ckrailo has joined #ruby
<shadoi> memory probably won't ever be a big issue.
<catphish> tintin: c files can be portable
<graspee> once it's compiled the interpreter isn't portable obviously
<tintin> Another question is how is ruby bytecode understandable by computer? I knew computer can only understand assembly or machine language
<catphish> tintin: ruby is interpreted
<graspee> because the virtual machine understands it
<JonnieCache> tintin: you should read up on the difference between compilation and interpretation
<catphish> tintin: it is bytecompiled when needed
<Hanmac> about rubybytecode you should ask in #jruby
kpshek has quit [Ping timeout: 276 seconds]
<tintin> catphish: How is c portable?
<bnagy> tintin: learn. to. google. (xposted from #ruby-lang)
<catphish> tintin: are you asking about the portability of ruby? or programs written in riby?
chson has joined #ruby
<graspee> c is portable because there are c compilers for lots of platforms
<catphish> tintin: C *is* portable, there are compilers for lots of systems
<workmad3> Hanmac: standard ruby 1.9 is compiled to bytecode inside the runtime and then the bytecode is executed on a VM within the runtime
<catphish> ruby code is portable also, because the ruby interpreter can be compiled on different platforms
<tintin> If you compile a c file and get the executable , that executable can't be run on another machine/computer , so how is c portable?
<workmad3> C is (or can be) sourcecode portable, not binary portable
<catphish> tintin: because the c file can be compiled on a different system
<catphish> binarys aren't portable, but they're not C
<tintin> I'm talking about the executable you find compiling a C file
krusty_ar has joined #ruby
<catphish> tintin: that's never portable
<catphish> that's just machine code
<catphish> but that's not relevent to ruby
<catphish> because both the ruby source code, and interpreted ruby code are portable
<tintin> So the ruby virtual machine can understand the ruby bytecode, that's fine, but is vm the computer/machine?
<bnagy> which is why all windows, linux and osx computers everywhere compile all binaries they run from source
indian has quit [Ping timeout: 260 seconds]
uris has quit [Read error: Connection reset by peer]
<bnagy> because binary isn't portable
<catphish> tintin: there is no ruby bytecode
<workmad3> tintin: the vm is part of the ruby runtime
<catphish> at least not that you distribute
<catphish> ruby is interpreted (compiled on the fly)
<workmad3> tintin: basically, to run ruby, you need a runtime
<tintin> workmad3: Isn't there any ruby bytecode?
ckrailo has quit [Ping timeout: 276 seconds]
<tintin> I knew ruby bytecode exists
<catphish> tintin: not that you can distribute, no
uris has joined #ruby
Drewch has joined #ruby
<catphish> tintin: it only exists in memory
<workmad3> tintin: there aren't any runtimes that generate bytecode and no runtimes that will read bytecode, and no standardised bytecode for ruby
<KevinSjoberg> Is it possible to copy the contents of one directory into another with FileUtils? Having really hard problems with this. FileUtils.cp_r('some_folder', 'another_folder'). What I want is contents from some_folder into another_folder. At the moment I get another_folder/some_folder.
<tintin> Then please read this, http://patshaughnessy.net/2012/2/15/is-ruby-interpreted-or-compiled , ruby produces bytecode,
<catphish> workmad3: jruby will
<workmad3> tintin: the bytecode is an implementation detail of some runtimes
<catphish> tintin: the bytecode is only produced at runtime
<catphish> so it doesn't need to be portable
<workmad3> catphish: ah, cool, you can generate JVM bytecode with jruby? :)
<workmad3> catphish: didn't realise that
<Sigma00> KevinSjoberg: try some_folder/*, maybe?
<catphish> workmad3: yes you can :)
<catphish> but not with MRI
<KevinSjoberg> Sigma00: Tried it, that didn't do it.
<tintin> I'm confused, isn't bytecode portable?
<Sigma00> depends on the bytecode
<workmad3> catphish: yeah, but with 1.9 that's only because the option doesn't exist to generate it into a file, I believe :)
<catphish> workmad3: i suspect the bytecode wouldn't be portable between builds etc
<workmad3> catphish: with 1.8 MRI, there's no way at all because it's completely interpreted (no bytecode at all exists)
<catphish> so its not encouraged to try to save it
<workmad3> catphish: yeah, I suspect that too
ckrailo has joined #ruby
<tintin> Does the machine understand bytecode?
<catphish> i think things like the ruby encoder do part of the compilation
<catphish> tintin: what are you talking about?
ben_alman has quit [Excess Flood]
<tintin> Or does the machine converts the bytecode to assembly to understand it/
<bnagy> tintin is either 'special needs' or a troll
<workmad3> tintin: no, bytecode is run on a virtual machine that translates the bytecode into machine instructions
<bnagy> was doing this on ruby-lang for hours
senny has quit [Remote host closed the connection]
<JonnieCache> wait until he tries to understand pass-by-value versus pass-by-reference
<workmad3> tintin: as long as you have a virtual machine that can understand the bytecode on the platform you want, you can run it
<tintin> bnagy: You forgot to mention that none was responding on #ruby-lang.
<Hanmac> tintin did you read the link you post? ... ruby-bytecode need to be converted to machine code
<bnagy> they were, until everyone got sick of you
<tintin> workmad3: So it's the vm that converts the bytecode to assembly, right?
<workmad3> tintin: no
<JonnieCache> yep
<bnagy> nothing converts bytecode to assembly
<workmad3> tintin: not assembly... that would be stupid
<bnagy> cpus don't run fricking assembly
<JonnieCache> not to assembly but to binary opcodes which is essentially the same thing no?
<catphish> basically
d3c has quit [Quit: Sleep]
<bnagy> no, it's not
oooPaul has joined #ruby
<JonnieCache> for the sake of understanding i mean
<bnagy> otherwise we wouldn't need assemblers
<Sigma00> assembly still needs an extra step
<tintin> workmad3: Does the vm convert the bytecode to machine language?
<catphish> assembly is just a human representation of cpu instructions
<workmad3> tintin: it translates the bytecode instructions to the machine instructions
<JonnieCache> assembly is simply ascii labels for opcodes. its *barely* any different
<Hanmac> tintin: DID YOU READ YOUR OWN LINK?
<tintin> Hanmac: YES
<catphish> but if you're looking for portable, compiled, ruby, you'll be disapointed
<workmad3> JonnieCache: it's an important difference though
<bnagy> JonnieCache: go write an assembler / disassembler and say that
<Hanmac> tintin: there you can see twice that a VM is needed to turn bytecode into maschine code
<tintin> workmad3: So vm is the key, right?
<bnagy> VMs DO NOT TURN BYTECODE INTO MACHINE CODE
balki has quit [Read error: Connection reset by peer]
<bnagy> wtf
balki has joined #ruby
<bnagy> they RUN bytecode
rvmeier has joined #ruby
rvmeier has quit [Client Quit]
<Hanmac> bnagy i mean that
<JonnieCache> bnagy: obviously theyre not the same. we're going to have to make some conceptual simplifications though or this conversation will never fucking end
<tintin> What the hell? Somone is saying vm converts bytecode into machine code and someone else is saying : NO ?
whitenoise has quit [Ping timeout: 264 seconds]
ckrailo has quit [Ping timeout: 276 seconds]
<workmad3> I didn't say it turns bytecode into machine code
<bnagy> JonnieCache: it should end by people just ignoring tintin
Ontolog has joined #ruby
Ontolog has quit [Remote host closed the connection]
<workmad3> I said it translates from bytecode instructions to native instructions
<bnagy> workmad3 / Hanmac no, tintin did
<JonnieCache> seriously though man, conceptual simplifcation without loss of useful meaning is the *very essence* of teaching
<tintin> workmad3: Define native instructions
Ontolog has joined #ruby
<KevinSjoberg> Is it possible to copy the contents of one directory into another with FileUtils? Having really hard problems with this. FileUtils.cp_r('some_folder', 'another_folder'). What I want is contents from some_folder into another_folder. At the moment I get another_folder/some_folder.
<workmad3> tintin: grab a book on basic computer architecture
jeax has joined #ruby
<tintin> Then why do i need vm to convert the bytecode to something else that machine can understand, what's wrong with compiling source code to machine language then?
<JonnieCache> yeah, youd do much better reading a book than by asking a load of irc pedants
<workmad3> KevinSjoberg: did you try FileUtils.cp_r('some_folder/*', 'another_folder')
<JonnieCache> tintin: thats a design decision to do with performance, and other factors.
<graspee> tintin: some language are more suited to interpretation than compilation
ipoval has quit [Quit: ipoval]
<KevinSjoberg> workmad3, bnagy: I've read the documentation and I've tried that workmad3. What I've figured out is that I need to glob all files from src directory in order to actually copy them as I want. Correct?
<Sigma00> tintin: portability. for example java compiles to bytecode, which runs on the java vm anywhere that there is a java vm available
Eldariof-ru has quit [Ping timeout: 264 seconds]
<Sigma00> tintin: the other option would be compiling once for every architecture you want to target
<shadoi> whoa.. it's a bytecode shitstorm…
<bnagy> KevinSjoberg: did you read the bit that says "To do what KevinSjoberg asked, use this code" ?
databyte has quit [Remote host closed the connection]
kevinbond has quit [Quit: kevinbond]
<JonnieCache> now youve just confused him again though because java's use of bytecode is different to how ruby uses it
ckrailo has joined #ruby
<tintin> java generates bytecode(.class) that can be run on any machine, but i don't see such bytecode from ruby that can be run on any machine, where does this ruby bytecode locate?
<workmad3> bnagy: hehe :)
<JonnieCache> it never leaves the inside of the ruby interpreter
alanp has joined #ruby
<tintin> Does ruby generate something like .rclass that can be run
<Hanmac> KevinSjoberg: FileUtils.cp_r('some_folder/.', 'another_folder')
<JonnieCache> tintin: it generates the bytecode, runs it then immediately discards it
<workmad3> tintin: no
andrei__ has joined #ruby
<Sigma00> tintin: no, it's all internal, you are not allowed to touch the ruby bytecode, ever
<JonnieCache> no theres no rclass. you never see or touch the ruby bytecode
<tintin> That's a problem with ruby then
<KevinSjoberg> bnagy, workmad3: Oh, god. How could I've missed that. Thanks for the heads up!
<Mon_Ouie> Not really "immediately"
<Sigma00> tintin: no, no it's not. Ruby is interpreted
gmci has joined #ruby
<Mon_Ouie> Not before the VM is shut down
<graspee> it's not a problem, it's a cultural difference
ben_alman has joined #ruby
<Sigma00> it is never compiled
<bnagy> KevinSjoberg: happens to the best of us
CheeToS has joined #ruby
<digitalcakestudi> how would I check a var to see if its a boolean vs a hash?
<Mon_Ouie> Sigma00: It is compiled — to bytecode, just like Java
<shadoi> though… rubinius and mruby both allow compilation and access to the bytecode…
<tintin> You can run that .class generated by java without seeing/running the .java file, but everytime you need to run a ruby file like that , ruby file.rb, that's a problem
<shevy> ok
<KevinSjoberg> bnagy: Indeed it does.
<shevy> use java
<shevy> bye tintin
<Mon_Ouie> *Why* is it a problem?
<workmad3> tintin: ruby doesn't set a bytecode standard and doesn't define how a ruby VM should behave (which are key parts of java)
<Sigma00> tintin: again, that's not a problem. use another language
larissa has quit [Quit: Saindo]
mpun7 has joined #ruby
<JonnieCache> tintin: ruby and java use bytecode for very different reasons
<workmad3> tintin: as such, ruby bytecode a) isn't a requirement of a ruby runtime (so you can have runtimes that don't bother with it, e.g. 1.8 MRI) and b) wouldn't be guaranteed compatible with different runtimes
d3c has joined #ruby
<Sigma00> Mon_Ouie: fair point, I was trying to easily distinguish it for him
<JonnieCache> if it helps, dont think of ruby bytecode as bytecode at all, invent a different name in your head
<shevy> invent the name java bytecode in your head
<tintin> "Use java or another language" , that's not a solution, rather design/customize ruby in such a way so that after running ruby file.rb, you will get a .rclas file that can be run on any machine, you don't need that .rb file again
<Sigma00> 'ruby internal-funny-code'
<graspee> oh right we'll all go and change ruby for you right now then
<xclite> interpreted languages just don't work that way
<bnagy> tintin: yeah, we call that 'ruby code'
<shevy> strange, I dont even get that with python...
<Mon_Ouie> You already have a rb file that can be run on any machine
<Sigma00> tintin: no. Ruby is INTERPRETED. You need the source to run. End
KindOne has quit [Excess Flood]
<xclite> tintin - can you run java bytecode without the JVM?
<Sigma00> xclite: wrong example
<xclite> nope
<workmad3> Sigma00: it's actually a perfect example
<Sigma00> <_<
<xclite> because the point is java doesn't run universally either
<graspee> you do need the source code again in case you want to modify it
<shevy> I dont even have java installed
<graspee> you don't play minecraft?!
<xclite> it's no better at running everywhere than ruby except that it has a higher install-base
<shevy> hmm nope
<graspee> wow
<shevy> graspee, these days I mostly play only browser games actually :(
<graspee> i thought everyone played minecraft
lkba has joined #ruby
<wmoxam_> tintin: what do you need this feature for?
<tintin> java is also interpreted, but you don't need the .java file for the second time to run the executable(.class) , but of course you need the runtime/jvm/jre/jdk
<shevy> all those flash interfaces, they killed the old plain browsergames
<xclite> so how is that better?
<wmoxam_> shevy: minecraft can be played in a browser
<Hanmac> if i want pixels big as blocks i play a game from the 80'
<xclite> you still need a file
<graspee> i thought it's coarse quantized world and excitable pigs were to everyone's taste
<tintin> wmoxam_: To hide the .rb or ruby file
<graspee> its*
<xclite> and the runtime installed
<lectrick> bnagy: JonnieCache: I LOVE doing the impossible. https://gist.github.com/2960586 Observe, my handiwork.
<wmoxam_> tintin: ruby2exe
<wmoxam_> :p
<shevy> ok so tintin's philosophy is java is interpreted.
<shevy> tintin, is C also interpreted?
<shevy> tintin, how about assembly
<graspee> it can be
<Mon_Ouie> You're not thinking that it is safer if people can't read your code?
<graspee> c is a language, not an implementation
<JonnieCache> lol SOMEONE IS WRONG ON THE INTERNET AND SHEVY IS HERE TO PUT IT WRITE
<workmad3> tintin: ever heard of decompilers? :)
<xclite> uh
<JonnieCache> oops RIGHT
<xclite> right?
<xclite> =p
<shadoi> lectrick: lol @ your class names.
<digitalcakestudi> is there not a simple condition to check if a var is a boolean true or a hash?
<shevy> JonnieCache man this tintin guy is just here for one reason and we know it
flype has joined #ruby
<lectrick> shadoi: :)
wmoxam has quit [Disconnected by services]
jonatha__ has joined #ruby
<Mon_Ouie> digitalcakestudi: Object#is_a? Hash
<digitalcakestudi> thanks
<lectrick> shadoi: It does in fact pass all those tests.
jonathanwallace has quit [Read error: Connection reset by peer]
<shevy> JonnieCache one thing is sure, he is not even using ruby
<bnagy> lectrick: I didn't say it was impossible I said a) regexp wasn't made for that, which is true, and b) it's retarded which is also true
<JonnieCache> if you really think he's trolling then why on earth are you talking to him?
<lectrick> LOL
<shevy> JonnieCache because I talk to everyone. I dont even use /ignore ever
Niamkik has joined #ruby
MasterIdler_ has joined #ruby
wmoxam_ has quit [Quit: leaving]
<lectrick> But... but... it works, and it is my brain-baby
<graspee> JonnieCache: because his astute questions are forcing us to look inside our ery souls
<graspee> very
Niamkik has quit [Client Quit]
eywu has joined #ruby
<Sigma00> digitalcakestudi: you could check if var.respond_to?(:values)
<Mon_Ouie> lectrick: Are you using regexps just for the fun of learning how to use that feature? Because that's really not a good use case for them
wmoxam has joined #ruby
<shevy> I like graspee
<graspee> that's your mistake
<Mon_Ouie> Technically those aren't even "regular" expressions
<digitalcakestudi> I like that Sigma00
<JonnieCache> well just remember this: 80 years is only 960 months
<bnagy> Mon_Ouie: we told him that, that's why he did it
<shevy> no, you are my idol... I need to make it on bash org too
<andrei__> somebody can help me with hpricot. I am trying to parse a very simple html in a hpricot object. And when I inspect the object is looks like this: #<Hpricot::Doc "\xFF\xFE<\x00h\x00t\x00m\x00l\x00>\x00\r\x00\n\x00<\x00h\x00e\x00a\x00d\x00>\x00\r\x00\n\x00T\x00e\x00x\x00t\x00 \x00h\x00e\x00r\x00e\x00\r\x00\n\x00<\x00/\x00h\x00e\x00a\x00d\x00>\x00\r\x00\n\x00<\x00h\x00t\x00m\x00l\x00>\x00">
<graspee> plenty of people are on bash.org. some of them wish they weren't ;)
<shevy> ack
<andrei__> Somebody can help?
<lectrick> Mon_Ouie: Partly, yes. But people do not realize how powerful they are.
<shevy> the attack of the \x
<wmoxam> guyz, how do I make my ruby codez to asm>??? I gots to hide teh codez!
<graspee> see shevy, it's like minecraft in your irc client
<lectrick> Mon_Ouie: Because it uses named groups to perform recursion?
<shevy> wmoxam mRuby will do that!
<Mon_Ouie> Oh, sorry, hard to follow more than two conversations at the same time
<shevy> indeed graspee
<wmoxam> mmmmmRuby
<graspee> now just rearrange those \blocks into a house
<shevy> andrei__, perhaps it is a bug in hpricot
<Mon_Ouie> lectrick: Yes. And it's also a lot harder to read and write than just writing a state machine manually.
<Sigma00> that's a lot of null
<lectrick> Mon_Ouie: I didn't think that was hard to read nor write
<JonnieCache> Mon_Ouie: thats what we told him
kpshek has joined #ruby
<shevy> andrei__, you can do two things. first, upload the ruby code you use to pastie.org - second, provide the smallest .html example that can reproduce this problem you have
ckrailo has quit [Ping timeout: 276 seconds]
<Sigma00> do them both <_<
<shevy> yeah
bluOxigen has quit [Ping timeout: 265 seconds]
cousine has quit [Remote host closed the connection]
<andrei__> <shevy> ok, I'll do that
<shevy> \o/
<graspee> i like ideone myself
<graspee> it runs ma ruby!
<shevy> Sigma00, you use weird smileys
<shevy> are those pockemon smileys?
<Sigma00> shevy: It's a shify eyed smiley :P
<Sigma00> shifty*
<lectrick> Mon_Ouie: I have no clue how to write a state machine. What I do vaguely understand is that I can parse pretty much anything that is "regular" using a BNF-style grammar definition that takes advantage of zero-matched named groups
ckrailo has joined #ruby
<Mon_Ouie> andrei__: Isn't there maybe an encoding problem?
<JonnieCache> lectrick: if you can do all that you can write a state machine
<graspee> i seem to remember norvig and russel being good on state machines but i could be remembering wrong
<JonnieCache> theyre very simple. its the theoretical implications of them that are hard
<Mon_Ouie> It's just a fancy name, really
jeff_sebring has quit [Quit: Leaving]
<tintin> wmoxam: Can you get the original .java code from .class file?
<lectrick> JonnieCache: Ah. :)
<Mon_Ouie> If you write it just however you want, you'll most likely have written a state machine without noticing it
arturaz has quit [Ping timeout: 248 seconds]
<graspee> you can't, and i imagine you know that tintin
Niamkik has joined #ruby
<tintin> wmoxam: Using decompilation/deassembling
<JonnieCache> exactly. youve probably written them before without knowing it
<lectrick> Mon_Ouie: Yes, that's what I assumed :)
<graspee> but you can get *some java*
<lectrick> I've used the AASM gem....
jeff_sebring has joined #ruby
<wmoxam> tintin: Can you distribute Perl and Python bytecode (rather than source code?)?
KindOne has joined #ruby
<andrei__> <Mon_Ouie> dunno, I am noob to ruby
<xclite> I'm still waiting for the grand proof that this somehow makes Ruby suck because you can see the source
<JonnieCache> a state machine can be as simple as a loop, with a variable called "state" which you change inside the loop, with some logic that depends on its contents
bgupta has quit [Quit: bgupta]
<shevy> tintin: will you father my children?
robotmay has quit [Remote host closed the connection]
<xclite> shevy: I'll mother your children
<andrei__> <Mon_Ouie>, <shevy> here is the code http://pastie.org/4121145
<xclite> note: I'm a man
<wmoxam> tintin: or javascript bytecode?
aantix has joined #ruby
<Sigma00> tintin: you can get java code from .class, yes
<shevy> whoa xclite
theRoUS has quit [Quit: Leaving]
<shevy> xclite, I am going to stay away from you. you scare me :P
<tintin> Sigma00: How?
theRoUS has joined #ruby
<xclite> I figured I had to up the ante
<xclite> tintin: you can decompile java bytecode
<Sigma00> tintin: how do you think minecraft got modded?
<wmoxam> tintin: again, why not just use ruby2exe?
<bnagy> it's actually really easy
aantix has quit [Read error: Connection reset by peer]
carloslopes has joined #ruby
<bnagy> compared to decompiling C
<graspee> being able to see the source is a good thing
c3l has left #ruby [#ruby]
<xclite> tintin: it doesn't have the same whitespace/brace style nor does it have the comments, but you CAN see how things work
<graspee> source is happy and smiley and friendly
aantix has joined #ruby
jamescarr has joined #ruby
<tintin> wmoxam: Ok, i will use next time
<jamescarr> anyone here using capistrano from jenkins?
<catphish> tintin: are you looking for a ruby compiler purely for obfuscation purposes?
<shevy> andrei__ what hpricot version btw? seems I cant use 0.6.x anymore
kenichi has joined #ruby
<tintin> aptitude search mruby doesn't display anything, it's not even in system package manager list
<tintin> mruby
<shevy> you damn noob
<tintin> Do you get mruby on ubuntu?
<JonnieCache> lol this is great
<shevy> linux used to be cool when people used the source
<graspee> you can get anything on ubuntu
<JonnieCache> im leaning more and more towards troll tbh, the mix of knowledge and ignorance doesnt seem right
<tintin> I know you can install from source, https://github.com/mruby/mruby/
<andrei__> <shevy> hpricot 0.8.6 with ruby 1.9.3
<Sigma00> ...
<shevy> ok andrei__
<Sigma00> tintin: go READ about it
<shevy> hmm 0.8.4 seems to work for me, lets see
linoj has quit [Ping timeout: 246 seconds]
<graspee> on a linux from source note, i recently decided i would install gentoo. then i read the installation procedure
<graspee> <- back to pangolin
<tintin> Why the hell matz left ruby and works with mruby ?
linoj has joined #ruby
<ramblex> andrei__: 0.8.6 and ruby 1.9.3 works for me
<Mon_Ouie> Why the hell can't he work on whatever he wants?
<Hanmac> tintin: you could write a C program that runs your obfuscated code into an ruby interpreter
<Hanmac> tintin: maybe mRuby is totaly different to MRI? maybe both can survive?
<JonnieCache> hahaha ok definite troll now
<lectrick> Mon_Ouie: tintin: Matz can do my future wife if he wants
<catphish> tintin: please learn to ask questions in a less trolleque manner
<wmoxam> That's it, cut his mic
apeiros_ has joined #ruby
<graspee> JonnieCache: you nailed it with the knowledge/ignorance observation
<shevy> tintin he still does the design decisions for MRI
mjb2k has joined #ruby
<andrei__> <ramblex> and do you have any idea why my code doesn't work?
<shevy> and mruby is still ruby so technically he has not even "left" ruby
<graspee> it's like sid meier and civilization all over again!!!
krusty_ar has quit [Read error: Connection reset by peer]
<tintin> Would this ruby be dead and would the core devs go away from ruby when mruby would be in good shape?
<shevy> tintin can't you troll #java instead man
<shevy> tintin the world is coming to an end, everything will stop. but you can still learn ruby if you want man
<Sigma00> no no no, send him to ##c to talk about how it's an interpreted language
<shevy> perhaps in 10 years
<wmoxam> tintin: yes. All of Ruby will be dead tomorrow actually
<shevy> mruby is not ready for much
freezey has joined #ruby
jeax has quit [Changing host]
jeax has joined #ruby
jeax is now known as whitenoise
<tintin> wmoxam: loool
<graspee> i don't see the appeal of mruby myself
<wmoxam> tintin: so you might as well give up now
<shevy> graspee it is small! fast!
akem has quit [Ping timeout: 264 seconds]
<shevy> like lua!
darthdeus has quit [Quit: Linkinus - http://linkinus.com]
krusty_ar has joined #ruby
<graspee> so use lua!
<tintin> I won't give up, i will hang around with ruby
<shevy> naaaah
<wmoxam> tintin: We're all switching to Lua
williamcotton has joined #ruby
<shevy> ruby is elegant
<Sigma00> graspee: it's to integrate a scripting language into your program so your end users can use it, that's it
<graspee> it's like pepsi deciding to make trousres
<shevy> lua is a table language
<Hanmac> tintin: mruby is a) not finish, b) is just an other interpreter like jruby, rubinus and MRI ... Ruby itself does not die
<JonnieCache> lua is more designed for embedding into hardware
<shevy> mruby will destroy lua
<wmoxam> Ruby died because it could not scale
<graspee> i hear good things about javascript even recently, with its new shiny functional library
<JonnieCache> the firmware for things like mixing desks gets written in lua
<shevy> javascript is the dictator among languages
<JonnieCache> the lua VM is designed specifically for embedded hardware
<tintin> Hanmac: How can you be sure about it, do you know that ruby core devs won't leave ruby today or tomorrow?
Drewch has quit [Ping timeout: 246 seconds]
<shevy> let me use mruby in browsers!
ij has joined #ruby
<wmoxam> tintin: they already left
<shevy> tomorrow
<catphish> wmoxam: lols
<shevy> tintin what if guido has a car crash tomorrow
<shevy> tintin WHAT THEN MAN
<shevy> tintin WHAT THEN MAN!!! I ASK YOU!!!!!!!
<graspee> even if ruby the language doesn't get updated ever again, ruby won't end as long as people maintain the libraries
<Sigma00> DIDN'T YOU HEAR!? GUIDO IS IN THE HOSPITAL
<lectrick> graspee: lol at sid meier reference
<tintin> Sigma00: Lol
<JonnieCache> what if i run up in rubyconf with a bomb strapped to me?
miho has quit [Ping timeout: 244 seconds]
<wmoxam> Sigma00: the same hospital as Matz?
<workmad3> tintin: if the core developers leave, other people in the community will take up maintenance
<shevy> JonnieCache dont do that
<Sigma00> wmoxam: yuuup
<tintin> wmoxam: So how ruby figures out the problem of scalability ?
<shevy> JonnieCache your punishment in hell will be to write perl and lisp code until eternity
carlyle has quit [Ping timeout: 246 seconds]
<lectrick> JonnieCache: Microsoft would hire you
Drewch has joined #ruby
<graspee> thank you, lectrick, i was recently playing old civs and checking out the credits and thinking "hmm what was sid doing at this point except lending his name and counting his money?"
<shevy> AT THE SAME TIME
<Sigma00> JonnieCache: half the world will hate you, the other half will applaud you
<Hanmac> tintin i dont care, the ruby code itself does work on all kind of ruby interpreters
<ij> How do I reload a file? (re-require after it's been requireed?)
<wmoxam> Sigma00: wow, Linus, Matz in Guido in the same hospital
<shevy> so->(you(can(never%!#(know(when(to(stop
dross has joined #ruby
<tintin> workmad3: It's not easy to understand such large amount of source code for new comer
<wmoxam> *and
<Sigma00> wmoxam: nice typo, I cracked up
<shevy> ij I think only via load()
<workmad3> tintin: yeah... but people in the ruby community aren't newcomers
<lectrick> ij: you don't
<ij> why
<wmoxam> tintin: it doesn't. That's why it's dying
<ij> You don't!
<lectrick> why would you want to re-require a file that is a class definition?
<workmad3> tintin: there are plenty of people here who know the ruby codebase (probably even several ruby contributors)
<catphish> someone please deal with the incessant trolling
<ij> lectrick: Load a new version -- monkey patch, in console.
<shevy> tintin, yugui_zzz here is a core dev
<tintin> workmad3: dude, using ruby and maintaining/developing ruby are not same.
<lectrick> graspee: exactly lol. /old gamer here too
<workmad3> tintin: yes I know
jamescarr has quit [Ping timeout: 252 seconds]
<shevy> catphish someone kill tintin. problem solved
<graspee> in fact if ruby the language stopped being updated, libraries would stay working for longer!
<workmad3> tintin: that doesn't mean they're mutually exclusive :P
<shevy> lol graspee
<lectrick> ij: oh. "load" then I guess
<lectrick> if something happened to matz i would be sad :(
<workmad3> tintin: it *is* possible to both contribute to the ruby source in C *and* write code in ruby
<xclite> I love the argument
<xclite> "what if the core devs left"
<graspee> so long as i have a copy of ruby and the opengl and gosu gems, magic can still happen
<workmad3> lectrick: ok, I'll call off the hitmen then :P
<JonnieCache> right thats it. im going outside in the sun. have fun boys and girls
<xclite> ...isn't that a complaint for... anything?
<graspee> have fun in the sun, JonnieCache
* Sigma00 points at java, and C, and C++, and..
<lectrick> graspee: whoa, did not know about gosu
<graspee> know what?
<graspee> oh
<Sigma00> that it existed, probably
<graspee> it's a great library
pygospa has quit [Read error: Operation timed out]
gibsonfs has quit [Ping timeout: 276 seconds]
<wmoxam> xclite: what if they all got cancer on the same day? WHAT THEN???
pygospa has joined #ruby
<graspee> i'd stop using ruby because it's obviously carcinogenic
<ij> Ruby top-level-namespace is Kernel, right?
<xclite> then... we'd have a pretty good scripting language maintained by its community?
<Hanmac> tintin my ruby gems are native that means they are c++ code, compiled into something the ruby iterpreter can use
<wmoxam> graspee: exactly. And that's why other languages wouldn't be affected
<workmad3> ij: define 'top level namespace'
<mjb2k> I really like that idea of mruby, first I've seen it. It give to C apps what JRuby gives java apps. (If skimmed that page right)
* Hanmac could rwite a c app wich used the MRI interpreter
<tintin> Hanmac: Really? What's the name of that gem?
gilead has quit [Quit: Leaving]
heftig has quit [Ping timeout: 245 seconds]
<tintin> Hanmac: That's great
<ij> workmad3: where everything gets put into on defining in the first rb_require/funcall is called.
<Hanmac> tintin: this is one of them https://github.com/Hanmac/rwx but they are not finsh
<Hanmac> its possible to use c++ code into ruby, and its possible to use ruby code into c++
radic has quit [Read error: Operation timed out]
<tintin> Hanmac: Yes, it looks you did great job.
<ij> Hanmac: Ha, I did. :]
savage- has joined #ruby
miho has joined #ruby
bradhe has quit [Remote host closed the connection]
<Hanmac> Ij you can look at my rwx code and say what you think
<ij> Oh, I thought you were just going to. :]
radic has joined #ruby
tintin has quit [Quit: tintin]
akem has joined #ruby
BeLucid has quit [Ping timeout: 252 seconds]
sepp2k has joined #ruby
<ij> Pretty interesting to look at simple c++ code, being c coder.
<Hanmac> shevy we are free again xD
qwerxy has quit [Ping timeout: 272 seconds]
gibsonfs has joined #ruby
<shevy> wah
<shevy> oh
cousine has joined #ruby
<shevy> good!
schaerli has joined #ruby
<shevy> now we can brainstorm more ideas for rubyOS
<ij> In terms of what?
fayimora has joined #ruby
<Spaceghostc2c> shevy: I thought it already was an OS.
<shevy> Hanmac, are you on rubygems.org ?
andrei__ has quit [Quit: Page closed]
<Spaceghostc2c> GNU/Linux is a bootloader.
<shevy> Spaceghostc2c, naaaaah a million things would be missing
<shevy> it's all C really
<shevy> perhaps we could have two rubies
<Spaceghostc2c> Only two?
<shevy> one that replaces C, and one for everything else
<graspee> we should force them to call linux "ruby/linux" now because ruby is so essential
<Spaceghostc2c> So, cruby and rbx?
<shevy> is that rubinius?
<Spaceghostc2c> yeah
<ij> Doesn't ruby require too much OS behind it? I mean how would you make a ruby OS?
<Spaceghostc2c> I don't use it, but it's nifty sounding.
<shevy> I kinda stopped looking after I read that evan left :(
carlyle has joined #ruby
mneorr1 has joined #ruby
<Spaceghostc2c> Wow, he left?
TPFC-SYSTEM has joined #ruby
timonv has quit [Remote host closed the connection]
<shevy> well "officially" he is still at it... just works at another company now
jlogsdon has joined #ruby
ianbrandt has joined #ruby
<shevy> "I?m excited to announce that as of today (March 28th), I?ve accepted a new position at LivingSocial! I?m an Engineering Director, managing a few teams that work on backend architecture such as email, scaling, etc."
Drewch has quit [Ping timeout: 246 seconds]
fra000 has quit [Quit: Leaving]
<shevy> but in my experience, like when _why left... those guys who took over shoes and so forth, just can not replace _why
<shevy> I admit it, I need celebrity hackers!
<graspee> become your own celebrity!
red-panda has quit [Remote host closed the connection]
<graspee> release the power within!
<shevy> ij ok well let's assume that ruby would be as fast as C, for the sake of discussion
<shevy> what we would need to have then is to replace all of the good features of UNIX, in ruby
mneorr has quit [Ping timeout: 246 seconds]
<shevy> and a kernel!
user__ has joined #ruby
Drewch has joined #ruby
kpshek has quit [Ping timeout: 265 seconds]
<shevy> so even if it would be as fast... it would be an insane amount of work
<ij> Myeah.
<ij> Has anyone done that?
<shevy> not really, people tend to say "we already have that" and stop
zeromodulus has joined #ruby
<shevy> and the speed reason is a valid one too, in addition to that :\
akem has quit [Ping timeout: 246 seconds]
<Hanmac> shevy i am but my gems are mostly not
<shevy> lol Hanmac
<shevy> ^^^ best answer ever
<shevy> where are your gems though?
<graspee> lol i just read a page on ruby 2 which says a likely feature is being able to save ruby as bytecode
stephenjudkins has joined #ruby
<shevy> yeah they used to be ambitious
<shevy> but now that phase has kinda passed ... :(
<graspee> has it?
<Hanmac> shevy libarchive-ruby ... but its a bit broken currently ... :/
<graspee> someone should edit this page and not confuse me then!
<shevy> I think so. they dont want to make sweeping breaks in ruby 2
cousine has quit [Remote host closed the connection]
thecreators has joined #ruby
<theRoUS> Hanmac: if i use the const_set(:Foo, Class.new) magic to metaprogram a class, how can i specify inheritance? or, given an existing class, can something be inserted in its ancestry?
catphish has left #ruby ["Leaving"]
<shevy> perhaps const_set makes use of a block {} or Class.new does {}
pdtpatrick has joined #ruby
<Hanmac> Class.new does
francisfish has quit [Remote host closed the connection]
manizzle has quit [Read error: No route to host]
zeromodulus has quit [Ping timeout: 245 seconds]
<theRoUS> Hanmac: so what would i put in the block to make the new class a subclass of, say, 'Bar' ?
Guest13353 has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<ij> what is `class`?
<Sigma00> it's an object!
<shevy> Hanmac lol who can read that
<ij> Sigma00:
<ij> (irb):27: syntax error, unexpected '.'
<ij> class.object_id
<ij> Not really an object.
<Sigma00> Class is
<Ontolog> in 1.9.3 is there a more idiomatic way to say :a,:b,:c].all? { |k| h.include? k }
<ij> I'm asking what `class' is.
<Sigma00> ij: fine, it's a reserved word
<shevy> keyword
KevinSjoberg has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Ontolog> typo, i meant to say [:a,:b,:c].all? { |k| h.include? k }
<shevy> Ontolog, seems quite terse already
<shevy> you ask whether your hash includes all of an array right?
<Hanmac> shevy you could try this: http://www.ruby-mine.de/2012/5/21/efi-shell-mit-ruby
<Ontolog> shevy: i thought there might be a single method to do it
<shevy> dunno. dont think on class Hash
<Ontolog> shevy: whether the hash includes all those keys
<Ontolog> k
cantonic_ has joined #ruby
bgupta has joined #ruby
MrGando has joined #ruby
MrGando has quit [Remote host closed the connection]
<Hanmac> Ontolog i dont think there is a better way. your code is the best i think
<Ontolog> Hanmac: thanks
cantonic has quit [Ping timeout: 264 seconds]
cantonic_ is now known as cantonic
bradhe has joined #ruby
<Hanmac> this [:a,:b,:c].all?(&h.method(:include?)) could be faster but not better to read
<shevy> hehe
<shevy> this [:a,:b,:c].all? &h.method(:include?)
<shevy> got rid of one char for you!!!
<matti> Ugly ;/
<shevy> yeah
<shevy> the & is the alien operator
<shevy> it marks an object as alien
<shevy> &matti
<Hanmac> matti: but its may a little faster
<shevy> this is matti from out of space
CheeToS has quit [Ping timeout: 252 seconds]
<matti> Hanmac: I am talking about shevy removing parens.
<matti> Hanmac: :)
bgupta has quit [Ping timeout: 244 seconds]
umttumt has quit [Remote host closed the connection]
tatsuya_o has quit [Remote host closed the connection]
<shevy> oh
<shevy> it is a form of sterilization
<shevy> I call it "de-lisping"
<matti> No, no.
<Hanmac> shevy look for HPC ruby :P
Criztian has joined #ruby
<Sigma00> Ontolog: why not (m - h.keys).size == 0 does what you want...
<Sigma00> heh, I rewrote the last part of the sentence but forgot about the first <_<
<matti> ?
Spooner has joined #ruby
<Sigma00> what you want is to check whether all the keys in m are in the hash h, right?
<matti> Me?
<matti> I want world peace.
<matti> ;]
<Sigma00> <_<
<Hanmac> Sigma00 becaue your code is slower then all?
* Sigma00 shrugs
<Sigma00> I'm offering ideas, I have no idea whether its slower or not
burgestrand has joined #ruby
Markvilla has joined #ruby
<matti> Sigma00, Hanmac -- benchmark!#
<matti> Sigma00, Hanmac ** FIGHT! **
* matti puts Mortal Combat music
<Sigma00> nah, he'll kick my ass, I have under a month of Ruby programming in my belt, and that's with lots of breaks :P
<Sigma00> s/in/under/
<Sigma00> pesky job, getting in the way...
tewecske has joined #ruby
<matti> Sigma00: More than I have :)
<matti> Sigma00: I am on a secret mission from the Python programmers community to learn all there is about the enemy.
<matti> :)
bgupta has joined #ruby
<shadoi> can't we all just get along? :P
<shevy> oh man
chrismcg is now known as zz_chrismcg
apok has joined #ruby
<shevy> if I have a file called foo.rb which has ONE method called foo (def foo)
<shevy> is there any way I can group it into a specific module?
<graspee> the pngs i made with gimp won't load with the png gem or with gosu
<shevy> without having to write the module into the file
<matti> shadoi: Sure :p That is why I want world peace ;p
<workmad3> shevy: what's wrong with putting the module in the file?
<shadoi> workmad3: he's lazy
<shevy> workmad3 I want to reshuffle content without having to live them in one specific module
<shevy> *see them live in one
<shevy> (or no module)
yekta has joined #ruby
<shevy> specifically, I am about to write a few hundred tiny .rb files
<Sigma00> heh, /mark
<Sigma00> fuck
<shevy> typing "module Foo" in every .rb file is annoying me to no ends :(
d3c has quit [Read error: No route to host]
mrdtt has quit [Remote host closed the connection]
<Sigma00> shevy: put them all in a folder, and make your Module.rb file have a loop that includes everything in that folder?
yekta has quit [Client Quit]
<shevy> hmm
<shevy> how would that work?
<shevy> I can load them of course or require them, but what then?
<workmad3> Sigma00: unless you're going to eval each file in the folder, I don't think that would work
<shadoi> shevy: when/why would you "reshuffle" module method contents?
ph^ has quit [Remote host closed the connection]
<shevy> shadoi when I want to put them into other namespaces for instance
<Ontolog> wrt rspec, i want to use a before :each block but only have it apply to one example group (or "describe")
<shevy> like when they have no module
MasterIdler_ is now known as MasterIdler
<shadoi> uhh…
ph^ has joined #ruby
<graspee> just write all the files, then write a ruby one liner that goes through all the ruby files in the directory and adds that module import into them
<shadoi> shevy: can you give an example? it sounds fishy.
<Sigma00> workmad3: too bad :(
<workmad3> Ontolog: stick the before into that describe block then
<shadoi> shevy: You probably just want some code that can define methods on any namespace you need, when you need it.
<Ontolog> workmad3: ah i see, that's how it works by default, awesome thanks
Vert has quit [Ping timeout: 252 seconds]
Vainoharhainen has quit [Quit: Leaving...]
kizzx2 has left #ruby [#ruby]
kpshek has joined #ruby
linoj_ has joined #ruby
zeromodulus has joined #ruby
timonv has joined #ruby
ph^ has quit [Ping timeout: 245 seconds]
quest88 has quit [Quit: quest88]
apok has quit [Remote host closed the connection]
apok has joined #ruby
BeLucid has joined #ruby
linoj_ has quit [Remote host closed the connection]
xaq has quit [Remote host closed the connection]
linoj_ has joined #ruby
linoj has quit [Ping timeout: 244 seconds]
RainbowDashh has quit [Quit: SLEEP MODE. <@suborbital> no i filtered out RainbowDashh join quit msgs - appearantly it filtered out everything]
linoj_ has quit [Read error: Connection reset by peer]
linoj has joined #ruby
brianpWins has joined #ruby
shadoi has quit [Quit: Leaving.]
tvw has quit [Remote host closed the connection]
<Spooner> graspee: ask in #gosu about the png problem? I've never had problems using GIMP + gosu
<graspee> thanks
RainbowDashh has joined #ruby
<graspee> i think i might have solved it by resaving the images with a different program though
<graspee> gimp puts more header in there which gosu and png gem were choking on
<Spooner> graspee : One problem with gosu is that it gives an unclear error if it is unable to find the image file (the message makes it look like it fails to load the file).
<graspee> i know that but that's not the problem
<graspee> but thanks
tdubz_ is now known as thomas
<Spooner> graspee - I see. Might be worth attaching a broken-headered image to the libgosu.org forum so that issue can get fixed.
RainbowDashh has quit [Read error: Connection reset by peer]
<Sigma00> ^ bug report!
zinjacoder has quit [Remote host closed the connection]
<graspee> yeah maybe. still testing stuff though
schaerli has quit [Remote host closed the connection]
c0rn_ has joined #ruby
<graspee> i think it's just the png gem failing, not gosu
EvanR has quit [Read error: Connection reset by peer]
EvanR has joined #ruby
EvanR is now known as Guest45208
zommi has quit [Remote host closed the connection]
RainbowDashh has joined #ruby
zinjacoder has joined #ruby
rakunHo has joined #ruby
zinjacoder has quit [Remote host closed the connection]
JohnBat26 has joined #ruby
adamkittelson has joined #ruby
samuel02 has joined #ruby
<graspee> and the gem documentation does say that reading pngs is not that polished yet
freezey has quit [Ping timeout: 260 seconds]
freezey has joined #ruby
Targen has quit [Ping timeout: 265 seconds]
mpun7 has quit [Ping timeout: 246 seconds]
berserkr has joined #ruby
Guest45208 has quit [Read error: Connection reset by peer]
EvanR_ has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
brianpWins has quit [Read error: Connection reset by peer]
s14 has joined #ruby
s14 has quit [Client Quit]
brianpWins has joined #ruby
Niamkik has quit [Ping timeout: 260 seconds]
RainbowDashh has quit [Ping timeout: 265 seconds]
Kartagis has quit [Ping timeout: 265 seconds]
Niamkik has joined #ruby
elhu has quit [Ping timeout: 245 seconds]
Solnse has joined #ruby
mdhopkins has quit [Quit: mdhopkins]
RainbowDashh has joined #ruby
fully_human has joined #ruby
<fully_human> Hm...I'm trying to install bundler, but I get the following error: http://pastebin.com/1A29SgXX
timonv has quit [Remote host closed the connection]
<fully_human> I get the exact same error if I run it without --http-proxy, too.
RainbowDashh has quit [Client Quit]
theRoUS has quit [Remote host closed the connection]
Kartagis has joined #ruby
Occult has quit [Ping timeout: 245 seconds]
<fully_human> Actually, here's a corrected post: http://pastebin.com/bZw0NSDe
itnomad has quit [Quit: Leaving]
heftig has joined #ruby
JoeTheGuest has joined #ruby
samuel02 has quit [Read error: Connection reset by peer]
stephenjudkins has quit [Quit: stephenjudkins]
niku4i has joined #ruby
qwerxy has joined #ruby
RainbowDashh has joined #ruby
jonathanwallace has joined #ruby
digitalcakestudi has quit [Ping timeout: 260 seconds]
<JoeTheGuest> http://kan.gd/1mn1 Looks really nice. Ruby rails app environment.
jonatha__ has quit [Ping timeout: 276 seconds]
bluenemo has quit [Remote host closed the connection]
<graspee> oh no it's spreading
<graspee> kill it with fire
<JoeTheGuest> Lol? The action.io?
<graspee> rails
<JoeTheGuest> Oh.
<JoeTheGuest> Yea.
<JoeTheGuest> Looks nice though.
niku4i has quit [Ping timeout: 246 seconds]
mockra has joined #ruby
_br_ has joined #ruby
tzvi|netbook has joined #ruby
samuel02 has joined #ruby
roolo has quit [Quit: Linkinus - http://linkinus.com]
samuel02 has quit [Read error: Connection reset by peer]
<tzvi|netbook> anyone have suggestion for a newb to learn ruby?
jrist is now known as jrist-gym
<graspee> newb to ruby or newb to programming?
alexmin has joined #ruby
samuel02 has joined #ruby
jeff_sebring has quit [Quit: Leaving]
<Sigma00> tzvi|netbook: ^
shadoi has joined #ruby
<tzvi|netbook> i know a of bash scripting and DOS scripting, is all
Dreamer3 has quit [Quit: Leaving...]
schaerli has joined #ruby
jeff_sebring has joined #ruby
<graspee> pickaxe book
<the_jeebster> tzvi|netbook: http://pine.fm/LearnToProgram/
<graspee> or book with apple tree on the front
samuel02 has quit [Read error: Connection reset by peer]
<the_jeebster> b'vakasha
<graspee> which is above me
<tzvi|netbook> thanks all, or todah :)
Stormbytes has joined #ruby
schaerli has quit [Remote host closed the connection]
<fully_human> Hm...I'm trying to install bundler, but I get the following error: http://pastebin.com/bZw0NSDe
<graspee> if no-one replied the first time it's likely no-one knows
udante has joined #ruby
<Sigma00> meh, I think asking twice with a 5-10 minute delay is ok
<Sigma00> maybe someone wasn't looking :P
<fully_human> Alright, sorry. :\
JeffreyBaird has joined #ruby
sailias has quit [Ping timeout: 240 seconds]
stephenjudkins has joined #ruby
Desmond has joined #ruby
dhruvasagar has quit [Ping timeout: 276 seconds]
Eldariof-ru has joined #ruby
Solnse has quit [Remote host closed the connection]
Solnse has joined #ruby
<Sigma00> fully_human: does 'gem sources' return http://rubygems.org/?
tzvi|work has joined #ruby
jonatha__ has joined #ruby
werdnativ has joined #ruby
ramblex has quit [Ping timeout: 246 seconds]
v0n has quit [Quit: Quitte]
fayimora has quit [Quit: Busy…..zzzzz]
jarred has joined #ruby
berserkr has quit [Quit: Leaving.]
jonathanwallace has quit [Ping timeout: 276 seconds]
<graspee> do other gems install?
jeff_sebring has quit [Read error: Connection reset by peer]
<Hanmac> shevy did you look for "HPC Ruby"? i read it should be 700 times faster then mri1.8 and 255 times faster then mri1.9
berserkr has joined #ruby
<Sigma00> heh, actually, I shouldn't be asking that, it's obviously trying to access rubygems.org
<Sigma00> fully_human: can you ping rubygems.org?
<shevy> Hanmac nope never heard of it
<shevy> sounds like the ideal candidate for RubyOS
jeff_sebring has joined #ruby
dhruvasagar has joined #ruby
<graspee> it's in japanese
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<shevy> man
<wmoxam> shevy: RubyOS is a myth
<shevy> all japanese kanji
<wmoxam> just like JavaOS
<Sigma00> shevy: run it through translate.google
<shevy> wmoxam, indeed. one has to read and write japanese for it
r0bby has joined #ruby
<shevy> translate.google makes things funny
robbyoconnor has quit [Ping timeout: 272 seconds]
<shevy> ok
mockra has quit [Remote host closed the connection]
<shevy> here we go translate
<shevy> "The parallelism of the Church-Rosser confluence by"
<shevy> "Von Neumann bottleneck does not occur"
<shevy> "A bug in the program type that can be discovered by inspection"
joch_n has joined #ruby
<shevy> "All you need to truly optimize good"
<shevy> "Optimize the use of domain-specific knowledge"
_iMBA has quit [Quit: Leaving.]
<shevy> "Language is Turing incomplete optimization strict If there is a possible"
<shevy> hmm
<shevy> now I understand where yoda originated
<shevy> he came from one of those translate google things
<wmoxam> funny, Shevy thinks he is
WeH has joined #ruby
<Sigma00> it's common knowledge that yoda's script was written in japanese and run through google translate :P
WeH has left #ruby [#ruby]
<shevy> if the japanese could just get rid of those awful symbols
_iMBA has joined #ruby
<hackeron> any familiar with GPS trackers?, I'm trying to get information from a GPS tracker to a ruby socket - the format is somewhat weird, whenever I am driving, the GPS tracker reports 2 numbers, for example 24.86 (speed?) and 155.06 -- what do you think could be the second number? - It isn't reported when the vehicle is stationary
ph^ has joined #ruby
<Sigma00> can't help much without knowing which GPS tracker you're using
elux has joined #ruby
<hackeron> this is what a complete line looks like: 2012-06-20T15:35:33Z::imei:012497000372775,tracker,1206202335,,F,153502.000,A,5135.7656,N,00014.1210,E,21.19,347.76,;
<davidcelis> what the fuck
<davidcelis> oh it's just CSV
btanaka has joined #ruby
rouss has joined #ruby
<hackeron> yeh, I figured out that 5135.7656,N,00014.1210,E < these are the coordinates, I'm able to show location with google maps
fayimora has joined #ruby
<hackeron> the last 2 figures are speed and something else - what could that something else be, hmm
ken_barber has quit [Remote host closed the connection]
hunglin has quit [Remote host closed the connection]
<Sigma00> elevation should be there
<hackeron> don't think it is :(
<hackeron> it seems to vary too much, one second it's 58.83 the next it's 347.76
mockra has joined #ruby
Solnse has quit [Remote host closed the connection]
<Sigma00> /mark
<Sigma00> wtf
<hackeron> from what I can gather the format is imeg:number,status,date,,Signal,Time,Valid,Long,Direction,Lat,Direction,Speed,Unknown??
Solnse has joined #ruby
keppy has joined #ruby
<hackeron> maybe it's direction?
ananthakumaran has quit [Quit: Leaving.]
<hackeron> in degrees? - it never seems to be above 359
<Sigma00> could be
<Sigma00> that'd make sense
ananthakumaran has joined #ruby
tzvi|netbook has quit [Ping timeout: 246 seconds]
ananthakumaran has quit [Client Quit]
fully_human has quit [Ping timeout: 264 seconds]
<BlissOfBeing> is it jut me or is apple.com not up?
<burgestrand> BlissOfBeing: just you
saschagehlich has quit [Quit: saschagehlich]
tekacs has joined #ruby
<burgestrand> or, at least not me.
mockra has quit [Remote host closed the connection]
<hackeron> doesn't load here either, hmm
<BlissOfBeing> how strange ping apple.com
<BlissOfBeing> PING apple.com (17.172.224.47): 56 data bytes
<BlissOfBeing> Request timeout for icmp_seq 0
<BlissOfBeing> Request timeout for icmp_seq 1
<hackeron> in the uk or in israel
<Sigma00> BlissOfBeing: just you, isup.me
btanaka has quit [Read error: Connection reset by peer]
iocor has quit [Quit: Computer has gone to sleep.]
Solnse has quit [Remote host closed the connection]
Solnse has joined #ruby
robdodson has joined #ruby
<hackeron> it's back up :)
voodoofish430 has joined #ruby
ghanima has joined #ruby
olrrai has joined #ruby
Xethron has left #ruby [#ruby]
Xethron has joined #ruby
ringotwo has joined #ruby
werdnativ has quit [Quit: werdnativ]
burgestrand has quit [Ping timeout: 245 seconds]
the_jeebster1 has joined #ruby
the_jeebster has quit [Ping timeout: 245 seconds]
btanaka has joined #ruby
hunglin has joined #ruby
r0bby has quit [Ping timeout: 246 seconds]
r0bby has joined #ruby
manizzle has joined #ruby
mrbrdo has joined #ruby
jeff_sebring has quit [Read error: Connection reset by peer]
Poapfel has quit [Ping timeout: 272 seconds]
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
t0mmyvyo is now known as tommyvyo
<mrbrdo> which things would you say are very different to ruby as compared to C (or C++)? if I start with lambdas&blocks, class reopen and method redefinition?
Targen has joined #ruby
<Sigma00> careful, c++11 has lambda expressions now
<mrbrdo> yes I know
<mrbrdo> but I mean the old C++
<mrbrdo> I actually mean more compared to C, but I said C++ just because I don't want you to say "it's OOP"
<Sigma00> what you said would be the biggest differences then, yeah
<shevy> C++ is less about OOP and more about a disease
r0bby_ has joined #ruby
<mrbrdo> Sigma00: I'm looking for more :)
<gogiel> mrbrdo: duck typing
r0bby has quit [Ping timeout: 260 seconds]
<Sigma00> right, lack of object types
<mrbrdo> gogiel: well that's not as much of a problem though
<Sigma00> er, s/object/var/
<mrbrdo> because if you include ruby.h and link to ruby then you can use VALUE
<mrbrdo> (without running the interpreter)
exchgr has joined #ruby
<wmoxam> this smells like a homework assignmnet
<mrbrdo> well you smell wrong then
exchgr is now known as exlinux
mucker has quit [Quit: leaving]
<mrbrdo> also an interesting thing
<mrbrdo> Binding can change existing locals but it can't define new ones
<gogiel> mrbrdo: garbage collecting
<mrbrdo> although I guess this is reasonable
<mrbrdo> gogiel: well this you can still do if you link to ruby and use VALUE :P
<mrbrdo> although I guess you need to mark by yourself
chomp has quit [Quit: Leaving]
minijupe has quit [Quit: minijupe]
<mrbrdo> which then is some work I guess
<shevy> ruby 3.0 will have the brain interface
Solnse has quit [Remote host closed the connection]
<shevy> then work becomes THOUGHTS
<mrbrdo> :)
<gogiel> mrbrdo: well i don't get your question
ianbrandt has quit [Read error: Connection reset by peer]
Solnse has joined #ruby
<mrbrdo> gogiel: perhaps in this sense, if you were translating ruby into C, which would be the biggest problems to overcome
ianbrandt has joined #ruby
<Sigma00> problems? none, really
<shevy> pointers
<mrbrdo> well method redefinition is a problem in C for example
<mrbrdo> you can get around it, but it's something to solve
robbyoconnor has joined #ruby
<mrbrdo> pointers aren't really a problem if you use ruby VALUE type
<Sigma00> you'd have to rewrite anything you've overloaded, certainly
<gogiel> mrbrdo: you can use map of function pointers :P
josefig has joined #ruby
<mrbrdo> gogiel: what do you mean?
<gogiel> nothing. it's just stupid. C is C, Ruby is Ruby
schovi has joined #ruby
<gogiel> you want to port some Ruby code to C, right?
<mrbrdo> Sigma00: actually you can use a pointer to the method and call through that, then you only need to overwrite the pointer when you redefine the method
g0bl1n has joined #ruby
g0bl1n has quit [Changing host]
g0bl1n has joined #ruby
<gogiel> you always can write ruby code that looks like C. i know people who "code" ruby or python with that style - its awful
workmad3 has joined #ruby
yoklov has joined #ruby
enherit has joined #ruby
<mrbrdo> gogiel: I am working (for fun mostly) something like http://ruby2cext.rubyforge.org/
<Mon_Ouie> If you compile ruby code to C, redefining methods isn't really a problem — you just don't translate method definition to function definition
r0bby_ has quit [Ping timeout: 246 seconds]
<mrbrdo> Mon_Ouie: sure you have to
<Hanmac> gogiel: my ruby bindings are written in c++
<Mon_Ouie> No you don't. You can translate it to changing a function pointer somewhere.
<gogiel> mrbrdo: code made by converters like this is garbage
<mrbrdo> Mon_Ouie: well yeah, that's what I said a few lines before
<mrbrdo> gogiel: why would it be garbage?
<gogiel> mrbrdo: it would be unreadable
eywu1 has joined #ruby
<mrbrdo> gogiel: it doesn't matter if it's readable
eywu1 has quit [Client Quit]
robdodson_ has joined #ruby
robdodson_ has quit [Client Quit]
<mrbrdo> actually LLVM is one approach to something like this, but it doesn't seem to work very well because of how different ruby is to compiled languages
<gogiel> mrbrdo: if you want to use ruby.h it's pointless
<mrbrdo> gogiel: why?
remmy444 has quit [Ping timeout: 246 seconds]
r0bby has joined #ruby
<gogiel> mrbrdo: because code like that is dependent on ruby?
<mrbrdo> so?
<mrbrdo> why is that a problem
<gogiel> mrbrdo: it's useless. it would slower than ruby itself
robdodson has quit [Ping timeout: 252 seconds]
mjb2k has quit [Ping timeout: 276 seconds]
<mrbrdo> gogiel: why would it be slower?
burgestrand has joined #ruby
eywu has quit [Ping timeout: 244 seconds]
<mrbrdo> with proc and binding implemented fibonacci is 5 times faster than YARV
<Hanmac> gogiel: are you kidding me? compiled code is in 99% of the cases faster then interpreted code
robbyoconnor has quit [Ping timeout: 246 seconds]
<mrbrdo> with directly translating YARV instructions without optimizing by hand
<shevy> swig code is fastest
<mrbrdo> of course there is some other stuff to consider, but still
<Hanmac> swig code is also the worst
werdnativ has joined #ruby
<gogiel> Hanmac: yes, but converters always produce TONS of useless code
<mrbrdo> gogiel: not necessarily
robotmay has joined #ruby
<mrbrdo> did you look at RubyVM::InstructionSequence::compile?
eywu has joined #ruby
<mrbrdo> it basically gives you bytecode of instruction… that bytecode is just executed then in VM
<Hanmac> gogiel: thats why my gems are not generated by a converter like swig ... my bindings a written by my own hands
<gogiel> mrbrdo: so your problem is solved
<mrbrdo> well it's not solved, still need to do stuff like method redefinition and so on :)
<mrbrdo> that's why I asked which are the most different things, to try to understand if there is something that would significantly impact this kind of solution
<gogiel> you can store methods as pointers
eywu has quit [Client Quit]
<mrbrdo> I know, I can't give an example for which I already know solution
<mrbrdo> I don't*
keppy has quit [Read error: Operation timed out]
iocor has joined #ruby
<gogiel> mrbrdo: if i were you i would start with reading MRI
<mrbrdo> the source you mean?
yousoufos has joined #ruby
heftig has quit [Ping timeout: 248 seconds]
schovi has quit [Remote host closed the connection]
danielpunt has joined #ruby
LtHummus has quit [Ping timeout: 276 seconds]
heftig_ has joined #ruby
LtHummus has joined #ruby
JeffreyBaird has quit [Quit: JeffreyBaird]
yousoufos has quit [Client Quit]
TheFuzzball has quit [Quit: Leaving...]
michaelmartinez has joined #ruby
exchgr has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
<shevy> better
<shevy> help matz work with mRuby
<mrbrdo> valid suggestion I guess
danielpunt has quit [Remote host closed the connection]
williamcotton has quit [Quit: williamcotton]
<mrbrdo> but this is still bytecode?
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
josefig has quit [Ping timeout: 244 seconds]
Mitor has joined #ruby
Khyron320 has quit [Ping timeout: 240 seconds]
<gogiel> mrbrdo: http://rhg.rubyforge.org/
yannis has quit [Quit: Bye!]
graspee has quit [Quit: leaving]
pygmael has quit [Ping timeout: 240 seconds]
berserkr has quit [Quit: Leaving.]
<mrbrdo> yeah I've read some of this already
r0bby is now known as robbyoconnor
<mrbrdo> I usually just look at the insns.def and then grep in the ruby source though
mockra has joined #ruby
<gogiel> rb_define_method is used to define method and it's pointer to function
<mrbrdo> i'm well past that part :)
qwerxy has quit [Quit: offski]
<mrbrdo> I have a working version that can compile code for fibonacci defined in class defined in module
<mrbrdo> (which module is defined with defineclass instr anyway)
<gogiel> mrbrdo: you are using ruby.h?
<mrbrdo> yes
<gogiel> so what's the problem with defining methods?
Stormbytes has quit [Ping timeout: 246 seconds]
<mrbrdo> I didn't have a specific problem, just a question of what you think would be the hardest thing to do :)
<gogiel> how do you store methods?
ryanf has joined #ruby
<mrbrdo> compiled… but I don't use a funcptr yet
<mrbrdo> so no method redefinition inside C for now, but this will not be a lot of work
abionic has joined #ruby
<_axx> hey guys, if i want to convert an variable from string to integer, like myval.to_i i would do something like myval = myval.to_i, is there a shorter way?
<Mitor> hmm
<gogiel> _axx: no, there's not
<_axx> ok, thanks :)
workmad3 has joined #ruby
<mrbrdo> I use some tricks to bypass ABI on x86_64 so I have locals on native stack.. so I have already set up the stack so it can be used in ruby… I am now decoding Binding so I can communicate with ruby code more easily :)
<gogiel> _axx: for the same reason you can't do i++
schovi has joined #ruby
Mitor has quit [Quit: Linkinus - http://linkinus.com]
<mrbrdo> after I implement Binding I can probably offload almost everything I can't parse yet to binding.eval
tommyvyo_ has joined #ruby
Stormbytes has joined #ruby
fayimora_ has joined #ruby
heftig_ is now known as heftig
<mrbrdo> but not sure if there is a way in the exposed API to pass bytecode to eval in binding though, probably not
exchgr has quit [Quit: exchgr]
exlinux has quit [Quit: exlinux]
tvw has joined #ruby
<_axx> gogiel: yeah, thought about that too. ^^ but wasn't quite sure..
exchgr has joined #ruby
fayimora has quit [Ping timeout: 250 seconds]
fayimora_ is now known as fayimora
Lachryma has quit [Quit: Leaving]
<mrbrdo> well you can do stuff like that with strings I think
<mrbrdo> since it stays the same object
fayimora_ has joined #ruby
sailias has joined #ruby
mockra has quit [Remote host closed the connection]
CannedCorn has quit [Ping timeout: 244 seconds]
<mrbrdo> btw did anyone ever dig into rb_env_t
francisfish has joined #ruby
<mrbrdo> I wonder what VALUE *env inside it is
Gavilan has left #ruby [#ruby]
bosphorus has quit [Remote host closed the connection]
axiak has quit [Quit: leaving]
stephenjudkins has quit [Quit: stephenjudkins]
axiak has joined #ruby
fayimora has quit [Ping timeout: 250 seconds]
fayimora_ is now known as fayimora
graspee has joined #ruby
RainbowDashh has quit [Read error: Connection reset by peer]
ramblex has joined #ruby
<gogiel> mrbrdo: isn't it ENV?
<mrbrdo> don't think so, it has to be a pointer to something where local variables can be stored
axiak has quit [Client Quit]
<gogiel> mrbrdo: maybe it's a context?
<mrbrdo> i'm browsing in source now :)
axiak has joined #ruby
<mrbrdo> aha found it
<mrbrdo> it allocates it with ruby ALLOC_N
piotr_ has joined #ruby
<mrbrdo> and the size is count of local vars + 1 + 1
<mrbrdo> 1 of those is for sure for self I think
<lectrick> How do I split up a long string of text into strings of 10 words each?
fayimora_ has joined #ruby
cheese1756 has quit [Ping timeout: 245 seconds]
<heftig> str.split.each_slice(10)
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
axiak has quit [Client Quit]
<mrbrdo> or with regexp like (([^\s]+){10}) (untested)
Axsuul has joined #ruby
<heftig> it's an enumerator, so add a block if you want to iterate, or .to_a to get an array
<gogiel> mrbrdo: so it's just context of execution
cheese1756 has joined #ruby
<heftig> or just pass the enumerator around
axiak has joined #ruby
<mrbrdo> gogiel: any idea what the last thing in it could be? so locals + self + what?
hukl has joined #ruby
peregrine81 has joined #ruby
<lectrick> Why is "puts" also defined as a private method on strings?
fayimora has quit [Ping timeout: 248 seconds]
fayimora_ is now known as fayimora
<lectrick> "afg".send(:puts, 'hello')
<mrbrdo> lectrick: I think it's defined on Object as private
<lectrick> ah ok
<mrbrdo> so all objects probably have it
<mrbrdo> not sure though
mengu has joined #ruby
<lectrick> yep, fixnum has it too so that must be it heh
<mrbrdo> it doesn't matter performance-wise or anything
sandstrom has quit [Quit: sandstrom]
<mrbrdo> I like that I don't have to call something like System.out.println :P
<heftig> they're in the Kernel module
<heftig> which is included in Object
cjs226 has joined #ruby
axiak has quit [Quit: leaving]
axiak has joined #ruby
v0n has joined #ruby
jgarvey has quit [Quit: Leaving]
axiak has quit [Client Quit]
axiak has joined #ruby
tatsuya_o has joined #ruby
axiak has quit [Client Quit]
axiak has joined #ruby
williamcotton has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
norm has joined #ruby
<norm> is it possible for rake to use "-g" (include rakefiles from ~/.rake) by default?
jrist-gym is now known as jrist
<gogiel> mrbrdo: you can do STDOUT.print :0
elux has quit [Quit: Bye!]
<mrbrdo> ?
<mrbrdo> I get an error if I try that
<mrbrdo> unexpected tINTEGER
<gogiel> sorry, i meant ;)
<gogiel> STDOUT.print "string"
<dtolj> How to convert duration in format "%H:%M:%S" to integer of total seconds?
mockra has joined #ruby
grendlme has joined #ruby
Cicloid has joined #ruby
<mrbrdo> gogiel: I like that I can use puts :)
miho has quit [Read error: Connection reset by peer]
<shadoi> dtolj: see strftime
<mrbrdo> bad memories of Java
<gogiel> dtolj: Date.parse
tatsuya_o has joined #ruby
kpshek has quit []
vitoravelino is now known as vitoravelino`afk
abionic has quit [Read error: Connection reset by peer]
<gogiel> or just .to_date using ActiveSupport afair
abionic has joined #ruby
miho has joined #ruby
<mrbrdo> gogiel: btw I think the last value in env is related to GC (like used for marking for GC)
flip_digits has joined #ruby
KarlHungus has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
fantazo has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
mpereira has joined #ruby
enroxorz has quit [Quit: leaving]
ankakusu has quit [Ping timeout: 245 seconds]
dtolj has quit [Ping timeout: 245 seconds]
enroxorz has joined #ruby
enroxorz has quit [Changing host]
enroxorz has joined #ruby
BiHi has quit [Quit: Computer has gone to sleep]
coderhut_ has quit [Ping timeout: 245 seconds]
fermion has quit [Quit: P]
Ethan has joined #ruby
abionic has quit [Read error: Connection reset by peer]
mengu has quit [Read error: Connection reset by peer]
Bosma has joined #ruby
abionic has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<mrbrdo> gogiel: it's previous env :)
<mrbrdo> I should have known that heh
josefig has joined #ruby
_NKG has joined #ruby
pygmael has joined #ruby
<Mon_Ouie> I know he left, but strftime or Date.parse are fore getting a time (or date), not a duration
<mrbrdo> can you subtract a Date from a DateTime?
enherit has quit [Quit: leaving]
perryh is now known as perry
azm has joined #ruby
fayimora has quit [Quit: Busy…..zzzzz]
schaerli has joined #ruby
<_NKG> 1
pygmael has quit [Ping timeout: 265 seconds]
peregrine81 has quit [Quit: Computer sleeping.]
_NKG has quit [Quit: leaving]
Eldariof-ru has quit []
pygmael has joined #ruby
zeromodulus has quit [Remote host closed the connection]
minijupe has joined #ruby
kpshek has joined #ruby
vitoravelino`afk is now known as vitoravelino
abionic has quit [Read error: Connection reset by peer]
abionic has joined #ruby
cousine has joined #ruby
niklasb has quit [Read error: Operation timed out]
kevinbond has joined #ruby
timonv has joined #ruby
alexmin has quit [Ping timeout: 245 seconds]
skrewler has joined #ruby
cousine has quit [Remote host closed the connection]
wereHamster has quit [Quit: Lost terminal]
fayimora has joined #ruby
ng_ has joined #ruby
sroy2 has joined #ruby
federic has quit [Remote host closed the connection]
sroy2 has quit [Client Quit]
enherit has joined #ruby
bosphorus has joined #ruby
whitenoise has quit [Read error: Connection reset by peer]
kpshek has quit []
jeax has joined #ruby
Poapfel has joined #ruby
QaDeS has joined #ruby
kenperkins has quit [Quit: Computer has gone to sleep.]
jonatha__ has quit [Read error: Connection reset by peer]
jonathanwallace has joined #ruby
Jackneill has quit [Read error: Connection reset by peer]
Natch has quit [Read error: Connection reset by peer]
Natch has joined #ruby
<shevy> mrbrdo!
<shevy> go write ruby code!
<mrbrdo> what? :)
explody has joined #ruby
<shevy> we need to improve all ruby projects
<shevy> go go go
<mrbrdo> what do you mean?
mikepack has quit [Read error: Connection reset by peer]
<shevy> mrbrdo we need lots of good ruby projects
<shevy> mrbrdo do you write ruby
azm has quit [Ping timeout: 246 seconds]
<mrbrdo> so, I made good ruby projects
<shevy> good, excellent!
<shevy> that is the spirit
mockra has quit [Remote host closed the connection]
wereHamster has joined #ruby
<mrbrdo> I even have a commit in rails master :-)
<shevy> hmmmm
<shevy> work more outside rails
<shevy> we need a larger profile for ruby
<mrbrdo> well
<shevy> otherwise rails could become a black hole DEVOURING ruby
<mrbrdo> yes
lepht has joined #ruby
<wmoxam> lol
<mrbrdo> dunno, I don't really have any non-web projects at the moment
<shevy> :(
wallerdev has joined #ruby
<mrbrdo> but I use ruby in most cases
mockra has joined #ruby
<mrbrdo> but I also do some low-level programming
<mrbrdo> so then I use C usually
<shevy> yeah
<shevy> in C
<shevy> :P
<shevy> pffft I stick to graspee
<shevy> together we'll change the world
<mrbrdo> :)
xaq has joined #ruby
<mrbrdo> I can't wait for mruby stable
<mrbrdo> this will be really good
emmanuelux has joined #ruby
<enroxorz> mrbrdo: you and me both
<enroxorz> i want to see what it can do in terms of performance
ABK_ has joined #ruby
peregrine81 has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<Hanmac> "I made good ruby projects" and "I even have a commit in rails" ... how does it fit together? XD
<mrbrdo> well it's still ruby code even it's for rails
IrishGringo has quit [Ping timeout: 244 seconds]
slap has joined #ruby
<Hanmac> rails is very much of monkey patching ... from monkeys, for monkeys
<shevy> mrbrdo probably will take a long, long time
<enroxorz> confession: havent touched rails since starting with Ruby
<mrbrdo> enroxorz: poor matz… he created this great language but he has to code most of the time in C to write the interpreter :P
<enroxorz> I use sinatra for any web dev i gotta do
mikepack has joined #ruby
<shevy> Hanmac, well except for one thing - ruby really should give us the ability to default to the core status of all classes. the tabula rasa state for all classes and modules
<enroxorz> mrbrdo: if i knew C better i would help Matz
abionic has quit [Ping timeout: 252 seconds]
<Hanmac> shevy what do you mean with core status?
soulcake has quit [Quit: ZNC - http://znc.in]
<mrbrdo> maybe he means before the class was reopened by something
<mrbrdo> but there is no need for something like that in ruby 2.0
<shevy> yes
<shevy> what mrbrdo wrote :)
<mrbrdo> in ruby 2.0 there is a mechanism to deal with this
<shevy> so that you would always know "I can start from zero here without tainted modifications made by others"
<shevy> hmm
<shevy> ruby 2.0
<shevy> I have 1.9.3
<mrbrdo> 2.0 is not stable yet
<mrbrdo> I think 2013
<shevy> 1.8.7 no longer compiles for me :(
<enroxorz> that sucks
<enroxorz> i think
graft has quit [Read error: Connection reset by peer]
<Hanmac> ... the http://bugs.ruby-lang.org/ is currently down :(
<shevy> the only thing I really hate about 1.9.x is encoding
<enroxorz> ...mruby and ruby 2.0 arent done yet :(
sepp2k has quit [Ping timeout: 246 seconds]
<shevy> mruby will take long
<shevy> ruby 2.0 I guess may be ready 2013
<Hanmac> shevy i thought about an oposite of include and extend ... somekind of exclude ... :P
<shevy> and we'll probably have a xmas release 2012
larissa has joined #ruby
skrewler has quit [Quit: skrewler]
skrewler has joined #ruby
jcromartie has quit [Quit: jcromartie]
skrewler has quit [Remote host closed the connection]
andrew__ has joined #ruby
Solnse2 has joined #ruby
<mrbrdo> hm this is weird
enroxorz has quit [Quit: Leaving]
<mrbrdo> in the env of a binding
schaerli has quit [Remote host closed the connection]
miho has quit [Ping timeout: 252 seconds]
<mrbrdo> there is something that has object_id of self.object_id + 20
<mrbrdo> what could this be? :S
graft has joined #ruby
schaerli has joined #ruby
skrewler has joined #ruby
stephenjudkins has joined #ruby
Morkel has quit [Quit: Morkel]
miho has joined #ruby
<shevy> wat
<heftig> mrbrdo: in MRI, object ids are transformed pointers
Solnse has quit [Ping timeout: 265 seconds]
<mrbrdo> heftig: so any idea what it could be?
<shevy> 22
<shevy> 20 + 22 = 42
JohnBat26 has quit [Read error: Operation timed out]
monvillalon has joined #ruby
<mrbrdo> :D
<mrbrdo> it's an instance of RubyVM::Env
<mrbrdo> kewl
<shevy> indeed cool
<shevy> I can ask ... heftig ... Hanmac ... Mon_Ouie ... and soon mrbrdo when I need to know about ruby internals :D
<mrbrdo> I am still in search of self :P
midnightmagic has left #ruby [#ruby]
soulcake has joined #ruby
ABK_ has quit [Read error: Connection reset by peer]
ABK_ has joined #ruby
tshine has quit [Ping timeout: 256 seconds]
sailias has quit [Quit: Leaving.]
<shevy> like python
schaerli has quit [Remote host closed the connection]
<shevy> you always have to tell python where to find self
luckyruby has joined #ruby
<mrbrdo> ah
<mrbrdo> I found self
<mrbrdo> yay! :)
tshine has joined #ruby
<mrbrdo> it is funny, I always thought that self will be the local variable nr. 1
<mrbrdo> but it's actually RubyVM::Env
<shevy> hmmmm
<shevy> you demystify ruby
<shevy> :(
<shevy> RubyVM::Env = 42
<shevy> what happens
<mrbrdo> :D
<mrbrdo> probably crash
<shevy> hmm
<shevy> only gives a warning
<shevy> and things still seem to run
<shevy> very disappointing :(
carloslopes has quit [Quit: Leaving.]
<mrbrdo> haha
workmad3 has joined #ruby
_iMBA has quit [Quit: Leaving.]
schaerli has joined #ruby
rippa has quit [Ping timeout: 245 seconds]
sepp2k has joined #ruby
kpshek has joined #ruby
kirun has joined #ruby
<mrbrdo> i found optimization to YARV source
<mrbrdo> even though very small :D
ryanf has quit [Quit: Lost terminal]
ryanf has joined #ruby
schovi has quit [Remote host closed the connection]
crankycoder has quit [Remote host closed the connection]
<mrbrdo> or not :)
kenperkins has joined #ruby
jeax has quit [Changing host]
jeax has joined #ruby
jeax is now known as whitenoise
TheFuzzball has joined #ruby
kevinbond has quit [Quit: kevinbond]
kylemcgill has joined #ruby
saschagehlich has joined #ruby
MrGando has joined #ruby
francisfish has quit [Remote host closed the connection]
mikepack has quit [Read error: Connection reset by peer]
perry is now known as perryh_away
ebanoid has quit []
<ged> Does anyone know a way, given two Encoding objects, to tell whether or not one can always be transcoded into the other?
<ged> i.e., a string in the first encoding can always be transcoded to the second without :invalid or :undef replacements.
SegFaultAX|work2 has quit [Read error: Connection reset by peer]
<Hanmac> maybe you look for Encoding.compatible? ?
<ryanf> no, that's for individual strings
<ryanf> not the encoding as a whole
<ged> I thought that's what Encoding.compatible? did, but it returns true for both directions of utf-8 and iso-8859-1, which can't be possible.
krusty_ar has quit [Read error: Connection reset by peer]
<shevy> whoa cool, never knew Encoding.compatible? exists
<ged> Or yeah, at least for simple example strings.
<shadoi> check that they both have at least once convpath in common maybe?
<shadoi> not sure
<ged> Wow, I didn't know about Encoding::Converter.
<shadoi> hehe
<shadoi> pry show-doc and method-source are your best buddies.
<shevy> :)
c0rn_ has quit [Quit: Computer has gone to sleep.]
<ryanf> it seems like convpath doesn't return useful results for the utf-8 -> latin-1 case
Cicloid has quit [Remote host closed the connection]
SegFaultAX|work2 has joined #ruby
<ryanf> (i.e., it's just the reverse of the latin-1 -> utf-8
<ryanf> )
rowanu has quit [Ping timeout: 276 seconds]
geekbri has quit [Remote host closed the connection]
greyEAX has joined #ruby
srji has joined #ruby
dnyy has quit [Remote host closed the connection]
nilg has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 272 seconds]
ABK_ has quit [Read error: Connection reset by peer]
itnomad has joined #ruby
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<ged> E::Converter would be perfect if you could specify constraints, but it doesn't look possible.
ABK_ has joined #ruby
arussel has quit [Ping timeout: 260 seconds]
stewart_ has joined #ruby
hynkle has quit [Read error: Connection reset by peer]
jchauncey has quit [Quit: jchauncey]
youdonotexist has joined #ruby
hynkle has joined #ruby
timonv has quit [Remote host closed the connection]
zeromodulus has joined #ruby
keppy has joined #ruby
cek has joined #ruby
<cek> Hi. who's gonna clarify what's the purpose of bundler in a gem if "you should not use bundler or rubygems in your gem" as stated in https://github.com/carlhuda/bundler/issues/1620#issuecomment-5048692
ken_barber has joined #ruby
TheFuzzball has quit [Quit: Leaving...]
fbernier has quit [Ping timeout: 260 seconds]
cheese1756 has quit [Changing host]
cheese1756 has joined #ruby
linoj has quit [Ping timeout: 240 seconds]
<ryanf> usually it's for development
pu22l3r has quit [Read error: Operation timed out]
<shadoi> development and app (not gem) deployment.
francisfish has joined #ruby
<shadoi> It's fine to use bundler for gem development (and convenient to use it with .gemspec files), just don't add bundler to your gem depdendencies.
<shadoi> dependencies*
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
jonathanwallace has quit [Ping timeout: 276 seconds]
<cek> well crap, they mislead me
<cek> speaking of, found begin; require 'rubygems'; rescue; end line in stomp gem. what was that for?
francisfish has quit [Read error: Connection reset by peer]
<shadoi> 1.8 you had to require rubygems
<shadoi> 1.9 already has it
<shadoi> so he just rescued any errors (nasty way to do it)
francisfish has joined #ruby
<ged> And for 1.8 and before, it was optional, so it was entirely likely that you could install it via one of the other installers.
<shadoi> *nod*
srji_ has joined #ruby
srji_ has quit [Client Quit]
<cek> yea, only that it rescues standarderror, which is adjacent to loaderror
indian has joined #ruby
<cek> would be wonderful if they could publish the usage guide
<cek> once you require 'bundler' in your app, bundler is your gem's dep.
<cek> what are publishers doing, stripping out the requires before uploading?
<cek> what's the workflow?
<ged> I don't use bundler for anything.
keppy has quit [Quit: Leaving]
<ged> So nothing to strip out.
ghanima has quit [Quit: Leaving.]
<shadoi> cek: if you're writing a gem, you don't refer to your local dev environment whatsoever.
srji has quit [Ping timeout: 265 seconds]
<shadoi> Bundler will auto-require your local gem.
srji has joined #ruby
hynkle has quit [Quit: hynkle]
<cek> where should I put the require 'bundler/setup' line?
<shadoi> or your gem development environment rather
<cek> i'd like to Bundler manages an application's dependencies through its entire life across many machines systematically and repeatably. right the whole sentence.
blacktulip has quit [Remote host closed the connection]
mayankkohaley has quit [Ping timeout: 245 seconds]
<shadoi> You shouldn't have it in your gem anywhere
tcopp has quit [Quit: Lost terminal]
<shadoi> just require the libs you need
<cek> you see, my gem depends on other libs, bundler advertises that it will take care of tracking those libs. So I get him into the company. Now I see the comment from developer that it actually should not be anywhere in the gem.
<shadoi> It will
<shadoi> It's in your .gemspec
SeanLazer has quit [Quit: SeanLazer]
josefig has quit [Quit: Computer has gone to sleep.]
* Hanmac never used bundler for my gems
zeromodulus has quit [Read error: Connection reset by peer]
<cek> well yeah, the .gemspec has all those deps already there. and the Gemfile is just reading those with gemspec line.
<shadoi> I use it for lots of gems, it works great.
stephenjudkins has quit [Quit: stephenjudkins]
<shevy> ack
miho has quit [Read error: Connection reset by peer]
<shevy> bundler!
peregrine81 has quit [Quit: Goodbye.]
<cek> i was perplexed by "Inside your app, load up the bundled environment" line in bundler guide
SeanLazer has joined #ruby
<shevy> a virus spreads and so does bundler
zeromodulus has joined #ruby
<shevy> Hanmac one day you will fall too ;)
<shevy> it'll happen slowly... over night ...
<shevy> ever saw Invasion of the body snatchers?
<cek> is that like critters?
faitswulff has joined #ruby
miho has joined #ruby
<cek> anyways, shadoi, how do you use it if you actually don't use it? you don't require 'bundler', you don't use bundler.
<cek> are you using it solely for gem installments and updates? because that's a different story.
* Hanmac use rake ...
<shadoi> cek: 'bundle install' gets me all the dependencies for my gem, bundle update lets me control the dep versions that are locked, etc.
Stormbytes has quit [Quit: Leaving...]
<cek> ohh, so you use the end-user part :)
<shadoi> no
<shevy> cek hmm no... critters I think was more direct violence. invasion of body snatchers, the original one, built upon "communist fears". in the 197x version, it was more alien plants building human clones
<shadoi> the development part.
dnyy has joined #ruby
<shevy> or rather "growing"
ken_barber has quit [Remote host closed the connection]
<cek> i'll leave the bundler to rest in peace now
<cek> shevy, robot plants building other robots is cooler.
niklasb has joined #ruby
<cek> Tremors was good, too.
Niamkik has quit [Remote host closed the connection]
Croms has joined #ruby
MrGando has quit [Quit: Bye]
<faitswulff> I'm going through the Ruby Koans and about_hashes just blew my mind by setting the default value with a block: git://gist.github.com/2962384.git
<faitswulff> Can anyone explain what's going on there?
<faitswulff> woops, wrong url, sorry
<apeiros_> faitswulff: your ruby documentation most likely can
<apeiros_> ri Hash::new
graspee has quit [Quit: leaving]
Morgotth has joined #ruby
<cek> oh yeah, that's a "beautiful" feature that's gonna shoot you in your foot if you use it
<apeiros_> cek: how so?
exchgr has quit [Quit: exchgr]
andrew__ is now known as andrewhl
g0bl1n has quit [Quit: Ex-Chat]
<cek> poor other devs who will stumble upon it somewhere 10 frames apart from original hash init
srji has quit [Quit: leaving]
<apeiros_> so by "your foot" you mean "some other dev's foot"?
<cek> you know, ruby is lazily typed, anything can happen between here and there
Croms has quit [Client Quit]
<sepp2k> cek: How is that worse than using a hash 10 frames apart from where you've put values into it? Either way you have to look up what's in it.
Croms has joined #ruby
<apeiros_> ^ that
<faitswulff> apeiros_: thanks, I'll check into that
emmanuelux has quit [Remote host closed the connection]
M00kaw has quit [Ping timeout: 272 seconds]
stephenjudkins has joined #ruby
<apeiros_> also ruby isn't lazily typed. it's dynamically typed.
<shevy> when I type, I type lazily
<shevy> I really... need to overcome inner resistance to pressing that key down
<apeiros_> :)
<shevy> with some beer it goes better
<shevy> but this current heatwave in europe is killing me
<shevy> with less water, planet earth would be doomed quickly
luxurymode has quit [Quit: Computer has gone to sleep.]
<apeiros_> faitswulff: have you installed ruby with rvm? if so, you probably have to `rvm docs generate` before `ri Hash::new` will work
schaerli has quit [Remote host closed the connection]
<apeiros_> also, certain package managers require the installation of a separate doc package too
whitenoise has quit [Quit: Leaving]
<faitswulff> apeiros_: I am actually on windows, as my linux box has been giving me problems, and I'm not using a version manager :(
<faitswulff> I just looked it up on ruby-doc.org
francisfish has quit [Remote host closed the connection]
daniel_hinojosa has joined #ruby
<apeiros_> faitswulff: ok. that's of course an alternative :)
<cek> faitswulff, apidock's better, you can leave comments there
JeffreyBaird has joined #ruby
beneggett has joined #ruby
<shevy> faitswulff, noooooo dont fall to darth vader OS!
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<shevy> next version will be windows-as-web-app anyway
ackz has quit [Quit: Leaving...]
<cek> sepp2k, exactly, and I often check for key existance and assignment via hash[:key], imagine the confusion now.
tomb_ has quit [Quit: Computer has gone to sleep.]
<cek> or better put, have you ever encountered hash with default assigment other than in CS classes?
<jlogsdon> I use default assignment in purple_hash :3
<apeiros_> often enough, yes
<apeiros_> it's not uncommon
sailias has joined #ruby
<apeiros_> the most common ones are Hash.new(0), blocks with [] and blocks with {}
atmosx has quit [Remote host closed the connection]
wvms has joined #ruby
<Hanmac> i wrote a masqurade class for Hash so i can use defaut_value (an Array) and my hash is still marshable
<cek> speaking of, wondering how well that plays with yaml
hukl has quit [Quit: Leaving...]
<ekaleido> yaml is the devil :(
<jlogsdon> how so?
<cek> (Hash.new(){|k,v| 'shit happens'}).to_yaml => "--- {}\n\n"
* apeiros_ wonders whether today is the day of ridiculous claims :)
<cek> oh well, it doesnt
<ekaleido> haha
<faitswulff> cek: I'll check out apidock, thank you
<cek> and here you go with the "special case" and 3rd party dev pulling hair out of his head
<ekaleido> i have no argument with actual merit, i just prefer json i spose
<jlogsdon> i prefer YAML for configs, and json for everything else
<apeiros_> ekaleido: hm, I don't. json is fairly limited. you can't even have a datetime in it.
<jlogsdon> its just a bit more readable
* Hanmac is an XMLiean
<jlogsdon> can we kick Hanmac?!
<faitswulff> shevy: What is the Luke Skywalker OS?
<jlogsdon> kickban even!
<jlogsdon> :P
<cek> (Hash.new(){|k,v| 'shit happens'}).to_json => "{}"
<ekaleido> xml is how satan himself sends messages in hell
<ekaleido> true story
<cek> *st_table that
<apeiros_> cek: yes. wonder over wonders - serialization is about data, not code… but yes, it would be nice if ruby could serialize procs (js after all can serialize its functions)
jimeh4 has quit [Ping timeout: 260 seconds]
<shevy> faitswulff that is rubyOS
dnyy has quit [Remote host closed the connection]
<cek> well, hash is a data type, but as i said ruby is lazily typed
<Hanmac> apeiros_ yeah that would be cool ...
<shevy> cek is like the channel clown ;P
<apeiros_> repeating the wrong claim. ruby ain't lazily typed.
carlyle has quit [Remote host closed the connection]
fantazo has quit [Remote host closed the connection]
eywu has joined #ruby
tommyvyo has joined #ruby
<jlogsdon> its loosely typed
<apeiros_> Hanmac: I guess the difficulty is with procs/lambdas being closures. but I think doing it like js would be fine enough
<apeiros_> jlogsdon: no
<cek> shevy, well the channel would sick in archaic beauracratic swamp otherwise
<cek> you'd get robots answering robots questions
<apeiros_> jlogsdon: weak/loose is wrong too. rubys typing system is strong, dynamical typing
<jlogsdon> "123abc".to_i => 123
<Hanmac> haha you fail
<apeiros_> jlogsdon: weak typing would mean the class of an object can change. it can't
<jlogsdon> touche
<jlogsdon> dynamic it is
<apeiros_> .to_i returns a new object ;-)
<jlogsdon> shush you
<jlogsdon> stop being so damned right
user__ has quit [Quit: Forget progress by proxy. Land on your own moon.]
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<apeiros_> jlogsdon: 8y of ruby+irc do that to you :-p
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
<jlogsdon> haha i bet
<cek> apeiros_, Struct.new
<jlogsdon> im only at 2y ruby and ~6m irc (for ruby)
<apeiros_> cek: what about it?
tommyvyo has quit [Client Quit]
wallerdev has quit [Quit: wallerdev]
atmosx has joined #ruby
<cek> class of an object changes I guess, but that's the only scenario I can think of.
Aaton_off is now known as Aaton
<apeiros_> cek: with Struct.new, no class of an object changes.
<apeiros_> Struct is still Struct after Struct.new.
<apeiros_> you create a new class. just like `class Foo; end` does or Class.new does. but no change of a class in either of these.
allanm has joined #ruby
<apeiros_> interesting side-fact: Struct.new(…).is_a?(Struct) # => false
faitswulff has quit [Quit: Leaving.]
<cek> yeah, that what i meant, the object instance doesn't have the object's class
sailias has quit [Quit: Leaving.]
sailias has joined #ruby
wmoxam has quit [Ping timeout: 255 seconds]
<cek> why would you need to change the class? you can change the behaviour of the object with mixins and such.
alanp_ has joined #ruby
alanp_ has quit [Read error: Connection reset by peer]
<apeiros_> that's not the point. the point is that a weakly/loosely typed system means that you *can* change the class of an object.
balki_ has joined #ruby
balki_ has quit [Read error: Connection reset by peer]
cbuxton has joined #ruby
<apeiros_> which means rubys typing isn't weak/loose. it's strong.
alanp_ has joined #ruby
faitswulff has joined #ruby
balki_ has joined #ruby
<cek> what's the point of changing the class of an object?
<apeiros_> and it's dynamical because you're not forced to declare the type of a variable. and neither is the type inferred. x = 1; x = "" - works fine and is allowed.
<apeiros_> cek: ask the js guys.
dv310p3r has quit [Ping timeout: 244 seconds]
sailias has quit [Client Quit]
<cek> hold on
<apeiros_> or any other loosely typed language's implementors
ikaros has joined #ruby
<apeiros_> or even wikipedia: http://en.wikipedia.org/wiki/Weak_typing
olrrai has quit [Quit: Saliendo]
straind has quit [Read error: Connection reset by peer]
yankhates has quit [Ping timeout: 260 seconds]
Solnse2 has quit [Remote host closed the connection]
Solnse has joined #ruby
carlyle has joined #ruby
alanp has quit [Ping timeout: 250 seconds]
balki has quit [Ping timeout: 250 seconds]
wilmoore has joined #ruby
<cek> well js channel's dead despite of same number of people present
c0rn_ has joined #ruby
jonathanwallace has joined #ruby
tzvi|work has quit [Remote host closed the connection]
zchr has joined #ruby
kpshek has quit []
jimeh4 has joined #ruby
Guest____ has joined #ruby
<cek> js say "because there is no class"
yxhuvud has quit [Ping timeout: 255 seconds]
<cout> ruby lets you modify an object's singleton class, which is not entirely different from changing the object's class
<cek> but enought to change the behaviour of the object.
<cout> or at the very least,it's not entirely different from changing the object's type
<cek> so why argue if the outcome's the same
<cout> who's arguing?
MasterIdler_ has joined #ruby
MasterIdler_ has quit [Client Quit]
jamescarr has joined #ruby
chson has quit [Remote host closed the connection]
<cek> apeiros_ opened a programming book by charles babbage and reads snippets out of it
iocor has quit [Quit: Computer has gone to sleep.]
uris has quit [Quit: leaving]
<apeiros_> cek: what are you trying to say, hm?
jamescarr has quit [Client Quit]
Criztian has quit [Remote host closed the connection]
<cout> I can rarely tell what cek is trying to say
<apeiros_> I can often say I'm tempted to pull out the ban-hammer. but if I'd do it now he'd go all whiney about how it was just because he said something to me that I didn't like…
MasterIdler has quit [Ping timeout: 248 seconds]
<cek> if I continue the conversation with the js guys, i'm sure they will steal our eigenclasses, so let's wrap it up.
wpaulson has joined #ruby
ABK_ has quit [Read error: Connection reset by peer]
<cek> apeiros_, yeah, if you don't like the conversation - set the ignore filter, that's all.
ABK_ has joined #ruby
<apeiros_> cek: no dude. if you behave like an asshat, I kick you. that's all.
PaciFisT has quit [Quit: Leaving.]
axiak has quit [Quit: leaving]
axiak has joined #ruby
hunglin has quit [Ping timeout: 244 seconds]
niklasb has quit [Read error: No route to host]
axiak has quit [Client Quit]
minijupe has quit [Quit: minijupe]
axiak has joined #ruby
PaciFisT has joined #ruby
PaciFisT has quit [Client Quit]
ZachBeta has joined #ruby
mikepack has joined #ruby
axiak has quit [Client Quit]
minijupe has joined #ruby
<shevy> is there any usable torrent library in ruby?
axiak has joined #ruby
axiak has quit [Client Quit]
minijupe has quit [Client Quit]
axiak has joined #ruby
<jlogsdon> google, mang
<jlogsdon> (no)
<shevy> 7 years :(
atmosx has quit [Ping timeout: 276 seconds]
<Spaceghostc2c> shevy: Yes
btanaka has quit [Remote host closed the connection]
SirRamonGabriel has joined #ruby
Juul has joined #ruby
<Spaceghostc2c> shevy: Do you want straight ruby, or a ruby interface to a c library?
<shevy> good question hmm
<shevy> I think right now I would like to say "I would like to have a ruby class, and download .torrent files with this"
mikepack has quit [Read error: Connection reset by peer]
<shevy> right now I use transmission or ... raptor or whatever the name from the commandline thing was
IrishGringo has joined #ruby
atmosx has joined #ruby
<shevy> I think it would be alright to use a c library (and ruby bindings to it) if it would work
<shevy> I really should learn C properly one day...
Guest____ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<cek> apeiros_, don't threaten people, especially when you're a channel op
Guest___ has joined #ruby
Boohbah has joined #ruby
Progster has joined #ruby
cek has left #ruby [#ruby]
<shevy> yard seems to get confused when one uses lines of "# =============== #"
monvillalon has quit [Quit: monvillalon]
BlissOfBeing has quit [Quit: This computer has gone to sleep]
ilyam has joined #ruby
<apeiros_> naturally he left right after saying that
akem has quit [Quit: Forget progress by proxy. Land on your own moon.]
akem has joined #ruby
zz_chrismcg is now known as chrismcg
bricker88 has joined #ruby
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
SirRamonGabriel has quit [Remote host closed the connection]
dnyy has joined #ruby
akem has quit [Max SendQ exceeded]
rowanu has joined #ruby
btanaka has joined #ruby
carlyle has quit [Remote host closed the connection]
akem has joined #ruby
awarner has quit [Remote host closed the connection]
<Sigma00> heh, 'threats' are warnings. If you didn't he'd be saying 'OMG YOU NEVER TOLD ME'
crankycoder has joined #ruby
rowanu has quit [Remote host closed the connection]
pk1001100011 has quit [Quit: Burn your gods and kill the king; Subjugate your suffering; Dead heart, in a dead world]
<apeiros_> Sigma00: right. also, who'd feel threatened by "don't behave like an asshat or you go out"? …exactly, only people who know they behave like one… anyway, bed time for me
<apeiros_> (if he'd believe he hadn't behaved like one, he'd argue about how he wasn't one)
iocor has joined #ruby
apeiros_ has quit [Remote host closed the connection]
straind has joined #ruby
wardrop has joined #ruby
<wardrop> Does anyone know how I can send input to a system command. For example, if I run a mysql command, e.g. `mysql --user backup_user --password` it prompts for a password. How do I send that password? I've looked at the Open3 library but it doesn't make it clear how to achieve this.
<fowl> IO.popen
mikepack has joined #ruby
SirRamonGabriel has joined #ruby
demian`_ has joined #ruby
banisterfiend has joined #ruby
<wardrop> Using IO.popen, how do I wait until the command asks for input, then only provide the input at that point?
<wardrop> There's normally a one second delay between running the mysql command, and having it prompt for the password.
michaelmartinez has quit [Excess Flood]
kirun has quit [Quit: Client exiting]
Guest___ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<fowl> wardrop, when you get to that point you'll realize there are all kinds of database gems you could be using instead
peregrine81 has joined #ruby
dhruvasagar has quit [Ping timeout: 260 seconds]
<wardrop> Yes, but this Ruby script I'm writing is meant to act as a backup coordinator. It's meant to basically run system commands. SSH, Backup MySQL, etc.
r0bby_ has joined #ruby
robbyoconnor has quit [Ping timeout: 244 seconds]
[johnonymous] has joined #ruby
<wardrop> Rewriting all these built in system tools or learning a whole new API doesn't make any sense.
mrbrdo has quit [Quit: mrbrdo]
ZachBeta has quit [Quit: Computer has gone to sleep.]
<atmosx> aloha
<shevy> atmosx! my brother from another mother!
[johnonymous] has quit [Client Quit]
[johnonymous] has joined #ruby
Vert has joined #ruby
ZachBeta has joined #ruby
yaasii has joined #ruby
chrismcg is now known as zz_chrismcg
mpun7 has joined #ruby
brasten has quit [Quit: brasten]
[johnonymous] has quit [Client Quit]
JeffreyBaird has quit [Quit: JeffreyBaird]
randomautomator has quit [Remote host closed the connection]
mikeg has joined #ruby
eywu has quit [Ping timeout: 244 seconds]
nari has joined #ruby
atmosx has quit [Ping timeout: 276 seconds]
atmosx has joined #ruby
<atmosx> shevy: how's life (my internet connection is lousy :-(( )
<shevy> busy busy
bosphorus has quit [Remote host closed the connection]
<shevy> and there is a heatwave in central europe which is so annoying
<atmosx> yes
ianbishop has joined #ruby
<heftig> atmosx: how lousy?
[johnonymous] has joined #ruby
<atmosx> I'm sweating all day long, it's incredibly hot here too
<shevy> yeah
<shevy> and there are mosquitos too, I hate them
kuranai|off has quit [Ping timeout: 250 seconds]
<atmosx> heftig: it's lame, gets disconnected every day between 23:00 and 4:00 am from 3 to 5 times... I'll switch to cable when I come back.
<heftig> eh, i get disconnected after 24h of uptime. always.
<heftig> and that changes my ipv4
saschagehlich has quit [Quit: saschagehlich]
yaasii has quit [Quit: Leaving...]
<atmosx> shevy: ah I don't have mosquitos and/or bugs here ...
<atmosx> I will have in aprox 10 days when I'll be home
SeanLazer has quit [Quit: SeanLazer]
<shevy> hehehehe
SeanLazer has joined #ruby
[johnonymous] has quit [Client Quit]
kuranai|off has joined #ruby
fayimora has quit [Read error: Operation timed out]
[johnonymous] has joined #ruby
luckyruby has quit [Remote host closed the connection]
<atmosx> heftig: you should change ISP too then
<atmosx> I have too many services running here... disconnects last just 5 minutes max but... still they are annoying
Juul has quit [Ping timeout: 248 seconds]
<heftig> they're all doing it
eywu has joined #ruby
baroquebobcat_ has joined #ruby
<heftig> well, those available here, at least (rural area, consumer line)
yaasii has joined #ruby
<heftig> so i'm stuck.
<heftig> with a lame 768/128kbit 100ms, to boot
mikepack has quit [Remote host closed the connection]
the_jeebster1 has quit [Quit: Leaving.]
cbuxton1 has joined #ruby
Juul has joined #ruby
baroquebobcat has quit [Read error: Operation timed out]
jimeh4 has quit [Ping timeout: 255 seconds]
yaasii has quit [Client Quit]
cbuxton has quit [Ping timeout: 246 seconds]
baroquebobcat_ has quit [Ping timeout: 250 seconds]
atmosx has quit [Ping timeout: 276 seconds]
Morgotth has quit [Ping timeout: 264 seconds]
werdnativ has quit [Quit: FAMOUS_LAST_WORDS is nil]
[johnonymous] has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
joch_n has quit [Quit: Linkinus - http://linkinus.com]
trend has joined #ruby
[[johnonymous]] has joined #ruby
atmosx has joined #ruby
itnomad has quit [Ping timeout: 245 seconds]
itnomad has joined #ruby
peterhil has quit [Ping timeout: 252 seconds]
Gavilan has joined #ruby
* atmosx guns and roses - November Rain
<atmosx> Everybody needs somebodyyyy
liluo has joined #ruby
SirRamonGabriel has quit [Remote host closed the connection]
[[johnonymous]] has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
SirRamonGabriel has joined #ruby
<rakm> i think this might be more a programming practices question than ruby specific, but can someone explain why it's better to say….. 'if something !=nil && something' ? It seems redundant to me.
<rakm> the above as opposed to just 'something != nil'
tewecske has quit [Quit: Leaving.]
kaneda__ has quit [Ping timeout: 244 seconds]
SirRamonGabriel has quit [Remote host closed the connection]
Guest_ has joined #ruby
Guest_ has quit [Client Quit]
<shevy> dunno
<shevy> but it looks ugly
mockra has quit [Remote host closed the connection]
<daed> your mom.
<shevy> normally I'd check like "unless something.nil?"
<shevy> daed! hi!
mockra has joined #ruby
<wardrop> So does anyone know how to provide a password to a shell command with Ruby?
<rakm> yeah that's what I would think. Looking at a codebase and it's been done over and over by programmers less experienced in Ruby, but way more experienced in other languages
[[johnonymous]] has joined #ruby
fayimora has joined #ruby
rbanffy has quit [Quit: Ex-Chat]
[[johnonymous]] has quit [Client Quit]
xubuntu5 has joined #ruby
<Gavilan> rakm: is nil == false?
<rakm> not the same object in ruby, but evaluates to the same?
<oooPaul> No.
[[johnonymous]] has joined #ruby
<oooPaul> Both will "fail" in an if statement, however, they are not equivalent.
<shevy> Gavilan nil is kinda like the object that does not want to exist
<Gavilan> then something !=nil && something is different than something !=nil ...
atmosx has quit [Ping timeout: 276 seconds]
<oooPaul> puts "evals to false" unless nil => "evals to false"
eywu has quit [Quit: Leaving.]
<oooPaul> puts "evals to false" unless false => "evals to false"
<Gavilan> puts false !=nil
<oooPaul> puts "evals to false" unless nil == false => "evals to false"
<xubuntu5> where do i find the ruby examples provided on ubuntu?
<Gavilan> puts "false" unless false !=nil
emmanuelux has joined #ruby
eywu has joined #ruby
<xubuntu5> and how can i make my version of ruby 1.9 i have installed 1.8 and 1.9 but it only runs 1.8.7 when i say ruby -v i see ruby 1.8.7
<shevy> anyone of you having some experience with pdfs? I am thinking of whether to maintain ruby-fpdf or not
ianbrandt has quit [Quit: ianbrandt]
<shevy> however, there already is prawn, sooo hmmmmmm
atmosx_ has joined #ruby
<Boohbah> xubuntu5: https://rvm.io/
atmosx has joined #ruby
<atmosx> uff
<atmosx> thank God the neighbour has an open WiFi
atmosx is now known as atmosx_v2
<Boohbah> atmosx_v2: did god invent wifi?
<bricker88> What is special about the word "attr" in Ruby? I have never run into trouble with it but Textmate treats it differently
emmanuelux has quit [Remote host closed the connection]
<banisterfiend> bricker88: it's a class method in core
<shevy> bricker88 it should be an alias to attr_reader
<banisterfiend> bricker88: related to attr_accessor, etc
youdonotexist has quit [Quit: youdonotexist]
<shevy> so as long as it has the same colour as the other attr_* things, all should be fine :)
<xubuntu5> thanks Boohbah
robotmay has quit [Remote host closed the connection]
<bricker88> I see, thank you guys
_mcpp_ has quit [Quit: Lost terminal]
xaq has quit [Remote host closed the connection]
digitalcakestudi has joined #ruby
<atmosx_v2> Boohbah: no, but someone inveted WEP encryption which nowadays is like having an Open WiFi
<atmosx_v2> Boohbah: someone englithed by God (if he exists anyway, but I'll stay away from the argument right now :-P)
Progster has quit [Ping timeout: 250 seconds]
Siphonblast has quit [Ping timeout: 246 seconds]
manizzle has quit [Ping timeout: 246 seconds]
oooPaul has quit [Quit: Ciao for now!]
kaneda has joined #ruby
kaneda is now known as Guest92562
atmosx_ has quit [Ping timeout: 276 seconds]
<rakunHo> can u guys recommend a new book to learn rails?
nari has quit [Ping timeout: 276 seconds]
macmartine has quit [Quit: macmartine]
<rakunHo> i know java EE already but its hard to learn RoR books or tutorial out of date
<rakunHo> thx
<[[johnonymous]]> rakunHo no prob :) everything about rails on there is awesome. also on http://railscasts.com
IrishGringo has quit [Ping timeout: 244 seconds]
josefig has joined #ruby
josefig has quit [Changing host]
josefig has joined #ruby
ramblex has quit [Quit: ramblex]
atmosx has joined #ruby
<rakunHo> thx boohbah
Targen has quit [Ping timeout: 245 seconds]
TheFuzzball has joined #ruby
ryan0x2_ has quit [Remote host closed the connection]
peregrine81 has quit [Quit: Computer sleeping.]
tintin has joined #ruby
<tintin> Is this the forum for ruby developers? http://www.ruby-forum.com/forum/ruby-core
<tintin> Or this? http://www.ruby-forum.com/forum/15 to get support from ruby devs?
td123 has quit [Read error: Connection reset by peer]
tommyvyo has joined #ruby
<tintin> To test or debug code what do you use?
td123 has joined #ruby
sorbo_ has joined #ruby
<shevy> yes this is the forum for ruby USERS - that includes developers. core and dev subparts
<shevy> its an interface to mailing list
itnomad has quit [Ping timeout: 276 seconds]
<tintin> Which one? ruby-core ? or ruby-dev ? http://www.ruby-forum.com/forum/15
peregrine81 has joined #ruby
explody has quit [Quit: Leaving]
sepp2k has quit [Remote host closed the connection]
<shevy> they are all there
tintin has left #ruby [#ruby]
[[johnonymous]] is now known as jimmyjam
DanBoy has quit [Remote host closed the connection]
jimmyjam is now known as jimmyjamz
<bricker88> Here's a question: How can I get an inherited class to use its own constant when using an inherited method? Example: https://gist.github.com/2963023 I want that last command to show "//entry"
aantix has quit [Quit: aantix]
jimmyjamz is now known as [[johnonymous]]
<Gavilan> bricker88: you should directly reimplement the metod show_xpath
chson has joined #ruby
cbuxton1 has quit [Quit: Leaving.]