klaut has quit [Remote host closed the connection]
shedd has quit [Ping timeout: 246 seconds]
danshultz has quit [Ping timeout: 246 seconds]
sharms has quit [Ping timeout: 240 seconds]
burlyscudd has quit [Quit: Leaving.]
Landshark753 has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
denysonique_ has joined #ruby
malcolmva has quit [Ping timeout: 240 seconds]
lukec has quit [Quit: lukec]
<shevy>
poor you
<cgcardona_>
hello I am using https://github.com/attr-encrypted/encryptor to encrypt some refresh and auth tokens before storing them in postgres. However on the decrypt end I'm getting a OpenSSL::Cipher::CipherError (wrong final block length): error.
marr has quit [Ping timeout: 252 seconds]
sharms has joined #ruby
<cgcardona_>
when I run OpenSSL::Cipher::Cipher.new('aes-256-cbc').random_iv I get something like "}\x10\x82{\r\x0FK\x0F`\xF15\ayU\x12u"
<cgcardona_>
what would be the correct format to store that in active record?
<apeiros>
cgcardona_: probably binary
hl has quit [Ping timeout: 246 seconds]
phipes has quit [Remote host closed the connection]
<cgcardona_>
i am storing it as binary but it's not correctly decrypting
<cgcardona_>
i have checked the .length of the salt, initialization vector and secret both going in and coming out of the db and they are the same.
<benzrf>
anyway delimited continuations are amazing as shit
okinomo has quit [Ping timeout: 264 seconds]
Virtualize has joined #ruby
<benzrf>
shevy: fun fact: haskell is infinitely more testable than ruby because in haskell everything is already guaranteed not to have side effects or depend on implicit program state
<havenwood>
tigris_: oh right, i misunderstood what you were getting at at first
Guest4700 has quit [Remote host closed the connection]
shadoi has joined #ruby
<popl>
s/Foo/Sham/g
mlpinit has joined #ruby
xiphias has quit [Remote host closed the connection]
<tigris_>
haha!
xiphias has joined #ruby
xiphias has quit [Changing host]
xiphias has joined #ruby
endash has quit [Quit: endash]
kate_r has joined #ruby
okinomo has quit [Ping timeout: 264 seconds]
bentonrr has joined #ruby
DrShoggoth has quit [Ping timeout: 246 seconds]
xiphias has quit [Ping timeout: 240 seconds]
LadyRainicorn has joined #ruby
mansi has joined #ruby
aryaching has joined #ruby
shadoi has quit [Quit: Leaving.]
lyanchih has quit [Quit: lyanchih]
iamjarvo_ has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
sharms has quit [Ping timeout: 240 seconds]
iamjarvo_ has joined #ruby
ffio has joined #ruby
IceDragon has quit [Ping timeout: 246 seconds]
xiphias has joined #ruby
tectonic has quit [Ping timeout: 240 seconds]
sharms has joined #ruby
lyanchih has joined #ruby
amclain has joined #ruby
shadoi has joined #ruby
lfox has joined #ruby
havenwood has joined #ruby
iamjarvo_ has quit [Ping timeout: 240 seconds]
cj3kim has joined #ruby
DrShoggoth has joined #ruby
jmo has joined #ruby
sharms has quit [Ping timeout: 240 seconds]
LadyRainicorn has quit [Read error: Connection reset by peer]
lfox has quit [Ping timeout: 240 seconds]
burlyscudd has quit [Quit: Leaving.]
dscrd has quit [Remote host closed the connection]
DrShoggoth has quit [Max SendQ exceeded]
dscrd has joined #ruby
aspires has quit []
drago777 has quit [Ping timeout: 240 seconds]
jmo has quit [Ping timeout: 240 seconds]
drago777 has joined #ruby
sharms has joined #ruby
w4pm has quit [Ping timeout: 272 seconds]
timonv has joined #ruby
enclaved has joined #ruby
enclaved has left #ruby ["WeeChat 0.4.2"]
axl_ has quit [Read error: No buffer space available]
rien has quit [Ping timeout: 260 seconds]
magoo has joined #ruby
rien has joined #ruby
dscrd has quit [Ping timeout: 246 seconds]
shadoi has quit [Quit: Leaving.]
rjhunter has quit [Remote host closed the connection]
lyanchih has quit [Quit: lyanchih]
axl_ has joined #ruby
Hanmac1 has joined #ruby
aef has joined #ruby
zeade has quit [Quit: Leaving.]
DrShoggoth has joined #ruby
timonv has quit [Ping timeout: 264 seconds]
Hanmac has quit [Ping timeout: 240 seconds]
sharms has quit [Ping timeout: 240 seconds]
tectonic has joined #ruby
gquental has quit [Ping timeout: 272 seconds]
shadoi has joined #ruby
mary5030 has joined #ruby
braincra- has quit [Quit: bye bye]
poguez_ has joined #ruby
sharms has joined #ruby
poguez_ has quit [Client Quit]
cow_ has quit [Remote host closed the connection]
poguez_ has joined #ruby
ericthewino has joined #ruby
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
alexherbo2 has joined #ruby
braincrash has joined #ruby
aspires has joined #ruby
jmimi has quit [Quit: Leaving.]
brunops has quit [Changing host]
brunops has joined #ruby
emocakes has quit [Quit: Leaving...]
shedd has joined #ruby
gja has joined #ruby
gja has quit [Changing host]
gja has joined #ruby
mattk has quit [Read error: Operation timed out]
mansi has quit [Ping timeout: 264 seconds]
shadoi has quit [Quit: Leaving.]
shedd has quit [Ping timeout: 264 seconds]
Hanmac has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
gquental has joined #ruby
Hanmac1 has quit [Ping timeout: 240 seconds]
maletor has joined #ruby
shadoi has joined #ruby
aspires has quit []
tectonic has quit [Ping timeout: 240 seconds]
mlpinit has quit [Quit: Leaving...]
fedesilva has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 246 seconds]
rjhunter has joined #ruby
benlieb has joined #ruby
LadyRainicorn has joined #ruby
mr_red has quit [Ping timeout: 246 seconds]
maletor has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Remote host closed the connection]
dingwall has joined #ruby
LexicalScope has joined #ruby
LexicalScope has joined #ruby
LexicalScope has quit [Changing host]
tectonic has joined #ruby
LinearInterpol has joined #ruby
mr_red has joined #ruby
shedd has joined #ruby
burlyscudd has joined #ruby
shedd has quit [Read error: Connection reset by peer]
maletor has joined #ruby
shedd has joined #ruby
smathieu has joined #ruby
ewnd9 has joined #ruby
benlieb has quit [Client Quit]
digital-ghost has quit [Remote host closed the connection]
mr_red has quit [Client Quit]
nanoyak has joined #ruby
burlyscudd1 has joined #ruby
okinomo has joined #ruby
psyl0n has quit [Remote host closed the connection]
aryaching has joined #ruby
burlyscudd has quit [Ping timeout: 264 seconds]
cj3kim has quit [Ping timeout: 246 seconds]
centipedefarmer has quit [Remote host closed the connection]
shadoi has quit [Quit: Leaving.]
maletor has quit [Quit: Computer has gone to sleep.]
psyprus has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby
maletor has joined #ruby
rien has quit [Ping timeout: 246 seconds]
CaptainJet has quit []
Landshark753 has joined #ruby
psyprus has joined #ruby
Landshark753 has quit [Max SendQ exceeded]
smathieu has quit [Remote host closed the connection]
Landshark753 has joined #ruby
sayd has joined #ruby
<sayd>
when i git push using mavericks and boxen i see /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- bundler/setup (LoadError)
drago777 has quit [Ping timeout: 240 seconds]
anekos_ has quit [Ping timeout: 240 seconds]
burlyscudd1 has quit [Ping timeout: 240 seconds]
rien has joined #ruby
aspires has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
sharms has quit [Ping timeout: 240 seconds]
anekos_ has joined #ruby
lukec has joined #ruby
okinomo has quit [Ping timeout: 240 seconds]
<rjhunter>
sayd: fancy seeing you here :-) I'll just cross-post my replies to give context for anyone else who might be listening
drago777 has joined #ruby
<rjhunter>
sayd: That means the "bundler" gem is not installed in a place the system Ruby can find it.
okinomo has joined #ruby
<rjhunter>
sayd: From memory, Boxen uses rbenv for ruby management, so you probably want to use one of the rbenv rubies instead
cj3kim has joined #ruby
psyprus has quit [Ping timeout: 240 seconds]
<rjhunter>
sayd: Git itself doesn't use ruby or bundler at all -- but it's quite possible there's a hook script or wrapper script or similar written in ruby
<rjhunter>
it sounds like a Boxen thing, anyway
<rjhunter>
if you set the environment variable `RUBYOPT=-d` you might see some files being required to give you a clue
Landshark753 has quit [Ping timeout: 240 seconds]
sharms has joined #ruby
mr_red has joined #ruby
gja has joined #ruby
psyprus has joined #ruby
rien has quit [Ping timeout: 240 seconds]
danshultz has joined #ruby
flubba has joined #ruby
LinearInterpol has quit [Read error: Connection reset by peer]
<rjhunter>
sayd: hm, less useful than i was hoping
<rjhunter>
sayd: OK, let's try another crazy trick. It'll really only work if you've got no other Ruby processes running at the moment.
<rjhunter>
sayd: sudo dtruss -f -n ruby
<rjhunter>
and leave that running while you try to push again
cow_ has joined #ruby
nannes has quit [Quit: Leaving.]
cj3kim has quit [Ping timeout: 246 seconds]
rien has joined #ruby
nannes has joined #ruby
cameronbarton has joined #ruby
jameshyde1 has quit [Quit: Leaving.]
cow_ has quit [Read error: Connection reset by peer]
cow_ has joined #ruby
ewnd9 has quit [Ping timeout: 246 seconds]
jameshyde1 has joined #ruby
Guest95481 has quit [Ping timeout: 240 seconds]
Landshark753 has quit [Ping timeout: 240 seconds]
<sayd>
hrmm i cant open new terminal tab now
LadyRainicorn has quit [Read error: Connection reset by peer]
LadyRainicorn has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
rien has quit [Ping timeout: 240 seconds]
<sayd>
sorry i can- just took awhile. and there is lots of output from that druss trace
<sayd>
mind if i pm the gist in case of sensitive data
Landshark753 has joined #ruby
rien has joined #ruby
<rjhunter>
that means there are other ruby processes running
cow_ has quit [Ping timeout: 246 seconds]
<sayd>
ahh my sass compiler maybe
kitak has quit [Remote host closed the connection]
<rjhunter>
sure, it's quite possible there will be (lightly) sensitive data in there
<rjhunter>
filenames for sure
<rjhunter>
that'd do it
mneorr has joined #ruby
LadyRainicorn has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby
gja has joined #ruby
gja has quit [Changing host]
gja has joined #ruby
vpretzel has quit [Remote host closed the connection]
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
drago777 has quit [Ping timeout: 240 seconds]
<sayd>
i dunno-
gja has quit [Client Quit]
sharms has quit [Ping timeout: 240 seconds]
<sayd>
i dont have sass running :/ how would i output the dtruss trace into a file?
vlad_starkov has quit [Read error: Connection reset by peer]
LexicalScope has quit [Ping timeout: 240 seconds]
LadyRainicorn has joined #ruby
drago777 has joined #ruby
kitak has joined #ruby
ffio has quit [Quit: WeeChat 0.4.2]
gregoriokusowski has quit [Quit: gregoriokusowski]
kitak has quit [Remote host closed the connection]
kitak has joined #ruby
jbzt has joined #ruby
kitak has quit [Read error: Connection reset by peer]
sharms has joined #ruby
kitak has joined #ruby
<jbzt>
Anyone know if there is a way to tell Bundler to use a :path value for dev/test, but a regular gem in production? I didn't see anything in the docs about that set up
nisstyre has quit [Ping timeout: 264 seconds]
<rjhunter>
sayd: dtruss ... > file.txt
sepp2k has joined #ruby
LinearInterpol has quit [Ping timeout: 264 seconds]
<rjhunter>
jbzt: Try declaring the gem twice, once in each group
tonni has quit [Remote host closed the connection]
dogweather has joined #ruby
<jbzt>
rjhunter: I tried that, it doesn't work. 'You cannot specify the same gem twice coming from different sources.'
kate_r has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
sethen has quit [Quit: Leaving...]
cow_ has joined #ruby
<rjhunter>
the trace you sent before was using the system ruby (looking for gems in "/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0/gems/")
xiphias has quit [Ping timeout: 240 seconds]
<rjhunter>
so I'm guessing the place that's running git isn't also running rbenv?
<rjhunter>
(it might be a shell startup thing, so consider opening a new terminal to see the behaviour there)
Virtualize has joined #ruby
dpswireless has joined #ruby
rien has quit [Ping timeout: 240 seconds]
xsdg has quit [Ping timeout: 246 seconds]
rien has joined #ruby
xiphias has joined #ruby
spondbob has quit [Client Quit]
yacks has quit [Quit: Leaving]
<kure>
Any ncurses lovers here?
Megtastique has quit []
<rjhunter>
kure: define "lover" :-)
jmo has joined #ruby
<kure>
rjhunter, people that like ncurses' software and enjoy textual interfaces
gja has joined #ruby
xsdg has joined #ruby
<kure>
I think Ruby + Ncurses is the perfect combination for textual-interface awesomeness
ambushsabre has quit [Quit: rip]
niklasb has quit [Ping timeout: 245 seconds]
axl_ has quit [Quit: axl_]
vlad_starkov has joined #ruby
lyanchih has joined #ruby
<rjhunter>
kure: I haven't written against Ncurses (with Ruby or anything beyond `tput` really) but there are many text-based apps I have enjoyed (and some I still do)
xsdg has quit [Remote host closed the connection]
robbyoconnor has quit [Read error: Operation timed out]
xsdg has joined #ruby
xiphias has quit [Ping timeout: 240 seconds]
browndawg has quit [Quit: Leaving.]
joaoh82 has joined #ruby
adam12 is now known as adam
jmo has quit [Ping timeout: 246 seconds]
<kure>
They're awesome! Usually fast, straight-to-the-point and kinda cute... In a textual way
dukz has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
xiphias has joined #ruby
robbyoconnor has joined #ruby
<kure>
Anyway, I just want to chat, share apps and such
Landshark753 has quit [Ping timeout: 240 seconds]
axl_ has joined #ruby
sharms has quit [Ping timeout: 240 seconds]
vpretzel has quit [Ping timeout: 246 seconds]
<sayd>
kure: you may be the right person to ask then - do you know why colors would be interpreted as bold
<kure>
sayd, you mean the bold attribute that highlight colors?
<sayd>
yea
BrixSat_ has quit [Read error: Connection reset by peer]
BrixSat has joined #ruby
<kure>
It has to do with full color support, right? Since terminals are limited (old were up to 16 colors, most modern go up to 256) they must have a way to separate color schemes
cj3kim has quit [Remote host closed the connection]
croaky has joined #ruby
<rjhunter>
I don't know what Faye is but the comment says that FAYE_CLIENT is set in`config.ru`. That file is used by most Web servers, but might not be if you've started the application directly.
agent_white has joined #ruby
LadyRainicorn has quit [Ping timeout: 240 seconds]
agjacome has quit [Client Quit]
Hanmac has quit [Ping timeout: 240 seconds]
Guest62374 is now known as ayaz
ayaz has quit [Changing host]
ayaz has joined #ruby
amclain_ has quit [Quit: Leaving]
LostMonk_ has quit [Ping timeout: 260 seconds]
hololeap has joined #ruby
kitak has quit [Remote host closed the connection]
rm__ has joined #ruby
mikemac has joined #ruby
vlad_starkov has joined #ruby
agent_white has quit [Ping timeout: 240 seconds]
sheap has joined #ruby
LadyRainicorn has joined #ruby
joaoh82 has joined #ruby
agent_white has joined #ruby
mcgyvr has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<nannes>
rjhunter: this is it (from config.ru)
<nannes>
FAYE_CLIENT = faye_server.get_client
h_kon has joined #ruby
rm__ has quit [Ping timeout: 264 seconds]
Guest45868 has quit [Ping timeout: 240 seconds]
butblack has quit [Quit: butblack]
sayan_ has quit [Ping timeout: 246 seconds]
<nannes>
okay I'm messing up everything
xiphias has quit [Ping timeout: 240 seconds]
<nannes>
maybe it's better to avoid using the 'master' branch
<nannes>
I should try the latest stable nuh?
rien has quit [Ping timeout: 240 seconds]
brennanMKE has quit [Remote host closed the connection]
TorpedoSkyline has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
rien has joined #ruby
brennanMKE has joined #ruby
xiphias has joined #ruby
joaoh82 has quit [Ping timeout: 246 seconds]
ewnd9 has joined #ruby
Mars has joined #ruby
joaosa has joined #ruby
Mars is now known as Guest89022
agent_white has quit [Ping timeout: 240 seconds]
<rjhunter>
nannes: I suspect you're running into problems because the app isn't well road-tested for people who aren't already Rails developers
agent_white has joined #ruby
<nannes>
:)
<nannes>
I'm eating from the master branch
<rjhunter>
nannes: how did you start your server?
<nannes>
Anyway, it is working now
<rjhunter>
hooray
<nannes>
:D
sharms has quit [Ping timeout: 240 seconds]
tylersmith has quit [Remote host closed the connection]
browndawg has quit [Ping timeout: 240 seconds]
brennanMKE has quit [Ping timeout: 240 seconds]
lewix has quit [Ping timeout: 240 seconds]
rien has quit [Remote host closed the connection]
<rjhunter>
i imagine that developers (and future users in your shoes) would appreciate hearing about your experience
<nannes>
But this isn't stable, the latest stable is 1.1
<nannes>
rjhunter: You say?
rien has joined #ruby
browndawg has joined #ruby
charliesome has joined #ruby
<rjhunter>
nannes: i mean, if you think what would have made your experience easier, that information might be useful for the next non-developer who tries to run this app
kewubenduben has joined #ruby
<rjhunter>
nannes: perhaps some extra tips in the documentation
<nannes>
Ok, got it
xiphias has quit [Ping timeout: 240 seconds]
<nannes>
Actually I'm running Debian Wheeze. after all the problems I had I decided it was the best choice.
<nannes>
So basically, after this switch, the procedure that I've followed isn't that much different from what's described in the Github installation guide
sharms has joined #ruby
xiphias has joined #ruby
agent_white has quit [Ping timeout: 240 seconds]
xiphias has quit [Changing host]
xiphias has joined #ruby
agent_white has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
lethjakman has joined #ruby
tectonic has quit []
rien has quit [Ping timeout: 240 seconds]
drago777 has joined #ruby
rien has joined #ruby
Guest89022 has quit [Remote host closed the connection]
rehat has quit [Read error: Connection reset by peer]
ip` has joined #ruby
xiphias has quit [Ping timeout: 240 seconds]
Barrin6 has quit [Ping timeout: 240 seconds]
okinomo has joined #ruby
ip` is now known as ip``
xiphias has joined #ruby
pranny has joined #ruby
dukz_ has joined #ruby
Guest45868 has joined #ruby
agjacome has joined #ruby
freerobby has quit [Quit: Leaving.]
L8D has quit [Ping timeout: 272 seconds]
Guest45868 has quit [Read error: Connection reset by peer]
LadyRainicorn has quit [Read error: Connection reset by peer]
dukz has quit [Ping timeout: 240 seconds]
LadyRainicorn has joined #ruby
rien has quit [Ping timeout: 240 seconds]
dpswireless has joined #ruby
rien has joined #ruby
tectonic has joined #ruby
xiphias has quit [Ping timeout: 240 seconds]
xiphias has joined #ruby
aspires has quit []
soobus has joined #ruby
rm__ has joined #ruby
okinomo has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby
dpswireless has quit [Ping timeout: 240 seconds]
LadyRainicorn has quit [Quit: Bye]
xiphias has quit [Ping timeout: 240 seconds]
krz has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
xiphias has joined #ruby
vpretzel has joined #ruby
monkegjinni has joined #ruby
okinomo has joined #ruby
dh64 has joined #ruby
agjacome has quit [Quit: leaving]
rm__ has quit [Ping timeout: 240 seconds]
<nannes>
rjhunter:
<nannes>
ummmmm
<nannes>
I don't know how to add users XDX
dagobah has joined #ruby
FDj has quit [Read error: Connection reset by peer]
<nannes>
There's nothing in the UI about user creation/invitation
FDj has joined #ruby
Al___ has quit [Quit: Al___]
vpretzel has quit [Ping timeout: 246 seconds]
lyanchih has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
pwh has quit []
CpuID has quit [Ping timeout: 240 seconds]
lyanchih has joined #ruby
<rjhunter>
that *really* sounds like something specific to this app you're running
wjimenez5271 has joined #ruby
shredding has joined #ruby
croaky has quit [Ping timeout: 246 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv has quit [Ping timeout: 246 seconds]
user258467_ has joined #ruby
user258467_ has quit [Read error: Connection reset by peer]
jameshyde has joined #ruby
tyl has joined #ruby
axl_ has quit [Quit: axl_]
<rjhunter>
nannes: if you can't find anyone who knows the app to tell you, you can try digging through the code (search for words like "user")
shedd has joined #ruby
CpuID has joined #ruby
CpuID has joined #ruby
CpuID has quit [Changing host]
samsonasu has quit [Quit: samsonasu]
Kricir has joined #ruby
okinomo has quit [Ping timeout: 246 seconds]
shedd has quit [Ping timeout: 246 seconds]
<shredding>
I want to start a command line app and am unsure about which database lib to use.
rien has quit [Ping timeout: 240 seconds]
<shredding>
ATM I'm browsing sequel and datamapper websites.
rien has joined #ruby
<shredding>
Anyone with a good recommendation?
<nannes>
rjhunter: Ye, it's the same thing that came to my mind too :D
<nannes>
I found ./spec/factories/user_factory.rb: last_name 'Admin'
<nannes>
Now I see how user_factory.rb works :D
<nannes>
I do make some development, I'm not totally zero about programming :P :P+
guardianx has joined #ruby
<nannes>
Maybe my english is ! ;PP
psyprus has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
psyprus has joined #ruby
dpswireless has joined #ruby
ephemerian has joined #ruby
<rjhunter>
shredding: I like Sequel. ActiveRecord is super-popular, so you'll attract more contributors (if that matters to you)
brandonblack has quit [Ping timeout: 240 seconds]
<shredding>
rjhunter: Sequel is mapping to hashes, not objects?
Vivekananda has quit [Quit: Ex-Chat]
<rjhunter>
shredding: Sequel can be used in a few different ways. Normally they're hashes (or hash-like structures)
<shredding>
okay.
freerobby has quit [Ping timeout: 246 seconds]
okinomo has joined #ruby
<rjhunter>
shredding: It also supports ActiveRecord-style Model objects if you like that kind of thing
ip`` has quit [Ping timeout: 264 seconds]
<shredding>
i like that kind of thing :)
brandonblack has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
jmo has joined #ruby
<rjhunter>
shredding: If you control the schema, and it maps very closely to your object models, then ActiveRecord may be a good choice.
Kricir has quit [Remote host closed the connection]
jprovazn has joined #ruby
KK4MGV has quit [Ping timeout: 272 seconds]
ddv has joined #ruby
freerobby has quit [Ping timeout: 264 seconds]
KK4MGV has joined #ruby
jameshyde has joined #ruby
kitak has joined #ruby
wildroman2 has joined #ruby
rh1n0 has joined #ruby
pranny has quit [Ping timeout: 240 seconds]
kitak has quit [Ping timeout: 245 seconds]
lyanchih has quit [Quit: lyanchih]
Kricir has joined #ruby
pranny has joined #ruby
shedd has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
soobus has quit [Read error: Operation timed out]
andikr has joined #ruby
phipes has quit [Remote host closed the connection]
brennanMKE has quit [Ping timeout: 264 seconds]
mosez has joined #ruby
drago777 has joined #ruby
Kneferilis has quit [Read error: Connection reset by peer]
agent_white has quit [Quit: leaving]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
tylersmith has joined #ruby
shime has joined #ruby
shedd has quit [Ping timeout: 241 seconds]
claymore has joined #ruby
Yarou has quit [Quit: This computer has gone to sleep]
Beoran__ has joined #ruby
<weeb1e>
Anyone know how efficient hash.size is? Is it cached or is it worth caching the size in a separate variable?
walexus has quit [Read error: Connection reset by peer]
batchitcray has joined #ruby
walexus has joined #ruby
okinomo has quit [Ping timeout: 264 seconds]
<Hanmac1>
weeb1e Hash#size should be stored inside the RHash structure, Hash#count is not
timonv has quit [Remote host closed the connection]
tylersmith has quit [Ping timeout: 240 seconds]
shime has quit [Ping timeout: 240 seconds]
gigetoo has quit [Remote host closed the connection]
<weeb1e>
Hanmac1: Great, then it's a good thing I switched to using #size instead of #count for both arrays and hashes over a year ago :)
Beoran_ has quit [Ping timeout: 252 seconds]
<weeb1e>
Thanks
mosez has quit [Ping timeout: 240 seconds]
CpuID has quit [Quit: This computer has gone to sleep]
shime has joined #ruby
mosez has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
<Hanmac1>
weeb1e: another info: 1.9/2.0 ruby has Enumerator#size, that means like [1,2,3,4].cycle(3).size #=> 12
Hanmac1 is now known as Hanmac
<weeb1e>
Hanmac1: I am now wondering though, why the difference? In what case would you need to count the hash pairs instead of using the cached size
<popl>
Hanmac: Hey, that's neat.
<weeb1e>
Interesting
<Hanmac>
weeb1e: #size "knows" the correct size, #count "count" each element
Al___ has joined #ruby
<weeb1e>
Hanmac: I realize that, but my question is why would you ever need to count the elements
<Hanmac>
weeb1e: as you can see there, this would not work with #count :> [1,2,3,4].cycle.size #=> Infinity
drago777 has joined #ruby
guardianx has quit [Ping timeout: 264 seconds]
<weeb1e>
It seems like #count being less efficient, and the different not very well known is counter-productive
<Hanmac>
weeb1e: #count allows a block: [1,2,3,4,5].count(&:odd?) #=> 3
<weeb1e>
Ah, that does make sense, thanks
<weeb1e>
Then again
<weeb1e>
Why doesn't #count call #size if called without a block
<weeb1e>
:P
foooobear has joined #ruby
foooobear has left #ruby [#ruby]
<weeb1e>
Seems like a sensible optimization, given that #count() will never not be equal to #size
aganov has joined #ruby
timonv has joined #ruby
<weeb1e>
But oh well, I'm just nit-picking
* weeb1e
gets back to building his dynamic fiber pool
gigetoo has joined #ruby
Al___ has quit [Client Quit]
<weeb1e>
I'm experiencing high GC CPU time which I think is due to too many fibers being GC'd so hopefully using a fiber pool for absolutely everything will help
Deele has joined #ruby
wildroman2 has quit [Remote host closed the connection]
rm_ has joined #ruby
ephemerian has quit [Quit: Leaving.]
emocakes has joined #ruby
Oku71 has quit [Ping timeout: 240 seconds]
ephemerian has joined #ruby
threesome has joined #ruby
rm_ has quit [Ping timeout: 246 seconds]
nvrch has joined #ruby
rickruby has quit [Remote host closed the connection]
cuppscakes has joined #ruby
cuppscakes has left #ruby [#ruby]
okinomo has joined #ruby
alex88 has joined #ruby
batchitcray has quit [Ping timeout: 264 seconds]
havenwood has quit [Remote host closed the connection]
<bgy>
Hi
Xeago has joined #ruby
cuppscakes has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
drago777 has joined #ruby
rickruby has joined #ruby
dukz_ has quit [Remote host closed the connection]
mityaz has joined #ruby
mneorr has joined #ruby
wildroman2 has joined #ruby
wildroman2 has quit [Read error: Connection reset by peer]
lsmola_ has joined #ruby
fire has joined #ruby
wildroman2 has joined #ruby
fire is now known as ffio_
psyprus has quit [Ping timeout: 240 seconds]
abra has joined #ruby
charliesome has joined #ruby
psyprus has joined #ruby
ffio has quit [Quit: WeeChat 0.4.2]
jameshyde has quit [Quit: Leaving.]
mneorr has quit [Ping timeout: 246 seconds]
m00nlight_ has joined #ruby
simoz9 has joined #ruby
dukz has joined #ruby
arturaz has joined #ruby
meatherly has quit [Remote host closed the connection]
klaut has joined #ruby
meatherly has joined #ruby
LostMonk_ has joined #ruby
m00nlight has quit [Ping timeout: 240 seconds]
drago777 has quit [Ping timeout: 240 seconds]
cj3kim has joined #ruby
rjhunter has quit [Remote host closed the connection]
fuhgeddaboudit has quit [Ping timeout: 240 seconds]
cuppscakes has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
fuhgeddaboudit has joined #ruby
rjhunter has joined #ruby
bigkevmcd has joined #ruby
fijimunkii has quit [Ping timeout: 252 seconds]
drago777 has joined #ruby
Kneferilis has joined #ruby
cj3kim has quit [Ping timeout: 240 seconds]
meatherly has quit [Ping timeout: 264 seconds]
olivier_bK has joined #ruby
pranny has quit [Quit: Leaving.]
atmosx has joined #ruby
LostMonk_ has quit [Ping timeout: 240 seconds]
joaoh82 has joined #ruby
jhaals has joined #ruby
freerobby has joined #ruby
okinomo has quit [Ping timeout: 246 seconds]
Kricir has quit [Remote host closed the connection]
<tobiasvl>
that is, everything evaluates to "true" except for nil (and false itself of course)
xiphias has joined #ruby
<kwertie_>
tobiasvl: I just googled that actually (I didn't think of the word "truthiness" until just before you said) - how I didn't know this I don't know
<kwertie_>
I guess I just slightly overspecified my conditions before
<kwertie_>
Yup. thanks :)
<tobiasvl>
:)
<rjhunter>
kwertie_: it's very common to use `if foo` to mean `unless foo.nil?`
<rjhunter>
(and sometimes that causes a subtle bug when foo is actually FalseClass)
<kwertie_>
The 0 being true thing may take some getting used to
<tobiasvl>
kwertie_: yeah, that's a common gotcha. also the empty string is true.
<Hanmac>
tobiasvl: there is also an interesting point that "if foo" vs "unless !foo" are not 100% equal ;P
marr has joined #ruby
pranny has joined #ruby
dogweather has left #ruby [#ruby]
sheap has quit [Quit: Lost terminal]
<kwertie_>
Hanmac: uhhh - really?!
rm__ has joined #ruby
<tobiasvl>
kwertie_: another common idiom is `a ||= "foo"`, which is equivalent to `a || a = "foo"` and is used to set a to "foo" if it's not set (a is truthy or we set a to "foo")
<Hanmac>
the "!" is a method ... methods can be overwritten
malcolmva has quit [Ping timeout: 264 seconds]
xiphias has quit [Ping timeout: 240 seconds]
<kwertie_>
Hanmac: haha, yeah, I see.
<kwertie_>
You can really take the ground right from out under yourself in Ruby, eh? :)
<tobiasvl>
with great power comes great responsibility ;)
<kwertie_>
tobiasvl: thanks - talking of idioms actually, I wanted to check a convention of something else;
<kwertie_>
do you guys tend to abstain from 'and' / 'or' in favour of &&, || ?
<kwertie_>
(Or vice vers)
<tobiasvl>
they're used for different things
<kwertie_>
Are the Englishy ones more control flow?
joaoh82 has joined #ruby
arturaz has quit [Remote host closed the connection]
<tobiasvl>
yes
<tobiasvl>
and &&/|| is used for boolean evaluation
<tobiasvl>
(because of precedence)
<rjhunter>
kwertie_: Not *quite* as much as SmallTalk (where True and False are mutable and you can swap them)
<kwertie_>
tobiasvl: that article brought an amazing amount of clarity to me
<kwertie_>
Thanks
<kwertie_>
Actually just before I do drift back to sleep -
sharms has quit [Ping timeout: 240 seconds]
wjimenez5271 has quit [Remote host closed the connection]
<kwertie_>
I understand this question must be based upon some form of ignorance - but would there not be any benefit, ever, of an `interface' construct being made available for classes?
wjimenez5271 has joined #ruby
drago777 has joined #ruby
<tobiasvl>
well, do you know about modules?
<kwertie_>
Yup (they exist!)
<tobiasvl>
not sure what languages you've used
<tobiasvl>
modules aren't exactly the same as interfaces from java, for instance
<kwertie_>
Actually I've used loads so any comparison would probably be useful
<kwertie_>
Yeah - I really like the ability to mixin in Ruby so easily
sharms has joined #ruby
<kwertie_>
tobiasvl: why do mixins relate to not needing an 'interface' language construct, though?
<tobiasvl>
eh, maybe they don't. i don't know java that well :)
<rjhunter>
kwertie_: compliance with a protocol ("I promise this object quacks like a duck") can be useful in moving errors earlier. If you want to do such things, it's possible. Testing shared behaviours (eg with rspec) is often a more useful way of achieving that goal.
<tobiasvl>
you mean you want to enforce classes to adhere to an API?
<blackdivine>
Any idea how to make an object from #<ActionDispatch::Http::UploadedFile:0x007faa20887260 @tempfile=#<Tempfile:/tmp/RackMultipart20140103-4614-9rgnkd>, @original_filename="twins_by_thrumyeye-d6y2ify.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"files[]\"; filename=\"twins_by_thrumyeye-d6y2ify.jpg\"\r\nContent-Type: image/jpeg\r\n">
<blackdivine>
in irb probably
<blackdivine>
or if you can just tell me that how can i access orignal_filename from above object
<rjhunter>
blackdivine: probably just .original_filename
rickruby has quit [Remote host closed the connection]
<blackdivine>
so the @ symbol means methods?
drago777 has joined #ruby
<Hanmac>
blackdivine: @ are instance variables stored in this object
eval-in has quit [Remote host closed the connection]
<blackdivine>
ok that was what confusing me :)
eval-in has joined #ruby
jameshyde has quit [Ping timeout: 240 seconds]
txdv has quit [Read error: Operation timed out]
<rjhunter>
blackdivine: you can see what methods are available on an object using .methods
LadyRainicorn has joined #ruby
<Hanmac>
if you are lucky you can access them with methods like the name (when using attr_accessor) ... but that is not guaranted ... sometimes the developer does not want that the variables are accessed directly
simoz9 has quit [Ping timeout: 240 seconds]
okinomo has quit [Ping timeout: 240 seconds]
<rjhunter>
in the case of ActionDispatch::Http::UploadedFile, original_filename a method thanks to attr_accessor
mneorr has joined #ruby
simoz9 has joined #ruby
vpretzel has joined #ruby
<rjhunter>
you can also look at the documentation for that class
jmo has joined #ruby
<blackdivine>
yes i can but i really wanted to know what @ means :) everything's so clear now :)
<blackdivine>
thank you
okinomo has joined #ruby
sharms has quit [Ping timeout: 240 seconds]
LadyRainicorn has quit [Ping timeout: 240 seconds]
mneorr has quit [Ping timeout: 246 seconds]
drago777 has quit [Ping timeout: 240 seconds]
vpretzel has quit [Ping timeout: 246 seconds]
sharms has joined #ruby
freerobby has joined #ruby
guardianx has joined #ruby
aryaching_ has quit [Ping timeout: 264 seconds]
okinomo has quit [Ping timeout: 240 seconds]
freerobby has quit [Read error: Connection reset by peer]
freerobby1 has joined #ruby
gregoriokusowski has joined #ruby
phansch has joined #ruby
teoric has joined #ruby
okinomo has joined #ruby
drago777 has joined #ruby
workmad3 has joined #ruby
zipper has joined #ruby
rdark has joined #ruby
zipper is now known as Guest23651
Guest23651 has quit [Client Quit]
sharms has quit [Ping timeout: 240 seconds]
wjimenez5271 has quit [Ping timeout: 240 seconds]
freerobby1 has quit [Ping timeout: 240 seconds]
plotter has quit [Ping timeout: 245 seconds]
adambeynon has joined #ruby
okinomo has quit [Ping timeout: 240 seconds]
zipper_ has joined #ruby
sharms has joined #ruby
okinomo has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
mansi has joined #ruby
plotter has joined #ruby
brennanMKE has joined #ruby
mehlah has joined #ruby
shedd has joined #ruby
guardianx has quit [Ping timeout: 240 seconds]
monkegjinni has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
tkuchiki has quit [Ping timeout: 240 seconds]
brennanMKE has quit [Ping timeout: 240 seconds]
xiphias has joined #ruby
xiphias has joined #ruby
xiphias has quit [Changing host]
hololeap has quit [Ping timeout: 240 seconds]
falood has quit [Remote host closed the connection]
hololeap has joined #ruby
shedd has quit [Ping timeout: 246 seconds]
drago777 has quit [Ping timeout: 240 seconds]
Kar- has joined #ruby
cow_ has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
drago777 has joined #ruby
glen has joined #ruby
teoric has quit [Quit: WeeChat 0.4.1]
<glen>
if i do array.each do |n| .... how do i skip processing entry, like "next" in some languages?
kitak has joined #ruby
<hoelzro>
glen: next should work
<glen>
instead of doing if !CONDITION SOME_LOGIC end; i would like to do if CONDITION ... end; SOME_LOGIC
xiphias has quit [Remote host closed the connection]
<hoelzro>
>> (0..10).each { |n| next if n % 2 == 0; puts n }
joaoh82 has quit [Remote host closed the connection]
fntzr has joined #ruby
freerobby has quit [Ping timeout: 240 seconds]
sharms has joined #ruby
lukeholder has quit [Ping timeout: 246 seconds]
emocakes has quit [Read error: Connection reset by peer]
drago777 has joined #ruby
popl has quit [Quit: And then there are people who prefer to look their fate in the eye.]
joaoh82_ has joined #ruby
vpretzel has joined #ruby
Xeago has quit [Ping timeout: 240 seconds]
browndawg has quit [Quit: Leaving.]
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
kitak has joined #ruby
monkegjinni has joined #ruby
vpretzel has quit [Ping timeout: 240 seconds]
mansi has joined #ruby
popl has joined #ruby
popl is now known as Guest94097
brennanMKE has joined #ruby
joaoh82_ has quit [Remote host closed the connection]
kaldrenon has joined #ruby
shedd has joined #ruby
xiphias_ has joined #ruby
xiphias has quit [Ping timeout: 240 seconds]
drago777 has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
zxd has joined #ruby
kaldrenon has quit [Ping timeout: 240 seconds]
brennanMKE has quit [Ping timeout: 240 seconds]
Guest94097 has quit [Ping timeout: 240 seconds]
shedd has quit [Ping timeout: 240 seconds]
wildroman2 has quit [Remote host closed the connection]
popl_ has joined #ruby
popl_ has joined #ruby
popl_ has quit [Changing host]
drago777 has joined #ruby
cow_ has quit [Ping timeout: 240 seconds]
ewnd9 has quit [Remote host closed the connection]
zxd has quit [Ping timeout: 264 seconds]
ewnd9_ has joined #ruby
xiphias_ has quit [Ping timeout: 240 seconds]
isieo has joined #ruby
ewnd9_ has quit [Max SendQ exceeded]
xiphias has joined #ruby
okinomo has quit [Quit: Lost terminal]
Gooder has joined #ruby
xiphias has quit [Changing host]
xiphias has joined #ruby
razibog has joined #ruby
glen has left #ruby [#ruby]
pranny has quit [Quit: Leaving.]
<shevy>
Hanmac that xkcd quote is epic, I will show benzfr when he is online
EngierkO has joined #ruby
zipper has joined #ruby
m00nlight_ is now known as m00nlight
justinxreese has quit [Ping timeout: 246 seconds]
cow_ has joined #ruby
xiphias has quit [Ping timeout: 240 seconds]
rm__ has joined #ruby
xiphias has joined #ruby
butblack has joined #ruby
Speed has joined #ruby
monkegjinni has quit [Remote host closed the connection]
rm__ has quit [Ping timeout: 246 seconds]
denysonique_ has left #ruby [#ruby]
lyanchih has joined #ruby
sepp2k1 has joined #ruby
Xiti` has quit [Ping timeout: 264 seconds]
pranny has joined #ruby
pranny has quit [Client Quit]
XxLocutusxX has quit []
monkegjinni has joined #ruby
xiphias has quit [Ping timeout: 240 seconds]
sepp2k has quit [Ping timeout: 264 seconds]
xiphias has joined #ruby
pama has joined #ruby
cbetta is now known as cbetta_afk
grieg_ has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
Xiti` has joined #ruby
flubba has quit [Remote host closed the connection]
xiphias has quit [Ping timeout: 240 seconds]
xiphias has joined #ruby
joaoh82 has joined #ruby
xiphias has quit [Changing host]
xiphias has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
wildroman2 has joined #ruby
drago777 has joined #ruby
danshultz has joined #ruby
joaoh82 has quit [Ping timeout: 246 seconds]
browndawg has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
vpretzel has joined #ruby
olivier_bK has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
olivier_bK has joined #ruby
arietis has joined #ruby
timonv has joined #ruby
Virtualize has joined #ruby
vpretzel has quit [Ping timeout: 240 seconds]
xiphias has quit [Ping timeout: 240 seconds]
drago777 has quit [Ping timeout: 240 seconds]
mzdravkov has joined #ruby
xiphias has joined #ruby
drago777 has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
jxf has joined #ruby
psyprus has quit [Ping timeout: 240 seconds]
edwardly has quit [Ping timeout: 246 seconds]
freerobby has joined #ruby
kate_r has joined #ruby
zipper has quit [Ping timeout: 240 seconds]
psyprus has joined #ruby
niKeITA is now known as niKeITA_away
mark| has joined #ruby
tyl has quit [Remote host closed the connection]
niKeITA_away has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
drago777 has quit [Ping timeout: 240 seconds]
xiphias has quit [Ping timeout: 240 seconds]
drago777 has joined #ruby
joaoh82 has joined #ruby
xiphias has joined #ruby
doodlehaus has joined #ruby
mereghost has quit [Quit: Updates!]
freerobby has quit [Ping timeout: 246 seconds]
mereghost has joined #ruby
larissa has joined #ruby
<jxf>
A method accepts a block and may or may not have one passed. If it does have one, you want to run it. Is it idiomatic to write "block.call if block_given?" or "yield if block_given?"?
<jxf>
(Or something else?)
psyprus has quit [Ping timeout: 240 seconds]
grieg_ has quit [Quit: grieg_]
Gooder has quit [Remote host closed the connection]
<apeiros>
yield if block_given?
<mereghost>
jxf: yield if block_given?
shime has quit [Read error: Operation timed out]
<apeiros>
if you don't pass the block on, or store it, you should not explicitly name the &block param. it's more expensive.
razibog has quit [Remote host closed the connection]
<mereghost>
apeiros: which was a surprise to me a few years back.
xiphias has quit [Ping timeout: 240 seconds]
eliasp_ is now known as eliasp
<jxf>
apeiros: I sort of liked writing "block" explicitly because then it's self-documenting in the method signature. But I see what you're saying.
xiphias has joined #ruby
kiri has joined #ruby
kiri has quit [Read error: Connection reset by peer]
shime has joined #ruby
dingwall has quit [Remote host closed the connection]
<jxf>
Is it fair to say that Ruby doesn't really have closures, since that requires that closures be able to be passed around indistinguishably from other values, but you can only pass zero blocks or one block? Or is that a mischaracterization?
guardianx has joined #ruby
<apeiros>
jxf: a block is just one way to create a closure in ruby
<apeiros>
also "I can only pass one" is not equivalent to "there is no way"
<apeiros>
so yes, mischaracterization either way.
danshultz has quit [Remote host closed the connection]
mansi_ has joined #ruby
kiri has joined #ruby
danshultz has joined #ruby
xiphias has quit [Ping timeout: 240 seconds]
niKeITA has joined #ruby
psyprus has quit [Ping timeout: 240 seconds]
<shevy>
jxf can you give an accurate description of what constitutes a closure exactly for you?
niKeITA has quit [Client Quit]
brennanMKE has joined #ruby
razibog has joined #ruby
<canton7>
my_example_func(proc{ first closure }, proc{ second closure }, lambda{ third closure })
<jxf>
Sorry, I should have said "doesn't have true closures in the form of blocks", not that it doesn't have closures full-stop.
xiphias has joined #ruby
<shevy>
apeiros once wanted to be able to pass multiple blocks to the same method by the way :-)
<apeiros>
s/once//
psyprus has joined #ruby
<shevy>
hehe
<apeiros>
jxf: still wrong.
shedd has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
<shevy>
I still don't know how he defines a closure
jkamenik has joined #ruby
danshultz has joined #ruby
<jxf>
shevy: For me a closure is a block of code that can be executed by a reference to it, can be passed around indistinguishably as a value, and can refer to values in the context in which it was created.
mansi_ has quit [Ping timeout: 264 seconds]
<shevy>
well you have to store this block of code somewhere of course. other than that that's what you can do in ruby. foo('arg1') { @my_proc_object_here }
<jxf>
apeiros: Can you elaborate?
<shevy>
or through foo(&bla)
kep has joined #ruby
<apeiros>
jxf: the "indistinguishably" is a rather arbitrary addition of yours, for one
brennanMKE has quit [Ping timeout: 246 seconds]
<apeiros>
jxf: ruby is able to pass blocks around for another
kewubenduben has quit [Read error: Connection reset by peer]
<shevy>
yield.call(5) if block_given?
kewubenduben has joined #ruby
xiphias has quit [Ping timeout: 240 seconds]
<apeiros>
jxf: also as I said before - "only one" is not equivalent to "doesn't have it at all"
<jxf>
apeiros: All definitions are arbitrary. Some are wrong. :)
popl_ is now known as popl
shedd has quit [Ping timeout: 246 seconds]
<apeiros>
jxf: dude, no
<apeiros>
jxf: when you go around and make your own definitions, then you're wrong.
<jxf>
apeiros: I didn't say it "doesn't have it at all".
xiphias has joined #ruby
<apeiros>
jxf: of course you can go around and redefine a table as a squishy liquid. but then nobody will be able to meaningfully talk with you.
<jxf>
Not sure if you read the rest of what I said or not?
drago777 has quit [Ping timeout: 240 seconds]
doodlehaus has quit [Remote host closed the connection]
<apeiros>
jxf: anyway, also as said already: blocks are not the only way to create a closure in ruby. see canton7's comment.
<shevy>
I can extend canton7!
<shevy>
foo(proc{ first closure }, proc{ second closure }, lambda{ third closure }) { @proc_object }
dscrd has joined #ruby
jwest has quit [Quit: WeeChat 0.4.1]
apeiros has quit [Read error: Connection reset by peer]
<jxf>
apeiros: I'm aware they're not the only way to create something that looks like a closure. I'm asking if blocks *are* closures. It doesn't seem like they are, since method signatures don't permit you to have more than one at a time.
psyprus has quit [Ping timeout: 240 seconds]
mary5030 has joined #ruby
<shevy>
a block is mostly just a fancy way for extra arguments really
apeiros has joined #ruby
psyprus has joined #ruby
<apeiros>
… on some days I hate my ISP
<shevy>
the definition you use is odd though
<shevy>
if ruby would allow more than one block to a method, they would suddenly become closures for you?
drago777 has joined #ruby
<apeiros>
"Ruby doesn't really have closures … you can only pass zero blocks or one block"
<popl>
Where is that from?
<jxf>
shevy: Blocks would have to look like other values. "&foo" is clearly a block, and you can only have one of them. Special treatment.
klcant102 has joined #ruby
<jxf>
apeiros: Did you read the next statement?
<Xeago>
jxf: you don't understand the & syntax I think
<shevy>
jxf where do you see that &foo is a block?
vpretzel has joined #ruby
<shevy>
I use blocks to methods all the time, I rarely use or need &foo syntax
<Xeago>
proc { } creates for what by your definition is a closure
<apeiros>
jxf: your next statement doesn't make your characterization of closures or ruby having/not having them any more correct
<Xeago>
and you can pass it around exactly how you describe
<Xeago>
&syntax is used for different reasons
psyl0n has quit [Remote host closed the connection]
vpretzel has quit [Read error: Connection reset by peer]
<apeiros>
jxf: anyway: YES, it's a mischaracterization. period.
<apeiros>
blocks are closures. that you can only pass one doesn't make them not-closures.
vpretzel has joined #ruby
<Xeago>
that blocks are closures doesn't mean that blocks are the only closures..
vpretzel has left #ruby [#ruby]
<Xeago>
anyways, @work :)
<jxf>
Xeago: Right, proc is 100% a closure. `def foo(bar)` could be given any argument to `bar`, including a proc. But not `def foo(&bar)`.
psyl0n has joined #ruby
xiphias has quit [Ping timeout: 240 seconds]
<canton7>
jxf, you can call foo(&proc{ stuff }) ?
dscrd has quit [Ping timeout: 246 seconds]
rh1n0 has joined #ruby
<Xeago>
jxf: you still misunderstand &bar and how methods accept blocks
<apeiros>
true, anyways, holidays :-p
<Xeago>
bah, bastard :)
xiphias has joined #ruby
<jxf>
Xeago: Very likely :)
rh1n0 has quit [Max SendQ exceeded]
<Xeago>
been working for a wopping 7 hours already, and haven't even opened my editor or e-mail
<Xeago>
wtf have I done :3
<apeiros>
Xeago: well, they end today. and I'll only have some 50 days left after that 0:-)
<Xeago>
jeez
<Xeago>
do you have holiday on monday?
<Xeago>
don\t have holiday today, but on monday
<apeiros>
THAT is a good question
<Xeago>
really awkward
<Xeago>
it's like 3kingsday in holland
<shevy>
we have holiday
<Xeago>
or XmastreeBURNINHELLday
<shevy>
Heilige Drei Könige 06.01.2014
psyprus has quit [Ping timeout: 240 seconds]
zarul has joined #ruby
psyprus has joined #ruby
<shevy>
Xeago how can you work 7 hours without email!
<shevy>
or editor!!!
<shevy>
unless you must carry big and heavy bags
<Xeago>
?
<Xeago>
don't know
syamajala has joined #ruby
<Xeago>
played some foos
rm__ has joined #ruby
<Xeago>
had lunch
drago777 has quit [Ping timeout: 240 seconds]
<shevy>
heeh
<Xeago>
found breakfast at the office
<shevy>
lol
<popl>
Did you have to kill it?
<Xeago>
or well, attempted to but failed
butblack has quit [Quit: butblack]
<Xeago>
kill what popl?
<popl>
Breakfast.
<popl>
at the office
<Xeago>
I didn't kill it
<shevy>
he just found it
<Xeago>
I let it live..
LadyRainicorn has quit [Read error: Connection reset by peer]
xiphias has quit [Ping timeout: 240 seconds]
<shevy>
it's like the office where food can be found
<Xeago>
I failed to find it
<popl>
Grateful co-workers, then.
<shevy>
perhaps they poisoned it popl
<popl>
Hopefully you let them off with a flesh wound at least.
<olivier_bK>
what is the difference between $ and @ in ruby ?
HashNuke_ has joined #ruby
* Xeago
is confused
<Xeago>
olivier_bK: $ references global variables
<Xeago>
@ references instance variables
<olivier_bK>
okai thnaks
<shevy>
olivier_bK $ you can use everywhere
apeiros has quit [Ping timeout: 240 seconds]
xiphias has joined #ruby
<shevy>
>> module Foo; $bar = 'I want this to be available only in Foo!'; end; $bar
<LadyRainicorn>
Aw, I should be able to require stdlib stuff
<Hanmac>
hm ya evalin is a bit overprotective ...
<Hanmac>
charliesome: can you fix that ?
<charliesome>
i wonder why ruby is trying to do that
jbzt has joined #ruby
jbzt has quit [Client Quit]
<shevy>
guys can someone of you explain this to me:
<shevy>
Class.new(RuntimeError)
<shevy>
why is this created via Class.new?
<Xeago>
it creates a new class which is a logical subclass of RuntimeError
<Xeago>
so you can do things in a block for it
<shevy>
hmm
<Xeago>
and it only exists in your local scope
h_kon has quit [Remote host closed the connection]
<Xeago>
has no CapitalNameThingy to reference it
<waxjar>
also, class x < X; end is ugly :p
cgcardona_ has joined #ruby
<shevy>
waxjar is that not a syntax error?
cgcardona_ has quit [Client Quit]
<waxjar>
yeah, i think so.
ahri has joined #ruby
freerobby has joined #ruby
dblessing has joined #ruby
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
dagnachew has joined #ruby
dagnachew has quit [Max SendQ exceeded]
<ahri>
hi, i'm using backticks to execute a system command and would like to parse the output lines as they come -- i'm doing `cmd here`.each_line { |line| <stuff> } -- but my block is executed after the command has fully executed; can i stream the output through?
dagnachew has joined #ruby
spyderman4g63 has joined #ruby
<shevy>
I think it is possible ahri ... but I forgot how
<shevy>
I know that the acoc colourizer does that
<ahri>
more context; the command is long-running and i'd like to provide some feedback as it runs
<Hanmac>
shevy and before you ask, i dont think my binding is stable enough to add travis ... and it needs external C++ libs, i dont think travis can provide that
<shevy>
the ponicorns are in the house again
<LadyRainicorn>
Yeah I know there are so many popens
<shevy>
Hanmac I only saw it on another project, but thought that this is cool
<LadyRainicorn>
I have to look it up every time ;-;
<shevy>
I did not know you could use that with rubygems projects
<canton7>
the most common style is do..end for everything over 1 line, but there are people who prefer curley braces always
<waxjar>
ahri: there are two conventions. {} for single lines, do .. end for multiple lines and {} if you care about the return value, do .. end if you don't
Wolland has joined #ruby
<ahri>
ok, i'm glad i'm doing it the "normal" way then!
centipedefarmer has joined #ruby
sjohn3 has quit [Quit: leaving]
<shevy>
I like curly braces
<shevy>
one reason is visual
<shevy>
def foo
<shevy>
array.each {|entry|
<shevy>
}
<shevy>
end
<shevy>
but only for methods
arietis has quit [Quit: Computer has gone to sleep.]
<shevy>
I mean, in a method
<shevy>
DSL-style like in sinatra, it looks better without the {}
clamstar has quit [Quit: Computer has gone to sleep.]
doodlehaus has joined #ruby
<ahri>
i don't have any particular preference except to adhere to the norm; i have my fill of braces in C# and Java, and enjoy the lack of them in Python, with Ruby being closer to the Python end as far as number of braces in a file :)
aganov has quit [Quit: Leaving]
fuhgeddaboudit has quit [Ping timeout: 246 seconds]
<shevy>
I guess ruby code will always have more braces than python
<shevy>
you can use (or need) {} for blocks, Hashes... hmm
LadyRainicorn has quit [Ping timeout: 272 seconds]
<catphish>
does ruby have its own mechanism for STDOUT buffering? it doesn't appear to use the C stream library, but it does seem to buffer output differently when writing to a file vs TTY
<hasham>
Anyone having issues with 2.1.0 and rails 4.0, is it safe to move production app to 2.1
grieg has joined #ruby
LinearInterpol has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
tannerburson has joined #ruby
LadyRainicorn has joined #ruby
popl has quit [Quit: And then there are people who prefer to look their fate in the eye.]
gwb3 has quit [Quit: leaving]
gwb3 has joined #ruby
<shevy>
ruby is rather famous, it even has its own html tag
teddyp1cker has joined #ruby
aagdbl has quit [Quit: This computer has gone to sleep]
<tobiasvl>
lol
<LadyRainicorn>
haha
fntzr has quit [Quit: Leaving]
<LadyRainicorn>
I think it's a different tag.
johnmilton has joined #ruby
sambao21 has joined #ruby
grieg has left #ruby [#ruby]
rm__ has quit [Ping timeout: 272 seconds]
ocline has joined #ruby
yacks has joined #ruby
g0bl1n has joined #ruby
<Hanmac>
yeah that is <ruby> in html that allows you to write Japanese or other chars above other
<apeiros>
pcarrier: did you care to read Hash::new's docs?
<apeiros>
you know… which you should do when a method doesn't act as you expect it…
<pcarrier>
"If a block is specified, it will be called with the hash object and the key, and should return the default value."
<pcarrier>
that's exactly what I'm expecting
<pcarrier>
is it not?
<apeiros>
read on
<apeiros>
last sentence.
razibog has quit [Remote host closed the connection]
<pcarrier>
oh wait what?
<apeiros>
"It is the block's responsibility to store the value in the hash if required."
diegoviola has joined #ruby
<pcarrier>
"and should return the default value."
<pcarrier>
then how is what it returns used?
brennanMKE has quit [Ping timeout: 252 seconds]
freerobby has quit [Ping timeout: 245 seconds]
<apeiros>
o0
millerti has quit [Quit: millerti]
<apeiros>
no, that part you understood correctly.
<pcarrier>
apeiros: yeah, now I understand what I'm doing wrong
<apeiros>
or maybe you didn't either :-p
<pcarrier>
but now I misunderstand what "returns the default value" means
<pcarrier>
if I have to store what I want myself, what's "the default value"?
<pcarrier>
apeiros: also, thanks :)
momomomomo has quit [Quit: momomomomo]
<apeiros>
a default value is the value returned if a key is accessed which is not stored in the hash
intuxicated has joined #ruby
<apeiros>
normally that's nil (and note, that one does NOT get stored in the hash automatically either… it's just the default value)
<pcarrier>
ok ok, interesting
millerti has joined #ruby
<apeiros>
and a block allows you to have a dynamic default value instead of a static
<pcarrier>
that allows for some pretty crazy behaviours :)
Virtualize has quit [Read error: Connection reset by peer]
Virtualize has joined #ruby
lewix has joined #ruby
jedimind has joined #ruby
DouweM has joined #ruby
flame_ has quit [Quit: Computer has gone to sleep.]
Kneferilis has joined #ruby
tobago has joined #ruby
tylersmith has joined #ruby
IceDragon has joined #ruby
fmcgeough has joined #ruby
mfoo has joined #ruby
syamajala has quit [Quit: leaving]
<mfoo>
Is there some static analysis tool for ruby that will tell me when I'm catching an exception but not using it? (I would like to find places where exceptions are caught but not logged)
arietis has joined #ruby
<apeiros>
mfoo: note that the term "catch" means something different than rescue in ruby. you rescue exceptions, you don't catch them.
DrShoggoth has joined #ruby
lfox has joined #ruby
<apeiros>
there are a couple of static analysis tools for ruby. wouldn't know whether they can do specifically what you asked for. check ruby-toolbox.com for a list of such tools.
<weeb1e>
shevy: I don't usually, and I have already imploded rvm and manually deleted any remaining files
davorb_ is now known as davorb
<shevy>
I have never seen an automatic dishonouring of --prefix like that
<Hanmac>
shevy if you use --prefix=/usr and --enable-multiarch it should put the stuff to /usr/lib/x86_64-linux/ruby
<shevy>
yeah
senj has joined #ruby
gregoriokusowski has quit [Quit: gregoriokusowski]
<weeb1e>
havenwood: Is that able to install ruby to /usr/local? I'd rather not install it to /opt
Landshark753 has joined #ruby
rootshift has quit [Quit: rootshift]
<havenwood>
weeb1e: yeah, you can specify: ruby-install -i /usr/local/ ruby 1.9.3-p429
digital-ghost has joined #ruby
<weeb1e>
When I configure, I just use ./configure, no prefix or other options
<shevy>
weeb1e that defaults to --prefix=/usr/local
<weeb1e>
havenwood: Ok, I will try that then
mlpinit has joined #ruby
<shevy>
--prefix is always used, even when you do not specify it
<weeb1e>
shevy: Yeah I know that, that is where I have it installed on all my boxes
shedd has quit [Ping timeout: 260 seconds]
Sawbones has quit [Remote host closed the connection]
millerti has joined #ruby
<shevy>
weeb1e btw are you sure that fileutils.rb fails because of that error? I would assume that it would ignore already existing directories by default, otherwise one could not re-install things without cleaning up prior installs
sec^nd has joined #ruby
<weeb1e>
shevy: Well that is what it says,...
<shevy>
yeah but it could lie to you :)
<weeb1e>
Well I know of no way of forcing it to tell the truth :P
<shevy>
I have had situations where GNU autoconfigure said that "gtk is not installed" when some other xorg library .so file was not found (libxrender in that case)
DrShoggoth has joined #ruby
<shevy>
so I fixed libxrender and compiles worked. gtk worked all the time, but it reported wrongfully to me
meoblast001 has joined #ruby
dapz has joined #ruby
yacks has quit [Quit: Leaving]
millerti has quit [Ping timeout: 260 seconds]
<meoblast001>
not sure if this is really possible but it's worth throwing the question out. haven't found much on google. can i open a file and rewrite it without changing the file's creation date on a unix system?
tylersmith has quit [Remote host closed the connection]
<shevy>
meoblast001 I dont think so
cj3kim has joined #ruby
<meoblast001>
hm
<shevy>
it would be a bug in the way how unix works if that would be possible
<meoblast001>
i'll have to insert real creation date somewhere in the file then
<shevy>
perhaps you can recreate the original data
<shevy>
yeah
<meoblast001>
thanks
<weeb1e>
havenwood: Oh what extensions does ruby-installer include?
<meoblast001>
although now i don't know what the difference between ctime and mtime is
<weeb1e>
I need zlib, readline, syck and openssl
<meoblast001>
but i can look that up on my own
<havenwood>
weeb1e: ah, like what packages does it install?
<weeb1e>
So now I'm pretty much convinced that the official ruby source package is broken...
rien has joined #ruby
<weeb1e>
I can't see how this could be happening any other way
axl_ has quit [Quit: axl_]
cow_ has joined #ruby
byprdct has quit [Ping timeout: 272 seconds]
ckinni has quit [Client Quit]
<weeb1e>
I'm going to have to try build an older 1.9.3
Mars has joined #ruby
browndawg has left #ruby [#ruby]
Mars is now known as Guest61011
<atmosx>
anyone has experience with partials haml and sinatra?
iamjarvo_ has quit [Remote host closed the connection]
iamjarvo_ has joined #ruby
<weeb1e>
atmosx: Always better to ask your actual question, I'm sure many people do'
snath has joined #ruby
gja has joined #ruby
pushpak has quit [Quit: Leaving...]
<matti>
weeb1e: I have no issues building upstream Ruby.
<atmosx>
weeb1e: I want to use partials to change the layout menu according to user level. I have two methods !admin (admin level) and !protected (logged in user) to protect specific routes but I have no idea on how to proceed.
<weeb1e>
It compiles fine, but always fails to install with the above error\
maletor has joined #ruby
gja has quit [Client Quit]
cow_ has quit [Ping timeout: 260 seconds]
<shevy>
weeb1e can you tell me what you did with the source exactly?
jhn has quit []
SHyx0rmZ has joined #ruby
asteve has joined #ruby
<weeb1e>
atmosx: I define my own partial helper method, I could pastebin it for you but I'm sure the one in that repo will work too (I can't see what it is right now, my internet is being stubborn)
<shevy>
perhaps it points to an old one but ok, I'll assume it's the same
<shevy>
ok, configure has finished ... what next hmm
<shevy>
you did issue "make" or something else?
<weeb1e>
Well it says ruby-1.9.3-p484.tar.gz
<weeb1e>
configure, then make
<weeb1e>
then sudo make install
<shevy>
ok I run "make" now
<weeb1e>
`make` works fine for me
mccraig has joined #ruby
<shevy>
this may take a few minutes
catphish has quit [Quit: Leaving]
gja has joined #ruby
johnyboy6000 has quit [Remote host closed the connection]
<shevy>
my machine is not the super fastest
mccraig has left #ruby [#ruby]
<shevy>
go grab a beer :-)
<weeb1e>
I'm gonna grab ruby-1.9.3-p448.tar.gz from the last box I installed ruby on and try that so long
<weeb1e>
Let me know how it goes for you
lfox has joined #ruby
<shevy>
what did you do after "make" btw? directly "make install"? or did you try to extra-build some extensions manually (note, I think normally make will do that already... not 100% sure though)
<shevy>
compiling thread.c
<shevy>
compiling encoding.c
<shevy>
dumdedum *twiddles thumb*
<weeb1e>
Cannot grab a beer right now, still got tons to do tonight :(
SHyx0rmZ has quit [Ping timeout: 260 seconds]
<shevy>
haha
mlpinit_ has joined #ruby
<weeb1e>
shevy: I built the extentions before the first time I did `make`
<matti>
weeb1e: Building now...
pipecloud has joined #ruby
<matti>
weeb1e: ./configure --prefix=/tmp/test
<weeb1e>
I have had then not build in the past, so I now build them manually each time
<matti>
weeb1e: make -j2
<weeb1e>
I must remember that
<weeb1e>
I should be able to -j8
<weeb1e>
This box has two CPUs each with 4 physical cores (hyperthreading off)
<matti>
I have 7 yo notebook ;]
mlpinit has quit [Ping timeout: 260 seconds]
gja has quit [Client Quit]
<shevy>
weeb1e odd
<weeb1e>
Hehe
<shevy>
weeb1e I would skip the manual creation of extensions part
<shevy>
perhaps that step created some files that interfered somehow
<weeb1e>
shevy: It could be because I didn't have the native libs installed with apt before I built
jhn has quit []
freerobby has quit [Quit: Leaving.]
<shevy>
ok "make" is now at the last part ... "Generating RDoc documentation"
<weeb1e>
But I recall recompiling after installing them was not sufficient to fix it
lethjakman has joined #ruby
<apeiros>
weeb1e: iirc the recommendation is cores-1
<apeiros>
so -j7
dapz has quit [Ping timeout: 245 seconds]
<shevy>
well, debian/ubuntu modifies all sorts of things
jhn has joined #ruby
<weeb1e>
apeiros: Yeah probably, though this box is idle until I get my software installed
<weeb1e>
I guess the OS needs some CPU time for the filesystem and stuff though
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<shevy>
well you already use apt-get to install some things that are missing
<weeb1e>
448 does the same as 484
<weeb1e>
So I am officially screwed.
<shevy>
so the cd ext/* are not needed
<shevy>
weeb1e I am not yet at "make install", but I have the feeling that it will work 100% for me ;)
<shevy>
Generating code for file enc/trans/big5.c...
<shevy>
dumdedum ...
<weeb1e>
Sigh, then the only remaining factor is that this is a newer ubuntu 12.04 than any of my other boxes (it is 12.04.3)
Tamal has quit [Client Quit]
<weeb1e>
So unless RVM screwed something very strange up, it has to be the version of ubuntu
klaut_ has quit [Remote host closed the connection]
<weeb1e>
But the issue still doesn't make sense... How can `make install` create the directory twice?
<shevy>
I keep on telling you, I think there is another error
<weeb1e>
Well if you have any ideas on how I can debug this, I'm all ears
phipes has quit [Remote host closed the connection]
freerobby has joined #ruby
<weeb1e>
I have wasted more time on this now than I have spent installing ruby 20 times in the past
tylersmith has joined #ruby
zeeraw has joined #ruby
cameronbarton has quit [Quit: cameronbarton]
<shevy>
yeah a moment
joaoh82 has quit [Remote host closed the connection]
<weeb1e>
Alternatively, maybe I should just rsync the entire 448 installation from another box
<shevy>
I am at this here now
<shevy>
Generating docs for file ext/ripper/ripper.c...
shime has joined #ruby
rm__ has joined #ruby
<shevy>
I also keep on telling you that if it is only the gems you miss, then you can copy all .gem files from cache/ subdirectory, then batch-install them via "gem install", without dependency checking
mlpinit_ has quit [Remote host closed the connection]
<shevy>
but
<shevy>
I dont use bundler
<shevy>
I just use "gem"
<shevy>
Running dot for graph 285/503
<shevy>
dumdedum ...
troyready has joined #ruby
<shevy>
compiling ruby 1.8.3 was a lot more fun then 1.9.x and higher :(
soobus has joined #ruby
<shevy>
*than
<mereghost>
shevy: you have a twisted sense of fun. :p
ahmedelgabri has joined #ruby
<atmosx>
compiling fun?
<atmosx>
you'd love gentoo
<weeb1e>
I'm not sure what you mean by that, I can't install ruby, gems are irrelevant at this point...
_aeris_ is now known as [_aeris_]
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
<shevy>
FINALLY
<shevy>
"make" has finished
<shevy>
weeb1e, shall I try to build the extensions first, or should I run "make install" now?
<weeb1e>
Just make install
relix has joined #ruby
<shevy>
ok
tylersmi_ has joined #ruby
tylersmith has quit [Ping timeout: 252 seconds]
cameronbarton has joined #ruby
devdaz___ has joined #ruby
<shevy>
weeb1e, all worked, no errors, output is at http://pastie.org/pastes/8597661/text - I will now verify that this ruby works, but I am pretty sure it works
ahmedelgabri has quit [Client Quit]
<shevy>
irb starts up fine, I am quite sure that all is in order
<weeb1e>
Copy pasted from the SSH session that I did that in
ambushsabre has quit [Quit: rip]
ahmedelgabri_ has quit [Client Quit]
adam has quit [Disconnected by services]
<Hanmac>
weeb1e: i do still wonder why you try to build 1.9? isnt 2.1 released last month?
<weeb1e>
shevy: I wonder what will happen if I just hack fileutils.rb to continue :P
adam_ has joined #ruby
Neomex has joined #ruby
gasbakid has quit [Read error: Connection reset by peer]
<weeb1e>
Hanmac: I don't have the time to test and make my large platforms compatible with 2.0
<weeb1e>
They rely on tons of gems and do some pretty complex and hacky things
pzula has joined #ruby
<Hanmac>
or in other words: "rails shit"
<weeb1e>
I did use 2.0 for my newest project at least, but that is just for 1 application of 3 which makes up a single web app
<weeb1e>
Hanmac: I have never used rails for a personal project, even though I learnt it at the same time as ruby
rm__ has quit [Remote host closed the connection]
lukec has joined #ruby
<weeb1e>
I use ActiveSupport and AR when I work with legacy MySQL DBs, but that's all
fijimunkii has joined #ruby
<weeb1e>
Web stuff is all sinatra, websockets, haml, coffeescript
* Hanmac
splits at ActiveSupport
<terrellt>
You splitted at it?
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
havenwood has joined #ruby
brennanMKE has joined #ruby
<weeb1e>
Hanmac: Don't do that, even though I don't use tons of AS features, I use enough to be worth including in pretty much every application I build. It provides many convenient helpers
devdaz___ has quit [Quit: Bye]
subbyyy_ has joined #ruby
<weeb1e>
A few months ago I actually went through most of the AS features I use in this channel when it was under discussion
<Hanmac>
after so many years, activesupport still doesnt do the human file size correct
devdaze__ has joined #ruby
<weeb1e>
I ended up realizing I use more than I thought I did, and even realized a few things were AS that I thought were part of ruby
devdaze__ has quit [Client Quit]
<weeb1e>
That is one thing I have not used, I actually have my own helper for that
lyanchih has quit [Quit: lyanchih]
<Hanmac>
"and even realized a few things were AS that I thought were part of ruby" <<< and thats exactly my problem with rails/AS users
<weeb1e>
When I say a few things, I mean like 2...
<Hanmac>
weeb1e: "That is one thing I have not used, I actually have my own helper for that" let me guess for you 1KB = 1024B right?
<weeb1e>
I am pretty damn familiar with ruby and the libraries I use
Virtualize has quit [Read error: Connection reset by peer]
<weeb1e>
He has no idea why I am experiencing either of my issues
<havenwood>
weeb1e: neither do i
mfoo has quit [Quit: Leaving]
<weeb1e>
But I am about to give up for today
tedstriker has joined #ruby
w4pm has quit [Ping timeout: 245 seconds]
<weeb1e>
I have wasted too much time, been awake since very early and the heat is still killing me slowly
<havenwood>
weeb1e: I've had good luck with ruby-install/chruby on debian, keeps it simple. ;)
<pontiki>
have you tried just compiling the source?
<weeb1e>
I suppose I could try just manually install that binary package
<havenwood>
weeb1e: good luck!
<havenwood>
weeb1e: yeah, the binary is prolly what i'd try
<weeb1e>
pontiki: Only for the past 3 hours
<pontiki>
withOUT rvm
<apeiros>
weeb1e: heat? move over here. you'll have nothing of that.
<mereghost>
later folks. The pub is calling.
<shevy>
hehehe
<weeb1e>
pontiki: Only for the past 2.5 hours
mereghost has left #ruby ["Pub time!"]
<havenwood>
pontiki: he started with RVM, then things got wild
<pontiki>
huh
<pontiki>
i do it alla time
<apeiros>
pub… oh my, that reminds me that my stash has run dry :(
<weeb1e>
apeiros: Would be ideal, Global Warming will be the end of me
<shevy>
pontiki it fails during make install, with a bogus report that a directory already exists
<havenwood>
pontiki: multi-user install of rvm, then rvm implode, then build
<weeb1e>
pontiki: Yeah yeah, no one can reproduce my issue, tell me what is causing it or how to fix it
<havenwood>
pontiki: i dunno what the issue is
<shevy>
weeb1e teaches you to rely on things other people compiled for you ;)
<weeb1e>
I have installed 1.9.3 on 15 boxes in the past
<pontiki>
i do it on a clean box alla time tho, no intermediary rvm thing
<shevy>
but to be honest weeb1e
wallerdev has joined #ruby
<shevy>
weeb1e I think that even on a default ubuntu install, I can compile ruby cleanly
<shevy>
in fact, I just did that on my laptop :-)
<havenwood>
shevy: for sure on a standard ubuntu box it works fine
<shevy>
yeah
<weeb1e>
shevy: In this case, it really doesn't, if I could compile this from source, I would have already :(
<shevy>
weeb1e something you did is odd
w4pm has joined #ruby
rm__ has joined #ruby
<shevy>
weeb1e but I just did on ubuntu!!!
<shevy>
psych was not available, readline
<shevy>
but other than those two, all worked so far
<shevy>
(ok perhaps zlib will also fails at run-time, but I will recompile zlib lateron)
dann_ has quit [Ping timeout: 272 seconds]
<weeb1e>
apeiros: I think stash has a different meaning over here :P
<shevy>
psych/libyaml I just compiled, now I recompile ruby again. I am 99,9999% sure that it will work though
interactionjaxsn has quit [Ping timeout: 272 seconds]
jhn has quit []
SHyx0rmZ has joined #ruby
<havenwood>
shevy: If you want everything working: sudo apt-get install -y build-essential libffi-dev libgdbm-dev libncurses5-dev libreadline-dev libssl-dev libyaml-dev zlib1g-dev
<apeiros>
weeb1e: can't be used to mean where you store your alcoholic beverages?
<havenwood>
`make --jobs` for speeeed!
<weeb1e>
First step for installing ruby on a new box for me is: sudo apt-get install libedit-dev libssl-dev libyaml-dev
<shevy>
weeb1e see, add what havenwood just pasted too
<weeb1e>
apeiros: Not too commonly at least
<shevy>
but I am beginning to believe, even if you do all that, you will run into the same error. I think you must have done something else to your system
<weeb1e>
apeiros: More common meaning would be closer to something like medical marijuana :P
<shevy>
wow that's a long list pontiki
<shevy>
tcl-dev
<shevy>
tk-dev
<shevy>
!
<shevy>
do you use ruby-tk pontiki
<pontiki>
like, once
Bumptiou_ has joined #ruby
Bumptious has quit [Ping timeout: 240 seconds]
<weeb1e>
TK is too limited, every other GUI framework is too bloated
brianpWins has quit [Quit: brianpWins]
<weeb1e>
GUI stuff is just terrible, I ended up building a separate GUI front end and IPC for my only ever GUI ruby app
mosez is now known as hipone
<pontiki>
i decided i was only going to do web apps
mehlah has joined #ruby
<pontiki>
more common interface
<weeb1e>
I have always done that, but for that specific app (something very similar to dropbox), desktop GUI and specifically a tray icon + balloon notifications were needed
Brolen has quit [Quit: Brolen]
rm__ has quit [Remote host closed the connection]
<havenwood>
hmm, i guess we can remove libncurses5-dev as an apt dependency for 2.1+
hipone is now known as mosez
Yarou has quit [Quit: This computer has gone to sleep]
<apeiros>
weeb1e: well, that part of my stash started out dry, doesn't mean I have nothing :D
rm__ has joined #ruby
<weeb1e>
apeiros: Haha
axl_ has joined #ruby
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fantazo has quit [Ping timeout: 245 seconds]
tyl has joined #ruby
kalelsage has quit [Quit: ThrashIRC v2.9 sic populo comunicated]
meatherly has quit [Remote host closed the connection]
mrfoto has quit []
<Eiam>
i thought it was your git stash =0
<shevy>
weeb1e ok so the good news is - on ubuntu we can compile ruby just fine and everything works well
pushpak has joined #ruby
<weeb1e>
shevy: That would be bad news for me :P
<shevy>
no, it means that it is possible! that is good news
chomskiii has quit [Ping timeout: 245 seconds]
<weeb1e>
But impossible for anyone to reproduce my issues
w4pm has quit [Ping timeout: 246 seconds]
<shevy>
hmm
<shevy>
but ruby used to work on the very same machine before, right weeb1e?
<weeb1e>
It is seeming rather likely that RVM broke my system, in some extremely strange way
marr has quit [Ping timeout: 272 seconds]
<shevy>
no idea, I don't use RVM myself
shadoi has joined #ruby
<weeb1e>
I installed ruby with RVM before trying to install system ruby, which was clearly a mistake
<shevy>
perhaps bundler installed a gem that modified thingies :>
teddyp1c_ has joined #ruby
ae-r has joined #ruby
<shevy>
but if you have more than machine, actually, you could just compile on that other machine and copy the binaries/files to that other machine
<shevy>
*more than one machine
<weeb1e>
RVM just seemed like a good option, since I had a good experience using it when I installed 2.0 on one of my boxes recently
<shevy>
RVM normally works too
<shevy>
I think the best you can do is to start from scratch and watch closely when, where and how this mysterious error emerges
<weeb1e>
Yeah, but havenwood linked me to RVM's binary package, so I'm just gonna manually install that
Yarou has joined #ruby
<shevy>
\o/
<weeb1e>
Should be good enough
<shevy>
havenwood to the rescue
* havenwood
flees!
<weeb1e>
And "starting from scratch" isn't really an option
<shevy>
I always knew he should have been called heavenwood
mojjojo has joined #ruby
<shevy>
pfffft
<weeb1e>
Since I have no physical or remote KVM access to this box
<shevy>
people need to build more linux from scratch
mrfoto has joined #ruby
<weeb1e>
The OS is staying
lewix has joined #ruby
<shevy>
something is bugged with that box!
teddyp1cker has quit [Ping timeout: 245 seconds]
havenwood has quit [Remote host closed the connection]
<shevy>
one day you'll find out what it was :)
chomskiii has joined #ruby
<weeb1e>
I'd love to know, more than just working around the issue
<weeb1e>
It is a pretty strange issue
w4pm has joined #ruby
meatherly has joined #ruby
teddyp1c_ has quit [Ping timeout: 252 seconds]
mneorr has quit [Remote host closed the connection]
teddyp1c_ has joined #ruby
mneorr has joined #ruby
DrShoggoth has quit [Remote host closed the connection]
includex has quit [Ping timeout: 260 seconds]
millerti has joined #ruby
ae-r has quit [Remote host closed the connection]
relix has joined #ruby
bean has joined #ruby
phipes has joined #ruby
lewix has quit [Remote host closed the connection]
ddd has quit [Quit: KERNEL REBOOT: Updating kernel due to security updates. bbs]
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
stkowski_ has quit [Quit: stkowski_]
iamjarvo has joined #ruby
cameronbarton has quit [Quit: cameronbarton]
ddd has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
dzan has quit [Remote host closed the connection]
dima_ has quit [Remote host closed the connection]
burlyscudd has joined #ruby
sambao21 has joined #ruby
reset has joined #ruby
Bumptious has joined #ruby
phipes has quit [Ping timeout: 245 seconds]
Bumptiou_ has quit [Ping timeout: 240 seconds]
cameronbarton has joined #ruby
colonolGron has joined #ruby
dann_ has joined #ruby
specious has quit [Ping timeout: 265 seconds]
meatherly has quit [Read error: Connection reset by peer]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
meatherly has joined #ruby
sambao21 has quit [Client Quit]
flubba has joined #ruby
specious has joined #ruby
RaCx has joined #ruby
iamjarvo has quit [Remote host closed the connection]
lewix has joined #ruby
tylersmi_ has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
bricker`1way has joined #ruby
tylersmith has joined #ruby
bricker`1way is now known as bricker
dogweather has joined #ruby
dogweather has quit [Remote host closed the connection]
Bumptiou_ has joined #ruby
dogweather has joined #ruby
Xeago has quit [Remote host closed the connection]
hamed_r has quit [Quit: Ex-Chat]
<shevy>
yeah
Xeago has joined #ruby
bricker`away has quit [Ping timeout: 260 seconds]
Bumptious has quit [Ping timeout: 240 seconds]
senj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mbytes has joined #ruby
joaoh82 has joined #ruby
dpswireless has quit [Remote host closed the connection]
agjacome has joined #ruby
ninegrid has quit [Quit: leaving]
ninegrid has joined #ruby
iamjarvo has quit [Ping timeout: 260 seconds]
smathieu_ has joined #ruby
smathieu has quit [Ping timeout: 245 seconds]
Sawbones has quit [Ping timeout: 245 seconds]
rootshift has joined #ruby
cascalheira has quit [Quit: Leaving...]
Xeago has quit [Ping timeout: 245 seconds]
<dann_>
hey if i have a class named Klass where #initialize is just @var = yield
joaoh82 has quit [Ping timeout: 260 seconds]
<dann_>
do i initialize it like Klass.new do (block) end?
mneorr_ has joined #ruby
colonolGron has quit [Quit: Lost terminal]
krz has quit [Quit: WeeChat 0.4.2]
cj3kim has joined #ruby
dzan has joined #ruby
havenwood has joined #ruby
Asher has quit [Quit: Leaving.]
kcombs has quit [Remote host closed the connection]
<apeiros>
dann_: yes
<dann_>
ah
<apeiros>
dann_: also: pry or irb
<apeiros>
can easily be used to verify an idea ;-)
jameshyde has joined #ruby
FifthWork is now known as FifthLunch
<dann_>
irb
<dann_>
I have pry on me though
peneconleche has quit [Quit: Leaving...]
<dann_>
apeiros: what idea then?
shadoi has quit [Quit: Leaving.]
<apeiros>
20:13 dann_: do i initialize it like Klass.new do (block) end?
<apeiros>
your own
breakingthings has quit []
kep has quit [Quit: WeeChat 0.4.2]
rootshift has quit [Quit: rootshift]
mneorr has quit [Ping timeout: 272 seconds]
bentonrr_ has joined #ruby
dogweather has quit [Remote host closed the connection]
<dann_>
what am I doing wrong here? the do..end notation?
<dann_>
I'm on 1.9.3 btw
digifiv5e has quit [Quit: quit]
<apeiros>
why would *any sane person* paste code as a freaking IMAGE?!?
<wmoxam>
lol
<apeiros>
I NO CAN HAS UNDERSTAND!
<wmoxam>
dann_: gist.github.com
<wmoxam>
;)
<dann_>
yes thanks, i've never used the internet before xoxo
<Hanmac>
apeiros: what about a scene shot with a camera from an image of the code? ;D
lfox has quit [Quit: ZZZzzz…]
<wmoxam>
dann_: obvsly
<apeiros>
dann_: puts returns nil
<dann_>
better yet, let me do that to the screenshot
<apeiros>
hence the block returns nil
<apeiros>
wmoxam: and now he'll gist the image…
jameshyde has quit [Ping timeout: 260 seconds]
<havenwood>
i'm gunna start pasting screenshots of my gists
bentonrr has quit [Ping timeout: 252 seconds]
<wmoxam>
apeiros: lol
<wmoxam>
I hope so
<apeiros>
havenwood: make sure you take a screen capture of that process which you then post on vimeo
<dann_>
then screenshot the URL
<apeiros>
I'll post my next problem as a soundfile
<dann_>
I want an MD5 of it before I open it
* apeiros
wonders how to capture the output of the `say` command line command
centipedefarmer has quit [Read error: Connection reset by peer]
cj3kim has quit [Ping timeout: 265 seconds]
centipedefarmer has joined #ruby
<havenwood>
apeiros: -o say.wav
<apeiros>
oooh
<Eiam>
ffffff that'll be awful
<apeiros>
nice one!
croaky has quit [Ping timeout: 246 seconds]
<dann_>
can I do proc yield?
<dann_>
@var = proc yield ?
mneorr_ has quit [Remote host closed the connection]
<apeiros>
did you try in irb?
Al__ has quit [Quit: Al__]
<dann_>
doing it rn
<havenwood>
eww, nvm with wav, mp4 :P
mneorr has joined #ruby
<dann_>
^FLAC
<havenwood>
it doesn't infer file format from wav
<Hanmac>
dann_ the problem is the "puts" in the block
<dann_>
I want @var to be a Proc of the code block I feed the class
<dann_>
Hanmac: how so
<havenwood>
dann_: flac works nicely ;)
<apeiros>
dann_: def initialize(&block) @foo = block; end
ferr has joined #ruby
<apeiros>
apple has its own lossless format, I think they prefer that over flac
end_guy has quit [Ping timeout: 240 seconds]
<havenwood>
-o out.aiff, --output-file=file
FifthLunch has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mneorr_ has joined #ruby
<dann_>
apeiros: thanks
<havenwood>
"AIFF is the default and should be supported for most voices..."
cameronbarton has joined #ruby
<havenwood>
yup
<ferr>
hi. Should I read "Learn Ruby the hard way" or "Programming Ruby 1.9 & 2.0" as a newbie?
mary5030_ has joined #ruby
<havenwood>
ferr: Programming Ruby
<dann_>
ferr: how virile are you
mneorr has quit [Ping timeout: 245 seconds]
tt1187 has quit [Ping timeout: 246 seconds]
<shevy>
ferr the best way is to start to write ruby code as soon as possible yourself
<havenwood>
ferr: for those new to programming, i've heard high praise for Learn to Program by Chris Pine (which is Ruby)
<shevy>
yeah
hiall has quit [Ping timeout: 245 seconds]
<wmoxam>
the best way depends on experience with other languages :p
tedstriker has quit [Quit: Anti-Fraping status set.]
<ferr>
I have no prior experiences except pascal at school years ago
endash has joined #ruby
wang has joined #ruby
<shevy>
Learn to Program gave a good introduction. it's a bit old now but very simple, go read it first ferr, you can finish it in I'd say 1-2 hours easily, especially if you skip the homework examples it gives you
frx has quit []
<shevy>
ferr most of the scripting languages (perl python ruby php) are really in essence rather similar, I mean the basics. most use functions/methods, most offer some way to OOP too
mrfoto has quit []
<dann_>
ferr: rubymonk.com
RaCx has quit [Quit: Computer has gone to sleep.]
<shevy>
I had one year of pascal too :)
<shevy>
I was very proud...
tedstriker has joined #ruby
<shevy>
(in school)
includex has joined #ruby
<ferr>
lol
frx has joined #ruby
<ferr>
thanks for your advices
<shevy>
we calculated the area of rectangles and circles
lewix_ has joined #ruby
mary5030 has quit [Ping timeout: 264 seconds]
<havenwood>
ferr: Learn Ruby the Hard Way reads like a bad port of Python code to Ruby.
hakanensari has joined #ruby
<dann_>
shevy: in a whole year
<shevy>
I think that's about all I can remember from that
<shevy>
dann_ yeah
vlad_starkov has quit [Remote host closed the connection]
brianpWins has joined #ruby
<apeiros>
havenwood: odd. the author of it started out with ruby.
<havenwood>
ferr: Probably easy for a Python programmer to get, but often not idiomatic Ruby.
<dann_>
outstanding
<shevy>
dann_ it was only 1 hour in a week... 30 minutes was done by the prof speaking about shit and I was sleeping during that
<havenwood>
apeiros: for loops, etc :O
<dann_>
ewww for
<shevy>
dann_ and walking to the PC rooms took +5 minutes too hehe
<apeiros>
havenwood: I didn't say I don't believe you :)
<ferr>
ok so Learn to program by Chris Pine and then to Programming Ruby?
<apeiros>
havenwood: I just find it odd, that it is that way. given the circumstances.
<shevy>
ferr yeah but! remember to start writing on your own as soon as possible!
<ferr>
It doesn't matter if Chris Pine is outdated?
pythys has joined #ruby
iamjarvo has joined #ruby
<dann_>
shevy is right, and rubymonk is pretty much just practical learning
sharms has quit [Ping timeout: 240 seconds]
maestro` has joined #ruby
<maestro`>
is ruby a functional programming language?
Bumptious has joined #ruby
<pythys>
hello everyone. I am having some difficulty installing any packages with gem. I get error messages like this -> ERROR: While generating documentation for bundle-0.0.1
<havenwood>
maestro`: functional training wheels
vlad_starkov has joined #ruby
<ferr>
thanks for your support
<ferr>
see you later
<dann_>
pythys: try gem update rdoc
<shevy>
ferr well it does not matter
<pythys>
I am running as root, so I exclude the permission issue
colonolGron has joined #ruby
<shevy>
ferr just keep it in mind
Pixels has joined #ruby
Xeago has joined #ruby
<shevy>
ferr it is not 100% the latest and greatest, ruby 2.1.1 added new things compared to that. I think chris pine does not mention lambda operator ->
<ferr>
start writing as soon as possible - I got it
<shevy>
but
<shevy>
start simple
<havenwood>
maestro`: but mixed-paradigm, certainly not purely functional but dips its toes in the pond
<shevy>
you learn everything at a later point anyway. good luck
hakanensari has quit [Client Quit]
Bumptiou_ has quit [Ping timeout: 240 seconds]
<ferr>
ty
<pythys>
dann_: "nothing to update"
<maestro`>
havenwood not to start a flamewar, but is it leaning more toward functional programming side than python?
<shevy>
pythys is that really a gem? bundle-0.0.1
gja has joined #ruby
<pythys>
shevy: I am just issuing the command gem install bundle
iamjarvo has quit [Read error: Connection reset by peer]
grep_awesome is now known as grep_away
<shevy>
no
<pythys>
am I supposed to explicitly specify the version?
<shevy>
"You really mean `gem install bundler`. It's okay. I'll fix it for you this one last time..."
<shevy>
so I am quite sure, you should have used "gem install bundler" instead
<havenwood>
maestro`: Ruby has lazy enumerator, etc and a nice functional style. More so than Python I think but I'm no Python expert.
<shevy>
the gem is bundler, the binary/file to invoke things usually are: bundle foo bla
<pythys>
shevy: sounds great, thank you!
cj3kim has joined #ruby
sarcher has left #ruby [#ruby]
<shevy>
pythys, you can search for gems on rubygems.org - see at bundler here https://rubygems.org/gems/bundler, you can see release versions + date. For instance: 1.5.1 December 28, 2013 (278 KB)
subbyyy_ has quit [Ping timeout: 252 seconds]
<shevy>
so the last release was only like ~5 or 6 days ago
<havenwood>
maestro`: Ruby 2.1 has an immutable string literal, there are some great gems like atomic etc.
grep_away is now known as grep_awesome
Xeago has quit [Ping timeout: 252 seconds]
burlyscudd has quit [Read error: Connection reset by peer]
sharms has joined #ruby
iamjarvo has joined #ruby
burlyscudd has joined #ruby
<havenwood>
maestro`: I think more Rubyists get into functional languages like Clojure than do Pythonistas, but I really have nothing to back that up but a hunch.
<pythys>
shevy: I have a problem here. If I issue gem install bundler, I do not get the bundle command, which is needed for the installation of my package
ferr has left #ruby [#ruby]
<shevy>
hmm
strax has joined #ruby
<havenwood>
maestro`: Then again, maybe more Python folk than I realize are fans of Haskell/ML?
<shevy>
I remember I had that problem as well
<shevy>
pythys I dont know how I fixed it, I think I once did gem install rails, and bundler was downloaded, and then worked back then
<maestro`>
havenwood i have no idea :). just deciding what to learn between python and ruby
<shevy>
pythys there should be a channel called #bundler
iamjarvo_ has joined #ruby
<havenwood>
maestro`: Learn Ruby.
<dann_>
try gem remove bundler
<shevy>
51 people are there
<shevy>
dann_ hehehe
<dann_>
and then gem install bundler -f
<havenwood>
maestro`: Ruby has such a nice Lisp and Functional underpinning, great language to branch out from.
<dann_>
i /think/ it's -f to force the install
cameronbarton has quit [Quit: cameronbarton]
<maestro`>
havenwood ah i see, interesting
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
end_guy has joined #ruby
michael_mbp has quit [Excess Flood]
cameronbarton has joined #ruby
sambao21 has joined #ruby
<maestro`>
what ruby tutorial is usually recommended for beginners?
<wmoxam>
havenwood: it's also a nice Smalltalk without having to be trapped in an insular environment
lewix has quit [Remote host closed the connection]
dpswireless has joined #ruby
nobitanobi has joined #ruby
<maestro`>
thanks!
<havenwood>
wmoxam: for sure!
<pythys>
dann_: no good, bundle is still not installed
<pythys>
I am on gem version 1.8.15
breakingthings has joined #ruby
<wmoxam>
I tried to do something useful in Squeak last night
<pythys>
which comes by default with ubuntu precise
<wmoxam>
failed :(
<dann_>
pythys: did you do gem install bundle -f
lewix_ is now known as lewix
lewix has quit [Changing host]
lewix has joined #ruby
iamjarvo has quit [Ping timeout: 265 seconds]
<havenwood>
pythys: I was going to say `gem update --system` but debian....
gja has quit [Quit: This computer has gone to sleep]
<dann_>
«[18:42] <dann_> and then gem install bundler -f» uh
<pythys>
dann_: same error as before
agent_white has joined #ruby
<pythys>
havenwood: yes, it's proving to be a harsh development environment
<dann_>
pythys: you can reinstall gem
<pythys>
dann_: very much doubt that's a solution, I'll give it a try (did before)
<havenwood>
pythys: I usually just install Ruby with ruby-install and switch with chruby on debian rather than messing with apt-get and update-alternatives due to poor debian packing choices (imho)
mojjojo has quit [Quit: mojjojo]
<havenwood>
s/packing/ruby-packaging
<havenwood>
pythys: I want a *real* RubyGems that can update itself. And one that doesn't require sudo...!
Virtualize|away has quit [Quit: Leaving...]
interactionjaxsn has joined #ruby
<agent_white>
Afternooon folks
Guest35909 has quit [Remote host closed the connection]
malkomalko has joined #ruby
<Mon_Ouie>
You can always ask rubygems to install in your home directory (with --user-install)
cj3kim has quit [Read error: Connection reset by peer]
axl_ has left #ruby [#ruby]
Asher has joined #ruby
<pythys>
dann_: I read that already
<havenwood>
pythys: RVM ought work as well but is a much more complicated tool, weighing in at tens of thousands of lines of code not hundreds.
<dann_>
well I'm out of ideas
<havenwood>
pythys: But the apt-get version of RVM is poison.
<pythys>
havenwood: I can't find ruby-install results on google. What is that?
burlyscudd has quit [Quit: Leaving.]
DrShoggoth has joined #ruby
<havenwood>
pythys: pasted link a few lines above ^, it is a very simple tool to install Ruby dependencies with your system package manager, then download and compile Ruby
<havenwood>
pythys: Just automates a simple proper build of Ruby.
<pythys>
god damn, I've to unpack configure make make install!
vlad_starkov has quit [Remote host closed the connection]
<havenwood>
hehe
DrShoggoth has quit [Max SendQ exceeded]
devdazed has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
DrShoggoth has joined #ruby
devdazed has joined #ruby
pagios has quit [Remote host closed the connection]
<shevy>
pythys there is always pain
simoz9 has joined #ruby
<shevy>
either you use distribution-specific tools but then you are at the mercy of what that distribution gives you
<bricker>
I know Ruby doesn't have hard "interfaces" (in the Java sense), but the pattern is useful. What do you guys do when you make a module that depends on certain methods in the base class? Just document it really well? That's what I do but I wonder if there's any use to actually checking that the interface requirements are met in the `included` hook.
<shevy>
or you dig into the core, compile from source, which may have less issues, but may take more of your time (and possibly more knowledge of what you do)
FifthWork has joined #ruby
<shevy>
things like rvm, ruby-install etc... are somewhere in the middle of these extremes
<IceDragon>
>.> did someone say compile ruby?
<IceDragon>
I've been doing that for the past week... ;x
<bricker>
So rather than getting "undefined method" errors, you get a clear error: "You must define the xxx method to use this module."
<shevy>
bricker I dunno, I found throwing things into modules is usually best
<shevy>
bricker and I dont often subclass
carraroj has joined #ruby
<pythys>
shevy: rvm crashed, ruby-install is not even showing in my results
<shevy>
pythys hey, I am not recommending any of that! just saying. I compile everything from source myself
<IceDragon>
bricker: you could define a method on Module : abstract which would raise an error unless its overwritten
<havenwood>
pythys: ruby-install is should be the top result in google if you search for `ruby-install` ;P
<shevy>
bricker don't think I yet had that... hmmm
dogweather has joined #ruby
<pythys>
shevy: yeah, now I have to download all those dependencies and go through a tear inducing process
<shevy>
bricker that's some extra method signature you basically want to use there in a module right?
<pythys>
wow, I did not expect this to be so bitter tasting
<havenwood>
shevy: compiling from source makes sense, but if you don't want to do research ruby-install does it for you
Kar- has joined #ruby
<bricker>
IceDragon: Yeah, that's what I mean - like Java's @Override. That's trivial to do, but I wonder if it goes against Ruby's core philosophy or some BS like that. I've never seen an example in the wild of interface enforcement in Ruby.
<havenwood>
pythys: you got bit by debian ;P
<havenwood>
pythys: Fedora or Arch etc have a great default install.
senj has joined #ruby
<shevy>
pythys I know! going the "compile everything from source" was painful in the beginning but nowadays it's better than the alternatives. I do: "ue url-to-program-path", then ruby compiles all for me. that's the only thing I have to do basically these days
<IceDragon>
bricker: ruby is intended to be dynamic and ever changing so its expected.
lfox has joined #ruby
<fbernier>
Is it possible to specify the file permission upon creation of a TempFile ?
<pythys>
shevy: what if you mess-up the compilation, do you know which directories to clean up?
<shevy>
pythys I also have to keep archives for local backups. so I have all of qt gtk glibc gcc etc...
<IceDragon>
Arch is so simple: pacman -S ruby
<IceDragon>
:P
<havenwood>
IceDragon: And latest Ruby patch release <3
<shevy>
pythys that depends. I recommend gobolinux-style installation - everything is compiled into versioned appdir-like structure
<IceDragon>
<3
nisstyre has joined #ruby
<pythys>
you're kidding! that's another learning curve
<shevy>
pythys in that case, uninstalling is as simple as removing that directory. and you can have different versions side by side (but only one active at any given time. gobolinux uses symlinks for that, nixOS kinda does too but they additionally use hash-tag named directories)
nanoyak has quit [Quit: Computer has gone to sleep.]
<shevy>
pythys yeah
<shevy>
pythys so you are back to have to use what the distribution maintainers give you :)
<shevy>
never abandon their path!
<shevy>
weeb1e tried today and failed ;)
<havenwood>
even if it leads to madness...
<shevy>
indeed!
<pythys>
sigh
<shevy>
pythys you can take the blue pill or the red pill
<shevy>
or you give up, say "screw all of that" and just drink beer
<ddd>
with tequila chasers
<pythys>
dude, this is frustrating. A programming language and its eco-system should not be such a bitch to tweak
<ddd>
pythys: the ecosystem will be. it has a life of its own
<ddd>
the language not so much
<agent_white>
If you got it right the first time you'd learn nothing
<ddd>
well it has a life of its own, but its usually one amenable to changes. the community isn't
drumusician has joined #ruby
<pythys>
agent_white: dude, fuck learning! I want to get my application fired up
brian_____ has joined #ruby
<havenwood>
pythys: There are several nice options, depending on your preferences for tools. But Debian's Ruby package is notoriously problematic.
<agent_white>
pythys: ;D
<havenwood>
pythys: ruby-install/chruby, RVM or ruby-build/rbenv should do the job nicely
Hanmac1 has joined #ruby
<shevy>
pythys oh it is not for me at all!
<brian_____>
can someone help me out here? im trying to spin up a rails app (v 2.1.1) and running ruby 1.8.7-p371. when i try to reload my generators i keep getting this error: Missing these required gems: firebase. but firebase gem is installed
<havenwood>
brian_____: your Ruby and Rails versions are deprecated and missing essential security patches
<havenwood>
brian_____: ^ just an aside :P
<brian_____>
i know this.. but unfortunately it's what im working with at the moment
<slash_me>
havenwood: check out elixir sips too if you have any interest
sambao21 has joined #ruby
<havenwood>
slash_me: nice! will do
mzdravkov has joined #ruby
tyl has quit [Remote host closed the connection]
<agent_white>
shevy: Maybe... we all just need to learn Japanese!
Kar- has quit [Ping timeout: 252 seconds]
<shevy>
hehe
<shevy>
agent_white I wonder if he is easier to understand in japanese than he is in english
mattmcclure has joined #ruby
<shevy>
when he speaks in the english language, he seems to still "think" in japanese language
dann_ has quit [Quit: Page closed]
<ddd>
thats typical of non native speakers
<ddd>
leads to hella disjointed conversations lol
gregoriokusowski has quit [Quit: gregoriokusowski]
cameronbarton has joined #ruby
mattmcclure is now known as sh1ps
sh1ps is now known as mattmcclure
<shevy>
yeah
<shevy>
people make similar mistakes in their respective languages
gregoriokusowski has joined #ruby
<ddd>
i hav ethe rosetta stone japanese module. wonder if i should take the time to actually study it so i can understand wtf he's saying most of the time :)
marr has joined #ruby
<shevy>
Arnold Schwarzenegger in "Red Sonja", when he says "I am looking for Red Sooooooooounja", it is so typical middle-austrian dialect (Steiermark / Styria)
carraroj has quit [Quit: Konversation terminated!]
klaut has quit [Remote host closed the connection]
Astralum has quit [Quit: Leaving]
rm__ has quit [Remote host closed the connection]
<shevy>
most germans tend to pronounce "the" as "ze" / "tse"
<ddd>
hah
rm__ has joined #ruby
<pythys>
shevy: are there any considerations as to the version dependencies between ruby and rubygems?
iamlacroix has joined #ruby
specious has quit [Ping timeout: 252 seconds]
Virtualize has joined #ruby
<ddd>
shevy: i'm an american, speak americanized english, and i hav etroubles with accents even spoken in english. southern drawls can get heavy as rocks making understanding really difficult. add in a foreign language and my ears grow eyes that look like Huh?? hehe
iamjarvo_ has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
iamlacroix has quit [Remote host closed the connection]
iamlacroix has joined #ruby
<shevy>
pythys well havenwood showed one... I think it depends what version of ruby you use... brian_____ uses 1.8.x so perhaps he has more problems with the latest rubygems than you may have pythys
<shevy>
pythys but in my experience, so far I really dont have a problem with rubygems
<shevy>
I am on 1.9.3.xxx something though
<ddd>
myself i have a cross between a midwestern and southern drawl so people say they have a hard time understanding *me* at times. Makes me wonder how i sound to korean speakers when i speak korean. (i'm not great at it but i can speak it to a degree)
<ddd>
suck at reading it though.
<agent_white>
I'm from Colorado. It's like the flat-no-accent of America. ;D
<shevy>
ddd funny story... I was taught british english in school, but I always found the american english much easier to understand. it is harder for my brain to process monty python english and also british guys on youtube (doing game commentaries and so forth)
<shevy>
the brits have some really strange way to pronounce stuff
rm__ has quit [Ping timeout: 265 seconds]
alexherbo2 has joined #ruby
<shevy>
very ... "wery" ... "weri" ... "feri" ... "ferri"
<shevy>
and I love the way they talk in "no country for old men", that's how I imagine picturesque rural USA now :D
<ddd>
hehehe
iamlacroix has quit [Client Quit]
colonolGron has quit [Quit: leaving]
Senjai`work has quit [Ping timeout: 272 seconds]
<ddd>
oh damn, yeah the accents in that movie are harsh! lol
<shevy>
ddd it's rather funny that arnold schwarzenegger's english made it into the Simpsons
<ddd>
hahaha
<shevy>
dialects are cool in general
<ddd>
definitely
<ddd>
i like the different sounds the human mouth and tongue can make
<ddd>
whether you understand them or not.
mlpinit has quit [Quit: Leaving...]
<ddd>
amazingly simple set of organs that can make come really complex sounds
<ddd>
s.come.some
<shevy>
oh yeah
<shevy>
there are some awesome beatboxers out there, especially some non-mainstream ones
<ddd>
oh yeah!
RaCx has joined #ruby
<ddd>
i have zero skill in that area. truly amazes me what beatboxers can do
<slash_me>
i like how folks who speak X can't pronounce sounds in languages Y,Z... not without training their brains and mouths
<shevy>
some guy from sweden who sounds like a trombone
mlpinit has joined #ruby
nobitanobi has quit [Ping timeout: 252 seconds]
nobitanobi has joined #ruby
<shevy>
I'd wish I would have had 1 hour of beatboxing in school rather than 1 hour of pascal....
<ddd>
slash_me: yeah because it requires a thought change. to how you put thoughts together and the associated sounds we all make in our heads when we're doing it
<ddd>
shevy: hahaha
<ddd>
yeah, amazing stuff
sree has quit [Remote host closed the connection]
<slash_me>
ddd: sometimes it requires learning that you have to put your tongue against the inside of your bottom row of teeth.. or against the roof of your mouth
<ddd>
i found a video once on youtube of a beatboxer (think it was yugoslavia or something) that took the electronic drum sets, and the noise makers, and he could mimic them *perfectly*!
<agent_white>
Kinda reminds me of people learning to use the 'rolling R' in Spanish. :P
<ddd>
i mean he showed the sounds on an oscillator and the curves were exactly the same. stuff like that. truly cool stuff!
<slash_me>
agent_white: i think of japenese words like "baret" (ballet)
nanoyak has joined #ruby
tedstriker has quit [Quit: Anti-Fraping status set.]
<ddd>
agent_white: hehe the stuff that gives me troubles are when you have a transitory sound between sounds
<ddd>
those are *really* tough to get
brianpWins has quit [Quit: brianpWins]
tt1187 has joined #ruby
<ddd>
but without those sounds you're saying something completely different
Sawbones has joined #ruby
deception has quit [Quit: Goodbye]
mary5030 has joined #ruby
sree_ has joined #ruby
<ddd>
like koreans have an.. l sound thats like an R at the same time. talk about tongue gymnastics
sree_ is now known as Guest63174
<ddd>
its like an r with an l wrapped around it
<ddd>
sound wise
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
<ddd>
i can't do it
sambao21 has quit [Quit: Computer has gone to sleep.]
<slash_me>
the L (luh) sound is the same as the R (ruh) sound, except you touch the tip of your tongue to the roof of mouth, inside front teeth to make the L (luh) sound
<ddd>
yeah something like that. so can not get it down
flame_ has quit [Quit: Computer has gone to sleep.]
Guest4224 has quit [Remote host closed the connection]
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ddd>
and then you have differences from say how they speak around Pusan, and how they speak closer to PyonYang (near the border)
croaky has joined #ruby
mary5030_ has quit [Ping timeout: 246 seconds]
<ddd>
pusan is WAY south. on the coast
<ddd>
PyonYang is at the DMZ
bean has joined #ruby
bean has quit [Max SendQ exceeded]
bean has joined #ruby
psyl0n has joined #ruby
<shevy>
agent_white R seems to be a certain point, just how japanese pronounce the R, it's not really L but not really so much as a R
burlyscudd has joined #ruby
<shevy>
ddd I was in Seoul once! sadly, it was so damn cold, I don't remember anything but the cold weather... (and Lotte shopping center... and bulgogi burgers haha)
Asher has quit [Quit: Leaving.]
Idealien has left #ruby [#ruby]
Senjai`work has joined #ruby
<ddd>
oh yeah the korean winters are freakin BRUTAL!
aspires has quit []
vpretzel has quit [Ping timeout: 252 seconds]
<ddd>
I was stationed at Camp Howze which is about 5 miles from the DMZ (We supported the infantry responsible for the border itself). We got issued 'bear suits'
aspires has joined #ruby
gregoriokusowski has quit [Quit: gregoriokusowski]
lele has quit [Ping timeout: 246 seconds]
<ddd>
the bear suit is exactly like it's name. its got fur all inside and is about oh 4 inches thick. you have to wear just underwear when you wear it because you generate and trap so much heat with one of them on
<agent_white>
shevy, ddd: I can't even either of those languages... it seems like a whole new world compared to going from English to Spanish :P
<shevy>
hmm
<ddd>
but man, yoou're thankful for them and the mickey mouse boots. (thick rubberized combat boots with a knob on them so you can release the trapped heat or you'd cook your feet)
<shevy>
I had to learn spanish 4 years in school - I forgot most of it by now
<ddd>
my son is learning that now
<agent_white>
My buddy was trying to teach me about Chinese, and how one word can be pronounced so many different ways and have so many different meanings :P
<shevy>
I should have learned chinese and moved to Hong Kong really
<shevy>
cantonese
<ddd>
he's going on a trip to Barcelona and a couple other places in Spain nexct year i think it is or th year after for his Spanish class at the highschool
<ddd>
agent_white: yeah chinese is another language you have to be careful how you say things.
<agent_white>
shevy: I studied it in school, but learned it from my Mexican buddies I worked with in restaurants :D
<ddd>
real easy to say something you didn't mean to
zipper has joined #ruby
<shevy>
hehe
<agent_white>
ddd: Hahaha yeah shit! I'm good using Google translate and calling it even ;P
<shevy>
lol
<shevy>
google translate is so awful
Jake232 has joined #ruby
<shevy>
I think they only created it so they can get some easy laughs
<ddd>
agent_white: lol thats what I use and call it even
<ddd>
when i really want to talk to someone who doesn't speak english i use that
lele has joined #ruby
cameronbarton has quit [Quit: cameronbarton]
<ddd>
i don't know of a better translator or i'd use it
<ddd>
well one thats more consistent. GT does have issues
<shevy>
BABELFISH FOR THE WIN
<ddd>
hehe
<ddd>
i've had babelfish make some pretty big mistakes too
<ddd>
ones i had to correct through GT
teddyp1c_ has quit []
RaCx has quit [Quit: Computer has gone to sleep.]
<slash_me>
babelfish has been around for a while.. haven't used it in ages
nobitanobi has quit [Ping timeout: 252 seconds]
<ddd>
i can not wait for the day we can wear ear pieces and throat devices that let you talk to anyone in the world
<ddd>
like star trek has
<ddd>
universal translator.
nobitanobi has joined #ruby
<shevy>
I go the alternative approach
<ddd>
there are so many peopl ein the world, with different customs, different histories.. i'd love to spend my life talking with people over stuff like that
<shevy>
everyone must learn english
Kar- has joined #ruby
<ddd>
well english and japanese are the universal languages of business
<ddd>
math being the truly universal
<ddd>
but i suck at that level of math hehe
shadoi has joined #ruby
<shevy>
I suck at math :(
<ddd>
me too
<ddd>
my son is fucking AMAZING at math
<shevy>
it's ok when it is simple or head calculations, there I can be fast
<ddd>
he's 17
<shevy>
but abstract stuff is killing me
<ddd>
yeah, like checkbook level i've no problems
<ddd>
but algebra and stuff. wow
kep has joined #ruby
RaCx has joined #ruby
Sthebig has quit [Ping timeout: 240 seconds]
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ddd>
since i was a kid, i've had this thing for learning about people. when i travel i try not to hit the tourist areas because i'm traveling to learn about the people, customs,and life generally of the people where i've gone
sjuxax has joined #ruby
Hanmac1 has joined #ruby
<ddd>
yeah there's a lot of cross over (iu mean we're humans after all. we all shit the same way out of the same orfice) but there's also a lot of difference
burlyscudd has quit [Quit: Leaving.]
<platzhirsch>
ugh, is there no rdoc-data for Ruby 2.1 yet?
cj3kim_ has joined #ruby
<ddd>
stuff in those differences are what i find cool, with language being the biggest indicator of those differences
<sjuxax>
Hello. I have a few questions about symbols. I understand defining a string that is not going to change often as a symbol to mark it immutable. However, there are some Ruby projects that use symbols for hash keys and variable names almost wherever possible. Is that truly necessary?
kate_r has quit [Ping timeout: 240 seconds]
<slash_me>
symbols for variable names?
Hanmac has quit [Ping timeout: 260 seconds]
klaut has joined #ruby
bean has joined #ruby
<ddd>
sjuxax: its a commonality. plus iirc it cuts down on memory usage if those keys are used a lot (otherwise its a new allocation for every invocation especially when you start scoping)
cbetta_afk is now known as cbetta
pwh has quit []
<ddd>
but i don't know of people using symbols for vars commonly other than for well the norms like hashes
<shevy>
havenwood my rbt project actually started because I did not understand the gobolinux shell scripts
kate_r has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<havenwood>
shevy: heh, nice
croaky has quit [Ping timeout: 272 seconds]
phansch has quit [Quit: Leaving]
<shevy>
if there will indeed be a new release, I will install it here, then auto-generate all recipes
<shevy>
I hate shell scripts :\
croaky has joined #ruby
<wmoxam>
shevy: why?
<shevy>
wmoxam I am a firm believer in concise, beautiful, clear, documented code and instructions
danshultz has quit [Remote host closed the connection]
colonolGron has joined #ruby
<shevy>
I don't understand why shell scripts go about doing certain things
<havenwood>
shevy: i'm a firm believer in concise, beautiful, self-documenting code :P
<shevy>
like arguments to functions
rm___ has joined #ruby
gsvolt_work has joined #ruby
rm___ is now known as Guest28859
digifiv5e has joined #ruby
<wmoxam>
shevy: shell script is very good for certain things
<shevy>
$1 $2 $3
<shevy>
I hate this so much
gja has joined #ruby
allaire has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<slash_me>
shevy: yeah, typically you check that the number of arguments supplied matches an acceptible number you define... then give names to $1, $2, $3, etc
grieg has joined #ruby
mojjojo has joined #ruby
gsvolt_work has left #ruby [#ruby]
dsajoel has joined #ruby
gja has quit [Client Quit]
<havenwood>
slash_me: trading connaissance of name for connaissance of position
<havenwood>
both complect
skaflem has quit [Quit: Leaving]
<dsajoel>
greetings. codemash conference in sandusky, ohio happens next week. my colleague has a four day ticket he wishes to sell, but hasn't yet. if you'd like it, email me at dsajoel@live.com with your contact info and I can forward it to my colleague; btw codemash does have some ruby pre-compilers and talks planned.. so I thought I'd atleast share this with the channel :)
Senjai`work has joined #ruby
<havenwood>
dsajoel: if i could teleport i'd take it!
<dsajoel>
havenwood: dunno abt airline tickets for you .. might be cuttin it close - unless ofcourse you have 'a million dolllars' to spare for your airline of choice lol
<shevy>
slash_me this is better %w( q quit exit ).include? command
tannerburson has quit [Quit: tannerburson]
<shevy>
oh you wrote to grieg
<slash_me>
shevy: much agreement
<shevy>
I am kinda half asleep already ;<
tannerburson has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
Xeago has joined #ruby
<grieg>
slash_me, shevy: so definately not with the logical operators?
lkba has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
<epochwolf>
slash_me: also, I can't afford to go to a conference this month. I've got other expenses :P
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
havenwood has quit [Remote host closed the connection]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
grieg what is the logical operator?
tannerburson has quit [Client Quit]
<grieg>
shevy: && || => and so on
<shevy>
grieg well I tend to do loops via loop
<shevy>
in your example though you have to compare
<shevy>
(command != "q") and (command != "quit") and (command != "exit")
cameronbarton has quit [Quit: cameronbarton]
<shevy>
vs
<shevy>
%w( q quit exit ).include? command
<slash_me>
much better ^
<shevy>
or perhaps you may need the last () not sure
jarjar_prime has quit [Quit: Ready? Set? Go!]
<shevy>
%w( q quit exit ).include?(command)
Sawbones has quit []
bean has joined #ruby
<grieg>
alright, thank you guys
<slash_me>
or perhaps you want to come back and add "bye" as an escape condition... do you want to add `and (command != "bye")`, or just to add "bye"
<shevy>
grieg I usually do loop { read_user_input; check_against_menu } and the second method then handles exit from that loop. it's a bit extra work, especially for short code, but I kinda like to break actions into functional or logical components
<shevy>
yeah
<shevy>
grieg, if you use %w() for an array, it's easier to add to it
<shevy>
EXIT_COMMANDS = %w( bla ble blge gieehieh ); EXIT_COMMANDS.include?
<shevy>
I think you can check on a directory as well
<shevy>
guilund when removing anything, it is usually better to be as accurate as possible
<guilund>
shevy: its my first time dealing with filesystem, thats a lot of gotchas
<shevy>
in your code right now you state that FileUtils.rm_rf must understand glob but I actually never used it like that
<shevy>
I do use Dir['foo*'] a lot though
<shevy>
then, when you have an array
<shevy>
it is easier to feed it into your remove method
<shevy>
and inside your remove method, handle removal of files, symlinks or directories
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
mojjojo has quit [Quit: mojjojo]
<guilund>
i see
<shevy>
guilund removing files scares me
<guilund>
do you know any gem to ease the process?
ehaliewicz has joined #ruby
<shevy>
i = '/**/*'; def remove(this); FileUtils.rm_rf(this);end; remove(i)
danshultz has quit [Ping timeout: 252 seconds]
<shevy>
not really, but it's not a lot of code guilund
<shevy>
10-15 lines or so
banister has joined #ruby
<shevy>
you could put it into a module and re-use it :)
<shevy>
module Remove
<shevy>
def self.this(i)
<shevy>
Remove.this()
<shevy>
hehehe
<guilund>
yeah, its the gotchas that i cannot see that worries mme :P
<shevy>
well, permission problems are only annoying
<shevy>
removing files you did not want to remove is dangerous and even more annoying
<shevy>
and to have other people remove what they want to is downright suicide
<shevy>
in your remove-method you should also check if the file exists too
<guilund>
yeah! i'll take more time to think this module right
<shevy>
remove(i) if File.exist? i
<shevy>
I dont know why it fails for you, in my code (local though) FileUtils.rm_rf works
<shevy>
but via File.writable? you can check the permission, perhaps it is that
<guilund>
i think it has something to do with mac filesystem
<shevy>
hmm
<guilund>
sometimes it doesnt get when a file is modified or deleted
<shevy>
apeiros uses a mac
<shevy>
and rails too
<shevy>
guilund perhaps it is cached or buffered somewhere irregularly or there is another latency. I am happy on linux here
<guilund>
shevy hehehe
interactionjaxsn has quit [Remote host closed the connection]
colonolGron has joined #ruby
interactionjaxsn has joined #ruby
colonolGron has quit [Client Quit]
Kricir has joined #ruby
Mon_Ouie has quit [Ping timeout: 272 seconds]
<shevy>
linux is not very pretty
<shevy>
but rather simple and effective
jerius has quit [Ping timeout: 272 seconds]
<guilund>
shevy: i'm happy with mac, but its expensive as hell where i live
<guilund>
shevy: its probably the most expensive mac in the world
Asher has joined #ruby
mojjojo has joined #ruby
<shevy>
hehe
<guilund>
shevy: that new mac pro, that looks like a blender, here in brazil, the price can reach US$25k !
<shevy>
hmm
<shevy>
yeah, I heard that price too in europe
<guilund>
thats absurd :P
<shevy>
it's like 1/3 or 1/4 of a car
meatherly has quit [Remote host closed the connection]
<guilund>
its like 1/4 of an average apartment here
<guilund>
hahaha
momomomomo has quit [Quit: momomomomo]
<guilund>
an average apartment here in sao paulo is about US$100k
<shevy>
wow
interactionjaxsn has quit [Ping timeout: 245 seconds]
<guilund>
oh yeah man, go figure global economics
<guilund>
the Apple guys are smoking a crack that alters the right perception of value
asobrasil has left #ruby [#ruby]
bean has joined #ruby
mojjojo has quit [Client Quit]
<shevy>
I guess they aim to sell only few of these anyway
klaut has joined #ruby
<guilund>
to the royal family of dubai, i believe
<shevy>
some industrial designers perhaps
bean has quit [Client Quit]
grieg has quit [Remote host closed the connection]
<guilund>
shevy: an average designer dont have this much money, i used to be one... :P
45PAAZBMQ has joined #ruby
<guilund>
shevy: are you from america?
<shevy>
guilund central europe
mojjojo has joined #ruby
joaosa has quit [Ping timeout: 245 seconds]
<shevy>
guilund it depends on what type of designer one is. industral designers i.e. ones to work for car companies, or that design other things (a clock, toothbrush, how railjets / train wagons look etc..) can get a quite decent wage
danshultz has joined #ruby
<shevy>
*industrial
<guilund>
shevy: nice, i like europe, probably at school you guys have a very thick book of history to learn
<guilund>
shevy: yeah, i began my design course at university as a industrial designer, then migrated to general design because here in brazil we dont have much room for this kind of design
<shevy>
nah school history kinda sucks... they teach us an opinionated version of everything, also a rather pro-US history view and anti-past history view (understandable due to the world wars, but objective facts aren't explained properly)
Kricir has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 240 seconds]
<guilund>
shevy: yeah, dot trust your government kid
<guilund>
shevy: anarcho-capitalism FTW
<guilund>
:P
<guilund>
or at least a minarchy
<shevy>
hmm anarcho isn't very pro on anything, just very strong against authority
<guilund>
yeah, im one of the 6 libertarians here in brazil
<shevy>
hehehehe
<shevy>
at least you have sunshine
<shevy>
here it's damn cold
<guilund>
the guys over here are socialists, via cultural marxism, gramscism
<shevy>
only siberia is worse
<guilund>
shevy: its about 40 degrees today
<guilund>
its hot as hell
<shevy>
hehe
davidw has joined #ruby
blackmesa has joined #ruby
troyready has quit [Remote host closed the connection]
<davidw>
hi - with Nokogiri f.write(doc.css('body').to_xhtml()) "pretty prints" the html, adding a bunch of blank space. doc.to_xhtml() does not, leaving the original spacing intact. Any idea what's going on?
<dachi_>
hi people. after a while I am back to Ruby again. Is there any reasonable use of Ruby with a cross platform GUI support to run as on Mac, as on Windows (.exe), etc.?
agjacome has quit [Ping timeout: 246 seconds]
millerti has quit [Quit: millerti]
<IceDragon>
esing: ruby just has exit(value)
ambushsabre has joined #ruby
Spleeze has quit [Ping timeout: 245 seconds]
zipper has quit [Ping timeout: 260 seconds]
<IceDragon>
dachi_: I'm not too clear on what your getting at...
Sthebig has joined #ruby
zipper has joined #ruby
<esing>
IceDragon, I tried that already, but that raises this error: no implicit conversion of String into Integer (TypeError). So it seems that exit(..) only accepts integers
bentonrr_ has joined #ruby
agjacome has joined #ruby
ahawkins has joined #ruby
jameshyde has joined #ruby
vlad_starkov has joined #ruby
<IceDragon>
yeah ;x why would you need otherwise?
<dachi_>
I was rails developer mostly, I want to know do you use Ruby to make gui applications today that work on most platfors?
<IceDragon>
even C/C++ uses ints
iMBA has joined #ruby
klaut has quit [Remote host closed the connection]
iMBA has left #ruby [#ruby]
<IceDragon>
dachi_: From my experience, every single GUI lib/gem has failed me, they either crash, lag or burn
<esing>
IceDragon, Because I need a value from the ruby script in my python script (calling the ruby script with subprocess)
bentonrr has quit [Read error: Connection reset by peer]
<IceDragon>
I find that ruby does make a mean language for console apps, and daily usage :O
<dachi_>
I see, what about JRuby?
<IceDragon>
Its also nice for hacking an idea
ace_striker has joined #ruby
ace_striker has quit [Changing host]
ace_striker has joined #ruby
ace_striker has joined #ruby
<IceDragon>
Never used it, a friend of mine does though
<IceDragon>
:) He finds it great for his android phone
abra has quit [Ping timeout: 252 seconds]
<dachi_>
I see thanks, I just couldnot find any better than ruby and I wish a lot it to be faster and have a great gui support
klaut_ has joined #ruby
<guilund>
shevy: do you know if, for example, ruby takes too long to create a directory for some reason, and in the next line i create a file, it will raise error?
gks has joined #ruby
<shevy>
guilund I can not remember having ever had this issue myself or heard about it
<shevy>
guilund File.writable? works for you?
<IceDragon>
dachi_: ruby is fast enough!
<guilund>
shevy: i mean, the ruby will 'hold' the code until the directory is created?
<IceDragon>
GIL
<guilund>
i dont know whats the name of this
<IceDragon>
get used to it ;)
jameshyde has quit [Ping timeout: 246 seconds]
<dachi_>
i'm not familiar with py
ahawkins has quit [Ping timeout: 245 seconds]
<dachi_>
but i was to use scala with rails for performance
<guilund>
for example, in one line i create the dir, then ruby will hold the code until its finished, then it goes to the next line
<dachi_>
i don't know, maybe you're right
<terrellt>
guilund: Yes, it blocks.
<guilund>
it have a name... i forgot
abra has joined #ruby
<guilund>
asynchronous
<guilund>
something like that
<terrellt>
guilund: Ruby always blocks.
<guilund>
terrellt: nice!
Bumptious has quit [Read error: Connection reset by peer]
<IceDragon>
RAB
Guest28859 has quit [Remote host closed the connection]
<gks>
Ok, Having trouble with STDERR and Logger, can anyone help? I want the entries to be intermixed, right now it's all STDERR messages then Logger, rather than mixed. Gist here: https://gist.github.com/anonymous/68e9066ae975c7cb8a47
Bumptious has joined #ruby
rm__ has joined #ruby
Spleeze has joined #ruby
<dachi_>
according to benchmarks it's slower than scala or java. but i don't like any other, don't take me wrong please. okay i'll say good bye, thanks for helping
<IceDragon>
gks: STDERR takes higher priority than STDOUT
<guilund>
and Dir.glob("#{diretorio_site}/*.html") {|f| FileUtils.cp File.expand_path(f), "#{diretorio_backup}/#{diretorio_backup_agora}" } works?
<IceDragon>
use STDERR for your logger
<IceDragon>
;)
Sawbones has quit []
<gks>
IceDragon: *sigh* then I have to execute the command with all sorts of funky stuff to get it to a file path I want it at
<guilund>
dir_files.map { ??? or am i mixing everything and making a mess
<guilund>
?
claymore has quit [Quit: Leaving]
<shevy>
guilund I would use Dir[] instead of Dir.glob()
fixl has joined #ruby
<IceDragon>
well can't do much about that ;x
<shevy>
guilund also, write methods man
<IceDragon>
or use lambdas
* IceDragon
hides
<shevy>
then pass it into your method
<guilund>
shevy: im just testing things up ... :)
michy has joined #ruby
<shevy>
your code is scary right now
<guilund>
hehehe i know
<gks>
IceDragon: guess I have to deal with it, thanks though!
<IceDragon>
:) np
mbytes` has joined #ruby
rm__ has quit [Ping timeout: 272 seconds]
<michy>
Is here someone who has has experience with ruby in combination with sketchup?
mbytes has quit [Read error: Connection reset by peer]
simoz9 has joined #ruby
<guilund>
shevy if i map it works wtf?
croaky has quit [Ping timeout: 245 seconds]
<gks>
IceDragon: actually, is there a way to get STDERR from a recently executed command? I'm mostly going to get it from %x{command here} type syntax, if I can check for any error entries and then just use logger that would work too
cameronbarton has left #ruby [#ruby]
burlyscudd has joined #ruby
<IceDragon>
you could reroute it to STDOUT ?
<IceDragon>
%x{command 2>&1}
klaut has joined #ruby
mlpinit has quit [Read error: No route to host]
<michy>
I'm trying to read/write to an arduino using the arduino_firmata gem. It works with my "normal" ruby installation, but not when I run it from sketchup.
<gks>
possible, is that going to put the error output in the returned variable i'm going to get though?
lethjakman has quit [Quit: WeeChat 0.4.0]
mlpinit_ has joined #ruby
<gks>
if so, i have to rewrite all the code to account for new output
Kar- has joined #ruby
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gks>
i'm doing a lot of execute command -> parse results. If the results now contain STDERR output then it's going to bomb everything that isn't expecting it
Wolland has joined #ruby
<michy>
the require "arduino_firmata" throws an error... Someone has experience?