mengu has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
thyagobr has quit [Quit: thyagobr has no reason]
sam113101 has quit [Quit: WeeChat 0.4.3-dev]
dangerousdave has quit [Ping timeout: 246 seconds]
droptone has quit [Ping timeout: 260 seconds]
randomnick_ has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
madb055 has quit [Read error: Connection reset by peer]
fuhgeddaboudit has joined #ruby
freakazoid0223 has joined #ruby
sam113101 has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Monie has quit [Ping timeout: 246 seconds]
simoz2 has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
AlSquire has quit [Quit: This computer has gone to sleep]
amacgregor has quit [Read error: Connection reset by peer]
madb055 has joined #ruby
mjs2600 has quit [Remote host closed the connection]
hiroyuki has quit [Read error: Connection reset by peer]
freezey has joined #ruby
simoz has quit [Ping timeout: 272 seconds]
threesome has quit [Ping timeout: 248 seconds]
macmartine has quit [Remote host closed the connection]
otherj has joined #ruby
mjs2600 has joined #ruby
mweshi has joined #ruby
weszlem has quit []
mmcdaris has quit [Quit: mmcdaris]
<shevy>
Apane for x in y is thinking differently to container objects in ruby, in where you can just iterate over them, using .each or .each_with_index
Shidash has quit [Ping timeout: 260 seconds]
fridim_ has joined #ruby
Solnse has quit [Ping timeout: 252 seconds]
snuffeluffegus has quit [Remote host closed the connection]
jerius has joined #ruby
m8 has quit [Quit: Sto andando via]
Ox6abe has joined #ruby
cafhacker has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jerius has quit [Client Quit]
petey__ has quit []
mjs2600 has quit [Remote host closed the connection]
predator117 has joined #ruby
madb055 has quit [Read error: Connection reset by peer]
eka has joined #ruby
madb055 has joined #ruby
predator217 has quit [Ping timeout: 272 seconds]
bootcoder has quit [Read error: Connection reset by peer]
bootcoder has joined #ruby
fgo has joined #ruby
<Rickmasta>
Hey guys. I have a string such as "Blue 9 Green 7 Red 1 Red 6 Red 8". I'm trying to split using a digit. But include the delimeter. So I'm trying to get a result like ["Blue 9", "Green 7", "Red 1", "Red 6", "Red 8"]
<shevy>
you can use a regex in .split(//)
iliketurtles has quit [Ping timeout: 245 seconds]
<Rickmasta>
I am using split, but with that I get the digits removed. So I get ["Blue", "Green", "Red", "Red", "Red"]
<bnagy>
havenwood: :) I had this in my irb .split.each_slice(2).map {|a,b| "#{a} #{b}"}
<bnagy>
just didn't bother pasting it :)
<havenwood>
bnagy: ha :)
Monie has joined #ruby
<bnagy>
Rickmasta: 99% of the time I will use a 'primary' tokenising approach ( split on space first etc ) instead of a regexp
<bnagy>
it's just better software engineering almost always
<Rickmasta>
Well, I then need to parse out things like "Wild" "Wild Draw Four" "Yellow Skip" "Red Reverse", so I was thinking to slice the string after getting my number cards out of the way.
DanKnox_away is now known as DanKnox
mojjojo has quit [Quit: mojjojo]
pskosinski has quit [Quit: Til rivido Idisti!]
<Rickmasta>
I'll having to look up exactly what you mean, bnagy. :)
<bnagy>
that's a great example
<bnagy>
Wild vs Wild Draw Four
subbyyy has quit [Ping timeout: 264 seconds]
<bnagy>
only way to do that with regex is lookaheads, which is going to be hell ugly
<bnagy>
whereas just tokenising you can build a really simple state machine
<bnagy>
like Red - always going to be followed by another token
<Rickmasta>
Is possible if you can link me a good read?
<havenwood>
Rickmasta: Yeah, split.each_slice(2) is prolly the way to go then. You can do logic based on what the card or color are or aren't
<bnagy>
Wild - might need to emit as is, need to peek to be sure
<havenwood>
Rickmasta: Though... are they always pairs?
Ox6abe has quit [Ping timeout: 240 seconds]
<bnagy>
no, Wild Draw Four
<havenwood>
Seems a design problems that a run-on string like that is ever happening.
<Rickmasta>
There's also "Wild" and "Wild Draw Four", the only two which aren't pairs.
<bnagy>
well blame uno, dude
<havenwood>
haha
<Rickmasta>
lol
intuxicated has joined #ruby
kirun_ has quit [Quit: Client exiting]
mengu has quit [Ping timeout: 248 seconds]
mary5030_ has quit [Remote host closed the connection]
mary5030 has joined #ruby
ravster has joined #ruby
aspires has joined #ruby
hogeo has joined #ruby
osvico has quit []
devyn has joined #ruby
Jetchisel has joined #ruby
i_s has joined #ruby
freezey has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
mary5030 has quit [Ping timeout: 272 seconds]
cafhacker has joined #ruby
ndngvr has quit [Remote host closed the connection]
ndngvr has joined #ruby
<havenwood>
>> [*%w[Red Green Blue Yellow].product(%w[One Two Three Four Five Six Seven Eight Nine Skip Reverse] << 'Draw Two').map { |pair| pair.join ' ' }, *4.times.map { 'Wild' }, *4.times.map { 'Wild Draw Four' }]
ewnd9 has quit [Remote host closed the connection]
<havenwood>
lol, i was wondering what type of code a cam would be >.>
EvanR_ has joined #ruby
<havenwood>
that type... >.>
ewnd9 has joined #ruby
<Apane>
do I have to add something to the account.rb file so it can be required? i.e. a filepath?
iliketurtles has joined #ruby
<havenwood>
Apane: `require' does not work relative to your pwd unless you prefix with './', but there is `require_relative`
Evelynn has quit []
<shevy>
Apane it depends on where the file is. if you install things as part of a project, then NAME_OF_PROJECT/filename_here.rb would work with require alone
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iliketurtles has joined #ruby
Vivekananda has joined #ruby
sambao21 has quit [Ping timeout: 272 seconds]
ewnd9 has quit [Ping timeout: 272 seconds]
SiliconDon has joined #ruby
classix has quit [Read error: Operation timed out]
lolmaus has quit []
DanKnox is now known as DanKnox_away
gazarsgo has joined #ruby
classix has joined #ruby
madb055 has quit [Ping timeout: 246 seconds]
pragmatism has quit [Quit: Leaving...]
hamakn has joined #ruby
havenwood has quit [Remote host closed the connection]
dnyy has quit []
Ziarkaen has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
ckinni has joined #ruby
dfish has quit [Ping timeout: 245 seconds]
SiliconDon has quit [Client Quit]
burgess|vayo has joined #ruby
wallerdev has joined #ruby
amacgregor has quit [Ping timeout: 245 seconds]
amacgregor_ has joined #ruby
mercwithamouth has joined #ruby
Ox6abe has joined #ruby
bkparso has quit [Quit: bkparso]
havenwood has quit [Ping timeout: 246 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby
z_ has joined #ruby
<Rickmasta>
Hey guys. So I have a string like "WILD WILD WILD draw four WILD", how would I go about seperating them? I'd want an output like ["WILD, "WILD", "WILD draw four", "WILD].
Spami has quit [Quit: This computer has gone to sleep]
<dcope>
it seems like when the response code is "200" the type is *not* HTTPSuccess
<dcope>
why is this?
radic has joined #ruby
<zzak>
you mean "following redirection"?
<dcope>
zzak: yes
<dcope>
oh they're type checking the actual response, not the code
<dcope>
lol
<dcope>
yay for having a second set of eyes take a look
<zzak>
the response type classes are just subclasses of HTTPResponse
<dcope>
yeah, sorry, i got confused for a sec. got it now though. thanks
<zzak>
you can check both, class or code, shouldnt matter afaik
<zzak>
np
hogeo has quit [Remote host closed the connection]
<rjhunter>
that just reminds me of the late-90s search engine that used to reply HTTP/1.1 200 HowdyPardner
Naoe-Kanno has quit [Quit: ネウロイを負かさなきゃならないね]
thelorax123 has quit [Remote host closed the connection]
testr0n is now known as robonerd
bugsinlights has quit [Remote host closed the connection]
bugsinlights has joined #ruby
thelorax123 has joined #ruby
<rjhunter>
nothing out of spec about using the reason phrase "HowdyPardner" instead of "OK", but it's the only time I've seen a localised HTTP reason phrase it in the wild
Spami has joined #ruby
hogeo has joined #ruby
jeremywrowe has joined #ruby
jeremywrowe has joined #ruby
jeremywrowe has quit [Changing host]
reset has joined #ruby
mercwithamouth has quit [Ping timeout: 248 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
<nobitanobi>
:q
nobitanobi has quit [Remote host closed the connection]
endash has quit [Quit: endash]
reset has quit [Ping timeout: 272 seconds]
ringaroses has quit [Ping timeout: 252 seconds]
baroquebobcat has joined #ruby
amacgregor_ has joined #ruby
Hanmac has joined #ruby
baroquebobcat has quit [Client Quit]
wallerdev has quit [Quit: wallerdev]
Hanmac1 has quit [Ping timeout: 252 seconds]
amacgregor has quit [Ping timeout: 245 seconds]
varfoo has joined #ruby
amacgregor_ has quit [Ping timeout: 246 seconds]
vlad_starkov has joined #ruby
mweshi has joined #ruby
RichardBaker has joined #ruby
ThinkRusty87 has joined #ruby
otherj has quit []
bootcoder has quit [Read error: Connection reset by peer]
ThinkRusty87 has quit [Killed (idoru (Spam is off topic on freenode.))]
vlad_starkov has quit [Ping timeout: 272 seconds]
bootcoder has joined #ruby
danshultz has quit [Remote host closed the connection]
sandeepk has joined #ruby
danshultz has joined #ruby
platzhirsch has quit [Ping timeout: 246 seconds]
Guest27654 has quit [Ping timeout: 245 seconds]
Aryasam has joined #ruby
danshultz has quit [Ping timeout: 246 seconds]
sandeepk has quit [Read error: Connection reset by peer]
sandeepk has joined #ruby
jerius has joined #ruby
Ripp__ has quit []
havenwood has joined #ruby
jeremywrowe has quit [Ping timeout: 240 seconds]
banister has quit [Ping timeout: 246 seconds]
jerius has quit [Ping timeout: 240 seconds]
jmaya has joined #ruby
radic has quit [Ping timeout: 245 seconds]
jmaya has quit [Client Quit]
orangerobot has quit [Quit: Page closed]
gazarsgo has quit [Quit: gazarsgo]
platzhirsch has joined #ruby
thelorax123 has quit [Remote host closed the connection]
dhruvasagar has quit [Read error: Operation timed out]
aagdbl has quit [Quit: This computer has gone to sleep]
thelorax123 has joined #ruby
thelorax123 has quit [Remote host closed the connection]
nobitanobi has joined #ruby
<nobitanobi>
hello
thelorax123 has joined #ruby
Guest99863 has joined #ruby
Guest99863 has quit [Client Quit]
taternuts has quit []
Reach has joined #ruby
reset has joined #ruby
Hanmac1 has joined #ruby
rickruby has quit [Remote host closed the connection]
rickruby has joined #ruby
closures999 has joined #ruby
Apane has quit [Ping timeout: 272 seconds]
psyl0n has quit [Ping timeout: 246 seconds]
Aryasam has quit [Read error: Connection reset by peer]
Hanmac has quit [Ping timeout: 245 seconds]
soba has joined #ruby
Aryasam has joined #ruby
theRoUS|afk has quit [Ping timeout: 252 seconds]
reset has quit [Ping timeout: 272 seconds]
rickruby has quit [Ping timeout: 272 seconds]
mweshi has quit [Quit: mweshi]
Aryasam has quit [Ping timeout: 252 seconds]
Aryasam has joined #ruby
Clooth has quit [Read error: Connection reset by peer]
Clooth has joined #ruby
sandeepk has quit [Read error: Connection reset by peer]
Aryasam has quit [Ping timeout: 252 seconds]
daxroc has quit [Quit: Leaving.]
Clooth has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
mengu has joined #ruby
Apane has joined #ruby
theRoUS|afk has joined #ruby
vlad_starkov has joined #ruby
chomskiii has quit [Read error: Connection reset by peer]
mengu has quit [Ping timeout: 265 seconds]
chomskiii has joined #ruby
Lewix has joined #ruby
zz_tsykoduk is now known as tsykoduk
EvanR has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
EvanR is now known as Guest27558
bttf has joined #ruby
<bttf>
hello, i compiled ruby before installing libopenssl-ruby on my ubuntu machine ... i installed the library and re-compiled, but the command to test for the library still fails
<bttf>
what could be causing this?
IceDragon has quit [Quit: Space~~~]
estebistec has quit [Remote host closed the connection]
bassclef has quit [Ping timeout: 245 seconds]
<rjhunter>
bttf: it's more likely to need libopenssl-devel (or -dev or something similar) than -ruby
tsykoduk is now known as zz_tsykoduk
capicue has joined #ruby
<rjhunter>
the -devel packages contain the C header files and similar things needed to compile stuff against a library
havenwood has quit [Remote host closed the connection]
<zastern>
ANybody know where ruby-build (for rbenv) keeps its list of rubies it can install?
<zastern>
mine is fully upgraded and not listing the latest
rickruby has quit [Read error: Connection reset by peer]
rickruby has joined #ruby
<rjhunter>
zastern: on my Mac (with Homebrew), I see build recipe files in /usr/local/Cellar/ruby-build/20131008/share/ruby-build/
<zastern>
see thats weird
<zastern>
im misisng the latest ruby 2.0.0 in mine
<zastern>
not on my other macs though
<zastern>
only this one
<zastern>
I have 2.0.0-p0 but not -p247
baroquebobcat has quit [Client Quit]
<rjhunter>
is ruby-build installed with the same mechanism on each?
<zastern>
yes.
<zastern>
brew install on each
crazysim_ has quit [Excess Flood]
daxroc has joined #ruby
<rjhunter>
`brew update` and `brew upgrade ruby-build` ?
<zastern>
this happened to me once before and i had to totally implode rbenv and ruby-build to fix it :(
<jrobeson>
rvm has the impode command..
crazysim has joined #ruby
<zastern>
rjhunter: ah yeah that's it! i forgot on my other macs I have a cronjob that brew updates
<zastern>
jrobeson: I was speaking metaphorically
<jrobeson>
evil rvm :(
<zastern>
rjhunter: on this one brew doesnt know about the latest ruby-build yet
<zastern>
i should put in that cronjob
jkhwan has joined #ruby
Alina-malina has quit [Ping timeout: 264 seconds]
<zastern>
problem solved, im an idiot
<zastern>
thanks fellas.
reset has joined #ruby
<rjhunter>
zastern: :-)
Alina-malina has joined #ruby
Hanmac1 has quit [Ping timeout: 272 seconds]
freezey has quit [Remote host closed the connection]
<nobitanobi>
How do you call a @var that is inside a Class scope?
daxroc has quit [Ping timeout: 264 seconds]
daxroc1 has joined #ruby
unstable has joined #ruby
<bnagy>
class instance variable
sandeepk has joined #ruby
z has quit [Quit: Lost terminal]
robonerd is now known as testr0n
RobW_ has joined #ruby
<nobitanobi>
bnagy, so we can have class instance variables (@var), and class variables (@@var) - right?
<nobitanobi>
since class are objects, they can have instance variables (@var).
<nobitanobi>
I am wondering why @@var is useful though
<bnagy>
it seldom is
Hanmac has joined #ruby
szarubin has joined #ruby
<RobW_>
For any capybara users: is there a way to filter selectors inside expect()? E.g. `expect( find(selector_1).find(selector_2) ).to my_custom_matcher`
<bnagy>
95% of the time you see it it's because the programmer couldn't work out scope and visibility and flipped the table
<nobitanobi>
uhm bnagy
<nobitanobi>
ok
ziyadb has joined #ruby
psyprus has quit [Read error: Connection reset by peer]
psyprus has joined #ruby
yacks has quit [Quit: Leaving]
<rjhunter>
RobW_: if I understand you correctly, you already have a solution
<rjhunter>
RobW_: which makes me think I don't understand you correctly ;-)
<RobW_>
rjhunter: I tried that exact code and got `The browser raised a syntax error while trying to evaluate the selector`
<RobW_>
But maybe something different is happening because I'm not too familiar with capybara
<rjhunter>
RobW_: are the selectors built-in ones or custom?
<RobW_>
rjhunter: Custom
havenwood has joined #ruby
aspires has quit [Quit: sudo making a sandwich]
gstamp has quit [Read error: Connection reset by peer]
zarubin has quit [Read error: Connection reset by peer]
karupanerura has quit [Ping timeout: 256 seconds]
cibs has quit [Ping timeout: 256 seconds]
eshy has quit [Ping timeout: 256 seconds]
eshy has joined #ruby
cibs has joined #ruby
<agent_white>
What is the term for the "->" operator in Ruby?
<RobW_>
So I have two custom selectors in a selectors hash in module CustomSelectors, and in an expect() I want to find one inside the other.
zz_karupanerura has joined #ruby
gstamp has joined #ruby
<RobW_>
And then check a matcher
<rjhunter>
agent_white: "lambda"
Lewix has quit [Remote host closed the connection]
<agent_white>
rjhunter: Thank you!
zz_karupanerura is now known as karupanerura
jkhwan has quit [Remote host closed the connection]
ananthakumaran has quit [Quit: Leaving.]
jkhwan has joined #ruby
lewis has joined #ruby
lewis has joined #ruby
lewis has quit [Changing host]
<rjhunter>
RobW_: nesting selectors should work just fine. perhaps they're implemented in a non-standard way? (although I haven't used Capybara for a while so i guess it's possible things have changed.)
<RobW_>
rjhunter: Possible. I'll try with just selectors and see what that gets me.
<jrobeson>
agent_white, poeple call that the "stabby lambda"
<RobW_>
rjhunter: Yep, looks like something nonstandard is going on here.
jkhwan has quit [Ping timeout: 272 seconds]
daxroc1 has quit [Ping timeout: 265 seconds]
Es0teric has joined #ruby
<zastern>
Stupid question: If I want to pass something to my initalize function, I pass it to Class.new right?
<nobitanobi>
zastern, yes
<zastern>
great, thanks
<nobitanobi>
there are no stupid questions
<nobitanobi>
:)
<agent_white>
jrobeson: I see... just a preference in syntax then?
platzhirsch has quit [Quit: Leaving.]
<jrobeson>
agent_white, you mean vs saying lamda { } vs -> { } ?
<agent_white>
As opposed to lambda{|x| p x}
<jrobeson>
yeah
<agent_white>
Ah I see
<agent_white>
jrobeson: Thanks for the clarification :)
<jrobeson>
you might have also noticed it in coffeescript
<rjhunter>
RobW_: at least you've narrowed it down :-) are the custom selectors implemented in terms of the 'css' or 'xpath' helpers?
<jrobeson>
rjhunter answered you first tho.. i just figured you'd be reading stuff about ruby and see people say "stabby lambda" . i know i have
dnyy has quit []
Apane has quit [Ping timeout: 272 seconds]
havenwood has quit [Ping timeout: 252 seconds]
<RobW_>
rjhunter: CSS. We have a module called CustomSelectors with a selectors = {} hash in it, and are referencing selectors by their hash key. Not sure if it's a Capy thing or something a team member wrote.
<agent_white>
Haha no worries, it through me for a curveball seeing it in some Rails code. Thank you both :)
<RobW_>
Assuming it somehow does find on the selectors so doing find on a non-string throws the errors
thesheff17 has quit [Ping timeout: 272 seconds]
<rjhunter>
RobW_: also consider expect(my_table).to have_selector(:grand_total)
<RobW_>
What's the symbol?
<rjhunter>
RobW_: the name of the custom capybara matcher
<RobW_>
right. That's what they were doing before, but the matcher was really complex.
<rjhunter>
well, it doesn't have to be custom
<rjhunter>
oops when i say matcher i mean selector
<RobW_>
Trying to simplify this a little, make it less fragile. We have a buch of custom matchers, and there was bleed between the have selector selector and the matchers
<RobW_>
(I gotcha)
vlad_starkov has joined #ruby
ananthakumaran has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
Guest27558 has quit [Ping timeout: 245 seconds]
DanKnox_away is now known as DanKnox
Hanmac1 has joined #ruby
zz_tsykoduk is now known as tsykoduk
vlad_starkov has quit [Read error: Connection reset by peer]
i_s has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 272 seconds]
sandeepk has quit [Quit: Leaving...]
<rjhunter>
RobW_: Are you still having trouble? I'd love to help out, but at this time of day the abstraction is too much. Perhaps a concrete example would help?
felixjet has quit [Read error: Connection reset by peer]
<RobW_>
I'm just poking around in here. Within might work but it would add a block.
<RobW_>
Sure, where should I paste
<RobW_>
?
felixjet has joined #ruby
<rjhunter>
gist.github.com is popular
<RobW_>
(yey)!
<RobW_>
Within works well
<RobW_>
Just a tiny block, but super expressive.
<mr`spock>
i should bust in here with nickname 'frosty' and ask how to connect to onion sites using ruby
<RobW_>
So I'm doing within(one_custom_selector) do
<RobW_>
expect(custom_selector).to custom_matcher
<RobW_>
end
* RobW_
fist pumps
<RobW_>
That was hard / easy.
radic has joined #ruby
<rjhunter>
RobW_: :-)
tsykoduk is now known as zz_tsykoduk
dayepa has quit [Quit: dayepa]
freezey has joined #ruby
phansch has joined #ruby
dayepa1 has joined #ruby
coderhs has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby
Alina-malina has joined #ruby
sandeepk has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
kobain has quit []
fuhgeddaboudit has quit [Ping timeout: 272 seconds]
dhruvasagar has quit [Read error: Connection reset by peer]
Zeeo has joined #ruby
dhruvasagar has joined #ruby
RobW_ has quit [Quit: RobW_]
jb41 has joined #ruby
EvanR has joined #ruby
mengu has joined #ruby
EvanR is now known as Guest45044
dhruvasagar has quit [Read error: Connection reset by peer]
thelorax123 has quit [Remote host closed the connection]
freezey has quit [Remote host closed the connection]
radic has quit [Remote host closed the connection]
<zastern>
Can I set an instance variable in initialize, and override it in other methods in the same class?
<zastern>
is that bad?
nazty has quit [Read error: Connection reset by peer]
thelorax123 has joined #ruby
Hanmac has joined #ruby
dhruvasagar has joined #ruby
<nobitanobi>
zastern, no. And actually is normal. Instance variables maintain the state of an object
<nobitanobi>
zastern, so you initialize them, and then manipulate them however you want.
<zastern>
hmm
radic has joined #ruby
Hanmac1 has quit [Ping timeout: 240 seconds]
testr0n has quit [Remote host closed the connection]
mengu has quit [Ping timeout: 272 seconds]
<nobitanobi>
zastern, what advantage would you have on initializing instance variables if then you can't override or manipulate them?
<zastern>
I wouldn't know :)
robonerd has joined #ruby
oddjobsman has joined #ruby
i_s has joined #ruby
aagdbl has joined #ruby
nari has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
rickruby has quit [Remote host closed the connection]
rickruby has joined #ruby
DanBoy has quit [Quit: Leaving]
havenwood has joined #ruby
i_s has quit [Ping timeout: 246 seconds]
amacgregor has joined #ruby
wallerdev has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
apeiros has joined #ruby
ananthakumaran has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
daxroc has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
<Rickmasta>
Hey guys. So I have a array with a bunch if arrays in it. For example: "[["y", "dt"], ["b", "r"], ["r", "r"], ["b", "s"]]"
<Rickmasta>
I want to check if that array includes an array that has let's say has a "b" in [0] spot.
Hanmac has quit [Quit: Leaving.]
Hanmac has joined #ruby
Liothen has joined #ruby
lewis has quit [Remote host closed the connection]
<Zeeo>
Hello to everybody, if I do my_array.find_all{|c| c[:value] = 100} it's supposed to find all the elements where the value is 100, not to assign the value 100 to all the :value keys amrite? because the second one is what it's doing
beermouse has quit [Quit: beermouse]
radic has quit [Remote host closed the connection]
<Zeeo>
why is that?
tharindu is now known as tharindu|away
<tobiasvl>
Zeeo: ruby always does what it's supposed to do :)
<tobiasvl>
Zeeo: = is assignment
<tobiasvl>
did you think = compared values? because that's == like in most other languages
nhhagen has quit [Quit: Leaving]
radic has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
<Zeeo>
tobiasvl: ok, now it makes sense... :)
dhruvasagar has joined #ruby
sam113101 has joined #ruby
fbernier has joined #ruby
<Hanmac>
in newest of new rubies (trunk) this is possible to: my_array.find_all{|value:| value == 100}
h0rrorvacui has quit [Quit: ZQ]
cina has quit [Ping timeout: 272 seconds]
sathia has joined #ruby
<Zeeo>
*_*
<apeiros>
=(
VTLob has joined #ruby
cina has joined #ruby
havenwood has quit [Remote host closed the connection]
<Zeeo>
isn't there a method that finds the elementS with the mazimum value?
amacgregor_ has joined #ruby
havenwood has joined #ruby
agent_white has quit [Quit: gnight]
coldbeer has quit [Quit: leaving]
<Hanmac>
Zeeo: you can try max_by but it only shows one
<Zeeo>
Hanmac: indeed
amacgregor has quit [Ping timeout: 245 seconds]
zipper has quit [Quit: leaving]
zipper has joined #ruby
zoee has quit [Quit: This computer has gone to sleep]
weszlem has joined #ruby
justsee has quit [Ping timeout: 272 seconds]
coderhs has joined #ruby
i_s has joined #ruby
<jrobeson>
Hanmac, show another example of what that would give you?
camilasan has joined #ruby
havenwood has quit [Ping timeout: 252 seconds]
shvelo has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
<Hanmac>
Zeeo: i would probably use an combi from group_by and max_by like that:
sevenseacat has quit [Remote host closed the connection]
h0rrorvacui has joined #ruby
<Hanmac>
mr`spock: that does not work ... this Bot is Hanmac Proof ,P
<mr`spock>
hehe
pagioss has joined #ruby
havenwood has quit [Ping timeout: 272 seconds]
havenwood has joined #ruby
nomenkun has joined #ruby
justsee has quit [Ping timeout: 245 seconds]
krainboltgreene has quit []
jlebrech has joined #ruby
CripperZ has quit [Read error: No route to host]
einarj has quit [Remote host closed the connection]
CripperZ has joined #ruby
iliketurtles has joined #ruby
<jlebrech>
i'm trying to run casperjs using popen but it complains about not finding phantomjs, how do I add something to my path before running popen?
shredding has joined #ruby
h0rrorvacui has quit [Quit: ZQ]
justsee has joined #ruby
z has joined #ruby
pedda has joined #ruby
DouweM has quit [Ping timeout: 265 seconds]
chexxor has left #ruby [#ruby]
joonty has joined #ruby
havenwood has quit [Remote host closed the connection]
adambeynon has joined #ruby
havenwood has joined #ruby
justsee has quit [Ping timeout: 272 seconds]
TigerWolf has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Jetchisel has joined #ruby
sayan has quit [Ping timeout: 248 seconds]
benlieb has quit [Quit: benlieb]
Zeeo has quit [Quit: -]
nomenkun has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 264 seconds]
gebbione has joined #ruby
Ox6abe has quit [Remote host closed the connection]
beermouse has quit [Quit: beermouse]
Kilo`byte has joined #ruby
timonv has joined #ruby
burgess|vayo has joined #ruby
Lewix has quit [Remote host closed the connection]
burgess|vayo has quit [Client Quit]
barratt has joined #ruby
beermouse has joined #ruby
xk_id has quit [Quit:
beermouse has quit [Client Quit]
Kamuela has joined #ruby
shredding has quit [Quit: shredding]
sayan has joined #ruby
mikecmpbll has joined #ruby
obs has quit [Ping timeout: 248 seconds]
yjmsf20 has joined #ruby
amacgregor_ has joined #ruby
amacgregor_ has quit [Read error: Connection reset by peer]
amacgregor has quit [Read error: Connection reset by peer]
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
mojjojo has joined #ruby
beermouse has joined #ruby
shaunbaker has joined #ruby
JuriadoBalzac has joined #ruby
shaunbak_ has joined #ruby
<JuriadoBalzac>
Hi! I'm getting warning messages when I run a ruby script, is there any way so surpress these? Tried looking in the man file but I see nothing about it.
<shevy>
JuriadoBalzac wat kind of warning
<tobiasvl>
there's usually a reason for warnings
yjmsf20 has quit [Quit: leaving]
<Kamuela>
suppress all warnings... they get in the way of progress.. of science
<tobiasvl>
you can set the verbosity level with -W on the command line
<JuriadoBalzac>
shevy: path to script - "91: warning: regexp has invalid interval"
mojjojo has quit [Client Quit]
<JuriadoBalzac>
and "91: warning: regexp has `}' without escape"
<tobiasvl>
-W0 suppresses all warnings
<tobiasvl>
but why do you want to suppress warnings instead of fixing the underlying problem?
<tobiasvl>
that sounds weird
lkba has quit [Ping timeout: 272 seconds]
daxroc has joined #ruby
shredding has joined #ruby
yjmsf20 has joined #ruby
shaunbaker has quit [Ping timeout: 245 seconds]
<JuriadoBalzac>
tobiasvl: That did the trick! But yes, you are correct. The script still works as intended, I'm not sure why I get these errors.
benlieb has joined #ruby
<JuriadoBalzac>
tobiasvl: Appears to be an issue after upgrading to chef 11.8, 11.6 works just fine.
himsin has quit [Quit: himsin]
himsin has joined #ruby
<JuriadoBalzac>
It's row 91 in aix.rb that's giving me those errors.
yjmsf20 has quit [Remote host closed the connection]
pixelgremlins has joined #ruby
xk_id has joined #ruby
akonny has joined #ruby
shredding has quit [Client Quit]
Davey has quit [Quit: Computer has gone to sleep.]
daxroc has quit [Ping timeout: 245 seconds]
aa47f8 has joined #ruby
<tobiasvl>
oh, it's not your script
<tobiasvl>
i understand
jhaals has joined #ruby
workmad3 has joined #ruby
zeeraw has joined #ruby
<JuriadoBalzac>
tobiasvl: still, if you would have a look at row 91, you might have a clue? Because I don't. ;)
jhaals_ has joined #ruby
<tobiasvl>
row 91 where? have you pasted the code anywhere?
ehaliewicz has quit [Ping timeout: 248 seconds]
<JuriadoBalzac>
tobiasvl: No, sorry, didn't want to clutter the channel if the question was irrelevant
<JuriadoBalzac>
tobiasvl: hen /\w:{Regexp.escape(@new_resource.package_name)}:(.*)/
<JuriadoBalzac>
Er, when, not hen.
<JuriadoBalzac>
That's the row that gives errors.
DouweM has joined #ruby
mojjojo has joined #ruby
zz_tsykoduk is now known as tsykoduk
obs has joined #ruby
jhaals has quit [Ping timeout: 272 seconds]
rickruby has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
weeems has joined #ruby
weems has quit [Read error: Connection reset by peer]
rickruby has joined #ruby
Xeago_ has joined #ruby
Xeago__ has joined #ruby
mojjojo has quit [Quit: mojjojo]
zipper has quit [Read error: Operation timed out]
plotter has joined #ruby
mengu has quit [Remote host closed the connection]
postmodern has joined #ruby
ewnd9 has joined #ruby
Xeago has quit [Ping timeout: 252 seconds]
zipper has joined #ruby
rickruby has quit [Ping timeout: 265 seconds]
zipper is now known as Guest46891
camilasan has quit [Remote host closed the connection]
DrCode has quit [Remote host closed the connection]
Bry8Star{T2 has joined #ruby
mrfoto has quit []
<bnagy>
veen with ns resolution time is awful tbh
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
<bnagy>
problem with securerandom is that they're 'secure' byt unmemorisable
<workmad3>
bnagy: use a password manager? :P
mrfoto has joined #ruby
<workmad3>
bnagy: 1password, keepass, lastpass...
<existensil>
generally if they are memorizable, they are much more easily crackable
<bnagy>
that is not the case
<existensil>
i've totally given up trying to create secure passwords... its getting almost hopeless. the future will require password management of some form.
<bnagy>
as you say 'depends how long they are'
lkba has joined #ruby
falood has quit [Remote host closed the connection]
<bnagy>
but sites with max lengths or character restrictions make me stabby
<workmad3>
bnagy: same :(
<existensil>
even with long phrases, if its made of real words or real syllybals, modern cracking libraries will find it
<existensil>
i don't know if that's a concern or not
<bnagy>
pretty much any passphrase that's not directly out of a published work is fine
<bnagy>
honestly you have no idea how little ars articles will sway my opinion
<workmad3>
I wondor how many people use the password 'correct battery horse stapler' now
falood has joined #ruby
<bnagy>
people read random shit and then just Invent maths :/
shvelo has quit [Ping timeout: 246 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
<bnagy>
existensil: people's biggest problem is thinking they can be tricky by using abbreviations, numbers subs, keyboard patterns etc
<bnagy>
because it looks uncrackable to them
Grundell has joined #ruby
<bnagy>
whereas srsly just a long passphrase is fine, as long as it's not a quotation
<workmad3>
bnagy: how about a random 30-digit base 40(ish) string? :)
<workmad3>
(I'm not sure how many special characters lastpass uses)
<bnagy>
yeah but password managers are a huge single point of failure
<bnagy>
plus all of the main ones are susceptible to LEA
<existensil>
bnagy: in that case why not just take a dictionary, prune words below a certain length, then create passwords that are random 5-7 word phrases
<bnagy>
if not just directly owned by assorted .gov
<existensil>
should be pretty easy to remember
* popl
hands bnagy a tin foil hat.
bassclef has joined #ruby
<bnagy>
existensil: that works
<bnagy>
popl: subpoenas are hardly tinfoil
bassclef is now known as Guest63133
kung has quit [Quit: Bye!]
<popl>
bnagy: I don't own any hats made from subpoenas.
<existensil>
assuming about 500_000 words (hopefully that's right) the entropy should be pretty high
DrCode has joined #ruby
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
maasha has joined #ruby
<maasha>
hi
<bnagy>
yep
h_kon has quit [Remote host closed the connection]
joonty_ has joined #ruby
<popl>
bnagy: Why use passwords at all, then? :)
sandeepk has joined #ruby
<workmad3>
popl: that is the question :(
geekbri has joined #ruby
<bnagy>
yes, brilliant use of reductio ad absurdum
geekbri has quit [Remote host closed the connection]
<Grundell>
Hello - i need some help with regular expression that i cant seam to figure out... at the bottom of the input i've written what id like to get out from this... http://rubular.com/r/cbMEU8FWdw
<popl>
bnagy: Why, thank you.
<Grundell>
Is anyone able to take a look and see if they are able to help me ?
joonty has quit [Ping timeout: 245 seconds]
amritanshu_RnD has quit [Quit: Leaving]
<bnagy>
popl: using individual passwords saves you from catastrophic compromise
<bnagy>
password managers don't
<bnagy>
yubikey kind of stuff is ok, just not online ones
<workmad3>
bnagy: to me, a password manager is a somewhat more reliable single point of failure than my own memory... and lastpass with 2-factor and a decent master password is my compromise for ease of use
<bnagy>
even that you're better off using a stub + individual passwords
nesQuick has left #ruby [#ruby]
raphaelivan has joined #ruby
_5kg has quit [Ping timeout: 272 seconds]
Ivo has joined #ruby
<bnagy>
meh depends on your threat model, sure
<workmad3>
1password or keepass are other alternatives, but they don't integrate as well into my workflow
_5kg has joined #ruby
<Grundell>
Anyone able to look at my regexp ?
<workmad3>
and I'm not too worried about the subpoena threat model personally :) along with that, all they could subpoena from lastpass is my encrypted blob, they'd need to subpoena me for my master password, or crack the encryption on that blob
jeffreyio has quit [Ping timeout: 248 seconds]
<workmad3>
and that's assuming I come into the notice of an agency that wants to subpoena my passwords and has the power to do so :)
<existensil>
I find keepass to offer the best combination of security and convenience i can currently achieve
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<existensil>
the only thing i can see that separates a title from a name is it can have lowercase letters?
<existensil>
so that's what i matched on
<popl>
bnagy: YubiKey looks interesting.
sevenseacat has joined #ruby
<popl>
Of course a one-time pad is going to be good.
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
<DouweM>
existensil: you sent the wrong link ;)
<bnagy>
oh that wasn't what I was thinking of - it does other stuff
<existensil>
ha, so i did...
<bnagy>
like it just 'types' a Very Long Password when you press a button
<Grundell>
existensil: yes... the thing is that it doesn't always have a position so i need to make something that is able to understand that it might not have position... then i need to get the party out also...
<existensil>
is there a way to scan through a string in ruby using a regex, and be able to use named groups?
<existensil>
scan seems to always yield arrays
<Grundell>
existensil: I use match_data to get my pleadings written but i since its not always matching get an empty array for my pleadings... how would i change that ? https://gist.github.com/Grundell/7526597
<andrewvos>
What's a good way to find memory leaks?
beermouse has quit [Quit: beermouse]
<existensil>
but it does kind of nail home the points bnagy and RubyPanther made about maybe spliting your matching up into pieces
<andrewvos>
(ruby 2)
<bnagy>
andrewvos: use jruby, profile, switch back :/
sayan has joined #ruby
<bnagy>
you can use ObjectSpace, but it's awful
<bnagy>
imho, spend a LOT of time comvincing yourself you even have one, first
zz_tsykoduk is now known as tsykoduk
sandeepk has quit [Remote host closed the connection]
<Grundell>
yeah - Okay, the last example didn't work... but if i skip end of line it does work... so i assume that i make something there... is it important to host the "end of line ? "
<bnagy>
eg some OSs are lazy about reclaiming memory, and some GCs are lazy about releasing freed mem to the OS
beermouse has joined #ruby
<bnagy>
some stuff, like in cexts, won't ever be visible from ruby
gyre007 has joined #ruby
<bnagy>
gotta valgrind or something to find them
<existensil>
Grundell: if you don't match to the end of the line, then lines that have extra data past 'replik' will match... but doesn't seem like that's a problem
mklappstuhl has joined #ruby
<existensil>
if it is, then you need to find someway to match to the end of the line
<bnagy>
andrewvos: in summary there kind of isn't one
<Grundell>
oh okay.
<bnagy>
fwiw 95% of my memory leaks have been nonexistant or in C libs
<bnagy>
the other 5% have been really obvious
hogeo has quit [Remote host closed the connection]
<andrewvos>
bnagy: Stupid rails is eating all the memory
beermouse has quit [Client Quit]
hogeo has joined #ruby
<andrewvos>
bnagy: Although it's probably stupid me
<bnagy>
oh pff rails
<bnagy>
"just restart it every 6 hours"
<andrewvos>
hahaha
<andrewvos>
Might make a heroku addon that does that
<andrewvos>
Call it "rails memory optimizer PRO"
<existensil>
most of the "leaks" i've had turned out to be in C libs... rmagick has been the worst offender for me there.
<bnagy>
srsly though, make a test server, on jruby
<bnagy>
the jvm profiling tools are holy-shit-awesome
krnflake has joined #ruby
shredding has joined #ruby
<bnagy>
and free
<existensil>
migrating to jruby might be painful for a large rails project
<andrewvos>
bnagy: I think I would then have two problems
<andrewvos>
Yes exactly existensil
nouitfvf_ has quit [Read error: Connection reset by peer]
mklappstuhl has quit [Ping timeout: 245 seconds]
nouitfvf_ has joined #ruby
nari has joined #ruby
<bnagy>
I would love to feel more sympathy ;)
tkuchiki has quit [Remote host closed the connection]
<bnagy>
ime, most realy ruby leaks are very linear
jbpros has quit [Ping timeout: 245 seconds]
<bnagy>
like you don't see much drop in private bytes
hogeo has quit [Ping timeout: 245 seconds]
mercwithamouth has quit [Ping timeout: 272 seconds]
<bnagy>
valgrind can work, for ruby, but I think for rails it might be super confusing
Zai00 has quit [Quit: Zai00]
VTLob has quit [Quit: VTLob]
Kabaka has joined #ruby
phansch has joined #ruby
platzhirsch has quit [Ping timeout: 245 seconds]
jrhe has joined #ruby
tsykoduk is now known as zz_tsykoduk
xk_id has quit [Quit:
yacks has joined #ruby
jbpros has joined #ruby
mercwithamouth has joined #ruby
fightback has joined #ruby
xk_id has joined #ruby
danshultz has joined #ruby
platzhirsch has joined #ruby
freezey has joined #ruby
Rix has quit [Ping timeout: 260 seconds]
rickruby has quit [Remote host closed the connection]
_409_ has joined #ruby
zz_CripperZ is now known as CripperZ
jonathanwallace has joined #ruby
obs has quit [Read error: Connection reset by peer]
Beoran__ has joined #ruby
shaunbak_ has quit [Remote host closed the connection]
shaunbaker has joined #ruby
<andrewvos>
bnagy: Just profiling rails make sit look like rails is the CPU hog
achru has joined #ruby
<andrewvos>
Too many metho calls
freezey has quit [Remote host closed the connection]
Alina-malina has quit [Max SendQ exceeded]
Beoran_ has quit [Ping timeout: 268 seconds]
<andrewvos>
makes it* method*
CripperZ is now known as N00D
shaunbaker has quit [Ping timeout: 264 seconds]
Xeago__ has quit [Remote host closed the connection]
Grundell has quit [Remote host closed the connection]
reset has joined #ruby
funburn has joined #ruby
sayan has quit [Ping timeout: 240 seconds]
madb055 has quit [Read error: Connection reset by peer]
obs has joined #ruby
brunto has joined #ruby
reset has quit [Ping timeout: 260 seconds]
aagdbl has quit [Quit: This computer has gone to sleep]
gyre007 has quit [Remote host closed the connection]
DrCode has quit [Remote host closed the connection]
gyre007 has joined #ruby
salmonax has quit [Read error: Connection reset by peer]
falood has quit [Remote host closed the connection]
gyre007 has quit [Read error: Connection reset by peer]
gyre007 has joined #ruby
ewnd9 has joined #ruby
shaunbaker has quit [Ping timeout: 245 seconds]
phansch has quit [Ping timeout: 272 seconds]
phansch has joined #ruby
zoee has quit [Quit: This computer has gone to sleep]
salmonax has joined #ruby
xk_id has quit [Quit:
kaspergrubbe has joined #ruby
ahawkins has quit [Quit: leaving]
ringaroses has joined #ruby
flops has joined #ruby
jrhe has quit [Quit: jrhe]
ahawkins has joined #ruby
kaldrenon has joined #ruby
shaunbak_ has quit [Remote host closed the connection]
shaunbaker has joined #ruby
daxroc has joined #ruby
fightback has joined #ruby
fightback has quit [Max SendQ exceeded]
blackmesa has joined #ruby
ringaroses has quit [Ping timeout: 246 seconds]
DrCode has joined #ruby
zoee has joined #ruby
vpretzel has joined #ruby
breakingthings has joined #ruby
mj12albert has joined #ruby
Rix has quit [Ping timeout: 252 seconds]
mj12albert has quit [Client Quit]
shaunbaker has quit [Ping timeout: 272 seconds]
lfox has joined #ruby
daxroc has quit [Ping timeout: 264 seconds]
zxq9 has joined #ruby
DrCode has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
fysaen has joined #ruby
cody-- has joined #ruby
Advocation has quit [Quit: Advocation]
Rix has joined #ruby
mjs2600 has joined #ruby
dangerousdave has quit [Quit: Leaving...]
pixelgremlins has joined #ruby
xcess_denied has quit [Quit: Leaving...]
dangerousdave has joined #ruby
Advocation has joined #ruby
zz_tsykoduk is now known as tsykoduk
beermouse has quit [Quit: beermouse]
Astral_ has quit [Read error: Connection reset by peer]
hallada has quit [Remote host closed the connection]
tvw has quit [Ping timeout: 272 seconds]
mjs2600 has quit [Remote host closed the connection]
mojjojo has quit [Quit: mojjojo]
lfox has quit [Ping timeout: 265 seconds]
ananthakumaran1 has quit [Quit: Leaving.]
mjs2600 has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jprovazn has quit [Quit: Leaving]
jrhe has joined #ruby
reset has joined #ruby
phansch has quit [Ping timeout: 272 seconds]
mklappstuhl has joined #ruby
zeeraw has joined #ruby
kcombs has joined #ruby
phansch has joined #ruby
akonny has quit [Quit: akonny]
beermouse has joined #ruby
tsykoduk is now known as zz_tsykoduk
sathia has joined #ruby
iajrz_ has joined #ruby
reset has quit [Ping timeout: 246 seconds]
cina has quit [Ping timeout: 264 seconds]
jrhe has quit [Read error: Connection reset by peer]
jrhe has joined #ruby
_5kg has quit [Ping timeout: 245 seconds]
_5kg has joined #ruby
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
sathia has quit []
mary5030 has joined #ruby
DrCode has joined #ruby
Squarepy has joined #ruby
Kabaka has quit [Remote host closed the connection]
newbiehacker has quit [Ping timeout: 272 seconds]
ldnunes has joined #ruby
Squarepy has quit [Read error: Connection reset by peer]
Squarepy_ has joined #ruby
DrCode has quit [Remote host closed the connection]
burlyscudd has joined #ruby
graydot has joined #ruby
jleishman has quit [Quit: Leaving...]
lukec has joined #ruby
mrfoto has quit []
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
sailias has joined #ruby
Criztian has quit [Remote host closed the connection]
Squarepy_ has quit [Read error: Connection reset by peer]
jlast has joined #ruby
DoNcK has joined #ruby
Squarepy has joined #ruby
<DoNcK>
hi there
nateberkopec has joined #ruby
wesside has quit [Quit: I think I heard an ice cream truck..]
RobW_ has joined #ruby
<DoNcK>
Is there anybody here using javan/whenever?
<DoNcK>
I'd like to know if it is possible to run rake tasks, get the stderr sent by email , and both stdout and stderr logged into a file
yfeldblum has joined #ruby
graydot has quit [Quit: graydot]
jrhe has quit [Ping timeout: 248 seconds]
wildroman has joined #ruby
jrhe has joined #ruby
dhruvasagar has joined #ruby
platzhirsch has joined #ruby
fuhgeddaboudit has joined #ruby
ravster has joined #ruby
Kabaka has joined #ruby
<RobW_>
Does anyone know what will pass / fail the Capybara visible/hidden test? For instance, visibly_hidden HTML5Boilerplate class is designed to fool screen readers into thinking the element is visible -- does capy see that?
shaileshg__ has quit [Read error: Connection reset by peer]
LarsSmit has quit [Quit: Leaving.]
wildroman has quit [Remote host closed the connection]
falood has joined #ruby
shaileshg__ has joined #ruby
bean has joined #ruby
mercwithamouth has joined #ruby
lmickh has joined #ruby
tagrudev has quit [Remote host closed the connection]
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
mj12albert has joined #ruby
wildroman has joined #ruby
djdb has quit [Remote host closed the connection]
achru has quit []
_maes_ has joined #ruby
wildroman has quit [Remote host closed the connection]
rippa has joined #ruby
axilla has quit [Ping timeout: 245 seconds]
danshult_ has joined #ruby
mojjojo has quit [Quit: mojjojo]
mjs2600 has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
cody-- has joined #ruby
tkuchiki has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
ldnunes has quit [Quit: Leaving]
mojjojo has joined #ruby
ldnunes has joined #ruby
petey__ has joined #ruby
sandeepk has quit [Read error: Connection reset by peer]
tannerburson has quit [Quit: tannerburson]
danman has joined #ruby
_409_ has joined #ruby
mikecmpbll has quit [Quit: Computer has gone to sleep.]
mojjojo has quit [Client Quit]
petey_ has quit [Ping timeout: 264 seconds]
tannerburson has joined #ruby
MrThePlague has joined #ruby
maasha has quit [Ping timeout: 250 seconds]
joonty_ is now known as joonty
mikee has quit [Ping timeout: 246 seconds]
phansch has joined #ruby
thesheff17 has joined #ruby
sayan has quit [Read error: Operation timed out]
beermouse has quit [Quit: beermouse]
momomomomo has joined #ruby
weszlem has quit []
awarner has joined #ruby
ce_afk is now known as cescalante
weszlem has joined #ruby
<dev1x>
how can i load an env variable to a local variable?
<dev1x>
var = ENV['$f00'] ?
<hoelzro>
yup
<dev1x>
or is it
<dev1x>
ENV['f00'] ?
Davey has joined #ruby
<bean>
I'd try to make sure
<hoelzro>
just ENV['f00']
<hoelzro>
$f00 is shell syntax
phansch has quit [Ping timeout: 245 seconds]
<dev1x>
hum
<dev1x>
i actually need the hostname
<dev1x>
so i'm trying
konrads has quit [Ping timeout: 272 seconds]
<dev1x>
hostname = ENV['HOSTNAME']
<dev1x>
and it came out empty
<dev1x>
so i'll try with $
cescalante is now known as ce_afk
ce_afk is now known as cescalante
<bean>
hostname = `hostname -f`.chomp
<bean>
;)
coderhs has joined #ruby
xea has joined #ruby
justsee has quit [Ping timeout: 265 seconds]
<xea>
o/
mikepack has joined #ruby
phansch has joined #ruby
<matti>
On no.
<matti>
bean: Don't.
<matti>
bean: Don't even.
<bean>
:D
<matti>
Teh horror
<matti>
Fired.
Advocation has joined #ruby
evenix has joined #ruby
<matti>
:>
<bean>
(in my line of work I'd just use ohai)
<bean>
:p
arcke has joined #ruby
<bean>
:>
coderhs has quit [Client Quit]
wildroman has joined #ruby
<matti>
Slacker!
<matti>
;d
<matti>
;]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
<matti>
bean: Real man query DNS using RAW socket and bit wranggling.
zipper has joined #ruby
<matti>
;]
<bean>
haha
gianlucadv has quit [Quit: Ex-Chat]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
daxroc has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
<matti>
I fucking hate this binary protocol ;p
<matti>
That DNS is using ;p
beermouse has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
tesuji has quit [Ping timeout: 246 seconds]
ringaroses has joined #ruby
parduse is now known as Guest14
Guest14 has quit [Killed (cameron.freenode.net (Nickname regained by services))]
parduse has joined #ruby
Lewix has joined #ruby
<catphish>
actually ruby has a nice "resolv" library that mangles dns packets for you :)
<matti>
No kiddin!
<matti>
I would never guess :
<matti>
:P
<matti>
catphish: :)
shredding has quit [Quit: shredding]
<catphish>
in fact i think it sends requests too :)
<dev1x>
going to try as you've said bean
<dev1x>
:)
<bean>
catphish: I use it on my irc dns lookup bot for work :P
<catphish>
i used to use it to make dns servers :)
coder_neo has joined #ruby
<catphish>
but in that case you have to do a lot of extra work
<catphish>
for lookups i think it's all there though
Hanmac1 has joined #ruby
<matti>
catphish: Does it support RFC2549?
<matti>
:>
<catphish>
yes
<catphish>
fully
daxroc has quit [Ping timeout: 245 seconds]
<matti>
You did looked it up, did you? ;]
<matti>
What about RFC3514?
shaunbaker has quit [Remote host closed the connection]
justsee has joined #ruby
shaunbaker has joined #ruby
larissa has quit [Quit: Leaving]
<matti>
;]
Hanmac has quit [Ping timeout: 252 seconds]
<catphish>
i did have to look them up
<catphish>
nothing supports RFC3514 :)
<matti>
Hehe
<bean>
IP over Avian Carriers with Quality of Service
<bean>
lol
mark06 has joined #ruby
<matti>
bean: They did real life test ;
mengu has quit [Remote host closed the connection]
<matti>
bean: Check wikipedia ;]
<bean>
oh I know.
<bean>
lol
evenix has quit [Ping timeout: 264 seconds]
<catphish>
This document defines the behavior of security elements for the 0x0 and 0x1 values of this bit. Behavior for other values of the bit may be defined only by IETF consensus [RFC2434].
<matti>
But I am sure that every time you query DNS ay 8.8.8.8
<mark06>
how can I transform an integer array into a series of bits for encoding as Base64?
<mark06>
I mistook result of pack as a literal '\x00...'
<apeiros>
ascii is only 7bit
<DouweM>
mark06: if it were up to me, comments like "get out of IRC and have a girlfrield, please" would be a bannable offense. please, have some decency
<mark06>
catphish: sorry for the confusion
evenix has joined #ruby
<apeiros>
DouweM: yeah, I was considering a kick.
jesavard has joined #ruby
failshell has quit []
<apeiros>
but catphish seems to be cool about it, so kudos to his patience.
<catphish>
ps. don't encode it as ascii, encode it as "binary"
reset has joined #ruby
<mark06>
apeiros: it's past now, but useful meant for him, not me
<DouweM>
apeiros: yeah
<catphish>
i'm quite used to helping people in IRC :)
havenwood has quit [Remote host closed the connection]
tsykoduk is now known as zz_tsykoduk
<apeiros>
catphish: yeah, doesn't mean you have to accept getting shitted all over for trying to help.
allsystemsarego_ has quit [Client Quit]
<DouweM>
catphish: as am I, but I would've given up around the first insult
wormwood has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
<mark06>
apeiros: ascii 7 bit, right, but that doesn't mean the chars will have 7 bits, right? they'll have 8 with one leading zero, no?
havenwood has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
<apeiros>
mark06: yes
<catphish>
mark06: yes, but if you're going to encode it to something, convert it to "BINARY"
plotter has quit [Remote host closed the connection]
<apeiros>
note that ascii-8bit != ascii
<catphish>
it's basically a dumb 8-bit encoding that accepts both ascii and aby other junk you throw at it
<apeiros>
ascii-8bit is a horrible alias for binary :)
<catphish>
*any
weeems has quit [Quit: Leaving]
danshultz has quit [Ping timeout: 240 seconds]
shaunbaker has joined #ruby
momomomomo has joined #ruby
reset has quit [Ping timeout: 260 seconds]
Squarepy has joined #ruby
havenwood has quit [Ping timeout: 252 seconds]
theRoUS|afk has joined #ruby
weszlem has quit []
theRoUS|afk is now known as theRoUS
psyl0n has joined #ruby
Spami has joined #ruby
pyrac has quit [Quit: pyrac]
psyl0n has quit [Changing host]
psyl0n has joined #ruby
jbsnake has joined #ruby
tkuchiki has quit [Remote host closed the connection]
mojjojo has joined #ruby
Hanmac has joined #ruby
weszlem has joined #ruby
arietis has joined #ruby
zoee has quit [Quit: This computer has gone to sleep]
fedalto has joined #ruby
drag00n has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
<mark06>
apeiros: I don't believe much in these authoritative, dictatorial approaches... for a simple reason, if someone *annoys* me, I can /ignore him, and if I don't, then I have psychological problems... not the case for catphish... just saw there was a misunderstanding even though he couldn't understand what exactly (I was misunderstanding the result of pack), for some reason he didn't care about my irritation with his supposed arrogance
pskosinski has joined #ruby
<mark06>
after all, much of confusion is misunderstanding and people attack each other based on that
Hanmac1 has quit [Ping timeout: 272 seconds]
zipper has quit [Quit: leaving]
<mark06>
so what I though to be arrogance was just a misunderstanding
Es0teric has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
Squarepy has quit [Quit: Leaving]
larissa has joined #ruby
<apeiros>
mark06: look, it's simple - behave like an asshole and you're gone. you can believe in whatever you want. but this is what happens.
<mark06>
yes sir
tesuji has joined #ruby
<mark06>
but it's just your opinion, not the absolute truth
<apeiros>
are you testing how far you can go with your behavior?
<mark06>
no
wallerdev has joined #ruby
* workmad3
grabs popcorn
havenwood has joined #ruby
<catphish>
people who are arrogant on IRC are often also correct ;)
momomomomo has quit [Quit: momomomomo]
<mark06>
not that much catphish... I have examples where I was told some stuff were impossible to do... and I found out they weren't....
hogeo has quit [Remote host closed the connection]
<apeiros>
mark06: and no, it's not my opinion. I'm telling you a fact.
<workmad3>
catphish: how about people who arrogantly believe that they can hold whatever opinions they like and that these 'opinions' can't be wrong because they're opinions? :)
i_s has joined #ruby
<mark06>
arrogance is not tied to correctness.... but I just know you wasn't able to detect what I was understanding wrong.... I had no clue as well
<mark06>
apeiros: if you think it's a fact ok.That doesn't turn it into a fact though
<workmad3>
catphish: or how about people who over-interpret a flippant, joke comment? :)
<apeiros>
mark06: I'm an op. and yes, I will kick and ban you if you behave like an asshole. fact.
<workmad3>
mark06: apeiros has ban-powers... he can therefore ban you, making his statement a fact
asteros has joined #ruby
watermel0n has joined #ruby
<apeiros>
and if I'm not around, there's others.
<workmad3>
although his statement would be more factual if it was 'behave like an asshole when I can see you, and you're gone' :)
<apeiros>
^
<apeiros>
:)
<workmad3>
now... I had some popcorn around here...
* workmad3
grabs his popcorn again and goes back to heckling
tylersmi_ has quit [Remote host closed the connection]
relix has quit [Read error: Connection reset by peer]
relix_ has joined #ruby
ckinni has joined #ruby
<mark06>
catphish: for example once I had encoding problems in bash or something, and I explained the problem in ##bash.... the arrogant people (who believe to be always right) told me all sort of things... most of it meant basically I was stupid and doing things wrong (but interestingly, they could not explain why the problem was happening and its solution)...
CorySimmons has quit [Quit: Leaving.]
<mark06>
catphish: however you'd be surprised what the solution was....
_bart has quit [Remote host closed the connection]
chuk has joined #ruby
<mark06>
catphish: for a moment I even believed them a bit, to the point of reading bash's source code to find out the root problem and solution....
_bart has joined #ruby
fridim_ has quit [Read error: Operation timed out]
<mark06>
catphish: but I didn't give up.... and the solution was ridiculously simple.... one specific program's argument and an edit on a configuration file.....
<mark06>
apeiros: not in my vision, but that was a misinterpretation... he actually just couldn't explain what was the problem with me, since he had no idea of my misunderstanding of pack's result
<apeiros>
you think he was *impolite*? seriously?
<mark06>
as I said, no
tannerburson has quit [Quit: tannerburson]
havenwood has quit [Remote host closed the connection]
<workmad3>
mark06: err, the question was 'was catphish polite?' and you said 'no'
<mark06>
apeiros: I was thinking, now I don't
abq has joined #ruby
kaspergrubbe has quit [Ping timeout: 264 seconds]
<mark06>
workmad3: ^
<apeiros>
which one is it now - was he polite or impolite?
<mark06>
now = yes
zeade has joined #ruby
_bart has quit [Ping timeout: 272 seconds]
havenwood has joined #ruby
<apeiros>
unintelligible
tannerburson has joined #ruby
<mark06>
what I thought to be arrogance was miscommunication/misunderstanding
andikr has quit [Read error: Connection reset by peer]
endash has joined #ruby
macmartine has joined #ruby
momomomomo has joined #ruby
<mark06>
the 2nd example... in the comments there's a high reputation guy trying to convince me that was impossible... interestingly he wasn't brave enough to put that on an answer.... interestingly, some time later someone added a function which supposedly does exactly what was asked....
aganov has quit [Remote host closed the connection]
<apeiros>
mark06: I don't care about your examples.
mercwithamouth has joined #ruby
<apeiros>
All I can see is that catphish was perfectly polite. He didn't insult you. He made only factual statements about what is and what you get.
<workmad3>
mark06: why are you trying to repeatedly demonstrate that a jokey comment isn't absolutely true?
banister has joined #ruby
macmartine has quit [Read error: Connection reset by peer]
i_s has quit [Remote host closed the connection]
<apeiros>
And all I can see from you is that you felt justified in being offensive.
Grantlyk has joined #ruby
macmartine has joined #ruby
CorySimmons has quit [Quit: Leaving.]
mj12albert has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mark06>
and I also figured out a ridiculous workaround to achieve the same effect: a transparent-background program mimicking the same font and size....
<mark06>
apeiros: who makes you think the examples were to you?
<apeiros>
mark06: you write in the channel. they're for everybody.
havenwood has quit [Ping timeout: 240 seconds]
<mark06>
workmad3: what jokey comment?
<catphish>
i missed all that lol
<workmad3>
mark06: '16:31 < catphish> people who are arrogant on IRC are often also correct ;)'
<workmad3>
mark06: you seem to be spending an in-ordinate amount of time now demonstrating that people who are arrogant aren't always correct...
Dwarf has quit [Ping timeout: 240 seconds]
<workmad3>
mark06: which is kinda amusing considering a) the comment was a joke and b) the comment didn't state that arrogance == always correct
<catphish>
perhaps they're only "often" correct, i choose my words carefully, even when making flippant jokes
<apeiros>
workmad3: who said the examples were to you? :-p
* apeiros
off
<workmad3>
apeiros: :D
<workmad3>
apeiros: like I care if the examples were intended for me... I'm arrogantly proving mark06 is wrong here!
<mark06>
workmad3: aren't often... actually I meant there isn't really a relation... between arrogance and knowledge... it's each one's personality....
<mark06>
workmad3: for example there's a bash wiki form a guy called greg...
flops has quit [Ping timeout: 264 seconds]
<workmad3>
mark06: my point is that you're taking that flippant joke way too fucking seriously :P
Astralum has quit [Read error: Connection reset by peer]
<workmad3>
mark06: I don't give a shit about any relationship or lack thereof between arrogance and correctness
<mark06>
workmad3: it's a good wiki but greg is an asshole....
Dwarf has joined #ruby
Astralum has joined #ruby
<mark06>
workmad3: but I know great people with great skills who are *far* from being arrogant....
<workmad3>
mark06: good for you
<workmad3>
mark06: so do I ;P
<workmad3>
mark06: again, you're taking the entire *joke* way too seriously :P
yekta has joined #ruby
<workmad3>
catphish: I am right in assuming the comment was a flippant joke? I'm not being arrogant in assuming such? ;)
CorySimmons has joined #ruby
Grantlyk has quit [Remote host closed the connection]
<JuriadoBalzac>
I just stay away from arrogant people, it works well.
RichardBaker has joined #ruby
<workmad3>
JuriadoBalzac: are you lonely? :D
Grantlyk has joined #ruby
<mark06>
workmad3: no not taking too seriously.... just chatting too much.....
crazymykl has quit [Remote host closed the connection]
Grantlyk has quit [Read error: Connection reset by peer]
soulcake has quit [Read error: Connection reset by peer]
<mark06>
workmad3: I stopped writing the code :-/
Grantlyk has joined #ruby
daxroc has joined #ruby
soulcake has joined #ruby
Grantlyk has quit [Remote host closed the connection]
<JuriadoBalzac>
workmad3: Still, IT manages to attract those kind of men ( it's usually men ) so there is no shortage of them, but just as often I find helpful and nice people. Life's too short to stand assholes. ;)
Davey has quit [Quit: Computer has gone to sleep.]
Grantlyk has joined #ruby
h0rrorvacui has joined #ruby
crazymykl has joined #ruby
jerius has joined #ruby
lukec has joined #ruby
<workmad3>
JuriadoBalzac: my test runs are too long to be left idle... and so I troll assholes while they're running ;)
user258467 has quit [Quit: Quitte]
i_s has joined #ruby
<JuriadoBalzac>
workmad3: Whatever floats your boat ;)
<workmad3>
trollolololololol
p8952 has joined #ruby
ssvo has joined #ruby
Lewix has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<catphish>
workmad3: you are correct
burlyscudd has quit [Read error: Connection reset by peer]
beermouse has quit [Quit: beermouse]
burlyscudd has joined #ruby
<catphish>
also lol
JesseH has joined #ruby
<apeiros>
workmad3: I envy you for your job
<catphish>
i have an extreme policy of assuming good faith on IRC, it's necessary when you have op privileges
daxroc has quit [Ping timeout: 272 seconds]
<apeiros>
catphish: I try to ignore "tone"
havenwood has joined #ruby
<JesseH>
Hi when I run "bundle" I get http://hastebin.com/foruwiyesi.vbs Line 5 is simple "gem 'pg', platforms: :ruby". What should I do to fix this?
Grantlyk has quit [Ping timeout: 272 seconds]
<catphish>
also, lots of people don't have english as their first language
fedalto has quit [Ping timeout: 272 seconds]
<mark06>
JuriadoBalzac: sometimes we can't keep away from them, e.g. at work... or on irc, where the arrogant decide not to /ignore you even though they think you're stupid.... and they're often moderators so you get stuck... I have learned this, so I often just "feed the pet" (I want to say "you're an asshole" but I just say "thank you very much")....lol
<workmad3>
JesseH: stop using ruby 1.8?
baordog has joined #ruby
<catphish>
but on the other hand, it won't make an effort to re-explain when people say i'm plain wrong when i know i'm right :)
<mark06>
I want to split a string into bit blocks of size len
lfox has quit [Quit: ZZZzzz…]
ericx2x has joined #ruby
tvw has quit []
<mark06>
currently I'm getting the bytes, then converting to base 2, then joining, then scanning the block of size len, then converting back from base 2 to integer
Xuerian has quit [Read error: Connection reset by peer]
jrhe has joined #ruby
cburyta_ has joined #ruby
benlieb has joined #ruby
s2013 has quit [Ping timeout: 246 seconds]
agent_white has joined #ruby
s2013 has joined #ruby
timonv has quit [Ping timeout: 252 seconds]
jb41 has quit [Ping timeout: 260 seconds]
mjs2600 has quit [Remote host closed the connection]
ahmedelgabri has joined #ruby
Gabri has joined #ruby
Ripp__ has joined #ruby
Advocation has quit [Quit: Advocation]
ahmedelgabri has quit [Client Quit]
iamjarvo has joined #ruby
_409_ has joined #ruby
iamjarvo has quit [Remote host closed the connection]
iamjarvo has joined #ruby
iajrz_ has joined #ruby
Gabri has quit [Quit: Gabri]
freezey has quit [Remote host closed the connection]
ahmedelgabri has joined #ruby
mjs2600 has joined #ruby
psyl0n has joined #ruby
havenwood has joined #ruby
mlpinit has quit [Remote host closed the connection]
<bricker`away>
Why is the ruby source code indented so inconsistently? Tabs and spaces everywhere. I would guess they would be strict about that, so I'm sure there is another explanation. I've heard something before about how Vim handles indentation?
sayan has quit [Ping timeout: 245 seconds]
baordog has quit [Remote host closed the connection]
danshult_ has quit [Remote host closed the connection]
gcds has joined #ruby
danshultz has joined #ruby
<shevy>
bricker`away my ruby source code is indented perfectly
ahmedelgabri has quit [Client Quit]
nanoyak has quit [Read error: Operation timed out]
<gcds>
Hello, searching for specialist in HTTP/TCP in building library for http proxy, pm me :)
<shevy>
bricker`away if you find a tab user that guy must be a pythonista
<olivier_bK>
i dont understand why i dont have in my screen URL DE ..
thelorax123 has joined #ruby
alexim has joined #ruby
Ox6abe has quit [Remote host closed the connection]
whunt_ has joined #ruby
piot has left #ruby [#ruby]
whunt_ is now known as whunt
manoj_ has joined #ruby
xcess_denied has quit [Ping timeout: 245 seconds]
daxroc has joined #ruby
<shevy>
olivier_bK you forgot to put the code into a method
<shevy>
olivier_bK the part there: "@uid_instance = gets.chomp "
aspires has joined #ruby
<shevy>
olivier_bK, I show you one example how it should work, but before opening it, try to solve it yourself, otherwise your brain may not discover the error
<olivier_bK>
:)
mando has joined #ruby
mando has quit [Remote host closed the connection]
<shevy>
nobitanobi aha you mean that it is defined on the class level
valesk has quit [Remote host closed the connection]
alexim has quit [Quit: bye]
lethjakman has joined #ruby
daxroc has quit [Ping timeout: 245 seconds]
shredding has joined #ruby
petey has joined #ruby
finch has joined #ruby
superscott[8] has quit [Quit: superscott[8]]
JimmyNeutron has joined #ruby
echevemaster has joined #ruby
Spami has joined #ruby
_bart has quit [Remote host closed the connection]
<finch>
Good day folks, I'm diving into the scary parts of ruby's openssl bindings and I've hit a snag - namely I can't fully understand the use of OpenSSL::X509::ExtensionFactory and why it would be used over directly creating extensions. It seems to enforce that extensions are standard x509v3 extensions but I'm lost beyond that.
_bart has joined #ruby
JimmyNeutron has left #ruby [#ruby]
<finch>
Is anyone else familiar with this code and the openssl bindings?
reset has joined #ruby
Takehiro has joined #ruby
<Takehiro>
hey can u make @foo ? @foo : ‘foo’ shorter?
R33C3 has joined #ruby
ghostjangles has joined #ruby
<beermouse>
@foo ||= 'foo'
<Hanmac1>
Takehiro: @foo || = 'foo'
Hanmac1 is now known as Hanmac
<beermouse>
if you're just checking for nil
<canton7>
note that that assignes to @foo, which your example doesn't do
<Hanmac>
then @foo || 'foo'
<Takehiro>
i dont want the @foo signed if it's nil :(
<Takehiro>
aha @foo || 'foo'
<beermouse>
take Hanmac's line then
<Takehiro>
thanks :)
<Takehiro>
thanks guys
<finch>
Alternately, does anyone know a good primer on the MRI ruby internals? I've been mucking around in the C implementation and could use more information while I'm there.
ghr has joined #ruby
randomnick_ has joined #ruby
mjs2600 has quit [Ping timeout: 272 seconds]
Takehiro has quit [Client Quit]
failshell has joined #ruby
yekta has joined #ruby
_bart has quit [Ping timeout: 264 seconds]
R33C3 has quit [Ping timeout: 246 seconds]
mjs2600 has joined #ruby
<olivier_bK>
shevy, thanks for you help now i understand where is my mistake
dallasm_ has joined #ruby
rezzack has joined #ruby
<shevy>
cool
rezzack has quit [Client Quit]
<shevy>
finch I think the people here on #ruby are incompetent when it comes to C
jrhe has quit [Ping timeout: 245 seconds]
DanBoy has quit [Ping timeout: 240 seconds]
rezzack has joined #ruby
iajrz_ has quit [Remote host closed the connection]
RichardBaker has joined #ruby
<cout>
finch: there used to be a good book on the subject in japanese
<momomomomo>
shevy: Nice trolling
<shevy>
hehe
<cout>
and someone was translating it to english
<cout>
might be out of date by now, I'm not sure
<shevy>
momomomomo it's a fact
<finch>
shevy: admittedly I'm asking some seriously esoteric questions, but I've been diving into the source of openssl and ruby and reading RFCs till my eyes bleed so I was hoping I could have someone hold my hand a little :)
<mojjojo>
are there any gems for doing simple linear regression ?
<finch>
it's a bit of both, actually - ruby has this ExtensionFactory class that has no equivalent in openssl, and I'm working on code that uses it and I have no idea why
<finch>
shevy: with respect to the copyright, I was mucking around in the openssl code base and found a few files that haven't been updated since 1998 :/
<RubyPanther>
as soon as I see the word "factory" I blink and skip
<shevy>
haha
ckinni has joined #ruby
<shevy>
15 years
<shevy>
some ruby hackers were not even born in 1998
bricker`away is now known as bricker`work
Takehiro has joined #ruby
<RubyPanther>
that is good, that is stable
<Takehiro>
Hi again :P, can u make @foo.try(:bar).try(:[], 'biz') shorter....?
<finch>
RubyPanther: the relevant code was a frightening C macro
wildroman has quit [Remote host closed the connection]
mlpinit has joined #ruby
<RubyPanther>
macros are usually frightening
<shevy>
Takehiro hmm not sure... try() seems to catch events when @foo has not those methods? otherwise this would be shorter: @foo.bar['biz']
<finch>
yeah :(
ahawkins has joined #ruby
<shevy>
the worst factory I know is a factory girl
<Takehiro>
@shevy yea... but i have some cases when @foo is nil :(
DanBoy has joined #ruby
<Takehiro>
and i want to avoid 'no method "bar" defined for nil'
<Takehiro>
error
<RubyPanther>
shevy: I hear a lot of people crying over her, heartbroken
<shevy>
well
freezey has quit [Remote host closed the connection]
<finch>
Takehiro: `unless @foo.nil`
<shevy>
Takehiro, you could always do this too:
aspires has quit [Quit: sudo making a sandwich]
maasha has joined #ruby
<shevy>
@foo.bar['biz'] if @foo
<finch>
s/nil/nil?/
<maasha>
evening.
gotjosh has joined #ruby
<Takehiro>
hmmm i c
<shevy>
RubyPanther in my mind, I just don't get why there is a girl in a factory and why a class in ruby is named that way
gcds has quit [Quit: gcds]
<Takehiro>
i guess i'll stick to @foo.try(:bar).try(:[], 'biz') since the actuall code is
mikepack has quit [Remote host closed the connection]
<maasha>
1) it doesnt work because of hanging open file that I cant figure out how to fix and 2) I really want all commands added with add() to take accept list of records and return a list of records and only manipulate the list elements if they are apropriate.
nwertman has joined #ruby
gcds has joined #ruby
<maasha>
line #55 is the problem I think.
_bart has joined #ruby
olivier_bK has quit [Ping timeout: 272 seconds]
benwoody has quit [Quit: benwoody]
thesheff17 has joined #ruby
aspires has joined #ruby
fedalto has quit [Quit: Leaving]
LarsSmit has joined #ruby
FDj has joined #ruby
zipper has joined #ruby
<havenwood>
What is the return value of? options[:output]
LarsSmit has quit [Client Quit]
<maasha>
havenwood: a file name (a String)
yekta has quit [Ping timeout: 264 seconds]
yekta has joined #ruby
Reach has joined #ruby
<maasha>
havenwood: thing is, the method is called twice and the file is never closed.
RichardBaker has quit [Quit: RichardBaker]
<havenwood>
maasha: What do you want save to return?
dallasm_ has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 240 seconds]
<maasha>
?
<havenwood>
maasha: ln55 ios = File.read
raphaelivan has joined #ruby
<havenwood>
oh sry
gcds has quit [Read error: Connection reset by peer]
weems has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
weems has quit [Remote host closed the connection]
gcds has joined #ruby
iamjarvo has joined #ruby
<havenwood>
maasha: So usually you'd put the logic inside a do/end block with File.open. Like : File.open do |ios|
<havenwood>
which auto-closes the files when the block ends
mengu has joined #ruby
mengu has joined #ruby
<havenwood>
maasha: Let the block handle closing the file for you, nicer that way.
timonv has joined #ruby
kaspergrubbe has joined #ruby
polaco_zZz is now known as polaco
mklappstuhl has quit [Remote host closed the connection]
<maasha>
havenwood: yes, but the lazy evaluation of the entire pipe is executed from without the scope of #save and then the file will be closed.
gcds has quit [Read error: Connection reset by peer]
<gotjosh>
Hey Guys! While working on an image cropping calculation I decided to scope this into this classes. Any suggestion on how this could be improved? Specially on the .to_f's and .rounds? https://gist.github.com/gotjosh/e3078e78fd20fe93af5d
<havenwood>
maasha: oh, so you don't want it to close?
<havenwood>
maasha: whaa? What are you doing?
ahawkins has quit [Ping timeout: 245 seconds]
gcds has joined #ruby
gcds has quit [Client Quit]
lkba has quit [Ping timeout: 245 seconds]
asteros has quit [Read error: Connection reset by peer]
freezey has joined #ruby
<havenwood>
gotjosh: Looks good to me. A lesser used alt to `THUMBNAIL_WIDTH / @horizontal.to_f` is `THUMBNAIL_WIDTH.fdiv(@horizontal)` but yeah, your code looks good to me
nateberkopec has joined #ruby
jbpros has joined #ruby
<nobitanobi>
shevy, yes
<nobitanobi>
sorry for l8 response
mjs2600 has quit [Remote host closed the connection]
<havenwood>
gotjosh: Are those really constants?
<nobitanobi>
it's defined on the class level, and since the class is Object and Object is an ancestor of Class, yeah
<nobitanobi>
:P
iamjarvo_ has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<shevy>
hmm
<shevy>
ok
mjs2600 has joined #ruby
<shevy>
nobitanobi, is this any useful though? :D
<nobitanobi>
nops ahha
<shevy>
hehehe
<nobitanobi>
but I was trying to understand all the whole main Object and so...
shredding has quit [Quit: shredding]
<nobitanobi>
all started me asking why we could do "puts"
<shevy>
I am happily using ruby without understanding it :D
<nobitanobi>
where it was defined
<nobitanobi>
haha, I'm sure you understand it
phinfonet has joined #ruby
iamjarvo_ has quit [Remote host closed the connection]
<gotjosh>
@havenwood no, but I'm scoping them like that for now. I'm looking for a clever way to pass those as optional but I'm not sure if they should live in the Axis.
decoponio has quit [Quit: Leaving...]
iamjarvo_ has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
kaspergrubbe has quit [Remote host closed the connection]
brtdv has joined #ruby
<havenwood>
gotjosh: just a nit but an extra whitespace before the word `initialize` on line 4
<havenwood>
:P
<gotjosh>
@havenwood got it thanks :)
benwoody has joined #ruby
lmickh has joined #ruby
mklappstuhl has joined #ruby
_bart has quit []
<maasha>
havenwood: well, I am setting up a pipeline with add() and executing it with run(). Only at run() should data be process and in a lazy fashion so the data is not loaded into memory all at once.
jkhwan has quit [Remote host closed the connection]
iliketurtles has joined #ruby
jkhwan has joined #ruby
jb41 has joined #ruby
<havenwood>
maasha: So you want an IO.pipe that reopens stdout?
mjs2600 has quit [Remote host closed the connection]
<havenwood>
maasha: Are you familiar with Jesse Storimer's shirt?
<havenwood>
>.> ^ I sound insane saying that. Oh well, unicorns and rainbows!
maletor has quit [Quit: Computer has gone to sleep.]
Mars has joined #ruby
mando_ has joined #ruby
<havenwood>
mix reopeming pipes with forking and you're in business
<zipper>
Uh I have this issue with chruby I install a ruby in 1.9.3 but it goes on to install gems in ~/.gem/ruby/1.9.1 which is not the $GEM_HOME. Here is the gist for installation: https://gist.github.com/urbanslug/7529043
<havenwood>
zipper: You mean you're having RubyGems trouble? What you linked looks like a successful installation on bundler.
timonv has quit [Ping timeout: 252 seconds]
salmonax has quit [Read error: Connection reset by peer]
<nobitanobi>
I have a call that looks like this: Process.spawn("casperjs #{path_to_file} '#{params[:page][:url]}' '#{Rails.root}/tmp/' --ignore-ssl-errors=yes", :out => pipe_cmd_out, :err => pipe_cmd_out)
<Lope>
I'm familiar with using version managers to get around distros archaic versions of stuff.
<havenwood>
hehe
vlad_starkov has quit [Ping timeout: 272 seconds]
jerius has joined #ruby
<havenwood>
I love that Fedora 19's Ruby is 2.0.0-p247 and out-of-the-box sane non-sudo gem setup.
Guest29506 has quit [K-Lined]
<havenwood>
The Debian folks dropped the ball with Ruby installation, oh well, there is ruby-install/chruby, rvm, and ruby-build/rbenv to deal with that.
<havenwood>
Mavericks is 2.0.0-p247 but silly system gem home.
Maarius has joined #ruby
<Hanmac>
Mavericks is the worst
<havenwood>
Hanmac: Why you no like?
<havenwood>
Hanmac: I get better battery life so i'm happy.
<havenwood>
OS X should switch the default shell to zsh.
<Hanmac>
because every lib developer i was talking to says that Mavericks breaks nearly everything
<havenwood>
They can't ship bash 4.2, and having all these people on bash 3.2 is silly
<Maarius>
Hello, I want to open an url with ruby and append a key. At the moment I do `open https://xxx.info/`.key["x"] but that does not work
Mars` has quit [Remote host closed the connection]
<Hanmac>
when nothing is working than its the reason why the battery lives longer
<havenwood>
Hanmac: works on my machine :P
nisstyre has joined #ruby
<havenwood>
Hanmac: what ain't working?
dnyy_ has joined #ruby
<Hanmac>
Maarius: `` returns a string not a hash
Thanatermesis has quit [Quit: ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ]
dnyy has quit [Read error: Connection reset by peer]
<Maarius>
Hanmac: Ok, what do I have to change then?
neonlex has joined #ruby
reset has quit [Quit: Leaving...]
Thanatermesis has joined #ruby
<Hanmac>
Maarius: depens that your page is returning ... does it use json or similar?
Guest94028 has joined #ruby
riku- has joined #ruby
<Maarius>
Hanmac: Maybe I expressed myself not clearly. I just want to open the URL in the browser with the key["x"] appended.
funburn has joined #ruby
JuanMiguel has joined #ruby
<Maarius>
Hanmac: It opens browser with the url however the key["x"] is not appended
<havenwood>
Maarius: You want to interpolate an 'x' at the end of the url in the opened browser?
jerius has quit [Quit: Computer has gone to sleep.]
shanlar has quit [Quit: shanlar]
nari has joined #ruby
<zipper>
What exactly caused this? I also notice now that gems are no longer installing to ~/.gem
<Hanmac>
zipper do "which ruby"
shanlar has joined #ruby
bubbajones has quit [Ping timeout: 260 seconds]
<zipper>
Hanmac: /usr/bin/ruby
Ripp__ has quit []
<zipper>
Hanmac: I didn't run this though `Add $HOME/.rbenv/bin to your $PATH'
mrfoto has quit []
<Hanmac>
zipper: and maybe thats the problem?
Nanuq has quit [Quit: biaf]
<workmad3>
wow, how strange... when rbenv's binaries aren't on the path, a shell can't find rbenv managed rubies!
jerius has joined #ruby
<postmodern>
workmad3, rbenv uses shims to intercept when ruby is invoked
<workmad3>
postmodern: I know that
<workmad3>
postmodern: it still needs those shims on the PATH :P
<zipper>
Hanmac: seems it was :D
<workmad3>
postmodern: <3 chruby btw ;)
<zipper>
Hanmac: uh how can I make rbenv not install gems to
<zipper>
Hanmac: I mean install gems in ~
<Hanmac>
look for GEM_HOME ?
* Hanmac
never used rbenv
<zipper>
I get nothing.
shelzmike has quit [Read error: Connection reset by peer]
<bnagy>
why do you think you want to install your rbenv gems somewhere other than with your rbenv rubies?
ValicekB has quit [Ping timeout: 252 seconds]
nanoyak has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
jamblack has joined #ruby
dnyy_ is now known as dnyy
neonlex has quit []
mikepack has joined #ruby
beermouse has quit [Quit: beermouse]
mansi has quit [Read error: Connection reset by peer]
eliasp_ is now known as eliasp
mansi has joined #ruby
banister has joined #ruby
chuk has quit [Quit: Leaving]
<Hanmac>
zipper installing gems global at one place with still switching ruby versions is a very bad yeah ... its like changing the engine of a car while driving with full speed
phus1on has quit [Quit: .]
zipper has quit [Ping timeout: 264 seconds]
jkhwan has quit [Remote host closed the connection]
tylersmith has quit [Read error: Connection reset by peer]
evenix has quit [Ping timeout: 246 seconds]
tylersmith has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
hashpuppy has joined #ruby
jkhwan has joined #ruby
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<workmad3>
Hanmac: and sometimes the engine expects the axles and driveshaft to be in different places
tylersmith has quit [Read error: Connection reset by peer]
tylersmi_ has joined #ruby
zipper has joined #ruby
<bnagy>
the engine shouldn't know about the axles, that's poor OO
<bnagy>
you're going to end up doing differential debugging
<elben>
hanmac: i like the code points better. no idea what unpack("U*") does :)
<elben>
(though now i do)
bubbajones has joined #ruby
ckinni has joined #ruby
<Hanmac>
bnagy: specially compiled extensions, if you switch ruby version with out reinstalling they might break
<elben>
seems like my terminal doesn't have the right encoding set and so was seeing the wrong stuff
maasha has quit [Quit: Page closed]
beermouse has joined #ruby
phinfone_ has joined #ruby
olivier_bK has joined #ruby
ckinni has quit [Client Quit]
jkhwan has quit [Ping timeout: 272 seconds]
jkhwan has joined #ruby
phinfonet has quit [Ping timeout: 240 seconds]
ckinni has joined #ruby
ValicekB has joined #ruby
brtdv has quit []
zipper has quit [Ping timeout: 272 seconds]
hopkin has quit [Remote host closed the connection]
zipper has joined #ruby
<Hanmac>
zipper installing gems global at one place with still switching ruby versions is a very bad idea
<zipper>
Hanmac: what?
ValicekB has quit [Read error: Operation timed out]
<zipper>
Uh how can I regenerate the contents of my gem env?
<Hanmac>
zipper: you wanted to install all gems to ~ right? but you are still using rbenv to switch your ruby right? do you know about the consequences?
atrocitas has joined #ruby
mklappstuhl has joined #ruby
<zipper>
Hanmac: I have noticed some bad ones
<zipper>
with where gems are being installed to or something.
<zipper>
There are like 2 GEM paths
RichardBaker has quit [Quit: RichardBaker]
<Hanmac>
one of the problems i know is: installing binary gems to 1.9+ does not work in 2.0+ without reinstalling
mansi has quit [Read error: Connection reset by peer]
stringoO has quit [Quit: stringoO]
<Kamuela>
youtube is ded
mansi has joined #ruby
<workmad3>
Hanmac: yeah, that's why many ruby managers now will use ~/.gem/ruby/$RUBY_VERSION as the gem repo :)
<zipper>
Hanmac: what do you mean?
brtdv has joined #ruby
sailias has joined #ruby
beermouse has quit [Quit: beermouse]
axl_ has joined #ruby
<workmad3>
zipper: something with a native extension compiled for 1.9.3 won't work without recompiling the extension on 2.0.0
Reach has quit [Remote host closed the connection]
<zipper>
uh how can I regenerate the contents of gem env
kcombs has quit [Remote host closed the connection]
coffeina has joined #ruby
phinfonet has joined #ruby
mklappstuhl has quit [Ping timeout: 248 seconds]
reset has quit [Quit: Leaving...]
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
zipper: The questions doesn't make sense. Read: gem help env
mansi has quit [Read error: Connection reset by peer]
ckinni has joined #ruby
mansi has joined #ruby
Hanmac has quit [Ping timeout: 246 seconds]
TigerWolf has joined #ruby
phinfone_ has quit [Ping timeout: 246 seconds]
Hanmac has joined #ruby
<Hanmac>
zipper: MRI changes something in the structure of the VALUE stuff ... for sample the thing with flonum ... that causes all the other constants to move to different places ... and that may cause checks against nil does not work anymore , that may break the gem
SteveBenner9 has joined #ruby
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Takehiro has quit [Remote host closed the connection]
erinb has quit [Quit: :: waves bye ::]
<xibalba>
what is lambda
pixelgremlins has quit [Ping timeout: 272 seconds]
<Hanmac>
lambda is a simple proc that thinks its better than other procs ;P
elben has quit [Quit: elben]
<havenwood>
and more stabby
fijimunkii has quit [Ping timeout: 272 seconds]
<havenwood>
->{}
<xibalba>
is it derived from the Proc class?
fijimunkii has joined #ruby
<Hanmac>
no proc and lambda uses the same Proc class
<TorpedoSkyline>
hmm, nope. Haven't done any work with sets, so maybe this would be better.
<TorpedoSkyline>
thanks havenwood!
jerius has quit [Quit: Computer has gone to sleep.]
daxroc has joined #ruby
pothibo has joined #ruby
jkhwan_ has quit [Remote host closed the connection]
jkhwan has joined #ruby
jkhwan has quit [Remote host closed the connection]
delinquentme has joined #ruby
jkhwan has joined #ruby
<delinquentme>
anyone know if ruby has the ability for piecewise matrix multiplication?
kaspergrubbe has quit [Remote host closed the connection]
mikepack has joined #ruby
Shidash has joined #ruby
raphaelivan1 has joined #ruby
raphaelivan has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
banister has joined #ruby
<bnagy>
TorpedoSkyline: what are you actually trying to do?
zipper has quit [Quit: Lost terminal]
<TorpedoSkyline>
bnagy trying to get the uniques in two arrays
<bnagy>
why
<bnagy>
by which I mean what are you actually trying to do :)
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nwertman has quit [Ping timeout: 245 seconds]
ValicekB has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
<TorpedoSkyline>
bnagy haha, so I'm working with user roles which are determined by an integer ID. I need to compare current roles (and array with the current role IDs) with a request containing the users new roles (an array with role IDs). To know if I need to insert or delete the role, I need to get the outstanding role IDs