apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p362: http://ruby-lang.org (ruby-2.0.0-rc1) || Paste >3 lines of text on http://gist.github.com
xsdg has quit [Ping timeout: 260 seconds]
tr4656 has quit [Read error: Connection reset by peer]
noc` has left #ruby ["Ex-Chat"]
reppard has joined #ruby
Edward_ has quit [Ping timeout: 272 seconds]
dmiller has quit [Read error: Connection reset by peer]
zmisc has joined #ruby
stoicsquirrel has quit [Remote host closed the connection]
slainer68 has joined #ruby
nonotza has quit [Quit: nonotza]
main has quit [Ping timeout: 252 seconds]
cableray has joined #ruby
methoddk has joined #ruby
tr4656 has joined #ruby
DrShoggoth has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
gyre008 has joined #ruby
DrShoggoth has quit [Read error: Connection reset by peer]
baroquebobcat has joined #ruby
Antiarc has quit [Read error: Connection reset by peer]
opettaja has quit [Remote host closed the connection]
noyb has quit [Ping timeout: 276 seconds]
methoddk is now known as coaster
gabrielrotbart has quit [Remote host closed the connection]
slainer68 has quit [Remote host closed the connection]
afd__ has quit [Ping timeout: 252 seconds]
opettaja has joined #ruby
gyre007 has joined #ruby
joofsh has quit [Remote host closed the connection]
itsdavem has quit [Ping timeout: 264 seconds]
horofox has joined #ruby
d2dchat has quit [Remote host closed the connection]
BoomCow has quit [Quit: This computer has gone to sleep]
crackfu has joined #ruby
Weems has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
afd__ has joined #ruby
noyb has joined #ruby
digitalcakestudi has quit [Quit: Leaving.]
timonv has joined #ruby
timonv_ has quit [Read error: Connection reset by peer]
joeycarmello has joined #ruby
dankest is now known as dankest|away
banister_ has joined #ruby
banister`sleep has quit [Read error: Connection reset by peer]
freeayu has joined #ruby
darkc0met has joined #ruby
rezzack has quit [Quit: Leaving.]
mahmoudimus has joined #ruby
IrishGringo_ has joined #ruby
jalcine has joined #ruby
opettaja has quit [Remote host closed the connection]
gabrielrotbart has joined #ruby
hbpoison has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
tommyvyo_ is now known as tommyvyo
zmisc has quit [Quit: Switching to a native IRC client]
terrence has joined #ruby
IrishGringo_ has quit [Client Quit]
IrishGringo has joined #ruby
cableray has quit [Quit: cableray]
emanu has joined #ruby
hbpoison has quit [Ping timeout: 252 seconds]
zmisc has joined #ruby
v0n has joined #ruby
SCommette has quit [Quit: SCommette]
dankest|away is now known as dankest
zmisc has quit [Client Quit]
<shevy> In the past I used to use .chdir a lot, but I found that it is much better to use absolute paths, rather than relative ones
itsdavem has joined #ruby
osaut has joined #ruby
maxamillion has left #ruby [#ruby]
ebobby has joined #ruby
<terrence> close
terrence has left #ruby ["离开"]
<shevy> open
osaut has quit [Ping timeout: 255 seconds]
v0n has quit [Ping timeout: 246 seconds]
zmisc has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
Spami has quit [Quit: This computer has gone to sleep]
mgeorgi has quit [Remote host closed the connection]
Se7enTime has joined #ruby
<havenn> Anyone thoughts on this attempt at a LoadPath#add, or critique? https://gist.github.com/4527086
ejnahc_ has quit [Changing host]
ejnahc_ has joined #ruby
shacklettbp has joined #ruby
Se7enTime has left #ruby [#ruby]
ejnahc_ is now known as ejnahc
retro|cz has joined #ruby
robert__ has joined #ruby
cha1tanya has joined #ruby
robert_ has quit [Ping timeout: 276 seconds]
Spooner has quit [Remote host closed the connection]
Zespre has joined #ruby
digitalcakestudi has joined #ruby
horofox has quit [Quit: horofox]
TheFuzzball has quit [Quit: Computer has gone to sleep.]
jaequery has joined #ruby
nari has joined #ruby
nathancahill has quit [Quit: nathancahill]
joeycarmello has quit [Remote host closed the connection]
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
jaequery has quit [Quit: Computer has gone to sleep.]
<graft> why is the argument to add always a relative path?
<graft> if i do LoadPath.add '/var/tmp' it'll muck it up
pjackson has quit [Quit: No Ping reply in 180 seconds.]
jimeh has quit [Quit: Computer has gone to sleep.]
<graft> also, it should check to see if the dirname exists (or if the argument is a dirname)
<havenn> graft: ahh, good point
pjackson has joined #ruby
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
gabrielrotbart has quit [Remote host closed the connection]
maletor has joined #ruby
fermion has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
MattRb has joined #ruby
berserkr has quit [Quit: Leaving.]
maletor has quit [Client Quit]
graft has quit [Ping timeout: 264 seconds]
maycon has joined #ruby
noyb has quit [Ping timeout: 248 seconds]
graft has joined #ruby
<clooth> hesus khrist
MattRb has quit [Quit: This computer has gone to sleep]
<zmisc> Didn't you mean Jesus Christ?
samphippen has quit [Quit: Computer has gone to sleep.]
Vert has quit [Ping timeout: 252 seconds]
<Spaceghost|cloud> Did they?
<Spaceghost|cloud> I formally demand a separation of religion and programming language.
itsdavem has quit [Remote host closed the connection]
<shevy> Spaceghost|cloud dont think it is necessary, a computer program ignores the first anyway
mengu has quit [Quit: Leaving]
<ryanf> havenn: I don't think __FILE__ is doing what you want it to
<Spaceghost|cloud> shevy: The program might. I don't think that's what I'm concerned about.
fir_ed has joined #ruby
noyb has joined #ruby
<ryanf> I'm not totally sure what semantics you're going for, but I'm guessing you aren't trying to base it on the location of the file that contains LoadPath.add itself?
<havenn> ryanf: hrmmm
nfk has quit [Quit: yawn]
_hemanth_ has quit [Read error: Connection reset by peer]
<havenn> ryanf: Oh, hah... oops, yeah that is awkward.
itsdavem has joined #ruby
hemanth has joined #ruby
orluke has joined #ruby
kale_ has joined #ruby
joeycarmello has joined #ruby
afd__ has quit [Ping timeout: 276 seconds]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
f03lipe has quit [Remote host closed the connection]
joofsh has joined #ruby
f03lipe has joined #ruby
jpfuentes2 has joined #ruby
subbyyy_ has joined #ruby
f03lipe has quit [Remote host closed the connection]
f03lipe has joined #ruby
osaut has joined #ruby
robert___ has joined #ruby
<havenn> graft: Updated Gist to try to deal with absolute path arguments: https://gist.github.com/4527086
strtok has quit [Ping timeout: 260 seconds]
thufir_ has joined #ruby
jaywastaken has quit [Remote host closed the connection]
strtok has joined #ruby
<thufir_> nntp.rb:24: syntax error, unexpected $end http://paste.ubuntu.com/1529708/ is this an unclosed { ?
robert__ has quit [Ping timeout: 245 seconds]
BoomCow has joined #ruby
osaut has quit [Ping timeout: 264 seconds]
JohnTeddy is now known as unstable
Goopyo has joined #ruby
Virunga has quit [Remote host closed the connection]
<shacklettbp> thufir_: You need to have 'end' at the end of your if statements
<Spaceghost|cloud> It's like people don't like reading human readable strings that explain what the issue is.
Hanmac1 has joined #ruby
afd__ has joined #ruby
<shacklettbp> thufir_: Unless I'm just seeing the first 24 lines and your program keeps going after that...
<thufir_> shacklettbp: thanks, it was copied. I thought it was missing } brace, thnakls
f03lipe has quit [Quit: Leaving]
Hanmac has quit [Ping timeout: 260 seconds]
<shacklettbp> thufir_: It is missing a } as well
jonathanwallace1 has quit [Ping timeout: 276 seconds]
cha1tanya has quit [Quit: Leaving]
<thufir_> I copied the code from http://rubydoc.info/gems/ruby-net-nntp/1.0.0/frames but can't seem to get the curly braces and end to match: http://paste.ubuntu.com/1529718/
daniel_- has quit [Ping timeout: 246 seconds]
cr3 has joined #ruby
<havenn> thufir_: end } end end
v0n has joined #ruby
<thufir_> havenn: thanks. I thought rbeautify would help me with that, but it wasn't much help.
Fezzler has joined #ruby
stkowski has quit [Quit: stkowski]
<havenn> thufir_: change the `{` and `}` to a `do` and `end` imho
<cr3> if I have def foo(a, b = nil, c = nil), is there a way to call foo with only "a" and "c"?
<havenn> thufir_: If your text editor supports auto-indentation (it should) then do ends till you are back to the margin.
f03lipe has joined #ruby
<havenn> cr3: Ruby 2.0 has a really nice solution for that with named params.
<havenn> cr3: In 1.9 you could use a hash for arguments.
<thufir_> havenn: I'm on linux. the only editor I found is http://rubygems.org/gems/ruby-beautify but am certainly open to (non-emacs) solutions.
<cr3> havenn: darn, I assumed foo(1, :c => 3), which looked nice, but that didn't work :(
<cr3> havenn: ah, so something like foo({:a => 1, :c => 3)
Playground has quit [Ping timeout: 276 seconds]
hybris has quit [Quit: hybris]
<havenn> thufir_: which distro?
VegetableSpoon has quit [Quit: Leaving]
<havenn> thufir_: Sublime Text 2 is a popular option.
AndChat| has joined #ruby
<thufir_> havenn: ubuntu. I'll check out sublime.
<havenn> thufir_: Ahh, gedit with a ruby plugin is a nice free version then.
kale_ has quit [Read error: Connection reset by peer]
<thufir_> thanks.
<havenn> thufir_: sudo add-apt-repository ppa:ubuntu-on-rails; apt-get update; apt-get install gedit-plugins gedit-gmate
<havenn> thufir_: meh, i forgot sudo's, but gedit with gmate is a good option. Might as well checkout ST2 though cause shareware.
v0n has quit [Ping timeout: 244 seconds]
tommyvyo_ has joined #ruby
<thufir_> I couldn't find that first one you suggested. I'm using RVM, that ubuntu-on-rails repo won't screw that up?
Banistergalaxy has quit [Ping timeout: 276 seconds]
imperator has joined #ruby
<havenn> thufir_: naw, it won't screw RVM up
<thufir_> havenn: thanks.
emmanuelux has quit [Quit: emmanuelux]
SCommette has joined #ruby
robert__ has joined #ruby
xsdg has joined #ruby
Fezzler has quit [Quit: Leaving]
orluke has quit [Quit: orluke]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Daman has joined #ruby
Daman has quit [Changing host]
Daman has joined #ruby
robert___ has quit [Ping timeout: 245 seconds]
gabrielrotbart has joined #ruby
DrCode has quit [Ping timeout: 276 seconds]
banister_ has quit [Ping timeout: 272 seconds]
bigmac has quit [Quit: Leaving]
timonv_ has joined #ruby
jonathanwallace1 has joined #ruby
timonv has quit [Ping timeout: 272 seconds]
timonv_ has quit [Read error: Connection reset by peer]
thufir_ has quit [Quit: Leaving.]
timonv has joined #ruby
DrCode has joined #ruby
r3nrut has joined #ruby
digitalcakestudi has quit [Quit: Leaving.]
ottohenrique has joined #ruby
ottohenrique has quit [Client Quit]
robert__ is now known as robert_
banister`sleep has joined #ruby
cakehero has joined #ruby
fir_ed has quit [Ping timeout: 272 seconds]
jonathanwallace1 has quit [Ping timeout: 264 seconds]
cakehero has quit [Max SendQ exceeded]
adkron has joined #ruby
whitedawg has joined #ruby
advorak has joined #ruby
rakuN has joined #ruby
jbw has quit [Ping timeout: 272 seconds]
noyb has quit [Ping timeout: 260 seconds]
whitedawg has quit [Quit: Leaving.]
mahmoudimus has joined #ruby
cr3 has quit [Quit: leaving]
advorak has quit [Read error: Connection reset by peer]
stevechiagozie has quit [Quit: Computer has gone to sleep.]
osaut has joined #ruby
jbw has joined #ruby
postmodern has joined #ruby
tommyvyo_ has quit [Quit: http://twitter.com/tommyvyo]
f0ster has quit [Read error: Connection reset by peer]
sharpobject has joined #ruby
osaut has quit [Ping timeout: 252 seconds]
<shevy> long live ruby!
<shevy> TIOBE here we come
tps_ has joined #ruby
<shevy> damn it ... ruby 11th only now what the ... :( http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
rippa has quit [Ping timeout: 260 seconds]
krz has joined #ruby
Astral_ has joined #ruby
reppard has quit [Ping timeout: 252 seconds]
joofsh has quit [Remote host closed the connection]
advorak has joined #ruby
amacgregor_osx_ has joined #ruby
Astralum has quit [Ping timeout: 256 seconds]
aaronmacy has quit [Quit: Leaving.]
Playground has joined #ruby
krz has quit [Quit: Leaving]
otherj has joined #ruby
krz has joined #ruby
tomzx_ has quit [Quit: tomzx_]
amacgregor_osx has quit [Ping timeout: 255 seconds]
MattRb has joined #ruby
BoomCow has quit [Quit: This computer has gone to sleep]
katherinem13 has quit [Read error: Connection reset by peer]
katherinem13 has joined #ruby
r3nrut has quit [Ping timeout: 276 seconds]
BoomCow has joined #ruby
macmartine has joined #ruby
hackerdude has joined #ruby
linoge has joined #ruby
rippa has joined #ruby
rexbutler has joined #ruby
<linoge> Hi there, which library would you recommend to graph live data in a cartesian system and work on it?
bricker is now known as bricker`LA
jaequery has joined #ruby
BoomCow has quit [Client Quit]
bricker`LA is now known as bricker
bitcrave has joined #ruby
iamjarvo has joined #ruby
<sharpobject> is there a way to use rvm on Ubuntu 12.04?
templaedhel has joined #ruby
<havenn> sharpobject: yes
<sharpobject> rvm install ruby-1.9.1-p431 fails at compilation, but running the command in `rvm notes` causes ruby-rvm to be uninstalled
<sharpobject> so perhaps I become able to compile ruby-1.9.1-p431, but certainly not able to use rvm to do it
jaequery has quit [Client Quit]
<havenn> sharpobject: Are you using apt-get? If so, don't - check out https://rvm.io
generalissimo has joined #ruby
<sharpobject> alright
<sharpobject> thanks
<rexbutler> So, once upon a time I tested the speed difference of the following three ways of representing points (as in (1,2)):
generalissimo has quit [Remote host closed the connection]
<rexbutler> arrays: [1,2]
<rexbutler> hashes: [:x => 1, :y => 2]
<havenn> sharpobject: The RVM install script works great. Another alternative is chruby: https://github.com/postmodern/chruby
<rexbutler> objects: class Point; attr_accessor x,y; end
x82_nicole has joined #ruby
bradhe has quit [Remote host closed the connection]
<rexbutler> or attr_accessor :x, etc...
jaequery has joined #ruby
aaronmacy has joined #ruby
<rexbutler> unfortunately I lost the file... anyone know what I should expect the speed differences to be?
<rexbutler> I'm just comparing using arrays vs hashes vs objects to store ordered pairs, essentially
BoomCow has joined #ruby
CodeVision has joined #ruby
kiyoura has quit [Quit: Leaving]
<rexbutler> If I remember correctly, using objects faired much better than I thought it would
kiyoura has joined #ruby
<shevy> why does this work:
timonv has quit [Read error: Connection reset by peer]
timonv has joined #ruby
<havenn> rexbutler: Depends on what you're benchmarking, I guess. Are you interested in how fast you can find a value by key lookup? Or something else?
<shevy> def foo(param); proc {}; end; x = foo(99); eval("param", x.binding) # => 99
<shevy> I dont understand where the 99 lands
WilfredTheGreat has quit [Ping timeout: 248 seconds]
<banister`sleep> shevy: that is essentially a limited case of binding_of_caller
<rexbutler> havenn: Well, I'm making a little chess program that solves checkmate in N problems... I'm not doing crazy lookup stuff. Just things like [:WHITE,:KNIGHT] vs [:COLOR => :WHITE,:PIECE => :KNIGHT] vs a simple ChessPiece object
<banister`sleep> well, not really in this case
<banister`sleep> but it can be used that way
joeycarmello has quit [Remote host closed the connection]
<banister`sleep> def foo; x = 10; bar { }; end def bar(&block); puts block.binding.eval("x"); end
gyre007 has quit [Remote host closed the connection]
<rismoney> anyone familiar with win32ole and wmi?
<banister`sleep> shevy: in that case ^, bar is accessing the binding of its caller
gyre008 has quit [Remote host closed the connection]
jfl0wers has quit [Quit: jfl0wers]
jaequery has quit [Quit: Computer has gone to sleep.]
solidresolve has joined #ruby
rippa has quit [Ping timeout: 260 seconds]
emocakes has quit [Quit: emocakes]
<rexbutler> havenn: I will have an 8x8 array of pieces, regardless, and will not be searching, just reading and writing the pieces as the various positions
karasawa has joined #ruby
Gooder` has joined #ruby
<rexbutler> at*
baroquebobcat has joined #ruby
otters has quit [Ping timeout: 272 seconds]
solidresolve has quit [Client Quit]
solidresolve has joined #ruby
jlast has quit [Remote host closed the connection]
aaronmacy has quit [Quit: Leaving.]
cgcardona has quit [Quit: zzzzz]
jlast has joined #ruby
pskosinski has quit [Ping timeout: 260 seconds]
jonathanwallace1 has joined #ruby
otherj has quit [Quit: otherj]
az7ar has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
BoomCow has quit [Quit: This computer has gone to sleep]
solidresolve has quit [Client Quit]
solidresolve has joined #ruby
dmiller has joined #ruby
toekutr has joined #ruby
krz has quit [Quit: Leaving]
jonathanwallace1 has quit [Ping timeout: 248 seconds]
whomp has joined #ruby
<whomp> i want to match an email using word boundaries, but my regex (\b.*@.*\b) captures a lot more. how can i fix it
<havenn> rexbutler: A trivial benchmark Hash and Struct are quite similar speed.
<whomp> i think i just need a couple question marks, but i'm not sure where :)
<havenn> s/A trivial/In an overly-simplistic
<havenn> rexbutler: Struct/Class or Hash both seem nice to me. Dunno!
BoomCow has joined #ruby
bradhe has joined #ruby
<rexbutler> havenn: I might try arrays, but I don't know how much difference that would make
osaut has joined #ruby
<havenn> rexbutler: sec, i'll post a better bench
aaronmacy has joined #ruby
xpen has joined #ruby
<rexbutler> havenn: I did a lot of ruby about 8 months back... now I've forgotten the syntax and how much I like it
advorak has quit [Remote host closed the connection]
<rexbutler> At least Java is fast... :)
emanu has quit [Quit: emanu]
<Spaceghost|cloud> LOL
<Spaceghost|cloud> Java can be fast. If optimized.
<Spaceghost|cloud> It's the JVM that is fast, really.
osaut has quit [Ping timeout: 276 seconds]
advorak has joined #ruby
<havenn> rexbutler: ^ class vs hash vs array vs struct
IceDragon has quit [Quit: Space~~~]
<shevy> the more characters you use in java, the faster the program will be
xpen has quit []
xpen has joined #ruby
<shevy> hmm what is better:
<shevy> def foo(i); @x = i; end # in one line
<shevy> or
<shevy> def foo(i)
<shevy> @x = i; end # that variant
<shevy> oops
<shevy> just realized, the second variant is awful
<shevy> when I look at it, I think I was omitting an end :(
<havenn> rexbutler: Looks like going from 1.9.3 to 2.0.0 matters more than the datatype for speed, by a good bit. :D
<rexbutler> havenn: Okay... but is array.first and array.last as fast as array[0] and array[1]?
<shevy> speed speed speed
<shevy> squeeze the teraflops outta your ruby scripts!
v0n has joined #ruby
<rexbutler> havenn: Of course I would do something like piece[COLOR_INDEX] and piece[PIECE_TYPE_INDEX] IE constants, but it would "compile" the same, right?
generali_ has joined #ruby
generali_ has quit [Remote host closed the connection]
<rexbutler> With 2.0 Ruby isn't 20 times slower than Java anymore, is it?
<rexbutler> (not that it was that bad before...)
xemu has quit [Quit: Nettalk6 - www.ntalk.de]
BoomCow has quit [Quit: This computer has gone to sleep]
generali_ has joined #ruby
v0n has quit [Read error: Operation timed out]
<havenn> rexbutler: Threw in OpenStruct and Array#[] and tested on 1.9.3, 2.0.0 and JRuby 1.7.2: https://gist.github.com/4527663
ananthakumaran has joined #ruby
<rexbutler> havenn: Make sure you keep this around, seems quite useful
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
<rexbutler> Wow... in 2.0.0 it doesn't seem to matter much at all
b1lly has joined #ruby
<havenn> 2.0.0 ftw
<b1lly> is ruby an interpretted language or compiled
<havenn> b1lly: the former
heyitsdave has quit [Ping timeout: 240 seconds]
<b1lly> former?
<havenn> b1lly: virtual machine
<b1lly> similar to java
<havenn> b1lly: JRuby actually runs on the JVM: http://jruby.org
<b1lly> so is ruby a jvm
<havenn> b1lly: Ruby is a language that runs on the Java Virtual Machine. It itself isn't a JVM.
bradhe has quit [Ping timeout: 272 seconds]
<havenn> b1lly: Not sure I understand the question.
Michael_ has joined #ruby
<SirFunk> Can someone look at some code for me. https://gist.github.com/e16cfeb50d3bf6fb49a9#file-order-rb-L58 It is a model I'm trying to refactor and clean up.. if I 'puts packages' at the end of that class it dumps an array (good) but if i call like o = Order.new; o.compute_packages; o.packages ... o.pacakges is nil. Since that is attr_accessor'd shouldn't packages exist through the life of the object?
<SirFunk> I think it's a scoping issue but i'm not sure what i'm doing wrong
<havenn> b1lly: JRuby is the only Ruby on the JVM. CRuby uses MRI (Matz Ruby Interpreter), Maglev uses Smalltalk, RBX uses Ruby and C++, etc.
thufir_ has joined #ruby
BoomCow has joined #ruby
<az7ar> and there is Rubinus which I think uses Ruby
<Asher> rubinius uses LLVM
jonathanwallace1 has joined #ruby
BoomCow has quit [Client Quit]
<az7ar> ok
crackfu has quit [Remote host closed the connection]
BoomCow has joined #ruby
crackfu has joined #ruby
<b1lly> theres a lot of ruby's ;/
<b1lly> so what do I need to write ruby code?
<havenn> az7ar: RBX is same as Rubinius. From their homepage: "The Rubinius bytecode virtual machine is written in C++, incorporating LLVM to compile bytecode to machine code at runtime."
<az7ar> thnx havenn I did not know that
<az7ar> I knew most of it was written in Ruby
macmartine has quit [Quit: Computer has gone to sleep.]
<havenn> az7ar: So like Asher said, but they do write as much as possible in Ruby. A great VM to look at methods with Pry!
jlast has quit [Remote host closed the connection]
niklasb has quit [Ping timeout: 264 seconds]
<az7ar> havenn,: I will try that, thnx again
<havenn> I shoulda wrote Maglev written in Smalltalk on the GemStone/S 3.1 Virtual Machine. But I'm lasy!
<havenn> s/lasy/lazy
dankest is now known as dankest|away
BoomCow has quit [Client Quit]
crackfu has quit [Ping timeout: 246 seconds]
<az7ar> havenn, how long are you working with Ruby ?
jekotia has quit [Quit: sleeeeeeeeeeeeeeeeeeeep]
adkron has quit [Ping timeout: 256 seconds]
<havenn> az7ar: 2-3 years, I think?
<rexbutler> Anyone here read the "Seven Languages in Seven Weeks" book?
emanu has joined #ruby
<havenn> az7ar: Not long I guess, but I love it!!
<thufir_> uninitialized constant OKResponse (NameError) line 9. but this script is from the documentation: http://rubydoc.info/gems/ruby-net-nntp/1.0.0/frames . http://rubydoc.info/gems/ruby-net-nntp/1.0.0/Net/NNTP/OKResponse is the class, which extends response. what does the error mean?
jlast has joined #ruby
jonathanwallace1 has quit [Ping timeout: 264 seconds]
aquagrunty has left #ruby [#ruby]
<az7ar> havenn, I guess everyone does except few of my colleagues working with php :P
jlast has quit [Ping timeout: 272 seconds]
<thufir_> uninitialized constant OKResponse (NameError) line 9. but this script is from the documentation: http://rubydoc.info/gems/ruby-net-nntp/1.0.0/frames . http://rubydoc.info/gems/ruby-net-nntp/1.0.0/Net/NNTP/OKResponse is the class, which extends response. what does the error mean? code at: http://paste.ubuntu.com/1529954/
Michael_ has quit [Remote host closed the connection]
dstywho has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
<rismoney> is there a way to append a symbol on the end of a var name? I need to do something like name.foo.:bar='test'
will has joined #ruby
will has quit [Client Quit]
<havenn> thufir_: The Constant (a module or class by convention due to camel-casing) name OKResponse has not been initialized.
<havenn> thufir_: Like: OKResponse = Net::NNTP::OKResponse
<havenn> rismoney: Normally, it'd be: name.foo[:bar] = 'test'
sedai has joined #ruby
<b1lly> how does ruby get interpretted clientside?
dankest|away is now known as dankest
bradhe has joined #ruby
krz has joined #ruby
f0ster has joined #ruby
<havenn> b1lly: You mean running on your local system or running in a browser?
<b1lly> so, is ruby a serverside language
<b1lly> or
<b1lly> clientside
joeycarmello has joined #ruby
<b1lly> running in a browser
<blazes816> serverside
sedai has quit [Quit: sedai]
<b1lly> so it's not a clientside language like javascript
adkron has joined #ruby
<blazes816> no
gyre007 has joined #ruby
<havenn> b1lly: ECMAScript family are the ONLY client-side languages. With stuff like NaCl (which barely exists, but Google is pushing it).
<b1lly> NaCI? aka dart?
<RubyPanther> That isn't true, there is is java
<ericwood> heh
<havenn> RubyPanther: Plugin land!!
<ericwood> Flash
<havenn> ericwood: ECMAScript family.
<havenn> ericwood: ActionScript
<RubyPanther> THere have been client-side LISP languages, too
<ericwood> hmm yeah, you're right
<ericwood> well, these days people can get nearly anything to compile to JS
<ericwood> Atwood's Law :P
<b1lly> so to run ruby we need a ruby compiler?
<rismoney> havenn - i can do that, because i am working with @property.PrivateProperties[:EnableNetbBIOS_to_s] = 0 where this is a type WIN32OLE
<rismoney> it needs to be @property.PrivateProperties.EnableNetBIOS = 0 for it to work
<havenn> ericwood: Heh, so true. They even ported the LLVM compiler itself to JavaScript, so you can compile in your browser. >.> http://kripken.github.com/llvm.js/demo.html
<f0ster> b1lly: well technically it's JIT compiled I believe, but yes
joeycarmello has quit [Ping timeout: 246 seconds]
<f0ster> more so interpretted
ebobby has quit [Read error: Operation timed out]
nari has quit [Ping timeout: 272 seconds]
<b1lly> JIT?
<f0ster> just in time compiliation
<b1lly> oh, so interpretted like JS
<b1lly> why were people saying it runs in a JVM?
<havenn> b1lly: http://jruby.org
crackfu has joined #ruby
<f0ster> because you can run it in a jvm
crackfu has quit [Remote host closed the connection]
<b1lly> is that what most people do?
gyre007 has quit [Ping timeout: 260 seconds]
<shevy> I dont even use java
<havenn> b1lly: Most people use MRI Ruby: http://www.ruby-lang.org/en/
<ericwood> most people don't use jruby, but it has some good use cases
<ericwood> we use it where I work for our rails app
<b1lly> MRI is?
otters has joined #ruby
<ericwood> MRI = Matz's Ruby Interpreter
<ericwood> that's the official one
<b1lly> it works on both windows and linux?
<ericwood> yes
<b1lly> im assuming different ones for each
<rismoney> is there a way i could do something like @property.PrivateProperties."#{EnableNetbBIOS}" = 0
<b1lly> hence the reason for jruby
hackerdude has quit [Remote host closed the connection]
<havenn> b1lly: It runs on toasters and inside of lisp, if you use mruby. :P
<havenn> Robots...
<ericwood> b1lly: you can compile the ruby source code on any platform pretty much
<ericwood> b1lly: jruby exists for other purposes
<havenn> Compiled bytecode ftw! https://github.com/mruby/mruby
<b1lly> for instance?
<ericwood> particularly running applications in an enterprise environment...the JVM is pretty good for that
<b1lly> havenn: mm? toasters and lisp?
<ericwood> it's actually quite fast, in many cases moreso than MRI, but all of that stuff is relative and varies depending on the application
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<b1lly> is jruby just the interpretur, or is the language slightly different
<ericwood> just an interpreter
<b1lly> like can I write something in ruby, and port it into the JVM to he interpretted
<b1lly> and vice versa with mruby
<ericwood> yes, you can just write any ruby and run it using the jruby interpreter
<ericwood> yes
<b1lly> oh great
<b1lly> thats pretty badass
<havenn> Pick the interpreter that makes your particular code the happiest.
<b1lly> so the environment in which it lives is super flexible
EPIK has quit [Ping timeout: 276 seconds]
<b1lly> so like if I start with one, 6 months later want to switch it, it's easy
<ericwood> it's trivial
kold has joined #ruby
<ericwood> the only difficulties may be in ruby gems, but there's only a handful of cases where that may be an issue so don't worry about it
osaut has joined #ruby
ebobby has joined #ruby
<b1lly> whats ruby gems? o_o
jonathanwallace1 has joined #ruby
cableray has joined #ruby
jlast has joined #ruby
<ericwood> uh oh
<ericwood> basically...libraries
hbpoison has joined #ruby
dankest is now known as dankest|away
jlwestsr has joined #ruby
<thufir_> havenn: pardon the delay in reading your response. I just read now.
AlbireoX has joined #ruby
<b1lly> so a gem is
<b1lly> a ruby library?
<b1lly> yeah
osaut has quit [Ping timeout: 276 seconds]
bradhe has quit [Ping timeout: 276 seconds]
* ericwood parts for the night
<b1lly> great success
adkron has quit [Ping timeout: 252 seconds]
<b1lly> later ericwood, thsnk
<thufir_> havenn: yes, OKresponse is a class http://rubydoc.info/gems/ruby-net-nntp/1.0.0/Net/NNTP/OKResponse. but how do I utilize it if not as shown in the sample?
MattRb has quit [Quit: This computer has gone to sleep]
stopbit has quit [Quit: Leaving]
drago757 has quit [Quit: drago757]
bradhe has joined #ruby
jonathanwallace1 has quit [Ping timeout: 246 seconds]
grotr has joined #ruby
nathancahill has joined #ruby
<havenn> thufir_: I'm guessing the gem you're using is somewhat broken? Dunno. But the OKResponse it is looking for appears to be available as: Net::NNTP::OKResponse
browndawg has joined #ruby
macmartine has joined #ruby
<havenn> thufir_: So if you run the following then the example, at least that error would go away: require 'net/nntp'; OKResponse = Net::NNTP::OKResponse
BoomCow has joined #ruby
<havenn> thufir_: I'm not familiar with that gem, is it maintained?
<b1lly> havenn: thanks for the help
<b1lly> and insight
whomp has quit [Quit: leaving]
jaequery has joined #ruby
<havenn> b1lly: no prob, happy hacking!
<thufir_> havenn: that's my concern, that it's not maintained. I don't think any NNTP gem is...
<b1lly> nomnom :D
Playground has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
hemanth has quit [Read error: Connection reset by peer]
_hemanth_ has joined #ruby
<thufir_> thanks for explaining how to "initialize" (?) the variable.
jlast has quit [Read error: Connection reset by peer]
grotr has left #ruby [#ruby]
jlast has joined #ruby
<havenn> thufir_: Yeah, most vars (local variables, constants, class variables) throw an uninitialized error if you try to call them before they've been assigned.
v0n has joined #ruby
zph has joined #ruby
<havenn> thufir_: instance variables are the exception, returning nil if called unassigned
<thufir_> assigned. ah.
robert_ has quit [Read error: Connection reset by peer]
jlast has quit [Read error: No route to host]
robert_ has joined #ruby
jlast has joined #ruby
kold has quit [Remote host closed the connection]
dankest|away is now known as dankest
drago757 has joined #ruby
tommyvyo_ has joined #ruby
zmisc has left #ruby [#ruby]
zmisc has joined #ruby
jlast has quit [Ping timeout: 264 seconds]
jaequery has quit [Quit: Computer has gone to sleep.]
jaequery has joined #ruby
AlbireoX has quit [Remote host closed the connection]
zmisc has quit [Quit: ZNC - http://znc.sourceforge.net]
v0n has quit [Ping timeout: 252 seconds]
a_a_g has joined #ruby
chrisbolton has joined #ruby
templaedhel has quit [Quit: Bye!]
a_a_g has quit [Read error: Connection reset by peer]
zmisc has joined #ruby
zmisc is now known as Guest6058
a_a_g has joined #ruby
templaedhel has joined #ruby
MattRb has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
jlast has joined #ruby
hemanth has joined #ruby
_hemanth_ has quit [Read error: Connection reset by peer]
hemanth_ has quit [Read error: Connection reset by peer]
Fretta has quit [Quit: Fretta]
hemanth_ has joined #ruby
Guest6058 is now known as zmisc
_hemanth_ has joined #ruby
zmisc has quit [Changing host]
zmisc has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
<shevy> hmmmm a block can become a Proc object. are blocks thus objects as well?
<otters> sort of
jlast has quit [Ping timeout: 252 seconds]
<shevy> cuddly otters!
n1x has joined #ruby
<otters> def foo &f; f; end
<otters> returns a Proc
freeayu has quit [Quit: 离开]
noyb has joined #ruby
freeayu has joined #ruby
hiroyuki has quit [Remote host closed the connection]
<shevy> hmm
<shevy> ohhhhhhhhh
<shevy> def foo &f; f; end; foo 'hi'
<shevy> ArgumentError: wrong number of arguments (1 for 0)
Gooder` has quit [Remote host closed the connection]
general__ has joined #ruby
generali_ has quit [Read error: Connection reset by peer]
n1x has quit [Ping timeout: 244 seconds]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
ananthakumaran has quit [Ping timeout: 252 seconds]
itsdavem has quit [Remote host closed the connection]
<shevy> oh
<shevy> "The only difference between blocks and Procs is that a block is a Proc that cannot be saved, and as such, is a one time use solution."
sleetdrop has joined #ruby
jaequery has quit [Ping timeout: 272 seconds]
ananthakumaran has joined #ruby
Mon_Ouie has joined #ruby
iamjarvo has quit [Quit: Leaving.]
delinquentme has quit [Ping timeout: 272 seconds]
jaequery has joined #ruby
jehoshua02 has joined #ruby
<havenn> def foo &f; f; end; a_proc = foo {'hi'}
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
dmiller has quit [Ping timeout: 264 seconds]
<ruzu> i remember someone mentioning yet another ruby 'manager' other than rvm/rbenv ... anyone know of it?
<jehoshua02> a_proc.is_a?(String)
<zph> ruzu: chruby?
<shevy> ruzu hmm no real idea
<postmodern> ruzu, probably chruby
potstickr has joined #ruby
osaut has joined #ruby
shacklettbp has quit [Quit: leaving]
bradhe has quit [Remote host closed the connection]
squidBits has quit [Quit: squidBits]
<havenn> ruzu: chruby is awesome: https://github.com/postmodern/chruby
<ruzu> that's it... and hey, google points me to postmodern's github. :D
mahmoudimus has joined #ruby
<otters> is chruby better than rvm
w|t is now known as justin___
<postmodern> otters, it depends on what you're looking for in a ruby manager/switcher
<ruzu> i think 'better' is ill-defined in this context
<otters> :P
dmiller has joined #ruby
osaut has quit [Ping timeout: 240 seconds]
jlast has joined #ruby
<potstickr> I have an array myarray containing path strings. I know that one of the strings is "/one/two/three". myarray.include?("/one/two/three") returns true. I get the output of Pathname p.realpath in a variable, which when printed is "/one/two/three". But myarrary.include?(p.realpath) returns false. What am I doing wrong?
wargasm has quit [Ping timeout: 260 seconds]
ben_ has quit [Quit: ben_]
<jehoshua02> Is p.realpath a type that include? understands?
tommyvyo has quit [Quit: http://thomasvendetta.com]
tommyvyo_ is now known as tommyvyo
<jehoshua02> (new to ruby so I don't actually know ...)
timonv_ has joined #ruby
timonv has quit [Read error: Connection reset by peer]
justin___ is now known as just_whac
<ruzu> maybe it's checking on the object include rather than the string value?
dhruvasagar has joined #ruby
<potstickr> @jehoshua02 I don't know.
<jehoshua02> potstickr: puts "/one/two/three" == p.realpath
<jehoshua02> It's an array, and you can put anything in an array, so include? shouldn't care.
<potstickr> Yeah 'p p.realpath' returns /one/two/three.
<az7ar> myarray.include?(p.realpath.to_s) ... would that work ?
<jehoshua02> Does `p p.realpath` perform some kind of conversion? Like to_s
<potstickr> @az7ar Yes!
<potstickr> Thank you.
<jehoshua02> thought that would work.
<ruzu> -_-
<jehoshua02> So p.realpath isn't a string like "/one/two/three"
blazes816 has quit [Quit: blazes816]
lae has joined #ruby
just_whac is now known as w|t
<jehoshua02> I'm reading through all the ruby docs I can find ... lots for the newcomer, but is there anything for a newcomer continuing up to expert?
<potstickr> @jehoshua02, in the debugger, doing 'l v', it looks like this: p.realpath => #<Pathname:/one/two/three>
<potstickr> Thanks!
zph has quit [Quit: Computer has gone to sleep.]
sayan has joined #ruby
<jehoshua02> potstickr: ... which explains why it won't compare equal to a string.
<jehoshua02> ruby doesn't do type conversion in it's comparisons.
<jehoshua02> one reason I love it.
noyb has quit [Ping timeout: 252 seconds]
neurotec_ has joined #ruby
<potstickr> Yeah, I'm a real newb.
f0ster has quit [Read error: Connection reset by peer]
<jehoshua02> (as opposed to another programming language I use everyday at work)
lae has quit [Read error: Operation timed out]
<jehoshua02> potstickr: welcome to ruby! I just started learning last weekend.
jlast has quit [Read error: Connection reset by peer]
jlast_ has joined #ruby
neurotech has quit [Ping timeout: 264 seconds]
coderhut has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
akemrir has joined #ruby
jaequery has quit [Ping timeout: 272 seconds]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
jlast_ has quit [Ping timeout: 264 seconds]
subbyyy_ has quit [Quit: none 0.3.9.2]
<jehoshua02> Hmm ... ri and RDoc ... do the pros use these rather than online docs?
Fretta has joined #ruby
jaequery has joined #ruby
<shevy> nah
<rking> jehoshua02: Online docs are nice because you can paste the URLs to people, but generally the pros do: gem install pry-plus then run commands like: ? [].pop
<rking> ? Hash#merge
<rking> etc.
<shevy> I actually collect documentation locally jehoshua02, with coloured examples and such (unfortunately not in english, I store this all in simplified german)
potstickr has quit [Quit: Leaving.]
<Mon_Ouie> Compare the output of ri Regexp and Pry's ? Regexp though
<shevy> a bit like that old perl cookbook
drago757 has quit [Quit: drago757]
timonv_ has quit [Read error: Connection reset by peer]
<shevy> http://pleac.sourceforge.net/pleac_ruby/index.html <-- but this is very outdated
timonv has joined #ruby
<shevy> a = "To be or not to be"; b = a.unpack("x6 A6")
rexbutler has quit [Quit: Ex-Chat]
deception has joined #ruby
karupanerura has quit [Excess Flood]
amacgregor_osx has joined #ruby
clooth has quit [Quit: clooth]
Fretta has quit [Ping timeout: 255 seconds]
jaequery has quit [Ping timeout: 252 seconds]
<jehoshua02> What about things like testing, autoloading, organizing class files, etc. Things that don't seem to fit in official documentation.
kiyoura has quit [Quit: Leaving]
<shevy> matz hates autoload
<shevy> for classes, the simplest thing is to put one class into one .rb file
karupanerura has joined #ruby
<jehoshua02> How to namespace?
<shevy> most will use modules
<shevy> module Foo; class Bar
<shevy> Foo::Bar.new
DrCode has quit [Ping timeout: 276 seconds]
<shevy> jehoshua02 in ruby you ought to find a lot your own style of poetry
robert__ has joined #ruby
amacgregor_osx_ has quit [Ping timeout: 248 seconds]
DrCode has joined #ruby
jaequery has joined #ruby
<jehoshua02> It's always things like organizing and loading files that seem to become tedious though. Just wondering what rubyists are commonly doing.
deception has quit [Quit: Page closed]
S2kx has quit [Quit: Leaving]
osaut has joined #ruby
BoomCow has quit [Quit: This computer has gone to sleep]
robert_ has quit [Ping timeout: 276 seconds]
Shrink has quit [Read error: Connection reset by peer]
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
<havenn> jehoshua02: Gem-style structure is a common one: http://docs.rubygems.org/read/chapter/24
Onii-san|DoYouEv is now known as Onii-san
dmiller has quit [Ping timeout: 264 seconds]
ebobby has quit [Ping timeout: 264 seconds]
macmartine has quit [Quit: Computer has gone to sleep.]
<havenn> jehoshua02: A good start is: bundle gem gem-name-here
osaut has quit [Ping timeout: 264 seconds]
<shevy> jehoshua02 well they follow a simple structure
<shevy> jehoshua02 for example, when a gem installs a .gem file, it puts things into ruby's sitedir
tagrudev has joined #ruby
<shevy> and for this, most projects will have a base layout of: (if the project name is foobar) foobar.rb and also foobar/ directory
chrisbolton has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<shevy> so when you then, in one of your project, do require 'foobar', it will load the foobar.rb file first, which can then load the other files inside the foobar/ directory
<shevy> jehoshua02 best download a gem and unpack it via "gem unpack *.gem" and look inside
<havenn> Hrmm, hadn't seen this before, but kinda cool idea of a 'dummy gem': https://github.com/goncalossilva/dummy
aaronmacy has quit [Quit: Leaving.]
<jehoshua02> shevy: I've been peeking at sass, since that is something I've used and am familiar with what it does.
havenn has quit [Remote host closed the connection]
ananthakumaran has quit [Quit: Leaving.]
<shevy> hmm I dont know sass
<shevy> let me look at the gem content
Chryson has quit [Quit: Leaving]
<jehoshua02> shevy: you do web development? CSS?
<shevy> jehoshua02 in a limited form, yes
scruple has quit [Quit: Leaving]
dankest is now known as dankest|away
<shevy> one day I am going to write my own webframework because I am too lazy to learn rails
<jehoshua02> Sass is a preprocessor.
<jehoshua02> Hahaha
<shevy> or perhaps I will use sinatra, no idea yet
akemrir has quit [Quit: WeeChat 0.3.9.2]
<shevy> it seems a bit sparse though
<jehoshua02> "I'm too lazy ... so I'll write a framework!"
<shevy> jehoshua02 well, it can be done differently. like you add little snippets every ~3rd day
<jehoshua02> I know what you mean.
<shevy> and after 3 years you have a few useful things... you know, like php got started?
<shevy> ok so... sass has this structure:
<shevy> bin/ extra/ init.rb/ lib/ rails/ test/ vendor
linoge has quit [Read error: Connection reset by peer]
<shevy> hmm I think rails/ is rare to see. lib/ is the most common... test/ is also common... bin/ also sometimes
jlast has joined #ruby
<shevy> the first thing you should do is, look inside lib/
<shevy> you will see sass.rb and sass/ like I told you right? name "foobar" will become -> foobar.rb and foobar/
linoge has joined #ruby
<shevy> inside that sass.rb file are a few requires, like:
<shevy> require 'sass/logger'
<shevy> require 'sass/util'
<shevy> you see he omitted the .rb ending, but this will load sass/logger.rb and sass/util.rb most likely
jlwestsr has quit [Quit: Ex-Chat]
<shevy> I tend to include the .rb ending for in-project .rb files
<jehoshua02> Right.
<shevy> ok, that is basically 80% of the directory structure you have to remember
<shevy> name/ + name.rb
<shevy> the rest is just fancy add-ons to that...
<shevy> like, where to put documentation... hmm
Spami has joined #ruby
<shevy> I put this into doc/ or documentation/ usually
<jehoshua02> In PHP I'm using composer, and my namespaces match file paths.
<jehoshua02> So I find organizing class files to be very comfortable.
<shevy> ah yes
JohnBat26 has joined #ruby
<shevy> ruby follows a similar convention
<shevy> if Foo::Bar::Bla.new
<shevy> the directory structure may become foo/bar/bla.rb
blaxter|2 has joined #ruby
Goopyo has quit [Quit: Goopyo]
<jehoshua02> What about class names? Camel case?
<shevy> but I think this only pays off for large projects
<shevy> jehoshua02, you must remember that a class name must start with upcased character
thufir_ has quit [Quit: Leaving.]
<shevy> class Foo is valid syntax. class foo is never valid.
<jehoshua02> Right.
<shevy> so since the first word is always uppercased, most people tend to do camel case just like that
<shevy> class FooBar
<shevy> class RemoveDirectory
<shevy> and usually the file name with underscore _
<shevy> foo_bar.rb
<shevy> remove_directory.rb
<jehoshua02> I was going to ask.
<shevy> I think there are not many alternatives to that
<shevy> you could of course try:
<shevy> RemoveDirectory.rb
<shevy> but someone once complained to me when I tried that in a project, so I gave that up...
<Mon_Ouie> I think stdlib tends to do removedirectory.rb
<jehoshua02> In PHP I use CamelCase file names to match the classes.
<shevy> can you give one example for that, including the .php filename?
<jehoshua02> FooBar.php
whowantstolivefo has joined #ruby
<jehoshua02> I like to juggle as few naming conventions as possible.
<jehoshua02> FooBar.php would contain the FooBar class.
<jehoshua02> Foo/Bar.php would contain class Bar under namespace Foo
<jehoshua02> And Foo.php would contain the abstract class Foo
jlast has quit [Read error: No route to host]
<jehoshua02> At least, that's something I like to do.
jlast has joined #ruby
dankest|away is now known as dankest
<jehoshua02> But in ruby there aren't namespaces or autoloading. So I just have modules requiring other parts.
<shevy> hmm
vlad_starkov has joined #ruby
<jehoshua02> I also liked the use statement. Is there anything like that in ruby?
<shevy> not sure... dont think so. what does use do?
<shevy> you should be able to reassign module names
<jehoshua02> ... basically ... aliases a namespace or class
<jehoshua02> Ha. There is an alias in ruby isn't there?
solidresolve has quit [Remote host closed the connection]
<shevy> module Foo;class Bar;end;end; y = Foo; y::Bar.new
<Mon_Ouie> Yes, but that's for for methods and global variables
<Mon_Ouie> for*
solidresolve has joined #ruby
jlast has quit [Ping timeout: 252 seconds]
nomenkun has joined #ruby
friskd has joined #ruby
<shevy> jehoshua02 you can avoid typing the full namespace if you do "include NameOfModule", in the example above with module Foo, you can do include Foo
<jehoshua02> Man, I love ruby Arrays ... so nice.
<shevy> yeah
<shevy> array[0,5] string[0,5] it works!
<Mon_Ouie> That must change, coming from a language which doesn't quite have arrays :p
<shevy> I think the latter is $string[0:5] in php
nomenkun has quit [Remote host closed the connection]
<shevy> php merged together array and hashes. I am still not sure if this was a good idea or a bad idea
<jehoshua02> Bad
<Mon_Ouie> Just imagine the amount of wasted memory
<jehoshua02> There's no way to tell if you are working with one or the other.
<jehoshua02> Unless you scan the whole array.
<jehoshua02> You can sample. But that is just a bandaid.
<shevy> aha
<shevy> well I liked the idea of simplifying things
<shevy> I just can't stand php's syntax though
<jehoshua02> I only like PHP because it's what introduced me into programming. It also pays the bills.
<shevy> hehe
<jehoshua02> But I have to say I've matured.
<shevy> I had an easier time using php than perl :)
nomenkun has joined #ruby
<shevy> there is something profoundly strange with perl... it is as if the brain does not want to remember it for too long
dmerrick has joined #ruby
<jehoshua02> Ruby is like a breath of fresh air.
<jehoshua02> I love ranges.
<jehoshua02> I love that everything is an object.
<jehoshua02> Even nil
<jehoshua02> Can't tell you how many times I've written `if ($someStupidVar === null)`
ebobby has joined #ruby
<jehoshua02> Or `if (is_array($someStupidVar))`
<shevy> jehoshua02 yeah well
<shevy> in ruby it could be:
<jehoshua02> Or how many times I've frowned because of type conversion during comparison.
<shevy> if object.is_a? Array
<jehoshua02> I love that.
<jehoshua02> object.nil?
<shevy> yeah
<jehoshua02> Or this blew me away: [0, 1, 4, 2, 2, 1].count(2) # 2
<jehoshua02> Blew my mind!
mafolz has joined #ruby
<shevy> hehe
<jehoshua02> In PHP I'd have to loop the array
solidresolve has quit [Remote host closed the connection]
<shevy> jehoshua02 ruby is simplified english poetry
tonini has joined #ruby
<shevy> but I think ruby as a whole is also too complex
<jehoshua02> I think it's consistency makes up for that.
<jehoshua02> It's predictable.
<jehoshua02> PHP is so inconsistent in it's core.
<shevy> consistency is a really great thing, though a few inconsistencies are in ruby too as far as I know
DrCode has quit [Remote host closed the connection]
<shevy> php is like the ultimate melting pot. 100 different cooks
<shevy> "there is more than one way to do it - and we of the php team can not remember all the ways we added years ago"
ViPi has joined #ruby
<jehoshua02> That's a good way to put it.
<shevy> if matz would become ill, and could no longer evolve ruby, people would notice the difference
<shevy> if php would replace 100% of its core developers with new ones, no one would notice any difference at all
<shevy> it's like how perl today is no longer the same when larry was younger
bradhe has joined #ruby
<jehoshua02> So you're saying that ruby is in a fragile situation?
<jehoshua02> Ah, crap. Gotta work tomorrow. Need sleep.
<jehoshua02> Nice chatting with you.
djdb has joined #ruby
<shevy> jehoshua02 nah not in a fragile situation, in a different one
<shevy> it's one thinker in charge, vs. several different thinkers
Monie has joined #ruby
Jamone has joined #ruby
<jehoshua02> I like it. I just wish I could pry into that treasure chests of thoughts and fully understand it.
Jamone has quit [Client Quit]
DrCode has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
jehoshua02 has left #ruby [#ruby]
<rking> Hrm, I need a bit of help simplifying this: h = {a:1, b:2}; h = h.merge b: h[:b].to_s
clooth has joined #ruby
<rking> Oh goodness. Nevermind. ☺
bluOxigen has joined #ruby
nanothief has joined #ruby
robustus has quit [Ping timeout: 248 seconds]
jaequery has quit [Quit: Computer has gone to sleep.]
<shevy> ack
nimred has quit [Quit: leaving]
robustus has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
statarb3 has joined #ruby
statarb3 has joined #ruby
piotr_ has joined #ruby
haxrbyte has joined #ruby
blaxter|2 is now known as blaxter
haxrbyte_ has joined #ruby
osaut has joined #ruby
ViPi has quit [Quit: Computer has gone to sleep.]
jlast has joined #ruby
jaequery has joined #ruby
Elhu has joined #ruby
traph has joined #ruby
haxrbyte has quit [Ping timeout: 264 seconds]
bigkevmcd has joined #ruby
clocKwize has joined #ruby
robert___ has joined #ruby
robert___ has joined #ruby
robert___ has quit [Changing host]
arkiver has joined #ruby
osaut has quit [Ping timeout: 264 seconds]
SCommette has quit [Quit: SCommette]
baroquebobcat has quit [Quit: baroquebobcat]
apeiros has quit [Remote host closed the connection]
jean-louis has quit [Ping timeout: 264 seconds]
robert__ has quit [Ping timeout: 276 seconds]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
headius has joined #ruby
jlast_ has joined #ruby
jlast has quit [Read error: Connection reset by peer]
a_a_g has quit [Read error: Connection reset by peer]
cableray has quit [Quit: cableray]
a_a_g has joined #ruby
MattRb has quit [Quit: This computer has gone to sleep]
beliveyourdream has joined #ruby
bluOxigen has quit [Ping timeout: 276 seconds]
aytch has quit [Remote host closed the connection]
aytch has joined #ruby
bluOxigen has joined #ruby
zmisc has quit [Remote host closed the connection]
jlast_ has quit [Ping timeout: 244 seconds]
Phoop has joined #ruby
friskd has quit [Quit: friskd]
headius has quit [Quit: headius]
bigkevmcd has quit [Quit: outta here]
aytch has quit [Ping timeout: 264 seconds]
bigkevmcd has joined #ruby
aaronmacy has joined #ruby
cableray has joined #ruby
jaequery has quit [Quit: Computer has gone to sleep.]
<traph> does anybody have a problem with installing from the rubygems repository?
zommi has joined #ruby
templaedhel has quit [Ping timeout: 244 seconds]
hbpoison has quit [Ping timeout: 252 seconds]
emanu has quit [Quit: emanu]
nomenkun has quit [Remote host closed the connection]
Morkel has joined #ruby
fivetwentysix has joined #ruby
<fivetwentysix> Hi, I'm having trouble emulating tar -zxf filename in ruby.
mercwithamouth has quit [Ping timeout: 276 seconds]
<Spaceghost|cloud> shevy: About PHP and consistency, it doesn't adhere to the principle of least surprise.
<fivetwentysix> Currently trying: Zlib::GzipReader.open('sample.tar.gz')
<fivetwentysix> But that doesn't work.
<Spaceghost|cloud> fivetwentysix: Are you shelling out or using... oh
andrewhl has quit [Remote host closed the connection]
fatninja has left #ruby [#ruby]
<Spaceghost|cloud> It's a tar'd file with gzip, is the zlib compression library gem the right tool?
<fivetwentysix> but in shell when i do tar -zxf sample.tar.gz it successfully extracts a file
vlad_starkov has quit [Remote host closed the connection]
<Spaceghost|cloud> Don't shell out.
andrewhl has joined #ruby
eldariof-office has joined #ruby
hbpoison has joined #ruby
andrewhl has quit [Remote host closed the connection]
horofox_ has joined #ruby
<fivetwentysix> Spaceghost|cloud: Doesn't seem to help me, running zlib::GzipReader.open… raises Zlib::GzipFile::Error: not in gzip format
afd__ has quit [Read error: Operation timed out]
<Spaceghost|cloud> fivetwentysix: You should help me fix my code by only seeing the errors too!
filipe has joined #ruby
<fivetwentysix> Spaceghost|cloud: i want to upload this sample file somewhere, got an idea?
Spami has quit [Quit: This computer has gone to sleep]
havenn has joined #ruby
<fivetwentysix> Spaceghost|cloud: https://dl.dropbox.com/u/93426573/sample.tar.gz
<fivetwentysix> How do you uncompress that file with ruby?
coderhut has quit [Ping timeout: 245 seconds]
a_a_g has quit [Read error: Connection reset by peer]
timonv has quit [Remote host closed the connection]
a_a_g has joined #ruby
<fivetwentysix> I've been trying for 2 hours and I'm totally lost
timonv has joined #ruby
horofox_ has quit [Client Quit]
<Spaceghost|cloud> fivetwentysix: I'm not writing code for you. That would require my consulting rate, which requires 2 hours of pay minimum.
Elhu has quit [Quit: Computer has gone to sleep.]
slainer68 has joined #ruby
<Spaceghost|cloud> Show me your code.
<fivetwentysix> Spaceghost|cloud: Zlib::GzipReader.open('sample.tar.gz')
<fivetwentysix> lol
<Spaceghost|cloud> So have you used your unix-y system to make sure the file truly is a gunzip file?
dankest has quit [Quit: Leaving...]
<fivetwentysix> tar -zxf sample.tar.gz works
aganov has joined #ruby
<Spaceghost|cloud> I can name a jpg image .porn but that doesn't mean it's a porn file. (It usually is)
wargasm has joined #ruby
<Spaceghost|cloud> fivetwentysix: Yes, and tar is a smart program.
slainer68 has quit [Remote host closed the connection]
<fivetwentysix> Spaceghost|cloud: hmm
<fivetwentysix> Spaceghost|cloud: what should i do?
emergion has joined #ruby
zigomir has joined #ruby
jlast has joined #ruby
etcetera has joined #ruby
<Spaceghost|cloud> fivetwentysix: http://unixhelp.ed.ac.uk/CGI/man-cgi?file
<etcetera> anyone know the rationale behind jekyll's chard coding time stamps into the filename?
timonv has quit [Ping timeout: 248 seconds]
<etcetera> hard*
<havenn> etcetera: As a method of cache expiration, I'd guess.
a_a_g has quit [Read error: Connection reset by peer]
<etcetera> havenn: cache expiration?
a_a_g has joined #ruby
<etcetera> not the content output, the original markdown.
<fivetwentysix> Spaceghost|cloud: sample.tar.gz: UTF-8 Unicode (with BOM) text, with CRLF line terminators (Zip archive data, at least v2.0 to extract)
kil0byte has joined #ruby
<havenn> etcetera: Servers cache the files that you are serving up, so if you want to ensure that you are serving up the latest version, you bump the filename which invalidates the cache.
<Spaceghost|cloud> Zip data archive, hm.
<etcetera> havenn: how does that have anything to do with the markdown?
<Spaceghost|cloud> fivetwentysix: I don't know what it is. Check against a gzip file you make yourself.
<Spaceghost|cloud> using `gunzip` directly.
Elhu has joined #ruby
jlast has quit [Read error: No route to host]
jlast has joined #ruby
<fivetwentysix> x.tar.gz: POSIX tar archive (gzip compressed data, from Unix, last modified: Mon Jan 14 16:12:09 2013)
<fivetwentysix> Spaceghost|cloud: ^
kil0byte_ has joined #ruby
<fivetwentysix> it's cuz microsoft gave me this damn compressed stuff
<Spaceghost|cloud> See the difference then?
<fivetwentysix> Spaceghost|cloud: doesn't solve my problem
<fivetwentysix> I still have no clue how to uncompress it in ruby
Elhu has quit [Client Quit]
<Spaceghost|cloud> Might want to do this: Shell out and tar -xvf blarg -O | gunzip_invocation_here
f03lipe has quit [Read error: Connection reset by peer]
<Spaceghost|cloud> Wrap that in a class called Gunzip::FileFixer
<Spaceghost|cloud> Then use that code as necessary to create proper gunzip files.
<havenn> etcetera: Oh, I thought you meant cache busting timestamps in the filenames themselves... nvm!!
bradhe has joined #ruby
<etcetera> havenn: nope.
<havenn> etcetera: gotcha
jlast has quit [Ping timeout: 252 seconds]
<Spaceghost|cloud> fivetwentysix: That's not something you want to have to use, but you can use a rescue to make a proper file and now you have a reusable bit of code.
jprovazn has joined #ruby
kil0byte has quit [Ping timeout: 264 seconds]
<Spaceghost|cloud> I don't like shelling out because it ruins the awesome of cross-platform code by using those nice libs, but you gotta do what you gotta do.
f03lipe has joined #ruby
<Spaceghost|cloud> fivetwentysix: Basically, shell out to untar the gunzip file and pipe the output over stdout into gunzip to create the same file again.
<fivetwentysix> Spaceghost|cloud: that completely sucks
<Spaceghost|cloud> fivetwentysix: Hey, at least it's an anwer.
hbpoison has quit [Ping timeout: 276 seconds]
<Spaceghost|cloud> answer.
<Spaceghost|cloud> fivetwentysix: What software made that archive?
<fivetwentysix> Spaceghost|cloud: Microsoft adCenter
serhart has quit [Quit: Leaving.]
<Spaceghost|cloud> fivetwentysix: Is that a program?
<fivetwentysix> Which also completely sucks :-)
<Spaceghost|cloud> Or a service?
<fivetwentysix> It's an API
<fivetwentysix> or platform
<Spaceghost|cloud> fivetwentysix: Yeah, it's your sad day, but that's the best explanation of an alternative.
<Spaceghost|cloud> You can make it more cross platform if you like.
<fivetwentysix> doesn't need to be cross platform
<Spaceghost|cloud> Welcome to file manipulation in ruby when someone decides to be an asshat. :D
<fivetwentysix> but the format comes out like this:
<Spaceghost|cloud> There isn't a club, but we do have consolation lollipops.
<fivetwentysix> x 207313230.csv"Report Name: AdPerformanceReport_01_14_2013_12_11_12"
<fivetwentysix> "Report Time: 2013"
<fivetwentysix> "Time Zone: (GMT-08:00) Pacific Time (US & Canada); Tijuana"
<fivetwentysix> "Last Completed Available Day: 1/14/2013 5:00:00 AM (GMT)"
<fivetwentysix> "Last Completed Available Hour: 1/14/2013 5:00:00 AM (GMT)"
<fivetwentysix> "Report Aggregation: Yearly"
<fivetwentysix> "Report Filter: "
<fivetwentysix> "Potential Incomplete Data: true"
<Spaceghost|cloud> Dude./....
<fivetwentysix> "Rows: 0"
<fivetwentysix> "AdId","Clicks","Spend","Impressions"
emergion has quit [Quit: Computer has gone to sleep.]
<fivetwentysix> "©2013 Microsoft Corporation. All rights reserved. "
<Spaceghost|cloud> You're kidding, right?
<fivetwentysix> How would I parse the first line?
<Spaceghost|cloud> Gist that shit.
<Spaceghost|cloud> Don't do >3 line pastes.
<Spaceghost|cloud> I don't do anything >1 myself.
<fivetwentysix> okay
<Spaceghost|cloud> fivetwentysix: You're going to need to open the file using the File api.
<fivetwentysix> I thought Colloquy would have auto gist
<Spaceghost|cloud> Read in the first line and close the file.
<Spaceghost|cloud> Notice how I'm reasoning about the problem? Go try that, you'll have a better time. :D
grzywacz has joined #ruby
punkrawkR has joined #ruby
f03lipe has quit [Read error: Connection reset by peer]
f03lipe has joined #ruby
xandy is now known as xAndy
osaut has joined #ruby
beiter has joined #ruby
Xeago has joined #ruby
jds_ has joined #ruby
<havenn> fivetwentysix: Though dated, Minitar implemented in pure Ruby seems to untar well (works on my machine, ahem, with the one file I tested it with).
<Spaceghost|cloud> That's an option!
banister`sleep has quit [Ping timeout: 255 seconds]
<Spaceghost|cloud> I'd still repair the files either way. Untar and put it into an IO object that you feed into an object that writes a proper archive,.
robert__ has joined #ruby
robert__ has joined #ruby
robert__ has quit [Changing host]
banister`sleep has joined #ruby
<Spaceghost|cloud> Basically, do the shell thing with minitar, and IO objects.
jimmyy has joined #ruby
<fivetwentysix> Spaceghost|cloud: I don't really care about any of that, I just want to shove the data into my database.
jonahR has quit [Quit: jonahR]
<Spaceghost|cloud> fivetwentysix: k
<Spaceghost|cloud> Then I won't bother much in the future.
<Spaceghost|cloud> It's like maybe 8 lines of code.
ryanf has quit [Quit: leaving]
robert___ has quit [Ping timeout: 245 seconds]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
b1lly has left #ruby [#ruby]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
JarJarBinks has joined #ruby
ViPi has joined #ruby
banister`sleep has quit [Ping timeout: 252 seconds]
toekutr has quit [Remote host closed the connection]
kil0byte has joined #ruby
banister`sleep has joined #ruby
jlast has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
general__ has quit [Remote host closed the connection]
a_a_g has joined #ruby
kil0byte_ has quit [Ping timeout: 252 seconds]
pen has quit [Remote host closed the connection]
hbpoison has joined #ruby
maxmanders has joined #ruby
linoge has quit [Read error: Connection reset by peer]
[Neurotic] has quit [Remote host closed the connection]
linoge has joined #ruby
havenn has quit [Remote host closed the connection]
krzkrzkrz has joined #ruby
bradhe has quit [Remote host closed the connection]
jlast has quit [Read error: Connection reset by peer]
TheFuzzball has joined #ruby
jlast_ has joined #ruby
krz has quit [Ping timeout: 276 seconds]
krzkrzkrz is now known as krz
virtuose has joined #ruby
jlast_ has quit [Read error: Connection reset by peer]
jlast has joined #ruby
nomenkun has joined #ruby
hbpoison has quit [Ping timeout: 246 seconds]
gyre008 has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
akl_ has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
ILYG has joined #ruby
zarubin has joined #ruby
Elhu has joined #ruby
banister`sleep has quit [Ping timeout: 264 seconds]
a_a_g has joined #ruby
<ILYG> hi guys !
jlast has quit [Ping timeout: 264 seconds]
osaut has quit [Quit: osaut]
LouisGB has joined #ruby
<ILYG> who can help me ?
<ILYG> my ruby is not work
<Sp4rKy> ILYG: we'll need a bit more informations :)
<Mon_Ouie> Ruby is not work, Ruby is fun!
<ILYG> sad
<ILYG> Could not find rake-10.0.2 in any of the sources
<ILYG> Run `bundle install` to install missing gems.
Spami has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
<ILYG> but when i Run bundle install , it sad
<ILYG> Could not locate Gemfile
zarubin has quit [Read error: Connection reset by peer]
pen has joined #ruby
zarubin has joined #ruby
<ILYG> :'( , help me please .........
<Sp4rKy> do you run bundle install from the source root directory ?
akl_ has quit [Remote host closed the connection]
zarubin has quit [Client Quit]
<Sp4rKy> ILYG: you need to be more patient, IRC is not a real-time synchronous process
osaut has joined #ruby
<ILYG> Sp4rKy: root directory ?
<ILYG> Sp4rKy: is /# ?
<Sp4rKy> ILYG: no, the "base" directory of your sources
kil0byte_ has joined #ruby
<ILYG> i`ll try
main has joined #ruby
razibog has joined #ruby
<ILYG> something is happend , i think it`s work
<ILYG> Sp4rKy: Thanks
kil0byte has quit [Ping timeout: 276 seconds]
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
jean-louis has joined #ruby
sporkbomb has quit [Read error: Connection reset by peer]
sporkbomb has joined #ruby
jimmyy has quit [Ping timeout: 276 seconds]
blaxter has quit [Ping timeout: 246 seconds]
jimeh has joined #ruby
jds_ has quit [Remote host closed the connection]
yacks has joined #ruby
sleetdro_ has joined #ruby
lirimaery has quit [Quit: Lost terminal]
hoelzro|away is now known as hoelzro
sleetdrop has quit [Ping timeout: 255 seconds]
etcetera has quit []
mikecmpbll has joined #ruby
horofox_ has joined #ruby
jimmyy has joined #ruby
blacktulip has joined #ruby
buscon has joined #ruby
zz_chrismcg is now known as chrismcg
ExxKA has joined #ruby
osaut has quit [Quit: osaut]
bradhe has joined #ruby
hbpoison has joined #ruby
RagingDave has joined #ruby
blaxter has joined #ruby
sleetdro_ has quit [Remote host closed the connection]
<Xeago> bargh
TomyLobo has quit [Quit: Standby mode...]
<Xeago> ridiculous, I left for commute 75 minutes before I was supposed to
<Xeago> I still arrived 15 minutes late
<Xeago> stupid public transit
dawkirst has joined #ruby
horofox_ has quit [Quit: horofox_]
sleetdrop has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
hemanth_ has joined #ruby
robotmay has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
gyre008 has quit [Remote host closed the connection]
ebobby has quit [Quit: Lost terminal]
reinaldob has joined #ruby
Donkeycoder has joined #ruby
<ILYG> Xeago: where u r ?
hbpoison has quit [Ping timeout: 244 seconds]
hbpoison has joined #ruby
Guedes_out is now known as Guedes
Vainoharhainen has joined #ruby
S1kx has joined #ruby
tatsuya_o has joined #ruby
<Xeago> sweden
<Xeago> about 30km north of stockhlom
a_a_g has quit [Read error: Connection reset by peer]
dwu2 has quit [Quit: Leaving.]
a_a_g has joined #ruby
slainer68 has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
elaptics`away is now known as elaptics
a_a_g has joined #ruby
rdark has joined #ruby
arturaz has joined #ruby
ephemerian has joined #ruby
bricker is now known as bricker`LA
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
emergion has joined #ruby
adambeynon has joined #ruby
bradhe has quit [Ping timeout: 256 seconds]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
buibex has joined #ruby
timonv has joined #ruby
hotovson has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
emergion has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
sayan has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
jonathanwallace1 has joined #ruby
rakuN has quit [Ping timeout: 272 seconds]
aapzak_ has quit [Ping timeout: 252 seconds]
emergion has joined #ruby
DaZ is now known as podwodna_cywiliz
rakuN has joined #ruby
podwodna_cywiliz is now known as DaZ
aapzak has joined #ruby
MissionCritical has quit [Ping timeout: 255 seconds]
jlast has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
cableray has quit [Quit: cableray]
timmow has joined #ruby
rakuN has quit [Ping timeout: 272 seconds]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
jlast has quit [Ping timeout: 252 seconds]
rakuN has joined #ruby
RagingDave has quit [Read error: Connection reset by peer]
RagingDave has joined #ruby
dmerrick has quit [Quit: dmerrick]
Mission-Critical has joined #ruby
JonnieCache has joined #ruby
kil0byte has joined #ruby
f03lipe has quit [Quit: Leaving]
workmad3 has joined #ruby
pen has quit [Remote host closed the connection]
kil0byte_ has quit [Ping timeout: 255 seconds]
chrisbolton_ has joined #ruby
sayan has joined #ruby
sayan has quit [Read error: Connection reset by peer]
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
jimmyy has quit [Remote host closed the connection]
bradhe has joined #ruby
timmow has quit [Quit: has left the building]
buscon has quit [Remote host closed the connection]
gyre007 has joined #ruby
swex_ has joined #ruby
wallerdev has quit [Quit: wallerdev]
retro|cz has quit [Ping timeout: 248 seconds]
swex has quit [Ping timeout: 248 seconds]
stetho has joined #ruby
dawkirst has quit [Read error: Connection reset by peer]
Mission-Critical is now known as MissionCritical
s1n4 has joined #ruby
buscon has joined #ruby
r0bby has joined #ruby
robbyoconnor has quit [Disconnected by services]
r0bby is now known as robbyoconnor
jimmyy has joined #ruby
beiter has quit [Quit: beiter]
chrisbolton_ has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
jimmyy has quit [Remote host closed the connection]
a_a_g has quit [Read error: Connection reset by peer]
Spami has quit [Ping timeout: 255 seconds]
MissionCritical has quit [Ping timeout: 248 seconds]
a_a_g has joined #ruby
lkba has quit [Ping timeout: 246 seconds]
Vainoharhainen has quit [Read error: Connection reset by peer]
s1n4 has quit [Quit: leaving]
Spami has joined #ruby
chrisbolton has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 256 seconds]
r0bby has joined #ruby
robbyoconnor has quit [Ping timeout: 260 seconds]
a_a_g has joined #ruby
F1skr has joined #ruby
mjolk has joined #ruby
Mission-Critical has joined #ruby
neku has joined #ruby
pyro111 has joined #ruby
pyro111 has quit [Client Quit]
timmow has joined #ruby
zarubin has joined #ruby
dmiller has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
chrisbolton has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
pcarrier has quit []
dhruvasagar has quit [Ping timeout: 276 seconds]
Mission-Critical is now known as MissionCritical
dhruvasagar has joined #ruby
dmiller has quit [Ping timeout: 244 seconds]
baphled has joined #ruby
advorak has quit [Remote host closed the connection]
pavilionXP has quit [Ping timeout: 252 seconds]
djdb has quit [Read error: Operation timed out]
pcarrier has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
Astralum has joined #ruby
berserkr has joined #ruby
Astral_ has quit [Ping timeout: 272 seconds]
sporkbomb has quit [Quit: leaving]
shtirlic has joined #ruby
jimmyy has joined #ruby
djdb has joined #ruby
binaryplease has joined #ruby
daniel_- has joined #ruby
r0bby_ has joined #ruby
shtirlic_ has joined #ruby
r0bby_ is now known as robbyoconnor
dwu1 has joined #ruby
shtirlic has quit [Read error: Connection reset by peer]
baphled has quit [Ping timeout: 246 seconds]
r0bby has quit [Ping timeout: 248 seconds]
bradhe has joined #ruby
nomenkun has quit [Read error: No route to host]
jimmyy has quit [Remote host closed the connection]
jimmyy has joined #ruby
neku has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
neku has joined #ruby
elico has joined #ruby
jlast has joined #ruby
fermion has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
noxoc has joined #ruby
a_a_g has joined #ruby
grzywacz has quit [Ping timeout: 255 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
jlast has quit [Ping timeout: 264 seconds]
bricker`LA is now known as brickster
Neomex has joined #ruby
brickster is now known as bricker`LA
roadt has joined #ruby
Neomex has quit [Client Quit]
pcarrier has quit []
<roadt> hi guys, basicsocket.send, basicsocket.sendmsg what's difference..
shufflebot has quit [Quit: WeeChat 0.3.9]
<hoelzro> roadt: sendmsg probably has some options specific to datagrams
<hoelzro> if you're familiar with send/sendmsg in C, that's probably the difference
buibex has quit [Remote host closed the connection]
<roadt> hoelzro, it sounds i need read more manuals,
a_a_g has quit [Read error: Connection reset by peer]
<roadt> hoelzro, will do , tks
a_a_g has joined #ruby
osaut has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.9.2]
<epta> "http://a-b-asdf/".gsub(/([^:\/]+)/, '\1')
<epta> => "http://a-b-asdf/"
<epta> Why it matching `/' too?
<hoelzro> epta: how do you know it's matching anything at all? you're substituting the match for itself
<hoelzro> making that a no-op
tawrse has joined #ruby
<tobiasvl> >> print "http://a-b-asdf/".gsub(/[:\/]+/, '\1')
<eval-in> tobiasvl: Output: "httpa-b-asdf" (http://eval.in/6552)
moshee has quit [Ping timeout: 252 seconds]
<tobiasvl> >> print "http://a-b-asdf/".gsub(/[^:\/]+/, '\1')
<eval-in> tobiasvl: Output: ":///" (http://eval.in/6553)
moshee has joined #ruby
<tawrse> hello there, I am writing a command line application which asks the user for input using STDIN.gets.chomp. The problem is I don't know how to test this. Is is possible to write to STDIN in unit tests?
<tobiasvl> eval-in: which one of those did you want?
<tobiasvl> uh
<tobiasvl> epta: which one of those did you want?
<hoelzro> tawrse: invoke your program from your test file and pipe data into it?
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<tawrse> hoelzro: how?
<hoelzro> epta: if you're trying to parse a URI, why not use an existing URI implementation?
<hoelzro> tawrse: I'm sure there's a gem out there that makes it easier, but I would do it with fork and pipe
<hoelzro> IO.pipe and Kernel.fork, that is
bradhe has quit [Ping timeout: 252 seconds]
<roadt> >> print "http://a-b-asdf/".scan(/([^:\/]+)/)
<eval-in> roadt: Output: "[[\"http\"], [\"a-b-asdf\"]]" (http://eval.in/6554)
a_a_g1 has joined #ruby
osaut has quit [Quit: osaut]
viario has joined #ruby
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
a_a_g1 has quit [Read error: Connection reset by peer]
<tobiasvl> yeah, that's a more likely interpretation of his question :P
a_a_g1 has joined #ruby
emocakes has joined #ruby
a_a_g has quit [Ping timeout: 252 seconds]
osaut has joined #ruby
<roadt> ;)
tawrse has quit [Quit: Page closed]
xpen has quit [Remote host closed the connection]
filipe has quit [Read error: Operation timed out]
aaronmacy has quit [Quit: Leaving.]
lkba has joined #ruby
Phoop has quit [Quit: Phoop]
aaronmacy has joined #ruby
aaronmacy has quit [Client Quit]
binaryplease has quit [Ping timeout: 252 seconds]
a_a_g1 has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
malte_ has quit [Quit: malte_]
foohey has quit [Read error: Operation timed out]
marienz has quit [Read error: Operation timed out]
new299 has quit [Read error: Operation timed out]
Weazy has quit [Read error: Operation timed out]
stetho has quit [Read error: Operation timed out]
tommylommykins has quit [Read error: Operation timed out]
djdb has quit [Read error: Operation timed out]
ingvarha has quit [Read error: Operation timed out]
stetho_ has joined #ruby
new299 has joined #ruby
preller has quit [Read error: Operation timed out]
nathancahill has quit [Read error: Connection reset by peer]
tommylommykins has joined #ruby
preller has joined #ruby
preller has quit [Changing host]
preller has joined #ruby
FDj_ has quit [Read error: Connection reset by peer]
nathancahill has joined #ruby
FDj has joined #ruby
delinquentme has joined #ruby
Kovensky has quit [Read error: Operation timed out]
ozzloy has quit [Read error: Operation timed out]
X-Jester has quit [Read error: Operation timed out]
lateau has quit [Ping timeout: 252 seconds]
jwang has quit [Read error: Operation timed out]
X-Jester has joined #ruby
foohey has joined #ruby
Weazy has joined #ruby
djdb has joined #ruby
imami|afk has quit [Ping timeout: 256 seconds]
jwang has joined #ruby
rakl has quit [Quit: sleeping]
ingvarha has joined #ruby
Kovensky has joined #ruby
banseljaj has joined #ruby
ozzloy has joined #ruby
marienz has joined #ruby
rakuN has quit [Quit: rakuN]
graeme has joined #ruby
Beoran__ has joined #ruby
karasawa has quit [Ping timeout: 252 seconds]
clocKwize has quit [Quit: clocKwize]
karasawa has joined #ruby
gregoryigelmund has joined #ruby
pavilionXP has joined #ruby
mikecmpbll has joined #ruby
kil0byte_ has joined #ruby
blaxter has quit [Ping timeout: 246 seconds]
Beoran_ has quit [Ping timeout: 272 seconds]
buibex has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
matthias_ has joined #ruby
a_a_g has joined #ruby
kil0byte has quit [Ping timeout: 252 seconds]
filipe has joined #ruby
nari has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
pavilionXP has quit [Ping timeout: 276 seconds]
a_a_g has joined #ruby
pskosinski has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
reppard has joined #ruby
a_a_g has joined #ruby
bradhe has joined #ruby
nkr has joined #ruby
rpminihan has joined #ruby
buibex has quit [Ping timeout: 276 seconds]
filipe has quit [Ping timeout: 264 seconds]
iPhoneMRZ has joined #ruby
<epta> > epta: if you're trying to parse a URI, why not use an existing URI implementation?
<epta> Where could I found those?
<epta> hoelzro:
blaxter has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
orsasls has joined #ruby
clocKwize has joined #ruby
<orsasls> how to write a helper for minitest _specs_?
osaut has quit [Quit: osaut]
a_a_g has joined #ruby
pavilionXP has joined #ruby
<epta> hoelzro: so, for getting hostname from URL I should use split and get third element of list?
graft has quit [Ping timeout: 272 seconds]
<hoelzro> not quite
<epta> But why it returns list and not hash structure?
nari has quit [Ping timeout: 272 seconds]
<hoelzro> look at the first example on that page
tagrudev has quit [Read error: Connection reset by peer]
osaut has joined #ruby
<orsasls> Can i just do MiniTest::Spec.before?
dwu1 has quit [Quit: Leaving.]
<epta> hoelzro: oh, nice
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
Phoop has joined #ruby
tagrudev has joined #ruby
fir_ed has joined #ruby
samphippen has joined #ruby
iPhoneMRZ has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
a_a_g has quit [Read error: Connection reset by peer]
jds_ has joined #ruby
a_a_g has joined #ruby
kil0byte has joined #ruby
filipe has joined #ruby
kil0byte_ has quit [Ping timeout: 252 seconds]
fir_ed has quit [Ping timeout: 248 seconds]
samphippen has quit [Ping timeout: 276 seconds]
jlast has joined #ruby
grzywacz has joined #ruby
Guest22367 has joined #ruby
gregoryigelmund has quit [Ping timeout: 255 seconds]
matthewrobbins has joined #ruby
pyro111 has joined #ruby
osaut has quit [Quit: osaut]
samphippen has joined #ruby
pskosinski has quit [Quit: Learn Life's Little Lessons]
burgestrand has joined #ruby
graeme has quit [Quit: graeme]
pskosinski has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
yacks has quit [Remote host closed the connection]
eykosioux has joined #ruby
jlast has quit [Ping timeout: 244 seconds]
orsasls has quit [Quit: Page closed]
Hanmac has joined #ruby
retro|cz has joined #ruby
Eplemosen has joined #ruby
gregoryigelmund has joined #ruby
pcarrier has joined #ruby
bradhe has quit [Ping timeout: 256 seconds]
ryanh has joined #ruby
postmodern has quit [Quit: Leaving]
drago757 has joined #ruby
buibex has joined #ruby
pavilionXP has quit [Ping timeout: 255 seconds]
jimmyy has quit [Remote host closed the connection]
lateau has joined #ruby
jimmyy has joined #ruby
carloslopes has joined #ruby
cdt has joined #ruby
larissa has joined #ruby
jimmyy has quit [Remote host closed the connection]
jimmyy has joined #ruby
yacks has joined #ruby
ILYG has left #ruby [#ruby]
buibex has quit [Ping timeout: 264 seconds]
troessner has joined #ruby
buibex has joined #ruby
xqo has joined #ruby
<xqo> hi
<gyre007> anyone here uses zeus ?? https://github.com/burke/zeus
<xqo> any of you ever used svn? im very screwed.
<Spaceghost|cloud> Don't.
<xqo> fine.
<Spaceghost|cloud> gyre007: Use kicker and spin.
<Spaceghost|cloud> xqo: Just ask your question.
<gyre007> zeus looks nice...but i cant get it working...
<Spaceghost|cloud> It just requires you reading the man page once to know what you want, I bet.
<Spaceghost|cloud> gyre007: It isn't. spin and kicker are better.
<xqo> Spaceghost|cloud: ive tried svn revert -R . and svn update > svn revert the files i broke, but theyre still nto the right version
<gyre007> Spaceghost|cloud: in which way ?
<Spaceghost|cloud> Sounds like a job for reading the man page and using stack overflow to how to reset!
<JonnieCache> is kicker better than guard?
akemrir has joined #ruby
hybris has joined #ruby
Eplemosen has quit [Ping timeout: 252 seconds]
<Spaceghost|cloud> They aren't related.
<Spaceghost|cloud> Guard is a fs-events watcher that executes code.
<Spaceghost|cloud> Oh sorry spacing.
<JonnieCache> that also describes kicker
banister`sleep has joined #ruby
<Spaceghost|cloud> JonnieCache: I don't know. I just think kicker goes well with spin. If guard goes well too, cool.
<gyre007> Spaceghost|cloud: what I'm thinking to do is to build a console server for our devs...
xqo has left #ruby [#ruby]
<JonnieCache> im not trying to argue, im looking to be pursuaded :)
neurotec_ has quit [Remote host closed the connection]
<gyre007> and I need the console to start faster than "hundred minutes" arrrgh :)
<JonnieCache> buy your devs better computers :)
<gyre007> this is a production app we are talking about :)...
<gyre007> I dont like dodgy shit happening on prod servers
<JonnieCache> surely they shouldnt be on the console at all then
cjs226 has quit []
<Spaceghost|cloud> JonnieCache: I wish I knew. I don't know about using guard with spin.
<gyre007> well they dont but other people do...
hbpoison has quit [Ping timeout: 272 seconds]
reppard has quit [Ping timeout: 255 seconds]
<Spaceghost|cloud> gyre007: The hint: Use a very small environment for fast book. then fork.
<Spaceghost|cloud> No need to use lolzeud
<Spaceghost|cloud> lolzeus
<gyre007> zeus seems actually pretty nice to me...but i never got it working....unfortunately
a_a_g has quit [Read error: Connection reset by peer]
<gyre007> would really like to test it...but ive no idea how that dude in that video gets it working... ;)
a_a_g has joined #ruby
pen has joined #ruby
<Spaceghost|cloud> Look at the actual code for it. Feelswrongbro
osaut has joined #ruby
<JonnieCache> those tools always break something in your env
<JonnieCache> theyre a nice idea but theyve never worked in practice for me except on toy apps
osaut has quit [Client Quit]
JonnieCache has quit [Quit: leaving]
binaryplease has joined #ruby
stonevil has joined #ruby
sn0wb1rd has quit [Quit: I will be right back]
<Spaceghost|cloud> It is a cool idea, but executionwise I'll pass.
bradhe has joined #ruby
jds_ has quit [Remote host closed the connection]
emergion has quit [Quit: Computer has gone to sleep.]
heyitsdave has joined #ruby
robert___ has joined #ruby
ryanh has quit [Quit: Computer has gone to sleep.]
hbpoison has joined #ruby
Nisstyre-laptop has quit [Quit: Leaving]
a_a_g has quit [Read error: Connection reset by peer]
robert__ has quit [Ping timeout: 245 seconds]
a_a_g has joined #ruby
dmiller has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
jaywastaken has joined #ruby
jaywastaken has quit [Changing host]
jaywastaken has joined #ruby
dstywho has quit [Quit: WeeChat 0.3.9.2]
dustint_ has quit [Remote host closed the connection]
dustint has quit [Remote host closed the connection]
dmiller has quit [Ping timeout: 260 seconds]
heyitsdave has quit [Ping timeout: 255 seconds]
xpen has joined #ruby
rdark_ has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
robert__ has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
bluenemo has joined #ruby
michi|work has joined #ruby
<michi|work> hello there, I tried googleing my problem, but couldn't find an answer to it, maybe someone here has an idea? I'm trying to generate some random seed data with ruby hashes
rdark has quit [Ping timeout: 276 seconds]
reppard has joined #ruby
troessner has quit [Ping timeout: 272 seconds]
heyitsdave has joined #ruby
ExxKA has quit [Quit: This computer has gone to sleep]
sleetdrop has quit [Ping timeout: 276 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
braoru has joined #ruby
jcrawford has quit [Excess Flood]
michi|work_ has joined #ruby
robert___ has quit [Ping timeout: 245 seconds]
<michi|work_> something in the style of http://pastie.org/5682636
dawkirst has joined #ruby
<michi|work_> but this doesn't work obviously
<michi|work_> how can I write out 10 times the middle part?
ryannielson has joined #ruby
<michi|work_> as a valid hash
drago757 has quit [Quit: drago757]
michi|work has quit [Ping timeout: 245 seconds]
michi|work_ has quit [Client Quit]
jcrawford has joined #ruby
dhruvasagar has joined #ruby
jcrawford has quit [Excess Flood]
<shevy> michi|work_ no, first create your hash
a_a_g has quit [Read error: Connection reset by peer]
<shevy> if you then want to fill it up via a loop, do so outside your definition
G________ has joined #ruby
G________ is now known as RubNoob
a_a_g has joined #ruby
emocakes has quit [Quit: emocakes]
bradhe has quit [Ping timeout: 248 seconds]
jcrawford has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
reppard has quit [Ping timeout: 252 seconds]
<pyro111> p array = [ *10.times.map { [*0..5].sample }, *5.times.map { [*5..10].sample } ]
a_a_g has joined #ruby
osaut has joined #ruby
emocakes has joined #ruby
jlast_ has joined #ruby
frosty1313 has joined #ruby
sepp2k has joined #ruby
<Hanmac> the splat operator is funny :D
geekbri has joined #ruby
main has quit [Read error: Connection reset by peer]
binaryplease has quit [Quit: WeeChat 0.3.9.2]
<shevy> man this is some ugly shit here
<shevy> a few $globals, and the ugliness has been perfected
jlast_ has quit [Ping timeout: 272 seconds]
<shevy> hmm... $*bla would be nice
karasawa has quit [Remote host closed the connection]
<hoelzro> is $*bla valid Ruby?
<pyro111> I came to ruby for elegance, but now use all the shit like here https://gist.github.com/4518593
karasawa has joined #ruby
<shevy> hoelzro na :(
<hoelzro> ok, I didn't think so =)
<Hanmac> shevy but $* is valid :P
<shevy> oh wait
<shevy> yeah...
<shevy> array = $*[1,3]
<shevy> valid!
<shevy> also this is not an array hehehe
<shevy> man, you can do some damn ugly stuff in ruby
<hoelzro> you know what they say!
<shevy> pyro111, is BEGIN{ like at_exit ?
<hoelzro> shevy: I would guess that BEGIN is at compile time
<hoelzro> or "as soon as possible"
<shevy> oh
<shevy> kinda creative though
<shevy> you can put any text in the beginning
heyitsdave has quit [Ping timeout: 248 seconds]
<shevy> I only knew that you could do that after... __END__ I think
lateau has quit [Read error: No route to host]
<shevy> pyro111 I actually like that gist :)
<shevy> "The block followed after BEGIN is evaluated before any other statement in that file"
tps_ has quit [Quit: tps_]
<shevy> ruby goto start!!!!!!
<hoelzro> so it's not necessarily compile time...
fabrizio has joined #ruby
<pyro111> I use begin when dont want to create new file for that code
<hoelzro> I can't imagine that Ruby needs BEGIN that much
aytch has joined #ruby
<shevy> damn... I can not use \n in that gist
<shevy> ugly.rb:4: syntax error, unexpected $undefined, expecting $end
nkts has joined #ruby
<shevy> oh
<shevy> leading Upcased words are assumed constants
<Hanmac> >> p "run"; BEGIN {p "start"}; END { p "end"}; p "middle"
<eval-in> Hanmac: Output: "\"start\"\n\"run\"\n\"middle\"\n\"end\"\n" (http://eval.in/6555)
tps_ has joined #ruby
ryannielson has quit [Quit: ryannielson]
<shevy> aha
<shevy> so END comes before the normal stuff too
<shevy> oh no
troessner has joined #ruby
<shevy> misread that
tps_ has quit [Client Quit]
<shevy> http://pastie.org/5682730 # "End the World Now! World End! Hello world!"
* Hanmac still thinks that BEGIN & END are when you to lazy to write an currect event-loop
<shevy> ugly.rb will become the ugliest piece of ruby code ever
main has joined #ruby
<matti> shevy: shevy shevy
reppard has joined #ruby
<shevy> hey matti, today I learned BEGIN {}
IrishGringo has quit [Remote host closed the connection]
<shevy> though I have no idea if it has any practical value at all
<Hanmac> shevy this is only the BEGIN of your journey :D
<shevy> hmm can you nest BEGIN inside ENDs ?
mark_locklear has joined #ruby
<shevy> damn it... you can
<matti> shevy: Hehe, BEGIN and END are very Perl ;]
yacks has quit [Read error: Connection reset by peer]
<shevy> yeah, it is not pleasant to read
<shevy> but still kinda cool
<matti> shevy: In Perl. in fact, there is a shot-cut called "the eskimo operator" ;]
<shevy> hehe
<matti> shevy: Looks like this: }{
otherj has joined #ruby
carloslopes has quit [Remote host closed the connection]
<shevy> two kissing men
chussenot has joined #ruby
Donkeycoder has quit [Ping timeout: 260 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
<hoelzro> ugh, I don't care for anything in perlsecret.
samphippen has joined #ruby
samphippen has quit [Client Quit]
<matti> hoelzro: Heh
<lupine> sandy metz really likes her bikes, eh/
<lupine> sandi*
<matti> ?
<shevy> HAHAHA
<lupine> "practical object-orientated design in ruby"
<shevy> matti, I could see the LOOK on your face right there!
<lupine> I just got to p107, wherein she includes a colour diagram of a bicycle
bradhe has joined #ruby
<lupine> and there's another on p108
<lupine> that doesn't come cheap
<shevy> lupine did you take something
<lupine> ?
troessner has quit [Ping timeout: 272 seconds]
lele has quit [Quit: Coyote finally caught me]
invisime has joined #ruby
invisime has left #ruby [#ruby]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
<Hanmac> shevy i tested it:
<Hanmac> >> END {BEGIN {p "start"}; p "end"}
<eval-in> Hanmac: Output: "/tmp/execpad-ac0c13855b82/source-ac0c13855b82:1: syntax error, unexpected keyword_BEGIN\nEND {BEGIN {p \"start\"}; p \"end\"}\n ^\n/tmp/execpad-ac0c13855b82/source-ac0c13855b82:1: syntax error, unexpected '}', expecting $end\nEND {BEGIN {p \"start\"}; p \"end\"}\n ^\n" (http://eval.in/6556)
<matti> shevy: ? ;]
Playground has joined #ruby
<shevy> lol Hanmac
<shevy> you broke the bot
<shevy> hey...
<Hanmac> no, it dont work on my ruby too
<shevy> that works in my irb though
<shevy> does it work differently in 1.9.x?
<shevy> haha indeed
<shevy> :)
<shevy> Hanmac, now which ruby version is better hahahaha!
Guest22367 has left #ruby ["WeeChat 0.3.7"]
tommyvyo has quit [Quit: http://thomasvendetta.com]
lele has joined #ruby
<Hanmac> shevy wich version do you use?
<Hanmac> PS: an BEGIN inside an END does not make much sense
kil0byte_ has joined #ruby
<RubNoob> does anyone know how to handle a parameter in a route that has a period in it?
<RubNoob> i.e. a hostname
<shevy> Hanmac 1.8.7
xemu has joined #ruby
fabrizio has left #ruby [#ruby]
carloslopes has joined #ruby
<shevy> END {BEGIN {p "start"}; p "end"} <--- hmm only start is printed
banister`sleep has quit [Remote host closed the connection]
kil0byt__ has joined #ruby
willob has joined #ruby
<Hanmac> http://ruby-doc.org/docs/keywords/1.9/Object.html << there you could read about it
<RubNoob> nvm, I figured it out using a constraint parameter
kil0byte has quit [Ping timeout: 264 seconds]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ffranz has joined #ruby
<ericwood> huh, just got to work and I already learned something new
az7ar has quit [Quit: Leaving]
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
kil0byte_ has quit [Ping timeout: 264 seconds]
iamjarvo has joined #ruby
troessner has joined #ruby
kil0byte has joined #ruby
kil0byt__ has quit [Ping timeout: 246 seconds]
dustint has joined #ruby
braoru has quit [Ping timeout: 264 seconds]
Vert has joined #ruby
niklasb has joined #ruby
PragCypher has joined #ruby
enroxorz-work has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
baphled has joined #ruby
xpen_ has joined #ruby
vlad_starkov has joined #ruby
hoelzro is now known as hoelzro|away
niklasb has quit [Read error: Connection reset by peer]
tommyvyo has joined #ruby
xpen_ has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
AsgardBSD has joined #ruby
niklasb has joined #ruby
xpen_ has joined #ruby
hbpoison has quit [Ping timeout: 276 seconds]
xpen has quit [Ping timeout: 276 seconds]
bradhe has quit [Ping timeout: 244 seconds]
Elhu has joined #ruby
reinaldob has quit [Remote host closed the connection]
xpen_ has quit [Remote host closed the connection]
<Spami> hey guys, how can i use rails path method in my JS assets ?
<Spaceghost|cloud> Wrpmg cjamme;/
<Spaceghost|cloud> Wrong channel.
jcrawford has quit [Excess Flood]
<Spaceghost|cloud> #rubyonrails
banister`sleep has joined #ruby
<Spami> my bad, thank you
willob has quit [Quit: Leaving.]
jcrawford has joined #ruby
braoru has joined #ruby
hoelzro|away is now known as hoelzro
jxf has joined #ruby
bru has joined #ruby
<jxf> How would I construct the N-moving average for an array?
love_color_text has joined #ruby
a_a_g has quit [Quit: Leaving.]
<jxf> (The "N-moving average" is the average of the last N points.)
<jxf> So for example, I'd expect moving_average([4, 5, 6, 7, 8], 2) to be: [4, 4.5, 5.5, 6.5, 7.5].
<ericwood> oooh, I did this once a while ago
<ericwood> well, no, mine was different
<ericwood> you're going to want to use map()
<jxf> I defined average(elements) as { elements.inject(:+).to_f / elements.size }, which works great. But can't quite figure out how to get the moving_average part to hook up with that.
<ericwood> I don't understand what the 2 does in your example
<jxf> ericwood: That's what the N is.
Jackneill has joined #ruby
Jackneill has quit [Changing host]
Jackneill has joined #ruby
<jxf> If it was 3, then we'd be averaging over the last 3 points; if it was 28 then we'd be averaging over the last 28, and so on.
<Mon_Ouie> It has to take the average of 4 without any other elements?
<jxf> Correct, because there are no elements preceding it.
<Mon_Ouie> With N = 3, would the output start with 4 and 5?
<jxf> No.
<Mon_Ouie> Ah, 4 and 4.5
<jxf> There are exactly as many output elements as there are inputs.
<jxf> Actually...
<jxf> I guess what I really want is to turn this:
<jxf> [4, 5, 6, 7, 8]
<jxf> into this:
kil0byte_ has joined #ruby
<jxf> [[4], [4, 5], [5, 6], [6, 7], [7, 8]]
<jxf> Basically, map each element into its last N elements.
<jxf> Then I can just map *that* with average.
<jxf> I guess I could use each_with_index and assign the result, although that seems awkward.
<Mon_Ouie> a.each_index.map { |i| if i >= n then a[i-n, n] else a[0..i] }
<Mon_Ouie> Plus the missing 'end'
krawchyk has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
<Hanmac> what about:
<Hanmac> >> d=[4, 5, 6, 7, 8];d.zip(d.each_cons(2).map {|a| a.inject(:+) / a.size.to_f }).flatten.compact
<eval-in> Hanmac: Output: "" (http://eval.in/6557)
buscon has quit [Quit: Leaving]
<Hanmac> >> d=[4, 5, 6, 7, 8];puts d.zip(d.each_cons(2).map {|a| a.inject(:+) / a.size.to_f }).flatten.compact
<eval-in> Hanmac: Output: "4\n4.5\n5\n5.5\n6\n6.5\n7\n7.5\n8\n" (http://eval.in/6558)
kil0byte has quit [Ping timeout: 264 seconds]
jlast_ has joined #ruby
yacks has joined #ruby
gyre007 has quit [Remote host closed the connection]
gyre007 has joined #ruby
<jxf> Hanmac: I don't think that's right because the output array has double the number of elements as the input
<ericwood> I wish I could write irssi plugins in ruby :(
<jxf> Mon_Ouie: that's close but it's got a fencepost error somewhere
<Mon_Ouie> a.each_index.map { |i| if i >= n then a[i-n+1, n] else a[0..i] end }.map { |n| average(n) } # I also was off by one
r0bby has joined #ruby
<Muz> ericwood: perl has backticks. ¬_¬
<ericwood> Muz: >.>
<ericwood> ಠ_ಠ
<jxf> Mon_Ouie: Perfect, that did it :)
<jxf> Thank you!
<Muz> I may not actually be suggesting that you follow this through though.
robbyoconnor has quit [Ping timeout: 256 seconds]
<ericwood> it's okay, I haven't reached that level of insanity yet
jlast_ has quit [Ping timeout: 252 seconds]
daniel_- has quit [Ping timeout: 252 seconds]
<ericwood> I want to build a recommender system for beer
r0bby is now known as robbyoconnor
<ericwood> but I need a corpus of beer data without breaking the beeradvocate TOS :|
<Fuzai> >> `date`
<eval-in> Fuzai: Output: "" (http://eval.in/6559)
<Fuzai> >> puts `date`
<eval-in> Fuzai: Output: "" (http://eval.in/6560)
moos3 has joined #ruby
<ericwood> >> p `ls -al`
<eval-in> ericwood: Output: "" (http://eval.in/6561)
<ericwood> heh
<heftig> >> p system("date")
<eval-in> heftig: Output: "" (http://eval.in/6562)
<Mon_Ouie> It simply blocks certain syscalls
<heftig> >> p method(:system)
<eval-in> heftig: Output: "#<Method: Object(Kernel)#system>\n" (http://eval.in/6563)
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<heftig> Mon_Ouie: such as exec*, i guess
<Mon_Ouie> You could read the error message, too :p
yacks has quit [Remote host closed the connection]
v0n has joined #ruby
<heftig> >> IO.pipe
<eval-in> heftig: Output: "" (http://eval.in/6564)
vlad_starkov has quit [Ping timeout: 252 seconds]
<heftig> >> exec("date")
<eval-in> heftig: Output: "" (http://eval.in/6566)
<heftig> >> exec("/dev/null")
<eval-in> heftig: Output: "" (http://eval.in/6567)
<ericwood> > /dev/null
buibex has quit [Remote host closed the connection]
krawchyk_ has joined #ruby
<ericwood> maybe I shouldn't redirect my output to /dev/null
joofsh has joined #ruby
buscon has joined #ruby
frosty1313 has quit [Quit: Leaving]
<jxf> OK, say I've got: foo = [1, 2, 3] and bar = [{:x => 100}, {:x => 200}, {:x => 300}]. How do I wind up with [{:x => 100, :y => 1}, {:x => 200, :y => 2}, ...], so that each element of foo is assigned to the :y in the corresponding element of bar?
lkba has quit [Ping timeout: 252 seconds]
<jxf> Is this where :zip would help?
<ericwood> sounds like it
buibex has joined #ruby
<banister`sleep> jxf: u would learn a lot more if you solved these yourself :) (and it's kind of fun, just fire up irb/pry and play around)
<ericwood> yeah, these kinds of functional programming puzzles are good practice :)
<ericwood> try zip with a block fed into it
krawchyk has quit [Ping timeout: 264 seconds]
kil0byte has joined #ruby
jrist-afk is now known as jrist
<jxf> Well, I ask because zip's documentation says it generates "n-element arrays". Which isn't what I want -- I'd like to *preserve* the hashes, not turn them into arrays.
<ericwood> are you looking at Array::zip or Enumerable::zip ?
<jxf> Array.zip
<ericwood> look at Enumerable::zip, it's a more general case
<ericwood> well, I guess it doesn't matter
Coolhand has joined #ruby
arkiver has quit [Quit: Leaving]
<jxf> OK, well both the things I want to operate on are arrays, right?
<Mon_Ouie> Try it in IRB, it will return an array of arrays of hashes
<jxf> So that would call Array::zip in either case?
<Mon_Ouie> Which you can map { … inject { … merge } }
bradhe has joined #ruby
<banister`sleep> jxf: the syntax we use for specifying instance methods is Array#zip btw (the # instead of the :: )
kil0byte_ has quit [Ping timeout: 264 seconds]
<jxf> this did it for me: > bar.zip(foo).map { |o, e| o[:y] = e; o }
<jxf> => [{:x=>100, :y=>1}, {:x=>200, :y=>2}, {:x=>300, :y=>3}]
mikeycgto has joined #ruby
willob has joined #ruby
kil0byte_ has joined #ruby
<Mon_Ouie> You can just each { |o, e| o[:y] = e }
<Mon_Ouie> No need to build a new array with the same elements
<Hanmac> jxf it does change the bar instance, if you are not need it later
<jxf> I don't think that works, because then my "map" returns the elements themselves, right?
<jxf> oh, #each, missed that
<jxf> Hanmac: That's true. Is there a better way that leaves the original alone?
<Hanmac> if its an user input the answer is yes
chussenot has quit [Quit: chussenot]
linoj has joined #ruby
<jxf> ah this did it: bar.zip(foo).map { |h, e| h.merge(:y => e) }
kil0byte has quit [Ping timeout: 276 seconds]
vlad_starkov has joined #ruby
aquaranto has joined #ruby
Spooner has joined #ruby
jerius has joined #ruby
kil0byte has joined #ruby
pavilionXP has joined #ruby
jekotia has joined #ruby
chussenot has joined #ruby
<Hanmac> jxf:
<Hanmac> >> foo = [1, 2, 3],bar = [{:x => 100}, {:x => 200}, {:x => 300}]; p foo.zip(bar).map {|y,v| {:x => v[:x],:y => y} }
<eval-in> Hanmac: Output: "[{:x=>100, :y=>[1, 2, 3]}, {:x=>200, :y=>[{:x=>100}, {:x=>200}, {:x=>300}]}]\n" (http://eval.in/6584)
alanp has quit [Remote host closed the connection]
<Hanmac> >> foo = [1, 2, 3];bar = [{:x => 100}, {:x => 200}, {:x => 300}]; p foo.zip(bar).map {|y,v| {:x => v[:x],:y => y} }
<eval-in> Hanmac: Output: "[{:x=>100, :y=>1}, {:x=>200, :y=>2}, {:x=>300, :y=>3}]\n" (http://eval.in/6585)
kold has joined #ruby
<jxf> Hanmac: I think I like the `merge` I mentioned before better since it doesn't require you to be explicit about the previous keys.
zph has joined #ruby
theRoUS_ has joined #ruby
sleetdrop has joined #ruby
yacks has joined #ruby
iPhoneMRZ has joined #ruby
<jxf> >> foo = [1, 2, 3];bar = [{:x => 100}, {:x => 200}, {:x => 300}]; p foo.zip(bar).map {|y,v| {:x => v[:x],:y => y} }; p bar.zip(foo).map { |h, e| h.merge(:y => e) }
<eval-in> jxf: Output: "[{:x=>100, :y=>1}, {:x=>200, :y=>2}, {:x=>300, :y=>3}]\n[{:x=>100, :y=>1}, {:x=>200, :y=>2}, {:x=>300, :y=>3}]\n" (http://eval.in/6586)
iPhoneMRZ has quit [Client Quit]
kil0byte_ has quit [Ping timeout: 244 seconds]
DatumDrop has joined #ruby
yfeldblum has joined #ruby
pavilionXP has quit [Ping timeout: 264 seconds]
thatguycraig has joined #ruby
thatguycraig has quit [Max SendQ exceeded]
thatguycraig has joined #ruby
alanp has joined #ruby
troessner has quit [Ping timeout: 272 seconds]
IrishGringo has joined #ruby
DatumDrop has quit [Remote host closed the connection]
clooth has quit [Read error: Connection reset by peer]
clooth has joined #ruby
otherj has quit [Quit: otherj]
breakingthings has joined #ruby
skaczor has joined #ruby
hynkle has joined #ruby
jrist is now known as jrist-demo
braoru has quit [Ping timeout: 246 seconds]
swinburnesque81 has quit [Ping timeout: 240 seconds]
alanp has quit [Read error: No route to host]
niklasb has quit [Ping timeout: 246 seconds]
alanp_ has joined #ruby
tagrudev has quit [Remote host closed the connection]
kold has quit [Remote host closed the connection]
jtharris has joined #ruby
jfl0wers has joined #ruby
lkba has joined #ruby
hbpoison has joined #ruby
reisl has joined #ruby
chussenot has quit [Quit: chussenot]
Virunga has joined #ruby
bradhe has quit [Ping timeout: 244 seconds]
iamjarvo has quit [Quit: Leaving.]
alanp_ has quit [Remote host closed the connection]
<Hanmac> shevy who need spaces :D foo.to_enum(:zip,bar).map{|y,v|v.merge:y=>y}
sailias has joined #ruby
<tobiasvl> ruby golfing
jpfuentes2 has joined #ruby
larissa has quit [Ping timeout: 272 seconds]
troessner has joined #ruby
alanp has joined #ruby
BizarreCake has joined #ruby
nfk has joined #ruby
Coolhand_ has joined #ruby
tps_ has joined #ruby
<ericwood> fore!
<Hanmac> in 99% of the cases rubygolf is not fair against other languages like C :P
Coolhand has quit [Read error: Operation timed out]
<ericwood> most code golfing just comes down to bizarre use of regex
<ericwood> there used to be therubygame.com, but it seems to have disappeared :(
poseid has joined #ruby
<yfeldblum> ericwood, like telling whether a number is prime?
tommyvyo has joined #ruby
kpshek has joined #ruby
Michae___ has joined #ruby
<ericwood> yes, I remember that regex
<ericwood> there was a crazy vim golf solution that used it iirc
reppard has quit [Ping timeout: 264 seconds]
<ericwood> that's the one
<Mon_Ouie> Yay, you can type 100 prime numbers in 43 keystrokes, you just need a few hours to come up with it :p
hoelzro is now known as hoelzro|away
jds_ has joined #ruby
<banister`sleep> Mon_Ouie: here's a question for you, figure out how the prime numbers are distributed, given a number N tell me approximately how many prime numbers there are < than N
nateberkopec has joined #ruby
swinburnesque81 has joined #ruby
linoge has quit [Read error: Connection reset by peer]
jlast has joined #ruby
linoge has joined #ruby
carlyle has joined #ruby
<Hanmac> banister: Prime.take_while {|i| i < m}.count
banister`sleep has quit [Remote host closed the connection]
<Hanmac> i mean Prime.take_while {|i| i < n}.count
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<heftig> about n / (ln n)
x82_nicole has joined #ruby
jds_ has quit [Remote host closed the connection]
osaut has quit [Ping timeout: 264 seconds]
jeffreybaird has joined #ruby
sailias has quit [Quit: Leaving.]
segv- has joined #ruby
pavilionXP has joined #ruby
philcrissman has joined #ruby
linoj has quit [Ping timeout: 276 seconds]
tommyvyo has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
ndboost has joined #ruby
[eDu] has joined #ruby
<raz> sigh, yardoc is such a pain in the ass
bondar has joined #ruby
stopbit has joined #ruby
<Fuzai> Is it possible to store anonymous blocks of code as an array element and then run it directly from the array?
<ericwood> yes, you want procs/lambdas
<Fuzai> ty
<ericwood> foo = lambda { |arg| puts arg }
interactionjaxsn has joined #ruby
<ericwood> then, you can make your very own lambdarray
<ericwood> ...a word I invented
<Hanmac> fuzai:
<Hanmac> >> [proc{print "A"},proc {print "B"},proc {print "C"}].reverse_each(&:call)
<eval-in> Hanmac: Output: "CBA" (http://eval.in/6587)
freeayu has quit [Remote host closed the connection]
<Fuzai> <3
hbpoison has quit [Ping timeout: 252 seconds]
<Fuzai> Awesome thats works perfectly for my plan to take over the world today :)
<Hanmac> ericwood: what about a "procarray" ? sounds like the reverse of "democraty" :P
<ericwood> rambda
hbpoison has joined #ruby
carloslopes has quit [Remote host closed the connection]
Targen has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
jrist-demo is now known as jrist
slainer68 has quit [Remote host closed the connection]
bradhe has joined #ruby
niklasb has joined #ruby
Vainoharhainen has joined #ruby
reppard has joined #ruby
bondar has quit []
hbpoison has quit [Ping timeout: 264 seconds]
bondar has joined #ruby
bondar has quit [Client Quit]
hbpoison has joined #ruby
karasawa has quit [Ping timeout: 255 seconds]
bondar has joined #ruby
<[eDu]> hello!
slainer68 has joined #ruby
Spooner has quit [Quit: Leaving]
karasawa has joined #ruby
breakingthings has quit []
bean has joined #ruby
jxf has quit [Read error: No route to host]
jxf has joined #ruby
<Fuzai> So i'm basically trying to build a lazy function queue. What I was hoping for was something like [ [ (time in seconds past epoch to trigger), proc { code to run }], ..., ...,].process where process is a function that I wrote. Could someone point me in the right direction for that?
<Fuzai> I'm sorry if these questions are vague, i'm not entirely sure what to call what i'm trying to do
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
<Fuzai> I guess the question is is how would make my own custom array function and then attach it to my own array. I'm sure i could make a simple array of things to actually process after I looked at the first array and processed it
reppard has quit [Ping timeout: 255 seconds]
dr_neek has joined #ruby
Virunga has quit [Remote host closed the connection]
* Fuzai waits patiently for some more wise advice
linoge has quit [Ping timeout: 256 seconds]
<ericwood> have you looked into eventmachine?
<ericwood> sounds an awful lot like what eventmachine does
reinaldob has joined #ruby
<Fuzai> well kinda
joofsh has quit [Remote host closed the connection]
beliveyourdream has quit [Remote host closed the connection]
<Fuzai> the main module i'm using is supposed to be in event machine but it doesn't make a lick of sense and the docs from the guy that wrote the module my code example should work and four days later I haven't gotten word back from him on my bug report and what his docs say i should be able to do i can't seem to make happen
<Fuzai> so i was going to implement my own basic function queue within his module to serve my purposes because eventmachine seems like voodoo to me i don't understand and I don't have anyone to hold my hand and teach me it
hbpoison has quit [Ping timeout: 276 seconds]
krawchyk_ has quit [Remote host closed the connection]
<Fuzai> Here let me get my bug report, if you can solve this then I can figure everything else out, but i'm way in over my head trying to solve this
krawchyk has joined #ruby
niklasb has quit [Ping timeout: 260 seconds]
kold has joined #ruby
hoelzro|away is now known as hoelzro
<ericwood> that's literally what you wanted
joofsh has joined #ruby
<ericwood> like, same arguments and everything :P
gregoryigelmund has quit [Quit: Linkinus - http://linkinus.com]
atno has joined #ruby
niklasb has joined #ruby
diegoviola has joined #ruby
<Fuzai> ty :)
zmisc has joined #ruby
ChrisMacNaughton has joined #ruby
chussenot has joined #ruby
<Fuzai> Wow gee looky there thank you ericwood you just saved me a day at least :)
razibog has quit [Ping timeout: 252 seconds]
baroquebobcat has joined #ruby
hbpoison has joined #ruby
reppard has joined #ruby
zmisc has quit [Remote host closed the connection]
Michae___ has quit [Remote host closed the connection]
<ericwood> this is the kind of thing you'd need a good amount of time to implement correctly on your own
<diegoviola> i want to pass a few variables to a rake task and have those variables be accessible across many rake tasks that are defined inside a namespace, how do i go in doing that?
mengu has joined #ruby
jonahR has joined #ruby
neku has quit [Quit: Leaving...]
reppard has quit [Ping timeout: 244 seconds]
iamjarvo has joined #ruby
tonini has quit [Remote host closed the connection]
ewnd9 has joined #ruby
apeiros_ has joined #ruby
joofsh has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 255 seconds]
banister`sleep has joined #ruby
carloslopes has joined #ruby
clocKwize has quit [Quit: clocKwize]
joofsh has joined #ruby
stevechiagozie has joined #ruby
jaywastaken has quit [Remote host closed the connection]
reisl has quit [Quit: Leaving]
phantasm66 has joined #ruby
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
hbpoison has quit [Read error: Connection reset by peer]
<Fuzai> ericwood, you just made my day thank you!
<ericwood> anytime
hbpoison has joined #ruby
<ericwood> now I have to go and ruin it
Hanmac has quit [Ping timeout: 245 seconds]
akemrir has quit [Quit: WeeChat 0.3.9.2]
niklasb has quit [Ping timeout: 260 seconds]
Michae___ has joined #ruby
hbpoison has quit [Read error: Connection reset by peer]
zommi has quit [Quit: Leaving.]
apeiros_ has quit [Remote host closed the connection]
ndboost has quit [Remote host closed the connection]
Phoop has quit [Quit: Phoop]
matthias_ has quit []
jxf has quit [Ping timeout: 252 seconds]
fourq has joined #ruby
kold has quit [Remote host closed the connection]
carloslopes has quit [Ping timeout: 256 seconds]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
hbpoison has joined #ruby
Virunga has joined #ruby
jpfuentes2 has joined #ruby
osaut has joined #ruby
kil0byte has quit [Remote host closed the connection]
ndboost has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
carloslopes has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
gyre007 has joined #ruby
SCommette has joined #ruby
nricciar has quit [Remote host closed the connection]
yekta has joined #ruby
pu22l3r has joined #ruby
asteve has joined #ruby
joofsh has quit [Remote host closed the connection]
apeiros_ has joined #ruby
elico has quit [Remote host closed the connection]
rpminihan has quit [Ping timeout: 246 seconds]
headius has joined #ruby
joshman_ has joined #ruby
jprovazn has quit [Quit: Leaving]
nathancahill has quit [Quit: nathancahill]
sleetdrop has quit [Remote host closed the connection]
mikeycgto has quit [Quit: Leaving]
baphled has quit [Ping timeout: 246 seconds]
sleetdrop has joined #ruby
philips_ has quit [Excess Flood]
krz has quit [Quit: krz]
nricciar has joined #ruby
beiter has joined #ruby
obryan has joined #ruby
haxrbyte has joined #ruby
<RubNoob> does anyone know how to do ruby conditionals inside a coffeescript using instance variables from a controller?
joofsh has joined #ruby
haxrbyte_ has quit [Ping timeout: 264 seconds]
nathancahill has joined #ruby
Virunga has quit [Remote host closed the connection]
Michae___ has quit [Remote host closed the connection]
Michae___ has joined #ruby
<ericwood> better question for #rubyonrails
Fuzai has quit [Ping timeout: 252 seconds]
benlieb has joined #ruby
banister`sleep is now known as banisterfiend
burgestrand has quit [Quit: Leaving.]
love_color_text has quit [Ping timeout: 252 seconds]
baphled has joined #ruby
Goopyo has joined #ruby
bradhe has joined #ruby
<_axx> can someone tell me how i can write each line from a systemcall like "ls -lha" to a websocket? :)
Michae___ has quit [Remote host closed the connection]
SeySayux has quit [Read error: Connection reset by peer]
<_axx> i don't need an exact explanation, but i'm not sure how to capure the output
villadelfia has quit [Read error: Connection reset by peer]
<_axx> :3
<ericwood> whatever.write(`ls -lha`)
Michae___ has joined #ruby
<ericwood> use backticks like these: ``
<ericwood> anything inside of them gets executed in a shell
baroquebobcat has quit [Quit: baroquebobcat]
<matti> `back ticks are bad idea`
<ericwood> there's also system(), but that only returns the returnvalue from the shell
elico has joined #ruby
<ericwood> `best idea evar`
philips_ has joined #ruby
<ericwood> yeah, probably not a good idea if they're being wired into sockets......
<apeiros_> Xeago: ping, pm
<_axx> ericwood: i really only want to display command output on a website, like in interactive shell but without user input
Uranio has joined #ruby
nathancahill has quit [Quit: nathancahill]
SeySayux has joined #ruby
<apeiros_> _axx: can't with ``
<apeiros_> you need IO.popen or (better, more modern) Kernel#spawn
<_axx> i.e. if i run "ping google.com" i want to push the output line by line to a websocket, not the end result as a whole
andrewhl has joined #ruby
wargasm1 has joined #ruby
<ericwood> ah, yeah, listen to apeiros_ then
wargasm has quit [Ping timeout: 244 seconds]
<apeiros_> `` buffers up until the process terminates
<apeiros_> and returns the whole output as one single string
<apeiros_> spawn/popen give you IOs from which you can read continually
<_axx> yeah, that's not what i want.
<_axx> nice, i'll take a look at that .)
<_axx> :)
elico has quit [Client Quit]
<_axx> ...i don't want buffering
retro|cz has quit [Remote host closed the connection]
<apeiros_> figured. which is why I said, that you can't with `` ;-)
breakingthings has joined #ruby
villadelfia has joined #ruby
vlad_starkov has joined #ruby
<_axx> yep, thanks :)
Goles has joined #ruby
imperator has quit [Quit: This computer has gone to sleep]
buscon has quit [Quit: Leaving]
interactionjaxsn has quit [Remote host closed the connection]
<_axx> apeiros_: great! spawn works. :)
Fuzai has joined #ruby
matthewrobbins has quit [Ping timeout: 248 seconds]
levabalkin has joined #ruby
uris has joined #ruby
daniel_- has joined #ruby
Virunga has joined #ruby
wf2f has quit []
AndChat| has quit [Ping timeout: 272 seconds]
jaequery has joined #ruby
sailias has joined #ruby
fuzai_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
horofox_ has joined #ruby
bbttxu has joined #ruby
Banistergalaxy has joined #ruby
<horofox_> So, I have a setup with cucumber, factory girl and database cleaner and database cleaner is not running after each scenario, can some1 help?
banister_ has joined #ruby
janjos has left #ruby ["Konversation terminated!"]
banisterfiend has quit [Read error: Connection reset by peer]
jds_ has joined #ruby
Fuzai has quit [Ping timeout: 240 seconds]
zph has quit [Quit: Computer has gone to sleep.]
<benlieb> what does the 'dot' do in the following: 65.+(rand(26))
bbttxu has quit [Quit: bbttxu]
<ericwood> it calls +
<ericwood> + is actually a function
allsystemsarego has joined #ruby
allsystemsarego has joined #ruby
allsystemsarego has quit [Changing host]
main has quit [Ping timeout: 272 seconds]
<ericwood> >> p 1.+1
<eval-in> ericwood: Output: "2\n" (http://eval.in/6595)
<ericwood> >> p 1.-1
<eval-in> ericwood: Output: "0\n" (http://eval.in/6596)
<ericwood> :D:D:D
<ericwood> idk why you'd ever actually *do* that, though.......
<pyro111> >> 'awesome'
<eval-in> Pyro111: Output: "" (http://eval.in/6597)
<ericwood> >> p 'not so awesome'
<eval-in> ericwood: Output: "\"not so awesome\"\n" (http://eval.in/6598)
flagg0204 has quit [Quit: leaving]
<benlieb> ericwood: tnx
chussenot has quit [Quit: chussenot]
<workmad3> >> p 1.succ
<eval-in> workmad3: Output: "2\n" (http://eval.in/6599)
yekta has quit [Quit: yekta]
hbpoison has quit [Ping timeout: 246 seconds]
<benlieb> seems to save a space or two, but readability suffers: 65 + (rand(26)) is clearer
<apeiros_> 65+rand(26)
Umren has joined #ruby
<apeiros_> it sacrifices
<pyro111> >> [*26..65].sample
<eval-in> Pyro111: Output: "" (http://eval.in/6600)
<apeiros_> also as of 1.9 (maybe 1.9.3): rand(65..91)
chussenot has joined #ruby
<pyro111> p >> [*26..65].sample
<pyro111> >>p [*26..65].sample
<eval-in> Pyro111: Output: "52\n" (http://eval.in/6601)
<apeiros_> pyro111: na, that's inefficient
troessner has quit [Ping timeout: 256 seconds]
<apeiros_> also it's wrong :)
<apeiros_> you meant [*26..91]
<apeiros_> >> p rand(26..91)
<eval-in> apeiros_: Output: "62\n" (http://eval.in/6602)
<apeiros_> gah
<pyro111> >> require 'random'
<eval-in> Pyro111: Output: "" (http://eval.in/6603)
<apeiros_> you meant [*65..91]
<pyro111> >> require 'random'; p ranom 2..5
<eval-in> Pyro111: Output: "" (http://eval.in/6604)
aganov has quit [Remote host closed the connection]
<pyro111> >> require 'random'; p ranom(2..5)
<eval-in> Pyro111: Output: "" (http://eval.in/6605)
<pyro111> i saw somethig like that
interactionjaxsn has joined #ruby
jrhorn424 has joined #ruby
zigomir has quit [Quit: zigomir]
<benlieb> pyro111: p ranom(2..5) not working for me.
zigomir has joined #ruby
zigomir has quit [Client Quit]
<pyro111> >> Random.rand 1..3
<eval-in> Pyro111: Output: "" (http://eval.in/6607)
<pyro111> >> p 3.times.map{ Random.rand 1..3 }
<eval-in> Pyro111: Output: "[1, 3, 1]\n" (http://eval.in/6608)
n1x has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
bradhe has quit [Ping timeout: 255 seconds]
<benlieb> pyro111: can't convert Range into Integer
<pyro111> ruby 1.8...
jjbohn has joined #ruby
<benlieb> 1.9.2
<apeiros_> benlieb: because a) it's not ranon
<apeiros_> (random!)
swinburnesque81 has quit [Ping timeout: 252 seconds]
<apeiros_> and b it's not even random, just rand
io_syl has quit [Quit: Computer has gone to sleep.]
<apeiros_> and wtf, I even showed it in use?!?
<apeiros_> >> p rand(65..91)
<eval-in> apeiros_: Output: "73\n" (http://eval.in/6609)
<apeiros_> I mean… can't make it any easier…
Guedes has quit [Ping timeout: 276 seconds]
pu22l3r has quit [Remote host closed the connection]
fuzai_ is now known as Fuzai
poseid has quit [Ping timeout: 245 seconds]
<apeiros_> rand(Range) might be 1.9.3+, not 1.9.2+
<benlieb> apeiros_: yeah no workie in 1.9.2
mmitchell has joined #ruby
<benlieb> tnx guys for your help : )
samphippen has joined #ruby
Nisstyre-laptop has joined #ruby
banister_ has quit [Remote host closed the connection]
gyre007 has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
jaequery has quit [Quit: Computer has gone to sleep.]
<benlieb> this seems to be pretty nice: SecureRandom.hex(length)
beneggett has quit [Ping timeout: 252 seconds]
<pyro111> >> p ObjectSpace.each_object.count
<eval-in> Pyro111: Output: "6081\n" (http://eval.in/6610)
<pyro111> >> '123'
<eval-in> Pyro111: Output: "" (http://eval.in/6611)
<pyro111> >> p ObjectSpace.each_object.count
<eval-in> Pyro111: Output: "6081\n" (http://eval.in/6612)
mafolz has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
tvw has joined #ruby
swinburnesque81 has joined #ruby
woolite64 has joined #ruby
woolite64 has quit [Read error: Connection reset by peer]
woolite64 has joined #ruby
obryan has quit [Read error: Connection reset by peer]
<ericwood> how does eval-in handle infinite loops?
<ericwood> is there a timeout?
buibex has quit [Remote host closed the connection]
<ericwood> I want to try, but I'd rather not be an ass about it :\
karasawa has quit [Ping timeout: 276 seconds]
<Xeago> >> i=0; while true do i+=1 end; puts i
<eval-in> Xeago: Output: "" (http://eval.in/6613)
karasawa has joined #ruby
<Xeago> kinda short it seems
<Xeago> >> i=0; while true do i+=1 end; i
<eval-in> Xeago: Output: "" (http://eval.in/6614)
<Xeago> >> i=0; while true do i+=1 end; print i
<eval-in> Xeago: Output: "" (http://eval.in/6615)
<Xeago> >> i=0; while true do i+=1 end; print "a"
<eval-in> Xeago: Output: "" (http://eval.in/6616)
<ericwood> >> def foo(i); foo(i+1); end; foo(0)
<eval-in> ericwood: Output: "/tmp/execpad-a86bdb5d9560/source-a86bdb5d9560:1: stack level too deep (SystemStackError)\n" (http://eval.in/6617)
haxrbyte has quit [Read error: Connection reset by peer]
<ericwood> :D
RagingDave has quit [Quit: Ex-Chat]
ndboost has quit [Remote host closed the connection]
<pyro111> >> p RubyVM
<eval-in> Pyro111: Output: "RubyVM\n" (http://eval.in/6618)
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
Fretta has joined #ruby
<Xeago> pyro111: how does that work?
<Xeago> >> p RubyVM.class
<eval-in> Xeago: Output: "Class\n" (http://eval.in/6619)
<Xeago> >> p RubyVM.class.name
<eval-in> Xeago: Output: "\"Class\"\n" (http://eval.in/6620)
<ericwood> hmmmm
inokenty has joined #ruby
jxf has joined #ruby
swinburnesque81 has quit [Ping timeout: 276 seconds]
eldariof-office has quit [Ping timeout: 276 seconds]
Goopyo has quit [Quit: Goopyo]
Spooner has joined #ruby
ner0x has joined #ruby
<pyro111> >> p RubyVM::ENV
<eval-in> Pyro111: Output: "/tmp/execpad-7c3de66d5e32/source-7c3de66d5e32:1: warning: toplevel constant ENV referenced by RubyVM::ENV\n{\"LIBC_FATAL_STDERR_\"=>\"1\", \"LANG\"=>\"en_US.UTF-8\"}\n" (http://eval.in/6621)
Goles has quit [Ping timeout: 252 seconds]
Xeago has quit [Remote host closed the connection]
samphippen has quit [Quit: Computer has gone to sleep.]
DefV has quit [Ping timeout: 264 seconds]
swinburnesque81 has joined #ruby
tommyvyo_ has joined #ruby
DefV has joined #ruby
mikekelly has quit [Ping timeout: 264 seconds]
<pyro111> Xeago: I almost dont know about it
Goopyo has joined #ruby
qwester has joined #ruby
gyre007 has joined #ruby
mikekelly has joined #ruby
tatsuya_o has quit [Ping timeout: 264 seconds]
wallerdev has joined #ruby
banisterfiend has joined #ruby
jaequery has joined #ruby
joofsh has quit [Remote host closed the connection]
jonathanwallace1 has quit [Ping timeout: 264 seconds]
jaequery has quit [Client Quit]
flagg0204 has joined #ruby
Nisstyre-laptop has quit [Quit: Leaving]
jean-louis has quit [Ping timeout: 276 seconds]
danneu has joined #ruby
Goles has joined #ruby
beneggett has joined #ruby
ndboost has joined #ruby
Kuifje has joined #ruby
Kuifje has quit [Changing host]
Kuifje has joined #ruby
rakl has joined #ruby
aeontech has joined #ruby
chussenot_ has joined #ruby
ndboost has quit [Remote host closed the connection]
dawkirst has quit [Ping timeout: 272 seconds]
ben___ has joined #ruby
chussenot has quit [Ping timeout: 244 seconds]
chussenot_ is now known as chussenot
bradhe has joined #ruby
samphippen has joined #ruby
hbpoison has joined #ruby
hoelzro is now known as hoelzro|away
levabalkin has quit [Quit: Lost terminal]
apeiros_ has quit [Remote host closed the connection]
blazes816 has joined #ruby
bricker`LA has quit [Read error: Connection reset by peer]
neku has joined #ruby
b1rkh0ff has quit [Read error: Connection reset by peer]
bricker`LA has joined #ruby
cr3 has joined #ruby
bitcrave has quit [Remote host closed the connection]
baphled has quit [Ping timeout: 256 seconds]
ndboost has joined #ruby
az7ar has joined #ruby
pu22l3r has joined #ruby
beneggett has quit [Ping timeout: 252 seconds]
Nisstyre-laptop has joined #ruby
jds_ has quit [Remote host closed the connection]
Virunga has quit [Remote host closed the connection]
imperator has joined #ruby
jds_ has joined #ruby
jds_ has quit [Remote host closed the connection]
chussenot has quit [Quit: chussenot]
Michae___ has quit [Remote host closed the connection]
Michael_ has joined #ruby
Michael_ has quit [Remote host closed the connection]
nathancahill has joined #ruby
blaxter has quit [Read error: Connection reset by peer]
Michael_ has joined #ruby
hbpoison has quit [Ping timeout: 276 seconds]
chussenot has joined #ruby
chussenot has quit [Client Quit]
m_3 has quit [Remote host closed the connection]
blaxter has joined #ruby
beneggett has joined #ruby
jds_ has joined #ruby
nomenkun has quit [Remote host closed the connection]
jaequery has joined #ruby
jds_ has quit [Remote host closed the connection]
Targen has joined #ruby
alanp_ has joined #ruby
pu22l3r has quit [Remote host closed the connection]
sn0wb1rd has joined #ruby
statarb3 has quit [Ping timeout: 272 seconds]
alanp has quit [Ping timeout: 255 seconds]
alanp_ is now known as alanp
jaequery has quit [Client Quit]
chussenot has joined #ruby
chussenot_ has joined #ruby
joofsh has joined #ruby
alex__c2022 has joined #ruby
chussenot_ has quit [Client Quit]
m_3 has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
friskd has joined #ruby
beiter has quit [Quit: beiter]
bradhe has joined #ruby
chussenot_ has joined #ruby
kpshek has quit []
chussenot_ has quit [Client Quit]
beiter has joined #ruby
Targen has quit [Ping timeout: 252 seconds]
chussenot has quit [Ping timeout: 264 seconds]
friskd has quit [Client Quit]
bradhe has quit [Ping timeout: 255 seconds]
hynkle has quit [Quit: hynkle]
kpshek has joined #ruby
az7ar has quit [Quit: Leaving]
clocKwize has joined #ruby
yekta has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
tatsuya_o has joined #ruby
mahmoudimus has joined #ruby
BizarreCake has quit [Remote host closed the connection]
clocKwize has quit [Quit: clocKwize]
sepp2k has quit [Remote host closed the connection]
nkr has quit [Ping timeout: 240 seconds]
rakl has quit [Quit: sleeping]
dankest has joined #ruby
joeycarmello has joined #ruby
alvaro_o has joined #ruby
etcetera has joined #ruby
timonv has quit [Remote host closed the connection]
<lectrick> I should be able to tell a class to remove_const itself. Classname.kill_yourself. What would that method look like?
<banisterfiend> lectrick: Object.send(:remove_const, :ClassName)
<lectrick> ah, I figured it was on Kernel or Module or something
<banisterfiend> nup
<banisterfiend> they're nested under Object
Hanmac has joined #ruby
bean has quit [Quit: Computer has gone to sleep.]
<lectrick> thanks as usual banisterfiend
<banisterfiend> np
clocKwize has joined #ruby
clocKwize has quit [Client Quit]
jaequery has joined #ruby
<Hanmac> wtf? you help someone? thats MY job! :D
eykosioux has quit [Quit: eykosioux]
dmerrick has joined #ruby
d2dchat has joined #ruby
arturaz has quit [Ping timeout: 244 seconds]
rakl has joined #ruby
zeade has joined #ruby
macmartine has joined #ruby
eykosioux has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ukd1 has joined #ruby
ddd has quit [Ping timeout: 245 seconds]
<unstable> How can I write a method that takes in a block?
m_3 has quit [Ping timeout: 240 seconds]
<unstable> like [1, 2, 3].my_method
aeontech has quit [Quit: aeontech]
BoomCow has joined #ruby
BoomCow has quit [Client Quit]
<reactormonk> unstable, huh? Where's the block here?
<Spooner> unstable, That isn't a block, but a method on Array (or Enumerable).
verto|off is now known as verto
Michael_ has quit [Remote host closed the connection]
zmo_ has joined #ruby
m_3 has joined #ruby
bradhe has joined #ruby
<unstable> How do i feed an array?
<unstable> So after I def my_method, I can do [1, 2, 3].my_method
samphippen has quit [Quit: Computer has gone to sleep.]
sayan has quit [Read error: Connection reset by peer]
<unstable> reactormonk: I think I meant an array
<reactormonk> unstable, well, your method still doesn't take an array.
ddv has quit [Ping timeout: 240 seconds]
<unstable> a string, so "string".my_method
<unstable> How can I just setup a method to feed stuff to it in that form?
Nisstyre-laptop has quit [Quit: Leaving]
DaltonUS has joined #ruby
<Spooner> unstable class String; def my_method; puts self.reverse; end; end; "string".my_method
benlieb has quit [Quit: benlieb]
<Spooner> In such a method, the string itself is "self"
ddv has joined #ruby
jonathanwallace has joined #ruby
<unstable> NoMethodError: private method `my_method' called for "string":String
<unstable> from (pry):22:in `__pry__'
bru has quit [Quit: leaving]
<unstable> o, I need to put it in a class.
<Spooner> What? That works fine in pry (unless you had a copy-and-paste error :D).
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
tommyvyo_ is now known as tommyvyo
<allsystemsarego> Hi all, I can't have a locally scoped function inside a method in Ruby?
yacks has quit [Read error: Connection reset by peer]
<Spooner> allsystemsarego, Just use a lambda/proc for that.
maletor has joined #ruby
<allsystemsarego> Spooner, thanks, I'll look into that
aeontech has joined #ruby
<Hanmac> in ruby you can define an method inside an method :D
Zolo has joined #ruby
eykosioux has quit [Quit: eykosioux]
bitcrave has joined #ruby
<Spooner> lamb = lambda {|x, y| ..... }; x = lamb[1, 2]; y = lamb[4, 6]
<allsystemsarego> thanks for the example
<Spooner> Hanmac, And it is then local? Well, I never knew that (or assumed it would be added to the class/object in some way)
<Hanmac> >> def abc; def abc; p "two";end;p "one";end; abc && abc
<eval-in> Hanmac: Output: "\"one\"\n\"two\"\n" (http://eval.in/6624)
eykosioux has joined #ruby
<Hanmac> Spooner in my sample its not local (as the bot shows) i want to show that you can define methods inside methods (so an method can overwrite itself)
Michael_ has joined #ruby
<allsystemsarego> Hanmac, it's not very clean code however
<Spooner> Hanmac, Right. That is more how I expected it.
hynkle has joined #ruby
benlieb has joined #ruby
wudofyr has joined #ruby
gyre008 has joined #ruby
hbpoison has joined #ruby
arietis has joined #ruby
kpshek has quit []
gyre007 has quit [Read error: Connection reset by peer]
<Hanmac> its interesting that this overwrite works on class Level, that means:
<Spooner> allsystemsarego, There are a million things possible in Ruby that only crazy people would actually use...
punkrawkR^Home has joined #ruby
<reactormonk> Hanmac, now, can you define a method that overwrites itself with a copy of itself?
cobragoat has joined #ruby
<unstable> How can I find teh value of an array with it's index?
<unstable> [0, 1, 2]
<reactormonk> unstable, come on, read the doc.
noxoc has quit [Quit: noxoc]
filipe has quit [Read error: Connection reset by peer]
<unstable> find(2) say, and it outputs 2
<unstable> the index
troessner has joined #ruby
<banisterfiend> unstable: its*
jgrevich has joined #ruby
<reactormonk> unstable, little hint: the method is named after one of the words you used.
<Hanmac> reactormonk, how do you mean with copy of itself?
robotmay has quit [Remote host closed the connection]
jimmyy has quit [Remote host closed the connection]
zph has joined #ruby
jimmyy has joined #ruby
<reactormonk> Hanmac, or you can go a cycle - write a method that overwrites itself with another method which overrides itself with the method at the beginning again
<Spooner> reactormonk, def abc; define_method :abc, &method(:abc); end
whowantstolivef1 has joined #ruby
c0rn has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
bondar has quit []
sn0wb1rd has joined #ruby
<banisterfiend> Spooner: btw you dont need the &
<Spooner> Oh, fair enough.
kenneth has quit [Quit: kenneth]
jfl0wers has quit [Read error: Connection reset by peer]
jfl0wers has joined #ruby
jds_ has joined #ruby
Xeago has joined #ruby
chussenot has joined #ruby
browndawg has quit [Quit: Leaving.]
io_syl has joined #ruby
tvw has quit [Remote host closed the connection]
ephemerian has quit [Quit: Leaving.]
tvw has joined #ruby
[eDu] has quit [Quit: [eDu]]
spilth has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
<spilth> Is modruby.net supposed to work?
etcetera has quit []
<Spooner> banisterfiend, thanks.
tatsuya_o has quit []
rippa has joined #ruby
<spilth> I'm asking cause it's in the Welcome message.
samphippen has joined #ruby
nu7hatch has joined #ruby
tjbiddle has joined #ruby
Joel has joined #ruby
<Joel> is #rails the only rails channel, or is there another more active channel?
breakingthings has quit []
<Hanmac> Joel #rubyonrails
<heftig> Joel: #ror
<Joel> thanks guys
<workmad3> #rubyonrails, #ror is a different channel for rails-core, but shunts you to #rubyonrails if you're not allowed in
huoxito has joined #ruby
spilth has left #ruby [#ruby]
asteve has quit [Quit: Computer has gone to sleep.]
tPl0ch has joined #ruby
etcetera has joined #ruby
ukd1 has left #ruby [#ruby]
Zolo has quit [Remote host closed the connection]
survili has joined #ruby
ChrisMacNaughton has quit [Remote host closed the connection]
stevechiagozie has quit [Quit: Computer has gone to sleep.]
pu22l3r has joined #ruby
<survili> hi guys, my rails project crashes ruby on ubuntu 32(12.10) I get "You may have encountered a bug in the Ruby interpreter or extension libraries.", does ruby log somewhere what went wrong ? maybe I can view this file and identify which gem causes problem ?
bradhe has quit [Remote host closed the connection]
<survili> I use latest stable tuby
<survili> ruby
nu7hatch has left #ruby [#ruby]
Nisstyre has joined #ruby
mrsolo has joined #ruby
linoge has joined #ruby
buibex has joined #ruby
shevy2 has joined #ruby
mercwithamouth has quit [Ping timeout: 264 seconds]
pyro111 has quit [Quit: Leaving]
DrShoggoth has joined #ruby
nwertman has joined #ruby
statarb3 has joined #ruby
toekutr has joined #ruby
zodiak has quit [Ping timeout: 248 seconds]
rouss has joined #ruby
<Hanmac> survili: what excactly is your ruby version?
eldariof has joined #ruby
rouss is now known as Guest11380
<Spooner> Hanmac, The latest stable version is 1.8.5, isn't it? ;)
nomenkun has joined #ruby
katherinem13 has quit [Ping timeout: 260 seconds]
<survili> Hanmac: ruby 1.9.3p362 (2012-12-25 revision 38607) [i686-linux]
<survili> Hanmac: btw, same happens on windowz machine(same ruby version)
<Hanmac> survili: use an older one (the 1.9.3version of the system should be new enough?) the p362 has CRITICAL problems with rails
stevechiagozie has joined #ruby
__BigO__ has joined #ruby
<survili> Hanmac: which version do you recommend ?
Michael_ has quit [Remote host closed the connection]
noxoc has joined #ruby
jxf has quit [Quit: Leaving]
shevy has quit [Ping timeout: 248 seconds]
buibex has quit [Remote host closed the connection]
katherinem13 has joined #ruby
benlieb has quit [Quit: benlieb]
rippa has quit [Read error: Connection reset by peer]
rippa has joined #ruby
zodiak has joined #ruby
Guest11380 has quit [Client Quit]
alanp has quit [Remote host closed the connection]
<Hanmac> survili ruby-1.9.3-p327 is good
nomenkun has quit [Ping timeout: 260 seconds]
<survili> Hanmac: will try. was wondering, is there some log file that ruby crates when it crashes, and writes some useful info ?
jgrevich_ has joined #ruby
jgrevich has quit [Ping timeout: 252 seconds]
jgrevich_ is now known as jgrevich
<Spooner> survili, If you run via gdb it might give you a better insight into where the error occurs, especially if it is in a specific extension gem.
alanp has joined #ruby
Jackneill has quit [Read error: Connection reset by peer]
<Hanmac> survili: the error with p362 + rails is allready on https://bugs.ruby-lang.org/issues ... i saw the ticket multible times
wallerdev has quit [Quit: wallerdev]
etcetera has quit []
wallerdev has joined #ruby
<survili> Hanmac: thanks, trying older version
asteve has joined #ruby
alanp has quit [Remote host closed the connection]
etcetera has joined #ruby
tommyvyo_ has joined #ruby
Guest25886 has joined #ruby
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Xeago has quit [Remote host closed the connection]
rdark_ has quit [Quit: leaving]
cdt has quit [Quit: Ex-Chat]
etcetera has quit [Client Quit]
alanp has joined #ruby
Xeago has joined #ruby
arietis has joined #ruby
d2dchat has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 272 seconds]
kenneth has joined #ruby
matchaw has joined #ruby
katherinem13 has quit [Ping timeout: 244 seconds]
juarlex has joined #ruby
zodiak has quit [Ping timeout: 248 seconds]
tPl0ch has quit [Ping timeout: 260 seconds]
ndboost has quit [Remote host closed the connection]
graft is now known as Guest75995
graft__ is now known as graft
graft has quit [Changing host]
graft has joined #ruby
kudos has joined #ruby
gyre008 has quit [Remote host closed the connection]
gyre007 has joined #ruby
katherinem13 has joined #ruby
zodiak has joined #ruby
jgarvey has joined #ruby
horofox_ has quit [Read error: Connection reset by peer]
Morkel has quit [Quit: Morkel]
horofox_ has joined #ruby
etcetera has joined #ruby
moos3 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
moos3 has joined #ruby
hybris has quit [Ping timeout: 272 seconds]
nathancahill has quit [Read error: Connection reset by peer]
nathancahill_ has joined #ruby
alanp has quit [Remote host closed the connection]
krawchyk_ has joined #ruby
Cicloid has joined #ruby
janjos has joined #ruby
nkts has quit [Remote host closed the connection]
<janjos> ello there
karasawa has quit [Ping timeout: 252 seconds]
sailias1 has joined #ruby
karasawa has joined #ruby
alanp has joined #ruby
krawchyk has quit [Read error: Operation timed out]
stonevil has quit [Quit: stonevil]
baroquebobcat has quit [Ping timeout: 248 seconds]
ddd has joined #ruby
<survili> Spooner, Hanmac: thanks a lot guys. p327 works just fine! the problem in p362 seems to be cause of rails_admin gem I'm using, according to https://gist.github.com/4433870 , too bad ruby team still distribute this version
Spami has quit [Quit: This computer has gone to sleep]
fred909 has joined #ruby
sailias has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
<Hanmac> i have infos that it happends in activerecord too
arturaz has joined #ruby
Virunga has joined #ruby
nathancahill_ has quit [Ping timeout: 260 seconds]
Michael_ has joined #ruby
squidBits has joined #ruby
survili has quit [Quit: Leaving]
Nisstyre has quit [Ping timeout: 248 seconds]
chussenot has quit [Quit: chussenot]
grzywacz has quit [Ping timeout: 255 seconds]
MattRb has joined #ruby
noxoc has quit [Quit: noxoc]
Dann1 has joined #ruby
Bottesque has joined #ruby
Astralum has quit [Read error: Connection reset by peer]
sailias has joined #ruby
Astralum has joined #ruby
clooth has quit [Quit: clooth]
Zolo has joined #ruby
huoxito has quit [Ping timeout: 248 seconds]
linoge has quit [Read error: Connection reset by peer]
linoge has joined #ruby
jds_ has quit [Remote host closed the connection]
nathancahill has joined #ruby
sailias1 has quit [Ping timeout: 248 seconds]
mercwithamouth has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
Tarential has quit [Excess Flood]
bluenemo has quit [Remote host closed the connection]
Tarential has joined #ruby
jds_ has joined #ruby
Virunga has quit [Remote host closed the connection]
Xeago has joined #ruby
chussenot has joined #ruby
Guedes is now known as Guedes_out
jeffreybaird has quit [Read error: Connection reset by peer]
jeffreybaird has joined #ruby
stonevil has joined #ruby
chussenot has quit [Client Quit]
slainer68 has quit [Remote host closed the connection]
<janjos> is there a ruby / learnprogramming type channel? or is this the one?
maletor has quit [Quit: Computer has gone to sleep.]
<janjos> well, a ruby focused one?
froy has quit [Quit: kablam!]
<Xeago> janjos: there is also #ruby-lang
<Xeago> but imo, we are cooler :)
<Fuzai> tableQueue.each do |dj| is there some way to have an else if there is nothing in tableQueue?
<janjos> Ok hehe...
<janjos> Are there any good manuals/sample code places for learning structs with ruby?
jcrawford has quit [Excess Flood]
<Hanmac> Fuzai you could do tableQueue.empty? or tableQueue.none?
<janjos> I think I have a basic understanding of my sample data, but I don't really know the syntax
<Fuzai> hmm i'll look into both of those
maxmanders has joined #ruby
cakehero has joined #ruby
vlad_starkov has joined #ruby
etcetera has quit []
baphled has joined #ruby
jcrawford has joined #ruby
Michael_ has quit [Remote host closed the connection]
etcetera has joined #ruby
jlast_ has joined #ruby
reppard has joined #ruby
froy has joined #ruby
jds_ has quit [Remote host closed the connection]
maletor has joined #ruby
huoxito has joined #ruby
`Kevin_ has joined #ruby
brianpWins has joined #ruby
jlast has quit [Ping timeout: 252 seconds]
`Kevin_ has quit [Remote host closed the connection]
horofox__ has joined #ruby
horofox_ has quit [Read error: No route to host]
`Kevin has quit [Ping timeout: 264 seconds]
earthquake has quit [Ping timeout: 264 seconds]
jerius_ has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
shtirlic_ has quit [Remote host closed the connection]
pu22l3r has quit [Remote host closed the connection]
<janjos> Hanmac: that link wasn't really what I was looking for, I was checking this out more http://www.ruby-doc.org/core-1.9.3/Struct.html -- I do have a question though... If I have a list of 10 different "people" and I define each one as a struct, so... Person = Struct.new("Person", :name, :role, :type)
<janjos> and then when I create each one
<janjos> so .. c = Person.new("Bob, "Plumber", "Outgoing")
<janjos> if I make the dataset that way
<janjos> define them all like that
<janjos> how do I then organize all of them together
<janjos> so.. if I want to search for a Plumber within a dataset
<janjos> and have it return all the plumbers
huoxito has quit [Ping timeout: 248 seconds]
bricker`away is now known as bricker
jrist is now known as jrist-afk
jerius has quit [Ping timeout: 276 seconds]
jerius_ is now known as jerius
<heftig> if you stick them into an array, you could use people.select { |p| p.role == "Plumber" }
pavilionXP has quit [Quit: Forget progress by proxy. Land on your own moon.]
<heftig> that, of course, is a linear search O(n)
apa has joined #ruby
[eDu] has joined #ruby
Michael_ has joined #ruby
dmerrick has quit [Read error: Connection reset by peer]
<apa> Hello! One question about Ruby C extensions: if I have to hold a single unsigned long variable to be used in 2 methods, to I have to wrap it in a struct?
<Bottesque> Hai apa.
rezzack has joined #ruby
<apa> Bottesque: hi!
dmerrick has joined #ruby
<Bottesque> Did I hear someone mention me? :)
<Bottesque> apa: How are you?
<apa> Bottesque: fine
<Bottesque> Did I hear someone mention me? :)
<Bottesque> apa: I don't know.
tPl0ch has joined #ruby
breakingthings has joined #ruby
<imperator> apa, no, should be able to just pass by ref
elaptics is now known as elaptics`away
earthquake has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
<apa> imperator: and how do you hold in when it is created in the init method (to be used in the other 2 methods)
Uranio has quit [Quit: while you reading this, a kitty dies]
reppard has quit [Ping timeout: 260 seconds]
daniel_- has quit [Quit: WeeChat 0.3.9.2]
x82_nicole has quit [Quit: Computer has gone to sleep.]
qwester has quit [Quit: Linkinus - http://linkinus.com]
<apa> here a pastie to put it more clear: http://pastie.org/private/yosdhrmkjfbfq3kxqsaeqg
<Hanmac> janjos you can change the Person class so it stores the values of its children (and then use Enumerable methods on it)
apa has quit [Read error: Connection reset by peer]
d2dchat has joined #ruby
<imperator> apa, you'll have to declare it outside of init
Dann1 has quit [Ping timeout: 248 seconds]
<imperator> apa, unless this is just an exercise, there is already an mmap lib out there
sayan has joined #ruby
Bottesque has quit [Ping timeout: 256 seconds]
<Hanmac> apa: you need to write your class & init method a bit different ... http://www.ruby-doc.org/docs/ProgrammingRuby/html/ext_ruby.html
jds_ has joined #ruby
<imperator> or just use FFI :)
apa has joined #ruby
generalissimo has joined #ruby
<apa> imperator: sorry, I was disconnected
<apa> here is better pastie (with error code): http://pastie.org/private/r8hwr0kz5jdqgrckvelpq
mercwithamouth has quit [Ping timeout: 256 seconds]
<imperator> apa, right, anon is local to the block it's declared in
rickwinfrey has joined #ruby
DavidLevin has joined #ruby
<apa> how can I make it accesible to the other methods?
<imperator> declare it outside :)
<rickwinfrey> hello ^__^
<Hanmac> imperator not all libs has C-APIs some stuff cant be made nice with in C ... so an "real" Ext could be more nice
<rickwinfrey> can someone help me with a load path issue?
<imperator> with ffi you could make it a private instance variable
<Hanmac> rickwinfrey rubyversion?
<imperator> Hanmac, sorry what?
andrewhl has quit [Remote host closed the connection]
nimred has joined #ruby
<rickwinfrey> the core library I'm using is ruby-v 1.9.3, and I'm using a ruby GUI library called Limelight - which depends on jRuby -v 1.6.6
nimred has quit [Changing host]
nimred has joined #ruby
<rickwinfrey> so Limelight is talking with the core library, make sense?
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
<apa> imperator: thanks! problem solved!
<imperator> rickwinfrey, ok, what's the issue?
zcl0ud has joined #ruby
<rickwinfrey> So the core library uses Riac as a datastore
<blazes816> is there an explicit way to say I want integer division? I can do `a.to_i / b.to_i`, but would like something like `a // b`
<rickwinfrey> the Ruby-Riac client says it supports jRuby1.6 and above
<Spooner> blazes816, a.div(b)
<imperator> rickwinfrey, ok...
<imperator> apa, yw
<rickwinfrey> but when I try to load my core library in the context of the Limelight application - I get an error saying 'riak' cannot be found (which is the top-level file in the Ruby-Riak)
<blazes816> Spooner: thanks, perfect
<cr3> what's the convention for using the exclamation point at the end of method names?
williamcotton has joined #ruby
<imperator> rickwinfrey, can you require riak in irb?
truent has joined #ruby
Hydroxide has joined #ruby
<imperator> cr3, typically means it modifies the receiver
<GeekOnCoffee> cr3: ! typically implies that it changes the object it's being called on
Playground has quit [Ping timeout: 252 seconds]
<Hanmac> imperator: for sample getProperty<PropertyType>(String) ... how would you define it with C-API?
<Hydroxide> hi. is there anything about Object.send that interferes with exception-handling?
<rickwinfrey> yeah, i verified my Limelight gemset I'm using has the gem, and riak.rb at the top-level
<Hydroxide> like, if you have a begin...some_obj.send...rescue...blah...end
<Hydroxide> should blah happen?
<imperator> Hanmac, for c++, not sure - might use Rice
<cr3> imperator, GeekOnCoffee: thanks! I thought it might be related to executing shell commands for example, but I like the convention you both described
<Hanmac> Rice is not nice enough (and i dont like how it handle Enums)
<imperator> Hydroxide, afaik, yes
<Spooner> Hydroxide, Nope, except that it doesn't raise NoMethod errors if the method is not accessible (use #public_send instead).
<GeekOnCoffee> cr3: the other big one is ? to specify a boolean response
<Spooner> NameError, I mean.
<Hydroxide> Spooner: ok, so exceptions should happen normally? gotcha
maletor has quit [Ping timeout: 256 seconds]
<imperator> really? i did not know that
Guest3485 has joined #ruby
<Quadlex> Good morning Rubists
<Spooner> Hydroxide, Yes, it is exactly the same as calling normally, except it will let you call protected/private.
maletor has joined #ruby
<Hydroxide> ok, thanks
etcetera has quit []
<cr3> GeekOnCoffee: I've only recently adopted ruby, coming from python and other languages, and it looks like ruby has a lot of conventions. this is fine with me, just wondering if you might be able to point me to a convenient reference
* imperator misread, was correct
ndboost has joined #ruby
villadelfia has quit [Read error: Operation timed out]
yekta has quit [Quit: yekta]
etcetera has joined #ruby
fermion has quit [Quit: P]
<rickwinfrey> imperator: when requiring 'riak' in irb i get the same error. hmm :/
SeySayux has quit [Ping timeout: 240 seconds]
jonathanwallace has quit [Ping timeout: 255 seconds]
clocKwize has joined #ruby
kirun has joined #ruby
<GeekOnCoffee> cr3: not sure if there's a good reference… most of it is relatively common sense, and much of it isn't totally agreed on
Hydroxide has left #ruby [#ruby]
* Hanmac likes to write the bindings with his own hands because he likes to have the full control over it (i tame the GC so i choice if Objects are living or dieing)
truent has quit [Ping timeout: 245 seconds]
<imperator> rickwinfrey, and riak is installed as a gem, right?
pavilionXP has joined #ruby
<rickwinfrey> imperator: yep, i checked the rvm gemset directory and verified the riak gem dir is there.
<cr3> GeekOnCoffee: I'll keep reading lots and lots of ruby then :)
RagingDave has joined #ruby
SeySayux has joined #ruby
Michael_ has quit [Remote host closed the connection]
villadelfia has joined #ruby
<rickwinfrey> imperator: what's confusing me more is that I have a Rails project that ties into the core library - and it loads Riak just fine. It's only when I try using Limelight with my core library that I get the load error.
generali_ has joined #ruby
bean has joined #ruby
generalissimo has quit [Ping timeout: 260 seconds]
<rickwinfrey> imperator: since I'm using two different versions of Ruby - is the load path for the Riak gem installed for jRuby and for Ruby-v1.9.3 conflicting with each other?
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
workmad3 has joined #ruby
Guest3485 has quit []
jjbohn is now known as jjbohn|afk
Virunga has joined #ruby
fred909 has quit [Ping timeout: 240 seconds]
awaage has joined #ruby
piotr__ has joined #ruby
pcarrier has quit []
kenneth has quit [Read error: Connection reset by peer]
kenneth has joined #ruby
piotr_ has quit [Ping timeout: 272 seconds]
sayan has quit [Quit: Leaving]
jds_ has quit [Remote host closed the connection]
benjammin has joined #ruby
apa has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
<imperator> rickwinfrey, dunno, this is one of the reasons i avoid rvm like the plague
d2dchat has quit [Remote host closed the connection]
reinaldob has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 260 seconds]
beneggett has joined #ruby
<rickwinfrey> imperator: yeah i'll probably make the switch to rbenv but not today. it sucks with jruby not having pry.
niklasb has joined #ruby
<imperator> it's a neverending stream of people trying to tweak, decipher, and generally untangle their environment
h4mz1d has joined #ruby
<breakingthings> Well, it you set it up once right it goes anywhere.
<breakingthings> if you*
<imperator> IF
<breakingthings> just that the inexperience involved tends to cause backtracks
<breakingthings> :p
apeiros_ has joined #ruby
<breakingthings> But you'll never get anything right if you never try, right?
ebobby has joined #ruby
<breakingthings> (We just need some more comprehensive explanations of how things are -supposed- to work)
<rickwinfrey> breakingthings: well, i'd say you'll never get anything right if the tools you use don't give you effective feedback about what they're doing :)
clooth has joined #ruby
<imperator> you're assuming i both want and need to try
<rickwinfrey> breakingthings: yup :)
<imperator> i don't
<breakingthings> oh no i'm not implying anythin
<breakingthings> on that regard
<breakingthings> I'm just saying, if you want the niceties that they afford...
<headius> pry doesn't work on jruby anymore?
<cr3> how can I install ruby-lint for ruby < 1.9.2?
Guest25886 has quit [Quit: Guest25886]
jenrzzz has joined #ruby
<imperator> cr3, install an older version of ruby-lint?
<imperator> dunno how ruby-lint it setup, requirements-wise
aaronmacy has joined #ruby
michele has joined #ruby
jonathanwallace has joined #ruby
kil0byte has joined #ruby
<cr3> imperator: interesting, I didn't realize I could request a specific version with gem. I'll look into gem parameters and how the ruby-lint project is setup
<cr3> imperator: looks like ruby-lint is rather recent, so was built initially for 1.9 and up
grzywacz has joined #ruby
cearls has joined #ruby
fourq has quit [Quit: Lost terminal]
<Spooner> cr3, If you are new to Ruby, you have few excuses not to be using 1.9.3 anyway.
<imperator> cr3, you can do "gem install foo -v 1.07", for example
<imperator> cr3, type "gem help" for all the things you can do :)
reppard has joined #ruby
viario has quit [Remote host closed the connection]
sleetdrop has quit [Remote host closed the connection]
<rickwinfrey> oh it's headius! thanks for the work you do - i have not been successful in getting pry to work with jRuby1.6.6
b1rkh0ff has joined #ruby
neku has quit [Read error: Connection reset by peer]
neku has joined #ruby
io_syl has quit [Ping timeout: 256 seconds]
beneggett has quit [Quit: Computer has gone to sleep.]
jfl0wers_ has joined #ruby
bwlang has joined #ruby
jfl0wers has quit [Read error: No route to host]
jfl0wers_ is now known as jfl0wers
amacgregor_osx has quit [Ping timeout: 252 seconds]
io_syl has joined #ruby
chrxn has quit [Ping timeout: 276 seconds]
TomyLobo has joined #ruby
reppard has quit [Ping timeout: 260 seconds]
<rickwinfrey> headius: i should clarify that the GUI library I'm using (Limelight), is written in Java - with a jRuby wrapper. I'm not sure if I'm doing something wrong, or if that is a scenario pry cannot interface with?
krawchyk_ has quit [Remote host closed the connection]
chrxn has joined #ruby
krawchyk has joined #ruby
amacgregor_osx has joined #ruby
dstywho has joined #ruby
tPl0ch has quit [Ping timeout: 248 seconds]
krawchyk has quit [Remote host closed the connection]
Jackneill has joined #ruby
rpminihan has joined #ruby
fred909 has joined #ruby
elux has joined #ruby
elux has quit [Client Quit]
karasawa has quit [Ping timeout: 252 seconds]
krawchyk has joined #ruby
karasawa has joined #ruby
diegoviola has quit [Ping timeout: 256 seconds]
gridaphobe has joined #ruby
richardjortega_ has joined #ruby
reset has joined #ruby
reset has quit [Read error: Connection reset by peer]
<RubNoob> what would you recommend for an XSD parser in Ruby?
reset has joined #ruby
<Hanmac> rickwinfrey let me guess, when you do pry or something else in limelight it shows "not found"?
<Hanmac> RubNoob: look @ Nokogiri
<rickwinfrey> hanmac: that's right
d2dchat has joined #ruby
<Hanmac> rickwinkfrey did you notic that mri ruby and jruby both have different gemsets ?
<rickwinfrey> hanmac: you mean they have different gem versions?
richardjortega has quit [Ping timeout: 264 seconds]
richardjortega_ is now known as richardjortega
<Hanmac> rickwinfrey: if you want to use something in both, you need to install them in both
<rickwinfrey> hanmac: so when i run a limelight application, and i'm using a specific gemset for it - you're saying it's not enough to just have the java pry gem installed? i also need the mri pry gem too?
n1x has quit [Ping timeout: 272 seconds]
reppard has joined #ruby
BadLarry has quit [Quit: quitting]
pu22l3r has joined #ruby
BadLarry has joined #ruby
icole has joined #ruby
thatguycraig has quit [Quit: Leaving.]
<rickwinfrey> hanmac: it was my understanding that the way RVM adds to the load path is very specific to the version of ruby and any particular gemset that's being used - so when i have require 'pry' for example, the lookup for which pry I'm asking for happens smoothly because RVM has prepended the gem paths to the load path. but in having both - it seems like this is going to cause an error - or at least make the behavior inconsistent - because at the top level of bo
<rickwinfrey> the java and mri pry gems, is pry.rb. So how does the load path differentiate between them, when i say require 'pry'?
tvw has quit [Remote host closed the connection]
jrist-afk is now known as jrist
Asym has joined #ruby
<Asym> is it possible to programmatically kick off a rake target?
ndboost has quit [Remote host closed the connection]
<Hanmac> rickwinfrey i dont use jeruby but i think it has different installation dirs
rippa has quit [Read error: Connection reset by peer]
JMcAfreak has quit [Quit: They're coming to take me away, ha-haa!]
rippa has joined #ruby
woolite64_ has joined #ruby
<rickwinfrey> hanmac: you're right, but RVM treats jruby and mri in the same way - in that the directory structure for how they're organized and how gems are associated with the various versions of ruby we have on our systems is the same between jruby and mri ruby (as far as RVM is concerned)
<headius> rickwinfrey: hmm, I don't know why pry couldn't interface with that, but limelight does live in its own little world
aaronmacy has quit [Quit: Leaving.]
horofox has joined #ruby
<Quadlex> asym: Yup
reppard has quit [Ping timeout: 248 seconds]
andrewhl has joined #ruby
woolite64 has quit [Ping timeout: 256 seconds]
<Quadlex> asym: Rake.application[name_of_task].invoke
benjammin has quit [Ping timeout: 255 seconds]
<Quadlex> I believe
<Hanmac> rickwinfrey i donr use rvm too
horofox has quit [Client Quit]
horofox__ is now known as horofox
f0ster has joined #ruby
<rickwinfrey> headius: it's just bizarre that I can't get Limelight to find the riak gem. I can hardcode the path to where the gem is installed for the version of jruby and the specific gemset i'm using it with, but that's the point of using gemsets - so we don't have to do that.
rakl has quit [Quit: sleeping]
krawchyk has quit [Remote host closed the connection]
<rickwinfrey> hanmac: no worries, thanks for the help though. are you an rbenv user?
tenmilestereo has joined #ruby
ddd has quit [Quit: Leaving.]
<headius> rickwinfrey: it can find other gems ok? limelight is kinda a special case because of its own loading/reloading system
Targen has joined #ruby
<Hanmac> rickwinfrey i use ubuntus systemruby1.9.3 version
arkiver has joined #ruby
<Asym> Quadlex: i just saw that too, but how would i pass in environment variables? does it fork off (meaning i can set env in present process) or should i pass it explicitly?
statarb3 has quit [Quit: Leaving]
<rickwinfrey> headius: the only other gem i'm using with it is rspec, which is probably everywhere on my system which makes it difficult to know exactly where it's getting it from, if it's not actually getting it from the gemset I think it's looking at.
<rickwinfrey> headius: in general though, Limelight has a few quirky things that make working with it a little interesting :)
rippa has quit [Read error: Connection reset by peer]
<headius> rickwinfrey: indeed :)
rippa has joined #ruby
horofox_ has joined #ruby
robert___ has joined #ruby
jorge__ has joined #ruby
<rickwinfrey> headius: by chance do you know of any nice RVM environmental variables I could have access to when a Ruby application is running? i'm wondering if it's possible to see what gem environment the Limelight application is using when it looks up 'riak.rb' for example.
<Quadlex> asym: I'm not sure, but I don't think Rake threads automatically
berserkr has quit [Quit: Leaving.]
<Quadlex> I'm not that familiar, but I'm reading through the source ATM
<Asym> Quadlex: ditto
krawchyk has joined #ruby
Jamone has joined #ruby
arkiver has quit [Client Quit]
arkiver has joined #ruby
Jackneill has quit [Remote host closed the connection]
jorge__ has quit [Remote host closed the connection]
emmanuelux has joined #ruby
h4mz1d has quit [Ping timeout: 252 seconds]
chrxn has quit [Ping timeout: 248 seconds]
robert__ has quit [Ping timeout: 245 seconds]
Monie has quit [Ping timeout: 272 seconds]
<rickwinfrey> headius: oh - just using a system call like this worked: system('gem environment')
arkiver is now known as g33k
GetCodeMonkey has joined #ruby
sailias has joined #ruby
ndboost has joined #ruby
jerius has quit [Read error: Connection reset by peer]
jerius has joined #ruby
<Quadlex> asym: Don't think so
<Quadlex> Actions in tasks are just involked with call
<Quadlex> and passed self
<Quadlex> So unless the action is threaded, I think it runs int he same process
<Quadlex> BBL
GetCodeMonkey has quit [Read error: Connection reset by peer]
Quadlex is now known as AwayLex
Proshot has joined #ruby
buibex has joined #ruby
osaut has quit [Quit: osaut]
<Fuzai> >> test = [ 1,2,3,4 ]; test[2].delete; puts test
<eval-in> Fuzai: Output: "/tmp/execpad-f8d58f7f1b32/source-f8d58f7f1b32:1:in `<main>': undefined method `delete' for 3:Fixnum (NoMethodError)\n" (http://eval.in/6625)
krawchyk has quit [Remote host closed the connection]
<Fuzai> >> test = [ 1,2,3,4 ]; test.delete_at(2); puts test
<eval-in> Fuzai: Output: "1\n2\n4\n" (http://eval.in/6626)
dimadima has joined #ruby
workmad3 has joined #ruby
io_syl has quit [Ping timeout: 260 seconds]
<apeiros_> Fuzai: use your local irb for such stuff. use eval-in for demonstrations only. thank you.
benjammin has joined #ruby
etcetera has quit []
cjs226 has joined #ruby
hotovson has quit [Remote host closed the connection]
<Fuzai> i'm sorry for sounding naive but i don't know how to do that
<apeiros_> you type `irb` in your bash and irb starts
<apeiros_> (or zsh or run.cmd)
krawchyk has joined #ruby
<Fuzai> oh ok
io_syl has joined #ruby
<Hanmac> or type pry, make a coffee, and pry starts
<apeiros_> or install the 'pry' gem, and type `pry` instead (pry is a superior alternative to irb)
pzero has joined #ruby
aapzak has quit [Quit: leaving]
PragCypher has quit [Remote host closed the connection]
adambeynon has joined #ruby
carlyle has quit [Remote host closed the connection]
osaut has joined #ruby
aaronmacy has joined #ruby
<pzero> how do i silently assign a variable? File.read('/home/something.png') spits out all of the data in the png file.
<pzero> (via irb)
<oz> pzero: x = File.read('...') ; 1
emmanuelux has quit [Ping timeout: 248 seconds]
<pzero> thanks
aapzak has joined #ruby
matthewrobbins has joined #ruby
krawchyk has quit [Remote host closed the connection]
irek has left #ruby [#ruby]
MattRb has quit [Quit: This computer has gone to sleep]
aedorn has joined #ruby
zph has quit [Quit: Computer has gone to sleep.]
MattRb has joined #ruby
slainer68 has joined #ruby
<aedorn> is there a 'safe' strftime that I'm possibly unaware of?
krawchyk has joined #ruby
moted has joined #ruby
beneggett has joined #ruby
<Hanmac> aedorn what do you mean by "parse" ?
jds_ has joined #ruby
<Hanmac> i mean by "safe"
green_leaf has joined #ruby
Goles has quit [Ping timeout: 255 seconds]
nwertman has quit [Read error: Connection reset by peer]
nwertman has joined #ruby
<aedorn> I don't want to allow something like strftime("%d #{'some ruby code here'}")
Xeago has quit [Remote host closed the connection]
evanx has joined #ruby
clooth has quit [Quit: clooth]
<waxjar> not a problem as long as you don't #eval it
<aedorn> but then I guess it would be evaluated before hitting strftime .. so I really just need a safe string
neku has quit [Quit: Linkinus - http://linkinus.com]
Goles has joined #ruby
nwertman has quit [Remote host closed the connection]
Bottesque has joined #ruby
Dann1 has joined #ruby
<pzero> part two of the .read() question: s = f.read(chunk_size) seems to segfault randomly on 1.9.3 stable, with " [BUG] gc_sweep(): unknown data type 0x0(0x7717990)", is there anything i can do about this?
Goles has quit [Client Quit]
cearls has quit [Remote host closed the connection]
jds_ has quit [Ping timeout: 244 seconds]
<aedorn> or maybe I'm just over thinking and it will never get evaluated like that anyway!
jjbohn|afk is now known as jjbohn
<pzero> that particular line comes from the aws-s3 gem.
troessner has quit [Quit: Leaving]
x82_nicole has joined #ruby
<Hanmac> pzero what is your code doing? ... and what is your excact ruby version?
<waxjar> it'll just output the code as a String
postmodern has joined #ruby
<pzero> 1.9.3p327
<pzero> although i also tried the most recent stable too
<Hanmac> hm ok then i dont know ... its maybe a bug aws-s3 ...
<pzero> well, it used to work
<pzero> and my own code had the same line, also crashing
<pzero> i ended up just calling system(unzip blah) instead of unzipping files via ruby
niklasb has quit [Ping timeout: 264 seconds]
<pzero> to avoid .read()
buibex has quit [Remote host closed the connection]
Michae___ has joined #ruby
<bean> hmm, it could be running out of memory if you're reading in a large file?
<bean> I'm unsure.
<pzero> the file would be 12 megabytes.
<bean> hmm, doubtful then
bluOxigen has quit [Ping timeout: 255 seconds]
<pzero> 1mb chunk size
huoxito has joined #ruby
<pzero> its just odd because i didn't do anything, its been running for months until last week
emmanuelux has joined #ruby
rakl has joined #ruby
stonevil has quit [Quit: stonevil]
benlieb has joined #ruby
* Hanmac thinks that he should rewrite this libarchive gem ... with that you could open EVERY type of archive ... but its currently broken :(
Bottesque has quit [Read error: Connection reset by peer]
Rym has joined #ruby
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Bottesque has joined #ruby
Bottesque has quit [Read error: Connection reset by peer]
buibex has joined #ruby
Michae___ has quit [Read error: Connection reset by peer]
Bottesque has joined #ruby
Michae___ has joined #ruby
Bottesque has quit [Read error: Connection reset by peer]
osaut has quit [Quit: osaut]
Bottesque has joined #ruby
dukedave has joined #ruby
rippa has quit [Ping timeout: 260 seconds]
<dukedave> Is there a way I can .collect with []?
<ericwood> [].collect
<dukedave> Using the .collect(&:foo) syntax?
jalcine has quit [Ping timeout: 240 seconds]
<ericwood> [].collect(&:foo)
darkc0met has quit [Ping timeout: 246 seconds]
<ericwood> I'm not sure waht you're asking
<dukedave> ericwood: The other way round..
<dukedave> my_hash.collect(&:[], :key)
<ericwood> )oof:&(tcelloc.][
<Dann1> http://puu.sh/1NLKB ..help?
<apeiros_> dukedave: no
<apeiros_> dukedave: just use a normal block.
<dukedave> Yuck, no way to collect an array of keys? :|
samphippen has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<apeiros_> dukedave: yuck? wtf is wrong with you…
samphippen has joined #ruby
etcetera has joined #ruby
emergion has joined #ruby
<dukedave> my_hash.collect { |o| o[:key] } ?
joeycarmello has quit [Remote host closed the connection]
<apeiros_> yes
<ericwood> oh goodness..
<ericwood> :(
<bean> Dann1: um, you are opening a file for write
<bean> but then reading it
buibex has quit [Remote host closed the connection]
joeycarmello has joined #ruby
<Hanmac> dukedave: my_hash.each_with_object(:key).map(&:[])
workmad3 has quit [Ping timeout: 260 seconds]
<bean> Dann1: you may want to look at append instead of reading the file and writing it every time... that's an expensive operation
Bottesque has quit [Read error: Connection reset by peer]
Bottesque has joined #ruby
Zolo has quit [Remote host closed the connection]
<Dann1> I already got to that
<Dann1> Trying again
d2dchat has quit [Remote host closed the connection]
ckrailo has joined #ruby
<dukedave> Hanmac: Ah, smart
albakry has joined #ruby
albakry has joined #ruby
albakry has quit [Changing host]
<apeiros_> Hanmac: want to make an entry for an obfuscated coding contest?
<apeiros_> srsly, use a plain normal block. you're trying to be ridiculously clever.
<Hanmac> apeiros_ i may be create a blog for that :P ... i dont have something to write otherwise... :(
<bean> plus the { } syntax sucks. do and end is where it's at
Playground has joined #ruby
<banisterfiend> bean: you even use do/end for single line blocks?
<bean> of course not, however i'm a sysadmin -- not a programmer. Most of what i write is one off scripts
g33k has quit [Ping timeout: 255 seconds]
tangledhelix has joined #ruby
RagingDave has quit [Quit: Ex-Chat]
<apeiros_> bean: and wtf is wrong with you? :-p
<apeiros_> {} is fine and the right choice for return value
<apeiros_> bean: or do you use do/end with chaining? (map do … end.select do … end.first(10) e.g.)
* bean likes end do
<bean> no, i never use it with chaning
<bean> idk, that's just the code style that people i work with like
<bean> so it's grown on me
<apeiros_> see? you want {} for stuff where you care about return value.
* Hanmac chains everything :D
Bottesque has quit [Read error: Connection reset by peer]
<banisterfiend> apeiros_: just cos it looks prettier?
mmmmwww has joined #ruby
tPl0ch has joined #ruby
Bottesque has joined #ruby
Michae___ has quit [Remote host closed the connection]
<mmmmwww> Hey folks, I want to build a simple GUI tool that can run on Windows XP RTM and can be compiled to a small bunch of executable files that don't require any pre-requisites on the system. Any suggestions for frameworks and tools that can do this? thanks!
<Bottesque> Hey there mmmmwww.
<ericwood> mmmmwww: you could use JRuby and swing
<ericwood> or Shoes...but I'd recommend not using any of these things
rakl has quit [Ping timeout: 252 seconds]
Michae___ has joined #ruby
<Hanmac> ericwood swing? whats that?
<mmmmwww> ericwood: jruby/swing sound like they have java dependencies
<apeiros_> banisterfiend: mostly. do/end vs. {} is 90% a debate over the looks. the other 10% is about precedence. coincidentally that falls well together with "do/end for side-effect (e.g. DSLs)" and "{} for return value"
* Hanmac perfers his own wxWidgets version for GUI
AwayLex is now known as Quadlex
jrist is now known as jrist-afk
<ericwood> mmmmwww: it does, but idk
jenrzzz has quit [Ping timeout: 256 seconds]
<ericwood> mmmmwww: Shoes is the closest ruby thing, I'd recommend not using ruby for that, though
<ericwood> use something like Qt and a compiled language...
<mmmmwww> is there no bundler for ruby?
_hemanth_ has quit [Read error: Connection reset by peer]
<ericwood> not like what you want
_hemanth_ has joined #ruby
<Hanmac> mmmmwww look at wxruby and rwx
geekbri has quit [Remote host closed the connection]
<ericwood> last updated in 2009.......
emergion has quit [Quit: Computer has gone to sleep.]
<aedorn> There's been a few attempts at making self-contained executables with Ruby, but I think they've all been abandoned at some point
niklasb has joined #ruby
cobragoat has quit [Remote host closed the connection]
<ericwood> it's true...very few people need that capability
pzero has quit [Quit: pzero]
Bottesque has quit [Read error: Connection reset by peer]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<banisterfiend> apeiros_: personally i don tthink chaining things after do/end looks that bad, so i stick to the rule of {} for one-liners, and do/end for multi-line blocks
inokenty has quit [Read error: Connection reset by peer]
<yfeldblum> many people would like that capability
<yfeldblum> for speed
Bottesque has joined #ruby
<ericwood> it's not speed
<Hanmac> ericwood did you also look at rwx? https://github.com/Hanmac/rwx
<ericwood> what it does is package the interpreter with the bytecode
<yfeldblum> ericwood, boot speed
<ericwood> ah
<Hanmac> "last updated 8DAYS ago"
reppard has joined #ruby
<yfeldblum> ericwood, plus static-link everything like libyaml etc, vroomvroom
<mmmmwww> Hanmac: very cool, hope you get to write the docs someday for it :) :)
Bottesque has quit [Read error: Connection reset by peer]
<ericwood> Hanmac: he wants the ruby thing to be self-contained so the person doesn't have to isntall ruby
<aedorn> eh, think it's more like convenience in distribution for system applications in this case
hackerdude has joined #ruby
MattRb has quit [Quit: This computer has gone to sleep]
<Hanmac> ericwood: wxruby/rwx + Orca
<ericwood> I'll shut up
aaronmacy has quit [Quit: Leaving.]
c0rn has quit [Quit: Computer has gone to sleep.]
RubNoob has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Bottesque has joined #ruby
<aedorn> I'm waiting for Qt5 Ruby bindings .. it's a pipe dream, but it's *my* pipe dream.
<ericwood> I'd be okay with those
Bottesque has quit [Read error: Connection reset by peer]
<mmmmwww> Hanmac: have you played with orca? does it take long for a window to display from the time it's executed?
RagingDave has joined #ruby
krawchyk has quit [Remote host closed the connection]
<Hanmac> mmmmwww orca only package your stuff in an Exe ... it does not chance anything at the runtime code
Bottesque has joined #ruby
<Dann1> Nice
<Dann1> Uh
krawchyk has joined #ruby
<Dann1> Maybe I should ask
<Dann1> Is it okay if I save the logs of everything here as long as my bot runs?
kpshek has joined #ruby
krawchyk has quit [Remote host closed the connection]
krawchyk has joined #ruby
* Hanmac points at Hanmac1
chussenot has joined #ruby
matthewrobbins has quit [Quit: matthewrobbins]
<bean> Dann1: I'd imagine that as long as you're not making the logs public that'd be fine
beneggett has quit [Ping timeout: 248 seconds]
F1skr has quit [Quit: WeeChat 0.3.9.2]
Bottesque has quit [Read error: Connection reset by peer]
m3pow has quit [Quit: ChatZilla 0.9.89 [Firefox 18.0/20130107224407]]
<apeiros_> banisterfiend: because nobody sees that your code spans 1 vs multiple lines? :-p
<aedorn> Dann1: Yes. But if the logs ever go public my name must be replaced with "Aedorn, the glorious gentlemen" with a picture of a top hat to the left of said name.
* apeiros_ vastly prefers do/end for side-effect & {} for return value
<apeiros_> also cf. dsl's where you almost always will use do/end (and have side-effect)
amacgregor_osx_ has joined #ruby
<Dann1> Really?
<Dann1> I'd prefer just removing everything containing your name.
frem has joined #ruby
<Dann1> Anyway, enough with that.
<aedorn> Such hate! =p
MattRb has joined #ruby
havenn has joined #ruby
jjbohn is now known as jjbohn|afk
<Dann1> I *think* it should be legally fine.
bbunny has quit [Ping timeout: 252 seconds]
<Dann1> Freenode's logs belong to the User right?
<apeiros_> aedorn: technically you're in public space and have no expectation on privacy
<Dann1> And it's GNU too
<lectrick> banisterfiend: If I need a class to be defined just for the current scope, can simply doing localvar = Class.new(parent_class) and treating localvar as a class wherever a class is needed, work? Will it just go out of scope and get garbage-collected like anything else?
<aedorn> apeiros_: I don't need privacy if I had a hat
amacgregor_osx has quit [Ping timeout: 252 seconds]
<banisterfiend> lectrick: yeah
* apeiros_ gives aedorn a hat
<banisterfiend> lectrick: that's used a lot in tests
f03lipe has joined #ruby
<lectrick> banisterfiend: yeah, i have a test i'm trying to refactor and it sets up some TestClasses that never go away and I was just thinking they could just be local vars
<banisterfiend> lectrick: you could always add an Object.remove_const in the after block
<banisterfiend> i think we do that sometimes where an anonymous class is a pain
tetsus has joined #ruby
kuzushi has joined #ruby
<lectrick> banisterfiend: how do I reopen that anonymous class to add methods to it? just "class some_local_var_which_is_a_class"?
_hemanth_ has quit [Read error: Connection reset by peer]
_hemanth_ has joined #ruby
<tetsus> I'm writing an API wrapper that wants an email in the format "user@domain.com" passed in through post-data. I know it's invalid, and it should be user%40domain.com, but the host insists. Can httparty avoid escaping that field?
<lectrick> banisterfiend: yeah I know about Object.remove_const but I am concerned about modifying global state and weird side effects from that
<sharpobject> !100163
brandon|work has joined #ruby
Bottesque has joined #ruby
<banisterfiend> lectrick: anonymous_class.class_eval { }
ChampS666 has joined #ruby
tvw has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<Hanmac> when an nameless class gets asigned to an constant its gets a name ... but it does not happends for singleton_classes :/
Bottesque_ has joined #ruby
<lectrick> banisterfiend: ah, i was gonna say. "class some_class_var" doesn't work, with: SyntaxError: class/module name must be CONSTANT. Seems silly if everything is in fact functional, that the "class" keyword won't accept something that evaluates to a Class as its argument, instead of parsing the constant-ness of it
etcetera has quit []
krawchyk has quit [Remote host closed the connection]
<lectrick> Hanmac: Yeah, I'm ok with it being "an anonymous class assigned to a variable", I was just curious how to work with it
mark_locklear has quit [Remote host closed the connection]
jjbohn|afk is now known as jjbohn
<hyperboreean> hey guys, how can I debug an issue with loading any gem that I have installed in my gemset, I have activated the gemset, it works at the repl, but not when running a small test script
<Bottesque> Hey hyperboreean.
<Bottesque_> Hi hyperboreean!
<Bottesque_> Hullo Bottesque!
<Bottesque> Hai there Bottesque_!
<Bottesque> Hey there Bottesque_.
<Bottesque_> Hey there Bottesque.
<Bottesque> Did I hear someone mention me? :)
<Bottesque_> Did I hear someone mention me? :)
<Bottesque> Hey Bottesque_.
<Bottesque_> Hi Bottesque!
<Bottesque> Did I hear someone mention me? :)
<Bottesque_> Did I hear someone mention me? :)
Bottesque has quit [Killed (idoru (Spam is off topic on freenode.))]
Bottesque_ has quit [Killed (idoru (Spam is off topic on freenode.))]
Dann1 has quit [K-Lined]
<Hanmac> lectrick you can use some_class_var as parent class in "class Const < some_class_var"
EPIK has joined #ruby
etcetera has joined #ruby
IrishGringo has quit [Quit: ChatZilla 0.9.89 [Firefox 18.0/20130104151948]]
<lectrick> Hanmac: aha, yeah, odd that that works but "class some_class_var" does not
iamjarvo has quit [Quit: Leaving.]
carloslopes has quit [Remote host closed the connection]
iamjarvo has joined #ruby
<Hanmac> >> o=Object.new;ABC = o.singleton_class; class ABC; module P;end;end; p ABC,ABC::P
<eval-in> Hanmac: Output: "#<Class:#<Object:0x9afeffc>>\nABC::P\n" (http://eval.in/6628)
c0rn has joined #ruby
beneggett has joined #ruby
beneggett has quit [Client Quit]
<Hanmac> as you guys see, ABC does not gets its name asigned ... :/ i think this is a bug or missing feature :/
pu22l3r has quit [Remote host closed the connection]
matthewrobbins has joined #ruby
<apeiros_> probably due to singleton_classes being special
haxrbyte has joined #ruby
thone_ has joined #ruby
<apeiros_> ABC::P is odd, though
<Hanmac> hm interesting ... TrueClass and true are very connected ... , but TrueClass is not an singleton_class (you could inherit from it ) ...
evaryont has quit [Ping timeout: 276 seconds]
nwertman has joined #ruby
noxoc has joined #ruby
asteve has quit [Quit: Computer has gone to sleep.]
stonevil has joined #ruby
thone has quit [Ping timeout: 260 seconds]
<lectrick> Hanmac: interesting example!
<lectrick> WHY IS THIS LANGUAGE ENDLESSLY INTERESTING? IS MATZ AN ALIEN?
hbpoison has quit [Ping timeout: 256 seconds]
yekta has joined #ruby
cobragoat has joined #ruby
beneggett has joined #ruby
<Hanmac> i think he used an actefact from WH13 to make ruby :D
hbpoison has joined #ruby
[eDu] has quit [Quit: [eDu]]
evaryont has joined #ruby
eldariof has quit []
evaryont is now known as Guest82389
matthewrobbins has quit [Quit: matthewrobbins]
tPl0ch has quit [Quit: Verlassend]
<aedorn> Ruby is so simple that it's maddeningly complicated. Once you figure out where door 1 (of X) leads, you realize you just ended up in another room of Y doors.
guns has joined #ruby
jtharris has quit [Quit: WeeChat 0.3.9.2]
__BigO__ has quit [Remote host closed the connection]
<bean> aedorn: eh, it's pretty simple i'd say, just a lot you can do
stonevil has quit [Ping timeout: 245 seconds]
F1skr has joined #ruby
stonevil has joined #ruby
Daman is now known as dwn
robotmay has joined #ruby
clocKwize has quit [Quit: clocKwize]
<rickwinfrey> it's really about understanding the object model. from there you can play with ideas like Hanmac's example
__BigO__ has joined #ruby
Onii-san has quit [Ping timeout: 245 seconds]
hynkle has quit [Quit: hynkle]
Guest82389 has quit [Ping timeout: 256 seconds]
* Hanmac is going into sleep mode but at least one Hanmac will be listening, (i make an bug ticket about the Name for singleton_class & inherit of TrueClass and the other two)
karasawa has quit [Ping timeout: 256 seconds]
ryan__ has joined #ruby
gridaphobe has quit [Remote host closed the connection]
karasawa has joined #ruby
ryan__ has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 272 seconds]
ryannielson has joined #ruby
beiter has quit [Quit: beiter]
tommyvyo_ has quit [Ping timeout: 248 seconds]
chussenot has quit [Quit: chussenot]
gridapho` has joined #ruby
Onii-san has joined #ruby
workmad3 has joined #ruby
cobragoat has quit [Ping timeout: 252 seconds]
chussenot has joined #ruby
kenneth has quit [Quit: kenneth]
kenneth has joined #ruby
sailias has quit [Quit: Leaving.]
<aedorn> I love people that do phone interviews for other jobs while at work in their cube.
artOfWar has joined #ruby
<breakingthings> aedorn: maximum give-a-shit limit reached
danneu has quit [Quit: WeeChat 0.3.8]
jfl0wers has quit [Ping timeout: 248 seconds]
Onii-san has quit [Ping timeout: 260 seconds]
gridapho` has quit [Read error: Connection reset by peer]
tommyvyo has quit [Quit: http://thomasvendetta.com]
Morkel has joined #ruby
arturaz has quit [Remote host closed the connection]
tommyvyo has joined #ruby
MattRb has quit [Quit: This computer has gone to sleep]
ewnd9 has quit [Ping timeout: 272 seconds]
benlieb has quit [Quit: benlieb]
tommyvyo has quit [Client Quit]
Del_Monte has joined #ruby
mjolk has left #ruby ["Leaving"]
<aedorn> true.. I guess it's hard to care once your job has been diminished to sitting around all day listening to conservative talk radio because nobody trusts your work to assign anything new to you
thomaslnx has joined #ruby
<banisterfiend> aedorn: that happened to yoU?
<aedorn> banisterfiend: no, the guy doing phone interviews with other companies
blacktulip has quit [Remote host closed the connection]
gridaphobe has joined #ruby
thomaslnx has quit [Client Quit]
nwertman has quit [Remote host closed the connection]
huoxito has quit [Ping timeout: 248 seconds]
CLUSTERfoo has joined #ruby
hybris has joined #ruby
[Neurotic] has joined #ruby
aaronmacy has joined #ruby
vlad_starkov has joined #ruby
aeontech has quit [Ping timeout: 260 seconds]
digiwth has joined #ruby
francisfish has quit [Remote host closed the connection]
DaltonUS has quit [Quit: DaltonUS]
benlieb has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
noxoc has quit [Quit: noxoc]
jenrzzz has joined #ruby
etcetera has quit []
<aedorn> I think it's the job path though.. I don't know too many people that can go from manager to coder and enjoy it if they were enjoying managerial work
ffranz has quit [Quit: Leaving]
etcetera has joined #ruby
albakry has quit [Quit: Leaving]
yekta has quit [Quit: yekta]
etcetera has quit [Client Quit]
digiwth has quit [Quit: What the hell?]
nwertman has joined #ruby
jonathanwallace has quit [Ping timeout: 264 seconds]
d2dchat has joined #ruby
hbpoison has quit [Remote host closed the connection]
hbpoison has joined #ruby
etcetera has joined #ruby
vlad_starkov has quit [Ping timeout: 248 seconds]
mengu has quit [Ping timeout: 272 seconds]
cjs226 has quit []
d2dchat has quit [Remote host closed the connection]
pzero has joined #ruby
elux has joined #ruby
otherj has joined #ruby
emergion has joined #ruby
matchaw has quit [Remote host closed the connection]
Playground has quit [Ping timeout: 246 seconds]
<thejefflarson_> I dunno if this is the right place to do this, but we've been working on a lil key value store written in ruby: https://github.com/propublica/daybreak take a look at script/benchmark it is pretty fast
joeycarm_ has joined #ruby
IceD^ has joined #ruby
benlieb has quit [Quit: benlieb]
joeycarmello has quit [Read error: Connection reset by peer]
Morkel has quit [Quit: Morkel]
joeycar__ has joined #ruby
cobragoat has joined #ruby
<IceD^> hey all. using "new style" gemspecs with deps inside (so Gemfile for our gem contains only `gemspec` line)
Playground has joined #ruby
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
frem has quit [Ping timeout: 260 seconds]
<IceD^> I want to add one dependancy to our gem, but only if platform is ruby 1.8
<IceD^> how
ionte has quit [Read error: Connection reset by peer]
minad has joined #ruby
ryanh has joined #ruby
ryanh has quit [Max SendQ exceeded]
sleetdrop has joined #ruby
dustint has quit [Remote host closed the connection]
dstywho has quit [Quit: WeeChat 0.3.9.2]
<apeiros_> thejefflarson_: you probably should be explicit about encodings in your file interactions (e.g. File.open)
picca has joined #ruby
Rym has quit [Quit: Rym]
sleetdrop has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 245 seconds]
alx- has joined #ruby
joeycarm_ has quit [Ping timeout: 260 seconds]
cobragoat has quit [Remote host closed the connection]
sleetdrop has joined #ruby
cobragoat has joined #ruby
ryanh has joined #ruby
ryanh has quit [Max SendQ exceeded]
iamjarvo has quit [Quit: Leaving.]
<minad> apeiros_: are you talking about daybreak?
ryanh has joined #ruby
ryanh has quit [Max SendQ exceeded]
<apeiros_> minad: yes
picca has quit [Remote host closed the connection]
<minad> apeiros_: we open the files in binary mode 'ab+', so the external encoding is binary
ryanh has joined #ruby
phantasm66 has quit [Quit: *sleeeep….]
mmitchell has quit [Ping timeout: 244 seconds]
<apeiros_> ah, right, that's that odd behavior of ruby wrt binary mode…
iPhoneMRZ has joined #ruby
heyitsdave has joined #ruby
<apeiros_> (binary vs. text mode should actually absolutely not be about the encoding, I've no idea why they did it that way…)
<minad> it is backward compatible with 1.8
<minad> apeiros_: did you try the library?
<apeiros_> minad: no, only glanced over the code
robert__ has joined #ruby
<apeiros_> I have no use case for a pure ruby k/v store
matchaw_ has joined #ruby
<minad> ah ok, it was really nice to play with it. and the result is quite fast :)
<apeiros_> hm, actually…
<apeiros_> does it retain order like ruby hashes?
Michae___ has quit [Remote host closed the connection]
<minad> I would say that is unspecified :)
<apeiros_> ok
Nisstyre has joined #ruby
willob has quit [Quit: Leaving.]
<apeiros_> is the inter-process safety abstracted enough to use it for something else than a k/v store?
linoge has quit [Read error: Connection reset by peer]
Michae___ has joined #ruby
<minad> what do you mean? you want to map something on it?
linoge has joined #ruby
<apeiros_> I might use it for my autocompletion gem, which currently only has an in-memory implementation
<minad> I take a look
<apeiros_> don't spend too much time, though. I probably won't get back to the autocompletion gem anytime soon
<minad> what is the name of the gem?
<apeiros_> autocompletion :)
emergion has quit [Ping timeout: 264 seconds]
<apeiros_> it's very simple
robert___ has quit [Ping timeout: 276 seconds]
<minad> ah found it
iPhoneMRZ has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
iPhoneMRZ has joined #ruby
nathancahill has quit [Quit: nathancahill]
sleetdrop has quit [Ping timeout: 248 seconds]
stevechiagozie has quit [Quit: Computer has gone to sleep.]
AsgardBSD has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
* apeiros_ off, n8
<minad> bye
apeiros_ is now known as apeiros|afk
d2dchat has joined #ruby
sleetdrop has joined #ruby
allsystemsarego has quit [Quit: Leaving]
pzero has quit [Quit: pzero]
d2dchat has quit [Remote host closed the connection]
pzero has joined #ruby
snearch has joined #ruby
evanx has quit [Quit: evanx]
jblack has joined #ruby
<jblack> ['apple','orange','pear', 'peach'].map {|afruit| afruit += "s" }.select { |snack| snack.match(/p/) }
<jblack> => ["apples", "pears", "peachs"]
tatsuya_o has joined #ruby
iPhoneMRZ has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
mahmoudimus has quit [Ping timeout: 255 seconds]
zmo_ has quit [Quit: Leaving]
mengu has joined #ruby
ddd has joined #ruby
mahmoudimus has joined #ruby
<jblack> I love ruby. Most of the drudgery is stripped away.
carloslopes has joined #ruby
linoge has quit [Quit: WeeChat 0.3.9.2]
ndboost has quit [Remote host closed the connection]
carloslopes has quit [Remote host closed the connection]
carloslopes has joined #ruby
bwlang has left #ruby [#ruby]
carloslopes has quit [Remote host closed the connection]
drago757 has joined #ruby
jgarvey has quit [Quit: Leaving]
grzywacz has quit [Ping timeout: 255 seconds]
aedorn has quit [Quit: Leaving]
tenmilestereo has quit [Quit: Leaving]
yakko has joined #ruby
etcetera has quit []
havenn has joined #ruby
verto is now known as verto|off
Umren has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
philcrissman has quit [Remote host closed the connection]
breakingthings has quit []
andrewhl has quit [Remote host closed the connection]
<kenneth> hey is anybody using hamster in production?
nari has joined #ruby
zarubin has quit [Ping timeout: 260 seconds]
alanp has quit [Read error: Connection reset by peer]
alanp has joined #ruby
chendo_ has joined #ruby
minad has quit [Quit: leaving]
havenn has quit [Ping timeout: 276 seconds]
havenn has joined #ruby
ebobby has quit [Ping timeout: 276 seconds]
alex__c2022 has quit [Quit: alex__c2022]
zarubin has joined #ruby
joofsh has quit [Remote host closed the connection]
Guest83669 has joined #ruby
Goles has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
jerius has quit [Ping timeout: 264 seconds]
Guest83669 has quit [Client Quit]
bean has quit [Quit: Computer has gone to sleep.]
imperator has left #ruby ["Leaving"]
jrhorn424 has quit [Quit: jrhorn424]
__BigO__ has quit [Remote host closed the connection]
twoism has joined #ruby
joofsh has joined #ruby
ffranz has joined #ruby
etcetera has joined #ruby
__BigO__ has joined #ruby
sailias has joined #ruby
DavidLevin has quit [Ping timeout: 248 seconds]
whowantstolivef1 has quit [Ping timeout: 248 seconds]
jjbohn has quit [Quit: Leaving...]
jjbohn has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
jjbohn has quit [Client Quit]
rakl has joined #ruby
stopbit has quit [Quit: Leaving]
art_man1 has joined #ruby
jrist-afk is now known as jrist
segv- has quit [Quit: segv-]
baphled has quit [Ping timeout: 276 seconds]
__BigO__ has quit [Remote host closed the connection]
interactionjaxsn has quit [Remote host closed the connection]
emocakes has quit [Ping timeout: 252 seconds]
ChampS666 has quit [Ping timeout: 248 seconds]
<Spooner> jblack, Except that it is "peaches" ;)
jds_ has joined #ruby
<jblack> yeah, I know. I suppose that'll be a feature in ruby 3.0
main has joined #ruby
<Spooner> I think it is in ActiveSupport already.
h4mz1d has joined #ruby
<Spooner> jblack, And, better Ruby: %w{apple orange pear peach}.map {|afruit| afruit + "s" }.grep /p/
aedorn has joined #ruby
Kuifje has quit [Ping timeout: 248 seconds]
cjs226 has joined #ruby
<jblack> You think that's simpler than the anonymous array?
<Spooner> Huh?
Asym has quit [Ping timeout: 256 seconds]
<jblack> Never mind. yeah
<Spooner> It is exactly the same code. Just more terse.
Targen has quit [Ping timeout: 248 seconds]
cr3 has quit [Quit: leaving]
* jblack nods.
amacgregor_osx_ has quit [Ping timeout: 246 seconds]
iamjarvo has joined #ruby
benjammin has quit [Read error: Connection reset by peer]
stonevil_ has joined #ruby
|Monie| has joined #ruby
stonevil has quit [Read error: Connection reset by peer]
stonevil_ is now known as stonevil
rickwinfrey has quit [Quit: rickwinfrey]
Monie has joined #ruby
ionte has joined #ruby
Del_Monte has quit [Quit: Leaving]
Jamone has quit [Ping timeout: 248 seconds]
|Monie| has quit [Ping timeout: 245 seconds]
etcetera has quit []
amacgregor_osx has joined #ruby
f03lipe has quit [Quit: Leaving]
v0n has quit [Ping timeout: 255 seconds]
bhushan has joined #ruby
jmpf has joined #ruby
tommyvyo has joined #ruby
jonahR has quit [Quit: jonahR]
etcetera has joined #ruby
yfeldblum has joined #ruby
joshman_ has quit [Ping timeout: 264 seconds]
moted has quit [Remote host closed the connection]
nwertman has quit [Remote host closed the connection]
Spami has quit [Read error: Connection reset by peer]
awaage has left #ruby [#ruby]
moted has joined #ruby
ndboost has joined #ruby
ddd has quit [Quit: Leaving.]
nari has quit [Ping timeout: 245 seconds]
gyre007 has quit [Remote host closed the connection]
samuel02 has joined #ruby
joeycar__ has quit [Read error: Connection reset by peer]
<samuel02> i'm testing speed of an algorithm and need a large connected, weighted and undirected graph. what's a smart way of generating one?
joeycarmello has joined #ruby
jmpf has quit [Ping timeout: 256 seconds]
nwertman has joined #ruby
Eiam has quit [Read error: Connection reset by peer]
<jblack> want to be able to pause and continue?
<jblack> you could use Datamapper and track vertices and edges in a sqlite table
colin2 has joined #ruby
tatsuya_o has quit []
enroxorz-work has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
colin2 is now known as Guest49955
evanx has joined #ruby
Ballresin has joined #ruby
jmpf has joined #ruby
<Spaceghost|cloud> samuel02: I like using orientdb for actual graph algebra in a graph db.
<samuel02> Spaceghost|cloud: oh I wasn't thinking about something that advanced but I'll look at it..
yaroslav has joined #ruby
reppard has quit [Ping timeout: 264 seconds]
F1skr has quit [Quit: WeeChat 0.3.9.2]
<jblack> do you need tools to parse the dag too?
benlieb has joined #ruby
<jblack> http://rgl.rubyforge.org/rgl/index.html should have some dag support.
Asym has joined #ruby
jacktrick has joined #ruby
benlieb has quit [Client Quit]
<Spaceghost|cloud> samuel02: You don't have to use java, but it runs on java. It has an http rest api.
chussenot has quit [Quit: chussenot]
<samuel02> Spaceghost|cloud: well I just needed some small algorithm that can generate a random graph, I've written the code for the Graph object myself
kpshek has quit []
<Spaceghost|cloud> samuel02: Go nuts. Just giving you options. :)
<samuel02> Spaceghost|cloud: sure, thanks!
robert___ has joined #ruby