apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p327: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com
khimera has quit [Quit: khimera]
dukedave has joined #ruby
SCommette has quit [Quit: SCommette]
x82_nicole has quit [Quit: Computer has gone to sleep.]
cardoni has joined #ruby
Juul has quit [Read error: Connection reset by peer]
centipedefarmer has quit [Remote host closed the connection]
ner0x has quit [Quit: Leaving]
seich- has joined #ruby
leonardorb has joined #ruby
GitNick has quit [Ping timeout: 260 seconds]
LucidDreamZzZ has quit [Remote host closed the connection]
staafl has quit [Ping timeout: 265 seconds]
explody has joined #ruby
LucidDreamZzZ has joined #ruby
nateberkopec has quit [Quit: Leaving...]
Michae___ has joined #ruby
seich- has quit [Ping timeout: 246 seconds]
Juul has joined #ruby
swarley has quit [Read error: Operation timed out]
slash_me has quit [Quit: Lost terminal]
leonardorb has quit [Ping timeout: 246 seconds]
ner0x has joined #ruby
C0deMaver1ck has quit [Remote host closed the connection]
pdelgallego has quit [Quit: pdelgallego]
tomsthumb1 has quit [Quit: Leaving.]
phelps has quit [Changing host]
phelps has joined #ruby
jarred_ has joined #ruby
babykosh has quit [Quit: babykosh]
frem has quit [Ping timeout: 264 seconds]
tommyvyo_ has joined #ruby
timonv has joined #ruby
cascalheira has quit [Quit: Leaving...]
dukedave has quit [Quit: Leaving.]
moted has quit [Read error: Operation timed out]
baphled has joined #ruby
hadees has quit [Quit: hadees]
mikepack has quit [Remote host closed the connection]
rramsden has quit [Quit: Lost terminal]
Averna has joined #ruby
medik has joined #ruby
medik has quit [Excess Flood]
medik has joined #ruby
Vert has joined #ruby
awarner_ has quit [Remote host closed the connection]
havenn has quit [Read error: Connection reset by peer]
punkrawkR^Home has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
havenn has joined #ruby
jarred_ has quit [Ping timeout: 264 seconds]
brianpWins has quit [Ping timeout: 244 seconds]
thone_ has joined #ruby
havenn has quit [Read error: Connection reset by peer]
jarred_ has joined #ruby
<wjw> hasse_, it looks it was supposed to be part of the stanard library with 1.8.7.
<hasse_> wjw: isn't it?
havenn has joined #ruby
thone has quit [Ping timeout: 264 seconds]
jarred_ has quit [Client Quit]
waxjar has quit [Quit: i am waxjar, hear me roar]
<hasse_> wjw: require 'rational'; Rational(a,b)
waxjar has joined #ruby
postmodern has quit [Remote host closed the connection]
axl_ has quit [Quit: axl_]
postmodern has joined #ruby
<wjw> hasse_, OK, thanks; the "require" part is what I didn't understand.
<wjw> hasse_, I guess "require" uses some search path.
leonardorb has joined #ruby
jds_ has joined #ruby
cardoni has quit [Quit: cardoni]
Emmanuel_Chanel has quit [Ping timeout: 252 seconds]
pu22l3r has joined #ruby
danneu has quit [Ping timeout: 265 seconds]
jds_ has quit [Ping timeout: 255 seconds]
afgeneralist has quit [Ping timeout: 255 seconds]
SCommette has joined #ruby
Emmanuel_Chanel has joined #ruby
iamjarvo_ has quit [Quit: Computer has gone to sleep.]
Russell^^ has joined #ruby
leonardorb has quit [Ping timeout: 246 seconds]
nkts has quit []
yechuah1 has joined #ruby
freakazoid0223 has quit [Quit: Leaving]
ltsstar1 has quit [Quit: ltsstar1]
benlieb has joined #ruby
Michae___ has quit [Remote host closed the connection]
danfo has joined #ruby
waxjar has quit [Quit: i am waxjar, hear me roar]
waxjar has joined #ruby
arya_ has joined #ruby
arya has quit [Ping timeout: 244 seconds]
davidcelis has joined #ruby
SCommette has quit [Quit: SCommette]
tomsthumb has joined #ruby
tomsthumb has quit [Client Quit]
SCommette has joined #ruby
SCommette has quit [Client Quit]
danfo has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
dEPy has quit []
mrsolo has quit [Quit: Leaving]
Goles has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
GoGoGarrett has joined #ruby
dpg has quit [Quit: dpg]
LouisGB has joined #ruby
iamjarvo_ has joined #ruby
v0n has quit [Ping timeout: 246 seconds]
Goles has quit [Ping timeout: 260 seconds]
brianpWins has joined #ruby
brianpWins has quit [Client Quit]
Michae___ has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
Michae___ has quit [Remote host closed the connection]
johnmilton has quit [Remote host closed the connection]
ltsstar has joined #ruby
jslowe has quit [Read error: Connection reset by peer]
leonardorb has joined #ruby
seich- has joined #ruby
ltsstar has quit [Client Quit]
<Gate> wjw: puts $LOAD_PATH
pu22l3r has quit []
pyrocommie has quit [Remote host closed the connection]
vasile has quit [Ping timeout: 264 seconds]
x82_nicole has joined #ruby
pu22l3r has joined #ruby
tyfighter has quit [Quit: tyfighter]
v0n has joined #ruby
leonardorb has quit [Ping timeout: 250 seconds]
centipedefarmer has joined #ruby
danneu has joined #ruby
otters has quit [Ping timeout: 255 seconds]
jimeh_ has quit [Quit: Computer has gone to sleep.]
cousine has joined #ruby
v0n has quit [Ping timeout: 246 seconds]
NackNick has quit []
pcarrier has joined #ruby
Michae___ has joined #ruby
r4um has quit [Ping timeout: 252 seconds]
Michae___ has quit [Remote host closed the connection]
skattyadz has joined #ruby
r4um has joined #ruby
Chryson has joined #ruby
SCommette has joined #ruby
SCommette has quit [Client Quit]
arya_ has quit [Ping timeout: 244 seconds]
twopoint718 has joined #ruby
Ivo has quit [Quit: WeeChat 0.3.9.2]
arya has joined #ruby
emergion has joined #ruby
hasse_ has quit [Quit: Page closed]
cousine has quit [Remote host closed the connection]
leonardorb has joined #ruby
emergion has quit [Client Quit]
skattyadz has quit [Quit: skattyadz]
charliesome has joined #ruby
ikaros has quit [Quit: Ex-Chat]
otters has joined #ruby
robotmay has quit [Ping timeout: 246 seconds]
the_jeebster has quit [Quit: Leaving.]
banisterfiend has quit [Remote host closed the connection]
leonardorb has quit [Ping timeout: 246 seconds]
BigO has joined #ruby
medik has quit [Quit: medik has no reason]
twopoint718 has quit [Ping timeout: 260 seconds]
dmiller_ has joined #ruby
dmiller has quit [Ping timeout: 246 seconds]
adeponte has quit [Remote host closed the connection]
centipedefarmer has quit [Remote host closed the connection]
BigO has quit [Remote host closed the connection]
Michael__ has joined #ruby
_nitti has joined #ruby
jonahR has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
alanjc has quit [Quit: alanjc]
Michael__ has quit [Remote host closed the connection]
Michael__ has joined #ruby
medik has joined #ruby
medik has quit [Excess Flood]
medik has joined #ruby
cardoni has joined #ruby
sorbo_ has joined #ruby
_nitti has quit [Ping timeout: 246 seconds]
joeycarm_ has quit [Remote host closed the connection]
joeycarmello has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
doritostains has quit [Ping timeout: 260 seconds]
cableray has quit [Quit: cableray]
joeycarmello has quit [Ping timeout: 246 seconds]
LouisGB has quit [Ping timeout: 260 seconds]
tommyvy__ has joined #ruby
adamjleonard has joined #ruby
rakl has quit [Quit: sleeping]
nkts has joined #ruby
Vert has quit [Read error: Connection reset by peer]
hyperboreean has quit [Ping timeout: 252 seconds]
hyperboreean has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
ryanlecompte has quit [Remote host closed the connection]
x82_nicole has joined #ruby
postmodern has quit [Quit: Leaving]
Juul has quit [Quit: Leaving]
dukedave has joined #ruby
adamjleonard has quit [Quit: Linkinus - http://linkinus.com]
postmodern has joined #ruby
Targen_ has quit [Ping timeout: 264 seconds]
nat2610 has quit [Quit: Leaving.]
leonardorb has joined #ruby
rakunHo has joined #ruby
jenrzzz has joined #ruby
x82_nicole has quit [Client Quit]
pu22l3r has quit [Remote host closed the connection]
davidcelis has quit [Quit: K-Lined.]
icole has quit [Remote host closed the connection]
frem has joined #ruby
centipedefarmer has joined #ruby
leonardorb has quit [Ping timeout: 246 seconds]
blazes816 has quit [Quit: blazes816]
<sheerun> mruby has tests based on iso, and iso costs 256 USD. have I really to pay if I want to contribute? http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=59579
joeycarmello has joined #ruby
jlwestsr has quit [Ping timeout: 246 seconds]
cableray has joined #ruby
joeycarmello has quit [Remote host closed the connection]
joeycarmello has joined #ruby
<danneu> heh
Retistic has joined #ruby
<Retistic> is there a way to conditionally add an argument to a method in a clean way?
<Retistic> so rather than if arg; object.do_something(arg) else object.do_something() end
havenn has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 250 seconds]
caleb_io has joined #ruby
ebobby has quit [Ping timeout: 255 seconds]
mikepack has joined #ruby
Xeago has quit [Remote host closed the connection]
jlwestsr has joined #ruby
lushious has joined #ruby
arya has quit [Ping timeout: 244 seconds]
<heftig> Retistic: object.do_something(*arg ?[arg]:[])
<heftig> not very nice, though
dpk is now known as dpkbis
<heftig> creates pointless arrays, too
dpkbis is now known as dpk
arya has joined #ruby
cardoni has quit [Quit: cardoni]
BoomCow has quit [Quit: This computer has gone to sleep]
<charliesome> sheerun: unfortunately yes. if you find a torrent anywhere, let me know :p
LouisGB has joined #ruby
<charliesome> Retistic: i'd say a nice if statement is more clean than any 'clever' tricks
<charliesome> it's also likely to be negligibly faster
Virunga has joined #ruby
babykosh has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
leonardorb has joined #ruby
slainer68 has quit [Remote host closed the connection]
mahmoudi_ has quit [Quit: Computer has gone to sleep.]
Hanmac1 has joined #ruby
tommyvy__ has quit [Quit: Computer has gone to sleep.]
babykosh has quit [Client Quit]
wargasm has joined #ruby
ananthakumaran has joined #ruby
Hanmac has quit [Ping timeout: 265 seconds]
seich- is now known as Seich
hackerdude has quit [Remote host closed the connection]
love_color_text has joined #ruby
dukedave has quit [Quit: Leaving.]
hotovson has joined #ruby
pcarrier has quit []
himsin has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
<postmodern> heftig, isn't that what Array() is for?
Russell^^ has quit [Quit: Russell^^]
<postmodern> heftig, oh also, in 1.9, * will omit [] and nil
<postmodern> er map them to empty arguments
mascool has quit [Ping timeout: 251 seconds]
<postmodern> in 1.8, *nil => nil
hotovson has quit [Read error: No route to host]
yechuah1 has quit [Quit: Leaving.]
<waxjar> discovering Array() and friends made my code so much tidier
yechuah has joined #ruby
cardoni has joined #ruby
Takehiro has joined #ruby
fred909 has quit [Ping timeout: 260 seconds]
pcarrier has joined #ruby
greg- has joined #ruby
karakedi has joined #ruby
benlieb_ has joined #ruby
benlieb has quit [Read error: Connection reset by peer]
benlieb_ is now known as benlieb
benlieb has quit [Client Quit]
tommyvy__ has joined #ruby
ebobby has joined #ruby
ebobby is now known as Guest42158
cardoni has quit [Ping timeout: 246 seconds]
<danneu> or stuff like Array.new(10) { rand(6) } #=> [1, 5, 3, 3, ...]
alanjc has joined #ruby
LouisGB has quit [Ping timeout: 265 seconds]
<heftig> 30.times.map { rand(6) }
babykosh has joined #ruby
<charliesome> enumerator tricks are the best
frem has quit [Quit: Computer has gone to sleep.]
explody has quit [Ping timeout: 264 seconds]
<danneu> damn. 1 character shorter
<sorbo_> I just started writing ruby a couple of months ago
<sorbo_> and I have to say
<sorbo_> it is an effing delight.
yechuah has left #ruby [#ruby]
<danneu> sorbo_: did you come from another language
<sorbo_> danneau: python
Takehiro has quit [Remote host closed the connection]
<danneu> me too
BrianJ has joined #ruby
explody has joined #ruby
<sorbo_> I mean
<sorbo_> python makes a lot of sense to me
<waxjar> enumerator has so many underused methods
<sorbo_> but I don't think to myself, "man, I really want to write xyz in python"
<sorbo_> and I find myself thinking that about ruby
<waxjar> i recently discovered #one? and #any?
ircmouser has joined #ruby
Guest42158 has quit [Ping timeout: 256 seconds]
cableray has quit [Quit: cableray]
pu22l3r has joined #ruby
pu22l3r has quit [Remote host closed the connection]
mfridh has quit [Ping timeout: 255 seconds]
alvaro_o has quit [Quit: Ex-Chat]
babykosh has quit [Quit: babykosh]
freeayu has joined #ruby
ner0x has quit [Ping timeout: 260 seconds]
swarley has joined #ruby
<sorbo_> enumerator is awesome
<sorbo_> I had my ruby epiphany while solving project euler problems
<sorbo_> and realized how easy they are in ruby
<BrianJ> whats the best way to pull stuff out of a database and put it in a queue. For instance I'd like to put my user.name for each user in a queue to be processed by a background job. (I realize this isnt a ruby question, but its for a ruby application
cableray has joined #ruby
BoomCow has joined #ruby
alanjc has quit [Quit: alanjc]
rjj has joined #ruby
ircmouser has quit [Quit: i love phork]
pu22l3r has joined #ruby
pac1 has quit [Quit: I got it one line of code at a time]
Hanmac1 has quit [Read error: Connection reset by peer]
hackerdude has joined #ruby
Hanmac has joined #ruby
karakedi has quit [Ping timeout: 265 seconds]
ner0x has joined #ruby
leonardorb has quit [Remote host closed the connection]
jonahR has quit [Quit: jonahR]
bairui has joined #ruby
reset has quit [Read error: Operation timed out]
pu22l3r has quit [Remote host closed the connection]
explody has quit [Ping timeout: 250 seconds]
arya has quit [Ping timeout: 244 seconds]
explody has joined #ruby
lolcathost has joined #ruby
ircmouser has joined #ruby
arya has joined #ruby
twopoint718 has joined #ruby
twopoint718 has quit [Changing host]
twopoint718 has joined #ruby
slainer68 has joined #ruby
Elico has joined #ruby
danneu has quit [Ping timeout: 265 seconds]
slainer68 has quit [Ping timeout: 260 seconds]
forced_request has quit [Read error: Connection reset by peer]
Virunga has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
twopoint718 has quit [Ping timeout: 250 seconds]
wallerdev has joined #ruby
ttt has joined #ruby
arya has quit [Ping timeout: 244 seconds]
chendo has quit [Ping timeout: 252 seconds]
chendo_ has joined #ruby
arya has joined #ruby
catepillar has quit [Read error: Connection reset by peer]
BigO has joined #ruby
rakunHo_ has joined #ruby
rakunHo has quit [Ping timeout: 246 seconds]
chendo_ has quit [Ping timeout: 265 seconds]
chendo_ has joined #ruby
pu22l3r has joined #ruby
Seich has quit [Ping timeout: 246 seconds]
jarred has joined #ruby
pu22l3r has quit [Remote host closed the connection]
ttt has quit [Ping timeout: 245 seconds]
aeontech has joined #ruby
catepillar has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
g-ram has joined #ruby
seich- has joined #ruby
aeontech has quit [Remote host closed the connection]
tommyvy__ has quit [Quit: Computer has gone to sleep.]
lampe2 has quit [Ping timeout: 246 seconds]
chendo_ has quit [Remote host closed the connection]
chendo_ has joined #ruby
bigmcq77 has quit [Quit: Computer has gone to sleep.]
capaterra has joined #ruby
otters has quit [Read error: Connection reset by peer]
weasels has joined #ruby
BombStrike has quit [Ping timeout: 250 seconds]
danneu has joined #ruby
joeycarmello has quit [Remote host closed the connection]
aeontech has joined #ruby
jeffreybaird has joined #ruby
freeayu has quit [Remote host closed the connection]
Rym has joined #ruby
BoomCow has quit [Quit: This computer has gone to sleep]
key has joined #ruby
sorbo_ has quit [Quit: sorbo_]
BigO has quit [Remote host closed the connection]
weasels is now known as otters
radic has quit [Disconnected by services]
radic_ has joined #ruby
rellin has joined #ruby
greasegum has joined #ruby
ryanlecompte has joined #ruby
carlyle has joined #ruby
araujo has quit [Quit: Leaving]
eka has quit [Remote host closed the connection]
swarley has quit [Ping timeout: 264 seconds]
teddfox has joined #ruby
teddfox is now known as rubenewb
rubenewb has left #ruby [#ruby]
rubenewb has joined #ruby
BombStrike has joined #ruby
rubenewb has quit [Remote host closed the connection]
tommyvy__ has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
ner0x has quit [Quit: Leaving]
Trioke has quit [Ping timeout: 265 seconds]
ryanf has joined #ruby
roadt_ has joined #ruby
leonardorb has joined #ruby
tobym has joined #ruby
stkowski has quit [Quit: stkowski]
sepp2k1 has quit [Remote host closed the connection]
BoomCow has joined #ruby
joeycarmello has joined #ruby
Goopyo has quit [Ping timeout: 246 seconds]
jarred_ has joined #ruby
jarred has quit [Ping timeout: 246 seconds]
jarred_ is now known as jarred
leonardorb has quit [Ping timeout: 256 seconds]
charliesome has quit [Ping timeout: 265 seconds]
charliesome has joined #ruby
rohit_ has joined #ruby
caleb_io has quit [Quit: caleb_io]
nari has joined #ruby
jrunning1 has quit [Read error: Operation timed out]
SCommette has joined #ruby
freakazoid0223 has joined #ruby
_nitti has joined #ruby
greg- has quit [Quit: greg-]
jeffreybaird has quit [Quit: jeffreybaird]
jarred_ has joined #ruby
jarred has quit [Ping timeout: 244 seconds]
jarred_ is now known as jarred
axl_ has joined #ruby
_nitti has quit [Ping timeout: 260 seconds]
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvy__ is now known as tommyvyo
SCommette has quit [Quit: SCommette]
SCommette has joined #ruby
SCommette has quit [Client Quit]
Rym has quit [Quit: Rym]
sn0wb1rd has joined #ruby
ttt has joined #ruby
xsbeats has joined #ruby
mercwithamouth has joined #ruby
bigmcq77 has joined #ruby
SCommette has joined #ruby
mneorr has quit [Remote host closed the connection]
bigmcq77 has quit [Client Quit]
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo_ is now known as tommyvyo
mneorr has joined #ruby
xsbeats has quit [Ping timeout: 264 seconds]
mahmoudimus has joined #ruby
bigmcq77 has joined #ruby
cardoni has joined #ruby
ttt has quit [Ping timeout: 276 seconds]
rohit_ has quit [Quit: Leaving]
babykosh has joined #ruby
carlyle has quit [Remote host closed the connection]
arya has quit [Ping timeout: 244 seconds]
jlogsdon has joined #ruby
rodasc has quit [Ping timeout: 244 seconds]
babykosh has quit [Quit: babykosh]
rohit has joined #ruby
axl_ has quit [Quit: axl_]
rohit has quit [Read error: Connection reset by peer]
arya has joined #ruby
benlieb has joined #ruby
benlieb has quit [Client Quit]
Takehiro has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
cpruitt has quit [Quit: cpruitt]
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
lolcathost has joined #ruby
jlogsdon has quit [Remote host closed the connection]
lolcathost has quit [Client Quit]
Slivka has quit [Read error: Connection reset by peer]
Slivka has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
SCommette has quit [Quit: SCommette]
lolcathost has joined #ruby
mahmoudimus has joined #ruby
tomsthumb has joined #ruby
crodas has joined #ruby
jlwestsr has quit [Quit: Ex-Chat]
axl_ has joined #ruby
arya has quit [Ping timeout: 244 seconds]
sorbo_ has joined #ruby
stayarrr has joined #ruby
nari has quit [Ping timeout: 252 seconds]
arya has joined #ruby
baphled has quit [Ping timeout: 264 seconds]
BoomCow has quit [Quit: This computer has gone to sleep]
baphled has joined #ruby
BoomCow has joined #ruby
ryanf_ has joined #ruby
ryanf has quit [Ping timeout: 255 seconds]
machty has quit [Quit: machty]
Chryson has quit [Quit: Leaving]
Villadelfia has quit [Read error: Operation timed out]
krnlsndr1 has quit [Quit: leaving]
krnlsndrs has joined #ruby
krnlsndrs has quit [Client Quit]
awarner has joined #ruby
krnlsndrs has joined #ruby
SeySayux has quit [Ping timeout: 265 seconds]
krnlsndrs has quit [Client Quit]
slainer68 has joined #ruby
krnlsndrs has joined #ruby
krnlsndrs has quit [Client Quit]
nomenkun has quit [Read error: Connection reset by peer]
krnlsndrs has joined #ruby
nomenkun has joined #ruby
SeySayux has joined #ruby
arya_ has joined #ruby
sirecote has quit [Ping timeout: 245 seconds]
Villadelfia has joined #ruby
axl_ has quit [Quit: axl_]
centipedefarmer has quit [Remote host closed the connection]
nobuoka has joined #ruby
LemDies is now known as Lemtzas
sirecote has joined #ruby
nari has joined #ruby
arya has quit [Ping timeout: 244 seconds]
slainer68 has quit [Ping timeout: 252 seconds]
_nitti has joined #ruby
advorak has quit [Quit: Leaving]
baphled has quit [Ping timeout: 256 seconds]
bigmac has joined #ruby
_nitti has quit [Ping timeout: 246 seconds]
swex has joined #ruby
swex_ has quit [Read error: Operation timed out]
araujo has joined #ruby
love_color_text has quit [Remote host closed the connection]
_cheney has quit [Quit: Nettalk6 - www.ntalk.de]
awarner has quit [Remote host closed the connection]
ttt has joined #ruby
ryanf_ has quit [Quit: broken pipes |||]
tommyvyo has quit [Quit: Computer has gone to sleep.]
Takehiro has quit [Read error: Connection reset by peer]
Takehiro_ has joined #ruby
ryanf has joined #ruby
rohit has joined #ruby
ttt has quit [Ping timeout: 245 seconds]
mercwithamouth has quit [Ping timeout: 255 seconds]
otters has quit [Ping timeout: 244 seconds]
ryanlecompte has quit [Remote host closed the connection]
ircmouser has quit [Ping timeout: 260 seconds]
_cheney has joined #ruby
phantasm66 has quit [Quit: *sleeeeep*]
<bigmac> i am using threads but i need to throttle this some how
<bigmac> while Thread.start{`whoami`}
<bigmac> if ps_aux.gsub(" ","").split.length<50
arya_ has quit [Ping timeout: 244 seconds]
sorbo_ has quit [Quit: sorbo_]
hackerdude has quit [Remote host closed the connection]
pcarrier has quit []
FredLe has joined #ruby
arya has joined #ruby
joofsh has quit [Remote host closed the connection]
stayarrr has quit [Quit: Leaving...]
eka has joined #ruby
arya has quit [Ping timeout: 246 seconds]
jackdanger has joined #ruby
eka has quit [Ping timeout: 246 seconds]
arya has joined #ruby
BoomCow has quit [Quit: This computer has gone to sleep]
icole has joined #ruby
advorak has joined #ruby
tobym has quit [Remote host closed the connection]
Drewch has quit [Ping timeout: 250 seconds]
danktamagachi has joined #ruby
key has quit [Remote host closed the connection]
davidcelis has joined #ruby
snorkdude has joined #ruby
arya has quit [Ping timeout: 248 seconds]
key has joined #ruby
huoxito has quit [Quit: Leaving]
slainer68 has joined #ruby
arya has joined #ruby
jekotia has quit [Read error: Connection reset by peer]
danktamagachi has quit [Ping timeout: 264 seconds]
slainer68 has quit [Ping timeout: 256 seconds]
_nitti has joined #ruby
Nisstyre has quit [Quit: Leaving]
stayarrr has joined #ruby
dmiller_ has quit [Remote host closed the connection]
_nitti has quit [Ping timeout: 256 seconds]
dmiller has joined #ruby
rellin has quit [Quit: Nettalk6 - www.ntalk.de]
ttt has joined #ruby
snorkdude has quit [Quit: snorkdude]
iamjarvo_ has quit [Quit: Computer has gone to sleep.]
rohit has quit [Ping timeout: 260 seconds]
arya has quit [Ping timeout: 255 seconds]
stayarrr has quit [Read error: Connection reset by peer]
cardoni has quit [Quit: cardoni]
stayarrr has joined #ruby
stayarrr has quit [Read error: Connection reset by peer]
stayarrr has joined #ruby
arya has joined #ruby
ttt has quit [Ping timeout: 245 seconds]
answer_42 has joined #ruby
stayarrr has quit [Read error: Connection reset by peer]
stayarrr has joined #ruby
olivererxleben has joined #ruby
stayarrr has quit [Read error: Connection reset by peer]
arya_ has joined #ruby
Nisstyre has joined #ruby
arya has quit [Ping timeout: 265 seconds]
danneu has quit [Ping timeout: 248 seconds]
jsilver has joined #ruby
rippa has joined #ruby
ryanlecompte has joined #ruby
arya_ has quit [Ping timeout: 260 seconds]
branon has joined #ruby
ebouchut_ has joined #ruby
ebouchut_ has quit [Client Quit]
ryanlecompte has quit [Ping timeout: 256 seconds]
Slivka has joined #ruby
EyesIsMine is now known as NotEyesIsMine
NotEyesIsMine is now known as EyesIsMine
arya has joined #ruby
medik has quit [Ping timeout: 240 seconds]
Takehiro_ has quit [Remote host closed the connection]
fyolnish has quit [Remote host closed the connection]
hamed_r has joined #ruby
hotovson has joined #ruby
Choobie has joined #ruby
chaplain has joined #ruby
shorne has joined #ruby
faoiseamh has joined #ruby
<faoiseamh> anyone know mucha bout reading utf-8(chinese) text files, doing some regex, adn writing out an identically encoded file with replacements? - ideally would be great to parse as xml as well but having no luck using nokogiri
cj3kim has joined #ruby
<Hanmac> depending on your ruby version
slainer68 has joined #ruby
krz has joined #ruby
chaplain has quit [Read error: Connection reset by peer]
replore has joined #ruby
chaplain has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
Slivka has joined #ruby
<faoiseamh> Hanmac: using 1.9.3 on windows
slainer68 has quit [Ping timeout: 246 seconds]
arya has quit [Ping timeout: 260 seconds]
<apeiros_> faoiseamh: should not be a problem
<apeiros_> faoiseamh: can you reduce the issue you face to a small reproduceable case?
Takehiro has joined #ruby
arya has joined #ruby
arietis has joined #ruby
greasegum has quit [Ping timeout: 252 seconds]
Morkel has joined #ruby
<faoiseamh> apeiros_ just trying to get the basics first - i'm just reading a file and writing hte lines to a new file first to make sure i can read / write and maintain the same encoding
<apeiros_> faoiseamh: as said, that should not be a problem
<faoiseamh> output has a bunch of random characters on every other line but otherwise is the same as input - i'll pastebin an example
chaplain has quit [Read error: Connection reset by peer]
chaplain has joined #ruby
Asher has quit [Ping timeout: 255 seconds]
Asher1 has joined #ruby
<faoiseamh> apeiros_ http://pastebin.com/dJNeiagf
Asher1 has quit [Client Quit]
Asher has joined #ruby
ttt has joined #ruby
<apeiros_> faoiseamh: windows you said?
<apeiros_> you probably want to use wb then
<apeiros_> since windows has that stupid text-mode vs. binary-mode thing
<apeiros_> and rb
fyolnish has joined #ruby
<faoiseamh> will do
<faoiseamh> pretty sure i tried this on linux last night as well with similar results (tried the #encoding: directiveat the top of the file too)
<faoiseamh> but i was pretty tired so...
cardoni has joined #ruby
<faoiseamh> beautiful, rb / wb works
chaplain has quit [Read error: Connection reset by peer]
<faoiseamh> appreciate it, now let me try some regex and other manipulation and see how it goes
<faoiseamh> actually let me try parsing as xml now
chaplain has joined #ruby
ttt has quit [Ping timeout: 276 seconds]
<faoiseamh> i usually work on mac / ubuntu but this is a windows game so i've been working on windows :(
chaplain has quit [Client Quit]
branon has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
nari has quit [Ping timeout: 255 seconds]
chaplain has joined #ruby
<apeiros_> faoiseamh: # encoding comment is only for string literals in the current file
<apeiros_> and text in general in that current file (e.g. comments)
Slivka has quit [Read error: Connection reset by peer]
<faoiseamh> gotchya
Slivka has joined #ruby
<apeiros_> hm, but your in/output is weird
<apeiros_> and certainly not due to w vs. wb mode
SiegeX has joined #ruby
<faoiseamh> yeah very strange
<faoiseamh> but w vs wb totally fixes it
<apeiros_> hm
<apeiros_> funky
<apeiros_> so much about my "certainly"
fyolnish has quit [Ping timeout: 250 seconds]
<apeiros_> w vs. wb is only about line endings (\r\n vs \n), and \r has no special meaning in utf-8…
chaplain has quit [Read error: Connection reset by peer]
<faoiseamh> wonder what it was then
chaplain has joined #ruby
arya has quit []
FredLe has quit [Quit: Leaving.]
<ryanf> I think wb also forces the output encoding to binary / ascii_8bit
<faoiseamh> apeiros_: so I'm trying to do some regex matching and running into "invalid byte sequence in UTF-8 (ArgumentError)". I can get it to not throw that by first converting the line I'm reading using line = lineforce_encoding("ISO-8859-1").encode("UTF-8"), but there's still the \0's between each character
<faoiseamh> line.force*
ircmouser has joined #ruby
ToTo has joined #ruby
<faoiseamh> so I'm wondering if I have to somehow convert my regex pattern into this UTF-8'sh format or there is some alternative to manually adding a \0 between each standard character
<faoiseamh> i can pastebin if that isn't clear
krz has quit [Quit: krz]
jarred has quit [Quit: jarred]
lolcathost has quit [Quit: Lost terminal]
lolcathost has joined #ruby
chaplain has quit [Read error: Connection reset by peer]
cj3kim has quit [Quit: This computer has gone to sleep]
Morkel has quit [Quit: Morkel]
<apeiros_> ryanf: not in 1.9
<apeiros_> ryanf: doesn't make sense anyway since binary in that case just means "leave as is"
Michael__ has quit [Ping timeout: 248 seconds]
<apeiros_> faoiseamh: # encoding: utf-8 sets the encoding of the regex literals to utf-8 too
<apeiros_> alternatively //u
<apeiros_> but then you can't use literal utf-8 in your code, so the encoding comment is probably rather the tool of choice
chaplain has joined #ruby
FredLe has joined #ruby
<apeiros_> faoiseamh: you have \0's between *each* character? you sure you have utf-8 and not utf-16?
AxonetBE has joined #ruby
<apeiros_> that'd explain why a random \r has so much impact…
AxonetBE has quit [Client Quit]
<faoiseamh> apeiros_ not sure, seems that way though, dont' really know much about encodings
<faoiseamh> line[/S/u] still throws the same error
<faoiseamh> to be clear i'm trying to match standard characters in this string that also contains utf-8 chars
<apeiros_> faoiseamh: what does this print: ruby -e 'p File.read(yourfile, encoding: "binary").unpack("C*").first(40)'
<faoiseamh> i actually can't even paste the output of one line, stops after first char, but there's a "space" between each
<apeiros_> that sounds a lot like you're wrong about what encoding you have at hand…
<apeiros_> "hello" in utf-16 looks like this: "h\0e\0l\0l\0o\0"
<faoiseamh> just guessing it was utf-8 b/c i thought that was generally what chinese character text would be
<faoiseamh> that seems to match what i'm seeing
<faoiseamh> sec and i'll give you the output
<apeiros_> for chinese, utf-16 makes more sense
<apeiros_> since almost no char will fit into a 1 byte sequence
icole has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<faoiseamh> sounds reasonable to me :)
<faoiseamh> which explains why all standard english chars have a "space" after them
<faoiseamh> http://pastebin.com/AJxaTmL4 is the output
<apeiros_> ryanf: interesting, the encoding options should override that, though
<apeiros_> faoiseamh: yeah, see that? first 2 chars are BOM
<apeiros_> after that you have a null-byte on every second byte
<apeiros_> definitively utf-8 with a leading BOM
<apeiros_> gah
<apeiros_> *definitively utf-16 with a leading BOM
<faoiseamh> utf-8..
<faoiseamh> ok :)
chaplain has quit [Read error: Connection reset by peer]
<faoiseamh> cool so let me try parsing it as that
<apeiros_> BOM = byte order mark
chaplain has joined #ruby
<apeiros_> tells you whether it's big-endian or little-endian utf-16 (that's the LE/BE you see in the encoding names)
chaplain has quit [Client Quit]
ananthakumaran1 has joined #ruby
<faoiseamh> `write': incomplete "\n" on UTF-16 (Encoding::InvalidByteSequenceError)
<faoiseamh> that's just rewriting same file again
Choobie has quit [Quit: End]
lesnik_ has joined #ruby
<apeiros_> with utf-16, I'm not sure whether you should still use rb/wb
<apeiros_> (I hate windows for that stupid distinction…)
Nisstyre has quit [Quit: Leaving]
ananthakumaran has quit [Ping timeout: 246 seconds]
<apeiros_> faoiseamh: code?
<faoiseamh> pretty sure still needs to be bin, without I get a ASCII incompatible encoding needs binmode
<apeiros_> k
<faoiseamh> hmm that was probably my fault, rewriting minimal simple example seems to work, looking for my bug in my more complex script
<faoiseamh> i'll try regex'n again and see
<faoiseamh> thanks so much for the help so far
<faoiseamh> been banging my head on this for a little while now
Nisstyre has joined #ruby
<apeiros_> with encodings, the 101 is to know what encoding your input is and what encoding you have to output
<apeiros_> the rest should actually not be *that* hard.
<faoiseamh> that was my first mistake
<apeiros_> problem with knowing the input encoding: you can't programmatically detect it. you must know it.
<faoiseamh> i tried utf-16 while playing around with it last night based ont he extra space and 8 vs 16
Zai00 has joined #ruby
<apeiros_> as a human, you can guess, but only because you know what the input should roughly look like, or whether a given representation makes sense. can't tell a computer to do that…
<faoiseamh> but b/c i wasn't reading as binary or something i think i moved on
<faoiseamh> cool, i'm learning a lot
ircmouser has quit [Quit: phork]
Retistic has quit [Quit: Retistic]
<faoiseamh> ahh so readlines doesn't work properly w/ utf-16 it seems
<apeiros_> you have to provide it the encoding too
ircmouser has joined #ruby
<apeiros_> should work fine then
<apeiros_> i.e., File.readlines(path, encoding: Encoding::UTF16, mode: 'rb') …
c0rn has joined #ruby
<ryanf> probably r will work if you specify the encoding
<faoiseamh> so for that I had to specify encoding: 'UTF-16LE', UTF-16 alone didn't work
earthquake has quit [Quit: earthquake]
<ryanf> ah, makes sense
<apeiros_> shame
<apeiros_> so ruby doesn't evaluate the BOM
<faoiseamh> File.open and then File.read works fine with UTF-16 but File.readlines needs more explicit
<faoiseamh> interesting
* apeiros_ considers that a bug
<faoiseamh> seems like it
danneu has joined #ruby
earthquake has joined #ruby
jenrzzz has joined #ruby
shorne has quit [Ping timeout: 260 seconds]
cableray has quit [Quit: cableray]
_nitti has joined #ruby
mengu has joined #ruby
<faoiseamh> ok so how should I be regexp'n this UTF-16LE data?
adambeynon has joined #ruby
icole has joined #ruby
_nitti has quit [Ping timeout: 246 seconds]
<ryanf> you can make a regexp whose encoding is utf-16le
jlogsdon has joined #ruby
<faoiseamh> getting a "incompatible encoding regexp match (US-ASCII regexp with UTF-16LE string) (Encoding::CompatibilityError)" trying to do line[/S/]
Lemtzas is now known as MOBULUS
<faoiseamh> guess i have to convert input to regex to utf-16le
<apeiros_> faoiseamh: that means you haven't added the encoding comment :-p
rezzack has quit [Quit: Leaving.]
<faoiseamh> i did but then it complains at that comment
MOBULUS is now known as MOBULAN
<faoiseamh> saying ascii isn't compatable w/ utf-16le
<apeiros_> anyway, I think you can have a regex only in binary, utf-8 and some japanese encodings
chaplain has joined #ruby
<apeiros_> so you'd re-encode the utf-16 you've got to utf-8
<apeiros_> then work with the utf-8 string and re-encode to utf-16 once you're done (can be handled by the IO)
<apeiros_> so:
<faoiseamh> no data will be lost?
<apeiros_> no, all unicode encodings are capable of the full charset
lesnik_ has quit [Ping timeout: 265 seconds]
<apeiros_> they just use different escape sequences
<faoiseamh> why would you use utf-16 at all then?
chaplain has quit [Client Quit]
<faoiseamh> ^curiousity
<apeiros_> because it's more efficient for certain things
<apeiros_> see, utf-8 uses 1 byte for all ascii, so it's got only 128 values left for non-ascii
<apeiros_> take chinese with its thousands of characters…
olivererxleben has quit [Quit: Leaving...]
<apeiros_> you need like 5 bytes for most of those characters in utf-8
<apeiros_> while you only need 2 bytes in utf-16
chaplain has joined #ruby
lesnik_ has joined #ruby
<faoiseamh> so i'm using this to copy some english fields from similar files to their chinese counterparts. I want to do regex on english and chinese files to find field to match by, then get the value from english using regex, then replace the chinese field value w/ english field value
<faoiseamh> i guess i can find the utf8 value, then encode it to utf-16le and gsub that?
<apeiros_> o0
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
<faoiseamh> or i guess i can do it all in utf-8 and then convert the result to utf-16le at the end
<apeiros_> you can also work entirely in binary. I wouldn't do that, though. but that wouldn't need you to re-encode anything.
ttt has joined #ruby
browndawg has joined #ruby
<faoiseamh> why wouldn't you do that?
<apeiros_> yes, that'd be my suggestion
browndawg has quit [Max SendQ exceeded]
<apeiros_> because it's brittle
Jackneill has joined #ruby
browndawg has joined #ruby
<nyuszika7h> hi, what is the easiest way for me to get ruby 1.9.3 locally installed (or even globally, but without using testing/sid) on debian squeeze?
browndawg has quit [Max SendQ exceeded]
<faoiseamh> ok well i'm going forward w/ utf-16 -> 8 -> reshape -> 16 approach
Jackneill is now known as Guest30882
<nyuszika7h> the latest version (1.9.3-p327) if possible
<apeiros_> nyuszika7h: rvm IMO
<nyuszika7h> I'll look into it
<apeiros_> nyuszika7h: https://rvm.io
<faoiseamh> i used rvm on squeeze w/o trouble
browndawg has joined #ruby
<nyuszika7h> thanks
browndawg has quit [Max SendQ exceeded]
elkclone has joined #ruby
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
cableray has joined #ruby
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
<apeiros_> faoiseamh: you can let the IO handle the re-encoding
<apeiros_> i.e., you tell it that the file (external encoding) is utf-16, and you want it (internal encoding) in utf-8
<apeiros_> then set your encoding comment in your code (the # encoding: utf-8) and you're all set
browndawg has joined #ruby
<apeiros_> (or should be)
<heftig> "rb:bom|utf-16le:utf-8"
<apeiros_> heftig: the "bom|" tells it to strip the bom?
browndawg has left #ruby [#ruby]
ttt has quit [Ping timeout: 276 seconds]
browndawg has joined #ruby
<heftig> yes. and set external encoding if it exists
<heftig> utf-16le is then just a fallback
<apeiros_> ah
<apeiros_> interesting
* apeiros_ takes mental note
<faoiseamh> lots of great info, thanks guys
* apeiros_ is glad his data is almost entirely utf-8
<faoiseamh> i'm on the right track now
<faoiseamh> regex's are working perfectly
<faoiseamh> i knew nothing about encodings before this
<heftig> apeiros_: somepony earlier had problems because they tried to parse a file with a utf-8 BOM using CSV
samphippen has joined #ruby
<apeiros_> utf-8 with a bom?
<heftig> yes.
<apeiros_> why'd utf-8 need a bom? o0
<heftig> it doesn't, but it exists and marks the file as utf-8
<apeiros_> oooookay? :)
<heftig> EF BB BF
<apeiros_> good to know
<apeiros_> haven't come across that yet
<heftig> notepad adds it, or used to
<apeiros_> so EF FF & FF EF for utf-16
<apeiros_> and EF BB BF for utf-8
<apeiros_> (err, FE I think, not EF)
<heftig> has a table with a whole bunch of BOMs
ebouchut_ has joined #ruby
chaplain is now known as thomas
<apeiros_> makes sense
* apeiros_ still wishes for a file container format
<apeiros_> which would contain the encoding
<apeiros_> having your users deal with the encoding is such a horrible idea…
Zai00 has quit [Quit: Zai00]
<Hanmac> imo that should be easy
<heftig> you could stick it in the filename
<apeiros_> heftig: no, you couldn't
<apeiros_> users mess with filenames
<apeiros_> so definitively not an option :)
<heftig> ADS/extended attribute
<heftig> less chance of user screwing with it
<apeiros_> Hanmac: it should be totally easy. the problem is probably to get people (coders/devs) using it…
<apeiros_> ADS: non-portable
<apeiros_> how do you copy a file? how to you keep the data when mailing it?
key has quit [Ping timeout: 260 seconds]
<apeiros_> no, it must be part of the file
MOBULAN is now known as Lemtzas
<apeiros_> similar to ID3 metadata in mp3's
<apeiros_> just generically for all files
<Hanmac> apeiros_ i think it about to put the file in a tar.gz with addional .metainfo file
<apeiros_> Hanmac: tar without gz would actually be a good idea IMO
<apeiros_> as even systems & apps unaware of the container could still deal with it
key has joined #ruby
s1n4 has joined #ruby
<Hanmac> hm you are right, tar could be good enough
<apeiros_> you can still gzip the whole, after all
ebouchut_ has quit [Quit: This computer has gone to sleep]
<apeiros_> but standardizing on a specific compression format doesn't seem wise, thus tar alone
<heftig> or ar?
<apeiros_> ar?
rippa has quit [Ping timeout: 260 seconds]
horrror has joined #ruby
<heftig> apeiros_: more primitive format
<apeiros_> hm
<apeiros_> would depend on how widespread it is and its capabilities
<apeiros_> 10GB file size limit…
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
mame0 has quit [Quit: Tiarra 0.1+svn-36726: SIGINT received; exit]
replore has quit [Remote host closed the connection]
jlogsdon has quit [Remote host closed the connection]
mame0 has joined #ruby
jackdanger has quit [Quit: Leaving.]
bwwrd has joined #ruby
bwwrd has quit [Client Quit]
bwwrd has joined #ruby
arturaz_ has joined #ruby
Virunga has joined #ruby
<nyuszika7h> apeiros_: ruby is compiling now, everything seems fine so far, thanks!
<apeiros_> nyuszika7h: don't forget to run `rvm docs generate` after that
<nyuszika7h> ok
replore has joined #ruby
Nisstyre is now known as whitef
samphippen has quit [Quit: Computer has gone to sleep.]
<lupine> ar is really focused on compressing executable code
<lupine> it can do other stuff too, obviously, but I wouldn't generally use it
whitef is now known as Nisstyre
randym has quit [Quit: Connection closed for inactivity]
<nyuszika7h> nyuszika7h@mew ~ % rvm docs generate
<nyuszika7h> zsh: correct 'rvm' to 'rvim' [nyae]? n
<nyuszika7h> zsh: command not found: rvm
<nyuszika7h> oh wait
eddie_ has joined #ruby
<nyuszika7h> a shell restart fixed it
<eddie_> I have a ruby project and needs help with rspec
<eddie_> anyone?
<nyuszika7h> eddie_: can you be more specific,
<nyuszika7h> ?
<eddie_> sure
nkts has quit []
<eddie_> i am unable to create
<eddie_> factory_girl
x82_nicole has joined #ruby
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
<eddie_> Failure/Error: create(:transaction)
<eddie_> ActiveRecord::ConnectionNotEstablished:
<eddie_> ActiveRecord::ConnectionNotEstablished
jeedey has quit [*.net *.split]
bapa has quit [*.net *.split]
Doc_X_ has quit [*.net *.split]
reactormonk has quit [*.net *.split]
pogo has quit [*.net *.split]
SiegeX has quit [*.net *.split]
spike|spiegel has quit [*.net *.split]
epochwolf has quit [*.net *.split]
Tarential has quit [*.net *.split]
65MABKLVI has quit [*.net *.split]
sj26 has quit [*.net *.split]
katherinem13 has quit [*.net *.split]
krisfremen has quit [*.net *.split]
d-snp has quit [*.net *.split]
monkegjinni has quit [*.net *.split]
irving has quit [*.net *.split]
nick_h has quit [*.net *.split]
psino has quit [*.net *.split]
tchebb has quit [*.net *.split]
crazedpsyc has quit [*.net *.split]
Companion has quit [*.net *.split]
nopper has quit [*.net *.split]
combataircraft has quit [*.net *.split]
lobak has quit [*.net *.split]
aetaric has quit [*.net *.split]
tris has quit [*.net *.split]
pavelz has quit [*.net *.split]
xAndy has quit [*.net *.split]
originale has quit [*.net *.split]
willb has quit [*.net *.split]
yugui_zzz has quit [*.net *.split]
zz_chrismcg has quit [*.net *.split]
chiel has quit [*.net *.split]
wang has quit [*.net *.split]
elaptics`away has quit [*.net *.split]
thomas has quit [Ping timeout: 615 seconds]
mneorr has quit [Remote host closed the connection]
pyx has quit [Quit: WeeChat 0.3.9.2]
horrror has quit [Quit: horrror]
<eddie_> I have a ruby project and needs help with rspec. anyone? please
<elkclone> eddie_: just wait a moment while people re connect.
SiegeX has joined #ruby
nick_h has joined #ruby
willb has joined #ruby
65MABKLVI has joined #ruby
jeedey has joined #ruby
Doc_X_ has joined #ruby
Companion has joined #ruby
epochwolf has joined #ruby
katherinem13 has joined #ruby
monkegjinni has joined #ruby
tchebb has joined #ruby
tris has joined #ruby
irving has joined #ruby
krisfremen has joined #ruby
sj26 has joined #ruby
spike|spiegel has joined #ruby
bapa has joined #ruby
psino has joined #ruby
aetaric has joined #ruby
pavelz has joined #ruby
wang has joined #ruby
d-snp has joined #ruby
elaptics`away has joined #ruby
chiel has joined #ruby
crazedpsyc has joined #ruby
combataircraft has joined #ruby
originale has joined #ruby
reactormonk has joined #ruby
lobak has joined #ruby
nopper has joined #ruby
pogo has joined #ruby
Tarential has joined #ruby
yugui_zzz has joined #ruby
zz_chrismcg has joined #ruby
xAndy has joined #ruby
goraxe has quit [Read error: Connection reset by peer]
<elkclone> after the split
horrror has joined #ruby
bapa has quit [Max SendQ exceeded]
ossareh has quit [Excess Flood]
horrror has quit [Client Quit]
goraxe has joined #ruby
<eddie_> No one to help me with Rspec ? :(
bapa has joined #ruby
<reactormonk> eddie_, nope
SJrX has joined #ruby
<eddie_> :(
ossareh has joined #ruby
<reactormonk> eddie_, post it on stackoverflow
<eddie_> ok
<eddie_> thanks
<reactormonk> eddie_, good for all kinds of questions
<eddie_> :)
<reactormonk> eddie_, easy ones give you more reputation, hard ones give you a solution
<reactormonk> err answer
<eddie_> :D
<eddie_> Well i know how to do it with Rails
<eddie_> but no idea for a plain ruby thing
<faoiseamh> apeiros_: I have another encoding question - what does prepended 255, 254, 255, 254, indicate?
hotovson has quit [Remote host closed the connection]
<reactormonk> faoiseamh, maybe bite order mark?
<apeiros_> too many boms?
<apeiros_> 255, 254 looks like a BOM, but twice is one too many…
fyolnish has joined #ruby
<faoiseamh> yeah weird
s1n4 has quit [Quit: leaving]
<faoiseamh> must just be a messed up file
ircmouser has quit [Ping timeout: 265 seconds]
postmodern has quit [Ping timeout: 256 seconds]
rakl has joined #ruby
tomsthumb has quit [Quit: Leaving.]
slainer68 has joined #ruby
<CamonZ> eddie_: what are you trying to do?
segv- has joined #ruby
nkts has joined #ruby
joast has quit [Read error: Connection timed out]
akemrir has joined #ruby
whitedawg has joined #ruby
dnyy has quit [Read error: Connection timed out]
dnyy has joined #ruby
replore has quit [Remote host closed the connection]
slainer68 has quit [Ping timeout: 248 seconds]
shorne has joined #ruby
TechZombie has quit [Quit: Leaving.]
ircmouser has joined #ruby
<eddie_> I am writing a Daemon
samphippen has joined #ruby
<CamonZ> eddie_: are you using active_record on your project?
<eddie_> CamonZ: Yes
<reactormonk> eddie_, didn't connect to the DB yet
wallerdev has quit [Quit: wallerdev]
ttt has joined #ruby
<CamonZ> ^
<eddie_> Nope
akemrir has quit [Ping timeout: 256 seconds]
<eddie_> This wasnt hard with Rails
thomas has joined #ruby
<eddie_> since i do
<eddie_> RAILS_ENV=test bundle exec rake db:setup
<eddie_> before testing
<eddie_> i have no clue on this
<CamonZ> eddie_: because the connection is initialized by rails when it starts up
<eddie_> yes
<CamonZ> prob because of some magic being used by factory_girl-rails as well
<eddie_> so what do i do with it
Slivka has quit [Read error: Connection reset by peer]
ryanf has quit [Quit: leaving]
Slivka has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
<CamonZ> eddie_: do you need your transaction stored somewhere?
<CamonZ> because you could just build the instance
Slivka has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
<eddie_> Oh
Slivka has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
ttt has quit [Ping timeout: 276 seconds]
<eddie_> Are you suggesting me to do it with actual db data
<eddie_> ?
Slivka has joined #ruby
<CamonZ> eddie_: I thought you were by using create(:transaction)
<CamonZ> eddie_: are you stubbing the result of Transaction.pending to your factory created instance?
<eddie_> no
<eddie_> create is a factory_girl method
<CamonZ> I mean, it depends on what your test/code is meant to do
<eddie_> that loads the factory girl definiyion for transaction for the test
<CamonZ> yes, but create does create on the db the data
<eddie_> no
<CamonZ> while build just creates an instance in memory
<eddie_> its just fakes a db data
<eddie_> oh
<eddie_> how can i do that?
<CamonZ> the difference is that build doesn't call save on the object created
bairui has quit [Quit: WeeChat 0.4.0-dev]
<eddie_> Transaction.new(..............)
<eddie_> thats all
<eddie_> ?
<CamonZ> eddie_: no, the code you're trying to test; from your test I expect that whatever `subject' is it implements a private #find_pending_transaction which should return an_instance_of(Transaction)
<CamonZ> and said instance should have a status of pending
<CamonZ> but those are 2 assertions which you should have as separate tests
<CamonZ> so, your code touches the db
<CamonZ> you want to test that whatever arel query you're using actually works and returns your expected object
m_3 has quit [Remote host closed the connection]
cableray has quit [Quit: cableray]
<CamonZ> so, from my set of assumptions of what your code does you want the create
<CamonZ> instead of build
rjmt___ has joined #ruby
<CamonZ> an alternative is to assume that your query is good, and just stub the result
<CamonZ> in that case you can get away with using build
a_a_g has joined #ruby
<CamonZ> which roughly translates as Transaction.new(attrs) where attrs are built based on your Factory specified with factory girl
rakunHo_ has quit [Remote host closed the connection]
<CamonZ> eddie_: it comes to mind that you could try to configure your db connection on spec_helper.rb
<CamonZ> gtg, bbl
akemrir has joined #ruby
atno has quit [Quit: Leaving]
hamed_r has quit [Quit: Leaving]
joppe has quit [Read error: Connection reset by peer]
BoomCow has joined #ruby
Takehiro has quit [Remote host closed the connection]
SPYGAME has joined #ruby
s1n4 has joined #ruby
atno has joined #ruby
bwwrd has quit [Quit: Textual IRC Client: www.textualapp.com]
ebouchut_ has joined #ruby
BoomCow has quit [Quit: This computer has gone to sleep]
grzywacz has joined #ruby
grzywacz has joined #ruby
grzywacz has quit [Changing host]
punkrawkR^Home has joined #ruby
Takehiro has joined #ruby
nari has joined #ruby
rjmt___ has quit [Ping timeout: 252 seconds]
Takehiro has quit [Remote host closed the connection]
amaya_ has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
ebouchut_ has quit [Quit: This computer has gone to sleep]
<amaya_> :)
ebouchut_ has joined #ruby
<amaya_> Object.send(:remove_const, :Scene_Menu)
staafl has joined #ruby
<amaya_> Fist time see this method.
undersc0re97 has quit [Quit: Leaving]
<heftig> Snake_Camel_Case? eww
samphippen has joined #ruby
<amaya_> no , LoL
eddie_ has quit [Quit: Ex-Chat]
<amaya_> I am learning rpgmaker.
Slivka has quit [Read error: Connection reset by peer]
<amaya_> which has a ruby script system.
Slivka has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
eldariof has joined #ruby
<amaya_> This guy writed a new Scene_Menu class below the old one.
<amaya_> but the error occur.
ebouchut_ has quit [Quit: This computer has gone to sleep]
<amaya_> It said,'TypeError occurred. superclass mismatch for class Scene_Menu'
piotr_ has joined #ruby
undersc0re97 has joined #ruby
whitedawg has quit [Quit: Leaving.]
hamed_r has joined #ruby
<Hanmac> amaya_ i may help you i worked with all three ruby rpg makers , show me your code
<amaya_> Hanmac, nice to see you again!
<amaya_> It is a Ring Menu (Pseudo) 3D script.
<amaya_> The language is Portuguese.
<Hanmac> amaya_ do you use the right maker? (the script is made for vxace)
<amaya_> Yes , I am using Ace .
_nitti has joined #ruby
<Hanmac> hm what happends if you comment this line out? Object.send(:remove_const, :Scene_Menu)
Banistergalaxy has joined #ruby
<amaya_> 'TypeError occurred. superclass mismatch for class Scene_Menu'
Weazy has quit [Ping timeout: 248 seconds]
<Hanmac> the problem are maybe addional other scripts change: "Scene_Menu < Scene_Base" to "Scene_Menu < Scene_MenuBase"
<amaya_> well I will try it out.
_nitti has quit [Ping timeout: 246 seconds]
<amaya_> It works good. Thank You !
Weazy has joined #ruby
<amaya_> Object.send(:remove_const, :Scene_Menu) # I don't feel good about this line, does he must write code in this way?
ttt_ has joined #ruby
hamed_r has quit [Ping timeout: 260 seconds]
Virunga has quit [Remote host closed the connection]
<pen> anyone using mongoid?
<pen> in mongoid.yml, I noticed that <%= ENV['VARIABLE_NAME'] %> doesn't work as it returns something nil that result in the library spitting errors
<pen> anyone know why? and how to solve that?
Virunga has joined #ruby
kevinykchan has quit [Ping timeout: 264 seconds]
ttt_ has quit [Ping timeout: 245 seconds]
m_3 has joined #ruby
<Hanmac> amaya_ i dont think so the remove_const may not needed
icole has quit [Remote host closed the connection]
Guedes has quit [Ping timeout: 245 seconds]
ssspiff has quit [Remote host closed the connection]
lolcathost has quit [Quit: Lost terminal]
blacktulip has joined #ruby
vasile has joined #ruby
ikaros has joined #ruby
<amaya_> I see.
kevinykchan has joined #ruby
Axsuul has quit [Ping timeout: 264 seconds]
Guest86332 has quit [Quit: leaving]
sspiff has joined #ruby
blaxter has joined #ruby
berserkr has joined #ruby
amaya_ has quit [Read error: Connection reset by peer]
niklasb has joined #ruby
Takehiro has joined #ruby
ssspiff has joined #ruby
ssspiff has quit [Changing host]
ssspiff has joined #ruby
jackbrownhf has joined #ruby
sspiff has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
replore has joined #ruby
elaptics`away is now known as elaptics
lampe2 has joined #ruby
elkclone has quit [Quit: It's never too late to unplug and run.]
lkba has quit [Ping timeout: 248 seconds]
lolcathost has joined #ruby
Kruptein has joined #ruby
Guedes has joined #ruby
sspiff has joined #ruby
nobuoka has quit [Ping timeout: 260 seconds]
ssspiff has quit [Ping timeout: 248 seconds]
<Kruptein> Hey I'm new to the language but so far so good but I don't know how to word my current problem for google so I'm asking you guys :) so I have an array [[1,1], [0], [1], [0,1], [0]] and I want it to become a simple array [1,1,0,1,0,1,0] how would I achieve this the best?
a_a_g has quit [Quit: Leaving.]
hamed_r has joined #ruby
tintin has joined #ruby
<tintin> Anybody there? CAn i ask?
<tintin> When will we get ruby-2.0 ?
<Kruptein> tintin just ask away :)
lenovodroid has joined #ruby
eka has joined #ruby
stayarrr has joined #ruby
a_a_g has joined #ruby
<tintin> When will we get ruby-2.0 ?
<lupine> could be decades
* lupine waits patiently for 1.10
brandon_ has joined #ruby
brandon_ has quit [Client Quit]
<tintin> lupine: 1.10 ?
<heftig> Kruptein: flatten
<Kruptein> k thanks
bier has quit [Read error: Operation timed out]
lenovodroid has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
bier_ has quit [Ping timeout: 260 seconds]
amaya_ has joined #ruby
roadt_ has quit [Ping timeout: 246 seconds]
brandon_ has joined #ruby
brandon_ has quit [Client Quit]
nemesit has joined #ruby
mark6 has joined #ruby
amaya_ has left #ruby [#ruby]
roadt_ has joined #ruby
skattyadz has joined #ruby
amaya_ has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
brandon_ has joined #ruby
tintin has quit [Quit: leaving]
amaya_ has quit [Client Quit]
amaya_the has joined #ruby
Grieg has quit [Quit: laterz! :D]
LouisGB has joined #ruby
_nitti has joined #ruby
<shevy> hey guys
<shevy> wake me up, entertain me please
generali_ has joined #ruby
mark6 has quit [Quit: mark6]
bier has joined #ruby
<Xeago> any cheep domain registrars?
akemrir has quit [Ping timeout: 264 seconds]
generalissimo has quit [Ping timeout: 246 seconds]
bier_ has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
cascalheira has joined #ruby
_nitti has quit [Ping timeout: 260 seconds]
leonardorb has joined #ruby
browndawg has left #ruby [#ruby]
nemesit has quit [Ping timeout: 255 seconds]
<Kruptein> llllllllllllllllllllllll l l l ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<Kruptein> woops :/
<Kruptein> that's what you get when you try to move a laptop with a bunch of things on your keyboard to (another room)
nemesit has joined #ruby
leonardorb has quit [Remote host closed the connection]
ttt_ has joined #ruby
libryder has joined #ruby
ssspiff has joined #ruby
sspiff has quit [Ping timeout: 256 seconds]
<shevy> Kruptein lol
<shevy> Kruptein looks like cat sleeping on keyboard
berserkr has quit [Quit: Leaving.]
<shevy> Xeago are you still trying to perfect your written english style?
cooler has joined #ruby
replore has quit [Remote host closed the connection]
ttt_ has quit [Ping timeout: 245 seconds]
nemesit|osx has joined #ruby
sirecote has quit [Ping timeout: 245 seconds]
<Xeago> shevy: occasionally, why?
<shevy> Xeago curiosity
nemesit has quit [Ping timeout: 264 seconds]
Tombar has joined #ruby
akemrir has joined #ruby
sirecote has joined #ruby
grzywacz has quit [Quit: :wq]
replore_ has joined #ruby
nemesit|osx has quit [Quit: Linkinus - http://linkinus.com]
nemesit has joined #ruby
hamed_r has quit [Quit: Leaving]
<Kruptein> =D
cascalheira has quit [Quit: Leaving...]
dangerousdave has joined #ruby
c0rn has quit []
robustus has joined #ruby
danneu has quit [Ping timeout: 264 seconds]
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
dzhulk has joined #ruby
jackbrownhf has quit [Quit: Sto andando via]
Neomex has joined #ruby
Neomex has quit [Client Quit]
Tombar has quit [Remote host closed the connection]
cousine has joined #ruby
Tombar has joined #ruby
a_a_g has quit [Quit: Leaving.]
chaosis has joined #ruby
chendo_ has quit [Ping timeout: 265 seconds]
maetthew has joined #ruby
chendo_ has joined #ruby
Morkel has joined #ruby
pac1 has joined #ruby
frogstarr78 has quit [Read error: Operation timed out]
xsbeats has joined #ruby
joeycarmello has quit [Ping timeout: 252 seconds]
Virunga has quit [Remote host closed the connection]
frogstarr78 has joined #ruby
Virunga has joined #ruby
Virunga has quit [Remote host closed the connection]
Lemtzas is now known as CRubyJDoc
nobuoka has joined #ruby
kirun has joined #ruby
statarb3 has quit [Quit: Leaving]
jds_ has joined #ruby
slainer68 has joined #ruby
hamed_r has joined #ruby
_nitti has joined #ruby
danneu has joined #ruby
skattyadz_ has joined #ruby
slainer68 has quit [Ping timeout: 246 seconds]
mfridh has joined #ruby
cascalheira has joined #ruby
lenovodroid has joined #ruby
_nitti has quit [Ping timeout: 246 seconds]
yshh has quit [Remote host closed the connection]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
skattyadz has quit [Ping timeout: 265 seconds]
skattyadz_ is now known as skattyadz
danneu has quit [Ping timeout: 265 seconds]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
hsbt is now known as hsbt_away
SPYGAME has quit []
ttt_ has joined #ruby
machty has joined #ruby
arya has joined #ruby
lesnik_ has quit [Quit: Lost terminal]
cousine has quit [Remote host closed the connection]
Morkel has quit [Quit: Morkel]
ttt_ has quit [Ping timeout: 245 seconds]
SPYGAME has joined #ruby
whitedawg has joined #ruby
replore_ has quit [Remote host closed the connection]
ltsstar has joined #ruby
leonardorb has joined #ruby
BigO has joined #ruby
lkba has joined #ruby
BigO has quit [Remote host closed the connection]
carlyle has joined #ruby
jackbrownhf has joined #ruby
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
timonv has quit [Remote host closed the connection]
lenovodroid has quit [Read error: Connection reset by peer]
leonardorb has quit [Ping timeout: 255 seconds]
whitedawg1 has joined #ruby
banseljaj is now known as imami|afk
freeayu has joined #ruby
whitedawg has quit [Ping timeout: 264 seconds]
MarcWeber has joined #ruby
bpfh has joined #ruby
s1n4 has quit [Quit: leaving]
chaosis has quit [Ping timeout: 246 seconds]
carlyle has quit [Remote host closed the connection]
joast has joined #ruby
jds_ has quit [Remote host closed the connection]
<MarcWeber> Are there existing solutions monitoring google rank of keywords?
whitedawg1 has quit [Ping timeout: 260 seconds]
ToTo has quit [Quit: Leaving...]
slainer68 has joined #ruby
xAndy is now known as xandy
Playground has joined #ruby
lolcathost has quit [Read error: Connection reset by peer]
jds_ has joined #ruby
baphled has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
jackbrownhf has quit [Quit: Sto andando via]
skattyadz has quit [Quit: skattyadz]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
replore_ has joined #ruby
maz-dev__ has quit [Read error: Connection reset by peer]
Zta has joined #ruby
h8R has quit [Ping timeout: 250 seconds]
<Zta> =)
samphippen has quit [Quit: Computer has gone to sleep.]
arturaz_ has quit [Remote host closed the connection]
xsbeats has quit [Quit: leaving]
xsbeats has joined #ruby
whitedawg has joined #ruby
jds_ has quit [Remote host closed the connection]
dzhulk has quit [Quit: Leaving.]
advorak has quit [Quit: Leaving]
xsbeats has quit [Client Quit]
<Zta> Sorry for being such a noob, but I'm in need of some very basic help. I'd like to try this https://github.com/leander256/ruby-libappindicator/ so I did "gems install ruby-libappindicator" and Gems started downloading andbuilding glib, pango, and various other packages. It also fetches ruby-libappindicator-0.1.4.gem but fails building (or installing) it: http://pastebin.ubuntu.com/1401997/ Am I doing something wrong?
xsbeats has joined #ruby
dzhulk has joined #ruby
lenovodroid has joined #ruby
hamed_r has quit [Quit: Leaving]
arya has quit [Ping timeout: 260 seconds]
chaosis has joined #ruby
arya has joined #ruby
Gm4n has quit [Ping timeout: 264 seconds]
h8R has joined #ruby
Russell^^ has joined #ruby
LouisGB has quit [Ping timeout: 248 seconds]
Gm4n has joined #ruby
Rydefalk has quit [Read error: Operation timed out]
Rydefalk has joined #ruby
Playground has quit [Quit: Lost terminal]
lolcathost has joined #ruby
acoyfellow has joined #ruby
axl_ has joined #ruby
FredLe has quit [Quit: Leaving.]
axl_ has quit [Client Quit]
ttt_ has joined #ruby
mfridh has quit [Ping timeout: 255 seconds]
jackbrownhf has joined #ruby
yshh has joined #ruby
ttt_ has quit [Ping timeout: 245 seconds]
bluOxigen has joined #ruby
browndawg has joined #ruby
mfridh has joined #ruby
sepp2k has joined #ruby
yshh has quit [Ping timeout: 246 seconds]
lenovodroid has quit [Ping timeout: 260 seconds]
verce has joined #ruby
robustus has quit [Ping timeout: 255 seconds]
yshh has joined #ruby
verce has quit []
nari has quit [Ping timeout: 264 seconds]
robustus has joined #ruby
banisterfiend has joined #ruby
slainer68 has quit [Remote host closed the connection]
LouisGB has joined #ruby
<shevy> Zta Fetching: ruby-libappindicator-0.1.4.gem (100%)
<shevy> Zta apparently it must compile something in that gem
<shevy> "ERROR: Failed to build gem native extension."
<shevy> there is not much information what exactly went wrong
<shevy> Zta what I would do in your case is: change directory to where that .gem file is
<shevy> then extract it via: 'gem unpack ruby-libappindicator-0.1.4.gem'
<shevy> then enter that directory and run extconf.rb via "ruby extconf.rb"
<shevy> that way you will get the precise error
<Elico> have anyone used EPOLL in ruby somehow?
eldariof has quit [Read error: Connection reset by peer]
Eldariof-ru has joined #ruby
Rym has joined #ruby
Goles has joined #ruby
vlad_starkov has joined #ruby
Tombar has quit [Remote host closed the connection]
Goles_ has joined #ruby
Goles has quit [Read error: Connection reset by peer]
bluOxigen has quit [Ping timeout: 255 seconds]
Neomex has joined #ruby
xelat33 has joined #ruby
Neomex has quit [Client Quit]
xelat33 has left #ruby [#ruby]
gyre007 has joined #ruby
akemrir has quit [Ping timeout: 260 seconds]
jrunning has joined #ruby
techhelp has joined #ruby
tenmilestereo has joined #ruby
kyktommy has joined #ruby
browndawg has left #ruby [#ruby]
jackbrownhf has quit [Quit: Sto andando via]
browndawg has joined #ruby
Morkel has joined #ruby
gyre007 has quit [Ping timeout: 256 seconds]
Morkel has quit [Client Quit]
Goles has joined #ruby
timonv has joined #ruby
Morkel has joined #ruby
Morkel has quit [Client Quit]
kyktommy has quit [Quit: kyktommy]
generali_ has quit [Remote host closed the connection]
bairui has joined #ruby
Morkel has joined #ruby
Goles_ has quit [Ping timeout: 260 seconds]
acoyfellow has quit [Ping timeout: 264 seconds]
whitedawg has quit [Quit: Leaving.]
<bairui> meh... brain tired. Is there a simple way to achieve: text[vector[0]][vector[1]] ? text is an array of strings and vector is an array of [line, column] offsets in text.
Goles has quit [Ping timeout: 264 seconds]
<apeiros_> bairui: I don't think there's a simpler way
Goles has joined #ruby
<bairui> bah. thanks, apeiros_ :) I was hoping that text[vector] or text.vector or something like that might exist.
tk__ has joined #ruby
<apeiros_> why would it?
<apeiros_> text is an Array, it isn't aware of your content
<bairui> of course it wouldn't - i was more hoping for the 'something like' end of the stick
Slivka has joined #ruby
<apeiros_> you can build a class Text or something, which is aware of the content, and can provide appropriate methods…
<bairui> some languages allow something similar to what i'm after; just thought ruby might have something like that. a quick browse through the String docs proved unfruitful, so my last hope was to ask here.
<bairui> yeah, i'll build a class. thanks again, apeiros_
<charliesome> ruby-2.0.0-preview2 is out, get it while it's hot: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/50443
apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p327: http://ruby-lang.org (ruby-2.0.0-preview2) || Paste >3 lines of text on http://gist.github.com
byennen has quit [Remote host closed the connection]
lenovodroid has joined #ruby
byennen has joined #ruby
<dross> yay, Ruby2 :)
<dross> apeiros_: that only took what, 4 years?
<apeiros_> no idea
* dross looks how long Perl 6 took, oh wait
<dross> :)
_nitti has joined #ruby
<shevy> perl 6 will never happen
niklasb has quit [Ping timeout: 256 seconds]
shorne has quit [Ping timeout: 256 seconds]
<shevy> http://en.wikipedia.org/wiki/Perl_6: appeared in the year 2000
Tombar has joined #ruby
<shevy> soon we have year 2013
<shevy> Official download: http://rakudo.org/how-to-get-rakudo/
nkts has quit []
<shevy> "Building Rakudo from the sources requires Perl 5.8 " you need perl 5 to compile perl 6 :\
awarner has joined #ruby
seydar has joined #ruby
_nitti has quit [Ping timeout: 246 seconds]
<seydar> issue with using curses: 1.9.3p194 :011 > print 134089320948235; p [Curses.stdscr.curx, Curses.stdscr.cury]
<seydar> 134089320948235[0, 0] => [0, 0]
<seydar> that shouldn't be [0, 0]. shouldn't it be [15, whatever]?
hsbt_away is now known as hsbt
Goles_ has joined #ruby
<apeiros_> seydar: please don't cross-post. or at the very least, announce that you cross-post.
samphippen has joined #ruby
awarner has quit [Remote host closed the connection]
rippa has joined #ruby
lesnik_ has joined #ruby
<lesnik_> Hi!
jrunning_ has joined #ruby
Goles__ has joined #ruby
<lesnik_> I got an array [[66, {"rankings"=>[2, 4, 4, 4, 3, 3, 3], "m"=>3, "s"=>22, "highest_number_of_marks"=>4}], [100, {"rankings"=>[9, 9, 9, 3, 3, 3, 3], "m"=>3, "s"=>24, "highest_number_of_marks"=>4}]]
Goles has quit [Ping timeout: 246 seconds]
<seydar> apeiros_: sorry, you're right, i shouldn't have crossposted
<lesnik_> i need to sort it by the value of s
nemesit|osx has joined #ruby
Nisstyre has quit [Quit: Leaving]
<Hanmac> array.sort_by {|o| o["s"]}
<seydar> lesnik_: array.sort_by {|v| v.is_a?(Hash) ? v["s"] : v }
<apeiros_> should I give the correct answer? :)
<seydar> oh wait
<seydar> apeiros_: no not yet
replore_ has quit [Remote host closed the connection]
<apeiros_> ary.sort_by { |thingy| thingy[1]["s"] }
<seydar> array.sort_by {|v| v[1]['s'] }
ttt_ has joined #ruby
<seydar> that's not fair, you turned this from a programming question to a critical reading question
soko has joined #ruby
Rym has quit [Quit: Rym]
soko has quit [Client Quit]
nemesit has quit [Ping timeout: 260 seconds]
<Hanmac> shevy what do you think about "ruby on ouya" ? :D
replore has joined #ruby
Goles has joined #ruby
<lesnik_> thank you
Goles_ has quit [Ping timeout: 260 seconds]
<apeiros_> I just found it funny that there were three different replies
<shevy> Hanmac ouya?
s1n4 has joined #ruby
Goles_ has joined #ruby
chimkan has joined #ruby
arya_ has joined #ruby
Goles__ has quit [Ping timeout: 246 seconds]
Goles__ has joined #ruby
ttt_ has quit [Ping timeout: 245 seconds]
Goles_ has quit [Read error: Connection reset by peer]
jaygen has joined #ruby
Goles_ has joined #ruby
Goles has quit [Ping timeout: 260 seconds]
jlwestsr has joined #ruby
slainer68 has joined #ruby
arya has quit [Ping timeout: 260 seconds]
Goles has joined #ruby
otters has joined #ruby
matrixise has joined #ruby
Goles__ has quit [Ping timeout: 246 seconds]
Electrical has joined #ruby
jaygen has quit [Quit: Leaving...]
Goles_ has quit [Ping timeout: 260 seconds]
Goles has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
Goles has joined #ruby
iamjarvo_ has joined #ruby
<Elico> I was wondering if someone coded WITH epoll on ruby?
<Electrical> hi all. is it possible to group an array based on a value from a sub key? if so, how ? :-)
iamjarvo_ has quit [Client Quit]
<shevy> Electrical you should be able to do any sort of grouping on an array, if you make a proper match
<seydar> Electrical: Array#sort_by
<seydar> also, Array#sort can take a block
acoyfellow has joined #ruby
<seydar> example 1: ["hello", "world"].sort {|a, b| a[0] <=> b[0] } # compares first character's ascii value. use <=> because you need to return either -1, 0, or 1
<seydar> example 2: ["hello", "world"].sort_by {|a| a[0] }
byennen has quit [Remote host closed the connection]
joofsh has joined #ruby
<Electrical> ahh okay. will give that a shot
<Electrical> thnx :-)
<shevy> I am stymied
freeayu_ has joined #ruby
<shevy> no that was the wrong word...
<shevy> I am very much confused ...
<shevy> syck.rb:135:in `read': Is a directory - phonon (Errno::EISDIR)
<shevy> the code I am looking at, goes like this:
fyolnish has quit [Remote host closed the connection]
<shevy> foo = YAML.load_file(some_variable_here) if File.exist? some_variable_here
freeayu has quit [Read error: Connection reset by peer]
fyolnish has joined #ruby
otters has quit [Ping timeout: 264 seconds]
<shevy> ohhhh
techhelp has quit [Quit: This computer has gone to sleep]
tbrock has joined #ruby
<Electrical> seydar: its not working. think my hash is a bit stranger.. let me try to put my hash in a gist.
<shevy> now I see
<seydar> yup. you see it too. file.exist? should be followed by file.directory?
arya_ is now known as arya
<apeiros_> um, no?
Goles has quit [Read error: Connection reset by peer]
tenmilestereo has quit [Ping timeout: 246 seconds]
<seydar> apeiros_: can you explain why not?
<apeiros_> obviously you do NOT want a directory in YAML.load_file
<seydar> herp derp.
<seydar> !file.directory?
fyolnish has quit [Read error: Connection reset by peer]
<apeiros_> that makes more sense
fyolnish has joined #ruby
<apeiros_> and then comes the next error (file not readable)
<apeiros_> and then the next (it existed during testing, but went away in between)
<apeiros_> and then the next…
nemesit|osx has quit [Quit: Linkinus - http://linkinus.com]
<apeiros_> and then you realize you should just do it and rescue the exception in the exceptional case…
jslowe has joined #ruby
<apeiros_> (do it = try to read the yaml)
nemesit has joined #ruby
<Electrical> seydar: https://gist.github.com/4182915 hope this makes some sense.
<shevy> so much error checking :(
Xeago has quit [Remote host closed the connection]
<apeiros_> shevy: as said, just rescue and raise a more indicative error
<apeiros_> don't bother checking
F1skr has joined #ruby
Goles has joined #ruby
v0n has joined #ruby
<shevy> I need perfect code without error checking!!!
amaya_the has quit [Quit: ChatZilla 0.9.88.2 [Firefox 17.0.1/20121128204232]]
<seydar> Electrical: assuming you have an array of those hashes, apply what i showed you
<seydar> [{:key => 'value'}].sort_by {|h| h[:key] }
busybox43 has quit [Ping timeout: 245 seconds]
igro has joined #ruby
<Electrical> Getting the error: comparison of Symbol with Array failed.
vlad_starkov has joined #ruby
<seydar> what's your sorting code look like
jrunning_ has quit [Ping timeout: 260 seconds]
<Electrical> sorted_2 = sorted_settings.sort_by { |a,b| b[:validate] }
Slivka has quit [Read error: Connection reset by peer]
busybox42 has joined #ruby
Slivka has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
<Electrical> my loop: sorted_settings.each do |setting_name, config| (this works as long as i don't do the sort_by )
<seydar> show me your sort_By
<shevy> so strange, .tar.xz is so much more effective than .tar.bz2
<seydar> sort_by*
cakehero has joined #ruby
<shevy> I mean *efficient
<seydar> shevy: how do file sizes compare?
<Electrical> seydar: sorted_2 = sorted_settings.sort_by { |a,b| b[:validate] }
foucist has joined #ruby
gener1c has joined #ruby
<shevy> seydar I'd say around 10-20% reduction
<shevy> larger than .tar.gz versus .tar.bz2 really
<gener1c> anybody knows how to force nokogiri to close link tags?
<shevy> I am going to convert all my .tar.bz2 files into .tar.xz, via a ruby script that does this job, eventually
<seydar> Electrical: sort_by only takes one argument. is sorted_2 simply an array of your hashes?
samphippen has quit [Quit: Computer has gone to sleep.]
<Electrical> sorted_2 should be the result of the sort_by.. sorted_settings is the full hash.. ( the gist i put up i did : puts sorted_settings )
tbrock has quit [Quit: Computer has gone to sleep.]
<seydar> try changing your sort_by to only take one argument
<Electrical> if i convert it to 1 argument: can't convert Symbol to Integer
timonv has quit [Ping timeout: 264 seconds]
<seydar> start investigating
<seydar> print things out
<seydar> see if they're what they should be
whitedawg has joined #ruby
<Electrical> sorted_2 = sorted_settings.sort_by { |a| a[:config][:validate] } is that valid what im doing?
AxonetBE has joined #ruby
Goles has quit [Read error: Connection reset by peer]
otters has joined #ruby
Goles has joined #ruby
g-ram has quit [Quit: Computer has gone to sleep.]
<seydar> Electrical: i don't have access to your code, so you tell me. what do you think a is? what is it actually?
<Electrical> a should be sorted_settings right? sorted_settings is the hash i put in that gist
<seydar> print out and and find out
bier_ has quit [Ping timeout: 248 seconds]
<seydar> sorted_settings.sort_by {|a| p a; a[:config][:validate] }
igro has left #ruby ["Textual IRC Client: www.textualapp.com"]
gbchaosmaster has quit [Ping timeout: 250 seconds]
<foucist> Electrical: try Hash[hash.sort_by{|a,_| a[:.. .. } ]
<foucist> get a sorted hash back from that if you wanted a hash
<foucist> drop the Hash[] part if you just want the array
<foucist> the _ just means a variable you're not using
<foucist> i found that sort_by requires that..
greasegum has joined #ruby
timonv has joined #ruby
<seydar> foucist: good point. you're much more helpful than i
<seydar> the issue is, as you've pointed it, he's trying to sort a sorted hash (which ends up an array)
<seydar> sorted_2 is an array when he/i thought it was a hash
kevinykchan has quit [Ping timeout: 244 seconds]
Goles_ has joined #ruby
<foucist> ah, i came after the pastie so i wasn't sure
<seydar> the pastie just showed what sorted_settings was
vlad_starkov has quit [Remote host closed the connection]
<seydar> but he's getting an error on sorted_2, which i forgot
<Electrical> https://gist.github.com/4182915 <-- is the full hash ( sorted_settings )
<Electrical> https://gist.github.com/4182982 <--- output when i do: sorted_2 = sorted_settings.sort_by { |a| p a}
Goles has quit [Read error: Connection reset by peer]
tvw has joined #ruby
kevinykchan has joined #ruby
<seydar> yeah, foucist is right. add Hash[...] around sorted_settings.sort_by {...}
<foucist> Electrical: did you try Hash[sorted_settings.sort_by{|a| a[:config][:validate] }] or with |a,_| or with |_,a| (it's basically |k,v| key, and value.. depends if you want to sort by the key or hte value
<foucist> but actually the gist doesn't look like a hash?
<foucist> it starts as [ ]
tbrock has joined #ruby
<burgestrand> Electrical: sort_by is a method on Enumerable, which relies on #each. Hash#each yields both the key and the value, which is what you get as arguments to your block; in effect: hash.sort_by { |key, value| … logic … } # => Array of [[key, value], [key, value]…]
hotovson has joined #ruby
<foucist> and i don't see the :config
<Electrical> Hash[sorted_settings.sort_by { |a| a[:validate] }] so like this?
<seydar> Electrical: yes
<Electrical> Gives me an error : Can't convert Symbol into Integer
<burgestrand> Electrical: no
<bigmac> im trying to dinf a way to limit threads based on how much ram is in use
<burgestrand> Electrical: a will be an array, [key, value].
<burgestrand> Electrical: which becomes [key, value][:validate], which is not a valid way to reference an item in an array.
<burgestrand> Electrical: do you want to sort it by key, or value?
havenn has joined #ruby
<Electrical> burgestrand: i want to sort it by the value from 'validate' key
<burgestrand> Electrical: I take it the validate key is part of the key? e.g. { key: hash_containing_validate, key2: hash_containing_validate }?
<burgestrand> part of the value, sorry.
dnyy has quit [Remote host closed the connection]
<burgestrand> Electrical: ignore me and just try hash.sort_by { |key, value| value[:validate] }
nemesit has quit [Quit: Leaving...]
chimkan has quit [Quit: chimkan]
Goles has joined #ruby
Morkel has quit [Quit: Morkel]
hackerdude has joined #ruby
_nitti has joined #ruby
<Electrical> okay, got sorted_2 = Hash[sorted_settings.sort_by { |a,b| b[:validate] }]
<seydar> herp derp. i'm just useless today. burgestrand is 100% correct.
<Electrical> getting the error: comparison of Array with :hash failed
axl_ has joined #ruby
<burgestrand> Electrical: well, one of your validate contains :hash, one of them contains an array; how would you expect that to be compared?
Goles__ has joined #ruby
<apeiros_> random chance!
x82_nicole has joined #ruby
<Electrical> ahh okay i understand.
<burgestrand> sort_by { |key, value| rand(0, 2) == 0 }
<burgestrand> hm…
<burgestrand> rand(0..2) perhaps.
<apeiros_> so a chance of 1/3
g-ram has joined #ruby
Goles_ has quit [Ping timeout: 246 seconds]
<Electrical> comparison of TrueClass with false failed
<shevy> what are you doing
<apeiros_> Electrical: do you understand what that error tells you?
atno has quit [Remote host closed the connection]
<shevy> b[:validate] <-- get what this returns
<shevy> perhaps work on a tiny hash first
atno has joined #ruby
Goles has quit [Ping timeout: 260 seconds]
<foucist> the issue is he's getting either symbols for class names like arrays, strings, etc.. or he's getting the actual thing
<foucist> and wants to sort by those
_nitti has quit [Ping timeout: 246 seconds]
<foucist> sort by the name of those
<foucist> i guess
<Electrical> yeah indeed
<apeiros_> the issue is that he doesn't understand the error and for that reason can't resolve it himself…
<foucist> so b[:validate].class.to_sym unless b[:validate].class == Symbol
<Electrical> apeiros_: indeed :-( im more of a php guy.. not ruby :-(
robotmay has joined #ruby
acoyfellow has quit [Ping timeout: 246 seconds]
<shevy> Electrical give an example hash ok? a small hash, maximum with 3 elements
jrunning_ has joined #ruby
<foucist> how do you convert Hash to :hash ?
<apeiros_> 17:06 Electrical: comparison of TrueClass with false failed
aetcore has joined #ruby
<foucist> Hash.class.to_sym no worky
<shevy> the thing you pasted here https://gist.github.com/4182982 is waaaay too huge :D
<apeiros_> Electrical: this tells you that you try to do `TrueClass <=> false`
danneu has joined #ruby
tbrock has quit [Quit: Computer has gone to sleep.]
sj26 has quit [Ping timeout: 246 seconds]
<apeiros_> Electrical: and now you have to figure out where and why that happens (sort_by uses <=> to compare the values)
anekos has quit [Ping timeout: 256 seconds]
rcs has quit [Ping timeout: 246 seconds]
SPYGAME has quit [Quit: Leaving]
epochwolf has quit [Ping timeout: 246 seconds]
strtok_ has quit [Ping timeout: 246 seconds]
<Electrical> [:add_field, {:validate=>:hash, :default=>{}, :description=>"<p>Add a field to an event</p>"}] so the :hash in :validate=>:hash is a symbol if i understand correctly?
<Mon_Ouie> Actually the error message means you're trying to do true <=> false
faulkner has quit [Ping timeout: 276 seconds]
undyingrage has quit [Ping timeout: 250 seconds]
ahuman has quit [Read error: Connection reset by peer]
AxonetBE has quit [Quit: Leaving.]
ahuman has joined #ruby
<Mon_Ouie> ([true, false].sort generates the message; [TrueClass, false].sort generates one that mentions Class)
strtok has joined #ruby
Tarential has quit [Ping timeout: 246 seconds]
libryder has quit [Ping timeout: 246 seconds]
arusso has quit [Ping timeout: 246 seconds]
anekos has joined #ruby
faulkner has joined #ruby
Guest20802 has quit [Ping timeout: 250 seconds]
Tarential has joined #ruby
undyingrage has joined #ruby
array has joined #ruby
epochwolf has joined #ruby
<apeiros_> Mon_Ouie: indeed. I dislike the message tbh.
rcs has joined #ruby
array is now known as Guest79672
sj26 has joined #ruby
<apeiros_> should give an inspect of the two values or use .class on both values
jgarvey has quit [Ping timeout: 252 seconds]
<Electrical> annotation = "#{config[:validate]}" this is later in the script.. if i understand correctly it converts that hash to a string?
libryder has joined #ruby
danneu has quit [Ping timeout: 256 seconds]
replore has quit [Remote host closed the connection]
arusso has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
<shevy> Electrical yes, always in "#{}" strings
acoyfellow has joined #ruby
<foucist> sorted_2 = Hash[sorted_settings.sort_by { |a,b| b[:validate].class == Symbol ? b[:validate] : b[:validate].class.to_s.downcase.to_sym }]
<foucist> Electrical: ^
ttt_ has joined #ruby
<apeiros_> "#{expression}" is a stupid way to say expression.to_s
s1n4 has quit [Ping timeout: 264 seconds]
s1n4 has joined #ruby
<Electrical> foucist: will try that one
<apeiros_> "#{expression}someotherstuff" is a great way to compose strings (through a process called string interpolation)
<apeiros_> .class == Foo --> .is_a?(Foo)
<foucist> ah, good tip
<Electrical> foucist: no error but doesn't sort it :-(
jrunning_ has quit [Ping timeout: 260 seconds]
statarb3 has quit [Ping timeout: 260 seconds]
jackbrownhf has joined #ruby
ttt_ has quit [Ping timeout: 276 seconds]
greasegum has quit [Remote host closed the connection]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
Goles has joined #ruby
x82_nicole has quit [Quit: Textual IRC Client: www.textualapp.com]
g-ram has quit [Quit: Computer has gone to sleep.]
Goles has quit [Read error: Connection reset by peer]
Goles has joined #ruby
Goles__ has quit [Ping timeout: 246 seconds]
Goles has quit [Read error: Connection reset by peer]
Goles has joined #ruby
ebouchut_ has joined #ruby
fir_ed has joined #ruby
Goles_ has joined #ruby
Virunga has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
samphippen has joined #ruby
Goles__ has joined #ruby
<Electrical> perhaps i'll just have to do without that sorting .. if its impossible.
* apeiros_ roles eyes
<apeiros_> it's not impossible
g-ram has joined #ruby
g-ram has quit [Client Quit]
Goles has quit [Ping timeout: 260 seconds]
<Electrical> just difficult :p
otters has quit [Quit: WeeChat 0.3.9.1]
<apeiros_> I don't think it's difficult either
ismell has left #ruby [#ruby]
BrianJ has quit [Quit: Computer has gone to sleep.]
otters has joined #ruby
Goles_ has quit [Ping timeout: 265 seconds]
roadt_ has quit [Ping timeout: 246 seconds]
<Electrical> hmm okay.. im pretty lost tbh.. but think that's because im a php programmer.. and not ruby ..
<apeiros_> I read the scrollback
<apeiros_> you're sorting in order to group after the sorting, correct?
<apeiros_> Electrical: ^
timonv has quit [Remote host closed the connection]
<Electrical> i want to do the sorting and then do a loop ( loop => sorted_2.each do |setting_name, config| )
<Electrical> in that loop i want to have grouping of the same validation yeah
<apeiros_> hm
<apeiros_> ok
<apeiros_> and the data you want to sort is this: https://gist.github.com/4182982 - and you want to sort by the value of the :validate key?
<Electrical> https://gist.github.com/4182915 <-- is the original data
<Electrical> and indeed, sort on the value of the :validation key
<Electrical> *validate
<apeiros_> Electrical: so how should ["beginning", "end"] be sorted then?
<apeiros_> because that's one of the values you have for :validate
<apeiros_> (you have others, like ["plain", "json", "json_event"] and ["ASCII-8BIT", …tons of encodings…])
peregrine81 has joined #ruby
<Electrical> that's a good one.. in the if/else statments i got the options: string, array, number, hash, boolean, other these with multiple options fall under other.
dnyy has joined #ruby
thefonso has joined #ruby
<Electrical> https://gist.github.com/4183158 <--- code block as of now
chaosis has quit [Ping timeout: 260 seconds]
<apeiros_> Electrical: your sorted_2 should be sorted
cakehero has joined #ruby
seanstickle has joined #ruby
<apeiros_> you want to replace `b[:validate].class.to_s.downcase.to_sym` with `:other`, though. but seydar couldn't have known that since you didn't explain what you want properly.
<thefonso> /list
JohnBat26 has joined #ruby
GoGoGarrett has joined #ruby
<Electrical> apeiros_: so like this?: sorted_2 = sorted_settings.sort_by { |a,b| b[:validate].class == Symbol ? b[:validate] : :other }
thefonso has quit [Client Quit]
<apeiros_> yes
<Electrical> trying..
nkts has joined #ruby
<Electrical> cool it works :D
lenovodroid has quit [Ping timeout: 260 seconds]
<shevy> \o/
<shevy> now you can abandon php!
<Electrical> haha ;-) i wish :-)
<shevy> :(
chaosis has joined #ruby
<shevy> Electrical, apeiros_ did so too!
<shevy> he even wrote a 100k lines php app once
<apeiros_> shevy: does your number change or does my memory?
<Electrical> lol :p
<apeiros_> next year I'll have written a 1M lines php app…
<Electrical> largest i wrote was 20k lines
ewag has quit [Ping timeout: 260 seconds]
<Electrical> but doing a complete re-write of that app
<apeiros_> I hope you rewrite it in ruby
<apeiros_> you'll be disappointed about how few lines it takes, though.
aetcore has quit [Remote host closed the connection]
<Electrical> wish i was as good in ruby as im in php :-)
statarb3 has quit [Ping timeout: 252 seconds]
<shevy> apeiros_ ah plus / minus a few k lines of code perhaps :-)
<shevy> 20k is a lot Electrical
<Electrical> i know shevy :-) its something i've worked on for a year or so
thefonso has joined #ruby
<shevy> Electrical my largest one in ruby has about 7k lines now... though it may reach 10k in a few months, I am rewriting it right now... from older code... that just sucked
<shevy> that includes documentation in code though
<shevy> which makes around... 30 or 40 %
<Electrical> shevy: nope
thefonso has quit [Client Quit]
<Electrical> for me it was without doc
replore has joined #ruby
<shevy> whoa
<seanstickle> shevy: you ought to rewrite that in Haskell
<shevy> seanstickle I tried to learn haskell, it's too difficult
<seanstickle> shevy: you can probably get it down to 20 lines and a monad
<shevy> oh man, I hate monads
<seydar> no man monads are amazing
<seydar> once you see the light
joeycarmello has joined #ruby
<seanstickle> Just need to learn a little abstract algebra, and boom!, enlightenment
babykosh has joined #ruby
<shevy> I am gonna ask the #haskell folks whether I can master haskell without using monads
<seydar> shevy: i mean, i've heard WORSE ideas...
freeayu_ has quit [Read error: Connection reset by peer]
<seanstickle> In the same way you can master #ruby without knowing anything about method missing
SCommette has joined #ruby
<shevy> I do that
jlwestsr has quit [Ping timeout: 246 seconds]
ebouchut_ has quit [Quit: This computer has gone to sleep]
<shevy> every time I was using method_missing, I realized I didnt need to
cakehero has quit [Quit: Computer has gone to sleep.]
<seydar> +1 to that
<shevy> only class variables were worse
<shevy> but I suppose, the more features a language has the better
<apeiros_> method_missing is rather difficult to properly document…
<shevy> it's odd when method_missing is used to pass control from one class to another
joeycarmello has quit [Ping timeout: 256 seconds]
<shevy> I once had a time where I did things like this:
<shevy> _ = Bla.new
<shevy> _._._
<apeiros_> looks funny
<Spaceghostc2c> You can do some funny things with unicode.
cousine has joined #ruby
<apeiros_> let me guess…
<Spaceghostc2c> Like (╯°□°)╯︵ ┻━┻
<apeiros_> you read that "when split is not enough" article
<Spaceghostc2c> Could do anything!
<apeiros_> oh, just the ordinary then :-p
<Spaceghostc2c> Eh, I only do silly things.
<shevy> ok
<Spaceghostc2c> But I am working on a nifty somehting that uses #|
<shevy> I have not found anyone using unicode variable names in production code, in ruby, yet
<seydar> for starters, apeiros_ uses the proper ellipses
macabre has joined #ruby
mark_locklear has joined #ruby
<apeiros_> only because it's less to type :D
<Spaceghostc2c> :D
<apeiros_> (opt-. here)
cpruitt has joined #ruby
cpruitt has quit [Client Quit]
lampe21 has joined #ruby
jankly has quit [Quit: Leaving]
<Electrical> anywayz. Thank you very much guys for the help :-) this is gonna save me loads of time
lampe2 has quit [Ping timeout: 265 seconds]
Goles__ has quit [Remote host closed the connection]
hola123 has joined #ruby
jenrzzz has joined #ruby
_nitti has joined #ruby
nateberkopec has joined #ruby
lenovodroid has joined #ruby
jlwestsr has joined #ruby
tomsthumb has joined #ruby
replore has quit [Remote host closed the connection]
cj3kim has joined #ruby
seydar has quit [Quit: leaving]
niklasb has joined #ruby
<seanstickle> Everyone ready for the 2.0?
_nitti has quit [Ping timeout: 256 seconds]
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
medik has joined #ruby
SegFaultAX has quit [Ping timeout: 250 seconds]
medik is now known as Guest49389
<shevy> 2.0?
Electrical has left #ruby [#ruby]
<seanstickle> Ruby 2.0
<apeiros_> naa, I'll wait for 2.3
SegFaultAX has joined #ruby
sorbo_ has joined #ruby
jrunning_ has joined #ruby
headius has joined #ruby
xcvd`` has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
dnyy has quit [Read error: Connection reset by peer]
axl_ has quit [Quit: axl_]
dnyy has joined #ruby
centipedefarmer has joined #ruby
<seanstickle> 2.3 -- isn't that version planned to have direct compile-to-javascript support?
ttt_ has joined #ruby
tenmilestereo has joined #ruby
peregrine81 has quit [Quit: Computer sleeping.]
lenovodroid has quit [Read error: Connection reset by peer]
jslowe has quit [Ping timeout: 255 seconds]
lenovodroid has joined #ruby
digitalice has joined #ruby
digitalice has left #ruby [#ruby]
chimkan has joined #ruby
jrunning_ has quit [Ping timeout: 264 seconds]
sorbo_ has left #ruby [#ruby]
Virunga has quit [Remote host closed the connection]
ttt_ has quit [Ping timeout: 276 seconds]
Guest49389 is now known as medik
iamjarvo_ has joined #ruby
Kruptein has left #ruby [#ruby]
Elhu has joined #ruby
replore_ has joined #ruby
perun_ has quit [Ping timeout: 264 seconds]
Aiur has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
undyingrage has quit [Ping timeout: 260 seconds]
Virunga has joined #ruby
rcs has quit [Ping timeout: 252 seconds]
Aiur has quit [Client Quit]
undyingrage has joined #ruby
axl_ has joined #ruby
xandy is now known as xAndy
rcs has joined #ruby
awarner has joined #ruby
Neomex has joined #ruby
katherinem13 is now known as katherinem13_out
daniel_hinojosa has joined #ruby
chimkan has quit [Quit: chimkan]
machty has quit [Quit: machty]
ananthakumaran1 has quit [Quit: Leaving.]
peregrine81 has joined #ruby
JoeJulian has quit [Excess Flood]
Neomex has quit [Quit: Neomex]
koshii_ has quit [Ping timeout: 264 seconds]
perun_ has joined #ruby
koshii has joined #ruby
Bartzy has joined #ruby
<Bartzy> Hey, a bit OT question - Anyone has any recommendation for a good mechanical keyboard (for typing/programming, no gaming) ? :)
<seanstickle> das keyboard
krawchyk has joined #ruby
seydar has joined #ruby
JoeJulian has joined #ruby
<seydar> shevy: try getting the latest gem of chitin. fixed a few things to make it work better
<seydar> also, there's a new version of coolline that got pushed
<seydar> and Mon_Ouie made that a gem (thanks!)
axl_ has quit [Read error: Connection reset by peer]
axl__ has joined #ruby
mercwithamouth has joined #ruby
danneu has joined #ruby
tk__ has quit [Quit: ばいばい]
<Elico> I want to override the return Socket from "Socket.listen(5)" to specific socket class can it be done?
pkondzior_ has quit [Remote host closed the connection]
jaygen has joined #ruby
hackerdude has quit [Remote host closed the connection]
pkondzior_ has joined #ruby
havenn has quit [Remote host closed the connection]
mark_locklear has quit [Remote host closed the connection]
Nisstyre-laptop has joined #ruby
<shevy> seydar ok
atmosx has quit [Quit: WeeChat 0.4.0-dev]
TechZombie has joined #ruby
jaygen has quit [Ping timeout: 252 seconds]
atmosx has joined #ruby
jaygen has joined #ruby
jaygen has quit [Client Quit]
pu22l3r has joined #ruby
rellin has joined #ruby
arya has quit [Ping timeout: 252 seconds]
chimkan has joined #ruby
snorkdude has joined #ruby
arya has joined #ruby
silver-love has joined #ruby
silver-love has left #ruby [#ruby]
malkomalko has joined #ruby
replore_ has quit [Remote host closed the connection]
Russell^^ has quit [Quit: Russell^^]
Grieg has quit [Quit: laterz! :D]
jonahR has joined #ruby
sorbo_ has joined #ruby
mengu has quit [Read error: No route to host]
mengu_ has joined #ruby
S1kx has joined #ruby
S1kx has quit [Changing host]
S1kx has joined #ruby
gbchaosmaster has joined #ruby
jekotia has joined #ruby
_nitti has joined #ruby
<gener1c> is there a way to prevent nokogiri from using html5 when doing .to_html
<gener1c> ?
s1n4 has quit [Quit: leaving]
<shevy> dunno, hopefully, otherwise there would be one less reason to use it... let's look at the source
love_color_text has joined #ruby
cj3kim has joined #ruby
chimkan has quit [Quit: chimkan]
seydar has quit [Quit: leaving]
love_color_text has quit [Remote host closed the connection]
nemesit has joined #ruby
_nitti has quit [Ping timeout: 260 seconds]
sorbo_ has quit [Quit: sorbo_]
havenn has joined #ruby
k610 has joined #ruby
love_color_text has joined #ruby
Goles has joined #ruby
replore_ has joined #ruby
ttt_ has joined #ruby
Goles has quit [Ping timeout: 256 seconds]
dukedave has joined #ruby
cakehero has joined #ruby
generalissimo has joined #ruby
arya has quit [Ping timeout: 265 seconds]
statarb3 has joined #ruby
monkegjinni has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 250 seconds]
thomas3487 has joined #ruby
<thomas3487> hi
<thomas3487> `method_missing': undefined method `setValue' for #<Qt::SpinBox:0xb7620acc> (NoMethodError)
<thomas3487> sorry
<thomas3487> i try to set the minimum of a Qt::SpinBox, but i get this error: `method_missing': undefined method `setMinimum' for #<Qt::SpinBox:0xb7682a9c>
arya has joined #ruby
elaptics is now known as elaptics`away
<lesnik_> I have the last question about sorting hashes :)
perun_ has quit [Ping timeout: 264 seconds]
<lesnik_> I need to sort this hash first by the main key, then by highest_number_of_marks https://gist.github.com/4183702
<lesnik_> i tried many things, but can't do sort it
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
joeycarmello has joined #ruby
ttt_ has quit [Ping timeout: 276 seconds]
freakazoid0223 has quit [Quit: Leaving]
phelps has quit [Ping timeout: 244 seconds]
cousine has quit [Remote host closed the connection]
love_color_text has quit [Ping timeout: 248 seconds]
mercwithamouth has joined #ruby
<bigmac> any ideas on how i can limit threads based on how much ram is in use
<bigmac> i dont want to go over 75%
<bigmac> i can check system(top)
dagnachew has joined #ruby
<dagnachew> rvm reinstall 1.9.3 -p falcon
<dagnachew> Unrecognized command line flag: '-p' ( see: 'rvm usage' )
cakehero has quit [Ping timeout: 256 seconds]
Grieg has quit [Read error: Connection reset by peer]
Dreamer3 has joined #ruby
chimkan_ has joined #ruby
cakehero has joined #ruby
perun_ has joined #ruby
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
love_color_text has joined #ruby
pen has quit [Remote host closed the connection]
brianpWins has joined #ruby
dmiller has quit [Read error: Operation timed out]
cj3kim has quit [Quit: This computer has gone to sleep]
lesnik_ has quit [Quit: Lost terminal]
k610 has quit [Ping timeout: 260 seconds]
dagnachew has quit [Quit: Leaving]
Dreamer3 has quit [Ping timeout: 255 seconds]
dzhulk has quit [Quit: Leaving.]
cousine has joined #ruby
love_color_text has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
dmiller has joined #ruby
love_color_text has joined #ruby
Grieg has quit [Read error: Connection reset by peer]
chimkan___ has joined #ruby
hasse_ has joined #ruby
acoyfellow has quit [Ping timeout: 246 seconds]
<hasse_> How do I update a record using DataMapper without finding it first?
jackbrownhf has quit [Quit: Sto andando via]
robotmay has quit [Remote host closed the connection]
dzhulk has joined #ruby
Banistergalaxy has quit [Ping timeout: 246 seconds]
cakehero has quit [Ping timeout: 265 seconds]
tomsthumb has quit [Quit: Leaving.]
chimkan_ has quit [Ping timeout: 260 seconds]
cousine has quit [Remote host closed the connection]
bluOxigen has joined #ruby
Banistergalaxy has joined #ruby
v0n has quit [Ping timeout: 260 seconds]
haxrbyte has joined #ruby
joeycarmello has quit [Remote host closed the connection]
sorbo_ has joined #ruby
cakehero has joined #ruby
joeycarmello has joined #ruby
dnyy has quit [Remote host closed the connection]
<MarcWeber> hasse_: Use SQL. Datamapper let's you access the SQL layer.,
nonotza has joined #ruby
<hasse_> MarcWeber: So there is no built-in API for it, like Rails and Mongoid?
<MarcWeber> hasse_: I don't know exactly.
BoomCow has joined #ruby
byennen has joined #ruby
<MarcWeber> I havn't seen a way reading online docs, but I don't know datamapper that well yet.
baphled has quit [Ping timeout: 265 seconds]
GoGoGarrett has quit [Remote host closed the connection]
cj3kim has joined #ruby
thoolihan has joined #ruby
snorkdude has quit [Quit: snorkdude]
Bartzy has quit [Remote host closed the connection]
macmartine has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
jrunning_ has joined #ruby
keyvan has joined #ruby
babykosh has quit [Quit: babykosh]
Dreamer3 has joined #ruby
replore_ has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
love_color_text has quit [Ping timeout: 248 seconds]
_nitti has joined #ruby
jaygen has joined #ruby
slainer68 has quit [Remote host closed the connection]
headius has quit [Quit: headius]
aharris6 has joined #ruby
hotovson has quit [Remote host closed the connection]
jackdanger has joined #ruby
_nitti has quit [Ping timeout: 260 seconds]
Orcris has joined #ruby
jimeh has joined #ruby
acoyfellow has joined #ruby
dmiller has quit [Ping timeout: 255 seconds]
Electrical has joined #ruby
jaygen has quit [Quit: Leaving...]
<Electrical> Hi all, got an other ruby question :-)
<shevy> YES
<shevy> YOU MUST ASK THE QUESTION
<seanstickle> Bring it on
<Beoran__> please :)
<seanstickle> Feed us with supplication!
havenn has quit [Remote host closed the connection]
<Electrical> input is a string. output should be an array of that string with each entry not longer then x characters.. and if its in the middle of a word it should end that line at the beginning of that word :-)
hotovson has joined #ruby
<shevy> what
tbrock has joined #ruby
<shevy> you want to split at x characters
haxrbyte_ has joined #ruby
<seanstickle> shevy: he wants a word wrapping function
<seanstickle> Which I have conveniently provided
<Electrical> seanstickle: i think that's it yeah.
<Electrical> thank you very much :-)
<seanstickle> Sure thing
wallerdev has joined #ruby
TheFuzzball has quit [Ping timeout: 255 seconds]
thomas3487 has quit [Remote host closed the connection]
aharris6 has quit [Remote host closed the connection]
mneorr has joined #ruby
kidoz has joined #ruby
haxrbyte has quit [Ping timeout: 255 seconds]
hotovson has quit [Read error: No route to host]
<Electrical> hmm forgot about this issue with it.. every line needs to be prefixed with '# ' ( 3 spaces ) is it possible to prepend that to each entry of that array?
JPeterson has quit [Quit: HydraIRC -> http://www.hydrairc.com <- Now with extra fish!]
<Electrical> ah, found something about the map function
snorkdude has joined #ruby
<shevy> Electrical think of .map as "apply this to each element"
<Electrical> ahh clear :-)
<shevy> Electrical, %w( abc def ghi ).map{|char| char = '#'+char } # => ["#abc", "#def", "#ghi"]
<shevy> or '# '
nateberkopec has quit [Quit: Leaving...]
<Electrical> totaly clear :-) thank you :-)
dobbymoodge has quit [Read error: Connection reset by peer]
ttt_ has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
joeycarmello has quit [Remote host closed the connection]
browndawg has left #ruby [#ruby]
seanstickle has quit [Quit: seanstickle]
syamajala has joined #ruby
dobbymoodge has joined #ruby
tommyvyo_ has joined #ruby
<Electrical> thanks again guys :-)
adeponte has joined #ruby
ttt_ has quit [Ping timeout: 245 seconds]
snorkdude has quit [Quit: snorkdude]
snorkdude has joined #ruby
emsilva has joined #ruby
adeponte has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
adambeynon has joined #ruby
Electrical has left #ruby [#ruby]
acrocity has quit [Ping timeout: 245 seconds]
<emsilva> What would be the best way to iterate through a hash, adding new values to existing key pars? For example: cars[:vw] = { name: 'beetle' } then car[:vw] = { name: 'golf' } and I need the result to be :vw => { :name => ['beetle', 'golf'] } . Thanks.
generalissimo has quit [Remote host closed the connection]
swarley has joined #ruby
gokul has joined #ruby
machty has joined #ruby
jonahR has quit [Quit: jonahR]
<apeiros_> emsilva: you should in that case start out with the values being arrays
<apeiros_> normalize your datastructures. otherwise you'll be unhappy.
<apeiros_> if you do that, all you have to do is `<< newvalue`
jimeh has quit [Quit: Computer has gone to sleep.]
acrocity has joined #ruby
<shevy> emsilva I usually build a new hash, then reassign the old hash to that new hash
lushious has quit [Remote host closed the connection]
jrunning_ has quit [Ping timeout: 260 seconds]
lushious has joined #ruby
keyvan has quit [Remote host closed the connection]
nonotza has quit [Quit: nonotza]
zigomir has joined #ruby
<emsilva> shevy: but how would you iterate on that?
whitedawg has quit [Quit: Leaving.]
blaxter has quit [Quit: foo]
acoyfellow has quit [Ping timeout: 250 seconds]
<shevy> emsilva over a hash? hash.each_pair {|key,value|
<shevy> usually
lenovodroid has quit [Ping timeout: 264 seconds]
<shevy> you seem to have separate entries
key has left #ruby ["..."]
<shevy> it may be easier to collect them into an array first
<emsilva> shevy: apeiros: I think I'm having trouble putting in words what I need :/ Let me try a gist.
gokul has quit [Quit: Leaving]
chimkan___ has quit [Quit: chimkan___]
<emsilva> its hard to explain what you want, when you don't know how its called! :)
havenn has joined #ruby
seanstickle has joined #ruby
vikingly has joined #ruby
bier_ has joined #ruby
Elico has quit [Ping timeout: 264 seconds]
Retistic has joined #ruby
shevy has quit [Ping timeout: 252 seconds]
danktamagachi has joined #ruby
snorkdude has quit [Quit: snorkdude]
jackdanger has quit [Quit: Leaving.]
Cadwallion has quit [Ping timeout: 276 seconds]
jsilver has quit [Remote host closed the connection]
bier_ has quit [Quit: Ex-Chat]
jsilver has joined #ruby
jimeh has joined #ruby
tbrock has quit [Quit: Computer has gone to sleep.]
bier_ has joined #ruby
syamajala has quit [Remote host closed the connection]
aharris6 has joined #ruby
jsilver has quit [Ping timeout: 246 seconds]
BoomCow has quit [Quit: This computer has gone to sleep]
wallerdev has joined #ruby
shevy has joined #ruby
danktamagachi has quit [Ping timeout: 252 seconds]
brianpWins has quit [Ping timeout: 252 seconds]
s1n4 has joined #ruby
shiroginne has joined #ruby
danktamagachi has joined #ruby
shorne has joined #ruby
nemesit has quit [Quit: Leaving...]
macmartine has quit [Quit: Computer has gone to sleep.]
syamajala has joined #ruby
love_color_text has joined #ruby
imami|afk is now known as banseljaj
chimkan_ has joined #ruby
generalissimo has joined #ruby
axl__ has quit [Quit: axl__]
jrunning_ has joined #ruby
<shevy> hey guys
<shevy> word.rb:74:in `capitalize': invalid byte sequence in UTF-8 (ArgumentError)
mengu_ has quit [Ping timeout: 246 seconds]
<shevy> how to solve this?
brianpWins has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo_ is now known as tommyvyo
burgestrand1 has joined #ruby
tbrock has joined #ruby
shorne has quit [Ping timeout: 255 seconds]
axl_ has joined #ruby
chimkan_ has quit [Client Quit]
havenn has quit [Remote host closed the connection]
peregrine81 has quit [Quit: Goodbye.]
snorkdude has joined #ruby
<foucist> shevy: check the encoding of the string?
<foucist> or force it to unicode/utf8
burgestrand has quit [Ping timeout: 255 seconds]
lenovodroid has joined #ruby
<shevy> hmm yeah, going to force it
BoomCow has joined #ruby
<cardoni> shevy, you fix the problem?
<cardoni> What text editor are you using?
TheFuzzball has joined #ruby
<shevy> cardoni geany right now. But I always use ISO encoding, not UTF.
seanstickle has quit [Quit: seanstickle]
<atmosx> shevy: capitalize doesn't work with greek chars, I had to write my methods
<cardoni> Within your app? Like, in your datastore you mean? Or in terms of how you're encoding your .rb files?
<atmosx> so if youre chars are not ASCII-US won't work
<cardoni> good point atmosx
<shevy> cardoni in how I save .rb files and yaml files (I know the letter requires UTF, but I dont)
<shevy> *latter
<shevy> atmosx worked in 1.8.7 :(
chimkan has joined #ruby
<shevy> hmmmm
Eldariof-ru has quit [Read error: Connection reset by peer]
piotr has joined #ruby
Eldariof93-ru has joined #ruby
<atmosx> shevy: out of curiosity what language?
<cardoni> Most text editors can usually add the necessary encoding type to the top of the file if you happen to use a non-UTF char
<shevy> you use UTF-8 atmosx
<atmosx> I'd like to see that properly implemented in ruby
<atmosx> cardoni: which is?
piotr_ has quit [Ping timeout: 246 seconds]
<atmosx> ah you don't?
<shevy> cardoni, yeah but I have had problems when I tried to go UTF-8
<cardoni> Ahh, I see
<atmosx> I can't *not* use utf-8 with greek utf8 chars
chimkan has quit [Client Quit]
<cardoni> atmosx: I always just stick with UTF-8. Haven't worked on anything yet that required otherwise.
<shevy> for me it was only the german umlauts
<atmosx> hmm k
<atmosx> I'm off, cya
love_color_text has quit [Remote host closed the connection]
<cardoni> atmosx If you throw, say, greek and german in whatever .rb file you're hacking on, simply adding "#!/usr/bin/env ruby -w # encoding: UTF-8" to the top of the file takes care if that, doesn't it? I'm not sure.
<shevy> well plan B is to read up lots about encoding and do the switch to UTF-8
Grieg has quit [Quit: laterz! :D]
chimkan has joined #ruby
BoomCow has quit [Quit: This computer has gone to sleep]
replore has joined #ruby
cakehero has quit [Ping timeout: 255 seconds]
dzhulk has quit [Quit: Leaving.]
BoomCow has joined #ruby
rippa has quit [Ping timeout: 256 seconds]
dzhulk has joined #ruby
awarner has quit [Remote host closed the connection]
love_color_text has joined #ruby
replore has quit [Ping timeout: 265 seconds]
cakehero has joined #ruby
burgestrand1 is now known as burgestrand
snorkdude has quit [Quit: snorkdude]
ttt_ has joined #ruby
awarner has joined #ruby
capaterra has quit [Ping timeout: 252 seconds]
keyvan has joined #ruby
keyvan has joined #ruby
keyvan has quit [Changing host]
danktamagachi has quit [Remote host closed the connection]
ctwiz has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
love_color_text has quit [Ping timeout: 244 seconds]
thoolihan has quit [Ping timeout: 255 seconds]
chimkan has quit [Quit: chimkan]
Spaceboy has joined #ruby
ttt_ has quit [Ping timeout: 276 seconds]
c0rn has joined #ruby
tomsthumb has joined #ruby
F1skr has quit [Quit: WeeChat 0.3.9.2]
ctwiz is now known as dpg
aharris6 has quit [Remote host closed the connection]
hackerdude has joined #ruby
arturaz_ has joined #ruby
medik has quit [Quit: Leaving]
shtirlic has joined #ruby
joeycarmello has joined #ruby
chimkan has joined #ruby
Electrical has joined #ruby
vikingly has quit [Ping timeout: 246 seconds]
medik has joined #ruby
capaterra has joined #ruby
joeycarmello has quit [Ping timeout: 252 seconds]
jsilver has joined #ruby
FredLe has joined #ruby
hola123 has quit [Ping timeout: 248 seconds]
aharris6 has joined #ruby
chimkan has quit [Quit: chimkan]
shiroginne has quit [Quit: shiroginne]
statarb3 has quit [Quit: Leaving]
margle has quit [Quit: Computer has gone to sleep.]
Banistergalaxy has quit [Ping timeout: 246 seconds]
ossareh has quit [Ping timeout: 256 seconds]
cakehero has quit [Read error: Connection reset by peer]
Guest30882 has quit [Quit: Guest30882]
Proshot has joined #ruby
Banistergalaxy has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
Eldariof93-ru has quit []
pcarrier has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
k610 has joined #ruby
cakehero has joined #ruby
u89 has joined #ruby
dmiller has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
tbrock has quit [Quit: Computer has gone to sleep.]
dmiller_ has joined #ruby
jlwestsr has quit [Quit: Ex-Chat]
BoomCow has quit [Quit: Leaving]
tvw has joined #ruby
jrunning_ has quit [Ping timeout: 264 seconds]
malte_ has joined #ruby
dmiller has quit [Ping timeout: 248 seconds]
syamajala has quit [Remote host closed the connection]
tomsthumb has quit [Quit: Leaving.]
lenovodroid has quit [Ping timeout: 260 seconds]
cakehero has quit [Read error: Connection reset by peer]
seanstickle has joined #ruby
bluOxigen has quit [Ping timeout: 246 seconds]
x82_nicole has joined #ruby
sepp2k1 has joined #ruby
sepp2k has quit [Ping timeout: 246 seconds]
chaosis has quit [Ping timeout: 246 seconds]
jrajav has joined #ruby
generalissimo has quit [Remote host closed the connection]
jimeh has quit [Quit: Computer has gone to sleep.]
shtirlic has quit [Remote host closed the connection]
answer_42 has quit [Quit: WeeChat 0.3.9.2]
BrianJ has joined #ruby
swarley has quit [Quit: Switching to BNC]
swarley has joined #ruby
shtirlic has joined #ruby
ebobby has joined #ruby
c0rn has quit []
mneorr has quit [Remote host closed the connection]
krawchyk has quit [Remote host closed the connection]
mneorr has joined #ruby
mneorr has quit [Remote host closed the connection]
ttt_ has joined #ruby
aces1up has quit [Read error: Connection reset by peer]
Neomex has joined #ruby
Neomex has quit [Client Quit]
<Electrical> Hi all. if i want to concat text ( strings ) to each other.. can i simply do a var+" some string" ?
<BrianJ> for connecting to a database in a ruby application, what is the best practice for storing credentials (username, password, host, etc.)
Targen has joined #ruby
<seanstickle> Electrical: yes
baphled has joined #ruby
_alejandro has quit [Remote host closed the connection]
<seanstickle> BrianJ: YAML file
<BrianJ> seanstickle: where is do I put that in a ruby app directory structure ?
<seanstickle> Anywhere you like
k611 has joined #ruby
ttt_ has quit [Ping timeout: 276 seconds]
<banisterfiend> "Where can i put it? Anywhere you like" --> generous girl, seanstickle
<Electrical> seanstickle: wierd. before a loop i init the variable.. in the loop i fill it up.. but its empty when i print it :-(
<BrianJ> ok, lastly is the most typical way of interfacing with a database to use active record?
Retistic has quit [Quit: Retistic]
<seanstickle> BrianJ: depends. ActiveRecord is popular, but so is DataMapper.
<seanstickle> BrianJ: as well as non-ORM approaches like ruby-mysql
<seanstickle> Electrical: always show the code
<BrianJ> seanstickle: oh ok. I think that gives me enough to go on. Thanks for the help
k610 has quit [Ping timeout: 248 seconds]
<Electrical> seanstickle: http://pastie.org/5464067
<seanstickle> Electrical: documentation+line+"\n" does nothing
Retistic has joined #ruby
<seanstickle> You doubtless want to assign that to the documentation variable
<Electrical> yeah indeed
<seanstickle> Also documentation+"# [*"+name+"*]\n" does nothing
muratsplat_ has joined #ruby
muratsplat_ has quit [Max SendQ exceeded]
babykosh has joined #ruby
<Electrical> what is the best way to concat those strings to the variable?
`brendan has joined #ruby
muratsplat_ has joined #ruby
Slivka has joined #ruby
<seanstickle> a = "foo"; a += "bar"
<seanstickle> #=> "foobar"
<Electrical> ah += same as php
<Hanmac> you guys could use << too
<apeiros_> "#{a}#{b}"
<apeiros_> a << b
<seanstickle> Always a tasteful comparison
<apeiros_> all 3 do different things
dnyy has joined #ruby
<apeiros_> += creates a new string and assigns it to the lhs variable
<Electrical> hehe. used the example from seanstickle, works like a charm :-)
<apeiros_> << modifies the existing string
dnyy has quit [Remote host closed the connection]
* Electrical feels pretty stupid.
dpg has quit [Quit: dpg]
arya has quit [Ping timeout: 260 seconds]
<seanstickle> That's easy to fix though
<seanstickle> Get book. Read book. Write code.
techhelp has joined #ruby
<seanstickle> Strong medicine for not knowing things.
<Electrical> i know seanstickle :-) really need to dive more into ruby.
bier_ has quit [Ping timeout: 256 seconds]
_alejandro has joined #ruby
tommyvyo_ has joined #ruby
_alejandro has quit [Remote host closed the connection]
ctwiz has joined #ruby
cousine has joined #ruby
techhelp has quit [Client Quit]
jackbrownhf has joined #ruby
<seanstickle> Maybe someone should write a book "Ruby for PHP Programmers"
<seanstickle> To help the transition
axl_ has quit [Quit: axl_]
kiwnix has joined #ruby
robustus has quit [Quit: ZNC - http://znc.in]
xsbeats_ has joined #ruby
pac1 has quit [Remote host closed the connection]
<seanstickle> That's … something.
mr-rich has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<seanstickle> Just the one page, then?
xsbeats has quit [Ping timeout: 264 seconds]
<Hanmac> most of them not read that much :D
<seanstickle> That page isn't really worth reading.
nhnate has joined #ruby
MrGando has joined #ruby
adambeynon has joined #ruby
axl_ has joined #ruby
MrGando has quit [Client Quit]
Goles has joined #ruby
BrianJ has quit [Quit: Computer has gone to sleep.]
<nhnate> has anyone here had any experience with capistrano ssh issues?
Michae___ has joined #ruby
bier_ has joined #ruby
snorkdude has joined #ruby
hackerdude has quit [Remote host closed the connection]
habib has joined #ruby
_alejandro has joined #ruby
lampe21 has quit [Quit: Leaving.]
jarred_ has joined #ruby
emergion has joined #ruby
<seanstickle> ?
skattyadz has joined #ruby
aharris6 has quit [Remote host closed the connection]
muratsplat_ has quit [Quit: Leaving]
jackbrownhf has quit [Quit: Sto andando via]
Yarou has joined #ruby
Yarou has quit [Changing host]
Yarou has joined #ruby
rjmt___ has joined #ruby
fasta has joined #ruby
Yarou__ has quit [Ping timeout: 256 seconds]
Goles has quit [Ping timeout: 250 seconds]
_nitti has joined #ruby
brianpWins_ has joined #ruby
c0rn has joined #ruby
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
brianpWins has quit [Ping timeout: 244 seconds]
brianpWins_ is now known as brianpWins
CamonZ has quit [Quit: Linkinus - http://linkinus.com]
rakl has quit [Quit: sleeping]
mr-rich has joined #ruby
Electrical has left #ruby [#ruby]
<shevy> seanstickle I think the chris pine tutorial is good, I once wanted to extend it
_nitti has quit [Ping timeout: 264 seconds]
<seanstickle> shevy: what now with the who where?
shtirlic has quit [Remote host closed the connection]
<shevy> it could include a transition-phase for php comers
nateberkopec has joined #ruby
<seanstickle> Who is Chris Pine, and what is his tutorial?
<shevy> like a chapter "ruby from the eyes of an ex-php guy"
<shevy> ohhhh you dont know the old one?!
<seanstickle> No.
<seanstickle> I don't go in for tutorials myself.
<shevy> yeah, for you it would be a waste of time, but when I was a newbie it helped me a lot
<seanstickle> Ah, interesting.
<seanstickle> When I was a noobie, I read the very nice draft ISO spec.
cj3kim has joined #ruby
leonardorb has joined #ruby
<shevy> it explains things like:
<shevy> puts 'hello '.+ 'world'
<seanstickle> It was clear like crystal.
blazes816 has joined #ruby
Kruppe has joined #ruby
ctwiz has quit [Quit: ctwiz]
zigomir has quit [Quit: zigomir]
axl_ has quit [Read error: Connection reset by peer]
margle has joined #ruby
axl_ has joined #ruby
IrishGringo has joined #ruby
Xeago has joined #ruby
joeycarmello has joined #ruby
caleb_io has joined #ruby
Orcris has quit [Read error: Connection reset by peer]
Michae___ has quit [Remote host closed the connection]
gbchaosmaster has quit [Quit: leaving]
timonv has joined #ruby
hasse_ has quit [Quit: Page closed]
Michae___ has joined #ruby
leonardorb has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 246 seconds]
xkx has joined #ruby
jrunning_ has joined #ruby
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
jlogsdon has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<maetthew> Hi! Ruby noob here. Is it possible with DataMapper to keep the data in for example an sqlite3 database when the application quits?
<seanstickle> Yes.
<seanstickle> That is sort of the point.
cousine has quit [Remote host closed the connection]
codecaster has joined #ruby
jlogsdon has quit [Remote host closed the connection]
<maetthew> seanstickle, That was my thought as well. However, when ever I restart my program the tables are flushed
ryanf has joined #ruby
<seanstickle> Ah, well, that's the real question then.
<seanstickle> Your code is probably re-initializing the sqlite database on startup.
DamienDeVille has joined #ruby
DamienDeVille has quit [Read error: Connection reset by peer]
brianpWins has quit [Quit: brianpWins]
<maetthew> And how should I be doing it instead?
<seanstickle> Not sure. I can't see your code.
<seanstickle> Post it to pastie.org ?
<seanstickle> Or to a gist
<drizz> what's the leading view renderer these days?
<drizz> performance-wise
jenrzzz has quit [Ping timeout: 256 seconds]
dnyy has joined #ruby
<maetthew> seanstickle, BitBucket ok? https://bitbucket.org/maetthew/tf2mix-irc-bot/src
FredLe has quit [Ping timeout: 265 seconds]
segv- has quit [Quit: segv-]
<maetthew> DataMapper setup in lib/config.rb
c0rn has quit []
Michae___ has quit [Remote host closed the connection]
<seanstickle> No, not good
<seanstickle> Can I read the code online?
<seanstickle> It keeps trying to download files...
<maetthew> seanstickle, You can't see that?
<maetthew> hmm
<maetthew> hold on
Michae___ has joined #ruby
<seanstickle> Ah, just trying to download the database.db
<seanstickle> Forget my comment
byennen has quit [Read error: Connection reset by peer]
byennen has joined #ruby
Tearan has joined #ruby
Tearan has quit [Client Quit]
<maetthew> seanstickle, So you can see the code?
<seanstickle> Yah
Xeago has quit [Read error: Connection reset by peer]
Tearan has joined #ruby
Xeago has joined #ruby
<maetthew> cool
<seanstickle> auto_migrate! clears all the data from the database
<seanstickle> So… there's that
Goles has joined #ruby
<maetthew> oh ofc
c0rn has joined #ruby
keyvan has quit [Remote host closed the connection]
Elhu has joined #ruby
c0rn has quit [Client Quit]
joeycarmello has quit [Remote host closed the connection]
Goles has quit [Ping timeout: 264 seconds]
love_color_text has joined #ruby
ctwiz has joined #ruby
Goles has joined #ruby
nga4 has joined #ruby
c0rn has joined #ruby
c0rn has quit [Client Quit]
<maetthew> seanstickle, Another thing. I am trying to check if a record exists. I was under the assumption that first_or_create would do that but I seem to be wrong?
generalissimo has joined #ruby
SCommette has quit [Quit: SCommette]
jimeh has joined #ruby
pac1 has joined #ruby
danneu has quit [Ping timeout: 244 seconds]
bluesnow has joined #ruby
wjw has quit [Ping timeout: 245 seconds]
<bluesnow> Hey, I'm trying to do rvm install mysql2, but it's missing a dependency on libmysqlclient-dev I think
<bluesnow> However, when I try to install libmysqlclient-dev, I get Could not find a valid gem 'libmysqlclient-dev' (>= 0) in any repository
s1n4 has quit [Quit: leaving]
margle has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<Hanmac> libmysqlclient-dev is not a gem
<Hanmac> its an debian/ubuntu package
malkomalko has quit [Remote host closed the connection]
cardoni has quit [Quit: cardoni]
banisterfiend has quit [Ping timeout: 265 seconds]
seanstickle has quit [Quit: seanstickle]
alanp_ has joined #ruby
Michae___ has quit [Remote host closed the connection]
<rking> I wonder if gems that have OS deps should try harder to suggest the course of action
<rking> E.g. look for /etc/debian_version and say: Press y to 'apt-get install libmysqlclient-dev'
baphled has quit [Ping timeout: 264 seconds]
Michae___ has joined #ruby
<bluesnow> Hanmac: Ah okay, thanks.
rjmt___ has quit [Ping timeout: 255 seconds]
alanp has quit [Ping timeout: 260 seconds]
<maetthew> I am trying to check if a record exists in SQLite3 with DataMapper. I was under the assumption that i could use first_or_create for this but I seem to be wrong about this?
nobuoka has quit [Ping timeout: 248 seconds]
ctwiz is now known as dpg
x82_nicole has quit [Quit: Computer has gone to sleep.]
rjmt___ has joined #ruby
lolcathost has quit [Ping timeout: 246 seconds]
jrunning_ has quit [Ping timeout: 252 seconds]
<shevy> I HAVE THE SOLUTION TO CODING
<shevy> We need good looking girls in bikini doing the actual coding work
lolcathost has joined #ruby
<RubyPanther> We already have that.
cj3kim has quit [Quit: This computer has gone to sleep]
rjj has quit [Ping timeout: 260 seconds]
prox|a has joined #ruby
Michae___ has quit [Ping timeout: 244 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
rjmt___ has quit [Ping timeout: 255 seconds]
daniel_hinojosa has quit [Quit: Leaving.]
virtualentity has quit [Ping timeout: 256 seconds]
CRubyJDoc is now known as Lemtzas
lenovodroid has joined #ruby
kirun has quit [Quit: Client exiting]
ikaros has quit [Quit: Ex-Chat]
lolcathost has quit [Ping timeout: 255 seconds]
<jrajav> shevy: If you haven't seen those, you're coding in the wrong place.
<jrajav> Well okay they may not be in bikinis ALL THE TIME
<shevy> man I swear I never saw it before
<jrajav> Had a friend in California who was on a project where they normally weren't colocated
acoyfellow has joined #ruby
<jrajav> But they had crunch time
<jrajav> So their solution was to rent out a shack on the beach
Michae___ has joined #ruby
<jrajav> They'd run little hacking marathons and then go surf
habib has quit [Quit: Leaving]
<jrajav> I am sure there was a girl in bikini coding at some point on that project (there were one or two girls on the team)
tvw has quit [Remote host closed the connection]
slash_nick has joined #ruby
baphled has joined #ruby
whowantstolivef0 has joined #ruby
joeycarmello has joined #ruby
cardoni has joined #ruby
ttt_ has joined #ruby
danneu has joined #ruby
banseljaj is now known as imami|afk
mneorr has joined #ruby
snorkdude has quit [Quit: snorkdude]
arturaz_ has quit [Remote host closed the connection]
pcarrier has quit []
ikaros has joined #ruby
generalissimo has quit [Remote host closed the connection]
wargasm has quit [Ping timeout: 255 seconds]
ttt_ has quit [Ping timeout: 245 seconds]
cableray has joined #ruby
love_color_text has quit [Remote host closed the connection]
babykosh has quit [Quit: babykosh]
generalissimo has joined #ruby
rakl has joined #ruby
joeycarmello has quit [Ping timeout: 265 seconds]
aharris6 has joined #ruby
bigthyme has joined #ruby
Xeago has quit [Ping timeout: 255 seconds]
bigthyme has quit [Remote host closed the connection]
blazes816 has quit [Quit: blazes816]
Proshot is now known as statarb3
statarb3 has quit [Changing host]
statarb3 has joined #ruby
dangerousdave has quit [Quit: Leaving...]
Michae___ has quit [Remote host closed the connection]
slash_nick has quit [Ping timeout: 245 seconds]
Goles has quit [Remote host closed the connection]
jrunning_ has joined #ruby
_alejandro has quit [Remote host closed the connection]
aharris6 has quit [Remote host closed the connection]
twopoint718 has joined #ruby
twopoint718 has joined #ruby
twopoint718 has quit [Changing host]
Xeago has joined #ruby
dmiller_ has quit [Remote host closed the connection]
aeontech has quit [Quit: aeontech]
jrunning_ has quit [Ping timeout: 245 seconds]
Michae___ has joined #ruby
babykosh has joined #ruby
Michae___ has quit [Remote host closed the connection]
Muz_ is now known as Muz
jimeh has quit [Quit: Computer has gone to sleep.]
aeontech has joined #ruby
jellosea has joined #ruby
<jellosea> hey is there a way to run a ruby program in one line like perl -we " " ?
byennen_ has joined #ruby
byennen has quit [Read error: Connection reset by peer]
axl_ has quit [Quit: axl_]
stayarrr has quit [Quit: Linkinus - http://linkinus.com]
generalissimo has quit [Remote host closed the connection]
cardoni has quit [Ping timeout: 265 seconds]
kjs has quit [Quit: "Look at my Face and tell me I don't know what I'm talking about"]
<ryanf> ruby -e
axl_ has joined #ruby
<ryanf> also -n and a couple other options are sometimes useful when using ruby for one-liners
slash_nick has joined #ruby
<ryanf> check out man ruby I guess
jeffreybaird has joined #ruby
icole has joined #ruby
lenovodroid has quit [Read error: Connection reset by peer]
lenodroid has joined #ruby