<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]
<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
<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>
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>
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
<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]
<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]
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?
<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]...] ?
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
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]
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>
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]
<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
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
<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
<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>
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
<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
<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
<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
<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
<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
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
<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]
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")
<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
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]
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']"/)
<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.
<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:
<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
<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]
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…]
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.]
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]
<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]
<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."
<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
<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
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
<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"
<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]
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]
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
<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>
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
<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
<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
<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
<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
<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
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
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]
<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]