<andrewvos>
Thought it wouldn't be a good thing to `def send` on your own objects.
vlad_starkov has quit [Ping timeout: 252 seconds]
hikimonk has joined #ruby-lang
<andrewvos>
This is something I always forget I can do, but is extremely useful: Hash.new { |h, k| h[k] = [] }
<manveru>
i always use __send__ when i mean it
<manveru>
but yeah, instead of the send he uses i usually def say
<andrewvos>
manveru: Is __send__ the actual keyword? So my_object.send maps to my_object.__send__ ?
<manveru>
it's no keyword
<manveru>
send is an alias of __send__, or the other way round, doesn't really matter
<manveru>
but __send__ and __id__ are the two methods you should never shadow
<andrewvos>
Okay, but what I was alluding to was that defining your own send method makes it so users of your class can't call send(:method_name) anymore.
<andrewvos>
Is that correct?
<manveru>
yeah, but they can call __send__(:method_name)
<andrewvos>
Oh ok. I get your previous statement now.
woollyams has quit [Quit: Computer has gone to sleep.]
nitti has joined #ruby-lang
nitti has quit [Ping timeout: 246 seconds]
woollyams has joined #ruby-lang
cantonic has quit [Quit: cantonic]
uuair has joined #ruby-lang
cantonic has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
solars has quit [Ping timeout: 255 seconds]
dc5ala has quit [Quit: Ex-Chat]
uuair_ has joined #ruby-lang
JohnBat26 has quit [Ping timeout: 240 seconds]
cantonic has quit [Quit: cantonic]
uuair has quit [Ping timeout: 244 seconds]
uuair_ is now known as uuair
dc5ala has joined #ruby-lang
yats has quit [Quit: Leaving]
vlad_starkov has joined #ruby-lang
nettsundere has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 252 seconds]
Serial_Killer_C has quit [Remote host closed the connection]
hikimonk has quit [Ping timeout: 244 seconds]
cantonic has joined #ruby-lang
guardian has joined #ruby-lang
<guardian>
hello
<guardian>
why does ::URI.parse("http://example.com").hierarchical? return true (well I know it's because path returns the empty string and hierarchical? tests again nil and not against empty string) doesn't it look like a bug to you?
<guardian>
but I expected parsing http://example.com would say there is no path, hence hierarchical would return false
<manveru>
ok, i guess they just define hierarchical wrong :)
<guardian>
bu the result of parsing is an empty string path
<manveru>
"A hierarchical URI is either an absolute URI whose scheme-specific part begins with a slash character, or a relative URI, that is, a URI that does not specify a scheme."
<guardian>
and hierarchical doesn't test against the empty string, it just tests whether path is nil
<guardian>
oh
<guardian>
well so using hierarchical from the beginning was wrong
<manveru>
that's the definition, but that's not the implementation of rubys URI
nitti has quit [Ping timeout: 246 seconds]
<manveru>
as i said, what do you try to do?
<guardian>
just wanted to know whether there was a path or not, but I just used path.empty? as you suggested
<guardian>
I even expected path to be nil in case of URI.parse("http://example.com") but that's not the case
<andrewvos>
guardian: So d= URI.parse("mailto:sdcsdc@sdc.com").hierarchical? #=> false
<manveru>
that will fail
<andrewvos>
Because the scheme-specific part does *not* begin with a slash.
<manveru>
URI("x:b.y").path
<andrewvos>
Well, you may want to make sure it's a http[s] url then.
<manveru>
URI(whatever).path.to_s.empty?
<manveru>
bbl, lunch
<guardian>
thx for the answers
erichmenge has joined #ruby-lang
m3nd3s has joined #ruby-lang
Aria has joined #ruby-lang
fromhet has joined #ruby-lang
nertzy has joined #ruby-lang
mihar has quit [Ping timeout: 244 seconds]
mihar has joined #ruby-lang
havenn has joined #ruby-lang
fromhet_ has joined #ruby-lang
fromhet has quit [Read error: Connection reset by peer]
fromhet_ is now known as fromhet
fromhet has left #ruby-lang [#ruby-lang]
dfanjul has joined #ruby-lang
yxhuvud has quit [Read error: Connection reset by peer]
yxhuvud has joined #ruby-lang
uuair_ has joined #ruby-lang
uuair has quit [Ping timeout: 244 seconds]
uuair_ is now known as uuair
vlad_starkov has joined #ruby-lang
hikimonk has quit [Quit: Leaving.]
foca has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Ping timeout: 260 seconds]
hikimonk has joined #ruby-lang
setmeaway has quit [Quit: Leaving]
malev has joined #ruby-lang
setmeaway has joined #ruby-lang
nertzy has quit [Quit: This computer has gone to sleep]
voker57 has quit [Read error: Connection reset by peer]
setmeaway has quit [Client Quit]
sailias has joined #ruby-lang
uuair has quit [Ping timeout: 260 seconds]
setmeaway has joined #ruby-lang
nitti has joined #ruby-lang
hikimonk has quit [Quit: Leaving.]
nitti has quit [Ping timeout: 260 seconds]
dfanjul has quit [Quit: leaving]
sailias has quit [Quit: Leaving.]
ryanlecompte has joined #ruby-lang
gix has quit [Ping timeout: 255 seconds]
gix has joined #ruby-lang
sush24 has joined #ruby-lang
Hakon has quit [Ping timeout: 256 seconds]
nertzy has joined #ruby-lang
enebo has joined #ruby-lang
sush24 has quit [Quit: Leaving]
JohnBat26 has joined #ruby-lang
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
vlad_starkov has joined #ruby-lang
slyphon_ has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
<andrewvos>
What themes are people using in Terminal.app and vim nowadays?
<steveklabnik>
i am too lazy to change the default
<steveklabnik>
;)
irleif has joined #ruby-lang
<steveklabnik>
i dont find it particularly useful
<steveklabnik>
is what i'm saying
<andrewvos>
Heh
uuair has quit [Quit: uuair]
<andrewvos>
I think I'm going to remove it
<andrewvos>
It's distracting
mistym has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
Serial_Killer_C has joined #ruby-lang
Serial_Killer_C has quit [Remote host closed the connection]
jackhammer2022 has joined #ruby-lang
Sambalero has quit [Remote host closed the connection]
enebo has joined #ruby-lang
Sambalero has joined #ruby-lang
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
sandbags has joined #ruby-lang
workmad3 has quit [Ping timeout: 255 seconds]
<Spaceghostc2c>
andrewvos: I use it all the time.
<andrewvos>
Spaceghostc2c: For what exactly?
<Spaceghostc2c>
andrewvos: System information. Hostname, external ip, rdns. I've been thinking of writing one to tell me how many highlights I have in IRC. I had one for unread emails until it reached four digits.
<Spaceghostc2c>
I had one for battery life.
<Spaceghostc2c>
For wireless SSID
<andrewvos>
Spaceghostc2c: What do use you use all these values for? Are you a member of Anonymous?
<andrewvos>
The only one I need occasionally is `curl ifconfig.me`
<Spaceghostc2c>
andrewvos: I use the networking related stuff for fun ssh madness.
irleif has quit [Quit: Computer has gone to sleep.]
esad has quit [Quit: Computer has gone to sleep.]
<andrewvos>
Spaceghostc2c: TIL: "Fun" and "ssh" can exist in the same sentence :)
<Spaceghostc2c>
andrewvos: It helps when you are in a network that blocks things.
<andrewvos>
Spaceghostc2c: Yeah :( :(
<andrewvos>
Spaceghostc2c: An ec2 box can always fix that though
<Spaceghostc2c>
andrewvos: I set up a socks5 proxy with ssh for all my office to use.
<andrewvos>
Anyway, you have a valid use for the tmux status line. I do not.
<Spaceghostc2c>
andrewvos: I also like knowing the status of all my windows.
<andrewvos>
Spaceghostc2c: What sort of status info can you glean from the status line about the open windows?
<andrewvos>
Spaceghostc2c: Does it change colour when a process completes? I always expected this, but never really noticed.
<Spaceghostc2c>
andrewvos: If there's activity, which window I'm on, what the active program is, what window I'm on now.
hinbody has quit [Ping timeout: 255 seconds]
<Spaceghostc2c>
If I got more clever, I could do some cool things.
justinmcp has quit [Remote host closed the connection]
sush24 has quit [Quit: Leaving]
wyhaines has quit [Remote host closed the connection]
spectra has quit [Ping timeout: 245 seconds]
spectra has joined #ruby-lang
wyhaines has joined #ruby-lang
havenn has joined #ruby-lang
<andrewvos>
manveru: We will discuss NOTHING
<bougyman>
nothing is a good thing
hikimonk has joined #ruby-lang
<andrewvos>
I think I've seen all the movies, and I'm trolling the internet for good movies. Sometimes I wish I had one of those Neural things in MIB to burn the memories of all the good movies from my brain, so I can watch them again.
nertzy has quit [Quit: Leaving]
nertzy has joined #ruby-lang
fsvehla has quit [Quit: fsvehla]
siyusong has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
jamjam has joined #ruby-lang
Sambalero has quit [Remote host closed the connection]
Sambalero has joined #ruby-lang
<andrewvos>
There's a Hollywood remake of Oldboy. Seriously.
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
ijverig has joined #ruby-lang
<ijverig>
ruby then?
<ijverig>
clear
erichmenge has quit [Quit: Be back later]
<andrewvos>
You just tried to clear the screen? So rude
<ijverig>
sorry
<ijverig>
learning this stuff, :-D
Sambalero has quit [Remote host closed the connection]
ijverig has quit [Client Quit]
cosah has quit [Read error: Operation timed out]
<andrewvos>
heh
t0h has quit [Ping timeout: 248 seconds]
<tsou>
andrewvos: here's a suggestion, just in case you missed it.. C'est arrivé près de chez vous
ijverig has joined #ruby-lang
yxhuvud has quit [Ping timeout: 276 seconds]
t0h has joined #ruby-lang
<andrewvos>
tsou: Thanks, I will give that a try.
<andrewvos>
tsou: Not seen it, looks pretty out there.
<tsou>
it's very well made, awesome acting, nice idea, very cult, etc. :P
ijverig has quit [Quit: leaving]
<andrewvos>
Cool sounds good! I seem to remember watching something like that but I'm sure it was quite long ago.
<andrewvos>
Will try watch it tomorrow if I can trick my girlfriend into watching it.
nitti has joined #ruby-lang
<andrewvos>
Does anyone else hate when their font on their terminal doesn't line up to the bottom of the screen because it's the wrong size? Probably just me.
<Aria>
No, that's horrible, andrewvos.
<Aria>
And worse right now in IRC, since there's a gap between the bottom of the text and the input box.
<andrewvos>
Aria: I know right!
<andrewvos>
EXACTLY
wyhaines has quit [Remote host closed the connection]
nitti has quit [Ping timeout: 240 seconds]
<andrewvos>
Aria: Hmm, if you play with Line Spacing in Terminal.app you can get it perfect.
irleif has quit [Quit: Computer has gone to sleep.]
<Aria>
Yeah. That's what I've done in iTerm.
<Aria>
I wish LimeChat had the same option.
<andrewvos>
I'm using irssi
<andrewvos>
So it's perfect now
<andrewvos>
Well, except for the fact that lines are really close together.
<andrewvos>
But I'm not too OCD about that so we're good.
<erikh>
wow, ltns Aria.
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
siyusong has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Remote host closed the connection]
Nss has quit [Quit: Sto andando via]
ddd has quit [Read error: Connection reset by peer]
Carnage\ has quit []
outoftime has quit [Ping timeout: 268 seconds]
robbyoconnor has joined #ruby-lang
vlad_starkov has joined #ruby-lang
justinmcp has joined #ruby-lang
hakunin_ has joined #ruby-lang
woollyams has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
hakunin has quit [Read error: Connection reset by peer]
hikimonk has quit [Quit: Leaving.]
wyhaines has joined #ruby-lang
jbsan has quit [Read error: Connection reset by peer]
jbsan has joined #ruby-lang
lun_ has quit [Remote host closed the connection]
cyri_ has quit [Quit: cyri_]
woollyams has quit [Quit: Computer has gone to sleep.]
outoftime has joined #ruby-lang
erichmenge has joined #ruby-lang
justinmcp has quit [Remote host closed the connection]
swarley has joined #ruby-lang
ryanlecompte has joined #ruby-lang
ryanlecompte has quit [Remote host closed the connection]
deryl has joined #ruby-lang
deryl has left #ruby-lang [#ruby-lang]
ddd has joined #ruby-lang
kurko_ has joined #ruby-lang
justinmcp has joined #ruby-lang
CaptainJet has joined #ruby-lang
irleif has joined #ruby-lang
kurko_ has quit [Read error: Operation timed out]
kurko_ has joined #ruby-lang
ryanlecompte has joined #ruby-lang
kurko_ has quit [Ping timeout: 255 seconds]
cyri_ has joined #ruby-lang
kurko_ has joined #ruby-lang
<manveru>
andrewvos: i wish i could rewatch all the tarantino movies like it was the first time :)
toretore has quit [Quit: Leaving]
<andrewvos>
Yeah me too
nitti has joined #ruby-lang
coryf has quit [Remote host closed the connection]
kurko_ has quit [Ping timeout: 260 seconds]
kurko_ has joined #ruby-lang
shtirlic has quit [Remote host closed the connection]
nitti has quit [Ping timeout: 256 seconds]
bcardarella has joined #ruby-lang
Artheist has quit [Read error: Connection reset by peer]