<erikh>
err, can you link me to the code you're looking at?
<zzak>
etx/socket/socket.c
methods has quit [Quit: Leaving.]
<zzak>
ext*
<swarley>
winsock
<swarley>
is the 5th sign of the apocolypse
codewrangler has joined #ruby-lang
codewrangler has quit [Client Quit]
<zzak>
haha
<swarley>
jesus will come down from heaven, and rage war against it for 7 days
<erikh>
eh, it's not like it affects anyone these days but windows app developers
<swarley>
trying to creating a layer of compatibility
<zzak>
considering how little i know about sockets, this makes for an interesting read
<erikh>
at least you don't have to install it anymore
<erikh>
:)
<zzak>
yeah
<swarley>
winsocks
<swarley>
are another example of microsoft
<swarley>
being that one kid
<erikh>
actually the reasons they have for it are pretty good
<swarley>
who when an adult says "okay everyone, color your duck blue"
<swarley>
they color it fucking pink
<swarley>
what about the way they do internet explorer
<erikh>
windows doesn't fork
<zzak>
yeah, they do what they gotta do
<erikh>
and plus, from what I read in 10 minutes time it appears to have a bunch of event driven stuff in it
<erikh>
like, more than select()
<swarley>
explain the good reason to write a web browser and never feel the need to look at any documentation on the protocol
<erikh>
which would be a god damned godsend on unix
<zzak>
swarley: deadlines
<swarley>
epoll is event driven isnt it?
<erikh>
epoll is fairly new
<erikh>
winsock predates epoll :)
<zzak>
microsoft developers dont have the luxury of endless man hours like open source does
<swarley>
i can get socket.h working easier than winsock
<zzak>
not that i support microsoft in anyways, but at least they dont fork and resell existing open-source packages
<zzak>
so it is what it is
Ethan has joined #ruby-lang
<zzak>
but either way, Socket is great for at least supporting the Winsock api
<zzak>
or trying to
<erikh>
winsock is a C++ api
<erikh>
I have no idea why you would need to support it in a ruby program
<zzak>
because you can use ruby on windows
<zzak>
and socket is apart of ruby
<erikh>
yeah, just looked. it's just a portability layer.
<erikh>
makes sense.
<zzak>
Ruby's Socket implementation raises exceptions based on the error generated by the system dependent implementation. This is why the methods are documented in a way that isolate Unix-based system exceptions from Windows based exceptions.
<erikh>
for some reason I thought you were talking about a ruby program using the winsock API through some ruby wrapper or something
<erikh>
and I was like whaaaaaaaaaat
<zzak>
haha, no stdlib dood
undersc0re97 has quit [Ping timeout: 245 seconds]
<zzak>
there is a lot of windows specific code in ruby
<erikh>
well winsock does a lot more than BSD sockets does.
<zzak>
i think its out of the scope of the module to define exactly what winsock is or a unix socket
<zzak>
in docs
<erikh>
unix sockets
<erikh>
are files on disk
<erikh>
that represent a connection
<erikh>
winsock is a programmable API used to *interact* with sockets.
<zzak>
unix is an api
<erikh>
you are thinking of the BSD sockets API.
<zzak>
am i right?
<erikh>
PF_UNIX is a type of socket called "unix sockets"
<zzak>
yah, there is AF_UNIX as well
<erikh>
right. that's the address family (basically the filename)
<zzak>
which i think PF_* is just an alias, as AF_* is preferred standard
<erikh>
anyhow, when you refer to unix sockets most people will think you mean the little files on disk
<erikh>
the BSD sockets API is where accept() and bind() and friends come from.
<erikh>
if you type netstat -al at your shell, at the bottom of the output there are probably a hundred of these files
<zzak>
yeah
<erikh>
if you want to think of it another way; you use the BSD sockets API to deal with unix sockets.
<zzak>
thats where i learned about the difference between AF and PF
kiddorails has quit [Read error: Connection reset by peer]
nitti has joined #ruby-lang
<roadt>
i tried 'f = -> x,y;i,j,k { i,j,k=x,y,x+y; [i,j,k]}', ruby1.93 report error, but 'f = -> x,y { i,j,k=x,y,x+y; [i,j,k]}' is good, why?
<heftig>
roadt: because of that semicolon
nitti has quit [Ping timeout: 246 seconds]
yats has quit [Ping timeout: 246 seconds]
stchvt has joined #ruby-lang
<roadt>
heftig, you mean because ';i,j,k', i know it's diff. but.. why?
<heftig>
roadt: replace the semicolon with a comma
<heftig>
you made a syntax error
<roadt>
heftig, but i tried to make i,j,k local vars, no parameters.
<roadt>
s/no/not/
<heftig>
then remove them
jarib has quit [Excess Flood]
stchvt has quit [Client Quit]
<heftig>
if you explicitly want to shadow variables by the same name, use the lambda { |...| } syntax, not the stabby (->) one
jarib has joined #ruby-lang
Mellett68 has joined #ruby-lang
<roadt>
heftig, ok.
<roadt>
heftig, actually, i tried ->(x,y;i,j,k){..}, works well. lambda form looks good,too. but ->x,y;i,j,k{..} is not. but TRPL told , it should be good. that surprise me.
codewrangler has joined #ruby-lang
codewrangler has quit [Client Quit]
<roadt>
heftig, sorry i didn't make the question clear. but i think it should be consistent, for those 3 forms of lambda . except strong reason. but the problem is , bug? reason? :L
<roadt>
ruby 1.9.3p194
klaut has joined #ruby-lang
undersc0re97 has joined #ruby-lang
undersc0re97 has joined #ruby-lang
workmad3 has quit [Ping timeout: 265 seconds]
<heftig>
roadt: syntax limitation, probably
<heftig>
i dislike the stabby anyway
goshakkk has joined #ruby-lang
<roadt>
heftig, yeah, not stable feature. better not to use it now.
codewrangler has joined #ruby-lang
fromhet has joined #ruby-lang
codewrangler has quit [Client Quit]
<manveru>
oO
workmad3 has joined #ruby-lang
codewrangler has joined #ruby-lang
<manveru>
it's pretty stable, but i don't get what you're trying to do :)
codewrangler has quit [Client Quit]
fromhet has quit [Quit: fromhet]
gaveen has joined #ruby-lang
fromhet has joined #ruby-lang
kurko_ has joined #ruby-lang
canton7 has quit [Excess Flood]
kurko_ has quit [Ping timeout: 245 seconds]
kurko_ has joined #ruby-lang
canton7 has joined #ruby-lang
nitti has joined #ruby-lang
uuair has joined #ruby-lang
kurko_ has quit [Ping timeout: 264 seconds]
kurko_ has joined #ruby-lang
nitti has quit [Ping timeout: 260 seconds]
erichmenge has joined #ruby-lang
Carnage\ has quit [Read error: Operation timed out]
sush24 has joined #ruby-lang
sush24 has quit [Client Quit]
stchvt has joined #ruby-lang
solars has joined #ruby-lang
stchvt has quit [Client Quit]
cyri_ has quit [Quit: cyri_]
kurko_ has quit [Ping timeout: 260 seconds]
kurko_ has joined #ruby-lang
lcdhoffman has joined #ruby-lang
uuair has quit [Ping timeout: 256 seconds]
kurko_ has quit [Ping timeout: 245 seconds]
kurko_ has joined #ruby-lang
cyri_ has joined #ruby-lang
canton7 has quit [Remote host closed the connection]
* ddd
looks at matti's smoking wreck of a system. "Yes, yes he did!"
<matti>
zzak: And I lost everything I wrote on feedback ;]
<matti>
s/feedback/submit/
<matti>
ddd: Hm? :) What smoke? ...
* matti
whistles...
PifyZ has joined #ruby-lang
<ddd>
hehe
<matti>
:>
<ddd>
you know the stuff coming out your computer. Oh wait, its being masked by the anger smoke coming out your ears
dfanjul has joined #ruby-lang
PifyZ has quit [Client Quit]
<matti>
ddd: My friend had that...
<ddd>
hah
<matti>
ddd: "Mark: My new machine is water cooled" ... "Mark: Wait, what is this smell... smoke?!"
<matti>
ddd: Thankfully, it was his mp3 player charger daying ;p
erichmenge has joined #ruby-lang
<matti>
ddd: But boy of boy we have had laugh.
<ddd>
i have a friend who smokes that can make smoke come out his ears for real. no friggin clue how in the hell he does that. gotta have some sort of deformity that leads to the ear canal or something
<matti>
ddd: LOL
<ddd>
matti: dude, thats the number one reason that i have never gotten water cooled systems.
kiddorails has joined #ruby-lang
<ddd>
SO afraid something will pop or come loose and ZZZT there she goes
<matti>
ddd: In WC you would use mineral oil.
<ddd>
and knowing my luck.. it'll be when I'm not home and the house goes up in flames from the shorting
<matti>
ddd: Which is non-conductive with levels used in computing ;]
justinseiter has joined #ruby-lang
sailias has quit [Quit: Leaving.]
<matti>
ddd: Haha
<matti>
ddd: That reminds me when I was doing electronic engineering back at university.
<matti>
ddd: I am soldering... and pop...
<ddd>
oh nice
<ddd>
as the expression goes, happy happy joy joy.. NOT!
<matti>
ddd: There it goes another silicone... too much heat on these little surface mouted components.
CaptainJet has joined #ruby-lang
<ddd>
damn it, wife keeps walking away with the smokes! come back here woman!
<matti>
I hated it, not having proper soldering station for these.
<matti>
ddd: Quit smoking!
<matti>
ddd: *problem solved*
<matti>
;p
<ddd>
matti: haha, i didn't have that problem. the boards that were trashed by me were usually due to more fat fingering than grace
<ddd>
:)
<ddd>
and i'll gently ignore the quit smoking ;)
<matti>
;p
<ddd>
radio shack used to love seeing me coming.
<matti>
Smokers always react funny to people telling them to quit ;p
<ddd>
they always knew when i screwed something up. i walk through the door with this dark cloud and a list. they usually knew what happened. :-)
<matti>
ddd: I loved playing with electronics ;]
<matti>
ddd: Haha
ylluminate has quit [Quit: Bye!]
<matti>
ddd: "He is in a gloomy mood. Death Star did not work yet again, quick... get premium priced items out"
mistym has quit [Remote host closed the connection]
<ddd>
i miss it. haven't done it since my late teens, early 'adulthoold'
<ddd>
then again that means i'm somehow an adult. ;) not sure that applies
<ddd>
hahahah yeah exactly
<matti>
ddd: When you are young and curious
<matti>
ddd: Things ending up in a puff of smoke still make you proud ;d
<ddd>
now if only i could repair our electric range. rural kentucky, shitloads of tobacco fields around. we get mice all the time. they've been feasting on the lines in our range. or stealing parts for bed lining
<matti>
ddd: It does change with age, though.
<ddd>
very true
dfanjul has quit [Quit: leaving]
<ddd>
wife put down a pot kind of heavy the other day on the range, ticked off at the kids. MAN, you've not heard that loud of a POP come from an electrical device! hahaha. she *freaked*!
<ddd>
was funny at the time. the hell reserved for me for *laughing* .. not so much
<matti>
;p
areil has quit [Remote host closed the connection]
<ddd>
i pulled it out and looked inside. holy crow! i swear it looked like an abandoned mice building complex inside hehe
<ddd>
anyways, back to this droll minitest stuff, and a half assed eye on irc
ruby-lang750 has joined #ruby-lang
swarley has joined #ruby-lang
ruby-lang750 has quit [Client Quit]
* swarley
sighs
<swarley>
back to work
<matti>
swarley: :)
roadt has quit [Ping timeout: 264 seconds]
<swarley>
ctrl alt t mapped to opening a terminal is the best shortcut ever
<swarley>
ohai matti
lcdhoffman has joined #ruby-lang
<matti>
Heellooo swarley ;]
* matti
hugs swarley
* swarley
hugs
* matti
blushes
<matti>
;s
<swarley>
lol
<matti>
Working on the weekend?
<swarley>
Just on my library :p
<swarley>
I don't know why i keep working on it. I guess just to prove to myself i can finish something
<matti>
Yay!
nitti has joined #ruby-lang
<matti>
Way to go!
roadt has joined #ruby-lang
<matti>
GO team swarley GO
<swarley>
yaaaaaaaay
MouseTheLuckyDog has quit [Quit: Leaving]
methods has joined #ruby-lang
siyusong has joined #ruby-lang
nitti has quit [Ping timeout: 246 seconds]
kurko_ has joined #ruby-lang
kurko_ has quit [Ping timeout: 246 seconds]
havenn has joined #ruby-lang
kurko_ has joined #ruby-lang
<roadt>
manveru, f = ->x,y;i,j,k{} can you tell me fail reason? just got your comment.
slyphon_ has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
kurko_ has quit [Ping timeout: 245 seconds]
runeb has joined #ruby-lang
wyhaines has joined #ruby-lang
verbad has joined #ruby-lang
<swarley>
what
<swarley>
roadt; there are a lot of reasons that doesnt work
brunocoelho has joined #ruby-lang
methods has quit [Quit: Leaving.]
JohnBat26 has joined #ruby-lang
ryanf_ has joined #ruby-lang
kurko_ has joined #ruby-lang
burgestrand has joined #ruby-lang
siyusong has quit [Quit: Computer has gone to sleep.]
brunocoelho has quit [Remote host closed the connection]
burgestrand has quit [Ping timeout: 245 seconds]
lcdhoffman has joined #ruby-lang
<roadt>
swarley, hmmm.. i think it should work in ruby1.9.3. but it gives syntax error.
<roadt>
swarley, f = ->(x,y;i,j,k){} works well. why they are not consistent. i mean it should be, is it.
kurko_ has quit [Ping timeout: 256 seconds]
<roadt>
s/is it/isn't it/
<matti>
roadt: I am not sure why do you expect parser to handle every edge case?
kurko_ has joined #ruby-lang
<matti>
,k{} makes it not abvious to the parser what is your intention.
goshakkk has joined #ruby-lang
<matti>
Just learn to write decent code, for people's sake.
rindolf has joined #ruby-lang
Ziioynx has joined #ruby-lang
erichmenge has quit [Quit: Be back later]
<roadt>
matti, not really. -> ; { separate the parameters and local vars well. so is said in 'the ruby programming language' book which i'm reading and told me that.
runeb has quit [Remote host closed the connection]
<matti>
Right, OK.
<matti>
Whatever :)
runeb has joined #ruby-lang
Ziioynx has quit [Remote host closed the connection]
nitti has joined #ruby-lang
<roadt>
chapter 6.5.1.4. ;) i think it should be consistent, for those 3 forms of lambda . except strong reason. but the problem is , bug? reason? :L
blacktulip has joined #ruby-lang
runeb has quit [Remote host closed the connection]
<roadt>
to prove i'm not bluffing. anyway. tks for comment.
<matti>
I am not saying you do ;]
nitti has quit [Ping timeout: 260 seconds]
<roadt>
matti, be aware of that. XD
<matti>
What book is it?
ryanlecompte has quit [Remote host closed the connection]
<roadt>
matti, take it as a bug for now. :)
<roadt>
matti, the ruby programming language. that one from ruby 's creator.
<swarley>
roadt; no that makes no sense. because in using a line end, you are declaring the end of a statement
<swarley>
using ;
<swarley>
you are saying the argument list is done
<roadt>
matti, you know, can not run the example of his book. feel weird.
<swarley>
The ruby lexer is in the right. there is no bug
<matti>
swarley: s/line end/statement finish/
<matti>
Of course there is not.
<swarley>
matti; that's what i meant to say
<swarley>
but it was to late before i recognized what i had said
<matti>
swarley: It is correct for Python though ;p
<swarley>
by line in meant line of code
outoftime has joined #ruby-lang
<swarley>
I meant*
<matti>
swarley: So +0.5 anyway ;p
<swarley>
xD
<roadt>
swarley, "As with method declarations, the parentheses in lambda literals are optional, because the parameter list and local variable lists are completely delimited by the ->, ;, and {. We could rewrite the three lambdas above like this: f = -> x,y; i,j,k { ... }" 6.5.1.4 Lambda literals
<roadt>
swarley, so that is the problem i'm asking. either lexer or the book.
<swarley>
its the book
<swarley>
if you use ; in the normal lexical space, it means whatever you're doing, is done
<roadt>
swarley, it's not impossible. either one. just what the language should be.
<swarley>
also
<swarley>
->x,y i,j,k makes no sense either
<roadt>
swarley, -> can be a start of a lexial context which gives ; special meaning.
jmeeuwen has quit [Quit: Disconnecting from stoned server.]
<swarley>
nope, not according to what i just did in pry
gsav has quit [Quit: Lost terminal]
jmeeuwen has joined #ruby-lang
<swarley>
->x,y; is an error, and i,j,k by itself is also an error
<swarley>
i,j,k{}
cyri_ has quit [Quit: cyri_]
gsav has joined #ruby-lang
<roadt>
swarley, ->x,y;i,j,k{} gives x,y paramter, i,j,k local vars that not bind to outer context, to make sure change them not change outer context.
wyhaines has quit [Remote host closed the connection]
<roadt>
swarley, but ->(x,y;i,j,k){} is good.
<swarley>
that makes zero sense. I mean, i concede that it is syntatically possible, but in terms of syntatical consistency it makes no sense
<roadt>
swarley, so ';' is ';' in current lexer. it is. just terminator.
<swarley>
I understand that you are correct in its usage, just i think as a language design that should be rethought
<matti>
roadt: () makes it a whole different thing.
<matti>
roadt: Skipping () confuses parser.
<matti>
roadt: There is hard to tell where is your desired lexical bingind.
<matti>
Ruby should never have allowed for skipping parens.
<matti>
It creates idiotic code that is hard to maintain nad comprehand.
<roadt>
matti, skipping parens. is what ruby was doing and is doing. XD. to give ruby free style function call/def.
<swarley>
matti; in some cases it looks good, but in most cases i like to keep them in
<roadt>
matti, but i got your point.
<swarley>
it makes for more readable code
<matti>
Lack of parens? ;]
wallerdev has quit [Quit: wallerdev]
<swarley>
the main case where skipping parens is more attractive is internal DSL
<swarley>
like sinatra
<matti>
swarley: Sadly, it has become itiom for lazy developers.
<roadt>
swarley, surely, i should say it is one of core feature of ruby.
<matti>
idiom*
<swarley>
well, sinatra doesnt use much of it
<roadt>
swarley, s/surely/sure/
<swarley>
i almost never omit parenthesis though
<zzak>
my general rule of thumb, is for blocks that apply to the 'do..end' rule, parens aren't absolutely necessary; where blocks that apply to the '{...}' rule should absolutely have parens
<matti>
ANyway, its a holy war over it.
<swarley>
i find it hard to follow code without it
* roadt
still do no't think lexer reason is strong enough.
<zzak>
but its just a style thing
<swarley>
if there were dot and dollar sign operators in ruby like haskell has, it would be a different story, but there isnt
<matti>
zzak: exit 1 if foo has to have parens as well.
ryanf_ has quit [Quit: leaving]
<zzak>
coffeescript is a whole other story, people that dont use parens in CS should... have a not so great day or something
<matti>
:>
<matti>
roadt: You may have a point if you think is a divergance from the norm.
<matti>
roadt: You can always ask on the mailing list ;]
justinram has joined #ruby-lang
KillerFox has quit [Ping timeout: 244 seconds]
<roadt>
matti, tks. you know, the whole problem is, someone write it in the book , told 'oh, it works'. but i can't make it work. :>
KillerFox has joined #ruby-lang
<swarley>
roadt; dont blame the lexer
<roadt>
matti, where the ruby's spec is..
<swarley>
think about it this way
<swarley>
puts puts
<swarley>
what does that output
<matti>
swarley: An elephant!
<swarley>
very good matti
<swarley>
[6] pry(main)> puts puts
<swarley>
An elephant!
<swarley>
=> nil
<swarley>
the lexer is only as good as you can help it be
<matti>
;]
<matti>
Yay!
<matti>
Parsers and lexrs are hard to write.
<matti>
Even Perl fails sometimes. Despite ti being almost rubber-stretchgrade one.
<roadt>
swarley, will not try to blame. XD
<swarley>
well the problem with perl
<swarley>
is that perl breaks its own rules
<swarley>
constantly
* matti
hugs r
<matti>
Ops
* matti
hugs roadt
* matti
puts Starbucks broadband on fire
<swarley>
god its so hard to focus on this library
kurko_ has quit [Ping timeout: 245 seconds]
jtoy has joined #ruby-lang
rindolf has quit [Read error: Connection timed out]
rindolf has joined #ruby-lang
siyusong has joined #ruby-lang
kurko_ has joined #ruby-lang
KillerFox has quit [Ping timeout: 244 seconds]
KillerFox has joined #ruby-lang
sepp2k1 has joined #ruby-lang
sepp2k has quit [Ping timeout: 260 seconds]
freedrull has joined #ruby-lang
brianpWins has joined #ruby-lang
jtoy has quit [Ping timeout: 260 seconds]
<freedrull>
is there an easy way to specify an arbitary time, like today at 6pm? Time.at("18:00") ....?
kiddorails has left #ruby-lang [#ruby-lang]
kurko_ has quit [Ping timeout: 255 seconds]
<roadt>
matti, XD
<swarley>
Hey guys
<swarley>
I'm procrastinating so much
<zzak>
freedrull: Time.parse("
<zzak>
freedrull: Time.parse("18:00")
<swarley>
look what i made in C, just out of procrastination
<swarley>
Foo *foo = new(Foo);
<swarley>
printf("%s", $(foo, testMethod));
<roadt>
swarley, it's hot. lol,
<rindolf>
swarley: isn't it C++?
<swarley>
nope, that's C
<swarley>
i did it using structs and these two preprocessors