freezey has quit [Remote host closed the connection]
Deltini has left #ruby ["Saindo"]
Deltini has joined #ruby
antoni1 has quit [Read error: Connection timed out]
Narzew has quit [Read error: Connection reset by peer]
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
<eam>
`ping 0x7f.0.0.1`
Sawbones has quit [Remote host closed the connection]
<eam>
or even `ping 0x7f.1`
<havenn>
hehe
<b3itz>
havenn: thats perfect, EXCEPT my prof just said we dont need to validate... we just need to check 1-3.1-3.1-3
<b3itz>
i didnt know this
Hijiri has joined #ruby
echooo has quit [Read error: Connection reset by peer]
vinleod has quit [Quit: Computer has gone to sleep.]
echooo has joined #ruby
<eam>
`ping 2130706433`
<b3itz>
havenn: and I can't get this to spit anything out line.scan(/\d{1-3}.\d{1-3}.\d{1-3}/)
<eam>
b3itz: \d{1,3}
Sawbones has joined #ruby
davasaurous has quit [Remote host closed the connection]
<eam>
also backslash escape your .
<havenn>
^
<b3itz>
oh der.. lemme fix that
<b3itz>
i dont know why i did that lol
<b3itz>
rubenglish
<eam>
- is valid in [] bracketed character sets for a range
<eam>
but in {} it's ,
The_NetZ has joined #ruby
<b3itz>
oh i see
<b3itz>
ok now its printing out things like 537.36 500
<eam>
[a-z]
<b3itz>
which isnt an ip
geggam has quit [Ping timeout: 256 seconds]
<b3itz>
again, i don't need to validate, just need it to be a valid format
<eam>
b3itz: supply your new regex?
davasaurous has joined #ruby
<eam>
I suspect you didn't backslash your periods like I suggested
<The_NetZ>
hey. trying to cross-compile ruby-trunk for windows; getting allot of extinit.o undefined reference to Init_{standardexts}; using same recipe as I do for native linux, tips?
<b3itz>
i was missing a last \d{1,3} lol
karmatr__ has quit [Remote host closed the connection]
<The_NetZ>
erm, same recipe as I do for 2.1.5
<b3itz>
but now its also catching colors and hyphens
karmatr0n has joined #ruby
<The_NetZ>
colors? XD
supersym has joined #ruby
<b3itz>
shit, its also catching spaces
<b3itz>
-___-
aspires has quit []
<eam>
b3itz: as I said
jimeh has joined #ruby
<b3itz>
i dont know what you meant eam, im sorry
<eam>
b3itz: what is "." in regex syntax?
<eam>
it's something special
ghr has joined #ruby
aspires has joined #ruby
<b3itz>
eam: my notes say its a metacharacter that matches any character
freezey has joined #ruby
rainfyre_ has quit [Quit: seeya]
<b3itz>
so thats not what I need lol..
<ericwood>
fuck, my usb-->serial adapter doesn't work in yosemite
<ericwood>
I'm hosed
<b3itz>
so thats why its matching : spaces and -
<eam>
b3itz: correct
baweaver has joined #ruby
<eam>
you can turn a meta-character into a normal literal (and sometimes vice versa) using a backslash
<b3itz>
so is escape the right word?
<eam>
sure
<b3itz>
ok lemme try that
<eam>
eg "d" is a normal literal character "D"
<b3itz>
ah
<eam>
however \d is a meta-character
<eam>
. is a meta-character wildcard "any"
Sawbones has quit [Remote host closed the connection]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
henesy has quit [Ping timeout: 264 seconds]
<shevy>
haha
rshetty has quit [Ping timeout: 264 seconds]
<b3itz>
eam: ok so now that i have the an array of the IPs on each line (match_array), i need to split each match by the "." and use to_s.rjust to format with a leading 0........ i dont know how to go about this exactly
<b3itz>
so i need to walk though the array and take each entry and split it right?
<eam>
b3itz: well, tackle one problem at a time. How do you think you can split on "."?
x1337807x has joined #ruby
ponga has joined #ruby
StoneCypher has joined #ruby
<eam>
try writing down in regular english what you think you need to do at each step, then use the docs for each piece of data to figure out how to do it
<eam>
like, you have a String. Are there any methods in the String class that help?
<b3itz>
eam, ok i'll try that
<b3itz>
thats a good idea
<b3itz>
when i do the scan, it stores it as an array of..... strings or ints? ints right?
<StoneCypher>
culturally, is ruby a regex-heavy language like perl, or a regex available-but-rare language like php?
<eam>
b3itz: regex is basically all string in string out
<eam>
(or Arrays of String out)
<StoneCypher>
that is, am i more likely to get looked at strangely for using them or for avoiding them
<b3itz>
match_array = line.scan(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/) => match_array is a string
<b3itz>
so now i should iterate through the entire array and grab each entry
jonr22 has joined #ruby
<eam>
jhass: not quite as rich as perl's interface for not using them, though :D
<urbanslug>
While trying to install nokogiri from source using bundler I got this error that makes no sense:
<urbanslug>
`Could not find gem 'nokogiri (>= 0) ruby' in git@github.com:sparklemotion/nokogiri.git (at master).`
spastorino has quit [Quit: Connection closed for inactivity]
FutureTense has quit [Ping timeout: 244 seconds]
<urbanslug>
Yet I supplied it the url to that specific gem in the Gemfile
it0a has joined #ruby
<StoneCypher>
jhass: okay, cool, thanks
<urbanslug>
`Source does not contain any versions of 'nokogiri (>= 0) ruby'`
ponga has quit [Ping timeout: 264 seconds]
aspires has joined #ruby
<eam>
I wish ruby had vec()
<StoneCypher>
jhass: in the sense that there are several canonical ruby tutorials, is there a rails tutorial? (i am an experienced programmer; i do not want to be shown the magic of arithmetic in a repl, and i don't want to spend time reading stories about foxes)
<havenn>
StoneCypher: sometimes foxes are not as they seem
<Areessell>
Baha
<urbanslug>
Areessell: yes they lack a gemspec what do you suggest I do to install this gem?
<urbanslug>
gem installs are failing
<StoneCypher>
havenn: there's nothing wrong with that kind of tutorial, but it's not the kind i want
odin22 has quit [Ping timeout: 240 seconds]
<Areessell>
Why install from the github project? Just install the latest stable. They even said in the Y_U_NO_GEMSPEC.md: Team Nokogiri are not 10-foot-tall code-crunching robots, so master is usually unstable
oo_ has joined #ruby
<havenn>
StoneCypher: did you take a look at the well-grounded rubyist?
karmatr0n has joined #ruby
<urbanslug>
Areessell: Because rubygems is having issues.
The_NetZ has quit [Ping timeout: 256 seconds]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
StoneCypher: guides.rubyonrails.org is actually pretty nice IMO, but you might want a second opinion from #rubyonrails
<Areessell>
RubyGems.org? Working fine for me
The_NetZ has joined #ruby
<urbanslug>
Areessell: Yet other gems have installed
jonr22 has quit [Ping timeout: 272 seconds]
<StoneCypher>
jhass: cool, will give both a try; thanks
<urbanslug>
Really? rubygems is up?
baweaver has quit [Remote host closed the connection]
<Areessell>
I just did 'gem install nokogiri' and it's working fine
<StoneCypher>
havenn: the kindle edition isn't on amazon currently and the PDF version wouldn't load on my phone
<StoneCypher>
havenn: i'm gonna try it tonight
<StoneCypher>
havenn: i just suffered through why's :(
<StoneCypher>
on the plane that is
havenn has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
goodenough has quit [Remote host closed the connection]
<Areessell>
"Successfully installed nokogiri-1.6.5" Yep, urbanslug, working fine here. Perhaps their servers were under maintenance for a bit
duncannz has quit [Remote host closed the connection]
b3itz has quit [Ping timeout: 246 seconds]
adriancb has joined #ruby
adriancb has quit [Remote host closed the connection]
<zenspider>
that's nice. I read what you typed and responded with a solution to your stated problem. if you don't want to solve your problem that's up to you
<godd2>
no, the stated problem was to have search options on the website, not have search options in general
<godd2>
I was complaining about the website specifically
<godd2>
not the general inability to find or search for gems
kiyote23 has quit [Remote host closed the connection]
kiyote23 has joined #ruby
econerd4ever has joined #ruby
ghr has quit [Ping timeout: 244 seconds]
<godd2>
I admit I did not express that intent originally, and for that I apologize, but your implication that I have no desire to solve my problem is unfounded, and I would appreciate it if you didn't come to that conclusion
patrick99e99 has quit [Ping timeout: 250 seconds]
deric_skibotn has quit [Ping timeout: 252 seconds]
<Phrohdoh>
I can't find any documentation on rspec --pattern
<sevenseacat>
thats a shell command, not a ruby command.
<sevenseacat>
thats why its invalid syntax.
<Phrohdoh>
oh right.
mary5030 has joined #ruby
bmichelsen has joined #ruby
<The_NetZ>
lol.
elementz has quit [Ping timeout: 245 seconds]
<The_NetZ>
you can execute shell commands in ruby, though... I think backticks work.
<sevenseacat>
yeah. but why do you need a rake task to just call a shell task
<sevenseacat>
why not just run the shell command
<Phrohdoh>
because I like the shorter syntax, which is based off of make
MartynKeigher has joined #ruby
<Phrohdoh>
`` and $() should work
<sevenseacat>
yes, because `rake test` is much shorter than `rspec`
dcunit3d has joined #ruby
ponga has quit [Ping timeout: 264 seconds]
<Phrohdoh>
you're leaving off the filenames
Sawbones has joined #ruby
<Phrohdoh>
and assuming my names are done in a particular name
<sevenseacat>
no i'm not, they go in your .rspec config file
<sevenseacat>
though ideally that pattern would best be configured from within rspec itself
nonks has joined #ruby
<sevenseacat>
i dont think much of your .rb.spec convention but hey thats your choice
georgedrummond has quit [Ping timeout: 258 seconds]
<The_NetZ>
true that. just talking to allevate my irritation :/
<The_NetZ>
hrm... anyone run into a situation where if you ping google's dns while performing a net task (in this case, a git fetch) it starts to go fast for a bit? strange
henesy has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
Phrohdoh has left #ruby [#ruby]
<adam12>
lol
<sevenseacat>
meh
<pontiki>
it's like blowing through the phone to make the conversation clearer
JoshGlzBrk has joined #ruby
duncannz has joined #ruby
emmesswhy has joined #ruby
o0oo0o has quit [Quit: WeeChat 0.4.3]
MartynK has joined #ruby
MasterPieceF is now known as MasterPiece
rshetty has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 272 seconds]
<The_NetZ>
pontiki: lol, my question?
<pontiki>
yeah
MartynK has quit [Client Quit]
MartynK has joined #ruby
MartynK has quit [Read error: Connection reset by peer]
snapcase has joined #ruby
MartynKeigher has quit [Ping timeout: 255 seconds]
rshetty has quit [Remote host closed the connection]
jimbach_ has quit [Remote host closed the connection]
duncannz has quit [Remote host closed the connection]
<The_NetZ>
so does it actually do something, or is it coincidence
MartynKeigher has joined #ruby
phutchins has quit [Ping timeout: 272 seconds]
radic has quit [Ping timeout: 264 seconds]
Avahey has joined #ruby
o0oo0o has joined #ruby
radic has joined #ruby
ghostmoth has joined #ruby
MattB2 has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
<pontiki>
pinging google's DNS? i have no idea
<The_NetZ>
it seems to do *something*, but I really have no idea why XD
nonks_ has joined #ruby
nonks has quit [Ping timeout: 250 seconds]
sevvie has quit [Ping timeout: 240 seconds]
charlenopires has joined #ruby
hellome has joined #ruby
livingstn has quit []
MasterPiece has quit [Remote host closed the connection]
arup_r has quit [Quit: Leaving.]
MasterPiece has joined #ruby
MartynKeigher has quit [Read error: Connection reset by peer]
adriancb has quit [Remote host closed the connection]
adriancb has joined #ruby
gsd has joined #ruby
econerd4ever has joined #ruby
Sawbones has quit [Remote host closed the connection]
codezomb has joined #ruby
rshetty has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rshetty has quit [Read error: Connection reset by peer]
rshetty has joined #ruby
sriehl has joined #ruby
kiyote23 has quit [Remote host closed the connection]
<The_NetZ>
does someone have a local mirror of the ruby git repo who would care to creat a git bundle for me?
diego_ar has joined #ruby
kaplejon_ has quit []
damic has joined #ruby
bmichelsen has quit [Quit: ZZZzzz…]
<damic>
How would you go about parsing a file that has diff data sets in it?
kaplejon has joined #ruby
charlenopires has quit [Quit: Be back later ...]
amitchellbullard has quit [Ping timeout: 244 seconds]
<mark06>
damic: explain better what app is this, what different data
Sawbones has joined #ruby
<The_NetZ>
I think he means diff as in a patch?
kiyote23 has joined #ruby
econerd4ever has quit [Remote host closed the connection]
jonr22 has joined #ruby
<pontiki>
netz, you can't get to github now?
braincra- has quit [Quit: bye bye]
econerd4ever has joined #ruby
<damic>
The_NetZ: not diff for patch
amitchellbullard has joined #ruby
Crazy_Atheist has quit [Quit: WeeChat 1.0.1]
<The_NetZ>
pontiki: I can, but I keep getting remote end hung up and early EOF :/
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<damic>
mark06: is a CSV (not comma but pipe '|') that has 3 rows on top, 1 row seperator #, 1 row headers, 1 row seperator # and n data points
<The_NetZ>
I already have a partial copy of the ruby git repo, can't recall the last time I updated it :/
mary5030 has quit [Remote host closed the connection]
kapil__ has joined #ruby
MartynKeigher has joined #ruby
<damic>
then has similar header stuff then a different format of n data types in the same file
Sawbones has quit [Remote host closed the connection]
patrick99e99 has joined #ruby
ghr has joined #ruby
<mark06>
damic: it looks like the lines with '#' are just comments supposed to be ignored
dkphenom has quit [Read error: Connection reset by peer]
centrx has joined #ruby
<damic>
right, is there some nice ruby thing that can parse that, I was looking at CSV but didn't see how to ignore multiple header lines or tell it where the header starts
mary5030 has quit [Ping timeout: 258 seconds]
charlenopires has joined #ruby
<damic>
and then how do you tell it to stop midway through the file
MartynKeigher has quit [Ping timeout: 252 seconds]
centrx has quit [Client Quit]
<pontiki>
is there anything that can parse that?
<sevenseacat>
i'd probably split it into multiple strings based on the ---- lines
<sevenseacat>
and then parse each individually
<mark06>
damic: whatever csv parser you use, check if it's able to ignore comments
<pontiki>
regardless of ruby or not
MartynKeigher has joined #ruby
MartynKeigher2 has quit [Client Quit]
<pontiki>
i'd go with sevenseacat's suggestion
<mark06>
damic: but it's not hard to parse it manually, what do you want it to become, your objects?
<scottstamp>
I'm coming back to Ruby for the first time in a while, since 1.8.7 (iirc), any major documented changes I should read up on?
<damic>
yeah, im going to import it into some objects but I just wanted to know if there was a Ruby'esk way of doing it. I can just do it manually if not.
<The_NetZ>
oh yeah, --depth options :)
<mark06>
scottstamp: seek for the 2.0 changes
emmesswhy has quit [Read error: Connection reset by peer]
<mark06>
iirc 1.9 changed stuff a bit too
evanjs has quit [Remote host closed the connection]
emmesswhy has joined #ruby
ghr has quit [Ping timeout: 258 seconds]
<sevenseacat>
1.8 -> 1.9 was a much bigger jump than 1.9 -> 2.0
<sevenseacat>
and 2.0 -> 2.1 was smaller again
patrick99e99 has quit [Ping timeout: 250 seconds]
oo_ has joined #ruby
<The_NetZ>
almost there....
Hobogrammer_ has joined #ruby
<The_NetZ>
so how equivalent are the ruby git and svn repos, pretty much in sync?
Hobogrammer has quit [Ping timeout: 240 seconds]
duncan_ has joined #ruby
<mark06>
damic: as you can see, you just need to open the file, go trhough each line, ignore if line = ~ /^\s*\#/, then split by '|', then object.property = columns[index]
oo_ has quit [Ping timeout: 244 seconds]
<mark06>
*=~
duncannz has quit [Quit: Bye]
diego_ar has quit [Remote host closed the connection]
t7y9r has quit [Ping timeout: 255 seconds]
ndrei has joined #ruby
Joufflu has joined #ruby
diego_ar has joined #ruby
vinleod has joined #ruby
kyb3r_ has joined #ruby
t7y9r has joined #ruby
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
ponga has joined #ruby
x1337807x has joined #ruby
georgedrummond has joined #ruby
elementz has joined #ruby
Dopagod has joined #ruby
sinequanon has joined #ruby
lemur has joined #ruby
ponga has quit [Ping timeout: 264 seconds]
valeriansaliou has joined #ruby
georgedrummond has quit [Ping timeout: 256 seconds]
elementz has quit [Ping timeout: 264 seconds]
baroquebobcat has joined #ruby
sinequanon has quit [Ping timeout: 272 seconds]
rshetty has quit [Remote host closed the connection]
valeriansaliou has quit [Ping timeout: 252 seconds]
<Hijiri>
well I basically just modified a script that had rb2exe applied to it
<Hijiri>
so I'm guessing it would work if I tried?
clamstar has joined #ruby
arup_r_ has joined #ruby
clamstar has quit [Read error: Connection reset by peer]
<Areessel1>
I think Rubinius can do that. I use MRuby for my compiled stuff, though.
<mbuf>
sevenseacat, thanks!
clamstar has joined #ruby
Areessel1 is now known as Areessell
<MasterPiece>
Who have an idea about this error page : Could not find gem 'capybara (~> 2.1.0) ruby' in the gems available on this machine. (Bundler::GemNotFound) http://paste.ubuntu.com/9340084/
The_NetZ has quit [Ping timeout: 264 seconds]
<sevenseacat>
MasterPiece: did you read and follow the instructions
Morkel has joined #ruby
lucyZzZZz has joined #ruby
<Hijiri>
can I cross-compile with mruby?
arup_r has quit [Ping timeout: 245 seconds]
<MasterPiece>
sevenseacat, yes, I check the permissions and installed capybara by "sudo gem install capybara" , then bundle install && bundle update
The_NetZ has joined #ruby
lucyZzZZz has quit [Client Quit]
lyanchih has joined #ruby
oo_ has joined #ruby
<sevenseacat>
MasterPiece: then restarted your server?
lucyinthesky has joined #ruby
quazimod1 has quit [Ping timeout: 255 seconds]
<MasterPiece>
sevenseacat, no! init 6 ?
<sevenseacat>
...what?
<MasterPiece>
restart all of the O.S ?
<MasterPiece>
# init 6
<Areessell>
Hijiri: Of course =)
<sevenseacat>
no, the web server.
wjimenez5271 has joined #ruby
<Areessell>
I'm making a small GUI toolkit in MRuby, cross compiling. It's build into their build system
<Hijiri>
how easy is it to just make an exe of a ruby script from a linux machine?
jusmyth has joined #ruby
linoespinoza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<MasterPiece>
sevenseacat, I restarted all of the server :D , but not any change in the error page
<Areessell>
It's a pain to do that regardless
sinequanon has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
The_NetZ has quit [Ping timeout: 264 seconds]
CrazyM4n has joined #ruby
<CrazyM4n>
O
<CrazyM4n>
I'm not trying to start a flame war by saying this, but from a purely technical standpoint, which is faster? Python, or ruby?
<MasterPiece>
sevenseacat, /msg ?
<sevenseacat>
MasterPiece: no.
<Areessell>
Pfft bahahaha
<MasterPiece>
sevenseacat, ok :)
The_NetZ has joined #ruby
<CrazyM4n>
I'm writing a renderer that needs to be fast and I'm familiar with both languages
<Areessell>
CrazyM4n: Depends on the interpreter and which areas are being benchmarked. Both are "slow".
<Areessell>
When using a wrapper around a C or Java library, the code become very very fast
<CrazyM4n>
Stock interpreter, using large arrays/lists/whatever you call them
<MasterPiece>
sevenseacat, can you get me some clues please?
<Areessell>
MasterPiece: Stackoverflow.com
<Areessell>
seven is not your personal mentor
ponga has joined #ruby
davasaurous has quit [Remote host closed the connection]
echevemaster has quit [Remote host closed the connection]
ebbflowgo has quit [Quit: ebbflowgo]
<CrazyM4n>
Okay, a better question. I'd rather make it in ruby, so what can I do to maximize the performance of the language? Are there alternate interpreters that run faster? Idioms for working with large-ish data that are faster than obvious ways?
<Areessell>
CrazyM4n: Yes there are interpreters that are built for speed. You can make Ruby faster by writing your code in C using the Ruby-C API or your can "wrap" C libraries. You can even use FFI to call C functions directly
Takle has quit [Remote host closed the connection]
<shevy>
hanmac1 yes I tried not long ago, it was up too \o/
jonr22 has quit [Read error: Connection reset by peer]
jonr2219 has joined #ruby
<shevy>
armageddon has been prevented
mkaesz has joined #ruby
AxonetBE has joined #ruby
<shevy>
until another wave of zombies
sk87 has joined #ruby
<sevenseacat>
the site is up for me, but i still cant gem install anything or bundle
User458764 has quit [Ping timeout: 255 seconds]
<certainty>
thanks for your time and have a productive day
shredding has joined #ruby
georgedrummond has joined #ruby
jonr22 has joined #ruby
jonr2219 has quit [Read error: Connection reset by peer]
<soahccc>
it's ain't gonna be productive if that ddos won't stop
User458764 has joined #ruby
wjimenez5271 has quit [Remote host closed the connection]
Aswebb has joined #ruby
Sou|cutter has joined #ruby
tesuji has joined #ruby
wjimenez5271 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
jonr2219 has joined #ruby
papercode has joined #ruby
<shevy>
what was the equivalent on an Array to .shuffle[0] again?
<shevy>
the [0] is going on my nerves :\
<apeiros_>
.sample
<sevenseacat>
.sample
<sevenseacat>
arrrr too slow
<apeiros_>
and it's not an equivalent. it's much faster.
dotix has joined #ruby
georgedrummond has quit [Ping timeout: 252 seconds]
jonr2219 has quit [Read error: Connection reset by peer]
claudiuinberlin has joined #ruby
wjimenez5271 has quit [Ping timeout: 240 seconds]
jonr22 has joined #ruby
claudiuinberlin has left #ruby [#ruby]
JoshGlzBrk has joined #ruby
MasterPiece has joined #ruby
econerd4ever has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
jonr2219 has joined #ruby
<certainty>
ok another last one. class << self; def something; end end vs. def self.something; end?
<sevenseacat>
i'd use the latter.
<apeiros_>
def self.something
<apeiros_>
better grepabiity
<sevenseacat>
but only because the former starts getting into strange ruby metaprogramming stuff that im really unfamiliar with
<apeiros_>
sevenseacat: oh noes! don't say that :D
<certainty>
apeiros_: hmm ok. that one is unexpected. I'd vote do the first if there is more than one method. because you can group them together. also conceptually the first version reduces complexity because you only have instance methods
CustosL1men has joined #ruby
<certainty>
no other kind of method
<apeiros_>
sevenseacat: it's really the same as `class Foo`, just that it opens Foo's singleton class instead of the class Foo itself.
<sevenseacat>
apeiros_: is true. learning ruby at the same time as rails means i know enough to work with rails, and not much more.
jonr22 has joined #ruby
jonr2219 has quit [Read error: Connection reset by peer]
<apeiros_>
certainty: if it helps you - there is nothing else in ruby than instance methods
<certainty>
apeiros_: that's my point
<apeiros_>
that concept called class methods - it doesn't exist
nfk has joined #ruby
<certainty>
with the self.something syntax somehow complects this as you have different syntax
krz has quit [Ping timeout: 240 seconds]
<certainty>
well one could argue that class << self .... end ... is also new syntax
<apeiros_>
well, with `class <<` vs `class` you have different syntax too ;-)
<certainty>
yeah
<apeiros_>
anyway, main reason for me is grep
<apeiros_>
other than that - I wouldn't care for either style
<certainty>
that i can accept
jonr2219 has joined #ruby
<apeiros_>
and I have to admit that since pry, I rarely ever use grep anymore
<apeiros_>
so that rationale might well be obsolete by now
jonr22 has quit [Read error: Connection reset by peer]
<certainty>
again thanks for your answers
<apeiros_>
class << self has some advantages - you can put attr_*, alias and stuff in there too
jonr2219 has quit [Remote host closed the connection]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jonr22 has joined #ruby
roolo has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
melik_______ has quit [Ping timeout: 272 seconds]
roolo has quit [Ping timeout: 256 seconds]
razieliyo has joined #ruby
razieliyo has joined #ruby
kyb3r_ has quit [Quit: Leaving]
jonr2219 has joined #ruby
mikepack has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
kyb3r_ has joined #ruby
wpp has joined #ruby
jonr2219 has quit [Remote host closed the connection]
jonr22 has joined #ruby
HOS_nerv has joined #ruby
olivier_bK has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
mikepack has quit [Ping timeout: 245 seconds]
dts has quit [Read error: Connection reset by peer]
<Areessell>
And class instance variables
timonv_ has joined #ruby
<apeiros_>
Areessell: um, no
<certainty>
apeiros_: yeah it's only one concept. That's why i chose to teach it this way to a colleague
<apeiros_>
those you have to assign in the normal class body
razieliyo has quit [Quit: Saliendo]
dts has joined #ruby
jonr2219 has joined #ruby
ghr has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
susmus has joined #ruby
bMalum has quit [Quit: bMalum]
arup_r has joined #ruby
georgedrummond has joined #ruby
<certainty>
to be fair the class << self .. syntax looks somewhat alien. but it was only a little hurdle
rshetty has quit [Remote host closed the connection]
Takle has joined #ruby
jonr22 has joined #ruby
jonr2219 has quit [Read error: Connection reset by peer]
MikeyB_ has joined #ruby
<shevy>
yeah, class << self always trips me up as well; for some reason it conflicts with other code
<shevy>
(in my .rb file)
<MikeyB_>
hey guys, I want to use ruby to write a shell script, but it doesn't act quite the same as a bash script, how can I shell out to other apps, fully capture their output on to stdout/stderr, etc and run them in the same env as my script like, it happens in bash?
<apeiros_>
I'd have preferred if matz had chosen another keyword for that
jonr22 has quit [Remote host closed the connection]
<apeiros_>
e.g. `singleton_class Foo; …; end`
jonr22 has joined #ruby
<apeiros_>
MikeyB_: ``
<apeiros_>
MikeyB_: if you don't want to capture but just let it print to stdout/stderr itself: system()
tobago has joined #ruby
<MikeyB_>
system might do it, I first tried with puts `something` which caused something to explode, forwhat I can only assume was environmental variables not being passed
timonv_ has quit [Remote host closed the connection]
<apeiros_>
`` and backticks should pass on the full env
jonr22 has quit [Read error: Connection reset by peer]
jonr2219 has joined #ruby
<epitron>
MikeyB_: i find system is the nicest
<shevy>
`` is more useful
<epitron>
you can use IO.popen("command") { |stdout| stdout.each_line { ... } } if you want to iterate over each line as it comes out, but then you'll get a buffer...
bmichelsen has quit [Quit: ZZZzzz…]
<epitron>
buffering means you won't see any lines until there's like 4k of data or something
<epitron>
you can set something to make it not buffered.. i can't remember what that is
<epitron>
IO.sync?
econerd4ever has quit [Remote host closed the connection]
jimbach has joined #ruby
jonr22 has joined #ruby
jonr2219 has quit [Read error: Connection reset by peer]
<MikeyB_>
I'm not bothered about actually capturing it, I just want it output as it would via bash (as in, as it comes out of the script, it goes to STDOUT/STDERR)
econerd4ever has joined #ruby
<epitron>
open3 lets you have stdout, stderr, stdin... but i could never figure out how to interleave stderr and stdout the same way bash does :)
<epitron>
yeah, use system :)
rshetty has joined #ruby
<epitron>
i really like system because you don't have to shell-escape arguments with weird chars in them
roolo_ has joined #ruby
<epitron>
you just go, system("command", arg_with_weird_chars)
jonr2219 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
<epitron>
the arg_with_weird_chars will be passed directly to the command binary's arguments, without being molested by bash
timonv_ has joined #ruby
jgrevich has quit [Quit: jgrevich]
<MikeyB_>
epitron: cool, will try that :)
<apeiros_>
yes. shell injection is about as common a mistake as sql injection
<soahccc>
epitron: there is popen2e or something
<MikeyB_>
its only a CI build script
<apeiros_>
"oh no, this user input will never be malicious, just put it in verbatim" :-S
<epitron>
soahccc: so many ways to run things :)
<MikeyB_>
just hating bash syntax and weird differences between osx and linux version
<epitron>
haha, yeah.. i stopped writing bash scripts in bash a few years ago
<epitron>
everything is ruby now
krz has joined #ruby
<epitron>
sooo much nicer
francisfish has joined #ruby
<apeiros_>
MikeyB_: just install the same bash (or whatever sh you use)?
<epitron>
(i mean, unless it's like a 2 line script)
<apeiros_>
(re osx vs. linux version)
jimbach has quit [Ping timeout: 258 seconds]
<MikeyB_>
apeiros: its on circle ci (a host I don't have control over bash version)
jheg has joined #ruby
econerd4ever has quit [Ping timeout: 264 seconds]
<MikeyB_>
also, ruby would be nicer :P I'm doing more complex stuff, where I pull a list of rspec tests to run for each test node, based on how many examples each one has, etc.. so in a bash script, its nasty
<epitron>
indeed
<epitron>
in ruby, you can just hook into rspec directly
jonr22 has joined #ruby
jonr2219 has quit [Ping timeout: 250 seconds]
emmesswhy has quit [Quit: This computer has gone to sleep]
sevenseacat has quit [Remote host closed the connection]
konsolebox has quit [Remote host closed the connection]
alaa has quit [Ping timeout: 256 seconds]
<shevy>
ohhh
<shevy>
I just thought up a great alias!
<shevy>
hescape rather than html_escape!
<workmad3>
rubygems back up?
<shevy>
YES
<workmad3>
yay
<shevy>
your 10 hours of sleep has been a good strategy workmad3
<xfz>
I wish I had slept for 10 hours
<workmad3>
shevy: I do love how attacks tend to be done to US timescales... means I can see them happening when going to bed and they're frequently sorted by the time I wake up ;)
<workmad3>
xfz: same :(
sameerynho has quit [Ping timeout: 252 seconds]
<shevy>
haha
<shevy>
and what if godzilla attacks while you are sleeping
<workmad3>
shevy: then I'll wake up and tokyo will be in ruins...
<workmad3>
shevy: but I don't live in tokyo, so I fail to see why I'd be affected :P
<arup_r>
How can I see what gems are installed inside a Gemset.. I am using Rvm
MasterPiece has quit [Ping timeout: 245 seconds]
<arup_r>
I think gem list is not right command to meet my need
<workmad3>
arup_r: activate the gemset and run 'gem list -l'
<thomasfedb>
workmad3, you beat me.
Timgauthier has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
sameerynho has joined #ruby
Timgauthier is now known as timgauthier_away
<workmad3>
arup_r: unless you've installed a lot of gems in the @global gemset (which you shouldn't do... really all you need in that is bundler, which is frequently installed by default), 'gem list -l' will be the one or two gems from @global and the gems in your gemset
<workmad3>
arup_r: alternatively, you could find the path of the gemset gem directory and just explore that to see which gems are installed into it
nonks_ has quit [Ping timeout: 250 seconds]
rageberry has joined #ruby
<arup_r>
Yes.. But I am not seeing the gems that I have in my Gemfile in the Gemset, where it should be present.. I am shocked,, :-(
<arup_r>
I used Bundler...
<workmad3>
arup_r: bundler can install gems into other locations (and gems installed from git repos are stored completely differently)
<workmad3>
arup_r: if you want to see all of them, run 'bundle exec gem list'
<arup_r>
Ahh! that's interesting.. Let me try
cajone has quit [Ping timeout: 258 seconds]
lsmola has quit [Ping timeout: 240 seconds]
Linuus has quit [Ping timeout: 240 seconds]
lkba has quit [Ping timeout: 264 seconds]
TPBallbag is now known as AFKBallbag
<arup_r>
No.. Nothing changed..
alaa has joined #ruby
<arup_r>
:-(
alaa has quit [Client Quit]
<soahccc>
there is also bundle open <3
<soahccc>
oh rvm ... don't ask me
Hobogrammer_ has quit [Ping timeout: 250 seconds]
Takle has quit [Remote host closed the connection]
bMalum has joined #ruby
AFKBallbag is now known as TPBallbag
Spami has quit [Quit: This computer has gone to sleep]
lolmaus has joined #ruby
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rageberry has quit [Ping timeout: 256 seconds]
genpaku_ is now known as genpaku
oo__ has quit [Remote host closed the connection]
MasterPiece has joined #ruby
ldnunes has joined #ruby
ajaiswal has quit [Quit: Leaving]
renderful has joined #ruby
oo_ has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
oo_ has quit [Remote host closed the connection]
rshetty has quit [Remote host closed the connection]
oo_ has joined #ruby
renderful has quit [Ping timeout: 272 seconds]
Takle has joined #ruby
rshetty has joined #ruby
lsmola has joined #ruby
gccostabr has joined #ruby
blueOxigen has quit [Ping timeout: 272 seconds]
georgedrummond has joined #ruby
SOLDIERz has quit [Remote host closed the connection]
SOLDIERz has joined #ruby
lyanchih_ has joined #ruby
jimbach has joined #ruby
bMalum has quit [Quit: bMalum]
lyanchih_ has quit [Client Quit]
LiquidInsect has quit [Ping timeout: 245 seconds]
sk87 has joined #ruby
startupality has quit [Quit: startupality]
startupality has joined #ruby
sk87 has quit [Client Quit]
dangerou_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Takle has quit [Read error: Connection reset by peer]
dangerou_ has joined #ruby
Takle has joined #ruby
rageberry has joined #ruby
jimbach has quit [Ping timeout: 258 seconds]
sk87 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Linuus has joined #ruby
Lokalni has joined #ruby
dangerou_ has quit [Client Quit]
dANO has joined #ruby
tkuchiki has joined #ruby
magicien has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
rhalff has left #ruby ["Leaving"]
emmesswhy has joined #ruby
Lokalni has left #ruby ["WeeChat 0.4.2"]
xymbol has quit [Read error: Connection reset by peer]
LiquidInsect has joined #ruby
xymbol has joined #ruby
emmesswhy has quit [Client Quit]
dangerou_ has joined #ruby
Linuus has quit [Ping timeout: 250 seconds]
dangerou_ has quit [Client Quit]
rageberry has quit [Ping timeout: 272 seconds]
georgedrummond has quit []
tkuchiki has quit [Ping timeout: 264 seconds]
yfeldblu_ has quit [Remote host closed the connection]
bMalum has joined #ruby
ht__th has joined #ruby
SOLDIERz_ has joined #ruby
ht has quit [Ping timeout: 244 seconds]
dumdedum has quit [Quit: foo]
fxn has joined #ruby
bal has quit [Ping timeout: 240 seconds]
SOLDIERz_ has quit [Client Quit]
SOLDIERz has quit [Ping timeout: 240 seconds]
ponga has quit [Remote host closed the connection]
Morkel has quit [Read error: Connection reset by peer]
<certainty>
today is question-day for me.
lolmaus has quit [Remote host closed the connection]
jonr22 has joined #ruby
lolmaus has joined #ruby
Morkel has joined #ruby
<exadeci>
Hello, I'm on a project where in a method it will look for Admin::User or SuperAdmin::User that don't exist and the "hack" that has been done is creating empty classes that inherit from user. What could I do so it doesn't need theses empty classes (Except unfortunately by changing the method that does theses calls)
boombadaroomba has quit [Ping timeout: 250 seconds]
krz has quit [Quit: WeeChat 1.0.1]
timonv_ has quit [Remote host closed the connection]
dumdedum has joined #ruby
jonr22 has quit [Ping timeout: 244 seconds]
krz has joined #ruby
nhhagen has joined #ruby
mkaesz has quit [Ping timeout: 258 seconds]
bMalum has quit [Quit: bMalum]
nonks_ has joined #ruby
bMalum has joined #ruby
User458764 has quit [Ping timeout: 255 seconds]
AFKGeek has joined #ruby
fabrice31 has quit [Remote host closed the connection]
MasterPiece has quit [Remote host closed the connection]
jusmyth1 has quit [Quit: Leaving.]
iamninja has joined #ruby
SCHAAP137 has joined #ruby
quimrstorres has quit [Remote host closed the connection]
lemur has quit [Remote host closed the connection]
lemur has joined #ruby
davasaurous has joined #ruby
nonks_ has quit [Ping timeout: 250 seconds]
goodenough has quit [Remote host closed the connection]
sonOfRa has quit [Quit: Bye!]
bal has joined #ruby
odin22 has joined #ruby
sonOfRa has joined #ruby
lemur has quit [Ping timeout: 258 seconds]
MasterPiece has joined #ruby
davasaurous has quit [Ping timeout: 258 seconds]
iaj has joined #ruby
Tranquility has joined #ruby
odin22 has quit [Ping timeout: 264 seconds]
hiyansa has joined #ruby
doki-worry has quit [Ping timeout: 272 seconds]
bal has quit [Quit: bal]
wsmoak has joined #ruby
wsmoak has quit [Changing host]
wsmoak has joined #ruby
ta has quit [Remote host closed the connection]
ponga has joined #ruby
ponga has joined #ruby
bal has joined #ruby
charliesome has quit [Quit: zzz]
fabrice31 has joined #ruby
doodlehaus has joined #ruby
timonv_ has joined #ruby
QKO has quit [Ping timeout: 240 seconds]
dayid has joined #ruby
browndawg has joined #ruby
Akagi201_ has quit []
Timgauthier has joined #ruby
Timgauthier is now known as timgauthier_away
nagaraj has quit [Ping timeout: 240 seconds]
SCHAAP137 has quit [Remote host closed the connection]
nagaraj has joined #ruby
SCHAAP137 has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
Alina-malina has joined #ruby
timgauthier_away is now known as Timgauthier
techsethi has joined #ruby
arup_r_ has joined #ruby
surs has joined #ruby
sptx00 has joined #ruby
arup_r has quit [Ping timeout: 256 seconds]
koderok has joined #ruby
ponga has quit [Remote host closed the connection]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Linuus has joined #ruby
Photism has joined #ruby
mkaesz has joined #ruby
maasha has joined #ruby
quimrstorres has joined #ruby
koderok has quit [Client Quit]
jusmyth has joined #ruby
Aswebb has quit [Remote host closed the connection]
<maasha>
Hi, do we have a smart way to determine the common longest prefix between a stack of strings?
QKO has joined #ruby
Linuus has quit [Ping timeout: 255 seconds]
francisfish has quit []
kobain has joined #ruby
AlexRussia has joined #ruby
<hiyansa>
why is it every time i type linus in google the first result is linus torvalds?
<godd2>
It might be personalized results?
<workmad3>
hiyansa: which other linus would you like? :)
<xfz>
hiyansa: were you expecting pictures of your cat linux as top result?
<tobiasvl>
are there any other linuses who are more well-known?
<xfz>
linus*
Spami has joined #ruby
<godd2>
you can have google give you general results by clicking the little globe on the top left
<hiyansa>
yes linus is a misspelling if sinus
<xfz>
which globe are you talking about godd2?
<hiyansa>
you get dyslexic and type l instead of s
<godd2>
tobiasvl linus from peanuts?
<hiyansa>
they're both on your ring fingers
rzsd has joined #ruby
<workmad3>
hiyansa: unfortunately, people also legitimately search for linus as it's the name of a well-known figure
<hiyansa>
linus in google should say "did you mean sinus"
<godd2>
xfz the little globe next to the gear icon after you search something
arup_r has joined #ruby
<hiyansa>
workmad3: why would you search for linus torvalds?
<xfz>
I have the gear icon, but no globe
<hiyansa>
that seems pretty stupid
<tobiasvl>
godd2: yeah, maybe. almost all images are of the peanuts character though
claptor has quit [Quit: this channel is bakas]
<godd2>
xfz are you logged in?
<workmad3>
hiyansa: are you just trolling now? :P
<hiyansa>
no
dazeddev_ is now known as dazeddev
<godd2>
it might only be if you're logged into a google service
<godd2>
that must be why
<xfz>
I am logged in
<hiyansa>
i'm serious, if you have a sinus problem it's a google search away from fixing it, i never heard of anyone having a linus problem
arup_r_ has quit [Ping timeout: 250 seconds]
<workmad3>
hiyansa: 'did you mean linux problem?'
livingstn has joined #ruby
DLSteve has joined #ruby
tokik has quit [Ping timeout: 245 seconds]
<workmad3>
godd2: top-right, not top-left (and my globe is grayed out)
<xfz>
godd2: can I send you a screenshot?
<godd2>
did I say top left?
<rzsd>
I noticed a strange problem when creating a Rakefile. If for a particular task i give the description as desc "foo.bar" then the description appears correctly when i run rake -T as # foo.bar. But if i enter the description as desc "foo. bar", then only # foo shows up when in run rake -T
<workmad3>
godd2: you did indeed ;)
<godd2>
Im a dummy
<godd2>
top right
jespada has joined #ruby
Takle has quit [Read error: Connection reset by peer]
<rzsd>
what could be the reason for that ?
rkalfane has joined #ruby
Aswebb has joined #ruby
<hanmac1>
maasha: what do you think of that:
<hanmac1>
>> a = ["aaaaa", "aaaab", "aaabc"]; a.first.chars.inject("") {|o, c| break o unless a.all?{|s| s.start_with?(o + c)}; o + c}
<shevy>
This project is epic! If that many other packages are referencing it, it must be good and useful. Shame on you if you don't know this project. As a Ruby dev this is a must have on your resume!
<shevy>
cool propaganda Kool-Aid
rockdon has joined #ruby
<shevy>
it's an interesting statistics though
<shevy>
useful for network graphs like your thingy hanmac1
siaw has joined #ruby
TPBallbag has joined #ruby
sski has joined #ruby
<hanmac1>
hm what do you mean?
Abhijit has joined #ruby
fabrice31 has joined #ruby
baweaver has quit [Read error: Connection reset by peer]
<siaw>
x = 1 and x++ give 2, but then later x gives 1 again, why?
hiyansa has quit [Ping timeout: 246 seconds]
<siaw>
x = 2, x++ gives 4, again why? :D how the the “++” work in ruby?
<hanmac1>
siaw: in what language, because "x++" is not valid in ruby ?
<workmad3>
siaw: ruby doesn't support x++
Guest1882 has joined #ruby
<tobiasvl>
siaw: ruby doesn't have ++
baweaver has joined #ruby
sailias has joined #ruby
<DefV>
what hey said ^^
avr has quit [Quit: this channel is bakas]
<siaw>
tobiasvl: i know it’s not valid, so then i should get an error, no?
baweaver has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<hanmac1>
siaw no because "2 ++ 4" is valid
panini_ has quit [Ping timeout: 250 seconds]
<workmad3>
siaw: hmm... did you do (in irb) 'x = 2<return> x++ <return> x'?
<workmad3>
siaw: because if so, that would get parsed as 'x = 2; x + +x'
<siaw>
workmad3: yes
<workmad3>
siaw: and no output between x++ and x
<tobiasvl>
if you do `x++ <return>` in irb you see that it's still waiting for input
<workmad3>
^^
<tobiasvl>
the statement isn't done
Guest96162 has joined #ruby
<workmad3>
siaw: basically, you did 'x + x' without storing the result ;)
<siaw>
tobiasvl: i see it :D
<siaw>
and why is 4++5 valid?
<workmad3>
siaw: 4 + +5
samsquanch has joined #ruby
apeiros_ has quit [Ping timeout: 240 seconds]
<siaw>
even 4+++3 works
<siaw>
hahahha this is very funny
<workmad3>
4 + +(+3)
<tobiasvl>
+5 is the positive integer 5
<siaw>
it’s actually useless
<tobiasvl>
not very weird
<tobiasvl>
4+-5 also works
<siaw>
5++++++++++++++++4 works
<tobiasvl>
4 + -5
<siaw>
makes no sense!
<tobiasvl>
sure it does
<tobiasvl>
+ is both the addition operator, and the unary prefix for positive numbers
panini_ has joined #ruby
<tobiasvl>
just like in… math
<shevy>
hanmac1 you have some ruby code that draws a graphic
<workmad3>
siaw: makes perfect sense... +5 is valid ruby, and evaluates to 5... so ++5 is valid and evaluates to +(+5) which is +(5), so 5
<siaw>
workmad3: i see
<siaw>
interesting
<mostlybadfly>
Hallo
<workmad3>
siaw: or, in other words, + is a unary method in ruby, syntax sugar for 5.+@() (weird syntax, but hey, what you gonna do? :) )
<hanmac1>
shevy currently i am drawing no graphs ... hm but i might write something for making Graphs in wx itself
yfeldblum has quit [Ping timeout: 264 seconds]
apeiros_ has joined #ruby
<workmad3>
siaw: so you can chain it as a prefix as much as you want... it'll just keep on doing 'x.+@().+@().+@()...'
<workmad3>
hanmac1: yeah, I was testing in irb before typing here for once ;)
Guest96162 is now known as psycho_one
<workmad3>
hanmac1: the () is essential for the call though, at least in my testing
<hanmac1>
i know that you define it with +@ but i didnt know you could also call it like that
gccostabr has quit [Quit: ZZZzzz…]
<workmad3>
hanmac1: fun, eh? :)
iamninja has quit [Remote host closed the connection]
<shevy>
eam would now complain that the ruby parser itself is way too complex
<workmad3>
hanmac1: I figured that as you can do 'def +@' to define it, +@ must be a valid method identifier... therefore you should be able to use it as .+@()
<workmad3>
well, method name in the parser, rather than method identifier
<hanmac1>
apeiros Guest1882 spam
moritzs has joined #ruby
<workmad3>
as eam pointed out yesterday, pretty much anything is a valid method identifier once you bypass the parser :)
<shevy>
apeiros help!
alexherbo2 has quit [Quit: WeeChat 1.0.1]
<shevy>
yeah by using send
emiemia has joined #ruby
emiemia has quit [Remote host closed the connection]
<shevy>
and define_method
bluOxigen has joined #ruby
<siaw>
shevy: better use “public_send” :P
<shevy>
dunno
<shevy>
send is shorter
<shevy>
:)
<workmad3>
siaw: same principle still applies ;)
<shevy>
no actually
<shevy>
I won't define methods called ''
mengu has joined #ruby
mengu has joined #ruby
<shevy>
and I won't invoke them either via .send '' nor .public_send ''
hamakn has quit [Remote host closed the connection]
<canton7>
is something wrong with it?
<shazaum>
undefined method `[]' for nil:NilClass (NoMethodError)
sailias has quit [Quit: Leaving.]
pwh has quit [Ping timeout: 255 seconds]
<workmad3>
shevy: how about 'class Fixnum; INFINITY = "Infinity"; def א₀; INFINITY; end; end'? ;)
iamninja has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
Jake232 has joined #ruby
AlexRussia has quit [Quit: WeeChat 1.1-dev]
Xeago has joined #ruby
User458764 has quit [Ping timeout: 264 seconds]
AlexRussia has joined #ruby
nonks_ has joined #ruby
pwh has joined #ruby
<workmad3>
shevy: hmm, lunch time
<workmad3>
oh, didn't mean to direct that...
<workmad3>
sorry shevy :)
banister has joined #ruby
<shevy>
hey I am still stuck on your first sentence anyway
<shevy>
but thankfully I assume you used some Unicode characters
<shevy>
so I can't decipher it anyway ... hahaha
<shevy>
א₀
<workmad3>
shevy: yeah... I created an aleph-null method on fixnum
n1lo has quit [Quit: Leaving]
<workmad3>
shevy: I should really have made it a class method, so you could do 'Fixnum::א₀' for constant-like access :)
SOLDIERz_ has joined #ruby
oo_ has quit [Remote host closed the connection]
nonks_ has quit [Ping timeout: 250 seconds]
<shevy>
ewww
eguneys has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
<workmad3>
shevy: you don't think the integers deserve their own Infinity? :(
<eguneys>
does ruby have some nice libraries for Functional Reactive Programming, similar to Bacon.js I've seen Rx.rb and Frappucino but they lack documentation.
Aswebb has quit [Remote host closed the connection]
<soahccc>
shevy: awesome_print not only does colors ;)
moritzs has quit [Ping timeout: 245 seconds]
BTRE has quit [Ping timeout: 255 seconds]
<shevy>
it also does cats
<shevy>
and phones your local pizza restaurant
postmodern has quit [Read error: Connection reset by peer]
<shevy>
now I am hungry
<shevy>
thanks soahccc :(
<soahccc>
And I thought in PHP there would be only what we call Hash
<shevy>
php kinda merged it all together
<shevy>
it's a melting pot language, with 100 different cooks
<soahccc>
shevy: I'm also hungry :(
<shevy>
you can have salt AND sugar
<roger_rabbit>
people using PHP *smoke* Hash
<shevy>
and one cook always spits into the soup
<soahccc>
only have coffee and cigarettes
<shevy>
I hate cigarettes
<shevy>
why can't it smell good?
mary5030 has joined #ruby
<soahccc>
you just need the right ingredients :>
spyderman4g63 has quit [Read error: Connection reset by peer]
<athan>
Should this be done without the parenthesis? `redirect_to ("/thank-you&p=" + p params[:prequalify][:endorser])`
<shevy>
well, ganja has this awful sweet smell. it's better than normal cigarettes but still not good
spyderman4g63 has joined #ruby
mary5030 has quit [Remote host closed the connection]
<shevy>
dunno athan
jonr22 has quit [Ping timeout: 245 seconds]
<havenwood>
athan: you don't mean that `p` to be in there?
<shevy>
but please don't add a ' ' before the () anyway
<athan>
havenwood: I thought it printed stuff to strings :(
mary5030 has joined #ruby
<waxjar>
athan, i think you want to use string interpolation
<soahccc>
So should DNS or rubygems die again, now I've got a mirror :) Not as big as I thought
<shevy>
either do foo('args') or foo 'args' but please no foo ('args')
<athan>
waxjar: This is really just for debugging purposes lol
<shevy>
athan it outputs, but in this case here you want to return, not print/puts
<athan>
it's my hack-jobbed printf
<waxjar>
(foo ('args'))
<sevenseacat>
foo ('args') isnt even valid
shock_one has joined #ruby
noop has quit [Ping timeout: 250 seconds]
<shevy>
LISP ATTACK!!!
shortCircuit__ has quit [Remote host closed the connection]
<athan>
:O!
<sevenseacat>
soahccc: how big?
<soahccc>
sevenseacat: Want to take a guess?
Hijiri has quit [Quit: WeeChat 1.0.1]
<athan>
ahhh okay
* sevenseacat
gets mind out of gutter
<sevenseacat>
i dunno, maybe 100GB/
<shevy>
:>
<shevy>
I say 20GB!
shock_one has quit [Remote host closed the connection]
shock_one has joined #ruby
<waxjar>
sevenseacat: why wouldn't that be valid?
<shevy>
soahccc the one to guess correctly wins a prize yes?
<shock_one>
Hi. Does anybody know how to do HTTPS requests through a HTTP CONNECT tunnel in Ruby? For example, there is a linux tool for that, but I can't find a gem or something. http://www.agroman.net/corkscrew/
<soahccc>
Hanmac1: they obviously don't know scrubs over there
dblessing has joined #ruby
tylersmith has joined #ruby
rshetty has joined #ruby
econerd4ever has joined #ruby
renier has quit [Ping timeout: 240 seconds]
Jello_Raptor has joined #ruby
robertt_dex has joined #ruby
gsd has joined #ruby
lucyinthesky has left #ruby ["Leaving"]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
jusmyth has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
hanmac1 has quit [Quit: Leaving.]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
perrier has quit [Remote host closed the connection]
Seich has quit [Ping timeout: 258 seconds]
perrier has joined #ruby
rippa has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
shtirlic has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
CustosL1men has joined #ruby
Seich has joined #ruby
lpaste has joined #ruby
devoldmx has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
<gregf_>
fg
<gregf_>
damn :/ sorry
banister has joined #ruby
kalleth_ has quit [Ping timeout: 258 seconds]
banister has quit [Max SendQ exceeded]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
devyn has quit [Ping timeout: 256 seconds]
banister has joined #ruby
linojon has joined #ruby
banister has quit [Max SendQ exceeded]
kalleth has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister has joined #ruby
devoldmx has quit [Remote host closed the connection]
banister has quit [Max SendQ exceeded]
shock_one has quit [Quit: Be back later ...]
maestrojed has joined #ruby
jusmyth has quit [Quit: Leaving.]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
alex88 has joined #ruby
<shevy>
athan well haskell is on another level than php; also I don't really feel haskell belongs into the scripting family languages php/python/ruby/perl
banister has joined #ruby
banister has quit [Max SendQ exceeded]
spyderman4g63 has quit [Remote host closed the connection]
Jake232 has joined #ruby
<athan>
shevy: There's shelly... :P
banister has joined #ruby
banister has quit [Max SendQ exceeded]
<athan>
for super high performance
banister has joined #ruby
banister has quit [Max SendQ exceeded]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
psy_ has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: zzz]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
karmatr0n has joined #ruby
rzsd has quit [Remote host closed the connection]
spyderma_ has joined #ruby
FooMunki_ has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
gccostabr has joined #ruby
momomomomo has joined #ruby
klmlfl has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
lucyinthesky has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
klmlfl has quit [Remote host closed the connection]
kapil__ has quit [Quit: Connection closed for inactivity]
psy_ has joined #ruby
jrochkind has joined #ruby
<jrochkind>
Hmm, in ruby 2.1, #clone seems to no longer copy singleton methods, when in ruby 1.9 it did. Does that make sense?
spyderma_ has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
snath has quit [Ping timeout: 244 seconds]
<apeiros_>
>> x = ""; def x.bar; "bar!"; end; y = x.clone; [RUBY_VERSION, y.bar]
<apeiros_>
are you talking about a custom class which fails to properly implement its own #clone?
einarj has quit [Read error: Connection reset by peer]
einarj has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
freerobby has quit [Quit: Leaving.]
sambao21 has joined #ruby
gccostabr has quit [Quit: ZZZzzz…]
<mikecmpbll>
what's a good pattern for finding the legnth of a longest sequence of repeated items in an array?
rshetty has quit [Remote host closed the connection]
drager has quit [Changing host]
drager has joined #ruby
<mikecmpbll>
[1,2,2,2,4,2,1,5,3,1,3,5] would return 3, for instance.
<mikecmpbll>
(sequence of 3 number 2's is the longest)
AFKGeek has quit [Quit: Fades into the shadows]
<shevy>
huh
<mikecmpbll>
i shouldn't have used numbers.
<shevy>
oh you mean, highest count for n entries?
<shevy>
because you have 3x 2 in there
<mikecmpbll>
i think so?
<shevy>
the simple way is to use a hash and count up inside of it
preyalone has joined #ruby
BTRRY has joined #ruby
BTRE has quit [Ping timeout: 250 seconds]
<mikecmpbll>
hold on, just remembered a method which might be useful.
<jrochkind>
apeiros: okay, thanks! That's the (opposite of) confirmation I needed, I will hunt my bug better. something odd is going on.
<jrochkind>
apeiros: it is not a custom class that fails to implement it's own clone. In this case it's an array that has some singleton methods added to it. I am getting test failures on 2.1 but not 1.9.3 that look like the singleton methods weren't copying after a clone, but I will investigate further (or change my design to be less confusing and not use singleton methods!)
klmlfl has joined #ruby
larissa has joined #ruby
sambao21 has quit [Ping timeout: 240 seconds]
devoldmx has joined #ruby
<apeiros_>
mikecmpbll: each_cons(2) + memo should work fine
rageberry has joined #ruby
athan_ has joined #ruby
<mikecmpbll>
ooh, each_cons..
<apeiros_>
well, needs 2 memos. longest and current run.
econerd4ever has quit [Remote host closed the connection]
<arup_r>
shevy: That's a good book I heard... Not for beginners..
kalleth has quit [Quit: No Ping reply in 180 seconds.]
nonks_ has quit [Ping timeout: 250 seconds]
<NGC3982>
So, i'm installing subbot (https://github.com/paradox460/subbot) and i'm at the step where i should install it with "bundle install". When executing the command it tells me that my account is not valid, and to use "--path vendor/bundle" together with bundle install.
StoneCypher has joined #ruby
<NGC3982>
When i do, i get an error message i'm having trouble googling.
<NGC3982>
And i'm currently following the thread instructions.
<jheg>
I less than clueless regarding hosted your own ruby apps but should it jus be a case of uploading the sinatra project from my local dir to my server and it will work?
almostworking has left #ruby [#ruby]
Seich has joined #ruby
<havenwood>
NGC3982: instead, install ruby1.9-dev and try again
<NGC3982>
Oh, allright.
bMalum has joined #ruby
fabrice31 has quit [Remote host closed the connection]
<jhass>
jheg: maybe they installed passenger? describe your host
<centrx>
kyle__, .sort returns a new Hash with a new insertion order
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mkaesz has quit [Ping timeout: 245 seconds]
<havenwood>
kyle__: Hashes are ordered.
gccostabr has quit [Quit: ZZZzzz…]
<kyle__>
centrx: Humm. With a small enough dataset that won't be too painful..
<kyle__>
havenwood: any way to do it other than on insertion order though?
Soda has quit [Remote host closed the connection]
<havenwood>
kyle__: see my example above
xymbol has joined #ruby
<kyle__>
havenwood: That's creating a new hash, with a new insertion order like centrx said. My understanding with other sorts, like the Array.sort!, is that it's in place, and not duplicating the entire datastructure.
<havenwood>
kyle__: are you having performance problems?
<kyle__>
havenwood: Not on the current dataset, but some that I have to work on are big enough that I could see them having problems.
<havenwood>
kyle__: sounds like premature optimization
alex88 has quit []
<havenwood>
kyle__: try the big ones
alex88 has joined #ruby
rshetty has quit [Remote host closed the connection]
alex88 has quit [Client Quit]
dcunit3d has quit [Ping timeout: 264 seconds]
alex88 has joined #ruby
rshetty has joined #ruby
<kyle__>
havenwood: In this case I don't think it really is premature. Besides, my origonal question was if there was the functionality inside of pretty_generate already, so I woulnd't be re-implementing something in the standard libraries.
<kyle__>
:)
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
roolo has joined #ruby
<jheg>
jhass: doesn’t look like passenger is installed
roolo_ has quit [Read error: Connection reset by peer]
<jheg>
and when I try to install sinatra from cPanel I get following error:
<centrx>
in-place sort! is not that much of a perf gain, as the duplicating sort is only duplicating the hash structure, not duplicating every single element in the hash
<jheg>
ERROR: While executing gem ... (OptionParser::InvalidOption)
<jheg>
invalid option: -y
CustosL1men has quit [Ping timeout: 272 seconds]
<jhass>
cpanel... there's your issue :P
<NGC3982>
havenwood: Neat. Thanks. Though, i have some new issues (that i do not know if they are ruby related.
renderful has joined #ruby
<havenwood>
kyle__: how is it not premature if you've run into no problems? you're questioning what Ruby is doing under the hood without need.
<jhass>
jheg: so you can control the configuration of whatever is serving port 80 and you can ssh in?
<havenwood>
kyle__: drop your assumptions. test it on the big data and if no problems stop trying to backbend.
<jheg>
there is a gem install option in cP and I /could/ ssh in if I knew how
<NGC3982>
The readme for subbot tells me to "bundle install" which works without error when installing 1.9.1-dev. Although, when executing "rake db:create" i get: "Could not find i18n-0.6.5 in any of the sources". I can see in the bundle install output that "Using i18n 0.6.5".
<jheg>
I have a VPS and ssh is possible
<NGC3982>
Hm..
<kyle__>
Questioning is never the problem with premature optimzation. Implmeneting is. You question first to figure out if it's neccesary.
maestrojed has joined #ruby
<jhass>
apeiros: Guest1882 spams
<kyle__>
And I would argue a test is a type of question.
<arup_r>
jhass: Yes
<havenwood>
kyle__: I'd suggest using #sort and #sort_by until you run into any issues.
<arup_r>
that user gave me some link,. which I am trying to open, But couldn't open it..
Tricon has joined #ruby
<jhass>
jheg: then I'd suggest to get a supervisor of some sort, run the app with puma or something under it and reverse proxy to it
Aswebb has quit []
matti has quit [Changing host]
matti has joined #ruby
boombadaroomba has joined #ruby
gccostabr has joined #ruby
boombadaroomba has quit [Remote host closed the connection]
<havenwood>
kyle__: it may not be nearly as inefficient as you expect
lpaste has quit [Ping timeout: 258 seconds]
anaeem1_ has quit [Remote host closed the connection]
MatthewsFace has quit [Remote host closed the connection]
<marchtemp>
IceDragon: I see. thanks, I'll try that out
musicmatze1 has quit [Quit: WeeChat 0.4.3]
yfeldblum has joined #ruby
posixpascal has joined #ruby
<diegoviola>
would you agree to a company that part of their hiring process is for you to write some code within 24 hours?
Joufflu has quit [Ping timeout: 258 seconds]
<oleo>
no
musicmatze has joined #ruby
wallerdev has joined #ruby
<oleo>
too optimistic.....
<oleo>
it maybe possible but certainly not always....
<oleo>
or for everyone.....
Crazy_Atheist has quit [Read error: Connection reset by peer]
<workmad3>
diegoviola: kinda depends on what the code is
jobewan has joined #ruby
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
GeorgesLeYeti has quit [Quit: Leaving]
patrick99e99 has quit [Ping timeout: 255 seconds]
abuzze_ has joined #ruby
<marchtemp>
most companies make you code during the inteviews or make you demo a project.
yfeldblum has quit [Ping timeout: 250 seconds]
<marchtemp>
diegoviola: maybe I misunderstood the question but barely anyone gets hired without writing code nowadays
siaw has joined #ruby
<diegoviola>
marchtemp: I was referring to companies that make you code during interviews, or as part of the hiring process
Hobogrammer has joined #ruby
Abhijit has quit [Remote host closed the connection]
<IceDragon>
diegoviola: puts 'Hello World'; # can I have the job now?
<marchtemp>
diegoviola: I'd be concerned to join a company that doesn't do it
oleo is now known as Guest96728
oleo__ has joined #ruby
alex88 has quit []
abuzze has quit [Ping timeout: 245 seconds]
<shevy>
shall I name files like so: foobar?.rb
oleo__ has quit [Remote host closed the connection]
siaw has quit [Client Quit]
MatthewsFace has joined #ruby
nkumari has joined #ruby
livathinos has joined #ruby
livathinos has quit [Client Quit]
<waxjar>
why would you do that
uber_hulk has joined #ruby
Guest96728 has quit [Ping timeout: 256 seconds]
<jhass>
you're still asking that?
<shevy>
waxjar to name them after a method name
oleo__ has joined #ruby
troyready has quit [Quit: Leaving]
oleo__ is now known as oleo
jerius has quit [Remote host closed the connection]
<IceDragon>
shevy: foobar?.rb -> is_foobar.rb
FooMunki_ has quit [Quit: FooMunki_]
jerius has joined #ruby
<marchtemp>
IceDragon: foobarp.rb, make it clispy!
sevvie has joined #ruby
* IceDragon
adds ketchup to foobarp.rb
<shevy>
IceDragon well that would also be a violation
sevvie has quit [Client Quit]
<shevy>
like calling it foobar.rb when the method name would not be foobar exactly
mikepack has quit [Remote host closed the connection]
pengin has joined #ruby
uber_hulk has quit [Read error: Connection reset by peer]
<arup_r>
shevy: Do you do TDD ?
uber_hulk has joined #ruby
rshetty_ has joined #ruby
ponga has quit [Quit: Leaving...]
fabrice31 has joined #ruby
randomguy123 has joined #ruby
<shevy>
arup_r don't think so, depends on what you mean with TDD. if you mean write tests first, then code, then nope
randomguy123 is now known as randomguy321
<randomguy321>
Would you believe it, randomguy123 is a registered nickname...
centrx has quit [Quit: Did gyre and gymble in ye wabe]
last_staff has quit [Remote host closed the connection]
mjuszczak has joined #ruby
rshetty has quit [Ping timeout: 256 seconds]
TPBallbag has joined #ruby
dts is now known as tcs
tcs is now known as dts
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
troyready has joined #ruby
<terrellt>
What
<shevy>
lol
dumdedum has quit [Quit: foo]
davedev24_ has quit [Ping timeout: 264 seconds]
<terrellt>
Who's naming their files based on methods? Is there a joke I missed?
TheNet has joined #ruby
shvelo has quit [Ping timeout: 240 seconds]
athan_ has quit [Quit: Leaving]
<diegoviola>
workmad3: a sample rails app
<diegoviola>
a small one
fabrice31 has quit [Ping timeout: 272 seconds]
<randomguy321>
Anyway, I use Ruby primarily for running SASS, Compass, and other development tools. I'm running Ubuntu 14.04.1 and from the official repos, I can install 1.9.3.4. This seems to be a recommended way of installing Ruby on Ubuntu; however, I get the impression that alternatives such as rvm are far more flexible. What's the most common method that Ruby devs use for installing/managing Ruby? Thanks!
eichenwald1 has quit [Quit: WeeChat 1.0.1]
davedev24_ has joined #ruby
<workmad3>
diegoviola: how small ;)
<randomguy321>
Also, Ruby 2 isn't available in official Ubuntu repos, and I'm wondering if I even need it.
<waxjar>
randomguy321: if you just need one version of ruby, just using your package manager is fine
nkumari has quit [Remote host closed the connection]
havenwood has quit []
nkumari has joined #ruby
<waxjar>
rvm/rbenv/chruby are convenient if you want to be able to use multiple versions of ruby
<terrellt>
randomguy321: rbenv/chruby/rvm are good for switching ruby versions. If you're using development tools they're probably not locked to 2.x yet.
nastri has quit [Remote host closed the connection]
posixpascal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<workmad3>
randomguy321: I personally use chruby and ruby-install... if you want to use a single version + package manager and want ruby2+, you could use the brightbox PPA
<diegoviola>
workmad3: 3-4 controllers/models, some views...
pengin has quit [Remote host closed the connection]
pengin has joined #ruby
<randomguy321>
Okay, thanks for your advice everyone.
redjack1964 has quit [Remote host closed the connection]
<workmad3>
diegoviola: hmm... depending on how complete they wanted that, I'd say it was probably a bit of a push for 24 hours... especially if they were interviewing people that already had jobs
ghr has joined #ruby
moritzs has joined #ruby
<diegoviola>
right
<workmad3>
diegoviola: the last time I had a job interview that included an offline development task, it was a series of tasks for an existing code-base and had about 3-4 days to do as much as could (iirc, I got everything but one task done on it... that last task, I got part-done, and put a note in my response saying I got to that point but had a bug I couldn't squash)
raja has joined #ruby
<workmad3>
diegoviola: end of the day, it's their perogative to set up their assessment process any way they want, and it's your perogative to tell them to take a long walk off a short cliff ;)
klmlfl has quit [Ping timeout: 250 seconds]
<workmad3>
anyway, must go... hf all
<diegoviola>
workmad3: interesting
raja has quit [Max SendQ exceeded]
<arup_r>
workmad3: made his work 3 times perfectly...
<terrellt>
The minimal ruby framework piece makes it a little more time consuming.
raja has joined #ruby
mikepack has joined #ruby
jimms has quit []
gccostabr has joined #ruby
ghr has quit [Ping timeout: 252 seconds]
raja has quit [Max SendQ exceeded]
jonr22 has joined #ruby
mikedugan has joined #ruby
raja has joined #ruby
jherbst has joined #ruby
beef-wellington has quit [Ping timeout: 252 seconds]
<mikedugan>
'ello, are module directories camelCase ala classes?
<randomguy321>
For a random tool (such as Compass), how can I check which version of Ruby the tool is built for? I know I can check the .travis.yml file in the repo and see which versions the code is tested against, but this doesn't seem like a "canonical" way of checking this (e.g. perhaps the tool isn't tested or something).
<mikedugan>
s/camel/snake_case
raja has quit [Max SendQ exceeded]
quimrstorres has quit [Remote host closed the connection]
<IceDragon>
randomguy321: as far as I know, they either put it in the README or you hope for the best..
gccostabr has quit [Client Quit]
<IceDragon>
Usually anything built for 1.9 will work with >= 1.9
raja has joined #ruby
triple_b has joined #ruby
<randomguy321>
IceDragon: Ah, okay, thank you.
workmad3 has quit [Ping timeout: 252 seconds]
dramalho has quit [Ping timeout: 256 seconds]
raja has quit [Max SendQ exceeded]
raja has joined #ruby
sinequanon has joined #ruby
jottr_ has joined #ruby
larissa has joined #ruby
raja has quit [Max SendQ exceeded]
doodlehaus has quit [Ping timeout: 258 seconds]
moritzs has quit [Ping timeout: 255 seconds]
raja has joined #ruby
jonr22 has quit [Ping timeout: 264 seconds]
commmmodo has joined #ruby
jrochkind has left #ruby [#ruby]
bayed has quit [Quit: Connection closed for inactivity]
<dotix>
crack_user, is there any way to check where Magick-config is?
<dotix>
For example in Debian you do: dpkg --search Magick-config
<dotix>
and because I'm running sid I got Magick-config in: libmagickcore-6.q16-dev:amd64: /usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/Magick-config
Seich has quit [Max SendQ exceeded]
ptrrr has quit [Quit: ptrrr]
rshetty has joined #ruby
bluenemo has quit [Quit: Verlassend]
<dotix>
usually should be in /usr/bin/Magick-config ... now imagine if I had that in my PATH.
<shevy>
crack_user many ways. I do this when everything else fails:
<dotix>
Try to find where is localized and add it in your PATH, I'm pretty sure is not there
<shevy>
find / -name Magick-config
<shevy>
locate is faster tho
<dotix>
locate is indexed right?
<shevy>
yeah, the database can be updated via "updatedb"
<dotix>
try to run find with sudo
sambao21 has quit [Quit: Computer has gone to sleep.]
<shevy>
crack_user you use a BSD base system, come on man, you can do it :)
acmehandle has joined #ruby
<gr33n7007h>
a ah, shotgun can never remember that gem
Seich has joined #ruby
<dotix>
:D
<gr33n7007h>
slingshot 707
sambao21 has joined #ruby
jespada has quit [Quit: Leaving]
ghr has joined #ruby
havenwood has joined #ruby
rshetty has quit [Ping timeout: 256 seconds]
nkumari has quit [Remote host closed the connection]
pietr0 has quit [Quit: pietr0]
ConstantineXVI has joined #ruby
lkba has joined #ruby
djbkd has joined #ruby
rpag has joined #ruby
Seich has quit [Max SendQ exceeded]
thumpba_ has joined #ruby
samuel02 has joined #ruby
Seich has joined #ruby
nkumari has joined #ruby
Crazy_Atheist has quit [Quit: WeeChat 1.0.1]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
ghr has quit [Ping timeout: 244 seconds]
lucyinthesky has left #ruby ["Leaving"]
lolmaus has joined #ruby
klmlfl_ has joined #ruby
klmlfl_ has quit [Remote host closed the connection]
klmlfl has quit [Read error: Connection reset by peer]
sklik has joined #ruby
narcan has joined #ruby
klmlfl has joined #ruby
Or1on has joined #ruby
<gee_totes>
hmm.. i'm still confused on how i can set a variable on my parent class from a subclass
xaxisx has quit [Quit: xaxisx]
tjbiddle has joined #ruby
<shevy>
gee_totes why would you want to do that
<gee_totes>
i'm still getting unitalized class varaible @@myvar in the parent class
<shevy>
gee_totes k initialize it in the parent?
goodenough has joined #ruby
davasaurous has joined #ruby
<gee_totes>
shevy: because i have a yaml config with different settings for each class
<shevy>
gee_totes you ought to initialize a class, otherwise it is dead weight
tjbiddle has quit [Client Quit]
<gee_totes>
but i want them to inherit from a parent class since most of them do the same thing
jimbach has quit [Remote host closed the connection]
poweratom_ has joined #ruby
<eam>
class systems are tools of oppressors
<shevy>
you can do that anyway right?
thumpba_ has quit [Ping timeout: 244 seconds]
ramfjord has joined #ruby
<shevy>
your subclass will contain only code and data that is different to the parent class
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aspires has joined #ruby
<gee_totes>
shevy: so i can't set a variable from the subclass on the parent class and tell it which part of the config to read?
<shevy>
huh
DarthGandalf has joined #ruby
<shevy>
your subclass will have the configuration right?
samuel02 has quit [Read error: Connection reset by peer]
godd2 has joined #ruby
xaxisx has joined #ruby
<shevy>
I am not sure why you keep on referring to the parent class
mikepack has quit [Remote host closed the connection]
<gee_totes>
i'm building a webscraper and there is a different class for each website, but the methods for visiting the urls are the same
<shevy>
your subclass already will have the data and methods and code associated with it; if you wish to restrict data, such as the config, then simply do so in an automatic way
<gee_totes>
and in the methods for visiting the urls, i want to check against a blacklist
davasaurous has quit [Ping timeout: 244 seconds]
<shevy>
right so you always have the method super available, and you can adjust all the methods and all the data of your subclass
davasaurous has joined #ruby
<jhass>
gee_totes: are we talking about an instance or the class itself
<gee_totes>
yes, i'm trying to pass they key for looking in the yaml file that defines the blacklist back up to the parent class
<gee_totes>
class instance
<jhass>
so
devyn has joined #ruby
<jhass>
if you have class P; end; class C < P; end; C.new
<jhass>
there's no instance of P
tjbiddle has joined #ruby
<jhass>
all the C < P does is making the methods of P available in C
TC` has joined #ruby
tjbiddle has quit [Client Quit]
<jhass>
therefore when talking about instances "setting in the parent class" is illogical
<gee_totes>
jhass: correct, and i'd like to pass a key back up to P so when i run P.visit_url, it knows which blacklist to check against
<jhass>
there's no up, there's no instance you could pass anything to
<twohlix_>
yea
<twohlix_>
you dont inherit from an instance
<gee_totes>
ok, then can i have P check for something in C?
mjuszczak has quit []
<jhass>
simply assume it's there
<shevy>
why would you even have to do it
<shevy>
you have C - all that P can do C can do
<jhass>
call a method or set an @instance_var
<twohlix_>
I dont think you quite get inheritance gee_totes
mjuszczak has joined #ruby
roolo has joined #ruby
<godd2>
"Anything P can do C can do better!"
<gee_totes>
twohlix_ nope, probabaly not
<shevy>
gee_totes the subclass is a specialization
<twohlix_>
jhass that was directed at P checking a variable in C
crack_user has quit [Quit: Leaving.]
oleo has quit [Quit: Verlassend]
<jhass>
in an more explicit language you would define that instance variable in the parent, the child would just set its value
<twohlix_>
unless you get into abstract classes, a parent shouldnt implement some method whose execution depends on a child declaring some variable
pauly_oc has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<twohlix_>
yea
<jhass>
this is still the case here
<gee_totes>
twohlix_ you are correct, i didn't quite relalize that once C was made, it would have no idea of what P is and all the variables would be accessable all the same
<twohlix_>
exactly
mjuszczak has joined #ruby
quimrstorres has joined #ruby
<jhass>
since it's implicit, you just assume it's there
<gee_totes>
jhass yup, that's the part i didn't get
<benzrf>
inheritance tends to be terrible unless a hierarchical taxonomy is incredibly obvious
<jhass>
that assumption makes its definition in the parent
roolo has quit [Ping timeout: 264 seconds]
<gee_totes>
yay my poor understanding of OOP making things more complicated for everyone!
oleo has joined #ruby
gccostabr has quit [Quit: ZZZzzz…]
<gee_totes>
this is so much simpler now, thanks everyone!
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pietr0 has joined #ruby
ht__th has quit [Read error: Connection reset by peer]
pietr0 has quit [Client Quit]
timonv_ has quit [Remote host closed the connection]
<shevy>
\O/
<shevy>
benzrf it is just a specialization
claymore has quit [Quit: Leaving]
fabrice31 has joined #ruby
evanjs has quit [Remote host closed the connection]
<jhass>
I do agree though that gee_totes' P should most likely be a mix-in
kies has quit [Ping timeout: 272 seconds]
davasaurous has quit [Remote host closed the connection]
pietr0 has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
jenrzzz has quit [Ping timeout: 264 seconds]
bMalum has quit [Quit: bMalum]
checkit has quit [Ping timeout: 244 seconds]
dotix has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
<jhass>
or the Cs an attribute of P
sptx00 has quit [Remote host closed the connection]
davasaurous has joined #ruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gee_totes>
jhass: yes, i had a mixin setup for this, but i think i need to learn more before i can actually use it
<wallerdev>
i use angular day to day but ember looks interesting, thought id see what made it special :)
diego_ar has quit []
<wallerdev>
just watched the intro video
Sawbones_ has joined #ruby
Sawbones_ has quit [Client Quit]
<diegoviola>
when you use ember/angular in a rails app, do you just output json and do the views with ember/angular?
<diegoviola>
how does it work?
<wallerdev>
yeah the way our system works we our completely backend agnostic, the backend is just a json API we call from angular
<wallerdev>
are
rshetty has quit [Ping timeout: 244 seconds]
Guest1882 has quit [Ping timeout: 250 seconds]
momomomomo has joined #ruby
<wallerdev>
there's probably other ways to do it though
nonks_ has joined #ruby
poweratom_ has quit [Quit: Be back later ...]
<diegoviola>
makes sense
<diegoviola>
ty
poweratom__ has joined #ruby
<diegoviola>
I like that angular/ember pushes some work to the client-side, that way you distribute the load quite a bit
<wallerdev>
yeah it's pretty neat
<diegoviola>
don't have to reload/render the client all the time
<diegoviola>
right
<wallerdev>
i work on a mobile website which i think these frameworks excel with
Juanchito has quit [Quit: Connection closed for inactivity]
<diegoviola>
right
<mark06>
what's the .C and .W in rubocop?
<diegoviola>
I'll build an example app just to get familiar with and see how it goes
<diegoviola>
not sure if I should go with ember or angular first though
<wallerdev>
yeah thats what im doing, i have a small app i wrote in angular awhile back, gonna just try converting it to ember and maybe add some new features
crack_user has quit [Quit: Leaving.]
<diegoviola>
s/example/small/
<wallerdev>
angular definitely seems more popular from what ive seen
<wallerdev>
but i think if you know one you can pick up the other pretty quick
<diegoviola>
I'll build a small app in both and see how it goes