apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p327: http://ruby-lang.org (ruby-2.0.0-preview2) || Paste >3 lines of text on http://gist.github.com
nari_ has quit [Ping timeout: 272 seconds]
Goles has quit [Quit: Computer has gone to sleep.]
sepp2k1 has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
NiteRain has quit [Ping timeout: 246 seconds]
Dario_ has quit [Ping timeout: 264 seconds]
binarypl1 has joined #ruby
zooz_ has joined #ruby
<zooz_> I have a string: 'foo, bar, baz'. How can I split it into an array by ',' and remove all leading white spaces from the items?
lolcathost has joined #ruby
DaZ has quit [Ping timeout: 248 seconds]
<Divinite> zooz_: Find the secured foo inside the crypo'd baz. Then go to a bar and get drunk.
chord has joined #ruby
CaptainJet has quit []
Eric___ has joined #ruby
kiyoura has joined #ruby
<blazes816> zooz_: "foo, bar, baz".split(',').map(&:strip)
elaptics is now known as elaptics`away
<Eric___> hey everyone
<blazes816> that'd do leading AND trailing space btw
binaryplease has quit [Ping timeout: 252 seconds]
_nitti has joined #ruby
<blazes816> gsub(/\s+/, '') on each item if you only want to remove the leading spaces
<zooz_> great, thanks blazes816
Michael- has joined #ruby
<Eric___> is anyone here keen on helping a total newb out?
nateberkopec has joined #ruby
<UdontKnow> Eric___: just ask your question, no need to ask meta stuff :)
<chord> My understanding of JRuby is that it is a tracing jit, so it generates code to handle the generic dynamic typed case but it will high performance for the common case, so then why does this not perform close to C++: http://benchmarksgame.alioth.debian.org/u64q/which-programs-are-fastest.php
Michael- has quit [Quit: Linkinus - http://linkinus.com]
meskyanichi has joined #ruby
meskyanichi has quit [Remote host closed the connection]
<Eric___> :) I am trying to create a method that will take a course code (example: ENG140Y1) and return the 3 letter course designator (i.e. "ENG")
meskyanichi has joined #ruby
<Eric___> so I did this: def select_designator(coursecode)
<Eric___> @coursecode = coursecode
<Eric___> @coursecode[0,3] = designator
felipesabino has joined #ruby
CaptainJet has joined #ruby
<Eric___> is that anywhere near correct?
danieldocki has quit [Ping timeout: 255 seconds]
_nitti has quit [Ping timeout: 264 seconds]
aajjbb has quit [Ping timeout: 272 seconds]
Jesterman81 has joined #ruby
<headius> chord: a lot of those benchmarks are not typical application cases
DaZ has joined #ruby
<headius> and a lot of them could be written in much better ways
seanstickle has joined #ruby
adkron has joined #ruby
<chord> headius: aren't those benchmarks typically using variables in a purely statically typed way, so the jit should easily be able to see just optimize for the static typed case
<Eric___> with what I put I keep getting "undefined local variable or method `designator'", but I was under the impression that you don't need to declare vars in ruby
<Eric___> (fwiw I am kinda new to programming and I'm trying to write a program to select my courses so that I can maximize course overlap lol.)
Jesterman81 has quit [Client Quit]
<headius> chord: well, we could look at a specific example, perhaps?
<headius> they often do work out to mostly static code, but that doesn't mean they're well-written
aajjbb has joined #ruby
<headius> performing close to C++ is perhaps a bit too tall an order for any Ruby impl, since Ruby's a very allocation and GC-heavy language in any case
<headius> the C++ versions of those benchmarks tend to avoid all allocation and are often just C with objects
pyr0commie has quit [Remote host closed the connection]
<chord> headius: presumably the same type of code structure is used for all the languages, so they are all equally badly written, are you saying thats wrong?
pyr0commie has joined #ruby
<headius> you should have a look at them…the different language versions are very different
jjbohn has joined #ruby
piotr_ has quit [Ping timeout: 272 seconds]
<headius> some of the python ones use numpy…talk about a cheat
<Eric___> (also I hope I'm in the right channel for this question)
<chord> headius: ok then maybe I can restate my question as jit'ed dynamically typed like JRuby vs statically typed, garbage collected, compiled language
iamjarvo has joined #ruby
<chord> headius: is there any paper that looks at this concretely
<chord> headius: and says dynamic jit'ed can get really close
ikaros has quit [Quit: Ex-Chat]
alexspeller has joined #ruby
ebobby has quit [Quit: Lost terminal]
felipesabino has quit [Remote host closed the connection]
felipesabino has joined #ruby
PetePorty has joined #ruby
PetePorty has quit [Changing host]
PetePorty has joined #ruby
gordon1775|2 has joined #ruby
kirun has quit [Quit: Client exiting]
danneu2 has joined #ruby
eurythmmia has joined #ruby
PetePorty has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
danneu1 has quit [Read error: Connection reset by peer]
cousine has quit [Remote host closed the connection]
Dario_ has joined #ruby
<eurythmmia> Hey Folks; I'm new at ruby. I'd like to create a module and alias some of the methods provided within that module, but when I try, I get a message stating that there is no such method. I have a short example with output pasted here (http://www.pastebin.ca/2294766). I appreciate any assistance.
rellin has quit [Ping timeout: 250 seconds]
Dario_ has quit [Ping timeout: 265 seconds]
<headius> chord: well…the JVM (or the most successful implementations of it) itself is largely dynamically typed internally
phelps has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<headius> we don't do anything magical in JRuby other than plug directly into the JVM JIT (which isn't a tracing JIT by the way, but that's not really important here)
lolcathost has quit [Ping timeout: 244 seconds]
ttt has joined #ruby
<kenneth> eurythmmia: not sure, but i think alias_method is meant for instance methods in classes.
<headius> there's lots of papers about how different JVMs optimize code, and they apply as well to dynlangs like JRuby now that we can teach the JIT how dyncalls work
danneu2 has quit [Ping timeout: 265 seconds]
mahmoudimus has joined #ruby
ewag has quit [Ping timeout: 264 seconds]
<headius> a recent benchmark put a pure-Ruby rbtree impl up against a Java-based JRuby extension, and the pure Ruby version is only about 2x slower
<headius> that gap will continue to narrow
daniel_hinojosa has quit [Quit: Leaving.]
<eurythmmia> kenneth: thanks. I've thought about that too; but if it were the case that it wouldn't work when requiring a file containing a module, then module_alias_chain wouldn't work either (which is the case here, but not in general, from what I've seen)
fyolnish has quit [Remote host closed the connection]
ttt has quit [Ping timeout: 276 seconds]
medik has quit [Quit: Leaving]
<eurythmmia> kenneth: ... although, that gives me another idea. Hold on and I'll let you know how I fare.
moshee has joined #ruby
alexspeller has quit [Ping timeout: 252 seconds]
aajjbb has quit [Ping timeout: 255 seconds]
d2dchat has joined #ruby
nanothief has joined #ruby
<eurythmmia> That didn't work either. Back to the internet to find an answer.
Nisstyre has quit [Read error: Connection reset by peer]
jjbohn has quit [Quit: Leaving...]
w400z has joined #ruby
miskander has joined #ruby
tjbiddle_ has joined #ruby
lolcathost has joined #ruby
emmanuelux has quit [Quit: emmanuelux]
elico has joined #ruby
jjbohn has joined #ruby
pyr0commie has quit [Remote host closed the connection]
elico has quit [Client Quit]
tjbiddle has quit [Ping timeout: 264 seconds]
tjbiddle_ is now known as tjbiddle
agarie has quit [Remote host closed the connection]
madhadron has left #ruby [#ruby]
daniel_- has joined #ruby
aajjbb has joined #ruby
<eurythmmia> kenneth: if I don't prefix my method names with the module name, everything works well (https://gist.github.com/4333483). I only run into trouble when I do try to prefix (to prevent trampling method names at runtime).
nat2610 has left #ruby [#ruby]
slainer68 has quit [Remote host closed the connection]
jon_than_ has quit [Read error: Operation timed out]
miskander has quit [Quit: miskander]
gordon1775|2 has quit [Read error: Connection reset by peer]
whomp has joined #ruby
daniel_- has quit [Client Quit]
<whomp> is there any way to modify a file using the ruby -ne?
<Divinite> Yes
<Divinite> Modifyfile -ne filename
Spaceghostc2c has quit [Excess Flood]
mercwithamouth has joined #ruby
yewton_ is now known as yewton
xAndy is now known as xandy
etank has quit [Ping timeout: 245 seconds]
thams has quit [Read error: Connection reset by peer]
yshh has joined #ruby
felipesabino has quit [Ping timeout: 272 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
thams has joined #ruby
etank has joined #ruby
jjbohn has quit [Quit: Leaving...]
Spaceghostc2c has joined #ruby
cr3 has joined #ruby
jjbohn has joined #ruby
chussenot has quit [Quit: chussenot]
Jake232 has joined #ruby
philips_ has quit [Excess Flood]
alexspeller has joined #ruby
gordon1775 has joined #ruby
<cr3> hi folks, is there a preference between calling File.readable? or File::readable?
<Divinite> Yes
<Divinite> You do
<Divinite> File.::.readable?
dmiller has joined #ruby
<Divinite> See, pyramid
jlast has joined #ruby
DrShoggoth has joined #ruby
main has quit [Read error: Operation timed out]
<cr3> Divinite: of course! how about .:.:., bridge!
<Divinite> Excellent cr3!
<Divinite> That conforms to RC82638
philips_ has joined #ruby
taoru has joined #ruby
<cr3> Divinite: that's the ruby art rfc, right?
adeponte has quit [Remote host closed the connection]
<Divinite> Precisely!
miskander has joined #ruby
<Divinite> Has to be simple but poignant!
dougireton has quit [Quit: Leaving.]
dmerrick has quit [Quit: dmerrick]
luckyruby has quit [Remote host closed the connection]
gabrielrotbart has quit [Remote host closed the connection]
zooz_ has quit [Quit: Leaving IRC]
jimeh has quit [Quit: Computer has gone to sleep.]
tjbiddle_ has joined #ruby
gordon1775 has quit [Ping timeout: 264 seconds]
fyolnish has joined #ruby
<havenn> cr3: .
ngoldman has quit [Remote host closed the connection]
tjasko__ has joined #ruby
tjbiddle has quit [Ping timeout: 272 seconds]
tjbiddle_ is now known as tjbiddle
Vert has joined #ruby
<cr3> havenn: thanks!
cr3 has quit [Quit: leaving]
Jasko has quit [Ping timeout: 264 seconds]
johnmilton has quit [Remote host closed the connection]
aajjbb has quit [Ping timeout: 256 seconds]
samphippen has joined #ruby
mmitchell has joined #ruby
t_hash has joined #ruby
tjbiddle_ has joined #ruby
lenovodroid has quit [Ping timeout: 260 seconds]
chessguy has quit [Remote host closed the connection]
dazonic has joined #ruby
jjbohn has quit [Quit: Leaving...]
tjbiddle__ has joined #ruby
alexspeller has quit [Ping timeout: 252 seconds]
tjbiddle has quit [Ping timeout: 256 seconds]
tjbiddle__ is now known as tjbiddle
berserkr has joined #ruby
tjbiddle_ has quit [Ping timeout: 264 seconds]
jarjar_prime has quit [Quit: Sleep time.]
v0n has joined #ruby
aajjbb has joined #ruby
dawkirst_2 has quit [Ping timeout: 244 seconds]
robbyoconnor is now known as r0bby
ttt has joined #ruby
dawkirst_ has joined #ruby
r0bby is now known as robbyoconnor
Nimsical has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
mrsolo has quit [Quit: Leaving]
swex_ has joined #ruby
<dazonic> I've got about 10 sites on a VPS, all small brochure sites, built with Brochure gem so they're Rack apps (https://github.com/sstephenson/brochure)… I've deployed with unicorn and nginx, basically copying the Railscast (http://railscasts.com/episodes/293-nginx-unicorn). They run VERY SLOW though, I've got a few big rails apps on the server that run way faster. Should I stick with unicorn? Anyone got any speed tips?
ttt has quit [Ping timeout: 276 seconds]
zeade has quit [Quit: Leaving.]
dawkirst_ has quit [Ping timeout: 248 seconds]
xnm has joined #ruby
mahmoudimus has joined #ruby
blazes816 has quit [Quit: blazes816]
swex has quit [Ping timeout: 264 seconds]
xyzodiac has joined #ruby
brianpWins has quit [Quit: brianpWins]
tyfighter has quit [Quit: tyfighter]
Kruppe has joined #ruby
pxjorge has quit [Ping timeout: 246 seconds]
cakehero has joined #ruby
twoism has quit [Remote host closed the connection]
fred909 has quit [Ping timeout: 265 seconds]
t_hash has quit [Quit: ZNC - http://znc.in]
cakehero has quit [Client Quit]
Jake232 has quit [Quit: Computer has gone to sleep.]
jjbohn has joined #ruby
tommyvyo has joined #ruby
jjbohn has quit [Ping timeout: 272 seconds]
alexspeller has joined #ruby
the_jeebster has quit [Quit: Leaving.]
breakingthings has joined #ruby
aajjbb has quit [Ping timeout: 255 seconds]
F1skr has quit [Quit: WeeChat 0.3.9.2]
squidBits has quit [Quit: whoops]
swex has joined #ruby
binarypl1 has quit [Quit: WeeChat 0.3.9.2]
Gooder has joined #ruby
danneu has joined #ruby
swex_ has quit [Write error: Broken pipe]
lolcathost has quit [Quit: Lost terminal]
Shamgar has quit [Ping timeout: 255 seconds]
nari_ has joined #ruby
Shamgar has joined #ruby
ttt has joined #ruby
wargasm has quit [Ping timeout: 248 seconds]
Playground has joined #ruby
rellin has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
Playground is now known as lolcathost
swex has quit [Ping timeout: 255 seconds]
alvaro_o has quit [Quit: Ex-Chat]
<chord> how does before_filter work in Rails? if false does it cause methods to just return early or does it cause an exception?
Coolhand_ has joined #ruby
Coolhand has quit [Ping timeout: 252 seconds]
jonathanwallace has joined #ruby
thams has quit [Read error: Connection reset by peer]
<davidcelis> chord: it just halts the chain. no exceptions unless you raise one
<davidcelis> chord: also, #rubyonrails
thams has joined #ruby
chessguy has joined #ruby
brianpWins has joined #ruby
<chord> so it causes a return immediately? how is that possible to cause the method to return while executing within the before_filter closure?
bluenemo has quit [Remote host closed the connection]
<davidcelis> what
r126l has quit [Remote host closed the connection]
swex has joined #ruby
jenrzzz has joined #ruby
dmiller has quit [Remote host closed the connection]
gabrielrotbart has joined #ruby
ephemerian has quit [Quit: Leaving.]
manizzle has quit [Ping timeout: 244 seconds]
<chord> I'm not seeing how before_filter is implemented
<danneu> it's just a stack of callbacks
axl_ has joined #ruby
r126l has joined #ruby
Rezwan has joined #ruby
keppy has joined #ruby
w400z has quit []
nat2610 has joined #ruby
rondale_sc has joined #ruby
<chord> so if a before_filter fails, the actual method is just never even called in the first place?
alexspeller has quit [Ping timeout: 252 seconds]
Shamgar has quit [Ping timeout: 265 seconds]
felipesabino has joined #ruby
Shamgar has joined #ruby
felipesabino has quit [Read error: Connection reset by peer]
mercwithamouth has joined #ruby
nouh has joined #ruby
<ryanf> yes
axl_ has quit [Ping timeout: 252 seconds]
aajjbb has joined #ruby
tommyvyo has quit [Quit: http://thomasvendetta.com]
brianpWins has quit [Ping timeout: 265 seconds]
tjbiddle_ has joined #ruby
<chord> so how does it prevent the method from being called?
brianpWins has joined #ruby
Gooder` has joined #ruby
<chord> when i do something like before_filter :foo does that do something weird so that foo() in fact doesn't call foo() anymore directly?
mahmoudimus has quit [Quit: Computer has gone to sleep.]
tjbiddle has quit [Ping timeout: 272 seconds]
tjbiddle_ is now known as tjbiddle
<chord> err i mean call bar() directly
<waxjar> i think you'll have more success in #rubyonrails chord
tommyvyo has joined #ruby
Gooder has quit [Ping timeout: 272 seconds]
bricker_ has joined #ruby
<Eric___> is there a method to return an objects's name?
keppy has quit [Ping timeout: 246 seconds]
NiteRain has joined #ruby
<seanstickle> object.class.name ?
mercwithamouth has quit [Quit: Lost terminal]
aajjbb has quit [Ping timeout: 265 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
Hanmac1 has joined #ruby
bricker has quit [Ping timeout: 246 seconds]
<Eric___> nah I mean the name of the object
<seanstickle> Example please
Hanmac has quit [Ping timeout: 252 seconds]
manizzle has joined #ruby
<Eric___> Happy = Emotion.new
<Eric___> Happy.name = (what do I put here to make it equal "Happy")
<Eric___> i hope that makes sense lol
<seanstickle> Yup
<seanstickle> There you go
<Eric___> pooh that's perfect, thanks
<Eric___> ooh*
Jayje_Atrhavein has joined #ruby
<Jayje_Atrhavein> HELLO?
<seanstickle> yup
_e_ has joined #ruby
binaryplease has joined #ruby
<Jayje_Atrhavein> oh. i thought i was in here alone
mmitchell has quit [Remote host closed the connection]
razibog has quit [Quit: Leaving.]
mmitchell has joined #ruby
manizzle has quit [Ping timeout: 248 seconds]
<Jayje_Atrhavein> any other newbies here?
lolcathost has quit [Quit: leaving]
ewag has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
<breakingthings> Does 'I haven't written a single line of ruby yet' count
<Jayje_Atrhavein> is this just for questions and help then?
<Jayje_Atrhavein> yes
rondale_sc has left #ruby [#ruby]
<breakingthings> It's whatever you want it to be
<breakingthings> It's a magical irc land
<CaptainJet> #ruby-lang is basically questions and help
<CaptainJet> this is that, and general speak
<Jayje_Atrhavein> oh ok. anyone here familiar with RMXP?
<CaptainJet> yes
nouh has quit [Ping timeout: 255 seconds]
Diger_s has quit [Ping timeout: 250 seconds]
voodoofish430 has quit [Quit: Leaving.]
nouh has joined #ruby
<Jayje_Atrhavein> ok this may sound weird but i need a scripting buddy to help creat a pvp battle system for a game I''m making
<CaptainJet> i started my wild ruby adventure ~3 years ago with the RM programs
<CaptainJet> RM isn't an online engine
pwelch has joined #ruby
pwelch has quit [Client Quit]
alexspeller has joined #ruby
Playground has joined #ruby
binaryplease has quit [Quit: WeeChat 0.3.9.2]
joeycarmello has joined #ruby
<Jayje_Atrhavein> there was a engoine that does enable that
<Jayje_Atrhavein> it was called netplay
io_syl has quit [Ping timeout: 244 seconds]
<CaptainJet> right, but RM natively isn't
<Jayje_Atrhavein> my thing is i needed sumthin that i needed a system similar to pokemon to really maek my game complete
rondale_sc has joined #ruby
Diger_s has joined #ruby
jjbohn has joined #ruby
segv-_ has joined #ruby
jsilver has joined #ruby
brianpWins has quit [Quit: brianpWins]
<Jayje_Atrhavein> my thing is that i needed a system similar to pokemon to really maek my game complete
jlast has quit [Remote host closed the connection]
banjara has quit [Quit: Leaving.]
jjbohn has quit [Client Quit]
segv- has quit [Ping timeout: 264 seconds]
segv-_ is now known as segv-
jfl0wers has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
pwelch has joined #ruby
Gooder` has quit [Remote host closed the connection]
ndboost has joined #ruby
includex has quit [Ping timeout: 252 seconds]
cakehero has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
jonathanwallace has joined #ruby
cakehero has quit [Client Quit]
dmiller has joined #ruby
Divinite has quit [Quit: Divinite has left :(]
_alejandro has joined #ruby
miskander has quit [Quit: miskander]
sn0wb1rd has joined #ruby
jfl0wers has quit [Quit: jfl0wers]
jonathanwallace has quit [Client Quit]
jonathanwallace has joined #ruby
pac1 has joined #ruby
wargasm has joined #ruby
friskd has quit [Ping timeout: 248 seconds]
jfl0wers has joined #ruby
Jayje_Atrhavein has quit []
Divinite has joined #ruby
rakl has quit [Quit: sleeping]
cj3kim has joined #ruby
jonathanwallace has quit [Client Quit]
crackfu has joined #ruby
jonathanwallace has joined #ruby
ner0x has quit [Quit: Leaving]
ndboost has quit [Remote host closed the connection]
mpereira has quit [Ping timeout: 260 seconds]
alexspeller has quit [Ping timeout: 252 seconds]
Diger_s has quit [Ping timeout: 250 seconds]
Vert has quit [Ping timeout: 252 seconds]
ryanf_ has joined #ruby
kenneth has quit [Quit: kenneth]
Divinite has quit [Quit: Divinite has left :(]
squidBits has joined #ruby
ossareh has quit [Ping timeout: 272 seconds]
maletor has joined #ruby
efrainolivares has quit [Ping timeout: 265 seconds]
efrainolivares has joined #ruby
rakl has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
Diger_s has joined #ruby
Virunga has quit [Remote host closed the connection]
aharris6 has joined #ruby
axl_ has joined #ruby
jkarayusuf has joined #ruby
benlieb has joined #ruby
Fezzler has joined #ruby
ryanf_ has quit [Quit: broken pipes |||]
maletor has quit [Ping timeout: 252 seconds]
gabrielrotbart has quit [Remote host closed the connection]
chessguy has quit [Remote host closed the connection]
beneggett has quit [Quit: Computer has gone to sleep.]
cr3 has joined #ruby
agarie has joined #ruby
Ivis has joined #ruby
koshian has joined #ruby
CaptainJet has quit []
_e_ has quit [Quit: Lost terminal]
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
ttt_ has joined #ruby
rakl has quit [Quit: sleeping]
joeycarmello has quit [Read error: Connection reset by peer]
jonathanwallace has joined #ruby
joeycarmello has joined #ruby
jedediah has quit [Ping timeout: 260 seconds]
ttt has quit [Ping timeout: 276 seconds]
jonathanwallace has quit [Client Quit]
hrs has joined #ruby
jonathanwallace has joined #ruby
a_a_g has joined #ruby
jedediah has joined #ruby
alexspeller has joined #ruby
ttt_ has quit [Ping timeout: 276 seconds]
<jcrawford> ok done with the codeacademy ruby course, not bad but only the basics :D
maletor has joined #ruby
slash_nick has joined #ruby
seanstickle has quit [Quit: seanstickle]
weasels has joined #ruby
pwelch has quit [Quit: pwelch]
jonathanwallace has quit [Client Quit]
otters has quit [Ping timeout: 265 seconds]
Diger_s has quit [Ping timeout: 250 seconds]
pac1 has quit [Quit: I got it one line of code at a time]
jonathanwallace has joined #ruby
kenneth has joined #ruby
Rezwan has quit [Quit: gotta go]
aharris6 has quit [Remote host closed the connection]
jonathanwallace has quit [Client Quit]
abstrusenick has joined #ruby
d2dchat has quit [Remote host closed the connection]
maletor has quit [Ping timeout: 272 seconds]
Liothen has joined #ruby
nat2610 has quit [Quit: Leaving.]
Nimsical has quit [Quit: Computer has gone to sleep.]
Diger_s has joined #ruby
fivetwentysix has joined #ruby
maletor has joined #ruby
jonathanwallace has joined #ruby
<fivetwentysix> quiet in here, everyone writing ruby building high quality software?
axl_ has quit [Quit: axl_]
<Ivis> i'm watching twilight
Diger_s has quit [Ping timeout: 250 seconds]
<havenn> watching Hugo
<rismoney> how can i set foo=true if bar='blah'
<rismoney> in a ruby idiomatic way ;)
<havenn> rismoney: foo == true if bar == 'blah'
<fivetwentysix> rismoney: foo = bar == 'blah'
DerkTheDaring has joined #ruby
<slash_nick> hmm.. technically fivetwentysix that doesn't work
<havenn> rismoney: Do you want foo to be true as in TrueClass or just beee true.
<slash_nick> unless he needs to set false bar != 'blah'
<fivetwentysix> slash_nick: why not?
<slash_nick> i'm splitting hairs, sorry
<fivetwentysix> Object#==(value) returns true or false
<slash_nick> fivetwentysix: right... < rismoney> how can i set foo=true if bar='blah'
maletor has quit [Ping timeout: 255 seconds]
<fivetwentysix> obviously that was a typo
<rismoney> i guess trueclass (equivlant to what .nil? would return)
<slash_nick> never stated the need to set foo to false
<havenn> rismoney: What fivetwentysix said. :P
<fivetwentysix> nil == false => false
axl_ has joined #ruby
hrs has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<fivetwentysix> but...
moos3 has quit [Quit: Computer has gone to sleep.]
<fivetwentysix> !!nil == !!false => true
<fivetwentysix> :-)
v0n has quit [Ping timeout: 272 seconds]
<fivetwentysix> but if you're actually writing code like that, you're doing it wrong :-)
<slash_nick> run: bar = false; foo = bar == 'blah'; foo #=> false
<slash_nick> <- being an occam's razor nazi
* slash_nick shows himself out
slash_nick has quit [Quit: leaving]
<fivetwentysix> Pop Quiz: "a = true of false" what does a ==?
<fivetwentysix> How about "a = false or true"
aapzak has quit [Ping timeout: 255 seconds]
crackfu has quit [Quit: Leaving...]
<DerkTheDaring> if* ?
Diger_s has joined #ruby
<fivetwentysix> a = false or true; b = false || true; a == b => ?
<DerkTheDaring> in that case nil
alexspeller has quit [Ping timeout: 252 seconds]
jfl0wers has quit [Quit: jfl0wers]
<DerkTheDaring> the second case is true
<DerkTheDaring> :)
<havenn> fivetwentysix: precedence of `or` is less than `=` :)
<fivetwentysix> yep
<fivetwentysix> thought that was interesting
aapzak has joined #ruby
<fivetwentysix> ugh i have to write some more working code
<fivetwentysix> I can never be bothered to test javascript
Ivis has quit []
<fivetwentysix> anyone else suffer the same problem?
evilsushi has joined #ruby
evilsushi has quit [Changing host]
evilsushi has joined #ruby
<reactormonk> how do I code str(hex(int( in ruby? input would be "16777223"
<reactormonk> (that's python)
<fivetwentysix> thats not valid python
<fivetwentysix> is it?
<havenn> reactormonk: What's the output?
<DerkTheDaring> "16777223".to_i.hex.to_s ?
<rismoney> one more operator question - to cure my rspec
hackerdude has quit [Remote host closed the connection]
<havenn> "16777223".hex.to_s #=> "376926755"
<rismoney> if has_address != has_subnetmask != is_ip <- can i not do a 3 way like this?
* fivetwentysix wonders if he should switch from vim to something else after 2 years of doing vim
<havenn> fivetwentysix: What options would you consider? Emacs??
radic has joined #ruby
<fivetwentysix> havenn: not sure, don't even know what else is there
mmitchell has quit [Remote host closed the connection]
<fivetwentysix> havenn: maybe build my own ruby IDE in rails :D
hackerdude has joined #ruby
<DerkTheDaring> I used to use emacs a lot, but then I switched to vim
<reactormonk> havenn, no idea...
<fivetwentysix> DerkTheDaring: that happened to some of the guys here at work, they saw me on vim and switched lol
<DerkTheDaring> I kind of did like having EVERYTHING at my fingertips in emacs though haha
<reactormonk> havenn, 0x3200007
imami|afk is now known as banseljaj
Marco has quit [Ping timeout: 272 seconds]
Diger_s has quit [Ping timeout: 250 seconds]
<DerkTheDaring> fivetwentysix: lol yeah vim is nice, I've gotten pretty comfortable with it, macvim and iterm2 suits me nicely when not on ubuntu haha
radic_ has quit [Ping timeout: 264 seconds]
gyre007 has joined #ruby
aedorn has joined #ruby
alexim has joined #ruby
aharris6 has joined #ruby
berserkr has quit [Quit: Leaving.]
rohit_ has joined #ruby
alexim has quit [Client Quit]
devbug has joined #ruby
Diger_s has joined #ruby
<devbug> How can I express this inline? when foo case "A" .join('_') case "B" .join('::') end
Playground is now known as Catnaroek
<fivetwentysix> I have 200 scenarios and 50 specs in my current application :-)
<fivetwentysix> is that a strange ratio of integration vs unit tests?
Vert has joined #ruby
gyre007 has quit [Ping timeout: 272 seconds]
dmiller has quit [Remote host closed the connection]
mmitchell has joined #ruby
<aedorn> Is there a way to get the last method's explicit return value? Or some way to capture a return out of a block without interrupting the method chain?
<fivetwentysix> aedorn a = _
browndawg has joined #ruby
ninegrid has joined #ruby
<fivetwentysix> 1; a = _; a => 1
jxriddle has joined #ruby
nazty has joined #ruby
rezzack has quit [Quit: Leaving.]
io_syl has joined #ruby
ianbishop has quit [Ping timeout: 260 seconds]
<aedorn> Thought that only works with user input
moos3 has joined #ruby
alexspeller has joined #ruby
mmitchell has quit [Ping timeout: 272 seconds]
<havenn> aedorn: Do you mean like Object#tap? http://ruby-doc.org/core-1.9.3/Object.html#method-i-tap
<aedorn> havenn: Kind of ... but slightly different
waxjar has quit [Quit: i am waxjar, hear me roar]
<aedorn> Basically it's similar to def something &block; do_something; yield; ensure; do_something if {that yield returned true}; end
skaczor has quit [Ping timeout: 272 seconds]
<aedorn> I guess that looks a bit complicated on a single line
deadalus has quit [Quit: Once more into the fray, Into the last good fight I'll ever know, Live and die on this day, Live and die on this day]
cr3 has quit [Quit: leaving]
banjara has joined #ruby
<fivetwentysix> adorn sounds like bad code
<fivetwentysix> write tests :-)
spathi_ has quit [Remote host closed the connection]
<fivetwentysix> easiest way is to create a variable outside of the block, assign it in the block, and return it after the block
<aedorn> Well, it's terrible code... but to fix it I'd have to rewrite a few thousand lines. Since I need a fix by tomorrow morning that's a bit out of the question so I have to do something cleverly stupid
<havenn> aedorn: Hrmm, I wonder if something like: def something &block; block.call.tap do |value|; do something if value; end;end
danneu has quit [Ping timeout: 252 seconds]
breakingthings has quit []
mockra has joined #ruby
<aedorn> havenn: Tried that one... doesn't work either. I guess explicit returns are a bit too aggressive to jump out of the method
ebouchut has joined #ruby
<havenn> aedorn: mmm
<aedorn> fivetwentysix: Only reason I can't do a variable assignment is that would be *a lot* of blocks to change. It's a bit ridiculous
<rismoney> how can i write if a != b !=c ? I tried if a !=b && b !=c but I don't think it works quite right
<fivetwentysix> aedorn: like i said… bad code lol
nwertman has quit [Quit: Lost terminal]
tjbiddle has quit [Read error: Connection reset by peer]
a_a_g has quit [Quit: Leaving.]
<aedorn> fivetwentysix: it is... sadly I wrote it. Just .. bad legacy design, short dead lines, no tests, etc .. it's a poster child for what never to do. Ever. =)
tjbiddle has joined #ruby
joofsh has quit [Remote host closed the connection]
jonahR has joined #ruby
<aedorn> rismoney: a != b && b != c does work.. Why do you think it doesn't?
devbug has left #ruby ["To the moon!"]
joeycarmello has quit [Remote host closed the connection]
rellin has quit [Ping timeout: 265 seconds]
evilsushi has left #ruby [#ruby]
<fivetwentysix> there's no reason not to start testing
<fivetwentysix> aedorn: even on short deadlines, tests can do wonders to improve productivity
<rismoney> trying again
sayan has joined #ruby
<fivetwentysix> break out the stuff you want to test into a module, include it into the class you're testng
<fivetwentysix> g
<fivetwentysix> require that module include it in a dummy class and unit test it
Diger_s has quit [Ping timeout: 250 seconds]
joeycarmello has joined #ruby
browndawg has left #ruby [#ruby]
sayan has quit [Client Quit]
sayan has joined #ruby
kiyoura has quit [Quit: Leaving]
webguynow has quit []
<aedorn> I certainly don't disagree... and I do write tests for anything I touch now. It just wasn't built that way to begin with. I'm certainly paying for it today, though.
Diger_s has joined #ruby
dmiller has joined #ruby
Fezzler has quit [Quit: Leaving]
<havenn> I'm banging my head on 30,000s lines of test-less and comment-less Ruby code that is very 'clever'...
<havenn> Kinda wish I did write it, so I had some inkling of what might be happening. >.>
<aedorn> havenn: it's not mine! =)
moos3 has quit [Quit: Computer has gone to sleep.]
danneu has joined #ruby
axl_ has quit [Quit: axl_]
bairui has quit [Quit: WeeChat 0.4.0-dev]
danneu has quit [Ping timeout: 252 seconds]
jfl0wers has joined #ruby
DerkTheDaring has quit [Remote host closed the connection]
axl_ has joined #ruby
alexspeller has quit [Ping timeout: 252 seconds]
benlieb has quit [Quit: benlieb]
danneu has joined #ruby
Diger_s has quit [Ping timeout: 250 seconds]
yshh_ has joined #ruby
jfl0wers has quit [Client Quit]
yshh has quit [Read error: Connection reset by peer]
benlieb has joined #ruby
axl__ has joined #ruby
axl_ has quit [Ping timeout: 244 seconds]
axl__ is now known as axl_
joeycarmello has quit [Remote host closed the connection]
Diger_s has joined #ruby
ttt has joined #ruby
sandGorgon has joined #ruby
Shamgar has quit [Read error: Connection reset by peer]
sandGorgon1 has joined #ruby
haylon has joined #ruby
hackerdude has quit [Remote host closed the connection]
<haylon> If I wanted to create an array and assign it integers and char characters, would I be able to do this? tempCipher1 = Array.new[](1..52, LJ, BJ)
rohit_ has quit [Quit: Leaving]
Shamgar has joined #ruby
<havenn> haylon: temp_cipher = [*1..52, 'LJ', 'BJ']
<haylon> trying...
<rismoney> is this right foo = bar == 'blah' || bar == 'dummy' ?
Godd2 has joined #ruby
<rismoney> nm. got it with parens
rakl has joined #ruby
<havenn> rismoney: you don't need the second bar==: foo = bar == ('blah' || 'dummy')
gyre007 has joined #ruby
beneggett has joined #ruby
<havenn> rismoney: Or just: foo = %w[blah dummy].include? bar
<rismoney> hmm
yacks has quit [Quit: Leaving]
<haylon> havenn: thank you for the initialization of the array. Now I am running into a different error. count = tempCipher1.index(count) + 1. The error says Undefined method '+' for nil:NilClass (NoMethodError)
gyre007 has quit [Ping timeout: 272 seconds]
<havenn> temp_cipher1.count + 1
<havenn> haylon: btw, Ruby convention is to name variables in snake_case and classes and modules in CamelCase.
alexspeller has joined #ruby
<havenn> haylon: cipher.index.count == cipher.count
a_a_g has joined #ruby
pothibo has joined #ruby
<haylon> havenn: Then I don't need the .index() ?
<havenn> haylon: nope
<haylon> havenn: it'll return the index and not the element of the array?
<havenn> [1,2,3].count #=> 3
<havenn> haylon: Given your array, both will return 54.
<havenn> (The count of the total number of elements in the array.
<haylon> ok, i'll give it a shot and see what i do. Thank you again
yacks has joined #ruby
<havenn> haylon: No prob. Yeah, doing Array#index returns an Enumerable but it still has 54 elements just like the Array.
axl_ has quit [Quit: axl_]
ninegrid has quit [Ping timeout: 265 seconds]
jxriddle has quit [Quit: jxriddle]
burgestrand has quit [Quit: Leaving.]
g_bleezy has joined #ruby
jkarayusuf has quit [Remote host closed the connection]
haylon has quit [Remote host closed the connection]
yshh_ has quit [Read error: Connection reset by peer]
yshh has joined #ruby
ebouchut has quit [Quit: This computer has gone to sleep]
amysan has left #ruby [#ruby]
squidBits has quit [Read error: Connection reset by peer]
lenovodroid has joined #ruby
squidBits has joined #ruby
rakl has quit [Quit: gone]
rakl has joined #ruby
pkondzior_ has quit [Read error: Connection reset by peer]
pkondzior__ has joined #ruby
Kruppe has quit [Remote host closed the connection]
lusory has quit [Quit: leaving]
JohnBat26 has joined #ruby
aetcore has joined #ruby
aetcore has quit [Remote host closed the connection]
Edward__ has quit [Ping timeout: 272 seconds]
agarie has quit [Remote host closed the connection]
maletor has joined #ruby
alexspeller has quit [Ping timeout: 252 seconds]
benlieb has quit [Quit: benlieb]
ttt has quit [Remote host closed the connection]
elsifaka has joined #ruby
dmiller has quit [Remote host closed the connection]
pothibo has quit [Quit: pothibo]
jxriddle has joined #ruby
nomenkun has joined #ruby
jxriddle has quit [Ping timeout: 251 seconds]
lenovodroid has quit [Read error: Connection reset by peer]
Eric___ has quit [Quit: Eric___]
lenovodroid has joined #ruby
Astral_ has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Guest21567 has quit [Ping timeout: 252 seconds]
<Godd2> That's weird, both the site I want to go to and the waybackmachine are down
<Godd2> I think it's a conspiracy
agarie has joined #ruby
<fivetwentysix> Godd2: i know, always happens to my favourite porn sites
<Godd2> lol I was trying to show my room mate baconorbeercan.com
<fivetwentysix> is that a porn site?
<Godd2> I thought you were the expert on such matters...
dazonic has quit [Quit: dazonic]
joeycarmello has joined #ruby
cardoni has joined #ruby
cardoni has quit [Client Quit]
nomenkun has quit [Remote host closed the connection]
rippa has joined #ruby
gyre007 has joined #ruby
joeycarmello has quit [Ping timeout: 265 seconds]
tommyvyo has joined #ruby
alexspeller has joined #ruby
abstrusenick_ has joined #ruby
aharris6 has quit [Remote host closed the connection]
headius has quit [Quit: headius]
abstrusenick_ has quit [Client Quit]
headius has joined #ruby
gyre007 has quit [Ping timeout: 265 seconds]
abstrusenick has quit [Ping timeout: 272 seconds]
dankest has joined #ruby
mockra has quit [Remote host closed the connection]
aharris6 has joined #ruby
headius has quit [Ping timeout: 250 seconds]
headius has joined #ruby
headius has quit [Read error: Connection reset by peer]
burgestrand has joined #ruby
headius has joined #ruby
headius has quit [Read error: Connection reset by peer]
aharris6 has quit [Remote host closed the connection]
rondale_sc has quit [Quit: rondale_sc]
woolite644 has joined #ruby
generalissimo has joined #ruby
tonini has joined #ruby
Asher has joined #ruby
nomenkun has joined #ruby
thecreators has joined #ruby
voodoofish has quit [Read error: Connection reset by peer]
Asher has quit [Client Quit]
jsilver has quit [Ping timeout: 246 seconds]
keyvan has quit [Ping timeout: 255 seconds]
tagrudev has joined #ruby
seich- has quit [Ping timeout: 246 seconds]
keyvan has joined #ruby
keyvan has joined #ruby
keyvan has quit [Changing host]
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
ttt has joined #ruby
vlad_starkov has joined #ruby
jekotia has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
lenovodroid has quit [Ping timeout: 248 seconds]
browndawg1 has joined #ruby
browndawg has joined #ruby
browndawg1 has left #ruby [#ruby]
browndawg has quit [Client Quit]
browndawg has joined #ruby
jsilver has joined #ruby
vlad_starkov has quit [Ping timeout: 250 seconds]
danneu1 has joined #ruby
danneu has quit [Read error: Connection reset by peer]
alexspeller has quit [Ping timeout: 252 seconds]
nomenkun has quit [Remote host closed the connection]
sandGorgon1 has quit [Ping timeout: 260 seconds]
sandGorgon has quit [Ping timeout: 260 seconds]
mockra has joined #ruby
samuel02 has joined #ruby
iamjarvo has quit [Quit: Leaving.]
xyzodiac has quit [Quit: Computer has gone to sleep.]
seoaqua has joined #ruby
clocKwize has joined #ruby
clocKwize has quit [Client Quit]
tjbiddle has quit [Quit: tjbiddle]
huoxito has quit [Quit: Leaving]
mockra has quit [Ping timeout: 252 seconds]
michaelmartinez has joined #ruby
mafolz has joined #ruby
BoReD_WiSdOm has joined #ruby
clocKwize has joined #ruby
Banistergalaxy has quit [Remote host closed the connection]
x82_nicole has quit [Quit: Computer has gone to sleep.]
BoReD_WiSdOm has quit [Remote host closed the connection]
dmiller has joined #ruby
morf has joined #ruby
maesbn has joined #ruby
vlad_starkov has joined #ruby
robustus has quit [Ping timeout: 244 seconds]
companion has quit [Quit: Poweroff]
dmiller has quit [Ping timeout: 248 seconds]
luckyruby has joined #ruby
robustus has joined #ruby
t_hash has joined #ruby
dankest has quit [Quit: Leaving...]
sandGorgon has joined #ruby
arkiver has joined #ruby
arkiver has quit [Read error: Connection reset by peer]
arkiver has joined #ruby
arkiver has quit [Read error: Connection reset by peer]
arkiver has joined #ruby
bricker_ is now known as bricker
rellin has joined #ruby
zommi has joined #ruby
sandGorgon1 has joined #ruby
alexspeller has joined #ruby
gyre007 has joined #ruby
t_hash has quit [Quit: ZNC - http://znc.in]
qwerxy has joined #ruby
banisterfiend has joined #ruby
dankest has joined #ruby
manizzle has joined #ruby
dankest has quit [Client Quit]
gyre007 has quit [Ping timeout: 272 seconds]
generalissimo has quit [Remote host closed the connection]
timonv has joined #ruby
hotovson_ has joined #ruby
nemesit has joined #ruby
lenovodroid has joined #ruby
aetcore has joined #ruby
carlzulauf has quit [Ping timeout: 248 seconds]
stkowski has quit [Quit: stkowski]
thams has quit [Read error: Connection reset by peer]
Godd2 has quit [Quit: Page closed]
carlzulauf has joined #ruby
mengu has quit [Read error: Connection reset by peer]
thams has joined #ruby
Morkel has joined #ruby
browndawg has quit [Quit: Leaving.]
grzywacz has joined #ruby
aetcore has left #ruby [#ruby]
lenovodroid has quit [Read error: Connection reset by peer]
lenovodroid has joined #ruby
stoffus has joined #ruby
banisterfiend has quit [Ping timeout: 264 seconds]
Emmanuel_Chanel has quit [Quit: Leaving]
michaelmartinez has quit [Quit: Check it, Wreck it http://www.caffeineindustries.com/blog]
lenovodroid has quit [Read error: Connection reset by peer]
lenovodroid has joined #ruby
a_a_g has quit [Quit: Leaving.]
matrixise has joined #ruby
Nanuq has quit [Ping timeout: 246 seconds]
browndawg has joined #ruby
Emmanuel_Chanel has joined #ruby
dr_bob has joined #ruby
Nanuq has joined #ruby
eldariof has joined #ruby
yeban has quit [Ping timeout: 246 seconds]
alexspeller has quit [Ping timeout: 252 seconds]
sayan has quit [Ping timeout: 256 seconds]
rellin has quit [Ping timeout: 256 seconds]
Emmanuel_Chanel has quit [Quit: Leaving]
timonv has quit [Remote host closed the connection]
sayan has joined #ruby
aedorn has quit [Quit: Leaving]
maletor has joined #ruby
jprovazn has joined #ruby
arkiver has quit [Quit: Leaving]
andrewhl has quit [Remote host closed the connection]
mockra has joined #ruby
Emmanuel_Chanel has joined #ruby
chussenot has joined #ruby
Targen_ has joined #ruby
clocKwize has quit [Quit: clocKwize]
banjara has quit [Quit: Leaving.]
Targen has quit [Ping timeout: 264 seconds]
qwerxy has quit [Quit: offski]
rippa has quit [Ping timeout: 248 seconds]
banjara has joined #ruby
clocKwize has joined #ruby
mockra has quit [Ping timeout: 265 seconds]
timonv has joined #ruby
timonv has quit [Remote host closed the connection]
seich- has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
darthdeus has joined #ruby
tPl0ch has joined #ruby
darthdeus has quit [Client Quit]
darthdeus has joined #ruby
Shadow_S has joined #ruby
banseljaj is now known as imami|afk
nouh has quit [Remote host closed the connection]
nouh has joined #ruby
Villadelfia_ has joined #ruby
answer_42 has joined #ruby
banisterfiend has joined #ruby
Villadelfia has quit [Ping timeout: 265 seconds]
SeySayux has quit [Ping timeout: 265 seconds]
jimeh has joined #ruby
sayan_ has joined #ruby
darthdeus has quit [Ping timeout: 272 seconds]
browndawg has left #ruby [#ruby]
whomp has quit [Ping timeout: 250 seconds]
SeySayux has joined #ruby
jgrevich has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
alexspeller has joined #ruby
sayan has quit [Ping timeout: 260 seconds]
aganov has joined #ruby
nilg has joined #ruby
tjasko__ has quit [Read error: Connection reset by peer]
sandGorgon1 has quit [Ping timeout: 264 seconds]
sandGorgon has quit [Ping timeout: 260 seconds]
zigomir has joined #ruby
seoaqua has quit [Quit: 离开]
tfittsy has joined #ruby
Siphonblast has joined #ruby
banisterfiend has quit [Ping timeout: 265 seconds]
BigBosss has joined #ruby
gyre007 has joined #ruby
SiliconDon has joined #ruby
xyzodiac has joined #ruby
BigBosss is now known as BigBoss
BigBoss has quit [Client Quit]
clooth has joined #ruby
gyre007 has quit [Ping timeout: 272 seconds]
Vainoharhainen has joined #ruby
nouh has quit [Ping timeout: 252 seconds]
Silicon|Don has joined #ruby
Targen_ has quit [Ping timeout: 264 seconds]
nouh has joined #ruby
SiliconDon has quit [Ping timeout: 272 seconds]
donaldwauchop has joined #ruby
chord has quit [Quit: Page closed]
sandGorgon1 has joined #ruby
sandGorgon has joined #ruby
Silicon|Don has quit [Remote host closed the connection]
kil0byte has joined #ruby
emergion has joined #ruby
yeban has joined #ruby
cdt has joined #ruby
lolmaus has joined #ruby
donaldwauchop has quit [Quit: donaldwauchop]
cdt_ has joined #ruby
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
cdt has quit [Ping timeout: 272 seconds]
dawkirst_ has joined #ruby
tfittsy has quit [Ping timeout: 255 seconds]
alexspeller has quit [Ping timeout: 252 seconds]
l0wkey has quit [Ping timeout: 246 seconds]
havenn has quit [Ping timeout: 246 seconds]
chussenot has quit [Quit: chussenot]
wargasm has quit [Ping timeout: 264 seconds]
nouh has quit [Ping timeout: 250 seconds]
nouh has joined #ruby
Silicon|Don has joined #ruby
Silicon|Don has quit [Remote host closed the connection]
danneu1 has quit [Ping timeout: 252 seconds]
l0wkey has joined #ruby
ephemerian has joined #ruby
nouh_ has joined #ruby
Shadow_S has quit [Quit: Computer has gone to sleep.]
blacktulip has joined #ruby
apeiros_ has joined #ruby
Siphonblast has quit [Read error: Connection reset by peer]
nouh has quit [Ping timeout: 272 seconds]
headius has joined #ruby
nomenkun has joined #ruby
mockra has joined #ruby
banisterfiend has joined #ruby
havenn has joined #ruby
lenovodroid has quit [Ping timeout: 244 seconds]
vlad_starkov has quit [Remote host closed the connection]
Elhu has joined #ruby
browndawg has joined #ruby
nilg has quit [Read error: Connection reset by peer]
mockra has quit [Ping timeout: 260 seconds]
wargasm has joined #ruby
mneorr has quit [Remote host closed the connection]
sonne has quit [Quit: ZNC - http://znc.in]
sonne has joined #ruby
sayan_ has quit [Ping timeout: 264 seconds]
xpen has joined #ruby
Siphonblast has joined #ruby
main has joined #ruby
alexspeller has joined #ruby
Siphonblast has quit [Remote host closed the connection]
cheez0r has quit [Ping timeout: 264 seconds]
ikaros has joined #ruby
banjara has quit [Quit: Leaving.]
xyzodiac has quit [Quit: Computer has gone to sleep.]
sandeep__ has joined #ruby
thecreators has quit [Quit: thecreators]
a_a_g has joined #ruby
fyolnish has quit [Remote host closed the connection]
nilg has joined #ruby
cek has joined #ruby
mengu has joined #ruby
banisterfiend has quit [Remote host closed the connection]
nilg has quit [Remote host closed the connection]
aetcore has joined #ruby
aetcore has quit [Client Quit]
hamed_r has joined #ruby
danneu1 has joined #ruby
kylescottmcgill1 has joined #ruby
slainer68 has joined #ruby
kylescottmcgill1 has quit [Client Quit]
woolite644 has quit []
QKO_ has joined #ruby
_64k has joined #ruby
banisterfiend has joined #ruby
QKO has quit [Ping timeout: 264 seconds]
kil0byte has quit [Ping timeout: 246 seconds]
nomenkun has quit [Ping timeout: 256 seconds]
gyre007 has joined #ruby
sayan has joined #ruby
kylescottmcgill has joined #ruby
love_color_text has joined #ruby
Konboi has joined #ruby
Konboi has quit [Client Quit]
kil0byte has joined #ruby
danneu1 has quit [Ping timeout: 252 seconds]
xpen has quit [Read error: Connection timed out]
gyre007 has quit [Ping timeout: 272 seconds]
xpen has joined #ruby
alexspeller has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
Mon_Ouie has quit [Ping timeout: 272 seconds]
Virunga has joined #ruby
<MrSnakeOil> Good morning all.
hoelzro|away is now known as hoelzro
g_bleezy has quit [Remote host closed the connection]
chussenot has joined #ruby
_hemanth_ has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
Tumulte has joined #ruby
<Tumulte> Hi people
SeySayux has quit [Read error: Operation timed out]
sayan has quit [Read error: Connection reset by peer]
<witchdoc> hi all
timonv has joined #ruby
emergion has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Villadelfia_ has quit [Ping timeout: 264 seconds]
Villadelfia has joined #ruby
SeySayux has joined #ruby
nari_ has quit [Ping timeout: 245 seconds]
emergion has joined #ruby
banjara has joined #ruby
xpen has quit [Read error: Connection timed out]
xpen has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
ckipel has joined #ruby
lenovodroid has joined #ruby
Iszak has joined #ruby
Iszak has quit [Excess Flood]
Iszak has joined #ruby
Iszak has quit [Excess Flood]
earthquake has quit [Ping timeout: 264 seconds]
ckipel is now known as earthquake
nilg has joined #ruby
beiter has joined #ruby
gyre007 has joined #ruby
arkiver has joined #ruby
banjara has quit [Ping timeout: 264 seconds]
mahmoudimus has joined #ruby
_bart has joined #ruby
fatninja has joined #ruby
elaptics`away is now known as elaptics
atno has quit [Read error: Connection reset by peer]
rdark has joined #ruby
gyre007 has quit [Ping timeout: 264 seconds]
moted has quit [Ping timeout: 260 seconds]
postmodern has quit [Ping timeout: 264 seconds]
io_syl has quit [Quit: Computer has gone to sleep.]
segv-_ has joined #ruby
segv- has quit [Read error: Connection reset by peer]
segv-_ is now known as segv-
sepp2k has joined #ruby
mockra has joined #ruby
pxjorge has joined #ruby
atno has joined #ruby
gyre007 has joined #ruby
LouisGB has joined #ruby
wreckimnaked has joined #ruby
mockra has quit [Ping timeout: 252 seconds]
lkba has quit [Ping timeout: 264 seconds]
blaxter has joined #ruby
daniel_- has joined #ruby
daniel_- has joined #ruby
sayan has joined #ruby
niklasb has joined #ruby
thisirs has joined #ruby
berserkr has joined #ruby
francisfish has joined #ruby
timmow has joined #ruby
charliesome has joined #ruby
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
hamed_r has quit [Quit: Leaving]
generalissimo has joined #ruby
<_bart> Alright, my 2 cents of feel good for today.
<_bart> If it wasn't for ruby I would've quit programming, it's that sweet syntax that keeps me going.
<shevy> hehe
<shevy> _bart sounds like a drug
samphippen has joined #ruby
thone_ has joined #ruby
havenn has quit [Ping timeout: 264 seconds]
grzywacz has quit [Ping timeout: 265 seconds]
cheez0r has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.9.2]
banjara has joined #ruby
xpen has quit [Read error: Connection reset by peer]
sepp2k has quit [Quit: Leaving.]
nomenkun has joined #ruby
thone has quit [Ping timeout: 244 seconds]
adambeynon has joined #ruby
generalissimo has quit [Remote host closed the connection]
akemrir has joined #ruby
fyolnish has joined #ruby
alejandro_ has joined #ruby
niklasb has quit [Ping timeout: 272 seconds]
qwerxy has joined #ruby
kil0byte_ has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
banjara has quit [Ping timeout: 255 seconds]
cheez0r_ has joined #ruby
_alejandro has quit [Ping timeout: 264 seconds]
kil0byte has quit [Ping timeout: 244 seconds]
cheez0r has quit [Ping timeout: 252 seconds]
segv- has quit [Read error: Connection reset by peer]
segv- has joined #ruby
postmodern has joined #ruby
moted has joined #ruby
nemesit has quit [Quit: Leaving...]
tvw has joined #ruby
wallerdev has quit [Quit: wallerdev]
alexspeller has joined #ruby
rakl has quit [Quit: sleeping]
alexspeller has quit [Read error: Connection reset by peer]
mafolz has quit [Read error: No route to host]
odinswand has joined #ruby
tonini has quit [Remote host closed the connection]
havenn has joined #ruby
rdark has quit [Ping timeout: 248 seconds]
waxjar has joined #ruby
alexspeller has joined #ruby
mafolz has joined #ruby
lkba has joined #ruby
jlebrech has joined #ruby
rdark has joined #ruby
aaronmacy has quit [Quit: Leaving.]
DaZ has quit [Ping timeout: 248 seconds]
atmosx has joined #ruby
havenn has quit [Ping timeout: 272 seconds]
nouh_ has quit [Remote host closed the connection]
kylescottmcgill has left #ruby [#ruby]
nouh has joined #ruby
pcarrier has joined #ruby
includex has joined #ruby
nouh_ has joined #ruby
banjara has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
nouh_ has quit [Remote host closed the connection]
nouh_ has joined #ruby
<MrSnakeOil> _bart , the thing for me is that it really does do what I expect it to do. I'm very new to Ruby but am loving and loving it.
nomenkun has joined #ruby
DaZ has joined #ruby
nouh has quit [Ping timeout: 244 seconds]
regedarek has joined #ruby
cousine has joined #ruby
mockra has joined #ruby
<regedarek> How to using map return many attributes? something like that map(&:title, &:content)
rakunHo has joined #ruby
rakunHo is now known as rakuN
foohey has joined #ruby
foohey has quit [Client Quit]
foohey has joined #ruby
chrismcg is now known as zz_chrismcg
thisirs has quit [Remote host closed the connection]
seanstickle has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
JDubs has joined #ruby
<JDubs> hey guys! :) o/
earthquake has quit [Read error: Connection reset by peer]
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mockra has quit [Ping timeout: 255 seconds]
earthquake has joined #ruby
banjara has quit [Ping timeout: 248 seconds]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
nemesit has joined #ruby
fivetwentysix has quit [Ping timeout: 246 seconds]
qwerxy has quit [Quit: Computer has gone to sleep.]
sepp2k has joined #ruby
cheez0r_ has quit [Read error: Connection reset by peer]
cheez0r has joined #ruby
jlebrech has quit [Quit: Computer has gone to sleep.]
jprovazn has quit [Quit: Leaving]
[Neurotic] has quit [Ping timeout: 265 seconds]
jonahR has quit [Quit: jonahR]
caveat- has quit [Ping timeout: 248 seconds]
sepuku has quit [Ping timeout: 248 seconds]
havenn has joined #ruby
Banistergalaxy has joined #ruby
banisterfiend has quit [Ping timeout: 256 seconds]
tommyvyo has quit [Quit: http://thomasvendetta.com]
danneu1 has joined #ruby
nouh_ has quit [Remote host closed the connection]
banisterfiend has joined #ruby
Averna has joined #ruby
odinswand has quit [Quit:]
agarie has quit [Remote host closed the connection]
sepuku has joined #ruby
caveat- has joined #ruby
wreckimnaked has quit [Ping timeout: 248 seconds]
danneu1 has quit [Ping timeout: 252 seconds]
pcarrier has quit []
sandGorgon has quit [Quit: Leaving]
grzywacz has joined #ruby
main has quit [Ping timeout: 255 seconds]
havenn has quit [Ping timeout: 265 seconds]
main has joined #ruby
main has quit [Read error: Connection reset by peer]
arturaz has joined #ruby
banjara has joined #ruby
lenovodroid has quit [Ping timeout: 260 seconds]
main has joined #ruby
emergion has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
main has quit [Remote host closed the connection]
w|t_ has joined #ruby
main has joined #ruby
headius has quit [Quit: headius]
w|t has quit [Ping timeout: 246 seconds]
rdark has quit [Ping timeout: 260 seconds]
eka has quit [Remote host closed the connection]
rdark has joined #ruby
Astral__ has joined #ruby
daniel_- has joined #ruby
daniel_- has joined #ruby
daniel_- has quit [Client Quit]
Astral_ has quit [Ping timeout: 248 seconds]
banjara has quit [Ping timeout: 246 seconds]
pxjorge has quit [Ping timeout: 264 seconds]
Kuifje has joined #ruby
Kuifje has quit [Changing host]
Kuifje has joined #ruby
pxjorge has joined #ruby
yshh has quit [Remote host closed the connection]
Catnaroek has quit [Ping timeout: 248 seconds]
browndawg has quit [Ping timeout: 252 seconds]
cousine has quit [Remote host closed the connection]
k610 has joined #ruby
browndawg has joined #ruby
browndawg has quit [Client Quit]
seanstickle has quit [Quit: seanstickle]
deadalus has joined #ruby
deadalus has quit [Changing host]
deadalus has joined #ruby
v0n has joined #ruby
slainer68 has quit [Remote host closed the connection]
qwerxy has joined #ruby
mockra has joined #ruby
mockra has quit [Ping timeout: 265 seconds]
skaflem has joined #ruby
timonv has quit [Remote host closed the connection]
polymar has joined #ruby
polymar has quit [Remote host closed the connection]
<_bart> Is the usage of attr_accessor in a class alway thread unsafe?
browndawg has joined #ruby
banjara has joined #ruby
robbyoconnor has quit [Ping timeout: 255 seconds]
cousine has joined #ruby
jonahR has joined #ruby
Divinite has joined #ruby
banisterfiend has quit [Remote host closed the connection]
burgestrand has quit [Quit: Leaving.]
love_color_text has quit [Remote host closed the connection]
pothibo has joined #ruby
blaxter has quit [Ping timeout: 246 seconds]
wreckimnaked has joined #ruby
chussenot has quit [Quit: chussenot]
skaczor has joined #ruby
banjara has quit [Ping timeout: 265 seconds]
jonahR has quit [Quit: jonahR]
gbchaosmaster has quit [Ping timeout: 265 seconds]
hamed_r has joined #ruby
diece has joined #ruby
danneu1 has joined #ruby
timonv has joined #ruby
SeySayux has quit [Read error: Connection reset by peer]
Villadelfia has quit [Read error: Connection reset by peer]
lenovodroid has joined #ruby
ltsstar has joined #ruby
slainer68 has joined #ruby
alexspeller has quit [Remote host closed the connection]
SeySayux has joined #ruby
danneu1 has quit [Ping timeout: 244 seconds]
jonathanwallace has quit [Ping timeout: 255 seconds]
razibog has joined #ruby
Goles has joined #ruby
Averna has quit [Quit: Leaving.]
Villadelfia has joined #ruby
SeySayux_ has joined #ruby
qwerxy has quit [Quit: Computer has gone to sleep.]
SeySayux has quit [Ping timeout: 265 seconds]
kil0byte has joined #ruby
k611 has joined #ruby
elico has joined #ruby
diece is now known as MathNEET
k610 has quit [Ping timeout: 255 seconds]
kil0byte_ has quit [Ping timeout: 260 seconds]
Divinite has quit [Ping timeout: 245 seconds]
slainer68 has quit [Ping timeout: 264 seconds]
blaxter has joined #ruby
elico has quit [Client Quit]
ram2 has joined #ruby
ram2 has left #ruby [#ruby]
<charliesome> _bart: only if you're defining the class in two threads at once...
<charliesome> also probably not
yshh has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
chussenot has joined #ruby
Divinite has joined #ruby
Virunga has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 272 seconds]
<MathNEET> $$\forall x$$
pcarrier_ has joined #ruby
<MathNEET> sorry.
zz_chrismcg is now known as chrismcg
ackram has quit [Remote host closed the connection]
<k611> how can i refresh my rvm ? start from new ?
<MathNEET> What is that?
banjara has joined #ruby
Goles has quit [Quit: Computer has gone to sleep.]
<k611> seems my rvm got corrupt coz i can install a gem on a fersh rvm but not on the supposedly corrupt one
Goles has joined #ruby
<MathNEET> What is "rvm"?
nomenkun has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
nomenkun has quit [Remote host closed the connection]
nomenkun has joined #ruby
sayan has quit [Read error: Connection reset by peer]
<Xeago> MathNEET: a ruby version manager
nouh has joined #ruby
<Xeago> I think there is a command rvm nuke or something like that
<Xeago> also consider other version managers
<Xeago> rb_fu (iirc?), rbenv
lenovodroid has quit [Read error: Connection reset by peer]
jonathanwallace has joined #ruby
<MathNEET> Subversion manager?
sandeep__ has quit [Read error: Connection reset by peer]
sandGorgon1 has quit [Read error: Connection reset by peer]
PragCypher has joined #ruby
sandGorgon has joined #ruby
sandGorgon1 has joined #ruby
nouh has quit [Ping timeout: 252 seconds]
<Xeago> MathNEET: what?
hotovson_ has quit [Remote host closed the connection]
Jasko has joined #ruby
slainer68 has joined #ruby
banjara has quit [Ping timeout: 264 seconds]
_br_ has quit [Excess Flood]
cousine has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 246 seconds]
_br_ has joined #ruby
Banistergalaxy has joined #ruby
alexspeller has joined #ruby
<MathNEET> Sorry, but I could not understand what you mean. Bye.
Rollabunna has joined #ruby
browndawg has left #ruby [#ruby]
mockra has joined #ruby
Rollabunna has quit [Remote host closed the connection]
<arturaz> Xeago, rvm implode
_br_ has quit [Excess Flood]
<arturaz> k611, ^^
jfl0wers has joined #ruby
Goles has quit [Ping timeout: 252 seconds]
Goles has joined #ruby
<k611> arturaz, i tried "rvm uninstall rubyVersionX" will use explosives if required
lenovodroid has joined #ruby
danieldocki has joined #ruby
_br_ has joined #ruby
mockra has quit [Ping timeout: 265 seconds]
nwertman has joined #ruby
nari_ has joined #ruby
alexspeller has quit [Ping timeout: 252 seconds]
KevinSjoberg has joined #ruby
jfl0wers has quit [Quit: jfl0wers]
slainer6_ has joined #ruby
mark_locklear has joined #ruby
qwerxy has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
slainer68 has quit [Ping timeout: 264 seconds]
moos3 has joined #ruby
sailias has joined #ruby
slainer68 has joined #ruby
adkron has quit [Ping timeout: 272 seconds]
chussenot has quit [Quit: chussenot]
<Divinite> No explosives required
<Divinite> Only cake
<Divinite> And everyone knows the cake is a lie
KevinSjoberg has quit [Quit: Textual IRC Client: www.textualapp.com]
niklasb has joined #ruby
NiteRain has quit [Ping timeout: 246 seconds]
breakingthings has joined #ruby
slainer6_ has quit [Ping timeout: 272 seconds]
ryannielson has joined #ruby
eurythmmia has quit [Remote host closed the connection]
alexspeller has joined #ruby
sayan has joined #ruby
lenodroid has joined #ruby
lenovodroid has quit [Read error: Connection reset by peer]
cousine has joined #ruby
atmosx has joined #ruby
oxman has joined #ruby
SeySayux_ has quit [Read error: Connection reset by peer]
Villadelfia has quit [Read error: Connection reset by peer]
<oxman> I try to make a DSL, and for a clean DSL I should use instance_exec, but its seems not recommanded, so why Rails use it ?
<hoelzro> oxman: where did you read that it isn't recommended?
banjara has joined #ruby
danneu1 has joined #ruby
<oxman> I found lots of blog said it should not be used in most case, and pass the object to the block with yield sef is better
topek has left #ruby [#ruby]
browndawg has joined #ruby
<Divinite> oxman: You're doing it wrong!
<oxman> hum ?
<hoelzro> oxman: passing self explicitly is probably cleaner and less magical
<Divinite> oxman: Don't trust aytone.
<Divinite> *anyone
<oxman> Divinite i'm here for that ;)
chussenot has joined #ruby
<Divinite> Is anyone here able to write a small script for me quickly?
ner0x has joined #ruby
<Divinite> Considering I crack the funnies all the time. Looking at you shevy, you dirty Jentile lol
danneu1 has quit [Ping timeout: 252 seconds]
jonathanwallace has quit [Ping timeout: 252 seconds]
carloslopes has joined #ruby
lenodroid has quit [Read error: Connection reset by peer]
lenodroid has joined #ruby
sailias has quit [Quit: Leaving.]
Dario_ has joined #ruby
banjara has quit [Ping timeout: 252 seconds]
jjbohn has joined #ruby
lenodroid has quit [Read error: Connection reset by peer]
jkarayusuf has joined #ruby
geekbri has joined #ruby
eka has joined #ruby
vlad_starkov has joined #ruby
nanothief has quit [Ping timeout: 256 seconds]
greengriminal has joined #ruby
polymar has joined #ruby
v0n has joined #ruby
tjasko__ has joined #ruby
polymar has quit [Remote host closed the connection]
tommyvyo has joined #ruby
MathNEET has quit [Quit: Leaving.]
eka has quit [Ping timeout: 264 seconds]
diece has joined #ruby
browndawg has left #ruby [#ruby]
Mon_Ouie has joined #ruby
enroxorz-work has joined #ruby
Jasko has quit [Ping timeout: 272 seconds]
jhchabran has quit [Remote host closed the connection]
hybRis has joined #ruby
invisime has joined #ruby
krawchyk has joined #ruby
bluOxigen has joined #ruby
hamed_r has quit [Quit: Leaving]
<hybRis> Hi guys, I am a semi-experienced php developer and am looking to get into ruby & rails dev. I did the interactive tutorials, railsforzombies and whatever the related ruby one is but feel like i need a more solid foundation. is there any book someone recommends for getting into rails and goes through the required ruby stuff as well? everything i've found seems to be one or the other
<hoelzro> hybRis: I don't know about Rails, but as far as Ruby goes, I will recommend the excellent "The Ruby Programming Language"
Divinite has quit [Quit: Divinite has left :(]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
krawchyk has quit [Remote host closed the connection]
rakuN has quit [Remote host closed the connection]
<Xeago> from what I have seen, it is recommended to learn ruby a tiny bit, and then rails (not ruby)
<Xeago> quote: "It feels like a different language"
jhchabran has joined #ruby
browndawg has joined #ruby
a_a_g has quit [Quit: Leaving.]
joofsh has joined #ruby
krawchyk has joined #ruby
kil0byte has quit [Ping timeout: 256 seconds]
ms__ has joined #ruby
sandGorgon1 has quit [Ping timeout: 272 seconds]
sandGorgon has quit [Ping timeout: 272 seconds]
kil0byte has joined #ruby
Spami has joined #ruby
<Spami> hello
graeme has joined #ruby
lkba has quit [Ping timeout: 255 seconds]
sayan has quit [Read error: Connection reset by peer]
bluenemo has quit [Quit: Verlassend]
mockra has joined #ruby
diece has left #ruby [#ruby]
GoGoGarrett has joined #ruby
miskander has joined #ruby
nari_ has quit [Ping timeout: 252 seconds]
rondale_sc has joined #ruby
miskander has quit [Client Quit]
clocKwize has quit [Quit: clocKwize]
eka has joined #ruby
theRoUS has quit [Ping timeout: 260 seconds]
jjbohn has quit [Quit: Leaving...]
mockra has quit [Ping timeout: 265 seconds]
jjbohn has joined #ruby
ltsstar has quit [Quit: ltsstar]
solidoodlesuppor has joined #ruby
thatguycraig has joined #ruby
jrajav has joined #ruby
alejandro_ has quit [Remote host closed the connection]
noxoc has joined #ruby
alanp_ is now known as alanp
aquaranto has joined #ruby
chussenot has quit [Quit: chussenot]
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
kil0byte_ has joined #ruby
clooth has quit [Quit: clooth]
alexspeller has quit [Ping timeout: 252 seconds]
NiteRain has joined #ruby
kil0byte has quit [Ping timeout: 248 seconds]
nwertman has quit [Ping timeout: 265 seconds]
alexspeller has joined #ruby
<Spami> Hey, I'm trying to get a render :json -> "success" in javavascript but it seems like the render is not working and i have no clue why http://pastebin.com/FuPXpXsR and http://pastebin.com/4cYSEbZ0
breakingthings has joined #ruby
<alexspeller> Not working how?
lolmaus has quit []
<Spami> the javascript is never getting the json
<oxman> My load file can't access the local variable route ? How can i solve this ? http://paste.bouh.org/f2f39dc76a40a5fd6a2f7182d6ef7c68ea8dcc7c
<alexspeller> Well that's not json
chussenot has joined #ruby
<alexspeller> render :json => "success" will call "success".to_json
jenrzzz has quit [Ping timeout: 272 seconds]
blaxter has quit [Quit: foo]
<alexspeller> Javascript will then try to do JSON.parse("success")
<alexspeller> That is a syntax error
<alexspeller> as the string "success" is not valid json
<Spami> but render :json -> "success" is returning a json string
danneu1 has joined #ruby
<alexspeller> No, render :json => "success" just renders a page with nothing but "success"
<alexspeller> which is not valid json
<alexspeller> I just checkd
<alexspeller> That's what it does
jenrzzz has joined #ruby
<alexspeller> You need to either do this: render :success, nothing: true
<alexspeller> That well render nothing with 200 response code, that's what you should do if you don't want any value apart from the fact that it worked
ms__ has quit [Quit: Quitte]
<alexspeller> or if you have a value, you can do:
<alexspeller> render json: {foo: "bar"}
<alexspeller> And return a value
<Spami> alexspeller, but then how can I check on the javascript side with only a 200 response code ?
lenovodroid has joined #ruby
<alexspeller> You have an action, that can either fail or not, and that's the only output right?
<alexspeller> So if it worked, render 200 response
danneu1 has quit [Ping timeout: 252 seconds]
jjbohn has quit [Quit: Leaving...]
<alexspeller> If it didn't, return with a different response code that's a failure
<alexspeller> HTTP is good; use it ;)
cascalheira has joined #ruby
<Spami> yes, i will
<alexspeller> It looks like you're checking an auth token, so a semantically valid http response for failure could be 401 Unauthorized
morf has quit [Quit: eof]
<alexspeller> so for failure, you should do:
niklasb has quit [Ping timeout: 265 seconds]
danieldocki has quit [Quit: Leaving...]
<alexspeller> Sorry, I think the previous one is not the best syntax
<alexspeller> So for success, do:
<alexspeller> head :ok
<alexspeller> for failure do:
<alexspeller> head :unauthorized
<alexspeller> and then in javascript, have a callback for success and a callback for failure
dr_bob has quit [Quit: Leaving.]
browndawg1 has joined #ruby
browndawg has quit [Ping timeout: 272 seconds]
ttt has quit [Remote host closed the connection]
ttt has joined #ruby
ttt has quit [Remote host closed the connection]
banisterfiend has joined #ruby
sailias has joined #ruby
qwerxy has quit [Quit: Computer has gone to sleep.]
dmerrick has joined #ruby
<Spami> thanks alexspeller
<alexspeller> no problem, good luck :)
andrewhl has joined #ruby
danneu1 has joined #ruby
nari_ has joined #ruby
jeffreybaird has joined #ruby
freeayu has quit [Remote host closed the connection]
<_sillymarkets> Can anyone help me out with my rescue block? https://gist.github.com/4337143
clocKwize has joined #ruby
wermel has joined #ruby
<_sillymarkets> if i leave the rescue block in, it catches every connection as "Connection Reset by Peer"... if comment it out, the entire loop succesfully connects and runs commands on each device, I cant figure out why the rescue isnt working
axl_ has joined #ruby
Rollabunna has joined #ruby
Rollabunna has quit [Remote host closed the connection]
lusory has joined #ruby
axl_ has quit [Client Quit]
miskander has joined #ruby
<alexspeller> _sillymarkets: your rescue block applies to the begin structure, I think you have some confusion over the rescue and the end while bit
danneu1 has quit [Ping timeout: 252 seconds]
stopbit has joined #ruby
_alejandro has joined #ruby
jrist-afk is now known as jrist
meskyanichi has quit [Quit: Linkinus - http://linkinus.com]
taoru has quit [Remote host closed the connection]
adamnbowen has joined #ruby
<_sillymarkets> alexspeller : Im trying to get it to apply to the begin structure, I thought thats what was happening... if it fails on connect, i - 1, and retry the loop (effectively going to the next device connection on the list)
frem has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
<alexspeller> This makes more sense, although you'll have to check it's still doing what you want to: https://gist.github.com/4337187
<alexspeller> See how there are two begins, one for the while loop and one for the exception/rescue block
<_sillymarkets> oh okay, i see what you are saying
Morkel has quit [Quit: Morkel]
thmzlt has joined #ruby
Uranio has joined #ruby
<alexspeller> And remember, if there is no begin with a rescue, it applies to the whole method
hybRis has quit [Quit: Leaving]
<_sillymarkets> okay
pu22l3r_ has quit [Remote host closed the connection]
alx- has joined #ruby
<alexspeller> e.g these two mean the same thing: https://gist.github.com/81f28c0c2572e349e2e5
timonv has quit [Remote host closed the connection]
R3dy has joined #ruby
<R3dy> Is there a way to determine the 'cid' value of an image
<R3dy> so I can embed it in an html email
<R3dy> like <img src="cid:blablablbal">
<Xeago> what is cid?
<R3dy> not sure but I'm trying to embed an image in an email and send it with net/smtp
<eka> yea what's a cid
<R3dy> when I follow every guide I can find on the internet
<R3dy> it doesn't work
<R3dy> the image comes up as a red x
<Xeago> base64 doesn't work?
<R3dy> when I view teh source of an image that does come through
<R3dy> I can see in teh source <img src="cid:some value...")
<R3dy> correct base64 not working
<R3dy> here is what I am trying
stopbit has quit [Ping timeout: 264 seconds]
<_sillymarkets> thanks again alexspeller , first time im playing with rescue
jenrzzz has joined #ruby
<eka> R3dy: so the cid is when the image is attached or something like that?
<R3dy> yeah like in a signature
<R3dy> I'm just trying to put an image in a signature
<R3dy> so there is my code
<R3dy> message either shows up in junk filter
PragCypher has quit [Quit: Leaving]
<R3dy> or shows up in inbox but with red-x
<Xeago> how about proper html?
<eka> R3dy: shouldnt be attached?
<R3dy> proper html?
<R3dy> you mean like <img src="url to the image">
<R3dy> ?
<Xeago> and where do you add the attachment to the message?
<Xeago> proper html as in body
<R3dy> I'm not attaching I'm trying to embed
pu22l3r has joined #ruby
<R3dy> you really think that makes a dif?
<eka> R3dy: I mean... use cid but attach the picture to the email
<R3dy> I'll try
<R3dy> so I can look up how to attach the picture
<R3dy> but I don't know how to ge tteh cid
<R3dy> so that it shows up in the body of the message
<Xeago> R3dy: what I think the cid is: content id in a multi-part e-mail
__BigO__ has joined #ruby
<R3dy> eka: so that tutorial shows how to attach the image
mahmoudimus has joined #ruby
<R3dy> but that won't acctually show up in the body correct?
lanken has quit [Ping timeout: 245 seconds]
wallerdev has joined #ruby
mockra has joined #ruby
<eka> R3dy: see this gem https://github.com/mikel/mail
daniel_hinojosa1 has joined #ruby
timonv has joined #ruby
darthdeus has joined #ruby
robbyoconnor has joined #ruby
stopbit has joined #ruby
mockra has quit [Ping timeout: 245 seconds]
<R3dy> There are a dozen or more code snipets on the internet claiming to do exactly what I am trying to do
<R3dy> which is send an email with a base64 encoded image in the body of the message
<R3dy> none of them seem to acctually work
<R3dy> so naturally I assume the problem is with my email server
<R3dy> blocking images perhaps
<R3dy> except I can send myself an email with an embeded image using a client
_nitti has joined #ruby
sayan has joined #ruby
clooth has joined #ruby
mmitchell has joined #ruby
MrSnakeOil has quit [Quit: MrSnakeOil]
cakehero has joined #ruby
willob has joined #ruby
zommi has left #ruby [#ruby]
jonathanwallace has joined #ruby
clocKwize has quit [Quit: clocKwize]
arkiver has quit [Ping timeout: 244 seconds]
hashpuppy has joined #ruby
<hashpuppy> can i do module Admin::MyModule instead of module Admin; module MyModule?
<banisterfiend> hashpuppy: probably
miskander has quit [Quit: miskander]
<alexspeller> hashpuppy: only if module Admin is already defined elsewhere and is loaded prior to that definition
<hashpuppy> that's right. thanks
samphippen has quit [Quit: Computer has gone to sleep.]
Guest25886 has joined #ruby
<banisterfiend> hashpuppy: it also depends on whether you intend to write a method that uses constants defined in MyModule
<banisterfiend> defined in Admin i mean
<banisterfiend> if you do, then opening the module with Admin::MyModule won't work very well
chussenot has quit [Quit: chussenot]
sriehl has joined #ruby
failshell has joined #ruby
kil0byte_ has quit [Remote host closed the connection]
PragCypher has joined #ruby
pxjorge has quit [Quit: Leaving]
<failshell> hello. i have the following JSON: http://pastebin.ca/2294936. I can't seem to figure out how to extract only the line tht has lpi-mongodb-03 in it, to extract the _id key
<failshell> anyone can help?
malcolmva has quit [Ping timeout: 264 seconds]
<hoelzro> failshell: what code do you have so far to solve this issue?
lkba has joined #ruby
<failshell> none that works
<failshell> i can easily extract one key
<failshell> i tried using a regex to match the line
joshman_ has joined #ruby
rippa has joined #ruby
IrishGringo has joined #ruby
niklasb has joined #ruby
nateberkopec has joined #ruby
<hoelzro> failshell: have you tried just loading the JSON using a JSON parser?
keymone has joined #ruby
tagrudev has quit [Remote host closed the connection]
<failshell> a case of not enough coffeine
<failshell> silly me
skaflem has left #ruby [#ruby]
Gue______ has joined #ruby
nomenkun has quit [Remote host closed the connection]
main has quit [Ping timeout: 250 seconds]
stoffus has quit [Quit: The computer fell asleep]
_nitti has quit [Remote host closed the connection]
DerkTheDaring has joined #ruby
jlast has joined #ruby
<DerkTheDaring> Hey, quick question if anyone is around
_nitti has joined #ruby
w|t_ is now known as w|t
havenn has joined #ruby
<DerkTheDaring> In this example: https://gist.github.com/4337618 what does the * mean?
w|t is now known as Whackatre
Whackatre has quit [Changing host]
Whackatre has joined #ruby
Whackatre is now known as w|t
dpk is now known as dpkbis
doodlehaus has joined #ruby
dpkbis is now known as dpk
Nadya^ has joined #ruby
slainer68 has quit [Ping timeout: 264 seconds]
<DerkTheDaring> Does it mean that *e can represent variable length arrays?
<jkarayusuf> Open up irb and run: [1,2,3].map { |value| [*value] }
<jkarayusuf> It should be easier to see than explain
Nadya^ has left #ruby [#ruby]
d2dchat has joined #ruby
<Xeago> there is no difference removing the splat?
mafolz has quit [Quit: mafolz]
danieldocki has joined #ruby
nari_ has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Remote host closed the connection]
Gue______ is now known as asteve
<DerkTheDaring> Yeah I ran it with and without the splat and it returned the same thing
thmzlt has quit [Remote host closed the connection]
<jkarayusuf> better example: [1,2,3, [4,5,6]].map { |value| [*value] }
<DerkTheDaring> okay, that makes it more clear
<jkarayusuf> more or less the splat is doing Array(value).flatten
C0deMaver1ck has joined #ruby
slainer68 has joined #ruby
<DerkTheDaring> jkarayusuf: Thank you
thmzlt has joined #ruby
<Xeago> thanks
mikecmpbll has joined #ruby
tfittsy has joined #ruby
<rismoney> do i have this wrong - is_ip = is_type == ('ipaddress' || 'ip') does this mean if is_type eq 'ipaddress' or is_type eq 'ip' then is_ip = true ?
<Xeago> rismoney: yes
mvangala has quit [Read error: Connection reset by peer]
<Xeago> is_ip will always be false
<Xeago> unless is_type = true
mvangala has joined #ruby
<Xeago> as ('ipaddress' || 'ip') #=> true
Shamgar has quit [Ping timeout: 250 seconds]
<Xeago> wait!
<rismoney> doesn't seem to work in my rspec ;)
<Xeago> scratch that
<Xeago> ('ipaddress' || 'ip') #=> 'ipaddress'
<Xeago> so it is the same as is_type == 'ipaddress'
Shamgar has joined #ruby
graeme has quit [Quit: graeme]
dr_bob has joined #ruby
<rismoney> let me try
miskander has joined #ruby
miskander has quit [Client Quit]
qwerxy has joined #ruby
huoxito has joined #ruby
natewalck has joined #ruby
<natewalck> Morning
<natewalck> What is the best way to get the differences between two arrays, either way
alex__c2022 has joined #ruby
<oqa> nate: b - a
<natewalck> right
<natewalck> but what about a - b
<natewalck> I want to know the differences in that direction as well
<oqa> (b-a) + (a-b) maybe
miskander has joined #ruby
maesbn has quit [Remote host closed the connection]
Playground has joined #ruby
jgrevich has joined #ruby
<natewalck> hrmm
<natewalck> my problem may also be a sort issue
wallerdev has quit [Quit: wallerdev]
<natewalck> the items are not in the same order, so I get interesting results
<oqa> "may also be" sounds interesting
Steve1UK has joined #ruby
mvangala_ has joined #ruby
<shevy> eeks
<shevy> lisp!
<natewalck> blah = ["a", "b"] bleh = ["b", "a"]
<rismoney> xeago, strangely - this works for me... is_fs = (is_type == 'fileshare') || (is_type =='fs')
<Xeago> rismoney: I wouldn't call that strange
mvangala has quit [Read error: Connection reset by peer]
<oqa> natewalck: - ignores order
<natewalck> oqa: on 1.8.7 as well?
<oqa> I think so
<oqa> it just looks at the items
<rismoney> xeagi - but this doesn't do the same thing -- is_fs = is_type == ('fileshare' || 'fs') doesn't
earthquake has quit [Read error: Operation timed out]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
x82_nicole has joined #ruby
earthquake has joined #ruby
<Xeago> rismoney: because ('fileshare' || 'fs') us always 'fileshare'
eldariof has quit [Ping timeout: 255 seconds]
axl_ has joined #ruby
<oqa> works even for duplicates
darthdeus has quit [Quit: Linkinus - http://linkinus.com]
<Xeago> because 'fileshare' is a true'th value
mmitchel_ has joined #ruby
Dreamer3 has joined #ruby
<oqa> natewalck: if you're worried about the order, you'll anyways need to figure out what is the right way to order the lists if a & b are in different order
<rismoney> why is fileshare a true'th value if it is nil (imho)
<natewalck> I also realized
manizzle has quit [Ping timeout: 260 seconds]
<natewalck> I'm working with ObjC arrays, not ruby arrays
<Xeago> ('fileshare' || 'fs') 'fileshare' is a string
<natewalck> which may explain the funkyness
<natewalck> I should probably convert them to ruby arrays
<rismoney> yes
judd7_ has joined #ruby
<rismoney> oh...
<oqa> natewalck: out of curiosity, how are you using objc arrays in ruby?
<rismoney> i get it xeago!
<natewalck> oqa: I am reading settings from a plist and comparing them to another plist's contents
<natewalck> if there is a server listed in one but not the other, or vice versa, I want to run a process
<rismoney> and because its a logical or, if fileshare is string and true'th it will eval to true
mmitchell has quit [Ping timeout: 246 seconds]
vlad_starkov has joined #ruby
<natewalck> when I manually create an array in irb and do the subtract, it works fine
<natewalck> but when I do it with the ObjC arrays, it does not....
<Xeago> rismoney: actually it will eval to 'fileshare'
weasels is now known as otters
<oqa> natewalck: I guess that depends on how smart the layer is between ruby and objc
<natewalck> apparently not very :)
<natewalck> I'm trying to use to_ary
jekotia has joined #ruby
judd7_ has quit [Client Quit]
<natewalck> doesn't seem to be doing what I think it should
carloslopes has quit [Remote host closed the connection]
<oqa> what are the objects in the arrays?
judd7_ has joined #ruby
carloslopes has joined #ruby
<oqa> - won't work if the objects do not behave in a friendly way
<natewalck> they are servers in FQDN form
judd7_ has quit [Client Quit]
vlad_sta_ has joined #ruby
<natewalck> strings
<natewalck> I believe
<rismoney> xeago - right
<rismoney> coolio
vlad_sta_ has quit [Client Quit]
<natewalck> oqa: let me give you a better example of the weirdness I've encountered
<natewalck> I have server_list1 = ["server01.company.com", server02.company.com"]
zigomir has quit [Read error: Connection reset by peer]
<natewalck> server_list2 = ["server02.company.com", server01.company.com"]
<natewalck> server_list2 - server_list1 works
<natewalck> but server_list1 - server_list2 returns both entries
vlad_starkov has quit [Ping timeout: 255 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
zigomir has joined #ruby
<oqa> you're missing "s
<oqa> ;)
<sifi|workd> natewalck: yeah, it works fine on my system
<natewalck> sifi|workd: using ObjC?
Spami has quit [Ping timeout: 272 seconds]
<natewalck> or native ruby arrays?
<natewalck> It works when I am working with native ruby arrays
vlad_starkov has joined #ruby
<sifi|workd> natewalck: sorry, native ruby arrays
<natewalck> when I am using ObjC arrays, it behaves as I described :(
Spami has joined #ruby
<bean> this is #ruby not #objc ?
<natewalck> bean: its osx/cocoa
<natewalck> a ruby module
<natewalck> (gem?)
<sifi|workd> Are you talking about MacRuby?
fjfish has joined #ruby
adelgado has joined #ruby
<bean> no, RubyCocoa apparently.
<natewalck> yea, RubyCocoa
<natewalck> I'm using it for reading plists
postmodern has quit [Quit: Leaving]
<sifi|workd> I haven't touched that yet. GL.
<bean> natewalck: you do know there is just a plist gem, right?
<natewalck> bean: yea, I am writing this so it works without any external dependancies
ltsstar has joined #ruby
<natewalck> I wonder if the Plist gem handles binary plists
<bean> o.o and osx/cocoa isn't an external dependancy?
tjbiddle has joined #ruby
<natewalck> bean: nope, built in to OS X
vlad_starkov has quit [Ping timeout: 252 seconds]
<bean> 1.9.3-p327 :001 > require 'osx/cocoa'
<bean> LoadError: cannot load such file -- osx/cocoa
<natewalck> external as in something I don't need to install along with my script
francisfish has quit [Ping timeout: 264 seconds]
<natewalck> are you on OS X?
<bean> yes sir.
<natewalck> version?
Villadelfia has joined #ruby
<natewalck> oh
<natewalck> you are using a non-standard ruby version
<adelgado> newb here: I have a call to a model that looks something like class.find(id).many_children.max_by( &:id ). The max_by is the wrong way to get to the right child. What would kind of syntax do I have available to me to select a child based on a value returned in the class.find(id) call? Do I have to break it up into two statements?
<natewalck> OS X ships with 1.8.7
<natewalck> you installed 1.9.3 it looks like
<bean> natewalck: the majority of people that care about ruby on OSX will have done some sort of RVM install of something better than 1.8
<bean> 1.8 is old and jank, 1.9+ is new and awesome
<natewalck> bean: I am managing client machines
SeySayux has joined #ruby
<natewalck> so I need it to just work
<natewalck> without upgrading ruby, managing the default version, etc
<natewalck> plus, I can hand this to anyone running 10.8 and it will work
<natewalck> probably 10.6 through 10.8
carloslopes has quit [Remote host closed the connection]
<bean> natewalck: can I see the objc part, then? I'll see what I can make of it.
JohnBat26 has quit [Remote host closed the connection]
lenovodroid has quit [Read error: Connection reset by peer]
failshell has quit [Quit: Lost terminal]
<natewalck> I can tell you what I am loading it with
<adelgado> natewalck: I kind of went through that yesterday. I wanted to keep 1.8.7. Once I went into xcode and installed the command line tools, gem and other utils started working fine, too.
niklasb has quit [Ping timeout: 260 seconds]
kidoz has joined #ruby
<natewalck> OSX::NSMutableDictionary.dictionaryWithContentsOfFile("/path/to/plist")
<natewalck> and then I am manipulating that data
timonv has quit [Remote host closed the connection]
SCommette has joined #ruby
thams has quit [Quit: thams]
<natewalck> or you can shortcut to an empty NSMutableDictionary
<bean> kinda hard without a sample plist.
<natewalck> something = {}.to_ns
<bean> or sample data
<bean> or anything real to go off of.
<natewalck> not at all. Its an NSMutable Dictionary with the contents I highlighted above
<natewalck> ["server02.company.com", server01.company.com"]
<natewalck> ["server01.company.com", server02.company.com"]
joeycarmello has joined #ruby
Virunga has joined #ruby
mmitchel_ has quit [Remote host closed the connection]
pothibo has quit [Quit: pothibo]
reyson1 has joined #ruby
mmitchell has joined #ruby
Marco has joined #ruby
<havenn> I wrote a plist (well whole .app/) creator in Ruby, but can't find it. >.>
aganov has quit [Remote host closed the connection]
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
<reyson1> I do not understand where are you?
companion has joined #ruby
DerkTheDaring has quit [Ping timeout: 246 seconds]
<bean> reyson1: ?
<reyson1> si
<reyson1> uyes
<reyson1> how are you?
<reyson1> yes
woolite64 has quit [Ping timeout: 260 seconds]
Playground has quit [Quit: leaving]
Shamgar has quit [Ping timeout: 265 seconds]
<natewalck> bean: nevermind, they are proper ruby arrays
<natewalck> something else is going on, most likely my fault :)
woolite64 has joined #ruby
<bean> alright
a_a_g has joined #ruby
Banistergalaxy has quit [Ping timeout: 255 seconds]
qwerxy has quit [Quit: Computer has gone to sleep.]
maletor has joined #ruby
lolcathost has joined #ruby
apeiros_ has quit [Remote host closed the connection]
My_Hearing has joined #ruby
Banistergalaxy has joined #ruby
<reyson1> I want a girlfriend who is noted
<reyson1> I do not speak Spanish and English
Mon_Ouie has quit [Ping timeout: 272 seconds]
mvangala_ has quit [Read error: Connection reset by peer]
mvangala has joined #ruby
a_a_g has quit [Client Quit]
hoelzro is now known as hoelzro|away
<reyson1> I suck pussy
a_a_g has joined #ruby
BadProphet has joined #ruby
tPl0ch has quit [Quit: Verlassend]
<reyson1> hola
k611 has quit [Ping timeout: 264 seconds]
verto|off is now known as verto
kidoz has quit [Quit: Ухожу я от вас]
woolite64 has quit [Ping timeout: 255 seconds]
Steve1UK has left #ruby [#ruby]
nwertman has joined #ruby
woolite64 has joined #ruby
reyson1 has quit [Ping timeout: 246 seconds]
alexspeller has quit [Remote host closed the connection]
xyzodiac has joined #ruby
nwertman has quit [Client Quit]
vlad_starkov has joined #ruby
anachronistic has joined #ruby
nwertman has joined #ruby
My_Hearing is now known as Mon_Ouie
rellin has joined #ruby
speakingcode has joined #ruby
theRoUS has joined #ruby
theRoUS has joined #ruby
danneu has joined #ruby
JohnBat26 has joined #ruby
mvangala has quit [Read error: Connection reset by peer]
blazes816 has joined #ruby
miskander has quit [Quit: miskander]
mvangala has joined #ruby
io_syl has joined #ruby
malcolmva has joined #ruby
slash_nick has joined #ruby
blaxter has joined #ruby
carloslopes has joined #ruby
niklasb has joined #ruby
squidBits has quit [Quit: whoops]
JohnBat26 has quit [Ping timeout: 265 seconds]
blaxter has quit [Client Quit]
blaxter has joined #ruby
berserkr has quit [Quit: Leaving.]
ramblex has joined #ruby
mvangala has quit [Read error: Connection reset by peer]
mvangala has joined #ruby
Shadow_S has joined #ruby
JohnBat26 has joined #ruby
punkrawkR has joined #ruby
banisterfiend has quit [Remote host closed the connection]
lenovodroid has joined #ruby
nipar has joined #ruby
<nipar> I'm sorry for asking the question that is likely the most asked & answered question in any community of any programming language and course
<nipar> But, does anyone know of a good book that teaches ruby to someone who never even looked sideways at any form of programming before?=
Vainoharhainen has quit [Ping timeout: 252 seconds]
dankest has joined #ruby
nemesit has quit [Quit: Leaving...]
alvaro_o has joined #ruby
carloslopes has quit [Ping timeout: 255 seconds]
<bean> nipar: do you really need a book, or would a website work too?
alx- has quit [Quit: alx-]
enroxorz-work has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
ddv has quit [Ping timeout: 240 seconds]
ltsstar has quit [Quit: ltsstar]
fflush has joined #ruby
_64k has quit [Ping timeout: 248 seconds]
danieldocki has quit [Quit: Linkinus - http://linkinus.com]
ddv has joined #ruby
miskander has joined #ruby
<havenn> nipar: I think a nice start is: http://tryruby.org/
<havenn> nipar: I haven't read it, but Learn to Program is oft recommended: http://pine.fm/LearnToProgram/
fyolnish has quit [Remote host closed the connection]
JohnBat26 has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
mark_locklear has quit [Read error: Connection reset by peer]
<havenn> nipar: I'd recommend slogging some of the way through some of Ruby Koans, even if it doesn't make a lot of sense first pass. (Maybe after TryRuby.org?): http://koans.heroku.com/
gregorg_taf has joined #ruby
gregorg has quit [Read error: Connection reset by peer]
maletor has quit [Quit: Computer has gone to sleep.]
ToTo has joined #ruby
mikeg has joined #ruby
rburton- has joined #ruby
maletor has joined #ruby
Uranio has quit [Quit: WeeChat 0.3.8]
banisterfiend has joined #ruby
`gregorg` has joined #ruby
gregorg_taf has quit [Read error: Connection reset by peer]
lenovodroid has quit [Read error: Connection reset by peer]
Goles has quit [Ping timeout: 264 seconds]
Astral has joined #ruby
Astral is now known as Guest97488
codezombie has joined #ruby
JohnBat26 has joined #ruby
Guest97488 is now known as Astral___
Hanmac1 is now known as Hanmac
Astral__ has quit [Ping timeout: 246 seconds]
dankest is now known as dankest|away
dankest|away is now known as dankest
arturaz has quit [Ping timeout: 272 seconds]
IrishGringo has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121128204232]]
Xeago has quit []
percival_ has quit [Ping timeout: 246 seconds]
Xeago has joined #ruby
tessi has quit [Ping timeout: 246 seconds]
kenneth has quit [Quit: kenneth]
tessi has joined #ruby
blueoxigen has joined #ruby
fmcgeough has joined #ruby
DanBoy has joined #ruby
noxoc has quit [Quit: noxoc]
lenovodroid has joined #ruby
brianpWins has joined #ruby
bluOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
jkarayusuf has quit [Remote host closed the connection]
turtlehat has joined #ruby
mmitchell has quit [Read error: Connection reset by peer]
_bart has quit [Ping timeout: 272 seconds]
mmitchell has joined #ruby
jkarayusuf has joined #ruby
blueoxigen has quit [Ping timeout: 250 seconds]
jtharris has joined #ruby
matrixise has quit [Ping timeout: 252 seconds]
Goles has joined #ruby
elaptics is now known as elaptics`away
Goles has quit [Client Quit]
dr_bob has left #ruby [#ruby]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
apeiros_ has joined #ruby
keymone has quit [Quit: keymone]
sayan has quit [Ping timeout: 246 seconds]
gregorg_taf has joined #ruby
`gregorg` has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
chussenot has joined #ruby
rakl has joined #ruby
bluenemo has joined #ruby
eldariof has joined #ruby
wreckimnaked has quit [Ping timeout: 260 seconds]
sn0wb1rd has quit [Quit: sn0wb1rd]
adeponte has joined #ruby
schaerli has joined #ruby
rburton- has quit [Quit: Linkinus - http://linkinus.com]
yeban has quit [Ping timeout: 246 seconds]
mahmoudimus has joined #ruby
samphippen has joined #ruby
nwertman has quit [Read error: Connection reset by peer]
yeban has joined #ruby
Mon_Ouie has quit [Ping timeout: 246 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
Mon_Ouie has joined #ruby
nwertman has joined #ruby
_bart has joined #ruby
thams has joined #ruby
squidBits has joined #ruby
malcolmva has quit [Ping timeout: 248 seconds]
<apeiros_> howdy schaerli :)
d-snp has quit [Quit: Reconnecting]
d-snp has joined #ruby
miskander has quit [Quit: miskander]
sayan has joined #ruby
lenovodroid has quit [Ping timeout: 246 seconds]
chussenot has quit [Quit: chussenot]
breakingthings has quit []
<schaerli> hello
<slash_nick> 'ello
hackerdude has joined #ruby
bluenemo has quit [Quit: Verlassend]
_bart has quit [Ping timeout: 246 seconds]
hoelzro|away is now known as hoelzro
_bart has joined #ruby
nwertman has quit [Ping timeout: 252 seconds]
sayan has quit [Ping timeout: 246 seconds]
zeade has joined #ruby
clooth has quit [Quit: clooth]
atno has quit [Read error: Connection reset by peer]
arturaz has joined #ruby
hackerdude has quit [Read error: Connection reset by peer]
companion has quit [Ping timeout: 246 seconds]
bluOxigen has quit [Ping timeout: 248 seconds]
Mon_Ouie has quit [Ping timeout: 246 seconds]
seich- has quit [Ping timeout: 246 seconds]
Mon_Ouie has joined #ruby
zeppelin has quit [Ping timeout: 246 seconds]
seich- has joined #ruby
sn0wb1rd has joined #ruby
atno has joined #ruby
main has joined #ruby
zeppelin has joined #ruby
_bart has quit [Quit: _bart]
ryanlecompte has joined #ruby
lenovodroid has joined #ruby
kil0byte has joined #ruby
companion has joined #ruby
_bart has joined #ruby
_bart has quit [Read error: Connection reset by peer]
_bart has joined #ruby
twoism has joined #ruby
rakl has quit [Quit: sleeping]
codezombie has quit [Quit: Linkinus - http://linkinus.com]
kil0byte has quit [Remote host closed the connection]
kenneth has joined #ruby
sayan has joined #ruby
_bart has quit [Read error: Connection reset by peer]
_bart_ has joined #ruby
_bart_ has quit [Read error: Connection reset by peer]
g_bleezy has joined #ruby
_bart has joined #ruby
nwertman has joined #ruby
slainer68 has quit [Remote host closed the connection]
LBRapid has joined #ruby
gbchaosmaster has joined #ruby
clooth has joined #ruby
nwertman has quit [Client Quit]
LBRapid_ has joined #ruby
LBRapid_ has quit [Client Quit]
nwertman has joined #ruby
<Tumulte> I guess it's not the right place to discuss gem install
<Tumulte> but rmagick fails without giving me much clues
<Tumulte> "Can't find the ImageMagick library or one of the dependent libraries."
<Tumulte> Dude, why don't you just tell me what you need ??!!
<GeekOnCoffee> do you have ImageMagick?
<Tumulte> latest
<Tumulte> with devel
<Tumulte> checking for ImageMagick version >= 6.4.9... yes
<maetthew> hmm is there a way i can check how much ram memory a ruby application occupys?
<shevy> maetthew with "ps"
<shevy> or top/htop
<shevy> however, from within a .rb script... don't think there is
<maetthew> ah not really a ruby question perhaps
<maetthew> no that's what i was looking for
<maetthew> thanks :)
<shevy> unless you have a full RubyOS ;)
<maetthew> no osx :P
<shevy> hehe
<shevy> hmm perhaps there is a clever way to estimate it
<shevy> like count through ObjectSpace or something
<shevy> we need a clever man for this
<shevy> Hanmac, how much RAM does a ruby object occupy?
<matti> shevy: :)
<shevy> oh matti might know, maetthew, he is very clever
<maetthew> ^^
<Hanmac> shevy huch i dont know
rakl has joined #ruby
<shevy> hehe
<shevy> I like the word huch
voodoofish430 has joined #ruby
<Kuifje> you can do a sleep and then create an object and sleep again
<shevy> no native english speaker will be able to pronounce it properly on a first attempt
<maetthew> Kuifje, smart!
<maetthew> shevy, yeah i hate that
arietis has joined #ruby
Dwarf has quit [Quit: But I am gay, so don't worry :)]
mrsolo has joined #ruby
tyfighter has joined #ruby
jkarayusuf has quit [Remote host closed the connection]
noxoc has joined #ruby
banisterfiend has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 255 seconds]
jkarayusuf has joined #ruby
Dwarf has joined #ruby
<maetthew> do i have to require a "bundle gem" another way than the usual?
havenn has quit [Remote host closed the connection]
<maetthew> can i just "require 'my-gem'"?
<Hanmac> maetthew yes you can
<Hanmac> or ask in #bundler
havenn has joined #ruby
<maetthew> hmm #bundler
lhdc has joined #ruby
_bart has quit [Quit: _bart]
<rking> maetthew: You probably don't even have to do that.
<maetthew> rking, hmm really?
Virunga has quit [Remote host closed the connection]
marr has joined #ruby
<rking> maetthew: I forget what the call looks like, but it's something like Bundler.require, and it'll pull in all the appropriate gems from Gemfile
<rking> Based on the groups
<lhdc> ^^
<maetthew> just Bundler.require?
<rking> Urr, hang on
<maetthew> wait i can google :)
gbchaosmaster has quit [Ping timeout: 248 seconds]
lhdc has left #ruby [#ruby]
<maetthew> TL;DR Use Bundler.require instead of Bundler.setup
Goles has joined #ruby
lolcathost has quit [Quit: leaving]
lolcathost has joined #ruby
<rking> Yeah.
havenn has quit [Ping timeout: 252 seconds]
_alejandro has quit [Remote host closed the connection]
<maetthew> rking, thanks alot though :p
<rking> Np. ☺
<shevy> bundler is really cool, Hanmac loves it very much
qwerxy has joined #ruby
obryan has joined #ruby
hadees has quit [Quit: hadees]
noxoc has left #ruby [#ruby]
* Hanmac loves it when it burns in hell
qwerxy has quit [Client Quit]
<shevy> lol
EyesIsMine has quit [Disconnected by services]
rondale-sc has joined #ruby
SolarisBoy has joined #ruby
includex has quit [Quit: Leaving...]
<rking> Hanmac: If you feel like elaborating, I'd like to know why.
enroxorz-work has joined #ruby
sqbell has joined #ruby
sqbell has quit [Client Quit]
<oxman> which test unitary tool do you recommand ?
gregorg_taf has quit [Read error: Connection reset by peer]
qwerxy has joined #ruby
gregorg_taf has joined #ruby
timonv has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
miskander has joined #ruby
<shevy> Bundler likes to be automagical
EyesIsMine has joined #ruby
timmow has left #ruby [#ruby]
sqbell has joined #ruby
qwerxy has quit [Client Quit]
havenn has joined #ruby
malte_ has quit [Quit: malte_]
adelgado has left #ruby [#ruby]
<rking> oxman: I'm a minitest/unit guy all the way.
<rking> The RSpecperor has no clothes.
aaronmacy has joined #ruby
<shevy> rking do you wear clothes right now?
<Tumulte> Well... I've search every forum... it's said that imagemagick bundle should be enough for RMagick
<Tumulte> I've installed the latest of it all... no dice
<shevy> Tumulte RMagick is kinda dead though
<Tumulte> well
<rking> shevy: I reckon.
<Tumulte> redmine requires it
<shevy> perhaps you can install an older rmagick .gem
banisterfiend has joined #ruby
tcurdt has joined #ruby
<shevy> and some older imagemagick too, with the headers
<Tumulte> headers problem you think ?
<rking> Tumulte: You're not saying how it's failing. Gist something we can sink our teeth into.
malcolmva has joined #ruby
nyuszika7h has quit [Ping timeout: 246 seconds]
<Tumulte> don't be fooled by the pastebin
<Tumulte> the server is a centOS thing
<Kuifje> don't be fooled by the pastebin! use the recyclebin
rakuN has joined #ruby
<rking> Tumulte: Oh, you'll need a -dev package
<shevy> InitializeMagick() in -lMagick++... no
friskd has joined #ruby
<shevy> Tumulte I think your libMagick++.so is not complete or not existing. sometimes there could be a bogus error, cascading down, often when a .h file is missing
<shevy> GNU autoconfigure really sucks, it must die one day
<rking> Tumulte: ImageMagick-devel
browndawg1 has left #ruby [#ruby]
rdark has quit [Quit: "beertime"]
gregorg_taf has quit [Read error: Connection reset by peer]
`gregorg` has joined #ruby
asteve has quit [Changing host]
asteve has joined #ruby
wargasm has quit [Ping timeout: 265 seconds]
<Tumulte> this .h stuff is the most plausible stuff tho
<Hanmac> "centos, software from the last century"
nyuszika7h has joined #ruby
<Tumulte> Hanmac: server stuff. Bleeding edge != stability
<rking> Tumulte: If you have ImageMagick-devel, that gem install should work.
dankest is now known as dankest|away
<Tumulte> rking: I swear I have it
<Tumulte> On my life ;-)
madhadron has joined #ruby
hadees has joined #ruby
<oxman> thanks rking
<Hanmac> .... Magick++ is an other package than ImageMagick ?
<rking> Tumulte: OK show us the mkmf.log
sayan has quit [Quit: Leaving]
mark_locklear has joined #ruby
<rking> Hanmac: It found none of -lMagickCore -lMagick -lMagick++
<Tumulte> rking I... don't know where this is
hadees has quit [Remote host closed the connection]
<rking> Tumulte: I'm not used to it not-showing me where it is
<rking> Try gem install rmagick -v '2.13.1' (No 'sudo')
fred909 has joined #ruby
nemesit has joined #ruby
whomp has joined #ruby
arkiver has joined #ruby
<Tumulte> rking: well it doesn't work :)
<rking> But does it tell you where mkmf.log is?
<Tumulte> no
<rking> If not try find mkmf.log ~/.gem
<rking> Oops no
<rking> Not that.
<rking> find ~/.gem -name mkmf.log
<rking> find ~/.gem -name mkmf.log | grep agick
`gregorg` has quit [Read error: Connection reset by peer]
daniel_hinojosa1 has quit [Ping timeout: 250 seconds]
gregorg_taf has joined #ruby
<Tumulte> this thing doesn't exist
<rking> OK I'mma use the BFG9000 on this.
<rking> strace -o whywhywhy gem install rmagick -v '2.13.1'
<rking> grep mkmf.log whywhywhy
<Tumulte> rking: found
<rking> OK paste that
<Tumulte> rking: your methods are funny
<rking> Hehe, like I said, I'm used to the gem failures telling me where the log is.
includex has joined #ruby
havenn has quit [Remote host closed the connection]
grzywacz has quit [Ping timeout: 272 seconds]
havenn has joined #ruby
dankest|away is now known as dankest
havenn has quit [Read error: Connection reset by peer]
havenn has joined #ruby
<rking> Tumulte: Hook it up with that mkmf.log contents
carloslopes has joined #ruby
<rking> Tumulte: So you *do* have ImageMagick .h's
<Tumulte> Ha !
breakingthings has joined #ruby
<Tumulte> I'm not crazy !
<rking> Well
<rking> That doesn't necessarily follow.
<rking> But yeah you installed the -devel package right.
JustAWife016 has joined #ruby
pcarrier_ has quit []
<JustAWife016> Hello there
jfl0wers has joined #ruby
sqbell has quit [Quit: leaving]
<JustAWife016> sry i have a very stupid question. I want to give my husband a gift coupon for a ruby conference next year
gregorg_taf has quit [Read error: Connection reset by peer]
gregorg_taf has joined #ruby
<JustAWife016> but i do not want to write just "Coupon for..:" on it... I want to have some complicated code to write it on it
Virunga has joined #ruby
g_bleezy has quit [Remote host closed the connection]
burgestrand has joined #ruby
<JustAWife016> can perhaps anyone give me something which would alert Coupon and so on?
turtlehat has quit [Quit: quitquit]
<hoelzro> JustAWife016: puts Coupon.new(:for => 'you!')
<hoelzro> how's that?
arturaz has quit [Remote host closed the connection]
mneorr has joined #ruby
Shadow_S has quit [Quit: Textual IRC Client: www.textualapp.com]
<JustAWife016> looks good for beginnig... can you give me some more, which is like "if( not 23.03.2012) then wait"
<rking> Tumulte: Can you figure out what version ImageMagick-devel is?
<hoelzro> wait until today() == '23.03.2012' puts Coupon.new(:for => 'you!')
<rking> I would *not* accept a gift in Ruby 1.8 hash syntax
<Tumulte> rking: 6.8.0
<rking> I'd straight rip that coupon up and tell my wife to update her stuff
_bart has joined #ruby
<hoelzro> =(
<JustAWife016> i do not know which version he is using....
<hoelzro> JustAWife016: hopefully the latest!
<hoelzro> wait until today() == '23.03.2012' puts Coupon.new(for: 'you!')
<hoelzro> that's the 1.9 version
<rking> hoelzro: There's a `wait` ?
sn0wb1rd has quit [Quit: sn0wb1rd]
<JustAWife016> i hope so too...
<hoelzro> honestly, I would use whichever you prefer
<hoelzro> rking: there's a Coupon class?
<rking> Well, but the rest we could supply real stuf
<rking> 1min
<JustAWife016> it do not have to work... but it should look like ruby..
<JustAWife016> and i do not know any ruby-syntax
<JustAWife016> hoelz can you make it a bit more complicated?
<rking> JustAWife016: That's where you're wrong
<rking> To attempt a geeky thing and get it wrong is worse than no attempt at all.
arkiver has quit [Ping timeout: 252 seconds]
sn0wb1rd has joined #ruby
<JustAWife016> i no.. but problem is, i can not controll whether its correct or not...
<hoelzro> I would appreciate such a gift even if my girlfriend got it wrong!
<madhadron> rking: You're single aren't you?
daniel_hinojosa has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
willob has quit [Remote host closed the connection]
<JustAWife016> i think he expects correct code from me... because he always gets geeky gifts from me.. but this time i have no chance to do it on myself
<rking> sleep 1 until Date.today == Date.parse('2012-03-23'); Coupon.new(for: 'you!')
<JustAWife016> thats why im here
madhadron has left #ruby [#ruby]
<slash_nick> aw
<hoelzro> I like rking's suggestion there; it's a more correct version of what I wrote
<Tumulte> rking: searching this error doesn't give me much neither
<JustAWife016> ok...
hackerdude has joined #ruby
jenrzzz has joined #ruby
<Tumulte> rking: "install imagemagick"... well... yeah
<Tumulte> :/
friskd has quit [Quit: friskd]
<JustAWife016> is there some kind of "goto" in ruby?
Asher has joined #ruby
<JustAWife016> i no, goto is not very nice kind of code... but "goto: Conference" would be great :D
<hoelzro> JustAWife016: maybe husband.go(to: Conference)?
<Hanmac> JustAWife016 there can be goto but you need to compile ruby with jokes
`gregorg` has joined #ruby
<rking> Tumulte: Man, I'm sorry on this one. I have to get back to other stuff, but 6.8.0 is recent enough. =\
daniel_hinojosa has quit [Ping timeout: 246 seconds]
rezzack has joined #ruby
gregorg_taf has quit [Read error: Connection reset by peer]
Astral_ has joined #ruby
bean has quit [Quit: Computer has gone to sleep.]
<JustAWife016> ok, then i have coupon, date and location... i think then i have anything...
<JustAWife016> but just because i no there is no command for "love you" :-)
<hoelzro> i.love(you) # :)
emmanuelux has joined #ruby
<Tumulte> rking: gotta go too
bean has joined #ruby
<JustAWife016> nice one...
<rking> Tumulte: Ping me again, later, if you still need help
<Tumulte> rking thanks a LOT
<JustAWife016> after each line there must be a ; ?
Tumulte has quit [Remote host closed the connection]
includex has quit [Quit: Leaving...]
<JustAWife016> and do i have something like #!/usr/bin/perl
jrist is now known as jrist-afk
<hoelzro> JustAWife016: #!/usr/bin/ruby
<hoelzro> JustAWife016: are you a Perl programmer?
<JustAWife016> really?
<JustAWife016> not really...
<JustAWife016> so i studied informatics, so i know some commands, but you can not call me programmer
timonv has quit [Remote host closed the connection]
<hoelzro> ok, cool
<hoelzro> I ask because I'm a Perl programmer =)
Astral___ has quit [Ping timeout: 260 seconds]
<JustAWife016> he is one...
<JustAWife016> so he learned me a bit...
<banisterfiend> JustAWife016: careful, with a nickname like that you could spark the famous ruby P.C brigade
<JustAWife016> but now he fekt in love with ruby, and is trying much stuff
<banisterfiend> into action*
dmiller has joined #ruby
JDubs has quit [Ping timeout: 252 seconds]
<hoelzro> that's cool; I've been trying to use Ruby more, but I haven't reached the point where I'm as productive with it as I am with Perl
<JustAWife016> because of i am a woman? or because of the "016" which i not have written by myself?
<JustAWife016> i do not really no what he doing there. Sometimes he tells me, but i do not really understand..
darthdeus has joined #ruby
Nisstyre-laptop has joined #ruby
<JustAWife016> but again: should each line ends with ;
<JustAWife016> ?
<Kuifje> no
<hoelzro> JustAWife016: they don't need to
<JustAWife016> ok,
<Kuifje> only if you have multiple commands in a line
fjfish has quit [Read error: Connection reset by peer]
<banisterfiend> hoelzro: does perl have blocks?
vlad_sta_ has joined #ruby
ddv has quit [Changing host]
ddv has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
Neomex has joined #ruby
<hoelzro> banisterfiend: not like Ruby's
Neomex has quit [Client Quit]
<hoelzro> but you can do a bunch of block-like stuff with anonymous subs
francisfish has joined #ruby
<JustAWife016> no but javascript have ...
<banisterfiend> hoelzro: can u show me an example?
<JustAWife016> so i will take it like this
<JustAWife016> #!/usr/bin/ruby
<hoelzro> banisterfiend: if(any { $_ > 500 } @list_of_numbers) { say 'greater than 500' }
Dario_ has quit [Ping timeout: 272 seconds]
`gregorg` has quit [Read error: Connection reset by peer]
<JustAWife016> #!/usr/bin/ruby Coupon.new(for: 'you!') sleep 1 until Date.today == Date.parse('2012-03-23') husband.go(to: Conference) ---> Image i.love(you)
marr has quit [Ping timeout: 252 seconds]
<banisterfiend> JustAWife016: just curious (you don't have to answer) but where are you from?:)
`gregorg` has joined #ruby
<banisterfiend> hoelzro: that looks pretty nice actually
<JustAWife016> germany
<JustAWife016> and yes, i have a sister... :-)
<hoelzro> banisterfiend: yeah, it's pretty good
<hoelzro> it's gotten a lot better in recent years
<banisterfiend> hoelzro: not much like 'line noise' :)
<hoelzro> yeah, we have a bad reputation for that ;)
<JustAWife016> can i use it like this?
<banisterfiend> hoelzro: so u could do: @list_of_numbers.any { $_ > 500 } if u want?
<hoelzro> banisterfiend: unfortunately not
vlad_sta_ has quit [Remote host closed the connection]
stevechiagozie has joined #ruby
<Kuifje> if (i.love == <husbands' name>) then give_coupon
<banisterfiend> hoelzro: wy not? couldn't you define 'any' method on List if u wanted?
<JustAWife016> :-)
<hoelzro> banisterfiend: well, @list_of_number isn't an object
<JustAWife016> and then he thinks he will not get it?
<JustAWife016> nooo
hoelzro is now known as hoelzro|away
<slash_nick> give_coupon if wife.happy || rand(10) > 5
dmiller has quit [Read error: Connection reset by peer]
dmiller has joined #ruby
<slash_nick> the odds range from 50% to 100%
percival_ has joined #ruby
dmiller has quit [Remote host closed the connection]
<JustAWife016> if (wife.getshoes || wife.getgold) give_coupon
<JustAWife016> would be great too :-)
tcurdt has quit [Quit: bye bye]
green_leaf has joined #ruby
<shevy> ack
<shevy> a female is here!!! a wife!!!!!! HIDE!
<JustAWife016> sry sry....
<shevy> it's ok, if you brought cookie for xmas
ebouchut has joined #ruby
<JustAWife016> i just need code
<shevy> :(
<JustAWife016> so i do not want to talk about some women-things...
<shevy> no cookies ... no beer ... the end of the world can't be worse than that
<slash_nick> JustAWife016: .... just write the "pseudo-code" and we'll make it ruby
<JustAWife016> and yes, double-chocolat cookies
blath has joined #ruby
<JustAWife016> just tell me whether this is correct
<JustAWife016> #!/usr/bin/ruby Coupon.new(for: 'you!') sleep 1 until Date.today == Date.parse('2012-03-23') husband.go(to: Conference) ---> Image i.love(you)
<JustAWife016> if yes, then i think its enough
<shevy> well
<Kuifje> for: => "you"
friskd has joined #ruby
<shevy> Coupon.new does not have to be used again?
_nitti has quit [Remote host closed the connection]
<Kuifje> { :for => 'you!' }
<blath> How do I make [1,2,3].each { |x| dosomething(x) } return nil instead of the collection of results?
<shevy> for: to: should work in ruby 1.9.x
<slash_nick> [1,2,3].each { |x| dosomething(x) };nil
<slash_nick> ;)
johnmilton has joined #ruby
<v0n> Kuifje: yep, key: value is a 1.9 Hash notation
<JustAWife016> no shexy, coupon.new does not have to be global
<shevy> but I can't see what you do with the coupon or why sleep has to be used.
<blath> is there any way in ruby to do that? I want to do a bunch of side-effecty operations and just return nil
<shevy> it seems as if you try to use a loop
<shevy> and for this you seem to use sleep(1)
<JustAWife016> because he has to wait till march..
<JustAWife016> the conference is in march
tommyvyo_ has joined #ruby
<JustAWife016> shouldnt it be husband.go(:to => 'Conference') ?
friskd has quit [Client Quit]
<slash_nick> husband.go(to: 'Conference')
<shevy> you can use :foo => "bla" or foo: "bla"
<JustAWife016> sty but why is it husband.go(to: 'Conference') but Coupon.new(for: => 'you')
<shevy> no the second is incorrect
<shevy> for: => is never correct
<JustAWife016> ok
<shevy> :for => could be correct
<shevy> JustAWife016, the foo: notation is new
<shevy> in the past, it was :foo => "something" always, and this still works
<shevy> I still use the old notation
* slash_nick begs shevy to stop :)
<shevy> ruby adds so many new things, not everything is needed
<JustAWife016> so you have different opinions? who is right?
ltsstar has joined #ruby
<slash_nick> JustAWife016: both
<shevy> JustAWife016 depends. since I use both ruby 1.9 and 1.8, the new notation would break my scripts
<slash_nick> either notation is fine
<shevy> the new notation is shorter, which is (almost) always good
fflush has quit [Changing host]
fflush has joined #ruby
<green_leaf> what is "->" in ruby? (e.g. "@something ||= ->(opts) { raise NotImplemented }
<shevy> JustAWife016 I think most people will use the new notation more and more
c0rn has joined #ruby
<JustAWife016> ok, because i do not know which version he uses, i would choose the older and ever correct notation
<shevy> green_leaf that code does not seem valid
<shevy> ah
<shevy> green_leaf lambda
<TTilus> green_leaf: new lambda syntax
<shevy> my_while -> { a < 5 } do
blath has quit [Quit: WeeChat 0.3.9.2]
<shevy> I really don't like it :\
* TTilus really likes it
<JustAWife016> ok so i have
<JustAWife016> #!/usr/bin/ruby Coupon.new(:for => 'you') sleep 1 until Date.today == Date.parse('2012-03-23') husband.go(:to =>'Conference') i.love(you)
daniel_hinojosa has joined #ruby
<TTilus> shevy: it reads very nicely as "maps to"
gregorg_taf has joined #ruby
<green_leaf> shevy: thanks, I was having a hard time googling that one.
`gregorg` has quit [Read error: Connection reset by peer]
obryan has quit [Remote host closed the connection]
<shevy> odd
<shevy> my code -> my brain
<shevy> my code maps to my brain
<shevy> hmmmm
elico has joined #ruby
cascalheira has quit [Quit: Leaving...]
cdt_ has quit [Ping timeout: 272 seconds]
<JustAWife016> ok, thank you all so much
<JustAWife016> have a nice Xmas!!
ebouchut has quit [Quit: This computer has gone to sleep]
<JustAWife016> and i will send you some women in here for the future :-)
<shevy> eh
<shevy> always promises
<JustAWife016> ahh one more question...
<shevy> cookies would last longer here ;)
<JustAWife016> there is no if or something else at the "goto"
<shevy> where is the question
ebouchut has joined #ruby
<shevy> what goto
<JustAWife016> so would the script really waits because of the sleep`?
<JustAWife016> sleep 1 until Date.today == Date.parse('2012-03-23') husband.go(:to =>'Conference')
JDubs has joined #ruby
<shevy> well, I typically use loops like this
simontol has joined #ruby
<JDubs> Good evening guys!!! o/
`gregorg` has joined #ruby
<JDubs> Everyone well tonight?
<JustAWife016> pfff
<shevy> loop { sleep 1; break if Date.today == Date.parse('2012-03-23') }
gregorg_taf has quit [Read error: Connection reset by peer]
<JustAWife016> and then? --> husband.go(:to =>'Conference') ?
<simontol> Hi, I'm a newbie, I'm looking for a regexp that matches all words eg. "if","is","else" in a line
<shevy> well, inside the if clause of break, yes JustAWife016
gbchaosmaster has joined #ruby
<shevy> I just showed a small demo, of course you have to expand the if clause inside the {} there
emmanuelux has quit [Remote host closed the connection]
<JDubs> gbchaosmaster, hey man :)
<JDubs> o/
<JustAWife016> shevy... im not able to :-)
<shevy> if foo; do_this; then_that; then_finally_that; break; end
<JDubs> btw, for those who don't know " o/ " is a wave ;)
tfittsy has quit [Ping timeout: 250 seconds]
<shevy> JustAWife016, remember, if you use "if", then you also require an "end"
<shevy> and everything between if / end belongs to this clause
<JustAWife016> loop { sleep 1; break if Date.today == Date.parse('2012-03-23')then{husband.go(:to =>'Conference')}}?
<shevy> well
<JustAWife016> and where is the "end"?
<shevy> you have to shuffle the break back into the if clause
<shevy> it is not needed for one liners
<shevy> destroy_world if @end_of_the_day_has_arrived
<shevy> you see?
<shevy> destroy_world() if @end_of_the_day_has_arrived
emmanuelux has joined #ruby
<shevy> break if 5 > 4
<shevy> but if you want more statements, you must use the other way
<shevy> if 5 > 4
wallerdev has joined #ruby
<shevy> do_this()
<shevy> break
<shevy> end
<shevy> you see?
<shevy> or you use ;
<JustAWife016> ok so i have loop { sleep 1; husband.go(:to =>'Conference') if Date.today == Date.parse('2012-03-23') }
<shevy> but ; is ugly
zigomir has left #ruby [#ruby]
<shevy> if 5 > 4; do_this(); break; end
<rking> No `loop`
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<rking> That'll do it infinitely
<shevy> JustAWife016 if you use loop, you must use a break condition
<shevy> you could avoid loop if you use while or until
<slash_nick> husband.go(to: 'Conference') and break if Date.today ... ...
<shevy> but I dont use these two
<JustAWife016> loop { sleep 1; break &&husband.go(:to =>'Conference') if Date.today == Date.parse('2012-03-23') }
gyre007 has quit [Remote host closed the connection]
<JustAWife016> && or and
matip_ has joined #ruby
<matip_> Hello
<shevy> loop { sleep 1; if Date.today == Date.parse('2012-03-23'); husband.go(:to =>'Conference'); break; end }
akemrir has quit [Ping timeout: 246 seconds]
<matip_> what interactive shell do you use?
<shevy> matip_ irb
<matip_> irb is pretty basic, there should be something better
<shevy> you want an interactive vim-like editor for ruby!
<JustAWife016> shevy, the other one looks (just for me) greater :-)
Goles has quit [Quit: Computer has gone to sleep.]
hoelzro|away is now known as hoelzro
<shevy> JustAWife016 ok but look at it again
<shevy> this part:
<shevy> "break &&husband.go"
rondale-sc has quit [Quit: WeeChat 0.3.9.2]
<shevy> you dont see that in code really, if at all then this instead:
<shevy> "break && husband.go"
<matip_> I want something... like...
<JustAWife016> yes i did it like this, but i was typing to fast
<JustAWife016> ok, then i have it...
Dario_ has joined #ruby
<slash_nick> Yay
<JustAWife016> thanks a lot
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
<matip_> irb doesn't have code autocomplete, that says all about it
<JustAWife016> i will tell my husband, that you worked hours to help me
<shevy> matip_, what do you mean with code autocomplete... Readline completion proc works, even for methods
<shevy> require 'irb/completion'
<matip_> if I write a = [] and then "a.", I want a list of methods
<matip_> for example
<JustAWife016> byebye
<eka> matip_: shevy: try pry
<shevy> that works fine here matip_
<matip_> really? o.o
<shevy> go start irb, do require 'irb/completion' then the code you showed
<shevy> yes
JustAWife016 has quit [Quit: irc2go]
<matip_> ah, you have to require irb/completion
<shevy> though you may need Readline, I am not sure... perhaps not hmm
<matip_> let me see
schaerli has quit [Remote host closed the connection]
<matip_> "a." doesn't bring any list
<matip_> lets see pry
nyuszika7h has joined #ruby
otters has quit [Read error: Operation timed out]
<shevy> no you must type TAB
<shevy> a.<PRESS TAB HERE>
malte_ has joined #ruby
<matip_> I did
<matip_> ahh, wait
<matip_> it's working, somehow
nga4 has joined #ruby
otters has joined #ruby
<matip_> ok, it's not the kind of "interaction" I would like :P
cdt_ has joined #ruby
<matip_> it printed 155 options altogether!!
<matip_> it's not like zsh for example ;)
`gregorg` has quit [Ping timeout: 260 seconds]
beneggett has quit [Ping timeout: 264 seconds]
daniel_hinojosa has quit [Ping timeout: 252 seconds]
_nitti has joined #ruby
`gregorg` has joined #ruby
aedorn has joined #ruby
gregorg_taf has joined #ruby
otters has quit [Ping timeout: 252 seconds]
<shevy> yes
<shevy> we need a full ruby shell
matip__ has joined #ruby
<shevy> one that replaces zsh and bash
`gregorg` has quit [Read error: Connection reset by peer]
beneggett has joined #ruby
<matip__> check this video to see zsh in action ^
<matip__> something like that is what I was looking for
adambeynon has joined #ruby
otters has joined #ruby
<matip__> (I lost the connection for a moment, I don't know if you said something)
oGminor has quit [Quit: oGminor]
<hoelzro> shevy: embed Ruby in either of those =)
darthdeus has quit [Quit: Leaving...]
_bart has left #ruby [#ruby]
<shevy> matip__ maaaan I can not repeat, it's lost in the history now :(
headius has joined #ruby
<matip__> :P
miskander has quit [Quit: miskander]
<shevy> it's scrolling away every time I hit enter
bbloom has quit [Quit: Computer has gone to sleep.]
<shevy> slowly step by step...
miskander has joined #ruby
<shevy> what was it again that you wanted matip__ ? :D
gbchaosmaster has quit [Read error: Operation timed out]
matip_ has quit [Ping timeout: 260 seconds]
matrixise has joined #ruby
jonathanwallace has quit [Ping timeout: 252 seconds]
<matip__> something like that ^
<matip__> for Ruby
<shevy> perhaps the vim guys allow you to replace shell scripts with ruby scripts
<shevy> I mean it would have the functionality
<shevy> just feed that data from ruby to zsh
bean has quit [Read error: Connection reset by peer]
<shevy> sorry
<shevy> I meant zsh, not vim
bean has joined #ruby
<matip__> lol, no... it's totally different
<matip__> zsh can help me with the ruby params
<matip__> but I mean... to discover methods and so on
<matip__> it must be a ruby interpreter
<hoelzro> or hooked up to one
rburton- has joined #ruby
krawchyk_ has joined #ruby
<matip__> I don't think zsh can help in this case. it doesn't know anything about ruby's syntax
roychri has quit [Read error: Connection reset by peer]
<aedorn> xiki+vim?
<hoelzro> matip__: isn't that up to the completion plugin?
<rburton-> xiki is nice I was hanging out with craig bright guy
ryanf_ has joined #ruby
<shevy> but ruby could feedback that information to zsh
<matip__> well, I never seen anything like that
<matip__> have you?
<shevy> no
<matip__> I've *
<shevy> but I use bash
<shevy> I was too lazy to learn zsh
<matip__> haha
<matip__> you should
<shevy> I tried, but the thing is
<shevy> I dont need what zsh gives me
daniel_hinojosa has joined #ruby
<shevy> I dont use shell scripts, I use ruby scripts
<shevy> my prompt shows only the current working directory
ryanf_ has quit [Client Quit]
<TTilus> pry will eventually become The Ruby Shell
<shevy> and I will use bash only until I have finished a shell replacement one day
Godd2 has joined #ruby
<TTilus> its already almost there
`gregorg` has joined #ruby
gregorg_taf has quit [Read error: Connection reset by peer]
ryanf_ has joined #ruby
<shevy> matip__, I dont think those extensions should be tied to any one shell either... I want bash to use RPROMPT too for instance
ryanf has quit [Quit: leaving]
krawchyk has quit [Ping timeout: 244 seconds]
<stevechiagozie> matip__ pry gets about as close to zsh completion as you're gonna get right now. check out http://vimeo.com/26391171
Steppen has joined #ruby
audy has joined #ruby
<audy> how do I get lazy Enumerable#zip like Python's itertools.izip ?
<audy> I know about #Enumerable.lazy.zip in 2.0 but I need this to work in 1.8.7
PragCypher has quit [Quit: Leaving]
gregorg_taf has joined #ruby
`gregorg` has quit [Read error: Connection reset by peer]
thmzlt has quit [Remote host closed the connection]
daganu has joined #ruby
daniel_hinojosa has quit [Ping timeout: 256 seconds]
LouisGB has quit [Ping timeout: 256 seconds]
Goles has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
cousine has quit [Remote host closed the connection]
_sillymarkets_ has joined #ruby
F1skr has joined #ruby
`gregorg` has joined #ruby
gregorg_taf has quit [Read error: Connection reset by peer]
_sillymarkets has quit [Ping timeout: 245 seconds]
_64k has joined #ruby
Godd2 has quit [Ping timeout: 245 seconds]
_64k has quit [Client Quit]
axl_ has quit [Quit: axl_]
shevy2 has joined #ruby
Divinite has joined #ruby
gregorg_taf has joined #ruby
`gregorg` has quit [Read error: Connection reset by peer]
friskd has joined #ruby
Goles has quit [Quit: Computer has gone to sleep.]
eldariof has quit []
shevy has quit [Ping timeout: 244 seconds]
t_hash has joined #ruby
friskd has quit [Client Quit]
a_a_g has quit [Quit: Leaving.]
ryanf has joined #ruby
gordon1775 has joined #ruby
daniel_hinojosa has joined #ruby
lenovodroid has quit [Remote host closed the connection]
thams has quit [Quit: thams]
grzywacz has joined #ruby
ryanf_ has quit [Ping timeout: 265 seconds]
chrismcg is now known as zz_chrismcg
havenn has quit [Remote host closed the connection]
nomenkun has joined #ruby
Goles has joined #ruby
Russell^^ has joined #ruby
havenn has joined #ruby
darthdeus has joined #ruby
gregorg_taf has quit [Read error: Connection reset by peer]
gregorg_taf has joined #ruby
wermel has quit [Remote host closed the connection]
aarkerio has joined #ruby
simontol has quit [Quit: Ex-Chat]
<aarkerio> hi! how can I debug a ruby.rb script ? I mean, how can I print an array or an object
daniel_hinojosa has quit [Ping timeout: 255 seconds]
<speakingcode> puts
<aarkerio> I tried: puts debugger(myRubyObject)
havenn has quit [Ping timeout: 250 seconds]
caveat- has quit [Remote host closed the connection]
ryanf has quit [Quit: broken pipes |||]
alex__c2022_ has joined #ruby
jonathanwallace has joined #ruby
Goles has quit [Quit: Computer has gone to sleep.]
i_s has joined #ruby
dougireton has joined #ruby
Goles has joined #ruby
<green_leaf> shevy: What is "opts" in this example? I get the block in the curly brackets, but are we also passing parameters to a lambda? ( @something ||= ->(opts) {raise NotImplemented })
<green_leaf> or anyone...
blaxter has quit [Quit: foo]
aarkerio has left #ruby ["Leaving"]
alex__c2022 has quit [Ping timeout: 265 seconds]
alex__c2022_ is now known as alex__c2022
thmzlt has joined #ruby
gregorg_taf has quit [Read error: Connection reset by peer]
gregorg_taf has joined #ruby
pyr0commie has joined #ruby
nik_-_ has joined #ruby
thmzlt has quit [Remote host closed the connection]
iamjarvo has joined #ruby
thmzlt has joined #ruby
Steppen has left #ruby ["Leaving"]
arturaz has joined #ruby
carloslopes has quit [Remote host closed the connection]
darthdeus has quit [Read error: Connection reset by peer]
<audy> enum_for
<audy> aapzak p object works too
<audy> aapzak it calls inspect
otters has quit [Ping timeout: 260 seconds]
<apeiros_> green_leaf: yes, it's the params
<apeiros_> green_leaf: `foo ->(bar) { …code… }` is equivalent to the older (still valid) syntax: `foo proc { |bar| … code… }`
<banisterfiend> apeiros_: r u a -> sympathiser
krawchyk_ has quit [Remote host closed the connection]
<green_leaf> apeiros_: that makes sense now... thanks.
<apeiros_> banisterfiend: not yet. I use it in pry, e.g. with benchmarks
gregorg_taf has quit [Read error: Connection reset by peer]
<apeiros_> mb 1e5,10,variant1:->{…},variant2:->{…},…
gregorg_taf has joined #ruby
lolcathost has quit [Quit: leaving]
havenn has joined #ruby
lolcathost has joined #ruby
LBRapid has quit [Read error: Connection reset by peer]
darthdeus has joined #ruby
dougireton has quit [Quit: Leaving.]
<banisterfiend> cool
<banisterfiend> apeiros_: do you use .() too?
ebouchut has quit [Quit: This computer has gone to sleep]
gregorg_taf has quit [Read error: Connection reset by peer]
`gregorg` has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
<heftig> apeiros_: it's equivalent to lambda, not proc
<apeiros_> heftig: ah, yes, correct
jonathanwallace has joined #ruby
<apeiros_> banisterfiend: no
<apeiros_> that one I dislike a lot actually
gyre007 has joined #ruby
musl has quit [Quit: WeeChat 0.3.9.2]
musl has joined #ruby
LBRapid has joined #ruby
jonathanwallace has quit [Client Quit]
cakehero has quit [Quit: Computer has gone to sleep.]
yekta has joined #ruby
gbchaosmaster has joined #ruby
DanBoy_ has joined #ruby
jonathanwallace has joined #ruby
gyre007 has quit [Ping timeout: 260 seconds]
`gregorg` has quit [Read error: Connection reset by peer]
gregorg_taf has joined #ruby
tjbiddle_ has joined #ruby
jonathanwallace has quit [Client Quit]
axl_ has joined #ruby
thams has joined #ruby
Nisstyre-laptop has quit [Read error: Connection reset by peer]
DanBoy has quit [Ping timeout: 264 seconds]
aquaranto has quit [Remote host closed the connection]
geekbri has quit [Remote host closed the connection]
C0deMaver1ck has quit [Ping timeout: 260 seconds]
tjbiddle has quit [Ping timeout: 246 seconds]
tjbiddle_ is now known as tjbiddle
Nisstyre-laptop has joined #ruby
cakehero has joined #ruby
<matled> is there a good article about the changes and new features in ruby 2?
`gregorg` has joined #ruby
jonathanwallace has joined #ruby
gregorg_taf has quit [Read error: Connection reset by peer]
tvw has quit [Ping timeout: 276 seconds]
elsifaka has quit [Read error: Operation timed out]
twoism has quit [Read error: Connection reset by peer]
jonathanwallace has quit [Client Quit]
twoism has joined #ruby
elsifaka has joined #ruby
jonathanwallace has joined #ruby
daganu has left #ruby [#ruby]
jonathanwallace has quit [Client Quit]
the_jeebster has joined #ruby
_bart has joined #ruby
jonathanwallace has joined #ruby
jonathanwallace has quit [Client Quit]
andrewhl has quit [Ping timeout: 246 seconds]
ryannielson has quit [Quit: ryannielson]
jonathanwallace has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
<the_jeebster> can I perform nested maps with the &: syntax? I'm performing something along the lines of animals.map(&:dogs.map(&:breed))
bigmcq77 has quit [Quit: Computer has gone to sleep.]
doodlehaus has quit [Remote host closed the connection]
C0deMaver1ck has joined #ruby
<davidcelis> matip__: !g ruby 2 new features
sepp2k has joined #ruby
<davidcelis> oh wait this isnt #rubyonrails...
* davidcelis runs away
<jkarayusuf> the_jeebster: animals.map(&:dog).map(&:breed)
<apeiros_> the_jeebster: no
<matip__> o.o
<apeiros_> jkarayusuf: that's not nested, that's chained
banisterfiend has quit [Remote host closed the connection]
<the_jeebster> apeiros: that might work though…I'll try it out
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<the_jeebster> I'm mapping object associations then need to map attributes of those objects
<apeiros_> from the example you made, it looks indeed like you want chaining, not nesting.
<the_jeebster> apeiros: yeah that makes much more sense
<the_jeebster> jkarayusuf: thanks
Guest25886 has quit [Quit: Guest25886]
<jkarayusuf> the_jeebster: np
<shevy2> I want chaining and whipping
shevy2 is now known as shevy
[Neurotic] has joined #ruby
jonathanwallace has quit [Client Quit]
jonathanwallace has joined #ruby
doodlehaus has joined #ruby
gregorg_taf has joined #ruby
<apeiros_> oh shevy…
`gregorg` has quit [Read error: Connection reset by peer]
<apeiros_> you need to go out more
dankest is now known as dankest|away
banisterfiend has joined #ruby
mrsolo has quit [Quit: Leaving]
Eiam has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<JDubs> apeiros_ what did I miss? lol
chussenot has joined #ruby
elico has quit [Quit: elico]
kirun has joined #ruby
Iuz has quit [Read error: Connection timed out]
Iszak has joined #ruby
gregorg_taf has quit [Read error: Connection reset by peer]
`gregorg` has joined #ruby
Iuz has joined #ruby
Iuz has quit [Changing host]
Iuz has joined #ruby
Xeago has joined #ruby
jenrzzz has joined #ruby
mneorr has quit [Remote host closed the connection]
stevechiagozie has quit [Quit: Textual IRC Client: www.textualapp.com]
jrist-afk is now known as jrist
bbloom has joined #ruby
gregorg_taf has joined #ruby
`gregorg` has quit [Read error: Connection reset by peer]
ryanf has joined #ruby
<shevy> apeiros_ hehe
<apeiros_> JDubs: you mist a shevyism
<apeiros_> *missed
lenovodroid has joined #ruby
<JDubs> what is a shevyism lol
cantonic_ has joined #ruby
<Divinite> Hahahahahahha
<Divinite> It's where shevy forgets he's in #ruby
<Divinite> And posts his most fanciful dreams
<Divinite> ^JDubs
<shevy> heyyyyy
<shevy> someone else here wanted chaining first :(
<Divinite> Heya shevy
cantonic has quit [Ping timeout: 250 seconds]
cantonic_ is now known as cantonic
<shevy> I am merely guilty of the whipping
<JDubs> wtf
<JDubs> shevy is into bdsm eh?
banisterfiend has quit [Remote host closed the connection]
<Divinite> JDubs: It appears
<Divinite> That or he's an actor
<JDubs> Well...We all have weird things...I like to have either http://heyyeyaaeyaaaeyaeyaa.com/ or lookatmyhorsemyhorseisamazing.com playing in the background looping lol
doodlehaus has quit [Remote host closed the connection]
<JDubs> xD
Eiam has joined #ruby
_sillymarkets_ has quit [Ping timeout: 245 seconds]
LBRapid has quit [Quit: Farewell.]
BadProphet has quit [Remote host closed the connection]
dougireton has joined #ruby
<shevy> JDubs nah not really
_alejandro has joined #ruby
<shevy> JDubs it's the mere thought alone
<shevy> I can forever say skydiving seems awesome, but I am never going to do it myself :(
<shevy> or writing C code is awesome...
nomenkun has quit [Remote host closed the connection]
Blue_Ice has quit [Ping timeout: 260 seconds]
bwlang has joined #ruby
arturaz has quit [Remote host closed the connection]
<JDubs> shevy: why don't you try the things you think would be awesome?
xnm has quit [Ping timeout: 252 seconds]
nomenkun has joined #ruby
<JDubs> shevy: YOLO amirite? lol
<shevy> JDubs nah, too conservative. motorcycles look cool too, especially the heavy ones, but I don't fancy a crash with them, so I will never get one
gregorg_taf has quit [Read error: Connection reset by peer]
`gregorg` has joined #ruby
mrsolo has joined #ruby
kirun has quit [Quit: Client exiting]
<JDubs> shevy: I've had 4 motorcycles, they really aren't that dangerous...wear proper safety gear and ride defensively
alex__c2022 has quit [Remote host closed the connection]
* slash_nick squints at the line between fantasy and reality
<Divinite> shevy: Just walk on the nearest street, grab the hottest girl, and do whatever you want
<Divinite> Lol
alex__c2022 has joined #ruby
<JDubs> shevy: why are you afraid to live bro?
sailias has quit [Quit: Leaving.]
<Divinite> ^that
<JDubs> shevy: get out there and enjoy life man
<JDubs> if you live near me ill take you out for a beer man
<JDubs> where you from?
piotr_ has joined #ruby
<Divinite> Haha
dankest|away is now known as dankest
skrite has joined #ruby
<blazes816> see shevy this chan seems to be full of guys wanting to date you
xnm has joined #ruby
<slash_nick> lol
LouisGB has joined #ruby
<aedorn> Life is scary.. it's full of things that'll kill you.
<JDubs> blazes816 lol...
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo_ is now known as tommyvyo
<apeiros_> mhm, the world is pretty anti-life
<apeiros_> even time is anti-life!
enroxorz-work has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
cek has quit [Quit: жопа диридай диридиридай]
miskander has quit [Quit: miskander]
doodlehaus has joined #ruby
`gregorg` has quit [Read error: Connection reset by peer]
gregorg_taf has joined #ruby
robbyoconnor has quit [Ping timeout: 260 seconds]
<sirecote> is the installer at rubyinstaller.org the recommended method with the least problems for a windows environment?
Coolhand_ is now known as Coolhand
<waxjar> can anyone explain why the brackets are necessary here? https://gist.github.com/4340725
<shevy> JDubs I dunno, I think the days of high risk are kinda over :(
miskander has joined #ruby
<JDubs> shevy: how old are you? you talk like you are 90...
<shevy> JDubs 4 motorcycles omg
banisterfiend has joined #ruby
<JDubs> shevy: how. old. are. you.
sepp2k has quit [Remote host closed the connection]
gordon1775 has quit [Read error: Connection reset by peer]
<aedorn> sirecote: If you must use Windows, then yes. Well... at least it used to be pretty damn decent. I'm sure it still is
<shevy> bit too old for most things :(
chessguy has joined #ruby
SJr has quit [Ping timeout: 264 seconds]
<sirecote> aedorn: thanks, the joys of working in a windows shop
<apeiros_> waxjar: what brackets?
<bean> sirecote: protest and install a linux VM
<apeiros_> waxjar: brackets are []
<waxjar> ah, *parenthesis
<apeiros_> you probably mean parens, but still, which ones?
<shevy> waxjar hmm good question
<waxjar> the ones around gsub!s arguments apeiros_
<apeiros_> ah, method call
<havenn> waxjar: Interesting that if you remove the space following '/' it works. Odd parsing.
<shevy> the gsub vs gsub() ones
<apeiros_> waxjar: 5 / 6
<apeiros_> / can be a method call too
<sirecote> bean: infrastructure guys don't want to support it unfortunately...
<shevy> seems like a simple enough answer :)
<waxjar> ah, makes sense
mikeg has quit [Disconnected by services]
<apeiros_> and probably because your regex starts with a space…
<sirecote> they won't even let us dual boot our desktops :s
<apeiros_> try what happens with '/\x20' instead of '/ '
<bean> sirecote: ah, this is not a solution for just you? I'm an infrastructure guy and I say people cna do what they want as long as I dont have to fix it
Maniacal has joined #ruby
ossareh has joined #ruby
<apeiros_> bean: had that agreement with our infrastructure guys. worked pretty well for both sides :)
sepp2k has joined #ruby
<bean> agreed.
<waxjar> that works wonderfully apeiros_, thanks
<bean> i occasionally help w/ VMs and shit breaking, but most of the time it's "i dunno, reinstall it, i didnt install it"
<apeiros_> waxjar: also %r{…} would probably work
<sirecote> bean: yeah i think that's the method we'll go down when we move pitch the idea to move it off windows
<bean> my shop was 90% windows 5 years ago
<bean> we're down to 2 windows servers, and 2 windows PCs
thmzlt has quit [Remote host closed the connection]
<sirecote> bean: nice, baby steps for us hah
gregorg_taf has quit [Read error: Connection reset by peer]
<bean> its def a process but very worth it
<aedorn> we're pro Microsoft here. Even use Microsoft Online Services for email. (it breaks every other day)
* bean is coming to you LIVE from a macbook air
`gregorg` has joined #ruby
slainer68 has joined #ruby
<shevy> hmmm
Astral__ has joined #ruby
<shevy> bean, I imagine you wear italian clothes
<bean> far from it
davejacobs has joined #ruby
ltsstar has quit [Quit: ltsstar]
marr has joined #ruby
zerserker has joined #ruby
Astral_ has quit [Ping timeout: 256 seconds]
Kuifje has quit [Ping timeout: 248 seconds]
gregorg_taf has joined #ruby
`gregorg` has quit [Read error: Connection reset by peer]
<shevy> hmmm
<shevy> jeans + macbook air then
Neomex has joined #ruby
Neomex has quit [Client Quit]
<aedorn> Near everyone at rubyconf used a macbook. I felt displaced booting up linux in the presence of all those glowing apples
hashpuppy has quit [Quit: hashpuppy]
jkarayusuf has quit [Remote host closed the connection]
<bean> shevy: jeans, macbook air, tshirt from local college's basketball team
<bean> so, you win
Astral has joined #ruby
samuel02 has quit [Remote host closed the connection]
kirun has joined #ruby
Astral is now known as Guest90211
tvw has joined #ruby
gregorg_taf has quit [Read error: Connection reset by peer]
gregorg_taf has joined #ruby
twoism has quit [Read error: Connection reset by peer]
w|t has quit [Quit: No Ping reply in 150 seconds.]
twoism has joined #ruby
Astral__ has quit [Ping timeout: 265 seconds]
ebouchut has joined #ruby
Iszak has quit []
aldodelgado has joined #ruby
ebouchut has quit [Client Quit]
beiter has quit [Quit: beiter]
answer_42 has quit [Ping timeout: 276 seconds]
w|t has joined #ruby
w|t has joined #ruby
w|t has quit [Changing host]
d2dchat has quit [Remote host closed the connection]
Iuz has quit [Read error: Connection timed out]
Iuz has joined #ruby
<the_jeebster> are there any asynchronous callbacks in ruby?
Iuz has joined #ruby
Iuz has quit [Changing host]
sriehl has quit [Remote host closed the connection]
thmzlt has joined #ruby
`gregorg` has joined #ruby
gregorg_taf has quit [Read error: Connection reset by peer]
<shevy> bean hey cool... at least you support a local team
Goles has quit [Quit: Computer has gone to sleep.]
<bean> haha yep
<shevy> I always cheered for the opponents ;)
bent has joined #ruby
mengu has quit [Quit: Konversation terminated!]
rakuN has quit [Remote host closed the connection]
tommyvyo_ has joined #ruby
rondale_sc has left #ruby [#ruby]
ner0x has quit [Quit: Leaving]
mark_locklear has quit [Read error: Connection reset by peer]
havenn has quit [Read error: Connection reset by peer]
_alejandro has quit [Remote host closed the connection]
willob has joined #ruby
rondale_sc has joined #ruby
razibog has quit [Quit: Leaving.]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
mmitchell has quit [Remote host closed the connection]
chussenot has quit [Quit: chussenot]
rondale_sc has quit [Client Quit]
havenn has joined #ruby
davejacobs has quit [Quit: leaving]
dougireton has quit [Quit: Leaving.]
spathi has joined #ruby
w|t_ has joined #ruby
nomenkun_ has joined #ruby
`gregorg` has quit [Read error: Connection reset by peer]
gregorg_taf has joined #ruby
w|t has quit [Read error: No route to host]
bigmcq77 has joined #ruby
dougireton has joined #ruby
_sillymarkets has joined #ruby
aldodelgado has quit [Quit: aldodelgado]
nomenkun has quit [Ping timeout: 246 seconds]
dmerrick has quit [Ping timeout: 264 seconds]
francisfish has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 246 seconds]
w|t_ has quit [Quit: No Ping reply in 150 seconds.]
w|t has joined #ruby
Iuz has quit [Read error: Connection timed out]
<the_jeebster> if I have two arrays of integers and I need to multiple each value at the proper index of each array together, what's the most efficient way of performing this calculation?
Iuz has joined #ruby
dawkirst_ has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
thecreators has joined #ruby
chussenot has joined #ruby
havenn has quit [Read error: No route to host]
havenn has joined #ruby
<hoelzro> the_jeebster: sounds like zip
sn0wb1rd has quit [Quit: sn0wb1rd]
<the_jeebster> hoelzro: yikes, looks hair either way to go about it
<the_jeebster> a = [1, 2, 3] b = [1,2,3] need to be able to do a[0] * b[0] etc.
w|t has quit [Client Quit]
`gregorg` has joined #ruby
gregorg_taf has quit [Read error: Connection reset by peer]
w|t has joined #ruby
asteve has quit [Quit: Computer has gone to sleep.]
thatguycraig has quit [Quit: Leaving.]
billy_ran_away has quit [Ping timeout: 255 seconds]
jrochkind has joined #ruby
jekotia has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
billy_ran_away has joined #ruby
gregorg_taf has joined #ruby
`gregorg` has quit [Read error: Connection reset by peer]
pcarrier has joined #ruby
woolite64 has quit [Ping timeout: 260 seconds]
`gregorg` has joined #ruby
dbrgn has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
chussenot has quit [Quit: chussenot]
gregorg_taf has quit [Read error: Connection reset by peer]
abrausch has joined #ruby
<banisterfiend> the_jeebster: i = []; a.zip(b) { |v1, v2| i << v1 * v2 }
<dbrgn> is there a way to get a list of all classes defined in the current file? something similar to locals() in python...
<apeiros_> a.zip(b).map(&:*)
woolite64 has joined #ruby
<apeiros_> the_jeebster: also use ; to create valid one-line code in irc
<apeiros_> (; instead of newline)
<apeiros_> oh, &:* noworky? :(
elico has joined #ruby
<apeiros_> gah, well, then a.zip(b).map { |x,y| x*y }
<oz> nope :)
<apeiros_> why ever &:* fails
atno has quit [Ping timeout: 260 seconds]
<banisterfiend> apeiros_: nice
<oz> because it's called with an array, and map's expansion is not done
elico has quit [Remote host closed the connection]
<oz> smthg like that I guess
jenrzzz has joined #ruby
<apeiros_> yeah, probably single object yielded
darthdeus has quit [Quit: Leaving...]
<apeiros_> so it tries [a,b].*()
<apeiros_> instead of a.*(b)
Iuz has quit [Read error: Connection timed out]
nomenkun_ has quit [Remote host closed the connection]
Iuz has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
<oz> it'd be nice though :)
gregorg_taf has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
`gregorg` has quit [Read error: Connection reset by peer]
stevechiagozie has joined #ruby
maletor has joined #ruby
<slash_nick> [a,b].inject(:*)
otters has joined #ruby
<banisterfiend> slash_nick: did u even try that?
abrausch has quit [Quit: Get MacIrssi - http://www.sysctl.co.uk/projects/macirssi/]
hoelzro is now known as hoelzro|away
colonolGron has joined #ruby
<colonolGron> hi
dorei has joined #ruby
SJr has joined #ruby
<slash_nick> banisterfiend: yeah, but i did NOT read what whoever was trying to get
<banisterfiend> slash_nick: well your code results in:
<slash_nick> just [a,b].*() instead of a.*(b)
<banisterfiend> [21] pry(main)> [a,b].inject(&:*)
<banisterfiend> TypeError: can't convert Array into Integer
<banisterfiend> :P
<banisterfiend> slash_nick: looks alluring though
<slash_nick> lol... I tried with [1,2] instead of [a,b]
* slash_nick just wants to participate, sheesh
<oz> in that case, "1*2" is even shorter :)
thams has quit [Quit: thams]
Banistergalaxy has joined #ruby
<slash_nick> oz, but [1,2,3,4,5,6].inject(:*) is shorter than __
Banistergalaxy has quit [Client Quit]
<oz> you're right :)
<dorei> from C, I urlencode a wchar_t *, and then post it to sinatra, at sinatra side, is there a way after urldecoding, to convert the wchar_t * into a Ruby String?
Banistergalaxy has joined #ruby
larissa has joined #ruby
atmosx has joined #ruby
mkillebrew has quit [Read error: Connection reset by peer]
gregorg_taf has quit [Read error: Connection reset by peer]
`gregorg` has joined #ruby
<oz> dorei: what do you get after urldecoding? :)
<dorei> it depends
<dorei> if the original string was not unicode
<dorei> i get a \0 inserted after every second char
<dorei> i guess that's what wchar is
iamjarvo has quit [Quit: Leaving.]
flip_digits has joined #ruby
mengu has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
<oz> well wchar are *usually* unicode, but there is no guarantee of that iirc
<oz> and ruby 1.9 strings' encoding defaults to UTF-8
cdt_ has quit [Ping timeout: 272 seconds]
<oz> "string".encoding # => #<Encoding:UTF-8>
mkillebrew has joined #ruby
<ryanf> oz: that is actually not true in general
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
<ryanf> it's usually true in irb or whatever, I think because of locale maybe?
<ryanf> but string literals in scripts are just ascii unless you include a magic comment
<slash_nick> (&:/win 3
<slash_nick> hilarious
<ryanf> I think that might be different in ruby 2.0 though
maletor has joined #ruby
generalissimo has joined #ruby
Xeago has quit [Remote host closed the connection]
doodlehaus has quit [Remote host closed the connection]
Averna has joined #ruby
<oz> ryanf: er, yup I assumed the world was using a rather common locale :p
atno has joined #ruby
<JDubs> good night guys
<JDubs> o/
<ryanf> oz: yeah, my point is that that's true of the console but not of scripts
<ryanf> no matter what your locale is, string literals in scripts are always US-ASCII unless you have a magic comment
<dorei> okie
<dorei> is there a way to convert utf-8 into utf-16?
<gbchaosmaster> 'Night JDubs
<dorei> or rather, not convert
<gbchaosmaster> \o
mmitchell has joined #ruby
thecreators has quit [Quit: thecreators]
<dorei> my string is utf-16, how every my_string.encoding shows utf-8
havenn_ has joined #ruby
<apeiros_> ryanf: wasn't there some env variable which could change that too? (horrible idea IMO)
havenn has quit [Ping timeout: 252 seconds]
jlast has quit [Ping timeout: 244 seconds]
<rismoney> i love when rspec passes. wohoo :)
gregorg_taf has joined #ruby
`gregorg` has quit [Read error: Connection reset by peer]
slash_nick has quit [Ping timeout: 256 seconds]
chaosis has joined #ruby
<apeiros_> oz: no, default_internal isn't the same as what's used for script file encoding, at least iirc
<oz> (with her little sister #default_external)
ramblex has quit [Remote host closed the connection]
<oz> "::default_internal is initialized by the source file's internal_encoding or -E option."
<oz> but it is changed by it.
<apeiros_> yes, that's the other way round :-p
blacktulip has quit [Remote host closed the connection]
<oz> the external encoding should depend on the locale/env in order to try to print things correctly.
breakingthings has quit []
<oz> while the internal encoding seems to follow the script's encoding pragma, or the -E option, which also makes sense.
<oz> or am I mistaken?
bean has quit [Quit: Computer has gone to sleep.]
alanp_ has joined #ruby
<apeiros_> IMO only stdout should default to env
<apeiros_> everything else should be set explicitly
alanp has quit [Read error: Connection reset by peer]
<apeiros_> the current setting is a recipe for disaster IMO
neiled has joined #ruby
nari_ has joined #ruby
alanp_ is now known as alanp
<oz> most coders I know use an UTF-8 pragma on their files :p
<dorei> but my strings are utf-16
bluenemo has quit [Quit: Verlassend]
<apeiros_> yes. that's one way of being explicit. but that doesn't set default_*
<dorei> how can i tell that to ruby?
<apeiros_> dorei: depends on the source
<apeiros_> dorei: File.read(path, encoding: 'utf-16') f.ex.
mmitchel_ has joined #ruby
mmitchel_ has quit [Remote host closed the connection]
joshman_ has quit [Ping timeout: 264 seconds]
<dorei> apeiros_: urlencoded data from method post, i think the source is webrick
<apeiros_> though iirc ruby fails at getting the BOM and using it to determine endianness :-/
<oz> apeiros_: well, it seems that when it has no clue, MRI defaults to good old ASCII
_sillymarkets has quit [Quit: Page closed]
<apeiros_> dorei: oh, an existing string? .force_encoding
<apeiros_> horribly named method :(
<dorei> thanx :)
<apeiros_> force_encoding only changes the encoding meta-information, it doesn't re-encode the string
malte_ has quit [Ping timeout: 246 seconds]
havenn has joined #ruby
<apeiros_> oz: which is again horrible. binary would be a sane default.
<apeiros_> oz: also not being able to run binary regexen against utf-8 data? wtf?
<dorei> ArgumentError: unknown encoding name - utf-16
hotovson has joined #ruby
<apeiros_> dorei: ah, you might have to actually provide endianness
xyzodiac has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros_> i.e. UTF-16BE or UTF-16LE
_nitti has quit [Remote host closed the connection]
grzywacz has quit [Ping timeout: 255 seconds]
<apeiros_> hm, no? odd… UTF-16 is in the list of known encoding names
generalissimo has quit [Remote host closed the connection]
mmitchell has quit [Ping timeout: 264 seconds]
bwlang has left #ruby [#ruby]
iamjarvo has joined #ruby
gregorg_taf has quit [Read error: Connection reset by peer]
dankest has quit [Quit: Linkinus - http://linkinus.com]
IceDragon has joined #ruby
gregorg_taf has joined #ruby
<oz> (with "dummy" appended to it on my laptop)
havenn_ has quit [Ping timeout: 246 seconds]
bean has joined #ruby
havenn has quit [Ping timeout: 246 seconds]
thams has joined #ruby
alexspeller has joined #ruby
bean has quit [Client Quit]
jeffreybaird has quit [Quit: jeffreybaird]
solidoodlesuppor has quit [Remote host closed the connection]
`gregorg` has joined #ruby
gregorg_taf has quit [Read error: Connection reset by peer]
malte_ has joined #ruby
SoonerBourne has quit [Quit: HydraIRC -> http://www.hydrairc.com <- Organize your IRC]
whomp has quit [Ping timeout: 260 seconds]
<iamjarvo> has anyone worked with fnm files?
cakehero has quit [Quit: Computer has gone to sleep.]
nemesit has quit [Quit: Leaving...]
* apeiros_ smacks iamjarvo
<apeiros_> yes, someone has. almost certainly.
<apeiros_> (and that's why "has anyone *" questions are some of the few actually stupid questions…)
mneorr has joined #ruby
friskd has joined #ruby
<iamjarvo> lol apeiros_ sorry. i just dont know where to start with it
friskd has quit [Remote host closed the connection]
<dorei> replacing my modem, brb
dorei has quit []
<atmosx> I need to build an app on heroku, is there any other service like heroku that offers free accounts?
dougireton has quit [Quit: Leaving.]
<iamjarvo> im googling for working with it. not findign much
<atmosx> I'll have to do some CSS work and I hate it :-(
<apeiros_> iamjarvo: I'd start by describing your problem. it *might* just lead to help.
gregorg_taf has joined #ruby
`gregorg` has quit [Read error: Connection reset by peer]
gordon1775 has joined #ruby
adamnbowen has quit [Quit: Textual IRC Client: www.textualapp.com]
joeycarmello has quit [Remote host closed the connection]
dorei has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
whomp has joined #ruby
mele- has joined #ruby
jonathanwallace has joined #ruby
jeffreybaird has joined #ruby
SJr has quit [Ping timeout: 250 seconds]
jonathanwallace has quit [Client Quit]
Spami has joined #ruby
dougireton has joined #ruby
<iamjarvo> kk, so i want to create an fnm file from data that i have and I am trying to figure out ho wot convert to the fnm file format. I am not sure about what maps to to what to create the file
rburton- has quit [Ping timeout: 260 seconds]
whomp has quit [Ping timeout: 260 seconds]
Nimsical has joined #ruby
`gregorg` has joined #ruby
gregorg_taf has quit [Read error: Connection reset by peer]
aaronmacy1 has joined #ruby
aaronmacy has quit [Read error: Connection reset by peer]
__BigO__ has quit [Remote host closed the connection]
dougireton has quit [Quit: Leaving.]
xhoy has quit [Read error: Operation timed out]
miskander has quit [Quit: miskander]
`gregorg` has quit [Read error: Connection reset by peer]
gregorg_taf has joined #ruby
willob has quit [Quit: Leaving.]
bigmcq77 has quit [Quit: Computer has gone to sleep.]
clooth has quit [Quit: clooth]
sqbell has joined #ruby
jonathanwallace has joined #ruby
fir_ed has joined #ruby
jonathanwallace has quit [Client Quit]
ViperMaul|_ has quit [Ping timeout: 248 seconds]
jonathanwallace has joined #ruby
jjang has joined #ruby
pwelch has joined #ruby
pwelch has quit [Client Quit]
thmzlt has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 248 seconds]
lenovodroid has quit [Ping timeout: 260 seconds]
gregorg_taf has quit [Read error: Connection reset by peer]
`gregorg` has joined #ruby
Divinite has quit [Ping timeout: 252 seconds]
kirun has quit [Quit: Client exiting]
jenrzzz has joined #ruby
frem has quit [Quit: Computer has gone to sleep.]
friskd has joined #ruby
<JDubs> Anyone used rhomobile to make an adroid app?
thmzlt has joined #ruby
Divinite has joined #ruby
sqbell has quit [Quit: leaving]
jonathanwallace has quit [Client Quit]
jamesaxl has joined #ruby
izltd has joined #ruby
izltd has left #ruby [#ruby]
`gregorg` has quit [Read error: Connection reset by peer]
gregorg_taf has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
pyx has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
pyx has quit [Client Quit]
Siphonblast has joined #ruby
pu22l3r has quit [Remote host closed the connection]
sealeaf1 has joined #ruby
<sealeaf1> Hi, I'm trying to dynamically create an attribute on an object, but I'm getting an undefined method error
<sealeaf1> I'm doing object.x = "hello", but it's giving me undefined method x
<sealeaf1> Is there a different way to do this in Ruby?
<JDubs> What might cause an error like this: "unable to convert "\x93" from ASCII-8BIT to UTF-8 for lib/extensions/pdf-writer/pdf/writer/object/page.rb, skipping
<JDubs> "
gregorg_taf has quit [Read error: Connection reset by peer]
<JDubs> sealeaf1 you could write a no_method method to turn whatever method is given into an accessor I suppose
<JDubs> that's the only idea I have, because I'm new to ruby
`gregorg` has joined #ruby
<sealeaf1> JDubs: Thanks.
banisterfiend has quit [Remote host closed the connection]
theRoUS has quit [Ping timeout: 255 seconds]
kuzushi has quit [Ping timeout: 252 seconds]
zerserker has quit [Ping timeout: 260 seconds]
anachronistic has quit [Quit: anachronistic]
nateberkopec has quit [Quit: Leaving...]
_nitti has joined #ruby
Axsuul has joined #ruby
whomp has joined #ruby
hydrozen has joined #ruby
_nitti has quit [Client Quit]
<hydrozen> How would you proceed to calculate a digest for the content of a directory? you tar the directory and calculate a md5 or sha-1? Will that give the same results on different machines/platforms?
dawkirst_ has joined #ruby
<atmosx> hydrozen: absolutely yes
freeayu has joined #ruby
<hydrozen> are there some special options i should pass to tar? I'm trying on 2 machines and getting different md5
axl_ has quit [Quit: axl_]
<atmosx> hydrozen: otherwise there would be no point in using hashes for data integrity check
<atmosx> hydrozen: on the same file?
JDubs has quit [Remote host closed the connection]
<hydrozen> i'm taring a directory with directories in it and files
otters has quit [Ping timeout: 255 seconds]
<hydrozen> and doing that operaration on 2 machines gave 2 tars that seem different
speakingcode has quit [Quit: get money]
<atmosx> macosx -> MD5 (test.rb) = 3df32921be283985b0822b534685864e … freebsd -> MD5 (test.rb) = 3df32921be283985b0822b534685864e
<atmosx> hydrozen: then they are different
<atmosx> if you are using the same hash
<hydrozen> its not so much the md5 calculation im worried about
<blazes816> the issue is deterministically generating the data to hash
<apeiros_> hydrozen: if all you're after is a hash value, tar'ing needlessly creates a huge temporary file
C0deMaver1ck has quit [Remote host closed the connection]
<hydrozen> my question is: if i tar a directory on one machine…. and tar the same directory on another machine
sepp2k has quit [Quit: Leaving.]
<hydrozen> will they both result in a tar file with the same digest
<blazes816> they will most likely not be identical
<hydrozen> seems like no
<apeiros_> hydrozen: you'd create a new digest, read the files in e.g. 1MB slices and update the digest with it
<atmosx> I don't thin kso hydrozen
<apeiros_> I'd also add the filename to the digest
<atmosx> tar might have 2 even diff versions or implementations
<apeiros_> ensure that the file order stays the same (e.g. sort)
u89 has joined #ruby
<atmosx> deploying on herokus was easier thatn I thought.
<hydrozen> apeiros_: yeah i know, but its really really small text files
samphippen has quit [Quit: Computer has gone to sleep.]
<hydrozen> but yeah, seems like i'll have to read the files manually in a specific order
<hydrozen> to create a reliable hash
agarie has joined #ruby
jlast has joined #ruby
u89 has quit [Remote host closed the connection]