mdedetrich has quit [Quit: Computer has gone to sleep.]
tbuehlmann has joined #ruby-lang
scmx has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
richardburton has quit [Ping timeout: 256 seconds]
richardburton1 has joined #ruby-lang
fn_great has quit [Quit: Leaving]
mdedetrich has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
Domon has quit [Remote host closed the connection]
Domon has joined #ruby-lang
Domon has quit [Read error: Connection reset by peer]
tonni has joined #ruby-lang
Domon has joined #ruby-lang
dc5ala has joined #ruby-lang
dhruvasagar has joined #ruby-lang
ruby-lang569 has joined #ruby-lang
havenwood has joined #ruby-lang
ruby-lang569 has quit [Client Quit]
stepan_ has joined #ruby-lang
stepan_ has left #ruby-lang [#ruby-lang]
mistym has quit [Remote host closed the connection]
stepanpar has joined #ruby-lang
havenwood has quit [Ping timeout: 264 seconds]
sr78ger has joined #ruby-lang
roadt has joined #ruby-lang
io_syl has joined #ruby-lang
<stepanpar>
Hi guys, is anyone avail for about an hour of ruby tutoring on skype today? I'm a noob who's about to do a challenge on my understanding of loops, arrays, hashes etc. Would love to have someone to bounce ideas off of
dkam has quit [Quit: dkam]
mdedetrich has quit [Quit: Computer has gone to sleep.]
mdedetrich has joined #ruby-lang
apeiros has joined #ruby-lang
io_syl has quit [Quit: io_syl]
julweber has joined #ruby-lang
solars has joined #ruby-lang
julweber has quit [Remote host closed the connection]
ledestin has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
stepanpar has quit [Quit: Page closed]
relix_ has joined #ruby-lang
relix has quit [Read error: Connection reset by peer]
Johz has joined #ruby-lang
spaceolive has joined #ruby-lang
jxie has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
Domon has quit [Remote host closed the connection]
Domon has joined #ruby-lang
Domon_ has joined #ruby-lang
Domon has quit [Read error: Connection reset by peer]
iliketur_ has quit [Quit: zzzzz…..]
Plyturon has joined #ruby-lang
dkam has joined #ruby-lang
dkam has quit [Client Quit]
<spaceolive>
Hi there, I would like to get the content of a function. I have defined it, now I want to print it, like quine program. Here is a pastie to give an example : http://pastie.org/8293588
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
jiuweigui has joined #ruby-lang
<spaceolive>
maloik: I really thank you, that's what i need :-)
workmad3 has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
antulik-afk is now known as antulik
arBmind has joined #ruby-lang
mbj has joined #ruby-lang
benlovell has joined #ruby-lang
antulik is now known as antulik-afk
dc5ala has quit [Quit: Ex-Chat]
tonni has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
dkam has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Plyturon has quit [Ping timeout: 264 seconds]
sedrickcz has joined #ruby-lang
Ch00k has joined #ruby-lang
JohnBat26 has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
<yorickpeterse>
whitequark: ping
ledestin has quit [Ping timeout: 240 seconds]
ledestin has joined #ruby-lang
postmodern has quit [Quit: Leaving]
tonni_ has joined #ruby-lang
jonahR has quit [Quit: jonahR]
<erikh>
yorickpeterse: dong
<yorickpeterse>
hurrr
SteveBenner9 has joined #ruby-lang
julweber has joined #ruby-lang
ledestin has quit [Ping timeout: 264 seconds]
elia has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
ledestin has joined #ruby-lang
mbj has quit [Ping timeout: 240 seconds]
spaceolive has left #ruby-lang [#ruby-lang]
dhruvasagar has quit [Read error: Connection reset by peer]
scholar01 has joined #ruby-lang
scholar01 has quit [Changing host]
scholar01 has joined #ruby-lang
dhruvasagar has joined #ruby-lang
Forgetful_Lion has joined #ruby-lang
mdedetrich has quit [Quit: Computer has gone to sleep.]
postmodern has joined #ruby-lang
thillux has joined #ruby-lang
mbj has joined #ruby-lang
mdedetrich has joined #ruby-lang
adambeynon has joined #ruby-lang
corundum has quit [Remote host closed the connection]
corundum has joined #ruby-lang
jsullivandigs has joined #ruby-lang
iIlL10Oo has quit [Quit: Lost terminal]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 264 seconds]
mdedetrich has quit [Quit: Computer has gone to sleep.]
mdedetrich has joined #ruby-lang
skmp has quit [Quit: Leaving.]
dhruvasagar has quit [Read error: Connection reset by peer]
tfentonz has joined #ruby-lang
dhruvasagar has joined #ruby-lang
tfentonz has quit [Remote host closed the connection]
dkam has quit [Quit: dkam]
julweber_ has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
richardburton1 has quit [Quit: Leaving.]
julweber has quit [Ping timeout: 264 seconds]
Cakey has quit [Ping timeout: 245 seconds]
jxie has quit [Quit: leaving]
<yorickpeterse>
heh, surprisingly hard to find an interpreted language with manual memory management
MaddinXx_ has joined #ruby-lang
matti has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
kstuart has quit [Quit: kstuart]
<erikh>
uh
dhruvasagar has quit [Read error: Connection reset by peer]
dkam has joined #ruby-lang
dhruvasagar has joined #ruby-lang
<rue|w>
Buh
charliesome has joined #ruby-lang
Criztian has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
kstuart has joined #ruby-lang
<erikh>
what whu whu
Criztian has joined #ruby-lang
<erikh>
but yeah, "buh" is probably appropriate
<erikh>
yorickpeterse: x86 assembler
<erikh>
let me know when you get it
dhruvasagar has quit [Read error: Connection reset by peer]
<yorickpeterse>
erikh: hhe
<yorickpeterse>
* heh
dhruvasagar has joined #ruby-lang
stonerfish has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Read error: Connection reset by peer]
arBmind1 has joined #ruby-lang
arBmind has quit [Read error: Operation timed out]
dhruvasagar has joined #ruby-lang
dkam has quit [Quit: dkam]
tfentonz has joined #ruby-lang
relix_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Plyturon has joined #ruby-lang
relix has joined #ruby-lang
ngr has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
tfentonz has quit [Remote host closed the connection]
skmp has joined #ruby-lang
nirix has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
dkam has joined #ruby-lang
<gnufied>
lets I have "1000" in little endian (gotten via unpack). how do I convert this to integer of base 10 ?
<gnufied>
"1000" is binary represenation
<gnufied>
to_s assumes MSB
gja has quit [Ping timeout: 245 seconds]
<gnufied>
I can use unpack again admittedly
sreffotsirk has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
face has joined #ruby-lang
poga has quit [Remote host closed the connection]
poga has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 245 seconds]
<erikh>
str.reverse.to_i(2)
<ljarvis>
\o/
<gnufied>
lol
<erikh>
but fwiw
<erikh>
there are pack formats for both little/big endian
<erikh>
you could ... probably fudge it
<erikh>
that way
<ljarvis>
mm fudge
<erikh>
damn straight
<gnufied>
I know. the problem is - string was made using little endian, so I can't really use big endian (B*) extractor
<ljarvis>
FudgeFactory
<gnufied>
using that will give completely incorrect result
<erikh>
FudgePacker
<ljarvis>
FudgePackingFactory
<erikh>
AbstractFudgePackFactoryManager
<ljarvis>
you iwn
<ljarvis>
win
<erikh>
gnufied: unless you're doing something that should not use strings in the first place, the first solution I gave you should work great.
ledestin has quit [Quit: ledestin]
<erikh>
e.g., doing something that needs to be fast.
<gnufied>
I am extracting integers from mac address which was made by combining various integers in first place. the number of bits picked from those integers aren't of word size
<gnufied>
for example, 3 bits from integer x and 5 from integer y , so on and so forth
<erikh>
are you trying to generate UUIDs?
<gnufied>
No.
<erikh>
or.. what's the point I guess?
<erikh>
curious now
mdedetrich has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
<gnufied>
without giving away too much, my work wants me to generate mac address of virtual machines in such a way that, routing can be optimized to the server when request is received
<erikh>
ah ok
<rue|w>
Hahaa! I have deduced your secret
dhruvasagar has joined #ruby-lang
<rue|w>
You gave away TOO MUCH
<gnufied>
:-)
<rue|w>
*disappears in a puff of smoke*
<erikh>
call the trade secret police
MaddinXx_ has quit [Remote host closed the connection]
<gnufied>
bunch of network routing optimization hocus pocus
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tbuehlmann has quit [Ping timeout: 250 seconds]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
Ch00k has quit [Read error: Connection reset by peer]
Ch00k has joined #ruby-lang
soba has quit [Ping timeout: 245 seconds]
Forgetful_Lion has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
SteveBenner9 has quit [Quit: Leaving]
joshuairl has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
MaddinXx_ has joined #ruby-lang
julweber_ has quit [Remote host closed the connection]
julweber has joined #ruby-lang
pskosinski has joined #ruby-lang
corundum has quit [Remote host closed the connection]
corundum has joined #ruby-lang
corundum has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
corundum has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
poga_ has joined #ruby-lang
poga has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby-lang
benlovell has quit [Ping timeout: 260 seconds]
Domon_ has quit [Remote host closed the connection]
jperry has quit [Remote host closed the connection]
jperry has joined #ruby-lang
jsullivandigs has joined #ruby-lang
benlovell has quit [Ping timeout: 240 seconds]
julweber_ has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 245 seconds]
julweber has quit [Ping timeout: 245 seconds]
Criztian has quit [Remote host closed the connection]
GeissT has quit [Ping timeout: 245 seconds]
adambeynon has joined #ruby-lang
hhatch has quit [Read error: Connection reset by peer]
hhatch has joined #ruby-lang
bantic has joined #ruby-lang
tRAS has quit [Quit: Mother, did it need to be so high?]
roelof has joined #ruby-lang
joshuawscott has joined #ruby-lang
umgrossco has joined #ruby-lang
nathanstitt has joined #ruby-lang
<roelof>
Can someone help[ me with this problem :http://www.workingwithrails.com/forums/ask-a-rails-expert/1000037-ruby-problem
nathanstitt has quit [Ping timeout: 245 seconds]
Uranio has quit [Quit: while you reading this, a kitty dies]
<maloik>
roelof: looks like your code pasting got a bit messed up, try adding some additional tabs in front of each line of code
<maloik>
makes it a lot easier to read
<maloik>
although in general when asking in here, using a gist is much appreciated
tkuchiki has joined #ruby-lang
<workmad3>
roelof: it's also very appreciated if you can avoid munging a : onto the front of your URL so I can cmd-click on it in my IRC client and open the link :)
<maloik>
<3 irssi
<darix>
a good tool to appreciate
vlad_starkov has joined #ruby-lang
<workmad3>
maloik: well, the cmd-click is really part of iterm, but yeah :)
<maloik>
first mistake is a missing closing bracket
<maloik>
in the leap year check
<roelof>
oke , I will change that
<maloik>
what else is wrong ?
<roelof>
so it must be if ((year1 % 4 == 0) and (year1 %100 !=0) and (year1%400 == 0)) ?
<maloik>
correct
<roelof>
oke, I will try it and hope the programm will have now a good output ?
bungoman has joined #ruby-lang
ldnunes has joined #ruby-lang
<roelof>
maloik: thanks for the help
<roelof>
byeee
sush24 has joined #ruby-lang
MaddinXx has joined #ruby-lang
skade has joined #ruby-lang
<maloik>
roelof: I left a comment on the gist
fedesilva has joined #ruby-lang
<roelof>
thanks again
roelof has quit [Quit: Page closed]
charliesome has joined #ruby-lang
bfleischer has quit [Read error: Operation timed out]
rwilcox has joined #ruby-lang
MartynKeigher has quit [Excess Flood]
roelof has joined #ruby-lang
MartynKeigher has joined #ruby-lang
<roelof>
maloik : I changed the rule to this : if ((year1 % 4 == 0) and (year1 %100 !=0) and (year1%400 == 0)) but still no output. I read you .each but I do not think I can use it because this is later mentioned in the book
scholar01 has quit [Quit: Leaving.]
banisterfiend has quit [Quit: Computer has gone to sleep.]
malev has joined #ruby-lang
<maloik>
roelof: gist current version again please
<yorickpeterse>
whitequark: y u no parser 2.0 stable
<whitequark>
yorickpeterse: no docs
<whitequark>
it will be released when it's ready
<yorickpeterse>
get to it slacker :>
<whitequark>
meh I have to prepare foundry to the conf
<whitequark>
don't expect much work on that until 28th sep
sirupsen has quit [Quit: sirupsen]
Plyturon has joined #ruby-lang
fuhgeddaboudit has joined #ruby-lang
<maloik>
roelof: the last statement, % 400, is always true
sirupsen has joined #ruby-lang
<maloik>
well not always of course
<maloik>
but unless youre taking a really wide range of years
<maloik>
they're not a leap year afaik, so you want to add a ! in front of that
<workmad3>
maloik: they are ;)
<workmad3>
maloik: a century is a leap year if it's a multiple of 400
<maloik>
mistakes in the logic aside, I think this is what you need: (year1 % 4 == 0 and year1 % 100 !=0) or (year1 % 400 == 0)
skade has quit [Ping timeout: 245 seconds]
<workmad3>
tbh, what I'd do with that program is get year1 to the nearest multiple of 4
<whitequark>
let's just use TAI
<maloik>
workmad3: well considering the excercise he showed, I think it's best to keep it simple :-)
sirupsen has quit [Client Quit]
<whitequark>
ah, no, that still uses julian dates. meh.
<workmad3>
and then if !(year1 % 100).zero? || (year1 % 400).zero?
<whitequark>
or gregorian.
<maloik>
oh like that
skade has joined #ruby-lang
<workmad3>
whitequark: oh, good point... what do you with pre-gregorian dates that had a different leap-year calculation?
<workmad3>
maloik: yeah, basically get to a multiple of 4, then go up in 4s rather than += 1 each time :)
<whitequark>
workmad3: I have completely zero clue.
<workmad3>
whitequark: :D
<roelof>
maloik: always true no, when I have 1984 then 1984/400 = 4.96
<maloik>
roelof: the way you wrote it was like this: if <irrelevant stuff>... AS WELL AS a multiple of 400
<whitequark>
workmad3: The proleptic Julian calendar is produced by extending the Julian calendar backwards to dates preceding AD 4 when the quadrennial leap year stabilized. The leap years that were actually observed between the implementation of the Julian calendar in 45 BC and AD 4 were erratic: see the Julian calendar article for details.
<maloik>
a leap year doesnt have to be a multiple of 400
<whitequark>
in other words, sit down and cry
<roelof>
the esercise says this : Leap years are years divisible by four (like 1984 and 2004). However, years divisible by 100 are not leap years (such as 1800 and 1900) unless they are divisible by 400 (like 1600 and 2000,
<maloik>
roelof: look up the wikipedia article and check the 'algorithm' section
<workmad3>
whitequark: how about the year 1752? which was a leap year, but only had 355 days? :)
<maloik>
that should make it clear
<maloik>
your logic is just wrong :-)
<workmad3>
at least in the UK
<ljarvis>
ok I haven't read any of this but I've seen a lot of talk about leap years and math.. you know there's Date.leap? right?
fosky has quit [Remote host closed the connection]
<workmad3>
ljarvis: it's an exercise from a book meant to demonstrate loops and a bit of conditional logic
<ljarvis>
workmad3: ah, thanks!
<workmad3>
ljarvis: I'm just having fun with the annoying details of leap year edge cases :)
<maloik>
and I'm just spending way too much time with this when there's work to be done :D
mdedetrich has quit [Quit: Computer has gone to sleep.]
<ljarvis>
sure, I thought my comment might be in haste but alas, it does exist in case you want it or want to see how they do it
lfox has joined #ruby-lang
<maloik>
but it's all good, it's fun to give back every once in a while
<roelof>
oke, now make the Algorithm workable with and or and so on
joast has quit [Quit: Leaving.]
<workmad3>
ljarvis: I'd be interested to know if Date.leap? will work correctly on a computer in greece when asked about 1900 ;)
sirupsen has joined #ruby-lang
tRAS has joined #ruby-lang
<ljarvis>
whitequark: does rxr work when searching for the ruby name of a method?
skade has quit [Ping timeout: 260 seconds]
<ljarvis>
ah right nvm
vlad_starkov has quit [Remote host closed the connection]
<roelof>
hmmm, more difficulot as I thougt. I will try to make it work with if then elseif
<maloik>
Guys, question... for a conference 'voting' system that will determine the schedule, do you reckon a login (twitter/github oauth) is requried to prevent gaming the system?
<maloik>
I get the feeling no one is going to bother with that
<maloik>
(bother gaming it, that is)
<ljarvis>
meh I think ip blocking/cookies would be enough even if it's a loose check in comparison
Guest6294 has joined #ruby-lang
Ch00k has quit []
<maloik>
unless I can figure out to let each ip only vote on each combination once.... but that's still a lot of effort lol
drbrown has quit [Quit: ChatZilla 0.9.90.1 [Firefox 23.0/20130803192641]]
arBmind has joined #ruby-lang
iliketur_ has quit [Quit: zzzzz…..]
fenicks has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
iliketur_ has joined #ruby-lang
shinnya has quit [Ping timeout: 256 seconds]
richardburton has quit [Quit: Leaving.]
speakingcode-wor has quit [Read error: Connection reset by peer]
pskrz has joined #ruby-lang
hahuang65 has quit [Ping timeout: 245 seconds]
roadt has quit [Ping timeout: 245 seconds]
fcahoon has joined #ruby-lang
mentero has joined #ruby-lang
yfeldblum has quit [Ping timeout: 260 seconds]
jonahR has joined #ruby-lang
solars has joined #ruby-lang
deception has joined #ruby-lang
Ch00k has joined #ruby-lang
_jpb_ has joined #ruby-lang
joshuairl has joined #ruby-lang
siberia has quit [Quit: siberia]
_jpb_ has quit [Ping timeout: 256 seconds]
tharindu has joined #ruby-lang
sreffotsirk has quit [Remote host closed the connection]
iliketur_ has quit [Quit: zzzzz…..]
siberia has joined #ruby-lang
fedesilva has joined #ruby-lang
Uranio has joined #ruby-lang
iliketur_ has joined #ruby-lang
iliketur_ has quit [Client Quit]
agile has joined #ruby-lang
hahuang65 has joined #ruby-lang
rue has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
banister has joined #ruby-lang
agile has quit [Client Quit]
julweber has joined #ruby-lang
agile has joined #ruby-lang
arooni-mobile has quit [Remote host closed the connection]
shame has joined #ruby-lang
agile has quit [Client Quit]
shame has quit [Client Quit]
go|dfish has quit [Ping timeout: 240 seconds]
agile has joined #ruby-lang
marr has quit [Ping timeout: 260 seconds]
mbj has quit [Quit: leaving]
yfeldblum has joined #ruby-lang
julweber has quit [Remote host closed the connection]
benanne has joined #ruby-lang
richardburton has joined #ruby-lang
go|dfish has joined #ruby-lang
Nisstyre has joined #ruby-lang
deception has quit [Quit: Goodbye]
vlad_starkov has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
tylersmith has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
havenwood has joined #ruby-lang
tharindu has quit [Ping timeout: 276 seconds]
go|dfish has quit [Ping timeout: 245 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
go|dfish has joined #ruby-lang
iliketur_ has joined #ruby-lang
Cakey has quit [Ping timeout: 245 seconds]
antulik-afk has quit [Ping timeout: 245 seconds]
davemaurakis has quit [Remote host closed the connection]
davemaurakis has joined #ruby-lang
siberia has quit [Quit: siberia]
scmx has joined #ruby-lang
davemaurakis has quit [Read error: Connection reset by peer]
davemaurakis has joined #ruby-lang
saarinen has joined #ruby-lang
ikrima has quit [Ping timeout: 256 seconds]
deception has joined #ruby-lang
antulik-afk has joined #ruby-lang
nofxx has quit [Ping timeout: 256 seconds]
ikrima has joined #ruby-lang
Plyturon has quit [Ping timeout: 264 seconds]
lightcap has joined #ruby-lang
nofxx has joined #ruby-lang
benwoody has quit [Quit: benwoody]
benwoody has joined #ruby-lang
rickhull has joined #ruby-lang
sandbags has joined #ruby-lang
sandbags has joined #ruby-lang
relix has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
havenwood has joined #ruby-lang
jvrmaia has joined #ruby-lang
havenn has joined #ruby-lang
havenwood has quit [Read error: Connection reset by peer]
yalue has quit [Quit: Leaving]
bantic has quit [Quit: bantic]
siberia has joined #ruby-lang
mentero has quit [Quit: WeeChat 0.4.1]
postmodern has joined #ruby-lang
Nilium has quit [Ping timeout: 240 seconds]
benwoody has quit [Quit: benwoody]
jonahR has quit [Quit: jonahR]
benwoody has joined #ruby-lang
apeiros has joined #ruby-lang
thillux has quit [Quit: Leaving]
thillux has joined #ruby-lang
Nilium has joined #ruby-lang
Criztian has joined #ruby-lang
loincloth has joined #ruby-lang
tonni has joined #ruby-lang
jiuweigui has quit [Remote host closed the connection]
jiuweigui has joined #ruby-lang
<jtoy>
what is the other way to write $0 ? I always forget
<pothibo>
$! ?
<apeiros>
$0 == $PROGRAM_NAME
<jtoy>
ah yes, program_name
<pothibo>
oh
<apeiros>
also see Kernel#global_variables - gives you a nice list of all gvars
<jtoy>
i always like to use program_name as its clearer to others, but i can never remember it
<jtoy>
thx apeiros
<apeiros>
yes, definitively more self descriptive than $0
* apeiros
prefers it for the same reason
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ch00k has quit []
<joevandyk>
i have a function that yields an element one by one. is there a standard lib function that lets me group that output into groups of 10 or so?
<joevandyk>
lazily?
<joevandyk>
in 1.9?
<banister>
joevandyk each_slice
jvrmaia has quit [Remote host closed the connection]
fcahoon has quit [Quit: Leaving]
havenn is now known as havenwood
<joevandyk>
banister: doh
<joevandyk>
thanks
relix has joined #ruby-lang
bantic has joined #ruby-lang
tfentonz has joined #ruby-lang
bantic has quit [Client Quit]
sepp2k1 has joined #ruby-lang
sepp2k has quit [Ping timeout: 248 seconds]
tenderlove has joined #ruby-lang
umgrossco has quit [Quit: Nettalk6 - www.ntalk.de]
arBmind has quit [Quit: Leaving.]
Criztian has quit [Remote host closed the connection]
MaddinXx has quit [Remote host closed the connection]
breakingthings has quit []
solars has quit [Ping timeout: 248 seconds]
joshuairl has quit [Quit: joshuairl]
ldnunes has quit [Quit: Leaving]
ikrima has quit [Quit: Computer has gone to sleep.]
scmx has quit [Ping timeout: 260 seconds]
cads has joined #ruby-lang
sirupsen has quit [Quit: sirupsen]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
benwoody has quit [Quit: benwoody]
pskrz has quit [Quit: pskrz]
Uranio has quit [Ping timeout: 264 seconds]
brianpWins has joined #ruby-lang
yfeldblum has quit [Ping timeout: 264 seconds]
dabradley has quit [Quit: WeeChat 0.3.8]
sandbags has quit [Remote host closed the connection]
<brianpWins>
Does the FileUtils lib have anything for changing the created at/modified at dates of a file? I need to make something in the past.
<drbrain>
brianpWins: File does
<brianpWins>
drbrain: oh nice. I must have overlooked it. Will check the docs again.
volty has joined #ruby-lang
<drbrain>
brianpWins: File.utime
<eam>
brianpWins: there is no "created at" field for a file on unix
<brianpWins>
drbrain: Did exactly what I needed. Thanks!
<brianpWins>
eam: I didn't know. OSX shows me created/modified/last opened so I made a false assumption.
<drbrain>
brianpWins: oh, you can also set it with FileUtils, but it isn't properly documented
Xzyx987X_ has quit [Read error: Connection reset by peer]
<eam>
brianpWins: must be something osx specific
Xzyx987X_ has joined #ruby-lang
<drbrain>
eam: HFS+ says it stores created time
<drbrain>
… on Wikipedia
Xzyx987X_ has quit [Read error: Connection reset by peer]
<eam>
it looks like OSX breaks posix and turns ctime into "created time," at least on hfs+
<eam>
it won't update ctime when the inode changes
<eam>
interesting
davemaurakis has quit [Remote host closed the connection]
<erikh>
nobody ever breaks posix
<volty>
hi, ObjectPreviouslyDeleted when trying to return TagLib::Tag out of a block, cannot use neither clone (no allocator) // do I have to return it by other means - like creating a hash (or Tag-like class object of mine) ?
Xzyx987X_ has joined #ruby-lang
<erikh>
*snort* *chhhkkkktt*
<eam>
erikh: ;) though, that's going to be super annoying as this is also one of those common misunderstanding points
<eam>
... which is now true on osx
VTLob has quit [Quit: VTLob]
<erikh>
stat seems legit
<erikh>
so depends on your version of broken, really
<erikh>
unless I am (as I often do) misunderstanding something.
<eam>
erikh: ctime should update when the inode metadata changes
<erikh>
sure. is isn't doing that as well?
tenderlo_ has joined #ruby-lang
<eam>
doesn't seem to be, according to stat
<erikh>
hmm. maybe I missed something
<eam>
wait, I lied, "stat" doesn't display ctime on osx ...
<eam>
stat -x tells the truth
<eam>
so they added a 4th field
mdedetrich has joined #ruby-lang
<erikh>
man 2 stat seems to correlate ctime with status changes
<erikh>
the structs are laid out there in detail, and yeah, os x stat structs are different
<eam>
yeah, they just modified some of the utilities
ledestin has joined #ruby-lang
<eam>
sigh
<erikh>
was a bitch when I needed to do it with FFI
<erikh>
but linux is even worse
<erikh>
by a huuuuuuuge margin
<eam>
st_birthtime haha
<erikh>
glibc has like, 4 stat implementations all buried in more macros than mcdonald's has hamburgers
tenderlove has quit [Ping timeout: 264 seconds]
Gue______ has joined #ruby-lang
<chris2>
why would you care what glibc does :P
<erikh>
dat FFI
mbj has joined #ruby-lang
leekiernan has joined #ruby-lang
<erikh>
which unfortunately means unwinding macros
Gue______ has quit [Client Quit]
<chris2>
just do the syscall
Guest____ has joined #ruby-lang
<erikh>
the syscall is, iirc __xstat and the first parameter is an integer telling it which implementation to use
<chris2>
possible :)
<erikh>
and they all return different structs
<erikh>
I didn't mean unwind programmatically
fragamus has joined #ruby-lang
<erikh>
I meant by rtfs, which was plenty of work
<erikh>
just makes me grumpy.
fragamus has quit [Max SendQ exceeded]
<chris2>
just read a good libc next time ;)
tenderlove has joined #ruby-lang
yfeldblum has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
pskosinski has quit [Quit: Til rivido Idisti!]
tenderlo_ has quit [Ping timeout: 245 seconds]
<chris2>
xstat is i686 only it seems
leekiernan has left #ruby-lang [#ruby-lang]
lkiernan has joined #ruby-lang
<lkiernan>
can i package an executable ruby file with dependencies without creating a gem?
vlad_starkov has quit [Remote host closed the connection]
<drbrain>
lkiernan: yes, but nobody does that anymore
<drbrain>
look for setup.rb
<drbrain>
lkiernan: … wait, do you want to ship an application or a library?
<lkiernan>
it's just a one file executable, that requires a json parser
mbj has quit [Ping timeout: 264 seconds]
<lkiernan>
i can just make it a gem if it's easier for the recipient?
<drbrain>
lkiernan: if the recipient has ruby installed, a gem is the best way
<chris2>
isnt json in stdlib?
siberia has quit [Quit: siberia]
<lkiernan>
it requires oj and typhoeus to be exact
mbj has joined #ruby-lang
<drbrain>
I know of three different JSON parsing libraries in ruby
<drbrain>
four if you count psych
scholar01 has joined #ruby-lang
scholar01 has joined #ruby-lang
sluukkonen has quit [Ping timeout: 246 seconds]
tylersmith has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
sluukkonen has joined #ruby-lang
mbj has quit [Read error: Connection reset by peer]
saarinen has joined #ruby-lang
ikrima has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
LauraE has joined #ruby-lang
bungoman_ has joined #ruby-lang
bungoman has quit [Read error: Operation timed out]
scholar01 has quit [Quit: Leaving.]
sirupsen has joined #ruby-lang
bungoman_ has quit [Ping timeout: 260 seconds]
Cakey has joined #ruby-lang
retro|cz has quit [Ping timeout: 245 seconds]
bf4 has quit [Ping timeout: 260 seconds]
hhatch has quit [Ping timeout: 245 seconds]
Cakey has quit [Ping timeout: 260 seconds]
sirupsen has quit [Read error: No route to host]
kurko_ has quit [Ping timeout: 256 seconds]
sirupsen has joined #ruby-lang
kurko_ has joined #ruby-lang
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
Criztian has joined #ruby-lang
fedesilva has quit [Ping timeout: 276 seconds]
corundum has quit [Remote host closed the connection]