dpswireless has quit [Remote host closed the connection]
MrWharfsnort has quit [Ping timeout: 264 seconds]
IceDragon_ has quit [Ping timeout: 252 seconds]
d34th4ck3r has joined #ruby
IceDragon_ has joined #ruby
jimmyhoughjr has joined #ruby
toastynerd has joined #ruby
vpretzel has quit [Remote host closed the connection]
nanoyak has quit [Quit: Computer has gone to sleep.]
Olipro has joined #ruby
rm__ has quit [Remote host closed the connection]
nanoyak has joined #ruby
papercode has quit [Quit: WeeChat 0.4.3]
papercode has joined #ruby
baweaver has joined #ruby
ce_afk is now known as cescalante
brunops has quit [Ping timeout: 240 seconds]
sunya7a has quit [Ping timeout: 252 seconds]
b1205_ has quit [Ping timeout: 252 seconds]
gabrielh has left #ruby [#ruby]
testcore has quit [Quit: [BX] Time wasted: 8 millenia 6 centuries 1 decades 5 years 8 months]
arrubin has joined #ruby
n_blownapart has joined #ruby
baweaver has quit [Ping timeout: 276 seconds]
samuel02 has joined #ruby
lethe has joined #ruby
jonahR has quit [Quit: ¡Adios amigos, me fui para el carajo!]
omosoj has joined #ruby
zorak_ has quit [Remote host closed the connection]
b1205 has joined #ruby
<n_blownapart>
hi there are two approaches here for the fibonacci sequence. the first one I get. the second one I (still) don't get. something about a temp assignment. thanks: https://gist.github.com/anonymous/cfe05ebda55b44c51777
<centrx>
n_blownapart, you mean a, b = b, a + b ?
nanoyak has quit [Quit: Computer has gone to sleep.]
samuel02 has quit [Ping timeout: 265 seconds]
lethe has quit [Ping timeout: 252 seconds]
jhulten has quit [Remote host closed the connection]
cescalante is now known as ce_afk
<n_blownapart>
centrx: yeah I'm confused by the assignment there ; it doesn't seem to work like the multiple assignments on line 16.
reactormonk has joined #ruby
timonv has joined #ruby
<centrx>
n_blownapart, the right side is evaluated first, then assigned to the left side, so no need for an explicit temp variable
<n_blownapart>
hmm. centrx what would be another way to write that line out, in longhand fashion ?
nanoyak has joined #ruby
<centrx>
temp = [a, a + b]
<centrx>
a, b = temp
simoz111115 has quit [Ping timeout: 252 seconds]
<centrx>
n_blownapart, it is implicitly doing an array on the right side
ddv has quit [Ping timeout: 245 seconds]
yubrew has joined #ruby
Olipro has quit [Ping timeout: 246 seconds]
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Dreamer3 has quit [Ping timeout: 240 seconds]
tjsousa_____ has quit [Quit: Computer has gone to sleep.]
<n_blownapart>
centrx: one sec trying to make sense of it.
goleldar has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 252 seconds]
dwayhs has quit [Quit: Computer has gone to sleep.]
andrewjanssen has quit [Quit: Leaving...]
oo_ has joined #ruby
pietr0 has quit [Quit: pietr0]
<n_blownapart>
centrx: summa is just an accumulator, right?
senayar_ has joined #ruby
yubrew has quit [Ping timeout: 276 seconds]
Olipro has joined #ruby
JBreit has joined #ruby
<centrx>
n_blownapart, yeah
<centrx>
# Create sum of even Fibonnaci numbers
ddv has joined #ruby
nikolavp has joined #ruby
zz_karupa is now known as karupa
JBreit has left #ruby [#ruby]
sambao21 has quit [Quit: Computer has gone to sleep.]
senayar has quit [Ping timeout: 252 seconds]
toastynerd has quit [Remote host closed the connection]
marr has quit [Ping timeout: 240 seconds]
<n_blownapart>
centrx: yeah thanks so this part: temp = [a, a + b] ; a, b = temp I don't follow how that is implicitly created .. and also the second line a,b = temp
Es0teric has quit [Quit: Computer has gone to sleep.]
oo_ has quit [Remote host closed the connection]
yfeldblu_ has quit [Remote host closed the connection]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
d34th4ck3r has quit [Quit: zzz]
<centrx>
n_blownapart, That is an example of it being explicit
<centrx>
a, b = a, a + b is implicit
<sdelmore>
I've been trying to build Ruby 2.1.2 for a while with no luck in mavericks, it always asks if openssl is installed (it is with brew). Any tips on how to get Ruby 2.1.2? Is there a known issue with Mavericks? I have tried a bunch of different tips from google searches but none of them seem to work.
<sdelmore>
5:30
<sdelmore>
The error is always "The Ruby openssl extension was not compiled. Missing the OpenSSL lib?"
d34th4ck3r has joined #ruby
Guest13053 is now known as ixx
<havenwood>
sdelmore: did you try --with-opt-dir like i mentioned in rom?
<ericwood>
sdelmore: not that I'm of any use, but what are you using to install it?
tris has joined #ruby
<n_blownapart>
centrx: yeah that I get
rm__ has joined #ruby
<centrx>
n_blownapart, that is just how commas work in assignment statements
sepp2k has quit [Read error: Connection reset by peer]
<n_blownapart>
centrx: well in the first example, a points to an array and I understand the use of a[-2] + a[-1] . but I can't visualize how the basic math and the array works on line 19.
except has quit [Ping timeout: 255 seconds]
brunops has quit [Ping timeout: 276 seconds]
<sdelmore>
havenwood: I'm actually not getting past the openssl part, installing the ca certs. Openssl has been giving me fits for months in various forms, I really hate that library.
<jimbow>
(See full trace by running task with --trace)
<jimbow>
???
<sdelmore>
Is there any way to just get a working version, or does it have to be compiled? I am reading tons of issues (with few fixes) on how to build it but it makes me wonder, does distribution have to be tied to compilation? Or is there an already compiled version I can get somewhere?
<centrx>
jimbow, Use gist.github.com
chrisseaton has joined #ruby
lethe has joined #ruby
<centrx>
sdelmore, I bet you have the openssl binary package installed, but the compiler needs the source/header files
axilla has joined #ruby
chrisseaton has quit [Client Quit]
<sdelmore>
Been dying to try out Ruby 2.1 for a while now. 2.1.0 never worked, then 2.1.1, but I kept figuring soon it would be fixed, now with 2.1.2 I still can't build it and am looking for an alternative.
<centrx>
sdelmore, I don't know what that's called in brew, but elsewhere it would be openssl-dev
<sdelmore>
Could be, I just did brew install openssl. Is that the wrong way to go?
chrisseaton has joined #ruby
chrisseaton has quit [Client Quit]
<sdelmore>
Ok, I'll look around and see what I can find.
<havenwood>
sdelmore: did you?: brew tap raggi/ale && brew install openssl-osx-ca
<sdelmore>
I did, it failed.
<havenwood>
sdelmore: any issues in?: brew doctor
<sdelmore>
brew tap worked, install openssl-osx-ca threw errors. Let me try it again and I will see what they are.
<havenwood>
sdelmore: what'd it fail with?
<havenwood>
k
Rahul_Roy has quit [Quit: Connection closed for inactivity]
axilla has quit [Ping timeout: 258 seconds]
<n_blownapart>
centrx: ok down the line we have 89, 144, 233 in the sequence. How would that look in the array and the a, b, and temp assignments as you have it?
mjs2600 has quit [Remote host closed the connection]
lethjakman has quit [Ping timeout: 252 seconds]
hamakn has quit [Remote host closed the connection]
raspberryfan has joined #ruby
Advocation has joined #ruby
axilla has quit [Ping timeout: 240 seconds]
Hanmac has quit [Ping timeout: 276 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rylee_ is now known as rylee
snath has joined #ruby
<robert_>
that's so weird; it doesn't get local variables inside the class.. hm.
Spami has quit [Quit: This computer has gone to sleep]
benzrf is now known as benzrf|offline
Megtastique has quit []
Advocation has quit [Ping timeout: 252 seconds]
sptx00 has joined #ruby
freerobby has joined #ruby
andrewjanssen has joined #ruby
doodlehaus has quit [Remote host closed the connection]
jamto11 has joined #ruby
krz has joined #ruby
s2013 has joined #ruby
doodlehaus has joined #ruby
p8952 has quit [Ping timeout: 240 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
amclain has joined #ruby
larissa has joined #ruby
yfeldblum has joined #ruby
orriols has quit [Ping timeout: 252 seconds]
Hanmac has joined #ruby
danshultz has quit [Remote host closed the connection]
noob101 has joined #ruby
<noob101>
Hello ruby community.
<noob101>
I have a question like always.
codeurge has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
danshultz has joined #ruby
<shevy>
go
<noob101>
What does it mean when you put this symbol -> ` $ ` in front of a variable. Example: ` $a `
<shevy>
you make it a global variable
<robert_>
https://ideone.com/DifSu8 -- bleh, this is as good as it's going to get; nobody supports ruby 2.0+ yet, wrt online "test your ruby" sites.
<j_mcnally>
noob101: global
<noob101>
Hi shevy.
andrewjanssen has quit [Quit: Leaving...]
<shevy>
didn't you ask that before noob101? ;)
<noob101>
What is special about global, is there any new features or some sort?
havenn has joined #ruby
<j_mcnally>
noob101: it can be accessed anywhere
<shevy>
this variable is available everywhere
cescalante is now known as ce_afk
kenneth has joined #ruby
timonv has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
oo_ has quit [Remote host closed the connection]
<noob101>
j_mcnally: I don't get it.
<noob101>
j_mcnally: New rubyist, be easy with me please sorry.
<shevy>
a variable has a scope
<j_mcnally>
noob101: Say you have some sort of outbound communication client.... you could declare one instance and use it in any other instace / class
<noob101>
Scope, hmm.
havenwood has quit [Remote host closed the connection]
<j_mcnally>
$a = PushMessageBroker.new(blah)
<j_mcnally>
then anywhere u could call
<j_mcnally>
$a.sendMessage("Hello world")
<noob101>
can you tell me more about global variable please?
<j_mcnally>
i consider globals to be poor form tho
Valesk_ has joined #ruby
<noob101>
Oh ok.
<j_mcnally>
i dont know how others feel
<robert_>
shevy: hai
Soda has quit [Remote host closed the connection]
<j_mcnally>
better off with a singleton class
<centrx>
Generally do not use global variables at all.
<j_mcnally>
if u must
ixti has quit [Ping timeout: 258 seconds]
<j_mcnally>
Globals are messy especially if they are Mutable
n_blownapart has quit []
yubrew has joined #ruby
<centrx>
It is good for things like $debug or $global_config (global and immutable)
<robert_>
I prefer to pretend they don't exist. :p
<noob101>
What are "singleton classes" O_O
<j_mcnally>
i used one breifly to expose an component that was a rack application and a service
oo_ has joined #ruby
danshultz has quit [Ping timeout: 252 seconds]
<j_mcnally>
but deprecated it in favour of calling it directly from the rack interface via HTTP
<j_mcnally>
noob101: a singleton class is a hybrid static / non static class that manages a single instance of itself
<j_mcnally>
Someclass.getInstance().do_something
codeurge has joined #ruby
<j_mcnally>
get instance will either return an existing instance declared statically or create a new one.
<robert_>
noob101: A singleton is an object that can only exist once, hence the name SINGLEton.
sensen has joined #ruby
<j_mcnally>
I prefer doubletons however
timonv has quit [Ping timeout: 252 seconds]
<noob101>
Ah ok robert_ , thanks.
<j_mcnally>
you never know when you need a 2nd one
<noob101>
Thanks too j_mcnally
Shidash1 has joined #ruby
Shidash has quit [Ping timeout: 252 seconds]
doodlehaus has quit [Remote host closed the connection]
<robert_>
j_mcnally: or a tenth.
<j_mcnally>
decatons are nice
yubrew has quit [Ping timeout: 240 seconds]
<shevy>
hi robert_
radic has joined #ruby
<j_mcnally>
but ive never needed one personally
s2013 has quit [Ping timeout: 252 seconds]
<robert_>
how goes, shevy
<shevy>
noob101 what is a global variable
<noob101>
shevy ummmmm a global variable is.
<noob101>
shevy: a variable that can be accessed anywhere in a program?
<noob101>
I tried.
<shevy>
noob101 yes but why would you want to have that?
<noob101>
shevy: No, I was looking at some code. I don't know the big significance of it anyway. Bleh.
<shevy>
k I will ask you again some time later
phinfonet has quit []
codeurge has quit [Quit: Quit.]
freerobby has quit [Quit: Leaving.]
radic_ has quit [Ping timeout: 240 seconds]
<ari-_-e>
noob101: where are you learning from?
<noob101>
ari-_-e: The koans, my mentor and websites like codecademy. However tbh, I am working on this assignment for a possible job, I don't user codecademy and stuff everyday.
<noob101>
I usually work on my project to practice my programming skills.
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<noob101>
I develop a 21 blackjack game, I did that to work on my programming skills, I am working on it right now.
<robert_>
shevy: https://ideone.com/DifSu8 -- bleh, this is as good as it's going to get; nobody supports ruby 2.0+ yet, wrt online "test your ruby" sites.. I'm trying to get a list of variables used by MyThunkTarget.work; any ideas?
jmeeuwen_ has joined #ruby
jmeeuwen has quit [Read error: Connection reset by peer]
dorei has quit []
jmeeuwen_ is now known as jmeeuwen
Es0teric has quit [Quit: Computer has gone to sleep.]
mattmcclure has quit [Quit: Connection closed for inactivity]
<shevy>
robert_ I have no idea what's going on there
<ari-_-e>
noob101: languages often have features that shouldn't be used very often
<shevy>
I only use .instance_variables most of the time
<ari-_-e>
noob101: that's useful when there actually is a legitimate reason to use them, but it's unfortunately also a tempting honeypot for new programmers
_justin has joined #ruby
<ari-_-e>
global variables in ruby is one of these features
jimbow has quit [Ping timeout: 252 seconds]
<noob101>
ari-_-e: what's so inappropriate about using Global Variables? Does it mess up your program like explain to me why you shouldn't really use it.
<ari-_-e>
noob101: well, why were you confused about why you would want to have a global variable?
codeurge has joined #ruby
<centrx>
noob101, Proper namespacing is important for proper code organization, avoiding bugs, and making software that can interoperate with other libraries.
rylee is now known as Rylee
<shevy>
noob101 it is leaky, it leaks into everywhere, when you use code written by other people, their global variables can interfere
<j_mcnally>
i bought a rails book once, by the time i was ready to use it its was like Rails 3.0 had just come out and everything in the book was 2.x
<noob101>
Psss, can I get the free pdf to the pick axe book.
<centrx>
Still covers all the major things, if there might be a few kinks
<j_mcnally>
noob101: thats neat piracy.......
<centrx>
noob101, There is one, I found it somewhere, but I forget where it is
<noob101>
centrx: Aw ok, it's ok but thanks.
kenneth has joined #ruby
ta has quit [Ping timeout: 265 seconds]
_justin has quit [Quit: _justin]
kies has quit [Ping timeout: 240 seconds]
<noob101>
I wish there was the free pdf of the pick axe book, that would be so nice for a new rubyist who wants to become to the ruuuby community.
<centrx>
noob101, The old version is actually fine, but you may run into differences since 1.9 (old first edition is Ruby 1.6, current Ruby is 2.1, big changes were in Ruby 1.9)
<centrx>
That can be more problematic for noob 101 styles
<noob101>
So the link you gave me to the book, that book 1.9, 2.0 is good right?
<centrx>
noob101, Yes
<noob101>
Cool.
<noob101>
Alrighty thanks centrx
yxhuvud has quit [Ping timeout: 240 seconds]
<noob101>
Question
<noob101>
If I download an ebook, will I be able to still read the book?
rOOb has quit [Ping timeout: 258 seconds]
SCommette has joined #ruby
lyanchih has joined #ruby
rOOb has joined #ruby
JasmeetQA1 has joined #ruby
JasmeetQA has quit [Ping timeout: 240 seconds]
Avahey_ has joined #ruby
Shidash1 has quit [Ping timeout: 252 seconds]
agent_white has quit [Quit: brb]
jamto11 has quit [Remote host closed the connection]
eka has joined #ruby
eka has quit [Client Quit]
<centrx>
noob101, You mean if you pay for the ebook do you get the paper copy with it free?
jgrevich_ has quit [Quit: jgrevich_]
lyanchih has quit [Quit: lyanchih]
dik_dak has quit [Quit: Leaving]
skyspl0it has joined #ruby
lyanchih has joined #ruby
robbyoconnor has joined #ruby
kies has joined #ruby
<noob101>
I need help.
BeingUntoDeath has joined #ruby
binaryhat has quit [Quit: Leaving]
ylluminarious has joined #ruby
<noob101>
centrx: no, I am saying if I download an ebook will it still work on my computer or does it work only for tablet or something?
mercwith1mouth has joined #ruby
rm__ has joined #ruby
moneydouble1 has joined #ruby
skysploit has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
radic has quit [Disconnected by services]
Xeago_ has joined #ruby
radic_ has joined #ruby
skysploit has joined #ruby
terrell_t has joined #ruby
XenoWolf_ has joined #ruby
<noob101>
How can I store a random something in a variable and how a I able to refresh the variable so it will get a new value prior to where it gets it's random thing from?
Avahey__ has joined #ruby
deric_skibotn_ has joined #ruby
csmrfx_ has joined #ruby
r0bby has joined #ruby
<centrx>
noob101, I'm sure it works on a regular computer, but I've never
<centrx>
noob101, It says the ebook comes in three formats. one of which is PDF
<noob101>
Like if that variable was in a loop and I want a local variable to get a new value everytime, a new random value.
s2013 has joined #ruby
<noob101>
centrx: Oh ok, thanks.
robbyoconnor has quit [Ping timeout: 252 seconds]
<centrx>
noob101, rand() or rand(5) e.g.
chihhsin1wego has joined #ruby
zeroXten_ has joined #ruby
<centrx>
noob101, use irb to test it (REPL console)
justinmcp_ has joined #ruby
<noob101>
centrx: Good idea. Thank you sir.
parus_ has joined #ruby
xargoon_ has joined #ruby
krzkrz has joined #ruby
NukePuppy has joined #ruby
axisys_ has joined #ruby
predator217 has joined #ruby
chipotle has quit [Quit: cya]
alexju_ has joined #ruby
george2|chakra has joined #ruby
saltsa has joined #ruby
wuest_ has joined #ruby
lotherk has joined #ruby
spastorino has quit [Quit: Connection closed for inactivity]
rm_ has quit [Read error: Connection reset by peer]
Avahey_ has quit [Ping timeout: 265 seconds]
mercwithamouth has quit [Read error: Connection reset by peer]
Avahey__ is now known as Avahey_
supermarin__ has quit [Quit: Computer has gone to sleep.]
Azure_ has joined #ruby
supermarin__ has joined #ruby
Azure has quit [Disconnected by services]
Azure_ is now known as Azure
natewalck_ has joined #ruby
gsvolt_ has joined #ruby
s2013 has quit [Ping timeout: 252 seconds]
go|dfish1 has joined #ruby
stylus_ has joined #ruby
Kruppe has quit [Ping timeout: 258 seconds]
zeroXten has quit [Ping timeout: 258 seconds]
LACP has quit [Ping timeout: 258 seconds]
shalicke has quit [Ping timeout: 258 seconds]
XenoWolf has quit [Ping timeout: 258 seconds]
deric_skibotn has quit [Ping timeout: 258 seconds]
chihhsin_wego has quit [Ping timeout: 258 seconds]
lkba has quit [Ping timeout: 258 seconds]
Cope has quit [Ping timeout: 258 seconds]
parus has quit [Ping timeout: 258 seconds]
m_3 has quit [Ping timeout: 258 seconds]
willgorman_ has quit [Ping timeout: 258 seconds]
csmrfx has quit [Ping timeout: 258 seconds]
axisys has quit [Ping timeout: 258 seconds]
everett has quit [Ping timeout: 258 seconds]
ACPe has joined #ruby
nevans has quit [Ping timeout: 258 seconds]
xiphias has quit [Ping timeout: 258 seconds]
omosoj has quit [Ping timeout: 258 seconds]
ra4king has quit [Ping timeout: 258 seconds]
metadave has quit [Ping timeout: 258 seconds]
tommylom1ykins has quit [Ping timeout: 258 seconds]
zastern has quit [Ping timeout: 258 seconds]
Beoran has quit [Ping timeout: 258 seconds]
moneydouble has quit [Ping timeout: 258 seconds]
JordanJ2 has quit [Ping timeout: 258 seconds]
wuest has quit [Ping timeout: 258 seconds]
stylus has quit [Ping timeout: 258 seconds]
drago777 has quit [Ping timeout: 258 seconds]
willb1 has quit [Ping timeout: 258 seconds]
skyspl0it has quit [Ping timeout: 258 seconds]
xiphias has joined #ruby
drago777 has joined #ruby
Kruppe has joined #ruby
lotherk_ has quit [Ping timeout: 258 seconds]
saltsa_ has quit [Ping timeout: 258 seconds]
justinmcp has quit [Ping timeout: 258 seconds]
bijumon has quit [Ping timeout: 258 seconds]
gsvolt has quit [Ping timeout: 258 seconds]
SOLID000 has quit [Ping timeout: 258 seconds]
george2 has quit [Ping timeout: 258 seconds]
Rickmasta has quit [Ping timeout: 258 seconds]
cjk101010 has quit [Ping timeout: 258 seconds]
go|dfish has quit [Ping timeout: 258 seconds]
Quadlex has quit [Ping timeout: 258 seconds]
Riking has quit [Ping timeout: 258 seconds]
ylluminarious|aw has quit [Ping timeout: 258 seconds]
terrellt has quit [Ping timeout: 258 seconds]
Xeago has quit [Ping timeout: 258 seconds]
natewalck has quit [Ping timeout: 258 seconds]
xiphias has joined #ruby
xiphias has quit [Changing host]
ra4king1 has joined #ruby
willgorman_ has joined #ruby
supermarin___ has joined #ruby
xiphias has quit [*.net *.split]
willgorman_ has quit [*.net *.split]
Kruppe has quit [*.net *.split]
drago777 has quit [*.net *.split]
SOLID000 has joined #ruby
willgorman_ has joined #ruby
Kruppe has joined #ruby
xiphias has joined #ruby
drago777 has joined #ruby
everett has joined #ruby
Quadlex has joined #ruby
Jamo___ has joined #ruby
omosoj has joined #ruby
bijumon has joined #ruby
nevans has joined #ruby
supermarin__ has quit [Ping timeout: 252 seconds]
Avahey__ has joined #ruby
Beoran has joined #ruby
Rickmasta has joined #ruby
zastern has joined #ruby
metadave_ has joined #ruby
freerobby has joined #ruby
braincra- has quit [Quit: bye bye]
shalicke has joined #ruby
m_3 has joined #ruby
Riking has joined #ruby
cjk101010 has joined #ruby
willb1 has joined #ruby
george2|chakra is now known as george2
BeingUntoDeath has quit []
<ra4king1>
neeeeeeet split
billy_ran_away has quit [Ping timeout: 252 seconds]
Jamo has quit [Ping timeout: 252 seconds]
MissionCritical has quit [Ping timeout: 252 seconds]
billy_ran_away has joined #ruby
Avahey_ has quit [Ping timeout: 252 seconds]
predator217 has quit [Ping timeout: 252 seconds]
Xuerian has quit [Ping timeout: 252 seconds]
tiguser has quit [Ping timeout: 252 seconds]
dioms_ has quit [Ping timeout: 252 seconds]
thesheff17 has quit [Ping timeout: 252 seconds]
codeurge has quit [Ping timeout: 252 seconds]
im0b has quit [Ping timeout: 252 seconds]
__class__ has quit [Ping timeout: 252 seconds]
agjacome has quit [Ping timeout: 252 seconds]
Avahey__ is now known as Avahey_
optiz0r_ has quit [Quit: No Ping reply in 180 seconds.]
xargoon_ has quit [Ping timeout: 256 seconds]
phutchins has quit [Ping timeout: 256 seconds]
freerobby has quit [Client Quit]
b1205 has quit [Ping timeout: 252 seconds]
dioms_ has joined #ruby
tiguser has joined #ruby
xargoon_ has joined #ruby
im0b has joined #ruby
natewalck_ is now known as natewalck
agjacome has joined #ruby
yubrew has joined #ruby
krz has quit [*.net *.split]
alexju has quit [*.net *.split]
kenneth has quit [*.net *.split]
xargoon has quit [*.net *.split]
predator117 has quit [*.net *.split]
Sammael has quit [*.net *.split]
xargoon_ is now known as xargoon
thesheff17 has joined #ruby
NukePuppy has quit [Ping timeout: 252 seconds]
b1205 has joined #ruby
__class__ has joined #ruby
Xuerian has joined #ruby
codeurge has joined #ruby
SegFaultAX has quit [Excess Flood]
braincrash has joined #ruby
optiz0r has joined #ruby
ra4king1 is now known as ra4king
Cope has joined #ruby
r0bby has quit [Max SendQ exceeded]
jmurray has quit [Quit: jmurray]
r0bby has joined #ruby
tommylommykins has joined #ruby
predator117 has joined #ruby
ce_afk is now known as cescalante
yubrew has quit [Ping timeout: 240 seconds]
phutchins has joined #ruby
SegFaultAX has joined #ruby
pietr0 has joined #ruby
chipotle has joined #ruby
supermarin___ has quit [Quit: Computer has gone to sleep.]
soulcake has quit [*.net *.split]
magicien has quit [*.net *.split]
barratt has quit [*.net *.split]
netf has quit [*.net *.split]
timfoo_ has quit [*.net *.split]
tsunamie has quit [*.net *.split]
_JamieD_ has quit [*.net *.split]
codabrink has quit [*.net *.split]
phracker has quit [*.net *.split]
JordanJ2 has joined #ruby
supermarin___ has joined #ruby
s2013 has joined #ruby
kenneth has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
MissionCritical has joined #ruby
danijoo has joined #ruby
ylluminarious is now known as ylluminarious|aw
sptx00 has quit [Quit: Ex-Chat]
combusean has joined #ruby
krzkrz has quit [Quit: WeeChat 0.4.3]
krz has joined #ruby
bradhe_ has joined #ruby
centrx has quit [Quit: All this computer hacking is making me thirsty]
samuel02 has joined #ruby
zorak has joined #ruby
supermarin___ has quit [Ping timeout: 276 seconds]
bradhe has quit [Ping timeout: 252 seconds]
cescalante is now known as ce_afk
phracker has joined #ruby
r0bby has quit [Quit: Konversation terminated!]
IceDragon_ is now known as IceDragon
aspires has joined #ruby
bradhe_ has quit [Ping timeout: 252 seconds]
oo_ has quit [Remote host closed the connection]
samuel02 has quit [Ping timeout: 265 seconds]
St_Marx has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
RaptorJesus has quit [Write error: Broken pipe]
end_guy has quit [Write error: Broken pipe]
tacos1de has quit [Write error: Broken pipe]
ra4king has quit [Quit: Leaving]
Xeago_ has quit [Remote host closed the connection]
<ericwood>
I definitely fucked up some lib stuff but I can't seem to track down what argparser is and why it's missing
s2013 has quit [Ping timeout: 240 seconds]
Royalb15 has joined #ruby
<RubyPanther>
ericwood: you're probably missing a C++ dev lib, or screwed up your include path
Sammael has joined #ruby
<ari-_-e>
how do I make nokogiri create a document fragment in strict mode?
<ericwood>
RubyPanther: I figured as much, no clue what is missing though, google searches haven't revealed which liibz
<RubyPanther>
ericwood: it should be getting cstring from the stdlib
<ericwood>
RubyPanther: lol seriously
<RubyPanther>
that's why the searches don't show it as a package :)
<ericwood>
GCC 4.6.3
<RubyPanther>
I'm just trying, I don't actually know this one for your platform
<ericwood>
I appreciate the help :D
aspires has quit []
aspires has joined #ruby
Lemur has quit [Remote host closed the connection]
moneydouble1 has quit [Quit: Leaving.]
b1205 has quit [Ping timeout: 276 seconds]
go|dfish1 is now known as go|dfish
zorak has quit [Read error: Connection reset by peer]
end_guy has joined #ruby
pietr0 has quit [Quit: pietr0]
<ericwood>
kinda wish ruby-build would cache downloaded rubies when the install fails
Guest15211 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maletor has joined #ruby
<ericwood>
lol I did a brew update on gcc and the previous error went away
<ericwood>
:shrug:
jimbow has joined #ruby
ra4king has joined #ruby
<ericwood>
jk
<ericwood>
how is my .rvm directory so large that it takes like forever to remove and I can't get a calculated size on it?
<shevy>
hehe
<ericwood>
seriously, though
agjacome has quit [Ping timeout: 252 seconds]
<shevy>
perhaps it keeps a cache of p0rn
axilla has joined #ruby
mjs2600 has joined #ruby
<ericwood>
huh, rm failed
<ericwood>
wtf
<ericwood>
woo sudo killed it
jimbow has quit [Ping timeout: 265 seconds]
<ericwood>
RIP
<shevy>
rm failed?
<ericwood>
yeah
<ericwood>
but sudo rm worked
* ericwood
shrugs harder
<ericwood>
wtf cstring problem is still happening
<drizz_>
ericwood: probably gems like nokogiri
ce_afk is now known as cescalante
<ericwood>
how is cstring not a valid file or directory
<ericwood>
it's a stdlib thing
jaake has quit [Ping timeout: 276 seconds]
netf has joined #ruby
tsunamie has joined #ruby
codabrink has joined #ruby
timfoo has joined #ruby
barratt has joined #ruby
soulcake has joined #ruby
_JamieD_ has joined #ruby
netf has quit [Remote host closed the connection]
netf has joined #ruby
magicien has joined #ruby
axilla has quit [Ping timeout: 252 seconds]
soulcake has quit [Changing host]
soulcake has joined #ruby
mjs2600 has quit [Ping timeout: 265 seconds]
lw has joined #ruby
havenwood has joined #ruby
momomomomo has quit [Quit: momomomomo]
n_blownapart has joined #ruby
alexju_ has quit [Remote host closed the connection]
timonv has joined #ruby
<n_blownapart>
hi with some help earlier I thought I learned how line 22 works with multiple assignment. But when I write it out in what I thought was correct longhand I get a different result in the third example here: https://gist.github.com/anonymous/7488a73946ba3784f5d5
<ari-_-e>
n_blownapart: when you get to line 35, what is the value of a?
cescalante is now known as ce_afk
<n_blownapart>
ari-_-e: er....
<ari-_-e>
in general
timonv has quit [Ping timeout: 265 seconds]
<ari-_-e>
what is it the same as
oo_ has joined #ruby
<noob101>
I have a question.
Valesk_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<n_blownapart>
I dont know ari-_-e hey shevy what is that a wildcard (*) ?
<shevy>
n_blownapart it is called the splat operator
<shevy>
n_blownapart you can think of it as collecting arguments into an array, from 0 arguments up to a lot
zorak has joined #ruby
yubrew has quit [Ping timeout: 276 seconds]
<j_mcnally>
noob101: is it about global variables?
<shevy>
no please :(
<shevy>
we answered that already noob101
<n_blownapart>
shevy: yeah thanks I remember it.
<ari-_-e>
n_blownapart: think through exactly what is happening
<ari-_-e>
n_blownapart: those two are not equivalent
<ericwood>
*sigh* isn't there a way to download a pre-built version of jruby?
<shevy>
hey it has j in it for java, it's supposed to be painful
<n_blownapart>
ari-_-e: given the results it looks like one element was left out of the last examples summation.
<ari-_-e>
n_blownapart: don't think about the result
<ericwood>
jruby is usually not painful, I just happen to have screwed up a bunch of stuff with my computer
<ari-_-e>
n_blownapart: look at the code
Valesk has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
b1205 has joined #ruby
<n_blownapart>
ari-_-e: ok I need some time thanks.
<j_mcnally>
ericwood: u havin problems today huh?
<j_mcnally>
`rvm install jruby` not working?
lkba has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
anaeem1_ has joined #ruby
<noob101>
So I have an array. greetings = [["hello",1],["goodbye",2],["later",3]] The thing is that since this is an array of arrays, I was using one of the the last index of one of the arrays in the array greetings so basically, I would use the 1 in ["hello",1]by doing "greetings[rand(0)][1]". To get to the point, I would like to use a method that which would allow me to call the method on the "greetings[rand(0)][1]" so it would delete that
<noob101>
How would I do that and what is the method for that.
lyanchih has quit [Quit: lyanchih]
<ericwood>
j_mcnally: yah
<shevy>
wat
<noob101>
Phew, that is my long question. Not global variables.
<ericwood>
gonna just download the binary for jrubyinstaed of using ruby-build for it
<ericwood>
fuck this noise
<shevy>
I did not understand the question
<shevy>
all I understand is you have an array
<shevy>
and you want to do what with it?
<noob101>
Some of it got cut off I think :(
mary5030 has joined #ruby
<shevy>
good
<shevy>
it was too long anyway
<noob101>
Well I want to use a method to delete an array in the array
<shevy>
ok
crazymykl has quit [Remote host closed the connection]
<noob101>
my array greetings is an array of arrays
<shevy>
def foo(i = greetings); end
<noob101>
huh
crazymykl has joined #ruby
<shevy>
did you write that method already
<noob101>
I am confused.
oo_ has quit [Remote host closed the connection]
<shevy>
what about
<shevy>
did you start writing anything yet
<noob101>
Prior to what?
jaake has joined #ruby
<j_mcnally>
ericwood: i would suggest at some point you unfuck your computer
<noob101>
^ lol
aspires has quit []
<shevy>
noob101 you asked a question above
<ari-_-e>
noob101: does it actually matter that you have an array of arrays?
<shevy>
I ask for the current code
<ericwood>
j_mcnally: I'll do that when I get a new one
<ericwood>
too much tinkering with silly libraries and stupid shit
<noob101>
I didn't write a method shevy
<j_mcnally>
ericwood: i feel you
<shevy>
noob101 go start writing it!
<noob101>
ok look
SCommette has quit [Quit: SCommette]
try has joined #ruby
maestrojed has joined #ruby
<noob101>
Is there a method in ruby that allows me to delete an array that is in an array with a bunch of arrays
<n_blownapart>
ari-_-e: so should line 35 look like this? : b = [b, a + b]
jemas has joined #ruby
<ari-_-e>
noob101: why does it matter where your arrays are?
<n_blownapart>
ari-_-e: very sorry I am reading about 'discrete' steps.
<ari-_-e>
Hanmac: why would it throw an error?
<ari-_-e>
n_blownapart: I just meant list the steps
ascarter has joined #ruby
<ari-_-e>
oh, you mean if the variables aren't defined?
<Hanmac>
yeah, because variables are defined from left-to-right, while code is run from right-to-left
<ari-_-e>
right...
agarie has quit [Ping timeout: 255 seconds]
b1205 has quit [Ping timeout: 240 seconds]
duncannz has joined #ruby
lw has quit [Quit: s]
<ari-_-e>
it doesn't really do it simultaneously though - I assume it saves the values on the right somehow and then assigns them accordingly
agent_white has joined #ruby
lw has joined #ruby
RaptorJesus has joined #ruby
marcdel has quit [Ping timeout: 265 seconds]
<agent_white>
Good evening
<wallerdev>
yo
zapho has left #ruby [#ruby]
Asher has joined #ruby
oo_ has joined #ruby
r0bby has joined #ruby
<n_blownapart>
all I know ari-_-e is that the multiple expression does the math first on the right and the sum is assigned to b on the left side, correct?
jamto11 has joined #ruby
<ari-_-e>
n_blownapart: I have to go and will probably be back in about half an hour, but I guess it might help you to think of a, b = b, a as being equivalent to a, b = [b, a]
<ari-_-e>
that's probably the "implicit array" thing that you were talking about
<n_blownapart>
ari-_-e: ok I will work hard and will await your return. pax
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MrWharfsnort has joined #ruby
<ari-_-e>
n_blownapart: I'd really encourage you to think about this problem more abstractly, separately from the larger problem
<ari-_-e>
just think about a, b = [b, a]
<ari-_-e>
and what that actually does
<n_blownapart>
ok will do ^
marcdel has joined #ruby
<ari-_-e>
and why it's different from the other code
ari-_-e has quit [Quit: Leaving]
oo_ has quit [Ping timeout: 265 seconds]
jamto11 has quit [Ping timeout: 265 seconds]
tkuchiki has quit [Quit: Leaving...]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AlexRussia has quit [Quit: Konversation terminated!Good bye!]
tkuchiki has joined #ruby
<ericwood>
wow cd is totally way faster without rvm
<wallerdev>
??
omosoj has joined #ruby
<ericwood>
it just is
<wallerdev>
how slow can rvm make cd
<wallerdev>
lol
<ericwood>
noticeably slow, apparently
darkMatter is now known as haha_
<wallerdev>
idk man ive got rvm installed
<wallerdev>
cd is quick
<ericwood>
cd'ing into a dir with a .rvmrc would add like a few seconds of delay
cantonic has quit [Quit: cantonic]
<ericwood>
but that might just be my system
axilla has joined #ruby
<ericwood>
I've heard of other people with the same problem, though
<wallerdev>
yeah ive heard people complain about rvm before
<wallerdev>
ive never experienced cd taking longer than like 0.10s haha
hgl has quit [Ping timeout: 252 seconds]
b1205 has joined #ruby
ce_afk is now known as cescalante
Advocation has joined #ruby
yubrew has joined #ruby
axilla has quit [Ping timeout: 252 seconds]
sdelmore has joined #ruby
jimmyhoughjr has joined #ruby
aganov has joined #ruby
Bira has joined #ruby
lw has quit [Quit: s]
Xeago has joined #ruby
apeiros has quit [Remote host closed the connection]
bafbomb has joined #ruby
apeiros has joined #ruby
Advocation has quit [Ping timeout: 252 seconds]
sdelmore has quit [Client Quit]
yubrew has quit [Ping timeout: 240 seconds]
brunops has quit [Quit: leaving]
maestrojed has quit [Quit: Computer has gone to sleep.]
JasmeetQA has joined #ruby
timfoo has quit [*.net *.split]
tsunamie has quit [*.net *.split]
netf has quit [*.net *.split]
barratt has quit [*.net *.split]
soulcake has quit [*.net *.split]
magicien has quit [*.net *.split]
codabrink has quit [*.net *.split]
_JamieD_ has quit [*.net *.split]
apeiros has quit [Ping timeout: 258 seconds]
Avahey_ has quit [Quit: Connection closed for inactivity]
cescalante is now known as ce_afk
Xeago has quit [Ping timeout: 252 seconds]
MatthewsFace has quit [Quit: This computer has gone to sleep]
psyko666 has joined #ruby
MatthewsFace has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
rubyshop has joined #ruby
marcdel has quit []
rubyshop has quit [Client Quit]
bahar has quit [Ping timeout: 252 seconds]
subbyyy has joined #ruby
Arkaniad has quit [Ping timeout: 255 seconds]
Bira has quit [Ping timeout: 265 seconds]
bahar has joined #ruby
mr_snowf1ake has quit [Ping timeout: 264 seconds]
lyanchih_ has joined #ruby
Bira has joined #ruby
Bira has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
amclain has quit [Quit: Leaving]
ra4king has quit [Ping timeout: 252 seconds]
ra4king has joined #ruby
lethjakman has joined #ruby
Asher has quit [Read error: No route to host]
Asher1 has joined #ruby
skysploit has joined #ruby
DarthGandalf has quit [Ping timeout: 240 seconds]
samuel02 has joined #ruby
raspberryfan has quit [Remote host closed the connection]
b1205 has quit [Ping timeout: 276 seconds]
raspberryfan has joined #ruby
shock_one has joined #ruby
Doppp has quit [Quit: leaving]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Vivekananda has joined #ruby
SegFaultAX has quit [Excess Flood]
omosoj has quit [Ping timeout: 252 seconds]
apeiros has joined #ruby
SegFaultAX has joined #ruby
nopolitica has joined #ruby
x1337807x has joined #ruby
samuel02 has quit [Ping timeout: 252 seconds]
nopolitica has quit [Client Quit]
Asher1 is now known as Asher
Es0teric has quit [Quit: Computer has gone to sleep.]
yfeldblum has quit [Ping timeout: 252 seconds]
vpretzel has joined #ruby
ra4king has quit [Remote host closed the connection]
davedev24_ has quit [Remote host closed the connection]
echevemaster has quit [Remote host closed the connection]
oo_ has joined #ruby
<agent_white>
cd faster without rvm? Sounds like you accidentally put your system through a grinder.
davedev24_ has joined #ruby
skysploit has quit [Ping timeout: 258 seconds]
Symbiosisz has quit [Quit: Leaving]
Morkel has joined #ruby
n_blownapart has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
DarthGandalf has joined #ruby
ra4king has joined #ruby
bradhe has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
vpretzel has quit [Ping timeout: 258 seconds]
bradhe has quit [Remote host closed the connection]
davedev24_ has quit [Ping timeout: 252 seconds]
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sensen has quit [Ping timeout: 252 seconds]
toastynerd has joined #ruby
reference has joined #ruby
b1205 has joined #ruby
toastynerd has quit [Remote host closed the connection]
ra4king has quit [Remote host closed the connection]
Doppp has joined #ruby
ra4king has joined #ruby
bradhe has joined #ruby
ra4king has quit [Remote host closed the connection]
sigurding has joined #ruby
tobago has joined #ruby
akonny has joined #ruby
ampharmex is now known as perdent
perdent is now known as ampharmex
raspberryfan has quit [Ping timeout: 258 seconds]
memorozovm has joined #ruby
kies has quit [Ping timeout: 252 seconds]
Es0teric has joined #ruby
Bira has joined #ruby
heftig has quit [Quit: Quitting]
Es0teric has quit [Client Quit]
yubrew has joined #ruby
Bira has quit [Ping timeout: 276 seconds]
ra4king has joined #ruby
mjs2600 has joined #ruby
axilla has joined #ruby
raspberryfan has joined #ruby
raspberryfan has quit [Remote host closed the connection]
nathancahill has quit [Quit: nathancahill]
raspberryfan has joined #ruby
yubrew has quit [Ping timeout: 258 seconds]
einarj has joined #ruby
bal has joined #ruby
ce_afk is now known as cescalante
agent_white has quit [Read error: Connection reset by peer]
mjs2600 has quit [Ping timeout: 252 seconds]
reference has quit [Read error: Connection reset by peer]
duncannz has quit [Read error: Connection reset by peer]
ce_afk is now known as cescalante
bahar has joined #ruby
duncannz has joined #ruby
Soliah has quit [Quit: Soliah]
axilla has quit [Ping timeout: 258 seconds]
kai1 has left #ruby [#ruby]
yfeldbl__ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
mradmacher has joined #ruby
orriols has joined #ruby
zigomir has joined #ruby
bahar has quit [Ping timeout: 240 seconds]
iamayam has quit [Ping timeout: 252 seconds]
relix has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dumdedum has joined #ruby
noop has joined #ruby
pehlert has joined #ruby
cescalante is now known as ce_afk
Bira has joined #ruby
bahar has joined #ruby
andikr has joined #ruby
ari-_-e has joined #ruby
marcdel_ has quit []
kitak has quit [Remote host closed the connection]
blackmesa has joined #ruby
skaflem has joined #ruby
fabrice31 has joined #ruby
Bira has quit [Ping timeout: 258 seconds]
havenwood has quit []
LiohAu has joined #ruby
jimmyhoughjr has quit [Ping timeout: 265 seconds]
subbyyy_ has quit [Ping timeout: 265 seconds]
kitak has joined #ruby
elabs-developer has joined #ruby
Burgestrand has joined #ruby
claymore has joined #ruby
gmas has quit [Ping timeout: 252 seconds]
ampharmex is now known as aelse
supermarin has quit [Quit: Computer has gone to sleep.]
supermarin has joined #ruby
DEA7TH has joined #ruby
kaipaesslercom has joined #ruby
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
supermarin has quit [Ping timeout: 258 seconds]
rm_ has joined #ruby
schaary is now known as schaary|afk
samuel02 has joined #ruby
Rahul_Roy has joined #ruby
TwinkleHood has joined #ruby
rm_ has quit [Ping timeout: 252 seconds]
<TwinkleHood>
Hey, anybody know of library/way to determine whether, and where to lines intersect in 4 dimensions?
Xeago has joined #ruby
Morkel_ has joined #ruby
obs has joined #ruby
Doppp has quit [Quit: Lost terminal]
samuel02 has quit [Ping timeout: 252 seconds]
Morkel has quit [Ping timeout: 252 seconds]
Morkel_ is now known as Morkel
<pontiki>
my maths aren't good enough to even begin to understand how to do that :(
Dr3amc0d3r is now known as Dr3amc0d3r|away
danjordan has joined #ruby
<TwinkleHood>
Maybe NSA will lend me some serverz so I can bruteforce it in realtime.
parduse has quit [Killed (sendak.freenode.net (Nickname regained by services))]
parduse has joined #ruby
parduse has quit [Changing host]
parduse has joined #ruby
<TwinkleHood>
Still more plausible than switching to python.
vpretzel has joined #ruby
setra has joined #ruby
jimmyhoughjr has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
zz_nopc0de is now known as nopc0de
Doppp has joined #ruby
ephemerian has joined #ruby
tesuji has joined #ruby
WishBoy- has quit [Remote host closed the connection]
vpretzel has quit [Ping timeout: 265 seconds]
marcdel has joined #ruby
sk87 has joined #ruby
pehlert has quit [Quit: Lost terminal]
yubrew has joined #ruby
_broody has joined #ruby
Es0teric has joined #ruby
Hanmac1 has joined #ruby
magicien has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
alex88 has joined #ruby
yubrew has quit [Ping timeout: 258 seconds]
soulcake has joined #ruby
barratt has joined #ruby
timfoo_ has joined #ruby
netf has joined #ruby
tsunamie has joined #ruby
codabrink has joined #ruby
_JamieD_ has joined #ruby
ktun has joined #ruby
alex88 has quit [Ping timeout: 276 seconds]
alex88 has joined #ruby
tsunamie has quit [Max SendQ exceeded]
soulcake has quit [Changing host]
soulcake has joined #ruby
<certainty>
tagrudev: yow :D
tsunamie has joined #ruby
<tagrudev>
certainty, sup mate
_broody has quit [Read error: Connection reset by peer]
<certainty>
tagrudev: at work, what about you?
<tagrudev>
same
rm_ has joined #ruby
marr has joined #ruby
glenfe has quit [Ping timeout: 240 seconds]
_justin has quit [Quit: _justin]
monkegjinni has joined #ruby
ndrei has joined #ruby
mjs2600 has joined #ruby
ndrei has quit [Read error: Connection reset by peer]
axilla has joined #ruby
kalleth_ is now known as kalleth
samuel02 has joined #ruby
sheperson has joined #ruby
<TwinkleHood>
work work. I guess the room's so quiet because everyone is so busy focusing on work. lol. not.
ce_afk is now known as cescalante
rm_ has quit [Ping timeout: 252 seconds]
mjs2600 has quit [Ping timeout: 252 seconds]
mikecmpbll has joined #ruby
Bira has joined #ruby
Nahra has quit [Remote host closed the connection]
axilla has quit [Ping timeout: 252 seconds]
mercerist has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
Nahra has joined #ruby
claymore has quit [Ping timeout: 276 seconds]
jambolina has joined #ruby
<pontiki>
prolly not...
<pontiki>
it's 3am
<pontiki>
i should be pondering horizontal somnolence
timonv has joined #ruby
rdark has joined #ruby
marcdel has quit []
aiguu has left #ruby ["WeeChat 0.4.3"]
jambolina has quit [Ping timeout: 252 seconds]
ghr has joined #ruby
rails426 has joined #ruby
nfk has joined #ruby
agent_white has quit [Quit: night]
cescalante is now known as ce_afk
Bira has quit [Ping timeout: 252 seconds]
timonv_ has joined #ruby
frogssgy has joined #ruby
charliesome has joined #ruby
klaut has quit [Remote host closed the connection]
kitak has quit [Remote host closed the connection]
Shidash has joined #ruby
shock_one has joined #ruby
jambolina has joined #ruby
roolo has joined #ruby
moneydouble has joined #ruby
timonv has quit [Ping timeout: 265 seconds]
bahar has quit [Ping timeout: 252 seconds]
alem0lars has quit [Quit: Going AFK...]
claymore has joined #ruby
frosgy has quit [Ping timeout: 264 seconds]
JoeGaudet has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
olivier_bK has joined #ruby
Bira has joined #ruby
bahar has joined #ruby
sinkensabe has quit [Remote host closed the connection]
_justin has joined #ruby
sinkensabe has joined #ruby
selite has joined #ruby
vlad_starkov has joined #ruby
<selite>
How do I get the length of the hamiltonian path if I have the length of the travelling salesman path?
JoeGaudet has quit [Read error: No route to host]
<selite>
TSP goes back to the source.
ohcibi_ is now known as ohcibi
JoeGaudet has joined #ruby
ninegrid has quit [Quit: leaving]
nopc0de is now known as zz_nopc0de
Bira has quit [Ping timeout: 276 seconds]
zz_nopc0de is now known as nopc0de
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sinkensabe has quit [Ping timeout: 264 seconds]
_axx_ has left #ruby [#ruby]
kitak has joined #ruby
kiri has joined #ruby
DaniG2k has joined #ruby
alem0lars has joined #ruby
kitak has quit [Read error: Connection reset by peer]
kitak has joined #ruby
ninegrid has joined #ruby
supermarin has joined #ruby
elaptics`away is now known as elaptics
JoeGaudet has quit [Read error: Connection timed out]
selite has quit [Quit: Page closed]
ndrei has joined #ruby
banister has joined #ruby
vpretzel has joined #ruby
supermarin has quit [Ping timeout: 252 seconds]
reference has quit [Remote host closed the connection]
<testol>
I'm using an gem in my program - I'm done writing the "happy path" and now I need to think about exceptions... how do you guys tend to go about working out which exceptions to rescue?
<testol>
Do you literally read all gems' source code that you use and rescue for every raise ? (Doesn't sound right)
yubrew has joined #ruby
Gabri has quit [Remote host closed the connection]
sinkensabe has joined #ruby
tvw has joined #ruby
sinkensabe has quit [Read error: Connection reset by peer]
sinkensabe has joined #ruby
vpretzel has quit [Ping timeout: 240 seconds]
_justin has quit [Quit: _justin]
<pontiki>
only for ones that the calling program should be expected to handle
LekeFly has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
timonv_ has quit [Remote host closed the connection]
alem0lars has quit [Quit: alem0lars]
heftig has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<pontiki>
forex, if it's a rather simplistic command line script, i generally don't do anything except make sure the exception gets reported
duncannz has quit [Quit: Leaving]
<pontiki>
if it's something the gem does to indicate a special condition, such as something not found when it should be (possibly something corrupted in transimission), but the calling program can continue anyway, i catch those and report them, and then just carry on
<pontiki>
i mean, i don't know that there's a hard-and-fast rule about it, you know?
<testol>
Well, my app is expected to keep running
<pontiki>
so maybe catch them and log them some place, or notify something else
canton7-mac has joined #ruby
<pontiki>
recent example, rails app calling a payment gateway, the gateway goes down for some reason. the rails app needs to keep running, but not do anything else with the gateway until it comes back
ridget has joined #ruby
wallerdev has quit [Quit: wallerdev]
Gue______ has joined #ruby
kiri_ has joined #ruby
wuest_ is now known as wuest
kiri has quit [Read error: Connection reset by peer]
<pontiki>
but if the rails app requests some information that the gateway can't find (in this case, an id number of something that is supposed to be vaulted at the gateway, a credit card, a customer, an address,etc) then there is a data corruption, the rails app still needs to keep running, but the admins and support team need to be notified right away
dawkirst has joined #ruby
d34th4ck3r has joined #ruby
<pontiki>
but if there's some other kind of exception, then it needs to be handled in a more general way
kiri_ has quit [Client Quit]
lobstah has quit [Ping timeout: 255 seconds]
jamto11 has joined #ruby
<testol>
pontiki: that makes sense. All the components in my app are equally critical to the process, and given that it's meant to work in a fairly sequential, ordered manner, I think it's better to just crash for unknowns
kiri has joined #ruby
ta_ has quit [Remote host closed the connection]
* pontiki
nods
<pontiki>
as long as the crash is actually noticeable
ndrei has quit [Quit: leaving]
Advocation has joined #ruby
<testol>
pontiki: hehe, very good point
<pontiki>
there are so many stories; "What do you mean we have no backups?!?!" "The backup system crashed a month ago and no one noticed.."
dilated_dinosaur has quit [Ping timeout: 240 seconds]
jamto11 has quit [Ping timeout: 245 seconds]
_justin has joined #ruby
<certainty>
testol: one thing is monitoring, another thing is possibly to rely a circuit breaker on external resources like payment gateways and add these to your monitoring too
<certainty>
s/rely/install
<certainty>
i don't know why i said rely
bigkevmcd has quit [Ping timeout: 252 seconds]
schickung has joined #ruby
moritzs has joined #ruby
deric_skibotn_ has quit [Ping timeout: 252 seconds]
ripnix has joined #ruby
<olivier_bK>
i have question about how t ocall method class in another method
<canton7>
olivier_bK, class names begin with an upper case
rm_ has joined #ruby
<canton7>
and you'll need to "require 'class_d'" at the top of your class_a_b.rb
bahar has quit [Ping timeout: 245 seconds]
<olivier_bK>
it's what i do
<canton7>
olivier_bK, the upper-case/lower-case thing *is* important - it's not just convention. things that start with an upper-case letter are constants
<olivier_bK>
i write require 'name_offile'
foooobear has joined #ruby
<canton7>
well, it's now what you do in your pastie ;)
axilla has joined #ruby
<canton7>
so if the pastie's wrong, update thepastie
psyko666 has quit [Read error: Connection reset by peer]
bahar has joined #ruby
ce_afk is now known as cescalante
nopc0de is now known as zz_nopc0de
workmad3 has joined #ruby
<olivier_bK>
canton7, give me one minute please
<olivier_bK>
:)
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
rm_ has quit [Ping timeout: 252 seconds]
kith has quit [Quit: kith]
<Hanmac1>
canton7i think he might need require_relative more
ephemerian has quit [Remote host closed the connection]
<Wayneoween>
Anyone who wants a keybasi.io invite?
shvelo has quit [Ping timeout: 252 seconds]
schickung has quit [Quit: schickung]
<benlieb>
tobiasvl: that's what I usually do. I must have been doing too much JS. I just wanted to use "this" inside the loop.
orriols has quit [Ping timeout: 240 seconds]
<benlieb>
I bet there's a secret var like $_ or something defined somewhere that refers to the array
<lolmaus>
I've got two arrays of identical length. I would like to create a hash with keys being items from first array and values being items from the second array. I'm doing it pretty dim-wittedly. I'm sure there's some very sugarish way to do this. Please suggest one.
beatdown has joined #ruby
yubrew has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<beatdown>
hi, I have installed 2 versions of a gem that offers a command to be run from the system shell. I know I can use _old.version_ to run the command bundled with the old version, but how can I make the older version the default one to be used from the CLI?
Fractional has joined #ruby
tjsousa_____ has joined #ruby
<Fractional>
What is the simplest way to read all content from a file and store each line into an array?
Rahul_Roy has quit [Quit: Connection closed for inactivity]
<certainty>
Fractional: IO#readlines
<lolmaus>
benlieb: in real life projects you rarely parse array literals. If you do though and you don't want to declare a variable, you can use tap: `[1, 2, 3].tap { |this| this.each_index { |index| puts this[index + 1] }}`
<benlieb>
I'm going to avoid tap though for now. I tried to understand it once.
<lolmaus>
benlieb: still you've got them in variables :P
schickung has joined #ruby
Xeago has quit [Remote host closed the connection]
<benlieb>
lolmaus: yeah
<benlieb>
in this case I needed to refer to the next element
<lolmaus>
benlieb: tap is REALLY easy to understand if you're originating from JS!
linojon has joined #ruby
<Fractional>
certainty: Thanks!
<benlieb>
lolmaus: I think it has to do with an old project in ruby 1.8.6 and rails 2.1.1 that I had to convert that gave me the misery
subraminion has quit [Quit: Computer has gone to sleep.]
<benlieb>
There was some method deprivation that I had to replace with tap and it was nightmarish.
DEA7TH has left #ruby [#ruby]
<benlieb>
deprication
<benlieb>
lol
kyb3r_ has quit [Read error: Connection reset by peer]
<benlieb>
spellcheck
subraminion has joined #ruby
blackmesa has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
karupa is now known as zz_karupa
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
reference-lost has joined #ruby
reference has quit [Ping timeout: 240 seconds]
Morkel has quit [Quit: Morkel]
chipotle has quit [Quit: cya]
benlieb has quit [Quit: benlieb]
chipotle has joined #ruby
zz_karupa is now known as karupa
Lewix has joined #ruby
chipotle has quit [Client Quit]
Lewix has quit [Remote host closed the connection]
apeiros has quit [Ping timeout: 258 seconds]
chipotle has joined #ruby
aganov has quit [Quit: Leaving]
sk87 has joined #ruby
chipotle has quit [Client Quit]
diegoviola has joined #ruby
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chipotle has joined #ruby
workmad3 has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
chipotle has quit [Client Quit]
roolo has quit [Quit: Leaving...]
kiri has quit [Quit: Leaving]
mr_snowf1ake has joined #ruby
chipotle has joined #ruby
jamto11 has joined #ruby
sensen has quit [Quit: leaving]
chipotle has quit [Client Quit]
dingus_khan has quit [Remote host closed the connection]
_justin has quit [Ping timeout: 252 seconds]
catphish has joined #ruby
chipotle has joined #ruby
chipotle has quit [Client Quit]
_justin has joined #ruby
chipotle has joined #ruby
Bira has joined #ruby
jamto11 has quit [Ping timeout: 252 seconds]
chipotle has quit [Client Quit]
dawkirst has quit [Remote host closed the connection]
chipotle has joined #ruby
ktun has joined #ruby
magri has joined #ruby
Deele has joined #ruby
chipotle has quit [Client Quit]
chipotle has joined #ruby
rm_ has joined #ruby
Bira has quit [Ping timeout: 252 seconds]
chipotle has quit [Client Quit]
decoponio has joined #ruby
chipotle has joined #ruby
memorozovm has quit [Remote host closed the connection]
chipotle has quit [Client Quit]
raspberryfan has quit []
krz has quit [Quit: WeeChat 0.4.3]
memorozovm has joined #ruby
basldex has joined #ruby
<basldex>
hi
chipotle has joined #ruby
felixjet_ has quit [Read error: Connection reset by peer]
ce_afk is now known as cescalante
<basldex>
is it possible to create a TCPSocket object by file descriptor? I need to save the connections in a redis db and would like to send data to those file descriptors
rm_ has quit [Ping timeout: 252 seconds]
chipotle has quit [Client Quit]
yfeldblu_ has joined #ruby
chipotle has joined #ruby
<toretore>
Socker.for_fd
chipotle has quit [Client Quit]
chipotle has joined #ruby
yfeldblum has quit [Ping timeout: 276 seconds]
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
<basldex>
nice
<basldex>
thanks, toretore
yfeldblu_ has quit [Ping timeout: 240 seconds]
chipotle has quit [Client Quit]
chipotle has joined #ruby
shredding has quit [Quit: shredding]
chipotle has quit [Client Quit]
chipotle has joined #ruby
jottr has joined #ruby
chipotle has quit [Client Quit]
cescalante is now known as ce_afk
Xeago has joined #ruby
chipotle has joined #ruby
Xeago has quit [Remote host closed the connection]
shvelo has joined #ruby
fabrice31 has joined #ruby
m8 has joined #ruby
chipotle has quit [Client Quit]
andikr has quit [Remote host closed the connection]
noob101 has quit [Ping timeout: 240 seconds]
bakflash has joined #ruby
basldex has quit [Quit: leaving]
chipotle has joined #ruby
jambolina has quit [Ping timeout: 265 seconds]
chipotle has quit [Client Quit]
andrewlio has joined #ruby
jambolina has joined #ruby
moneydouble has quit [Quit: Leaving.]
yubrew has joined #ruby
chipotle has joined #ruby
phutchins has joined #ruby
agjacome has joined #ruby
chipotle has quit [Client Quit]
chipotle has joined #ruby
chipotle has quit [Client Quit]
dawkirst has joined #ruby
chipotle has joined #ruby
yubrew has quit [Ping timeout: 264 seconds]
_aeris_ has left #ruby ["Konversation terminated!"]
chipotle has quit [Client Quit]
chipotle has joined #ruby
dawkirst has quit [Remote host closed the connection]
dawkirst has joined #ruby
mailo has joined #ruby
chipotle has quit [Client Quit]
iamayam has joined #ruby
chipotle has joined #ruby
phoo1234567 has joined #ruby
chipotle has quit [Client Quit]
freerobby has joined #ruby
postmodern has quit [Quit: Leaving]
chipotle has joined #ruby
kitak has quit [Remote host closed the connection]
JasmeetQA has quit [Read error: Connection reset by peer]
chipotle has quit [Client Quit]
chipotle has joined #ruby
chipotle has quit [Client Quit]
claymore has joined #ruby
charliesome has joined #ruby
Fractional has quit [Remote host closed the connection]
noop has joined #ruby
mjs2600 has joined #ruby
_justin has quit [Quit: _justin]
davividal has joined #ruby
dangerousdave has quit [Ping timeout: 240 seconds]
zeroXten_ has quit [Quit: leaving]
ldnunes has joined #ruby
mjs2600 has quit [Remote host closed the connection]
<davividal>
hi. I have a bash script to deploy my apps (around 10). This script uses ncurses and really helps us. We want to migrate to capistrano, but it would be nice if we could keep a ncurses-like interface. While I could create a bash script to wrap a bunch of ruby scripts, I think that it would be even better to use ruby-only. So, is there a ncurses-like library for ruby? I came across some 'ruby-ncurses' libs on github, but they are all very complex compared
<davividal>
to bash + ruby approach.
dangerousdave has joined #ruby
danjordan has quit [Quit: danjordan]
blackmesa has quit [Ping timeout: 252 seconds]
elaptics is now known as elaptics`away
jmurray has joined #ruby
lkba has joined #ruby
_justin has joined #ruby
Rahul_Roy has joined #ruby
danshultz has joined #ruby
bahar has quit [Ping timeout: 252 seconds]
bahar has joined #ruby
fabrice31 has quit [Remote host closed the connection]
<pagioss>
hi all, which library can i use to detect keystrokes and do some action based on that/
<pagioss>
need torun headless..
blackmesa has joined #ruby
ahmdrefat has joined #ruby
nopc0de is now known as zz_nopc0de
oo_ has quit [Remote host closed the connection]
Soda has joined #ruby
chrisseaton has joined #ruby
reference-lost has quit [Remote host closed the connection]
<lolmaus>
I would like an equivalent of `.reject!` that would remove items from array and return an array of removed items. Is there a built-in method for that? PS I'm operating a HUGE array, 400 MB jsonified.
reference has joined #ruby
oo_ has joined #ruby
<sweeper>
hmm. can I have a class and a module with the same name? e.g. MyLib::FooBar.new(yadda yadda), Mylib::FooBar::ThingInside
_justin has quit [Quit: _justin]
minver has joined #ruby
Emmanuel_Chanel has joined #ruby
phansch has quit [Quit: WeeChat 0.4.3]
subraminion has quit [Quit: Computer has gone to sleep.]
subraminion has joined #ruby
rm_ has joined #ruby
<pagioss>
can i catch the keystrokes if i am not highlighting the ruby program console? like listen to any keystroke anytime it is pressed
nateberkopec has joined #ruby
eka has joined #ruby
<pagioss>
ill use the ncurse library thanks anwyas
ta has joined #ruby
ta has quit [Remote host closed the connection]
ta has joined #ruby
axilla has joined #ruby
danjordan has joined #ruby
eka has quit [Client Quit]
<shvelo>
pagioss, you need direct access to the keyboard
<shvelo>
not sure how :D
nateberkopec has quit [Client Quit]
subraminion has quit [Ping timeout: 252 seconds]
ce_afk is now known as cescalante
rm_ has quit [Ping timeout: 252 seconds]
nateberkopec has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
jespada has joined #ruby
danijoo has joined #ruby
dwayhs has joined #ruby
Doxin has joined #ruby
reference has quit [Remote host closed the connection]
<Doxin>
I'm getting Errno::EACCES: Permission denied on a folder that has +rwx for everyone. what gives?
axilla has quit [Ping timeout: 276 seconds]
kaipaesslercom has left #ruby [#ruby]
nateberkopec has quit [Ping timeout: 240 seconds]
freerobby has quit [Quit: Leaving.]
pontiki has joined #ruby
timgauthier has joined #ruby
yubrew has joined #ruby
skaflem has quit [Ping timeout: 265 seconds]
ta has quit [Read error: Connection reset by peer]
subraminion has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
karupa is now known as zz_karupa
cescalante is now known as ce_afk
Bira has joined #ruby
sk87 has joined #ruby
rails426 has quit []
linojon has quit [Quit: linojon]
oo_ has quit [Remote host closed the connection]
reference has joined #ruby
_justin has joined #ruby
andikr has joined #ruby
yubrew has quit [Ping timeout: 264 seconds]
moritzs has quit [Ping timeout: 265 seconds]
sambao21 has joined #ruby
Bira has quit [Ping timeout: 258 seconds]
subraminion_ has joined #ruby
eka has joined #ruby
eka has quit [Client Quit]
kitak has joined #ruby
subraminion has quit [Ping timeout: 276 seconds]
shredding has joined #ruby
alex88 has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
reference-lost has joined #ruby
ahmdrefat has quit [Quit: Computer has gone to sleep.]
ahmdrefat has joined #ruby
reference has quit [Ping timeout: 264 seconds]
Xeago has quit [Ping timeout: 252 seconds]
<davividal>
Doxin: what about parent folder?
bal has quit [Quit: bal]
<Doxin>
davividal: got write access there too
bal has joined #ruby
<Doxin>
davividal: three folders up or so is all +rwx
Dreamer3 has joined #ruby
ahmdrefat has quit [Ping timeout: 252 seconds]
<davividal>
Doxin: what about bash? Can you stat the target directory from CWD?
<Doxin>
can I what the what from what ._.
bal has quit [Client Quit]
<davividal>
Doxin: $ cd my-ruby-project ; stat target-dir
thisirs has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
supermarin has joined #ruby
axilla has joined #ruby
Gabri has quit [Remote host closed the connection]
mjs2600 has joined #ruby
elaptics`away is now known as elaptics
Gabri has joined #ruby
thisirs has joined #ruby
bal has joined #ruby
supermarin has quit [Read error: Connection reset by peer]
supermarin has joined #ruby
olivier_bK has quit [Remote host closed the connection]
<Doxin>
davividal: any clue?
yfeldblum has quit [Ping timeout: 258 seconds]
paulfm has joined #ruby
St_Marx has joined #ruby
sigurding has quit [Quit: sigurding]
parallax-lawrenc has joined #ruby
olivier_bK has joined #ruby
<parallax-lawrenc>
Hey guys, sorry - bit of a ruby noob unfortunately and was wondering if anyone could lend a hand. I’m trying to write an OpsWorks recipe that loops through an array but am getting a “no implicit conversion of String into Integer” error
<parallax-lawrenc>
sample code:
Gabri_ has joined #ruby
<parallax-lawrenc>
<% @node[:opsworks][:layers]['expose-servers'][:instances].each do |backend| -%>
ktun has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chipotle has joined #ruby
<canton7-mac>
parallax-lawrenc, one of those is an array, and you're treating it like a hash
<parallax-lawrenc>
Yeah, I did a bit of digging and came to the same conclusion
<canton7-mac>
either '@node[:opsworks][:layers]' is an array, or 'backend' is
<parallax-lawrenc>
ok, I think I understand
<parallax-lawrenc>
sorry, i’m coming from php
moritzs has joined #ruby
<canton7-mac>
:P
<tobiasvl>
HAIL SATAN
<parallax-lawrenc>
haha yeah yeah, i knew you’d say that ;)
<parallax-lawrenc>
so i think @node[:opsworks][:layers] must be the hash
<parallax-lawrenc>
as it isn’t numerically-indexed
<tobiasvl>
yes parallax-lawrenc
<canton7-mac>
an array is numerically-indexed
<tobiasvl>
they're all hashes
<canton7-mac>
a hash is indexed by anything
<tobiasvl>
node is a deeply nested hash
<parallax-lawrenc>
awesome. and i’m guessing i’m treating backend as a hash when it should actually be an array?
<parallax-lawrenc>
yeah, so lots of [:value][:value]
<sweeper>
what is the formatting called when you have a bunch of assignment operations in a row, and you line them up so the ='s are on the same column?
<parallax-lawrenc>
sorry guys, still struggling with this hash/array issue
duggiefresh has joined #ruby
jtdowney has quit []
Squarepy has quit [Quit: Leaving]
setra has joined #ruby
<oddmunds>
sweeper: maybe "alignment of asssignments" or something like that
Vaporware has joined #ruby
thesheff17 has quit [Ping timeout: 252 seconds]
anaeem1_ has quit [Remote host closed the connection]
olivier_bK has quit [Remote host closed the connection]
rm_ has joined #ruby
reference-lost has quit [Remote host closed the connection]
vpretzel has joined #ruby
reference has joined #ruby
sk87 has joined #ruby
chrisseaton has quit []
chipotle has quit [Ping timeout: 252 seconds]
ce_afk is now known as cescalante
rm_ has quit [Ping timeout: 245 seconds]
chipotle has joined #ruby
<lolmaus>
I've got a tree-like structure of hashes. E. g. `{id: 'Foo', children: []}. What is the simpliest method to calculate the number of items in the tree?
blackmesa has quit [Ping timeout: 258 seconds]
yubrew has joined #ruby
foooobear has quit [Quit: Computer has gone to sleep.]
ta has joined #ruby
chipotle has quit [Client Quit]
kiri has joined #ruby
timonv has quit [Remote host closed the connection]
reference has quit [Ping timeout: 252 seconds]
parallax-lawrenc has quit [Quit: parallax-lawrenc]
reference has joined #ruby
<oddmunds>
lolmaus: the children array is full of hashes like the parent?
<sweeper>
oddmunds: that was it, although the sublime package doesn't seem to be working D:
<lolmaus>
oddmunds: yes sir
<lolmaus>
oddmunds: i can only think of writing a custom recursive function. But i thought maybe Ruby has some sugary magic for that.
<jpic>
hi all, i don't understand how to get the list of attributes of an object
yubrew has quit [Ping timeout: 265 seconds]
tkuchiki_ has joined #ruby
<oddmunds>
lolmaus: it has flatten, but that doesn't work across hashes and arrays, i think
mjs2600 has quit [Remote host closed the connection]
agjacome has quit [Quit: leaving]
ikaros has joined #ruby
tkuchiki has quit [Ping timeout: 252 seconds]
chipotle has joined #ruby
Quadlex has left #ruby [#ruby]
cescalante is now known as ce_afk
nateberkopec has joined #ruby
nateberkopec has quit [Client Quit]
lw has joined #ruby
tkuchiki_ has quit [Ping timeout: 265 seconds]
ltdl has joined #ruby
dwayhs has quit [Quit: Computer has gone to sleep.]
Zenigor has quit [Read error: Connection reset by peer]
sinkensabe has quit [Remote host closed the connection]
sinkensabe has joined #ruby
Zenigor has joined #ruby
meatherly has joined #ruby
Zenigor has quit [Read error: Connection reset by peer]
sinkensa_ has joined #ruby
sinkensabe has quit [Read error: Connection reset by peer]
Zenigor has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
Bira has quit [Remote host closed the connection]
LadyRainicorn has quit [Ping timeout: 252 seconds]
Bira has joined #ruby
LadyRainicorn has joined #ruby
subraminion_ has quit [Quit: Computer has gone to sleep.]
reference has quit [Remote host closed the connection]
subraminion_ has joined #ruby
reference has joined #ruby
tkuchiki has joined #ruby
<Mon_Ouie>
basldex: No. A proc is not just code, it also captures the environment around it (what's self, the values of local variables around it, where to look up constants, in which class methods are to be defined, etc.)
dwayhs has quit [Quit: Computer has gone to sleep.]
yfeldblum has joined #ruby
subraminion_ has quit [Ping timeout: 252 seconds]
ce_afk is now known as cescalante
reference has quit [Ping timeout: 252 seconds]
subraminion_ has joined #ruby
supermarin has joined #ruby
Advocation has quit [Quit: Advocation]
dwayhs_ has joined #ruby
timonv has joined #ruby
cescalante is now known as ce_afk
yfeldblum has quit [Ping timeout: 258 seconds]
pallavi_ has joined #ruby
rm_ has joined #ruby
mjsmith2 has joined #ruby
bruno- has joined #ruby
supermarin has quit [Ping timeout: 258 seconds]
Ankhers has joined #ruby
bruno- has quit [Client Quit]
bruno- has joined #ruby
cocotton has joined #ruby
piukeman has joined #ruby
ascarter has joined #ruby
chrisseaton has joined #ruby
jambolina has quit [Ping timeout: 252 seconds]
mengu has quit [Remote host closed the connection]
doev has joined #ruby
Advocation has joined #ruby
<doev>
"gem list" show me two installed versions of a software. How can I set, wich version ist used?
subraminion_ has quit [Remote host closed the connection]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
jambolina has joined #ruby
subraminion_ has joined #ruby
ta has quit [Remote host closed the connection]
ta has joined #ruby
jimmyhoughjr has quit [Quit: jimmyhoughjr]
endash has joined #ruby
jimmyhoughjr has joined #ruby
sdelmore has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
sski has quit [Remote host closed the connection]
<shevy>
normally it does that
<shevy>
foo (0.0.1, 0.0.2)
sski has joined #ruby
<shevy>
I think it will always default to the highest
sambao21 has joined #ruby
alexju has joined #ruby
paulfm has joined #ruby
krz has joined #ruby
tesuji has quit [Ping timeout: 252 seconds]
diegoviola has quit [Read error: Connection reset by peer]
DrShoggoth has joined #ruby
sski has quit [Ping timeout: 252 seconds]
mary5030 has joined #ruby
theRoUS` is now known as theRoUS
<canton7-mac>
there's a flag to specify the version to install
qhartman_ has joined #ruby
mary5030 has quit [Remote host closed the connection]
diegoviola has joined #ruby
lotherk has left #ruby [#ruby]
mary5030 has joined #ruby
yubrew has joined #ruby
rgiscard has joined #ruby
SCommette has quit [Quit: SCommette]
theRoUS is now known as theRoUS|foo
theRoUS|foo is now known as theRoUS
moneydouble has joined #ruby
bmurt has joined #ruby
qhartman has quit [Ping timeout: 252 seconds]
Morkel has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
cocotton has quit [Remote host closed the connection]
olivier_bK has joined #ruby
g0bl1n has joined #ruby
Gabri_ has quit [Remote host closed the connection]
_justin has quit [Quit: _justin]
jamto11 has joined #ruby
yubrew has quit [Ping timeout: 258 seconds]
segfalt has joined #ruby
MindfulMonk has quit [Quit: Have fun]
ahmdrefat has joined #ruby
MindfulMonk has joined #ruby
nateberkopec has joined #ruby
merceris_ has quit [Quit: Computer has gone to sleep.]
thesheff17 has joined #ruby
fantazo has joined #ruby
maroloccio has joined #ruby
baweaver has joined #ruby
ltdl has quit [Ping timeout: 252 seconds]
DaniG2k has joined #ruby
anaeem1_ has joined #ruby
failshell has joined #ruby
echevemaster has joined #ruby
claymore has quit [Ping timeout: 252 seconds]
yubrew has joined #ruby
ryanleesipes has joined #ruby
bruno- has quit [Quit: leaving]
WillAmes has quit [Remote host closed the connection]
agarie has joined #ruby
WillAmes has joined #ruby
eka has joined #ruby
<davividal>
Doxin: sorry, no idea. Your permission seems to be OK.
<Doxin>
dang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv has quit [Remote host closed the connection]
claymore has joined #ruby
SCommette has joined #ruby
basldex has quit [Quit: leaving]
timonv has joined #ruby
Rainicorn has joined #ruby
sdelmore has quit [Quit: Leaving.]
rayners has joined #ruby
dawkirst has quit [Remote host closed the connection]
havenwood has joined #ruby
LadyRainicorn has quit [Ping timeout: 245 seconds]
marahin has quit [Ping timeout: 252 seconds]
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
ntesir has joined #ruby
sski has joined #ruby
EagleDelta has joined #ruby
cocotton has joined #ruby
franzip has joined #ruby
SCommette has quit [Client Quit]
timonv has quit [Ping timeout: 252 seconds]
vadzimt has joined #ruby
SCommette has joined #ruby
WishBoy has quit [Remote host closed the connection]
Advocation has quit [Quit: Advocation]
dawkirst has joined #ruby
chipotle has joined #ruby
Muz_ is now known as Muz
shvelo has quit [Ping timeout: 252 seconds]
vpretzel is now known as vpretzel|1420
kies has joined #ruby
kies has quit [Changing host]
kies has joined #ruby
kevind has joined #ruby
pu22l3r has joined #ruby
snath has quit [Ping timeout: 240 seconds]
Fire-Dragon-DoL has joined #ruby
s3ri0us has joined #ruby
tagrudev has quit [Remote host closed the connection]
tier has quit [Remote host closed the connection]
ta has quit [Remote host closed the connection]
nathancahill has joined #ruby
Gabri has joined #ruby
rizzatti has joined #ruby
dblessing_ has joined #ruby
kies`prime has joined #ruby
tier has joined #ruby
timonv has joined #ruby
kies has quit [Ping timeout: 258 seconds]
danjordan has quit [Quit: danjordan]
ffranz has joined #ruby
lmickh has joined #ruby
mengu has quit [Remote host closed the connection]
yfeldblum has joined #ruby
Rahul_Roy has quit [Quit: Connection closed for inactivity]
glenfe has joined #ruby
supermarin has joined #ruby
ixti has joined #ruby
subraminion_ has quit [Ping timeout: 245 seconds]
kiri has quit [Read error: Connection reset by peer]
ta has joined #ruby
nowthatsamatt has joined #ruby
TwinkleHood has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ta has quit [Remote host closed the connection]
Zenigor has quit [Remote host closed the connection]
kies`prime has quit [Quit: baaaaiiiiiiiiiii~]
yfeldblum has quit [Ping timeout: 265 seconds]
kies has joined #ruby
Ankhers has quit [Remote host closed the connection]
ce_afk is now known as cescalante
supermarin has quit [Ping timeout: 258 seconds]
Ankhers has joined #ruby
qwyeth has quit [Ping timeout: 245 seconds]
zz_nopc0de is now known as nopc0de
blackmesa has joined #ruby
dik_dak has joined #ruby
treehug88 has joined #ruby
b1205 has joined #ruby
toastynerd has joined #ruby
qhartman_ is now known as qhartman
ryanleesipes has quit [Quit: Leaving]
workmad3 has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
qwyeth has joined #ruby
nathancahill has quit [Quit: nathancahill]
Advocation has joined #ruby
b1205 has quit [Ping timeout: 264 seconds]
Gabri has quit [Remote host closed the connection]
dawkirst has quit [Remote host closed the connection]
mercerist has joined #ruby
memorozovm has quit [Remote host closed the connection]
cescalante is now known as ce_afk
kiri has joined #ruby
toastynerd has quit [Remote host closed the connection]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
ce_afk is now known as cescalante
vadzimt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
s3ri0us has joined #ruby
arrubin has joined #ruby
thesheff17 has quit [Read error: Connection reset by peer]
moneydouble has quit [Quit: Leaving.]
phrozen7- has quit [Changing host]
phrozen7- has joined #ruby
geggam has joined #ruby
thesheff17 has joined #ruby
sk87 has joined #ruby
s2013 has joined #ruby
bal has quit [Quit: bal]
x0nic has joined #ruby
noop has quit [Ping timeout: 252 seconds]
noop has joined #ruby
OffTheRails has joined #ruby
vpretzel|1420 is now known as vpretzel|674
Gabri has joined #ruby
sk87 has quit [Client Quit]
jprovazn is now known as jprovazn_afk
shvelo has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chipotle_ has joined #ruby
apeiros has joined #ruby
benzrf is now known as benzrf|offline
relix has joined #ruby
garndt has joined #ruby
jxf has joined #ruby
chipotle has quit [Ping timeout: 276 seconds]
vadzimt has joined #ruby
beatdown has left #ruby [#ruby]
DaniG2k has quit [Quit: leaving]
cantonic has joined #ruby
Maitiu has quit []
Macaveli has quit [Ping timeout: 252 seconds]
enebo has joined #ruby
moted has joined #ruby
tobago has quit [Remote host closed the connection]
codeurge has joined #ruby
shock_one has quit [Remote host closed the connection]
vadzimt has quit [Client Quit]
chipotle has joined #ruby
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
OffTheRails has quit [Ping timeout: 258 seconds]
chipotle_ has quit [Ping timeout: 252 seconds]
wuest has quit [Quit: :q]
GeorgesLeYeti has joined #ruby
<GeorgesLeYeti>
Hi
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shvelo>
Ahoy
<doev>
shevy, "nameOfGem _Version_" is the way you can choose from different installed versions.
vadzimt has joined #ruby
danshultz has quit [Ping timeout: 276 seconds]
momomomomo has joined #ruby
danshultz has joined #ruby
s2013 has quit [Ping timeout: 240 seconds]
dwayhs_ has quit [Quit: Computer has gone to sleep.]
<GeorgesLeYeti>
I try to make a ruby script but i have problem on this line: line1 = main[:text].truncate(main[:text].length/2, separator: ' ', omission: '') + "\n"
b00stfr3ak has joined #ruby
<GeorgesLeYeti>
It says: undefined method `truncate' for #<String:0x00000002b179c8> (NoMethodError)
s2013 has joined #ruby
sdelmore has joined #ruby
benzrf|offline is now known as benzrf
<havenwood>
GeorgesLeYeti: #rubyonrails
<GeorgesLeYeti>
I guess it's because truncate is a ruby on rails func but how could i include it ?
terrell_t is now known as terrellt
<GeorgesLeYeti>
havenwood: ok
<havenwood>
GeorgesLeYeti: oh, if you're wanting to cherry pick it here is fine
LadyRainicorn has joined #ruby
vadzimt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
anaeem1_ has quit [Remote host closed the connection]
vadzimt has quit [Client Quit]
<GeorgesLeYeti>
havenwood: ty a lot. It works
<shevy>
havenwood answers ruby questions
<shevy>
and saves kittens
omosoj has joined #ruby
<havenwood>
shevy: coffeetime!
<shvelo>
hey shevy
RaptorJesus has quit [Ping timeout: 272 seconds]
<sdelmore>
Is there any way to install ruby 2.1.2 for use with rbenv without compiling? Can I download a compiled version somewhere?
skysploit has joined #ruby
OffTheRails has joined #ruby
anaeem1 has joined #ruby
NinoScript has quit [Ping timeout: 255 seconds]
<segfalt>
sdelmore: Not sure about rbenv, but rvm will attempt to find a compiled archive if it can. Otherwise it will build for you. Ruby doesn't take too long to compile on anything recent-ish. 2-4 minutes?
<sdelmore>
It isn't a compile time issue. I have spent many hours trying to get Ruby 2.1 to build on my system and keep getting openssl issues. I realized I am wasting my time as I don't really care about openssl, I just want to use ruby 2.1.
i_s has quit [Remote host closed the connection]
<sdelmore>
Just can't figure out how to install it. I have been using rbenv for work but maybe that just won't work for me.
<segfalt>
sdelmore: Ah, hmm.
<segfalt>
You could try rvm, just for fun.
<segfalt>
What's your OS?
<sdelmore>
Mavericks
<segfalt>
do you have HomeBrew installed?
<terrellt>
Have you updated ruby-build?
<havenwood>
sdelmore: You can install a precompiled binary if available, but there isn't one for 2.1.1 *yet*.
NinoScript has joined #ruby
<sdelmore>
Any idea if rvm and rbenv being on the same system is asking for trouble?
<terrellt>
I've got 2.1.1 running from rbenv right this second.
* segfalt
isn't familiar with rbenv :-(.
<sdelmore>
havenwood: Thanks, maybe I just wait for it.
mrnugget has quit [Ping timeout: 252 seconds]
redondo has joined #ruby
<sdelmore>
Been wanting to try out 2.1. 2.1.1 has some issues with rails, I know they are fixed in 2.1.2 so I was trying to get that. How did you determine if there was a 2.1.2 build available so I can keep an eye out?
<segfalt>
I've built 2.1.2 with rvm on mavericks, without doing anything special except setting up Xcode/HomeBrew.
sski has joined #ruby
heftig has quit [Quit: Quitting]
<havenwood>
sdelmore: If you're okay with 2.1.1, use the SM Framework precompiled binary.
<sdelmore>
I don't think it is anything mavericks specific, I think it is because my work had me turn on fips mode in openssl and now it won't go away. But since solving that particular problem has proven beyond me or anyone at my office I was trying to take another approach.
<havenwood>
you don't need to use RVM to use RVM's precompiled binaries
<havenwood>
sdelmore: the binary i linked above is for 10.9
<havenwood>
sdelmore: just move it to ~/.rbenv/versions
<havenwood>
sdelmore: you don't need to install rvm to use its precompiled binaries
<havenwood>
sdelmore: You could query mpapis in #rvm if there are any blockers on it.
<havenwood>
sdelmore: the link above i posted is where it'll land
Burgestrand has quit [Quit: Burgestrand]
elabs-developer has quit [Quit: elabs-developer]
zorak has joined #ruby
<redondo>
in ruby classes, is '@' equivalent to python's 'self', or 'this' in others?
andikr has quit [Remote host closed the connection]
<hoelzro_>
kinda
fabrice31 has quit [Remote host closed the connection]
Kricir has joined #ruby
hoelzro_ is now known as hoelzro
<hoelzro>
@ is used to access instance vars
Megtastique has quit []
<hoelzro>
Ruby also has self
<sdelmore>
havenwood: So I just download the tar and untar it into the rbenv directory for 2.1.1?
jimmyhoughjr has quit [Quit: jimmyhoughjr]
jilk23 has quit [Quit: jilk23]
<redondo>
hoelzro, what are the differences between them (@ and self)?
<hoelzro>
well, @ isn't anything by itself
<hoelzro>
self is an actual object
<redondo>
ok
<redondo>
ok
<redondo>
get it
<redondo>
so I could use this.instance_var and algo @instance_var?
yfeldblum has joined #ruby
oo_ has joined #ruby
<hoelzro>
well
<hoelzro>
self.instance_var will be a method call
rippa has joined #ruby
<havenwood>
sdelmore: yup
<hoelzro>
and it also won't work if instance_var is private
<redondo>
ok
<havenwood>
sdelmore: that's it
anaeem1 has quit [Remote host closed the connection]
<sdelmore>
havenwood: I'll take a shot. Thank you.
<hoelzro>
since you must always call private methods without explicit self
sski has quit [Ping timeout: 245 seconds]
<redondo>
ok
<hoelzro>
if you have public accessors, they're functionally equivalent
<hoelzro>
but
<hoelzro>
I personally would prefer the method call, because then you can alter its implementation later if needed
<redondo>
right
oo_ has quit [Read error: Connection reset by peer]
<redondo>
in general, it is not good idea to have public accessors, right?
<redondo>
hoelzro,
supermarin has joined #ruby
oo_ has joined #ruby
Vaporware has quit [Quit: Page closed]
zigomir has quit [Remote host closed the connection]
DrinkMachine has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
<segfalt>
redondo: You mean like attr_reader vs def attr; @attr; end ?
DrinkMachine has quit [Client Quit]
s3ri0us is now known as s3ri0us|away
s3ri0us|away is now known as s3ri0us
yfeldblum has quit [Ping timeout: 264 seconds]
<redondo>
segfalt, sorry, dont get it, still starting to know ruby syntax
<shevy>
redondo why is it not a good idea
<shevy>
how else do you want to access to internal state from the outside
rgiscard` has joined #ruby
marcdel has joined #ruby
<segfalt>
A public reader on an object called Person for an attribute called height can be defined with attr_reader :height, or def height; return @height; end -- they're the same thing.
gregf has quit [Quit: WeeChat 0.4.3]
<segfalt>
And there is nothing bad about them, at all.
supermarin has quit [Ping timeout: 252 seconds]
oo_ has quit [Ping timeout: 240 seconds]
<redondo>
segfalt, ok, thanks.
Gabri has quit [Remote host closed the connection]
oo_ has joined #ruby
<hoelzro>
public accessors are find
<hoelzro>
*fine
<hoelzro>
you just shouldn't go crazy
<segfalt>
I actually really hate private accessors
<hoelzro>
you may be thinking (assuming a Java background here) about public int myField;
<hoelzro>
that's bad in Java because your fields are now part of the implementation
marcdel_ has joined #ruby
<hoelzro>
Ruby doesn't have that problem, because all instance variables are private
<hoelzro>
you may only access them with accessors
rbb has joined #ruby
<sdelmore>
havenwood: That worked! Thank you.
hamakn has quit [Remote host closed the connection]
rgiscard has quit [Ping timeout: 240 seconds]
<redondo>
hoelzro, shevy, ok, get it.
aspires has joined #ruby
<redondo>
segfalt, what do you mean by private accesors?
<redondo>
accessors
<segfalt>
You can technically define an accessor method as private and use in other instance methods. It's gross.
pallavi_ has quit [Quit: Connection closed for inactivity]
marcdel has quit [Ping timeout: 252 seconds]
maletor has joined #ruby
<segfalt>
Nothing you should worry about, or do. :-)
momomomomo has quit [Quit: momomomomo]
andrewjanssen has joined #ruby
<redondo>
segfalt, ok.
<shevy>
don't you call my code gross!!!
LekeFly has quit [Ping timeout: 258 seconds]
tier has quit [Remote host closed the connection]
phinfonet has joined #ruby
oo_ has quit [Ping timeout: 240 seconds]
<segfalt>
:-(
anaeem1_ has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
<ntesir>
sdelmore: it seems like you lib libssl-dev?
oo_ has joined #ruby
mengu has quit [Remote host closed the connection]
<sdelmore>
ntesir: Someone mentioned openssl-dev but I didn't know how to install it. I don't actually know what openssl is needed for but I know when I do openssl version all I get is "FIPS mode not supported.".
memorozovm has joined #ruby
Gnubie__ has quit [Remote host closed the connection]
Gnubie_ has joined #ruby
anaeem1_ has joined #ruby
kiri has quit [Quit: Leaving]
wallerdev has joined #ruby
rm_ has quit [Remote host closed the connection]
except has joined #ruby
tcstar has quit [Ping timeout: 276 seconds]
zeroXten has joined #ruby
oo_ has quit [Ping timeout: 258 seconds]
SOLEIL has joined #ruby
minver has quit [Quit: Page closed]
segfalt has quit []
flagg0204 has quit [Ping timeout: 245 seconds]
toastynerd has joined #ruby
_justin has joined #ruby
<zeroXten>
hi all. Give variables like x_path = "a.b.c"; x_value = 1; y_path = "a.d.e"; y_value = e how do I best turn that into a nest hash like "{ :a => { :b => { :c => 1 }, :d => { :e => 2 } } }". Obviously splitting on '.' first etc. I managed to get it to work for just one merge (ie. x) but if I try two then y override x at :a. Any hints?
memorozovm has quit [Ping timeout: 258 seconds]
mercerist has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
shvelo has quit [Ping timeout: 245 seconds]
toastynerd has quit [Remote host closed the connection]
paulfm has joined #ruby
ahmdrefat has quit [Quit: Computer has gone to sleep.]
SOLEIL has joined #ruby
mengu has joined #ruby
ahmdrefat has joined #ruby
<apeiros>
zeroXten: result = {}; *base, last = *path.split("."); base.inject(result) { |h,k| h[k] ||= {} }[last] = value; result # once with path,value = x_path,x_value and once for y
toastynerd has joined #ruby
phansch has joined #ruby
_justin has quit [Quit: _justin]
lkba has quit [Ping timeout: 265 seconds]
mengu has quit [Remote host closed the connection]
smathieu has joined #ruby
enricostn has joined #ruby
jambolina has quit [Ping timeout: 240 seconds]
jimmyhoughjr has joined #ruby
sambao21 has joined #ruby
b1205 has joined #ruby
axilla has joined #ruby
phutchin1 has joined #ruby
cocotton has quit [Remote host closed the connection]
anaeem1_ has quit [Remote host closed the connection]
<zeroXten>
wait .. is that inside a function definition?
hamakn has joined #ruby
bahar has quit [Ping timeout: 252 seconds]
snath has joined #ruby
<apeiros>
zeroXten: doesn't matter
ahmdrefat has quit [Ping timeout: 252 seconds]
<apeiros>
I would certainly put it into a method
maletor has quit [Quit: Computer has gone to sleep.]
ptierno_ has joined #ruby
<enricostn>
hi there, I have a module Alfa that I need to extend in another module Beta and include it in a class Teta (that will be instantiated). The problem is that Alfa defines a default constant PAPPA that including/extending classes/modules should be able to override
timonv has quit [Remote host closed the connection]
Doxin has quit [Remote host closed the connection]
alex88 has quit [Quit: Leaving...]
robert_ has quit [Read error: Connection reset by peer]
<apeiros>
claudiop: i.e. you can call methods on a symbol, you can assign a symbol to a variable. you can't call a method on a constant (you call methods on the object it references), you can't assign a constant to a variable (you'll assign the object it references)
<apeiros>
or in other words: a symbol is the same different from a constant as a string is.
<apeiros>
or an integer. or an array.
j_mcnally has joined #ruby
rizzatti has quit [Quit: Leaving...]
oo_ has joined #ruby
subbyyy_ has quit [Ping timeout: 265 seconds]
thisirs has quit [Read error: Connection reset by peer]
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_justin has joined #ruby
cantonic has quit [Ping timeout: 264 seconds]
supermarin has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
cantonic has joined #ruby
EatMulti has quit [Remote host closed the connection]
Tamal has joined #ruby
danijoo has joined #ruby
Freddan962 has joined #ruby
momomomomo has joined #ruby
wallerdev has quit [Quit: wallerdev]
<claudiop>
apeiros: I understood but not totally. You cast methods on a symbol? How do you tell the simbol of an object?
<claudiop>
*symbol
<ntesir>
yeah, a symbol is _data_, a variable is just some dumb reference to data
<ntesir>
correct me if I'm wrong, I don't know ruby.
dumdedum has quit [Quit: foo]
yfeldblum has quit [Ping timeout: 240 seconds]
<ericwood>
a symbol is a reference to a string stored once in memory
<apeiros>
claudiop: as said, a symbol *is* an object. just like a string or an integer is an object.
<ericwood>
the idea being you can use them all over and they all point to the same thing without the overhead of creating new strings, etc.
<claudiop>
Let me see if i understood. A symbol is like a number that never changes, and the intrepretor knows it. Whenever you call a symbol it sees which object is assigned to that number and thus is a callable object?
<Freddan962>
toretore: It does what it is meant to do.
linoespinoza has joined #ruby
<toretore>
that won't work
<toretore>
Freddan962: which is?
<apeiros>
Freddan962: then either your code isn't how your example is or you're mistaken
<ericwood>
claudiop: it's like a pointer to a string, to put it in C terms
koderok has joined #ruby
<apeiros>
>> a = [1,2,3]; a.each do |x| x = x*10; end; a
<toretore>
it's not difficult.. if you don't want to learn vim or emacs right away, start with a simple editor like textedit
<ntesir>
anyway, if you want a free IDE, netbeans has ruby support. dunno how good.
_justin has quit [Quit: _justin]
<ericwood>
probably shitty
brunops has joined #ruby
<ericwood>
pick from the 10000000 FOSS text editor
<ericwood>
s
qhartman has quit [Ping timeout: 252 seconds]
<toretore>
an ide is only going to get in your way because it sucks
klaut has quit [Remote host closed the connection]
JasmeetQA has joined #ruby
s2013 has joined #ruby
<ericwood>
only IDE I've ever seen ruby devs use successfully is rubymine
Hobogrammer has joined #ruby
<toretore>
it sucks
<ericwood>
agreed
<Freddan962>
ericowod: toretore: Will try it
<mg^>
Thankfully I don't do anything so big that I need anything more than a simple editor
<claudiop>
ntesir: Im not really looking for a good IDE, im looking for a great ruby support, don't really care about the environment, just need the help :b.
<mg^>
as long as it does syntax highlighting, I am happy
<ntesir>
claudiop: help for what?
<ericwood>
Freddan962: I'm leaving, so ask someone else for help if that doesn't work for some reason
* ericwood
disappears
<claudiop>
ntesir, i mean, code help/suggestions. warnings. Telling me how to format, and suggesting better solutions, like pychar
<fresham>
Anyone here use IntelliJ IDEA for rails dev?
<claudiop>
Oh well...vim should do the trick
timonv_ has joined #ruby
Tamal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<xargoon>
fresham: rubymine is afaik basically intellij tailored for ruby
cina has joined #ruby
bigkevmcd has joined #ruby
<xargoon>
rubymine is nice, but i just couldn't stand the absolute crap font rendering java has on linux
kotk_ has joined #ruby
momomomomo has quit [Quit: momomomomo]
<claudiop>
ntesir: That language was way too normal to be ruby(not that ruby sounds like a bad language)... it would also be quite strange to have ruby files ending in .py
chabill has joined #ruby
<ntesir>
claudiop: yeah, i guess the ugly syntax gave it away
<ntesir>
actually can't find a demo of robe + flycheck + company. go with vim, it's nice.
nanoyak has joined #ruby
schickung has quit [Quit: schickung]
Gabri has joined #ruby
mrnugget has joined #ruby
kotk has quit [Ping timeout: 252 seconds]
omosoj has joined #ruby
alpha123 has joined #ruby
cocotton has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
nanoyak_ has joined #ruby
catphish has quit [Quit: Leaving]
terrell_t has joined #ruby
Advocation has quit [Quit: Advocation]
<Freddan962>
How can you undo something you undoed? xD
wallerdev has joined #ruby
<ntesir>
Freddan962: not using emacs, I see :-P
<Freddan962>
ntesir: Sublime :P
cocotton has quit [Remote host closed the connection]
subbyyy_ has joined #ruby
Igrsrolqak has joined #ruby
_justin has joined #ruby
cocotton has joined #ruby
Spami has joined #ruby
nanoyak has quit [Ping timeout: 252 seconds]
paulfm has quit []
cocotton has quit [Remote host closed the connection]
<wallerdev>
why would beaker depend on an exact version of nokogiri
<wallerdev>
lol
meatherly has quit [Remote host closed the connection]
moneydouble has quit [Quit: Leaving.]
cantonic has quit [Read error: Connection reset by peer]
Tricon has joined #ruby
<blindrage>
dunno =\
meatherly has joined #ruby
<blindrage>
any way to resolve that?
terrellt has quit [Ping timeout: 252 seconds]
flagg0204 has joined #ruby
<slash_nick>
blindrage: pull requests are generally effective :)
<blindrage>
=( yea, i could just build the gem off mine while i wait
nanoyak has joined #ruby
CorpusCallosum has quit [Read error: Connection reset by peer]
WishBoy has joined #ruby
<wallerdev>
looks like they picked 1.5.10 because they want "ruby 1.8 compatability"
<slash_nick>
blindrage: read the gemspec, the comment says why they pin it down
<slash_nick>
right
i_s has joined #ruby
<blindrage>
yea, was about to paste that
<blindrage>
it's in my buffer lol
<slash_nick>
jinx!
<wallerdev>
honestly id just fork it and remove that requirement lol
<blindrage>
i don't want to remove windows and centos support
<wallerdev>
unless youre on 1.8
tier has joined #ruby
<blindrage>
that's why it's on 1.8
anaeem1 has quit [Remote host closed the connection]
<blindrage>
my CI host is centos 64, it would use it
nanoyak has quit [Client Quit]
magri has quit [Remote host closed the connection]
<blindrage>
without making major changes to the agent to use rvm
kpshek has quit []
<wallerdev>
1.8 is deprecated
<blindrage>
yea, but not LTS
foooobear has joined #ruby
<blindrage>
i'm not defending it, just living with it
moritzs has quit [Ping timeout: 252 seconds]
luckyruby has joined #ruby
<wallerdev>
did you try uninstalling nokogiri
meatherly has quit [Ping timeout: 240 seconds]
<wallerdev>
puppet-blacksmith doesnt appear to depend on a specific version of nokogiri
<slash_nick>
right, why do you need a newer version?
<blindrage>
no, bundler/gemfiles are pretty new to my toolbelt
iceden has joined #ruby
<blindrage>
because i did bundle install before i introduced beaker
<blindrage>
i'll try that
supermarin has joined #ruby
<slash_nick>
take it out of your Gemfile (nokogiri), gem uninstall nokogiri (all versions), rm Gemfile.lock, bundle
Advocation has quit [Quit: Advocation]
<blindrage>
k, trying that now
Advocation has joined #ruby
i_s_ has joined #ruby
nanoyak has joined #ruby
i_s has quit [Read error: Connection reset by peer]
<blindrage>
that seems to have fixed the conflict
mjuszczak has joined #ruby
<blindrage>
thanks a ton
<slash_nick>
np
klaut has joined #ruby
<wallerdev>
great work team
mikecmpbll has joined #ruby
<slash_nick>
high fives all around
supermarin has quit [Ping timeout: 264 seconds]
<blindrage>
::starts self promoting slow clap::
danshult_ is now known as danshultz
<blindrage>
...no?
mrnugget has quit [Read error: Connection reset by peer]
<wallerdev>
clap
<wallerdev>
lol
<GeorgesLeYeti>
Hi again
<wallerdev>
hey GeorgesLeYeti
cina has quit [Remote host closed the connection]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<GeorgesLeYeti>
I have a problem with encoding. I need to write file with encoding format: UTF-16LE
<wallerdev>
thats an interesting requirement
Gabri_ has joined #ruby
<havenwood>
utf-8 ALL THE THINGS!
<GeorgesLeYeti>
but 'w+:UTF-16LE' doesn't work
mrnugget has joined #ruby
<wallerdev>
what version of ruby are you on
<GeorgesLeYeti>
2.1.1p76
anaeem1 has joined #ruby
Rahul_Roy has joined #ruby
Gabri has quit [Ping timeout: 276 seconds]
<GeorgesLeYeti>
here my error: `initialize': ASCII incompatible encoding needs binmode (ArgumentError)
Morkel has joined #ruby
aarkerio has joined #ruby
<wallerdev>
on write?
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<GeorgesLeYeti>
when i add wb+... it works but my file format is application/octet-stream; charset=binary
noop has quit [Ping timeout: 240 seconds]
<aarkerio>
hi! can I:
<aarkerio>
function(params) and return if var == false
<wallerdev>
are you in rails or something?
<blindrage>
ok i just don't get gemfiles....bundle install | grep json showed json-1.8.1 being used...even added it to Gemfile as gem 'json', '>=1.8.1', bundle exec rspec spec/acceptance/test.rb errored with: /home/myoung/.rvm/gems/ruby-2.1.1@global/gems/bundler-1.6.2/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find json-1.8.1 in any of the sources (Bundler::GemNotFound)
<GeorgesLeYeti>
yes on File.open(..., 'w+:UTF-16LE) {|f|....}
<blindrage>
gem install json, showed install and rdoc install output, same bundle command didn't error on it this time
obs has quit [Remote host closed the connection]
<blindrage>
what would cause that?
<GeorgesLeYeti>
wallerdev: no it's just a ruby script
aspires has quit []
<blindrage>
i promise i'll get better guise
<aarkerio>
I mean, can I call a method and return?
<havenwood>
aarkerio: ya sure
cina has joined #ruby
Solnse has joined #ruby
memorozovm has quit []
<apeiros>
GeorgesLeYeti: sounds like the string you try to write was not utf-16
<slash_nick>
blindrage: i didn't quite understand that last bit
bklane has joined #ruby
dilated_dinosaur has quit [Ping timeout: 265 seconds]
<slash_nick>
fwiw, you probably don't want to use "gem install" if you're using bundler... put `gem "gemname"` in your Gemfile then run bundle
mengu has quit [Remote host closed the connection]
<apeiros>
GeorgesLeYeti: actually, might not be that that's the problem. from where do you get "application/octet-stream; charset=binary"?
<GeorgesLeYeti>
apeiros: ok then how i pass my string utf-8 to utf-16LE
<GeorgesLeYeti>
file -bi my_file.txt
jimbow has joined #ruby
failshel_ has joined #ruby
<jimbow>
yans-imac:00_hello admin$ rake
<jimbow>
(in /Users/admin/Documents/Learn Ruby/learn_ruby-master)
<havenwood>
jimbow: where doy learn_ruby say to use 1.8.6?
<jimbow>
some guy pointed it out yesterday
<jimbow>
i need to find the link
jimmyhoughjr has quit [Quit: jimmyhoughjr]
omosoj has joined #ruby
vpretzel|674 is now known as vpretzel
agent_white has joined #ruby
Solnse has quit [Remote host closed the connection]
geggam has joined #ruby
<havenwood>
ah, right, found it
Lutece has joined #ruby
<havenwood>
jimbow: "We officially support Ruby 1.9 but probably work with 1.8.7 as well."
<havenwood>
jimbow: 1.9 is fine
<havenwood>
jimbow: so they didn't update the example of checking the ruby version: ruby -v #=> ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
<havenwood>
i guess designed for 1.8.6, updated for 1.9, may support 1.8.7
kpshek has joined #ruby
geggam has quit [Remote host closed the connection]
<havenwood>
jimbow: okay, so never mind my 1.8 rant, they just need to update the docs
sepp2k has joined #ruby
<havenwood>
jimbow: maybe just use 1.9.3-p547 since 1.9 is what they're officially supporting?
wallerdev has quit [Quit: wallerdev]
trampi has quit [Quit: Bye]
Soda has quit [Remote host closed the connection]
kenneth has joined #ruby
jxf has quit [Quit: Leaving]
<havenwood>
jimbow: i'll pull request an update to the `ruby -v` version in the docs, unless you want to
yubrew_ has joined #ruby
jackneill has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
<jimbow>
havenwood: i found it!
<jimbow>
it's on the first page
<havenwood>
jimbow: (just the 1.8.6 line of index.html, change it to: ruby 1.9.3p545 (2014-02-24 revision 45159) [x86_64-darwin13.1.0])
Advocation has quit [Quit: Advocation]
danijoo has joined #ruby
<havenwood>
jimbow: nice for you to pull request fixes for issues you run across
<jimbow>
i've never done a pull request
<havenwood>
jimbow: just do it through the Github interface then
<havenwood>
jimbow: it's where Ruby looks when you `require "something"`, it checks for each path in the array for path/something.
<havenwood>
jimbow: so it's just an Array, a list of Strings
chrisseaton has quit []
s2013_ has joined #ruby
adnauseam has joined #ruby
<adnauseam>
sup folks
<havenwood>
jimbow: you can add or remove paths from $LOAD_PATH, since it's a normal Ruby Array
<havenwood>
adnauseam: hi
<jimbow>
how do i add a path?
chrisseaton has joined #ruby
geggam has quit [Ping timeout: 264 seconds]
s2013 has quit [Ping timeout: 252 seconds]
kirun has joined #ruby
<apeiros>
jimbow: you know how to add an item to an array?
ss__ has joined #ruby
ringaring has joined #ruby
cescalante is now known as ce_afk
ce_afk is now known as cescalante
jprovazn_afk is now known as jprovazn
ss__ is now known as s2013
rezzack has quit [Quit: Leaving.]
<havenwood>
jimbow: in Ruby 1.8, `require "hello"` would work if the file was in the current dir. in Ruby 1.9+ to get the same result you'd have to `require_relative "hello"` or `require "./hello"`, or edit the load path like `$LOAD_PATH << "."` as a simple example.
shashank_rs has joined #ruby
toastynerd has quit [Remote host closed the connection]
s2013_ has quit [Ping timeout: 240 seconds]
teddyp1cker has quit [Remote host closed the connection]
Lutece has quit [Quit: WeeChat 0.4.3]
GeorgesLeYeti has joined #ruby
<GeorgesLeYeti>
Hi again. It's my last question (promise)
<Mon_Ouie>
Notice the current path and the path where the current file is are two different things (hence the change)
sinkensa_ has quit [Remote host closed the connection]
acrussell has quit [Quit: Leaving.]
<GeorgesLeYeti>
I need to insert between each file null char (i know it seems weird but it's encoded like that into the original file)
sinkensabe has joined #ruby
<Mon_Ouie>
"." does not work if someone runs your script from another directory
<GeorgesLeYeti>
sorry between each char not file
Tricon has joined #ruby
axilla has quit [Ping timeout: 245 seconds]
paulfm has quit []
g0bl1n has quit [Ping timeout: 258 seconds]
bradhe has quit [Remote host closed the connection]
<jimbow>
11:51 < havenwood> jimbow: in Ruby 1.8, `require "hello"` would work if the file was in the current dir. in Ruby 1.9+ to get the same result you'd have to `require_relative "hello"` or `require "./hello"`, or edit the load path like `$LOAD_PATH << "."` as a simple example.
<apeiros>
jimbow: oh, ok. array << "item"
<apeiros>
adds it to the end of the array
<havenwood>
jimbow: change "hello" to "./hello"
<jimbow>
oh thank you
<havenwood>
jimbow: just as a quick and dirty fix
tier has joined #ruby
Macaveli has quit [Ping timeout: 252 seconds]
chrisseaton has joined #ruby
<havenwood>
jimbow: maybe before you embark on this, do TryRuby.org
<redondo>
apeiros, that means that names starting with uppercase are "constant names"? not sure if I get it.
<apeiros>
redondo: correct. variables which start with an uppercase letter are constants
<GeorgesLeYeti>
Again Ty very much havenwood and apeiros
<GeorgesLeYeti>
bb
GeorgesLeYeti has quit [Quit: Quitte]
<apeiros>
redondo: and `class Foo; …; end` syntax does two things - it creates a new class, and it assigns it to the constant "Foo"
<redondo>
ok
<apeiros>
above, I gave two examples on how a class doesn't have to be assigned to a constant :)
tjsousa_____ has joined #ruby
IcyDragon is now known as IceDragon
ryanleesipes has joined #ruby
<redondo>
apeiros, Why would you want a class not being assigned to a constant?
monkegjinni has joined #ruby
franzip has quit [Quit: ...]
geggam has joined #ruby
dawkirst has quit [Remote host closed the connection]
yacks has quit [Ping timeout: 252 seconds]
bklane has quit [Remote host closed the connection]
mikewintermute has joined #ruby
alem0lars has joined #ruby
bklane has joined #ruby
benzrf is now known as benzrf|offline
mikewintermute has left #ruby [#ruby]
x1337807x has joined #ruby
<apeiros>
redondo: for the same reason you want any other object not assigned to a constant - if it's ephemeral, if it's not necessary to be accessed from other scopes, etc.
yfeldblum has quit [Ping timeout: 240 seconds]
bklane has quit [Read error: Connection reset by peer]
memorozovm has joined #ruby
<redondo>
get it, thanks
memorozovm has quit [Remote host closed the connection]
axilla has joined #ruby
<apeiros>
sometimes you have it assigned to a constant and additionally want it assigned to another variable
<apeiros>
e.g. to pass the class around
havenwood has quit []
<nicksloan>
I'm automating the deployment of a rails app that depends on ruby 2.0, but the default ruby on ubuntu 14.04 is 1.x. My first thought was to just install ruby2.0, but that's going to gross up my ansible playbooks. my second instinct was to use rbenv, but having to build a ruby from scratch when I spin up new instances sounds slow and potentially fragile.
<nicksloan>
how do people solve this?
paulfm has quit []
<slash_nick>
nicksloan: alot of people use rvm
<segfalt>
I build my own version of Ruby as .debs
Bira has joined #ruby
<segfalt>
And just install them with Puppet
<segfalt>
they end up in /usr/local/, e.g. /usr/local/bin/ruby2.1
<segfalt>
I tell Passenger which Ruby to use, with PassengerRuby
<nicksloan>
segfalt: sounds like the same sort of thing that would be required using ubuntu's ruby 2.0
paulfm has joined #ruby
<nicksloan>
slash_nick: what is the benefit of rvm over rbenv in that case?
Rahul_Roy has quit [Ping timeout: 245 seconds]
<postmodern>
nicksloan, just install ruby 2.0 via package manager or into /usr/local
<postmodern>
nicksloan, you can use ruby-install or ruby-build to install into /usr/local
metadave_ has quit [Read error: Connection reset by peer]
ballPointPenguin has quit [Ping timeout: 264 seconds]
mattmcclure has quit [Ping timeout: 245 seconds]
Martxel has joined #ruby
<segfalt>
nicksloan: Not sure if you can simply much beyond 'Install Ruby2.0, and use it.' -- Unless you want to build your software with an embedded copy of ruby and deploy that.
<segfalt>
*simplify
Bira has quit [Ping timeout: 240 seconds]
ballPointPenguin has joined #ruby
metadave_ has joined #ruby
Rahul_Roy has joined #ruby
Advocation has quit [Quit: Advocation]
mattmcclure has joined #ruby
mrnugget has quit [Quit: mrnugget]
<rgiscard>
nicksloan: I'm with segfalt. I bake my RPM and distribute it from private repo via automation framework. I actually take it one step further as I bake the RPM from the app, since I have to distribute apps to Internet reachable hosts.
bricker has joined #ruby
x1337807x has quit [Ping timeout: 240 seconds]
Deejay_ has joined #ruby
chrisseaton has quit []
smathieu has quit [Remote host closed the connection]
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
smathieu has joined #ruby
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
danjordan has joined #ruby
x1337807x has joined #ruby
jimmyhoughjr has joined #ruby
Jetchisel has joined #ruby
rezzack has quit [Quit: Leaving.]
Morkel_ has joined #ruby
diegoviola has joined #ruby
shevy has joined #ruby
Morkel has quit [Ping timeout: 252 seconds]
Morkel_ is now known as Morkel
rezzack has joined #ruby
nickgartmann has joined #ruby
rails426 has joined #ruby
jrunning_ is now known as jrunning
jrunning has quit []
jrunning has joined #ruby
Gabri has joined #ruby
relix has joined #ruby
shvelo has quit [Ping timeout: 252 seconds]
anaeem1__ has quit [Read error: Connection reset by peer]
ringaring has quit [Ping timeout: 264 seconds]
agent_white has quit [Quit: leaving]
NinoScript has quit [Quit: NinoScript]
mehlah has joined #ruby
bradhe has quit [Remote host closed the connection]
n_blownapart has joined #ruby
chrisseaton has joined #ruby
mattmcclure has quit [Ping timeout: 245 seconds]
Gabri has quit [Client Quit]
Gabri_ has quit [Ping timeout: 264 seconds]
<n_blownapart>
hi I've been learning ruby and like it. Some of you say don't learn a second language that would confuse me. Others say learn C . Others say learn Python. What say you? thanks
jprovazn has quit [Quit: Odcházím]
mattmcclure has joined #ruby
vpretzel_ has joined #ruby
rails426 has quit []
sambao21 has quit [Quit: Computer has gone to sleep.]
<apeiros>
n_blownapart: if you feel like learning another language - more power to you! go for it.
<centrx>
n_blownapart, Usually if you want to truly learn something, you focus on it for a while
<n_blownapart>
thanks apeiros you are always kind and objective. My housemate says learn C along with Ruby. Many say learn python.
ktun has joined #ruby
ktun has quit [Client Quit]
sepp2k1 has joined #ruby
vpretzel has quit [Ping timeout: 252 seconds]
<n_blownapart>
thanks centrx and for yesterday's help !
<apeiros>
n_blownapart: IMO python is quite similar to ruby. if I'd learn a second language, I'd probably try something much different
Bira has joined #ruby
<n_blownapart>
apeiros: like ...
<centrx>
n_blownapart, Learning Python won't teach you much that you don't learn in Ruby. Just different syntax
yeticry has joined #ruby
<apeiros>
n_blownapart: scala, haskell, ocaml
<n_blownapart>
apeiros: learn me a haskell ?
<centrx>
n_blownapart, C and ASM too
<apeiros>
n_blownapart: though, tbh, on my list, the top spot is taken by go. mostly because I expect it to be rather useful to me.
sambao21 has joined #ruby
decoponio has quit [Quit: Leaving...]
sepp2k has quit [Ping timeout: 252 seconds]
<n_blownapart>
I heard its the next enterprise language along with python. apeiros
nanoyak has joined #ruby
emptymag00 has joined #ruby
<n_blownapart>
one more thing since the bodhisattvas are here. What about going through the euler exercises? I started a few and they are tough (in ruby).
chrisseaton has quit []
<centrx>
"Enterprise" things are not necessarily good. Java is the top "enterprise" language and it sucks.
dingus_khan has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<n_blownapart>
centrx: good call.
<centrx>
"Enterprise" means it's more likely the language was chosen not based on the merits of the language itself
<n_blownapart>
yikes
<n_blownapart>
I get advice and since ruby is written in C that does appeal to me.
<centrx>
That said, Go is a good language to learn
fantazo has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
momomomomo has quit [Quit: momomomomo]
<apeiros>
I've heard quite a lot of good things about go
Bira has quit [Ping timeout: 264 seconds]
ssx has joined #ruby
<apeiros>
so if you need a lower level language for speed, it might be nice
jhulten has quit [Remote host closed the connection]
sambao21 has quit [Client Quit]
kpshek has quit []
<apeiros>
that said, no idea how well you can use it to write ruby extensions
<centrx>
n_blownapart, Learning C will teach you more about how the computer works internally. Higher-level languages are hiding these operations
pu22l3r has quit [Ping timeout: 240 seconds]
wallerdev has joined #ruby
cocotton has quit [Remote host closed the connection]
ringaring has joined #ruby
koderok has quit [Quit: koderok]
<n_blownapart>
apeiros: centrx yeah also I'm into the math. I used to excel in math at school then forgot everything. So the euler problems are cool. so centrx do you think knowing C and ruby is an excellent foundation?
toastynerd has joined #ruby
chrisseaton has joined #ruby
<mjc_>
wow Set include? is impressively fast compared to Array include?
<centrx>
mjc_, It uses a hash
<mjc_>
profiling ftw
<centrx>
n_blownapart, Yes
sambao21 has joined #ruby
segfalt has quit [Ping timeout: 252 seconds]
<n_blownapart>
apeiros: please chime in on that, or do you think Go is the way ? gonna buy a book to comfort myself.
mattyohe has quit [Ping timeout: 264 seconds]
aspires has joined #ruby
ringaring has quit [Client Quit]
jhulten has joined #ruby
<centrx>
n_blownapart, C is the fundamental language. Unix is written in C. iOS/OS X uses a derivative of C. Windows undoubtedly uses C or C++ underneath all the C#/.NET junk
kpshek has joined #ruby
cescalante is now known as ce_afk
cocotton has joined #ruby
<centrx>
n_blownapart, Ruby, aside from being an excellent language, is also a good introduction to functional programming and other concepts like MapReduce
<centrx>
s/introduction/stepping-stone/
danjordan has quit [Quit: danjordan]
segfalt has joined #ruby
Toger has joined #ruby
<n_blownapart>
centrx: MapReduce. ? Will read up ... what is : s/introduction/stepping-stone/ ?
<centrx>
Correcting my statement
jhulten has quit [Remote host closed the connection]
<centrx>
It is common notation in Unix, e.g. in sed and vim (s for Substitute
mattyohe_ has joined #ruby
saarinen has quit [Ping timeout: 245 seconds]
mattyohe_ is now known as mattyohe
Slavox is now known as Slavox|AFK
tvw has quit []
frosgy has joined #ruby
jhulten has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
zybi1 has joined #ruby
<shevy>
test
<centrx>
test failed
<segfalt>
can't hear you shevy
supermarin has joined #ruby
combusean has joined #ruby
<shevy>
hmm
b1205 has quit [Ping timeout: 265 seconds]
wallerdev has quit [Quit: wallerdev]
r0bby has joined #ruby
robbyoconnor has joined #ruby
saarinen has joined #ruby
skysploit has quit [Remote host closed the connection]
agent_white has joined #ruby
<n_blownapart>
shevy I've been asking here about learning Go or C ... for a ruby beginner to enhance his knowledge . or Python.
wallerdev has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
skysploit has joined #ruby
jhulten has quit [Remote host closed the connection]
frogssgy has quit [Ping timeout: 252 seconds]
rezzack has quit [Quit: Leaving.]
dpswireless has quit []
i_s_ has quit [Ping timeout: 265 seconds]
<shevy>
hmm
supermarin has quit [Ping timeout: 252 seconds]
<shevy>
sorry n_blownapart I don't remember you :)
<n_blownapart>
aka crucify_me
<wallerdev>
i remember you
<shevy>
if it is Go vs. C then surely C is the winner
<n_blownapart>
I'm a resident idiot
<shevy>
ruby is written in C
<wallerdev>
im a resident sleeper
<shevy>
python is written in C
<shevy>
the linux kernel is written in C
<n_blownapart>
sorry wallerdev
<shevy>
if we would not have a division C vs. C++ then the whole programming world would be written in C**
<toretore>
so if you're looking to write an interpreter or an os, use c
<slash_nick>
"C splat splat"
dingus_khan has quit [Remote host closed the connection]
<segfalt>
Golangs first compiler is written in C, too.
<segfalt>
IIRC.
agent_white has joined #ruby
<n_blownapart>
toretore: shevy I just want to understand what the hell is going on. I once did well in Maths.
zorak has quit [Remote host closed the connection]
<toretore>
don't worry too much.. just find something you enjoy
<apeiros>
n_blownapart: sorry, watching a bit of videos over here
i_s has joined #ruby
<segfalt>
I don't think Python would teach you anything new, if you know Ruby decently. Learning C would teach you quite a bit about why people use higher level languages :-)
ginkopc has joined #ruby
Xeago has quit [Remote host closed the connection]
<ginkopc>
ciao
blackmesa has joined #ruby
<shevy>
n_blownapart I never did well in higher maths but head calculations I was always among the top 3 fastest in all my classes
Xeago has joined #ruby
<n_blownapart>
toretore: good call. no worries apeiros . segfalt good call now the big question: which C book for a beginner?
<n_blownapart>
shevy: I'm decent at that too
<wallerdev>
i was the best at mental math flash cards in 3rd grade
predator117 has quit [Ping timeout: 258 seconds]
<segfalt>
I haven't read a C book in 10 years, and I don't remember what it was :-(.
vpretzel_ has quit [Remote host closed the connection]
vpretzel has joined #ruby
<shevy>
wallerdev what happened after 3rd grade
<xargoon>
if you want to learn a new language, just write tetris in it:)
<centrx>
I know the alphabet forwards and backwards
<wallerdev>
we stopped playing the mental math flash cards game
jxf has quit [Ping timeout: 240 seconds]
bradhe has joined #ruby
<n_blownapart>
shevy: I learned chess in third grade. glad for it.
treehug88 has quit []
<wallerdev>
i got 2nd place in a school-wide chess tournament in 5th grade
<wallerdev>
so im basically a GM
<shevy>
man wallerdev is a hidden genius
dingus_khan has joined #ruby
<wallerdev>
agreed
ginkopc has quit []
diegoviola has quit [Quit: WeeChat 0.4.3]
blackmes1 has joined #ruby
predator117 has joined #ruby
Xeago has quit [Ping timeout: 240 seconds]
<n_blownapart>
I was the fastest 220 yard sprinter for a few years.
einarj has joined #ruby
<n_blownapart>
anyway thanks all of you...
EatMulti has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
shvelo has joined #ruby
vlad_starkov has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
jhulten has joined #ruby
<shevy>
I was the fastest in my class too
<shevy>
I broke the legs of all possible competition
Freddan962 has quit [Read error: Connection reset by peer]
<shevy>
or actually, they all sucked in sports massively, plus it was like 70% girls in that class so competition was low anyway
cocotton has quit [Remote host closed the connection]
<n_blownapart>
shevy: my sister and I were called the W***er gazelles.
omosoj has joined #ruby
zybi1 has quit [Quit: Leaving]
vlad_starkov has quit [Ping timeout: 265 seconds]
Nogbit has joined #ruby
b1205 has joined #ruby
caveat- has joined #ruby
<shevy>
Wither gazelles?
<slash_nick>
shevy: i think he's meaning "wigger"
<redondo>
how do you define the ':' operator, as in 'attr_accessor :name'?
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
<apeiros>
redondo: it's part of the literal syntax
tier has quit [Remote host closed the connection]
<apeiros>
redondo: just like " is part of string literal syntax
samuel02 has quit []
jackneill has quit [Ping timeout: 258 seconds]
<apeiros>
or [] are part of array literal syntax. etc.
smathieu has quit [Remote host closed the connection]
s2013_ has joined #ruby
saarinen has quit [Client Quit]
smathieu has joined #ruby
<redondo>
apeiros, centrx, shevy, get it. thanks, now reading the link centrx posted.
cescalante is now known as ce_afk
fantazo has quit [Ping timeout: 276 seconds]
ss__ has joined #ruby
tier has joined #ruby
troulouliou_dev has joined #ruby
<shevy>
\o/
<Mon_Ouie>
Yeah, looking at Ruby 1.9 code, when a new symbol is created, it stores an association with an ID and a frozen string object in a hash table.
<shevy>
poor frozen object
<shevy>
must be cold for it in there
<wallerdev>
let it go
s2013 has quit [Disconnected by services]
ss__ is now known as s2013
<Mon_Ouie>
(and that hash table isn't a Ruby object)
danshultz has quit [Remote host closed the connection]
Xeago has joined #ruby
danshultz has joined #ruby
meatherly has quit []
danshultz has quit [Read error: Connection reset by peer]
<apeiros>
Symbol.all_symbols
nathancahill has joined #ruby
<lethjakman>
so...I'm trying to figure out how to break inside of an inject cleanly I have this:
<redondo>
why are symbols useful?
paulfm has quit []
<lethjakman>
['1', '2', '3', '4'].inject('') {|result, val| case result+val; when '123' then break; }
klaut has quit [Remote host closed the connection]
larissa has joined #ruby
doodlehaus has quit [Remote host closed the connection]
havenwood has joined #ruby
yokel has quit [Ping timeout: 276 seconds]
maxamillion has joined #ruby
<maxamillion>
is there a recommended approach to verifying that a string is shell safe?
saarinen has joined #ruby
blackmes1 has quit [Ping timeout: 240 seconds]
<wallerdev>
i dont think you can verify something like that
<wallerdev>
but if its user input you can escape it for a shell
tjsousa______ has joined #ruby
<xybre>
What do you mean "shell safe"? I believe there is a shell escape function.
<wallerdev>
if you just have a string and you dont know if its escaped or not i dont believe theres any verification you can do on it to determine whether or not it should be escaped
yokel has joined #ruby
<ari-_-e>
you can also just not use the shell
workmad3 has quit [Ping timeout: 240 seconds]
<xybre>
Gotta wodner why you're passing untrusted strings directly to the commandlien anyway.
<centrx>
maxamillion, There's Shellwords#shellescape, and also system/exec support separating the command-line arguments into multiple method arguments which should be safe for most/all
blackmes1 has joined #ruby
<maxamillion>
centrx: much appreciated
<xibalba>
php broke me ten years ago, ruby is breathing new life into me
<eam>
the preferred approach is to not invoke a shell at all
<ari-_-e>
system uses the shell
<eam>
not necessarily
<centrx>
system doesn't really use the shell, if you use bash built-in functions they don't work
<maxamillion>
eam: if ruby could handle file attributes properly I wouldn't have to, but I can't set a file immutable otherwise ... so here we are :/
<eam>
centrx: it does use the shell, sometimes
tjsousa_____ has quit [Ping timeout: 276 seconds]
kyb3r_ has joined #ruby
<eam>
maxamillion: you don't need a shell to run programs
<ari-_-e>
the doc says "executes command..." in a subshell
sambao21 has quit [Quit: Computer has gone to sleep.]
<eam>
ari-_-e: doc lies, ruby optimizes away the shell depending on a heuristic
<ari-_-e>
wonderful
<maxamillion>
eam: that's fair, all I really want is to sanitize strings being passed to external commands and "shell safe" is just the most common way I could think to describe that
<ari-_-e>
maxamillion: what do you mean by file attributes?
<eam>
maxamillion: if you tokenize the command yourself and pass >1 args they will be handed to execve() directly
testcore has joined #ruby
<maxamillion>
ari-_-e: chattr/lsattr
<eam>
for example ruby -e'system "echo", "*"'
<xybre>
Hmm, there's both a rest-client and a rest_client library on my system.
<eam>
versus ruby -e'system "echo *"' # uses a shell
<ari-_-e>
maxamillion: so you just want to run one of those commands?
<maxamillion>
eam: yes
<maxamillion>
ari-_-e: right, but I want to sanitize the string I pass to it in this function
<ari-_-e>
maxamillion: well again, you don't need the shell to run those commands
MrSamuel has joined #ruby
<eam>
maxamillion: if you want to avoid the shell, don't pass a string pass an array of strings (a parsed out ARGV)
<maxamillion>
that is irrelevant
LiohAu has quit [Quit: LiohAu]
<ari-_-e>
what's irrelevant?
saarinen has quit [Ping timeout: 240 seconds]
vpretzel has quit [Remote host closed the connection]
<maxamillion>
it doesn't matter how it's invoked, shell or not, I want to properly sanitize the data being passed to 'chattr' ... that's the only thing I wanted to know how to do, I don't know why we're hung up on the method used to execute the external program
<eam>
maxamillion: because it's the safe way to do what you're doing
<xybre>
rest_client rest-client and restclient all do the same thing, but they can be each loaded on their own due to require's semantics.
<ari-_-e>
maxamillion: if you don't invoke it with the shell, then... it doesn't need to be shell safe
yokel has quit [Ping timeout: 252 seconds]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
enebo has quit [Quit: enebo]
<maxamillion>
nevermind, I'm apparently not communicating this properly
<maxamillion>
thank you for your help, have a nice day
maxamillion has left #ruby [#ruby]
dfinly has quit [Quit: Farewell]
shalicke has quit [Ping timeout: 258 seconds]
aspires has quit []
lw has quit [Quit: s]
yubrew has joined #ruby
aspires has joined #ruby
s2013 has quit [Ping timeout: 252 seconds]
n_blownapart has joined #ruby
niharvey has quit [Quit: No Ping reply in 180 seconds.]
yubrew_ has quit [Ping timeout: 240 seconds]
niharvey has joined #ruby
jxf has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Remote host closed the connection]
TDJACR has joined #ruby
alem0lars has quit [Quit: alem0lars]
andrewjanssen has joined #ruby
endash has quit [Quit: endash]
shalicke has joined #ruby
nateberkopec has quit [Quit: Leaving...]
<ari-_-e>
eam: ok, the doc actually does say that it doesn't use the shell in some cases
<eam>
ah then :)
vlad_starkov has joined #ruby
axilla has joined #ruby
havenwood has quit [Remote host closed the connection]
sambao21 has joined #ruby
fantazo has joined #ruby
sambao21 has quit [Client Quit]
ryanleesipes has quit [Quit: Leaving]
andrewjanssen has quit [Ping timeout: 276 seconds]
sambao21 has joined #ruby
MrSamuel has quit [Ping timeout: 252 seconds]
sambao21 has quit [Client Quit]
testcore has quit [Quit: [BX] Bender uses BitchX. Bite my shiny metal ass!]
testcore has joined #ruby
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
smathieu has quit [Remote host closed the connection]
<shevy>
chubchubcharles we chat about the programming language ruby here
<shevy>
in other channels they chat about other things
<segfalt>
sometimes we chat about doctor who
dangerou_ has joined #ruby
<segfalt>
but that's off topic
<centrx>
chubchubcharles, Freenode is most commonly used for software projects, mostly open-source
smathieu has joined #ruby
<benzrf>
chubchubcharles: i mean you can make any channel you like
fantazo has quit [Remote host closed the connection]
<benzrf>
chubchubcharles: but yeah freenode tends to be the network for tech stuff
r0bby has quit [Ping timeout: 252 seconds]
robbyoconnor has quit [Ping timeout: 252 seconds]
ghr has quit [Ping timeout: 240 seconds]
chabill has quit [Quit: WeeChat 1.0-dev]
dangerousdave has quit [Ping timeout: 240 seconds]
zorak has joined #ruby
_Andres has joined #ruby
pierre1_ has joined #ruby
<chubchubcharles>
cooooool.
einarj has quit [Remote host closed the connection]
chubchubcharles has left #ruby [#ruby]
supermarin has joined #ruby
x1337807x has joined #ruby
thesheff17 has quit [Ping timeout: 252 seconds]
cina has joined #ruby
chubchubcharles has joined #ruby
chubchubcharles has left #ruby [#ruby]
n_blownapart has quit [Remote host closed the connection]
einarj has joined #ruby
_Andres has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
omosoj has quit [Ping timeout: 252 seconds]
<cina>
is it possible to get arrow keys to work as expected in `gets`?
jobewan has quit [Quit: Leaving]
dingus_khan has quit [Remote host closed the connection]
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
supermarin has quit [Ping timeout: 245 seconds]
<cina>
or, is there a standalone *nix commandline tool for reading user input (like `read`) that works well with arrow keys?
<lethjakman>
so...I've seen things like delay in sidekiq...but I don't think I understand how it takes everything after it and shoves it into redis. is Proxy not an internet thing?
<arrubin>
cina: What do you expect them to do?
DrinkMachine has quit [Quit: Lost terminal]
dblessing_ has quit [Quit: dblessing_]
deric_skibotn has quit [Ping timeout: 240 seconds]
<wallerdev>
probably expects them to move the cursor around
<cina>
arrubin: when I press left instead of moving left it prints ^[[D and moves right
<wallerdev>
lol
<shevy>
cina not in gets but in Readline module
<shevy>
cina in irb, try: require 'readline'
einarj has quit [Ping timeout: 240 seconds]
dangerou_ has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
<cina>
shevy: perfect! Readline.readline does exactly what I was looking for. thanks
_Andres has joined #ruby
<shevy>
\o/
chubchubcharles has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
jhulten has quit [Remote host closed the connection]
gr33n7007h has quit [Quit: Leaving]
supermarin has quit [Ping timeout: 264 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Royalb15 has quit [Read error: Connection reset by peer]
yokel has joined #ruby
aspires has joined #ruby
einarj has joined #ruby
dingus_khan has quit [Ping timeout: 276 seconds]
maoko has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maletor has joined #ruby
dingus_khan has joined #ruby
toastynerd has quit [Remote host closed the connection]
aspires has quit [Client Quit]
thomasxie has joined #ruby
phoo1234567 has quit [Quit: Leaving]
aspires has joined #ruby
duggiefresh has quit [Remote host closed the connection]
duggiefresh has joined #ruby
aspires has quit [Client Quit]
<imaleaf>
so do things actually happen here? like, people coding and stuff
<imaleaf>
:p
dingus_khan has quit [Ping timeout: 264 seconds]
predator217 has joined #ruby
thomasxie has quit [Client Quit]
<centrx>
imaleaf, Yeah we type all our code into IRC
<centrx>
imaleaf, Then Freenode compiles it for us
<benzrf>
imaleaf: this channel is nearly as awesome as #haskell-lens
<benzrf>
* #haskell
<imaleaf>
centrx: well I'm just surprised by the lack of questions and activity on a channel with 840+ people on it :P
<centrx>
imaleaf, Freenode is most active during the daytime of America/Europe
samuel02_ has quit [Remote host closed the connection]
samuel02 has joined #ruby
aspires has joined #ruby
<centrx>
imaleaf, Many people leave their IRC clients logged in 24/7
<imaleaf>
ah, I see
<benzrf>
i do!
<benzrf>
but i switch nicks when offline
predator117 has quit [Ping timeout: 240 seconds]
* segfalt
has been using irccloud
duggiefresh has quit [Ping timeout: 252 seconds]
<imaleaf>
I'm still trying to get smuxi to work properly with my remote server, so unfortunately I keep missing bits and pieces throughout the day
<benzrf>
smuxi?
<benzrf>
i use irssi + znc
<benzrf>
znc is pretty sweet B-)
<wallerdev>
i used to use irssi
<wallerdev>
it was really pretty
<benzrf>
wallerdev: no more?
bmcorser has quit [Quit: Connection closed for inactivity]
<wallerdev>
no more
<benzrf>
y not
<wallerdev>
because i use my terminal for other things and didnt want to have two terminal windows separate
<wallerdev>
and didnt want to leave it on a tab
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
<imaleaf>
I'll check out znc. I kind of like having a guified irc client though, it minimizes to the tray when I don't need it
samuel02 has quit [Ping timeout: 276 seconds]
Bad_Advice_Cat has left #ruby ["Leaving"]
kevind has quit [Quit: kevind]
<benzrf>
imaleaf: znc is a bouncer
<benzrf>
it
<benzrf>
it's mostly client-agnostic
Megtastique has quit []
<imaleaf>
but that's more syntax to learn, and I'm still trying to figure out how php uses references! :p
yfeldblum has joined #ruby
vlad_starkov has joined #ruby
Slavox|AFK is now known as Slavox
nanoyak has quit [Quit: Computer has gone to sleep.]
jespada has quit [Quit: Leaving]
lambo has joined #ruby
apeiros has joined #ruby
dilated_dinosaur has quit [Ping timeout: 252 seconds]
havenwood has quit [Remote host closed the connection]
Royalb15 has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
apeiros has quit [Ping timeout: 252 seconds]
<lambo>
hello im in trouble with gem : http://pastie.org/9200727 the weird stuff is that bundle install works just fine also their is no auto clompletion with gem is that the default?
freezey has joined #ruby
nanoyak has joined #ruby
s2013 has quit [Ping timeout: 258 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
lw has quit [Quit: s]
baweaver has joined #ruby
mercerist has quit [Quit: Computer has gone to sleep.]
lw has joined #ruby
thomasxie has joined #ruby
<shevy>
lambo your openssl seems broken
<lambo>
how can gem doesnt work and bundle does?
<shevy>
I am the wrong to ask, I do not use bundle
<shevy>
gem works perfectly fine here
saarinen has quit [Quit: saarinen]
<shevy>
gem version: 2.2.2
<shevy>
openssl: 1.0.1g
thomasxie has quit [Client Quit]
mikecmpbll has joined #ruby
<lambo>
OpenSSL 1.0.1f
DrShoggoth has quit [Quit: Leaving]
<lambo>
gem has autocompletion as default?
baweaver has quit [Ping timeout: 240 seconds]
<shevy>
what is autocompletion
s00pcan has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
benlieb has joined #ruby
nfk has quit [Quit: yawn]
<lambo>
tab to comple commande
jrhe has joined #ruby
<lambo>
whatever it is realy called ^^
x1337807x has joined #ruby
<shevy>
aha, I don't think it has tab-completion out of the box
doodlehaus has joined #ruby
n_blownapart has quit []
Megtastique has joined #ruby
<lambo>
well its at least one thing in order here
axilla has joined #ruby
Megtastique has quit [Client Quit]
duggiefresh has joined #ruby
yfeldblum has quit [Remote host closed the connection]