havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Can't talk? Register/identify with Nickserv first! || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
hahuang65 has joined #ruby
<beauby> I may have misunderstood but it seemed from the above discussion that I didn't have much of a choice for the try since `constants.includes?` won't play nice with autoloading
_orangejuice has quit [Quit: Connection closed for inactivity]
failshell has quit [Ping timeout: 246 seconds]
leat1 has quit [Ping timeout: 256 seconds]
solocshaw has joined #ruby
vF3hNGxc47h8 has quit [Ping timeout: 256 seconds]
RazorX has quit [Remote host closed the connection]
leat1 has joined #ruby
<Ox0dea> beauby: Having #lookup_chain return actual classes rather than strings a la Module#nesting would be an improvement.
inteq has quit [Quit: Leaving]
da3mian has quit [Quit: Textual IRC Client: www.textualapp.com]
<Ox0dea> From there, you'd probably be able to define #lookup in terms of #reduce and #const_get, which would be more performant than starting from the top each time through.
RazorX has joined #ruby
<Ox0dea> Also, check that your rescuing Exception hasn't resulted in the smiting of any nearby creatures.
<Ox0dea> #const_get can only ever raise NameError, I'd imagine.
mleung has quit [Quit: mleung]
vikaton has joined #ruby
RazorX has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mclee_ has joined #ruby
RazorX has joined #ruby
zapho53 has joined #ruby
zapho53 has left #ruby [#ruby]
<beauby> Ox0dea: Cool, thanks for the suggestions!
<drbrain> it can raise LoadError
<drbrain> when an autoload file is missing
jokke has quit [Disconnected by services]
jokke has joined #ruby
webguynow has quit [Ping timeout: 260 seconds]
webguynow has joined #ruby
<beauby> Ox0dea: In order to map the strings to constants I still have to use Kernel.const_get, or is there another way?
<beauby> drbrain: Oh right, good to know
jokke has quit [Disconnected by services]
EllisTAA has quit [Quit: EllisTAA]
jokke- has joined #ruby
<Ox0dea> beauby: You've got easy access to the class/module from which you want to start searching, no?
charliesome has joined #ruby
<beauby> Ox0dea: I do
workmad3 has joined #ruby
peterhu has quit [Ping timeout: 250 seconds]
sgambino has joined #ruby
pwnd_nfsw has joined #ruby
solocshaw has quit [Ping timeout: 246 seconds]
sufyan`` has joined #ruby
tejasmanohar has joined #ruby
amclain_ has joined #ruby
matled- has joined #ruby
cvtsx1 has joined #ruby
staticat_works has quit [Quit: Leaving]
dravine_ has joined #ruby
_derpy has joined #ruby
Pisuke has joined #ruby
sdwrage_ has joined #ruby
mkosaki_ has joined #ruby
opensource_ninj1 has joined #ruby
<beauby> Ox0dea: How about https://gist.github.com/beauby/f8ddb8b99228ad131a2d (comment)?
workmad3 has quit [Ping timeout: 240 seconds]
<beauby> (it uses ActiveSupport's constantize)
sepp2k1 has joined #ruby
eregon_ has joined #ruby
ghoti_ has joined #ruby
<beauby> which probably is totally unnecessary actually
HashNuke_ has joined #ruby
colstrom_ has joined #ruby
prosody_ has joined #ruby
nizmow- has joined #ruby
jxie has joined #ruby
ipstatic_ has joined #ruby
Fraeon has joined #ruby
scpike_ has joined #ruby
petersaints_ has joined #ruby
izzol_ has joined #ruby
sonne_ has joined #ruby
totimkop1 has joined #ruby
shortdudey123_ has joined #ruby
bier_ has joined #ruby
MyMind has quit [Read error: Connection reset by peer]
amclain has quit [Read error: Connection reset by peer]
cvtsx has quit [Read error: Connection reset by peer]
dravine has quit [Read error: Connection reset by peer]
mkosaki has quit [Read error: Connection reset by peer]
prosody has quit [Ping timeout: 268 seconds]
alexUaN has quit [Remote host closed the connection]
colstrom has quit [Ping timeout: 268 seconds]
A124 has joined #ruby
<Ox0dea> beauby: Ah, sorry; forgot you're trying to do it the other way round. Building the array to search with ActiveSupport's Module#parent seems the way to go.
A124 has joined #ruby
jxie_ has quit [Quit: No Ping reply in 180 seconds.]
A124 has quit [Ping timeout: 268 seconds]
M-Kodo has quit [Ping timeout: 268 seconds]
ghoti has quit [Read error: Connection reset by peer]
scpike has quit [Ping timeout: 268 seconds]
farn has quit [Ping timeout: 268 seconds]
totimkopf has quit [Ping timeout: 268 seconds]
izzol has quit [Ping timeout: 268 seconds]
papercode has quit [Ping timeout: 268 seconds]
dravine_ is now known as dravine
A124 has quit [Changing host]
sufyan` has quit [Read error: Connection reset by peer]
matled has quit [Remote host closed the connection]
sepp2k has quit [Read error: Connection reset by peer]
sdwrage has quit [Read error: Connection reset by peer]
meatherly has quit [Read error: Connection reset by peer]
opensource_ninja has quit [Remote host closed the connection]
`derpy has quit [Ping timeout: 264 seconds]
bier has quit [Ping timeout: 264 seconds]
sonne has quit [Ping timeout: 264 seconds]
HashNuke has quit [Ping timeout: 264 seconds]
eregon has quit [Quit: No Ping reply in 180 seconds.]
eggoez has quit [Ping timeout: 264 seconds]
petersaints has quit [Ping timeout: 264 seconds]
jeadre has quit [Ping timeout: 264 seconds]
nizmow has quit [Ping timeout: 264 seconds]
ipstatic has quit [Ping timeout: 264 seconds]
michael_mbp has quit [Quit: ZNC - http://znc.sourceforge.net]
pocketprotector has quit [Ping timeout: 264 seconds]
mhenrixon has quit [Ping timeout: 264 seconds]
Freijo has quit [Ping timeout: 264 seconds]
__main__ has quit [Ping timeout: 264 seconds]
shortdudey123 has quit [Ping timeout: 264 seconds]
jidar has quit [Ping timeout: 264 seconds]
t3rm has quit [Quit: Textual IRC Client: www.textualapp.com]
mhenrixon_ has joined #ruby
matled- is now known as matled
jidar_ has joined #ruby
pocketpr1 has joined #ruby
farn has joined #ruby
petersaints_ is now known as petersaints
colstrom_ is now known as colstrom
<Ox0dea> That's fair.
__main__ has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
symm- has quit [Ping timeout: 256 seconds]
pocketpr1 is now known as pocketprotector
shortdudey123_ is now known as shortdudey123
alexUaN has joined #ruby
Ropeney has joined #ruby
jidar_ has quit [Client Quit]
cyrus_mc has quit [Quit: leaving]
<beauby> Ox0dea: The problem with AS#parent is that there is no class version afaik
drewvanstone has quit [Ping timeout: 272 seconds]
<Ox0dea> beauby: Classes are modules.
pocketprotector has quit [Client Quit]
jidar has joined #ruby
jgt has joined #ruby
pocketprotector has joined #ruby
mordocai has joined #ruby
M-Kodo has joined #ruby
<beauby> Ox0dea: Oh, right. Then I might very well have been looking for #parent all along
<Ox0dea> I think so. :)
cirera has joined #ruby
prosody_ is now known as prosody
HashNuke_ is now known as HashNuke
michael_imac has joined #ruby
radgeRayden has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
northfurr has joined #ruby
solocshaw has joined #ruby
<beauby> Cool, thanks for the help Ox0dea
eggoez has joined #ruby
<beauby> Wait, no, actually parent does not cut it
AccordsLTN has joined #ruby
borkdude_ has joined #ruby
djbkd has joined #ruby
jgt has quit [Ping timeout: 244 seconds]
fantazo has quit [Ping timeout: 246 seconds]
elfuego has quit [Quit: elfuego]
cantaberry has quit [Ping timeout: 256 seconds]
<dorei> is there a way i could smt like attr_reader :delete?
<dorei> ?
David27 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
_MiW has joined #ruby
harryk_ has joined #ruby
DanKnox_ has joined #ruby
cvtsx1 has quit [Max SendQ exceeded]
jgt has joined #ruby
thang_ has joined #ruby
bubuntu has joined #ruby
abyss__ has joined #ruby
hackeron_ has joined #ruby
livcd_ has joined #ruby
zm1 has joined #ruby
Skelz0r_ has joined #ruby
musl_ has joined #ruby
cvtsx1 has joined #ruby
programm1 has joined #ruby
[H]unt3r has joined #ruby
Esya| has joined #ruby
G_ has joined #ruby
marr has quit []
troyreadyy has joined #ruby
hostess_ has joined #ruby
neektza_ has joined #ruby
dede__ has joined #ruby
mhenrixon has joined #ruby
frankS2_ has joined #ruby
uber_ has joined #ruby
pyon is now known as nyon
twistedpixels_ has joined #ruby
jgt has quit [Ping timeout: 250 seconds]
__main__ has quit [*.net *.split]
podman has quit [*.net *.split]
DEac- has quit [*.net *.split]
hostess has quit [*.net *.split]
musl has quit [*.net *.split]
dede has quit [*.net *.split]
moss has quit [*.net *.split]
Nanuq has quit [*.net *.split]
niko has quit [*.net *.split]
AccordLTN has quit [*.net *.split]
LiquidInsect has quit [*.net *.split]
neektza has quit [*.net *.split]
cajone has quit [*.net *.split]
unsymbol has quit [*.net *.split]
an0ma1y has quit [*.net *.split]
G has quit [*.net *.split]
abyss has quit [*.net *.split]
jhass has quit [*.net *.split]
programmerq has quit [*.net *.split]
prasselpikachu has quit [*.net *.split]
DanKnox has quit [*.net *.split]
Skelz0r has quit [*.net *.split]
MiW has quit [*.net *.split]
tobiasvl has quit [*.net *.split]
frankS2 has quit [*.net *.split]
null__ has quit [*.net *.split]
borkdude has quit [*.net *.split]
ddv has quit [*.net *.split]
cookiez has quit [*.net *.split]
cirera has quit [*.net *.split]
mhenrixon_ has quit [*.net *.split]
A124 has quit [*.net *.split]
mclee_ has quit [*.net *.split]
siaw has quit [*.net *.split]
troyready has quit [*.net *.split]
Ox0dea has quit [*.net *.split]
rcvalle has quit [*.net *.split]
Trieste has quit [*.net *.split]
jacky has quit [*.net *.split]
nofxx has quit [*.net *.split]
cball has quit [*.net *.split]
livcd has quit [*.net *.split]
twistedpixels has quit [*.net *.split]
xnr has quit [*.net *.split]
thang has quit [*.net *.split]
Guest13124 has quit [*.net *.split]
uber has quit [*.net *.split]
arian0n has quit [*.net *.split]
cjk101010 has quit [*.net *.split]
bubuntu_ has quit [*.net *.split]
harryk has quit [*.net *.split]
Esya- has quit [*.net *.split]
noodle has quit [*.net *.split]
goncalo has quit [*.net *.split]
hackeron has quit [*.net *.split]
mahlon has quit [*.net *.split]
musicmatze has quit [*.net *.split]
DanKnox_ is now known as DanKnox
prasselpikachu_ has joined #ruby
jhass|off has joined #ruby
jalcine has joined #ruby
tvl has joined #ruby
shmilan has joined #ruby
arian0n has joined #ruby
tvl is now known as tobiasvl
ddv has joined #ruby
veduardo has joined #ruby
jhass|off is now known as jhass
neektza_ is now known as neektza
siaw has joined #ruby
zion__ has joined #ruby
DEac- has joined #ruby
bspar has joined #ruby
LiquidInsect has joined #ruby
mprelude has quit [Ping timeout: 255 seconds]
trbss has joined #ruby
noodle has joined #ruby
<pragmatism> delete is reserved.
mclee_ has joined #ruby
Ox0dea has joined #ruby
xnr has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> beauby: Hm?
musicmatze has joined #ruby
frankS2_ is now known as frankS2
cball has joined #ruby
chouhoulis has joined #ruby
oo_ has joined #ruby
Guest13124 has joined #ruby
bricker has quit [Ping timeout: 250 seconds]
moss has joined #ruby
podman has joined #ruby
Nanuq has joined #ruby
null__ has joined #ruby
__main__ has joined #ruby
niko has joined #ruby
cookiez has joined #ruby
podman has quit [Changing host]
podman has joined #ruby
cjk101010 has joined #ruby
goncalo has joined #ruby
unsymbol has joined #ruby
A124 has joined #ruby
mahlon has joined #ruby
rcvalle has joined #ruby
nofxx has joined #ruby
null__ has quit [Changing host]
null__ has joined #ruby
unsymbol has quit [Changing host]
unsymbol has joined #ruby
Trieste has joined #ruby
A124 is now known as Guest15471
an0ma1y has joined #ruby
ckinniburgh_ has joined #ruby
cajone has joined #ruby
Neverdie has joined #ruby
<dorei> pragmatism: i'm wondering about it ending in '?', is there a way to use attr_reader to define a getter method ending in'?' ?
<Ox0dea> dorei: No, because instance variables can't end with '?'.
<dorei> :(
juanpablo_ has joined #ruby
<Ox0dea> Hasn't this come up before?
zion__ has left #ruby [#ruby]
<Ox0dea> Rolling your own #attr_reader is trivial if you absolutely need this, mind.
<dorei> i'm aware about instance variables , i was just hopping that attr_reader could just use an instance variable without the trailing ?
bspar has left #ruby ["HEEEEEEELP"]
segmond has joined #ruby
<dorei> no way, that would be overengineering :p
dasher00 has quit [Ping timeout: 255 seconds]
bigmac has quit [Ping timeout: 250 seconds]
papercode has joined #ruby
devdazed has quit [Quit: Computer has gone to sleep.]
<Ox0dea> Then you're out of "luck", for some strange definition of the term.
CustosL1men has quit [Max SendQ exceeded]
<eam> >> instance_variable_set '@¿', "you're not the boss of me"
<ruboto> eam # => "you're not the boss of me" (https://eval.in/434062)
<Ox0dea> beauby: That you basically want to "detach" children from the hierarchy is what muddies the water here.
<dorei> spanish questionmark :D
juanpablo_ has quit [Ping timeout: 268 seconds]
<Ox0dea> >> @¿ = 42 # Ruby supports fancy identifiers, eam.
<ruboto> Ox0dea # => 42 (https://eval.in/434064)
CustosL1men has joined #ruby
<dorei> does it support emoji in ivars too? :D
jsaak has quit [Ping timeout: 246 seconds]
<Ox0dea> Yes, of course.
<eam> yeah
<Ox0dea> There are many languages which do so.
<eam> Ox0dea: I guess I didn't need to dance around it
<Ox0dea> Indeed not.
<eam> fun idea I had: put the entire method documentation in the method name
siaw has quit [Quit: siaw]
<eam> that way your method is never out of sync with the docs
<dorei> so, only mysql fucked it up with utf, having different type for 3bytes utf and 4bytes utf
ckinniburgh_ has quit [Ping timeout: 265 seconds]
<Hamled> is there a ruby one liner for something like my_str = ""; if (other_str.empty?) my_str = "prefix" + other_str;
mwlang has quit [Quit: mwlang]
<Hamled> or just the most idiomatic way to do that I guess
siemprefresco has joined #ruby
totimkop1 has left #ruby [#ruby]
<eam> other_str.empty? ? "" : "prefix" + other_str
siaw has joined #ruby
goodcodeguy has joined #ruby
<Ox0dea> Hamled: It's not entirely clear what you're going for there. You want `my_str` to remain empty if `other_str` isn't?
BlackCoyote has joined #ruby
<eam> assuming ternary operators don't get you strung up by your thumbs in your circle of technical people
baroquebobcat has quit [Quit: baroquebobcat]
<Hamled> Ox0dea, oh sorry I meant .present
<Hamled> hmmm yeah I forget ruby has the ternary
JDiPierro has joined #ruby
<Hamled> it's so... it feels too ugly for ruby :P
maletor has quit []
failshell has joined #ruby
jsaak has joined #ruby
<Hamled> thanks
sgambino has quit [Read error: Connection reset by peer]
saddad has joined #ruby
<Ox0dea> Hamled: Such sweet innocence. :P
<Ox0dea> Bless you.
<Hamled> well okay, I should say something closer to, it feels too ugly for what I would like ruby to be :)
<Ox0dea> Ruby comfortably occupies either end of the spectrum.
elfuego has joined #ruby
nettoweb has joined #ruby
baweaver has quit [Remote host closed the connection]
dasher00 has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> Hamled: May I show you something?
<Hamled> sure
<Ox0dea> Are you familiar with FizzBuzz? ;)
failshell has quit [Ping timeout: 264 seconds]
<Hamled> yes
bruno- has quit [Ping timeout: 246 seconds]
siaw has quit [Quit: siaw]
jenrzzz has quit [Ping timeout: 240 seconds]
leat1 has quit [Ping timeout: 246 seconds]
JDiPierro has quit [Remote host closed the connection]
jalcine has left #ruby ["I'm out."]
<Ox0dea> Hamled: Well, never mind. I shouldn't spoil your perception of Ruby's beauty.
<Ox0dea> If you don't like the ternary operator, you might prefer interpolating a post-conditional?
<Ox0dea> >> "#{'4' if true}2"
<ruboto> Ox0dea # => "42" (https://eval.in/434070)
bigmac has joined #ruby
powpie has joined #ruby
powpie has quit [Disconnected by services]
agent_white has quit [Quit: leaving]
<Hamled> Ox0dea, the thing I am getting with the ternary is that if the interpolated post-conditional is false, the entire string ends up as empty
<Ox0dea> Hamled: Ah, right. Yeah, ternary's ideal, then. :/
<dorei> is there a way to create an immutable hash? other than encapsulating the hash in a class and forwarding only methods that dont mutate it
<Ox0dea> `foo? ?` just rubs me the wrong way.
trbss has left #ruby [#ruby]
<Ox0dea> dorei: Freeze it?
<dorei> that's an interesting idea :) probably it'll be the first i'll use freeze :)
<dorei> first time
<Ox0dea> Be advised that it'll be a shallow freeze.
<Ox0dea> Mutable keys and values will remain so.
<Ox0dea> You probably don't have any mutable keys, though.
boynt has joined #ruby
boynt has left #ruby [#ruby]
[H]unt3r has quit [Quit: Leaving]
keen__________21 has joined #ruby
JDiPierro has joined #ruby
jsaak has quit [Ping timeout: 246 seconds]
jsaak has joined #ruby
unholycrab has quit [Ping timeout: 252 seconds]
keen__________20 has quit [Ping timeout: 260 seconds]
Guest5 has joined #ruby
leat1 has joined #ruby
howdoicomputer has quit [Ping timeout: 240 seconds]
drewvanstone has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lampshades has joined #ruby
cajone has quit [Ping timeout: 252 seconds]
mordocai has quit [Remote host closed the connection]
phutchins has joined #ruby
BlackCoyote has quit [Ping timeout: 256 seconds]
Axy has quit [Read error: Connection reset by peer]
Mia has quit [Read error: Connection reset by peer]
grenierm has joined #ruby
linux_dr has quit [Quit: linux_dr]
rcvalle has quit [Quit: rcvalle]
northfurr has quit [Quit: northfurr]
drewvanstone has quit [Ping timeout: 250 seconds]
havenwood has joined #ruby
kgirthofer has quit [Ping timeout: 260 seconds]
ferz_ has joined #ruby
jenrzzz has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
tjbiddle has joined #ruby
jgt has joined #ruby
ferz_ has quit [Client Quit]
shmilan has quit [Ping timeout: 246 seconds]
chipotle has joined #ruby
sepp2k1 has quit [Read error: Connection reset by peer]
beast has joined #ruby
jgt has quit [Ping timeout: 240 seconds]
ledestin has joined #ruby
unholycrab has joined #ruby
rubie has quit [Remote host closed the connection]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pragmatism has quit [Quit: Textual IRC Client: www.textualapp.com]
aaeron has joined #ruby
cajone has joined #ruby
havenwood has quit [Max SendQ exceeded]
tkuchiki has joined #ruby
zm1 has quit [Quit: jmIrc destroyed by the OS]
urbanmonk has joined #ruby
bigmac has left #ruby [#ruby]
bigmac has joined #ruby
Lucky__ has joined #ruby
bigmac has left #ruby [#ruby]
chipotle_ has joined #ruby
chipotle has quit [Ping timeout: 240 seconds]
CustosL1men has quit [Max SendQ exceeded]
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby
goodcodeguy has joined #ruby
sameerynho has quit [Quit: Leaving]
CustosL1men has joined #ruby
tjbiddle has quit [Ping timeout: 260 seconds]
tjbiddle has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
amoeba` has joined #ruby
solocshaw has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
chipotle has joined #ruby
phutchins has quit [Ping timeout: 246 seconds]
dravine_ has joined #ruby
chipotle_ has quit [Ping timeout: 264 seconds]
choke has joined #ruby
dravine has quit [Ping timeout: 255 seconds]
dravine_ is now known as dravine
<BraddPitt> w4
havenwood has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
Guest15471 has quit [Quit: Luke's IRC Client v0.94 build 682]
A124 has joined #ruby
Yzguy has quit [Quit: Zzz...]
towski__ has quit [Remote host closed the connection]
towski_ has joined #ruby
towski_ has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
drewvanstone has joined #ruby
horsecowdog has joined #ruby
r_baron has quit [Ping timeout: 244 seconds]
vikaton has quit [Quit: Connection closed for inactivity]
drewvanstone has quit [Read error: Connection reset by peer]
maletor has joined #ruby
drewvanstone has joined #ruby
c_nick has joined #ruby
horsecowdog has quit [Client Quit]
maletor has quit [Client Quit]
siempref_ has joined #ruby
gambl0re has joined #ruby
slackbotgz has joined #ruby
goncalo_ has joined #ruby
an0ma1y- has joined #ruby
howdoicomputer has joined #ruby
tmtwd has joined #ruby
eminencehc has quit [Remote host closed the connection]
shadoi has quit [Quit: Leaving.]
jxv has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
unsymbol_ has joined #ruby
failshell has joined #ruby
A124 has quit [*.net *.split]
CustosL1men has quit [*.net *.split]
nettoweb has quit [*.net *.split]
siemprefresco has quit [*.net *.split]
Trieste has quit [*.net *.split]
cjk101010 has quit [*.net *.split]
goncalo has quit [*.net *.split]
unsymbol has quit [*.net *.split]
nofxx has quit [*.net *.split]
mahlon has quit [*.net *.split]
Lucky__ has quit [*.net *.split]
an0ma1y has quit [*.net *.split]
podman has quit [*.net *.split]
Nanuq has quit [*.net *.split]
null__ has quit [*.net *.split]
__main__ has quit [*.net *.split]
cookiez has quit [*.net *.split]
niko has quit [*.net *.split]
MichaelSmith has quit [Quit: Connection closed for inactivity]
mahlon has joined #ruby
howdoicomputer has quit [Ping timeout: 272 seconds]
__main__ has joined #ruby
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
spacemud has quit [Quit: ZNC - http://znc.in]
karapetyan has joined #ruby
failshell has quit [Ping timeout: 250 seconds]
A124 has joined #ruby
cjk101010 has joined #ruby
juanpablo_ has joined #ruby
rcs has quit [Ping timeout: 256 seconds]
podman has joined #ruby
Nanuq has joined #ruby
null__ has joined #ruby
cookiez has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
chipotle_ has joined #ruby
Trieste has joined #ruby
A124 is now known as Guest37749
CustosL1men has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
Guest37749 has quit [Changing host]
Guest37749 has joined #ruby
howdoicomputer has joined #ruby
Guest37749 is now known as A124
ecksit has joined #ruby
xcesariox has joined #ruby
leat1 has quit [Remote host closed the connection]
rcs has joined #ruby
leat1 has joined #ruby
zapata has quit [Ping timeout: 240 seconds]
shakes has joined #ruby
juanpablo_ has quit [Ping timeout: 255 seconds]
cantaberry has joined #ruby
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
drewvanstone has quit [Ping timeout: 265 seconds]
tjbiddle has quit [Ping timeout: 252 seconds]
<c_nick> Need a regex for capturing -1.114e-12234 in a string .. I tried with \b[+-]*\d+[.]\d+[eE]*[+-]*\d+\b but is there a better way to do it?
eminencehc has joined #ruby
dorei has quit []
jgt has joined #ruby
stardiviner has joined #ruby
rubie has joined #ruby
jxv has joined #ruby
tjbiddle has joined #ruby
<Ox0dea> c_nick: Are you sure you need to do this?
<baweaver> ?xy
<ruboto> it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
jgt has quit [Ping timeout: 240 seconds]
pwnd_nfsw has quit [Ping timeout: 246 seconds]
FernandoBasso has quit [Quit: WeeChat 1.3]
webguynow has quit [Ping timeout: 244 seconds]
rubie has quit [Ping timeout: 265 seconds]
Lovich has joined #ruby
webguynow has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
iamninja has quit [Read error: Connection reset by peer]
zapata has joined #ruby
petricore has quit [Quit: Textual IRC Client: www.textualapp.com]
chipotle_ has quit [Excess Flood]
rgb-one has joined #ruby
inteq has joined #ruby
chipotle has joined #ruby
ngscheurich has joined #ruby
howdoicomputer has quit [Ping timeout: 256 seconds]
rubie has joined #ruby
trippycat has quit [Quit: Lost terminal]
c_nick has quit [Read error: Connection reset by peer]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
lkba_ has quit [Remote host closed the connection]
slackbotgz has quit [Remote host closed the connection]
iateadonut has joined #ruby
mrtomme has quit [Ping timeout: 264 seconds]
c_nick has joined #ruby
<c_nick> Hi sorry I got disconnected couldn't read any message
siempref_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mrtomme has joined #ruby
<eam> c_nick: the best way is to tokenize on whitespace and use something like Float("1.2")
gener1c_ has joined #ruby
<Ox0dea> eam: What's whitespace got to do with it?
<eam> I'm assuming it's delimiting the number :)
<eam> if that's not the case then bounds get tricky
<Ox0dea> >> Float(' -1.114e-12234 ') rescue :invalid # c_nick, eam
<ruboto> Ox0dea # => -0.0 (https://eval.in/434094)
<Ox0dea> c_nick: If you don't actually need to parse out the constituent parts, the conventionally wise approach is presented above.
<eam> yeah, I say tokenize on whitespace because while whitespace is OK inside Float(), other stuff won't be
<eam> so you'll have to tokenize on *something*
bmurt has joined #ruby
<havenwood> >> Rational('-1.114e-12234')
<baweaver> c_nick: ?xy
<Ox0dea> Shit, I completely misinterpreted c_nick's question.
<ruboto> havenwood # => (-557/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 ...check link for more (https://eval.in/434095)
rbennacer has quit [Remote host closed the connection]
<eam> >> Float('dunno, maybe the data looks like -1.114e-12 or something')
<ruboto> eam # => invalid value for Float(): "dunno, maybe the data looks like -1.114e-12 or something" (ArgumentError ...check link for more (https://eval.in/434096)
<Ox0dea> eam: Yeah, I missed that bit.
<baweaver> ah
<c_nick> >Float(' 1.23456 ')
<c_nick> >>Float(' 1.23456 ')
<ruboto> c_nick # => 1.23456 (https://eval.in/434097)
<eam> >> Rational(22/7)
<ruboto> eam # => (3/1) (https://eval.in/434098)
elfuego has quit [Quit: elfuego]
gener1c has quit [Ping timeout: 272 seconds]
<eam> *chuckle*
braincras has quit [Quit: bye bye]
<baweaver> >> 'har har i can word -1.114e-12234 something'.split.map { |w| Float(w) rescue nil }.compact
<ruboto> baweaver # => [-0.0] (https://eval.in/434099)
<baweaver> hrm
yfeldblum has quit [Remote host closed the connection]
<c_nick> e-12234 is massive so 0.0 is ok
<baweaver> something like that
chipotle_ has joined #ruby
<Ox0dea> s/massive/infinitesimal/
podman has quit [Quit: Connection closed for inactivity]
<eam> it's both, oddly enough
chipotle has quit [Read error: Connection reset by peer]
<c_nick> essentially what i need to do is parse a file, if i find any floating point values (viz. 1.234 1.23e-1234) then i need to process that (viz. truncate to 2 floating points)
<c_nick> so v.gsub!(/\b[+-]*\d+[.]\d+[eE]*.\d+\b/){|o| "%0.2f"%o}
<c_nick> v is everything from the file
braincrash has joined #ruby
<eam> c_nick: are they whitespace delimited?
<baweaver> >> 'har har 1.234 i can word -1.114e-12234 something'.split.map { |w| "%0.2f" % Float(w) rescue nil }.compact
<ruboto> baweaver # => ["1.23", "-0.00"] (https://eval.in/434100)
<eam> or can the numbers be embedded in words?
<eam> like abc123def
<baweaver> former is easy
<baweaver> latter....
<c_nick> eam: yes Hi I am C_nick 1.2345
<eam> the latter can be ambiguous depending on your allowable syntax for floats
<eam> c_nick: great, in that case definitely do something like what baweaver suggested
<eam> split on \s+
<eam> test each word for Float()
<Ox0dea> c_nick: Your file just has floating point numbers sprinkled all over the place?
<baweaver> not exactly clean per-se to use rescue, but then again there's not much of a better way.
<eam> it'll raise if the string isn't a Float()
<eam> you'll get the same float parser ruby uses
<c_nick> Ox0dea: not really zero or more floats
chipotle has joined #ruby
<c_nick> what does compact do /
chipotle_ has quit [Read error: Connection reset by peer]
<Ox0dea> c_nick: I mean to ask whether there isn't some more concrete structure to the thing, such that you might avoid processing every single "word".
<c_nick> oh ok .. so he is removing nil from the array which he gets through map
webguynow has quit [Ping timeout: 260 seconds]
rubie has quit [Remote host closed the connection]
webguynow has joined #ruby
<c_nick> Ox0dea: i am afraid not really
<Ox0dea> c_nick: Was this file generated by Satan?
bmurt has quit []
<c_nick> Ox0dea: lol
<c_nick> Ox0dea: https://eval.in/private/6fb0506e1c6cb7 This is what I wrote
<Ox0dea> ?fake
<ruboto> Please show your real code to illustrate your problem. Using fake code often hides it or won't bring up the best possible solution.
choke has quit [Read error: Connection reset by peer]
choke has joined #ruby
chipotle_ has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
<c_nick> Ideally they are just numbers output from the function
Gnomethrower has joined #ruby
<c_nick> so not really any fakes there.. if you really want the exact same thing that here is a sample GetBondStaticData: 1.56238, GetTenors: 5.1298, Currency: USD
arescorpio has joined #ruby
chipotle_ has quit [Read error: Connection reset by peer]
niko has joined #ruby
chipotle has joined #ruby
<c_nick> GetBondStaticData: 1.4E2, GetTenors: 5.1298, Currency: USD
rubie has joined #ruby
<Ox0dea> c_nick: That's the "more concrete structure" I asked you about.
<c_nick> Ox0dea: this is for one file
<c_nick> but i cannot do file wise.. it should work independent
<c_nick> other files wont follow same order
webguynow has quit [Ping timeout: 246 seconds]
siemprefresco has joined #ruby
<c_nick> Eg.3:- 1.23#1.21#4.52
<eam> c_nick: it's a reasonable thing - I wrote something similar once to be used like `cat`
webguynow has joined #ruby
<eam> and it'd take numbers and make them "human readable"
<eam> and/or color them
<eam> cat some_file | human_numbers
<Ox0dea> eam: Like numfmt(1)?
<eam> never heard of numfmt
<eam> ah yeah kinda
<eam> but way more DWIM-ish
<eam> and very loose on accepting input and figuring stuff out
dopamean_ has joined #ruby
chipotle has quit [Ping timeout: 252 seconds]
<c_nick> eam: cool
chipotle has joined #ruby
<havenwood> c_nick: if there was say a "42" would that be a Float `42.00`?
pontiki has joined #ruby
zotherstupidguy has quit [Quit: WeeChat 1.2]
<havenwood> Oops, I said that badly.
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<c_nick> no
<havenwood> c_nick: so there must be a period?
bb010g has joined #ruby
<c_nick> havenwood: Need to truncate the number beyond 8 decimal point
<eam> havenwood: oh good point, you'd want to test a series of number parsers
<havenwood> c_nick: ah, but an integer alone would count?
<c_nick> havenwood: yes
<Ox0dea> >> '%02g' % 42 # c_nick, eam, havenwood
<ruboto> Ox0dea # => "42" (https://eval.in/434103)
mary5030 has joined #ruby
<Ox0dea> It's gonna be okay, gals.
<havenwood> c_nick: For fun: scan /[-+]?\d+(?:\.\d+)?(?:e[-+]?\d+)?/i
webguynow has quit [Ping timeout: 244 seconds]
mwlang has joined #ruby
MichaelSmith has joined #ruby
webguynow has joined #ruby
<eam> >> %w{1 1.0 batman 1e2}.map {|word| Integer(word) rescue Float(word) rescue :invalid }
<ruboto> eam # => [1, 1.0, :invalid, 100.0] (https://eval.in/434105)
<eam> now, here's the real twist: Do you accept stuff like Infinity or NaN
<c_nick> i forgot what ?: was for
<havenwood> c_nick: non-capture group
<havenwood> c_nick: no backreference
<eam> hm, that's interesting, Integer() accepts -0 and turns it into 0
<eam> shouldn't Integer reject -0 and leave it for Float?
<c_nick> eam: shouldn't be an issue no ?
<eam> well, Integer doesn't have -0
<eam> Float does, though
<eam> I'm not sure how I feel about that
<eam> you could argue the cast is appropriate, but then why doesn't Integer("1.0") work
<eam> I think it's a bug
rubie has quit [Remote host closed the connection]
darkf has joined #ruby
<eam> excessively pedantic, just the way I like 'em
<baweaver> https://github.com/baweaver/lexigrapher this sounds a lot like lexigrapher
<baweaver> though it only tells you what it is
<baweaver> I should fix that as that's not too useful...
<c_nick> havenwood: so (?:\.\d+)? means zero or one dont capture
duggiefresh has joined #ruby
<havenwood> c_nick: a decimal point and one or more digits, or not - and yeah, no backreference
<Ox0dea> Optional, uncaptured fractional part.
<c_nick> ok cool
shmilan has joined #ruby
<Ox0dea> havenwood: No real need to bother with captures here, though?
gix has quit [Ping timeout: 255 seconds]
chipotle_ has joined #ruby
chipotle has quit [Ping timeout: 264 seconds]
<Ox0dea> gsub(foo) { |m|
<Ox0dea> gsub(foo) { |m| '%02g' % m }
c_nick has quit [Quit: bbl]
Eiam_ has joined #ruby
<havenwood> Ox0dea: Ah, I'm watching zombies... is the goal to replace stuff inline with formatted?
chipotle_ has quit [Read error: Connection reset by peer]
<havenwood> That makes sense now that you mention.
<havenwood> Ox0dea: :)
<Ox0dea> havenwood: Yep, that was c_nick's stated intent.
<Ox0dea> He went from wanting 2 decimal places to 8 at some point, though.
tmtwd has quit [Quit: Leaving]
dima_ has joined #ruby
gix has joined #ruby
fersur3 has joined #ruby
Alayde has quit [Ping timeout: 272 seconds]
<havenwood> >> 'GetBondStaticData: 1.4E2, GetTenors: 5.1298, Currency: USD, STUFF! -1.23e-1234'.gsub(/[-+]?\d+(?:\.\d+)?(?:e[-+]?\d+)?/i) { |m| '%08g' % m }
tmtwd has joined #ruby
<ruboto> havenwood # => "GetBondStaticData: 00000140, GetTenors: 005.1298, Currency: USD, STUFF! -0000000" (https://eval.in/434109)
tmtwd has left #ruby [#ruby]
<havenwood> oops
tmtwd_ has joined #ruby
tmtwd_ has quit [Remote host closed the connection]
jgt has joined #ruby
<havenwood> But yeah.
<havenwood> Regexp >.>
<Ox0dea> Ah, no, that's my oops; should be '%.8g'.
pawnbox has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
<Ox0dea> baweaver: Lexigrapher accepts "fale" as a valid gender. :P
<baweaver> 2 years ago
<baweaver> I don't pretend to remember what all I wrote there :P
aaeron has quit [Quit: Leaving.]
<Ox0dea> Yeah, that's fair.
<Ox0dea> Kudos for accepting "" there, though.
<havenwood> >> 'GetBondStaticData: 1.4E2, GetTenors: 5.123456789, Currency: USD, STUFF! -1.23e-1234'.gsub(/[-+]?\d+(?:\.\d+)?(?:[eE][-+]?\d+)?/) { |m| '%.8g' % m }
<ruboto> havenwood # => "GetBondStaticData: 140, GetTenors: 5.1234568, Currency: USD, STUFF! -0" (https://eval.in/434110)
<Ox0dea> !queue havenwood > c_nick
pawnbox has quit [Remote host closed the connection]
<havenwood> For a requisite Regexp solution (I usually prefer the requisite non-Regexp solution).
oo_ has quit [Remote host closed the connection]
wldcordeiro_ has joined #ruby
pawnbox has joined #ruby
roxtrongo has joined #ruby
wldcordeiro has quit [Ping timeout: 246 seconds]
<Ox0dea> We shall say nothing of storing currency in floats.
jgt has quit [Ping timeout: 255 seconds]
<pontiki> stop :'''(
<Ox0dea> pontiki?
workmad3 has joined #ruby
<pontiki> it's one of the things i have to put up with on this project
<Ox0dea> ObjectSpace.each_object(Float).map! { |f| f * 100 }
webguynow has quit [Ping timeout: 268 seconds]
webguynow has joined #ruby
rubie has joined #ruby
jenrzzz has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
<pontiki> hopefully, one more week, then i get a new project
<pontiki> it's still fix a bug, uncover two more :(
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary5030 has quit [Remote host closed the connection]
yardenbar has joined #ruby
chipotle has joined #ruby
mary5030 has joined #ruby
<Ox0dea> The dragon has n+1 heads; it is known.
<Ox0dea> havenwood: That was for you. ;)
webguynow has quit [Ping timeout: 265 seconds]
s00pcan has quit [Quit: Lost terminal]
<havenwood> Ox0dea: Haha
dima_ has quit [Quit: This computer has gone to sleep]
webguynow has joined #ruby
<havenwood> ObjectSpace.each_object(Float).map(&:abs)
veduardo has quit [Ping timeout: 252 seconds]
nickofferman has joined #ruby
mary5030 has quit [Ping timeout: 250 seconds]
<havenwood> >> 10.times.map { ObjectSpace.each_object(Float).map(&:abs).size }
<ruboto> havenwood # => /tmp/execpad-960939e5b553/source-960939e5b553:4:in `write': can't modify frozen NoMemoryError (Runti ...check link for more (https://eval.in/434111)
<Ox0dea> Wat.
<havenwood> >> 5.times.map { ObjectSpace.each_object(Float).map(&:abs).size }
<ruboto> havenwood # => [14, 28, 56, 112, 224] (https://eval.in/434112)
pawnbox_ has joined #ruby
dima_ has joined #ruby
seitensei has quit [Read error: Connection reset by peer]
<Ox0dea> >> [*ObjectSpace.each_object].sample 3
<ruboto> Ox0dea # => [" s.name = \"rake\"\n", "STATIC", "UNDEF_HEX_CHARREF"] (https://eval.in/434113)
rbennacer has joined #ruby
Lucky__ has joined #ruby
<Ox0dea> Well, that wasn't half as exciting as it might've been.
seitensei has joined #ruby
pawnbox has quit [Ping timeout: 265 seconds]
cvtsx1 has quit [Quit: Leaving]
webguynow has quit [Ping timeout: 264 seconds]
webguynow has joined #ruby
charliesome has joined #ruby
rbennacer has quit [Ping timeout: 244 seconds]
ngscheurich has quit [Ping timeout: 246 seconds]
petricore has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
shakes has quit [Quit: Leaving]
tkuchiki has quit [Remote host closed the connection]
petricore has quit [Quit: Textual IRC Client: www.textualapp.com]
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
yfeldblum has joined #ruby
rubie has quit [Remote host closed the connection]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
shmilan has quit [Ping timeout: 246 seconds]
grenierm has quit [Quit: grenierm]
grenierm has joined #ruby
dima_ has quit [Ping timeout: 256 seconds]
yardenbar has quit [Ping timeout: 268 seconds]
mices has joined #ruby
freerobby has quit [Quit: Leaving.]
choke has quit [Quit: Textual IRC Client: www.textualapp.com]
juanpablo_ has joined #ruby
<mices> anyone can help me with that
<mices> i got kicked from rails
webguynow has quit [Ping timeout: 265 seconds]
webguynow has joined #ruby
aaeron has joined #ruby
juanpablo_ has quit [Ping timeout: 244 seconds]
Guest5 has quit [Ping timeout: 246 seconds]
aaeron1 has joined #ruby
System42 has joined #ruby
<rgb-one> Hello :)
cornerman has quit [Ping timeout: 240 seconds]
duggiefresh has quit []
<rgb-one> I have a question outlined in a gist I would appreciate some assistance with, https://gist.github.com/rgb-one/4cb2b2d2fc1a31f693b1. Thanks :)
mices has quit []
brnpcn has joined #ruby
aaeron has quit [Ping timeout: 244 seconds]
Neverdie has quit [Quit: http://radiux.io/]
mices has joined #ruby
ecksit has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
beast has quit [Remote host closed the connection]
rubie has joined #ruby
<Ox0dea> &ri Array#product @rgb-one
<havenwood> rgb-one: Do you know how to turn the Hash into an Array of just its values?
agent_white has joined #ruby
<Ox0dea> >> %i[a b c].product [1, 2, 3] # rgb-one
<ruboto> Ox0dea # => [[:a, 1], [:a, 2], [:a, 3], [:b, 1], [:b, 2], [:b, 3], [:c, 1], [:c, 2], [:c, 3]] (https://eval.in/434118)
<agent_white> Evenin
tjbiddle has quit [Ping timeout: 272 seconds]
leswerve has joined #ruby
segmond has quit [Remote host closed the connection]
<Ox0dea> >> %w'A a @ 4'.product(%w'B b 8 }', %w'C C < ( [ {').size # rgb-one
<ruboto> Ox0dea # => 96 (https://eval.in/434119)
webguynow has quit [Ping timeout: 246 seconds]
last_staff has joined #ruby
webguynow has joined #ruby
<havenwood> mices: You can make a single Gist with multiple files. Save files with filenames for syntax highlighting and to add context. Adding comments or even a markdown file that present the full context of your problem will greatly improve the response you get.
<Ox0dea> rgb-one: Is this for l33tspeak generation or profanity filtration?
tjbiddle has joined #ruby
tkuchiki has joined #ruby
<baweaver> mices: you were kicked for not listening. Use Heroku
<baweaver> a lot of us are on both channels.
<havenwood> Options -Indexes
tejasmanohar has quit [Quit: tejasmanohar]
Synthbread has joined #ruby
tejasmanohar has joined #ruby
mary5030 has joined #ruby
radgeRayden has quit [Ping timeout: 265 seconds]
chipotle has joined #ruby
<baweaver> but more honestly mices, I would take that as time to work on this by yourself. If you crossed enough people in Rails to get kicked, chances are it won't work out much better here.
Guest5 has joined #ruby
tejasmanohar has quit [Client Quit]
rubie has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: i've nodded off.]
mary5030 has joined #ruby
<havenwood> mices: Working on Nginx now? Spend time to better present your questions if you're getting rebuffed. Also be sure to think about the most appropriate channel to ask your question. I think earlier you were asking Apache questions in #RubyOnRails instead of the #httpd channel and now you seem to be asking Nginx questions in #ruby instead of the #nginx channel.
iamninja has joined #ruby
last_staff has quit [Quit: last_staff]
<havenwood> mices: You'll find a better receptions and answers in the on-topic channel.
chipotle has quit [Client Quit]
webguynow has quit [Ping timeout: 240 seconds]
webguynow has joined #ruby
oo_ has joined #ruby
<havenwood> mices: Quick responses to questions after a well-formed Gist are smiled-upon.
fedexo has joined #ruby
<havenwood> mices: Just a reminder, but PMing users in #ruby without asking first is against the rules: http://ruby-community.com/pages/user_rules
mary5030_ has joined #ruby
mary5030 has quit [Ping timeout: 244 seconds]
cvtsx has joined #ruby
iamninja has quit [Ping timeout: 246 seconds]
nickofferman has quit [Ping timeout: 246 seconds]
mary5030_ has quit [Remote host closed the connection]
crdpink has joined #ruby
mary5030 has joined #ruby
webguynow has quit [Ping timeout: 256 seconds]
crdpink2 has quit [Ping timeout: 246 seconds]
webguynow has joined #ruby
krz has joined #ruby
jas02 has joined #ruby
<havenwood> mices: Are you doing this just to learn or do you need to get something deployed in production?
rubie has joined #ruby
msankhala has joined #ruby
mary5030 has quit [Ping timeout: 240 seconds]
leswerve has quit [Quit: leswerve]
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #ruby
skade has joined #ruby
oo_ has quit [Ping timeout: 240 seconds]
siemprefresco has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jhooker has joined #ruby
wldcordeiro_ has quit [Remote host closed the connection]
webguynow has quit [Ping timeout: 252 seconds]
CustosL1men has quit [Max SendQ exceeded]
webguynow has joined #ruby
eminencehc has quit [Remote host closed the connection]
CustosL1men has joined #ruby
pawnbox has quit [Ping timeout: 246 seconds]
__main__ has quit [Ping timeout: 255 seconds]
wldcordeiro_ has joined #ruby
astrobunny has joined #ruby
sybs has quit [Quit: Leaving]
bruno- has joined #ruby
oo_ has joined #ruby
arescorpio has quit [Quit: Leaving.]
System42 has left #ruby ["Leaving"]
G_ is now known as G
godfat has left #ruby [#ruby]
kgirthofer has joined #ruby
bruno- has quit [Ping timeout: 250 seconds]
failshell has joined #ruby
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
__main__ has joined #ruby
wldcordeiro_ has quit [Remote host closed the connection]
sdfgsdfg has joined #ruby
pawnbox has joined #ruby
failshell has quit [Ping timeout: 240 seconds]
ecksit has joined #ruby
ecksit has quit [Client Quit]
fersur3 has quit [Remote host closed the connection]
n008f4g_ has joined #ruby
wldcordeiro_ has joined #ruby
astrobunny has quit [Remote host closed the connection]
lkba has joined #ruby
saddad has quit [Ping timeout: 256 seconds]
astrobunny has joined #ruby
n008f4g_ has quit [Ping timeout: 264 seconds]
howdoicomputer has joined #ruby
dhjondoh has joined #ruby
brnpcn has quit []
howdoicomputer has quit [Ping timeout: 264 seconds]
codenapper has joined #ruby
rubie has quit [Remote host closed the connection]
stardiviner has quit [Ping timeout: 250 seconds]
dhjondoh1 has joined #ruby
dhjondoh has quit [Ping timeout: 250 seconds]
dhjondoh1 is now known as dhjondoh
dionysus69 has joined #ruby
webguynow has quit [Ping timeout: 265 seconds]
webguynow has joined #ruby
havenwood has quit [Remote host closed the connection]
grenierm has quit [Quit: grenierm]
aganov has joined #ruby
workmad3 has joined #ruby
Rickmasta has joined #ruby
beast has joined #ruby
astrobunny has quit [Remote host closed the connection]
lsmola has joined #ruby
rushed has joined #ruby
yardenbar has joined #ruby
konsolebox has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
mwlang has quit [Quit: mwlang]
ElSif has joined #ruby
ramfjord has joined #ruby
webguynow has quit [Ping timeout: 244 seconds]
aaeron1 has quit [Ping timeout: 246 seconds]
<certainty> moin
webguynow has joined #ruby
diegoviola has quit [Ping timeout: 256 seconds]
jxv has quit [Read error: Connection reset by peer]
ChasedSpade has quit [Ping timeout: 240 seconds]
ChasedSpade has joined #ruby
jxv has joined #ruby
astrobunny has joined #ruby
x-light has quit [Ping timeout: 246 seconds]
tjbiddle has quit [Quit: tjbiddle]
duncannz has joined #ruby
krz has quit [Ping timeout: 255 seconds]
tagrudev has joined #ruby
jgt has joined #ruby
krz has joined #ruby
Rurik has quit [Ping timeout: 240 seconds]
mordocai has joined #ruby
krz has quit [Client Quit]
solars has joined #ruby
rakm has joined #ruby
Rurik has joined #ruby
Rurik has quit [Changing host]
Rurik has joined #ruby
jgt has quit [Ping timeout: 264 seconds]
webguynow has quit [Ping timeout: 264 seconds]
mary5030 has joined #ruby
webguynow has joined #ruby
lampshades has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 240 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eGGsha has joined #ruby
juanpablo_ has joined #ruby
hayricicek has joined #ruby
webguynow has quit [Ping timeout: 264 seconds]
juanpablo_ has quit [Ping timeout: 246 seconds]
webguynow has joined #ruby
leat1 has quit [Ping timeout: 268 seconds]
mistermocha has joined #ruby
Nightmare has quit [K-Lined]
LBRapid has quit [K-Lined]
twohlix has quit [K-Lined]
edenc has quit [K-Lined]
khebbie has joined #ruby
fedexo has quit [Ping timeout: 246 seconds]
edenc has joined #ruby
xcesario_ has joined #ruby
Nightmare has joined #ruby
LBRapid has joined #ruby
twohlix has joined #ruby
xcesario_ has quit [Read error: Connection reset by peer]
leat1 has joined #ruby
xcesariox has quit [Ping timeout: 250 seconds]
xcesariox has joined #ruby
Alina-malina has joined #ruby
dumdedum has joined #ruby
felixrsmith has quit [Ping timeout: 244 seconds]
ndrei has joined #ruby
ReK2 has joined #ruby
ReK2 has joined #ruby
konsolebox has quit [Ping timeout: 268 seconds]
Olipro has quit [Ping timeout: 240 seconds]
Olipro has joined #ruby
jxv has quit [Quit: Leaving]
<rgb-one> I have a question outlined in a gist I would appreciate some assistance with, https://gist.github.com/rgb-one/4cb2b2d2fc1a31f693b1. Thanks :)
mordocai has quit [Remote host closed the connection]
<monoprotic> Array#product would help
<baweaver> rgb-one: you already asked
<baweaver> and were answered above
<rgb-one> baweaver: Ah, I fell asleep so didn't see the answer
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
<rgb-one> monoprotic: Intersting
shinnya has quit [Ping timeout: 250 seconds]
<baweaver> Ox0dea already mentioned it above, scroll back a ways or check the logs on channel join
symm- has joined #ruby
dhjondoh1 has joined #ruby
dhjondoh has quit [Ping timeout: 240 seconds]
dhjondoh1 is now known as dhjondoh
webguynow has quit [Ping timeout: 255 seconds]
webguynow has joined #ruby
codecop has joined #ruby
krz has joined #ruby
symm- has quit [Read error: Connection reset by peer]
mordocai has joined #ruby
arup_r has joined #ruby
symm- has joined #ruby
duncannz has quit [Ping timeout: 272 seconds]
ta has quit [Remote host closed the connection]
<rgb-one> havenwood: In response to your question: "rgb-one: Do you know how to turn the Hash into an Array of just its values?" would `hash.each do |h|; puts h[1]; end` be adequate?
cantaberry has quit [Ping timeout: 256 seconds]
bluOxigen has joined #ruby
duncannz has joined #ruby
Macaveli has joined #ruby
duncannz has quit [Max SendQ exceeded]
duncannz has joined #ruby
karapetyan has joined #ruby
duncannz has quit [Max SendQ exceeded]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
duncannz has joined #ruby
darkhex has joined #ruby
howdoicomputer has joined #ruby
<rgb-one> Ox0dea: Neither of those are my main reason but the application does employ l33tspeak
<certainty> rgb-one: well Hash#values would do
gix has quit [Ping timeout: 240 seconds]
pawnbox_ has joined #ruby
pawnbox has quit [Ping timeout: 255 seconds]
jhooker has quit [Ping timeout: 252 seconds]
skullcrasher has joined #ruby
howdoi has joined #ruby
jgt has joined #ruby
leat1 has quit [Remote host closed the connection]
leat1 has joined #ruby
iamninja has joined #ruby
ndrei_ has joined #ruby
howdoicomputer has quit [Ping timeout: 250 seconds]
<howdoi> in haml i'm doing something like var data = #{data}; that will expand all the contents of data is there any way to set a JS variable without exposing it in the source ?
* howdoi is not sure if this is the right channle
ndrei has quit [Remote host closed the connection]
Guest32 has joined #ruby
firstdayonthejob has joined #ruby
aswen has joined #ruby
Balzrael has joined #ruby
iamninja has quit [Ping timeout: 244 seconds]
beast has quit [Remote host closed the connection]
CustosL1men has quit [Max SendQ exceeded]
Guest32 has quit [Client Quit]
chuy has quit [Ping timeout: 255 seconds]
CustosL1men has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
tjohnson has quit [Quit: Connection closed for inactivity]
opensource_ninj1 has quit [Quit: opensource_ninj1]
<rgb-one> certainty: Indeed it does :)
mordocai has quit [Remote host closed the connection]
Burgestrand has joined #ruby
chuy has joined #ruby
Burgestrand has quit [Client Quit]
Burgestrand has joined #ruby
greenarrow has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
Guest32 has joined #ruby
webguynow has quit [Ping timeout: 255 seconds]
<BLuEGoD> I'm trying to add a rack middleware to capture all StandardError Exceptions similar to stackoverflow.com/q/14790380 - However, exceptions are still been thrown down the stack in other call(env) method. Any clues as to what's going on? I'm using Thin as a web server and trying to avoid it to exit everytime an Exception is thrown...
webguynow has joined #ruby
nofxx has quit [Ping timeout: 250 seconds]
amstrad has joined #ruby
UtkarshRay has joined #ruby
amclain_ has quit [Quit: Leaving]
webguynow has quit [Ping timeout: 255 seconds]
webguynow has joined #ruby
SCHAAP137 has joined #ruby
mordocai has joined #ruby
failshell has joined #ruby
devoldmx has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
failshell has quit [Ping timeout: 246 seconds]
infoget has joined #ruby
howdoicomputer has joined #ruby
andikr has joined #ruby
khebbie has quit [*.net *.split]
solars has quit [*.net *.split]
tagrudev has quit [*.net *.split]
oo_ has quit [*.net *.split]
mices has quit [*.net *.split]
iateadonut has quit [*.net *.split]
cookiez has quit [*.net *.split]
Nanuq has quit [*.net *.split]
null__ has quit [*.net *.split]
ReK2 has quit [*.net *.split]
mistermocha has quit [*.net *.split]
eGGsha has quit [*.net *.split]
astrobunny has quit [*.net *.split]
Lucky__ has quit [*.net *.split]
Trieste has quit [*.net *.split]
A124 has quit [*.net *.split]
cjk101010 has quit [*.net *.split]
unholycrab has quit [Read error: Connection reset by peer]
spacemud has joined #ruby
infoget has left #ruby [#ruby]
moeabdol has joined #ruby
symm- has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
renderfu_ has joined #ruby
renderful has quit [Ping timeout: 240 seconds]
karapetyan has quit [Remote host closed the connection]
Trieste has joined #ruby
ReK2 has joined #ruby
astrobunny has joined #ruby
cjk101010 has joined #ruby
eGGsha has joined #ruby
Lucky__ has joined #ruby
A124 has joined #ruby
khebbie has joined #ruby
tagrudev has joined #ruby
oo_ has joined #ruby
solars has joined #ruby
cookiez has joined #ruby
Nanuq has joined #ruby
iateadonut has joined #ruby
null__ has joined #ruby
mices has joined #ruby
webguynow has quit [Ping timeout: 255 seconds]
webguynow has joined #ruby
tatsuo has joined #ruby
tuor has joined #ruby
terlar has joined #ruby
lampshades has joined #ruby
workmad3 has joined #ruby
pawnbox_ has joined #ruby
ta has joined #ruby
leat1 has quit [Remote host closed the connection]
leat1 has joined #ruby
ndrei_ has quit [Ping timeout: 272 seconds]
pawnbox has quit [Ping timeout: 240 seconds]
webguynow has quit [Ping timeout: 265 seconds]
tjbiddle has joined #ruby
webguynow has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sn0wb1rd has quit [Remote host closed the connection]
<tuor> It's about read_config_file. The file exists but the code l130 isn't run. I tryed to start pry and include the class. I created a instance of it and called the method but config_file is still an empty Hash.
<tuor> I don't get any syntax error. Now I just don't know how to find out what is going wrong...
tkuchiki has quit [Remote host closed the connection]
<tuor> What I want with this method (if it's not clear): read a YAML file and create a ruby hash object wich contains (for the moment) only one key
sdwrage_ has quit [Quit: This computer has gone to sleep]
<tuor> key: 'blacklist' value: [ 'sting 1', 'sting 2' ]
Burgestrand has quit []
baweaver has quit [Remote host closed the connection]
<tuor> I hope it's understandable. ;)
workmad3 has joined #ruby
konsolebox has joined #ruby
webguynow has quit [Ping timeout: 264 seconds]
webguynow has joined #ruby
lulzmachine has joined #ruby
Pupeno has joined #ruby
tkuchiki has joined #ruby
Burgestrand has joined #ruby
<tuor> I tried it "manualy" in pry there it works: https://gist.github.com/anonymous/41124d7df7a451886c2a
workmad3 has quit [Ping timeout: 264 seconds]
k3asd` has joined #ruby
karapetyan has joined #ruby
<certainty> tuor: so if you replace l130 with binding.pry and put what is on l130 now on l131 and run the thing it stops and opens the pry repl?
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
<BLuEGoD> is there a way to prevent thin to exit when an exception is thrown in a rack app?
<tuor> certainty, no it doesn't.
<certainty> tuor: well then the file doesn't exist
<tuor> certainty, I did it so (just for not speaking of different thing): https://gist.github.com/anonymous/e00d3493020555a20458
_derpy is now known as `derpy
<adaedra> Hello
sufyan`` has quit [Ping timeout: 240 seconds]
sufyan``` has joined #ruby
polysics has joined #ruby
<tobiasvl> what's the cleanest way to combine a ||= with += I wonder
<tobiasvl> or something like ||<<
TheHodge has joined #ruby
Hounddog has joined #ruby
x-light has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
<certainty> tuor: yepp. That's it. If it doesn't stop there, then it means that File.exists? returned false, which means that stat on the given config_file_name failed
juanpablo_ has joined #ruby
skade has joined #ruby
Pupeno has quit [Remote host closed the connection]
lampshades has quit [Remote host closed the connection]
Synthbread has quit [Ping timeout: 244 seconds]
ramfjord has quit [Ping timeout: 256 seconds]
shredding has joined #ruby
webguynow has quit [Ping timeout: 255 seconds]
juanpablo_ has quit [Ping timeout: 240 seconds]
webguynow has joined #ruby
kedare has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
anisha has joined #ruby
<tuor> certainty, hmm ok. I tried this: https://gist.github.com/anonymous/8d9f7a13be0bfaef9f10
<tuor> This doesn't start pry but prints the 'file exists'.
<tuor> so there is a prblem with my @config_file_name
<tuor> I'll search a little bit. Thx certainty
lampshades has joined #ruby
khebbie has quit [Remote host closed the connection]
krisquigley has joined #ruby
tomaz_b has joined #ruby
<certainty> tuor: yepp just put a binding.pry right before File.exists?(...)
<certainty> then you can check the value of config_file_name at that point
CustosL1men has quit [Read error: Connection timed out]
khebbie has joined #ruby
CustosL1men has joined #ruby
<tuor> hmm. @config_file_name is an empty string... I have to find why.
ndrei has joined #ruby
beauby has quit [Ping timeout: 246 seconds]
<yorickpeterse> morning
<flughafen> morning
<certainty> moin
<certainty> o/
bayed has joined #ruby
<tuor> ah found. Man it's not the problem of the class. It's the script using it which gives an empty string as the second argument.
webguynow has quit [Ping timeout: 272 seconds]
webguynow has joined #ruby
<certainty> there you go
<flughafen> moin certainty !
jgt1 has joined #ruby
lampshades has quit [Ping timeout: 240 seconds]
sdfgsdfg has quit [Read error: Connection reset by peer]
allomov has joined #ruby
Burgestrand has quit []
Rurik has quit [Ping timeout: 250 seconds]
Burgestrand has joined #ruby
webguynow has quit [Ping timeout: 246 seconds]
jgt has quit [Ping timeout: 265 seconds]
webguynow has joined #ruby
gwendall has joined #ruby
aswen has quit [Ping timeout: 260 seconds]
mordocai has quit [Quit: To Sleep!]
Zai00 has joined #ruby
leat1 has quit [Ping timeout: 260 seconds]
Pupeno has joined #ruby
MALAZIJSKIJ_BOEI has joined #ruby
lkba_ has joined #ruby
lkba has quit [Ping timeout: 250 seconds]
dmolina has joined #ruby
gregf_ has quit [Ping timeout: 240 seconds]
sn0wb1rd has joined #ruby
Macaveli has joined #ruby
gregf_ has joined #ruby
leat1 has joined #ruby
marr has joined #ruby
CustosL1men has quit [Read error: Connection timed out]
astrobunny has quit [Remote host closed the connection]
CustosL1men has joined #ruby
rdark has joined #ruby
<shevy> ready for takeoff flughafen?
<flughafen> yes shevy !
<flughafen> shevy: apparently some part of BER is in use while schoenefeld is in repair?
goncalo_ has left #ruby [#ruby]
<certainty> flughafen: for real?
leat1 has quit [Remote host closed the connection]
leat1 has joined #ruby
<certainty> crazy stuff
goncalo has joined #ruby
atmosx_ has joined #ruby
<flughafen> let me find the article. i miight have totally misread it now and let everybody's hopesdown
atmosx_ is now known as atmosx_desktop
Oka has quit [Quit: o/]
Guest32 has quit [Quit: Textual IRC Client: www.textualapp.com]
atmosx_desktop has quit [Client Quit]
[k- has joined #ruby
<certainty> haha
atmosx_laptop has joined #ruby
<adaedra> I have no hopes, so you can't have let mine down
webguynow has quit [Ping timeout: 272 seconds]
webguynow has joined #ruby
<certainty> all hope is gone
<atmosx_laptop> aloha
The_Ball has joined #ruby
<adaedra> No hopes, only code now
<adaedra> hi atmosx_laptop
<flughafen> There is only Zuul
cvtsx has quit [Ping timeout: 265 seconds]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cvtsx has joined #ruby
f4cl3y has joined #ruby
iamninja has joined #ruby
allomov has quit [Remote host closed the connection]
stan has joined #ruby
ndrei has quit [Ping timeout: 240 seconds]
mr_dev has joined #ruby
rushed has quit [Quit: rushed]
arup_r has quit [Remote host closed the connection]
Mia has joined #ruby
firstdayonthejob has quit [Ping timeout: 240 seconds]
mr_dev has left #ruby [#ruby]
ndrei has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sonOfRa has quit [Quit: Bye!]
iamninja has quit [Ping timeout: 240 seconds]
webguynow has quit [Ping timeout: 250 seconds]
sonOfRa has joined #ruby
chouhoulis has quit [Remote host closed the connection]
webguynow has joined #ruby
chouhoulis has joined #ruby
siaw has joined #ruby
tvw has joined #ruby
Igorshp has joined #ruby
chouhoulis has quit [Ping timeout: 244 seconds]
wldcordeiro_ has quit [Remote host closed the connection]
mr_dev has joined #ruby
roxtrongo has quit [Read error: Connection reset by peer]
allomov has joined #ruby
wldcordeiro_ has joined #ruby
moeabdol has quit [Ping timeout: 256 seconds]
khebbie has quit [Remote host closed the connection]
khebbie has joined #ruby
MichaelSmith has quit [Quit: Connection closed for inactivity]
webguynow has quit [Ping timeout: 272 seconds]
webguynow has joined #ruby
<shevy> flughafen lol
blarghlarghl has joined #ruby
merlinp has joined #ruby
<blarghlarghl> Hello everyone. I have, say 4-5 forks going, each with a set of forks within it. I want each outer fork to Process.waitall, but only on its own inner forks, not on any parallel process forks. Does Process.waitall do that?
arup_r has joined #ruby
failshell has joined #ruby
xnr has quit [Quit: ರ_ರ]
workmad3 has joined #ruby
xnr has joined #ruby
Burgestrand has quit []
joshmyers has joined #ruby
<joshmyers> Hey, whats the difference between raise_error and raise_exception?
<apeiros> joshmyers: neither is in ruby, so what are you talking about?
<maloik> I'm guessing it's the rspec thing
<joshmyers> sorry, it's an rspec matcher
<joshmyers> yes
moeabdol has joined #ruby
moeabdol has quit [Client Quit]
k3asd` has quit [Ping timeout: 264 seconds]
cornerman has joined #ruby
<maloik> their docs seem to say they're functionally interchangeable
failshell has quit [Ping timeout: 272 seconds]
<certainty> really how difficult is it to look that up on your own
<certainty> it took us a few seconds
<certainty> that sounded grumpier than it was supposed to
Balzrael has quit [Quit: Leaving]
<joshmyers> I did and I came up with the same answer, was wondering if there are conventions of using one over the other.
<joshmyers> yes it did.
<certainty> it's about having the choice to pick one that fits best. I'm not aware of conventions.
Burgestrand has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
<certainty> i first thought that one might only make sure that a subclass of StandardError was raised but apparently it's not the case
webguynow has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
lkba_ has quit [Ping timeout: 246 seconds]
webguynow has joined #ruby
bruno- has joined #ruby
Gnomethrower has quit [Changing host]
Gnomethrower has joined #ruby
<joshmyers> ok cool, thanks.....
timonv has joined #ruby
<joshmyers> still not sure which would make either 'fit best'
CloCkWeRX has left #ruby [#ruby]
<jhass> blarghlarghl: I'd expect so, but easy enough to hammer out a small script and verify?
krz has quit [Quit: WeeChat 1.2]
<jhass> raise_error is less typing, so
moeabdol has joined #ruby
allomov has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 246 seconds]
webguynow has quit [Ping timeout: 272 seconds]
webguynow has joined #ruby
ddv has quit [Changing host]
ddv has joined #ruby
xfbs has joined #ruby
<shevy> haha
Voker57 has joined #ruby
emilkarl has joined #ruby
Burgestrand has quit []
solocshaw has joined #ruby
solocshaw has quit [Remote host closed the connection]
solocshaw has joined #ruby
darkhex has quit [Quit: Textual IRC Client: www.textualapp.com]
x-light has quit [Ping timeout: 246 seconds]
joshmyers has quit [Remote host closed the connection]
xfbs has quit []
youngbaks has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
dhjondoh has joined #ruby
x-light has joined #ruby
<rgb-one> When executing `puts [1, 2, 3].product(["a", "b", "c"], ["x", "y", "z"], ["q","w", "e"])`, how can I repersent the result such that the different combinations are outputed line by line instead of the each individual character?
solocshaw has quit [Ping timeout: 240 seconds]
marr has quit [Ping timeout: 250 seconds]
<rgb-one> So 1, a, x, q will be on line 1, 1, a, x, w, line 2 etc.
<shevy> dunno, did you try require 'pp'; pp [1, 2, 3].product(["a", "b", "c"], ["x", "y", "z"], ["q","w", "e"]) yet?
<rgb-one> what is pp?
<SebastianThorn> pritty print
<rgb-one> I will give it a try
zerolith has joined #ruby
<shevy> *pretty :)
<rgb-one> shevy: Indeed friend it worked
<shevy> \o/
<shevy> there is also awesome print if you want colours... but I found it overkill
tjbiddle has quit [Quit: tjbiddle]
johnhamelink has quit [Ping timeout: 246 seconds]
juanpablo_ has joined #ruby
<shevy> is there a collective word for these three elements: directory, file, symlink? I need to add a colourize-method and I need to give it a name... directories, files and symlinks will be colourized differently but I need to name an aggregate method... "def colorize(input)" isn't a good name...
alem0lars has quit [Ping timeout: 246 seconds]
Klumben has quit [Ping timeout: 246 seconds]
suchness has joined #ruby
slayerjain has joined #ruby
juanpablo_ has quit [Ping timeout: 244 seconds]
stamina has joined #ruby
tatsuo has quit [Remote host closed the connection]
<SebastianThorn> shevy: ye, it didnt really look right :P
alex88 has joined #ruby
youngbaks has quit [Ping timeout: 252 seconds]
<SebastianThorn> shevy: "everything is a file"
CustosL1men has quit [Ping timeout: 250 seconds]
<SebastianThorn> i'd use file, type or filetype?
<adaedra> shevy: node
<shevy> hmm
<shevy> node sounds good
Kallis has joined #ruby
beast_ has joined #ruby
Kallis has quit [Max SendQ exceeded]
samuel02 has joined #ruby
Igorshp has quit [Remote host closed the connection]
Kallis has joined #ruby
xfbs has joined #ruby
araujo has joined #ruby
araujo has joined #ruby
Asher has quit [Quit: Leaving.]
Rurik has joined #ruby
bweston92 has quit [Read error: Connection reset by peer]
webguynow has quit [Ping timeout: 272 seconds]
webguynow has joined #ruby
Asher has joined #ruby
allomov has joined #ruby
Asher is now known as Guest4886
lulzmachine has quit [Quit: Connection closed for inactivity]
x-light has quit [Ping timeout: 255 seconds]
webguynow has quit [Ping timeout: 240 seconds]
Igorshp has joined #ruby
robbyoconnor is now known as r0bby_
r0bby_ is now known as robbyoconnor
webguynow has joined #ruby
terlar has quit [Quit: WeeChat 1.3]
minimalism has quit [Quit: leaving]
duncannz has quit [Remote host closed the connection]
khebbie has quit [Remote host closed the connection]
<moeabdol> in rspec 3 I have an array containint heterogeneous objects
Guest4886 has quit [Quit: Leaving.]
<moeabdol> I want to test the existance of a an object in the array so I
MALAZIJSKIJ_BOEI has quit [Quit: Textual IRC Client: www.textualapp.com]
<moeabdol> expect(my_array).to include(instance_of(class))
mprelude has joined #ruby
Asher- has joined #ruby
<moeabdol> it works! but I wonder if this is a neat way to do this, and wither there is a matcher that is already made for such an expectation?
Asher- is now known as Asher
Asher has quit [Client Quit]
Asher has joined #ruby
Rurik has quit [Read error: Connection reset by peer]
webguynow has quit [Ping timeout: 240 seconds]
r_baron has joined #ruby
webguynow has joined #ruby
Denis__ has joined #ruby
Zai00 has quit [Quit: Zai00]
cvtsx has quit [Ping timeout: 244 seconds]
Azure has quit [Ping timeout: 255 seconds]
Igorshp has quit [Remote host closed the connection]
Rurik has joined #ruby
leat1 has quit [Quit: leat1]
cvtsx has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
tvw has quit [Read error: Connection reset by peer]
Rickmasta has joined #ruby
tatsuo has joined #ruby
CustosL1men has joined #ruby
SCHAAP137 has joined #ruby
hayricicek has quit [Ping timeout: 252 seconds]
c0m0 has joined #ruby
Igorshp has joined #ruby
nettoweb has joined #ruby
khebbie has joined #ruby
kjhsdf has joined #ruby
leat has joined #ruby
leat has quit [Remote host closed the connection]
leat has joined #ruby
webguynow has quit [Ping timeout: 250 seconds]
webguynow has joined #ruby
konsolebox has quit [Quit: Leaving]
hashrocket has quit [Quit: Connection closed for inactivity]
hayricicek has joined #ruby
heidar has joined #ruby
Denis__ has left #ruby ["Leaving"]
webguynow has quit [Ping timeout: 240 seconds]
webguynow has joined #ruby
stardiviner has joined #ruby
leat has quit [Ping timeout: 260 seconds]
phutchins has joined #ruby
marr has joined #ruby
lkba has joined #ruby
polysics has quit [Ping timeout: 255 seconds]
kjhsdf has quit [Quit: WeeChat 1.3]
<shevy> webkitgtk-source takes much longer to compile than firefox-source ... :(
leat has joined #ruby
bluOxigen has quit [Ping timeout: 246 seconds]
apt-get has joined #ruby
<darix> shevy: try libreoffice next ;)
bweston92 has joined #ruby
<adaedra> And Qt
<darix> adaedra: libreoffice needs 30+GB disk space to compile now 8)
<adaedra> nice
<darix> and probably 6+hours
Dreamer3 has quit [Quit: Leaving...]
firstdayonthejob has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
khebbie has quit [Remote host closed the connection]
rgb-one has quit [Remote host closed the connection]
iamninja has joined #ruby
leat has quit [Remote host closed the connection]
agent_white has quit [Quit: night]
leat has joined #ruby
rodfersou has joined #ruby
webguynow has quit [Ping timeout: 246 seconds]
tcopeland has quit [Quit: Leaving.]
webguynow has joined #ruby
iamninja has quit [Ping timeout: 260 seconds]
phutchins has quit [Quit: WeeChat 1.1.1]
karapetyan has quit [Remote host closed the connection]
<shevy> qt takes less time :D
karapetyan has joined #ruby
<shevy> libreoffice takes more
pawnbox has quit [Remote host closed the connection]
<shevy> the odd thing is that firefox source has like 140mb, webkitgtk like 13mb as .tar.xz
lxsameer has joined #ruby
pawnbox has joined #ruby
last_staff has joined #ruby
<shevy> ruby, python and perl take almost the same time to compile, go very easily
<shevy> the only strange part about ruby is the rdoc-installation step, that seems to take a really long time
<shevy> mruby compiles almost instantly :D
khebbie has joined #ruby
webguynow has quit [Ping timeout: 240 seconds]
<workmad3> shevy: yeah, ri and rdoc both take ages to generate :(
webguynow has joined #ruby
<shevy> ok ... "almost instantly" was exaggerated... took 27 seconds here
slayerjain has quit [Ping timeout: 250 seconds]
<shevy> mruby-master/test/t/float.rb:201:17: ambiguous first argument; put parentheses or even spaces
<shevy> hehe
karapetyan has quit [Ping timeout: 240 seconds]
sdothum has joined #ruby
tvw has joined #ruby
r_baron has quit [Ping timeout: 250 seconds]
krisquigley has quit [Remote host closed the connection]
<shevy> bin/mruby seems to make use of ncurses ... libncursesw.so.5 => /usr/lib/libncursesw.so.5
jas02 has quit [Ping timeout: 252 seconds]
cache_over_mem has joined #ruby
<cache_over_mem> guys i know you guys are always doing stuff better than me
<shevy> cache_over_mem you do this deliberately :>
alex88 has quit [Ping timeout: 240 seconds]
<cache_over_mem> but i just found out that you can .reduce(:&) for intersections of an array of arrays
<shevy> gateway ;)
<cache_over_mem> ?
<adaedra> !
miguelff has joined #ruby
jas02 has joined #ruby
chills42 has joined #ruby
chills42 has quit [Remote host closed the connection]
chills42 has joined #ruby
Burgestrand has joined #ruby
rubie has joined #ruby
Igorshp has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
failshell has joined #ruby
Hrorek has joined #ruby
jschoolcraft has joined #ruby
bazbing80 has joined #ruby
Hrorek has quit [Max SendQ exceeded]
Hrorek has joined #ruby
FernandoBasso has joined #ruby
Hrorek has quit [Max SendQ exceeded]
rubie has quit [Remote host closed the connection]
Rurik has quit [Ping timeout: 240 seconds]
Hrorek has joined #ruby
dfedde has quit [Quit: see ya!]
rubie has joined #ruby
Hrorek has quit [Max SendQ exceeded]
<yorickpeterse> cache_over_mem: as in:
<yorickpeterse> ?guys
<ruboto> Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
pandaant has joined #ruby
merlinp has quit [Remote host closed the connection]
failshell has quit [Ping timeout: 272 seconds]
Rurik has joined #ruby
Rurik has quit [Changing host]
Rurik has joined #ruby
<yorickpeterse> cache_over_mem: I suggest you take the suggestion and honor it
<yorickpeterse> This has nothing to do with freedom of speech
<cache_over_mem> yorick, you know how shit you are? you bring nothing to perl as you bring nothing to ruby
krisquigley has joined #ruby
<yorickpeterse> lol
<cache_over_mem> neither do i, but i dont whine along the way
<yorickpeterse> I don't really have to bring anything to Perl, I care little for a dying language
<yorickpeterse> I also care little for 12 year olds, so enjoy the /ignore
<certainty> now that escalated quickly
<cache_over_mem> yeah i just looked at your GH, you're not who i was thinking of, but all the same
rubie has quit [Remote host closed the connection]
<cache_over_mem> you're the guy who managed to turn a simple XML parser into a career
<adaedra> Here we go again
<yorickpeterse> honestly if the first response somebody has "MY FREEDOM OF SPEECH" that just clearly shows how they're missing the point so massively
<yorickpeterse> There's no point in argueing with people like that
cih has joined #ruby
Kallis has quit [Read error: Connection reset by peer]
gwendall has quit [Remote host closed the connection]
<yorickpeterse> also somebody just give me +o so I can pre-emptively ban everybody :P
xfbs has quit []
<cache_over_mem> thats like shooting somebody in an argument and then saying 'Oh what, no rebuttal? You're just whining about being shot'
<suchness> I blame ruboto.
<cache_over_mem> ^
<suchness> And I blame people who use it to sidetrack the channel from ruby.
<adaedra> If you want this channel to discuss ruby issues, you can drag this discussion to -offtopic. It's here for this exact purpose.
krisquigley has quit [Ping timeout: 272 seconds]
<cache_over_mem> what
<cache_over_mem> thats exactly the opposite of how it should work
phutchins has joined #ruby
<yorickpeterse> apeiros: ^
xfbs has joined #ruby
elperdut has joined #ruby
da3mian has joined #ruby
zerolith has left #ruby ["Leaving"]
jas02 has quit [Ping timeout: 252 seconds]
<shevy> certainty nah it did not escalate really, the moment he used the words "guys" twice in the same sentence upon starting, along with being a gateway user was a dead-give away :)
syath has joined #ruby
<yorickpeterse> Hm, I should start a collection of responses ?guys triggers
<shevy> cache_over_mem get a real job man, don't be a vampire
Igorshp has joined #ruby
<cache_over_mem> lol i probably make more than you, ya know. but you're welcome to not invite me to your special snowflake banquet :(((
<certainty> shevy: heh
<shevy> cache_over_mem ah what do you work?
<cache_over_mem> linux administration
tkuchiki has quit [Remote host closed the connection]
<shevy> nah
<shevy> you joined #windows* the other day
<cache_over_mem> leading the charge to write less sh and perl and more ruby
Rurik has quit [Ping timeout: 250 seconds]
<cache_over_mem> nope
<suchness> Are you guys really going to devolve this discussion into personal attacks?
<shevy> you are using the word guys as well :(
<adaedra> shevy: tbf, I'm on channels not related to my work at all.
<cache_over_mem> havent even touched a windows box for more than 5 years. always on my chromebook or crouton'ing centOS
jas02 has joined #ruby
xfbs has quit []
<shevy> adaedra windows?
<certainty> adaedra: heresy
<certainty> :)
<adaedra> shevy: no.
Igorshp has quit [Remote host closed the connection]
<shevy> I think I joined #windows perhaps 3 or 4 times in 10 years, usually related to singular questions
ndrei has quit [Ping timeout: 260 seconds]
leat has quit [Remote host closed the connection]
but3k4 has joined #ruby
bruno- has joined #ruby
leat has joined #ruby
<cache_over_mem> I joined ##linux many moons ago and they showed me how to boot linux, and i didnt realize that i couldnt 'turn it off' and i ended up making a career out of it somehow
codecop has quit [Remote host closed the connection]
Igorshp has joined #ruby
Rurik has joined #ruby
<adaedra> mmh
Klumben has joined #ruby
<adaedra> nvm
<certainty> as the world turns. Sounds good
evrial has left #ruby [#ruby]
dasher00 has quit [Ping timeout: 250 seconds]
cih_ has joined #ruby
cih has quit [Read error: Connection reset by peer]
jas02 has quit [Ping timeout: 250 seconds]
Igorshp has quit [Remote host closed the connection]
juanpablo_ has joined #ruby
<shevy> Does anyone of you have a statically compiled ruby?
kidoz has joined #ruby
<shevy> My dream combination will be static busybox, static ruby... and then dietlibc!
hadrig has joined #ruby
<cache_over_mem> RubyMotion can do it I think
<yorickpeterse> shevy: you mean Crystal?
webguynow has quit [Ping timeout: 240 seconds]
<certainty> shevy: you dream of this stuff?
hadrig has quit [Client Quit]
webguynow has joined #ruby
<headius> I wouldn't really consider RubyMotion to be ruby
pontiki has joined #ruby
hadrig has joined #ruby
<headius> rather a statically-analyzable subset of ruby
<shevy> yorickpeterse well crystal lacks a few things that I love, aliasing methods for instance. It may be the secondary option after ruby
<shevy> and I am a past hello-world noob when it comes to crystal
<certainty> crystal, for me, always has the association to crystal meth
<shevy> yeah
<shevy> you must think about rocks instead certainty
<shevy> gems, diamonds, ruby, perl, shards
<certainty> yeah i try. still
<shevy> hehe
juanpablo_ has quit [Ping timeout: 272 seconds]
<cache_over_mem> shevy, Julia is worth a look. lisp macros, OOP, native asm-dumpable code, really cool
<shevy> certainty actually I more dream of auto-generating organisms but that seems either costly or technically difficult
* certainty should research crystal some day
<cache_over_mem> less rubyish and more luaish
<shevy> one thing that confused me with crystal so far is... the binaries seem huge
<cache_over_mem> he hasnt done tree shaking yet
<cache_over_mem> itll get done soon
jas02 has joined #ruby
<shevy> that was similar to nim ... the hello world example also was big, even after stripping
howdoicomputer has quit [Ping timeout: 250 seconds]
<cache_over_mem> its the whole world tho
charliesome has joined #ruby
[k-_ has joined #ruby
hadrig has quit []
charliesome has quit [Client Quit]
hadrig has joined #ruby
pawnbox has quit [Remote host closed the connection]
<jhass> shevy: I think --release mode shaves off a few bytes, but since we link against a bunch of stuff (gc, unwind, libc at the minimum) that's already like half a meg from the tables and stuff apparently
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ldnunes has joined #ruby
Zai00 has joined #ruby
<jhass> idk, still better than Go I think :P
charliesome has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
dionysus69 has joined #ruby
mices has quit []
mices has joined #ruby
alem0lars has joined #ruby
mices has quit [Changing host]
mices has joined #ruby
johnhamelink has joined #ruby
<certainty> jhass: am i correct that you can't use the entire language inside a macro method?
dasher00 has joined #ruby
<certainty> in crystal that I mean
hadrig has quit [Client Quit]
guardian has quit [Ping timeout: 246 seconds]
ndrei has joined #ruby
<jhass> yes and no, the macro language, that is the part that is evaluated at compile time is quite distinct, more like a template language with AST access if you so will
<yorickpeterse> jhass: not sure if I'd call Crystal better than Go at this point
<jhass> the result of that "template" is fed back into the parser
<jhass> yorickpeterse: just talking about binary size
pwnd_nfsw has joined #ruby
<yorickpeterse> Ah
jdawgaz has joined #ruby
<mices> anyone can help me with rails/nginx
<certainty> jhass: yeah that's how i've pictured it. thanks. A bit unfortunate if you ask me to have two languages basically but there may be some good reasons
greenarrow has quit [Quit: 500]
last_staff has quit [Ping timeout: 265 seconds]
elperdut has joined #ruby
Outlastsheep has joined #ruby
<certainty> interesting language though
<cache_over_mem> mices, #rails
<certainty> i'll read more about it before i judge further
cih has joined #ruby
<jhass> certainty: the main reason is practically, you'd have to either shell out to a new compiler process all the time (and spawning a process is slow) or reimplement an interpreter for the language in parallel. But it also gives a nice visual distinction between runtime and compile time code
cih_ has quit [Read error: Connection reset by peer]
<arup_r> What I will ask here now is not direct Ruby, but related.
<jhass> arup_r: /msg alis help
<shevy> lol
<mices> cache_over_men: there's no such channel and i'm banned from #rubyonrails for asking for help
<certainty> jhass: alright. Scheme for example (at least the syntax-rules system) doesn't use the full language either. The reason there is hygiene though
iamninja has joined #ruby
<arup_r> What is the point of duplicating a method. What is the concept behind it... http://api.rubyonrails.org/classes/Method.html#method-i-duplicable-3F
<shevy> arup_r don't know it but one possibility may be that you can change one method, and retain the old original behaviour from the other one?
<Silex> mices: "banned for asking for help" that sounds very unlikely
aswen has joined #ruby
<shevy> hmm
<mices> Silex: stfu
<shevy> oh wait
<shevy> they mean in regards to .dup
<arup_r> yes
<pontiki> morning o/
<certainty> pontiki: \o
<arup_r> I never saw a `.dup` on methods
greenarrow has joined #ruby
<Silex> ok I just read the backlog, apparently "asking for help" means annoying people with passenger/puma questions and continuing when told to stop
<shevy> ah, you can use .dup for a real copy, e. g. variable = ARGV.first.to_s.dup
solars has quit [Quit: WeeChat 0.4.2]
solars has joined #ruby
<mices> Silex: stfu
<jhass> Silex: more ignoring advice given and repeating the initial (misguided) question instead, from what I've gathered
<shevy> that does away with tainted input!
<mices> piece-a-sh*t
<jhass> mices: watch your languages, see the rules
<Silex> jhass: yeah, and after being helped for like 30 minutes
<jhass> *language
<mices> i don't like people harrassing me
<arup_r> shevy: I know .dup .. Asking what is the point of duping a MethodObject
<jhass> mices: /help ignore
<shevy> arup_r aha, I see. good question... I don't think I have seen that before either
<arup_r> I am not able to imagine a good example on it
<shevy> me neither
<arup_r> This Rails guys do.. anything if Ruby supports :D
<jhass> arup_r: I could picture it as an alternative to alias_method_chain
cantaberry has joined #ruby
cache_over_mem has quit [Ping timeout: 246 seconds]
dhjondoh has quit [Remote host closed the connection]
<arup_r> jhass: you are always awesome! .. Can you throw an example ? About the usefulness of the duplication a MethodObject .. I just want to see an useful example. Something ofcourse is there.. That is why the method is there.. but no example, that is bad! :/
<shevy> but jhass didn't write rails!
radgeRayden has joined #ruby
<arup_r> jhass: `alias_method_chain` dups a method or delegates it
<arup_r> ?
<jhass> arup_r: eh, it does not support duplicating a method at all
<arup_r> :)
<jhass> arup_r: google alias_method_chain, there should be *tons* of blogs explaining its purpose
<Burgestrand> More or less you rename the original method, overwrite it, and then call the original (if needed) with the new name.
<shevy> \o/
<shevy> see arup_r!
goodcodeguy has joined #ruby
<jhass> arup_r: Method#duplicable? is just added by rails to facilitate duck typing upon that property, whether what you got at hand is duplicable or not, it's probably just there for completeness
<[k-_> it's like inheritance and super, but better
<jhass> arup_r: it always returns false
dhjondoh has joined #ruby
<Burgestrand> Nowadays there's #prepend to allow something similar without renaming the original method. In the past you could also do a hack where you get a method handle to the old method, and bind the handle runtime and call afterwards.
dionysus69 has quit [Remote host closed the connection]
krisquigley has joined #ruby
<certainty> you mean by aliasing the old method?
JDiPierro has joined #ruby
mcFactor has quit [Remote host closed the connection]
Igorshp has joined #ruby
<shevy> oh yeah I have seen that old trick a lot, to reference to the old one, then change the copy
<certainty> i never thought about it as a hack
<certainty> i may have to think harder :)
<[k-_> one of the reasons why people do this is to avoid doing expensive computations twice
<jhass> [k-_: is that so? got an example?
wald0 has joined #ruby
<[k-_> you know, those method caches
<jhass> who talked about method caches?
<[k-_> i don't have an example though, unless javascript and stuff
<mices> can anyone help me get my rails app working with nginx
<jhass> besides that term is usually used to refer to the method lookup caches
<[k-_> yes, i meant that i think
<jhass> no, I don't think so, it's a interpreter/VM internal largely
<[k-_> no, i mean caching the results of the computation
<[k-_> memoizing
bruno- has quit [Ping timeout: 240 seconds]
<[k-_> for reuse later
rbennacer has joined #ruby
<jhass> yup, that's not what's usually meant by method caches
abyss__ is now known as abyss
<[k-_> and those lookup table things
<jhass> that's just called memoization
<jhass> method caches are a memoization technique of course, but one used by the VM/interpreter, not user code
polysics has joined #ruby
<certainty> you most likely don't memoize by replacing the method with one that just returns the result because your memoized results might depend on the arguments
<[k-_> sometimes i just | - o - - - - x - - - - - - | miss the spot
dionysus69 has joined #ruby
<Burgestrand> Here's an example of the four methods I mentioned: https://repl.it/BI5H
<[k-_> certainty: if there is a cache miss (the arguments are not considered the same), the old method is called with the new arguments and the result is also stored in the cache
<[k-_> s/miss (the/miss (when the/
<Burgestrand> arup_r: ^ — none of those use Method#dup though.
failshell has joined #ruby
<Burgestrand> And actually, you can't dup Method. :)
<arup_r> Burgestrand: Thank you very much! .. I am looking at it
<Burgestrand> >> method(:puts).dup
<ruboto> Burgestrand # => allocator undefined for Method (TypeError) ...check link for more (https://eval.in/434334)
<certainty> [k-_: yeah exactly. That's why the implementation has to stay the same. It just does the lookup every time to see if there is a cached result
<certainty> btw. that's a good example for the blurry line between data and code
rbennacer has quit [Client Quit]
failshell has quit [Remote host closed the connection]
failshell has joined #ruby
<certainty> the computation is turned into a table lookup
JDiPierro has quit [Remote host closed the connection]
<[k-_> memory in exchange for speed
<shevy> C!
<certainty> ?
<[k-_> well, you need somewhere to store those results!
<certainty> yeah but why C?
<[k-_> and those algorithms arent going to run any faster!
<[k-_> that would be up to shevy to explain
rbennacer has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
k3asd` has joined #ruby
<arup_r> Burgestrand: I am still on prepend method.. reading it.. to understand what the method does
oo_ has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 240 seconds]
<Burgestrand> arup_r: prepend is a relatively new feature of Ruby, it's similar to include, but instead of putting the module behind of the ancestor tree (MyModule -> MyClass), it puts it in front (MyClass -> MyModule)
xfbs has joined #ruby
<arup_r> ok
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<[k-_> your arrows confuse @。@
miguelff has quit [Quit: miguelff]
<shevy> certainty in exchange for speed!!! C is fast!!!!!!!!!!
elfuego has joined #ruby
<jhass> >> module M; end; class Include; include M; end; class Prepend; prepend M; end; [Include.ancestors, Prepend.ancestors]
<pontiki> not enough bangs
<ruboto> jhass # => [[Include, M, Object, Kernel, BasicObject], [M, Prepend, Object, Kernel, BasicObject]] (https://eval.in/434335)
<certainty> shevy: hmm xD
dasher00 has quit [Ping timeout: 240 seconds]
oo_ has joined #ruby
samuel02 has quit [Quit: Connection closed for inactivity]
dhjondoh has joined #ruby
victortyau has joined #ruby
Igorshp has quit [Read error: Connection reset by peer]
krz has joined #ruby
Igorshp has joined #ruby
gwendall has joined #ruby
alexUaN has quit [Remote host closed the connection]
And______ has joined #ruby
cvtsx has quit [Ping timeout: 255 seconds]
oo_ has quit [Remote host closed the connection]
ndrei has joined #ruby
elperdut has joined #ruby
siaw has quit [Quit: siaw]
beast_ has quit [Quit: Leaving]
And______ has quit [Quit: Textual IRC Client: www.textualapp.com]
<arup_r> Burgestrand: got your example
<Burgestrand> arup_r: nice :)
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AndyRyanSmith has joined #ruby
nullwarp has quit [Ping timeout: 246 seconds]
dasher00 has joined #ruby
mjmac has quit [Ping timeout: 246 seconds]
khebbie has quit [Remote host closed the connection]
inteq has quit [Remote host closed the connection]
Balzrael has joined #ruby
rbennacer has quit [Remote host closed the connection]
khebbie has joined #ruby
jhooker has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
goodcodeguy has joined #ruby
bestbrents_ has joined #ruby
sfr^ has quit [Ping timeout: 246 seconds]
k3asd` has quit [Ping timeout: 256 seconds]
EasyCo has quit [Read error: Connection reset by peer]
hahuang61 has joined #ruby
universa1 has quit [Ping timeout: 246 seconds]
EasyCo has joined #ruby
sepp2k has joined #ruby
linc01n has quit [Ping timeout: 246 seconds]
jordanm has quit [Ping timeout: 246 seconds]
wookiehangover has quit [Ping timeout: 246 seconds]
jordanm has joined #ruby
sgambino has joined #ruby
hahuang65 has quit [Ping timeout: 246 seconds]
jimeh has quit [Ping timeout: 246 seconds]
crdpink2 has joined #ruby
crdpink has quit [Ping timeout: 246 seconds]
bestbrents__ has quit [Ping timeout: 246 seconds]
<moeabdol> hello
lokulin has quit [Ping timeout: 246 seconds]
atmosx_laptop has quit [Read error: No route to host]
linuxboytoo has quit [Remote host closed the connection]
jhooker has quit [Ping timeout: 264 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
linuxboytoo has joined #ruby
wookiehangover has joined #ruby
ckinniburgh_ has joined #ruby
decoponio has joined #ruby
nullwarp has joined #ruby
dstarh has joined #ruby
<jhass> hi
jimeh has joined #ruby
tcopeland has joined #ruby
nibbo has joined #ruby
<[k-_> welcome!
universa1 has joined #ruby
linc01n has joined #ruby
fgo has joined #ruby
<Darkwater> greetings
juanpablo_ has joined #ruby
sfr^ has joined #ruby
sfr^ has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
ta has quit [Remote host closed the connection]
sdwrage_ has joined #ruby
mary5030 has joined #ruby
startupality has joined #ruby
lokulin has joined #ruby
AndyRyanSmith has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
juanpablo_ has quit [Ping timeout: 255 seconds]
mices has left #ruby [#ruby]
dionysus69 has joined #ruby
s00pcan has joined #ruby
mary5030 has quit [Remote host closed the connection]
sankaber has joined #ruby
mary5030 has joined #ruby
xfbs has quit []
lkba has quit [Ping timeout: 250 seconds]
CustosL1men has quit [Ping timeout: 250 seconds]
AndyRyanSmith has joined #ruby
yashinbasement has joined #ruby
bmurt has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
AndyRyanSmith has quit [Client Quit]
AndyRyanSmith has joined #ruby
radgeRayden has quit [Ping timeout: 244 seconds]
mary5030 has quit [Ping timeout: 240 seconds]
<tuor> New general question: is it "good"/"ok"/"bad" to use methods to acces and set object variables? Should i have this for all my object variables? (like this: https://gist.github.com/anonymous/2b7e1b224cd04057315f)
<tuor> and use in the same class only the methods and don't acces directly the variable with @myvar
universa1 has quit [Ping timeout: 240 seconds]
<[k-_> it's bad practice to expose all your instance variables
linc01n has quit [Ping timeout: 240 seconds]
<[k-_> and use @myvar, it tells ruby, and everyone else that you are accessing an instance variable
<[k-_> also, it's faster
AndyRyanSmith has quit [Client Quit]
<tuor> [k-_, Ah ok. So only use accessors if it's needed from outside?
sfr^ has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
bruno- has joined #ruby
<jhass> tuor: I kinda flip that on a per class bases. For example if the class has "magical" accessors, that is ones that do things behind the scenes like keeping some related state consistent I usually use the accessors for all public attributes and sometimes even define a couple private ones. If it's a read only class (no setters/writers) I tend to use ivars all the way
<[k-_> use your judgement. Is it better to expose your Social Security Number for other people to handle or do you keep it to yourself and handle it yourself
<jhass> I think you can't derive a dogmatic rule, but you should keep it consistent on a per class basis at last
<tuor> jhass, ok.
<tuor> [k-_, ok.
mjmac has joined #ruby
JDiPierro has joined #ruby
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
hadrig has joined #ruby
karapetyan has joined #ruby
startupality has quit [Ping timeout: 252 seconds]
platzhirsch has joined #ruby
linuxboytoo has quit [Quit: Leaving...]
howdoi has quit [Quit: Connection closed for inactivity]
xfbs has joined #ruby
<tuor> So what I do in the class is up to me, so long I do it the same in the complete class. I give accessors if needed.
bruno- has quit [Ping timeout: 246 seconds]
miguelff has joined #ruby
<[k-_> practise encapsulation
<[k-_> state is kept within a single object, not all around the world
Igorshp has quit [Remote host closed the connection]
xfbs has quit [Client Quit]
ndrei has joined #ruby
<shevy> [k-_ ur face is a state!
sfr^ has joined #ruby
c0m0 has quit [Ping timeout: 246 seconds]
karapetyan has quit [Ping timeout: 256 seconds]
universa1 has joined #ruby
linc01n has joined #ruby
* [k-_ sets expression to "D:"
<shevy> lol
jgt1 has quit [Ping timeout: 252 seconds]
webguynow has quit [Ping timeout: 250 seconds]
Coldblackice has quit [Ping timeout: 250 seconds]
sankaber has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
webguynow has joined #ruby
sankaber has joined #ruby
charliesome has joined #ruby
yashinbasement has quit [Quit: Leaving]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ndrei has quit [Ping timeout: 255 seconds]
Igorshp has joined #ruby
riffraff has joined #ruby
kobain has joined #ruby
elfuego has quit [Quit: elfuego]
megagigawatt has joined #ruby
xfbs has joined #ruby
ndrei has joined #ruby
Swappticon has joined #ruby
khebbie has quit [Remote host closed the connection]
<arup_r> [k-_: I got now what you were talking about regarding the Memoization after reading http://gshutler.com/2013/04/ruby-2-module-prepend/ . Yes the alias_method and #prepend does the same thing -- "Memoization" ... Indeed!!
<shevy> do you people recommend the use of () when we use "if condition and some_other_condition" ? for instance: if (array[0] == 'x') and (array[1] =~ /^\d+$/) versus if array[0] == 'x' and array[1] =~ /^\d+$/
<arup_r> They do cache the result of a method.. and lower the response time or whatever time you call it!
khebbie has joined #ruby
<arup_r> shevy: Don't use () unless you are getting Syntax error from Ruby
<arup_r> :)
<arup_r> I follow this
dionysus69 has quit [Remote host closed the connection]
<arup_r> In nutshell `||=` is the HERO of the story. it seems so
AndyRyanSmith has joined #ruby
jgpawletko has joined #ruby
failshell has quit []
dima__ has joined #ruby
AndyRyanSmith has quit [Client Quit]
<[k-_> shevy: parentheses are noise
nettoweb has joined #ruby
<[k-_> no one uses them in ifs
dhjondoh has quit [Quit: dhjondoh]
<[k-_> unless they run into precedence issues
null__ has quit [Ping timeout: 264 seconds]
null__ has joined #ruby
null__ has quit [Changing host]
null__ has joined #ruby
eGGsha has quit [Max SendQ exceeded]
nibbo has quit [Ping timeout: 250 seconds]
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
nibbo has joined #ruby
aaeron has joined #ruby
atmosx_laptop has joined #ruby
aaeron1 has joined #ruby
havenwood has joined #ruby
Swappticon has quit [Quit: Textual IRC Client: www.textualapp.com]
JoshL has joined #ruby
JDiPierro has quit [Remote host closed the connection]
nettoweb has quit [Read error: Connection reset by peer]
tomaz_b has quit [Ping timeout: 244 seconds]
whippythellama has joined #ruby
Igorshp has quit [Remote host closed the connection]
aaeron has quit [Ping timeout: 265 seconds]
EXID123 has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
<arian0n> hey, what's the difference between "class Foo::Bar; end" and "class Foo; class Bar; end; end"?
hadrig has quit [Read error: Connection reset by peer]
WajidKagzi has joined #ruby
momomomomo has joined #ruby
<WajidKagzi> is there a slack for this channel?
rbennacer has joined #ruby
arup_r has quit []
<[k-_> arian0n: the first requires class/module Foo to be defined first somewhere
hadrig has joined #ruby
miguelff has left #ruby [#ruby]
<[k-_> arian0n: the second one either defines Foo or reopens Foo, so you wont run into errors
vondruch has quit [Quit: Ex-Chat]
<arian0n> thanks!
tkuchiki has joined #ruby
c0m0 has joined #ruby
vipaca has joined #ruby
<momomomomo> lol is there a slack for an open IRC channel
tkuchiki has quit [Remote host closed the connection]
<momomomomo> :|
<apeiros> arian0n: also within class Foo::Bar the constant lookup is different than within class Foo; class Bar
tkuchiki_ has joined #ruby
<apeiros> arian0n: compare:
<apeiros> >> module Foo; A = 1; end; module Foo; class Bar; A; end; end
tagrudev has quit [Ping timeout: 264 seconds]
<ruboto> apeiros # => 1 (https://eval.in/434363)
<apeiros> >> module Foo; A = 1; end; class Foo::Bar; A; end
<ruboto> apeiros # => uninitialized constant Foo::Bar::A (NameError) ...check link for more (https://eval.in/434364)
codenapper has quit [Ping timeout: 264 seconds]
JDiPierro has joined #ruby
tagrudev has joined #ruby
Rickmasta has joined #ruby
codenapper has joined #ruby
riffraff has quit [Quit: Leaving]
gwendall has quit [Remote host closed the connection]
vipaca has quit [Client Quit]
radgeRayden has joined #ruby
Igorshp has joined #ruby
tuxero has joined #ruby
Igorshp has quit [Remote host closed the connection]
p0wn3d_ has joined #ruby
msankhala has quit [Quit: This computer has gone to sleep]
EXID123 has joined #ruby
xaxisx has joined #ruby
msankhala has joined #ruby
felixr has joined #ruby
Burgestrand has quit []
tuxero has quit [Read error: No route to host]
Igorshp has joined #ruby
alexUaN has joined #ruby
tuxero has joined #ruby
msankhala has quit [Client Quit]
EasyCo has quit [Quit: Connection closed for inactivity]
umgrosscol has joined #ruby
ozz has joined #ruby
timonv has quit [Quit: WeeChat 1.3]
timonv has joined #ruby
codenapp_ has joined #ruby
leksster has joined #ruby
juanpablo_ has joined #ruby
allomov has quit [Remote host closed the connection]
Illusioneer has quit [Ping timeout: 255 seconds]
leat1 has joined #ruby
apt-get has quit [Quit: Quit]
timonv has quit [Client Quit]
codenapper has quit [Ping timeout: 240 seconds]
mices has joined #ruby
apt-get has joined #ruby
webguynow has quit [Ping timeout: 272 seconds]
leat has quit [Ping timeout: 256 seconds]
nettoweb has joined #ruby
mices has quit []
JoshL has quit [Read error: No route to host]
JoshL has joined #ruby
webguynow has joined #ruby
jgt1 has joined #ruby
timonv has joined #ruby
juanpablo_ has quit [Ping timeout: 250 seconds]
timonv has quit [Client Quit]
timonv has joined #ruby
hayricicek has quit [Ping timeout: 250 seconds]
leat1 has quit [Ping timeout: 260 seconds]
_hadrig_ has joined #ruby
hadrig has quit [Read error: Connection reset by peer]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_hadrig_ has quit [Client Quit]
<apeiros> I love people who ask questions and part immediately… (15:56 mices has left IRC ())
<tobiasvl> I ignore parts
<tobiasvl> and quits
<tobiasvl> so sometimes I spend time on helping people who are long gone
lxsameer has quit [Quit: Leaving]
<[k-_> sad.
jgpawletko has quit [Quit: jgpawletko]
jas02 has quit [Ping timeout: 272 seconds]
mr_dev has left #ruby [#ruby]
leat1 has joined #ruby
apt-get has quit [Quit: Quit]
apt-get has joined #ruby
<[k-_> Oxdea!
chills42 has quit [Remote host closed the connection]
nateberkopec has joined #ruby
<tobiasvl> Ox0dea: niiiiiiice
<Ox0dea> [k-_oyaanisqatsi!
Igorshp has quit [Remote host closed the connection]
<Ox0dea> tobiasvl: I'll refrain from pointing out that that feature is in WeeChat out of the box. :P
<tobiasvl> good ;)
karapetyan has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
polysics has quit []
<Ox0dea> [k-_: Have you seen Koyaanisqatsi?
apt-get_ has joined #ruby
<[k-_> no
<[k-_> are you saying that im unbalanced? :(
<[k-_> and that english is in a horrible mess?
<Ox0dea> [k-_: No? You've just been on about global warming and the like as of late.
<[k-_> and a deeper meaning relating to english is in a horrible mess?
bigbadbear has joined #ruby
<Ox0dea> The film has virtually nothing to do with the English language.
jgpawletko has joined #ruby
apt-get has quit [Ping timeout: 240 seconds]
Illusioneer has joined #ruby
<tobiasvl> literally nothing.
mary5030 has joined #ruby
<[k-_> Reggio explained the lack of dialogue by stating "it's not for lack of love of the language that these films have no words. It's because, from my point of view, our language is in a state of vast humiliation.
<suchness> Or ruby
<Ox0dea> Wow, much suchness.
<Ox0dea> Many "you're not wrong".
<Ox0dea> Wow.
vondruch has joined #ruby
<[k-_> such suchness would be alliteration
<[k-_> Also, stop global warming, today!
Pupeno has quit [Remote host closed the connection]
beauby has joined #ruby
Pupeno has joined #ruby
juanpablo_ has joined #ruby
leat1 has quit [Remote host closed the connection]
dopamean_ has quit [Ping timeout: 252 seconds]
leat1 has joined #ruby
mary5030 has quit [Ping timeout: 246 seconds]
jas02 has joined #ruby
khebbie has quit [Remote host closed the connection]
miguelff has joined #ruby
bentanweihao has joined #ruby
megagigawatt has quit [Remote host closed the connection]
jas02 has quit [Client Quit]
jas02 has joined #ruby
Pupeno has quit [Ping timeout: 246 seconds]
<jhass> apeiros: ignore mices, complete help vampire, got a +b from #RubyOnRails from it
leat1 has quit [Ping timeout: 240 seconds]
hashrocket has joined #ruby
baroquebobcat has joined #ruby
chills42 has joined #ruby
towski_ has joined #ruby
CHVNX has left #ruby [":)"]
jas02 has quit [Ping timeout: 240 seconds]
oo_ has joined #ruby
<apeiros> jhass: yeah, I remembered baweaver complaining. I was actually quite curios :)
baroquebobcat has quit [Ping timeout: 240 seconds]
codenapp_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
* adaedra pokes the channel
vipaca has joined #ruby
vipaca has quit [Max SendQ exceeded]
krz has quit [Ping timeout: 240 seconds]
bruno- has quit [Ping timeout: 256 seconds]
MichaelSmith has joined #ruby
* jhass imagines 1000 people poking adaedra back
skade has quit [Quit: Computer has gone to sleep.]
SenpaiSilver_ has joined #ruby
pawnbox has quit [Ping timeout: 246 seconds]
<adaedra> How horrifying
dasher00 has quit [Read error: Connection reset by peer]
jdawgaz has joined #ruby
Igorshp has joined #ruby
ozz has quit [Quit: Lost terminal]
SenpaiSilver_ has quit [Client Quit]
pawnbox has joined #ruby
SenpaiSilver_ has joined #ruby
<Lovich> hey
<[k-> hey
<adaedra> hej
<Lovich> will any of you non-gender-specific people help me with something
Igorshp has quit [Remote host closed the connection]
krisquigley has quit [Remote host closed the connection]
dede__ has quit [Quit: Connection closed for inactivity]
* adaedra tries its new mind-reading powers to guess what is the problem
<adaedra> er
<adaedra> his
<Ox0dea> The problem is a lie.
kies^ has joined #ruby
<adaedra> People do that?
<adaedra> Go to the internet and just tell lies?
dionysus69 has joined #ruby
<[k-> indeed they do
<Lovich> ive used gender neutral pronouns
<Lovich> no need to get up in arms
<adaedra> Shocking!
<adaedra> Lovich: yet it miss an important thing: a question.
<Lovich> how do i do that thing in ruby
SenpaiSilver_ has quit [Quit: Leaving]
<havenwood> !ban Lovich !P trolling
Lovich was banned on #ruby by ChanServ [Lovich!*@*]
Lovich was kicked from #ruby by ChanServ [Banned: trolling]
<havenwood> \o
<adaedra> hi havenwood
nateberkopec has quit [Read error: Connection reset by peer]
SenpaiSilver has joined #ruby
<havenwood> adaedra: good mornin'
cgfbee has quit [Ping timeout: 252 seconds]
cfloare has quit [Ping timeout: 264 seconds]
xet7 has quit [Quit: Leaving]
Burgestrand has joined #ruby
kies^ has quit [Ping timeout: 255 seconds]
TheHodge has joined #ruby
anjen has joined #ruby
aganov has quit [Remote host closed the connection]
<adaedra> My mind powers are broken. :(
webguynow has quit [Ping timeout: 246 seconds]
<[k-_> dont u use a crystal ball
<havenwood> Some of us do.
tagrudev has quit [Remote host closed the connection]
<adaedra> No, I use a ruby ball.
<adaedra> :3
webguynow has joined #ruby
araujo has quit [Quit: Leaving]
<Ox0dea> [k-_: Tell me how finishing SICP will make me a Legilimens.
dopamean_ has joined #ruby
<[k-_> define SICP
nateberkopec has joined #ruby
<Ox0dea> Wat.
<[k-_> define Legilimens
<Ox0dea> A Legilimens is somebody who can read minds.
<Ox0dea> Like Professor Snake.
<adaedra> So wise, Ox0dea
<Ox0dea> [k-_: There is a wizard using a crystal ball as his compiler on the cover of *Structure and Interpretation of Computer Programs*.
<adaedra> Wait, "Professor Snake"?
cgfbee has joined #ruby
cfloare has joined #ruby
krz has joined #ruby
<yorickpeterse> SNAKE?
<yorickpeterse> SNAKKKEE?
<[k-_> i probably was supposed to read that
<yorickpeterse> SNAAAAAAAAAAAKEEEEEE
emilkarl has quit [Quit: emilkarl]
<[k-_> a scheme book?
<[k-_> yes, i was supposed to read some scheme books
<Ox0dea> [k-_: That it uses Scheme is largely immaterial.
<jhass> adaedra: rollings k key probably was broken due to typing her name too often so she went for p
<adaedra> :D
<Ox0dea> Well, at least misspelling it "Rolling" will get people to pronounce it correctly.
<[k-_> rho-lings
<[k-_> roll-ings
uri_ has joined #ruby
<[k-_> hmm
<adaedra> Even if I know it more by the name "Rogue", but whatever
<adaedra> Time for lessons
centrx has joined #ruby
webguynow has quit [Ping timeout: 264 seconds]
redondo has quit [Quit: redondo]
rippa has joined #ruby
Pupeno has joined #ruby
<yorickpeterse> adaedra: (͡° ͜ʖ ͡°) lessons eh?
webguynow has joined #ruby
<[k-_> ¯\_(ツ)_/¯
redondo has joined #ruby
karapetyan has quit [Remote host closed the connection]
khebbie has joined #ruby
<Ox0dea> Kono otoko.
<shevy> Katana Pyjama.
<yorickpeterse> croissant
<Ox0dea> Esta chico.
mary5030 has joined #ruby
<shevy> hmm
codeurge has joined #ruby
<shevy> would it not be este chico and esta chica?
polishdub has joined #ruby
<Ox0dea> It would not.
luksaur has joined #ruby
<Ox0dea> Scratch that; you're totally right.
<Ox0dea> "This" is an adjective. :/
eminencehc has joined #ruby
<Ox0dea> In "this guy", anyhow.
skullcrasher has quit [Remote host closed the connection]
bruno- has joined #ruby
Zarthus has quit [Quit: ZNC 1.7.x-git-196-5faaf67 - http://znc.in]
<Ox0dea> Gracias, Señor Esqueleto.
<shevy> \o/ 20 years after school I still remember spanish
towski_ has quit [Remote host closed the connection]
<yorickpeterse> you had spanish classes when you were 1?
<yorickpeterse> ᕕ(ᐛ)ᕗ
<shevy> but everyone uses english anyway
dionysus69 has quit [Ping timeout: 255 seconds]
kies^ has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> yorickpeterse don't you dutch people learn how to count!
<platzhirsch> yorickpeterse: drop the silly emoticon
<shevy> you only learn dam building and muay thai :(
<yorickpeterse> platzhirsch: NEVAR
<platzhirsch> silly yorick
Zarthus has joined #ruby
<yorickpeterse> shevy: nfi how old you are so no idea
<yorickpeterse> but I can assure you we do learn how to count
<yorickpeterse> 1, 2, 5, 42, etc
<shevy> past a certain age it is very impolite to ask for the age
<yorickpeterse> wow you're that old?
tjohnson has joined #ruby
<yorickpeterse> : D
dorei has joined #ruby
chouhoulis has joined #ruby
<yorickpeterse> Ox0dea: totally planned that
inteq has joined #ruby
anisha has quit [Quit: Leaving]
alexUaN has quit [Quit: alexUaN]
krisquigley has joined #ruby
r_baron has joined #ruby
xet7 has joined #ruby
FernandoBasso has quit [Quit: Leaving]
yardenbar has quit [Ping timeout: 255 seconds]
cschneid_ has joined #ruby
khebbie has quit [Remote host closed the connection]
arup_r has joined #ruby
dionysus69 has joined #ruby
krisquig_ has joined #ruby
momomomomo has quit [Quit: momomomomo]
krisquigley has quit [Ping timeout: 260 seconds]
r_baron has quit [Ping timeout: 256 seconds]
r_baron has joined #ruby
miguelff has quit [Quit: miguelff]
allcentury has joined #ruby
karapetyan has joined #ruby
oo_ has quit [Remote host closed the connection]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shmilan has joined #ruby
baroquebobcat has joined #ruby
<[k-_> 2,9,42,42,5
<bazbing80> could someone explain how a module can provide a method but not contain it? And how would I find the class that does contain said method? https://gist.github.com/anonymous/ed7fced52dbde5cd36f9
soulcake has quit [Quit: Quack.]
Igorshp has joined #ruby
<Burgestrand> bazbing80: for one you want to look at instance_methods, not methods.
<Burgestrand> There's ways to conceal the true implementation of things, one is by using method_missing.
<[k-_> that's the number of sequences oeis contains!
<Burgestrand> (but people like me will be slightly sad because it's useful to look at the source of something)
<bazbing80> Burgestrand: I know, right?!
<Burgestrand> pry usually is good at finding the source of a method.
<bazbing80> the good folks at rpsec have also split rspec into multiple gems so c-tags is now utterly useless in finding out how it all works x/
karapetyan has quit [Remote host closed the connection]
<bazbing80> Burgestrand: ah yes, heard good thinks about pry
karapetyan has joined #ruby
Gnomethrower has quit [Quit: Textual IRC Client: www.textualapp.com]
<Ox0dea> >> Array.instance_method(:reduce).owner # bazbing80
<ruboto> Ox0dea # => Enumerable (https://eval.in/434412)
<adaedra> yorickpeterse: yes, lessons for driver license. Exiting, uh?
<karapetyan> hi there can anyone offer algorithm?
<karapetyan> 1 1 1 1 1
<Ox0dea> adaedra: You should not exit the motor vehicle while it is in motion.
leat1 has joined #ruby
<karapetyan> 2 1 1 1
<karapetyan> 2 2 1
yeticry has quit [Read error: Connection reset by peer]
aaeron1 has quit [Ping timeout: 246 seconds]
<adaedra> Ox0dea: so wise
<karapetyan> 3 1 1
<karapetyan> 3 2
<karapetyan> 5
elfuego has joined #ruby
<karapetyan> 1 1 1 1 1 - input data )
<[k-_> so, you want to show all the intermediatary steps?
<karapetyan> yes
<bazbing80> da fuq...
<Ox0dea> karapetyan: How did you get from `2 2 1` to `3 1 1`?
<[k-_> how on earth does 2 2 1 become 3 1 1 though
<[k-_> Ox0dea: we think alike!
<Ox0dea> I'll phone the authorities.
<Ox0dea> <3
<karapetyan> 2 + 1, 1, 1
<[k-_> Ox0dea: do you think this can be done with a scanl?
<karapetyan> = 3, 1 ,1, 1
<[k-_> karapetyan: no, you are subtracting 1 from 2
<[k-_> and shifting it to 3
<[k-_> which makes no sense
<Ox0dea> [k-_: That's exactly what scanl is for, right?
<[k-_> Ox0dea: it keeps a running total though, so not really like this sort of doing the small additions first
<Ox0dea> Well, the running "total" could be a list.
<[k-_> the running total is a list...
programm1 is now known as programmerq
araujo has joined #ruby
araujo has quit [Max SendQ exceeded]
<karapetyan> [k-_: don't understand. If i substract 1 from 2 there will be -1 ?
<Ox0dea> >> 2 - 1 # karapetyan
<ruboto> Ox0dea # => 1 (https://eval.in/434417)
<Ox0dea> [k-_: fibs = scanl (+) 0 (1:fibs)
<Ox0dea> That's my exposure to scanl. :P
<gregf_> >> >> ("1" * 5).split(//).map(&:to_i).reduce(:+)
<ruboto> gregf_ # => /tmp/execpad-6427eadade28/source-6427eadade28:2: syntax error, unexpected >> ...check link for more (https://eval.in/434419)
CustosL1men has joined #ruby
<gregf_> >> ("1" * 5).split(//).map(&:to_i).reduce(:+)
<ruboto> gregf_ # => 5 (https://eval.in/434420)
<gregf_> haha
yeticry has joined #ruby
<Ox0dea> gregf_: #chars is a thing.
<gregf_> >>("1" * 5).chars.map(&:to_i).reduce(:+)
Rickmasta has quit [Quit: Textual IRC Client: www.textualapp.com]
<ruboto> gregf_ # => 5 (https://eval.in/434423)
momomomomo has joined #ruby
<Ox0dea> gregf_: You realize you're not actually addressing karapetyan's problem?
Luun has joined #ruby
<gregf_> Ox0dea: i know ;)
<karapetyan> so, i ve got next code%
<gregf_> Ox0dea: that algorithm looks suspicious :|
<Ox0dea> gregf_: So that was just noise for noise's sake?
rubie has joined #ruby
<[k-_> 2 2 1 → (2+1) (2-1) 1 → 3 1 1
<[k-_> but it does not make sense why you transfer the one to the other
<[k-_> i would expect 2 3 → 5 or 4 1 → 5
<bazbing80> Burgestrand: just wondering, how can a module be already initialized when you call it?
momomomomo has quit [Client Quit]
<gregf_> the calculation changes based on something like even and odd numbers in the set?
<Burgestrand> bazbing80: What do you mean?
<karapetyan> i have a probably bad idea make overcoded version. Where i will have duplicates, store it in hash, and then make uniq! but it's probably not best solution.
<gregf_> if ( even ){ (n+n+1) 1 ) } else { n+1 n-1 1 }
<[k-_> Ox0dea: tell me what's wrong with the given code link above
<Ox0dea> [k-_: karapetyan's Gist?
webguynow has quit [Ping timeout: 260 seconds]
<karapetyan> Ox0dea: yes.
<karapetyan> already sent it ^^
<[k-_> indeed
webguynow has joined #ruby
<[k-_> gregf: wouldn't 2 1 1 1 → 3 1 1 then?
<Ox0dea> [k-_: I suspect ?xy.
<karapetyan> [k-_: oh, there comment: if i make decomposition for 5 there will never be 2 + 2 + 1 in this case
David27 has joined #ruby
<[k-_> it's the rabbit problem!
radgeRayden_ has joined #ruby
CustosL1men has quit [Ping timeout: 240 seconds]
<bazbing80> Burgestrand: I worked it out, no worries :P thanks again
dopamean_ has quit [Ping timeout: 256 seconds]
tatsuo has quit [Quit: Leaving...]
<[k-_> karapetyan: gist the whole process of adding again
<[k-_> we are confuzzled
dionysus69 has quit [Ping timeout: 240 seconds]
dopamean_ has joined #ruby
<gregf_> karapetyan: how did you reach the conclusion that thats how the result's derived?
SCHAAP137 has quit [Remote host closed the connection]
<[k-_> Ox0dea: no, that is different from his problem
<karapetyan> ok, give me a time to finish that version and i show you example there i can see troubles in output
ta has joined #ruby
<karapetyan> *you
araujo has joined #ruby
araujo has quit [Max SendQ exceeded]
wildlander has joined #ruby
wildlander has quit [Max SendQ exceeded]
<Ox0dea> [k-_: I can't find anything else called The Rabbit Problem.
<gregf_> [2, 3, 4, 5].map{ |x| tot = 1; while ( x > 1 ); tot *= x; x-=1;end; tot } <= fibonacci?
<platzhirsch> meow
radgeRayden has quit [Ping timeout: 244 seconds]
wildlander has joined #ruby
<Ox0dea> gregf_: That's (really bad) factorial, no?
<gregf_> oops; sorry fact ;)
<jhass> platzhirsch: more like hirschkatze then?
<Ox0dea> >> [2,3,4,5].map { |n| (1..n).reduce :* } # This is how we do factorial in Ruby, gregf_.
<ruboto> Ox0dea # => [2, 6, 24, 120] (https://eval.in/434437)
<[k-_> Ox0dea: Rabbit.new
<Ox0dea> [k-_: Carrot.hide!
uri_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<gregf_> Ox0dea: timtoady ;)
karapetyan has quit [Remote host closed the connection]
<Ox0dea> gregf_: But not really this time.
<Ox0dea> gregf_: Keep your explicit while loops to yourself.
freerobby has quit [Quit: Leaving.]
<[k-_> maybe that's what he is trying to do
<Ox0dea> [k-_: So 5 = 4?
freerobby has joined #ruby
ndrei has quit [Ping timeout: 260 seconds]
<[k-_> that was an accident
<shevy> lol
Spami has joined #ruby
JDiPierro has quit [Remote host closed the connection]
Burgestrand has quit []
webguynow has quit [Ping timeout: 240 seconds]
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dopamean1 has joined #ruby
<adaedra> def 5; 4; end
JDiPierro has joined #ruby
JDiPierro has quit [Remote host closed the connection]
<shevy> is this legal
<Ox0dea> Semantically, but not syntactically.
JDiPierro has joined #ruby
webguynow has joined #ruby
<Ox0dea> >> define_method(?5) { 4 }; send ?5
<ruboto> Ox0dea # => 4 (https://eval.in/434438)
<shevy> ewww
<Ox0dea> You asked.
<shevy> didn't you dislike ? there
dopamean_ has quit [Ping timeout: 250 seconds]
<[k-_> according to this magazine, this is called number theory
bentanweihao has quit [Remote host closed the connection]
<[k-_> number partitioning
Alina-malina has quit [Ping timeout: 246 seconds]
<gregf_> [2, 3, 4, 5].map { |x| arr= [1,1]; while x > arr.first; arr<<arr[-1]+arr[-2];x-=1;end; p arr } <== fibo ^^ Ox0dea its ugly i know :/
AndyRyanSmith has joined #ruby
<[k-_> wikipedia agrees
<shevy> I wrote wikipedia!
<[k-_> keep your ugly loops to yourself
<[k-_> ruby is a high level language!
<shevy> gregf_ they don't like your while :(
<adaedra> if only we could have high level discussions.
<[k-_> ?rimshot
JoshL has quit []
<[k-_> who uses a while in a map anyway
<Ox0dea> Monsters.
<shevy> lol
<gregf_> [k-_: i dont ;). just bored writing java ;)
blackjid has quit [Max SendQ exceeded]
Alina-malina has joined #ruby
VeryBewitching has joined #ruby
blackjid has joined #ruby
ivanf has quit [Ping timeout: 250 seconds]
sshuff|gone is now known as sshuff
livathinos has quit [Ping timeout: 246 seconds]
<Papierkorb> My attempt: 10.times.each_with_object([1, 1]){|_, arr| arr << arr[-1] + arr[-2]}
<[k-_> fibo 0 = 0; fibo 1 = 0; fibo !n = fibo (n-2) + fibo (n-1)
livathinos has joined #ruby
<[k-_> that is what high level people do!
<gregf_> ooo recursion++
<[k-_> fibo starts with 0!
_aeris_ has quit [Ping timeout: 264 seconds]
<[k-_> fibo 0 = 0 is a hack, sadly
Macaveli has joined #ruby
ivanf has joined #ruby
Macaveli has quit [Client Quit]
araujo has joined #ruby
araujo has joined #ruby
kies^ has quit [Ping timeout: 264 seconds]
AndyRyanSmith has quit [Quit: Textual IRC Client: www.textualapp.com]
andyrs has joined #ruby
_aeris_ has joined #ruby
xcesariox has joined #ruby
<Ox0dea> Don't breathe this: https://eval.in/434440
bentanweihao has joined #ruby
Macaveli has joined #ruby
baroquebobcat has quit [Read error: Connection reset by peer]
andikr has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
<[k-_> high level code!
gregf_ has quit [Ping timeout: 250 seconds]
<[k-_> good job, Ox0dea
tkuchiki_ has quit [Remote host closed the connection]
pietr0 has joined #ruby
<[k-_> not to mention it is lazily generated
<[k-_> and serves as a lookup table
<[k-_> imagine all the benefits!
<Ox0dea> There's a much better way to do that, though.
gregf_ has joined #ruby
<Ox0dea> I just like that you can open the singleton class of something you just assigned.
neanderslob has quit [Ping timeout: 272 seconds]
pawnbox has quit [Remote host closed the connection]
SlenderMan has joined #ruby
<[k-_> provide an example
<Ox0dea> See above?
iceyec has joined #ruby
neanderslob has joined #ruby
<Ox0dea> `def fib.next` defines the #next method in fib's singleton class.
Neverdie has joined #ruby
bentanweihao has quit [Ping timeout: 265 seconds]
<[k-_> i meant, the much better way
<Ox0dea> Oh, Hash.new with a fancy default_proc.
xet7 has quit [Quit: Leaving]
aswen has quit [Ping timeout: 260 seconds]
andyrs has quit [Quit: Textual IRC Client: www.textualapp.com]
nateberkopec has quit [Quit: Leaving...]
<Sou|cutter> Ox0dea: that is neat :)
<Ox0dea> Sou|cutter: Best to forget what you saw, honestly. :P
rubie has quit [Remote host closed the connection]
bb010g has quit [Quit: Connection closed for inactivity]
<Papierkorb> https://eval.in/434449 ?
<Sou|cutter> well I wouldn't USE that, maybe ever, but still neat
Tingo1983 has joined #ruby
pawnbox has joined #ruby
<[k-_> we have already seen that
jdawgaz has joined #ruby
<Ox0dea> >> fib = Hash.new { |h, k| h[k] = k < 2 ? k : h[k - 2] + h[k - 1] }; [fib[10], fib] # [k-_
<ruboto> Ox0dea # => [55, {0=>0, 1=>1, 2=>1, 3=>2, 4=>3, 5=>5, 6=>8, 7=>13, 8=>21, 9=>34, 10=>55}] (https://eval.in/434451)
Tingo1983 has quit [Client Quit]
<shevy> when [k-_ and Ox0dea are online at the same time, ruby code will become very obscure quickly
<[k-_> it's interesting how 1+2+3+4+5+6+7+8+9+10=55 as well
<[k-_> and the 10th term of the fib sequence is 55
<Ox0dea> S' gotta be aliems.
nettoweb has quit [Ping timeout: 240 seconds]
pontiki has joined #ruby
dionysus69 has joined #ruby
nettoweb has joined #ruby
ghosTzin has joined #ruby
shmilan has quit [Ping timeout: 240 seconds]
Alayde has joined #ruby
webguynow has quit [Ping timeout: 250 seconds]
greenarrow has quit [Quit: 500]
amclain has joined #ruby
towski_ has joined #ruby
webguynow has joined #ruby
eminencehc has quit [Remote host closed the connection]
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
rodfersou has quit [Quit: leaving]
eminencehc has joined #ruby
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skullcrasher has joined #ruby
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dionysus69 has quit [Read error: Connection reset by peer]
rubie has joined #ruby
<Ox0dea> [3] pry(main)> 100000.times.select { |n| fib[n] == fac[n] }
<Ox0dea> Killed
<shevy> poor thread
<Ox0dea> Shame. Even with both memoized. :/
codeurge has joined #ruby
codeurge has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
<[k-_> 100000 is a bit big...
<Ox0dea> >> 100000.odd?
<ruboto> Ox0dea # => false (https://eval.in/434454)
tuxero has quit [Quit: tuxero]
hyanW has joined #ruby
<Ox0dea> I like the part where I thought I correctly read what you said before I cleared the buffer.
eminencehc has quit [Remote host closed the connection]
gregf_ has quit [Ping timeout: 260 seconds]
jxv has joined #ruby
shinnya has joined #ruby
nettoweb has quit [Ping timeout: 255 seconds]
<Ox0dea> [k-_: It only holds for n = 1. :/
<Ox0dea> We need to contact the folks that operate Tianhe-2.
gregf_ has joined #ruby
webguynow has quit [Ping timeout: 252 seconds]
r_baron has quit [Ping timeout: 264 seconds]
kies^ has joined #ruby
webguynow has joined #ruby
<Ox0dea> Or just a numberologizer.
<WajidKagzi> cool nick
<[k-_> try summation
<Ox0dea> I did.
<Ox0dea> It grows too slowly.
dionysus69 has quit [Ping timeout: 252 seconds]
agent_white has joined #ruby
casadei_ has joined #ruby
<Ox0dea> And of course factorial grows much too quickly.
<Ox0dea> What would * and + name their child?
youngbaks has joined #ruby
<jhass> ·
<pontiki> Susan
havenwood has joined #ruby
mleung has joined #ruby
<tobiasvl> starsterisk
<havenwood> Splatiplus Maximus
<Ox0dea> tobiasvl: Bit redundant?
<tobiasvl> uh yeah. that was dumb
<tobiasvl> but splatiplus, now that's genius
<Ox0dea> It's quite good.
youngbaks has quit [Read error: Connection reset by peer]
youngbaks has joined #ruby
anjen has quit [Quit: anjen]
dionysus69 has joined #ruby
saltsa has quit [Ping timeout: 250 seconds]
elperdut has joined #ruby
timonv has quit [Ping timeout: 256 seconds]
atomical has joined #ruby
rubie has quit [Remote host closed the connection]
codenapper has joined #ruby
rubie has joined #ruby
dionysus69 has quit [Ping timeout: 256 seconds]
baweaver has joined #ruby
yardenbar has joined #ruby
<[k-_> it would be **
dionysus69 has joined #ruby
<Ox0dea> [k-_: I was more asking what's the "middle ground" between addition and multiplication.
dfockler has joined #ruby
codenapper has quit [Client Quit]
<shevy> DIVISION
Neverdie has quit [Quit: http://radiux.io/]
<[k-_> 6 + 6 = 12; 6 * 6 = 36; (36 + 12)/2 = 24; 2 + 4 = 6
<[k-_> i have successfully won the internet
Lucky__ has joined #ruby
krz has quit [Ping timeout: 265 seconds]
<WajidKagzi> BTW
<WajidKagzi> Interview question
<WajidKagzi> Divide numbers without using modulo operator in ruby
<[k-_> 7 + 7 = 14; 7 * 7 = 49; (14 + 49) / 2 = 31; 3 + 1 = 4; 4 + 3 = 7
<WajidKagzi> any takers?
<[k-_> i win it again!
bricker has joined #ruby
senayar has quit [Ping timeout: 246 seconds]
<[k-_> WajidKagzi: 5.fdiv 5
<[k-_> >> 5.fdiv 5
<ruboto> [k-_ # => 1.0 (https://eval.in/434469)
baweaver has quit [Remote host closed the connection]
<[k-_> i win!
<havenwood> WajidKagzi: I don't ever use module to divide. You want modulo without using modulo?
<havenwood> s/module/modulo
<havenwood> WajidKagzi: Say more about the task?
<havenwood> >> 5.modulo 2
<ruboto> havenwood # => 1 (https://eval.in/434470)
<havenwood> ^ no modulo operator
felixrsmith has joined #ruby
bluOxigen has joined #ruby
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
<havenwood> I suppose if you get help with the interview question it's more likely you'll seek help with other problems.
felixr has quit [Ping timeout: 256 seconds]
<[k-_> wouldn't dividing be some sort of bit shift
youngbaks has quit [Ping timeout: 246 seconds]
<Ox0dea> [k-_: Only division by powers of 2.
<havenwood> WajidKagzi: Assuming you're allowed to ask, say more about what you want to do. Example inputs with expected output would help.
Hounddog has quit [Read error: Connection reset by peer]
<Ox0dea> WajidKagzi: You're aware that multiplication is just repeated addition, I trust?
<Ox0dea> By that logic, division is just ___.
bluOxigen has quit [Read error: No route to host]
dionysus69 has quit [Remote host closed the connection]
<[k-_> repeated negation! /s
rakm has joined #ruby
<Zarthus> Ox0dea: adding negative values to eachother?
atmosx_laptop has quit [Quit: Lost in trance]
eminencehc has joined #ruby
<dfockler> All math is just addition!
<Zarthus> minus itself is also just repeated addition ;)
<[k-_> indeed
<dorei> division is repeated substruction :p
shredding has quit [Ping timeout: 240 seconds]
<dfockler> substraction is addition negated
<dorei> ie repeated additiion :)
bluOxigen has joined #ruby
<[k-_> division is * x^-1
spider-mario has joined #ruby
<Ox0dea> I'm pretty sure everything is just concatenation.
<havenwood> cat
weemsledeux has joined #ruby
<dfockler> all atoms are just taking and receiving electrons
scottschecter has joined #ruby
dionysus69 has joined #ruby
<Ox0dea> dfockler: Too high-level.
<dfockler> or low-level
<Ox0dea> No?
<havenwood> Maybe we should add cat to un.rb...
saltsa has joined #ruby
<Ox0dea> Odd it's not in there already.
<Ox0dea> Run, cat, run!
<havenwood> I'd like to be able to: ruby -run cat
<Ox0dea> See above.
<pontiki> alias cat='echo "**NOPE**"'
cih has quit [Read error: Connection reset by peer]
rakm has quit [Client Quit]
cih has joined #ruby
<havenwood> pontiki: On OX X: alias cat="unalias cat && echo \"=^.^=\" && say --voice=\"Pipe Organ\" \"$(yes meow | head -n 33)\""
xfbs has quit []
[k-_ has quit [Quit: Lingo: www.lingoirc.com]
krisquig_ has quit [Remote host closed the connection]
dopamean1 has quit [Ping timeout: 240 seconds]
<havenwood> I think I'll do that at work today when someone steps away. Leave no trace!
<pontiki> lol
<pontiki> i'mma try that
clebrun has joined #ruby
dopamean_ has joined #ruby
Neverdie has joined #ruby
FernandoBasso has joined #ruby
krz has joined #ruby
towski_ has quit [Remote host closed the connection]
<pontiki> hahahaha
rakm has joined #ruby
senayar has quit []
<pontiki> need more pipe organ
<havenwood> pontiki: And right after a which cat: /bin/cat
<havenwood> pontiki: Wiping it further from history is probably a bad idea since I don't actually want freaking out and drive formatting. :P
rehat has joined #ruby
mprelude has quit [Ping timeout: 256 seconds]
<WajidKagzi> havewood: yes it is repeated addition
<WajidKagzi> but there would be some cases (negative) numbers that i dont want to deal with
<havenwood> WajidKagzi: So repeated subtraction until when?
<WajidKagzi> i was thinking of doing with shift operators
casadei_ has quit [Ping timeout: 244 seconds]
<WajidKagzi> the methods i define in my object have to cover all edge cases
miguelff has joined #ruby
<WajidKagzi> it was a question i was asked in one of my interviews.
<pontiki> what was your answer?
<WajidKagzi> i used the repeated addition and subtraction but didnt cover the edge cases.
dionysus69 has quit [Ping timeout: 272 seconds]
ngscheurich has joined #ruby
<Ox0dea> WajidKagzi: What edge cases?
<WajidKagzi> negative integers
<WajidKagzi> fractions
c0m0 has quit [Ping timeout: 265 seconds]
<Ox0dea> Those aren't edge cases.
<Ox0dea> They're not corner cases either.
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
<WajidKagzi> oh really?
<WajidKagzi> :(
petricore has joined #ruby
<clebrun> how do you update a single hash value and have it return the whole mutated hash? for example, have foo[:bar] = 1 return { bar: 1 } with the rest of foo.
<WajidKagzi> well suffice it to say i didnt get hired, hehe
<pontiki> you find yourself in a circular room. go to the corner.
<Ox0dea> clebrun: Use the #tap method.
dmolina has quit [Quit: Leaving.]
<WajidKagzi> how would you go about it 0x0dea
<clebrun> 0x0dea: thanks, I'll look into it
paulcsmith has joined #ruby
SCHAAP137 has joined #ruby
Rurik has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
ndrei has joined #ruby
fantazo has joined #ruby
<shevy> hey he called you 0x0dea :)
<clebrun> i'll put it up here if I work it out
<clebrun> got it
casadei_ has joined #ruby
<clebrun> foo.tap { |self| self[:baz] = 1 }
<clebrun> haha
amoeba` has left #ruby [#ruby]
<clebrun> sneaky sneaky. just reinstalled irssi and for some reason tab completion for names isn't working
<clebrun> just assumed it was 0x
<Ox0dea> clebrun: It would be if it were permitted. Sorry for the confusion.
<clebrun> it's all good, thanks for the tip
amargherio has joined #ruby
<Ox0dea> WajidKagzi: Do you promise you're not trying to cheat on your homework?
<clebrun> btw just in case anyone else wants to use this, I'm using this to mutate hashes for testing.
<shevy> mutant hashes!
<clebrun> so fixture = factory.tap { |self| insert_incorrect_data(self) }
<clebrun> having that on 2 lines bugged the sh*t out of me
leat1 has quit [Ping timeout: 264 seconds]
dima__ has quit [Quit: This computer has gone to sleep]
<Ox0dea> clebrun: Best not to use `self` as a variable name, mind.
<dorei> clebrun: aint hashes mutable by default?
Rurik has joined #ruby
Rurik has joined #ruby
howdoicomputer has joined #ruby
tkuchiki has joined #ruby
<Ox0dea> dorei: Yes, but clebrun wants to do his mutating on a single line.
<dorei> why 'in' is a keyword in ruby? :(
amoeba` has joined #ruby
<Ox0dea> dorei: `for i in (1..10)`
<dorei> is anyone using for? :O
<clebrun> Ox0dea: normally wouldn't, but for illustrative purposes
<Ox0dea> clebrun: Hm?
<dorei> in is a really good name for variables, now i have to resort to names as _in or input
stan has quit [Ping timeout: 244 seconds]
<clebrun> Ox0dea: use self as a var
crimsonskies has joined #ruby
<crimsonskies> hi
<crimsonskies> what do you remember about math?
<Ox0dea> clebrun: Well, because `self` tends to mean something very different in Ruby, and you oughtn't shadow it needlessly.
nettoweb has joined #ruby
marius has joined #ruby
tkuchiki has quit [Ping timeout: 250 seconds]
<clebrun> Ox0dea: true, true
<clebrun> crimsonskies: almost nothing except that 2+2=5 and I love big brother
<Ox0dea> clebrun: It's unlikely to bite you in so limited a scope as a block, but probably best avoided nonetheless.
shinnya has quit [Ping timeout: 250 seconds]
<clebrun> O also that might be confusing because your dealing with self inside a block, so wouldn't self be tap anyway?
<clebrun> Ox0dea: tab completion ^
<WajidKagzi> hahaha OxOdea
<WajidKagzi> funny guy
<Ox0dea> WajidKagzi: I think you probably are. :P
<WajidKagzi> i wish
<WajidKagzi> nah im a junior dev learning my ways around emberjs
<Ox0dea> WajidKagzi: You wish you were trying to cheat on your homework?
webguynow has quit [Ping timeout: 240 seconds]
pwnd_nfsw has quit [Ping timeout: 246 seconds]
<WajidKagzi> i wish i was still in high school
n008f4g_ has joined #ruby
webguynow has joined #ruby
<gregf_> haha
Igorshp has quit [Remote host closed the connection]
lkba has joined #ruby
<eam> WajidKagzi: no problem, go to a community college
<clebrun> not greendale tho
<gregf_> Ox0dea: and a guy :/. i thought g**s? was kinda banned on here :/
dumdedum has quit [Quit: foo]
<WajidKagzi> hahha
saddad has joined #ruby
<WajidKagzi> i will figure it out on my own
<gregf_> WajidKagzi: whats your actual question tho'?
Igorshp has joined #ruby
<Ox0dea> WajidKagzi: https://eval.in/434487
karapetyan has joined #ruby
fostertheweb has joined #ruby
dionysus69 has joined #ruby
tuxero has joined #ruby
[Butch] has joined #ruby
<[k-> he called you OxOdea!
<[k-> that's as invalid as it gets
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<gregf_> Ox0dea: how can you use while?
Jardayn has joined #ruby
* [k- emergency rescues Ox0dea
<Ox0dea> Danke, [k-.
<gregf_> warum?
<[k-> gregf_, in this case, that was not exclusion, unless Ox0dea doesn't think of himself as a guy
<[k-> that would be mislabelling then
krisquigley has joined #ruby
<Ox0dea> WajidKagzi: Do you understand how it works?
ramfjord has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
dionysus69 has quit [Ping timeout: 246 seconds]
Zai00 has quit [Quit: Zai00]
crimsonskies has quit [Ping timeout: 246 seconds]
da3mian has quit [Quit: Leaving]
skade has joined #ruby
khebbie has joined #ruby
miguelff has quit [Quit: miguelff]
<moeabdol> in rspec3 how to check if two arrays have the same elements in the same order?
Rurik has quit [Read error: Connection reset by peer]
Rurik has joined #ruby
Rurik has quit [Changing host]
Rurik has joined #ruby
shadoi has joined #ruby
khebbie has quit [Remote host closed the connection]
leat1 has joined #ruby
eminencehc has quit [Remote host closed the connection]
<Ox0dea> moeabdol: That's how equality is defined for Arrays.
Guest50 has joined #ruby
hanmac has quit [Ping timeout: 246 seconds]
iateadonut has quit [Quit: Leaving.]
jschoolcraft has quit [Quit: peace]
<moeabdol> Ox0dea: so i simple expect(array1).to eq(array2)
webguynow has quit [Ping timeout: 240 seconds]
WajidKagzi has quit [Ping timeout: 272 seconds]
webguynow has joined #ruby
FernandoBasso1 has joined #ruby
karapetyan has joined #ruby
stamina has quit [Quit: WeeChat 1.3]
prestorium has joined #ruby
lsmola has quit [Ping timeout: 244 seconds]
gwendall has joined #ruby
devoldmx has joined #ruby
FernandoBasso has quit [Ping timeout: 255 seconds]
WajidKagzi has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
chipotle_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
podman has joined #ruby
<Ox0dea> WajidKagzi: Please confirm that you have learned.
mhib has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
leat1 has quit [Remote host closed the connection]
petricore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> Clear conscience (Y/n)?
leat1 has joined #ruby
dmolina has joined #ruby
fgo has quit [Quit: WeeChat 1.1.1]
pandaant has quit [Remote host closed the connection]
TheRinger has quit [Quit: Konversation terminated!]
hostess_ is now known as hostess
marius has quit [Ping timeout: 240 seconds]
cih has quit [Remote host closed the connection]
webguynow has quit [Ping timeout: 250 seconds]
hanmac has joined #ruby
greenarrow has joined #ruby
webguynow has joined #ruby
ndrei has joined #ruby
f4cl3y has quit [Ping timeout: 246 seconds]
chipotle has joined #ruby
cisco has joined #ruby
sshuff is now known as sshuff|gone
chipotle_ has quit [Read error: Connection reset by peer]
towski_ has joined #ruby
andyrs has joined #ruby
dmolina has quit [Quit: Leaving.]
eminencehc has joined #ruby
amargherio has quit [Ping timeout: 244 seconds]
andyrs has quit [Client Quit]
andyrs has joined #ruby
sdwrage_ has quit [Quit: Leaving]
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
ht__ has joined #ruby
postmodern has joined #ruby
kobain has quit [Ping timeout: 250 seconds]
casadei_ has quit [Ping timeout: 246 seconds]
ndrei has quit [Ping timeout: 250 seconds]
cvtsx has joined #ruby
krisquigley has quit [Remote host closed the connection]
amargherio has joined #ruby
<WajidKagzi> oh cool
<WajidKagzi> thnk you 0x0dae
<WajidKagzi> oxdea
<WajidKagzi> ugh, 0x0dea
aswen has joined #ruby
da3mian has joined #ruby
BlackCoyote has joined #ruby
<shevy> lol
SenpaiSilver has quit [Quit: Leaving]
<shevy> thanks OxOdea
radgeRayden_ has quit [Ping timeout: 265 seconds]
siemprefresco has joined #ruby
I has joined #ruby
BlackCoyote has quit [Read error: Connection reset by peer]
I is now known as Guest92969
karapetyan has quit [Remote host closed the connection]
butch128 has joined #ruby
butch128 has left #ruby [#ruby]
butch128 has joined #ruby
amargherio has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 272 seconds]
danieli has joined #ruby
karapetyan has joined #ruby
Igorshp has quit [Remote host closed the connection]
<butch128> There is a function call in activerecord... .order(mycol: :desc) - if i wanted to call with these parameters dynamically.. how would I do this? .order(myvar: myvar2) doesn't work
<adaedra> .order ({ myvar => myvar2 })
<butch128> ahh, is that all it is? a hash?
<butch128> thanks!
s2013 has joined #ruby
<adaedra> yep, you're actually using a syntaxic sugar for generating a hash
<Ox0dea> And adaedra showed you how to salt it.
<adaedra> also, forget the silly space I added before the (
<Ox0dea> And the curly braces.
<adaedra> Derp
<adaedra> Ox0dea: hungry?
<Ox0dea> adaedra: Superfluous curly braces are syntactic salt, I think.
<adaedra> I don't know why I thought them to be compulsory there
<Ox0dea> In your defense, that the final argument can be an implicit Hash is a little strange.
<Ox0dea> Might even be unique to Ruby?
<adaedra> it's nice to use, but yes, a bit strange indeed
kobain has joined #ruby
eminencehc has quit [Remote host closed the connection]
cvtsx1 has joined #ruby
<adaedra> and now that you can mix them with labelled parameters...
eminencehc has joined #ruby
siemprefresco has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mhib has quit [Ping timeout: 272 seconds]
cvtsx has quit [Ping timeout: 240 seconds]
petricore has joined #ruby
senayar has joined #ruby
nateberkopec has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
aaeron has joined #ruby
petricore has quit [Client Quit]
fostertheweb has quit [Ping timeout: 250 seconds]
drewvanstone has joined #ruby
Beoran has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cvtsx has joined #ruby
howdoicomputer has quit [Ping timeout: 272 seconds]
cvtsx1 has quit [Ping timeout: 246 seconds]
mhib has joined #ruby
havenwood has joined #ruby
aaeron has quit [Quit: Leaving.]
dionysus69 has joined #ruby
siemprefresco has joined #ruby
rdark has quit [Quit: leaving]
webguynow has quit [Ping timeout: 246 seconds]
webguynow has joined #ruby
kgirthofer has quit [Remote host closed the connection]
nofxx has joined #ruby
s2013 has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
<shevy> keep it simple people
bruno- has quit [Ping timeout: 264 seconds]
<butch128> +1
darkf has quit [Quit: Leaving]
cvtsx1 has joined #ruby
pwnd_nfsw has joined #ruby
s2013 has quit [Read error: Connection reset by peer]
havenwood has quit [Ping timeout: 250 seconds]
<pipework> Keep it, simple people.
cvtsx has quit [Ping timeout: 265 seconds]
jhn has joined #ruby
allomov has joined #ruby
aaeron has joined #ruby
<shevy> ruby ranks fifth \o/
havenwood has joined #ruby
<karapetyan> shevy: ruby was higher befre?
<karapetyan> *before?
<shevy> don't think so
sixty4k_ has joined #ruby
<shevy> it has ranked higher on github before but that was when it had less competition among github and github-based projects
sixty4k_ has quit [Max SendQ exceeded]
chipotle has quit [Read error: Connection reset by peer]
beauby has quit [Ping timeout: 264 seconds]
suchness has quit [Remote host closed the connection]
<karapetyan> shevy: ok :) well, than it's good news. More ruby - projects mean more job for ruby developers :) And if developer can write on ruby it's one more reason to be happy)
ramfjord has joined #ruby
Pupeno has quit [Remote host closed the connection]
baweaver has joined #ruby
maletor has joined #ruby
allomov has quit [Ping timeout: 265 seconds]
karapetyan has quit [Remote host closed the connection]
<shevy> php ranks before ruby
joshyjosh_ has joined #ruby
WajidKagzi has quit [Ping timeout: 264 seconds]
<butch128> php... my day job... ruby... my fun (job)
<butch128> i hate php
<butch128> no hate is strong... i do not enjoy using it
<tobiasvl> i hate php too
Musashi007 has joined #ruby
<joshyjosh_> Ruby not that good career wise?
<tobiasvl> installed python flask on my webserver and broke routing to my old php site
<tobiasvl> I could probably fix it
<tobiasvl> but
howdoicomputer has joined #ruby
<tobiasvl> I'll just scrap it all
<butch128> naw, tons of headhunters contact for ruby... but none pay the same
<miah> lets keep php hate in #ruby-offtopic
Zai00 has joined #ruby
sampc has joined #ruby
<miah> you can trash ruby there too
<shevy> this is another nice graph: http://blog.codeeval.com/codeevalblog/2015#.VfmwWs89MWM=
<shevy> I don't know why python exploded
<Ox0dea> It's being taught in schools.
<bougyman> 3/21
<eam> google
<eam> and rhel
<shevy> what are the rhel people doing? using python?
<joshyjosh_> rhel?
<joshyjosh_> scratch that googled it
otacon- has quit [Ping timeout: 260 seconds]
<centrx> yeah everyone knows PHP rulez
Lumio has joined #ruby
WajidKagzi has joined #ruby
howdoicomputer has quit [Ping timeout: 255 seconds]
<wmoxam> meh, you can get shit done with pretty much anything. Just use what you enjoy and forget about what everyone else uses :p
<shevy> perl is declining wmoxam
<eam> shevy: in relative or absolute terms?
bluOxigen has quit [Ping timeout: 260 seconds]
joshyjosh has joined #ruby
cih has joined #ruby
<eam> I don't think *any* language is declining in absolute terms
<wmoxam> shevy: meh
<wmoxam> people get stuff done with it
<shevy> eam yeah, absolute is hard to say, but relatively for sure
<wmoxam> and some really enjoy it. Yay!
pragmatism has joined #ruby
The_Phoenix has joined #ruby
yfeldblum has joined #ruby
<nofxx> github is getting flooded with Go too nowdays
<nofxx> never touched
chipotle has joined #ruby
baweaver has quit [Remote host closed the connection]
<shevy> I guess we'll have to wait with Go until something really big is written in it
The_Phoenix has quit [Client Quit]
WajidKagzi has quit [Ping timeout: 240 seconds]
symm- has joined #ruby
sampc has quit [Read error: Connection reset by peer]
cih has quit [Ping timeout: 256 seconds]
<joshyjosh_> where would one go for rake error questions? Been doing the "Learn Ruby the Hard Way" guide adn been having trouble with testing code.
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
banjara has joined #ruby
freezevee has joined #ruby
Guest92969 has quit [Quit: Leaving]
shinnya has joined #ruby
dopie has joined #ruby
WajidKagzi has joined #ruby
beauby has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ruby-lang600 has joined #ruby
<ruby-lang600> Hello there
<shevy> joshyjosh_ you could try here, not everyone knows a lot about rake though
<nofxx> shevy, which is sad, rake is so nice. Could have more love.
Musashi007 has quit [Quit: Musashi007]
chipotle has quit [Read error: Connection reset by peer]
aaeron has quit [Quit: Leaving.]
havenwood has quit [Ping timeout: 246 seconds]
<ruby-lang600> hey guys
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dorei> i have this alias for bash, alias rake='bundle exec `which rake`'
aaeron has joined #ruby
<ruby-lang600> could anyone spare a couple of minutes to help me out please?
chipotle has joined #ruby
s2013 has joined #ruby
<nofxx> dorei, add ruby bin on your LOAD_PATH
<nofxx> dorei, ~/.gem/ruby/x.x.x/bin
<dorei> hmm, which rake isnt needed
<nofxx> ruby-lang600, just ask
<dorei> i'm removing the which from my alis
<dorei> alias
<ruby-lang600> ok
<nofxx> dorei, yup, will be not. That actually won't work anyways. (if it's not on your load_path)
aaeron has quit [Client Quit]
<ruby-lang600> just a brief context: today i enrolled myself in a startup incubation program
tomaz_b has joined #ruby
<ruby-lang600> and I have 11 weeks to develop a web application
<ruby-lang600> which I intend to do in RoR
Zai00 has quit [Quit: Zai00]
kirun has joined #ruby
<dorei> nofxx: i'm using rvm, so if it's not in my load_path, then something is wrong
<ruby-lang600> I started this monday and have been struggling to get the basics the last 3 days
<ruby-lang600> I can already perform basic tasks like getting input from users, parsing info and storing in database
bougyman has quit [Ping timeout: 256 seconds]
<ruby-lang600> but for the rest of the week I would like to give some attention to the layout
UtkarshRay has quit [Quit: Leaving]
andyrs has quit [Quit: gone to sleep. ZZZzzz…]
<ruby-lang600> i have no experience in bootstrap
Zai00 has joined #ruby
<ruby-lang600> and i am in doubt whether to buy a bootstrap theme and go from there
drager has left #ruby [#ruby]
<nofxx> dorei, Ah can't help, sorry. Don't use and recommend against rvm.
<ruby-lang600> i found one template which i really like but doesn't user LESS or SSAS
<dorei> nofxx: rvm is awesome :)
<ruby-lang600> so my first question is where should i start to grasp into the basics of building the web front for my app?
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<nofxx> dorei, the software might be. The reason to use it nil.
mhib has quit [Read error: Connection reset by peer]
<nofxx> ruby-lang600, not sure right channel here. More like backend talk here. Anyways, there's plenty of css2sass converters
money2burn is now known as speakingcode
havenwood has joined #ruby
segfalt has quit [Ping timeout: 240 seconds]
krisquigley has joined #ruby
<ruby-lang600> which channel should i go for some assistance?
<ruby-lang600> i just installed colloquy so..
segfalt has joined #ruby
<nofxx> Good question. Dunno what's the css channel on freenode. ruby-lang600 check the channel search
Musashi007 has joined #ruby
aaeron has joined #ruby
jas02 has joined #ruby
xfbs has joined #ruby
otacon- has joined #ruby
sampc has joined #ruby
dfockler has quit [Remote host closed the connection]
andyrs has joined #ruby
Rurik has quit [Read error: Connection reset by peer]
Rurik has joined #ruby
Rurik has quit [Changing host]
Rurik has joined #ruby
krisquigley has quit [Ping timeout: 264 seconds]
jahpereira has joined #ruby
s2013 has quit [Read error: Connection reset by peer]
<jahpereira> hey there
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
<jahpereira> could someone spare a couple of minutes to give me a hand?
<jahpereira> i have been learning ruby for the last couple of days
Guest50 has joined #ruby
<jahpereira> and now i am struggling to get the front end of my web app
<wasamasa> we're all waiting for the actual question
<jahpereira> but have no clue where to start
<jahpereira> i have no experience in bootstrap
jas02 has quit [Ping timeout: 265 seconds]
<jahpereira> with bootstrap*
jdawgaz has joined #ruby
<jahpereira> so my question is whether u recommend me to buy an existing bootstrap template and try to glue it to my controllers (already did some stuff there)
<jahpereira> or how should i start to understand how bootstrap templates (or others) work with ruby?
urubuz has joined #ruby
ruby-lang600 has quit [Quit: Page closed]
eminencehc has quit [Remote host closed the connection]
<jgt1> how do I access an instance variable of a parent class?
shortdudey123 has quit [Ping timeout: 250 seconds]
<wasamasa> jgt1: buy?
<wasamasa> err, jahpereira
<jgt1> :P
<wasamasa> jahpereira: you can buy bootstrap templates?
<jahpereira> you mean if i have financial conditions to do that
<Ox0dea> jgt1: foo.superclass.instance_variable_get, but there's no way that's what you actually want.
<wasamasa> jahpereira: no, I did assume so far that you download bootstrap to not have to pay for pretty decent base styling
shortdudey123 has joined #ruby
<wasamasa> jahpereira: so this sounds very foreign to me
<jgt1> Ox0dea: yeah, that doesn't sound right
<jahpereira> hum
senayar has quit [Remote host closed the connection]
<Ox0dea> jgt1: Are you sure you want to muck about in some other object's instance variables?
<jahpereira> i saw some examples which used bootstrap
ndrei has joined #ruby
<jgt1> I *think* so…
<wasamasa> jahpereira: I did never use anything else than their stock templates
<jahpereira> let me see
<jahpereira> like these ones? http://www.bootstrapzero.com/templates/stock
phutchins has quit [Ping timeout: 252 seconds]
tylerflint has joined #ruby
tylerflint has left #ruby [#ruby]
<wasamasa> no, these: http://themes.getbootstrap.com/
xfbs has quit []
<wasamasa> or rather, just the default one
<wasamasa> you know, the one you get when hitting the download button on http://getbootstrap.com/
<jahpereira> these are free?
<joshyjosh_> ayup
<jahpereira> oh they aren't
<jahpereira> just clicked on one
<wasamasa> I did just notice their other themes aren't free either
<wasamasa> oh well
shortdudey123 has quit [Ping timeout: 246 seconds]
<jahpereira> lol
xfbs has joined #ruby
<wasamasa> so, if you don't want to design yourself or shell out some money, the default theme is pretty fine to get something basic going
Pupeno has joined #ruby
WajidKagzi has quit [Ping timeout: 265 seconds]
<wasamasa> heck, it shouldn't matter at all if you're learning
nofxx has quit [Ping timeout: 240 seconds]
SOLDIERz has joined #ruby
<wasamasa> so, your question was about where to start?
siemprefresco has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rurik has quit [Read error: Connection reset by peer]
siemprefresco has joined #ruby
Rurik has joined #ruby
skullcrasher has quit [Remote host closed the connection]
nofxx has joined #ruby
Igorshp has joined #ruby
<wasamasa> well, set up your application, add the css and js to wherever it belongs, tweak the views to make use of the css classes and js blingbling
<wasamasa> you shouldn't spend most of your time with this
shortdudey123 has joined #ruby
jackjackdripper has joined #ruby
aswen has quit [Ping timeout: 260 seconds]
clebrun has quit [Quit: leaving]
bruno- has joined #ruby
aaeron has quit [Quit: Leaving.]
shortdudey123 has quit [Excess Flood]
<jahpereira> hum
<jahpereira> sorry for the delay
<jahpereira> actually the second link i shared had free tempaltes
<jahpereira> just got a cool navigation bar
shortdudey123 has joined #ruby
<jahpereira> :D
jackjackdripper has quit [Client Quit]
xfbs has quit []
jackjackdripper has joined #ruby
platzhirsch has left #ruby [#ruby]
xfbs has joined #ruby
aaeron has joined #ruby
<jahpereira> hum
<jahpereira> but reading the readme file donest give my any clue that this can be used with rails
chipotle has quit [Read error: Connection reset by peer]
Zai00 has quit [Quit: Zai00]
khebbie has joined #ruby
BLuEGoD has quit [Remote host closed the connection]
miguelff has joined #ruby
khebbie has quit [Remote host closed the connection]
beauby has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
chipotle has joined #ruby
<wasamasa> I'd be concerned if it couldn't
youngbaks has joined #ruby
<jahpereira> hum
<wasamasa> apparently you're pretty new to this
BLuEGoD has joined #ruby
<wasamasa> web development covers quite a lot of bases, so please don't forget practicing the basics of everything
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
siemprefresco has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
havenwood has quit [Ping timeout: 265 seconds]
decoponio has quit [Quit: Leaving...]
WajidKagzi has joined #ruby
elperdut has joined #ruby
<jahpereira> i will
<jahpereira> just rusty that’s all
<jahpereira> last time i worked with a MVC framework
<jahpereira> was 7 years ago with cake php
miguelff has quit [Quit: miguelff]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wasamasa> ok then
<pipework> Did it make you fat and give you diabetes?
dfockler has joined #ruby
<jahpereira> noep
<wasamasa> I've met quite a few PHP folks who had to relearn everything they thought they knew about web development
<wasamasa> always funny
<jahpereira> :)
<wasamasa> "What do you mean, you can write code that doesn't make your eyes bleed?"
<jahpereira> ahahaha
<jahpereira> yoep, ruby seems quite intuitibe
<adaedra> "What do you mean, you don't need to install Apache to run an application"
<jahpereira> intuitive*
<pipework> "How do I set up ruby with apache?" "Don't. A+ easy"
<wasamasa> well, it's less intuitive and more that you actually have a chance of just taking any rails project and customizing it to fulfil that pet peeve you've got
<wasamasa> it's an amazing feeling
jhooker has joined #ruby
sgambino has quit [Read error: Connection reset by peer]
<jahpereira> i see
<wasamasa> if I tried doing that with wordpress, oh well, better not
<jahpereira> alright
beauby has joined #ruby
<jahpereira> i will try railsforzombies for the next couple of hours
<jahpereira> to relax a bit
weemsledeux has joined #ruby
<pipework> jahpereira: Ruby also isn't riddled with preserving backwards compatible security problems.
<shaman42_> lets not argue about what programming language is the best, every language has it uses.
<wasamasa> jahpereira: try the rails channel, too
<Ox0dea> shaman42_: When should I use brainfuck?
<pipework> shaman42_: Some are just best left to the trash bin.
<jahpereira> cool
<pipework> Ox0dea: When 90% of your keyboard doesn't work.
<shevy> ruby is best
<jahpereira> thank you @wasamasa
<wasamasa> Ox0dea: design of cutting edge compilers/interpreters
<shaman42_> for example php, best is when you were in 2003
<wasamasa> Ox0dea: I wish I was kidding
<Ox0dea> Well, shit. That's two decent answers.
<Ox0dea> wasamasa: Nah, it actually makes sense.
<wasamasa> Ox0dea: I've seen two blog posts on the topic and it was nice that you could comprehend them for a change
baweaver has joined #ruby
<pipework> Brainfuck++ is nice if you need networking and only have your 10-digit keypad handy
chipotle has quit [Read error: Connection reset by peer]
<Ox0dea> wasamasa: That's one of the ones you had in mind, I imagine?
<wasamasa> Ox0dea: no, that's the third one
foobar121 has joined #ruby
<Ox0dea> Ah, that's one very specific to brainfuck, though.
<Ox0dea> The one I linked goes into IR and whatnot.
skade has quit [Quit: Computer has gone to sleep.]
<Ox0dea> This one looks really good.
chipotle has joined #ruby
<foobar121> So I found a job description that requires the ideal candidate to be able to process tens of billions of "combinations" per second. Am I living under a rock or is this impossible?
<pipework> foobar121: I think they just mean someone with a brain that functions.
platzhirsch has joined #ruby
* wasamasa gasps
Musashi007 has quit [Quit: Musashi007]
<joshyjosh_> friggin a gotta get that brain process-o-meter
<foobar121> I was assuming they meant "be able to write a program that does this", not "be able to do this with your brain"
skade has joined #ruby
<foobar121> but even so, i'm pretty sure the fastest processor in the world is only like 8.5Ghz
<shevy> >> x = 'abc'; x.lchop
<ruboto> shevy # => undefined method `lchop' for "abc":String (NoMethodError) ...check link for more (https://eval.in/434532)
kadoppe has quit [Ping timeout: 250 seconds]
<Ox0dea> shevy: You want #ltrim there.
<shevy> hmm... we have .chop; do we have a method that chops on the left side?
<shevy> aha!
<Ox0dea> Or not.
<Ox0dea> :(
<joshyjosh_> aight i got that rake error:
<joshyjosh_> Command failed with status (1): [ruby -I"lib:tests" "/home/[username]/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/rake_test_loader.rb" "tests/test_NAME.rb" ]
<Ox0dea> shevy: #lstrip.
jenrzzz has joined #ruby
<Ox0dea> Mind, #chop and #strip do different things.
<shevy> ah well
<shevy> I was so excited when .lchop worked in irb... then I realized, I added it :(
<Ox0dea> You need to remove a newline from the left...?
skade has quit [Client Quit]
<Ox0dea> Oh, sorry; I'm thinking of #chomp.
<shevy> nah, just chop off leading characters; I have a lot of code where I do things like: x[0,1] == '' if x[0,0] == 'A'
<shevy> and other code like: x[0,0] = 'abc' - the latter ones I can replace via .prepend
<Ox0dea> But... all of these methods take an argument.
siemprefresco has joined #ruby
<Ox0dea> I lied.
<shevy> I even used to have things like: x[-'abc'.size,'abc'.size'] == 'abc' or something like that... until I found out that we have .start_with? and .end_with?
kadoppe has joined #ruby
<Ox0dea> That reminds me of using [min, foo, max].sort[1] to clamp.
foobar121 has quit [Quit: Leaving]
eminencehc has joined #ruby
youngbaks has quit [Quit: WeeChat 1.3]
gix has joined #ruby
dc_ has joined #ruby
dc_ has quit [Remote host closed the connection]
WajidKagzi has quit [Ping timeout: 255 seconds]
andyrs has quit [Read error: Connection reset by peer]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bougyman has joined #ruby
apt-get has joined #ruby
isabelle has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
apt-get_ has quit [Ping timeout: 246 seconds]
<wasamasa> Ox0dea: wat
radgeRayden has joined #ruby
<Ox0dea> wasamasa: For limiting a value to some range?
cih has joined #ruby
Zai00 has joined #ruby
<wasamasa> Ox0dea: you didn't, like, uh
<wasamasa> >> x = 0.5; [1, [0, x].max].min
<ruboto> wasamasa # => 0.5 (https://eval.in/434533)
<Ox0dea> That's pretty unpleasant, in my opinion.
<Ox0dea> >> [0, 1, 0.5].sort[1]
David27 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<ruboto> Ox0dea # => 0.5 (https://eval.in/434534)
jas02 has joined #ruby
dfockler has quit [Remote host closed the connection]
rakm has joined #ruby
WajidKagzi has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
davedev24 has joined #ruby
s2013 has joined #ruby
zoo-zed has joined #ruby
cih has quit [Ping timeout: 250 seconds]
<wasamasa> Ox0dea: you CPU cycles waster!
fantazo has quit [Quit: Verlassend]
havenwood has joined #ruby
<Ox0dea> Y'got me.
<Ox0dea> Ruby's sort is pretty heavily optimized, for what that's worth.
SOLDIERz has quit [Quit: Lingo: www.lingoirc.com]
<wasamasa> I doubt you can beat two comparisons with it
tvw has quit [Read error: Connection reset by peer]
<wasamasa> anyways, I didn't think of that way of solving it
jahpereira has quit [Quit: jahpereira]
jas02 has quit [Ping timeout: 256 seconds]
andyrs has joined #ruby
x-light has joined #ruby
blackmesa has joined #ruby
chipotle has joined #ruby
nettoweb has joined #ruby
aaeron has quit [Quit: Leaving.]
eosinx has joined #ruby
miguelff has joined #ruby
zoo-zed has quit [Quit: Textual IRC Client: www.textualapp.com]
sgambino has joined #ruby
eosinx has quit [Quit: ~ Trillian - www.trillian.im ~]
tkuchiki has joined #ruby
Igorshp has quit [Remote host closed the connection]
casadei_ has joined #ruby
opensource_ninja has joined #ruby
aaeron has joined #ruby
WajidKagzi has quit [Ping timeout: 264 seconds]
ht__ has quit [Quit: Konversation terminated!]
x-light has quit [Ping timeout: 246 seconds]
krz has quit [Quit: WeeChat 1.2]
jamesaxl has joined #ruby
karapetyan has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
<wasamasa> wat
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Jackneill has joined #ruby
<Ox0dea> "Modern miracle" would be an insult to their ops team.
urubuz has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
<platzhirsch> Anyone here who's working for Facebook by any chance?
<wasamasa> anyone working at facebook would be too busy to answer
aaeron has quit [Quit: Leaving.]
<wasamasa> if anything, you'll get recruited if you don't go at them yourself
<Ox0dea> I think SPJ interacts with #haskell now and again.
* wasamasa almost got recruited for an internship in hamburg
eminencehc has quit [Remote host closed the connection]
Eddieh_ has joined #ruby
opensource_ninja has quit [Quit: opensource_ninja]
<shevy> for facebook?
<wasamasa> yeah
xfbs has quit []
s2013 has quit [Read error: Connection reset by peer]
jhooker has quit [Read error: Connection reset by peer]
eminencehc has joined #ruby
<platzhirsch> what? No, this is not about recuriting/recuritment
WajidKagzi has joined #ruby
xfbs has joined #ruby
havenn has joined #ruby
Coldblackice has joined #ruby
hahuang61 has quit [Quit: WeeChat 1.3]
baweaver has joined #ruby
hahuang65 has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
jhooker has joined #ruby
havenwood has quit [Ping timeout: 244 seconds]
aaeron has joined #ruby
chills42_ has joined #ruby
* wasamasa yawns
allomov has joined #ruby
sepp2k has quit [Quit: Leaving.]
voltalio has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
chills42 has quit [Ping timeout: 244 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wald0 has quit [Quit: Lost terminal]
chipotle has joined #ruby
<joshyjosh_> any tips on getting internships?
chills42_ has quit [Ping timeout: 260 seconds]
xfbs has quit []
<havenn> >> 'tips'.intern
<ruboto> havenn # => :tips (https://eval.in/434570)
postmodern has quit [Remote host closed the connection]
cornerma1 has joined #ruby
radgeRayden has quit [Ping timeout: 246 seconds]
radgeRayden has joined #ruby
<havenn> joshyjosh_: Where are you looking? In-person or remote or either?
mikelodeon has joined #ruby
krz has joined #ruby
jhooker has quit [Read error: Connection reset by peer]
xfbs has joined #ruby
<pipework> joshyjosh_: Almost invariably, be really charismatic, quick to say that you don't know but can know in short order, and to have github projects.
s2013 has joined #ruby
jhooker has joined #ruby
cornerman has quit [Ping timeout: 265 seconds]
cornerma1 is now known as cornerman
miguelff has quit [Ping timeout: 255 seconds]
<joshyjosh_> id go for either, but prefer local, kinda see how a dev team works.
s2013 has quit [Read error: Connection reset by peer]
<joshyjosh_> hmm, should get some projects going for github. need something other than a to-do list
postmodern has joined #ruby
<eam> joshyjosh_: contribute to someone else's project, something people would recognize in an interview
<ytti> starting is PITA
<eam> if you can't think of anything to add/fix, write docs
<ytti> should make some personal rules
<ytti> that every day you write code for 1h
<ytti> no exceptions
<eam> well, no uncaught exceptions
mikelodeon has quit [Ping timeout: 250 seconds]
t3rm has joined #ruby
miguelff has joined #ruby
<joshyjosh_> kidna am doing the 1 hour+ a day code thing. Problem is i've been diving alot into books and not into projects themselves. Guess next big thing is getting to better grips with github.
Oka has joined #ruby
radgeRayden has quit [Ping timeout: 246 seconds]
St1gma has quit [Ping timeout: 250 seconds]
andyrs has quit [Quit: I'm leaving now, bye.]
Rickmasta has joined #ruby
zero_drool has joined #ruby
<havenn> joshyjosh_: Where is local for you?
eminencehc has quit [Remote host closed the connection]
<joshyjosh_> Slovenia, Ljubljana
paulcsmith has quit [Ping timeout: 240 seconds]
moeabdol1 has joined #ruby
rakm has joined #ruby
<joshyjosh_> could travel round the country a bit though
tejasmanohar has joined #ruby
moeabdol has quit [Ping timeout: 240 seconds]
eminencehc has joined #ruby
n_blownapart has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
miguelff has quit [Quit: miguelff]
nateberkopec has quit [Quit: Leaving...]
gp5st has joined #ruby
sampc has left #ruby ["Saliendo"]
beauby has quit [Ping timeout: 240 seconds]
<gp5st> is there a well-known dataframes implementation like R's or Pandas (Python)?
sepp2k has joined #ruby
nateberkopec has joined #ruby
<gp5st> (I know libraries exist, but I don't know how common, stable, or well-used they are)
<Ox0dea> gp5st: https://github.com/v0dro/daru appears to be the most active.
<gp5st> Ox0dea: thanks
FernandoBasso1 has quit [Quit: Leaving]
<Ox0dea> Sure thing.
Rickmasta has quit [Quit: Textual IRC Client: www.textualapp.com]
<Ox0dea> That the usage documentation is in IPython notebooks is disheartening.
diegoviola has joined #ruby
t3rm has quit [Quit: Textual IRC Client: www.textualapp.com]
jhooker has quit [Ping timeout: 272 seconds]
momomomomo has joined #ruby
chipotle has joined #ruby
<gp5st> :)
<gp5st> I've recently started using ipython and it's quite nice
WajidKagzi has quit [Ping timeout: 255 seconds]
butch128 has left #ruby [#ruby]
twodayslate has joined #ruby
<gp5st> sadly Ruby and I lost our passion when I was hired to work on a rails app that made me cry. I would like to spend some time to see what's changed, as this was at the 1.8-1.9 era
<twodayslate> does alias_method run no matter what?
<Ox0dea> twodayslate: What do you suppose might stop it from doing so?
<twodayslate> if I have an if statement surround it Ox0dea
WajidKagzi has joined #ruby
renderf__ has joined #ruby
<twodayslate> nevermind
<Ox0dea> twodayslate: Nothing runs in the conditional branch that doesn't get taken.
sixty4k_ has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
karapetyan has quit [Remote host closed the connection]
chipotle has joined #ruby
<twodayslate> how do I prevent alias_method from running twice?
<Ox0dea> You shouldn't have to bother?
renderfu_ has quit [Ping timeout: 252 seconds]
dfockler has joined #ruby
sixty4k_ has quit [Quit: Textual IRC Client: www.textualapp.com]
sixty4k_ has joined #ruby
isabelle has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
momomomomo has quit [Quit: momomomomo]
maletor has quit [Quit: Computer has gone to sleep.]
gregf has quit [Quit: WeeChat 1.3]
<twodayslate> it appears to be. works the first time file is loaded, then when loaded again I get a stack level too deep error
<twodayslate> will continue to investigate
<eam> interestingly "Nothing runs in the conditional branch that doesn't get taken." means you can create local variables without assigning to them
<Ox0dea> >> destroy the universe and other bad things if false
<ruboto> Ox0dea # => nil (https://eval.in/434606)
<Ox0dea> Phew.
hal_9000 has quit [Quit: hal_9000]
<eam> >> x = 1 if false; x.inspect
<ruboto> eam # => "nil" (https://eval.in/434608)
<Ox0dea> >> x = local_variables
<ruboto> Ox0dea # => [:x] (https://eval.in/434609)
Illusioneer has quit [Ping timeout: 272 seconds]
<eam> ruby *ought* to scope conditional blocks
gp5st has quit [Quit: Page closed]
<eam> like this:
<eam> >> def myif(cond) if cond; yield; end; end; myif(false) { x = 1 }; puts x.inspect
prestorium has quit [Quit: Konversation terminated!]
<ruboto> eam # => undefined local variable or method `x' for main:Object (NameError) ...check link for more (https://eval.in/434617)
<eam> probably part of ruby's terrible history re: scope
pabs has quit [Ping timeout: 264 seconds]
pabs has joined #ruby
<eam> most reasonable languages have proper blocks for conditionals, with the potential for locals scoped to them
gregf has joined #ruby
tkuchiki has quit [Remote host closed the connection]
eminencehc has quit [Remote host closed the connection]
<BraddPitt> w4
<jhass> x5
eminencehc has joined #ruby
elperdut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<BraddPitt> sorry, its my alias for switching windows in irssi
based_pdev has joined #ruby
chipotle has quit [Ping timeout: 244 seconds]
<Ox0dea> BraddPitt: You should tell irssi not to let you send messages like that.
krisquigley has joined #ruby
chrisja has joined #ruby
gregf has quit [Client Quit]
verto has quit [Quit: see you later xD]
krz has quit [Quit: WeeChat 1.2]
chipotle has joined #ruby
n008f4g_ has quit [Ping timeout: 240 seconds]
<BraddPitt> I suppose
<BraddPitt> but what if someone asks me what my alias for switching windows in irssi is?
krisquigley has quit [Ping timeout: 250 seconds]
zacts has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
zacts has joined #ruby
tvw has joined #ruby
<darix> eam the x used to leak in the past
<darix> but not anymore
Melpaws has joined #ruby
WajidKagzi has quit [Ping timeout: 256 seconds]
momomomomo has joined #ruby
nik_-_ has joined #ruby
symm- has quit [Read error: Connection reset by peer]
Igorshp has joined #ruby
symm- has joined #ruby
Illusioneer has joined #ruby
EllisTAA has joined #ruby
sp4rrow has joined #ruby
siemprefresco has quit [Quit: Textual IRC Client: www.textualapp.com]
gregf has joined #ruby
danieli has quit [Quit: *does an epic backflip into nowhere*]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bmurt has quit []
A124 has quit [Read error: Connection reset by peer]
aaeron has quit [Quit: Leaving.]
A124_ has joined #ruby
A124_ has quit [Client Quit]
A124 has joined #ruby
elfuego has quit [Quit: elfuego]
apt-get has quit [Read error: Connection reset by peer]
diegoviola has quit [Read error: Connection reset by peer]
aaeron has joined #ruby
apt-get has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
JDiPierro has quit [Remote host closed the connection]
voltalio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nanoz has joined #ruby
syath has quit [Quit: WeeChat 1.2]
drewvans1one has joined #ruby
JDiPierro has joined #ruby
JDiPierro has quit [Remote host closed the connection]
WajidKagzi has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gregf has joined #ruby
drewvanstone has quit [Ping timeout: 272 seconds]
neanderslob has quit [Ping timeout: 256 seconds]
neanderslob has joined #ruby
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<eam> darix: I think you mean a block argument used to leak ala x = 5; [10].each { |x| } # x used to be 10, now is 5
<darix> yes
<eam> now it shadows -- but in conditionals there's no different scope at all
RobertBirnie has joined #ruby
<eam> whereas in C, any braces carves out a new set of locals on the stack
<eam> (or perl, or most other langauges)
WajidKagzi has quit [Ping timeout: 260 seconds]
wildlander has quit [Quit: Saliendo]
elfuego has joined #ruby
momomomomo has quit [Quit: momomomomo]
WajidKagzi has joined #ruby
<eam> eg if (0) { int x; } // x doesn't exist in the outer scope
allcentury has quit [Ping timeout: 240 seconds]
<eam> because { and } are referring to points on the stack
gwendall has quit [Remote host closed the connection]
yfeldblum has joined #ruby
jhn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jhn has joined #ruby
jhn has quit [Client Quit]
solocshaw has joined #ruby
casadei_ has quit [Remote host closed the connection]
solocshaw has quit [Remote host closed the connection]
solocshaw has joined #ruby
maletor has joined #ruby
howdoico1 has joined #ruby
musl_ has quit [Quit: WeeChat 1.1.1]
casadei_ has joined #ruby
ldnunes has quit [Quit: Leaving]
musl has joined #ruby
xaxisx has quit [Quit: Leaving]
casadei_ has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 255 seconds]
weemsledeux has joined #ruby
cisco has quit [Quit: Leaving.]
cih has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
WajidKagzi has quit [Ping timeout: 246 seconds]
k3asd` has joined #ruby
nettoweb has joined #ruby
Guest50 has joined #ruby
joshyjosh_ has quit [Quit: ChatZilla 0.9.92 [Firefox 42.0a2/20150915004227]]
chipotle has joined #ruby
peterhu has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
ndrei has joined #ruby
dopamean_ has quit [Ping timeout: 240 seconds]
FernandoBasso has joined #ruby
Zai00 has quit [Quit: Zai00]
diegoviola has joined #ruby
wryfi has joined #ruby
<wryfi> i'm trying to install slanger with chruby, an everything seems fine until i try to run slanger
<wryfi> then i get
<wryfi> ~/.rubies/ruby-2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- bundler/setup (LoadError)
ngscheurich has quit [Ping timeout: 246 seconds]
linux_dr has joined #ruby
chipotle has joined #ruby
<wryfi> can anybody point me in a direction?
aaeron has quit [Quit: Leaving.]
<pipework> I'm always a fan of Northwest.
<linux_dr> any chance there’s a standard Ruby idiom equivilant to this: (a.class == Array) ? a : ((a == nil) ? [] : [ a ]) ?
<linux_dr> sounds a bit like the opposite of splat.
tcopeland has quit [Ping timeout: 246 seconds]
<dfockler> wryfi: do you have bundler installed?
<wryfi> d'oh!
<pipework> linux_dr: Array(a)
<wryfi> perhaps that is the problem
aaeron has joined #ruby
<wryfi> dfockler: yup, that was it. duh.
<linux_dr> pipework: thanks
<dfockler> wryfi: no worries, done that myself a few times
<wryfi> surprised it didn't get pulled in when i did gem install slanger
<Ox0dea> linux_dr: Also [*a] if that's more your style.
krisquigley has joined #ruby
Kallis has joined #ruby
<dfockler> wryfi: it's usually not a good idea for gems to require bundler
ndrei has quit [Ping timeout: 250 seconds]
<pipework> Why not?
Kallis has quit [Max SendQ exceeded]
ndrei has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
<linux_dr> Ox0dea: and that will work even if a isn’t an Array?
opensource_ninja has joined #ruby
Kallis has joined #ruby
<pipework> linux_dr: Try
shmilan has joined #ruby
<linux_dr> thanks
chipotle has joined #ruby
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
<dfockler> pipework: That's dumb, not sure why I said that, maybe I was thinking of rubygems
Zai00 has joined #ruby
<pipework> dfockler: You're such a tease. :p
<dfockler> Just teasing :P
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
krisquigley has quit [Ping timeout: 246 seconds]
dopamean_ has joined #ruby
havenn has quit [Ping timeout: 240 seconds]
sp4rrow has joined #ruby
tkuchiki has joined #ruby
ndrei has quit [Ping timeout: 250 seconds]
drewvans1one has quit [Ping timeout: 256 seconds]
umgrosscol has quit [Remote host closed the connection]
ndrei has joined #ruby
freerobby has quit [Quit: Leaving.]
diegoviola has quit [Ping timeout: 265 seconds]
freerobby has joined #ruby
p0wn3d_ has quit [Ping timeout: 246 seconds]
s2013 has joined #ruby
rbennacer has quit [Remote host closed the connection]
rbennacer has joined #ruby
solocshaw has quit [Ping timeout: 246 seconds]
solocshaw1 has joined #ruby
tkuchiki has quit [Ping timeout: 240 seconds]
solars has quit [Ping timeout: 240 seconds]
[Butch] has quit [Quit: Linkinus - http://linkinus.com]
<eam> this is super weird:
<eam> >> x = *1; y = [*1]; x == y
<ruboto> eam # => true (https://eval.in/434631)
arup_r has quit [Quit: Leaving]
joshyjosh has quit [Quit: Leaving]
davedev2_ has joined #ruby
solocshaw1 is now known as solocshaw
<Ox0dea> >> [*[*[*1]]]
<ruboto> Ox0dea # => [1] (https://eval.in/434632)
<Ox0dea> >> [*1, *nil, *[2, 3], 4=>5]
<ruboto> Ox0dea # => [1, 2, 3, {4=>5}] (https://eval.in/434633)
<pipework> Ox0dea is a deconstructionist
Beoran has quit [Ping timeout: 250 seconds]
<dfockler> dat ruby array syntax
<eam> perl's list context is more clear :(
<dfockler> >> x = *"Hello there"
<ruboto> dfockler # => ["Hello there"] (https://eval.in/434634)
rbennacer has quit [Ping timeout: 260 seconds]
northfurr has joined #ruby
<eam> it's also weird that the rvalue is a syntax error if expressed as its own statement
<eam> >> *1
<ruboto> eam # => /tmp/execpad-1fa7b97bdddd/source-1fa7b97bdddd:2: syntax error, unexpected '\n', expecting :: or '[' ...check link for more (https://eval.in/434635)
<eam> in what other languages is such a thing true?
davedev24 has quit [Ping timeout: 246 seconds]
<eam> I can't think of any C rvalue expressions which are errors when expressed alone
<dfockler> >> y = *(2..10) #nice for building an array
<ruboto> dfockler # => [2, 3, 4, 5, 6, 7, 8, 9, 10] (https://eval.in/434636)
xfbs has quit []
<Ox0dea> >> [*1..10] # arguably nicer
<ruboto> Ox0dea # => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] (https://eval.in/434637)
<dfockler> although you can just use the range like an enumerable
<pipework> >> (1..10).to_a
<ruboto> pipework # => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] (https://eval.in/434638)
<pipework> Would be fun to see a silly benchmark of all those things.
<Ox0dea> >> [Enumerable.instance_methods.size, Array.instance_methods.size] # dfockler
<ruboto> Ox0dea # => [51, 172] (https://eval.in/434639)
<eam> what's the least ugly way to turn a Hash into a flat Array?
<pipework> eam: #to_a.flatten
<eam> that's super ugly though
kidoz has quit [Quit: Ухожу я от вас]
<eam> (like, in terms of efficiency)
<pipework> I'm not sure what you're saying.
<Ox0dea> >> {1=>2, 3=>4}.flatten
<ruboto> Ox0dea # => [1, 2, 3, 4] (https://eval.in/434640)
<pipework> ah just flatten works
<eam> aha, Hash has one (I assume it doesn't suck?)
<Ox0dea> >> Hash < Enumerable
<ruboto> Ox0dea # => true (https://eval.in/434641)
<eam> rad
<eam> I hope Hash implements that
xfbs has joined #ruby
<Ox0dea> It does.
<Ox0dea> >> {}.method(:flatten).owner
<ruboto> Ox0dea # => Hash (https://eval.in/434642)
Lumio has quit [Quit: ...]
naftilos76 has joined #ruby
<eam> perfect
cj has left #ruby [#ruby]
<Ox0dea> It's raining {fel,can}ids.
nik_-_ has quit [Quit: nik_-_]
<dfockler> Is felids a word?
<Ox0dea> Latin never really died.
s2013 has quit [Read error: Connection reset by peer]
victortyau has quit [Quit: Leaving]
<dfockler> Ox0dea: thanks for leading me to discover the Method class :)
minimalism has joined #ruby
xfbs has quit [Client Quit]
jenrzzz_ has joined #ruby
bigbadbear has quit [Ping timeout: 250 seconds]
drewvanstone has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MasterPiece has joined #ruby
otisZart has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
k3asd` has quit [Ping timeout: 252 seconds]
baweaver has quit [Remote host closed the connection]
Beoran has joined #ruby
nkts has joined #ruby
apt-get has quit [Remote host closed the connection]
Luun has quit [Quit: Luun]
<Ox0dea> dfockler: Sure thing. :)
<Ox0dea> I trust you took note of that massive disparity in method counts back there?
freezevee has quit [Ping timeout: 250 seconds]
elfuego has quit [Quit: elfuego]
nanoz has quit [Ping timeout: 250 seconds]
mary5030 has quit [Ping timeout: 246 seconds]
pawnbox has quit [Remote host closed the connection]
<Ox0dea> Eh, you did say that you can use Ranges like Enumerables, not Arrays, so never mind.
xfbs has joined #ruby
<Ox0dea> That Range doesn't have #product bites me now and again.
<cschneid_> are there guides out there for writing & using the ruby internals for a gem? I'm looking at stackprof and would like to make it thread-aware. But that would mean understanding much more of the internals of the ruby vm
Azure has joined #ruby
<Ox0dea> cschneid_: Ruby Under a Microscope.
Igorshp has quit [Remote host closed the connection]
<cschneid_> Ox0dea: that'd help me understand the current vm? and hence understand how threading happens & how I can exploit it to get what I want? :)
<Ox0dea> cschneid_: It's a deep dive into many of MRI's internals, yes.
drewvanstone has quit [Ping timeout: 272 seconds]
dima_ has joined #ruby
xfbs has quit [Client Quit]
Rickmasta has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
ndrei has quit [Ping timeout: 265 seconds]
kirun has quit [Quit: Client exiting]
chipotle has joined #ruby
kies^ has quit [Ping timeout: 252 seconds]
ndrei has joined #ruby
s2013 has joined #ruby
baweaver has joined #ruby
Hrorek has joined #ruby
naftilos76 has quit [Quit: Αποχώρησε]
drewvanstone has joined #ruby
Rurik has quit [Read error: Connection reset by peer]
ndrei has quit [Remote host closed the connection]
beauby has joined #ruby
ndrei has joined #ruby
havenwood has joined #ruby
Hrorek has quit [Read error: Connection reset by peer]
petricore has joined #ruby
Rurik has joined #ruby
petricore has quit [Client Quit]
s2013 has quit [Read error: Connection reset by peer]
drewvanstone has quit [Ping timeout: 272 seconds]
gwendall has joined #ruby
whippythellama has quit [Quit: WeeChat 1.3]
ndrei has quit [Ping timeout: 265 seconds]
ndrei has joined #ruby
platzhirsch has quit [Ping timeout: 240 seconds]
s2013 has joined #ruby
zero_drool has quit [Ping timeout: 246 seconds]
northfurr has quit [Quit: northfurr]
Zai00 has quit [Quit: Zai00]
ndrei has quit [Ping timeout: 244 seconds]
yardenbar has quit [Ping timeout: 240 seconds]
jenrzzz_ has quit [Ping timeout: 250 seconds]
ndrei has joined #ruby
havenwood has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
Balzrael has quit [Quit: Leaving]
karapetyan has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
drewvanstone has joined #ruby
northfurr has joined #ruby
n_blownapart has quit []
bayed has quit [Quit: Connection closed for inactivity]
polishdub has quit [Quit: Leaving]
karapetyan has quit [Ping timeout: 255 seconds]
s2013 has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
tomaz_b has quit [Ping timeout: 250 seconds]
leksster has quit [Remote host closed the connection]
[k- has quit [Ping timeout: 265 seconds]
PaulCapestany has quit [Quit: .]
northfurr has quit [Quit: northfurr]
<jackjackdripper> I'm trying to maintain indentation by using string = q{} is there a way i can insert a variable inside {}?
xaxisx has joined #ruby
PaulCapestany has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
<shevy> >> x = 'lala'; %w( abc def ghi #{x} )
<ruboto> shevy # => ["abc", "def", "ghi", "\#{x}"] (https://eval.in/434667)
<shevy> >> x = 'lala'; %W( abc def ghi #{x} )
<ruboto> shevy # => ["abc", "def", "ghi", "lala"] (https://eval.in/434668)
<shevy> jackjackdripper ^^^ perhaps it works for q and Q
<jackjackdripper> looks like it works with %Q
<jackjackdripper> thanks
theery has joined #ruby
<shevy> \o/
momon has joined #ruby
<Ox0dea> >> %'#{1 + 2}'
<ruboto> Ox0dea # => "3" (https://eval.in/434669)
bruno- has quit [Ping timeout: 265 seconds]
da3mian has quit [Remote host closed the connection]
momon has quit [Client Quit]
<Ox0dea> >> %Q{} == %{} # jackjackdripper: For reference.
<ruboto> Ox0dea # => true (https://eval.in/434670)
momon has joined #ruby
<jackjackdripper> thanks
<Ox0dea> You almost certainly don't even need any of them; plain-ol' double-quoted strings are allowed to span multiple lines.
cschneid_ has quit [Remote host closed the connection]
davedev2_ has quit []
dopie has quit [Quit: This computer has gone to sleep]
<Ox0dea> % strings are for when you don't want to bother choosing which style of quotes to escape.
workmad3 has quit [Ping timeout: 265 seconds]
duncannz has joined #ruby
chipotle has quit [Quit: cheerio]
phutchins has joined #ruby
<jackjackdripper> that's exactly why i'm doing it :) a quick script to generate json file for multiple hostnames
shmilan has quit [Ping timeout: 240 seconds]
allcentury has joined #ruby
<Ox0dea> jackjackdripper: https://eval.in/434671
Lady_Aleena has joined #ruby
Lady_Aleena has left #ruby ["Leaving"]
<shevy> damn
<shevy> a regex /foo/ has an encoding?
blackjid has quit [Max SendQ exceeded]
rodfersou has joined #ruby
<Ox0dea> shevy: Shouldn't it?
blackjid has joined #ruby
Jackneill has quit [Ping timeout: 272 seconds]
<Ox0dea> >> [/foo/, /foo/e].map(&:encoding)
<ruboto> Ox0dea # => [#<Encoding:US-ASCII>, #<Encoding:EUC-JP>] (https://eval.in/434673)
Alayde has quit [Ping timeout: 252 seconds]
<shevy> well
firstdayonthejob has quit [Ping timeout: 246 seconds]
<shevy> I have set this: # Encoding: ISO-8859-1
<shevy> in the file, for test, I do this:
<shevy> puts REGEX
<shevy> US-ASCII
<shevy> and in the next line I create a string like this:
<shevy> puts 'hi there'.encoding.to_s
<shevy> and I get:
<shevy> ISO-8859-1
<shevy> so now I am confused
<shevy> does the encoding of a regex matter?
<Ox0dea> It certainly can.
<Ox0dea> Invalid byte sequences and the like.
<momon> Hi. Is there any gem that can do uploading video directly to youtube through web form?
juanpablo_ has quit [Quit: (null)]
<shevy> ohhh
atomical has joined #ruby
Voker57 has quit [Read error: Connection reset by peer]
<shevy> Ox0dea from your example I assume, I could add an instructions to the // regex?
juanpablo_ has joined #ruby
<Ox0dea> shevy: Hm?
iateadonut has joined #ruby
<Ox0dea> >> /foo/u.encoding
<ruboto> Ox0dea # => #<Encoding:UTF-8> (https://eval.in/434674)
<shevy> aha!
Burgestrand has joined #ruby
chipotle has joined #ruby
cajone has quit [Ping timeout: 246 seconds]
blackjid has quit [Max SendQ exceeded]
blackjid has joined #ruby
<shevy> >> /abc/m.encoding == /abc/i.encoding
<ruboto> shevy # => true (https://eval.in/434675)
siaw has joined #ruby
<Ox0dea> shevy: Those flags aren't related to encoding.
Alayde has joined #ruby
<Ox0dea> 'm' is multiline, 'i' is case-insensitive.
<dfockler> momon: https://github.com/kylejginavan/youtube_it Might look into this
<dfockler> it's kind of old though
<siaw> any help with this? google can’t help me on this one. very simple https://gist.github.com/siaw23/1b4ae905cd19293d1e56
tockitj has joined #ruby
<pragmatism> Uh
<pragmatism> Why don't you just truncate the string instead?
<pragmatism> The modulo you're doing there is hella weird.
ndrei has joined #ruby
juanpablo_ has quit [Ping timeout: 264 seconds]
<eam> it's not modulo, it's printf interpolation
<eam> sprintf
<pragmatism> OH
<pragmatism> hha sorry, didn't quite read it.
<pragmatism> What do you want, "1.99"?
ej89 has joined #ruby
<eam> % does everything, it's the amazing character
x-light has joined #ruby
<pragmatism> Just like === or <=>
<pragmatism> ;)
<siaw> pragmatism: yes. i want $1.99
<tockitj> since ruby is dynamic language - does it make sense to check for parameter types in method body
<ej89> Hello! I have a question about redefining module methods.
<eam> siaw: that's waht you'll want to google, btw - printf formatting rules
<ej89> I'm trying to re-implement the Enumerable API for a class project.
<Ox0dea> pragmatism: Both of those operators serve exactly one purpose; what're you on about?
<shevy> tockitj if you have to handle user input sure
<tockitj> i know about duck principle.. but yet testing for number of methods could be more work than just testing for class
<ej89> However, for whatever reason, after the first re-defined method, all the others are being ignored.
<Ox0dea> ej89: Post code?
<dorei> shevy: type checking is really painful in ruby
<eam> siaw: I think rounding is built into printf - what you'll probably want to do is truncate your number before giving it to printf
bentanweihao has joined #ruby
<tockitj> shevy, user input? i am thinking about something like static-like typing for parameters
<ej89> That is, my test cases (which exercise all the Enumerable API methods) are always calling the library implementations...except for the first redefined method, which *does* call my method.
<Ox0dea> siaw: Even better, don't use floating point for money.
<ej89> 0x0dea: just a sec...
<Ox0dea> tockitj: Wrong language.
<dfockler> haha
<siaw> Ox0dea: what should i use? BigDecimal?
<pragmatism> Ox0dea huh? === is defined on a per-class basis.
<tockitj> 0x0dea?
<Ox0dea> pragmatism: Yes, but it's only used for case equality.
<dorei> >> h = {a: 5, b: 6} ; h.instance_eval { undef :[] }; h[:a]
<ruboto> dorei # => undefined method `[]' for {:a=>5, :b=>6}:Hash (NoMethodError) ...check link for more (https://eval.in/434676)
<dfockler> If you want a statically typed language you shouldn't use ruby
<shevy> tockitj static typing for parameters? how would this work in ruby?
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<tockitj> dfockler, who said I want statically typed language
<dfockler> "static-like typing for parameters"
<tockitj> shevy, i am wondering about that too
metalic has joined #ruby
CloCkWeRX has joined #ruby
<shevy> you can raise exceptions when input is not of an expected class
CloCkWeRX has left #ruby [#ruby]
<ej89> @0x0dea: here's my code: http://pastebin.com/rcP0J4jr
<ruboto> ej89, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/7e9907ed99138b5ae550
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<tockitj> dfockler, for method parameters.. anything could be passed to method
<eam> >> % %%%%%%% %%%% % %%%%% %%%% # pragmatism, this is for you
<ruboto> eam # => "%" (https://eval.in/434677)
<dorei> shevy: that's not enough though
<pragmatism> hahahaha eam thanks :P
<ej89> @0x0dea: here's my code: https://gist.github.com/7e9907ed99138b5ae550
<tockitj> dfockler, you want method to behave correctly even if it is handling bad input, right?
<ej89> @0x0dea: it includes two .rb files. The first is my implementation of Enumerable (right now it just contains two methods). The second contains unit tests for all the Enumerable methods.
<shevy> for a moment I confused dorei with dfockler :)
<tockitj> breaking arbitrarily just because passed object does not respond to given message is problem - you want to raise argument exception in that case, no?
<shevy> dunno, I rarely need to raise exceptions
<Ox0dea> tockitj: https://eval.in/434678
<Ox0dea> Look near the bottom for the demonstration of what's going on.
<tockitj> shevy, that is bad programming no?
<Ox0dea> We *can* overload methods in Ruby, but we really ought not to.
spider-mario has quit [Remote host closed the connection]
<ej89> The first redefined method (.all?) is working fine in the unit tests - I can confirm that my version of .all? is being called by the unit test. (The test fails when I switch the true to false.)
eminencehc has quit [Remote host closed the connection]
p0wn3d_ has joined #ruby
<ej89> But the second one, .any?, isn't called - instead, the unit test is apparently calling the library version.
<dorei> ruby is so open to monkey patching that you can never make assumptions about how a class behaves
<tockitj> Ox0dea, i do not see point of that snippet
chipotle has quit [Read error: Connection reset by peer]
<ej89> I can't see what I did differently between the two...
<tockitj> dorei, that is plain silly
eminencehc has joined #ruby
bruno- has joined #ruby
<tockitj> and please do not assume that i do not understand what monkey patching is
<dfockler> >> (1.9999 * 100).floor / 100.0 #this is gross
<ej89> I had some more substantial code in .any? earlier, but it wasn't working, so I changed to to simply "return true" to see if I could get it working at all.
<ruboto> dfockler # => 1.99 (https://eval.in/434679)
<dorei> >> h = {a: 5, b: 6} ; h.instance_eval { undef :[] }; h[:a]
Burgestrand has quit []
<ruboto> dorei # => undefined method `[]' for {:a=>5, :b=>6}:Hash (NoMethodError) ...check link for more (https://eval.in/434680)
<shevy> tockitj I dunno, is it?
<dorei> tockitj: h is an instance of Hash but does it behave like a hash?
<tockitj> shevy, yep it is
<shevy> tockitj why?
r_baron has joined #ruby
elfuego has joined #ruby
<tockitj> i am not here to teach programming shevy
<shevy> you claimed it is bad programming
<tockitj> it is
<shevy> you provided no reason
<tockitj> you see no problem with the fact that you are not raising any exceptions in pure oo language?
<Ox0dea> ej89: https://eval.in/434684
<Ox0dea> ej89: The problem must surely be in your test code.
<momon> dflocker: I thought support for client api v2 is already dropped by google
<shevy> what problem
<ej89> @0x0dea: thanks, looking at it now...
<pipework> No @ needed, this ain't twitter.
<dfockler> momon: That gem is hasn't been updated in a while, so it is probably behind google's api
<Ox0dea> ej89: Ah! I figured it out.
momon has quit [Quit: AtomicIRC: The nuclear option.]
<ej89> pipework: thanks, I thought that would highlight the name for the recipient. Guess not. :-)
<ej89> 0x0dea: yeah?
<Ox0dea> >> [[].method(:any?).owner, [].method(:all?).owner] # ej89
<ruboto> Ox0dea # => [Array, Enumerable] (https://eval.in/434685)
<Ox0dea> Not sure why that is, though.
<ej89> Hmm.
<Ox0dea> Array gets its #all? method from Enumerable, but #any? is optimized specifically for Arrays.
pushpak has joined #ruby
pushpak has quit [Client Quit]
<ej89> Ah, I see. So I need to separately override #any?
p0wn3d_ has quit [Ping timeout: 264 seconds]
<tockitj> dorei, i know ruby feels comfortable with any object that quacks like a duck - but are you just going to take a given object and assume that it full fills arbitrary non-specified conditions
<shevy> Ox0dea do you happen to know if a regex can have another encoding than US_ASCII?
<tockitj> that can be derived only from code itself
<Ox0dea> shevy: We've already established that?
<shevy> hmm
<Ox0dea> >> [/foo/e.encoding, /foo/u.encoding] # shevy
<ruboto> Ox0dea # => [#<Encoding:EUC-JP>, #<Encoding:UTF-8>] (https://eval.in/434686)
<shevy> yeah
<shevy> but we have more encodings than these
Contigi has quit [Read error: Connection reset by peer]
otacon- has quit [Ping timeout: 240 seconds]
<Ox0dea> Many, many more.
<shevy> I could not find a switch for ISO-8859-1 :(
<dorei> Ox0dea: on ruby 2.1.1 it returns [Enumerable, Enumerable]
<ej89> 0x0dea: Is there an easy way to undefine every method in Enumerable (even those that are overridden) so that my implementation will be called?
<Ox0dea> ej89: How come you don't just name yours differently?
jgt1 has quit [Ping timeout: 250 seconds]
<shevy> guess I'll file a feature request at the bugtracker
<ej89> 0x0dea: That's the next thing I was going to try. :-)
<drbrain> ej89: Module#prepend?
<ej89> I just wanted to see if there was an easier way first.
<ej89> drbrain: looking up Module#prepend now!
<Ox0dea> ej89: What could be easier than just not naming yours Enumerable? :/
chrisja has quit [Quit: leaving]
<Ox0dea> >> s = 'foo'; [s.encoding, Regexp.new(s).encoding] # shevy
<ruboto> Ox0dea # => [#<Encoding:UTF-8>, #<Encoding:US-ASCII>] (https://eval.in/434691)
<Ox0dea> Not sure if that's a "bug", per se.
<ej89> 0x0dea: Well, the unit tests were originally written to use Enumerable (to test the tests)...the idea is to use my Enumerable implementations as a drop-in replacement. If that's possible, that is.
<tockitj> ej89, why are you replacing Enumerable?
<ej89> tockitj: It's for a class assignment. I'm supposed to re-implement most of Enumerable's public API functions.
baweaver has quit [Remote host closed the connection]
<shevy> Ox0dea hmm oh... you mean it is possible via Regexp.new(), rather than the // regex literal?
<tockitj> ook? simply implement them in your own mixin
<Ox0dea> shevy: Right.
<shevy> I see
drewvanstone has quit [Ping timeout: 246 seconds]
chino_ has joined #ruby
<tockitj> ej89, assignment is certainly not to *replace* Enumerable - I can assure you that
<tockitj> though it is not hard to do either.. you can just go through ObjectSpace find objects that inherit Enumerable and include your own mixin on top of them
<shevy> people have strange ideas when it comes to unicode: https://bugs.ruby-lang.org/issues/11530
ixti has quit [Ping timeout: 260 seconds]
<shevy> a ? b
<ej89> tockitj: Right...my thinking there was that it would make it easier to test, by avoiding having to manually change all the method calls in my unit tests from ".some_method" to ".my_some_method".
<chino_> is there any debugging tools that can hook into an *existing* ruby process to perhaps analyze the heap or inject some code so you can debug it?
<Ox0dea> >> s = 'foo'.encode('ISO-8859-1'); [Regexp.new(s).encoding, Regexp.new(s, 16).encoding] # shevy
<ruboto> Ox0dea # => [#<Encoding:US-ASCII>, #<Encoding:ISO-8859-1>] (https://eval.in/434693)
howdoico1 has quit [Ping timeout: 260 seconds]
bentanweihao has quit []
<tockitj> ej89, why are you changing method names? just change mixin name
davedev24 has joined #ruby
<ej89> tockitj: Oh, how do you do that?
baroquebobcat has quit [Quit: baroquebobcat]
<shevy> Ox0dea now I am confused
<tockitj> how long have you been working with ruby ej89 ?
<ej89> tockitj: About a week. This class is my first exposure to Ruby. :-)
<shevy> so regexes by default attempt to prefer US-ASCII?
baroquebobcat has joined #ruby
<tockitj> oh god
<ej89> tockitj: :-)
<tockitj> i am not best person to talk to in that case
<Ox0dea> shevy: Seems so. It's not the worst choice?
petricore has joined #ruby
petricore has quit [Client Quit]
<Ox0dea> chino_: Sounds pretty masochistic.
<ej89> tockitj: No problem. Appreciate the help nonetheless!
<shevy> no idea, I didn't know that there could be differences in encoding, I thought that the # Encoding line would help there but it seems as if they only are valid for string objects in that file
<tockitj> good luck! be persistent! :)
chipotle has joined #ruby
<Ox0dea> >> Regexp.new('', 16).encoding # shevy: Last one. :P
<ruboto> Ox0dea # => #<Encoding:UTF-8> (https://eval.in/434694)
<ej89> tockitj: Thanks! So far I'm enjoying the language a lot...though it definitely takes some getting used to coming from a mostly C++ world! :-)
<shevy> nope, I am confused
<tockitj> ruby is a great language
<shevy> suddenly we are at UTF-8
Pupeno has quit [Remote host closed the connection]
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Pupeno has joined #ruby
Pupeno has joined #ruby
tejasmanohar has quit [Ping timeout: 246 seconds]
<Ox0dea> You can tell Regexp.new to use the encoding of the constructing String.
drewvanstone has joined #ruby
snockerton has joined #ruby
tejasmanohar has joined #ruby
<Ox0dea> Which, ceteris paribus, would be the encoding you specified in the magic comment.
<snockerton> this is odd - how come when i start pry in certain directories, it can't load any gems?
<drbrain> shevy: this seems to be the list of regexp encodings: https://gist.github.com/drbrain/e96992ba4a6de7905879
dima_ has quit [Quit: This computer has gone to sleep]
<shevy> hmm
<shevy> emacs_mule.c:OnigEncodingDefine(emacs_mule, Emacs_Mule)
<Ox0dea> drbrain: Any insight as to why there isn't just an 'f' flag for doing what Regexp::FIXEDENCODING does?
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<BraddPitt> an initialization vector can safely be posted to the public, right?
<drbrain> Ox0dea: I haven't poked that much at Regexp
s00pcan has quit [Ping timeout: 252 seconds]
<BraddPitt> someome knowing your encryption IV won't gain any advantage into cracking your crypto?
<Ox0dea> BraddPitt: Just make sure it's duper-random.
<BraddPitt> right
<BraddPitt> I'm just using OpenSSL stdlib random generator
<BraddPitt> which (it claims) is random enough
baweaver has joined #ruby
tuxero has quit [Quit: tuxero]
s00pcan has joined #ruby
veg has quit []
baweaver has quit [Remote host closed the connection]
chino_ has quit [Quit: Page closed]
<tockitj> Ox0dea, Ova is nice hack - I have not read it carefully first time
<Ox0dea> tockitj: It's brittle as hell by dint of relying on RubyVM::InstructionSequence, but it was fun nonetheless.
<tockitj> it is
<BraddPitt> Ox0dea this means that the user needs to remember both the password and the IV they used if they wish to decrypt, right?
ixti has joined #ruby
baweaver has joined #ruby
<Ox0dea> BraddPitt: Are your users laymen?
tjohnson has quit [Quit: Connection closed for inactivity]
<Ox0dea> *laypeople
<tockitj> i like the way ruby can surprise
<BraddPitt> in what sense, Ox0dea
* baweaver gives thumbs up to Ox0dea
<BraddPitt> they are developers
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> BraddPitt: Well, it depends on what exactly you're doing, but no, remembering the IV isn't strictly necessary.
<Ox0dea> Especially given that it can be derived, should the need arise.
<Ox0dea> baweaver: I should've caught myself.
Yzguy has joined #ruby
ej89 has left #ruby [#ruby]
eminencehc has quit [Remote host closed the connection]
cajone has joined #ruby
<Ox0dea> tockitj: Are you familiar with FizzBuzz? ;)
<baweaver> oh no
<Ox0dea> (I'm not gonna do it.)
<Ox0dea> > i like the way ruby can surprise
<Ox0dea> Tempted as hell, though.
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eminencehc has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<BraddPitt> Ox0dea I'm reading the ruby OpenSSL docs and it says >A new, random IV should be created for every encryption of data
Igorshp has joined #ruby
snockerton has quit [Quit: Leaving.]
Pupeno has quit [Remote host closed the connection]
dopamean_ has quit [Ping timeout: 240 seconds]
WillAmes has quit [Remote host closed the connection]
<[ace]> BraddPitt: IV is fine to be stored with the ciphertext, commonly as the first block
Igorshp has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
WillAmes has joined #ruby
<tockitj> Ox0dea, haha
<[ace]> and yes, every time you encrypt you should use a different IV or you lose the benefit of having an IV
dfockler has quit [Remote host closed the connection]
cih has quit [Remote host closed the connection]
<BraddPitt> I guess my problem is that now the user needs to remember both password and the IV used to encrypt their data (unless I use a stream cipher)
<BraddPitt> well
<BraddPitt> I may have a way around this
<[ace]> BraddPitt: put it with the ciphertext
<[ace]> then you don't have that problem
<Ox0dea> Or salt the seed.
podman has quit [Quit: Connection closed for inactivity]
<BraddPitt> append it to the resulting ciphertext you mean [ace] ?
<BraddPitt> or prepend, whatever
<[ace]> yes
baroquebobcat has quit [Read error: Connection reset by peer]
<BraddPitt> I see
baroquebobcat has joined #ruby
theery has quit [Remote host closed the connection]
aa10ll has joined #ruby
<BraddPitt> ah, thanks for answering what was to be my follow up question
<BraddPitt> thank you both [ace] and Ox0dea
Lucky__ has joined #ruby
marr has quit []
<zenspider> shevy: you get things squared away?
ndrei has quit [Ping timeout: 240 seconds]
but3k4 has joined #ruby
baweaver has quit [Remote host closed the connection]
rehat has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
malconis has joined #ruby
baweaver has joined #ruby
malconis has quit [Client Quit]
nateberkopec has quit [Quit: Leaving...]
baroquebobcat has quit [Quit: baroquebobcat]
but3k4 has quit [Ping timeout: 240 seconds]
sp4rrow has joined #ruby
agent_white has quit [Quit: bbl]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tcopeland has joined #ruby
symm- has quit [Ping timeout: 264 seconds]
howdoico1 has joined #ruby
linux_dr has quit [Quit: linux_dr]