<zenspider>
so... potatoes with the spring onion. ok. so it IS specific
<zenspider>
but... not by much
<bnagy>
also known as Poundy!
<zenspider>
good time for it too... farmer's market just opened and spring onion are plentiful
caiofilipini has left #ruby-lang [#ruby-lang]
<zenspider>
ok... cool. thanks everyone
jasiek_ has left #ruby-lang [#ruby-lang]
jasiek has joined #ruby-lang
gsav has quit [Ping timeout: 250 seconds]
apeiros_ has joined #ruby-lang
solars has quit [Ping timeout: 244 seconds]
tjadc has joined #ruby-lang
futurechimp has joined #ruby-lang
workmad3 has joined #ruby-lang
tjadc has quit [Read error: Connection reset by peer]
jarib_ has quit [Excess Flood]
jarib has joined #ruby-lang
tomb_ has quit [Quit: Computer has gone to sleep.]
seanstickle has quit [Quit: Nihil sub sole novum]
nibbo has quit [Ping timeout: 248 seconds]
<shevy>
ruby cuisine
<shevy>
red potatoes!!!
<bnagy>
compile from sauce
diegoviola has quit [Remote host closed the connection]
toretore has joined #ruby-lang
<shevy>
hehe
diegoviola has joined #ruby-lang
Natch| has quit [Ping timeout: 252 seconds]
Natch| has joined #ruby-lang
Natch| has quit [Excess Flood]
Natch| has joined #ruby-lang
Natch| has quit [Excess Flood]
Natch| has joined #ruby-lang
Natch| has quit [Excess Flood]
Natch| has joined #ruby-lang
Natch| has quit [Excess Flood]
Natch| has joined #ruby-lang
Natch| has quit [Excess Flood]
Natch| has joined #ruby-lang
Natch| has quit [Excess Flood]
dkannan has joined #ruby-lang
Natch| has joined #ruby-lang
Natch| has quit [Excess Flood]
solars has joined #ruby-lang
Natch| has joined #ruby-lang
Natch| has quit [Excess Flood]
Natch| has joined #ruby-lang
Natch| has quit [Excess Flood]
francisfish has quit [Remote host closed the connection]
Silex^^ has joined #ruby-lang
ramonmaruko1 has quit [Quit: Leaving.]
Natch| has joined #ruby-lang
Natch| has quit [Excess Flood]
Natch| has joined #ruby-lang
Natch| has quit [Excess Flood]
<Silex^^>
hi, if I have a server where ruby 1.8 and ruby 1.9 is installed and "ruby" points to ruby 1.9, how do I run "bundle" so it uses ruby 1.9 *just this time*
<Silex^^>
?
Natch| has joined #ruby-lang
Natch| has quit [Excess Flood]
<Silex^^>
err, "ruby" points to 1.8
<Silex^^>
otherwise tehre would be no question :)
nibbo has joined #ruby-lang
ramonmaruko has joined #ruby-lang
<andrewvos>
bundle exec
Natch| has joined #ruby-lang
Natch| has quit [Excess Flood]
<andrewvos>
oh wait
<andrewvos>
Silex^^: if it is ubuntu then remove the older version
<andrewvos>
or use rvm
<andrewvos>
or something
<Silex^^>
the older version is in use
Natch| has joined #ruby-lang
Natch| has quit [Excess Flood]
<Silex^^>
I know how to configure passenger so it uses 1.8 for one app and 1.9 for another
<Silex^^>
I just don't know how to tell bundle to use 1.9
rue_XIV has left #ruby-lang [#ruby-lang]
<Silex^^>
to setup the 1.9 app
Natch has joined #ruby-lang
Natch has quit [Excess Flood]
rue has joined #ruby-lang
<rue>
Or ruby19 -S ?
Natch| has joined #ruby-lang
Natch| has quit [Excess Flood]
Natch| has joined #ruby-lang
Natch| has quit [Excess Flood]
<Silex^^>
rue: hum, I don't fully get your advice... -S seems only to trick ruby into looking into another directory for its scripts?
Natch| has joined #ruby-lang
Natch| has quit [Excess Flood]
<Silex^^>
can you give more details about how this would help run bundle with 1.9?
<rue>
look for the script using PATH environment variable
francisfish has joined #ruby-lang
Natch| has joined #ruby-lang
<Silex^^>
you mean temporarily modifying $(which bundle) ?
<Silex^^>
wait, is ruby -S a "permanent" for the shell's session setting?
<Silex^^>
anyway I don't see how bundle would invoke ruby 1.9 instead of 1.8. Both binaries are in /usr/bin, and bundle probably just calls "ruby"
<Silex^^>
maybe temporarily symlinking it to ruby1.9 could work tho
<rue>
That’s why you do ruby19 -S
<rue>
That Ruby finds the bundle script, and runs it
telemachus has quit [Ping timeout: 276 seconds]
<Silex^^>
ah, so something like "ruby19 -S -- $which(bundle) exec"
<Silex^^>
err, $(which bundle)
<Silex^^>
hum, thanks I'll try
telemachus has joined #ruby-lang
jxie_ has quit [Ping timeout: 265 seconds]
Skif has quit [Ping timeout: 240 seconds]
jxie has joined #ruby-lang
Skif has joined #ruby-lang
morozovm has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 245 seconds]
Banistergalaxy has joined #ruby-lang
postmodern has quit [Ping timeout: 240 seconds]
tekin has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
workmad3 has quit [Quit: Lost terminal]
nevynxxx has joined #ruby-lang
postmodern has joined #ruby-lang
<kke>
how do i downcase \\1 in gsub? gsub(/FOO(BAR)/, "POO#{"\\1".downcase}") atleast doesn't work
neoesque has quit [Quit: Bye!]
<bnagy>
kke: don't know :( It works with $1 though = "POO#{$1.downcase}"
tjadc has joined #ruby-lang
<kke>
yeah but that works only if you do gsub {...}
<rue>
Then just fail with a message if it don’t work. And/or maybe offer an env or command-line setting
soahccc` is now known as soahccc
nevynxxx has quit [Ping timeout: 245 seconds]
nevynxxx has joined #ruby-lang
kyrylo has quit [Quit: WeeChat 0.3.7]
kyrylo has joined #ruby-lang
kyrylo has quit [Changing host]
kyrylo has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
tRAS has joined #ruby-lang
dhruvasagar has joined #ruby-lang
jbsan_ has joined #ruby-lang
solars has quit [Ping timeout: 250 seconds]
vmil86 has joined #ruby-lang
jbsan has quit [Ping timeout: 245 seconds]
jbsan_ is now known as jbsan
jperry2 has joined #ruby-lang
S2kx has joined #ruby-lang
S1kx has quit [Ping timeout: 244 seconds]
elux has joined #ruby-lang
tomzx has quit [Ping timeout: 246 seconds]
tubbo`work has quit [Quit: leaving]
sockmonk has joined #ruby-lang
tubbo has joined #ruby-lang
nevynxxx has quit [Ping timeout: 252 seconds]
seanstickle has quit [Quit: Nihil sub sole novum]
cantonic has joined #ruby-lang
dv310p3r has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 260 seconds]
dhruvasagar has joined #ruby-lang
kvirani has quit [Remote host closed the connection]
linus95014 has joined #ruby-lang
andrewhl has joined #ruby-lang
lopac1029 has joined #ruby-lang
ilya has joined #ruby-lang
nevynxxx has joined #ruby-lang
tRAS has quit [Ping timeout: 244 seconds]
dv310p3r has quit [Quit: Leaving]
ilya has left #ruby-lang ["Leaving"]
ryez has joined #ruby-lang
solars has joined #ruby-lang
codewrangler has joined #ruby-lang
nevynxxx has quit [Ping timeout: 246 seconds]
adambeynon has joined #ruby-lang
fromhet has quit [Quit: fromhet]
dhruvasagar has quit [Ping timeout: 240 seconds]
woollyams has joined #ruby-lang
pbjorklund has quit [Quit: leaving]
dhruvasagar has joined #ruby-lang
fromhet has joined #ruby-lang
nevynxxx has joined #ruby-lang
gouthamvel has joined #ruby-lang
slyphon has joined #ruby-lang
slyphon has quit [Signing in (slyphon)]
slyphon has joined #ruby-lang
solars has quit [Ping timeout: 252 seconds]
kvirani has joined #ruby-lang
pbjorklund has joined #ruby-lang
pbjorklund has quit [Client Quit]
pbjorklund has joined #ruby-lang
postmodern has quit [Quit: Leaving]
dhruvasagar has quit [Ping timeout: 245 seconds]
solars has joined #ruby-lang
jobicoppola has quit [Ping timeout: 256 seconds]
pbjorklund has quit [Ping timeout: 250 seconds]
Austin__ has joined #ruby-lang
solars has quit [Ping timeout: 245 seconds]
gix has quit [Quit: Client exiting]
gouthamvel has left #ruby-lang [#ruby-lang]
kain has quit [Quit: Sto andando via]
gsav has joined #ruby-lang
gix has joined #ruby-lang
tomb_ has quit [Quit: Computer has gone to sleep.]
Axsuul has quit [Ping timeout: 245 seconds]
outoftime has joined #ruby-lang
asahi has joined #ruby-lang
fromhet has quit [Quit: fromhet]
<shevy>
hmm let's say I have a module Foo; end. In another file, I have class Bar; end. Is it possible to somehow "put" class Bar into the module Foo namespace, at runtime?
dvorak has quit [Ping timeout: 245 seconds]
dv310p3r has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
futurechimp has quit [Ping timeout: 248 seconds]
fromhet has joined #ruby-lang
Axsuul has joined #ruby-lang
perryh is now known as perryh_away
futurechimp has joined #ruby-lang
markborcherding has joined #ruby-lang
tekin has quit [Quit: Computer has gone to sleep.]
dasibre has quit [Remote host closed the connection]
<shevy>
hmmmm
woollyams has quit [Quit: Computer has gone to sleep.]
pbjorklund has joined #ruby-lang
markborcherding has quit [Remote host closed the connection]
tomb_ has quit [Client Quit]
tonesfrommars has joined #ruby-lang
<imperator>
no need to do that
<imperator>
module Foo; Bar = ::Bar; end
<lianj>
nope, p Foo::Bar says #<Bar:0x83cb9ac> then
<shevy>
ok thanks
<akahn>
Can anyone explain how to make an argument mandatory with OptionParser? The docs seem to distinguish between --arg ARG and --arg [ARG], but there's no error or anything if I don't provide an argument.
chendo_ has quit [Remote host closed the connection]
crudson has joined #ruby-lang
Natch| has quit [Remote host closed the connection]
macmartine has quit [Quit: macmartine]
LarryLv has quit [Remote host closed the connection]
Natch| has joined #ruby-lang
<imperator>
i guess because assignment like that is just an alias? whereas a subclass is its own thing
<imperator>
shevy, we aim to confuse, i mean please!
<shevy>
yeah
<shevy>
or I dont think i saw class Foo < ::Something before
judofyr has quit [Remote host closed the connection]
<lianj>
thats sad.
<rue>
What’s the problem with that?
<imperator>
sometimes i've had to do it in order to rescope existing classes
<rue>
::Const just scopes it to the top scope
<imperator>
otherwise you get conflicts
<rue>
lianj: Foo::Bar is its own class, and Foo::Baz is ::Bar
<imperator>
some people are *really* obsessive about using :: for any internal code, too
<imperator>
to absolutely, positively avoid the possibility of one of the core classes being fucked with
<lianj>
rue: sure. but can you say Baz (Bar) is in Foo's scope then?
jxie has quit [Quit: leaving]
<rue>
::Bar isn’t. The constant Baz is
<rue>
But a constant isn’t anything but a reference
<akahn>
oooh, I see, the mandatory/required thing in optparse refers to whether the --foo argument requires a value, not whether the argument itself must be provided
<lianj>
i would still suggest using the subclass solution
carloslopes has quit [Ping timeout: 240 seconds]
<rue>
lianj: And you can’t think of ::Bar *now* ‘really’ being Foo::Bar, or Foo::Baz, it isn’t
<rue>
The object is still out there, only the name ::Bar has been removed
<lopac1029>
Im new to Ruby, and this might seem like a very silly question: Can an object hold other objects infinitely?
<Tasser>
lopac1029, new to programming?
<lopac1029>
Yes and no, I've dabbled in php, but only for static website building
<lopac1029>
I guess like if House is a class, you and I have different houses, but both have doors, windows, and such
<frem_>
Is there a shorter way to check this? `if my_hash.include? key1 && my_hash[key1].class == Array`
<lopac1029>
but each of those are different, and might have different attributes like clear or patterned glass, or differ color knobs
thone has quit [Ping timeout: 244 seconds]
<mortice>
frem_: since nil.class returns NilClass, you don't need to check my_hash.include? key1
<mortice>
frem_: but I'd suggest you've already made a misstep if you need to check on the class of an object
gouthamvel has joined #ruby-lang
<frem_>
mortice: Quite possibly. I'm porting something from PHP, and now that it's functional, I'm trying to make it idiomatic.
<mortice>
frem_: cool :)
thone has joined #ruby-lang
felipe__ has joined #ruby-lang
<workmad3>
lopac1029: ok, trying to make sense of what you asked
<workmad3>
lopac1029: are you asking 'can I store as many object references as I desire?' or 'can I store objects inside objects inside objects infinitely deep?'
<workmad3>
lopac1029: the answer to both is 'yes, with memory constraint limits'
<lopac1029>
workmad3: understood. I figure i'd not want to go too deep into having objects within objects within....
<workmad3>
lopac1029: you can easily have a circular reference and so have an 'infinite' nesting with only one object ;)
wallerdev has joined #ruby-lang
BigFatFatty has joined #ruby-lang
<lopac1029>
workmad3: Not fully sure what that means yet, as I'm a laidoff construction worker making a career change. But, I hope to fully understand that at somepoint
<erikh>
hrm
butchanton has joined #ruby-lang
<erikh>
lopac1029: can I recommend a book to you that's geared at new programmers?
Criztian has joined #ruby-lang
<lopac1029>
erikh: Absolutely
<erikh>
it's free.
<erikh>
corundum: learn to program?
<corundum>
A good Ruby tutorial for newbies to programming: http://pine.fm/LearnToProgram/. NOTE: For linux installation section (in Chapter 0), the filename presented is just a example.
<erikh>
it's worth reading end to end, especially if you're new
<lopac1029>
Ha! I have that book
<erikh>
and remember, things have to "click" sometimes. keep practicing and they will.
<erikh>
good luck!
ryez_ has quit [Ping timeout: 245 seconds]
<lopac1029>
Thanks!
ryez has quit [Ping timeout: 245 seconds]
kain has joined #ruby-lang
imperator has quit [Quit: This computer has gone to sleep]
Hakon|mbp has quit [Quit: Leaving...]
tubbo has quit [Ping timeout: 248 seconds]
symm- has quit [Ping timeout: 252 seconds]
tjadc has quit [Remote host closed the connection]
shadowcat_ has joined #ruby-lang
savage- has joined #ruby-lang
tubbo has joined #ruby-lang
mistym has joined #ruby-lang
bfreeman has quit [Quit: bfreeman]
vmil86 has quit [Quit: Leaving]
kvirani has quit [Remote host closed the connection]
jarib has quit [Excess Flood]
jarib has joined #ruby-lang
gyotoit22 has joined #ruby-lang
zzak has quit [Quit: leaving]
krohrbaugh has joined #ruby-lang
zzak has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
Carnage\ has joined #ruby-lang
b1rkh0ff has joined #ruby-lang
thrcka has quit [Ping timeout: 248 seconds]
fayimora has joined #ruby-lang
gyotoit22 has left #ruby-lang [#ruby-lang]
arooni-mobile has joined #ruby-lang
Weems has quit [Ping timeout: 245 seconds]
cdt has quit [Quit: Ex-Chat]
shadowcat_ has quit [Quit: shadowcat_]
seanstickle has joined #ruby-lang
<khaase>
drbrain: you around?
<khaase>
drbrain: somehow the net-http-persistent and net-http-pipeline combination is not working for me
<khaase>
drbrain: I get /Users/konstantin/Workspace/gh/lib/gh/faraday_adapter.rb:26:in `block in run': undefined method `pipelining=' for #<Net::HTTP::Persistent:0x007ffa0a3a6900> (NoMethodError) no matter what load order
<khaase>
drbrain: and I get a wrong number of arguments error for pipeline
<khaase>
no wait
<khaase>
in pipeline
<khaase>
drbrain: seems my *-persistent and *-pipeline versions are incompatible
Dreamer3 has joined #ruby-lang
<khaase>
drbrain: ah, well, I see
<khaase>
drbrain: I have to supply a url
<khaase>
drbrain: that way the first request will not be pipeline, right?
solars has joined #ruby-lang
Weems has joined #ruby-lang
Weems has quit [Changing host]
Weems has joined #ruby-lang
dejongge has joined #ruby-lang
<khaase>
drbrain: ok, got it running. but I think the first request still checks for pipelining support
imperator has joined #ruby-lang
workmad3 has quit [Ping timeout: 245 seconds]
chrismcg is now known as zz_chrismcg
solars has quit [Ping timeout: 244 seconds]
burgestrand has joined #ruby-lang
soahccc is now known as soahccc`
burgestrand has quit [Client Quit]
burgestrand has joined #ruby-lang
tubbo`work has joined #ruby-lang
ridders24 has joined #ruby-lang
stepnem has quit [Ping timeout: 244 seconds]
mdstunthamster has joined #ruby-lang
felipe__ has quit [Remote host closed the connection]
gnufied has quit [Quit: Leaving.]
solars has joined #ruby-lang
tubbo has quit [Ping timeout: 244 seconds]
matthewd has joined #ruby-lang
lsegal has joined #ruby-lang
gouthamvel has left #ruby-lang [#ruby-lang]
srbaker has joined #ruby-lang
solars has quit [Ping timeout: 240 seconds]
stepnem has joined #ruby-lang
solars has joined #ruby-lang
tubbo`work has quit [Quit: leaving]
tubbo has joined #ruby-lang
<rue>
khaase: drbrain solves problems even without being around
srbaker has quit [Quit: Computer has gone to sleep.]
<khaase>
*look into
rippa has joined #ruby-lang
shevy has quit [Ping timeout: 244 seconds]
jstemmer has joined #ruby-lang
brianpWins has joined #ruby-lang
brianpWins has quit [Client Quit]
brianpWins has joined #ruby-lang
brianpWins has quit [Client Quit]
judofyr has joined #ruby-lang
solars has quit [Ping timeout: 260 seconds]
kvirani has joined #ruby-lang
UNIXgod has quit [Changing host]
UNIXgod has joined #ruby-lang
sora_h is now known as s0ra_h
sonicpond has quit [Quit: leaving]
sonicpond has joined #ruby-lang
shevy has joined #ruby-lang
mdstunthamster has quit [Quit: Leaving...]
DRCALKIN has joined #ruby-lang
mrc has joined #ruby-lang
mrc has quit [Read error: Connection reset by peer]
<drbrain>
khaase: yes, the first request is consumed for a pipelining check
<drbrain>
khaase: so long as the connection stays alive, further sequences will immediately pipeline
<khaase>
drbrain: how long does a connection stay alive? I mean, obviously, the server will close it after a few secs, but does the client close it?
hebz0rl has quit [Quit: Verlassend]
<drbrain>
khaase: net-http-persistent has an idle timeout you can adjust
<drbrain>
I think the default is 5s
<drbrain>
khaase: net-http-pipeline has a way to say "I know this server supports pipelining" but that's not exposed to net-http-persistent (and I'm not sure how to expose it, offhand)
<drbrain>
khaase: so long as you continue making requests within the server and client idle timeouts the connection will remain open
<khaase>
drbrain: 5 secs might be short sometimes, then
<khaase>
drbrain: lemme check
<drbrain>
to determine github's timeout you'd need to experiment
<zzak>
unless defined?(MyConst); require 'my_const'; end
<drbrain>
making the client timeout just slightly shorter than the server's is best
benanne has joined #ruby-lang
<zzak>
require 'my_const' unless defined? MyConst
<khaase>
drbrain: ok, gotta run, will play with this later
ryanf has joined #ruby-lang
<jammi>
do anyone by chance know of a lib to diff and merge objects? (consisting of just arrays and hashes for structure, and data as strings, numbers, booleans)
stamina has quit [Ping timeout: 245 seconds]
<jammi>
3-way diff/merge capability would be a big plus
<jammi>
imperator: not really. I haven't really researched the matter recently, that's why I was asking
<jammi>
last time, there wasn't anything suitable, so I rolled my own merge util back then
Karmaon has joined #ruby-lang
<jammi>
at the very least, there should be at least add, delete and set functionality, and a diff tool to compare either between two objects or better; a smaller representation of the previous state, and output that is serializable between machines without resorting to marshalling
futurechimp has quit [Quit: Leaving]
harukomoto has joined #ruby-lang
macmartine has quit [Quit: macmartine]
thrcka has joined #ruby-lang
mdstunthamster has quit [Quit: Leaving...]
znz_jp has quit [Quit: kill -QUIT $$]
asahi has left #ruby-lang [#ruby-lang]
znz_jp has joined #ruby-lang
stepnem has quit [Ping timeout: 245 seconds]
<sockmonk>
jammi: that sounds great. I've got an old home-grown merge solution too. it works, but it's fragile if stuff in the structure changes much
nofxxxx has quit [Ping timeout: 244 seconds]
<sockmonk>
I'd love it if a general solution were out there
stepnem has joined #ruby-lang
<jammi>
sockmonk: yeah, some quite fragile solutions developed here too over the years, for the diff/patch part, entirely code-dependant. I guess I have to make a generic solution myself, as there still doesn't seem to be anything worthwhile at the moment
<jammi>
as for conflicts, a first-come, first rule approach will be fine in these cases
thrcka has quit [Ping timeout: 260 seconds]
kinginky has joined #ruby-lang
chimkan_ has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 244 seconds]
<sockmonk>
For most things we default to using A's value when merging A and B, but for a few fields, we check for conflict and if found error out of the merge and make the user pick (before the 'real' merge is allowed to start)
<jammi>
sockmonk: yeah. my use-cases are a bit different. more like master vs a horde of slaves. could be stacked, like making a master another's slave. in most cases, it doesn't matter much, if a slave's change is overruled by another slave
mdstunthamster has joined #ruby-lang
seanstickle has quit [Quit: Nihil sub sole novum]
<jammi>
the changes coming from the higher priority master always overwrite whatever the slaves tried to set anyway
wvdschel has quit [Read error: Connection reset by peer]
sspiff has joined #ruby-lang
sspiff has joined #ruby-lang
zz_wasnotrice is now known as wasnotrice
stamina has quit [Quit: Lost terminal]
imperator has left #ruby-lang ["Leaving"]
Cykey has joined #ruby-lang
lopac1029_ has joined #ruby-lang
lopac1029_ has quit [Client Quit]
judofyr has quit [Remote host closed the connection]
Heimidal has joined #ruby-lang
outoftime has quit [Quit: Leaving]
ridders24 has quit [Ping timeout: 250 seconds]
ridders24 has joined #ruby-lang
jarib has quit [Excess Flood]
<erikh>
chef has a good deep merge
<erikh>
it's in its own library
<erikh>
you could trivially extract it
jarib has joined #ruby-lang
<rue>
Poop merge
<erikh>
deep impact
* erikh
goes there
Austin__ has quit [Quit: Leaving.]
solars has joined #ruby-lang
soahccc is now known as soahccc`
<rue>
I am now broken.
<TTilus>
would poop merge unbreak your heart?
* TTilus
desperately needs sleep
<rue>
Hmm
judofyr has joined #ruby-lang
dejongge has quit [Quit: Leaving.]
seanstickle has joined #ruby-lang
voker57__ has joined #ruby-lang
senj has joined #ruby-lang
senj has quit [Remote host closed the connection]
voker57_ has quit [Ping timeout: 252 seconds]
Heimidal has quit [Ping timeout: 245 seconds]
znz_v0 has quit [Quit: kill -QUIT $$]
znz_v has joined #ruby-lang
IPGlider has joined #ruby-lang
asahi has joined #ruby-lang
jperry2 has quit [Quit: Leaving.]
<asahi>
can someone tell me what the double colons mean in something like Foo::Bar ?
adambeynon has quit [Quit: adambeynon]
<TTilus>
asahi: scope traversal
<TTilus>
asahi: that particular means "Bar inside Foo"
<asahi>
and Foo and Bar can be classes or modules?
<TTilus>
yes
<asahi>
k, thanks
<TTilus>
they actually must be modules
<TTilus>
;)
<TTilus>
but as classes are modules too...
<hagabaka>
Foo needs to be a module, but Bar can be any constant
<rue>
No, they can be constants…
Guedes is now known as Guedes_out
<TTilus>
ah, sorry, the leaf can be any constant
<asahi>
ah okay
pbjorklund has quit [Quit: bork]
voker57__ has quit [Read error: Connection reset by peer]
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
mark_locklear has quit [Remote host closed the connection]
zmack has quit [Remote host closed the connection]
judofyr has quit [Remote host closed the connection]
mdstunthamster is now known as stunthamster
fromhet has joined #ruby-lang
hynkle has quit [Quit: hynkle]
Cykey has quit [Quit: Computer has gone to sleep.]
<chris2>
meh, the color gem only speaks hsl and not hsv
gouthamvel has joined #ruby-lang
gouthamvel has left #ruby-lang [#ruby-lang]
macmartine has joined #ruby-lang
lucsky has quit [Quit: Trans Plutonian Transmission]
ilyam has joined #ruby-lang
wasnotrice is now known as zz_wasnotrice
Criztian has joined #ruby-lang
<zenspider>
chris2: you can steal my #from_hsv method in the png gem ... converts to rgb
<chris2>
nice
<chris2>
all i need really
SimSala has quit [Ping timeout: 252 seconds]
<chris2>
erm, your hsv is normalized to 255?
stamina has joined #ruby-lang
zz_wasnotrice is now known as wasnotrice
sandbags has quit [Remote host closed the connection]
kalleth has quit [Ping timeout: 252 seconds]
sandbags has joined #ruby-lang
<zenspider>
chris2: yeah. but you can strip that. that's just because of the design of my png backing
wasnotrice is now known as zz_wasnotrice
stunthamster has quit [Quit: Leaving...]
<chris2>
somehow there is a rounding issue...
judofyr has joined #ruby-lang
<zenspider>
what's the size of the hsv values coming in?
<chris2>
360/100/100
<chris2>
but i see off-by-ones if i compare to gtk color picker
<zenspider>
kk. / 60, 100, 100
<zenspider>
hrm
<chris2>
i changed those
<chris2>
well, nvm
<chris2>
its just for a quick hack
publicvoid_ has quit [Remote host closed the connection]
A124 has joined #ruby-lang
ivanoats has quit [Quit: ivanoats]
andrewhl has quit [Quit: andrewhl]
judofyr has quit [Remote host closed the connection]
judofyr has joined #ruby-lang
Cykey has joined #ruby-lang
<judofyr>
telemachus: you here?
elux has quit [Quit: Bye!]
adambeynon has joined #ruby-lang
<rue>
judyofyr: Nah
<asahi>
can someone tell me what class << self means?
<slyphon>
what's that gem that gives you better Time related stuff?
<slyphon>
the one that all the kids are using these days
<judofyr>
asahi: "enter self's metaclass"
<whitequark>
asahi: "class << self; def method; end" is the same as "def self.method; end", for example.
<asahi>
whitequark: ah okay. thanks
<judofyr>
whitequark: I'd rather say it's the other way around, but yeah :)
<whitequark>
judofyr: "a = b" implies that "b = a".
<judofyr>
asahi: every object has its own metaclass which is there if you want methods defined on a specific object.
<judofyr>
asahi: in Ruby, methods can only be defined in classes
vesan has quit [Read error: Connection reset by peer]
lopac1029 has quit [Remote host closed the connection]
<asahi>
judofyr: I've seen def self.method a lot, but haven't seen class << self; def method; end; end; that much...
<asahi>
maybe because I use rails
<whitequark>
that's just a coding style
<judofyr>
well, class<<self can be used to other things too
<judofyr>
class << self; attr_accessor :foobar; end
vesan has joined #ruby-lang
<whitequark>
asahi: listen to judofyr, he explains this better than me :)
tommyvyo has quit [Quit: Computer has gone to sleep.]
<asahi>
I see. okay. I also just found some articles online about it too. thanks for the help
<judofyr>
asahi: unless you want to dive into Ruby's metaclass, you only need to know that "class<<self;def foo;end;def bar;end;end" is equal to "def self.foo;end;def self.bar;end"
carloslopes has quit [Quit: Leaving]
<asahi>
judofyr: to be honest, I haven't heard of Ruby's metaclass, so maybe I don't need to dive into it right now
<judofyr>
asahi: I should finish my own article explaining metaclasses (or actually, first it explains plain objects + classes)
DRCALKIN has quit [Ping timeout: 245 seconds]
flowerpot has joined #ruby-lang
sonicpond is now known as sonicpond_afk
echoprinter has joined #ruby-lang
adambeynon has quit [Quit: adambeynon]
gsav has quit [Read error: Connection reset by peer]
gsav has joined #ruby-lang
codewrangler has quit [Quit: Computer has gone to sleep.]
srbartlett has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
sspiff has quit [Ping timeout: 246 seconds]
rippa has quit [Ping timeout: 244 seconds]
cmaxw has joined #ruby-lang
kvirani has quit [Remote host closed the connection]
dv310p3r has quit [Read error: Operation timed out]
<Harzilein>
or really just something without the hash constructor maybe
codewrangler has quit [Client Quit]
judofyr has quit [Remote host closed the connection]
<erikh>
Hash[[1,2,3].zip([3,4,5].zip([5,6,7]))]
<erikh>
WHEN IN DOUBT JUST CHAIN YO
<Harzilein>
of course the second array is given so i cannot split it myself
<erikh>
oh, I see what you want to do
<erikh>
why not just use map there?
<Harzilein>
this is the "i parse out an array from some table row and collect all rows in another array, now i want to add the column headings as an array of symbols and get hashes for the individual rows" use case
<Harzilein>
because i think it is very common there must be a nice shorthand imho
<erikh>
there isn't
woollyams has joined #ruby-lang
<erikh>
it's not very common.
karatedog has quit [Quit: Page closed]
FiXato has quit [Quit: rebooting]
workmad3 has quit [Ping timeout: 260 seconds]
FiXato has joined #ruby-lang
yxhuvud has quit [Ping timeout: 245 seconds]
headius has joined #ruby-lang
bascht has joined #ruby-lang
<bascht>
Hey Folks.
<erikh>
hi
<bascht>
I'm fairly new to ruby, but currently debugging some ruby files that are acting strange on a remote system.
kalleth has joined #ruby-lang
<bascht>
Question: I'm seeing that the script checks File.writable? - how can I get the user that this ruby process is run with?
<rue>
Process and/or Etc?
<bascht>
I tried Process.uid - but this looks right to me, as that user has the correct permissions to that file.
<bascht>
hm, strange
<rue>
Is the directory?
<erikh>
is the file writeable?
<bascht>
rue: yep, its a directory.
ReiToei has joined #ruby-lang
<bascht>
The directory has "drwxrwsr-x 8 1000 1002"
<bascht>
The user that "Process.uid" gives, is in the group 1002 - so something seems wrong here, but I just don't get a grip. :)
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
mikeric has joined #ruby-lang
workmad3 has joined #ruby-lang
<erikh>
did the user just get the group added?
jarib has quit [Excess Flood]
naz has quit [Quit: Leaving]
<bascht>
Good grief.
<bascht>
erikh: Nope, but I think the process is running with the wrong GID
kvirani has joined #ruby-lang
j`ey has joined #ruby-lang
<erikh>
hrm
j`ey has left #ruby-lang [#ruby-lang]
<erikh>
you can Process.gid = xxx
jarib has joined #ruby-lang
<bascht>
erikh: Yep, thanks for the hint! :)
<erikh>
enjoy
woollyams has quit [Quit: Computer has gone to sleep.]
headius has quit [Quit: headius]
woollyams has joined #ruby-lang
woollyams has quit [Client Quit]
toretore has quit [Quit: Leaving]
srbartlett has quit [Remote host closed the connection]
headius has joined #ruby-lang
headius has quit [Client Quit]
<rue>
OMG spreadsheets are annoying
deobald__ has joined #ruby-lang
savage-_ has joined #ruby-lang
fayimora has quit [Read error: Connection reset by peer]
fayimora has joined #ruby-lang
savage- has quit [Ping timeout: 250 seconds]
<Harzilein>
so are ascii art tables
<seanstickle>
So are poison splinters underneath your fingernails
<Harzilein>
maybe i should just look for an implementation in any language, surely someone has parsed tables out of rfcs before...
BigFatFatty has quit [Quit: leaving]
<arooni-mobile>
trying to run cap deploy:cold on ubuntu 12.04; with rvm installed at 1.8.7p334 ... getting : /home/skippy/.rvm/gems/ruby-1.8.7-p334/gems/net-ssh-2.1.4/lib/net/ssh/transport/openssl.rb:1:in `require': no such file to load -- openssl (LoadError)
<erikh>
didn't zenspider write a lib ages ago that took ascii tables and dumped html from them?
<arooni-mobile>
i already installed libopenssl-ruby
<bascht>
arooni-mobile: did you check the rvm notes for Ubuntu?