milardovich has quit [Remote host closed the connection]
willmichael has joined #ruby
sumobob has joined #ruby
cthulchu has joined #ruby
sumobob has quit [Ping timeout: 240 seconds]
cthulchu has quit [Ping timeout: 240 seconds]
pablo__ has quit [Quit: Leaving]
sumobob has joined #ruby
sumobob has quit [Ping timeout: 240 seconds]
trautwein has quit [Quit: ZNC 1.6.5 - http://znc.in]
trautwein has joined #ruby
willmichael has quit [Read error: Connection reset by peer]
willmichael has joined #ruby
herbmillerjr has joined #ruby
herbmillerjr has quit [Client Quit]
morenoh149 has joined #ruby
alfiemax has quit [Read error: Connection reset by peer]
willmichael has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
nopoliti1 has joined #ruby
nopoliti1 has quit [Client Quit]
gary has joined #ruby
gary is now known as Guest39282
nopolitica has quit [Ping timeout: 264 seconds]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
konsolebox has quit [Ping timeout: 248 seconds]
konsolebox has joined #ruby
alfiemax_ has joined #ruby
willmichael has joined #ruby
alfiemax has quit [Ping timeout: 264 seconds]
morenoh149 has quit [Ping timeout: 256 seconds]
xenops has quit [Ping timeout: 240 seconds]
arescorpio has quit [Excess Flood]
alfiemax has joined #ruby
SuperLag has joined #ruby
alfiemax_ has quit [Ping timeout: 268 seconds]
houhoulis has quit [Remote host closed the connection]
morenoh149 has joined #ruby
Abhijit has joined #ruby
<Abhijit>
whats the recommended way to run shell commands from ruby, when my program needs to make decision based upon output of that shell command and not just execute it?
alfiemax has quit [Remote host closed the connection]
gix has joined #ruby
milardovich has joined #ruby
cthulchu has joined #ruby
gix- has quit [Ping timeout: 260 seconds]
Tagami[m] has left #ruby ["User left"]
hdb2 has joined #ruby
milardovich has quit [Ping timeout: 248 seconds]
willmichael has quit [Ping timeout: 276 seconds]
cthulchu has quit [Ping timeout: 240 seconds]
willmichael has joined #ruby
Abhijit has quit [Quit: Leaving]
hdb2 has quit [Ping timeout: 265 seconds]
morenoh149 has quit [Ping timeout: 268 seconds]
cthulchu has joined #ruby
cthulchu has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
willmichael has quit [Ping timeout: 248 seconds]
mistergibson has quit [Ping timeout: 260 seconds]
s2013 has joined #ruby
alfiemax has quit [Remote host closed the connection]
kapil___ has quit [Quit: Connection closed for inactivity]
alfiemax has joined #ruby
willmichael has joined #ruby
cthulchu has joined #ruby
alfiemax has quit [Remote host closed the connection]
troys has quit [Quit: Bye]
cthulchu has quit [Ping timeout: 252 seconds]
kapil___ has joined #ruby
willmichael has quit [Read error: Connection reset by peer]
sidx64 has joined #ruby
cthulchu has joined #ruby
willmichael has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
darkhanb has joined #ruby
darkhanb has quit [Client Quit]
instrud has joined #ruby
cthulchu has quit [Ping timeout: 240 seconds]
aspiers has joined #ruby
willmichael has quit [Ping timeout: 240 seconds]
memo1 has quit [Ping timeout: 265 seconds]
milardovich has joined #ruby
milardovich has quit [Ping timeout: 256 seconds]
cagmz has quit [Quit: Leaving]
marxarelli|afk is now known as marxarelli
jnyw has quit [Ping timeout: 256 seconds]
naprimer2 has quit [Ping timeout: 248 seconds]
naprimer has joined #ruby
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
faces has quit [Ping timeout: 248 seconds]
dionysus69 has joined #ruby
aufi has joined #ruby
ta_ has quit [Remote host closed the connection]
sanscoeur has quit [Remote host closed the connection]
cthulchu has joined #ruby
mtkd has joined #ruby
LocaMocha has joined #ruby
darkhanb has joined #ruby
d5sx43 has joined #ruby
d5sx43 has quit [Client Quit]
cthulchu has quit [Ping timeout: 256 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apeiros has quit [Remote host closed the connection]
reber has joined #ruby
cthulchu has joined #ruby
DTZUZO has joined #ruby
armyriad has quit [Quit: Leaving]
cthulchu has quit [Ping timeout: 276 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
n008f4g_ has joined #ruby
andikr has joined #ruby
karapetyan has joined #ruby
marxarelli is now known as marxarelli|afk
willmichael has joined #ruby
Guest39282 has quit [Ping timeout: 248 seconds]
sumobob has joined #ruby
alfiemax has joined #ruby
alfiemax_ has joined #ruby
alex`` has joined #ruby
alex`` has quit [Client Quit]
gary has joined #ruby
gary is now known as Guest19522
alfiemax has quit [Ping timeout: 240 seconds]
sumobob has quit [Ping timeout: 260 seconds]
anisha has joined #ruby
apeiros has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sidx64 has joined #ruby
milardovich has joined #ruby
ShekharReddy has joined #ruby
conta has joined #ruby
milardovich has quit [Ping timeout: 260 seconds]
agent_white has joined #ruby
clemens3 has joined #ruby
maum has joined #ruby
alex`` has joined #ruby
ta_ has joined #ruby
cthulchu has joined #ruby
alex`` has quit [Client Quit]
Q--- has joined #ruby
alex`` has joined #ruby
Q--- has quit [Client Quit]
alex`` is now known as alexherbo2
timmow has quit [Ping timeout: 374 seconds]
gmcintire has quit [Ping timeout: 374 seconds]
RushPL has quit [Remote host closed the connection]
orbyt_ has joined #ruby
gmcintire has joined #ruby
alexherbo2 is now known as alex``
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
RushPL has joined #ruby
orbyt_ has quit [Client Quit]
willmichael has quit [Ping timeout: 240 seconds]
shortdudey123 has quit [Ping timeout: 240 seconds]
cthulchu has quit [Ping timeout: 265 seconds]
timmow has joined #ruby
iNs has quit [Ping timeout: 240 seconds]
bokayio has quit [Ping timeout: 240 seconds]
sidx64 has joined #ruby
bokayio has joined #ruby
shortdudey123 has joined #ruby
iNs has joined #ruby
n008f4g_ has quit [Ping timeout: 248 seconds]
Dimik has joined #ruby
clemens3 has quit [Ping timeout: 265 seconds]
cthulchu has joined #ruby
Guest19522 has quit [Ping timeout: 260 seconds]
cthulchu has quit [Ping timeout: 240 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DaniG2k has joined #ruby
gary has joined #ruby
gary is now known as Guest10752
mtkd has quit [Read error: Connection reset by peer]
mtkd has joined #ruby
Guest10752 has quit [Ping timeout: 276 seconds]
gary_ has joined #ruby
gary_ is now known as Guest94264
anisha_ has joined #ruby
anisha has quit [Ping timeout: 264 seconds]
Guest94264 has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
gary__ has joined #ruby
aupadhye has joined #ruby
vutral|kali has quit [Ping timeout: 268 seconds]
maum has quit [Remote host closed the connection]
devil_tux has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
quobo has quit [Quit: Connection closed for inactivity]
mello has joined #ruby
mello is now known as Guest66178
cthulchu has joined #ruby
sylario has joined #ruby
marr has joined #ruby
<dminuoso>
>> f = -> (r, name, url) { r.map { |i| [name % i, url % i ] } }; f[1..5, "a-%s", "b-%s"]
<ruby[bot]>
dminuoso: # => /tmp/execpad-fc153388ce96/source-fc153388ce96:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/960008)
<dionysus69>
in here, if wallet is locked it throws exception with code 12
gary__ has quit [Ping timeout: 260 seconds]
bijan_awaaaay has quit [Quit: System has gone to sleep. ZZZzzz…]
<dionysus69>
but after it unlocks, and reties, it still throws 12
<dionysus69>
if I terminate script and rerun, then it doesn't throw 12 anymore and executes the main part of program
Guest15827 has quit [Remote host closed the connection]
gary__ has joined #ruby
<dionysus69>
so why isn't it unlocking on runtime without terminating and rerunning ?
<dionysus69>
doesn't make sense :S
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
user2 has joined #ruby
cthulchu has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
gary__ has quit [Ping timeout: 255 seconds]
gary__ has joined #ruby
mtkd has quit []
cthulchu has quit [Ping timeout: 268 seconds]
<apeiros>
dionysus69: probably cached information somewhere?
vutral|kali has quit [Ping timeout: 248 seconds]
mtkd has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
jaruga has joined #ruby
ecuanaso has joined #ruby
gary__ has quit [Ping timeout: 248 seconds]
workmad3 has quit [Quit: Lost terminal]
user2 has quit [Quit: WeeChat 2.0.1]
bngsudheer has left #ruby ["Leaving"]
AJA4350 has joined #ruby
apeiros has quit []
np4433 has joined #ruby
bijan_ has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
yohji has joined #ruby
lesce has quit [Ping timeout: 260 seconds]
gary has joined #ruby
sidx64 has joined #ruby
gary is now known as Guest47803
ramfjord has quit [Ping timeout: 240 seconds]
lesce has joined #ruby
sidx64 has quit [Client Quit]
karapetyan has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest47803 has quit [Ping timeout: 240 seconds]
sidx64 has joined #ruby
gary_ has joined #ruby
gary_ is now known as Guest79168
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
adlerdias has joined #ruby
GodFather has quit [Read error: Connection reset by peer]
GodFather has joined #ruby
Guest79168 has quit [Ping timeout: 256 seconds]
cthulchu has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mozzarella has quit [Ping timeout: 240 seconds]
Mike11 has joined #ruby
sidx64 has joined #ruby
cthulchu has quit [Ping timeout: 256 seconds]
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
cthulchu has joined #ruby
sumobob has joined #ruby
gary__ has joined #ruby
DaniG2k has quit [Quit: leaving]
cthulchu has quit [Ping timeout: 256 seconds]
goatish has joined #ruby
sumobob has quit [Ping timeout: 276 seconds]
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
jnollette has quit [Remote host closed the connection]
jnollette has joined #ruby
gary__ has quit [Ping timeout: 260 seconds]
gary__ has joined #ruby
Cavallari has joined #ruby
vutral|kali has quit [Ping timeout: 248 seconds]
alex`` has quit [Ping timeout: 256 seconds]
bijan_ has quit [Quit: System has gone to sleep. ZZZzzz…]
gary__ has quit [Ping timeout: 248 seconds]
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
gary has joined #ruby
gary is now known as Guest13065
Guest13065 has quit [Ping timeout: 240 seconds]
gary_ has joined #ruby
gary_ is now known as Guest11876
np4433 has quit [Quit: WeeChat 2.0.1]
karapetyan has quit [Remote host closed the connection]
Serpent7776 has joined #ruby
ldnunes has joined #ruby
amatas_ has joined #ruby
apparition has joined #ruby
amatas__ has joined #ruby
tomphp has joined #ruby
Guest11876 has quit [Ping timeout: 265 seconds]
amatas_ has quit [Ping timeout: 264 seconds]
gary__ has joined #ruby
vutral|kali has quit [Ping timeout: 265 seconds]
cthulchu has joined #ruby
karapetyan has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
adlerdias has left #ruby [#ruby]
discopatrick has joined #ruby
ecuanaso has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
cthulchu has quit [Ping timeout: 240 seconds]
apeiros_ has joined #ruby
gary__ has quit [Ping timeout: 256 seconds]
gary__ has joined #ruby
despai has joined #ruby
Psybur_ has joined #ruby
nowhereman_ has joined #ruby
ziso has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
cthulchu has joined #ruby
despai has quit [Ping timeout: 268 seconds]
<ziso>
Can anyone recommend an alternative to basically just using Classes as namespaces for methods? No experience in OOP, so it just seems like a verbose way to use methods.
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
<apeiros_>
ziso: then I'd recommend you to get familiar with OO instead of trying to write COBOL in ruby.
apeiros_ is now known as apeiros
<tobiasvl>
ziso: an alternative to using classes as namespaces? well, what about using namespaces as namespaces
<ziso>
I just took that from Steve Yegge's argument against using singletons, realizing that's basically all I was using classes for
<apeiros>
that's a good realization. however, your "fix" of the perceived problem is terrible.
cthulchu has quit [Ping timeout: 268 seconds]
<apeiros>
you realized "I wrote badly architected code". your fix is "how can I write badly architected code in a different way?". IMO the proper approach is "how can I use OO to have better architecture."
<ziso>
my project is constrained to only use one global module, so would it make more sense to use sub modules for namespacing where necessary?
<ziso>
you're right
Mike11 has quit [Ping timeout: 256 seconds]
<apeiros>
you can nest modules and classes as deeply as you want
<apeiros>
and restricting toplevel surface of a project/library to a single module (or class) is a good idea.
gregf_ has quit [Ping timeout: 260 seconds]
tomphp has joined #ruby
<apeiros>
and if you need help with how to structure your non-OO code into classes, you can always create a gist or link your repository here and ask for help.
<ziso>
thank you. POODR went a bit over my head but i would like to slowly move an in-production project over to somethiing more easily maintainable
bijan_awaaaay has joined #ruby
vutral|kali has quit [Ping timeout: 276 seconds]
<apeiros>
it's entirely possible that OO isn't a style which fits you. it might be worth considering e.g. functional languages and see whether that style matches your way of thinking.
ta_ has quit [Remote host closed the connection]
<apeiros>
it's not like OO was "the one true way". it's just that I think it's a bad idea to use ruby in a non-OO way (note that OO and functional can mix to a degree)
ta_ has joined #ruby
mtkd has quit [Ping timeout: 268 seconds]
alex`` has joined #ruby
bijan_awaaaay is now known as bijan_
bijan_ is now known as bijan_awaaaay
mtkd has joined #ruby
bijan_awaaaay is now known as bijan_
willmichael has quit [Read error: Connection reset by peer]
willmichael has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DTZUZO has joined #ruby
cabotto has joined #ruby
Nightmare has quit [Ping timeout: 255 seconds]
ta_ has quit [Ping timeout: 240 seconds]
gregf_ has joined #ruby
thinkpad has quit [Quit: lawl]
adlerdias has joined #ruby
ramfjord has joined #ruby
lvmbdv has joined #ruby
Nightmare has joined #ruby
alfiemax has quit [Remote host closed the connection]
cabotto has quit []
alfiemax has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
workmad3 has joined #ruby
Psybur__ has joined #ruby
ramfjord has quit [Ping timeout: 255 seconds]
gary__ has quit [Ping timeout: 276 seconds]
alfiemax_ has joined #ruby
Psybur_ has quit [Ping timeout: 256 seconds]
darix has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
alex`` has quit [Quit: WeeChat 2.0.1]
alex`` has joined #ruby
karapetyan has quit [Remote host closed the connection]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thinkpad has joined #ruby
alfiemax_ has quit [Ping timeout: 276 seconds]
vutral|kali has quit [Ping timeout: 276 seconds]
alfiemax has joined #ruby
jaruga has quit [Ping timeout: 276 seconds]
jaruga has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
LenPayne has quit [Ping timeout: 240 seconds]
gary has joined #ruby
LenPayne has joined #ruby
karapetyan has joined #ruby
gary is now known as Guest52279
karapetyan has quit [Remote host closed the connection]
alfiemax has quit [Remote host closed the connection]
karapetyan has joined #ruby
Cyrus has quit [Ping timeout: 255 seconds]
ldnunes has quit [Ping timeout: 240 seconds]
RougeR has quit [Ping timeout: 256 seconds]
Cyrus has joined #ruby
jaruga has quit [Client Quit]
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
jaruga has joined #ruby
Cyrus is now known as Guest9258
alfiemax has joined #ruby
minimalism has joined #ruby
vutral|kali has quit [Excess Flood]
shinnya has joined #ruby
minimalism has quit [Client Quit]
houhoulis has joined #ruby
goatish has quit [Quit: Hibernating]
sidx64 has joined #ruby
jordanm has quit [Ping timeout: 240 seconds]
sidx64 has quit [Client Quit]
jordanm has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
Guest52279 has quit [Ping timeout: 248 seconds]
Psybur__ has quit [Ping timeout: 255 seconds]
amatas__ has quit [Ping timeout: 256 seconds]
sidx64 has joined #ruby
Guest80262 has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
ldnunes has joined #ruby
vutral|kali has quit [Ping timeout: 260 seconds]
cthulchu has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
Guest80262 has quit [Ping timeout: 260 seconds]
<dionysus69>
thanks apeiros, class variable was being cached with ||= assignment, I was using it not to recreate connection object multiple times :)
gary__ has joined #ruby
sidx64 has joined #ruby
synthroid has joined #ruby
jeffreylevesque has quit [Ping timeout: 240 seconds]
cthulchu has quit [Ping timeout: 268 seconds]
houhoulis has quit [Remote host closed the connection]
nowhere_man has joined #ruby
hdb2 has joined #ruby
jaruga has quit [Ping timeout: 240 seconds]
memo1 has joined #ruby
<apeiros>
dionysus69: yay, my psychic tele-debugging capabilities are unmatched ;-D
nowhereman_ has quit [Ping timeout: 256 seconds]
<dionysus69>
xD
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardovich has quit []
gary__ has quit [Ping timeout: 264 seconds]
jaruga has joined #ruby
hdb2 has quit [Ping timeout: 255 seconds]
vutral|kali has quit [Ping timeout: 255 seconds]
amatas_ has joined #ruby
gary__ has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
goatish has joined #ruby
cthulchu has joined #ruby
vutral|kali has quit [Excess Flood]
<dminuoso>
Stupid arel :(
<dminuoso>
I hate you
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
amatas__ has joined #ruby
SuperL4g has joined #ruby
amatas_ has quit [Ping timeout: 240 seconds]
desperek has joined #ruby
SuperLag has quit [Ping timeout: 256 seconds]
rwb has quit [Ping timeout: 256 seconds]
cthulchu has quit [Ping timeout: 240 seconds]
amatas__ has quit [Quit: amatas__]
mcr1 has quit [Ping timeout: 276 seconds]
cabotto has joined #ruby
ta_ has joined #ruby
vondruch_ has joined #ruby
gary__ has quit [Ping timeout: 240 seconds]
gary has joined #ruby
ta_ has quit [Remote host closed the connection]
gary is now known as Guest94497
ta_ has joined #ruby
vondruch has quit [Ping timeout: 240 seconds]
vondruch_ is now known as vondruch
willmichael has quit [Ping timeout: 256 seconds]
willmichael has joined #ruby
bijan_ is now known as bijan_awaaaay
willmichael has quit [Read error: Connection reset by peer]
andikr has quit [Remote host closed the connection]
minimalism has joined #ruby
<tbuehlmann>
`attr_reader :special` defines the getter for instance variables (for instances), whereas you're defining @special as a class instance variable (for the class)
Guest94497 has quit [Ping timeout: 255 seconds]
gary_ has joined #ruby
gary_ is now known as Guest26555
ecuanaso has joined #ruby
<ziso>
tbuehlmann: Right, so there's no instance of a module, unless you use it as a mixin, correct?
Papierkorb has joined #ruby
cdg has joined #ruby
<tbuehlmann>
in this case defining instance variables only makes sense when including/extending the module, right
<dionysus69>
and param needs to be constructed depending on what the method name is
<dionysus69>
with a custructor method, which takes a method name as a param
<dionysus69>
so I want to something like this Class.method_name(param(method_name_as_variable))
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
Mike11 has joined #ruby
Junaos has joined #ruby
<rabajaj>
hey, i am new to ruby. having issues understanding symbols! i understood that they are unique and always have the same object_id but not clear with where to use it and why to use it.
hdb2 has joined #ruby
<rabajaj>
can they store some value like a variable?
gary__ has quit [Ping timeout: 260 seconds]
<rabajaj>
any links or articles related to this will be a great help :)
<ziso>
apeiros: Thanks! that works. Is there a name for that pattern I can research further?
shinnya has quit [Ping timeout: 240 seconds]
Tempesta has quit [Ping timeout: 248 seconds]
cthulchu has quit [Ping timeout: 256 seconds]
EnderMB has joined #ruby
jcalla has joined #ruby
gary__ has joined #ruby
bijan_awaaaay is now known as bijan_
Psybur_ has joined #ruby
Tempesta has joined #ruby
xfbs has joined #ruby
devil_tux has quit [Ping timeout: 255 seconds]
hdb2 has quit [Quit: leaving]
dionysus69 has quit [Ping timeout: 248 seconds]
memo1 has quit [Ping timeout: 264 seconds]
Psybur has quit [Ping timeout: 268 seconds]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rwb has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
vutral|kali has quit [Ping timeout: 260 seconds]
amatas_ has quit [Ping timeout: 248 seconds]
<Bish>
rabajaj: symbols don't differ in any way from immutable strings EXCEPT the object_id stays static
<Bish>
they're mostly used to have quick acccess in hashes
<Bish>
and ofcourse their type is different
<rabajaj>
Bish, i have been it being passed to the a method as a parameter, if it is passed what will it do ?
mtkd has quit [Ping timeout: 240 seconds]
<rabajaj>
s/been/seen
<Bish>
it will be the same thing inside the method, ofcourse
<Bish>
as i said, only thing that differs, is that they're immutable/have always the same object_>d
<Bish>
(and type)
jeffreylevesque has joined #ruby
mtkd has joined #ruby
<Bish>
the only benefits you have is speed & abstraction
ecuanaso has joined #ruby
<rabajaj>
Bish, can they be used as a method name ?
adlerdias has left #ruby [#ruby]
<Bish>
if you create a method they are already a symbol.. in the set of methods of current object
<rabajaj>
so you mena i can call a method by using its symbol ?
<Bish>
i took the + method of the number 1, and called it with the parameter 1
<Bish>
you can always access the methods of an object with
<Bish>
Object.method(:methodNameAsASymbol)
<rabajaj>
ah!
<Bish>
you can't have symbols (using the literal) that begin with 1
<Bish>
the reason is that, you can't have methods beginning with a number
<Bish>
>> def 1method;end;
<ruby[bot]>
Bish: # => /tmp/execpad-ffba1356f94d/source-ffba1356f94d:2: syntax error, unexpected tINTEGER ...check link for more (https://eval.in/960336)
<Bish>
>> :1illegalsymbol
<ruby[bot]>
Bish: # => /tmp/execpad-e95689d74b6c/source-e95689d74b6c:2: syntax error, unexpected tINTEGER, expecting tSTRIN ...check link for more (https://eval.in/960337)
<rabajaj>
oh
<Bish>
(you can craft symbols that begin with numbers, but then you must know what you're doing
<rabajaj>
ohkay, is a chance that i want to print hello world in a def and then want to call that method using symbol ?
<rabajaj>
is there a chance*
<Bish>
sure, just the way i did it
<rabajaj>
ohkay, let me try it.
<Bish>
you can even use symbols to create methods
Psybur_ is now known as Psybur
<Bish>
that way you can do really nice metaprogramming
Psybur has quit [Changing host]
Psybur has joined #ruby
spiette has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
<Bish>
for example.. you could write a JSON parser, that parses '{"hello":"world"}' that then dynamicially gets the method "hello" which returns "world"
<rabajaj>
Bish, thanks. i just got cleared with the whole symbols thing!
<Bish>
:) that makes me happy
DLSteve has joined #ruby
vutral|kali has quit [Ping timeout: 248 seconds]
apeiros_ has joined #ruby
gary__ has quit [Ping timeout: 268 seconds]
alex`` has quit [Quit: WeeChat 2.0.1]
mozzarella has joined #ruby
bijan_ has quit [Quit: System has gone to sleep. ZZZzzz…]
RougeR has quit [Ping timeout: 240 seconds]
krawchyk has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
gregf_ has quit [Ping timeout: 260 seconds]
alex`` has joined #ruby
gary has joined #ruby
vutral|kali has quit [Excess Flood]
gary is now known as Guest3502
willmichael has quit [Ping timeout: 276 seconds]
devil_tux has joined #ruby
cthulchu has joined #ruby
<apeiros_>
>> define_method(:"1") do "I'm the one!" end; send(:"1")
<Mike11>
if I have a function that has this signature:
<Mike11>
how can I call it?
<Mike11>
def pass_var_to_block(var, &block)
<Mike11>
I am just looking for the right syntax to call it
<apeiros>
pass_var_to_block(123) do …your block… end
<apeiros>
Mike11: also it's method, not function ;-)
<Mike11>
apeiros: aha, thanks. btw what is the difference between a method and a function?
<apeiros>
alternatively, if you have a Proc instance, or anything which responds to to_proc in a variable named 'your_proc_instance': pass_var_to_block(123, &your_proc_instance)
<apeiros>
there's no formal definition. but commonly methods are attached to objects and are aware of a "self" (or "this" in some languages), whereas functions are not attached to an object and are "pure", i.e. get all their input from params and all their output is the return value
lxsameer has joined #ruby
Guest34280 has quit [Ping timeout: 268 seconds]
<Mike11>
apeiros: I get that, thank you very much :D
<apeiros>
the self/this being the main differentiator. there are plenty of languages which have functions which can access/manipulate global state, or which can mutate the passed arguments (those things are called "side effects")
<Mike11>
and if my example was a method defined globally, it would be a method too, since this makes it associated with the ruby Object class
<Mike11>
apeiros: is that right? ^^
<apeiros>
actually with main, which is an instance of Object and slightly special. but yes, it still has a self.
<cpruitt>
Mike11: I could be wrong about the details but there are also some subtleties in ruby that won't make much difference to you now but may later be beneficial. Your method is never "called" directly. Instead a "message" is sent to the object the method is associated with telling it to execute the method. In most cases you'll never notice, but it's worth noting that you can send the message yourself using someobj.send(:method_name).
chouhoulis has joined #ruby
<cpruitt>
(That's regarding the function vs method question)
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
<Mike11>
cpruitt: I am actually interested in these subtleties whether they are beneficial for me now or not :)
<Mike11>
but I am still boggling at apeiros's last example :p
<cpruitt>
Mike11: I assumed so which is why I mentioned it. :-) I just wouldn't recommend getting too hung up on them. In most cases they don't have any tangible impact on your code.
Cavallari has quit [Quit: Cavallari]
<apeiros>
cpruitt: you should do the example with public_send
alex`` has joined #ruby
<apeiros>
using send directly is a bad habit and shouldn't be started with :)
alex`` is now known as alexherbo2
<apeiros>
Mike11: my code simply queries the toplevel self for whether it is the "Object class" object (false), and whether it is an instance of Object (true)
<Mike11>
I am guessing public_send causes the object to call a public method, while send causes it to call any method, right?
<apeiros>
yes. send can bypass private/protected
morenoh149 has quit [Ping timeout: 252 seconds]
alexherbo2 is now known as alex``
<cpruitt>
apeiros: Unfortunately it's a bad habit that plagues my own code so I'd feel better if more people made the mistake. (j/k) Mike11, use #public_send. lol
<apeiros>
public_send otoh does not. it'll behave the same as if you called it literally.
<apeiros>
cpruitt: :-p
<apeiros>
cpruitt: global search and replace :-D
<apeiros>
s/\bsend\b/public_send/
ta_ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
gary__ has joined #ruby
safetypin has joined #ruby
<Mike11>
apeiros: I can understand the "is an instance of" relationship, but not the "whethere it is the "Object class" object
<Mike11>
certainly self is not a Class object, right?
<apeiros>
classes are objects in ruby. they follow mostly the same rules as other objects.
n0m4d1c has joined #ruby
<apeiros>
the differences being class and module specific behaviors, like being able to serve as a namespace (module behavior), and being able to be inherited from and instantiated (class behaviors)
<cpruitt>
Mike11: In Ruby *everything* is an object so everything is an instance of something. What you probably think of as a "class definition" creates a constant. The value of that constant is an instance of a Class object. (or something along those lines)
tcopeland has joined #ruby
<Mike11>
isn't that somehow similar to Java's java.lang.Class?
* apeiros
inserts an "almost" in front of the *everything*
<cpruitt>
apeiros: What isn't?
chouhoul_ has joined #ruby
<dminuoso>
cpruitt: blocks.
<dminuoso>
cpruitt: constants
<dminuoso>
cpruitt: variables
exchgr has quit [Ping timeout: 264 seconds]
<dminuoso>
cpruitt: methods are not objects either
<cpruitt>
dminuoso: I thought methods were instances of Method ?
Rapture has joined #ruby
k0mpa has quit [Remote host closed the connection]
jamiejackson has joined #ruby
<cpruitt>
Blocks I'd agree with. Constants & variables... I'm not sure how you'd address them in and of themselves. They're elements of source code but not really "things". They just reference something.
<apeiros>
cpruitt: code isn't. variables aren't. blocks aren't. methods aren't (but you can create objects from the latter too)
<apeiros>
well, dminuoso already up for the task. got to go :D
chouhoulis has quit [Ping timeout: 256 seconds]
<Mike11>
apeiros: I am sorry I was still staring at your last example :p
<Mike11>
class Foo; p self.equal?(Foo); end
<Mike11>
what is the semi-colon here called? I googled ruby semi-colon operator and I couldn't find any results
<cpruitt>
Mike11: It terminates a statement, same as C or JS
<cpruitt>
Those are three statements on one line.
<Mike11>
I was barking the wrong tree I guess
n0m4d1c has quit [Read error: Connection reset by peer]
<Mike11>
so any line of code that is executed inside the "definition" of a class, has the self pointing to a Class object, right?
n0m4d1c has joined #ruby
<cpruitt>
Define "inside the definition"?
<Mike11>
mm, well, what is that called then?
<Mike11>
class Foo; p self.equal?(Foo); end
<apeiros>
in the class body, yes
<apeiros>
and yes, the ; are just like newlines. convenient to write multiple lines in one.
<Bish>
apeiros: i just asked mysself if that's possible
<Bish>
why the fuck is it
<Mike11>
thank you guys very much, I can understand a bit more now :) sorry for my noob questions :D
<Bish>
cpruitt: are blocks objects?
* Bish
runs
* apeiros
gtg, cya
ramfjord has joined #ruby
snath has quit [Ping timeout: 256 seconds]
tcopeland has quit [Quit: tcopeland]
sumobob has joined #ruby
tcopeland has joined #ruby
<dminuoso>
cpruitt: methods are not. you can reify a method, but natively they are not objects
<dminuoso>
just like blocks are not objects, even though you can reify them with Proc
vutral|kali has quit [Ping timeout: 276 seconds]
apeiros has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 256 seconds]
<cpruitt>
dminuoso: Was just googling and found the same thing. Blocks I'd read about in the past (though forgot till now) but not methods. I always understood them to be object instances so thanks for the clarification. :-)
riotjoe has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
sumobob has quit [Ping timeout: 256 seconds]
riotjones has quit [Ping timeout: 240 seconds]
gary__ has quit [Ping timeout: 260 seconds]
soniya29 has joined #ruby
n0m4d1c has quit [Remote host closed the connection]
gary has joined #ruby
gary is now known as Guest85397
soniya29 has quit [Remote host closed the connection]
chouhoul_ has quit [Remote host closed the connection]
chouhoulis has joined #ruby
soniya29 has joined #ruby
krawchyk has quit [Quit: krawchyk]
andygeorge has joined #ruby
soniya29_ has joined #ruby
soniya29__ has joined #ruby
sumobob has joined #ruby
soniya29__ has quit [Remote host closed the connection]
soniya29__ has joined #ruby
Guest85397 has quit [Ping timeout: 255 seconds]
gary_ has joined #ruby
vutral|kali has quit [Ping timeout: 256 seconds]
gary_ is now known as Guest69392
soniya29 has quit [Ping timeout: 256 seconds]
soniya29__ has quit [Remote host closed the connection]
soniya29 has joined #ruby
rippa has joined #ruby
soniya29_ has quit [Ping timeout: 268 seconds]
soniya29 has quit [Remote host closed the connection]
kapil___ has joined #ruby
soniya29 has joined #ruby
soniya29 has quit [Remote host closed the connection]
NightMonkey has joined #ruby
soniya29 has joined #ruby
soniya29_ has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apparition has quit [Quit: Bye]
soniya29_ has quit [Remote host closed the connection]
soniya29 has quit [Remote host closed the connection]
xfbs has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
Guest69392 has quit [Ping timeout: 268 seconds]
xfbs has quit [Client Quit]
s2013 has joined #ruby
gary__ has joined #ruby
troys has joined #ruby
devil_tux has quit [Ping timeout: 265 seconds]
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
devil_tux has joined #ruby
vondruch has quit [Remote host closed the connection]
tomphp has joined #ruby
mtkd has quit []
devil_tu1 has joined #ruby
conta has quit [Ping timeout: 265 seconds]
vondruch has joined #ruby
maxyz_ has joined #ruby
jamiejackson has quit [Ping timeout: 240 seconds]
yohji has quit [Ping timeout: 248 seconds]
dinfuehr has quit [Ping timeout: 240 seconds]
dinfuehr has joined #ruby
brodul has quit [Quit: My hovercraft is full of eels!!]
dionysus69 has joined #ruby
dviola has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
brodul has joined #ruby
gary__ has quit [Remote host closed the connection]
bmurt has joined #ruby
mtkd has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maxyz_ has quit [Ping timeout: 260 seconds]
krawchyk has joined #ruby
gary__ has joined #ruby
tomphp has joined #ruby
cabotto has quit [Remote host closed the connection]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
yohji has joined #ruby
synthroid has quit [Remote host closed the connection]
tcopeland has quit [Quit: tcopeland]
SirOliver has joined #ruby
tcopeland has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gary__ has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
gary has joined #ruby
gary is now known as Guest54135
seal_ has joined #ruby
<seal_>
hi
<seal_>
What's better Django or Ror?
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Bish>
seal_: there is no better and they're both pretty old already
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rubycoder38>
Bish: thanks
<rubycoder38>
I'll use net/http
X-Jester has joined #ruby
<rsilor>
Book 'machifrom scratch
<X-Jester>
if you were trying to map a trigger to particular code path, say receiving the text "hello", how stupid is it to store a collection of triggers to procs as opposed to trying to do a method callback?
seal_ has left #ruby [#ruby]
<rsilor>
Ehem.. what I meant to ask was: have any of you worked through Grusman's text 'data science from scratch', you
<rsilor>
But adapted his python examples to Ruby
gary__ has quit [Ping timeout: 256 seconds]
<rsilor>
I'd like to attempt that, thought I would ask if anyone else had attempted it. Thx
ogres has joined #ruby
rrutkowski has quit [Client Quit]
rrutkowski has joined #ruby
Mike11 has quit [Quit: Leaving.]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
snath has joined #ruby
raynold has joined #ruby
cabotto has quit [Remote host closed the connection]
dyyylan has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
cabotto has joined #ruby
claudiuinberlin has quit [Read error: Connection reset by peer]
n0m4d1c has joined #ruby
tvw has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
cdg has quit [Ping timeout: 276 seconds]
cagomez has joined #ruby
yohji has quit [Ping timeout: 264 seconds]
rrutkowski has quit [Remote host closed the connection]
rrutkowski has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cthulchu has joined #ruby
dinfuehr has quit [Ping timeout: 248 seconds]
s2013 has joined #ruby
riotjoe has quit [Remote host closed the connection]
marr has quit [Ping timeout: 260 seconds]
riotjones has joined #ruby
aupadhye has quit [Ping timeout: 256 seconds]
aufi has quit [Quit: Leaving]
tomphp has joined #ruby
tomphp has quit [Client Quit]
bmurt has joined #ruby
infernix has joined #ruby
riotjones has quit [Ping timeout: 256 seconds]
yohji has joined #ruby
apricant_ has joined #ruby
SirOliver has quit [Quit: ZZZzzz…]
Serpent7776 has quit [Quit: Leaving]
n0m4d1c has quit [Remote host closed the connection]
guille-moe has quit [Ping timeout: 256 seconds]
Silthias has joined #ruby
gary has joined #ruby
gary is now known as Guest3607
SirOliver has joined #ruby
rsilor has quit [Quit: Page closed]
guacamole has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
Silthias1 has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
darkhanb has joined #ruby
Silthias has quit [Ping timeout: 255 seconds]
<garyserj>
I've heard that perl has equivalents to rails, and that perl is faster than ruby. what advantages(if any), does Ruby have over Perl?
Guest3607 has quit [Ping timeout: 256 seconds]
<havenwood>
garyserj: Are you talking about Perl 5 or Perl 6?
<dminuoso>
lvmbdv: It's heading into 3x3
<garyserj>
havenwood: either
<dminuoso>
X-Jester: not at all.
<dminuoso>
X-Jester: a proc is just a reified block
<dminuoso>
X-Jester: and rubyists really have no problem passing blocks absolutely everywhere
<dminuoso>
So you might as well reify them and make it easier to use.
tomphp has joined #ruby
<havenwood>
garyserj: There's a lot of performance work going on in Ruby right now so it's probably a good bet.
karapetyan has quit [Remote host closed the connection]
<garyserj>
havenwood: I've used rails just to learn rails.
<garyserj>
for what it's for.. writing a website particularly one involving CRUD operations.
rrutkowski_ has quit [Remote host closed the connection]
<havenwood>
garyserj: Rails is quite nice for sane conventions around a CRUD website. Sounds like a good choice.
<garyserj>
havenwood: but ruby performing faster than before isn't an advantage over perl though
<garyserj>
which is what i'm asking about
<havenwood>
garyserj: I was just addressing the "perl is faster than ruby" comment, which I don't think is particularly true anymore.
EnderMB has quit [Quit: Page closed]
cdg has joined #ruby
<havenwood>
garyserj: As far as reasons why to use Rails versus [Perl framework here], you might want to ask in the #RubyOnRails channel.
sanscoeur has joined #ruby
<havenwood>
garyserj: There's a huge community of smart people working on Rails and they tend to lead. Lots of languages have nicely copied Sinatra and Rails.
<havenwood>
garyserj: Ruby is closer to Perl 6 in terms of beauty of the language, in my opinion.
<havenwood>
garyserj: In Ruby you'll find battle tested HTTP 1.1 tooling. In Perl 6 there's a lot more room to create tools that others might adopt.
vutral|kali has quit [Ping timeout: 276 seconds]
eckhardt has joined #ruby
eckhardt has quit [Client Quit]
clemens3 has joined #ruby
eckhardt has joined #ruby
eckhardt has quit [Client Quit]
<garyserj>
so perl's version of sinatra might be less battle tested?
<havenwood>
garyserj: It looks like Dancer is a Sinatra-esque Perl 5 framework.
<havenwood>
garyserj: I'd vote Roda between those. ;-)
<havenwood>
You compose the framework you need with Roda by just enabling relevant plugins.
nfsnobody has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
<havenwood>
Speaking of which... would four people here please star Roda on Github!! A fork with fewer than 1,000 stars doesn't get properly indexed on Github. >.>
<havenwood>
garyserj: It's just a routing tree, and you add the plugins you actually need to compose the framework for your project.
<havenwood>
garyserj: (There's a #roda channel for Roda and #sinatra for Sinatra as well.)
<havenwood>
They're both very well maintained.
Psybur_ has joined #ruby
<tbuehlmann>
havenwood: have my star!
guille-moe has joined #ruby
larissa has quit [Quit: bye]
Guest74681 has quit [Ping timeout: 248 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Psybur has quit [Ping timeout: 276 seconds]
cabotto has quit [Remote host closed the connection]
<dminuoso>
havenwood: but
yohji has quit [Remote host closed the connection]
<dminuoso>
havenwood: that required like
<dminuoso>
writing code.
dinfuehr has joined #ruby
anisha_ has quit [Quit: This computer has gone to sleep]
kies has quit [Ping timeout: 252 seconds]
<havenwood>
dminuoso: That does often seem to be the choice, spend time 1) debugging the *just works* automagical code, or 2) writing code.
<dminuoso>
havenwood: By debugging you mean posting in IRC and Stackoverflow until someone tells you how to fix it right?
n0m4d1c has quit [Remote host closed the connection]
<havenwood>
dminuoso: Yes. Ask in IRC every 30 minutes but disconnect immediately after asking and never read backlogs.
<dminuoso>
Anyway. After 2 days of debugging a bug that caused my Automaton to produce garbage result...
<dminuoso>
I finally nailed it to.. guess what - an off-by-one error in the one function I thought "I dont need a test for this, I formally proved correctness in my head"
char_var[buffer] has joined #ruby
n0m4d1c has joined #ruby
n0m4d1c has quit [Remote host closed the connection]
willmichael has joined #ruby
sumobob has quit [Read error: Connection reset by peer]
vutral|kali_ has joined #ruby
vutral|kali has quit [Ping timeout: 240 seconds]
karapetyan has quit [Remote host closed the connection]
clemens3 has quit [Ping timeout: 255 seconds]
larissa has joined #ruby
armyriad has joined #ruby
moei has joined #ruby
vutral|kali_ has quit [Ping timeout: 255 seconds]
sumobob_ has joined #ruby
anisha_ has joined #ruby
alex`` has quit [Quit: WeeChat 2.0.1]
alex`` has joined #ruby
beauby has quit [Ping timeout: 248 seconds]
n0m4d1c has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
beauby has joined #ruby
mikecmpbll has joined #ruby
ramfjord has joined #ruby
n0m4d1c has quit [Remote host closed the connection]
gary has joined #ruby
n0m4d1c has joined #ruby
gary is now known as Guest2704
marxarelli|afk is now known as marxarelli
bigblind has quit [Ping timeout: 256 seconds]
n0m4d1c has quit [Remote host closed the connection]
lytol has joined #ruby
karapetyan has joined #ruby
beauby has quit [Ping timeout: 276 seconds]
devil_tux has quit [Ping timeout: 256 seconds]
alfiemax has quit [Read error: Connection reset by peer]
anisha_ has quit [Quit: Leaving]
sol__ has joined #ruby
alfiemax has joined #ruby
Guest2704 has quit [Ping timeout: 255 seconds]
devil_tux has joined #ruby
cabotto has joined #ruby
karapetyan has quit [Ping timeout: 276 seconds]
clemens3 has joined #ruby
sol__ has left #ruby [#ruby]
anisha has joined #ruby
anisha has quit [Remote host closed the connection]
alfiemax_ has joined #ruby
cabotto has quit [Ping timeout: 240 seconds]
n008f4g_ has joined #ruby
n0m4d1c has joined #ruby
cabotto has joined #ruby
rocx has quit [Ping timeout: 252 seconds]
alfiemax has quit [Ping timeout: 256 seconds]
n0m4d1c has quit [Remote host closed the connection]
vutral|kali_ has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
vutral|kali_ has quit [Read error: Connection reset by peer]
vutral|kali has quit [Ping timeout: 264 seconds]
jamesaxl has joined #ruby
netherwolfe has joined #ruby
Nicmavr has joined #ruby
rocx has joined #ruby
Nicmavr is now known as Guest32855
tomphp has joined #ruby
cabotto has quit [Ping timeout: 256 seconds]
n0m4d1c has joined #ruby
mcr1 has joined #ruby
cabotto has joined #ruby
karapetyan has joined #ruby
roshanavand has joined #ruby
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
kies has joined #ruby
karapetyan has quit [Ping timeout: 252 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #ruby
cagomez has quit [Remote host closed the connection]
bmurt has joined #ruby
cagomez has joined #ruby
willmichael has quit [Read error: Connection reset by peer]
willmichael has joined #ruby
cabotto has quit [Ping timeout: 276 seconds]
vutral|kali has quit [Ping timeout: 256 seconds]
cabotto has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
vutral|kali has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apeiros has joined #ruby
gary_ has joined #ruby
gary_ is now known as Guest82994
bigblind has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
morenoh149 has quit [Ping timeout: 260 seconds]
Guest82994 has quit [Ping timeout: 256 seconds]
cabotto has quit [Remote host closed the connection]
n0m4d1c has quit [Remote host closed the connection]
mtkd has quit []
cabotto has joined #ruby
cabotto has quit [Client Quit]
cdg has quit [Remote host closed the connection]
krawchyk has quit [Quit: krawchyk]
tomphp has joined #ruby
mtkd has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jaruga has quit [Quit: jaruga]
ldepandis has joined #ruby
SeepingN has joined #ruby
buyfn has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
cagomez has quit [Remote host closed the connection]
krawchyk has joined #ruby
cthulchu has quit [Read error: Connection reset by peer]
LocaMocha has quit [Ping timeout: 256 seconds]
workmad3 has quit [Ping timeout: 248 seconds]
Asher has quit [Quit: Leaving.]
n0m4d1c has joined #ruby
Asher has joined #ruby
\void has joined #ruby
workmad3 has joined #ruby
krawchyk has quit [Quit: krawchyk]
morenoh149 has joined #ruby
dyyylan has joined #ruby
n0m4d1c has quit [Remote host closed the connection]
vutral|kali has quit [Ping timeout: 252 seconds]
vutral|kali has joined #ruby
vutral|kali has joined #ruby
vutral|kali has quit [Changing host]
gary has joined #ruby
theSolTrain has joined #ruby
gary is now known as Guest29956
morenoh149 has quit [Ping timeout: 256 seconds]
alfiemax_ has quit [Remote host closed the connection]
buyfn has quit [Remote host closed the connection]
buyfn has joined #ruby
alfiemax has joined #ruby
Guest29956 has quit [Ping timeout: 240 seconds]
theSolTrain has quit [Ping timeout: 248 seconds]
cthulchu has joined #ruby
devil_tux has quit [Ping timeout: 240 seconds]
devil_tu1 has quit [Ping timeout: 256 seconds]
guille-moe has quit [Ping timeout: 265 seconds]
alfiemax has quit [Ping timeout: 240 seconds]
nowhereman_ has quit [Ping timeout: 256 seconds]
pastorinni has quit [Ping timeout: 248 seconds]
nadir has joined #ruby
nowhere_man has joined #ruby
<dminuoso>
Folks, do you consider integers real objects?
<dminuoso>
>> 1.singleton_class
<ruby[bot]>
dminuoso: # => can't define singleton (TypeError) ...check link for more (https://eval.in/960482)
ecuanaso has joined #ruby
<dminuoso>
Guess it boils down to what one means by "is it an object"
Pisuke has quit [Read error: Connection reset by peer]
morenoh149 has joined #ruby
Pisuke has joined #ruby
cpruitt has quit []
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ruby[bot]>
Radar: I don't know anything about next
<dminuoso>
Hah
<Radar>
ruby[bot]: I don't even know why I bother.
<prutheus>
oh yeah i forget the map function so often :/
<dminuoso>
prutheus: Whenever you want to interact with the elements inside, you use `map`
<Radar>
prutheus: it's a loop, technically
karapetyan has joined #ruby
<dminuoso>
prutheus: `map` basically takes a function, and applies it to every element inside the list, and returns the new list.
<prutheus>
yeah but not like i meant it
<prutheus>
i know
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rwb has joined #ruby
prutheus has quit [Quit: Page closed]
snath has quit [Ping timeout: 256 seconds]
goatish has joined #ruby
karapetyan has quit [Ping timeout: 265 seconds]
devil_tux has joined #ruby
devil_tu1 has joined #ruby
gary has joined #ruby
gary is now known as Guest58107
beauby has joined #ruby
<havenwood>
Just an aside, but funny non-map solution taking advantage of zip's weird block form: result = []; a.zip(b) { |a, b| result << a + b }; result
Asher has quit [Quit: Leaving.]
<dminuoso>
What?
<dminuoso>
havenwood: HOnestly, when I started reading I kind of expected some lazy enum answer.
<dminuoso>
Was a bit disappointed.
<havenwood>
dminuoso: i'd have provided one if #zip wasn't so odd
<dminuoso>
cagomez: Do you mean a curried function that will eventually produce an object?
<dminuoso>
NO.
<dminuoso>
Currying is a good thing. The fact that Ruby makes it kind of hard and annoying is a sad fact.
<dminuoso>
I generally curry all my lambdas.
<cagomez>
scratch that ^. I have a class with keyword arguments, and need to add another argument. is there a way to add the new arg without it also being required?
<dminuoso>
cagomez: Ruby allows you to define optional parameters.
agent_white has quit [Ping timeout: 265 seconds]
\void has quit [Quit: So long, and thanks for all the fish.]
moei has quit [Quit: Leaving...]
sunrunner20 has quit [Quit: So Long and Thanks for All the fish]
alfiemax has joined #ruby
Psybur__ has joined #ruby
mitt3ns has quit [Ping timeout: 252 seconds]
morenoh149 has joined #ruby
jnollette has quit [Ping timeout: 255 seconds]
alfiemax has quit [Ping timeout: 256 seconds]
Psybur_ has quit [Ping timeout: 264 seconds]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
bijan_ has quit [Quit: System has gone to sleep. ZZZzzz…]