apeiros changed the topic of #ruby to: Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
jacobsmith has quit [Ping timeout: 248 seconds]
nobitanobi has quit [Ping timeout: 245 seconds]
zz_karupanerura is now known as karupanerura
nobitanobi has joined #ruby
jkhwan has quit [Ping timeout: 272 seconds]
nwertman has joined #ruby
kindjal has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
jkhwan has joined #ruby
sparrovv has quit [Remote host closed the connection]
jibi has quit [Quit: .]
akonny has quit [Quit: akonny]
falood has joined #ruby
randomnick_ has quit [Quit: Leaving]
benlieb has quit [Quit: benlieb]
<Lewix> >> a,b = [[1,2],[3,4],[5,6]].transpose;
workmad3 has joined #ruby
mikepack_ has joined #ruby
jbueza has quit [Quit: Textual IRC Client: www.textualapp.com]
<Lewix> Hanmac: nice one
valesk has quit [Ping timeout: 248 seconds]
weszlem has quit []
mikepack has quit [Ping timeout: 246 seconds]
N00D is now known as zz_N00D
mikepack_ has quit [Ping timeout: 272 seconds]
Kilo`byte has quit [Ping timeout: 248 seconds]
Notte has quit []
MrZYX is now known as MrZYX|off
sergicles has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
predator117 has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
Kilo`byte has joined #ruby
nisstyre has quit [Quit: Leaving]
vlad_starkov has joined #ruby
nisstyre has joined #ruby
jacobsmith has joined #ruby
jbueza has joined #ruby
mojjojo has joined #ruby
predator217 has quit [Ping timeout: 246 seconds]
iliketurtles has quit [Quit: zzzzz…..]
lmickh has left #ruby [#ruby]
jbueza has quit [Client Quit]
nisstyre has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 246 seconds]
io_syl has joined #ruby
infecto has joined #ruby
iliketurtles has joined #ruby
Reach has quit [Remote host closed the connection]
23LAAJ7B4 has joined #ruby
funburn has joined #ruby
aspires has quit [Quit: sudo making a sandwich]
jrhorn424 is now known as zz_jrhorn424
araujo has quit [Read error: Connection reset by peer]
7CBAAFL1Y has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
aspires has joined #ruby
maroloccio has joined #ruby
wordswords has joined #ruby
johnnyfuchs has joined #ruby
Beoran_ has joined #ruby
johnnyfuchs has quit [Client Quit]
<wordswords> is there a problem with having a module that you put loads of classes into? ie: https://gist.github.com/wordswords/7555192
jb41 has quit [Quit: leaving]
<wordswords> or should you just have one module block in your application?
<wordswords> (per module)
CaptainJet has quit []
<shevy> no there is no problem
CaptainJet has joined #ruby
Beoran__ has quit [Ping timeout: 252 seconds]
<shevy> I myself tend to however put only one class per .rb file
<shevy> ruby parser won't care either way, all that belong to a namespace will be gathered in one, whether there is only one .rb file or a million
Kilo`byte has quit [Ping timeout: 248 seconds]
jerius has joined #ruby
Guest71745 has joined #ruby
Tarential has quit [Excess Flood]
Davey has joined #ruby
<wordswords> if everything is in a module statement in file 1 and it wants to inherit from a class in the same named module block in file 2, do I ever need to do something like this class A < MyModule::class B ?
<wordswords> or does it dump everything in same named module blocks into one scope?
Tarential has joined #ruby
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
Liquid-- has quit [Quit: Computer has gone to sleep.]
<wordswords> so they are both classes in the same module, just defined in different module blocks in different files
<wordswords> different module blocks with identical names of course, so is that the same module block?
<wordswords> I am a bit confused
whunt has quit [Quit: Computer has gone to sleep.]
tkuchiki has quit [Remote host closed the connection]
Guest71745 has quit [Quit: leaving]
whunt has joined #ruby
Kilo`byte has joined #ruby
<LiquidInsect> wordswords: this may be helpful to you http://cirw.in/blog/constant-lookup
<LiquidInsect> short answer: you shouldn't need to reference the module you've opened and are currently within
nari has joined #ruby
<wordswords> thanks
<LiquidInsect> constant lookup should see A is defined in MyModule
jkhwan has quit [Ping timeout: 272 seconds]
jlast_ has joined #ruby
jlast has quit [Read error: Connection reset by peer]
tsykoduk is now known as zz_tsykoduk
postmodern has quit [Quit: Leaving]
hogeo has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
QKO has quit [Read error: Operation timed out]
<shevy> wordswords first, that is not valid ruby syntax you used
jkhwan has joined #ruby
<shevy> second, if you are in the same namespace, which is determined solely by the name(s) you use, then there is no need to refer absolutely via :: (as in Name1::Name2)
<shevy> you should be able to see it here:
QKO has joined #ruby
<shevy> >> module A; end; module A; class B; def test; puts 'this is test...'; end; end; end; module A; class C < B; end; end; A::C.new.test
<eval-in> shevy => this is test... ... (https://eval.in/70135)
<shevy> and it does not matter if you use one .rb file or a million .rb files
jbhewitt_ has joined #ruby
<shevy> hmmm
<shevy> got a question
<shevy> if there are no functions in ruby
<shevy> why is there a method called module_function ?
nfk has quit [Quit: yawn]
vlad_starkov has quit [Read error: Connection reset by peer]
* LiquidInsect look up that method
* LiquidInsect back away from it slowly
<LiquidInsect> I suppose that has its uses...
<IceDragon> because sometimes we are lazy to write "def self.function_name"
<LiquidInsect> so... it makes what would normally be an instance method available on the module's singleton?
<LiquidInsect> or class << self... but why have it available in both places?
<shevy> module_function is pretty cool, I am trying to understand the difference between module_function and extend self (both within a module) right now
mikecmpbll has joined #ruby
<shevy> LiquidInsect, yeah that I am wondering as well
i_s has quit [Remote host closed the connection]
<IceDragon> class << self opens the module's Singleton class
sailias has joined #ruby
<shevy> if there are 100 ways to do something, but they are not 100% the same...
<LiquidInsect> don't think there is one. Well. module_function lets you name specific ones. "extend self" would put EVERYTHING on the singleton
<shevy> right but
nisstyre has joined #ruby
<shevy> if you put module_function on top of the file, all subsequent methods will be class methods as well
<LiquidInsect> ?
<LiquidInsect> oh!
<LiquidInsect> wtf
<shevy> a moment, lemme test something...
<LiquidInsect> ok. That's... that's just weird.
<LiquidInsect> I mean, again, I'm sure someone has had a use for it
mikecmpbll has quit [Client Quit]
robustus has quit [Ping timeout: 264 seconds]
VTLob has quit [Quit: VTLob]
jonahR has joined #ruby
<LiquidInsect> for like... lookup methods and so on. So you can call MyClass.number_of_angels_on_a_pinhead, or MyClass#number_of_angels_on_a_pinhead
<LiquidInsect> but I'm not sure WHY you'd need it in both places
<shevy> ok...
<nobitanobi> I have a question here...Say you have a Module that defines an (instance) method 'my_method'. Once you mix that module into a class, how do you usually go on managing name collision?
<shevy> here it is: http://pastie.org/8494184
<shevy> both output the same
<shevy> as far as I can see, both also do the same
<shevy> but maybe I am not seeing something?
<shevy> nobitanobi can there be name "collisions"?
<nobitanobi> well, not a "collision"
<nobitanobi> sorry, but language
<shevy> nobitanobi you can check whether a method exists
ehaliewicz has quit [Ping timeout: 245 seconds]
<LiquidInsect> sure. name some method the same thing in two places... it's going to call the first one it finds in the chain
jerius has quit [Quit: Computer has gone to sleep.]
robustus has joined #ruby
tkuchiki has joined #ruby
<shevy> nobitanobi I guess you want to do conditional includes? as in "if my class does not have this method, mix it in, otherwise do not mix it in" ?
<nobitanobi> I mean, if my class has a method called my_method, and I mix a module which has a method name also named my_method. The class one will be chosen, but I might want to refer to the Module one.
jkhwan has quit [Remote host closed the connection]
falood has quit [Remote host closed the connection]
<nobitanobi> I see
jkhwan has joined #ruby
<shevy> LiquidInsect cool that you remember that rule off-hand, I would have to look it up :)
<LiquidInsect> shevy: method lookup is pretty useful to know
mlpinit has quit [Remote host closed the connection]
<shevy> if I would have trusted my brain, I would have said "last to come, first to serve" :P
<LiquidInsect> sec... I saw a good blog about it
<nobitanobi> shevy, I'm doing refactoring of a huge project, that it's super procedural. Trying to organize it with Modules and yeah
<shevy> but it's first come, first serve
<LiquidInsect> "No, I don’t know how refinements work. No-one does." :D
falood has joined #ruby
mlpinit has joined #ruby
<shevy> that blog is funny
<shevy> it uses ascii to point at things
<LiquidInsect> really wish we'd move up to 2.0... I've run into a few places where I'd like to be able to use prepend
rickruby has quit [Remote host closed the connection]
<shevy> ruby can be quite complex
<LiquidInsect> and have to do the Rails alias_method_chain BS instead :/
<shevy> haha
fgo has quit [Remote host closed the connection]
paul_k_ has joined #ruby
soxet has joined #ruby
sevenseacat has joined #ruby
paul_k_ has quit [Remote host closed the connection]
<IceDragon> shevy: http://pastie.org/8494193
jkhwan has quit [Remote host closed the connection]
<IceDragon> :[ I made a mistake on the last module..
atno has quit [Ping timeout: 248 seconds]
<IceDragon> doesn't matter though
jkhwan has joined #ruby
rickruby has joined #ruby
rickruby has quit [Remote host closed the connection]
falood has quit [Remote host closed the connection]
atno has joined #ruby
<shevy> hmmm
<shevy> you added a third way
paul_k has quit [Ping timeout: 246 seconds]
jkhwan has quit [Read error: Connection reset by peer]
<IceDragon> fixed: http://pastie.org/8494199
jkhwan has joined #ruby
Kilo`byte has quit [Ping timeout: 252 seconds]
<IceDragon> only the extend method will allow you to recycle the method in the child class
<shevy> hmm
ssvo has quit [Ping timeout: 245 seconds]
svennidal has quit [Remote host closed the connection]
<shevy> so one difference is in inheritance
zeade has quit [Quit: Leaving.]
<IceDragon> yeah
osvico has quit [Ping timeout: 272 seconds]
<shevy> ok but inheritance aside
<shevy> if you use these only as standalone modules
<shevy> is there a difference between these three?
mlpinit_ has joined #ruby
<shevy> because they all seem to yield the same output
otherj has quit []
<LiquidInsect> no... but that's a weird way to use modules
<IceDragon> not that I know of, just 3 ways to skin the same cat.
<shevy> LiquidInsect haha :D 3 different ways to do the same...
<shevy> omg I don't want to skin a cat :<
<shevy> can I skin a rabbit instead?
<LiquidInsect> I do
Monie has joined #ruby
<LiquidInsect> mine crapped next to the door this morning..
<IceDragon> no shevy I like rabbits!
<IceDragon> ;-;
<IceDragon> how about a cow?
<shevy> hmm
<shevy> too big
<IceDragon> hmm
<IceDragon> a snake?
<LiquidInsect> easy, they can do that themselves
<shevy> yeah, that's ok
* IceDragon looks at Python with ruby knife...
<shevy> they are evil anyway
<IceDragon> B)
<shevy> LiquidInsect haha good point
javos has joined #ruby
jerius has joined #ruby
<LiquidInsect> aha... actually
Kilo`byte has joined #ruby
<LiquidInsect> if you NAME the function you're using
<LiquidInsect> it should work differently
tylersmith has quit [Remote host closed the connection]
<LiquidInsect> it would work more like the "extend self" version
jkhwan has quit [Ping timeout: 272 seconds]
EvanR__ has joined #ruby
<LiquidInsect> "Module functions are copies of the original, and so may be changed independently."
<IceDragon> so module_function behaves differently depending on where and how its used...
<LiquidInsect> think so
<LiquidInsect> so
<LiquidInsect> trying something
mlpinit has quit [Ping timeout: 248 seconds]
Jetchisel has joined #ruby
<LiquidInsect> hm... nope.
<LiquidInsect> Still not available from the instance
<IceDragon> bug?
<LiquidInsect> nah
<IceDragon> I'll just stick with extend self
jmimi has quit [Ping timeout: 245 seconds]
<IceDragon> never let me down before
sailias has quit [Ping timeout: 272 seconds]
Kabaka has quit [Quit: s/Kabaka//]
<LiquidInsect> I prefer just leaving them alone and calling extend MyModule on the receiving class for a case like that. But... it's Ruby, not Python. Do what works.
Jamo_ is now known as Jamo
23LAAJ7B4 has quit [Read error: Connection reset by peer]
RichardBaker has quit [Quit: RichardBaker]
soxet has quit [Quit: Leaving]
<shevy> hehe
MrPot4to has joined #ruby
<shevy> is the distinction between private and non-private very useful when you design your projects?
<LiquidInsect> yes
<shevy> (in ruby)
<LiquidInsect> omg yes
<shevy> why?
dachi has quit [Ping timeout: 250 seconds]
Mars` has quit [Read error: Connection reset by peer]
hololeap has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Mars` has joined #ruby
<LiquidInsect> if you're going to be collaborating... public methods are the surface of your class
<LiquidInsect> your entry points
<LiquidInsect> private methods, you can change the interface around, change the parameters, change what's returned, who cares, nobody else is calling it
i_s has joined #ruby
<LiquidInsect> public methods, you don't change that interface without causing a headache for people working with your class
mojjojo has quit [Quit: mojjojo]
vlad_starkov has joined #ruby
blackmes1 has quit [Ping timeout: 240 seconds]
postmodern has joined #ruby
<LiquidInsect> that means, removing public methods, changing the arity or types of the arguments, type of the object returned (remembering of course that in Ruby type is not class) are things you don't want to do
<LiquidInsect> but go wild with your private methods. That's all yours.
sepp2k1 has quit [Quit: Leaving.]
gigetoo has quit [Ping timeout: 272 seconds]
psyl0n has quit [Remote host closed the connection]
jmimi has joined #ruby
Lewix has quit [Remote host closed the connection]
nanoyak has quit [Quit: Computer has gone to sleep.]
whunt has quit [Quit: Computer has gone to sleep.]
endash has quit [Read error: No route to host]
whunt has joined #ruby
endash has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
estebistec has joined #ruby
otherj has joined #ruby
TaxmanBD has joined #ruby
Kilo`byte has quit [Ping timeout: 248 seconds]
otherj has quit [Client Quit]
sayd has left #ruby ["WeeChat 0.4.2"]
marr has quit [Ping timeout: 264 seconds]
dmiller has joined #ruby
kitak_ has quit [Ping timeout: 246 seconds]
Kilo`byte has joined #ruby
infecto has left #ruby [#ruby]
i_s has quit [Remote host closed the connection]
<Elico> I would like to ask a question about the "pos" method.
<Elico> What kernel method is it using? seek\fseek?
Mars` has quit [Remote host closed the connection]
kristofers has joined #ruby
Mars` has joined #ruby
maletor has joined #ruby
wordswords has quit [Quit: Page closed]
dhruvasagar has joined #ruby
psyl0n has joined #ruby
Mars` has quit [Ping timeout: 272 seconds]
bootcoder has quit [Quit: Konversation terminated!]
psyl0n has quit [Remote host closed the connection]
joschi has quit [Read error: Operation timed out]
bootcoder has joined #ruby
gdifo has joined #ruby
Mars` has joined #ruby
rickruby has joined #ruby
joschi has joined #ruby
eka has quit [Quit: Textual IRC Client: www.textualapp.com]
duggiefresh has joined #ruby
kindjal has joined #ruby
TaxmanBD has quit [Read error: Operation timed out]
rickruby has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
rickruby has joined #ruby
diegoviola has joined #ruby
wormwood has joined #ruby
theRoUS has joined #ruby
jkhwan has joined #ruby
<bnagy> ftell apparently
ner0x has quit [Quit: Leaving]
<bnagy> well.. I mean not on windows
<bnagy> ooh.. actually depends on version
<bnagy> lseek on 2.0.0
mikesplain1 has joined #ruby
porco has joined #ruby
danielcharles has quit [Ping timeout: 252 seconds]
endash has quit [Ping timeout: 245 seconds]
camio has joined #ruby
Davey has quit [Ping timeout: 264 seconds]
Lewis has joined #ruby
Lewix has joined #ruby
danshultz has quit [Ping timeout: 272 seconds]
ewnd9 has joined #ruby
DanKnox is now known as DanKnox_away
<shevy> damn
aspires has quit [Quit: sudo making a sandwich]
saarinen has quit [Quit: saarinen]
<shevy> I feel antiquated now on my 1.9.3
theRoUS has quit [Ping timeout: 264 seconds]
kitak has joined #ruby
amacgregor has quit [Ping timeout: 245 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
amacgregor has joined #ruby
nateberkopec has quit [Quit: Leaving...]
* kiba thinks thinks thinks thinks
jerius has quit [Quit: Computer has gone to sleep.]
<Elico> bnagy: linux ..
<nobitanobi> oh boy. I love Santa Cruz. First rain, and all the college girls running naked
danshultz has joined #ruby
magoo has quit [Ping timeout: 272 seconds]
asteros has quit [Quit: asteros]
nari has quit [Ping timeout: 245 seconds]
<bnagy> Elico: so what I did was looked at http://www.ruby-doc.org/core-2.0.0/IO.html#method-i-pos then hit view source
<Elico> bnagy: I am not good at source in this hour
<Elico> but you are right...
<bnagy> cause io_tell is a macro
<bnagy> just for future ref
<Elico> first ..thanks
<Elico> ok so it's iotell and ioseek
<bnagy> no?
<Elico> both are using a very nice thing if I am not wrong.
<bnagy> #define io_tell(fptr) lseek(flush_before_seek(fptr)->fd, 0, SEEK_CUR)
<Elico> OK
mikesplain1 has quit [Ping timeout: 272 seconds]
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bnagy> caring about which particular system call is being used and not reading source is kind of an unusual combination
<Elico> so all these functions allow the program to define on what bytes based position to start streaming\reading the file from now on,.
<Elico> Which should be not "read from 0 till X in the file to get there"
<Elico> just jump to x position
jacobsmith has quit [Quit: Lost terminal]
lukec has joined #ruby
s2013 has joined #ruby
zz_N00D is now known as CripperZ
jlast_ has quit [Remote host closed the connection]
rickruby has quit [Read error: Connection reset by peer]
rickruby_ has joined #ruby
ckinni has joined #ruby
ravster has quit [Quit: Leaving.]
falood has joined #ruby
tigersharktopus has quit [Ping timeout: 250 seconds]
phinfonet has quit [Quit: exitiing]
lethjakman has quit [Ping timeout: 248 seconds]
vlad_starkov has joined #ruby
tylersmith has joined #ruby
jkline has quit [Quit: jkline]
theRoUS has joined #ruby
rickruby_ has quit [Ping timeout: 245 seconds]
Mars` has quit [Remote host closed the connection]
sergicles has quit [Ping timeout: 246 seconds]
Mars` has joined #ruby
Lewix has quit [Remote host closed the connection]
CripperZ is now known as N00D
tylersmith has quit [Ping timeout: 272 seconds]
nari has joined #ruby
sailias has joined #ruby
Voodoofish430 has quit [Quit: Leaving.]
theRoUS has quit [Ping timeout: 252 seconds]
rezzack has quit [Ping timeout: 245 seconds]
<yeboot> hey I'm going to write up some stuff in ruby, does anyone know a place where people can give me suggestions on more-efficient syntax when I'm done?
jhamon has joined #ruby
ckinni has quit [Quit: Textual IRC Client: www.textualapp.com]
Hanmac1 has joined #ruby
Mars` has quit [Ping timeout: 272 seconds]
psyl0n has joined #ruby
psyl0n has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
ringaroses1 has quit [Ping timeout: 246 seconds]
<shevy> yeah
<shevy> #ruby
<yeboot> how very meta
ckinni has joined #ruby
Davey has joined #ruby
tylersmith has joined #ruby
<CaptainJet> We love showing different syntaxes
lmickh has joined #ruby
s2013 has quit [Ping timeout: 245 seconds]
TaxmanBD has joined #ruby
<sweeper> I'll show you mine if you show me yors
<sweeper> *yours
Hanmac has quit [Ping timeout: 272 seconds]
<yeboot> teehee
nouitfvf has joined #ruby
<shevy> lol
fijimunkii has quit [Ping timeout: 246 seconds]
tylersmith has quit [Remote host closed the connection]
lehcine has joined #ruby
nouitfvf_ has quit [Ping timeout: 265 seconds]
<lehcine> hi all whats thr proper way to install ruby on CENTOS 6.4 x86_64 kvm
reset has quit [Quit: Leaving...]
<sheap> yum?
reset has joined #ruby
<lehcine> we tried sheap
<lehcine> not me
<lehcine> buddy of mine
<lehcine> he couldnt get it installed
root has joined #ruby
root is now known as Guest59197
<sheap> do you know why?
Guest59197 is now known as Ahmed-Gad
DanKnox_away is now known as DanKnox
<lehcine> he ll join in a moment
Mars` has joined #ruby
Soda has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 272 seconds]
Mars` has quit [Remote host closed the connection]
TaxmanBD has quit [Ping timeout: 245 seconds]
TaxmanBD has joined #ruby
Dan has joined #ruby
Mars` has joined #ruby
Dan has quit [Client Quit]
rickruby has joined #ruby
reset has quit [Ping timeout: 252 seconds]
javos has quit [Quit: Leaving...]
pragmatism has quit [Ping timeout: 264 seconds]
kindjal has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<kiba> hmm
<kiba> I am trying to figure out how to insert at specific lines
<yeboot> so chruby/rbenv/rvm; what are the pairs I have to pick and choose, and which are better?
osvico has joined #ruby
<yeboot> or does one install all 3
rickruby has quit [Read error: Connection reset by peer]
rickruby_ has joined #ruby
Mars` has quit [Ping timeout: 245 seconds]
TaxmanBD has quit [Ping timeout: 272 seconds]
s2013 has joined #ruby
CaptainJet has quit []
<banister> any americans here?
Reach has joined #ruby
hopkin is now known as Guest46558
<SirFunk> is there a way if i have an array of arrays like [[1,2],[3,4],[5,6]] that i could get every combination of first and second elements.. eg [[1,2],[1,4],[1,6],[3,2],[3,4]...] ?
<yeboot> lel ragecomics
<yeboot> banister: why do you ask
cburyta has quit [Remote host closed the connection]
hopkin has joined #ruby
<banister> yeboot i'm not american but currently in NYC, i got on a lift and a girl said "are you a frat boy?"
<banister> what does that mean and what did she likely mean by that
endash has joined #ruby
rickruby_ has quit [Ping timeout: 246 seconds]
rickruby has joined #ruby
colonolGron has quit [Quit: leaving]
<Reach> she's probably wondering if you're in a fraternity
<Reach> and probably by the way she asked she doesn't respect that
<Reach> (if you are in one)
<yeboot> banister she wants to know if you are a member of a college fraternity, pop culture would put that as someone who drinks a lot and parties, and skates by in college
jkline has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
jkline has quit [Client Quit]
<yeboot> although in reality, and if she's attended a college with fraternities/sororities, she'd know about academic fraternities, fraternities by major, etc
<yeboot> they're like social clubs for college students to meet other students with similar tastes or studies
<yeboot> but, in movies, they're protrayed as places where manic binge drinking happens, basically non stop house parties for entitled kids
<yeboot> banister: if that explains anything
rickruby_ has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Read error: Connection reset by peer]
<yeboot> banister: similar ideas are aesthetic bros, fitbros, misogynists, etc
<banister> yeboot so it's likely an insult?
<havenwood> SirFunk: Hanmac answered that as well as can be last time you asked...
lehcine is now known as Fadil
<Fadil> are ya here
maroloccio has quit [Quit: WeeChat 0.4.1]
rickruby has quit [Read error: Connection reset by peer]
<Ahmed-Gad> Iam
<Ahmed-Gad> here
<Fadil> ok
<yeboot> banister it depends on the context, if she had asked you in a way that implied she wanted to know you were college educated, and whether or not you had been in a frat
<yeboot> or which frat
<Fadil> they want to know what error you got Ahmed-Gad
<yeboot> or if she said it kind of demeaning, like 'are you a rapist'
<Reach> 'frat boy' sounds kind of derogatory
<yeboot> yeah, it does
<Fadil> trying ta install ruby in CENTOS 6.4 x86_64 kvm
<Ahmed-Gad> I can't install ruby with any method
<yeboot> but I'd still go with context
estebistec has quit [Remote host closed the connection]
<Reach> yeah
<SirFunk> havenwood: ahh.. I had to disconnect from my bnc. It doesn't seem to be in my back log .Will check the channel logs. Thanks
estebistec has joined #ruby
<havenwood> >> a,b = [[1,2],[3,4],[5,6]].transpose; a.product(b)
<eval-in> havenwood => [[1, 2], [1, 4], [1, 6], [3, 2], [3, 4], [3, 6], [5, 2], [5, 4], [5, 6]] (https://eval.in/70142)
j-allen has quit [Quit: j-allen]
<havenwood> SirFunk: ^
<SirFunk> havenwood: thanks
<SirFunk> that is pretty snazzy
ewnd9 has quit [Read error: Operation timed out]
sergicles has joined #ruby
<SirFunk> way more elegant than anything i had thought of
<Fadil> doing yum install ruby
rickruby_ has quit [Ping timeout: 240 seconds]
<Fadil> gave me error no packages avaible
<Fadil> nothing to do
<havenwood> Fadil: yum update
<Fadil> did that too havenwood
<havenwood> Fadil: and no Ruby package?
rickruby has joined #ruby
<Fadil> yes havenwood
<Fadil> no package
paul_k has joined #ruby
estebistec has quit [Ping timeout: 245 seconds]
<havenwood> Fadil: Use RVM? :P
<Fadil> what cmd havenwood
<havenwood> Fadil: I use ruby-install with chruby, works great. RVM is also popular.
Kilo`byte has quit [Ping timeout: 246 seconds]
j-allen has joined #ruby
<havenwood> Fadil: But that is odd, i wonder what repo you aren't tracking with yum.
<sheap> doesn't make sense how centos wouldn't have access to a ruby package...
Mars` has joined #ruby
<hopkin> it's his distro
freezey has quit [Remote host closed the connection]
smathieu has quit [Remote host closed the connection]
j-allen has quit [Client Quit]
<sheap> hopkin, is this one of those cases where it's not in the main repo's?
smathieu has joined #ruby
<Fadil> hm ok
rickruby_ has joined #ruby
<havenwood> Fadil: Looks like some cpanel centos folk suggest: /scripts/installruby
<hopkin> yeah he might have one of those weird repos
<havenwood> Fadil: why no yum package is beyond me
saarinen has joined #ruby
rickruby has quit [Read error: Connection reset by peer]
<Ahmed-Gad> how can i use rvm in Centos 6.4
<Ahmed-Gad> ????
<havenwood> Fadil: But RVM is easy. And ruby-install and chruby are elegant, if you have a few minutes to set it up properly.
<havenwood> Ahmed-Gad: http://rvm.io/rvm/install
<Ahmed-Gad> instruction please
mercwithamouth has joined #ruby
<havenwood> Ahmed-Gad: no, read them
<Fadil> lets read first Ahmed-Gad
<Ahmed-Gad> I will try
whunt has quit [Quit: Computer has gone to sleep.]
heidi has quit [Quit: Leaving.]
estebistec has joined #ruby
<Ahmed-Gad> On the root user ,right ?
Kilo`byte has joined #ruby
<havenwood> Ahmed-Gad: Use a Single-User installation
rickruby has joined #ruby
rickruby_ has quit [Read error: Connection reset by peer]
smathieu has quit [Ping timeout: 252 seconds]
<havenwood> Ahmed-Gad: P.S. - there is an #rvm channel that is quite helpful. (Or #chruby channel if one were to go that route.)
Fadil has quit []
<havenwood> Ahmed-Gad: Nice on Fedora 19, where `yum install ruby` actually installs a nice ruby-2.0.0-p247. :)
<havenwood> Too bad CentOS is sooooo slow with everything...
<Ahmed-Gad> yes
<Ahmed-Gad> very bad
<Ahmed-Gad> CentOS
rickruby_ has joined #ruby
<havenwood> i've heard ScientificLinux is better at keeping up-to-date as far as RHEL community distros, but haven't used
rickruby has quit [Read error: Connection reset by peer]
<havenwood> Ahmed-Gad: RVM pretty much *just works*. If you have trouble or want to actually read the code yourself, ruby-install and chruby are minimalist tools.
nateberkopec has joined #ruby
<Ahmed-Gad> That's good one
s2013 has quit [Ping timeout: 245 seconds]
<sevenseacat> just works for some people, endless nightmares for everyone else
<havenwood> sevenseacat: heh
<havenwood> yeah, <3 chruby
s2013 has joined #ruby
rickruby_ has quit [Read error: Connection reset by peer]
rickruby has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
nari has quit [Ping timeout: 246 seconds]
funburn has quit [Quit: funburn]
deanrock0 has quit [Ping timeout: 245 seconds]
kevinykchan has quit [Quit: Computer has gone to sleep.]
havenwood has quit []
polaco is now known as polaco_zZz
Davey has quit [Read error: Connection reset by peer]
deanrock0_ has joined #ruby
paul_k has quit [Read error: Connection reset by peer]
paul_k_ has joined #ruby
moneydouble1 has joined #ruby
mikesplain1 has joined #ruby
saarinen has quit [Read error: Connection reset by peer]
saarinen has joined #ruby
bradhe has quit [Remote host closed the connection]
moneydouble has quit [Ping timeout: 245 seconds]
gdifo has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
<Reach> there doesn't seem to be many open source projects on github...
psyl0n has joined #ruby
<sevenseacat> no, only every one you can see
Evixion has quit [Read error: Connection reset by peer]
TaxmanBD has joined #ruby
<Reach> oh
<Reach> projects have like... rating requirements?
<sevenseacat> ?
hogeo has quit [Remote host closed the connection]
Evixion has joined #ruby
vlad_starkov has joined #ruby
DanKnox is now known as DanKnox_away
thelorax123 has quit [Remote host closed the connection]
dukedave has joined #ruby
mikesplain1 has quit [Ping timeout: 272 seconds]
thelorax123 has joined #ruby
<dukedave> What's a nice way to take something like [1,1,1,2,2,1,3,3] and get [[1,1,1],[2,2],[1],[3,3]] ?
sheap has quit [Quit: Lost terminal]
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
<yeboot> you mean algorythmically, how to split up a list of values into contiguous chunks of sections of equal values?
TaxmanBD has quit [Ping timeout: 248 seconds]
rickruby has quit [Remote host closed the connection]
nari_ has joined #ruby
saarinen has quit [Quit: saarinen]
hopkin has quit []
Kilo`byte has quit [Ping timeout: 265 seconds]
danshultz has quit [Ping timeout: 248 seconds]
TaxmanBD has joined #ruby
<TaxmanBD> guys quick question please, how do I do something like "unless the key of hash1 == "someUnwantedKey", print keys,value couples"
zeade has joined #ruby
saarinen has joined #ruby
ananthakumaran has joined #ruby
hogeo has joined #ruby
dmiller has quit [Quit: Leaving...]
duggiefresh has quit [Remote host closed the connection]
paul_k_ has quit [Read error: Connection reset by peer]
asteros has joined #ruby
Kilo`byte has joined #ruby
benwoody has quit [Quit: benwoody]
varfoo has joined #ruby
banister has quit [Ping timeout: 264 seconds]
larissa has joined #ruby
heidi has joined #ruby
duggiefresh has joined #ruby
hogeo has quit [Remote host closed the connection]
theRoUS has joined #ruby
mlpinit_ has quit [Remote host closed the connection]
mlpinit has joined #ruby
IceDragon has quit [Quit: Space~~~]
hogeo has joined #ruby
banister has joined #ruby
dhruvasa1ar has joined #ruby
saarinen has quit [Quit: saarinen]
theRoUS has quit [Ping timeout: 252 seconds]
<bnagy> dukedave:
<bnagy> >> [1,1,1,2,2,1,3,3].chunk{|e|e}.map(&:last)
<eval-in> bnagy => [[1, 1, 1], [2, 2], [1], [3, 3]] (https://eval.in/70183)
dhruvasagar has quit [Ping timeout: 246 seconds]
jerius has joined #ruby
mlpinit has quit [Ping timeout: 264 seconds]
soba has joined #ruby
krz has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
forced_request has quit [Read error: Connection reset by peer]
benwoody has joined #ruby
Bry8Star{T2 has quit [Remote host closed the connection]
<PPH> Hey guys, what's the difference of variable = and variable << ?
dukedave has quit [Ping timeout: 245 seconds]
forced_request has joined #ruby
<PPH> I mean... in duck typing... why = doesn't work?
<sevenseacat> one assigns, one appends.
<PPH> so << pass the value to the .<< method of the variable and = overite it?
<PPH> I think I understand
<bnagy> one's a method, one's an operation
<PPH> yeah I understand
cburyta has joined #ruby
<bnagy> NO YOU DON'T LET ME EXPLAIN AGAIN
<PPH> and if i do variable = 'hello' then I do variable = 'world', variable is is assigned to the new value 'world', but 'hello' is still sitting lonely in the memory waiting for some garbage collector to take it away right?
misutowolf has joined #ruby
<PPH> or the string in memory is overwritten by the new one?
amacgregor_ has joined #ruby
n1x has joined #ruby
axilla has quit [Ping timeout: 272 seconds]
asteros has quit [Quit: asteros]
<PPH> I'm scaret I'll face an issue related to this someday... lol
<shevy> PPH you would have to check in GC whether it is garbage collected already or not. this part of ruby is not amenable to your manipulation though
cburyta has quit [Ping timeout: 248 seconds]
macmartine has quit [Remote host closed the connection]
<bnagy> PPH - the first
amacgregor__ has joined #ruby
<DanBoy> lol is this a real question
amacgregor has quit [Ping timeout: 246 seconds]
yfeldblum has joined #ruby
<PPH> well it was:P
jhamon has quit [Quit: jhamon]
<bnagy> PPH - you _can_ do the second, with variable.replace 'world'
porco has quit [Quit: Leaving...]
<PPH> Aight thank you :)
mlpinit has joined #ruby
asteros has joined #ruby
fijimunkii has joined #ruby
amacgregor_ has quit [Ping timeout: 245 seconds]
macmartine has joined #ruby
aapzak has quit [Ping timeout: 272 seconds]
psyl0n has quit [Remote host closed the connection]
dukedave has joined #ruby
nateberkopec has quit [Quit: Leaving...]
aapzak has joined #ruby
fgo has joined #ruby
emdub has quit [Remote host closed the connection]
s2013 has quit [Ping timeout: 245 seconds]
capicue has joined #ruby
funburn has joined #ruby
dhruvasa1ar has quit [Ping timeout: 272 seconds]
amacgregor has joined #ruby
amacgregor_ has joined #ruby
simoz has joined #ruby
EasyCo has joined #ruby
amacgregor__ has quit [Ping timeout: 245 seconds]
<EasyCo> Newb question, can you use the a dash in an unquoted symbol? i.e.: :le-symbol
xcess_denied has joined #ruby
xcess_denied has quit [Read error: Connection reset by peer]
xcess_denied has joined #ruby
krz has quit [Ping timeout: 240 seconds]
<sevenseacat> easy to try it and see
<PPH> I prefer underscore tho:P
zeade has quit [Quit: Leaving.]
jkhwan_ has joined #ruby
Mars` has quit [Remote host closed the connection]
<PPH> Last noob question for tonight: I prefer the example 1 in this gist, am I wrong? https://gist.github.com/ab18556/7557596
amacgregor has quit [Ping timeout: 245 seconds]
hogeo has quit [Remote host closed the connection]
Mars` has joined #ruby
<PPH> example1*
n1x has quit [Ping timeout: 245 seconds]
<sevenseacat> uh.... what?
hogeo has joined #ruby
<sevenseacat> they do not make sense
jerius has quit [Quit: Computer has gone to sleep.]
<PPH> seriously?
<PPH> damn
<PPH> oh I made an error
<PPH> corrected it
lmickh has quit [Quit: lmickh]
jkhwan has quit [Ping timeout: 272 seconds]
<sevenseacat> no you didnt
<sevenseacat> say.hello is not defined
<EasyCo> You're passing hello a param
vlad_starkov has joined #ruby
duggiefresh has quit [Remote host closed the connection]
kristofers has quit [Remote host closed the connection]
<sevenseacat> with a parameter or without
<PPH> wait I see
dr0ff has joined #ruby
jhamon has joined #ruby
rickruby has joined #ruby
Mars` has quit [Ping timeout: 264 seconds]
wesside has joined #ruby
<PPH> Corrected now sorry
hogeo has quit [Ping timeout: 272 seconds]
jhamon has quit [Client Quit]
chomskiii has quit [Read error: Connection reset by peer]
ch0mskiii has joined #ruby
<sevenseacat> ok so you've got two methods that do two different things
<sevenseacat> why are you trying to compare them?
xcess_denied has quit [Quit: Leaving...]
lukec has quit [Quit: lukec]
dukedave has quit [Ping timeout: 264 seconds]
rickruby_ has joined #ruby
<PPH> Well i'm not comparing the method I'm comparing the "pattenr"
porco has joined #ruby
hogeo has joined #ruby
rickruby_ has quit [Read error: Connection reset by peer]
<PPH> pattern*
<sevenseacat> the pattern of appending something to a variable?
<PPH> yeah one when i must pass the variable an the other where i dont
fgo has quit [Ping timeout: 246 seconds]
fgo_ has joined #ruby
<sevenseacat> i dont get what youre trying to compare. they do the same thing, one just does the appending inside a class method
Soda has joined #ruby
rickruby has quit [Ping timeout: 272 seconds]
<PPH> are they both duck typing?
Xiti` has joined #ruby
<PPH> or does anyone of them is duck typing? lol
<sevenseacat> they both are - they assume that example1/var will respond to <<
<shevy> EasyCo yes, partition it inside "" quotes, see
macmartine has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
krz has joined #ruby
<shevy> >> x = :"abc-def"; x.class
<eval-in> shevy => Symbol (https://eval.in/70223)
bradhe has joined #ruby
<sevenseacat> PPH: think of something like `HelloWorld.world(12)`
<shevy> PPH << is simply a method defined in a class, like String or Array or your own class
<PPH> ok so the second one is better because the receicer doesn't need to expect anything
<bnagy> PPH: no, neither of them illustrate the principle
iliketurtles has joined #ruby
macmartine has joined #ruby
<sevenseacat> i dont know what principle he';s trying to demonstrate
<bnagy> otherwise you might as well say that anything that doesn't error handle is duck typing :)
rickruby has joined #ruby
<PPH> bnagy, yeah because I use string every where
<EasyCo> shevy: Yah thanks. That's what It thought. I just read conflicting info about that for Ruby v.2 somewhere
<PPH> but let assume one of them is an array:P
Xiti has quit [Ping timeout: 272 seconds]
<shevy> PPH it all depends whether you need to check or whether you don't
Breno_p has joined #ruby
<shevy> if you place a pyramid on a duck the duck will be dead
BrenoPerucchi has quit [Ping timeout: 265 seconds]
asteros has quit [Quit: asteros]
atno has quit [Ping timeout: 245 seconds]
fgo_ has quit [Remote host closed the connection]
<PPH> shevy, yeah I understand as sevenseacat said if I pass 12 this will fail but if i pass any thing that have the method << it might work
<shevy> PPH your example is weird because you use class methods and you dont seem to store the argument to your method anywhere
<sevenseacat> if you pass it something that responds to << it will work, it might not do what you expect
<sevenseacat> because << does different things for eg. strings and arrays
bradhe has quit [Ping timeout: 246 seconds]
<bnagy> well it won't work
<bnagy> which makes it even less duck typing :)
<bnagy> >> "a" << [] #fail
<eval-in> bnagy => no implicit conversion of Array into String (TypeError) ... (https://eval.in/70232)
heidi has quit [Quit: Leaving.]
nari_ has quit [Quit: Ex-Chat]
<PPH> ok i'll come back with a better example in 2 min:P
<shevy> PPH here is how you can define << on your class:
<bnagy> >> [] << "a" # which one is the duck??
<eval-in> bnagy => ["a"] (https://eval.in/70233)
<shevy> >> class PPH; def <<(i); puts 'I am adding '+i.to_s+' to PPH!'; end; end; PPH.new << 'ok ...'
<eval-in> shevy => I am adding ok ... to PPH! ... (https://eval.in/70234)
sgnl has quit [Quit: Textual IRC Client: www.textualapp.com]
Kilo`byte has quit [Ping timeout: 245 seconds]
stevenhaddox has joined #ruby
nari_ has joined #ruby
Ahmed-Gad has quit [Ping timeout: 252 seconds]
bluOxigen has joined #ruby
danshultz has joined #ruby
jkhwan has joined #ruby
arietis has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
jkhwan_ has quit [Ping timeout: 272 seconds]
stevenhaddox has left #ruby ["Sayonora!"]
stevenhaddox has joined #ruby
Kilo`byte has joined #ruby
agent_white has joined #ruby
estebistec has quit [Read error: Connection reset by peer]
danshultz has quit [Ping timeout: 245 seconds]
estebistec has joined #ruby
jmimi has quit [Ping timeout: 240 seconds]
iliketurtles has joined #ruby
<PPH> Now, this is duck typing. Right? https://gist.github.com/ab18556/7557596
amacgregor_ has quit [Ping timeout: 246 seconds]
<bnagy> no
nobitanobi has joined #ruby
kaspergrubbe has joined #ruby
<PPH> Why?
<bnagy> duck typing is a specific thing, not just any code where two different classes share method names
camio has quit [Quit: Leaving.]
<PPH> array and string does share << lol
<bnagy> it's coding based on the behaviour of the object instead of its class
endash has quit [Quit: endash]
<shevy> PPH why are you so obsessed about duck typing
heidi has joined #ruby
<shevy> and
<shevy> why do you keep on using class methods
<nobitanobi> hihi
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
<shevy> PPH the idea behind duck typing is that you do not have to worry what class something is, as long as it responds to a certain method
moneydouble has joined #ruby
Paradigm_ has joined #ruby
s2013 has joined #ruby
<PPH> EasyCo, I read that... and the chapter in programming ruby:P I think I understand the concept but I don't apply it the right way
<nobitanobi> you can make cows talk, and people fly
<shevy> well, get rid of the class method first
thelorax123 has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
kaspergrubbe has quit [Ping timeout: 246 seconds]
<PPH> That's exactly why I feel it's important I understand it, to make cows fly:P
<shevy> no
<shevy> you can use .is_a? just as well to make cows fly
moneydouble1 has quit [Ping timeout: 272 seconds]
thelorax123 has joined #ruby
<shevy> def foo(i); i = i.join(', ') if i.is_a? Array; @foo << i.to_s; end
RichardBaker has joined #ruby
jkhwan has quit [Read error: Connection reset by peer]
jkhwan has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
xcess_denied has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<shevy> even with duck typing you have to use .respond_to? at least, so you have to make checks anyway
dayepa has quit [Quit: dayepa]
yfeldblum has joined #ruby
<PPH> In programming ruby they say we could rely on the Exceptions... lol
<PPH> Not saying you are wrong
<PPH> they say only verify if you really need to
<shevy> exceptions are sound
<shevy> yes, that is like saying "only add code if you really need to"
fgo has joined #ruby
<shevy> but I am sure they also recommend to use tests
<PPH> of course
<shevy> so they are already past the minimal code required, because you have to also write the code for your tests
TaxmanBD has quit [Ping timeout: 272 seconds]
varfoo has quit [Quit: WeeChat 0.4.0]
cnrk has quit [Ping timeout: 248 seconds]
hogeo has quit [Remote host closed the connection]
DanKnox_away is now known as DanKnox
dayepa has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
jmimi has joined #ruby
rickruby has quit [Remote host closed the connection]
Monie has quit [Ping timeout: 245 seconds]
bricker`LA has quit [Quit: leaving]
benwoody has quit [Quit: benwoody]
Lewix has joined #ruby
Lewix has quit [Changing host]
Lewix has joined #ruby
lethjakman has joined #ruby
DanKnox is now known as DanKnox_away
ananthakumaran has quit [Quit: Leaving.]
magoo has joined #ruby
maletor has joined #ruby
cafhacker has joined #ruby
varfoo has joined #ruby
cafhacker has quit [Read error: Connection reset by peer]
s2013 has quit [Ping timeout: 246 seconds]
banister has quit [Read error: Connection reset by peer]
s2013_ has joined #ruby
aagdbl has joined #ruby
icedp has quit [Ping timeout: 240 seconds]
i_s has joined #ruby
s2013_ is now known as s2013
<PPH> In my other examples I was assuming array and string was doing the duck typing so it was confusing. I think this one is better
wald0 has quit [Quit: Lost terminal]
7CBAAFL1Y has quit [Read error: Connection reset by peer]
MrPot4to has quit [Read error: Connection reset by peer]
<PPH> and i removed the << so there's no more confusion... since I think I understand this have nothing to do with duck typing beside the fact < looks like a duck beak... lol
<PPH> If I'm wrong I abandon:P
MrPot4to has joined #ruby
asteros has joined #ruby
<bnagy> sigh
bradhe has joined #ruby
MrPotato has joined #ruby
dukedave has joined #ruby
<PPH> I almost copyied the wiki!
rickruby has joined #ruby
dnyy has quit []
<bnagy> hoorayyy (jazzhands)
InFlames has quit [Ping timeout: 246 seconds]
Monie has joined #ruby
xcess_denied has quit [Quit: Leaving...]
<bnagy> duck typing is less about realising the different objects may respond to the same method and more about realising that class is less important than whether something can do what you need
<nobitanobi> bnagy, +1
<PPH> Cool I think I got it now... For real! :P Thanks everyone for your patience :)
xxpor__ has joined #ruby
Monie has quit [Ping timeout: 272 seconds]
EvanR__ has quit [Quit: leaving]
vlad_starkov has joined #ruby
__LX__ has joined #ruby
galef0rce has joined #ruby
phansch has joined #ruby
estebistec has quit [Remote host closed the connection]
<galef0rce> hey guys i am almost finished with ruby course at learn code the hard way - was wondering if anyone has any suggestions to learning more ruby afteR? I was thinking about michaels book (cant remember the name right now)
lukec has joined #ruby
<bnagy> galef0rce: now you should learn correct style
asteros has quit [Quit: asteros]
__LX__ has quit [Read error: Connection reset by peer]
Apane has quit [Ping timeout: 264 seconds]
<galef0rce> correct style?
__LX__ has joined #ruby
<galef0rce> is that a course?
ch0mskiii has quit [Ping timeout: 272 seconds]
<bnagy> yeah hardway style is terrible
Liquid-- has joined #ruby
<bnagy> I don't mind the course per se
Mars` has joined #ruby
lethjakman has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
Monie has joined #ruby
<shevy> galef0rce always start to write ruby scripts on your own as soon as possible
baroquebobcat has joined #ruby
<shevy> identify something you want to solve with ruby, then detail smaller subproblems that you can solve in it and tackle them one after the other
bradhe has quit [Remote host closed the connection]
<shevy> galef0rce and also read the pickaxe book
<shevy> but first write code!
<galef0rce> i have to learn the code first :D
bradhe has joined #ruby
ViPi2 has joined #ruby
<galef0rce> got 9 lessons left in hardway
ViPi2 has quit [Max SendQ exceeded]
baroquebobcat has quit [Client Quit]
smathieu has joined #ruby
yacks has quit [Quit: Leaving]
Drewch has joined #ruby
Alina-malina has quit [Quit: Leaving]
lukec has quit [Quit: lukec]
Mars` has quit [Ping timeout: 248 seconds]
__LX__ has quit [Read error: Connection reset by peer]
__LX__ has joined #ruby
<PPH> I guess a rails app to interface and audit cpanels wasn't the best choice I made for my first ruby project then:P
asteros has joined #ruby
<shevy> PPH why not? you can stay within rails and solve things in the rails way
__LX__ has quit [Read error: Connection reset by peer]
<nobitanobi> PPH I started learning Ruby via Rails. Now, I barely use Rails :P
<shevy> haha
<sam113101> similar story for me
<PPH> nobitanobi, what do you use then? a custom framework?
bradhe has quit [Ping timeout: 272 seconds]
__LX__ has joined #ruby
<EasyCo> PHP :p
<PPH> lol
<galef0rce> any ruby course suggestions guys? I am kind've sick of hardway, may just end it early
<nobitanobi> I use Rails on my daily job. But, I prefer learning/doing Ruby on my free time / personal projects
smathieu has quit [Ping timeout: 248 seconds]
macmartine has quit [Remote host closed the connection]
__LX__ has quit [Read error: Connection reset by peer]
fridim_ has quit [Read error: Operation timed out]
__LX__ has joined #ruby
reset has joined #ruby
__LX__ has quit [Read error: Connection reset by peer]
<PPH> galef0rce, read it too http://mislav.uniqpath.com/poignant-guide/ it's cool :P
__LX__ has joined #ruby
Breno_p has quit [Remote host closed the connection]
Kilo`byte has quit [Ping timeout: 272 seconds]
lethjakman has joined #ruby
benlieb has joined #ruby
amh345 has joined #ruby
<PPH> and there's a free onion inside:P
amh345 has quit [Changing host]
amh345 has joined #ruby
Alina-malina has joined #ruby
<amh345> i need to connect to an ftps server. is double-bag-ftps the go-to?
reset has quit [Client Quit]
<galef0rce> ooooooooooooooooo it looks good PPH
<galef0rce> i already like it more then hardway
<nobitanobi> galef0rce, I enjoyed a lot this book http://www.manning.com/black2/ - is from 2009, but really good on my opinion
<galef0rce> ty PPH
<sevenseacat> they're making an updated version of it
<galef0rce> thx nobitanobi ill check it out
<emocakes> yo sevenseacat
<nobitanobi> sevenseacat, awesome!
<emocakes> whats up g?
<PPH> galef0rce, well it's not complete and intended to debutants and 90% of the text is not ruby relevant but it's fun :)
<sevenseacat> hallo emocakes
<emocakes> isnt she awesome nobitanobi
<emocakes> she's swell
<shevy> emocakes! where are my cakes!
asteros has quit [Ping timeout: 264 seconds]
<emocakes> dammit, you again shevy :(
<nobitanobi> emocakes, she is.
<shevy> I shall idle here until I get my cakes
<emocakes> shevy
<emocakes> <3
mweshi has joined #ruby
porco has quit [Quit: Leaving...]
musty_ has joined #ruby
musty_ has left #ruby [#ruby]
__LX__ has quit [Read error: Connection reset by peer]
__LX__ has joined #ruby
porco has joined #ruby
<emocakes> studying microsoft exam
<emocakes> god
<emocakes> why are they so boring
<emocakes> shevy, tell me
havenwood has joined #ruby
<emocakes> what shoud you do first?
Kilo`byte has joined #ruby
kobain has quit []
ananthakumaran has joined #ruby
<EasyCo> Alt+F4
<EasyCo> That always does the trick
<emocakes> lol
<emocakes> bacon
__LX__ has quit [Read error: Connection reset by peer]
macmartine has joined #ruby
__LX__ has joined #ruby
mauro has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Read error: Connection reset by peer]
vaneda has joined #ruby
__LX__ has quit [Client Quit]
asteros has joined #ruby
larissa has quit [Ping timeout: 246 seconds]
fijimunkii has quit [Ping timeout: 272 seconds]
mweshi has quit [Quit: mweshi]
vaneda has quit [Client Quit]
luckyruby has joined #ruby
ehaliewicz has joined #ruby
Xiti` has quit [Quit: Leaving]
Xiti has joined #ruby
xxpor__ has quit [Read error: Connection reset by peer]
jkhwan has quit [Remote host closed the connection]
terrellt has joined #ruby
jkhwan has joined #ruby
<krz> how do i execute a variable's value?
<krz> without using eval
<krz> using send?
sam113101 has quit [Quit: WeeChat 0.4.3-dev]
aep has quit [Read error: Operation timed out]
aep has joined #ruby
mlpinit has quit [Remote host closed the connection]
mlpinit has joined #ruby
<bnagy> what's the value?
jkhwan has quit [Ping timeout: 272 seconds]
jkhwan has joined #ruby
flaccid_ has joined #ruby
sam113101 has joined #ruby
<flaccid_> searching the webs seems hard for dis. ~> what does it mean for operator in terms of version
<flaccid_> does it mean =
TheMoonMaster has quit [Read error: Connection reset by peer]
maletor has quit [Quit: Computer has gone to sleep.]
dukedave has quit [Ping timeout: 248 seconds]
Mars` has joined #ruby
relix has joined #ruby
Kilo`byte has quit [Ping timeout: 265 seconds]
mlpinit has quit [Ping timeout: 272 seconds]
kitak has quit [Ping timeout: 246 seconds]
moneydouble1 has joined #ruby
kitak has joined #ruby
luckyruby has quit [Read error: Connection reset by peer]
_Bravado has joined #ruby
luckyruby has joined #ruby
ezkl has quit [Quit: QUIT!]
moneydouble has quit [Ping timeout: 246 seconds]
Kilo`byte has joined #ruby
porco has quit [Quit: Leaving...]
<s2013> flaccid_, i think it means that atleast that version
<krz> bnagy: 'foobar'
<s2013> something like that. doesnt have to be exact
<krz> should execute def foobar
<krz> send seems to work
Mars` has quit [Ping timeout: 240 seconds]
Bassam has joined #ruby
<flaccid_> s2013: would can't satisfy 'mime-types (~> 1.16)', already activated 'mime-types-2.0' (Gem::LoadError) this be a diff prob then?
<amh345> does ruby 1.9 have an alternative for ftptls.rb? looking to upload via ftps
<shevy> emocakes I would install linux
Bry8Star{T2 has joined #ruby
<shevy> krz you can use .send for that
<shevy> >> def foobar; puts 'hi from foobar';end; send 'foobar'.to_sym
<eval-in> shevy => hi from foobar ... (https://eval.in/70256)
<shevy> amh345 cool, what is that? or where did you find it?
<bnagy> shevy: you can send strings now
vlad_starkov has joined #ruby
<amh345> shevy: i was googlin' around for an ftps lib for ruby 1.9. stumbled across some mention of ftptls.rb- but it looks like 1.8 was it's last appearance. not really turning up any results other than a gem called double-bag-ftps. do you have any suggestions?
<shevy> first time I heard of that
lmickh has joined #ruby
<amh345> of ftps or double-bag?
dukz has joined #ruby
bradhe has joined #ruby
jkhwan has quit [Ping timeout: 272 seconds]
nowthatsamatt has quit [Quit: nowthatsamatt]
lethjakm1 has joined #ruby
bradhe has quit [Remote host closed the connection]
i_s has quit [Remote host closed the connection]
bradhe has joined #ruby
Xiti has quit [Ping timeout: 245 seconds]
lethjakman has quit [Ping timeout: 245 seconds]
nobitanobi has quit [Ping timeout: 264 seconds]
<flaccid_> havenwood: ahhhh thanks! man that is difficult to google heh
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
<PPH> I think I'll change my /nick to DuckLover:P
porco has joined #ruby
krz has quit [Ping timeout: 265 seconds]
<flaccid_> i see, its out of range in my case, understood
<havenwood> flaccid_: yeah, pessimistic operator or twiddle-wakka
amh345 has quit [Quit: amh345]
<havenwood> behold... the twiddle wakka!
capicue has quit [Quit: Leaving...]
bradhe has quit [Ping timeout: 245 seconds]
lmickh has quit [Quit: lmickh]
simoz has quit [Ping timeout: 272 seconds]
<flaccid_> hah!
lethjakm1 is now known as lethjakman
darkc0met has quit [Remote host closed the connection]
DonRichie has joined #ruby
EasyCo has quit [Quit: We can't stop here, this is bat country]
devyn has quit [Read error: Connection reset by peer]
fgo has quit [Remote host closed the connection]
bradhe has joined #ruby
devyn has joined #ruby
havenwood has quit []
havenwood has joined #ruby
hololeap has joined #ruby
simoz has joined #ruby
weems has quit [Ping timeout: 248 seconds]
macmartine has quit [Remote host closed the connection]
heidi has quit [Quit: Leaving.]
mlpinit has joined #ruby
tagrudev has joined #ruby
<flaccid_> so one sec, if ~> 1.16 does that mean the latest version it can be is 2.0 or anything < 2.0 ?
sayan has joined #ruby
<flaccid_> must be any minor version < 2
emocakes has quit [Ping timeout: 272 seconds]
<sevenseacat> anything < 2.0
Kilo`byte has quit [Ping timeout: 252 seconds]
<flaccid_> makes total sense
i_s has joined #ruby
<sevenseacat> ~> means the last digit can increase
<sevenseacat> so the 16 can change, but not the 2
<sevenseacat> *not the 1
krz has joined #ruby
<sevenseacat> if it was ~> 1.16.0 it would be anything 1.16.0 > x > 1.17.0
devyn has quit [Read error: Connection reset by peer]
<sevenseacat> first one should be >=
<sevenseacat> aaand i got the operators the wrong way around
<sevenseacat> ignore me
Liquid-- has quit [Quit: Computer has gone to sleep.]
n1x has joined #ruby
devyn has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
Bry8Star{T2 has quit [Remote host closed the connection]
Galeforce has joined #ruby
yfeldblum has quit [Remote host closed the connection]
graydot has joined #ruby
Kilo`byte has joined #ruby
Bry8Star{T2 has joined #ruby
galef0rce has quit [Ping timeout: 245 seconds]
mlpinit has quit [Ping timeout: 265 seconds]
amritanshu_RnD has joined #ruby
sergicles has quit [Quit: sergicles]
Liothen has quit [Quit: System of a down……]
Lewis has quit [Remote host closed the connection]
jonahR has quit [Quit: jonahR]
coder_neo has joined #ruby
coder_neo has quit [Client Quit]
mengu has joined #ruby
Lewis has joined #ruby
Lewis has quit [Changing host]
Lewis has joined #ruby
i_s has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
Lewis has quit [Ping timeout: 240 seconds]
havenwood has quit [Remote host closed the connection]
zigomir has joined #ruby
weems has joined #ruby
sn0wb1rd has quit [Ping timeout: 264 seconds]
nisstyre has quit [Ping timeout: 248 seconds]
hololeap has quit [Ping timeout: 240 seconds]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
i_s has joined #ruby
sn0wb1rd has joined #ruby
krz has quit [Ping timeout: 245 seconds]
ehaliewicz has quit [Remote host closed the connection]
apeiros has quit [Ping timeout: 272 seconds]
mauro has quit [Remote host closed the connection]
amacgregor has joined #ruby
nisstyre has joined #ruby
brtdv has joined #ruby
hololeap has joined #ruby
DanKnox_away is now known as DanKnox
funburn has quit [Quit: funburn]
s2013 has quit [Ping timeout: 245 seconds]
brtdv has quit [Client Quit]
Kamuela has joined #ruby
porco has quit [Quit: Leaving...]
<Kamuela> when's making an if a block more favorable than writing the if after the code? just with multiple instructions?
Mon_Ouie has quit [Ping timeout: 252 seconds]
fgo has joined #ruby
rrichardsr3 has joined #ruby
rrichardsr3 has quit [Max SendQ exceeded]
Shidash has joined #ruby
fgo has quit [Read error: Connection reset by peer]
Kilo`byte has quit [Ping timeout: 252 seconds]
fgo has joined #ruby
krz has joined #ruby
Xiti has joined #ruby
moneydouble1 has quit [Ping timeout: 246 seconds]
subbyyy has joined #ruby
porco has joined #ruby
crus has joined #ruby
fgo has quit [Ping timeout: 245 seconds]
simoz has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby
vlad_starkov has joined #ruby
BrenoPerucchi has joined #ruby
Kilo`byte has joined #ruby
mrfoto has joined #ruby
noop has joined #ruby
bradhe has joined #ruby
matematikaadit has joined #ruby
terrellt has left #ruby [#ruby]
sandeepk has joined #ruby
cathers has joined #ruby
BrenoPerucchi has quit [Ping timeout: 272 seconds]
dr0ff has quit []
havenwood has joined #ruby
Fire-Dragon-DoL has left #ruby [#ruby]
subbyyy has quit [Quit: none 0.3.9.2]
beermouse has joined #ruby
lethjakman has quit [Ping timeout: 272 seconds]
<shevy> kamuela hmm?
<shevy> can you reword this
<Kamuela> puts "ooga booga" if Me.isMonster?
<Kamuela> versus if Me.ismonster?
<Kamuela> puts "ooga booga"
<Kamuela> end
<sevenseacat> which is easier to read?
<Kamuela> is tacking if to the end of the line a stylistic choice that has to do with number of instructions to execute?
<shevy> kamuela the first variant is better if you dont have an else
dawkirst has quit [Ping timeout: 245 seconds]
<Kamuela> shevy, word
<shevy> kamuela well, if you have more instructions, it may be better to space them out so that they are easier to read
<Kamuela> sevenseacat, the second is easier to read to me because i'm used to languages where ifs are always declared in blocks, but i'm trying to switch my brain over to rubemeisterism
sandeepk has quit [Quit: Leaving...]
<sevenseacat> i see
moneydouble has joined #ruby
<shevy> kamuela the thing is that past-if can sometimes be easier to read. for instance: loop { game_over if @shall_we_exit }
<matematikaadit> Me.moster?
<shevy> Me.somter?
<Kamuela> sevenseacat, i get that it reads like a sentence, but i notice that when i'm reading through code, i am used to being "prepared" that something is a logical question. to get hit with a condition at the end of a statement throws me a bit
<shevy> btw kamuela you wrote once isMonster? and once ismonster? :P
Elhu has joined #ruby
<Kamuela> shevy, yep, i'm sorry :)
<Kamuela> like how tertiary if's were always a pain to read and often not used as a courtesy
beermouse has quit [Quit: beermouse]
<Kamuela> but it seems very common in ruby to use if and else at the end of statements, so i'm trying to get used to it
<sevenseacat> good idea,
smathieu has joined #ruby
<shevy> I dont like the ? operator
<shevy> it always seems to conflict with the rest of my code, in style
<Kamuela> yeah that drives me nuts, is that in ruby?
Vivekananda has quit [Read error: Connection reset by peer]
<shevy> dunno, people use the strangest things in ruby
<Kamuela> is it still like true ? false: die or something
dzhulk has joined #ruby
DanKnox is now known as DanKnox_away
<shevy> def self.establish_connection(host, username, password, reload = false)
<sevenseacat> you know what sucks in ruby? for loops. why do they exist?
<shevy> self.connections ||= Hash.new
<shevy> connection = Net::FTPFXP.new
TryX has joined #ruby
<Kamuela> sevenseacat, are these C-style for loops?
<shevy> sevenseacat dunno
<sevenseacat> for foo in @foos
<Kamuela> oh that's python style
<sevenseacat> as opposed to @foos.each do |foo|
<Kamuela> i guess that's just TIMTOWTDI in action
<sevenseacat> i guess so
<sevenseacat> they just annoy me
apeiros has joined #ruby
<Kamuela> @foos.each do |foo| breaks my head in half to read
<Kamuela> but another ruby thing i'll get used to
<shevy> yeah
fgo has joined #ruby
<shevy> for loops also are at odds with the rest of my code
<shevy> but take the thing above
<Kamuela> the regular for loops?
<sevenseacat> that type of block syntax you will have to get used to, yeah
<shevy> self.connections ||= Hash.new
<shevy> does one of you use such things often?
<sevenseacat> yes
beermouse has joined #ruby
<shevy> why the self. part?
wallerdev has quit [Quit: wallerdev]
<Kamuela> yeah sevenseacat was helping me with something a few days ago where we used that. the code didn't work but it was for some other rails reason i can't remember
<sevenseacat> to call the instance method instead of setting a local variable
<sevenseacat> though i guess it's class method in this case
<shevy> hmm
<Kamuela> shevy, is = a method?
<shevy> kamuela dont think so
<sevenseacat> connections = foo will set a local variable
<sevenseacat> no
smathieu has quit [Ping timeout: 264 seconds]
<shevy> sevenseacat at first I thought he just wants to set @connections, but does so through an accessor method
<Kamuela> shevy, interesting, i think it can be overloaded in C++ though
<sevenseacat> self.connections = foo is a shortcut for writing self.connections=(foo)
obs has joined #ruby
<Kamuela> 1.upto(5) { | number| puts number }, can you help me break that down? the block is yielded, but the |number| is used as a container that upto looks for?
<Radar> it's called a block argument
<sevenseacat> number is just the block argument
<Kamuela> so when you're writing a method, you use yield to implement a passed block
<Kamuela> but how does number come into play?
<Radar> you yield(argument)
<Radar> in the block
kaspergrubbe has joined #ruby
<Radar> I would write a code example but not sure I can do that before the train gets to my station.
h_kon has joined #ruby
<Kamuela> if you could, just that part within the method
fixl has joined #ruby
asteros has quit [Quit: asteros]
aagdbl has quit [Quit: Leaving.]
<Radar> kamuela: the method takes arugments, possibly does something to them, and yields them to create the block argument
<Radar> bbl, detraininng
<Kamuela> thank you
havenwood has quit [Read error: Connection reset by peer]
<shevy> kamuela with yield you tap into the block
mlpinit has joined #ruby
<Kamuela> shevy, sounds like &something just got explained
<shevy> kamuela every method in ruby accepts a block
rickruby has quit [Remote host closed the connection]
<shevy> well, you dont need the & if you want to tap into a block that is attached to a method
<Kamuela> the &something just become the block argument though, the |something| you just put in
<shevy> >> def foo(i); print 'foo '+i; yield if block_given?; end; foo('hi there') { print 'yup'}
<eval-in> shevy => foo hi thereyupnil (https://eval.in/70286)
<sevenseacat> nice
<sevenseacat> that took me a second to wrap my head around lol
<shevy> I feel like that often when I read other people's code :(
<shevy> lambda {}
aganov has joined #ruby
<shevy> I dont get them...
<sevenseacat> all on one line didnt help lol
<sevenseacat> ruby does some really elegant shit but it also makes it really easy to write obfuscated shit
zoee has joined #ruby
<sevenseacat> not even intentionally obfuscated
<Kamuela> shevy, lambda?
<shevy> yeah lambdas
brtdv has joined #ruby
<Kamuela> well that's because writing(like).a_sentence { is more important } || > thinking logically like the computer
beermouse has quit [Ping timeout: 240 seconds]
<Kamuela> at least that's what it seems imo
kaspergrubbe has quit [Ping timeout: 246 seconds]
zoee has quit [Client Quit]
<Kamuela> i read code like baby talk but ruby likes to keep even conditionals reflective of english
<Kamuela> and things like that
<sevenseacat> i love the first example here http://en.wikipedia.org/wiki/Obfuscation_%28software%29
rickruby has joined #ruby
<sevenseacat> just, wtf
<Kamuela> wow
<Kamuela> i love that complete reworking of "security through obscurity" like none of its prior use mattered
<Kamuela> completely redefined for that wiki article
zigomir has quit [Ping timeout: 272 seconds]
<Kamuela> security through obscurity has always been used to define a system's security as a function of its relatively low usage or market share
<Kamuela> not its "complex code"
<Kamuela> wtf
Es0teric has quit [Quit: Computer has gone to sleep.]
ezkl has joined #ruby
beermouse has joined #ruby
<sevenseacat> well not necessarily
vlad_starkov has quit [Read error: Connection reset by peer]
mlpinit has quit [Ping timeout: 248 seconds]
<Kamuela> shevy, what part of that represented lambda?
i_s has quit [Remote host closed the connection]
rickruby has quit [Ping timeout: 272 seconds]
Nanuq has quit [Ping timeout: 245 seconds]
zoee has joined #ruby
beermouse has quit [Client Quit]
jprovazn has joined #ruby
Es0teric has joined #ruby
<shevy> kamuela that is a lambda
yfeldblum has quit [Ping timeout: 272 seconds]
<shevy> >> lambda {}
<eval-in> shevy => #<Proc:0x40c01238@/tmp/execpad-606eee5791bf/source-606eee5791bf:2 (lambda)> (https://eval.in/70287)
<shevy> of course it does not do anything useful
<shevy> but then again the other lambdas don't either :P
Nanuq has joined #ruby
<Galeforce> hey guys quick question...
phansch has quit [Remote host closed the connection]
<Galeforce> I've been learning ruby and learned all about methods/arrays/hashes/loops/ the fundamentals... When is a good time to take this knowledge and start learning rails to develop a web app? Should I go even deeper in ruby first?
ix007 has quit [Quit: meow.]
<Kamuela> damn, just had a fatty desire to eat another piece of pizza but my full stomach sharply told me to do that at my own expense please
mercwithamouth has quit [Ping timeout: 272 seconds]
<Kamuela> pretty sure my stomach overrode my brain for a half second
ahawkins has joined #ruby
Jetchisel has joined #ruby
<Kamuela> Galeforce, are you comfortable with creating your own classes?
harrymoreno has joined #ruby
<Galeforce> somewhat
<shevy> Galeforce well, learning ruby very well takes a lot of time. in general it is best to start writing things on your own as soon as possible
<Galeforce> i am comfortable creating classes that dont do much
<shevy> hehehehe
<Galeforce> :)
<shevy> class Galeforce; end
<Kamuela> i just asked because from my early experience much of Rails is about getting familiar with the classes included therein, Rails does everything with specialized objects
<shevy> there we go
<shevy> that's a useless class
<Galeforce> hmm
<shevy> Galeforce how many methods will your class have... more than zero?
<Galeforce> possibly
ezkl has quit [Quit: QUIT!]
<Galeforce> ;)
<shevy> rails uses a lot of rails-specific idioms
<shevy> and it's large
<Galeforce> so should i get a more solid foundation in ruby before i go into rails then ?
<shevy> kamuela name 3 methods of ActiveRecord without googling
<Kamuela> Galeforce, honestly, i walked into rails and backtracked, learning a bit more ruby, there's nothing to be "afraid of," you'll probably just understand the why's much better than i did with your knowledge already :)
<Kamuela> save, update...
funburn has joined #ruby
<shevy> Galeforce, no, jump into rails first
<Galeforce> but i already jumped into ruby first lol
<shevy> :\
<Galeforce> i didnt know XD
<Kamuela> Galeforce, is your goal to create web apps?
<Galeforce> yes
<Kamuela> go go, play with Rails :)
zigomir has joined #ruby
<Galeforce> ive been watching these videos after working on ruby https://www.youtube.com/playlist?list=PLSXDqiI4sC5NinJXEoYH6FYQ7vtIO8IPF
<Galeforce> and everything in those lessons i know
hogeo has joined #ruby
<Galeforce> except variable scope which i plan on watching
<Galeforce> is that considered a good foundation ?
<Kamuela> if it's like anything else, variable scope is within the current block
zigomir has quit [Client Quit]
pixelgremlins has joined #ruby
<Kamuela> yes Galeforce you will be fine in Rails
<shevy> hehehe
mercwithamouth has joined #ruby
<shevy> ARE YOU SCARED OF RAILS
<Galeforce> ok awesome :D
<Galeforce> yes
<shevy> DO YOU THINK IT WILL EAT YOUR BRAINS OR YOUR BALLS
<shevy> I am too
<Galeforce> it might!
<shevy> I learned ruby first
<Galeforce> lol
<shevy> rails seems daunting :(
<Galeforce> it does
<Galeforce> i typed in scaffold once
<Galeforce> and it did everythign
<Galeforce> and i closed it
<Kamuela> Rails is a wrapper for a web stack written in Ruby. basically it looks at a database (models), computes user data from input + database (controllers), and shows the users HTML (views)
<shevy> hehe
<Galeforce> immediately
mengu is now known as mengu_
<Galeforce> yeah
obs has quit [Remote host closed the connection]
<Galeforce> i have actually jumped into rails a little bit
<Galeforce> by little i mean very little
<Kamuela> you're fine, the only person who knows whether it's too much is you :)
<Galeforce> ok ok, gonna finish up these videos
<Galeforce> and then jump into rails
<Kamuela> i'd say you should just tell yourself that you're excellent, which truly you are, and jump in. figure stuff out. it won't be that bad
<Galeforce> :D
<Kamuela> IMO, and this is what they HATE me for saying, use scaffold
<Galeforce> it is that bad!
<Galeforce> honestly
<Galeforce> programming is the hardest thing i've ever done in my life
<Kamuela> and that's just because scaffold lets you analyze what's in a PROPER controller/view/model that is linked together
<Kamuela> and delivered via REST
JuriadoBalzac has quit [Read error: Operation timed out]
ahawkins has quit [Quit: leaving]
<Galeforce> ok back to watching video
<Kamuela> in fact i'm working on a rails project that i think i'm gonna restart with scaffolds just because i want to use REST better
<Galeforce> i dont really understand what your saying
<Galeforce> but i will in a few weeks when i learn!
ahawkins has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
h0rrorvacui has quit [Quit: Leaving]
nisstyre has quit [Disconnected by services]
nisstyre has joined #ruby
zipper has joined #ruby
<Kamuela> i think back to the question i asked about php, it's just when you're running rails, you basically have to understand how an http server works, a database works, a user interface in js/html/css etc
asteros has joined #ruby
<Kamuela> i think you can understand the big picture very abstractly. but i'm finding that your rails apps tend to be about as "abstract" as your understanding :P
cathers has quit [Remote host closed the connection]
end_guy has quit [Ping timeout: 240 seconds]
brahman_work1 has quit [Read error: Connection reset by peer]
hogeo has quit [Remote host closed the connection]
brahman_work has joined #ruby
hololeap has quit [Ping timeout: 240 seconds]
threesome has joined #ruby
<Kamuela> i think my friend who's all about django was trying to warn me against "magic" in rails which is basically stuff i keep running into that extends from how everything in rails inherits from classes that i don't fully understand which is why so many things seem to happen implicitly whhich as been confusing the heck out of me
schubbe has joined #ruby
<Kamuela> like the "render" method and how something somewhere is always calling it if your MVC's line up
claymore has joined #ruby
<Galeforce> kamuela i chose RoR for that exact reason
<Galeforce> I watched a video basically saying old school programmers are stuck in their mindset stuff needs to be built from scratch
<Galeforce> and basically went on to saying rails is the future of programming
<Galeforce> so i was like ok sold!
<Galeforce> now im learning :P
<Kamuela> Galeforce, same here man. i think if your brain works a certain way, you'll get it. but mine keeps thinking of it as a programming language so i keep asking for the why's and the connections and learning that to understand the connections requires a LOT of understanding
<Galeforce> RoR*
iajrz has quit [Ping timeout: 250 seconds]
<Galeforce> well i dont know any programming language except ruby
<Galeforce> and it was really tough for me to learn, i dont have a programming brain
Bassam has quit [Quit: Textual IRC Client: www.textualapp.com]
<Kamuela> think of it this way: rails has an interface that (in theory) is quick to use and get products out. but if you ever deviate from the path, learning how everything is happening to change any step of that path is much more difficult than you might think
<Galeforce> well RoR developers get a good paycheck right?
<Kamuela> haha, yeah unfortunately for me
fightback has joined #ruby
<Galeforce> Between that and being able to create my own ideas, thats all I want
<Kamuela> because that has meant that hiring help has been prohibitively expensive
<Galeforce> and thats why i think ror is perfect for me as a individual
einarj has joined #ruby
<Kamuela> Galeforce, ever heard of small empires?
<Galeforce> no
<Galeforce> what is it?
<Kamuela> google "the verge small empires," it's an online show hosted by one of the initial founders of Reddit. it's about web and tech startups in new york
dayepa has quit [Ping timeout: 246 seconds]
xjiujiu has joined #ruby
Aryasam has joined #ruby
<Galeforce> 0oo0o0o0
<Galeforce> i think i have herd of it
drumusician has joined #ruby
rickruby has joined #ruby
noname001__ has joined #ruby
<Kamuela> he is extremely interested and pays special attention to "how people learn to code and turn around and make very profitable companies"
rickruby has quit [Read error: Connection reset by peer]
<Galeforce> yeah well i've been in the startup game for a while
<Kamuela> like he dedicates a good portion of most interviews to asking peopel "when did you start coding?"
<Kamuela> and stuff like that
rickruby has joined #ruby
<shevy> damn
<Galeforce> im sick of outsourcing / finding a good co-founder that can code(very hard where im from)
<shevy> I started late with coding
<Galeforce> so thats why i finally started to learn myself
<shevy> not everyone started at age 10!!!
<Galeforce> ^
<Kamuela> Galeforce, sorta the same here :)
<Galeforce> why did you learn kamuela?
<Radar> back now
<Kamuela> shevy, it's ok, i started at 10 for the both of us :)
<Galeforce> shevy im 25
<Galeforce> lol
<Kamuela> shevy, and still suck enough to drag us down, i even it out see :D
vlad_starkov has joined #ruby
<Galeforce> I figure if i stick with it , I can be 26 making decent money and working on a startup on the side
<shevy> Galeforce yeah I was that age when I started too ;P
<Kamuela> wb Radar
<Galeforce> Junior RoR developer = $60k/yr right?
<Radar> Thank you kamuela
<shevy> no idea
Zeeo has joined #ruby
<Radar> Galeforce: depends on location
<shevy> I went to ruby because I can use it for every computer related task
<Kamuela> Galeforce, honestly I'm learning because of that show and because of the whole concept of RAD and an MVP. so we have similar reasons
<shevy> right now I write a wrapper over ffmpeg to aid me in cutting audio files
<Galeforce> awesome
_HolyCow1 has joined #ruby
<Kamuela> i also like the idea of being a "software engineer" who can solve problems by creating virtual products
<Galeforce> maybe we will work together one day on a startup kamuela ;)
i_s has joined #ruby
schubbe has quit [Remote host closed the connection]
<Kamuela> i hope so, as you learn rails, definitely hit me up. i'll try my best to help and not slow you down ;)
<Galeforce> haha
Kilo`byte has quit [Ping timeout: 272 seconds]
<Galeforce> well this is my new favorite channel :)
<Galeforce> ok now i seriously gotta get back to learning!
<Radar> :)
<shevy> no!
<shevy> chat with us!
<Kamuela> hahaha
<Galeforce> lol
<shevy> dont learn more than we know :(
<Galeforce> haha
<shevy> kamuela I still have not understood it... do you use rails or do you not?
<sevenseacat> i didnt start at 10, geez. i started at 12 >_>
dayepa1 has joined #ruby
sandeepk has joined #ruby
<Kamuela> shevy, then you have really misunderstood. rails uses me
<shevy> lol
* Radar started at 7
<Radar> Still no good at it
<Galeforce> i wish irc had a friendlist
<Kamuela> Radar, i think your books say otherwise
GeratSUN has joined #ruby
<Kamuela> i started with mirc scripting
<GeratSUN> hey all
_HolyCow has quit [Ping timeout: 264 seconds]
vancooten has joined #ruby
<Kamuela> 2 weeks after playing with IRC i was like "wow, a bot! how do i do that"
bradhe has quit [Remote host closed the connection]
<GeratSUN> can someone shortly tell me why there is no resp.body, if I am issuing resp = Net::HTTP::Proxy(@proxyAddress, @proxyPort).get(URI(downloadPath)) ?
<matematikaadit> what Programming language that suitable for a 7yo kid?
_bart has quit [Remote host closed the connection]
<GeratSUN> matematikaadit: nativ english speaker?
<GeratSUN> native...
<shevy> lol
<matematikaadit> GeratSUN: no.
<shevy> sevenseacat now the 7 years old overthrow you
awarner_ has quit [Read error: Connection reset by peer]
<sevenseacat> probably
hololeap has joined #ruby
<shevy> then the babies
sandeepk has quit [Client Quit]
<shevy> and then ALL THOSE WHO WERE NOT YET BORN
<sevenseacat> i started with HTML and CSS and perl
awarner has joined #ruby
<GeratSUN> matematikaadit: problematic...
dagobah has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
<GeratSUN> I started with pascal
<GeratSUN> ;-)
Kilo`byte has joined #ruby
<GeratSUN> anyhow... noone that has an idea on my problem with the resp.body?
xjiujiu has joined #ruby
<Radar> GeratSUN: Nope.
<matematikaadit> me too. Now I'm teaching Pascal.
<GeratSUN> matematikaadit: didn't program pascal for over 10 years now
<Kamuela> sevenseacat, when did you start with Perl? that was my first language after mirc. but i could never figure out cgi with my host. it wasn't a bin it was cgi.domain.com
<GeratSUN> matematikaadit: was a good language, but I developed onto php, .net, java, perl, python and ruby
<Radar> matematikaadit: look at shoes
<Radar> matematikaadit: http://shoesrb.com/
<Radar> matematikaadit: there is also scratch: http://scratch.mit.edu/
simoz has joined #ruby
<Kamuela> simoz, hawaii?
<sevenseacat> kamuela: when i was 14, i wanted to make a guestbook for my journal :D
<sevenseacat> and polls and stuff
i_s has quit [Ping timeout: 245 seconds]
larssmit has joined #ruby
<Kamuela> sevenseacat, so damned practical :P C++ taught me to open and close cd trays with winsock and winapi binds
<Kamuela> remotely
dukz has quit [Remote host closed the connection]
harrymoreno has quit [Quit: harrymoreno]
Xeago has joined #ruby
jhaals has joined #ruby
xjiujiu has quit [Client Quit]
xjiujiu has joined #ruby
<matematikaadit> Radar: I think I'll choose scratch.
<Radar> matematikaadit: cool :)
MrZYX|off is now known as MrZYX
diegoviola has quit [Ping timeout: 240 seconds]
MrZYX is now known as MrZYX|off
shredding has joined #ruby
Evixion has quit [Read error: Connection reset by peer]
andikr has joined #ruby
akonny has joined #ruby
<Kamuela> Radar, do you know of any guide that specifically targets how to plan projects RESTfully?
<Radar> kamuela: no, because people don't think like that :)
Evixion has joined #ruby
<Kamuela> meaning that i shouldn't try to think that way?
<Radar> Yes.
<Radar> You should try delivering easy to use software that's great.
<Kamuela> right now my routes.rb doesnt use resources at all, it's all calls to get and match
<sevenseacat> yuck
<Kamuela> and i keep thinking about it, and i really don't think i'm gonna have any resources that are going to need to mapped REST
<Kamuela> it actually doesn't make sense, imo
<Kamuela> i have users and they will have objects, but these objects will not be social and only be viewable and manipulable by their owners... via a dashboard
<Kamuela> so following any kind of REST routing just doesn't make sense IMO
<Radar> social has nothing to do with REST
pixelgremlins has quit [Ping timeout: 265 seconds]
<Radar> kamuela: sharing your routes file would be good if you're trying to get feedback on it ;)
dukz has joined #ruby
weszlem has joined #ruby
io_syl has quit []
<sevenseacat> objects will only be viewable and manipulable... but having resourceful routing for those objects doesnt make sense?
<Kamuela> yeah because there's only one object that users have. and all they are able to do is add more of those objects
dukz has quit [Remote host closed the connection]
<Kamuela> facebook is rest-ish for example, twitter too
<Kamuela> but that's because those specific links matter
<Kamuela> because you share them
<Kamuela> but if your app is simple, and there's a flat dashboard-style interface
<sevenseacat> uh
zarubin has joined #ruby
<Kamuela> it would be like trying to drive your car by going to car.com/gears/3rd first
<Kamuela> where you just go to car.com
<sevenseacat> i think you need to read up on what being restful in rails means
<Radar> car analogies are bad and you should feel bad
<Kamuela> you go into your car, see your dashboard. press buttons
<Kamuela> no shortcuts, your dashboard is your home
<sevenseacat> because youve just described that you want, almost to a T, restful behaviour
<Radar> ^
mengu_ is now known as mengu
timonv has joined #ruby
dukz has joined #ruby
fightback has quit [Quit: blackbagged]
mlpinit has joined #ruby
timonv has quit [Read error: Connection reset by peer]
timonv_ has joined #ruby
hololeap has left #ruby ["No boundaries on the net!"]
<Kamuela> pagescontroller maps index, about, etc. users model would never be seen except with an admin panel that might be installed later, users have an attribute that determines how many widgets are owned
<Kamuela> root/widgets/1 root/users/2 style routing doesn't make sense, /dashboard for currently logged in user displaying widgets data does
<sevenseacat> users cant do things like be created and then edit themselves?
<sevenseacat> and then close their accounts?
<shevy> I am editing myself a lot
funburn has quit [Quit: funburn]
<Kamuela> they can, but isn't REST entirely about routing?
<sevenseacat> because thats five of the seven default restful actions right there
vlad_starkov has quit [Read error: Connection reset by peer]
<Kamuela> meaning /user/edit never needs to be in the URL bar if there's an inline change within the dashboard
nvrch has joined #ruby
bousquet has joined #ruby
<sevenseacat> why do you assume all URLs have to actually be in the browser bar?
Elhu has joined #ruby
<Radar> Madness.
Soda has quit [Remote host closed the connection]
kreantos has joined #ruby
<Kamuela> uh
<Kamuela> a URL is not an internal representation of a web server
magoo has quit [Ping timeout: 272 seconds]
<sevenseacat> ok so you have an inline change on your dashboard, how do you save the change?
tvlooy has joined #ruby
Aryasam has quit [Ping timeout: 240 seconds]
blaxter_ has joined #ruby
mlpinit has quit [Ping timeout: 246 seconds]
<Kamuela> a call right there to the model
<sevenseacat> from a view?
Aryasam has joined #ruby
<Kamuela> from that view's controller
<sevenseacat> youre not thinking about MVC from a rails perspective
coderhs has joined #ruby
<sevenseacat> if you have a dashboard that renders lots of stuff, you only have one controller, that renders that dashboard
tvlooy has left #ruby ["Leaving"]
<Kamuela> i see what you're saying, you're saying a post route would point to a controller to deal with that
<sevenseacat> indeed
<sevenseacat> like we tried to tell you yesterday, views do not have controllers
<sevenseacat> controllers render views
camilasan has joined #ruby
dukz has quit [Remote host closed the connection]
<Kamuela> so in essence we create calls to controller methods through routes
<sevenseacat> yes, routes map to controller actions. this is all in the getting started guide i gave you yesterday.
nari_ has quit [Ping timeout: 245 seconds]
sergicles has joined #ruby
troessner has joined #ruby
dukz has joined #ruby
<Kamuela> sevenseacat, why are you such a dick? you literally act like a girl. you're very easily offended and get extremely defensive
<sevenseacat> sure, let's pretend i didn't just spend 20 minutes holding your hand, and call me a dick instead
<Kamuela> i just ask some questions, don't answer them, give me a chance to get another perspective if they are offensive
<Kamuela> well here's the point, you answer me
nbrosnahan has joined #ruby
<Kamuela> and let's just say that i don't understand you
phansch has joined #ruby
<sevenseacat> i do not know why i keep trying to be nice to you
<Kamuela> but you give me the same answer everyday
<Kamuela> the same answer!
<sevenseacat> its been like a week now and all you do is insult me
<Kamuela> why do i get it today and not yesterday? i mean look, i MIGHT, but if you just didn't get offended, someone else may answer in a way that makes sense to me
sandeepk has joined #ruby
<sevenseacat> kamuela: sorry for assuming if i give you a link to documentation, that you might have actually read it
<Kamuela> no one's dumb, you just keep thinking i'm dumb and calling me dumb, some people just have different prior experiences and travels. where they're coming from is different
<Kamuela> you can link me to the same guide 20 times but it might not work for me
skaflem has joined #ruby
<Galeforce> both of you should chill out cause i like both of you XD
<sevenseacat> then *tell me that* instead of just asking the same questions over and over
aapzak has quit [Ping timeout: 246 seconds]
<sevenseacat> tell me which parts you didnt understand
<sevenseacat> so i can explain *those parts* in greater detail
<Kamuela> but then it would still be you
<sevenseacat> instead of just rehashing the same answers to exactly the same question
<Kamuela> the same person who thinks i'm dumb
<sevenseacat> i never said anyone was dumb
<Kamuela> the same person who cannot help but call me dumb and answer in the same way every time
<Kamuela> it's just not helpful
<sevenseacat> well actually i did, but not here and not you
<Kamuela> i seriously don't mean to offend, and never have, but there's a reason i ask a question in a different way and that's usually because i'm trying to elicit a different answer, one that maybe clicks better with me
<shevy> ack!
<Galeforce> ack!
aapzak has joined #ruby
<shevy> you guys have been rails-leaking into #ruby!
<Kamuela> syn/ack
<sevenseacat> syn?
<tobiasvl> WHAT IS RAILS
<tobiasvl> maybe #rubyonrails knows
<Kamuela> tobiasvl, trains brah
<sevenseacat> kamuela keeps bringing it in here
<shevy> hmm
<shevy> only 380 on #rubyonrails
<shevy> we won :)
<sevenseacat> im sure if i had've just ignored his questions he would have insulted me for that too
<shevy> yeah sevenseacat why do you ignore him
<Galeforce> drove my shevy to the levy
<shevy> :(
<Galeforce> but the levy was dry
<shevy> yes yes...
<Galeforce> :P
<Kamuela> i hope this won't be the way that i die
<Galeforce> lol
<Galeforce> shevy do you get that a lot?
<Galeforce> is that your name shevy ?
apeiros has quit [Remote host closed the connection]
lsmola has joined #ruby
TryX has quit [Remote host closed the connection]
JohnBat26 has joined #ruby
Xeago has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
Xeago has joined #ruby
tesuji has joined #ruby
<shevy> man
<shevy> die
anderse has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
BrenoPerucchi has joined #ruby
<Galeforce> ?
kaspergrubbe has joined #ruby
<Galeforce> r u serious?
<Galeforce> i was just joking :(
<Kamuela> he's always serious, never jokes, never even smiles
asteros has quit [Quit: asteros]
<Galeforce> lol
olivier_bK has joined #ruby
<Kamuela> hmm yeah wow ror is empty
jrhe has joined #ruby
<Kamuela> i think it fills up during work hours
sandeepk has quit [Quit: Leaving...]
hololeap has joined #ruby
MrPot4to has quit [Read error: Connection reset by peer]
MrPotato has quit [Read error: Connection reset by peer]
smathieu has joined #ruby
MrPot4to has joined #ruby
MrPot4to has quit [Remote host closed the connection]
BrenoPerucchi has quit [Ping timeout: 272 seconds]
obs has joined #ruby
<Kamuela> shevy, when i treated yield as an array and that was an unexpected way to work with multiple blocks, what was the way to which you were acclimated?
anderse has quit [Quit: anderse]
<shevy> smiling is for the weak
<shevy> kamuela, yield just "passes" in the value you give, if you pass an array, then it's an array
<shevy> >> def foo; return yield if block_given?; end; foo { [1,2,3] }
<eval-in> shevy => [1, 2, 3] (https://eval.in/70301)
<Kamuela> shevy, you said if you passed 2 blocks, how would you do it and i said yield[0] yield[1]
<shevy> no I never said that
<shevy> because I know you can only pass 1 block
<Kamuela> i said that
bradhe has joined #ruby
sevenseacat has quit [Quit: Leaving.]
<Kamuela> so that was a trick question that we literally never cleared up?
<shevy> kamuela, see the example above, the array is returned
<shevy> I am not quite sure what you refer to :-)
<Kamuela> few days ago you just started helping me with ruby
<shevy> I think you are past that stage now kamuela
<shevy> those were newbie questions at best
<shevy> you are no longer a newbie, I am sorry :(
<Kamuela> and you talked about yield, and i thought you could pass multiple blocks because you said how would you deal with multiple blocks
smathieu has quit [Ping timeout: 272 seconds]
<shevy> unfortunately you can only pass one block in that way to a method
beermouse has joined #ruby
<shevy> if apeiros joins, ask him - he once said that he'd wish that ruby allows one to pass multiple blocks to the same method
simoz has quit [Ping timeout: 252 seconds]
<shevy> kamuela, basically you can think of it that way - every method in ruby works pretty similar to how it works in php or perl ok? and in addition to that, it accepts a block, which you could use as an extra, special argument to every method in ruby
graydot has quit [Quit: graydot]
<Kamuela> aray [] = { block1}, {block2} invalid?
bousquet has quit [Quit: bousquet]
einarj has quit [Remote host closed the connection]
<shevy> where is the method
ghr has joined #ruby
<Kamuela> just asking if you can store blocks within an array
<shevy> Oh I see
<shevy> I think you could store lambdas
einarj has joined #ruby
<Kamuela> lambda { } is a lambda. that's the extent
vlad_starkov has joined #ruby
<shevy> yeah and you can call it lateron
bradhe has quit [Ping timeout: 272 seconds]
<Galeforce> shevy what should be my first ruby program i make from scratch?
GeratSUN has quit [Quit: Page closed]
<Kamuela> what is that, just a block of code that you can save to a variable?
luckyruby has quit [Remote host closed the connection]
Kilo`byte has quit [Ping timeout: 272 seconds]
<Kamuela> Galeforce, make a linux shell
<shevy> Galeforce hmm something that you want to solve, and have a real need of
luckyruby has joined #ruby
<Galeforce> in ruby? wouldnt i need rails for something like that
<Galeforce> i dont know what a linux shell is kamuela
<shevy> Galeforce for me it develops automatically. I have a todo list with lots of things to do. and once projects are large, they seem to generate things that I want to do on their own. i.e. CutAudio class that shall cut audio
<Kamuela> Galeforce, what platform are you on?
<shevy> Galeforce only if you are limited to the www
<shevy> but I see ruby as a general purpose language for everything
<Galeforce> im on PC
<Galeforce> i use nitrious.io
<Kamuela> meaning Windows?
<Galeforce> yea
<Galeforce> sry
<shevy> kamuela yeah. and you can .call it any time
<shevy> kamuela lemme show you the example in rack
<Kamuela> oh cool, i'm on nitrous too
<Galeforce> :]
xk_id has quit [Quit:
<Kamuela> well, i'm on ubuntu actually
<shevy> kamuela: run lambda { |inner_env| [200, {"Content-Type" => "text/plain"}, ['sub']] }
<Kamuela> but i have nitrous accounts i use with people
<shevy> app = lambda { |env| [200, {'Content-Type' => 'foo/bar'}, "Hello, World!"] }
<shevy> lambda { Rack::Utils.parse_nested_query("x[y]=1&x[]=1") }.
<shevy> see kamuela
<shevy> other people make good use of lambda
<shevy> even exceptions:
coderhs has quit [Quit: Leaving]
<shevy> lambda{|env| raise RuntimeError, "It was never supposed to work" }
matematikaadit has left #ruby ["http://quassel-irc.org - Chat comfortably. Anywhere."]
<shevy> that leaves you baffled, right kamuela? :-)
einarj has quit [Ping timeout: 272 seconds]
<Kamuela> let me work it out ;)
shredding has quit [Quit: shredding]
apeiros has joined #ruby
dukz has quit [Remote host closed the connection]
marr has joined #ruby
timonv_ has quit [Remote host closed the connection]
<shevy> dont worry
<shevy> I am still trying to myself
<shevy> it just does not fit into the rest of code I write in ruby :(
dukz has joined #ruby
Kilo`byte has joined #ruby
<shevy> ruby is like so many ideas that when you apply them all, it's a bit chaotic
<tobiasvl> multi-paradigm
<Kamuela> the reason i don't get it is because no identifiers are referenced
<tobiasvl> what do you mean, kamuela?
<tobiasvl> lambdas are per definition anonymous
aapzak has quit [Quit: leaving]
dukz has quit [Remote host closed the connection]
icedp has joined #ruby
<Kamuela> why is app named
aapzak has joined #ruby
Astralum has quit [Ping timeout: 272 seconds]
icedp is now known as Guest61427
aapzak has quit [Client Quit]
ewnd9 has joined #ruby
funburn has joined #ruby
<Kamuela> cat: :furry vs. 'cat' => 'furry'
<Kamuela> are they both hashes?
<Galeforce> no
dukz_ has joined #ruby
<tobiasvl> what? they aren't?
<Galeforce> yes
_Bravado has quit [Quit: _Bravado]
<tobiasvl> isn't 'cat: :furry' sugar for ':cat => :furry'
Guest61427 has quit [Remote host closed the connection]
<Kamuela> wow, what a beautiful way of saying that tobiasvl
flaccid_ has left #ruby ["Konversation terminated!"]
<Kamuela> that's what i was gonna say
<Kamuela> in the clunkiest way possible
bakingbread has joined #ruby
<Kamuela> i was going to ask if that's what that was doing
ephemerian has joined #ruby
thelorax123 has quit [Remote host closed the connection]
<Kamuela> yeah see, that's the kind of stuff i see in rails all the time
<Galeforce> what do you mean sugar for?
<Kamuela> syntactic sugar
<Kamuela> a sweeter way of writing something in code :)
<Kamuela> 5.+(3) versus 5 + 3
<Galeforce> I didn't think values could be with:
<Kamuela> with: means that with is a symbol, :with
<Galeforce> :key => value, or :key => "value"
<Kamuela> but it is also assigning something after it as a value to that symbol key
<Galeforce> i didnt know :key value:
thelorax123 has joined #ruby
<Kamuela> no, key: :value
<Kamuela> and that's only if value is a symbol
bakingbread is now known as iced
<Galeforce> ok
<Galeforce> im confused
<Galeforce> soooooooooooo
<Galeforce> im going back to my video
<Galeforce> :P
iced is now known as icedp_
<Kamuela> i believe key: 'value' is valid also
<Kamuela> but value is a string in that case
<Galeforce> its :key
<Galeforce> isint it?
<Kamuela> yeah
<Kamuela> a symbol is always :symbol
fgo has quit [Remote host closed the connection]
<Kamuela> but putting the : afterward
<Kamuela> is just saying
<Kamuela> :key =>
hogeo has joined #ruby
dominikh has quit [Ping timeout: 240 seconds]
<Kamuela> key:
<Galeforce> ooooooooooooooooooooooooooooooooooooo
<Galeforce> so key: =
<Kamuela> like dropping the knife, and pulling the gun from the back holster :)
<Galeforce> key =>
jrhe has quit [Quit: jrhe]
<Galeforce> ok
<Galeforce> i get it
<Kamuela> :key => is equal to key:
<Galeforce> ok ok ok
<Galeforce> got it
<Kamuela> yeah you said it somewhat but not exactly
<Kamuela> remember that key is a symbol not a variable
<Kamuela> so :key
<Galeforce> :key to access
<Galeforce> key: to assign
<Galeforce> basically
<Galeforce> ?
<Kamuela> yeah i'd say so
<Kamuela> check to make sure that key: 'value' works though. i would THINK it does
<Kamuela> i know for sure it works for symbol => symbol
TMM has joined #ruby
shaunbak_ has joined #ruby
shredding has joined #ruby
<Galeforce> k
hogeo has quit [Remote host closed the connection]
marcgg has joined #ruby
marcgg_ has quit [Read error: Connection reset by peer]
<Kamuela> going to jump off IRC for a bit, might be back later or just tomorrow if i crash
dukz_ has quit [Remote host closed the connection]
<Kamuela> gonna do what you're trying to do and hyperstudy
<Galeforce> :]
<Galeforce> later
icedp_ has quit [Quit: _]
<Galeforce> i will e-mail you after video is done
hogeo has joined #ruby
<Kamuela> sounds good, late
Kamuela has quit [Quit: Leaving]
bakingbread has joined #ruby
dukz has joined #ruby
jbpros has joined #ruby
benlieb has quit [Quit: benlieb]
adambeynon has joined #ruby
<Galeforce> why are global variables bad ? $variable
marcgg_ has joined #ruby
popl has joined #ruby
popl has joined #ruby
timonv has joined #ruby
marcgg has quit [Ping timeout: 272 seconds]
dukz has quit [Remote host closed the connection]
polaco_zZz is now known as polaco
<tobiasvl> Galeforce: because they can be changed from anywhere
<tobiasvl> less control
workmad3 has joined #ruby
<Galeforce> thx Tobarja
newbiehacker has joined #ruby
<Galeforce> tobiasvl*
mlpinit has joined #ruby
newbiehacker has quit [Client Quit]
Mars` has joined #ruby
nari_ has joined #ruby
<alo1> if a nick has expired, does that show up anywhere in the nickserv info, or is it more of an ad-hoc thing?
vlad_starkov has quit [Read error: Connection reset by peer]
dukz has joined #ruby
<alo1> sorry, misfire :)
kreantos has quit [Remote host closed the connection]
mojjojo has joined #ruby
kreantos has joined #ruby
einarj has joined #ruby
sayan has quit [Ping timeout: 246 seconds]
nazty has joined #ruby
dukz has quit [Remote host closed the connection]
dukz has joined #ruby
zoee has quit [Quit: This computer has gone to sleep]
<Galeforce> is learning regular expressions important for ruby?
Davey has joined #ruby
mlpinit has quit [Ping timeout: 272 seconds]
nbrosnahan has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nbrosnahan has joined #ruby
beilabs_ has joined #ruby
sparrovv has joined #ruby
rickruby has quit [Remote host closed the connection]
<hoelzro> you don't *need* regexes, but they come in handy
Eiam has quit [Ping timeout: 260 seconds]
DanBoy has quit [Remote host closed the connection]
Aryasam has quit [Quit: Bye]
<Galeforce> im just wondering since im so new if i would find it useful or just move on
h_kon has quit [Remote host closed the connection]
DanBoy has joined #ruby
h_kon has joined #ruby
h_kon has quit [Read error: Connection reset by peer]
Kilo`byte has quit [Ping timeout: 252 seconds]
zeeraw has joined #ruby
h_kon has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
<popl> Galeforce: A regex is a good tool if you want to match patterns in strings.
fgo has joined #ruby
raphaelivan has joined #ruby
<Galeforce> ok
<Galeforce> 1 last question
beermouse has quit [Quit: beermouse]
<Galeforce> i am getting the sense, having a solid foundation on ruby makes learning rails A LOT easier
<Galeforce> is that true?
Kilo`byte has joined #ruby
<Galeforce> because if so I want to learn all the ruby I can before jumping into rails
zoee has joined #ruby
<Hanmac1> Galeforce: understanding ruby first before doing rails is a good way
<Galeforce> ok I will finish building a solid foundation in ruby then :)
<popl> You can do both at the same time. I don't think it would hurt.
<Galeforce> I just like to focus on one thing
<Galeforce> master it
<popl> It will take you awhile to master Ruby.
dominikh has joined #ruby
<Galeforce> well not master
<Galeforce> but have a really good foundation
<Galeforce> right now i know all the basics of ruby
bradhe has joined #ruby
<Galeforce> but i would like to know a little more
yacks has joined #ruby
<popl> Have you worked through the koans?
<Galeforce> ?
<Galeforce> whats that
TigerWolf has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<popl> They're fun.
<Galeforce> it looks pretty awesome
<Galeforce> ok
<Galeforce> if i complete koans
alup has joined #ruby
<Galeforce> what would you say my skill level is?
<Galeforce> intermediate ?
<yeboot> you have begun your journey
<jrobeson> still quite beginner at that point
bradhe has quit [Ping timeout: 265 seconds]
<Galeforce> damnit!
N00D is now known as zz_N00D
<Galeforce> where do i learn the harder stuff
<jrobeson> i still feel like a beginner after multiple years
<jrobeson> there more to learn
<yeboot> you're not a beginner until you write a C compiler in ruby
<jrobeson> lol
dukz has quit [Remote host closed the connection]
chineduu has joined #ruby
<jrobeson> Galeforce, why worry about that now?
<yeboot> then you are a beginner, and ready to move onto being intermediate
<jrobeson> learn the harder stuff means writing more code
<jrobeson> but first you have too understand ruby itself
dukz has joined #ruby
<yeboot> the abstract ruby machine is run on gremlins
<yeboot> that take your instructions, and use them to conjure spirits
<yeboot> the spirits are the processes of your computer
<Galeforce> ok well thanks guys
thelorax123 has quit [Remote host closed the connection]
<yeboot> the gremlins are the interpreter
<Galeforce> ima head to bed now
<Galeforce> 2am XD
<yeboot> Galeforce: remember, we conjure the spirits of the computer with our spells
<Galeforce> not sure what that means lol
<yeboot> it's a reference to an MIT programming course
chineduu has quit [Client Quit]
thelorax123 has joined #ruby
Tearan has joined #ruby
Tearan has quit [Client Quit]
<Galeforce> im honestly so lost right now
<Galeforce> i got a solid basic understanding of ruby
<Galeforce> just keep finding new things to learn i guess
vlad_starkov has joined #ruby
<Nilium> Solid basic understanding of Ruby?
<Nilium> What's that mean?
gasbakid has joined #ruby
<Galeforce> i know like
<Galeforce> hashes
<Galeforce> blocks
<Galeforce> methods
<Galeforce> classes
<Galeforce> etc
<Nilium> Ok.
<Nilium> def foo(&bar) # ← What's the ampersand do?
<Galeforce> hmmmmm
<Nilium> If you're not sure, you gots a new thing to have fun with.
<Galeforce> not sure :P
<Galeforce> dont know*
jrhe has joined #ruby
<Galeforce> hit me with another!
<Nilium> I'm too lazy to think up Ruby trivia
<Nilium> Plus I keep coming up with Scala trivia instead
<workmad3> programmers are the modern warlocks
<workmad3> such as our ability to talk to people remotely with an incantation like 'irssi<return>/connect freenode<return>/j #ruby'
<workmad3> with our crazy incantations, we invoke magical behaviour
<workmad3> Galeforce: def foo(*bar)
<Nilium> And random C trivia.
VTLob has joined #ruby
<workmad3> Galeforce: def foo(**bar)
<Galeforce> i dont know symbols
<Galeforce> need to learn
fgo has quit [Remote host closed the connection]
<workmad3> [*1..10]
<workmad3> Galeforce: ^^ what do any of those mean/do? :)
fgo has joined #ruby
rickruby has joined #ruby
<yeboot> Nilium C trivia? why is 5[a] the same as a[5]
<Galeforce> i dont know :(
<yeboot> in C
<workmad3> yeboot: that's evil :P
nbrosnahan has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yeboot> workmad3 it is, very
<workmad3> yeboot: it'll also only be true if sizeof(whatever a is) == sizeof(int)
joonty has quit [Quit: WeeChat 0.4.2]
<workmad3> iirc my c correctly
joonty has joined #ruby
<yeboot> nope
Nilium has quit [Ping timeout: 246 seconds]
fgo has quit [Remote host closed the connection]
<workmad3> hmm... well, 5[a] == 5 + a (and a is a pointer)
<workmad3> and a[5] = a + 5 (same assumption)
pr0ggie has quit [Read error: Operation timed out]
Mars` has quit [Remote host closed the connection]
Mars` has joined #ruby
<Galeforce> quick question
<Galeforce> do you guys agree this should be my next course: http://mislav.uniqpath.com/poignant-guide/
<yeboot> workmad3 kind of but not really
<yeboot> a[x] in C is syntactic sugar for *(a+x) which is the important part
<yeboot> the dereference, but /topic
hogeo has quit [Remote host closed the connection]
<workmad3> its been a while since I did any tricky C :)
pr0ggie has joined #ruby
dukz_ has joined #ruby
<yeboot> yeah, this gets to be some ioccc stuff
konrads has joined #ruby
nomenkun has joined #ruby
pdimitrov has quit [Ping timeout: 272 seconds]
<workmad3> yeboot: I knew someone once who liked to play around with trigraphs to find C compilers that didn't work to standard ;)
akonny has quit [Quit: akonny]
drumusician has quit [Ping timeout: 240 seconds]
Kilo`byte has quit [Read error: Operation timed out]
<yeboot> hahaha, ah god digraphs and trigraphs
<yeboot> kill me material
pdimitrov has joined #ruby
<workmad3> yeboot: how about this - is C++ a superset of C or a subset of C?
dangerousdave has joined #ruby
rdark has joined #ruby
hogeo has joined #ruby
<yeboot> I'd say neither at this point, since to be a superset all C syntaxes would have to be accepted, and valid, and to be a subset all C++ syntaxes would have to be accepted and valid
lkba has quit [Ping timeout: 246 seconds]
<workmad3> yup :)
sparrovv has quit [Remote host closed the connection]
Mars` has quit [Ping timeout: 264 seconds]
dukz has quit [Ping timeout: 240 seconds]
<workmad3> it's almost a superset, but there are correct C programs that aren't correct C++ programs (such as using 'new' as a variable identifier in a C program)
mercwithamouth has quit [Ping timeout: 272 seconds]
mojjojo has quit [Quit: mojjojo]
<workmad3> right, enough C/C++ for now, I guess :)
<workmad3> Galeforce: do you like chunky bacon and cartoon foxes?
<popl> It doesn't look like it's been updated recently.
atmosx has joined #ruby
<workmad3> popl: bah, there's a wiki entry on that one now :(
pdimitrov has quit [Quit: Bye folks]
<popl> What's wrong with that?
konrads has quit [Ping timeout: 240 seconds]
nbrosnahan has joined #ruby
nbrosnahan has quit [Client Quit]
<workmad3> means that my Q is now a googleable answer rather than needing thinking :)
Derander has quit [Ping timeout: 260 seconds]
<popl> It's been that way for ages.
<workmad3> yes, but I only found out about it now, so my upset is recent :P
gasbakid_ has joined #ruby
<popl> Boo hoo.
<popl> :P
<workmad3> :D
mojjojo has joined #ruby
moneydouble has quit [Quit: Leaving.]
ldnunes has joined #ruby
Drewch has quit [Quit: Computer has gone to sleep.]
gasbakid has quit [Ping timeout: 272 seconds]
_bart has joined #ruby
Kilo`byte has joined #ruby
konrads has joined #ruby
Derander has joined #ruby
h_kon has quit [Remote host closed the connection]
sepp2k has joined #ruby
<yeboot> speaking of, I'm a lot more experienced with other programming langauges; if i want to make a configuration file for a program, is there an easy way of doing that
mojjojo has quit [Client Quit]
<yeboot> for ruby
sheepman has quit [Remote host closed the connection]
<zaargy> yes...
sheepman has joined #ruby
<yeboot> like, I want to store oauth strings seperate from my script files, so I can put whatever I write on github with my oauth configuration file in .gitignore
<yeboot> ignored in*
sayan has joined #ruby
dukz_ has quit [Read error: No route to host]
dukz has joined #ruby
dennus has joined #ruby
<bnagy> yeboot: y u no env?
<bnagy> for sensitive stuff, anyway
Derander has quit [Ping timeout: 245 seconds]
ringaroses has joined #ruby
TaxmanBD has joined #ruby
zarubin has quit [Read error: Operation timed out]
mojjojo has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
<yeboot> env?
<workmad3> yeboot: environment variables
ringaroses has quit [Ping timeout: 240 seconds]
<workmad3> yeboot: and maybe consider figaro to make that easier
<yeboot> I'll have to consider it
<yeboot> when I started doing ruby it was so that I could feel out of touch with what I was working with
<yeboot> ie. I dove in to feel lost
<workmad3> :)
m__s has joined #ruby
<yeboot> but the syntax is really nice, you can make it functional or declarative
<yeboot> and that's cool
LiVECrys has joined #ruby
porco has quit [Quit: Linkinus - http://linkinus.com]
eka has joined #ruby
mlpinit has joined #ruby
<yeboot> like block syntax reminds me of lambda but is looser
phansch has quit [Ping timeout: 240 seconds]
phansch has joined #ruby
BrenoPerucchi has joined #ruby
tvw has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
luckyruby has quit [Read error: Connection reset by peer]
mlpinit has quit [Ping timeout: 272 seconds]
luckyruby has joined #ruby
h_kon has joined #ruby
BrenoPerucchi has quit [Ping timeout: 272 seconds]
popl has quit [Ping timeout: 272 seconds]
zoee has quit [Quit: This computer has gone to sleep]
bradhe has joined #ruby
Xeago has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
tharindu has joined #ruby
Kilo`byte has quit [Ping timeout: 252 seconds]
dukz_ has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
dukz_ has quit [Remote host closed the connection]
dukz_ has joined #ruby
gasbakid__ has joined #ruby
dangerousdave has quit [Quit: Linkinus - http://linkinus.com]
dukz has quit [Ping timeout: 245 seconds]
dangerousdave has joined #ruby
javos has joined #ruby
dennus has quit []
jrobeson has quit [Ping timeout: 272 seconds]
<aep> is there something as convenient as backtickts, but on a variable instead of a literal?
Kilo`byte has joined #ruby
dangerou_ has joined #ruby
gasbakid_ has quit [Ping timeout: 248 seconds]
JuriadoBalzac has joined #ruby
smathieu has joined #ruby
dangerou_ has quit [Quit: Textual IRC Client: www.textualapp.com]
jrobeson has joined #ruby
dangerou_ has joined #ruby
<DefV> aep: I have no idea what you want
<aep> execute a command, and get its stdout
_bart has quit [Remote host closed the connection]
<aep> but not using a string literal
<workmad3> aep: you mean like '`#{foo}`
camilasan has quit [Remote host closed the connection]
<aep> oh. i guess i could do that, yeah
<aep> feels hacky
camilasan has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
xk_id has joined #ruby
<DefV> Kernel.send(:`, var)
<DefV> but that's also hacky :-)
<aep> :D
Davey has quit [Quit: Computer has gone to sleep.]
<tobiasvl> oh god
smathieu has quit [Ping timeout: 252 seconds]
JohnBat26 has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
beilabs_ has quit [Remote host closed the connection]
<andrewh> first arg to capture2 can be a var
<aep> ah, that's what i was looking for, thanks
Davey has joined #ruby
Derander has joined #ruby
<andrewh> np :)
dangerousdave has quit [Quit: Linkinus - http://linkinus.com]
dangerou_ has quit []
Xeago has joined #ruby
dangerousdave has joined #ruby
allsystemsarego has joined #ruby
drumusician has joined #ruby
mojjojo has quit [Quit: mojjojo]
bradhe has joined #ruby
mojjojo has joined #ruby
lsmola has quit [Ping timeout: 272 seconds]
camilasan has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 245 seconds]
axilla has joined #ruby
<atmosx> apparently Open3.popen3 is the most secure http://stackoverflow.com/a/5970819/577133
<atmosx> I had no idea, I was also using system() and ``... nice info
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Dave has joined #ruby
Dave is now known as Guest33701
fijimunkii has joined #ruby
F1skr has joined #ruby
Davey has quit [Read error: Connection reset by peer]
khushildep has joined #ruby
raphaelivan has quit [Quit: Leaving.]
nbrosnahan has joined #ruby
<shevy> atmosx!
Guest33701 has quit [Quit: Linkinus - http://linkinus.com]
fijimunkii has quit [Remote host closed the connection]
jrhe has quit [Ping timeout: 245 seconds]
dangerousdave has quit []
dangerousdave has joined #ruby
fijimunkii has joined #ruby
<atmosx> shevy: Do you know what volume of distribution is (in pharmacology) ? I'm not making any sense of it's values.
lsmola has joined #ruby
nbrosnahan has quit [Client Quit]
mojjojo has quit [Quit: mojjojo]
fgo has joined #ruby
mojjojo has joined #ruby
Kilo`byte has quit [Ping timeout: 272 seconds]
DouweM has quit [Ping timeout: 264 seconds]
mklappstuhl has joined #ruby
decoponio has joined #ruby
gasbakid_ has joined #ruby
hogeo has quit [Remote host closed the connection]
Kilo`byte has joined #ruby
sayan has quit [Ping timeout: 245 seconds]
gasbakid__ has quit [Ping timeout: 245 seconds]
jrhe has joined #ruby
nbrosnahan has joined #ruby
pagios is now known as pagios__
zoee has joined #ruby
fijimunkii has quit [Ping timeout: 265 seconds]
camilasan has joined #ruby
Lewix has quit [Remote host closed the connection]
blaxter_ is now known as blaxter
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
sandeepk has joined #ruby
sandeepk has quit [Client Quit]
yfeldblum has joined #ruby
mlpinit has joined #ruby
lsmola has quit [Ping timeout: 272 seconds]
coderhs has joined #ruby
<atmosx> bbl
vlad_sta_ has joined #ruby
jbpros has quit [Quit: jbpros]
yfeldblum has quit [Ping timeout: 265 seconds]
matti has joined #ruby
<aep> how do i handle erors from Open3.popen2e ? my block ist just never called and no exception
konrads has quit [Read error: Connection reset by peer]
atmosx has quit [Quit: Lost in trance]
banister has joined #ruby
dzhulk has quit [Quit: Leaving.]
vlad_starkov has quit [Ping timeout: 248 seconds]
mlpinit has quit [Ping timeout: 246 seconds]
kaspergr_ has joined #ruby
kaspergrubbe has quit [Read error: Connection reset by peer]
xk_id has quit [Quit:
ephemerian has quit [Ping timeout: 246 seconds]
a13x212 has quit [Ping timeout: 272 seconds]
predator217 has joined #ruby
Hanmac has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
sevenseacat has joined #ruby
dzhulk has joined #ruby
predator117 has quit [Ping timeout: 245 seconds]
Hanmac1 has quit [Ping timeout: 246 seconds]
jbpros has joined #ruby
fijimunkii has joined #ruby
jrhe has quit [Quit: jrhe]
fijimunkii has quit [Remote host closed the connection]
endash has joined #ruby
watermel0n has joined #ruby
fijimunkii has joined #ruby
gasbakid__ has joined #ruby
rickruby has quit [Remote host closed the connection]
<m__s> i have questio, i have array with string, i want to convers this array to string and then group it by 5, is there any other option insted of doing it in loop?
dangerousdave has quit []
<m__s> i have something like A B C D E F G H I J K
<m__s> and I want to do it like A B C D E F G H I J K L M N O
<m__s> :)
dangerousdave has joined #ruby
lsmola has joined #ruby
emdub has joined #ruby
Xiti has quit [Ping timeout: 248 seconds]
gasbakid_ has quit [Ping timeout: 252 seconds]
Xiti has joined #ruby
Kilo`byte has quit [Ping timeout: 272 seconds]
<workmad3> m__s: so you want the strings "ABCDE", "FGHIJ", "KLMNO" ?
<Hanmac> >> %w{A B C D E F G H I J K L M N O}.each_slice(5).to_a
<eval-in> Hanmac => [["A", "B", "C", "D", "E"], ["F", "G", "H", "I", "J"], ["K", "L", "M", "N", "O"]] (https://eval.in/70329)
jrhe has joined #ruby
<Hanmac> or
<Hanmac> >> %w{A B C D E F G H I J K L M N O}.each_slice(5).map(&:join)
<eval-in> Hanmac => ["ABCDE", "FGHIJ", "KLMNO"] (https://eval.in/70330)
<workmad3> >> [*"A".."O"].each_slice(5).map(&:join)
<eval-in> workmad3 => ["ABCDE", "FGHIJ", "KLMNO"] (https://eval.in/70331)
<workmad3> Hanmac: bah, I was just about to do that :P
<workmad3> Hanmac: thunder stealer :P
gyre007 has joined #ruby
* Hanmac is now known as the "thunder thief" ;P
Kilo`byte has joined #ruby
kaspergrubbe has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
<Hanmac> workmad3: thats are the best irc users ... telling they have a problem, and if you get them to tell what it is and then you solve it, you get no answer anymore ... oO
kaspergr_ has quit [Ping timeout: 264 seconds]
lkba has joined #ruby
bradhe has joined #ruby
gasbakid__ has quit [Ping timeout: 264 seconds]
bradhe has quit [Read error: Connection reset by peer]
zeeraw has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
bradhe has joined #ruby
h_kon has quit [Remote host closed the connection]
h_kon has joined #ruby
aryaching has joined #ruby
rdark_ has joined #ruby
mojjojo has quit [Quit: mojjojo]
mojjojo has joined #ruby
ephemerian has joined #ruby
gasbakid__ has joined #ruby
rdark has quit [Ping timeout: 248 seconds]
Macaveli has joined #ruby
tharindu has quit [Quit: Leaving...]
bradhe has quit [Ping timeout: 245 seconds]
bret has quit [Ping timeout: 248 seconds]
_bart has joined #ruby
Kneferilis has quit [Quit: Leaving]
h_kon has quit [Ping timeout: 246 seconds]
svennidal has joined #ruby
kevinykchan has joined #ruby
kevinykchan has quit [Client Quit]
kevinykchan has joined #ruby
_bart has quit [Read error: Connection reset by peer]
Mon_Ouie has joined #ruby
_bart has joined #ruby
kaspergrubbe has quit [Read error: Connection reset by peer]
kaspergrubbe has joined #ruby
h_kon has joined #ruby
pothibo has joined #ruby
mikecmpbll has joined #ruby
mikecmpbll has quit [Client Quit]
CamonZ has joined #ruby
Kneferilis has joined #ruby
mikecmpbll has joined #ruby
j-allen has joined #ruby
BrenoPerucchi has joined #ruby
_bart_ has joined #ruby
_bart has quit [Read error: Connection reset by peer]
gasbakid__ has quit [Ping timeout: 246 seconds]
fijimunkii has quit [Ping timeout: 240 seconds]
psyl0n has joined #ruby
funburn has quit [Quit: funburn]
tkuchiki has quit [Remote host closed the connection]
gasbakid has joined #ruby
atno has joined #ruby
dukz has joined #ruby
bret has joined #ruby
joonty has quit [Read error: Operation timed out]
dukz_ has quit [Ping timeout: 245 seconds]
_bart_ has quit [Remote host closed the connection]
gasbakid has quit [Ping timeout: 240 seconds]
IceDragon has joined #ruby
fijimunkii has joined #ruby
vlad_starkov has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 245 seconds]
blueOxigen has joined #ruby
soba has quit [Ping timeout: 245 seconds]
_bart has joined #ruby
nisstyre has quit [Ping timeout: 245 seconds]
yeboot has quit [Quit: leaving...]
bluOxigen has quit [Ping timeout: 246 seconds]
mlpinit has joined #ruby
soba has joined #ruby
mikesplain1 has joined #ruby
gasbakid has joined #ruby
mlpinit has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Remote host closed the connection]
jmimi has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby
nisstyre has joined #ruby
xk_id has joined #ruby
sailias has quit [Ping timeout: 264 seconds]
mlpinit has joined #ruby
dukz has quit [Remote host closed the connection]
jkamenik has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
tk__ has joined #ruby
vlad_starkov has joined #ruby
jprovazn has quit [Quit: Leaving]
krz has quit [Ping timeout: 246 seconds]
Kilo`byte has quit [Read error: Operation timed out]
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
shredding has quit [Quit: shredding]
Kilo`byte has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
mlpinit has quit [Ping timeout: 245 seconds]
zeeraw has joined #ruby
strk has joined #ruby
javos has quit [Ping timeout: 265 seconds]
<strk> how do I disable blocks of code ? what's the syntax ?
larissa has joined #ruby
danielcharles has joined #ruby
* strk tried: if 0 do .... done
<strk> indent ain't important, right ? (hoping..)
smathieu has joined #ruby
<tobiasvl> no
kaspergrubbe has joined #ruby
<tobiasvl> this ain't python :)
<sevenseacat> i usually just use =begin and =end block comments
kaspergrubbe has quit [Remote host closed the connection]
shredding has joined #ruby
bradhe has joined #ruby
<strk> maybe it's the comment it doesn't like
<strk> if 0 do # DROPME { ^
<tobiasvl> strk: 0 is true in ruby. you probably want `if false do ... done`
<BrenoPerucchi> Hash.except only accept this hash.except(:code1, code2) but h = Hash[:code1 =>1, :code2 => 2} --> hash.except(h.keys) not work because the brackets of array
kaspergrubbe has joined #ruby
<tobiasvl> s/true/truthy
TaxmanBD has quit [Ping timeout: 245 seconds]
<strk> if false do // DROPME {
<tobiasvl> the only things that are falsy in ruby is false and nil.
<strk> ^ syntax error
mikesplain1 has quit [Ping timeout: 265 seconds]
<strk> how does a comment look like ?
<sevenseacat> well yes, ruby doesnt do // comments
<sevenseacat> # comment
eregon_ has quit [Read error: Connection reset by peer]
<strk> nor it does # comments
<tobiasvl> >> puts (0 ? "0 is truthy" : "0 is falsy")
<strk> it didn't like # either
<eval-in> tobiasvl => 0 is truthy ... (https://eval.in/70339)
<tobiasvl> strk: maybe you can gist your code
<tobiasvl> # is comment
<tobiasvl> 0 is truthy
<tobiasvl> so
<strk> if false do # DROPME {
Asher has quit [Quit: Leaving.]
<tobiasvl> strk: maybe you can gist your code
Asher has joined #ruby
<sevenseacat> >> puts 'hello' # this is a comment
<eval-in> sevenseacat => hello ... (https://eval.in/70340)
<sevenseacat> see?
<strk> >> if false do; puts 'eh'; done
<eval-in> strk => /tmp/execpad-5cf8a4063312/source-5cf8a4063312:2: syntax error, unexpected keyword_do, expecting keyword_then or ';' or '\n' ... (https://eval.in/70342)
AlSquire has joined #ruby
smathieu has quit [Ping timeout: 246 seconds]
<sevenseacat> done isnt a ruby keyword
<sevenseacat> do is not used there either
<tobiasvl> s/done/end
<sevenseacat> may i suggest a ruby tutorial?
tkuchiki has joined #ruby
<strk> >> if false do; puts 'eh'; end
<eval-in> strk => /tmp/execpad-02d606502131/source-02d606502131:2: syntax error, unexpected keyword_do, expecting keyword_then or ';' or '\n' ... (https://eval.in/70343)
<strk> yes, sorry
jmimi has joined #ruby
bradhe has quit [Ping timeout: 248 seconds]
<strk> =begin =end are very good though ;)
<tobiasvl> if false then; puts 'eh'; end
<tobiasvl> >> if false then; puts 'eh'; end
<eval-in> tobiasvl => nil (https://eval.in/70344)
<tobiasvl> >> if true then; puts 'eh'; end
<eval-in> tobiasvl => eh ... (https://eval.in/70345)
shredding has quit [Quit: shredding]
eregon has joined #ruby
Davey has joined #ruby
Asher has quit [Read error: Operation timed out]
<dagobah> Is there a way in Ruby to retry a begin...end block in a rescue?
vlad_starkov has joined #ruby
misutowolf has quit [Disconnected by services]
strmcrw has joined #ruby
misutowolf_ has joined #ruby
<apeiros> dagobah: yes. with `retry`
<apeiros> just make sure you don't create an infinite loop.
blackmesa has joined #ruby
nbrosnahan has quit [Quit: Textual IRC Client: www.textualapp.com]
<m__s> Hanmac: thanks
<dagobah> Can you retry once without a counter?
Elhu has joined #ruby
jprovazn has joined #ruby
sambao21 has joined #ruby
fijimunkii has quit [Ping timeout: 245 seconds]
amoli has joined #ruby
zipper has quit [Ping timeout: 246 seconds]
lunarjar has joined #ruby
mrfoto has quit []
mojjojo has quit [Quit: mojjojo]
osvico has quit [Ping timeout: 328 seconds]
ahawkins_ has joined #ruby
fmcgeough has joined #ruby
GreatSUN has joined #ruby
<GreatSUN> rehi all
mojjojo has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<GreatSUN> does someone of you guys have an idea how to get rid of utf-8 problem in windows using ruby 1.9.3?
<GreatSUN> I have utf-8 characters in code, at the first line I have #encoding: utf-8
<GreatSUN> already tried setting ENV['RUBYOPT'] = '-Ku'
<GreatSUN> but no effort
kaldrenon has joined #ruby
falood has quit []
ahawkins has quit [Ping timeout: 272 seconds]
MarcWeber has joined #ruby
zipper has joined #ruby
<MarcWeber> How to I attach a Class.new to scope M:: ?
misutowolf_ has quit [Ping timeout: 272 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
<Hanmac> MarcWeber: const_set ?
gadgetoid has quit [Read error: Connection reset by peer]
gadgetoid_ has joined #ruby
gadgetoid_ is now known as gadgetoid
mjs2600 has joined #ruby
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<MarcWeber> Hanmac: :)
shredding has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
Macaveli_ has joined #ruby
mojjojo has quit [Quit: mojjojo]
_bart has quit [Remote host closed the connection]
mojjojo has joined #ruby
lfox has joined #ruby
Nilium has joined #ruby
BizarreCake has joined #ruby
mklappst_ has joined #ruby
hasham has joined #ruby
nateberkopec has joined #ruby
mklappstuhl has quit [Ping timeout: 245 seconds]
ananthakumaran has quit [Quit: Leaving.]
zipper has quit [Read error: Operation timed out]
asobrasil has joined #ruby
mercwithamouth has joined #ruby
zipper has joined #ruby
duggiefresh has joined #ruby
sailias has joined #ruby
aMoniker has quit [Read error: Connection reset by peer]
nisstyre has quit [Ping timeout: 264 seconds]
mojjojo has quit [Quit: mojjojo]
ringaroses has joined #ruby
akonny has joined #ruby
Davey has joined #ruby
duggiefresh has quit [Remote host closed the connection]
Macaveli_ has quit [Read error: Connection reset by peer]
turduks has joined #ruby
coder_neo has joined #ruby
Macaveli has joined #ruby
soba has quit [Ping timeout: 248 seconds]
gr33n7007h has joined #ruby
hasham has left #ruby ["WeeChat 0.3.8"]
blueOxigen has quit [Ping timeout: 272 seconds]
ravster has joined #ruby
<turduks> **Earn 0.25$ Per Lead **. For Details:http://www.StillRemember.Net/Affiliate.htm
turduks has quit [Killed (idoru (Spam is off topic on freenode.))]
Davey has quit [Max SendQ exceeded]
IceDragon has quit [Ping timeout: 265 seconds]
IceDragon has joined #ruby
coca_rails has joined #ruby
svennidal has quit [Remote host closed the connection]
mojjojo has joined #ruby
blaskovicz has joined #ruby
pedda has joined #ruby
coca_rails has quit [Client Quit]
tk__ has quit [Quit: ばいばい]
Macaveli has quit [Client Quit]
colonolGron has joined #ruby
snath has quit [Ping timeout: 260 seconds]
strk has left #ruby [#ruby]
mojjojo has quit [Client Quit]
gasbakid has quit [Ping timeout: 246 seconds]
h_kon has quit [Remote host closed the connection]
ahawkins has joined #ruby
bradhe has joined #ruby
akonny has quit [Quit: akonny]
akonny has joined #ruby
vancooten has quit [Remote host closed the connection]
ahawkins_ has quit [Ping timeout: 272 seconds]
noop has quit [Ping timeout: 265 seconds]
turduks has joined #ruby
dzhulk has quit [Quit: Leaving.]
elux has joined #ruby
bradhe has quit [Ping timeout: 246 seconds]
turduks has quit [Client Quit]
phansch has quit [Ping timeout: 246 seconds]
larissa has quit [Quit: Leaving]
vpretzel has joined #ruby
troessner has quit [Ping timeout: 252 seconds]
nfk has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
troessner has joined #ruby
n1x has quit [Ping timeout: 272 seconds]
smathieu has joined #ruby
turduks has joined #ruby
nowthatsamatt has joined #ruby
krz has joined #ruby
catphish has joined #ruby
jonathanwallace has quit [Ping timeout: 246 seconds]
<catphish> why does ruby refuse to "multiple assignment in conditional"? :(
h_kon has joined #ruby
h_kon has quit [Remote host closed the connection]
<jrobeson> because it doesn't like it?
turduks has quit [Client Quit]
<m__s> Hanmac: and sorry for that it takes me that long to answer but I'm very busy at work at the momen :-( anyway version with each_slice(5).map(&:join) worked very well! :) thanks again!
gasbakid has joined #ruby
endash_ has joined #ruby
stevenhaddox has quit [Quit: Sayonora!]
smathieu has quit [Ping timeout: 252 seconds]
Davey has joined #ruby
<apeiros> catphish: because it makes no sense
<apeiros> catphish: a multiple assignment as single object is an array
<apeiros> an array is always true
<apeiros> and `if true` is pointless
coder_neo has quit [Quit: This computer has gone to sleep]
lucazi has joined #ruby
yfeldblum has joined #ruby
thesheff17 has joined #ruby
<dagobah> Is there a way to do multiple assignment in an if statement, `if (a, b = [1,2])` ?
<dagobah> without something horrible like `if (_=(a, b = [1,1]))`
<catphish> no
fgo has quit [Remote host closed the connection]
<apeiros> dagobah: as I just said - that makes absolutely no sense.
<apeiros> dagobah: (a, b = [1,2]) # => [1, 2]
<dagobah> That is unfortunate.
<apeiros> and `if [1, 2]` is as pointless as `if true`
<Mon_Ouie> But what do you want to use it for anyway?
<apeiros> dagobah: it's unfortunate that you want to do something which makes no sense?
mmitchell has joined #ruby
ravster has quit [Ping timeout: 248 seconds]
Hanmac1 has joined #ruby
danshultz has joined #ruby
nateberkopec has quit [Quit: Leaving...]
<catphish> 0 == 0 doesn't make sense, but ruby doesn't raise an error if i run it
Guest46558 has quit []
<dagobah> `if id, name = Product.find_by_name(params[:name]).pluck(:id, :name) ...` would make for a nice use case.
<workmad3> catphish: that makes sense in the way that it's not ambiguous
<apeiros> catphish: yeah, that part is interesting. in most other such cases, ruby merely emits a warning
<apeiros> catphish: personally I prefer the raise
<Mon_Ouie> dagobah: But what would it mean?
<colonolGron> are files in /sys/class/power_supply the same on all machines?
<colonolGron> the same name i mean
<workmad3> while 'if a,b = [1,2]' is ambiguous... what should ruby do with 'if a,b = [1, nil]'? || them? && them?
Hanmac has quit [Ping timeout: 272 seconds]
<catphish> [!!(a, b = [1, 2]), !!(a, b = nil)]
fijimunkii has joined #ruby
<colonolGron> oh sorry, wrong channel
<catphish> nb, you can't execute that :(
<catphish> >>[!!(a, b = [1, 2]), !!(a, b = nil)]
<eval-in> catphish => /tmp/execpad-741a1f8f0a33/source-741a1f8f0a33:2: multiple assignment in conditional ... (https://eval.in/70404)
endash_ has quit [Quit: endash_]
<catphish> all return values for multiple assignment are true EXCEPT a, b = nil and a, b = false, perfectly valid and false examples
thesheff17_ has joined #ruby
pedda has quit [Quit: Textual IRC Client: www.textualapp.com]
ravster has joined #ruby
<aep> can i use Open3 with an array as variable instead of arguments? i.e. Open3.capture2e(["echo", "bla"]) instead of Open3.capture2e("echo", "bla")
<workmad3> catphish: I'd personally find it quite surprising if the 'if' block got evaluated with 'a, b = [nil, nil]'
<aep> or can i somehow unbox an array as arguments?
kil0byte has joined #ruby
Hanmac1 is now known as Hanmac
nateberkopec has joined #ruby
<catphish> workmad3: it won't, it always raises an exception
<catphish> but i don't get why
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<workmad3> catphish: at a guess, because it would violate the principle of least surprise quite badly
<catphish> well i can't argue with that
burlyscudd has joined #ruby
mikecmpbll has joined #ruby
<catphish> some might argue that a, b = nil *should* raise the exception instead for having mismatched numbers of values
Icca has joined #ruby
Icca has quit []
akonny has quit [Quit: akonny]
<dagobah> I'd disagree.
Kneferilis has quit [Quit: Leaving]
_bart has joined #ruby
nateberkopec has quit [Ping timeout: 245 seconds]
sevenseacat has quit [Quit: Leaving.]
akonny has joined #ruby
<catphish> i'd prefer it always return an array
nari_ has quit [Ping timeout: 272 seconds]
<catphish> particularly if it's going to refuse to check its truthiness
<catphish> a, b, c = [1, 2, 3, 4, 5] IMO should return [1, 2, 3] and a, b = 1 should return [1, nil]
mlpinit has joined #ruby
<catphish> but since its not my programming language i dont get to make the call ;)
iamjarvo has joined #ruby
Kilo`byte has quit [Ping timeout: 246 seconds]
interactionjaxsn has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
fuhgeddaboudit has joined #ruby
baordog has joined #ruby
SeySayux has quit [Ping timeout: 245 seconds]
stetho has joined #ruby
Elhu has joined #ruby
Kneferilis has joined #ruby
SeySayux has joined #ruby
pothibo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
xjiujiu has quit [Ping timeout: 272 seconds]
Kilo`byte has joined #ruby
failshell has joined #ruby
jonahR has joined #ruby
lucazi has quit [Ping timeout: 272 seconds]
jonahR has quit [Client Quit]
machi_ has joined #ruby
kil0byte has quit [Remote host closed the connection]
kcombs has joined #ruby
watermel0n has quit []
colonolGron has quit [Quit: Lost terminal]
yfeldblum has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
mary5030 has joined #ruby
Asher has joined #ruby
ekarlso has quit [Ping timeout: 260 seconds]
ekarlso has joined #ruby
ekarlso has quit [Read error: Connection reset by peer]
Mon_Ouie has quit [Ping timeout: 245 seconds]
duggiefresh has joined #ruby
ekarlso has joined #ruby
sailias has quit [Ping timeout: 246 seconds]
sailias has joined #ruby
joonty has joined #ruby
tharindu has joined #ruby
akonny has quit [Quit: akonny]
jonathanwallace has joined #ruby
lmickh has joined #ruby
mikesplain1 has joined #ruby
kreantos has quit []
wallerdev has joined #ruby
bradhe has joined #ruby
nari_ has joined #ruby
ce_afk is now known as cescalante
Apane has joined #ruby
cgore has joined #ruby
mikesplain1 has quit [Ping timeout: 272 seconds]
camilasan has quit [Remote host closed the connection]
<dagobah> catphish: You could slurp up your assignment with `_`
camilasan has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 265 seconds]
CaptainKnots has joined #ruby
iamjarvo has quit [Remote host closed the connection]
<catphish> dagobah: interesting, it's not important to me though, obviously my could would be much better rewritten for clarity :)
salmonax has quit [Ping timeout: 246 seconds]
banister has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
nwertman has quit [Ping timeout: 272 seconds]
mikecmpbll has quit [Ping timeout: 272 seconds]
MrThePlague has joined #ruby
<dagobah> Ruby 2.0 allows this nicety too `a, *b, c = %w(1 2 3 4 5)`
<catphish> eek
mikecmpbll has joined #ruby
<catphish> cool but i won't be using it :)
momomomomo has joined #ruby
_bart has quit [Remote host closed the connection]
<Morrolan> dagobah: What on... for one reason or another, ZNC's watch module was triggered by your message. :P
coder_neo has joined #ruby
coder_neo has quit [Remote host closed the connection]
mikesplain1 has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
<dagobah> Morrolan: woops.
<Morrolan> Not your fault, I probably messed up while defining the patterns.
dukedave has joined #ruby
sayan has joined #ruby
sailias has quit [Ping timeout: 272 seconds]
sudorandom has joined #ruby
sudorandom has left #ruby [#ruby]
bean has joined #ruby
kristofers has joined #ruby
vlad_starkov has joined #ruby
strmcrw has quit [Quit: Textual IRC Client: www.textualapp.com]
nowthatsamatt has quit [Quit: nowthatsamatt]
lukec has joined #ruby
stetho has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gyre007 has quit [Remote host closed the connection]
bakingbread is now known as icedp
nateberkopec has joined #ruby
watermel0n has joined #ruby
evenix has joined #ruby
<shredding> Does someone has experience with paypal-recurring?
rdark_ has quit [Ping timeout: 272 seconds]
sandeepk has joined #ruby
rdark has joined #ruby
s2013 has joined #ruby
mr_red has quit [Max SendQ exceeded]
ckinni has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
mr_red has joined #ruby
iamjarvo has joined #ruby
<Hanmac> it seems today is "make hanmac angry"-day ... first firefox breaks some addons with its update, then eclipse doesnt want to rebuild index again ... :/
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
turduks has joined #ruby
kristofers has quit [Read error: Connection reset by peer]
gasbakid has quit [Ping timeout: 245 seconds]
sailias has joined #ruby
sandeepk_ has joined #ruby
sandeepk has quit [Read error: Connection reset by peer]
<turduks> **Earn 0.25$ Per Lead **. For Details:http://www.StillRemember.Net/Affiliate.htm
turduks has quit [K-Lined]
turduks has joined #ruby
turduks has quit [K-Lined]
tkuchiki has quit [Ping timeout: 252 seconds]
sandeepk_ has quit [Client Quit]
<Hanmac> why should something buy plumb ? ;P
<Morrolan> "first firefox breaks some addons with its update," <- Thunderbird did that too, a while ago.
mlpinit has quit [Remote host closed the connection]
<Morrolan> A minor version broke compatability with the Exchange and calendar addon. :<
tharindu has quit [Quit: Leaving...]
<Hanmac> Morrolan: are you a firefox user?
<Morrolan> Yep.
<Hanmac> do you like the addonbar that the foot of the window?
momomomomo has quit [Quit: momomomomo]
<Morrolan> Addonbar? Which version was that one added?
<Morrolan> (Am on Windows atm, where I don't update as regularly as on Linux.)
kristofers has joined #ruby
tagrudev has quit [Remote host closed the connection]
jkamenik has quit [Quit: Leaving.]
axl_ has joined #ruby
<Morrolan> Hmm, nope, seems I'm using the latest version, at the moment.
Liquid-- has joined #ruby
mando has joined #ruby
axilla has quit [Ping timeout: 272 seconds]
ringaroses has quit [Quit: Leaving]
<Hanmac> Morrolan: look at in the menu at "view->toolbars"
turduks has joined #ruby
gasbakid has joined #ruby
<Hanmac> there was an addon bar where you could add extension icons into it
cody-- has joined #ruby
<Morrolan> Oh, I see, it wasn't enabled.
F1skr has quit [Quit: WeeChat 0.4.2]
<olivier_bK> i have another problem :(
<Morrolan> Looks nice. Quick access to, for example, Foxy Proxy, without having to open the menu.
mlpinit has joined #ruby
<olivier_bK> i need to grep and get all after = and between '
<olivier_bK> in my variable $config['uid'] = 'automation2alpha';
s2013 has quit [Remote host closed the connection]
CaptainJet has joined #ruby
turduks has quit [K-Lined]
<Hanmac> Morrolan: yeah, but in the newest version thery kicked it out
<Morrolan> :o
<olivier_bK> when i start i thinking to use delete(";'\"") on variable but in some file the variable uid are not across the top of the file but in the middle
machi_ has quit []
<olivier_bK> do you have an idea how i can do it
gasbakid_ has joined #ruby
sayan has quit [Ping timeout: 246 seconds]
Macaveli has joined #ruby
Lewix has joined #ruby
rippa has joined #ruby
falood has joined #ruby
gasbakid has quit [Ping timeout: 245 seconds]
heftig has quit [Quit: Quitting]
SHyx0rmZ has joined #ruby
theRoUS has joined #ruby
nateberkopec has quit [Ping timeout: 246 seconds]
Kabaka has joined #ruby
amoli has quit [Ping timeout: 272 seconds]
tesuji has quit [Read error: Connection reset by peer]
sailias has quit [Ping timeout: 272 seconds]
GreatSUN has quit [Quit: Page closed]
sambao21 has joined #ruby
colonolGron has joined #ruby
mansi has joined #ruby
hololeap has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
sailias has joined #ruby
terrellt has joined #ruby
_maes_ has joined #ruby
troessner has quit [Quit: Leaving]
cpruitt has joined #ruby
mojjojo has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sandeepk has joined #ruby
tkuchiki has joined #ruby
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy> olivier_bK sorry, I do not understand. What do you need?
johnnyfuchs has joined #ruby
Bassam has joined #ruby
s2013 has joined #ruby
nowthatsamatt has joined #ruby
jrhe has quit [Ping timeout: 246 seconds]
havenwood has joined #ruby
wrseward has quit [Quit: Leaving]
stetho has joined #ruby
Evixion has quit [Read error: Connection reset by peer]
mojjojo has quit [Quit: mojjojo]
mikesplain1 has quit [Quit: WeeChat 0.4.2]
mikesplain has joined #ruby
yacks has quit [Ping timeout: 272 seconds]
psyl0n has quit [Remote host closed the connection]
mando has quit [Remote host closed the connection]
Macaveli has quit [Quit: Computer has gone to sleep.]
mando has joined #ruby
Gwyxx is now known as SL-RHanson
mojjojo has joined #ruby
Evixion has joined #ruby
gyre007 has joined #ruby
danman has joined #ruby
tharindu has joined #ruby
bradhe has joined #ruby
blaskovicz has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Quit: Computer has gone to sleep.]
aa47f8 has joined #ruby
mikecmpbll has joined #ruby
amritanshu_RnD has quit [Remote host closed the connection]
blaskovicz has joined #ruby
coderhs has quit [Ping timeout: 272 seconds]
sandeepk has quit [Read error: Connection reset by peer]
sandeepk_ has joined #ruby
mlpinit has quit [Remote host closed the connection]
<olivier_bK> i dont understand my error ?
zoee has quit [Quit: This computer has gone to sleep]
mengu has quit []
ananthakumaran1 has joined #ruby
bradhe has quit [Ping timeout: 246 seconds]
hiall has joined #ruby
carraroj has joined #ruby
<terrellt> ...Dude, it's pointing -right at it-
<havenwood> olivier_bK: ['uid'}
ananthakumaran has quit [Read error: Connection reset by peer]
hololeap has joined #ruby
<terrellt> There's an arrow and everything.
<havenwood> Go home '}', you're drunk.
banister has joined #ruby
sarkie has joined #ruby
camilasan has joined #ruby
nisstyre has joined #ruby
sarkie has quit [Changing host]
sarkie has joined #ruby
sarkie has joined #ruby
sarkie has quit [Changing host]
<havenwood> Though really the '}' belongs and just the ']' was omitted.
camilasan has quit [Read error: Connection reset by peer]
blaskovicz has left #ruby [#ruby]
nwertman has joined #ruby
<tobiasvl> come back, ']', you're not drunk enough
Xeago has quit [Remote host closed the connection]
mojjojo has quit [Quit: mojjojo]
mlpinit has joined #ruby
Liquid-- has quit [Quit: Computer has gone to sleep.]
Lewix has quit [Remote host closed the connection]
Liquid-- has joined #ruby
quizme has joined #ruby
<quizme> hi, i want to expose ruby on the web, how can i do that safely and securely? Do I run it in a jail shell ?
momomomomo has joined #ruby
hogeo has joined #ruby
camilasan has joined #ruby
sethetter has joined #ruby
thesheff17_ has quit [Quit: Leaving]
<sethetter> If I open a file with "File.open(path, 'w')..." will it create the file if it doesn't exist?
deception has joined #ruby
benzrf has joined #ruby
<benzrf> hello
<benzrf> was somebody named tkbx in here earlier
enebo has joined #ruby
<quizme> sethetter: try it?
Spami has joined #ruby
nomenkun has quit [Ping timeout: 245 seconds]
threesome has quit [Ping timeout: 246 seconds]
ahawkins has quit [Quit: leaving]
yfeldblum has joined #ruby
phansch has joined #ruby
Liquid-- has quit [Quit: Computer has gone to sleep.]
nomenkun has joined #ruby
maletor has joined #ruby
<Hanmac> benzrf: as far as i currently can see there was a one_tkbx there 10 days ago ... but i can look in the public log
colonolGron has quit [Quit: Lost terminal]
Tearan has joined #ruby
mlpinit has quit [Remote host closed the connection]
<benzrf> hah
zipper has quit [Quit: Lost terminal]
<benzrf> he told me somebody here trolled him
Soda has joined #ruby
<benzrf> i just wanted to thank that person
stetho has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has quit [Remote host closed the connection]
salmonax has joined #ruby
lethjakman has joined #ruby
brunoro has joined #ruby
jonahR has joined #ruby
nari_ has quit [Ping timeout: 248 seconds]
smathieu has joined #ruby
geekbri has joined #ruby
coderhs has joined #ruby
awarner_ has joined #ruby
jerius has joined #ruby
awarner_ has quit [Read error: Connection reset by peer]
awarner has quit [Read error: Connection reset by peer]
jibi has joined #ruby
awarner has joined #ruby
sauce has joined #ruby
javos has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<sauce> ruby noob here. i need to set GEM_PATH for commands that run in crontab. what would be the best way to do that?
smathieu has quit [Read error: Operation timed out]
<sauce> the command is this /opt/ruby-enterprise-1.8.7-2012.02/bin/rake and it fails with "Could not find RubyGem rake (>= 0) (Gem::LoadError)" because the GEM_PATH needs to be adjusted
<blackmesa> Hi all. anybody can explain me what 'bundle install ... --binstubs' means? it does install the gem folders and binaries inside the application folder?
<quizme> sauce: write a self-contained bash script that sets the paths in the script, then invoke the bash script in the cron entry
<Hanmac> sauce ruby1.8.7 does not get any support there ...
<Hanmac> sauce: try #rubyonrails
jbpros has quit [Quit: jbpros]
phansch has quit [Remote host closed the connection]
<Hanmac> blackmesa: #bundler
nisstyre has quit [Quit: Leaving]
phansch has joined #ruby
colonolGron has joined #ruby
zeeraw has joined #ruby
falood has quit [Remote host closed the connection]
jbpros has joined #ruby
momomomomo has quit [Quit: momomomomo]
jrhe has joined #ruby
zxq9 has joined #ruby
jbpros has quit [Client Quit]
<sauce> quizme Hanmac thanks guys
<olivier_bK> how i can grep for find $config['uid'] i try that grep(/"config['uid']"/)
<olivier_bK>
wallerdev has quit [Quit: wallerdev]
sauce has left #ruby ["Textual IRC Client: www.textualapp.com"]
rdark has quit [Ping timeout: 248 seconds]
<Hanmac> olivier_bK: i think the " are to much, try this: grep(/config['uid']/)
stetho has joined #ruby
dhruvasagar has quit [Ping timeout: 272 seconds]
jerius has quit [Quit: Computer has gone to sleep.]
<olivier_bK> Hanmac, that's didn't work too
kevind has joined #ruby
rdark has joined #ruby
mlpinit has joined #ruby
valesk has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<IceDragon> olivier_bK: grep(/config\['uid'\]/
<olivier_bK> why the \ between g and [
pixelgremlins has joined #ruby
bluOxigen has joined #ruby
<IceDragon> escape [ and ]
jamblack has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
baroquebobcat has joined #ruby
<varfoo> hey guys! question
<varfoo> is there a underscore method for dashes?
g0bl1n has joined #ruby
benzrf has quit [Read error: No route to host]
<terrellt> "bla-bla".gsub("-","_")?
el_cristobal has quit [Quit: Leaving]
heftig has joined #ruby
<varfoo> isn't there a cleaner way?
<workmad3> or "bla-bla".tr("-","_")
mlpinit has quit [Read error: Connection reset by peer]
mlpinit has joined #ruby
zeeraw has joined #ruby
colonolGron has quit [Quit: leaving]
<varfoo> ok nvm, found it... parameterize
colonolGron has joined #ruby
gasbakid_ has quit [Quit: Quitte]
<workmad3> varfoo: it would help if you mentioned this was in rails
<workmad3> varfoo: or consider asking in #rubyonrails to make it clearer ;)
atno has quit [Read error: Connection reset by peer]
asteros has joined #ruby
_HolyCow1 is now known as _HolyCow
<varfoo> workmad3: i'll remember that one hehe.
b00stfr3ak has joined #ruby
b00stfr3ak has joined #ruby
b00stfr3ak has quit [Changing host]
<varfoo> how do you change "FooBar" to "Foo Bar"?
noname001__ has quit [Read error: Operation timed out]
kristofers has quit [Remote host closed the connection]
ehc has joined #ruby
sethetter has left #ruby [#ruby]
macmartine has joined #ruby
mikepack has joined #ruby
troessner has joined #ruby
zz_tsykoduk is now known as tsykoduk
kaspergr_ has joined #ruby
alup has quit [Quit: Leaving]
havenwood has joined #ruby
larssmit has quit [Quit: Leaving.]
newUser1234 has joined #ruby
<speakingcode-wor> anyone using rvm? i want it to automatically switch rubies/gemsets based on directives in my Gemfile when i cd into the directory; it does not seem to be working, following the documentation here https://rvm.io/workflow/projects#project-file-gemfile
momomomomo has joined #ruby
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
j-allen has quit [Quit: j-allen]
<havenwood> speakingcode-wor: I like the `.ruby-version` convention that rvm supports, but i'm a chruby user.
<Hanmac> varfoo: like that?
<Hanmac> >> "FooBar".gsub(/(.)([[:upper:]])/,"\\1 \\2")
<eval-in> Hanmac => "Foo Bar" (https://eval.in/70693)
<havenwood> speakingcode-wor: `.ruby-version` is cross-compatible with chruby and rvm, and even rbenv *tries* to place nice with it. :P
<theRoUS> i've just started using HighLine. i've found that HighLine.new.ask('Question: ', String) => a string enclosed in double-quotation marks.
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
<havenwood> speakingcode-wor: But that is ruby version only, not gemsets. I use bundler for that.
<theRoUS> how do i just get the string that was entered without HighLine adding the quotation marks around it?
mercwithamouth has quit [Ping timeout: 272 seconds]
kaspergrubbe has quit [Ping timeout: 246 seconds]
yfeldblum has joined #ruby
aganov has quit [Quit: aganov]
weszlem has quit []
<havenwood> theRoUS: It is a String being returned. It will *always* have double quotes. You can create it how you want, but the String literal being returned is just that way.
<havenwood> theRoUS: (The quotes aren't part of the String, they in a literal sense denote its beginning and ending.
kaspergr_ has quit [Ping timeout: 248 seconds]
<havenwood> )
javos has quit [Quit: Leaving...]
mlpinit has quit [Remote host closed the connection]
<havenwood> theRoUS: This would be a string that starts and ends with single-quotes:
<havenwood> >> "'hi'"
<eval-in> havenwood => "'hi'" (https://eval.in/70694)
<speakingcode-wor> havenwood: i appreciate the suggestion but i'd prefer to get this to work because i am working on several projects with other people and it would be overall best to follow their convention
evenix has quit [Remote host closed the connection]
<havenwood> speakingcode-wor: Make sure you're using the latest rvm then, to start with.
<havenwood> speakingcode-wor: rvm get latest
evenix has joined #ruby
<varfoo> Hanmac: no cleaner way?
<havenwood> speakingcode-wor: And #rvm is helpful if you get stuck.
<havenwood> varfoo: Whatcha doing?
hogeo has quit [Remote host closed the connection]
TMM has quit [Quit: Ex-Chat]
shaunbak_ has quit [Remote host closed the connection]
moneydouble has joined #ruby
<speakingcode-wor> havenwood: thanks, didn't realize they had a channel
<havenwood> varfoo: nvm, checking log
shaunbaker has joined #ruby
<workmad3> speakingcode-wor, havenwood: you can use .ruby-gemset (or is it .rvm-gemset?) for setting the gemset too :)
j-allen has joined #ruby
mercwithamouth has joined #ruby
<havenwood> workmad3: .ruby-gemset it looks like yeah, those wilily bastages!
<workmad3> havenwood: it's better than the .rvmrc convention that executed arbitrary code when you went into a directory ;)
<havenwood> hehe
<workmad3> havenwood: and it would be a good convention for another version manager that had gemsets to follow too :)
<havenwood> workmad3: Whew, no gemsets in chruby, no work to do! :)
gstamp has quit [Ping timeout: 256 seconds]
<havenwood> workmad3: But chgems prolly needs a patch... >.>
<workmad3> :)
Tweeks has joined #ruby
<workmad3> chgems == a wrapper around 'export GEM_HOME=$HOME/.gems/ruby/2.0.0@somename'?
Tweeks has left #ruby [#ruby]
joonty has quit [Ping timeout: 246 seconds]
Ivo has quit [Ping timeout: 246 seconds]
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> workmad3: basically, yeah, just sets $GEM_HOME
sergicles has quit [Ping timeout: 265 seconds]
<workmad3> I guess it would also add to the PATH and play with GEM_PATH :)
shaunbaker has quit [Ping timeout: 248 seconds]
jlast has joined #ruby
<havenwood> yup PATH and GEM_PATH
ckinni has joined #ruby
<havenwood> workmad3: actually, it could use a manpage too
<workmad3> heh
<workmad3> I don't use it :)
mlpinit has joined #ruby
<theRoUS> havenwood: no, i don't think so. puts(HighLine.new.ask('Question: ', String)) => "answer" -- but it should be just: answer
bradhe has joined #ruby
<havenwood> workmad3: have the ruby-install and chruby manpage all nice with env vars, yeah i don't use chgems either (hence no homebrew or manpage) :P
ewnd9 has quit [Ping timeout: 245 seconds]
<workmad3> >> puts "hi"
<eval-in> workmad3 => hi ... (https://eval.in/70695)
<theRoUS> wait..
<workmad3> havenwood: :)
<havenwood> theRoUS: It *is* just `answer`, the characters "a", "n", etc.
<theRoUS> never mind, PEBKAC. brain damage on my part.
<theRoUS> "never mind."
<havenwood> hehe
luckyruby has quit [Remote host closed the connection]
<workmad3> theRoUS: :D
luckyruby has joined #ruby
luckyruby has quit [Remote host closed the connection]
<havenwood> >> ?a << ?n << ?s << ?w << ?e << ?r
<eval-in> havenwood => "answer" (https://eval.in/70696)
wallerdev has joined #ruby
shaunbaker has joined #ruby
MrZYX|off is now known as MrZYX
scarfacedeb has joined #ruby
brunoro has quit [Ping timeout: 272 seconds]
ssvo has joined #ruby
<scarfacedeb> Hi, everyone
<scarfacedeb> I'm implementing fragment caching for collections and I'm a bit stuck with the cache_key method
<havenwood> scarfacedeb: g'morn
<scarfacedeb> I'm using `pluck("COUNT(*)", "MAX(updated_at)").flatten.map(&:to_i).join("-")` for now
<scarfacedeb> It works great for collection as long as I don't include order() calls
<scarfacedeb> As a result it gives me PG::GroupingError: ERROR: column "services.position" must appear in the GROUP BY clause
bradhe has quit [Ping timeout: 245 seconds]
<scarfacedeb> and I understand what it means
<scarfacedeb> but my question is - how do you handle cache_key for the ordered (or more specifically - paginated) collections?
<scarfacedeb> Do you omit the order (and limit) calls and use `MAX(updated_at)` function without any LIMIT?
Ivo has joined #ruby
<scarfacedeb> It would work, but it doesn't seem like an efficient way of doing it
Czupa has joined #ruby
<scarfacedeb> havenwood: it's almost midnight at my place :)
threesome has joined #ruby
troessner has quit [Remote host closed the connection]
Lewix has joined #ruby
troessner has joined #ruby
sergicles has joined #ruby
tannerburson has joined #ruby
ghr has quit [Quit: Computer has gone to sleep.]
<Hanmac> 18>> ?a << ?n << ?s << ?w << ?e << ?r
<eval-in> Hanmac => 183037177603844755583715397177931041209470679190197360776246005561912771876019219326177146171116450225761216188992046477638873354551352442679229561194485758116995673358336 (https://eval.in/70701)
zoee has joined #ruby
<Hanmac> havenwood see that is your "answer" ;P
<havenwood> scarfacedeb: Might try #postgresql, my sql-fu isn't strong enough.
<havenwood> Hanmac: hehe
sepp2k has quit [Quit: Konversation terminated!]
mlpinit has quit [Remote host closed the connection]
Ivo has quit [Quit: WeeChat 0.4.2]
javos has joined #ruby
kevind_ has joined #ruby
<havenwood> Ruby 1.8 is dead, long live Ruby 2.0!
* havenwood plays trumpets...
ccolorado has joined #ruby
<ccolorado> is there a way to know the size of an arrary within an each_with_index block ?
asteros has quit [Quit: asteros]
zoee has quit [Client Quit]
<terrellt> Same way you'd do it outside?
dagobah has quit [Remote host closed the connection]
xcess_denied has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kevind has quit [Ping timeout: 272 seconds]
sergicles has quit [Ping timeout: 240 seconds]
kevind_ is now known as kevind
jrhe has quit [Read error: Connection reset by peer]
mlpinit has joined #ruby
<scarfacedeb> havenwood: I'm looking more for a best-practice in the similar situations, but thanks for the suggestion!
<havenwood> scarfacedeb: Are you on Ruby 1.8?
<ccolorado> terrellt: well I guess I should have mentioned that the array is not instantiated.
jrhe has joined #ruby
<havenwood> scarfacedeb: Wait, i'm not sure i see what your problem is. It isn't that Hashes are unordered, is it?
<scarfacedeb> havenwood: hell, no! 2.0.0
jkhwan has joined #ruby
<havenwood> scarfacedeb: Whew. :P Was gunna say Hashes are ordered 1.9.1+. :)
marcgg_ has quit [Remote host closed the connection]
holderbaum has quit [Quit: leaving]
<ccolorado> How can I tell how many files are left to process inside this block ? Dir.entries( 'files' ).each_with_index {|x,y| print "how many left" }
<terrellt> scarfacedb: I responded in #rubyonrails, where this is more appropriate.
benwoody has joined #ruby
jlast has quit [Remote host closed the connection]
<havenwood> scarfacedeb: Yeah, re-read and afraid i still don't get it. My new best guess would be you want lazy enumeration with #take, but I have no clue. I'll defer to terrellt's response. :P
iamjarvo has quit [Remote host closed the connection]
gr33n7007h has quit [Ping timeout: 246 seconds]
yjmsf20 has quit [Quit: Lost terminal]
iamjarvo has joined #ruby
<scarfacedeb> telling: I see, thanks!
jlast has joined #ruby
varfoo has quit [Quit: WeeChat 0.4.0]
<scarfacedeb> havenwood: I re-read it myself and I didn't get it completely neither :)
varfoo has joined #ruby
Voodoofish430 has joined #ruby
<scarfacedeb> I'll try to explain it more coherently
lethjakman has quit [Ping timeout: 272 seconds]
lfox has quit [Quit: ZZZzzz…]
iamjarvo has quit [Ping timeout: 248 seconds]
Tarential has quit [Excess Flood]
Underbyte has quit [Ping timeout: 260 seconds]
Tarential has joined #ruby
hogeo has joined #ruby
timonv has quit [Remote host closed the connection]
hamakn has quit [Read error: Connection reset by peer]
BrenoPerucchi has quit [Remote host closed the connection]
hamakn has joined #ruby
brtdv has quit []
nobitanobi has joined #ruby
mojjojo has joined #ruby
jerius has joined #ruby
cburyta has joined #ruby
aspires has joined #ruby
harrymoreno has joined #ruby
Tarential has quit [Excess Flood]
colonolGron has quit [Remote host closed the connection]
<nobitanobi> morning
<havenwood> colonolGron: You could do some tricks to not have that be multiple lines, but that straightforward way is to assign the size before you iterate.
Tarential has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
<havenwood> ccolorado: Oops, meant that for you ^
mercwithamouth has quit [Ping timeout: 248 seconds]
<havenwood> >> [*('a'..'f')].tap { |a| @size = a.size }.each_with_index { |_, index| puts "This many left: #{@size - index.succ}" }
<eval-in> havenwood => This many left: 5 ... (https://eval.in/70724)
evenix_ has joined #ruby
hogeo has quit [Ping timeout: 272 seconds]
<havenwood> ccolorado: A not-straightforward way ^
krz has quit [Quit: krz]
<cwarner> why is it that if you're parameter method is set to 0 ruby interprets that as being nil?
<havenwood> cwarner: huh? example?
El_Dood has joined #ruby
colonolGron has joined #ruby
rrichardsr3 has joined #ruby
<havenwood> >> {result: 0}[:result].nil?
<eval-in> havenwood => false (https://eval.in/70726)
rrichardsr3 has quit [Max SendQ exceeded]
<cwarner> hrmm
DanKnox_away is now known as DanKnox
danman has quit [Remote host closed the connection]
evenix has quit [Ping timeout: 264 seconds]
rrichardsr3 has joined #ruby
rrichardsr3 has quit [Max SendQ exceeded]
cburyta has quit [Ping timeout: 252 seconds]
quizme has quit [Quit: This computer has gone to sleep]
danman has joined #ruby
rrichardsr3 has joined #ruby
rrichardsr3 has quit [Max SendQ exceeded]
aMoniker_ has joined #ruby
aMoniker_ has left #ruby [#ruby]
<cwarner> my error I was passing a nil..
pika_pika has joined #ruby
xk_id has quit [Ping timeout: 245 seconds]
psyl0n has joined #ruby
konrads has joined #ruby
blaxter has quit [Quit: foo]
bradhe has joined #ruby
varfoo has quit [Quit: WeeChat 0.4.0]
<scarfacedeb> havenwood: I decided the get rid of order and limit calls and just query the whole tables (indexes ftw)
<havenwood> scarfacedeb: aha :)
<scarfacedeb> havenwood: I only hope that it won't ruin my response time.)
einarj has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
RichardBaker has joined #ruby
xk_id has joined #ruby
apeiros has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
phansch has quit [Remote host closed the connection]
pika_pika_ has joined #ruby
psyl0n has quit [Ping timeout: 248 seconds]
smathieu has joined #ruby
nvrch has quit [Quit: nvrch]
Tuxist has joined #ruby
tkuchiki has quit [Remote host closed the connection]
ananthakumaran1 has quit [Quit: Leaving.]
svennidal has joined #ruby
<ccolorado> havenwood: I see, bummer, thanks for the help
mercwithamouth has joined #ruby
pika_pika has quit [Ping timeout: 265 seconds]
apeiros has quit [Ping timeout: 246 seconds]
_lfox has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
timonv has joined #ruby
sayan has joined #ruby
xk_id has quit [Ping timeout: 246 seconds]
pskosinski has joined #ruby
shredding has quit [Quit: shredding]
mansi has quit [Remote host closed the connection]
machi has joined #ruby
xk_id has joined #ruby
ziikutv has joined #ruby
mansi has joined #ruby
<ziikutv> test
ziikutv has left #ruby [#ruby]
ziikutv has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
sarkie has quit [Quit: Page closed]
ephemerian has quit [Quit: Leaving.]
SteveBenner9 has quit [Quit: Leaving]
ziikutv has quit [Client Quit]
jlebrech has quit [Quit: Konversation terminated!]
Monie has joined #ruby
tsykoduk is now known as zz_tsykoduk
zz_tsykoduk is now known as tsykoduk
mansi has quit [Ping timeout: 245 seconds]
nickysantoro has joined #ruby
catphish has quit [Quit: Leaving]
<nickysantoro> Hi, has anyone a recomendation for a lib that can extract text from an image? I have a bill as an image and want to extract some parts from it.
alyx_ has left #ruby [#ruby]
duggiefresh has quit [Remote host closed the connection]
Gonzih has joined #ruby
nonotion has joined #ruby
lethjakman has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
Gonzih has quit [Max SendQ exceeded]
pel_daniel has joined #ruby
konrads has quit [Quit: Leaving.]
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cpruitt has quit [Quit: cpruitt]
havenwood has quit [Remote host closed the connection]
Speed has joined #ruby
bean has joined #ruby
sguselnikov has joined #ruby
Bassam has quit [Ping timeout: 245 seconds]
bean has quit [Client Quit]
nonotion has quit [Remote host closed the connection]
io_syl has joined #ruby
kaspergrubbe has joined #ruby
heidi has joined #ruby
jlast has quit [Remote host closed the connection]
yacks has joined #ruby
hadees has joined #ruby
cpruitt has joined #ruby
duggiefresh has joined #ruby
camilasan has quit []
<nobitanobi> nickysantoro, opencv for ruby perhaps?
obs has quit [Quit: Saliendo]
godd2 has quit [Quit: Page closed]
kaspergrubbe has quit [Ping timeout: 246 seconds]
Mon_Ouie has joined #ruby
aspires has quit [Quit: Adios]
nickysantoro has quit [Ping timeout: 250 seconds]
El_Dood has quit []
dhruvasagar has joined #ruby
whunt has joined #ruby
bean has joined #ruby
hiall has quit [Quit: hiall]
Czupa has quit [Quit: Wychodzi]
troessner has quit [Quit: Leaving]
j-allen has quit [Quit: j-allen]
Czupa has joined #ruby
stetho has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
machi has quit [Remote host closed the connection]
asteros has joined #ruby
aspires has joined #ruby
Guest98464 has quit [Ping timeout: 264 seconds]
Spami has joined #ruby
mikesplain1 has joined #ruby
Liquid-- has joined #ruby
andikr has quit [Remote host closed the connection]
sergicles has joined #ruby
Czupa has quit [Client Quit]
Czupa has joined #ruby
jgrevich has joined #ruby
mojjojo has quit [Quit: mojjojo]
terrellt has quit [Ping timeout: 264 seconds]
heidi has quit [Quit: Leaving.]
kirun has joined #ruby
jgrevich has quit [Changing host]
jgrevich has joined #ruby
Czupa has quit [Client Quit]
Czupa has joined #ruby
mikesplain has quit [Ping timeout: 272 seconds]
aspires has left #ruby [#ruby]
momomomomo has quit [Quit: momomomomo]
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ccolorado> I am confused on why the last call to match doesn't print anything http://pastebin.com/HGrHyU6U
taion809 is now known as zz_taion809
momomomomo has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
mklappst_ has quit [Remote host closed the connection]
momomomomo has quit [Client Quit]
<ccolorado> also why 'string'.match(..)[i] works but 'string'.match(..).each is an error
rdark has quit [Quit: leaving]
maletor has joined #ruby
spike|spiegel has quit [Quit: WeeChat 0.4.2]
dhruvasa1ar has joined #ruby
havenwood has joined #ruby
DrShoggoth has joined #ruby
xk_id has quit [Quit:
saarinen has joined #ruby
aspires_ has joined #ruby
mojjojo has joined #ruby
saarinen has quit [Client Quit]
saarinen has joined #ruby
waflessnet has quit [Read error: Connection reset by peer]
orionstein has quit [Quit: ZNC - http://znc.in]
dhruvasagar has quit [Ping timeout: 272 seconds]
Czupa has quit [Remote host closed the connection]
nomenkun has quit [Quit: Leaving...]
kaspergrubbe has joined #ruby
iliketurtles has joined #ruby
Underbyte has joined #ruby
_bart has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
brtdv has joined #ruby
j-allen has joined #ruby
sepp2k has joined #ruby
orionstein_away has joined #ruby
orionstein_away is now known as orionstein
Gonzih has joined #ruby
aspires_ has quit []
aspires has joined #ruby
jhamon has joined #ruby
hogeo has joined #ruby
Advocation has joined #ruby
ringaroses has joined #ruby
arefaslani has joined #ruby
tylersmith has joined #ruby
aspires has quit [Client Quit]
Advocation has quit [Client Quit]
aspires has joined #ruby
mojjojo has quit [Quit: mojjojo]
zeade has joined #ruby
m8 has joined #ruby
<arefaslani> I want to build a dns client in ruby. how can i convert a domain name like "mydomain.com" to its hex value, "08 6D 79 64 6F 6D 61 69 6E 03 63 6F 6D 00"?
timonv has quit [Remote host closed the connection]
cburyta has joined #ruby
mojjojo has joined #ruby
magoo has joined #ruby
mlpinit has quit [Remote host closed the connection]
evenix_ is now known as evenix
zastern has joined #ruby
<zastern> Is there a way in Ruby to refer to a file in the same directory as my .rb file I'm executing, as opposed to my current working directory.
<zastern> E.g. I have foo.rb and config.yml
jlast has joined #ruby
<zastern> no matter what my cwd is when I try to run foo.rb via full path, i'd like it to check the same folder it's in for it's config file
spike|spiegel has joined #ruby
gyre007 has quit [Remote host closed the connection]
hogeo has quit [Ping timeout: 264 seconds]
gyre007 has joined #ruby
TheMoonMaster has joined #ruby
aryaching has quit []
heidi has joined #ruby
Eiam has joined #ruby
mlpinit has joined #ruby
khushildep has quit [Quit: getting the flock() outta here]
thesheff17 has quit [Ping timeout: 264 seconds]
Gonzih has quit [Quit: IRC is just multiplayer vim.]
Gonzih has joined #ruby
cburyta has quit [Ping timeout: 240 seconds]
jmeeuwen has quit [Ping timeout: 245 seconds]
s2013 has quit [Ping timeout: 272 seconds]
apeiros has joined #ruby
Gonzih has quit [Client Quit]
_bart has quit []
newUser1234 has quit [Quit: Leaving...]
aryaching has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
sguselnikov has quit [Quit: Computer has gone to sleep.]
<ccolorado> zastern: what you want to be able to use a file using its relative path, but without having to hardcode the fullpath ?
i_s has joined #ruby
gstamp has joined #ruby
sandeepk_ has quit [Quit: Linkinus - http://linkinus.com]
gyre007 has quit [Ping timeout: 272 seconds]
lethjakman has quit [Quit: WeeChat 0.4.0]
lmadrigal has joined #ruby
mikesplain1 has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
Ivo has joined #ruby
jlast has quit [Ping timeout: 272 seconds]
drumusician has quit [Ping timeout: 245 seconds]
phansch has joined #ruby
vlad_starkov has joined #ruby
brtdv has quit []
darkc0met has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
lukec has quit [Quit: lukec]
vlad_starkov has joined #ruby
machi has joined #ruby
vlad_sta_ has joined #ruby
zipper has joined #ruby
kiwi_49688 has joined #ruby
<kiwi_49688> hi
<kiwi_49688> anyone here to answer a question about Ruby?
<nobitanobi> kiwi_49688, I see 866 people!
<nobitanobi> :P
<nobitanobi> shoot your question
<kiwi_49688> @nobitanobi, actually I don't have a question, I'm just testing out a node-based open source IRC client....I wouldn't go near Ruby with a 10 foot pole
jmeeuwen has joined #ruby
shaunbaker has quit [Remote host closed the connection]
iamjarvo has joined #ruby
<kiwi_49688> so I thought I'd troll the Ruby forums a bit
<Morrolan> Splendid. Can that client issue a '/part'?
RichardBaker has quit [Quit: RichardBaker]
shaunbaker has joined #ruby
<Morrolan> Forums? These are not the forums you are looking for. In fact, these aren't even forums. :o
<kiwi_49688> @morroian, not sure what a '/part' is? can you explain a tiny bit?
Tarential has quit [Excess Flood]
vlad_starkov has quit [Ping timeout: 245 seconds]
<Morrolan> A command to leave a channel.
machi has quit [Remote host closed the connection]
machi has joined #ruby
Tarential has joined #ruby
moneydouble has quit [Ping timeout: 246 seconds]
<kiwi_49688> @morroian, I know these aren't 'forums' I misspoke
musl_ has quit [Quit: WeeChat 0.4.1]
sguselnikov has joined #ruby
<kiwi_49688> I'll test the '/part' is, unless that was a joke by you intended to get me to leave the channel
sguselnikov has quit [Client Quit]
moneydouble has joined #ruby
<Morrolan> Not at all. I'm wondering whether that client supports it.
<Morrolan> Though it would be an odd client if it didn't, I guess.
musl has joined #ruby
<kiwi_49688> @morrian I'll check
<kiwi_49688> '/part'
<Morrolan> Seems it doesn't. :/
<kiwi_49688> @morrian my guess is not
<Morrolan> I'd ditch that client for a proper one.
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kricir has joined #ruby
<Morrolan> (Just... don't ask which one, that's a question of religion.)
jerius has quit [Quit: Computer has gone to sleep.]
coderhs has quit [Ping timeout: 245 seconds]
<deepy> Hi, I'm using the recaptcha gem and sometimes my first request shows a Cancelled Pending noscript? request to the API before the challenge, at these times the captcha does not show up. Has anyone else experienced this?
<kiwi_49688> @morrian let me ask a question now that I'm here...does a client provide better security, compared to going to the website in the browser
<deepy> I'm using SSL too
<evenix> I'm looking for a documentation / open source or public algorithm on how to build an exchange platform
<evenix> for stocks or currencies.
<waxjar> kiwi_49688: a desktop client has less attack surface
ExCa|iBuR has joined #ruby
dnyy has joined #ruby
<kiwi_49688> @waxjar 'less attack surface' is a good thing, I assume, what types of attacks would it protect me from, which others not?
digital-ghost has joined #ruby
shaunbaker has quit [Ping timeout: 246 seconds]
<kiwi_49688> @morroian I'm really only using this client to learn how to use nodejs and backbone
harrymoreno has quit [Ping timeout: 245 seconds]
johnnyfuchs has quit [Quit: Leaving.]
<Morrolan> And why are you in #ruby, again?
ckinni has joined #ruby
<kiwi_49688> @morroian no idea, it was the first channel that came to mind
<Morrolan> Ah.
einarj has joined #ruby
<nobitanobi> kiwi_49688, I love you man
<nobitanobi> I admire you for coming here and entertain us for free
<nobitanobi> :)
d45h has joined #ruby
<kiwi_49688> @nobitanobi are you Matz?
<nobitanobi> can you throw bananas too?
capicue has joined #ruby
<Morrolan> One question, though. Somehow KiwiIRC doesn't look like a NodeJS client.
<Morrolan> Seems to be mostly Javascript.
<apeiros> /cs op #ruby
RichardBaker has joined #ruby
<nobitanobi> lol
<apeiros> blargh, where did that space come from?
* Morrolan grins
<Morrolan> That soon?
tharindu has quit [Quit: Leaving...]
<apeiros> I wasn't reading before
DoNcK has quit [Quit: Leaving.]
<Morrolan> No, I actually meant 'soon'. :)
RichardBaker has quit [Client Quit]
sayan has quit [Ping timeout: 245 seconds]
<Morrolan> Given that you weren't highlighted, I was surprised that you've already noticed it.
<apeiros> same answer :)
mikesplain1 has joined #ruby
<apeiros> I read quite often in here. highlighted or not.
reset has joined #ruby
kiwi_49688 has quit [Read error: Connection reset by peer]
<apeiros> does the system actually tell you that you're muted? o0
RichardBaker has joined #ruby
javos has quit [Quit: Leaving...]
arietis has joined #ruby
heftig has quit [Ping timeout: 245 seconds]
einarj has quit [Ping timeout: 246 seconds]
<Morrolan> It doesn't seem to.
<apeiros> how did you try?
<apeiros> opened a channel and muted yourself? :D
<Morrolan> Yep.
<apeiros> hm, maybe channel owner can't be muted
lukec has joined #ruby
nanoyak has joined #ruby
<Morrolan> Oh, I joined the channel using this KiwiIRC thing.
<Morrolan> (And muted via my desktop client)
harrymoreno has joined #ruby
<Morrolan> Because IIRC +o and +v override +q.
<apeiros> I'd expect that
devdazed has quit [Quit: Bye]
brunoro has joined #ruby
<elux> does anyone here use rbenv and know how to insteall a -head version of a ruby vm? ie. rubinius
devdazed has joined #ruby
d45h has quit []
nwertman has quit [Ping timeout: 248 seconds]
<Eiam> you should get a message from the server that the channel is muted when you try to speak
mikesplain1 has quit [Ping timeout: 272 seconds]
<Eiam> (if you yourself cannot speak)
F1skr has joined #ruby
jlast has joined #ruby
kiwi_4977 has joined #ruby
coderhs has joined #ruby
dzhulk has joined #ruby
kiwi_4977 has quit [Read error: Connection reset by peer]
krz has joined #ruby
sepp2k has quit [Ping timeout: 246 seconds]
brunoro has quit [Ping timeout: 245 seconds]
mlpinit has quit [Read error: Connection reset by peer]
codeFiend has joined #ruby
mlpinit_ has joined #ruby
benlieb has joined #ruby
jmeeuwen_ has joined #ruby
harrymoreno has left #ruby [#ruby]
RealMarc has joined #ruby
<arefaslani> How can I send a raw DNS question to my DNS server in Ruby?
jamblack has quit [Quit: jamblack]
mikesplain1 has joined #ruby
jmeeuwen has quit [Ping timeout: 246 seconds]
mlpinit_ has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
jmeeuwen_ is now known as jmeeuwen
zipper has quit [Ping timeout: 246 seconds]
<apeiros> arefaslani: https://www.ruby-toolbox.com/search?utf8=✓&q=dns - pick one
magoo has quit [Quit: WeeChat 0.4.2]
magoo has joined #ruby
<RubyPanther> Eiam: "Alternatively to the install command, you can download and compile Ruby manually as a subdirectory of ~/.rbenv/versions/. An entry in that directory can also be a symlink to a Ruby version installed elsewhere on the filesystem."
zipper has joined #ruby
aspires has quit []
machi has quit [Remote host closed the connection]
nwertman has joined #ruby
benzrf has joined #ruby
<benzrf> >> print "not nil"
<eval-in> benzrf => not nilnil (https://eval.in/70793)
<Eiam> RubyPanther: wrong bro, bro!
<benzrf> pfft
benzrf has left #ruby [#ruby]
momomomomo has joined #ruby
<CalimeroTeknik> I'm having issues with chomp not working on an unicode string, here's the ultra simple code to reproduce: http://sprunge.us/LedA
<RubyPanther> Eiam: oopd, sorry
xcess_denied has quit [Read error: Connection reset by peer]
gstamp has quit [Ping timeout: 256 seconds]
<CalimeroTeknik> >>puts ' foo'.chomp.chomp
<eval-in> CalimeroTeknik =>  foo ... (https://eval.in/70794)
<Eiam> RubyPanther: we still cool
<Eiam> =)
<RubyPanther> elux: "Alternatively to the install command, you can download and compile Ruby manually as a subdirectory of ~/.rbenv/versions/. An entry in that directory can also be a symlink to a Ruby version installed elsewhere on the filesystem."
<CalimeroTeknik> cool, works in the evalbot.
mansi has joined #ruby
<elux> thx
btanaka has joined #ruby
jlast has joined #ruby
<CalimeroTeknik> >>puts ' foo'.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp.chomp
<eval-in> CalimeroTeknik =>  foo ... (https://eval.in/70795)
<CalimeroTeknik> see the issue? ^^
mlpinit has joined #ruby
jkhwan has quit [Remote host closed the connection]
johnnyfuchs has joined #ruby
jkhwan has joined #ruby
ccolorado has left #ruby [#ruby]
aspires has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
<CalimeroTeknik> how do I reliably drop the (two last) characters of a string?
zipper has quit [Ping timeout: 245 seconds]
gyre007 has joined #ruby
<Morrolan> "foobar"[0..-3] is worth a shot.
mikesplain1 has quit [Quit: WeeChat 0.4.2]
mikesplain has joined #ruby
Mars` has joined #ruby
<Hanmac> CalimeroTeknik: chomp only removes seperator like \n or \r ...
<Hanmac> >> ' foo'.chomp('foo')
<eval-in> Hanmac => " " (https://eval.in/70797)
jalcine has quit [Excess Flood]
jkhwan_ has joined #ruby
gstamp has joined #ruby
TryX has joined #ruby
smathieu_ has joined #ruby
sepp2k has joined #ruby
<CalimeroTeknik> oh! I see, thank you!
psyl0n has joined #ruby
jkhwan has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Remote host closed the connection]
j-allen has quit [Quit: j-allen]
smathieu has quit [Ping timeout: 246 seconds]
dukedave has quit [Ping timeout: 248 seconds]
gyre007 has quit [Ping timeout: 252 seconds]
jrhe has quit [Read error: Connection reset by peer]
jrhe has joined #ruby
zipper has joined #ruby
hogeo has joined #ruby
j-allen has joined #ruby
zipper has quit [Client Quit]
hersha has joined #ruby
psyl0n has quit [Ping timeout: 246 seconds]
bean has joined #ruby
timonv has joined #ruby
akonny has joined #ruby
sailias has quit [Ping timeout: 252 seconds]
terrellt has joined #ruby
zigomir has joined #ruby
postmodern has joined #ruby
Mars` has quit [Remote host closed the connection]
cburyta has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
hogeo has quit [Ping timeout: 245 seconds]
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Astralum has joined #ruby
jbpros has joined #ruby
sailias has joined #ruby
allanm_ is now known as allanm[away]
PragCypher has joined #ruby
PragmaticCypher has joined #ruby
PragCypher has quit [Read error: Connection reset by peer]
jtperreault has quit [Quit: WeeChat 0.3.7]
codeFiend has quit [Quit: codeFiend]
Macaveli has joined #ruby
jprovazn has quit [Quit: Odcházím]
<havenwood> CalimeroTeknik: I kinda like your cookie monster style though.
<CalimeroTeknik> ^^ I thought chomp was a nicely named function too!
<havenwood> CalimeroTeknik: You could implement your own nom.nom.nom
<CalimeroTeknik> like "eat one character at the end of the string"
ericx2x has joined #ruby
<CalimeroTeknik> turns out it's not exactly that.
<havenwood> >> class String; def nom; self[0..-2] end end; 'cookie'.nom.nom.nom
<eval-in> havenwood => "coo" (https://eval.in/70820)
ExCa|iBuR has quit [Quit: I was using serenepIRCh http://www.serenity-irc.net/ :-]
TryX has quit [Remote host closed the connection]
<havenwood> CalimeroTeknik: There ^, you can nom nom now. :P
<havenwood> CalimeroTeknik: Yeah, chomp is finicky with what it eats. :P
Es0teric has joined #ruby
<havenwood> Just like cookies, monkey patching is a sometimes food. Nom nom nom nom!!
s2013 has joined #ruby
<CalimeroTeknik> awesome!
Es0teric has quit [Max SendQ exceeded]
pothibo has joined #ruby
snath has joined #ruby
<CalimeroTeknik> oh, can it affect the result as well, havenwood?
<pothibo> Is there a native OS X way to make sure that when typing {} I don't insert non-ascii character? I keep getting this error and I remap4macbook is a pain in the ass
mikepack has quit [Remote host closed the connection]
<havenwood> CalimeroTeknik: ahh, modify the receiver you mean?
<havenwood> CalimeroTeknik: you'de want to implement #nom! as well as #nom :P
<havenwood> hehe
<CalimeroTeknik> yes, probably ("receiver"?)
<havenwood> CalimeroTeknik: yeah, that is what we call it (like the variable that the thing is)
<CalimeroTeknik> .chomp does that, it modifies the class it's called on
<CalimeroTeknik> well uh, instance, sorry
<havenwood> :)
noop has joined #ruby
jrhe has quit [Quit: jrhe]
<havenwood> >> class String; def nom; replace self[0..-2] end end; cookie = 'yummy'; cookie.nom.nom; cookie
<eval-in> havenwood => "yum" (https://eval.in/70842)
<havenwood> CalimeroTeknik: ^
<CalimeroTeknik> purrfect, thanks!
jbpros has quit [Quit: jbpros]
<havenwood> CalimeroTeknik: Or if you want the bang (!) and not bang version (one to modify the receiver and the other not):
<havenwood> >> class String; def nom; self[0..-2] end; def nom!; replace self.nom end end; cookie = 'cookie'; cookie.nom.nom; cookie.nom!; cookie
<eval-in> havenwood => "cooki" (https://eval.in/70853)
brunoro has joined #ruby
<havenwood> CalimeroTeknik: (You only do a bang by convention if a not-modifying-receiver version already exists.)
<havenwood> version of that method*
<CalimeroTeknik> I see
jrhe has joined #ruby
JuanMiguel has joined #ruby
* CalimeroTeknik dutifully takes notes for widespread further use
<CalimeroTeknik> already in use in my IRC bot
<CalimeroTeknik> if something, ruby makes object-oriented fun again
ericx2x has quit [Quit: Page closed]
<havenwood> CalimeroTeknik: On Ruby 2.1 you could go a bit further and instead of monkey patching String, you could refine it: http://www.ruby-doc.org/core-2.1.0/doc/syntax/refinements_rdoc.html
<arefaslani> How to create a DNS question with hex values in ruby?
<havenwood> arefaslani: What is a DNS question?
<arefaslani> havenwood : DNS query
R33C3 has joined #ruby
jhaals has joined #ruby
<havenwood> oh, right
<CalimeroTeknik> I've never tried to code serious stuff in ruby though, I've been using a subset of C++ for that
lkba has quit [Ping timeout: 248 seconds]
<havenwood> CalimeroTeknik: Ruby is lovely to do real work in.
<arefaslani> havenwood: It is my DNS query for www.google.com --> 155035669421931896687023882240377777706676f6f676c6503636f6d0011
simoz has joined #ruby
tharindu has joined #ruby
cburyta has quit [Ping timeout: 245 seconds]
<arefaslani> this is my ruby code: https://gist.github.com/arefaslani/7569700
<arefaslani> I call it like this: ./program 127.0.0.1 53 155035669421931896687023882240377777706676f6f676c6503636f6d0011
<arefaslani> the response is: "15\xB1\x11\x00\x00\x00\x00\x00\x00\x00\x00"
<CalimeroTeknik> havenwood, ruby is, I think more importantly, awesome to come up with working stuff fast, and the syntax helps making it less of a headache (something unless condition)
<CalimeroTeknik> so I can spend my brain cells on optimizing low-level algos that need it
kaspergrubbe has quit [Remote host closed the connection]
<havenwood> CalimeroTeknik: Yeah, speed of implementation pays off for hard stuff as well. If you can implement a more efficient but complex system in less time it becomes an option.
<havenwood> CalimeroTeknik: Indeed, exactly!
kaspergrubbe has joined #ruby
apeiros has quit [Remote host closed the connection]
nucatus has joined #ruby
apeiros has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
s2013_ has joined #ruby
tharindu has quit [Ping timeout: 272 seconds]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
moneydouble has quit [Quit: Leaving.]
foEs has joined #ruby
moneydouble has joined #ruby
Macaveli has quit [Remote host closed the connection]
aspires has quit []
aryaching has quit [Ping timeout: 246 seconds]
s2013 has quit [Ping timeout: 265 seconds]
Czupa has joined #ruby
mfmfmfmfmfmf has joined #ruby
axl_ has quit [Quit: axl_]
R33C3 has quit [Remote host closed the connection]
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
krz has quit [Quit: krz]
s2013_ is now known as s2013
rezzack has joined #ruby
rezzack has quit [Changing host]
rezzack has joined #ruby
decoponio has quit [Quit: Leaving...]
jonathanwallace has quit [Ping timeout: 272 seconds]
b3pO has joined #ruby
b3pO has left #ruby [#ruby]
b3pO has joined #ruby
b3pO has left #ruby [#ruby]
sailias has quit [Ping timeout: 248 seconds]
rezzack has quit [Client Quit]
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rezzack has joined #ruby
axl_ has joined #ruby
dnyy has quit [Remote host closed the connection]
arefaslani has quit [Remote host closed the connection]
foEs has left #ruby [#ruby]
foEs has joined #ruby
dnyy has joined #ruby
RichardBaker has joined #ruby
bahar has quit [Changing host]
bahar has joined #ruby
aspires has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
kevinfagan has quit [Max SendQ exceeded]
Underbyte has quit [Ping timeout: 272 seconds]
BizarreCake has quit [Ping timeout: 246 seconds]
paul_k has joined #ruby
machi has joined #ruby
Tearan has joined #ruby
kevinfagan has joined #ruby
mikepack has joined #ruby
jbpros has joined #ruby
mikepack has quit [Remote host closed the connection]
jhamon has quit [Quit: jhamon]
mikepack has joined #ruby
foEs has quit [Quit: bye]
zeropx has joined #ruby
jbpros has quit [Client Quit]
hololeap has quit [Remote host closed the connection]
cburyta has joined #ruby
TomRone has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
aa47f8 has left #ruby [#ruby]
mikepack has joined #ruby
lmadrigal has quit [Quit: Computer has gone to sleep.]
machi has quit [Ping timeout: 240 seconds]
tvw has quit [Ping timeout: 246 seconds]
DanBoy has quit [Ping timeout: 240 seconds]
mansi has quit [Remote host closed the connection]
lmadrigal has joined #ruby
colonolGron has quit [Quit: Lost terminal]
jtperreault has joined #ruby
brahman_work has quit [Read error: Connection reset by peer]
brahman_work has joined #ruby
jtperreault has left #ruby [#ruby]
hololeap has joined #ruby
newUser1234 has joined #ruby
moneydouble has quit [Quit: Leaving.]
pel_daniel has quit [Ping timeout: 265 seconds]
sailias has joined #ruby
iajrz has joined #ruby
jonathanwallace has joined #ruby
TomRone has quit [Ping timeout: 252 seconds]
dnyy has quit []
DanBoy has joined #ruby
randomnick_ has joined #ruby
mando_ has joined #ruby
mansi has joined #ruby
maletor has joined #ruby
Soda has quit [Read error: Connection reset by peer]
dukedave has joined #ruby
hogeo has joined #ruby
jhaals has joined #ruby
mando has quit [Ping timeout: 248 seconds]
Gonzih has joined #ruby
mando_ has quit [Ping timeout: 252 seconds]
Tearan has quit [Ping timeout: 245 seconds]
mfmfmfmfmfmf has quit [Remote host closed the connection]
vlad_sta_ has quit [Remote host closed the connection]
hogeo has quit [Ping timeout: 245 seconds]
iceden has quit [Remote host closed the connection]
Xeago has joined #ruby
gstamp has quit [Ping timeout: 256 seconds]
gstamp has joined #ruby
sailias has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
ldnunes has quit [Quit: Leaving]
wesside has quit [Ping timeout: 246 seconds]
greggawatt has joined #ruby
Mars` has joined #ruby
<greggawatt> i'm having an issue using .split
kristofers has joined #ruby
<greggawatt> i have a function that can take either "hello" or "hello world"
Mars` has quit [Read error: Connection reset by peer]
mercwithamouth has quit [Ping timeout: 248 seconds]
bradhe has quit [Remote host closed the connection]
Mars` has joined #ruby
<greggawatt> i want to always have the string go into an array, and if its one word it would be an array of value one
<greggawatt> but using.split doesn't seem to do that
jonno11 has joined #ruby
bradhe has joined #ruby
<apeiros> >> "hello".split
<eval-in> apeiros => ["hello"] (https://eval.in/70912)
<apeiros> seems to do that just fine
<jonno11> Hello! Anyone have any experience triggering ffmpeg from ruby asynchronously?
<jonno11> looking for some advice on how to do it
<greggawatt> yes but then when i try to do a .each on it to go through each array element it says undefined method each for string
<apeiros> greggawatt: then you do something else wrong.
<nobitanobi> greggawatt, you are doing it wrong
<MrZYX> greggawatt: you need to show code
quizme has joined #ruby
<apeiros> greggawatt: and I'm sorry, but I can't read your mind.
<apeiros> greggawatt: so you'll have to be a *little* more forthcoming.
<nobitanobi> >> "hello".split.each { |el| puts el}
<eval-in> nobitanobi => hello ... (https://eval.in/70915)
Kricir has quit [Remote host closed the connection]
moneydouble has joined #ruby
mengu has joined #ruby
sergicles has quit [Quit: sergicles]
<greggawatt> using string.split.each seems to work
<greggawatt> i was doing them on separate lines
jlast has quit [Remote host closed the connection]
<apeiros> greggawatt: yeah, split *returns* an array
<greggawatt> ah
Underbyte has joined #ruby
Underbyte has joined #ruby
Underbyte has quit [Changing host]
<apeiros> since an object can't become an object of a different class, it's *impossible* to be done in-place.
benlieb has quit [Quit: benlieb]
<apeiros> x = "somestring"; x.magic; x.class == Array <-- impossibru
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mojjojo has quit [Quit: mojjojo]
bradhe has quit [Ping timeout: 264 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<waxjar> def x.class; Array; end :D
<greggawatt> :p
dnyy has joined #ruby
paul_k has quit [Remote host closed the connection]
platzhirsch has joined #ruby
<apeiros>
lkba has joined #ruby
<platzhirsch> I really hate to write web scraper scripts for one-purpose. Doesn't even make much sense to archive them and if I wouldn't know how... very-long-specific-folder-name-for-this-nonsense
jlast has joined #ruby
lmao has joined #ruby
jlast has quit [Remote host closed the connection]
lmao has left #ruby [#ruby]
jlast has joined #ruby
pushpak has joined #ruby
Kricir has joined #ruby
sailias has joined #ruby
<platzhirsch> maybe I just gist it
mando has joined #ruby
jlast has quit [Remote host closed the connection]
Gonzih has quit [Ping timeout: 246 seconds]
bean has joined #ruby
tsykoduk is now known as zz_tsykoduk
darkskiez has quit [Ping timeout: 245 seconds]
sailias1 has joined #ruby
Kricir has quit [Ping timeout: 240 seconds]
prahal has joined #ruby
sailias has quit [Ping timeout: 272 seconds]
<prahal> hi I have a conflit between two array content hash with builtin method
nowthatsamatt has quit [Quit: nowthatsamatt]
tharindu has joined #ruby
nanoyak has joined #ruby
<havenwood> prahal: Gist some code?
JuanMiguel has quit [Quit: Saliendo]
<s2013> >> "a".include?("a" || "b")
<eval-in> s2013 => true (https://eval.in/70936)
<s2013> >> "b".include?("a" || "b")
<eval-in> s2013 => false (https://eval.in/70937)
<prahal> this bother me as it breaks bundler (the two arrays are ["discoverer"] and ["sub-setter"] , as both have currently the same version and platform
<s2013> why is that?
<s2013> isnt F or T same as T or F
carraroj has quit [Quit: Konversation terminated!]
<prahal> ie here ["discoverer"].hash and ["sub-setter"].hash are the same
<s2013> havenwood, any clue?
Mars` has quit [Remote host closed the connection]
<havenwood> s2013: ('a' || 'b') is always "a", never ever "b"
mojjojo has joined #ruby
<Morrolan> s2013: `"a" || "b"` evaluates to... yea.
<havenwood> s2013: 'a' is truthy
<s2013> so how would i check?
<s2013> if the string contains either a or b
<Morrolan> "a".include?("a") || a.include?("b")
Mars` has joined #ruby
<s2013> oh
<MrZYX> ["a", "b"].include?("a")
<prahal> havenwood: should I paste to gist too ?
<havenwood> prahal: yeah, prolly a Gist would be good - of what you're running and the resultant errors, because i'm a bit lost so far
<s2013> hmm
<bricker> s2013: str =~ /[a|b]/
tharindu has quit [Ping timeout: 264 seconds]
<s2013> i have an array with the list of strings that i need to check against
<apeiros> bricker: [a|b] is "a or b or |"
<s2013> i was thinking of doing *strings but i dont know if that will work
<apeiros> bricker: either /[ab]/ or /a|b/, but not /[a|b]/
<havenwood> s2013: Do you want to find the matches, or just know if any or all match?
<s2013> just know if any will match
i_s has quit [Remote host closed the connection]
<bricker> apeiros: oops :)
<prahal> ok, also I tested on amd64 and the issue does not happens there
<prahal> ie the issue is that both hash collide
<prahal> at least on arm a9 (32 bits)
Hanmac1 has joined #ruby
momomomomo has quit [Quit: momomomomo]
<apeiros> prahal: eh? yes, hash values collide. that's why you have #eql? too.
<s2013> this is what i have now
<s2013> it works but i wonder if i can refactor it
<havenwood> prahal: ['bark', 'moss'].any? { |word| 'the tree is mossy'.include? word } #=> true
Mars` has quit [Ping timeout: 272 seconds]
Hanmac has quit [Ping timeout: 246 seconds]
<prahal> bundler uses those hash results as keys for its gem @specs hash :/ if they collide , one is discarded
F1skr has quit [Quit: WeeChat 0.4.2]
<apeiros> o0
<apeiros> if bundler uses the hash value unchecked, then it's retarded
<apeiros> hash values are *bound* to collide.
asteros has quit [Ping timeout: 240 seconds]
<havenwood> prahal: Maybe gist the code surrounding your use case and resultant error or result.
mando has quit [Remote host closed the connection]
drumusician has joined #ruby
jhamon has joined #ruby
<prahal> sure doing, the worst is the error is not verbose (only bundler open or viz anything but a full update discard the "sub-setter" from the Gemfile)
pr0ggie has quit [Read error: Connection reset by peer]
jhamon has quit [Client Quit]
moneydouble has quit [Quit: Leaving.]
jamblack has joined #ruby
funburn has joined #ruby
Kricir has joined #ruby
zipper has joined #ruby
zastern_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
phinfonet has joined #ruby
psyl0n has joined #ruby
geekbri has quit []
<prahal> sorry takes more time than it should .. though I will test a bit more because the issue seems more serious ... I just find that the hash is the same if the number of character in the string are the same on this arm
Kricir_ has joined #ruby
Kricir has quit [Read error: Connection reset by peer]
jamblack has quit [Read error: Connection reset by peer]
Es0teric has joined #ruby
matti has quit [Ping timeout: 245 seconds]
Kricir_ has quit [Read error: Connection reset by peer]
machi has joined #ruby
Es0teric has quit [Max SendQ exceeded]
Kricir has joined #ruby
simoz2 has joined #ruby
zastern has quit [Ping timeout: 272 seconds]
weszlem has joined #ruby
Es0teric has joined #ruby
soba has joined #ruby
ehc has quit [Quit: ehc]
ehc has joined #ruby
brtdv has joined #ruby
psyl0n has quit [Ping timeout: 245 seconds]
soba_ has joined #ruby
ehaliewicz has joined #ruby
<Morrolan> That'd be an interesting hash function. ;D
simoz has quit [Ping timeout: 248 seconds]
<Morrolan> Or, well, implementation thereof.
iamjarvo has quit [Remote host closed the connection]
<apeiros> def hash; bytesize; end
bluOxigen has quit [Ping timeout: 245 seconds]
nateberkopec has joined #ruby
iamjarvo has joined #ruby
Kricir has quit [Ping timeout: 246 seconds]
<Morrolan> Now we just need some corporation to use this for their password hashing.
machi has quit [Ping timeout: 264 seconds]
adambeynon has joined #ruby
<Morrolan> Then the system's encoding changes. Suddendly passwords stop working.
El_Dood has joined #ruby
i_s has joined #ruby
<apeiros> rehash
nobitanobi has quit [Read error: Connection reset by peer]
soba has quit [Ping timeout: 272 seconds]
pothibo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
phansch has quit [Remote host closed the connection]
<havenwood> s2013: a few modifications to your code, just stuff to consider: https://gist.github.com/havenwood/0b03ef8acddd4217c043
nowthatsamatt has joined #ruby
smathieu_ has quit [Remote host closed the connection]
<s2013> thanks
smathieu has joined #ruby
<s2013> damn havenwood that looks like a super pro ruby code
iamjarvo has quit [Ping timeout: 246 seconds]
<apeiros> havenwood: unshift.join?
thelorax123 has quit [Remote host closed the connection]
<havenwood> >.>
<s2013> yeah i got what he meant tho
<apeiros> ary.unshift() will not change ary
<havenwood> i did it quick and didn't test anything >.>
<s2013> its fine. i appreciate it.
zigomir has quit [Ping timeout: 272 seconds]
jbpros has joined #ruby
<apeiros> it's easier to criticize code than to write it ;-)
bradhe has joined #ruby
<prahal> well not as easy to reproduce , tested on i386 and amd64 all is fine .
dhruvasa1ar has quit [Ping timeout: 264 seconds]
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thelorax123 has joined #ruby
mansi has quit [Read error: Connection reset by peer]
<s2013> i didnt know you could do readlines without doing open first. good to know
mansi has joined #ruby
hogeo has joined #ruby
<scarfacedeb> I'm trying to find associated records by id and I noticed a very strange thing
smathieu has quit [Ping timeout: 272 seconds]
<scarfacedeb> if I call it this way: @city.services.find(1)
<havenwood> s2013: and the double loop doesn't make sense per-se, just trying to show some options
<havenwood> :)
<scarfacedeb> it actually executes SELECT "services".* FROM "services" WHERE "services"."city_id" = $1 [["city_id", 1]]
<havenwood> s2013: yeah, File.readlines and File.read are nice sometimes
hogeo has quit [Read error: Connection reset by peer]
mary5030 has quit [Ping timeout: 248 seconds]
<havenwood> s2013: If you use File.open, you usually want to do it in block form, so it self-closes etc.
<s2013> thanks dude. you are the man
hogeo has joined #ruby
<scarfacedeb> but if I use find_by method: @city.services.find_by(id: 4)
saltnvinegar has joined #ruby
pr0ggie has joined #ruby
saltnvinegar has quit [Client Quit]
<scarfacedeb> it adds the ID condition into the query: SELECT "services".* FROM "services" WHERE "services"."city_id" = $1 AND "services"."id" = 4 LIMIT 1 [["city_id", 1]]
saltnvinegar has joined #ruby
iamjarvo has joined #ruby
zz_tsykoduk is now known as tsykoduk
danman has quit [Quit: danman]
nowthatsamatt has quit [Quit: nowthatsamatt]
mansi has quit [Read error: Connection reset by peer]
saltnvinegar has left #ruby [#ruby]
mansi has joined #ruby
saltnvinegar has joined #ruby
funburn has quit [Quit: funburn]
jonno11 has quit [Quit: Page closed]
skaflem has quit [Quit: Leaving]
hogeo has quit [Ping timeout: 265 seconds]
apeiros has quit [Remote host closed the connection]
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
simoz2 has quit [Quit: Nettalk6 - www.ntalk.de]
apeiros has joined #ruby
tharindu has joined #ruby
mando has joined #ruby
<xibalba> s2013, i believe she is the WOman
<scarfacedeb> if anybody is interested, it appears to be a bug in Rails 4.0.0
mjs2600 has quit [Ping timeout: 272 seconds]
matti has joined #ruby
matti has quit [Changing host]
matti has joined #ruby
<prahal> https://gist.github.com/prahal/7571353 <- sorry it took so long
Jetchisel has joined #ruby
brahman_work has quit [Quit: Leaving.]
turduks has joined #ruby
<s2013> oh oops didnt know. sorry dudette
colonolGron has joined #ruby
turduks has quit [Client Quit]
javos has joined #ruby
tharindu has quit [Ping timeout: 265 seconds]
eka has quit [Ping timeout: 246 seconds]
mjs2600 has joined #ruby
lmadrigal has quit [Quit: Computer has gone to sleep.]
kiba` has joined #ruby
<prahal> also the results always the same seems to depends about size of the content of the array
nowthatsamatt has joined #ruby
hiall has joined #ruby
lmadrigal has joined #ruby
paul_k has joined #ruby
zastern_ has quit [Remote host closed the connection]
kiba has quit [Ping timeout: 264 seconds]
mengu is now known as mengu_
eka has joined #ruby
zastern has joined #ruby
burlyscudd has quit [Ping timeout: 264 seconds]
mfmfmfmfmfmf has joined #ruby
smathieu has joined #ruby
Mars` has joined #ruby
jkline has joined #ruby
vlad_starkov has joined #ruby
timonv has quit [Remote host closed the connection]
kiba` is now known as kiba
evaryont has joined #ruby
Naoe-Kanno has joined #ruby
intuxicated has joined #ruby
cburyta has quit [Remote host closed the connection]
<havenwood> prahal: oh dear!!
SHyx0rmZ has quit [Ping timeout: 248 seconds]
cburyta has joined #ruby
mjs2600_ has joined #ruby
<havenwood> prahal: Mind re-pasting that gist in #bundler? Seems this needs addressing. :O
platzhirsch has quit [Read error: Connection reset by peer]
TomRone has joined #ruby
mjs2600 has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Ping timeout: 272 seconds]
<s2013> i have two files with strings on each line. and i want to find the common one between those 2.. i thought of putting all the contents of the file in an array and then finding the duplicate
<s2013> is there any other more elegant solution?
Kamuela has joined #ruby
axilla has joined #ruby
stringoO has joined #ruby
<bnagy> isn't that just set intersection?
platzhirsch has joined #ruby
ravster has left #ruby [#ruby]
<bnagy> >> [1,2,3] & [3,4,5]
<eval-in> bnagy => [3] (https://eval.in/71044)
mando has quit [Ping timeout: 246 seconds]
<Kamuela> alas, twas necessary to speak more ruby before i could talk to rails
<CalimeroTeknik> s2013, doesn't that sound like something the unix comm command does?
<CalimeroTeknik> just saying, if that's of any relevance
<s2013> i haveno idea
<CalimeroTeknik> well, if you just need that in some system script or whatever, comm is the way to go
<s2013> comparing isnt the issue
<CalimeroTeknik> comm does set operations.
<s2013> im not comparing to see if the files are exact or not. im comparing the duplicate lines in between the two
<CalimeroTeknik> yes. that's what comm does
<s2013> i was wondering if putting it in an array was the wise choice
graft has joined #ruby
<Kamuela> with a method that is called within a method, is the scope of that inner method with respect to variables treated as right within the class?
<s2013> hmm. let me readup on that
deception has quit [Quit: Goodbye]
amoli has joined #ruby
evenix has quit [Remote host closed the connection]
<CalimeroTeknik> man comm → see options -1, -2 and -3, pretty straightforward
<bnagy> you don't need to shell out, it's trivial
<CalimeroTeknik> oh, I meant if it was to "ruby out", better use shell commands *if in a shell*
mois3x_ has joined #ruby
Czupa has quit [Ping timeout: 246 seconds]
<havenwood> s2013: Ruby Set Class is nice: http://www.ruby-doc.org/stdlib-2.0.0/libdoc/set/rdoc/Set.html
<s2013> oh they have to be sorted
<bnagy> what does 'sorted' mean in this context?
<s2013> thats what the unix comm said. anyways hold on
j-allen has quit [Quit: j-allen]
mando has joined #ruby
<sweeper> s2013: diff?
<bnagy> srsly IO.readlines('file1') & IO.readlines('file2')
saltnvinegar_ has joined #ruby
einarj has joined #ruby
<s2013> anyways, i got what i needed. thanks.
kaspergrubbe has quit [Remote host closed the connection]
brtdv has quit []
SHyx0rmZ has joined #ruby
mois3x_ has quit [Client Quit]
kcombs has quit [Remote host closed the connection]
nobitanobi has joined #ruby
Naoe-Kanno has quit [Ping timeout: 246 seconds]
paul_k has quit [Remote host closed the connection]
saltnvinegar has quit [Ping timeout: 272 seconds]
saltnvinegar_ is now known as saltnvinegar
Tuxist has quit [Remote host closed the connection]
machi has joined #ruby
mikepack has quit [Ping timeout: 248 seconds]
jerius has joined #ruby
cburyta has quit [Remote host closed the connection]
parduse has quit []
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
blackmesa has quit [Ping timeout: 240 seconds]
dallasm_ has joined #ruby
cburyta has joined #ruby
MrThePlague has quit []
<zipper> Does ruby 2.0 not use require_relative?
<zipper> It doesn't seem to work at all
mando has quit [Ping timeout: 252 seconds]
terrellt has quit [Ping timeout: 264 seconds]
parduse has joined #ruby
zastern_ has joined #ruby
watermel0n has quit []
<havenwood> zipper: Doesn't work in a REPL, but works generally.
<graft> okay, so i have this bunch of stuff which is supposed to run on about 1M lines of text, and I would like to make it go faster (currently about 5 minutes) - any pointers? https://gist.github.com/anonymous/7571872
kaldrenon has quit [Remote host closed the connection]
<graft> hmm, actually 2.6M lines of text
petey has joined #ruby
kaldrenon has joined #ruby
cburyta has quit [Ping timeout: 248 seconds]
mjs2600 has joined #ruby
bradhe has quit [Remote host closed the connection]
nanoyak has quit [Ping timeout: 252 seconds]
saltnvinegar has quit [Quit: saltnvinegar]
Ivo has quit [Ping timeout: 245 seconds]
h0rrorvacui has joined #ruby
d2dchat has joined #ruby
zastern has quit [Ping timeout: 264 seconds]
ehc has quit [Ping timeout: 272 seconds]
<bnagy> you could reduce method calls and regex creation, merge soe of those regexes
mfmfmfmfmfmf has quit [Remote host closed the connection]
<bnagy> then start benchmarking I guess
Kricir has joined #ruby
bradhe has joined #ruby
iamjarvo has quit [Remote host closed the connection]
nanoyak has joined #ruby
<graft> is the method calls a big expense?
mjs2600_ has quit [Ping timeout: 272 seconds]
<bnagy> >nothing
saltnvinegar has joined #ruby
jkline has quit [Quit: jkline]
<bnagy> especially when creating two regex instances per call
kaldrenon has quit [Ping timeout: 245 seconds]
dayepa1 has quit [Quit: dayepa1]
<bnagy> regex in a tight-looping block get magically cached
<graft> hmm, i see
<bnagy> you can also profile it - strip it down to bare code then use one of the profilers
kaspergrubbe has joined #ruby
<graft> what's a good profiler?
<bnagy> fix your top two hotspots, assuming there are any that stick out
<bnagy> well I use jruby
iamjarvo has joined #ruby
<bnagy> which can use all the jvm profilers, which are amazing
<s2013> anyone knows some good ruby podcasts i can listen to ?
aley has joined #ruby
<graft> i'm on vanilla ruby
javos_ has joined #ruby
dayepa has joined #ruby
jonahR has quit [Quit: jonahR]
<bnagy> anyway, give it a try as a lazy each over the entire file
ehc has joined #ruby
paul_k has joined #ruby
Ivo has joined #ruby
<bnagy> also from your code it's unclear what you're actually building - like you're eaching over something that must have already been processed, there, not raw text
banister has joined #ruby
<prahal> will tell to bundler though I did not understood if the issue is of their use of hash of an array as key (bundler) or the array hash implementation (ruby):/ I was looking at ary.c of ruby to see if something obvious would catch my eye
gstamp has quit [Ping timeout: 256 seconds]
javos has quit [Ping timeout: 252 seconds]
<havenwood> prahal: ahh, good question if the issue is upstream - but i don't think so
<havenwood> prahal: seems unreasonable to rely on the hash without collision
sailias1 has quit [Ping timeout: 272 seconds]
<graft> bnagy: yeah, there is some pre-processing that i glossed over, it's just an array of hashes containing strings
gstamp has joined #ruby
sailias has joined #ruby
IceColdMax has joined #ruby
TheLastProject has joined #ruby
<bnagy> if you can't get it fast enough, it looks like it will parallelize fine
iamjarvo has quit [Ping timeout: 245 seconds]
ekarlso has quit [Ping timeout: 246 seconds]
hogeo has joined #ruby
tonni has quit [Read error: Connection reset by peer]
cescalante is now known as ce_afk
tonni has joined #ruby
<prahal> issue upstream (all I did was deciphering why this gem was discarded from the Gemfile and my programs was failing with loaderror from this discarded gem since I added sequel-fixture . (sequel-fixture depends in fast which itself deps on sub-setter
Hanmac has joined #ruby
ekarlso has joined #ruby
<speakingcode-wor> i want to write a little command-line tool in ruby. i know how to make it executable and put it in my path on my own machine, but i want to package it as a gem so that when someone installs the gem, the command is available to them... any examples or tutorials on how to do that?
<graft> bnagy: hmm, never thought about parallelizing it, good idea
allsystemsarego has quit [Quit: Leaving]
Hanmac1 has quit [Ping timeout: 272 seconds]
<bnagy> try the de-mothoding first, get those regex creations down
burlyscudd has joined #ruby
<bnagy> you can even pre-create them before the each if you're paranoid
brtdv has joined #ruby
moneydouble has joined #ruby
brunoro has quit [Quit: WeeChat 0.3.8]
hogeo has quit [Ping timeout: 272 seconds]
<havenwood> and don't call the regex on the empty string
<havenwood> call #sub*
<bnagy> you need a decent way to bench / profile first though
<graft> i switched to just checking if value[0] == '"' figuring it would be faster than a regex
<havenwood> ^ so true. evidence!
<bnagy> regex is suparfast
tannerburson has quit [Quit: tannerburson]
<graft> better than == ? surely not...
jgrevich_ has joined #ruby
<havenwood> graft: don't be sure, combining two checks down into one regex - bench it!
<bnagy> well if your == is true you still need to do the thing
sparrovv has joined #ruby
noop has quit [Ping timeout: 272 seconds]
kofno has quit [Ping timeout: 272 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jgrevich has quit [Ping timeout: 246 seconds]
jgrevich_ is now known as jgrevich
jbpros has quit [Quit: jbpros]
fijimunkii has quit [Ping timeout: 272 seconds]
<zipper> I have this problem with a class in which instance variables are nil yet during class creation I believe there is proof that something is being created.
brtdv has quit [Client Quit]
Liquid-- has quit [Ping timeout: 252 seconds]
<zipper> I have the gist at:https://gist.github.com/urbanslug/7572219
tharindu has joined #ruby
<zipper> Both the class and the test for it.
<TheLastProject> Hey everyone, I'm playing with Ruby a bit for fun, but I've got an issue with my program. It seems like it starts of running each of the functions instead of ignoring them until they're called. Is there something I could do about that? Here is the code: https://www.refheap.com/1f8333a4c5e5518f61beb0597 (I expect it to be low-quality, as I haven't ever seriously programmed any Ruby, just trying for fun now, but
<TheLastProject> I still figured sharing the code would help)
hololeap has quit [Ping timeout: 240 seconds]
jhamon has joined #ruby
failshel_ has joined #ruby
nobitanobi has quit [Ping timeout: 246 seconds]
sheap has joined #ruby
<bnagy> zipper: why do you think instance variables are nil?
nobitanobi has joined #ruby
<bnagy> I see nothing in your test or code that proves that
<sparrovv> zipper: I think you are missing attr_reader for date
mmitchell has quit [Remote host closed the connection]
thelorax123 has quit [Remote host closed the connection]
<zipper> bnagy: because the test fail implying that. "undefined method `[]' for nil:NilClass"
sailias has quit [Quit: Leaving.]
fijimunkii has joined #ruby
<speakingcode-wor> IceColdMax: yeah this looks like it may cover it; kind of loquacious but i'll follow through. i'd like to know the mechanics behind the gems it relies on and what they do, but i'll dig around. thanks
<zipper> sparrovv: but attr_reader is needed when I need to access an instance variable from outside itseld i.e withoutself?
<sparrovv> zipper: at least I can't see it in your gist, and self.date[] should fail... or you can use just @date[]
asteros has joined #ruby
<bnagy> zipper: and where are you []ing an @ivar?
mjs2600 has quit [Remote host closed the connection]
drumusician has quit [Ping timeout: 272 seconds]
<zipper> bnagy: because I want to use the regex
<bnagy> I said where not why
<sparrovv> zipper: right, so in that case don't use self.date[] but ivar @date
cody-- has quit [Quit: derp]
tharindu has quit [Ping timeout: 252 seconds]
<zipper> sparrovv: shouldn't self.date return a string?
thelorax123 has joined #ruby
failshell has quit [Ping timeout: 272 seconds]
<IceColdMax> speakingcode-wor: Yeah, I went through it myself just a couple of weeks ago (never having made a gem before) and it all works, even if it is a bit long-winded. Still, beggars can't be choosers :)
<bnagy> self.date will try and call the class method date, which I assume you want to get sent to Time
failshel_ has quit [Ping timeout: 246 seconds]
<sparrovv> zipper: self.date should raise an error IMO, cause there is no date method on the object
<bnagy> sparrovv: it's a subclass of Time
<zipper> but self.@date will refer to the variable, right?
<speakingcode-wor> IceColdMax: does the CLI portion of it have to be run using bundle exec? i'd like to be able to just expose a command to the user, similarly to how rails does. once you have installed the rails gem, you can run 'rails whatever' just like any shell command
<bnagy> which is already a bad idea btw
<sparrovv> bnagy: sorry, I missed that
<zipper> it's because with attr_accessor I think we call date with e.g BeautifulDates.new.date which also failed
drumusician has joined #ruby
<speakingcode-wor> @date (don't think self is needed) will refer to the instance var, yes. self.date just sends a message to the 'date' method, which presumably just returns @date
<speakingcode-wor> ^^ zipper
<IceColdMax> speakingcode-wor: uhhhh can't remember off-hand. i think the whole point of the CLI thing is that you can just run it from anywhere once you gem install... don't quote me on that though.
<speakingcode-wor> ok cool. i'll go through it, and if it doesn't end up that way i'll come back and curse you ;-)
<zipper> bnagy: Oh it shouldn't subclass time because?
banister has joined #ruby
moneydouble1 has joined #ruby
<bnagy> speakingcode-wor: no, self.date and date are different
DrShoggoth has quit [Quit: Leaving]
<bnagy> date would work if there were an attr_*, self.date still wouldn't
aspires has quit []
TigerWolf has joined #ruby
<prahal> havenwood: thanks . I tell #bundler asap (I take a break) . I solved it locally by identifier.to_s + name :)
<bnagy> zipper: because subclassing core classes usually leads to pain
<zipper> bnagy: well what should one do instead?
<bnagy> composition is usually better either informally or via DelegateClass etc
<speakingcode-wor> general rule: composition > inheritence (not always tho)
coderhs has quit [Ping timeout: 246 seconds]
moneydouble has quit [Ping timeout: 245 seconds]
<bnagy> zipper: I think you're fundamentally confused about ivars, methods and self
danshultz has quit [Remote host closed the connection]
<speakingcode-wor> obviously modules/mixins provides greater flexibility than single class inheritence, but regarding the later, B should extend A only if a B truly is an A
sheepman has quit [Ping timeout: 240 seconds]
<bnagy> you should make sure you have those solid
duggiefresh has quit [Remote host closed the connection]
jacobsmith has joined #ruby
danshultz has joined #ruby
<zipper> Okay so I fixed line 10 to read @date[regex] but the same error persists
moneydouble has joined #ruby
h0rrorvacui has quit [Ping timeout: 265 seconds]
classix has joined #ruby
h0rrorvacui has joined #ruby
<bnagy> are you still trying to call the nonexistant self.get_day?
<zipper> bnagy: I don't see why self.get_day is non existent
<zipper> Yes I am
Kricir has quit [Ping timeout: 245 seconds]
<bnagy> where is it defined?
duggiefresh has joined #ruby
<Galeforce> any opinions on it?
<zipper> I am trying to call the get_day method of that instance of BeautifulDates
thekkid has joined #ruby
sheepman has joined #ruby
<bnagy> well to call an instance method you call get_day
<speakingcode-wor> Galeforce: its a good one. pragmatic programmers and Dave Thomas are pretty respcted
<thekkid> What's the best way to get a DateTime of yesterday using ruby not rails
Blue_Ice has quit [Remote host closed the connection]
<Galeforce> cool, I had like 5 open last night and was sick of reading reviews so kind've just randomly picked it lol
Blue_Ice has joined #ruby
Blue_Ice has joined #ruby
Blue_Ice has quit [Changing host]
<zipper> bnagy: what I didn't get that at all?
vlad_starkov has joined #ruby
<zipper> bnagy: What? I didn't get that at all.
intuxicated has quit [Ping timeout: 248 seconds]
adambeynon has joined #ruby
moneydouble1 has quit [Ping timeout: 265 seconds]
duggiefresh has quit [Remote host closed the connection]
wereHamster has quit [Ping timeout: 260 seconds]
<speakingcode-wor> i may be wrong, but this one and 'the well grounded rubyist' by david a. black are considered authority texts on general ruby programming, Galeforce
<bnagy> instance methods are just simple dispatch def foo... and other instance methods call foo
<Galeforce> i had that one open last night too
<Galeforce> no one was online to give me some guidance on what to buy though XD
<Galeforce> o well
wereHamster has joined #ruby
<speakingcode-wor> you made agood choice ;)
nucatus has quit [Ping timeout: 272 seconds]
<Galeforce> my plan is to finish this: http://mislav.uniqpath.com/poignant-guide/ before the book gets here
<thekkid> Or convert Time object to DateTime whichever is simplest.
aspires has joined #ruby
<Galeforce> then read the new book and then get into rails
<zipper> bnagy: dispatch?
danshultz has quit [Ping timeout: 272 seconds]
<speakingcode-wor> cool. i don't care for poignant guide, just too distracted for me. i like 'to the point' stuff when it comes to programming texts
<Galeforce> ya me 2
vlad_starkov has quit [Read error: Connection reset by peer]
<Galeforce> but this ones free so i figure might as well while im waiting for the other book
<DanBoy> ok so my variable << data is interchangeable with variable = data
mmitchell has joined #ruby
ckinni has joined #ruby
<sheap> Poignant is so much fun though!
<bnagy> thekkid: DateTime - other subtracts days
* speakingcode-wor backs away quickly ;)
<Galeforce> sheap does it get into some detailed stuff or is it a complete beginners book?
Ivo has quit [Ping timeout: 272 seconds]
sailias has joined #ruby
<bnagy> poignant goes from beginner to super weird fricking metaprogramming
ewnd9 has joined #ruby
<Galeforce> what exactly is metapgrogramming?
<bnagy> fish
<Kamuela> programming ze programming
<speakingcode-wor> Galeforce: simply put, it is code that generates code
<DanBoy> code that generates code
<speakingcode-wor> ^^^
<Galeforce> #inception
<Galeforce> so should i read it if i already know the basics?
<Kamuela> meta tends to mean x within x
CalimeroTeknik has quit [Excess Flood]
<speakingcode-wor> kamuela: i would argue that meta tends to mean x beyond x
<speakingcode-wor> x within x sounds more like recursion, tho the 2 concepts are fundamentally similar
<Kamuela> speakingcode-wor, isnt para beyond?
<DanBoy> well if you don't use it a lot you'll forget it Galeforce
weems has quit [Ping timeout: 246 seconds]
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<Galeforce> hmm
ckinni has quit [Ping timeout: 248 seconds]
<Galeforce> i think im just going to make a ruby program instead
<DanBoy> yes lol
<Kamuela> galeforce will use it with his rails master
CalimeroTeknik has joined #ruby
<Galeforce> lol
<Kamuela> with a method that is called within a method, is the scope of that inner method with respect to variables treated as right within the class?
<speakingcode-wor> para usually means side-by-side , but yeah it can mean beyond also. interesting thing baout the greek language is, like many opther human languages, things can have overlapping and distinct meaning... maybe that's meta in a way ;-)
<Galeforce> what type of program should I make in ruby?
<Galeforce> 0o0o0o0 i acutally know
<Galeforce> ill make a plugin for a irc bot
CalimeroTeknik has quit [Excess Flood]
<Kamuela> Galeforce, that's funny, i was straight-up gonna say IRC bot
mikesplain has quit [Read error: Operation timed out]
<Galeforce> lol
ckinni has joined #ruby
ckinni has quit [Max SendQ exceeded]
psyl0n has joined #ruby
<Kamuela> if shoe still works, that's an excellent beginning front-end
<bnagy> there's no greek justification for meta meaning beyond
<speakingcode-wor> kamuela: what do you mean by 'treated as right' ?
<DanBoy> Galeforce, ruby is your first language?
CalimeroTeknik has joined #ruby
<Galeforce> DanBoy yes
<TheLastProject> Hmm, seems I've been able to debug it better. Seems the place where I define a hash like: "$commands = { 'b' => bold }" causes the "bold" function to be immediately executed. Is there a way to prevent that from happening? I'd like to be able to do $commands['b'] to execute the "bold" function
ckinni has joined #ruby
<speakingcode-wor> bnagy: "Meta is a common English prefix meaning "beyond" which often carries a sense of self-reference."
ckinni has quit [Max SendQ exceeded]
<bnagy> but that doesn't really have a bearing on what people mean when they say metaprogramming
jibi has quit [Ping timeout: 252 seconds]
<DanBoy> << puts 'world hello'
Ivo has joined #ruby
<DanBoy> >> puts 'hello'
<eval-in> DanBoy => hello ... (https://eval.in/71075)
<bnagy> speakingcode-wor: I said no greek justification, not english
<Kamuela> Galeforce, ruby being your first is awesome. might be scary though. anything else is a step down and might cause negative head-banging
<DanBoy> first ruby app
zastern_ has quit [Remote host closed the connection]
<havenwood> Galeforce: In programming you talk about variables and constants, for example. While in metaprogramming you'd talk of state of variableness and experience constantness.
m8 has quit [Quit: Sto andando via]
ckinni has joined #ruby
<Galeforce> ?
<speakingcode-wor> bnagy: Meta (from the Greek preposition μετά = "after", "beyond", "adjacent", "self" :-D
<havenwood> the whiteness of white
zz_jrhorn424 is now known as jrhorn424
<Galeforce> oo
zastern has joined #ruby
<bnagy> speakingcode-wor: ok, that's Just Wrong
<Kamuela> haha, sure havenwood. we'll act like that makes sense and move along with our days
<DanBoy> in ruby a class is an object and an object is a class?
<havenwood> Galeforce: Your code will start to develop feelings and personal goals.
<speakingcode-wor> bnagy: take it up with the community then, as that's from wikipedia
weems has joined #ruby
weems has quit [Client Quit]
<Galeforce> lol
<bnagy> hahahah wikipedia
<Kamuela> that's just AI
theRoUS has quit [Ping timeout: 264 seconds]
<bnagy> meta means middle
weems has joined #ruby
<Kamuela> in fact, wasn't AI programming a LISP thing?
<speakingcode-wor> and it's not wrong at all. metaspace, meta tags, metaphysics - all indicating beyond, not self-reference
<scarfacedeb> Galeforce: My understanding of metaprogramming is that it deals more with the classes, inheritance, reflections, dynamically defined methods, etc
<Kamuela> and if Ruby inherits from LISP, i bet it'd be good at AI
<bnagy> speakingcode-wor: you're using english words
coderhs has joined #ruby
<speakingcode-wor> bnagy: thanks for the info... O-o
<bnagy> this is not a viable way to argue about greek roots
<havenwood> scarfacedeb: I was just joking as to the philosophical analogues.
ckinni has quit [Read error: Connection reset by peer]
<speakingcode-wor> "Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime."
<bnagy> there are many english words, as I said, that use meta in that sense
<Kamuela> physics within physics, space within space, tags within tags... every one of those uses the within way i think of it, imo
<bnagy> I'm just saying it's a language thing, that's not what the greek root means
<scarfacedeb> havenwood: sorry, I skipped the beginning of the discussion)
blackmesa has joined #ruby
ckinni has joined #ruby
psyl0n has quit [Ping timeout: 240 seconds]
<speakingcode-wor> metatags describe the document from outside of it. metaphysics is the physics of things beyond the 'physical' dimensions.
<DanBoy> would adding a singleton method fall under metaprogramming
mercwithamouth has joined #ruby
atmosx has joined #ruby
<Kamuela> speakingcode-wor, a meta tag is a full tagging language WITHIN another tagging language
<bnagy> speakingcode-wor: you are failing to present an argument, you're just babbling
<speakingcode-wor> DanBoy: things like eval/call, adding methods to a class at runtime, etc
lmadrigal has quit [Quit: Computer has gone to sleep.]
<havenwood> like metaphysics, it honestly doesn't mean just one thing
<speakingcode-wor> bnagy: i'm not arguing here. i've presented sources, and cited examples that follow accordingly
<Kamuela> speakingcode-wor, metaphysics is the study of things that drive outside physics, e.g. consciousness as studied as independent of material, or primal to material physics
<DanBoy> because i've covered books where of course the last chapters are on metaprogramming, i understood them, never used it after the book and have now forgotten most of it
<Kamuela> i've been struggling to understand polymorphism since C++
ephemerian has joined #ruby
<bnagy> wikipedia is not a source :)
<nateberkopec> Whats the best way to count how many times the character "@" appears in a string?
kristofers has quit []
lmadrigal has joined #ruby
<DanBoy> iterate through it? but theres gotta be a fancier way
<Kamuela> "string".splice('@').length ?
<sheap> bnagy it's a source to get sources!
<havenwood> >> '@@lj@KL@JL@@LKJ@K@'.scan(/@/).size
<eval-in> havenwood => 8 (https://eval.in/71084)
sailias has quit [Read error: No route to host]
<speakingcode-wor> bnagy: not even going there. if wikipedia isn't a source, then open-source code must be vulnerable and unreliable, fundamentally
<nateberkopec> havenwood: aha! scan was what I was looking for!
chamunks has joined #ruby
<nateberkopec> i was getting all spun around trying to use #match
kaspergrubbe has quit [Remote host closed the connection]
funburn has joined #ruby
<Kamuela> speakingcode-wor, wikipedia is an aggregate collection, i do agree that he's getting a little historian/anthropologist about it, but it's not even really a tertiary source
CalimeroTeknik has quit [Excess Flood]
<speakingcode-wor> kamuela: sure. but assuming the article/fact being referenced from wikipedia is cited, that's good enough for me for an IRC debate about semantics
jkhwan_ has quit [Read error: Connection reset by peer]
<bnagy> just a few of the articles written by people that actually know etymology and greek
<Galeforce> kamuela
jkhwan has joined #ruby
<speakingcode-wor> why should any one source be considered absolute or right? knowledge fundamentally depends on a network of trust
CalimeroTeknik has joined #ruby
BraddBitt has joined #ruby
claymore has quit [Quit: Leaving]
kobain has joined #ruby
<bnagy> speakingcode-wor: read in particular the misinterpretation that followed the introduction of the word metaphysics
nobitanobi has quit [Read error: Connection reset by peer]
saltnvinegar has quit [Ping timeout: 245 seconds]
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
zipper has quit [Quit: leaving]
fijimunkii has quit [Ping timeout: 272 seconds]
<bnagy> so, as I said, I'm not arguing what it means in present english, just what it meant in greek
<speakingcode-wor> the only exceptions, i would say, are music, programming, and math, which can be independently verified in self-contained exercises without influence from outside factors. there may be a few others, but 'science' and history and etymology certainly do not have those properties
lmadrigal has quit [Client Quit]
dgfdgf has joined #ruby
<speakingcode-wor> 'those properties' being fundamental axioms
Kricir has joined #ruby
classix has quit [Quit: leaving]
interactionjaxsn has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
<atmosx> bnagy: what greek?
interactionjaxsn has joined #ruby
`MArceLL` has quit [Ping timeout: 246 seconds]
<speakingcode-wor> anyway, i didn't mean to derail the channel. i was just making the point that 'meta' and 'recursion' are conceptually similar but i think there is still a key difference that makes them not so interchangeable descriptors... just my lexical opinion
agent_white has quit [Quit: leaving]
<bnagy> hey LOOK! There are classical greek dictionaries! http://www.kypros.org/cgi-bin/lexicon They say the same thing!
BraddPitt has quit [Ping timeout: 265 seconds]
ckinni has quit [Ping timeout: 248 seconds]
<bnagy> it's like a whole symphony of "You're Wrong Just Suck It Up"
baordog has quit [Remote host closed the connection]
mmitchell has quit []
<speakingcode-wor> bnagy: was this written by a classical greek speaking person in classical greece?
BraddBitt has quit [Ping timeout: 272 seconds]
<Kamuela> i'm sorry i started this conversation :/ that being said, you both are right. bnagy is only saying that common english usage as a prefix is wrong in terms of the original greek
<speakingcode-wor> if not, then i don't see how it's any better than wikipedia, and if so, i don't see why you would assume it has been interpreted and translated correctly, and thus not any better than wikipedia...
TaxmanBD has joined #ruby
* atmosx is original
* atmosx R
orionstein is now known as orionstein_away
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
weszlem has quit []
<bnagy> speakingcode-wor: because anyone can edit wikipedia?
<bnagy> I mean give me 5 minutes and meta will mean dinosaur balls
threesome has quit [Ping timeout: 272 seconds]
<speakingcode-wor> the nature of language is that it evolves and changes. i am perfectly willing to accept that modern english usage of a greek prefix may not match it's meaning in ancient greece, but i won't accept any assertion about what a word did or did not mean over 2000 years ago
ewnd9 has quit [Ping timeout: 240 seconds]
<havenwood> Code.all?(&:metaprogramming?) && Code.none?(&:metaprogramming) #=> true
<havenwood> oops, i forgot a ?
bradhe has quit [Remote host closed the connection]
cpruitt has quit [Quit: cpruitt]
interactionjaxsn has quit [Ping timeout: 252 seconds]
jlast has joined #ruby
<bnagy> speakingcode-wor: I think that's because you don't know how linguistics works. We have very good ideas about what most words meant at points in time
momomomomo has joined #ruby
<speakingcode-wor> bnagy: so you're saying that a source that one person/group controls in isolation is more credible than one open for the world at large to input and modify and correct?
<bnagy> especially common ones in languages where we have vast corpuses of text
El_Dood has quit []
<bnagy> speakingcode-wor: yes?
osvico has joined #ruby
<bnagy> have you ever done any academic study?
<bnagy> try to use wikipedia...
Kricir has quit [Remote host closed the connection]
<speakingcode-wor> excluding my time spent gaining two science degrees, no i have not.
Kricir has joined #ruby
<speakingcode-wor> but that is ad hominem and hardly relevant
<atmosx> speakingcode-wor: what science?
<atmosx> what does ad hominem mean?
platzhirsch has left #ruby [#ruby]
<bnagy> hahahah
jacobsmith has quit [Ping timeout: 272 seconds]
momomomomo has quit [Client Quit]
<bnagy> it means I am being snarky
<sheap> so if I wanted to make a program that grabbed the first most recent tweet from a user, do I still need to get auth tokens from twitter?
MrZYX is now known as MrZYX|off
<bricker> yep
<speakingcode-wor> yes, we do have highly confident understanding of what words did mean in usage in historic/ancient/past times, but it is silly to assert a negative and that a word did NOT have a usage/meaning
<sheap> nuts
<bricker> yep
<speakingcode-wor> sheap: if your'e using their api, yes.
<speakingcode-wor> if you're scraping it off the website or something, probably not
<atmosx> sheap: yes it's way easier
<atmosx> sheap: with nokogiri you could do it via web
<atmosx> but it's wayyy easier using twitter tokens
xorgnak___ has joined #ruby
<bricker> easier and safer
<speakingcode-wor> atmosx: computer science and mathematical science
elux has quit [Quit: Leaving...]
<atmosx> wow
paul_k has quit [Remote host closed the connection]
<atmosx> interesting
<atmosx> speakingcode-wor: but what has to do with linguistics?
<sheap> atmosx: I was thinking of using the twitter gem
tylersmith has quit [Read error: Connection reset by peer]
<atmosx> sheap: it's a good to avoid re-inventing the wheel.
<speakingcode-wor> atmosx: nothing, which is why i said its irrelevant, but he brought it up in the context of using wikipedia in academia
<atmosx> oh
<atmosx> okay
<bricker> sheap: if you just need to get a single tweet, I would skip the twitter gem. Plus you'll learn something about oauth in the process :)
* atmosx goes back to minitest now
tylersmith has joined #ruby
<speakingcode-wor> :)
dzhulk has quit [Quit: Leaving.]
mikepack has joined #ruby
magoo has quit [Quit: WeeChat 0.4.2]
kindjal has joined #ruby
mengu_ has quit [Remote host closed the connection]
mlpinit has quit [Ping timeout: 248 seconds]
magoo has joined #ruby
nobitanobi has joined #ruby
<sheap> bricker: yea it's just grabbing the single most recent, no posting or anything fancy
hogeo has joined #ruby
<speakingcode-wor> bnagy: at any rate, it may not have meant beyond in greek usage, and you're likely right that it did not
<bricker> sheap: as you can see here, the twitter gem might be a little overkill: https://github.com/sferik/twitter/tree/master/lib/twitter
cburyta has joined #ruby
xorgnak___ has quit [Remote host closed the connection]
adambeynon has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mansi has quit [Remote host closed the connection]
sivoais has quit [Ping timeout: 246 seconds]
<sheap> bricker: probably, I'll look into a different method! thanks
yfeldblu_ has joined #ruby
sparrovv_ has joined #ruby
mansi has joined #ruby
vlad_starkov has joined #ruby
<Hanmac> atmosx: all company need this: http://i.imgur.com/W7W24rO.jpg
kevind has quit [Quit: kevind]
hogeo has quit [Ping timeout: 252 seconds]
xorgnak___ has joined #ruby
sparrovv has quit []
sparrovv_ is now known as sparrovv
Xeago has quit [Remote host closed the connection]
<atmosx> Hanmac: which anime is this?
vlad_starkov has quit [Read error: Connection reset by peer]
tylersmith has quit [Read error: Connection reset by peer]
tylersmith has joined #ruby
<atmosx> Hanmac: is it any good?
mansi has quit [Ping timeout: 272 seconds]
reset has quit [Quit: Leaving...]
kofno has joined #ruby
<Hanmac> imo yes, it is funny and also interesting and it has a story (compared to other animes without long story)
AlSquire has quit [Quit: This computer has gone to sleep]
xk_id has joined #ruby
kevind has joined #ruby
colonolGron has quit [Quit: Lost terminal]
Kamuela has quit [Quit: Leaving]
nisstyre has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kirun has quit [Quit: Client exiting]
enebo has quit [Quit: enebo]
dallasm_ has quit [Remote host closed the connection]
drumusician has quit [Ping timeout: 246 seconds]
jan1337z has quit [Ping timeout: 264 seconds]
jlast has quit [Remote host closed the connection]
tharindu has joined #ruby
banister has joined #ruby
sivoais has joined #ruby
Kricir has quit [Remote host closed the connection]
Seventoes has joined #ruby
greggawatt has left #ruby [#ruby]
banister has quit [Client Quit]
TheLastProject has quit [Quit: ZNC - http://znc.in]
kofno has quit [Ping timeout: 248 seconds]
petey_ has joined #ruby
tharindu has quit [Ping timeout: 245 seconds]
Mattias has quit [Ping timeout: 245 seconds]
einarj has quit [Remote host closed the connection]
Kricir has joined #ruby
Davey has joined #ruby
atmosx has quit [Quit: Lost in trance]
xorgnak___ has quit [Remote host closed the connection]
cgore has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
nobitanobi has quit [Ping timeout: 264 seconds]
paul_k has joined #ruby
xorgnak___ has joined #ruby
petey has quit [Ping timeout: 272 seconds]
petey_ has quit [Read error: Operation timed out]
turduks has joined #ruby
BraddBitt has joined #ruby
nobitanobi has joined #ruby
_lfox has quit [Quit: ZZZzzz…]
jmimi has quit [Quit: Leaving.]
kevind has quit [Read error: Connection reset by peer]
<turduks> **Earn 0.25$ Per Lead **. For Details:http://www.StillRemember.Net/Affiliate.htm
turduks has quit [Killed (idoru (Spam is off topic on freenode.))]
kevind has joined #ruby
psyl0n has joined #ruby
Mattias has joined #ruby
TaxmanBD has quit [Ping timeout: 245 seconds]
<sheap> ~sigh~
pixelgremlins has quit [Ping timeout: 252 seconds]
xorgnak___ has quit [Remote host closed the connection]
jkhwan has quit [Remote host closed the connection]
xorgnak___ has joined #ruby
jkhwan has joined #ruby
reset has joined #ruby
lmadrigal has joined #ruby
Ivo has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
lmadrigal has quit [Client Quit]
jkhwan_ has joined #ruby
jkhwan has quit [Read error: Connection reset by peer]
xorgnak___ has quit [Remote host closed the connection]
Kamuela has joined #ruby
mjs2600 has joined #ruby
btanaka has quit [Ping timeout: 252 seconds]
xorgnak___ has joined #ruby
<xibalba> can anyone point me to an example in the stdlib of using Ruby to extend a class written in C ?
akonny has quit [Quit: akonny]
ssvo_ has joined #ruby
<xibalba> I see most, if not all, of the HASH class is in C
<bnagy> all of core is C for MRI
<xibalba> right, i get that. as that's the interpreter
lmadrigal has joined #ruby
<xibalba> i'm looking at the stdlib though. my understanding is most of it is written in C
<xibalba> err
<xibalba> Ruby
ssvo has quit [Ping timeout: 252 seconds]
<xibalba> but I'm looking for an example of a C class extended by Ruby
<bnagy> there's a lot of old cruft in there :/
zz_taion809 is now known as taion809
<bnagy> what do you mean 'extended by'
<bnagy> you mean wrapping C libs?
workmad3 has quit [Ping timeout: 264 seconds]
<bnagy> or embedding ruby
<xibalba> hmm, let me try and figure out how to word this
<speakingcode-wor> if it's the stdlib you should be able to just MyClass < LibClass
<xibalba> not wrapping C libs like glibc, no i dont mean that
duggiefresh has joined #ruby
<xibalba> so it appears all of HASH is written in C, right?
johnnyfuchs has quit [Quit: Leaving.]
dnyy has quit [Read error: Connection reset by peer]
danshultz has joined #ruby
<speakingcode-wor> sure why not. so you want to extend the hash class? afaik it's exposed to ruby in a way that ruby treats it like any other ruby class/object, so normal mechanics should work
kirushik has joined #ruby
<xibalba> whats a stdlib item i can look at thats only written in Ruby
kirushik has left #ruby [#ruby]
<bnagy> most of it
io_syl has quit []
<bnagy> what is the actual question?
<bnagy> what do you actually want to do?
<speakingcode-wor> ^^^^'
<xibalba> nothing yet, just trying to understand this
soba_ has quit [Read error: Connection reset by peer]
jonahR has joined #ruby
jonahR has quit [Client Quit]
Kricir has quit [Remote host closed the connection]
fuhgeddaboudit has quit [Read error: Operation timed out]
<speakingcode-wor> extending Hash worked fine for me...
<xibalba> thats extending through inheirtance though
xorgnak___ has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<speakingcode-wor> ok how are you trying to extend it?
<speakingcode-wor> monkey patch it?
valesk has quit [Remote host closed the connection]
<xibalba> im not, but i'm wondering could you get in there and extend the original class? (i know this is probably a bad idea)
<xibalba> in Ruby not C though
xorgnak___ has joined #ruby
<bnagy> get in where?
<xibalba> the hash class for example
sergicles has joined #ruby
<bnagy> just monkeypatch
<speakingcode-wor> see 2nd file in the gist...
danshultz has quit [Ping timeout: 245 seconds]
<bnagy> rails does that kind of crap all the time
<xibalba> speakingcode-wor, ok this is what i'm meaning. however, when doing it this way will you have access to the rest of Hash's methods?
<speakingcode-wor> in ruby you can 'monkey patch' any class by defining a class using the same name and implementing whichever mehtods you'd like to add, or replace
<speakingcode-wor> yes
vlad_starkov has quit [Read error: Connection reset by peer]
Mapley has joined #ruby
<xibalba> ah-ha, thank you. is 'monkey patch' the industry nomenclature?
<speakingcode-wor> there's a nifty tool called 'ruby' you can run on files to experiment ;-)
<speakingcode-wor> yes it is
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bradhe has quit [Remote host closed the connection]
<speakingcode-wor> use it with care, tho
<xibalba> yeah i would think it better to always inheirt to a new class vs monkey-patching
<bnagy> s/with care/never/
nanoyak has quit [Quit: Computer has gone to sleep.]
<speakingcode-wor> ^^^
<xibalba> thanks for the sarcasm :)
<xibalba> i'm testing, just going through eloquent ruby right now
<speakingcode-wor> eh, he's right
<speakingcode-wor> monkey patching is ok sometimes, when it's the only option
newUser1234 has quit [Read error: Connection reset by peer]
jlast has joined #ruby
sergicles has quit [Ping timeout: 240 seconds]
<speakingcode-wor> supppose you're using a framework or some 3rd party code that uses a particular class and you can't really get around that, but you need some functionality on the objects it creates - maybe then it's ok. i dunno. it's very common in javascript
newUser1234 has joined #ruby
xorgnak___ has quit [Remote host closed the connection]
sergicles has joined #ruby
xorgnak___ has joined #ruby
bradhe has joined #ruby
nanoyak has joined #ruby
<sheap> ah I did it!
* sheap grins like a maniac
Galeforce has quit [Ping timeout: 272 seconds]
s2013 has quit [Ping timeout: 265 seconds]
Hanmac has quit [Quit: Leaving.]