<womble>
OldHarmony: We don't need all your code, you just need to do what zenspider said (search until search->next is null)
<womble>
OldHarmony: In short, this has nothing to do with Ruby, it's just a straightforward linked-list implementation bug.
<zenspider>
gotta go get food and then go to study group (and then nerd party). later
<womble>
nerd partaaaaay!
michaeldeol has joined #ruby-lang
usershell has joined #ruby-lang
<OldHarmony>
waht ist DS?
<OldHarmony>
what is DS?
kurko__ has joined #ruby-lang
elastik has quit [Remote host closed the connection]
<womble>
Data Structure.
<OldHarmony>
ok ^^
kurko___ has quit [Ping timeout: 264 seconds]
matsutomo has quit [Quit: matsutomo]
tkuchiki has joined #ruby-lang
haraoka_ has joined #ruby-lang
usershell has quit [Remote host closed the connection]
mistym has quit [Quit: Leaving...]
RobertBirnie has quit [Ping timeout: 272 seconds]
<godd2>
Dual Screen
Berzserk has quit []
Sadin has joined #ruby-lang
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mattyohe has quit [Quit: Connection closed for inactivity]
usershell has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
<wallerdev>
then what does 3DS stand for
amsi has quit [Quit: Leaving]
matsutomo has joined #ruby-lang
hahuang65 has quit [Ping timeout: 244 seconds]
mistym has joined #ruby-lang
senor_jalapeno has joined #ruby-lang
ta has joined #ruby-lang
<godd2>
It stands for "Here at Nintendo, we like to use puns to name our products"
t7y9r has quit [Ping timeout: 265 seconds]
t3h_j4n170r has quit [Ping timeout: 260 seconds]
t7y9r has joined #ruby-lang
ta has quit [Ping timeout: 256 seconds]
t3h_j4n170r has joined #ruby-lang
|jemc| has joined #ruby-lang
imperator has joined #ruby-lang
midhir_ has quit [Remote host closed the connection]
Iskarlar has joined #ruby-lang
Iskarlar has quit [Max SendQ exceeded]
Iskarlar has joined #ruby-lang
ruby-lang687 has joined #ruby-lang
<OldHarmony>
ok have found is bug from gcc or ruby.... -.-
<OldHarmony>
i have cleanup the code....
<wallerdev>
ah a gcc bug, figures
<wallerdev>
:p
diegoviola has quit [Quit: WeeChat 1.0.1]
usershell has quit [Remote host closed the connection]
houhoulis has joined #ruby-lang
<ruby-lang687>
Has anyone made a program or knows how to convert bytes to kb??
<ruby-lang687>
I know it's bytes/1024 but there is a question for the amount of digits after decimal
nathanstitt has joined #ruby-lang
ur5us has quit [Ping timeout: 272 seconds]
datazombie has joined #ruby-lang
<pipework>
ruby-lang687: That's not how you calculate bytes to kb.
<pipework>
Wrong operator.
ur5us has joined #ruby-lang
kurko__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shinnya has quit [Ping timeout: 245 seconds]
<weaksauce>
pipework the 1000 vs. 1024 thing?
<weaksauce>
I think what pipework is saying is that 1 KiB = 1024B while 1 kB = 1000B.
<weaksauce>
but it's up to you to decide what you want to use
djbkd has quit [Quit: My people need me...]
<OldHarmony>
3D-Screen ^^
Bwild has joined #ruby-lang
kiyote23_ has quit [Remote host closed the connection]
OldHarmony has quit [Quit: Leaving.]
spastorino has quit [Quit: Connection closed for inactivity]
<ruby-lang687>
Yeah thanks.
caseydriscoll has quit [Remote host closed the connection]
<ruby-lang687>
I like bytes/1024 as it gives out accurate number as you'd get from clicking on file properties and seeing it's size on kb's
x-light has quit [Remote host closed the connection]
michaeldeol has joined #ruby-lang
<ruby-lang687>
But my question is how to print out an specified amount of decimal value, in C for x = 10 you could do something like %.1f to print the variable x as 10.0 and %.2f for 10.00 how can I do the same in ruby?
momomomomo has joined #ruby-lang
deol has joined #ruby-lang
x-light has joined #ruby-lang
michaeldeol has quit [Ping timeout: 256 seconds]
deol has quit [Client Quit]
<jhass>
yes
<jhass>
exactly like that
<jhass>
see Kernel#printf, Kernel#sprintf and String#%
<ruby-lang687>
Was that for me? Jhass
<jhass>
yes
<ruby-lang687>
Thanks.
caseydriscoll has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
caseydriscoll has quit [Remote host closed the connection]
amsha has joined #ruby-lang
senor_jalapeno has quit [Ping timeout: 250 seconds]
wallerdev has quit [Quit: wallerdev]
io_syl has quit []
gjaldon has joined #ruby-lang
malconis has quit [Read error: Connection reset by peer]
malconis has joined #ruby-lang
senor_jalapeno has joined #ruby-lang
gjaldon has quit [Remote host closed the connection]
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby-lang
deg has quit [Ping timeout: 240 seconds]
arooni-mobile__ has joined #ruby-lang
arooni-mobile has joined #ruby-lang
kiyote23 has joined #ruby-lang
gjaldon has joined #ruby-lang
imperator has quit [Quit: Valete!]
ta has joined #ruby-lang
kiyote23 has quit [Remote host closed the connection]
ruby-lang687 has quit [Quit: Page closed]
scottschecter has quit [Quit: Leaving]
matsutomo has quit [Quit: matsutomo]
kiyote23 has joined #ruby-lang
ta has quit [Ping timeout: 260 seconds]
bb010g has joined #ruby-lang
rbowlby has quit [Remote host closed the connection]
io_syl has joined #ruby-lang
wangzh has joined #ruby-lang
hinbody has joined #ruby-lang
wangzh has quit [Max SendQ exceeded]
lsegal has joined #ruby-lang
wangzh has joined #ruby-lang
rand0mbits has quit [Disconnected by services]
rahul_j has joined #ruby-lang
deg has joined #ruby-lang
Val_ has joined #ruby-lang
kiyote23 has quit [Remote host closed the connection]
shuriu has quit [Remote host closed the connection]
iamninja has quit [Ping timeout: 250 seconds]
usershell has joined #ruby-lang
ta has joined #ruby-lang
iamninja has joined #ruby-lang
<jdecuirm>
Hi guys!
<jdecuirm>
In order to avoid printing
klmlfl has joined #ruby-lang
<jdecuirm>
class:object and printing the instance properties should i override to_s method?
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ianstarz_ has quit [Quit: Connection closed for inactivity]
<jdecuirm>
for example, i have an array with 3 objects of class Painting, they have :name, :price, :year and they are sorted in an array
<womble>
jdecuirm: Yes.
ruby-lang247 has joined #ruby-lang
<jdecuirm>
thanks womble! it just should return an string right?
<womble>
Yes.
<womble>
Things would get very, *very* weird if #to_s didn't return a string.
evangow has joined #ruby-lang
ta has quit [Ping timeout: 265 seconds]
* womble
is now suddenly rather curious to find out what *does* happen if you don't return a string from #to_s
rahul_j_ has joined #ruby-lang
kiyote23 has joined #ruby-lang
rahul_j has quit [Ping timeout: 265 seconds]
<jdecuirm>
Lol
<jdecuirm>
the problem was that i was sending a puts and the result was printing twice hahaha
<jdecuirm>
but then i just returned the string and no problem
<jdecuirm>
but thanks for the lovely sarcasm lol
rahul_j_ has quit [Read error: Connection reset by peer]
ruby-lang247 has quit [Ping timeout: 246 seconds]
hinbody has quit [Remote host closed the connection]
kiyote23 has quit [Ping timeout: 250 seconds]
hinbody has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
>> class Symbol; def to_s; ThreadGroup.new end end; :"\t".to_s
<jdecuirm>
Hey guys, i'm learning about enumerators but...are they just like arrays on the fly? or what is the best way to describe them?
gix has quit [Ping timeout: 244 seconds]
midhir has quit [Remote host closed the connection]
usershell has joined #ruby-lang
<jhass>
they are iterators
midhir has joined #ruby-lang
<jhass>
the external type
<jhass>
you probably know the internal iterator already, implemented by the .each method
wangzh has quit [Quit: Leaving]
diegoviola has quit [Ping timeout: 260 seconds]
<jhass>
you pass it a block, the thing you call it on controls how and when it is iterated, it calls the block, not you do
Phoenixmiss has quit [Quit: Leaving]
<jhass>
enumerators are external, you drive the iteration
<jhass>
namely through the .next method on them
<jdecuirm>
oh
<jdecuirm>
thanks jhass! in fact i was finishing to understand enumerable!
gix has joined #ruby-lang
<jhass>
though that's not really their main usage, since Enumerator includes Enumerable which methods in turn return new Enumerator's that construct allows you to chain those methods
<jhass>
map.with_index.each_with_object
<jdecuirm>
Enumerable and Enumerator sounds complex, lol
<jhass>
it can be a bit overwhelming at first
kyb3r_ has quit [Read error: Connection reset by peer]
<jhass>
read through Enumerable so you know what's there
<jdecuirm>
Well, in fact Enumerable not so much, but for now Enumerator it's giving me headaches
<jhass>
rest comes with time
<jdecuirm>
thanks jhass!
kyb3r_ has joined #ruby-lang
midhir has quit [Ping timeout: 252 seconds]
<jhass>
yeah, don't care too much, just start using them and it'll eventually come together and make click ;)
<jdecuirm>
to tell you the truth, i'm figuring out when will i use Enumerable module, meaning, for example if i need a collection and traverse it, i surely will go for an Array
<jhass>
Array includes Enumerable
<jdecuirm>
So, what is the plus to conform a class with the Enumerable Module
<jdecuirm>
exactly!
<jhass>
and so does Hash
<jhass>
and Set
<jdecuirm>
why will i implement it myself in a class
<jdecuirm>
if i have already some collections with it
<jhass>
well, your class could provide the data from whatever
<jhass>
like a network socket
<jdecuirm>
that's a new topic in Ruby for me! lol, but thanks a lot you were a great great help jhass!
<jhass>
or your class might implement a graph or tree data structure
iamninja has joined #ruby-lang
<jhass>
there are lots of reasons, you'll recognize it when you need it
<jdecuirm>
Thanks a lot jhass!
Miphix has joined #ruby-lang
kiyote23 has joined #ruby-lang
kiyote23 has quit [Ping timeout: 240 seconds]
robbyoconnor has joined #ruby-lang
hinbody has quit [Quit: leaving]
bear_ has joined #ruby-lang
RobertBirnie has joined #ruby-lang
matsutomo has quit [Quit: matsutomo]
<bear_>
hi
bear_ has quit [Client Quit]
bear_ has joined #ruby-lang
amsha has quit [Quit: Be back later ...]
bear_ has quit [Client Quit]
amsha has joined #ruby-lang
bear_ has joined #ruby-lang
bear_ has quit [Remote host closed the connection]
bears has joined #ruby-lang
bears has quit [Client Quit]
bears has joined #ruby-lang
shuriu has joined #ruby-lang
gjaldon has quit [Remote host closed the connection]
arooni-mobile has quit [Ping timeout: 240 seconds]
arooni-mobile__ has quit [Ping timeout: 244 seconds]
gjaldon has joined #ruby-lang
st0mar has quit [Ping timeout: 240 seconds]
shuriu has quit [Ping timeout: 245 seconds]
matsutomo has joined #ruby-lang
kiyote23 has joined #ruby-lang
kiyote23 has quit [Remote host closed the connection]
oak has joined #ruby-lang
rbowlby has joined #ruby-lang
flori has quit [Remote host closed the connection]
bears has quit [Quit: Leaving]
bears has joined #ruby-lang
io_syl has quit [Ping timeout: 260 seconds]
bears has quit [Remote host closed the connection]
AKASkip has quit [Ping timeout: 244 seconds]
amjibaly has joined #ruby-lang
fedexo has joined #ruby-lang
oleo__ has quit [Quit: Verlassend]
bears_ has joined #ruby-lang
bears_ has quit [Remote host closed the connection]
amsha has quit [Quit: Be back later ...]
amclain has joined #ruby-lang
rahul_j has joined #ruby-lang
|jemc| has quit [Read error: Connection reset by peer]
rbowlby has quit [Read error: Connection reset by peer]
lapide_viridi has joined #ruby-lang
usershell has quit [Ping timeout: 256 seconds]
lapideviridi has quit [Ping timeout: 258 seconds]
chinmay_dd has joined #ruby-lang
bears has quit [Quit: Leaving]
bears has joined #ruby-lang
lapideviridi has joined #ruby-lang
lapide_viridi has quit [Ping timeout: 240 seconds]
bears has quit [Client Quit]
bears has joined #ruby-lang
mistym has quit [Remote host closed the connection]
rahul_j has quit [Quit: rahul_j]
rahul_j has joined #ruby-lang
charliesome has quit [Quit: zzz]
usershel_ has quit [Ping timeout: 260 seconds]
Iskarlar has joined #ruby-lang
usershell has joined #ruby-lang
rbowlby has joined #ruby-lang
bears has quit [Remote host closed the connection]
bears has joined #ruby-lang
jxie has joined #ruby-lang
x-light has quit [Remote host closed the connection]
st0mar has joined #ruby-lang
ItSANgo has joined #ruby-lang
jxie has quit [Ping timeout: 245 seconds]
jxie has joined #ruby-lang
lapideviridi has quit [Quit: Leaving]
mattyohe has quit [Quit: Connection closed for inactivity]
imajes has quit [Ping timeout: 255 seconds]
gjaldon has joined #ruby-lang
shuriu has joined #ruby-lang
imajes has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
bears has quit [Remote host closed the connection]
bears_ has joined #ruby-lang
ta has quit [Remote host closed the connection]
matsutomo has quit [Quit: matsutomo]
usershell has quit [Remote host closed the connection]
bears_ has quit [Remote host closed the connection]
matsutomo has joined #ruby-lang
ikrima_ has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
skade has joined #ruby-lang
tkuchiki has joined #ruby-lang
shuriu has quit [Remote host closed the connection]
bears_ has joined #ruby-lang
tkuchiki has quit [Ping timeout: 250 seconds]
midhir has joined #ruby-lang
micechal has quit [Read error: Connection reset by peer]
micechal has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
midhir has quit [Ping timeout: 240 seconds]
rahul_j has quit [Quit: rahul_j]
yfeldblum has quit [Ping timeout: 255 seconds]
houhoulis has quit [Remote host closed the connection]
rahul_j has joined #ruby-lang
bears_ has quit [Remote host closed the connection]
shuriu has joined #ruby-lang
mikecmpbll has joined #ruby-lang
charliesome has joined #ruby-lang
rahul_j has quit [Read error: Connection reset by peer]
charliesome has quit [Client Quit]
21WAALSTH has joined #ruby-lang
rahul_j has joined #ruby-lang
21WAALSTH has quit [Remote host closed the connection]
rahul_j has quit [Read error: Connection reset by peer]
rbowlby has quit [Read error: Connection reset by peer]
rbowlby has joined #ruby-lang
cih has joined #ruby-lang
cih has left #ruby-lang [#ruby-lang]
rahul_j has joined #ruby-lang
bears_ has joined #ruby-lang
GBrawl has quit [Quit: (null)]
rahul_j has quit [Read error: Connection reset by peer]
st0mar has quit [Ping timeout: 244 seconds]
bears_ has quit [Ping timeout: 252 seconds]
rahul_j has joined #ruby-lang
solars has quit [Quit: WeeChat 0.4.2]
solars has joined #ruby-lang
rbowlby has quit [Remote host closed the connection]
rahul_j has quit [Read error: Connection reset by peer]
<nofxx>
Need a name for a gem. It's a friendlier nmap, meant for LAN. Quickly find all those pis and mobiles and beaglebones and whatever is connecting (there's a live mode)
<nofxx>
why not use just nmap? now it needs sudo for everything, and I can't easily map my names to stuff.
rahul_j has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
gjaldon has quit [Remote host closed the connection]
matp has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rahul_j has quit [Read error: Connection reset by peer]
matp has joined #ruby-lang
shuriu has quit [Remote host closed the connection]
ta has joined #ruby-lang
rahul_j has joined #ruby-lang
amsha has joined #ruby-lang
GBrawl has joined #ruby-lang
shuriu has joined #ruby-lang
amsha has quit [Ping timeout: 264 seconds]
<yorickpeterse>
morning
<ljarvis>
moin
rahul_j has quit [Read error: Connection reset by peer]
midhir has joined #ruby-lang
<nofxx>
odds, evens = [1,2,3].theres_one_method for this select that I forgot
rahul_j has joined #ruby-lang
marr has joined #ruby-lang
<ljarvis>
partition
<nofxx>
ljarvis, ty!
arBmind has joined #ruby-lang
rahul_j has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby-lang
rahul_j has joined #ruby-lang
fclausen has quit [Ping timeout: 272 seconds]
fclausen has joined #ruby-lang
qba73 has joined #ruby-lang
rahul_j has quit [Read error: Connection reset by peer]
hendranata_ has quit [Ping timeout: 265 seconds]
rahul_j has joined #ruby-lang
micechal_ has joined #ruby-lang
rahul_j has quit [Read error: Connection reset by peer]
rbowlby has joined #ruby-lang
micechal has quit [Ping timeout: 250 seconds]
rahul_j has joined #ruby-lang
fclausen has quit [Ping timeout: 272 seconds]
Shazaum has joined #ruby-lang
charliesome has joined #ruby-lang
bmichelsen has joined #ruby-lang
rahul_j has quit [Read error: Connection reset by peer]
rahul_j has joined #ruby-lang
Shazaum has quit [Quit: This computer has gone to sleep]
rbowlby has quit [Remote host closed the connection]
duderonomy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yusuf has quit [Quit: Leaving.]
kyb3r_ has quit [Quit: Leaving]
matsutomo has quit [Quit: matsutomo]
duderonomy has joined #ruby-lang
matsutomo has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
Manorie_x has joined #ruby-lang
rahul_j has quit [Read error: Connection reset by peer]
midhir has quit [Remote host closed the connection]
rahul_j has joined #ruby-lang
midhir has joined #ruby-lang
ldnunes has joined #ruby-lang
gjaldon has joined #ruby-lang
midhir_ has joined #ruby-lang
midhir has quit [Read error: Connection reset by peer]
midhir has joined #ruby-lang
rahul_j has quit [Read error: Connection reset by peer]
rahul_j has joined #ruby-lang
Manorie_x has quit [Quit: Be back later ...]
Manorie_x has joined #ruby-lang
Shazaum has joined #ruby-lang
Shazaum has quit [Remote host closed the connection]
haraoka_ has quit [Ping timeout: 260 seconds]
rahul_j has quit [Read error: Connection reset by peer]
qba73_ has joined #ruby-lang
rahul_j has joined #ruby-lang
qba73 has quit [Ping timeout: 255 seconds]
rahul_j has quit [Read error: Connection reset by peer]
rahul_j has joined #ruby-lang
matsutomo has quit [Quit: matsutomo]
Missphoenix has joined #ruby-lang
qba73 has joined #ruby-lang
yfeldblu_ has quit [Ping timeout: 255 seconds]
qba73 has quit [Remote host closed the connection]
jamooo has quit [Ping timeout: 250 seconds]
zlogan has joined #ruby-lang
jamooo has joined #ruby-lang
Miphix has quit [Ping timeout: 250 seconds]
qba73_ has quit [Ping timeout: 244 seconds]
yfeldblum has joined #ruby-lang
Campbell` has quit []
q_leonetti has quit [Quit: q_leonetti]
postmodern has quit [Quit: Leaving]
jkad1 has joined #ruby-lang
yfeldblum has quit [Ping timeout: 256 seconds]
yfeldblum has joined #ruby-lang
bmichelsen has quit [Quit: ZZZzzz…]
ta has quit [Remote host closed the connection]
duderonomy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gjaldon has quit [Remote host closed the connection]
emmesswhy has quit [Read error: Connection reset by peer]
ta has joined #ruby-lang
duderonomy has joined #ruby-lang
charliesome has quit [Read error: Connection reset by peer]
charliesome has joined #ruby-lang
nofxx has quit [Ping timeout: 252 seconds]
Shazaum has joined #ruby-lang
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
amsha has joined #ruby-lang
jxie has quit [Ping timeout: 245 seconds]
godd2 has joined #ruby-lang
q_leonetti has joined #ruby-lang
jxie has joined #ruby-lang
zlogan has quit [Remote host closed the connection]
amsha has quit [Ping timeout: 272 seconds]
fclausen has joined #ruby-lang
jxie has quit [Ping timeout: 250 seconds]
skade has quit [Quit: Computer has gone to sleep.]
gjaldon has joined #ruby-lang
GBrawl has quit [Quit: (null)]
shuriu has quit [Remote host closed the connection]
fclausen has quit [Ping timeout: 272 seconds]
st0mar has joined #ruby-lang
jxie has joined #ruby-lang
shuriu has joined #ruby-lang
robbyoconnor has quit [Quit: Konversation terminated!]
gjaldon has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 264 seconds]
caseydriscoll has joined #ruby-lang
bmichelsen has joined #ruby-lang
GBrawl has joined #ruby-lang
gjaldon has joined #ruby-lang
shuriu has quit [Remote host closed the connection]
kurko__ has joined #ruby-lang
st0mar has quit [Ping timeout: 256 seconds]
shuriu has joined #ruby-lang
VictorBjelkholm has joined #ruby-lang
st0mar has joined #ruby-lang
kurko___ has joined #ruby-lang
cih has joined #ruby-lang
skade has joined #ruby-lang
caseydriscoll has quit [Remote host closed the connection]
kurko__ has quit [Ping timeout: 245 seconds]
chills42 has joined #ruby-lang
chills42 has quit [Remote host closed the connection]
chills42 has joined #ruby-lang
Forgetful_Lion has quit [Remote host closed the connection]
shuriu has quit [Read error: Connection reset by peer]
GBrawl has joined #ruby-lang
JokerDoom has joined #ruby-lang
_JokerDoom has quit [Ping timeout: 265 seconds]
VictorBjelkholm has quit [Read error: Connection reset by peer]
sarkyniin has joined #ruby-lang
elia has joined #ruby-lang
caseydriscoll has joined #ruby-lang
Hazim has joined #ruby-lang
<Hazim>
hi
yfeldblum has joined #ruby-lang
<Hazim>
can someone help
chinmay_dd has quit [Ping timeout: 240 seconds]
<yorickpeterse>
Hazim: with?
Sadin has joined #ruby-lang
vsorlov has joined #ruby-lang
yfeldblum has quit [Ping timeout: 240 seconds]
<Hazim>
actually rails, is it valid to ask here?
<Hazim>
tried to join channel ROR but was invite only
vsorlov has quit [Client Quit]
<waxjar>
you need to register your nick with nickserv to join #rubyonrails
GBrawl has quit [Quit: (null)]
chinmay_dd has joined #ruby-lang
<Hazim>
ah ic
<Hazim>
anyways, may i ask it here anyway?
sarkyniin has quit [Ping timeout: 245 seconds]
AKASkip has quit [Ping timeout: 256 seconds]
havenwood has quit [Remote host closed the connection]
st0mar has joined #ruby-lang
gjaldon has quit [Remote host closed the connection]
sarkyniin has joined #ruby-lang
<ljarvis>
Hazim: what is it?
nofxx has quit [Ping timeout: 244 seconds]
kurko__ has joined #ruby-lang
kurko___ has quit [Ping timeout: 244 seconds]
snoopybbt has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
oak has quit [Ping timeout: 258 seconds]
nofxx has joined #ruby-lang
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
kurko___ has joined #ruby-lang
skade has joined #ruby-lang
nofxx_ has joined #ruby-lang
nofxx has quit [Ping timeout: 264 seconds]
kurko__ has quit [Ping timeout: 240 seconds]
gjaldon has joined #ruby-lang
amsha has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Iskarlar has joined #ruby-lang
amsha has quit [Ping timeout: 256 seconds]
<yorickpeterse>
Draons?
<yorickpeterse>
FUCK
<yorickpeterse>
I FUCKED ITU P
<yorickpeterse>
...
* yorickpeterse
likes slapping people and randomly picks himself to slap
nofxx_ has quit [Read error: Connection reset by peer]
caseydriscoll has quit [Remote host closed the connection]
rcvalle has quit [Quit: rcvalle]
yfeldblum has joined #ruby-lang
cornerma1 has joined #ruby-lang
<ljarvis>
who's itu p?
nertzy has joined #ruby-lang
Missphoenix has quit [Quit: Leaving]
yfeldblum has quit [Ping timeout: 256 seconds]
cornerman has quit [Ping timeout: 256 seconds]
cornerma1 is now known as cornerman
chinmay_dd has quit [Ping timeout: 272 seconds]
Miphix has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
yalue has quit [Ping timeout: 245 seconds]
amsha has joined #ruby-lang
Andy__ has joined #ruby-lang
<yorickpeterse>
huehue
<Andy__>
(ignore this, just testing)
<yorickpeterse>
Andy__: No
<yorickpeterse>
don't tell me what to do
bmichelsen has quit [Quit: ZZZzzz…]
wprice has quit [Quit: wprice]
kurko__ has joined #ruby-lang
AmirolAhmad has joined #ruby-lang
nertzy has quit [Quit: This computer has gone to sleep]
caseydriscoll has joined #ruby-lang
kurko___ has quit [Ping timeout: 265 seconds]
bmichelsen has joined #ruby-lang
chinmay_dd has joined #ruby-lang
jgpawletko is now known as jgpawletko_away
houhoulis has joined #ruby-lang
arBmind has joined #ruby-lang
Andy__ has quit [Remote host closed the connection]
druznek has joined #ruby-lang
setanta has joined #ruby-lang
Andy___ has joined #ruby-lang
kurko___ has joined #ruby-lang
Andy___ has quit [Client Quit]
<jkad1>
whats the best ruby version manager for linux?
yfeldblum has joined #ruby-lang
<yorickpeterse>
jkad1: chruby/ruby-install
kurko__ has quit [Ping timeout: 272 seconds]
<jkad1>
yorickpeterse: cheers i will give it a try
enebo has joined #ruby-lang
yfeldblum has quit [Ping timeout: 265 seconds]
workmad3 has quit [Quit: Lost terminal]
imperator has joined #ruby-lang
<maloik>
in a string containing two certificate files delimited by ----BEGIN... and ---END CERT---, how would you split those files into two not knowing their length?
<yorickpeterse>
'....'.split('----BEGIN') ?
<maloik>
that removes the delimiters, should've mentioned that... I need to keep them for obvious reasons :)
<maloik>
I was trying with something along the lines of inter_cert.scan(/(?:.*\n)*-----END CERTIFICATE-----/) but this doesnt seem to work
stamina has joined #ruby-lang
<maloik>
I could find the index for that string, or split and then readd the strings but those all feel horrible for obvious reasons
malconis has joined #ruby-lang
<darix>
maloik: how about just parsing it with openssl?
<darix>
the file i mean
<darix>
it should return you the list of certs afterwards no?
<maloik>
I don't think it works with chains like that, but let me have a look
workmad3 has joined #ruby-lang
<maloik>
it seems to remove one of them
<maloik>
I guess I could gsub for the second easily then
<waxjar>
StringScanner#scan_until would work, i guess
malconis has quit [Remote host closed the connection]
<darix>
maloik: I am just tinkering with OpenSSL::X509::Store
st0mar has quit [Ping timeout: 244 seconds]
<darix>
which seems to be used for handling chains/ca lists
<darix>
maloik: what is the higher level problem you work on?
druznek has quit [Quit: Leaving]
<maloik>
you mean what the app containing this code does?
druznek has joined #ruby-lang
<darix>
yes
mattyohe has joined #ruby-lang
kurko__ has joined #ruby-lang
<maloik>
it's the control panel for our hosting (we're a webhosting company)
<maloik>
a front-end and api for our Chef setup
kurko___ has quit [Ping timeout: 250 seconds]
malconis has joined #ruby-lang
<darix>
so you want to load the chain file to offer some ssl encrypted port in your app server?
lapide_viridi has joined #ruby-lang
[spoiler] has quit [Quit: Leaving]
<maloik>
not at all, we order ssl certificates through the app but sometimes our customers want to insert their own
kiyote23 has joined #ruby-lang
<maloik>
it turns out our validations broke because one had a double intermediate
midhir_ has quit [Remote host closed the connection]
kiyote23 has quit [Remote host closed the connection]
midhir_ has joined #ruby-lang
marr has quit [Ping timeout: 255 seconds]
rahul_j has joined #ruby-lang
momomomomo has joined #ruby-lang
deryl has joined #ruby-lang
j2p2 has joined #ruby-lang
midhir_ has quit [Ping timeout: 245 seconds]
oleo has joined #ruby-lang
<darix>
maloik: there are actually loop in the CA tree :))
<darix>
maloik: some CAs cross signed each other :)
<maloik>
ah that's not the problem though
<workmad3>
darix: that's not normally a problem because when verifying you follow the chain back until you find a trusted certificate
<darix>
workmad3: see the bug:)
<darix>
workmad3: even openssl fails ;)
<workmad3>
darix: although I could see that if you didn't trust either cert, you could end up in an annoying loop
<workmad3>
darix: but that's fairly easy to spot :P
<maloik>
well none of that matters, I just need to verify these certificate files against eachother
<darix>
workmad3: if you pass openssl a cert store which has both CAs in it and openssl tries to build up the chain file for you to send to the user, it will loop and loop and loop ;)
<workmad3>
darix: heh
<workmad3>
darix: I'm not in the habit of including roots in my chains ;)
<darix>
cycles in the CA tree are just stupid
<darix>
imagine digicert would have been cross signed with other CAs
houhoulis has quit [Remote host closed the connection]
shinnya has joined #ruby-lang
midhir_ has joined #ruby-lang
<darix>
workmad3: but it isnt the root! it is just the cert that signed one of the intermediates!;)
<darix>
the cross sign is at the subCAs :)
<darix>
so
<workmad3>
darix: ah, that's weird :)
<darix>
the bug explains it quite well
<workmad3>
darix: so one CA signed a sub-cert for another CA with their sub-cert... and vice-versa?
<darix>
just see the bug
rahul_j has quit [Read error: Connection reset by peer]
centrx has joined #ruby-lang
rahul_j has joined #ruby-lang
shuriu_ has quit [Remote host closed the connection]
klmlfl has quit [Remote host closed the connection]
cih has quit [Remote host closed the connection]
arBmind has quit [Quit: Leaving.]
shuriu has quit [Remote host closed the connection]
shuriu has joined #ruby-lang
lapide_viridi has joined #ruby-lang
RobertBirnie has quit [Ping timeout: 258 seconds]
cih has joined #ruby-lang
yfeldblum has joined #ruby-lang
amsi has joined #ruby-lang
|jemc| has joined #ruby-lang
yfeldblum has quit [Ping timeout: 245 seconds]
ta has joined #ruby-lang
loincloth has quit [Ping timeout: 244 seconds]
hahuang65 has joined #ruby-lang
ta has quit [Ping timeout: 264 seconds]
RobertBirnie has joined #ruby-lang
bradland has joined #ruby-lang
cih has quit [Remote host closed the connection]
kinseapo has quit [K-Lined]
senor_jalapeno has joined #ruby-lang
loincloth has joined #ruby-lang
netchaos has joined #ruby-lang
shuriu has quit [Remote host closed the connection]
snoopybbt has joined #ruby-lang
x-light has joined #ruby-lang
chills42 has quit [Read error: Connection reset by peer]
chills42 has joined #ruby-lang
kurko___ has joined #ruby-lang
klmlfl has joined #ruby-lang
kurko__ has quit [Ping timeout: 265 seconds]
solars has quit [Ping timeout: 265 seconds]
bears has joined #ruby-lang
Mothore has quit [Quit: Be back later ...]
<bradland>
let’s say i have a script, and within that script, i want to use some unicode box drawing characters
shazaum_ has quit [Quit: This computer has gone to sleep]
<bradland>
what’s the best way to ensure that $stdout is UTF-8?
<bradland>
not even sure if i’m posing that question correctly.
<xybre>
STDOUT doesn't have an encoding
<xybre>
Your terminal might though
<apeiros_>
o0
<apeiros_>
of course it has
<apeiros_>
all IOs have
<xybre>
The IO object does, but the system stdout doesn't.
<apeiros_>
$stdout is an IO
cih has joined #ruby-lang
<apeiros_>
and whether ruby performs conversions when writing to stdout depends on that
<bradland>
i think i see what xybre is saying. i can set the encoding on the IO object all day, but if my terminal is set to LATIN-1, i still get garbage
<xybre>
Eh, that's fair.
<apeiros_>
but as you say, of course the encoding of the displaying device (terminal emulation usually) is at least as important
<xybre>
But yeah I was refering to the fact that the most problems I've had with encoding have been terminal related, rather than IO related.
<xybre>
(with *displaying* encodings)
<bradland>
so, i’m digging around in IO, and I understand how to set my string encoding, but what classes should i be looking at for introspection in to my environment?
<bradland>
like $stdout.tty?
<bradland>
for example, tells me if $stdout is a tty
<apeiros_>
I fear there's no good way to determine which encoding the terminal uses
<apeiros_>
ENV["LANG"] might be an indicator
GBrawl has joined #ruby-lang
<bradland>
en_US.UTF-8
<bradland>
that looks promising
GBrawl has quit [Client Quit]
GBrawl has joined #ruby-lang
<bradland>
good call apeiros, looks like that reflects my terminal encoding on OS X
bears has quit [Remote host closed the connection]
GBrawl has quit [Client Quit]
<xybre>
The terminal might use the system locale.
<xybre>
Which can be dumped with the `locale` command.
<bradland>
Terminal.app has a setting for “Set locale environment variables on startup”
<bradland>
which is on by default
<bradland>
so, i think i’m going to sniff ENV[‘LANG’]
<xybre>
But the terminal can also be set to ignore that, and on Linux at least, not all terminals have unicode support (and they usually don't change the locale to reflect any of that)
<imperator>
WIN32OLE.codepage :)
<xybre>
(for linux terms)
_fritchie has joined #ruby-lang
<bradland>
basically, this is a “nice to have” rendering feature, so I’m falling back to standard ASCII 7-bit characters to replace
<bradland>
so, anyone with a terminal that is all jived up is just going to get ASCII
<apeiros_>
bradland: note that having utf-8 on your device does not ensure being able to render the characters. font for those chars might be missing e.g.
bears_ has joined #ruby-lang
<bradland>
yeah, seeing some notes about that as well
<bradland>
“best effort” time
Torrieri has quit [Remote host closed the connection]
<apeiros_>
allow manual override
Sadin_ has joined #ruby-lang
kiyote23 has joined #ruby-lang
bears_ has quit [Remote host closed the connection]
ldnunes has quit [Quit: Leaving]
Sadin has quit [Ping timeout: 244 seconds]
StevenNunez has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
bears_ has joined #ruby-lang
StevenNunez has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
bears_ has quit [Remote host closed the connection]
charliesome has quit [Client Quit]
RbLeif has quit [Remote host closed the connection]
RbLeif has joined #ruby-lang
[H]unt3r has quit []
lapide_viridi has quit [Quit: Leaving]
kurko___ has joined #ruby-lang
solars has joined #ruby-lang
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kurko__ has quit [Ping timeout: 245 seconds]
crankharder has joined #ruby-lang
ta has joined #ruby-lang
JohnBat26 has joined #ruby-lang
JohnBat26 has quit [Client Quit]
JohnBat26 has joined #ruby-lang
dagda1 has joined #ruby-lang
apt-get_ has joined #ruby-lang
loincloth has quit [Remote host closed the connection]
ta has quit [Ping timeout: 260 seconds]
loincloth has joined #ruby-lang
rbowlby has quit [Remote host closed the connection]
Sadin_ is now known as Sadin
sarkyniin has quit [Ping timeout: 265 seconds]
postmodern has joined #ruby-lang
charliesome has joined #ruby-lang
_fritchie has quit [Remote host closed the connection]
setanta__ has joined #ruby-lang
_fritchie has joined #ruby-lang
rbowlby has joined #ruby-lang
fclausen has joined #ruby-lang
setanta has quit [Ping timeout: 265 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: zzz]
kurko__ has joined #ruby-lang
Sadin has quit []
bears has joined #ruby-lang
yfeldblum has joined #ruby-lang
fclausen has quit [Ping timeout: 272 seconds]
Berzserk has joined #ruby-lang
kurko___ has quit [Ping timeout: 264 seconds]
straydogstudio has quit [Quit: Leaving]
jordsmi has joined #ruby-lang
chills42 has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
bears has quit [Remote host closed the connection]
Guest70651 is now known as tekacs
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has quit [Ping timeout: 250 seconds]
<nofxx_>
Something else besides <=> and == I need to def in my class so array compare would work? [obj, obj] - [obj] => [obj]
<nofxx_>
same works with include? ary1.reject { |i| ary2.include?(i) }
<apeiros_>
Array#- uses #hash and #eql?
<nofxx_>
hum... eql, lemme try, thank you apeiros_
<apeiros_>
not eql. eql?
<nofxx_>
yup
<apeiros_>
and also not eql? alone. eql? and hash are a functional pair. they must be defined according to each other.
Shazaum has joined #ruby-lang
michaeldeol has joined #ruby-lang
<nofxx_>
def hash ? sorry.. not following
nathanstitt has quit [Quit: I growing sleepy]
aera_ has joined #ruby-lang
<aera_>
hey all
<aera_>
i got a litlle question,
<aera_>
i start with ruby 2 days ago
<aera_>
and what :: means
<aera_>
like var1::var2
<apeiros_>
nofxx_: Array#- uses a Hash internally. and Hash works by using #hash and #eql?. and yes, the # in those means "instance method".
<apeiros_>
aera_: constants can be namespaced. :: is the separator.
<apeiros_>
actually: modules/classes can be namespaced.
<nofxx_>
apeiros_, nice, it's working now.. didn't knew about this hash thing. It's like building a unique ID ?
<nofxx_>
prop.hash ... can me a compound for isntance? [prop1, prop2].hash
<apeiros_>
nofxx_: close. objects which are not eql? should have different #hash value. objects which are eql? must have the same #hash value.
<apeiros_>
#hash values are by definition not unique, due to being limited in size.
<st0mar>
Hi, rather new around here. Is there any difference between the #ruby and #ruby-lang channel?
sferik has joined #ruby-lang
<st0mar>
Like topics, traffic, whatever?
aera_ has quit [Ping timeout: 246 seconds]
<bradland>
there’s a #ruby channel!? i’m outta here!
<ljarvis>
st0mar: this is the "official" one, that's about it
<st0mar>
I rephrase: is there a reason that I shouldn't add a link to #ruby channel on ruby-lang.org?
<bradland>
well, i can’t see a good reason to have two ruby IRC channels
mistym_ is now known as mistym
<pipework>
Probably good that the decision isn't up to you then, huh? :D
<st0mar>
unless there is a difference on topics, audience, ... that's why I ask...
aera_ has joined #ruby-lang
<pipework>
I don't have a reason not to, but one is official iirc.
<aera_>
sorry if you write something before i dont see it
<aera_>
network error
<aera_>
:/
<aera_>
have you a link about that
<aera_>
?
<bradland>
aera_: the string :: is used to separate namespaces
<bradland>
so Foo::Bar is a module/class (Foo) that contains another module/class (Bar)
<ljarvis>
st0mar: yes, dont add two because that's even more confusing than it is now
<pipework>
:: is about namespacing and is typically used with constants.
<pipework>
The constant may point to a class, or any other object.
<aera_>
im learning nokogiri, and on a youtube video
<aera_>
the guy write that
<bradland>
he wrote literally var1::var2 ?
<aera_>
nokogiri::HTML(http.body_str)
<ljarvis>
HTML is a method
<ljarvis>
you could also use Nokogiri.HTML
Mon_Ouie has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
<ljarvis>
they're the same thing
<ljarvis>
that's not namespacing
<bradland>
class methods are prefixed with ::, while instance methods are prefixed with #
<bradland>
so Class::my_method means that my_method is a class method
<aera_>
nokogiri.HTML() is the same than nokogiri::HTML() ???
<bradland>
Class#my_method means that my_method is an instance method
<apeiros_>
aera_: note that case matters in programming. code is pedantic. nokogiri != Nokogiri
malconis has joined #ruby-lang
<aera_>
yep sorry Nokogiri,
<apeiros_>
and yes, sadly methods can also be invoked with :: instead of .
<aera_>
ok thx all
<apeiros_>
and methods can start with an uppercase letter
<aera_>
i'm gonna try it
<apeiros_>
so that can be confusing.
<aera_>
i learned ruby 3days ago, finished codeacademy.com/ruby yesterday night
<apeiros_>
note that methods invoked with :: and starting with an uppercase letter *must* be unambiguously a method otherwise. e.g. either by getting an argument passed or by parens
bantic has joined #ruby-lang
<apeiros_>
this is IMO quite an edge case of the syntax and you'll probably rarely see it. most code uses . for method invocation.
<pipework>
I like it because it makes for some nice interfaces.
<pipework>
No need for #new or some unseemly method call.
<apeiros_>
you can have those interfaces with .
<apeiros_>
and you get less confused people with it too
<pipework>
I don't get confused by it though. :(
<apeiros_>
me neither. but I see it happening often enough.
<aera_>
yep, i code in C before
<pipework>
Sure there's some ambiguity about what SomeNamespace::Something actuall is, whether it's a constant or a method dispatch.
<apeiros_>
no
<aera_>
and ruby have soooo many thing to say the same thing
<apeiros_>
Foo::Foo is always a constant
<apeiros_>
Foo::Foo() is always a method
<apeiros_>
`Foo::Foo arg` is always a method
<ljarvis>
:)
<bradland>
some people call it insane, we call it “expressive"
kurko___ has joined #ruby-lang
<apeiros_>
proof:
<ljarvis>
aera_: to make it a bit more confusing, ruby has builtin methods for some core classes, i.e try Integer()
<bradland>
pipework: i won’t have to trample on my elitism :P
<bradland>
doh
<bradland>
i won’t have *you*
<bradland>
st0mar: in terms of IRC etiquette, channels related to programming languages are frequently suffixed with ‘-lang’ as to disambiguate them with topics related to whatever the canonical usage of the languages namesake may be.
<bradland>
so, for example, using #ruby-lang theoretically leaves #ruby free for someone who might be in to actual ruby gemstones.
<bradland>
that ship appears to have sailed though
<pipework>
No it doesn't.
<bradland>
that ship doesn’t sail?
<pipework>
Freenode imposes namespaces, so it'd require an actual open source project.
<bradland>
ah
<bradland>
Freenode, yes
<pipework>
If you were interested in the gemstones, you'd have to use ##ruby
<bradland>
Freenode is not “IRC” though
<apeiros_>
no, ##ruby is owned by cek
<apeiros_>
I love the topic of the channel
|jemc| has joined #ruby-lang
<bradland>
yikes
<bradland>
the “Docs” link in that channel leads to some scamware site
Mothore has quit [Quit: Be back later ...]
ta has joined #ruby-lang
<womble>
Classy.
Mothore has joined #ruby-lang
apt-get_ has quit [Remote host closed the connection]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AKASkip has quit [Ping timeout: 245 seconds]
bam73 has joined #ruby-lang
bam73 has quit [Client Quit]
Shazaum has quit [Quit: This computer has gone to sleep]
kurko___ has quit [Read error: Connection reset by peer]
kurko__ has joined #ruby-lang
<apeiros_>
bradland: lol. I didn't even check that out.
<apeiros_>
wonder whether that'd be a reason to get it closed by freenode staff.
<bradland>
you should, because apparently your computer is infected!
nathanstitt has joined #ruby-lang
malconis has joined #ruby-lang
Shazaum has joined #ruby-lang
bodgix has joined #ruby-lang
svajone has quit [Read error: Connection reset by peer]
svajone has joined #ruby-lang
svajone has quit [Read error: Connection reset by peer]
svajone has joined #ruby-lang
svajone has quit [Read error: Connection reset by peer]
svajone has joined #ruby-lang
svajone has quit [Read error: Connection reset by peer]
svajone has joined #ruby-lang
Guest55 has joined #ruby-lang
cschneid has quit [Ping timeout: 258 seconds]
mjc_ has quit [Ping timeout: 258 seconds]
mistym has quit [Quit: Leaving...]
aera_ has quit [Ping timeout: 246 seconds]
akahn has quit [Ping timeout: 258 seconds]
mjc_ has joined #ruby-lang
nifoc has quit [Ping timeout: 258 seconds]
akahn has joined #ruby-lang
GBrawl has quit [Quit: (null)]
shambrarian_ has joined #ruby-lang
cschneid has joined #ruby-lang
shambrarian has quit [Ping timeout: 258 seconds]
bears_ has joined #ruby-lang
GBrawl has joined #ruby-lang
nifoc has joined #ruby-lang
bears_ has quit [Remote host closed the connection]
hal_9000_ has joined #ruby-lang
<hal_9000_>
I’m trying to do a simple hello-world with drb — but i’m getting the dreaded “[BUG] segfault
<hal_9000_>
— anyone seen that lately?
x-light has quit [Remote host closed the connection]