willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
akkad has quit [Excess Flood]
zenguy_pc2 has joined #ruby
ivanskie has joined #ruby
ivanskie has quit [Client Quit]
mozzarella has quit [Quit: WeeChat 1.2]
jso has quit [Ping timeout: 268 seconds]
mozzarella has joined #ruby
towski_ has joined #ruby
zenguy_pc has quit [Remote host closed the connection]
jso- has joined #ruby
zenguy_pc2 has quit [Client Quit]
<sp_>
hmm, bnagy.
Lucky__ has joined #ruby
bnizzle1 has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sp_>
as a neighbourly participant of pog, one would think you knew not to copypaste from Google directly.
<craysiii>
whats pog
northfurr has joined #ruby
RegulationD has quit [Ping timeout: 246 seconds]
simplyianm has quit [Remote host closed the connection]
prestorium has joined #ruby
akkad has joined #ruby
jesterfraud has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest6328 has quit [Changing host]
Guest6328 has joined #ruby
Guest6328 is now known as nitrix
jabreity has quit [Ping timeout: 268 seconds]
jabreity has joined #ruby
pawnbox_ has joined #ruby
armyriad has quit [Ping timeout: 268 seconds]
jesterfraud has joined #ruby
modern has quit [Ping timeout: 268 seconds]
alekst_ has quit [Ping timeout: 268 seconds]
cjk101010 has quit [Ping timeout: 268 seconds]
modern has joined #ruby
modern has quit [Changing host]
modern has joined #ruby
armyriad has joined #ruby
Lucky__ has quit [Ping timeout: 268 seconds]
SirFunk has quit [Ping timeout: 268 seconds]
chrisarcand has quit [Ping timeout: 268 seconds]
twistedpixels has quit [Ping timeout: 268 seconds]
chrisarcand has joined #ruby
cjk101010 has joined #ruby
twistedpixels has joined #ruby
alekst_ has joined #ruby
karapetyan has joined #ruby
SirFunk has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
matp has quit [Excess Flood]
JM_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nibbo has joined #ruby
matp has joined #ruby
karapetyan has quit [Ping timeout: 246 seconds]
opettaja has quit [Remote host closed the connection]
fullofcaffeine has quit [Read error: Connection reset by peer]
ruby-lang203 has joined #ruby
phutchins1 has joined #ruby
fullofcaffeine has joined #ruby
ta has joined #ruby
jesterfraud has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
moeabdol has quit [Ping timeout: 252 seconds]
ngscheurich has quit [Ping timeout: 240 seconds]
giuseppesolinas has joined #ruby
tkuchiki has joined #ruby
pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ndrei has joined #ruby
beauby_ has quit [Ping timeout: 252 seconds]
fullofcaffeine has quit [Read error: Connection reset by peer]
keen___________6 has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
ta has quit [Remote host closed the connection]
keen___________5 has quit [Ping timeout: 246 seconds]
fullofcaffeine has joined #ruby
sapslaj has joined #ruby
<EasyCo>
Hey team, say you were adding a method to the BigDecimal class in a PORO. How would you go about adding it in? Would you just create a file like big_decimal_addons.rb and require it where it's needed? Or perhaps just have an helpers.rb file and chuck it in there... I just can't decide one what looks less ugly.
swgillespie has joined #ruby
pharaoh2 has joined #ruby
_djbkd has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
ruby-lang203 has quit [Ping timeout: 246 seconds]
Pupp3tm4st3r has joined #ruby
TheWhip has joined #ruby
chouhoulis has joined #ruby
darkf has joined #ruby
northfurr has quit [Quit: northfurr]
shmilan has quit [Ping timeout: 246 seconds]
`tim` has joined #ruby
chouhoulis has quit [Ping timeout: 268 seconds]
nibbo has quit [Ping timeout: 240 seconds]
krz has quit [Ping timeout: 256 seconds]
<bnagy>
sp_: I am ashamed -__-
nibbo has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
jenrzzz has joined #ruby
karapetyan has joined #ruby
swgillespie has quit [Read error: Connection reset by peer]
swgillespie has joined #ruby
eminencehc has joined #ruby
willardg has joined #ruby
yfeldblum has joined #ruby
jesterfraud has joined #ruby
devoldmx has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
<cwong_on_irc>
i have a cookbook that has the attribute default['cookbook-name']['logs'] = ['/var/log/messages', '/var/log/mail.log']; in my other cookbook that include_recipe 'cookbook-name', can i append /var/log/secure to the logs array?
amystephen has quit [Ping timeout: 240 seconds]
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #ruby
l_tonz has joined #ruby
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bap1313 has quit [Ping timeout: 268 seconds]
alveric_ has quit [Remote host closed the connection]
tjohnson has quit [Quit: Connection closed for inactivity]
htmldrum has quit [Ping timeout: 260 seconds]
pawnbox has quit [Remote host closed the connection]
willardg has joined #ruby
shoutsid has quit [Remote host closed the connection]
pocketprotector- has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
benlieb has quit [Quit: benlieb]
shoutsid has joined #ruby
krz has joined #ruby
rushed has quit [Quit: rushed]
shoutsid has quit [Remote host closed the connection]
whilhelm has joined #ruby
milhouse` has joined #ruby
whilhelm has left #ruby [#ruby]
arup_r has joined #ruby
tmtwd has quit [Remote host closed the connection]
rushed has joined #ruby
RegulationD has joined #ruby
houhoulis has quit [Remote host closed the connection]
workmad3 has joined #ruby
phutchins1 has quit [Ping timeout: 264 seconds]
fullofcaffeine has quit [Ping timeout: 265 seconds]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
htmldrum has joined #ruby
dhjondoh has joined #ruby
fullofcaffeine has joined #ruby
wottam has joined #ruby
RegulationD has quit [Ping timeout: 260 seconds]
eminencehc has quit [Remote host closed the connection]
sanjayu has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
RobertBirnie has quit [Ping timeout: 240 seconds]
arup_r is now known as mrburied
tkuchiki has quit [Ping timeout: 265 seconds]
chrissonar has joined #ruby
RobertBirnie has joined #ruby
tkuchiki has joined #ruby
trautwein has joined #ruby
fullofca_ has joined #ruby
riotjones has joined #ruby
fullofcaffeine has quit [Read error: Connection reset by peer]
pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
KINGSABRI has quit [Remote host closed the connection]
datanoise has joined #ruby
Hounddog has joined #ruby
chouhoulis has joined #ruby
SenpaiSilver has joined #ruby
blaxter has joined #ruby
KINGSABRI has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 265 seconds]
<KINGSABRI>
exit
phatypus has quit [Quit: .>]
KINGSABRI has quit [Client Quit]
DoubleMalt has joined #ruby
huddy has joined #ruby
KINGSABRI has joined #ruby
datanoise has quit [Ping timeout: 255 seconds]
chouhoulis has quit [Ping timeout: 246 seconds]
tbp has joined #ruby
lubarch has joined #ruby
Technodrome has joined #ruby
<izzol>
Moin.
ledestin has quit [Ping timeout: 246 seconds]
<izzol>
Anyone is using Selenium in ruby?
<izzol>
I need to do lot of tests and I found Selenium project with selenium-webdriver gem.
ledestin has joined #ruby
<izzol>
I'm not sure if this is the best way to do it ;-)
jenrzzz has quit [Ping timeout: 250 seconds]
<jhass>
depends on the kind of tests you want to do
jokke has quit [Quit: WeeChat 1.3]
<jhass>
it's a quite slow way of testing
jokke has joined #ruby
workmad3 has joined #ruby
karapetyan has quit [Remote host closed the connection]
charliesome has joined #ruby
charliesome has quit [Client Quit]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
nofxx has quit [Ping timeout: 265 seconds]
mark2 has joined #ruby
nhhagen has quit [Remote host closed the connection]
<izzol>
jokke: yes, I just found the selenium-docker images. I think I will use it.
nhhagen has joined #ruby
<izzol>
sorry, jhass :-)
stan has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
mrburied has joined #ruby
tinyhippo has joined #ruby
Voker57 has joined #ruby
jokke has quit [Quit: WeeChat 1.3]
jokke has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
subshad has joined #ruby
OrbitalKitten has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
idefine has joined #ruby
gagrio has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby
TheWhip has quit [Remote host closed the connection]
blackmesa has joined #ruby
lipoqil has joined #ruby
Porfa has joined #ruby
TheWhip has joined #ruby
Pupp3tm4_ has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
djbkd has quit [Ping timeout: 264 seconds]
Pupp3tm4st3r has quit [Ping timeout: 240 seconds]
dEPy has quit [Ping timeout: 272 seconds]
grenierm has joined #ruby
jgt has joined #ruby
leafybasil has quit [Read error: Connection reset by peer]
amystephen has joined #ruby
leafybasil has joined #ruby
Senjai has joined #ruby
Technodrome has quit [Quit: Technodrome]
karapetyan has quit [Remote host closed the connection]
RegulationD has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
scottstamp has quit [Ping timeout: 265 seconds]
amystephen has quit [Ping timeout: 255 seconds]
solocshaw has joined #ruby
ndrei has quit [Ping timeout: 240 seconds]
TheWhip has quit [Remote host closed the connection]
Ropeney has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ndrei has joined #ruby
RegulationD has quit [Ping timeout: 255 seconds]
<tinyhippo>
I'm having trouble getting gitlab to use rvm... it keeps defaulting to the OS provided ruby release, is there a way I can make the rvm version the default for everything?
charliesome has joined #ruby
scottstamp has joined #ruby
<izzol>
tinyhippo: I think there was an option such as --default use.
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DEA7TH has quit [Client Quit]
bricker has joined #ruby
ta has joined #ruby
karapetyan has joined #ruby
BrazenBraden has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
bricker has quit [Ping timeout: 240 seconds]
Pupp3tm4_ has quit [Remote host closed the connection]
djbkd has joined #ruby
bnizzle1 has left #ruby [#ruby]
mollusk has joined #ruby
waheedi has left #ruby [#ruby]
<mollusk>
I am trying to do something some may find strange (or not). I am trying to call a function with a variable
<mollusk>
varName(args)
<mollusk>
the function is in another file with the same name as the variable I am trying to use
<mollusk>
I hope I described that well enough
djbkd has quit [Ping timeout: 250 seconds]
DEA7TH has joined #ruby
<certainty>
mollusk: so the code for the method resides in another file? And you have the name of that file in a variable. Also the name of the method is the same as the filename?
mrburied has quit [Ping timeout: 265 seconds]
<mollusk>
basically, I am iterating over an array of package manager names and passing them to 'which(''). Which then outputs for example 'pacman', which is stored into a variable called pkgMgr. so I want toput: pkgMgr(args)
leafybasil has quit [Read error: Connection reset by peer]
ndrei has quit [Ping timeout: 246 seconds]
<mollusk>
pecause in my pacman.rb file, there is a function called pacman
leafybasil has joined #ruby
<mollusk>
I will have other files, only with apt-get, dnf..etc
<certainty>
kind of a plugin system.
<mollusk>
I suppose
<KINGSABRI>
mollusk: there are things Selenium wont do it, so you can create your won html request and ask Selenium to interact with, I've needed that before
TheWhip has quit [Remote host closed the connection]
<mollusk>
the goal is to drop the rb file on a system and have it work as a wrapper for any package manager ont he fly
<certainty>
mollusk: if you change the implementation a bit and have classes instead of just methods in those file it boils down to derive the name of those classes, load the content and instantiate the object
<mollusk>
certainty, hmm, I need to get used to classes
<certainty>
mollusk: well it would be quite easy if you did :)
<mollusk>
certainty, from your example, it looks like if I made a class I can just deal with arrays in a much more robust manner.
<certainty>
you could also class_eval the content of the file and stuff, but the other approach looks better to me
Peg-leg has joined #ruby
rodfersou has joined #ruby
<certainty>
mollusk: the example just meant to show how you get to the constant from a string. Imagine you have a string "Pacman" and your file defines the class Pacman. You get a reference to that constant via Object.const_get which allows you to create an instance of that class
TheWhip_ has joined #ruby
wottam has quit [Ping timeout: 265 seconds]
<mollusk>
certainty, So I would have my class in pacman.rb instead of main.rb?
TheWhip has quit [Read error: Connection reset by peer]
<certainty>
then you just would have each of your implementation use a common interface like, idk, #call or something which you could use to kick of the actual work (what now resides in your single method)
<mollusk>
and just use the class from main?
minimalism has quit [Quit: leaving]
leafybasil has quit [Read error: Connection reset by peer]
terlar has quit [Ping timeout: 240 seconds]
TheWhip has joined #ruby
nfk|laptop has quit [Read error: Connection reset by peer]
it_tard has joined #ruby
TheWhip_ has quit [Ping timeout: 256 seconds]
<certainty>
mollusk: hold on. Let me put something together
<mollusk>
certainty, well thanks! Just getting into ruby which has a lot of short cuts for things it seems. A bit hard to wrap my head around.
leafybasil has joined #ruby
<mollusk>
I should also point out that I've not dedicated much time to a "real" programing language. All I have really done is shell scripts.
jenrzzz has joined #ruby
<mollusk>
while a lot of concepts are the same, shell scripting is not going to teach you ruby or some other general purpose language
<mollusk>
not even sure bash has classes
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<certainty>
now that i think of it the proxy isn't even needed. You can just load the actual implementation. Should be fine, so you don't have to do (understand) the method_missing stuff
<mollusk>
certainty, That's totally a better way of doing it
apfeluser has quit [Remote host closed the connection]
yfeldblum has joined #ruby
postmodern has quit [Quit: Leaving]
chouhoulis has joined #ruby
kirun has joined #ruby
Flyy7 has quit [Ping timeout: 264 seconds]
<mollusk>
yeah if I have a class, I can have an install function, a remove function and so on
roshanavand has quit [Remote host closed the connection]
<mollusk>
I really wish I didn't have to use system calls
roshanavand has quit [Remote host closed the connection]
<mollusk>
I guess for a wrapper it doesn't matter
herbst has quit [Remote host closed the connection]
<certainty>
yeah
roshanavand has joined #ruby
<certainty>
i'd split that up into methods in the pacman class. But apart from that. I guess you can build on the ideas. It all depends on what you're actually doing
<certainty>
also just in case. you're aware of puppet/chef/saltstack?
<mollusk>
but yeah there's a bunch of case statements which I would also like to get rid of with someting like optionparser, slop, tollop, or some other gem. I just have a hard time understanding how to use them the way I use case
<mollusk>
not aware of those
chouhoulis has quit [Ping timeout: 272 seconds]
blueOxigen has joined #ruby
<certainty>
being able to install packages without having to know which package manager is used has been solved in all of these systems
<certainty>
depending on what you do, it might already exist :)
datanoise has quit [Ping timeout: 250 seconds]
<certainty>
gotta get back to work. have fun :)
<mollusk>
Yeah there's tons of them, but I want to make something super modular in the end
<mollusk>
certainty, thanks
Wolland has joined #ruby
bluOxigen has quit [Ping timeout: 256 seconds]
TheWhip_ has quit [Ping timeout: 240 seconds]
TheWhip has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
ta has quit [Remote host closed the connection]
jenrzzz has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
Wolland has quit [Client Quit]
tomphp_ has joined #ruby
ndrei has joined #ruby
dEPy has joined #ruby
mrburied has joined #ruby
an0ma1y has quit [Ping timeout: 268 seconds]
TheWhip has quit [Ping timeout: 264 seconds]
TheWhip has joined #ruby
karapetyan has quit [Remote host closed the connection]
n008f4g_ has joined #ruby
karapetyan has joined #ruby
an0ma1y has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
TheWhip_ has joined #ruby
karapetyan has joined #ruby
Sembei has quit [Max SendQ exceeded]
TheWhip has quit [Read error: Connection reset by peer]
subshad has joined #ruby
karapetyan has quit [Remote host closed the connection]
krz has quit [Quit: WeeChat 1.2]
Sembei has joined #ruby
karapetyan has joined #ruby
lubarch has quit [Quit: leaving]
poguez_ has quit [Quit: Connection closed for inactivity]
TheWhip_ has quit [Ping timeout: 240 seconds]
dEPy has quit [Ping timeout: 260 seconds]
bricker has joined #ruby
TheWhip has joined #ruby
favadi has quit [Read error: Connection reset by peer]
pawnbox has quit [Read error: Connection reset by peer]
jgt has quit [Ping timeout: 272 seconds]
djbkd has joined #ruby
pawnbox has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
bricker has quit [Ping timeout: 256 seconds]
sajinmp has quit [Quit: Leaving]
andikr has quit [Remote host closed the connection]
djbkd has quit [Ping timeout: 264 seconds]
sagittarian has joined #ruby
<shevy>
if only we could have a RubyOS
<ddv>
please no
<sagittarian>
is there a (built-in) method in Hash that works like #merge or #update but if the key already exists then it doesn't change it?
<jhass>
sagittarian: merge takes a block
lipoqil has quit [Quit: Connection closed for inactivity]
leafybasil has quit [Read error: Connection reset by peer]
TheWhip has quit [Ping timeout: 252 seconds]
<apeiros>
or just reverse argument and receiver
TheWhip has joined #ruby
<sagittarian>
oh yeah, obviously, thanks apeiros
fullofcaffeine has joined #ruby
RegulationD has joined #ruby
norc has joined #ruby
matp has joined #ruby
fullofcaffeine has quit [Ping timeout: 265 seconds]
<norc>
Is there a way to create a "local" module that is scoped to the file its defined in?
sdothum has joined #ruby
RegulationD has quit [Ping timeout: 246 seconds]
<apeiros>
norc: mod = Module.new
<jhass>
foo = Module.new
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
cool
glundgren has joined #ruby
brunto has joined #ruby
<apeiros>
norc: note though - scoping applies to variables, not to objects
TheWhip has quit [Read error: Connection reset by peer]
syath has joined #ruby
TheWhip has joined #ruby
* apeiros
kicks ruboto
prestorium has quit [Ping timeout: 255 seconds]
<apeiros>
ah, no, pastie, not pastebin :D
prestorium has joined #ruby
<JyZyXEL>
pastie is ok?
<apeiros>
yes
<JyZyXEL>
that function is not ok though
sepp2k has joined #ruby
jenrzzz has joined #ruby
noodle has joined #ruby
Peg-leg has quit [Quit: Leaving.]
amystephen has joined #ruby
shredding has joined #ruby
ldnunes has joined #ruby
Flyy7 has joined #ruby
Peg-leg has joined #ruby
Pupeno_ has joined #ruby
dEPy has joined #ruby
prestorium has quit [Client Quit]
dEPy has quit [Client Quit]
atomical has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<shevy>
[k- yeah but the problem is whenever there are ways that are shorter/better/easier to maintain, I'd like to know that path
giuseppesolinas has joined #ruby
chouhoulis has joined #ruby
Pupeno has quit [Ping timeout: 272 seconds]
<adaedra>
apeiros: stop violence against bots!
jgt has quit [Ping timeout: 240 seconds]
<shevy>
JyZyXEL not sure what you want to optimize there, you rescue an error, and depending on whether you have an error or no error, you use two different method calls. not sure what you could optimize away from there
<apeiros>
adaedra: don't worry, I didn't hurt the bot.
<JyZyXEL>
shevy: the method is not even suitable for modern links
<[k->
adaedra: shouldn't `derpy be saying that?
<JyZyXEL>
i think its deprecated/broken
<shevy>
hmm
<adaedra>
JyZyXEL: you don't need the begin/end, though, it's implied by def/end
<shevy>
I see people use a lot of URI.parse()
<JyZyXEL>
but its wrong and it breaks
HammyJammy has quit [Read error: Connection reset by peer]
<adaedra>
[k-: you need to be a bot to be against bot violence?
<shevy>
"Raised if URI given is not a correct one."
<shevy>
"It's recommended to first ::escape the provided uri_str if there are any invalid URI characters."
<maloik>
bots are people too
jgt has joined #ruby
<JyZyXEL>
stackoverflow says to NOT USE URI
TheWhip has quit [Read error: Connection reset by peer]
TheWhip has joined #ruby
<JyZyXEL>
"If you need to work with URIs, use Addressable, it offers URL encoding, form encoding and normalizes URLs."
<shevy>
what do they know
tkuchiki has quit [Remote host closed the connection]
<shevy>
ah yeah, I think apeiros uses that gem too
leafybasil has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
<[k->
adaedra: well, if you think for a moment, `derpy is more suited to play the defensive part
chouhoulis has quit [Ping timeout: 240 seconds]
JDiPierro has joined #ruby
* apeiros
is fascinated about shevy's bookkeeping of his activities
<JyZyXEL>
using addressable is probably gonna require apt-get?
<shevy>
apeiros am I right? :D
<certainty>
shevy stalks you
<shevy>
I have a bad memory so I was guessing
<apeiros>
no idea. which gem? addressable? I think I use that somewhere, yes
skade has joined #ruby
<apeiros>
at least it sounds familiar
<shevy>
yay! \o/
<adaedra>
JyZyXEL: Do they say why you shouldn't use URI?
<JyZyXEL>
yup, apt-get install addressable
<JyZyXEL>
adaedra: yes
<shevy>
certainty yeah, I stalk due to butler, the only IRC bot with class
<JyZyXEL>
it breaks links
<norc>
apeiros: Don't worry, unlike shevy I do have a good memory. Yesterday I looked up your encoding cheat sheet again, because I had a classic double translation problem!
<shevy>
haha
<certainty>
xD
<JyZyXEL>
CGI is part of ruby?
<shevy>
wait... apeiros has cheat sheets now like zenspider does as well?
DrCode has joined #ruby
<[k->
i have good memory too, sometimes
<apeiros>
shevy: it's an article, not really a cheatsheet
<shevy>
JyZyXEL yeah, but quite old, written by matz many years ago. updated when encodings were added between 1.8 and 1.9
<norc>
[k-, let me guess - you just cannot remember when that was the last time?
<[k->
no one look up the time when i couldn't remember omniref
<certainty>
as long as it has error correction, all memory is fine with me
<JyZyXEL>
shevy: but its the currently best URL encoder that is included in Ruby?
<shevy>
[k- you use too much haskell to become famous in #ruby!
<norc>
apeiros: All it needs is a flowchart and it becomes a cheat sheet. :-)
s00pcan has joined #ruby
<apeiros>
norc: dooo eeeet! and link it so I can add it :D
<[k->
im already famous
<shevy>
JyZyXEL it may be the only one included by default :\ :/ a gem that specializes on that, may always be better
<JyZyXEL>
im guessing ERB::Util.url_encode requires an apt-get too?
<shevy>
but I don't know addressable myself so I can not judge
<apeiros>
[k-: s/famous/infamous/?
<JyZyXEL>
im not going to use anything that requires apt-get from the user
A124 has quit [Read error: Connection reset by peer]
roshanavand has quit [Remote host closed the connection]
A124 has joined #ruby
<[k->
it's the instance your code is running in!
jokke has quit [Quit: WeeChat 1.3]
roshanavand has joined #ruby
Cyther_ has joined #ruby
<norc>
So when I start a Ruby program, it creates an instance of Object, and sets the default definee to it?
<norc>
And calls it main?
<JyZyXEL>
is there a better alternative for URI.parse() too?
Flyy7 has quit [Ping timeout: 252 seconds]
<JyZyXEL>
doesn't look like it
karapetyan has quit [Remote host closed the connection]
JyZyXEL has left #ruby [#ruby]
EasyCo has quit [Quit: Connection closed for inactivity]
Cyther_ has quit [Read error: Connection reset by peer]
<[k->
norc: indeed
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
Cyther has quit [Ping timeout: 255 seconds]
bricker has joined #ruby
Flyy7 has joined #ruby
tomaz_b has joined #ruby
karapetyan has joined #ruby
culturelabs has quit [Quit: Connection closed for inactivity]
karapetyan has quit [Read error: Connection reset by peer]
shredding has quit [Ping timeout: 252 seconds]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
karapetyan has joined #ruby
simplyianm has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
<norc>
[k-: I think Im at the point where I really need to start debugging Ruby to understand better what happens under the hood. :)
bricker has quit [Ping timeout: 240 seconds]
<Porfa>
i just got rapped by the autoshop :( sorry for off topic i just feel bad :
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
fullofcaffeine has joined #ruby
<shevy>
what is autoshop
<Porfa>
car repair
nhhagen has quit [Read error: Connection reset by peer]
<shevy>
don't worry
<shevy>
one day you can 3D print a new one rather than repair the old one
matp has quit [Ping timeout: 244 seconds]
<Porfa>
my direction got stuck sometimes, randomly when i turned right, so they said it was the suspension that was breaking and that would lock the direction.. i payed 600eur for the repair today the same thing happened.. i went to check it myself… the mattess / rug under the pedals was getting stuck in the direction vein.. that's why it locked :/
<Porfa>
I'm going there now to break hell loose.. i coulda have died
djbkd has quit [Ping timeout: 264 seconds]
<norc>
shevy: 3d printing parts can be a lucrative business already
<Porfa>
then what would you do without me asking all the silly questions about ruby? damn.. ttyl guys
mase-chatter has joined #ruby
leafybasil has quit [Ping timeout: 264 seconds]
<shevy>
600 eur... you can get a new car for that!
<maloik>
so they charged you for nothing?
<Porfa>
the car (used) costed 1000!
<maloik>
didnt they say what they "fixed" ?
simplyianm has quit [Ping timeout: 256 seconds]
<Porfa>
no, they changed the suspension, it's a new one.. but i guess i didn't need it at all
<norc>
You can get a new VW Golf for 600 eur currently!
Porfa has quit [Quit: Porfa]
<maloik>
I've had my pedal getting stuck in the floormat too, but only when I put the pedal to the metal
<maloik>
which is pretty much all the time :( especially in the old car
lxsameer has joined #ruby
<maloik>
remember having to cut back some of the rubber to prevent it from happening
noodle has quit [Ping timeout: 240 seconds]
JDiPierro has quit [Remote host closed the connection]
fullofcaffeine has quit [Ping timeout: 265 seconds]
ndrei has joined #ruby
skweek has joined #ruby
sepp2k has quit [Quit: Leaving.]
codecop has quit [Remote host closed the connection]
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
Napear has joined #ruby
<norc>
Is "self" also the receiver for a method if no other is specified?
Zai00 has joined #ruby
karapetyan has joined #ruby
agit0 has quit [Quit: This computer has gone to sleep]
<norc>
>> def quux; puts :quux; end; class Foo; quux; end
Voker57 has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby
<norc>
shevy: would I be correct in assuming that if I dont specify a receiver, that Ruby will actually first look into the singleton class of self (and its inheritance chain), and then look into main?
agit0 has joined #ruby
<Couch>
if I have a class Puppet::Provider, is it bad form to also declare a module named Puppet::Provider::Balancer ? i.e. is it bad to insert a module constant after a class constant in the namespacing ?
<norc>
Or does Foo inherit from main.singleton_class?
<imperator>
need a bit of help defining a custom .inspect method
<norc>
[k-: So yeah. The class body is evaluated - but if the default receiver is self (which is the class itself), then it should emit a NoMethodError because neither its singleton_class, nor its ancestors have that method defined anywhere.
auzty has quit [Quit: Leaving]
<norc>
[k-: At least thats what I would expect, naively as an idiot.
<shevy>
your code works fine because the methods exist
<norc>
shevy: According to which rule can quux resolve?
Flyy7 has quit [Ping timeout: 244 seconds]
<shevy>
if you move "def self.baz" to the end of class Foo then it won't work
<shevy>
quux() has been defined above
<norc>
shevy: I was taught that a method on an object looks its singleton_classes method table up, and if it cant find it there, it will walk down the chain - and throw an exception if its not found.
<shevy>
and how would normal method invocations work then?
Icey has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 240 seconds]
<norc>
a "normal" invocation uses "self" as a default receiver
<shevy>
when you write: def foo; puts 'bla'; end in irb, how could you call this from any namespace then?
<norc>
which in the top level namespace refers to main
<norc>
shevy: That is my question!
<shevy>
I did not know about main
<shevy>
I always remember it as a private method on class Object
<shevy>
piyo... reminds me of pinoy, which I think is filipino. [k- should be an expert on asian words used if he could be bothered to write more singlish liao!
<norc>
certainty: That article is highly interesting. Suddenly Ruby strongly reminds me of JavaScript - but all the magical things like instance_eval suddenly make perfect sense.
<[k->
i write singlish in more singlish oriented places
<shevy>
this is IRC! we are a global family!!!
<shevy>
together we idle to power and knowledge
<certainty>
you certainly look like my grandpa :p
<[k->
it still can be exclusionary
beauby has quit [Ping timeout: 246 seconds]
RegulationD has quit [Ping timeout: 240 seconds]
yalue has joined #ruby
Pupp3tm4st3r has joined #ruby
giuseppesolinas has joined #ruby
TheWhip has joined #ruby
gregoriokusowski has joined #ruby
skweek has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
InternetFriend has joined #ruby
tk__ has joined #ruby
newdan has joined #ruby
<platzhirsch>
shevy: this is madness
yfeldblum has joined #ruby
InternetFriend has quit [Client Quit]
Ropeney has joined #ruby
<shevy>
lol
<shevy>
my dear nodehirsch
<platzhirsch>
yes, dealing with crappy libraries every day now
<platzhirsch>
to build a streaming engine called Einstein
<shevy>
cool
<shevy>
you always need a fancy name for a good project
dhjondoh has quit [Quit: dhjondoh]
<[k->
you'll never find out what selenium, puppet, capistrano, cucumber are!
ta has joined #ruby
TheWhip has quit [Ping timeout: 268 seconds]
<certainty>
the recipe for a really sick night?
Rodya_ has joined #ruby
jenrzzz has joined #ruby
<[k->
seems so
__chris has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
diegobiavati has joined #ruby
<[k->
you never know what they mean unless you use ruby tools
diegobiavati has quit [Max SendQ exceeded]
<certainty>
true
leafybasil has joined #ruby
<[k->
ruby person: i use cucumber
diegobiavati has joined #ruby
<[k->
woman: oh, for facial?
lkba has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k->
ruby person: no, for testing
<certainty>
:D
<[k->
woman: (explicit) (nsfw) testing?????
InternetFriend has joined #ruby
p0wn3d__ has joined #ruby
InternetFriend has quit [Client Quit]
devdazed has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
Ropeney has joined #ruby
Prominent has quit [Quit: Leaving]
JDiPierro has quit [Remote host closed the connection]
<certainty>
woman: really? didn't you hear that non programmers writing tests doesn't actually work? Didn't work back then with COBOL, doesn't work now.
riskish has joined #ruby
atomical has quit [Read error: Connection reset by peer]
cwong_on_irc has quit [Quit: Leaving.]
poguez_ has joined #ruby
northfurr has quit [Quit: northfurr]
Napear has quit [Quit: leaving]
<[k->
i meant the sexual part of cucumber
treehug88 has joined #ruby
<[k->
*insert pedo face*
<certainty>
which sexual part?
atomical has joined #ruby
<[k->
i wish Android keyboards have those keyboard shortcuts
<[k->
oh the one with the cucumber *wink wink*
momomomomo has joined #ruby
tkuchiki has joined #ruby
roshanavand has quit [Remote host closed the connection]
InternetFriend has joined #ruby
hectortrope has quit [Read error: Connection reset by peer]
Jaglor has joined #ruby
JDiPierro has joined #ruby
JM_ has joined #ruby
<shevy>
while programming in ruby
datanoise has joined #ruby
tkuchiki has quit [Read error: Connection reset by peer]
<shevy>
what music would you recommend?
tkuchiki has joined #ruby
roshanavand has joined #ruby
leafybasil has quit [Read error: Connection reset by peer]
<certainty>
there is legit music for the different languages?
sanjayu has quit [Ping timeout: 256 seconds]
<shevy>
yeah
<shevy>
php
Dopagod has joined #ruby
Dopagod has quit [Changing host]
Dopagod has joined #ruby
roshanavand has quit [Remote host closed the connection]
<shevy>
you listen to sailor moon
hectortrope has joined #ruby
<shevy>
lisp - hypnotic american native drums
balazs_ has quit [Ping timeout: 265 seconds]
<shevy>
python - the dance of the rattlesnakes (mexican song)
casadei has quit [Remote host closed the connection]
<certainty>
well for ruby it should be *rock* n' roll
dopie has joined #ruby
paulcsmith has joined #ruby
datanoise has quit [Ping timeout: 265 seconds]
<apeiros>
ruby ruby ruby…
axl_ has joined #ruby
<certainty>
too obvious :)
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roshanavand has quit [Remote host closed the connection]
<[k->
and it works
roshanavand has joined #ruby
karapetyan has quit [Remote host closed the connection]
unclouded has quit [Ping timeout: 246 seconds]
armyriad has joined #ruby
<jhass>
yeah I guess this is similar
<adaedra>
I would have never think to put two of them
ta has quit [Remote host closed the connection]
<jhass>
the next lines are parsed as one expression until BEGINNING before + <<END is even parsed
<jhass>
or so
<jhass>
so the AST looks like call +, heredoc, heredoc again basically
<la_>
I'm wondering why END doesn't caputure everything from "This is the beginning." up to the END delimiter.
unclouded has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
the answer is somewhere in parse.y, my guess is above
tk__ has quit [Quit: ばいばい]
<[k->
"the end is after the beginning"
casadei has joined #ruby
momomomomo has quit [Quit: momomomomo]
JJM has quit [Max SendQ exceeded]
willardg has joined #ruby
<apeiros>
la_: because ruby knows that there's two here-docs
<apeiros>
not sure why it wouldn't know
<[k->
jhass, but your guess still doesnt explain why Ruby ignored lines until BEGINNING
datanoise has quit [Ping timeout: 240 seconds]
<jhass>
[k-: it actually does
<jhass>
those are consumed by parsing the first expression
Pupp3tm4st3r has joined #ruby
<[k->
hmm, consuming
<apeiros>
i.e. `message = <<BEGINNING + <<END` tells ruby that following this line there'll be 2 here-docs. it'll first read until BEGINNING to fulfill the first here-doc, then until END to fulfill the second here-doc.
<jhass>
when the second heredoc is parsed they're no longer available for consumption
<[k->
ah, that makes things clear!
Guest53 has joined #ruby
<[k->
apeiros: your explanation needs jhass's critical piece
<shevy>
well you have to grab a handle towards the second CON
treehug88 has quit [Read error: Connection reset by peer]
DEA7TH has quit [Quit: DEA7TH]
<Wixy>
self.class::CON works perfect!
ruby-lang790 has joined #ruby
<adaedra>
just a story of scopes
<ruby-lang790>
hi
<shevy>
ruby-lang790 you are back!
<adaedra>
But I feel like it can be done way better, Wixy
The_Phoenix1 has quit [Read error: Connection reset by peer]
momomomomo has joined #ruby
<hectortrope>
hey shevy girl
mase-chatter has quit [Remote host closed the connection]
DEA7TH has joined #ruby
joonty has quit [Quit: joonty]
<Wixy>
adaedra, any idea?
<Coraline>
Takumo: you might try using ruby parser
benlieb has joined #ruby
<ruby-lang790>
I have some programming experience in c, I am intrested in building websites , should I learn Ruby and learn rails/ directly learn rails?
<adaedra>
I don't know what's the big picture, what you're trying to do in the first place, Wixy
<adaedra>
ruby-lang790: can't use rails without knowing ruby a bit.
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chihhsin has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
greenarrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Alayde has joined #ruby
michaeldeol has joined #ruby
towski_ has joined #ruby
karapetyan has joined #ruby
brunto has quit [Ping timeout: 264 seconds]
northfurr has quit [Ping timeout: 240 seconds]
riotjones has joined #ruby
Zai00 has quit [Quit: Zai00]
eminencehc has quit [Remote host closed the connection]
riotjones has quit [Read error: Connection reset by peer]
northfurr has joined #ruby
Zai00 has joined #ruby
Wixy has quit [Ping timeout: 265 seconds]
eminencehc has joined #ruby
riotjones has joined #ruby
reset has joined #ruby
Channel6 has quit [Quit: Leaving]
lea has quit [Ping timeout: 240 seconds]
ishikawa91 has joined #ruby
uber has quit [Ping timeout: 265 seconds]
aaeron has joined #ruby
michaeldeol has quit [Client Quit]
michaeldeol has joined #ruby
otacon- has joined #ruby
p1k has quit [Ping timeout: 260 seconds]
wuiiuam has joined #ruby
symm- has joined #ruby
arooni has joined #ruby
[Butch] has joined #ruby
glcx has joined #ruby
Pupp3tm4st3r has joined #ruby
TPBallbag is now known as DorStealsRBs
<Takumo>
does `gem` have a quick way of querying rubygems.org for the current version of a given gem?
arthurix has joined #ruby
riotjones has quit [Ping timeout: 240 seconds]
<Takumo>
when adding gems to my Gemfile I'd like to put a ~> to the current verison
<Takumo>
I could just write a shell script to do it ;)
jenrzzz has quit [Ping timeout: 264 seconds]
roshanavand has quit [Remote host closed the connection]
Pupp3tm4st3r has quit [Remote host closed the connection]
<workmad3>
Takumo: once you've done a `bundle install`, bundler will store all the versions it resolved in `Gemfile.lock` and, from that point on, will install only those exact versions when you do another `bundle install`
JDiPierro has joined #ruby
lessless has joined #ruby
<Takumo>
workmad3: I know, I just like to ensure all gems outside of :development have a version spec on them
<Takumo>
to prevent other team members cloning the repo and doing a `bundle install`
<Takumo>
and getting different gem versions
eminencehc has quit [Remote host closed the connection]
djbkd has joined #ruby
<jhass>
git list -r I guess?
<workmad3>
Takumo: they won't, unless you're not checking in Gemfile.lock
<Takumo>
although yes Gemfile.lock does work
<workmad3>
Takumo: that's the entire point of the Gemfile.lock file
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shoutsid has quit [Remote host closed the connection]
northfurr has quit [Quit: northfurr]
imperator has joined #ruby
yfeldblum has quit [Ping timeout: 244 seconds]
saddad has joined #ruby
lenwood has quit [Ping timeout: 240 seconds]
Porfa has joined #ruby
<Porfa>
hello!
InternetFriend has joined #ruby
senayar has quit []
joufflu has joined #ruby
joufflu has quit [Max SendQ exceeded]
<Porfa>
anyone knows norc ? because i just noticed he said some hours ago (I'm sorry this was an off topic chat) but he said i could get a new gold WV for 600eur.. I'm just wondering if i was just being trolled
joufflu has joined #ruby
seaned has quit [Ping timeout: 252 seconds]
karapetyan has quit [Remote host closed the connection]
fedexo has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]
<skakri>
what
seaned has joined #ruby
JDiPierro has quit [Ping timeout: 250 seconds]
roshanavand has quit [Remote host closed the connection]
uber has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
northfurr has joined #ruby
lea has joined #ruby
towski_ has quit [Remote host closed the connection]
chipotle has quit [Quit: cheerio]
QORRiE has joined #ruby
SCHAAP137 has joined #ruby
shmilan has quit [Ping timeout: 240 seconds]
wallerdev has joined #ruby
dawkirst has joined #ruby
p0wn3d__ has quit [Ping timeout: 272 seconds]
karapetyan has joined #ruby
adac has quit [Ping timeout: 264 seconds]
<imperator>
so if i have a hash like: {:x => {:y => {:z => 7}}}
<imperator>
and an array like [:x, :y]
fullofcaffeine has joined #ruby
maletor has joined #ruby
<imperator>
what's a good way to get at hash[:x][:y] using the contents of the array?
<jhass>
inject
anisha has quit [Quit: Leaving]
Zai00 has quit [Quit: Zai00]
patchedmonkey has joined #ruby
roshanavand has joined #ruby
blaxter has quit [Quit: foo]
fullofcaffeine has quit [Remote host closed the connection]
p0wn3d__ has joined #ruby
<imperator>
jhass, excellent, thank you
<imperator>
something tells me you've done it before ;)
<jhass>
that question comes up fairly regularly
ericjphillips has joined #ruby
fedexo has quit [Read error: Connection reset by peer]
fullofcaffeine has joined #ruby
roshanavand has quit [Ping timeout: 246 seconds]
otacon- has quit [Ping timeout: 240 seconds]
Kendos-Kenlen has quit [Quit: Konversation terminated!]
Soda has joined #ruby
RobertBirnie has joined #ruby
Zai00 has joined #ruby
otacon- has joined #ruby
psy_ has joined #ruby
chthon has quit [Ping timeout: 244 seconds]
arooni has quit [Ping timeout: 240 seconds]
wuiiuam has joined #ruby
jpfuentes2 has joined #ruby
Technodrome has quit [Quit: Technodrome]
jenrzzz has joined #ruby
mikecmpbll has quit [Ping timeout: 240 seconds]
bazbing80 has joined #ruby
<bazbing80>
#rspec is literally dead. Does anyone know if it's possible to create a master context?
mrburied has joined #ruby
<bazbing80>
in the spec_helper possibly. A context that is called before every single describe
blackmes1 has joined #ruby
<jhass>
you mean before block?
ngscheurich has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 240 seconds]
<jhass>
bazbing80: config.before(:each)
<bazbing80>
jhass: that definitely helps, but I want let() variables to be availble to proceeding expectations as well
<jhass>
with reinitialization for each example?
matp has joined #ruby
<bazbing80>
jhass right now they're just strings, so no, but reinitialization will be good for future, more complex lets so I'd like to know that :)
leafybasil has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
<jordanm>
whoops
freerobby has quit [Quit: Leaving.]
<jhass>
jordanm: instance variables are defined on access and initialized with nil, any method can set their value
datanoise has joined #ruby
<jordanm>
thanks again for the help. in my testing I was printing "#{foo}" instead of "#{@foo}"
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yqt has joined #ruby
<jhass>
if you literally have something like puts "#{@foo}", the "#{}" is useless btw, puts calls to_s on the argument
<jhass>
or yet better use p @foo for debug printing, which will call inspect instead
otacon- has joined #ruby
Pupp3tm4st3r has joined #ruby
system64 has joined #ruby
<SirFunk>
I feel like this is a silly question, but is there a good pattern for a module to make sure that classes that include it implement certian methods?
<havenwood>
SirFunk: It's an interesting question!
QORRiE has quit [Remote host closed the connection]
Pupp3tm4st3r has quit [Remote host closed the connection]
wildlander has joined #ruby
postmodern has joined #ruby
shoutsid has joined #ruby
northfurr has quit [Quit: northfurr]
tomphp has joined #ruby
dfockler has quit [Ping timeout: 246 seconds]
aaeron has joined #ruby
agit0 has joined #ruby
bap1313 has joined #ruby
allcentury has quit [Ping timeout: 264 seconds]
spider-mario has quit [Ping timeout: 268 seconds]
agit0 has quit [Client Quit]
f4cl3y has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
aaeron has quit [Client Quit]
KensoDev has quit []
Pupeno has quit [Quit: Leaving...]
patchedmonkey has joined #ruby
riotjones has joined #ruby
darkf has quit [Quit: Leaving]
<SirFunk>
drbrain: I don't think that works
<SirFunk>
unless perhaps you include at the bottom?
agit0 has joined #ruby
<drbrain>
ah, right
<SirFunk>
I don't think the methods will be defined when included gets rrun
riotjones has quit [Read error: Connection reset by peer]
User458764 has joined #ruby
<drbrain>
option 2: define #initialize and super through it?
jackjackdripper has joined #ruby
riotjones has joined #ruby
agit0 has quit [Client Quit]
karapetyan has quit [Remote host closed the connection]
vF3hNGxc47h8 has joined #ruby
karapetyan has joined #ruby
dikaio has joined #ruby
<User458764>
Hi, everytime I come here and ask a question I get an answer so I was asking myself if you could help me with this one: how could I get a job in my favourite language?
northfurr has joined #ruby
acke has quit [Remote host closed the connection]
squiter has joined #ruby
acke has joined #ruby
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
dionysus69 has quit [Remote host closed the connection]
<havenwood>
User458764: Do you already know your favorite language or you're looking to learn it?
michaeldeol has joined #ruby
riotjones has quit [Ping timeout: 260 seconds]
eminencehc has quit [Remote host closed the connection]
allcentury has joined #ruby
<shevy>
User458764 you should specialize and obtain as much knowledge possible in that domain, when you are good in it, it'll be easy to get a job
NeverDie has joined #ruby
<User458764>
havenwood I use ruby for more than 4 years I will say but I am intermediate
djbkd_ has joined #ruby
karapetyan has quit [Ping timeout: 264 seconds]
jespada has quit [Quit: WeeChat 1.1.1]
eminencehc has joined #ruby
<agent_white>
I'm mild, sometimes spicy!
<User458764>
shevy I know but I think the best way to learn is to practice in a professional activity but I can't get any interview. And all the jobs are in San Francisco and I am not American :)
Coldblackice_ has joined #ruby
JohnTheGreek has joined #ruby
squiter has quit [Remote host closed the connection]
milhouse` has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
Renich has joined #ruby
baweaver has joined #ruby
milhouse` has joined #ruby
blizzy has joined #ruby
<JohnTheGreek>
is ruby thread safe ? can it use more than one thread so it doesn't block ?
<eam>
JohnTheGreek: yes, ruby can use threads
milhouse` has left #ruby [#ruby]
aaeron has joined #ruby
blizzy has quit [Max SendQ exceeded]
milhouse` has joined #ruby
<JohnTheGreek>
is this feature built in ? or it depends on a gem ?
<drbrain>
with MRI only one thread can run ruby at a time
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blizzy has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
<drbrain>
ruby will hand the VM to different threads when they execute a blocking operation (I/O, syscalls, C libraries)
<JohnTheGreek>
so its not multi threaded. yes i am talking MRI here.
havenwood has quit [Ping timeout: 260 seconds]
<drbrain>
it is multi-threaded
djbkd_ has quit [Ping timeout: 250 seconds]
_blizzy_ has quit [Ping timeout: 240 seconds]
QORRiE has joined #ruby
Kendos-Kenlen has joined #ruby
<drbrain>
as in, MRI will create multiple OS threads
milhouse` has left #ruby [#ruby]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<JohnTheGreek>
does ruby MRI have a VM ? i thought it had only a runtime engine.
<drbrain>
it has a VM since 1.9.0
havenwood has joined #ruby
karapetyan has joined #ruby
milhouse` has joined #ruby
wuiiuam has quit [Read error: Connection reset by peer]
<craysiii>
what alternatives are there to MRI and why would i want to use one?
<drbrain>
if you are doing expensive computations in pure-ruby the VM will only execute on one thread at a time
<eam>
craysiii: jruby
<JohnTheGreek>
please forgive me for insinsting on this but can you tell me then why there are so many flavors ? JRuby, IronRuby etc.
wuiiuam has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nonnatus has quit [Ping timeout: 255 seconds]
<drbrain>
if you are doing I/O, interacting with (properly written) C libraries, etc., threads executing non-ruby code will run in parallel
<havenwood>
JohnTheGreek: Different implementations target different runtimes. JRuby on the JVM and IronRuby (now defunct) on .Net, etc.
<drbrain>
there are different flavors because people like ruby enough to build and maintain them
milhouse` has left #ruby [#ruby]
<havenwood>
:D
<eam>
and they're useful when integrating with their respective platforms -- and some have additional features (eg, parallelism in jruby)
<craysiii>
wow, I wish IronRuby wasn't dead. would have worked perfectly for me.
acke_ has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
<JohnTheGreek>
if jruby is so promising why most people work with groovy or scala then ?
jackjackdripper has joined #ruby
<drbrain>
JohnTheGreek: with MRI you can download (using the built-in pure-ruby Net::HTTP) and decompress (using the zlib C extension) using all your CPU cores
<hal_9000_>
i didn’t realize people still used groovy
<drbrain>
because they like groovy or scala better than ruby
<shevy>
User458764 aha, no idea about San Francisco; perhaps build a portfolio of different things you can create (yourself, genuinely), this should be simple, you have a lot of time to prepare everything
mwlang has joined #ruby
<kyle__>
JohnTheGreek: Define most?
<drbrain>
JohnTheGreek: it's the same reason that some people like Coca-Cola and some people like Pepsi
<baweaver>
shevy: ???
<drbrain>
baweaver: see scrollback
<kyle__>
JohnTheGreek: many many places are running logstash, which uses jruby.
<baweaver>
way scrollback
<kyle__>
I'd venture more places are using that, than places that use any other type of ruby in their infrastucture, even if you include chef and puppet installs.
<JohnTheGreek>
with most i mean most people in java world who want to use a dynamic language.
<eam>
jruby can be upsettingly slow to start if you're a newbie doing a lot of simple programs
speakingcode has joined #ruby
<eam>
(because the jvm is slow to start)
<headius>
remember --dev flag helps that a lot
<Antiarc>
^
ndrei has quit [Ping timeout: 268 seconds]
<kyle__>
baweaver: your use of %w() has me asking now... why is it suddenly considered 'proper form' to use only %w() and no longer proper to use %w{}?
<headius>
JohnTheGreek: you don't see a lot of JRuby use at Java confs because most of our users come from the Ruby world
<baweaver>
is it?
<Antiarc>
but yes MRI is faster to boot for tinkering
<kyle__>
according to style docs and rubocop and other auto checkers it seems to be :/
<baweaver>
people will make stupid rules about anything
<kyle__>
And I don't get it.
<kyle__>
Heh.
futilegames has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_wldcordeiro has joined #ruby
<baweaver>
As a wise pirate once said: They're not really rules, they're more of guidelines really.
<kyle__>
I don't really like a lot of rubocop's choices, but I use it anyway, because then everything is uniform.
<eam>
headius: I wasn't aware of --dev, nice. But it's 1.6s vs 1.2 on my system (MRI: 0.07s)
<eam>
for ruby -e1
shmilan has quit [Ping timeout: 246 seconds]
<headius>
well, it's better :-)
<eam>
true!
<headius>
for larger app startup it makes a bigger difference
fantazo has joined #ruby
michaeldeol has joined #ruby
<headius>
nobody beats MRI on startup
<headius>
unfortunately
<drbrain>
only older MRI beats MRI on startup
<apeiros>
headius: what happened with tries to keep a jvm running to speed up startup?
<eam>
yeah, the startup time is more or less irrelevant for any of our apps
<headius>
apeiros: they work, and we recommend "drip"
wldcordeiro has quit [Quit: Konversation terminated!]
<eam>
MRI's startup is pretty god-awful slow as well once gems get involved
DoubleMalt has quit [Remote host closed the connection]
<headius>
there's also work happening in Oracle JVM team to give us an ahead-of-time compiled JRuby, and the Truffle folks have a solution that pre-compiles the whole thing too
<headius>
we'll get something eventually
n008f4g_ has joined #ruby
<eam>
thousands of stat-walked files
InternetFriend has joined #ruby
giuseppesolinas has joined #ruby
<headius>
eam: yeah for sure
baweaver has quit [Remote host closed the connection]
aquiles has joined #ruby
<JohnTheGreek>
i am really confused with dynamic languages in general. where they excel in contrast to typed managed languages ?
cdg has quit [Remote host closed the connection]
lkba has quit [Read error: Connection reset by peer]
lkba_ has joined #ruby
<shevy>
JohnTheGreek writing stuff from the dev-side should go much faster, as in quick prototyping
User458764 has joined #ruby
<JohnTheGreek>
why hiring ruby programmers is more expensive ?
adac has joined #ruby
cdg has joined #ruby
Timba-as_ has quit [Quit: Be back later ...]
_wldcordeiro has quit [Client Quit]
<JohnTheGreek>
is ruby worth learning for a career ?
wldcordeiro has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
only learn it when you like it
icarus has joined #ruby
<JohnTheGreek>
i really need to know one dynamc language and i cannot decide which one actually. ruby, python, javascript with node.js...
<shevy>
yeah
<craysiii>
learn multiple.
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam>
JohnTheGreek: if you learn any of those you'll probably end up learning them all. They're very similar
<shevy>
JohnTheGreek if you go into web-stuff then there is no realistic way around javascript
blackmes1 has quit [Read error: Connection reset by peer]
hahuang65 has joined #ruby
simplyianm has joined #ruby
<JohnTheGreek>
web stuff interests me...so i better learn javascript right ?
<imperator>
SirFunk, sounds like you want interfaces
<imperator>
gem install interface :)
michaeldeol has joined #ruby
cdg has quit [Ping timeout: 246 seconds]
<shevy>
JohnTheGreek only you can decide what you will learn JohnTheGreek, learn ruby if you like it, otherwise learn the one you can make best use out of your use case
nonnatus has joined #ruby
simplyianm has quit [Remote host closed the connection]
<imperator>
ironruby, haven't heard that in a long time
dmolina has joined #ruby
bruno- has quit [Quit: Lost terminal]
dhjondoh has quit [Quit: dhjondoh]
hephaestus_rg has quit [Ping timeout: 265 seconds]
toretore has joined #ruby
simplyianm has joined #ruby
JohnTheGreek has quit []
<shevy>
didn't it die years ago?
JohnTheGreek has joined #ruby
milhouse` has joined #ruby
<JohnTheGreek>
ok guys. thanks a lot.
milhouse` has left #ruby [#ruby]
yqt has quit [Ping timeout: 268 seconds]
yqt has joined #ruby
<imperator>
shevy, yep
Lucky__ has joined #ruby
milhouse` has joined #ruby
Alayde has quit [Ping timeout: 246 seconds]
JohnTheGreek has left #ruby [#ruby]
havenn has joined #ruby
havenwood has quit [Ping timeout: 256 seconds]
Alayde has joined #ruby
sanjayu has quit [Ping timeout: 260 seconds]
pawnbox has quit [Remote host closed the connection]
Sou|cutter has quit [Quit: WeeChat 0.4.2]
Sou|cutter has joined #ruby
squiter has quit [Remote host closed the connection]
bazbing80 has joined #ruby
codeurge has quit [Ping timeout: 272 seconds]
tvon has joined #ruby
skweek has quit [Remote host closed the connection]
TheWhip has quit [Ping timeout: 255 seconds]
balazs has quit [Ping timeout: 265 seconds]
karapetyan has quit [Remote host closed the connection]
TheWhip has joined #ruby
karapetyan has joined #ruby
spider-mario has joined #ruby
lkba_ has quit [Read error: Connection reset by peer]
lkba has joined #ruby
icarus has quit [Quit: leaving]
Technodrome has joined #ruby
<imperator>
jhass, don't suppose you see a way to make that work
MasterPiece has joined #ruby
havenwood has joined #ruby
patchedmonkey has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zayaman has quit [Ping timeout: 240 seconds]
<shevy>
if someone can then it will be drbrain !
jgt has quit [Ping timeout: 260 seconds]
<imperator>
why not you shevy? ;)
havenn has quit [Ping timeout: 264 seconds]
<shevy>
I have not used delegate before
karapetyan has quit [Ping timeout: 264 seconds]
nfk|laptop has quit [Quit: yawn]
yfeldblum has joined #ruby
MasterPiece has quit [Max SendQ exceeded]
djcp has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Read error: Connection reset by peer]
symm- has joined #ruby
devoldmx has joined #ruby
<jhass>
imperator: you would need to return your delegator instead of OpenStruct I guess
riceandbeans has joined #ruby
yfeldblum has joined #ruby
<jhass>
honestly, most of these are just not worth it
<riceandbeans>
yo yo yo yo yo
<jhass>
[:stuff][:tags] isn't that bad really
<riceandbeans>
question for anyone here who's done db apps with ruby
agit0 has joined #ruby
<riceandbeans>
so I'm using mysql2 gem and I'm creating a client object, a statement object, executing it, then returning the data, and those are methods in a module of mine
Kendos-Kenlen has quit [Quit: Konversation terminated!]
<riceandbeans>
SHOULD I be doing client.close?
<imperator>
jhass, most of what? sorry, you lost me
<riceandbeans>
and statement.close?
Kendos-Kenlen has joined #ruby
northfurr has quit [Quit: northfurr]
jessemcgilallen has joined #ruby
<drbrain>
SirFunk: third option, in your module, define the methods you need to raise NotImplementedError
<jhass>
imperator: the whole "neat method access api" idea
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<drbrain>
you'll need to `if defined? super then super else raise NotImplementedError end` in case the method comes from a parent, which is a bit annoying
dmolina has quit [Read error: Connection reset by peer]
jackjackdripper has quit [Quit: Leaving.]
devoldmx has quit [Ping timeout: 240 seconds]
Soda has quit [Remote host closed the connection]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
eminencehc has quit [Remote host closed the connection]
milhouse` has quit [Remote host closed the connection]
sankaber has quit [Remote host closed the connection]
<jhass>
riceandbeans: why shouldn't you?
balazs has joined #ruby
sankaber has joined #ruby
pharaoh2 has joined #ruby
<drbrain>
riceandbeans: yes, you should close them
skweek has joined #ruby
tinyhippo is now known as Narcissus
jenrzzz has quit [Ping timeout: 256 seconds]
<riceandbeans>
both the statements and the clients?
simplyianm has quit [Remote host closed the connection]
axl_ has quit [Quit: axl_]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
imperator: well, but your options are define_singleton_methods and/or making sure to return your delegator class instead of OpenStruct (and in the latter case you could also let have that state and check in MethodMissing whether to return hash or a new instance)
<jhass>
it's quite a bit of work for questionable benefit
riotjones has joined #ruby
Zai00 has joined #ruby
futilegames has quit [Quit: futilegames]
skade has quit [Quit: Computer has gone to sleep.]
jenrzzz has joined #ruby
RobertBirnie has joined #ruby
Narcissus is now known as tinyhippo
blackmesa has joined #ruby
fullofcaffeine has joined #ruby
milhouse` has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
p0wn3d_ has joined #ruby
nonnatus has quit [Ping timeout: 255 seconds]
p0wn3d__ has quit [Read error: Connection reset by peer]
tvon has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
riotjones has quit [Ping timeout: 240 seconds]
Zai00 has quit [Quit: Zai00]
skade has joined #ruby
Akuma has joined #ruby
milhouse` has left #ruby [#ruby]
milhouse` has joined #ruby
djbkd_ has joined #ruby
skade has quit [Client Quit]
atmosx has quit [Quit: WeeChat 0.4.4-dev]
aquiles has quit [Ping timeout: 268 seconds]
Zai00 has joined #ruby
pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
milhouse` has quit [Client Quit]
tvon has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
claw has joined #ruby
bricker has quit [Ping timeout: 268 seconds]
<imperator>
jhass, yeah, i'm going to punt on it
<imperator>
easier to just define an instance method on an as-needed basis
patchedmonkey has joined #ruby
Zai00 has quit [Client Quit]
pharaoh2 has joined #ruby
baweaver has quit [Remote host closed the connection]
Zai00 has joined #ruby
djbkd_ has quit [Ping timeout: 265 seconds]
fantazo has quit [Ping timeout: 240 seconds]
prestorium has joined #ruby
aquiles has joined #ruby
skweek has quit [Remote host closed the connection]
tvon has quit [Ping timeout: 256 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has joined #ruby
jackjackdripper has joined #ruby
djbkd has quit [Remote host closed the connection]
platzhirsch has quit [Ping timeout: 264 seconds]
shoutsid has quit []
cornerma1 has joined #ruby
<postmodern>
is there a shorter way of writing: File.read(File.expand_path('../file_in_same_directory'))
djbkd has joined #ruby
<postmodern>
er File.read(File.expand_path('../file_in_same_directory',__FILE__))
djbkd has quit [Read error: Connection reset by peer]
fullofcaffeine has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
<craysiii>
array.each { |hash| hash[key] = value } should work.
icarus_ is now known as icarus
eminencehc has joined #ruby
mrburied has joined #ruby
<goldfish6744>
craysiii, thank you. Why didn't mine work, could you also tell?
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
InternetFriend has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
patchedmonkey has quit [Ping timeout: 265 seconds]
pocketprotector- has joined #ruby
aaeron has joined #ruby
dreinull75 has joined #ruby
<ishikawa91>
because you did << instead of = i believe
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ishikawa91>
item is a hash, not an array, where << pushes a new object into an array
hephaestus_rg has joined #ruby
mwlang has quit [Quit: mwlang]
<craysiii>
i believe when you shovel to a hash, you have to provide a hash. so something like.. array.each { |hash| hash << { key: value } }
<craysiii>
i could be wrong though..
<jhass>
you are ...
<pipework>
Nope.
<pipework>
You can't shovel a hash.
<ishikawa91>
i thought shovel was only array
<craysiii>
stackoverflow seems to think otherwise
<pipework>
Anything can support #<<
Kendos-Kenlen_ has joined #ruby
<ishikawa91>
well, you can always extend ha. But by default it only works with array, right?
<jhass>
craysiii: you misunderstood the answer then, sorry
<goldfish6744>
well, I tested, the items.each {|item| item["price_fetch_time"] = Time.now} still doesn't put such a key into the hashes in the array
<pipework>
Docs say otherwise.
<goldfish6744>
what am I doing wrong?
<pipework>
Runtime says otherwise.
<jhass>
goldfish6744: provide a minimal, self contained sample that reproduces your problem
<craysiii>
care to provide a link to said docs?
Kendos-Kenlen_ has quit [Client Quit]
<pipework>
craysiii: How can I link to a doc that doesn't exist?
sudiptamondal has joined #ruby
<craysiii>
pipework: Docs say otherwise.
<pipework>
craysiii: Yup, the docs say that << does not exist on Hash.
<jhass>
craysiii: yeah, you have to prove existence, not we no existence
baweaver has joined #ruby
<pipework>
Use devdocs, install ruby, rails, and whatever else you use, search that for Hash.<<
<pipework>
. will cover class and instance methods.
<goldfish6744>
jhass, I cannot, sorry. I don't understand classes, and you'd need to have the script download a ~25Mb amount of data from a remote web server
rikai has quit [Ping timeout: 252 seconds]
<jhass>
goldfish6744: no
ttilley has joined #ruby
<goldfish6744>
how can I tell how many hashes are there in an array?
<pipework>
eam: also negatory. I'm not hip with the cool filesystems these days.
<eam>
^^ that'll lock up any such system
codeurge has joined #ruby
<goldfish6744>
jhass, should I post the db_a.txt as well?
bruno- has quit [Quit: Lost terminal]
zayaman has joined #ruby
<jhass>
goldfish6744: sorry, future prediction device is broken atm, I have no idea
<baweaver>
eam: care to explain?
<baweaver>
overwrites all files with etc/passwd?
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam>
doesn't hurt /etc/passwd, but it triggers a lock inversion bug in xfs on the /some/file/on/xfs file
lkba_ has joined #ruby
DanKnox has joined #ruby
agit0 has joined #ruby
bruno- has joined #ruby
havenwood has joined #ruby
<pipework>
eam: So, there's a thread with two loops, one of which copies the file to the new file name location, then another loop that opens the new file?
diegobiavati has quit [Ping timeout: 264 seconds]
<eam>
yeah, and the key here is that on ruby >2.2, copy_file is implemented with sendfile()
<eam>
which is necessary to trigger the bug
<eam>
ruby's one of the few runtimes that seems to be really working on using zero-copy in its i/o primitives
lkba has quit [Ping timeout: 246 seconds]
DroidBurgundy has quit []
<shevy>
eam is like a language detective - he finds the culprits responsible for the crime (== bug)
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
HAL2328 has joined #ruby
HAL2328_ has quit [Ping timeout: 256 seconds]
<pipework>
eam: Huh, so if I understand, there's a problem where there's a lock on the file due to the copying, and the opening wants to get the lock on the file, but on XFS and ruby >2.2, the lock isn't released by the previous holder for the next?
Technodrome has quit [Quit: Technodrome]
ddtblues has joined #ruby
<baweaver>
If eam and Ox0dea ever teamed up, no one could stop them
<ddtblues>
Good evening :)
wuiiuam has quit [Quit: Leaving]
fullofcaffeine has quit [Remote host closed the connection]
<eam>
pipework: two locks on the file, and with this interaction they're acquired and released in the wrong order
barhum2013 has quit [Quit: barhum2013]
<pipework>
eam: Oh, that is funny.
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pipework>
eam: Whose fault is it?
NeverDie has joined #ruby
<eam>
xfs/linux ultimately - ruby provokes it because it uses cutting edge linux features
blackjid has quit [Max SendQ exceeded]
<craysiii>
dont cut yourself on that edge.
<eam>
we encountered it in the "logging" gem
blackjid has joined #ruby
michaeldeol has joined #ruby
<eam>
and there's also some code somewhere in the rails asset pipeline that seems to trigger it
<eam>
basically, if zero-copy + file truncation happen at once
<ishikawa91>
@goldfish6744 is that `mapper` right after the first items.each do |i| statement a typo?
hectortrope has quit [Remote host closed the connection]
<pipework>
eam: Huh, got a bug report lurking around?
<eam>
I haven't send the ruby specific bits to that public list yet, still discussing internally
<pipework>
eam: Why is it private, just curious?
<eam>
*shrug* RHEL support is private
<eam>
paid support
<pipework>
Oh!
<craysiii>
that page crashed my chromium lol
<eam>
we're sharing our findings on our end
Gmi has quit [Client Quit]
agit0 has quit [Ping timeout: 268 seconds]
<goldfish6744>
@ishikawa91: no clue
djbkd_ has joined #ruby
<ishikawa91>
try removing that, it doesn't do anything anyway as its just a hash itself
blackjid has quit [Max SendQ exceeded]
acke_ has quit [Remote host closed the connection]
diegobiavati has joined #ruby
<eam>
I'll send the ruby stuff now though
blackjid has joined #ruby
baweaver has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
mrburied has quit [Quit: Leaving]
<adaedra>
ruby ruby ruby
system64 has quit [Quit: Connection closed for inactivity]
InternetFriend has joined #ruby
<goldfish6744>
ishikawa91, I removed it but it changes nothing, the price_fetch_time key isn't inserted, at least not when I check with puts items.first
baweaver has joined #ruby
blackjid has quit [Max SendQ exceeded]
djbkd_ has quit [Ping timeout: 250 seconds]
blackjid has joined #ruby
wldcordeiro has quit [Quit: WeeChat 0.4.2]
wldcordeiro has joined #ruby
fullofcaffeine has joined #ruby
<goldfish6744>
if I do items.first["price_fetch_time"] = Time.now, then it gives what I want, but obviously only for the first item
<goldfish6744>
but that only on the pry command line
<pipework>
eam: Neat read!
diegoaguilar has quit [Ping timeout: 260 seconds]
diegobiavati has quit [Ping timeout: 256 seconds]
atmosx has joined #ruby
<darix>
eam: tracking down things like that is fun
dasher00 has joined #ruby
<eam>
yes indeed
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
havenwood has quit [Ping timeout: 240 seconds]
<eam>
less fun for ops who have to reboot hosts that encounter it until we fix it
RobertBirnie has joined #ruby
freerobby has quit [Quit: Leaving.]
dopie has quit [Quit: Leaving]
yalue has quit [Quit: return 0;]
djbkd has quit [Read error: Connection reset by peer]
<Ebok>
Alright, how do you setup up a conditional variable within a method? Such as def method(cross,hash) where hash may or may not be mentioned in the call code?
matp has quit [Ping timeout: 246 seconds]
djbkd has joined #ruby
matp has joined #ruby
hephaestus_rg has quit [Ping timeout: 256 seconds]
<eam>
darix: it has unbounded memory use in some cases?
syath has quit [Quit: WeeChat 1.2]
<eam>
that's gonna suck if reparing a FS consumes memory relative to the size of the volume
<darix>
i would need to look up the details. but we had cases where xfs_repair had issues with that.
<eam>
I believe it
<darix>
but in any case XFS >>> * for most cases
<goldfish6744>
doesn't that ultimately mean that the repair method is actually untrustable?
<Ebok>
Hm one more simple question. If I wanted to multiply a string, but add a space between each automatically... string * x obviously wont do it. is there something on the lines of string *3(' ')?
<darix>
goldfish6744: no it means they had a bug in the code. which was later fixed.
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
based_pdev_ has joined #ruby
<adaedra>
>> Array.new(3) { "Hello" }.join(", ")
<eam>
it's pretty easy to do something that uses memory which scales with some dataset which -- oops, some 1% of your customers have such a big dataset that you can't hold it in RAM
keen___________7 has quit [Read error: Connection reset by peer]
allcentury has quit [Ping timeout: 240 seconds]
keen___________7 has joined #ruby
maletor has joined #ruby
<shevy>
"containing 12 4 TB disks"
<shevy>
hmm
<darix>
eam: dafuq ... who wouldnt use rsync for that?
<shevy>
I have 500 gig on my harddisc
<eam>
I have a similar writeup that I need to send out, involving the fact that fork()'s cost is linear with respect to the memory allocations in the parent
<shevy>
now I feel so excluded after eam's link :(
<eam>
darix: rsync will blow up too, for similar reasons
<darix>
hmhm
<eam>
having to break rsync into small subtrees is an old, old dance
based_pdev has quit [Ping timeout: 250 seconds]
pwnd_nsfw has quit [Ping timeout: 240 seconds]
Porfa has joined #ruby
TheWhip has joined #ruby
<eam>
with fork, what we found was that certain types of VMs were orders of magnitude faster/slower -- likely due to TLB structure
<eam>
difference was rspecs taking 3 minutes vs 30
<eam>
even on "slower" hardware
hephaestus_rg has joined #ruby
<shevy>
well eam's article also shows that "less is more" when wishing to store data!!!
Kendos-Kenlen has joined #ruby
<eam>
there's a particular bug that bites me when I use rsync and I wonder if it's been fixed. I should test it
<eam>
you used to be able to mmap a file on linux, make a change, and the mtime of the file would not update (even after close())
<eam>
and the first thing rsync does by default is an mtime check ...
<darix>
rsync --checksum time?
<eam>
yeah you can disable it, but if you don't know to do that you're in trouble
<darix>
for every FS if i really care about the data the last run is with --checksum :)
tomphp has joined #ruby
matp has quit [Ping timeout: 240 seconds]
subshad has joined #ruby
<darix>
you know like mail stores and such
<eam>
yeah
willardg has joined #ruby
<atmosx>
eam: great read, the gnu.org msg
patchedmonkey has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ebok>
Oh, I guess I've another stupid question. If I've string with punctation and I just want to look at the words, is there a way to quickly exclude all punctation?
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<baweaver>
Ebok: look into the Ruby string documentation
<Ebok>
Fairenough
<baweaver>
String#delete
idefine has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
<baweaver>
or gsub
djbkd_ has quit [Ping timeout: 250 seconds]
freerobby has joined #ruby
fullofcaffeine has joined #ruby
<baweaver>
learning to read through docs is valuable in learning the language. I'll tell you what to look for, but giving a straight answer won't teach you much.
<pipework>
You'll also learn a lot more than you initially intended!
acke has quit [Ping timeout: 240 seconds]
<Ebok>
Yeah. I spend a lot fo time in Ruby Doc
<Ebok>
I'll just spend some more.
idefine_ has quit [Ping timeout: 240 seconds]
<baweaver>
Enumerable and String are the big ones
<pipework>
Ebok: Check out https://devdocs.io/ for collated and even offline docs.
<baweaver>
get good with those and you've covered a lot of what you need for basics
SenpaiSilver has joined #ruby
grenierm has joined #ruby
grill has quit [Ping timeout: 250 seconds]
tvw has joined #ruby
<Ebok>
I've been handling all non letters in my strings so far by creating methods that check .ord for 97-+26
<Ebok>
>_>
djcp has quit [Ping timeout: 244 seconds]
<Ebok>
def letter?(char)
<Ebok>
Just seems so cumbersome
fullofcaffeine has quit [Ping timeout: 272 seconds]
beauby has joined #ruby
havenwood has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
spider-mario has quit [Remote host closed the connection]
solocshaw1 has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
jaequery has joined #ruby
codeurge has joined #ruby
solocshaw has quit [Remote host closed the connection]
solocshaw1 is now known as solocshaw
jaequery has quit [Max SendQ exceeded]
SCHAAP137 has quit [Quit: Leaving]
jaequery has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
wldcordeiro has quit [Quit: WeeChat 0.4.2]
wldcordeiro has joined #ruby
hephaestus_rg has quit [Quit: leaving]
yfeldblum has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
ndrei has joined #ruby
squiter has joined #ruby
jessemcgilallen has joined #ruby
ngscheurich has quit [Ping timeout: 244 seconds]
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codeurge has joined #ruby
northfurr has quit [Quit: northfurr]
sudiptamondal has quit [Ping timeout: 252 seconds]
<Ebok>
Hrm
Rickmasta has joined #ruby
<Ebok>
I have no idea how to even use [:alpha:] [:upper:] or the like.
<drbrain>
you put them in a character class
havenwood has quit [Ping timeout: 250 seconds]
codeurge has quit [Client Quit]
<drbrain>
>> "a" =~ /[[:alpha:]]
<ruboto>
drbrain # => /tmp/execpad-c64b8dabe17b/source-c64b8dabe17b:2: unterminated regexp meets end of file ...check link for more (https://eval.in/447396)
jackjackdripper has quit [Ping timeout: 264 seconds]
jakobhans has quit []
sentionics has joined #ruby
Vile` has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mkosaki has joined #ruby
<sentionics>
Are there any good videos for people who already know how to program who'd like to rapidly gloss past the familiar basics? A fast paced tutorial on ruby
<sentionics>
say, if a person is an experienced Python programmer.
yes`r has quit [Ping timeout: 268 seconds]
`tim` has joined #ruby
<sentionics>
or is it better to just read written tutorials instead?
Technodrome has joined #ruby
Spami_ has joined #ruby
<craysiii>
i came from python and just read tutorials. then again i don't like videos.
<pipework>
sentionics: Use what's most valuable to you.
Spami has quit [Ping timeout: 240 seconds]
northfurr has joined #ruby
<sentionics>
I tried a few vids on youtube, but I just got impatient. Spending 10 minutes to only do print "hello world" and puts "hello world" is a bit much.
pocketprotector- has quit [Ping timeout: 265 seconds]
<sentionics>
I just want something really brief. Is there an excellent crash course written tutorial?
<Zarthus>
i managed to jump in quite quickly following the ruby tutorial thing skipping through most and then just hacking away
<Zarthus>
the rest was referencing to docs where appropriate
sudiptamondal has quit [Ping timeout: 240 seconds]
<sentionics>
Besides web dev, does Ruby have any other really strong areas? I think it was VLC player that was coded in ruby. Is ruby great for GUI's?
<pipework>
sentionics: egh, it's not our greatest strength.
ericjphillips has joined #ruby
lxsameer has quit [Quit: Leaving]
lessless has joined #ruby
ruby-lang045 has joined #ruby
Azure has quit [Remote host closed the connection]
<shevy>
sentionics same as perl
grenierm has quit [Quit: grenierm]
Spami has joined #ruby
<shevy>
sentionics VLC is written in C
Spami_ has quit [Ping timeout: 256 seconds]
<shevy>
sentionics work through https://pine.fm/LearnToProgram/chap_01.html as quickly as possible, it is easy; afterwards you know how to write classes, use blocks procs, define methods etc...
Spami has quit [Client Quit]
<sentionics>
ah, I may have jumped to conclusions, I'm probably mistaking the rubyw.exe instances in my taskmanager for something else, I've got quite a bit open at the moment.
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sentionics>
Thanks a lot, shevy!
rcvalle has quit [Quit: rcvalle]
djbkd has quit [Remote host closed the connection]
<sentionics>
Also, in Python Twisted is favored over sockets, is there a similar situation with Ruby's network I/O libs?
<shevy>
not sure if there are advanced gems, normally the default ruby core/stdlib should suffice for sockets in general
<pipework>
sentionics: What are you asking for? An evented system?
idefine has quit [Remote host closed the connection]
rushed has joined #ruby
<sentionics>
I have a bit of interprocess communication going on in some of my applications.
<shevy>
require 'socket'; s = TCPSocket.open(host, port)
<sentionics>
I usually just use udp between processes to transfer data/commands.
paulcsmith has joined #ruby
datanoise has joined #ruby
<sentionics>
nice, that sounds really simple for net code
symm- has joined #ruby
fullofcaffeine has joined #ruby
northfurr has quit [Quit: northfurr]
ndrei has quit [Ping timeout: 255 seconds]
<darix>
zeromq might be interesting if you want to be flexible
freerobby has quit [Quit: Leaving.]
pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
banister has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
EllisTAA has joined #ruby
northfurr has joined #ruby
pharaoh2 has joined #ruby
<sentionics>
Nice, I thought zeromq was just a python thing. It's really got bindings for a great many langs, didn't know that.
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fullofcaffeine has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
tmtwd has joined #ruby
idefine has joined #ruby
RegulationD has quit [Remote host closed the connection]
devoldmx has joined #ruby
fullofcaffeine has quit [Ping timeout: 240 seconds]