Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_phaul has quit [Ping timeout: 268 seconds]
_phaul has joined #ruby
Mrbuck has joined #ruby
<Bish>
can somebody explain to me what exactly the difference between eof and closed? on a socket is?
<Bish>
i understand why this is needed for files
<Bish>
but why exactly can a unixsocket send me "eof" while it's not closed
greenhat has joined #ruby
_phaul has quit [Ping timeout: 250 seconds]
ellcs has quit [Ping timeout: 252 seconds]
_phaul has joined #ruby
brool has joined #ruby
_phaul has quit [Ping timeout: 252 seconds]
emptyflask has joined #ruby
_phaul has joined #ruby
cjhutchi has joined #ruby
cjhutchi has left #ruby [#ruby]
Bish has left #ruby [#ruby]
_phaul has quit [Ping timeout: 268 seconds]
_phaul has joined #ruby
davidw has joined #ruby
davidw has joined #ruby
davidw has quit [Changing host]
rainmanjam has quit [Read error: Connection reset by peer]
_phaul has quit [Ping timeout: 250 seconds]
mgraf_ has joined #ruby
TCZ has joined #ruby
_phaul has joined #ruby
yann-kaelig has quit [Quit: yann-kaelig]
_phaul has quit [Ping timeout: 265 seconds]
_phaul has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
kapil_ has quit [Quit: Connection closed for inactivity]
buckworst has quit [Quit: WeeChat 2.3]
sixty4bit has joined #ruby
_phaul has quit [Ping timeout: 250 seconds]
DTZUZO has joined #ruby
_phaul has joined #ruby
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andikr has quit [Remote host closed the connection]
Bish has joined #ruby
Jonopoly has quit [Quit: WeeChat 2.5]
<havenwood>
"It is extremely useful to be able to send an. EOF to the other end while still being able to read the socket. Consider the case of a socket-copying program such as a proxy server, which simply copies all its input to its output in both directions; it needs to be able to transmit a received EOF from one side to the other, but it can't assume that the end to which it transmitted the EOF has finished sending data in the other direction, so it can't
<havenwood>
just transmit EOF by closing the socket: it needs to shutdown its output."
_phaul has quit [Ping timeout: 276 seconds]
<havenwood>
^ from Fundamental Networking in Java
<havenwood>
Bish: has ^
spacesuitdiver has joined #ruby
<havenwood>
Bish: "Output shutdown can also be used to semi-synchronize client and server before closing, in circumstances where this is important. Before closing, both ends do an output shutdown and then a blocking. read expecting an EOF. When the EOF is received, that end is assured that the other end has done the output shutdown. Whichever end did the output shutdown first will block in the read for the other ed to do its shutdown."
_phaul has joined #ruby
cthu| has quit [Read error: Connection reset by peer]
_phaul has quit [Ping timeout: 265 seconds]
cthu| has joined #ruby
_phaul has joined #ruby
chalkmonster has quit [Ping timeout: 268 seconds]
Mrbuck has quit [Ping timeout: 252 seconds]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
SuperLag has quit [Quit: reboot reboot reboot]
_phaul has quit [Ping timeout: 246 seconds]
NODE has quit [Client Quit]
jenrzzz has joined #ruby
SuperLag has joined #ruby
mikecmpbll has joined #ruby
NODE has joined #ruby
mgraf_ has quit [Ping timeout: 240 seconds]
NODE has quit [Client Quit]
_phaul has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 250 seconds]
NODE has joined #ruby
bvdw has joined #ruby
TCZ has quit [Quit: Bye Bye]
mikecmpbll has quit [Quit: inabit. zz.]
TCZ has joined #ruby
clemens3 has quit [Quit: WeeChat 1.6]
_phaul has quit [Ping timeout: 276 seconds]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
_phaul has joined #ruby
mgraf has joined #ruby
bruce_lee has quit [Ping timeout: 250 seconds]
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_phaul has quit [Ping timeout: 250 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
spacesuitdiver has joined #ruby
Ai9zO5AP has joined #ruby
<Bish>
havenwood: understood, didnt find a source like that
fphilipe_ has quit [Ping timeout: 265 seconds]
<Bish>
but how would i send a eof
_phaul has joined #ruby
<Bish>
the only way i can imagine is closing the socket
i9zO5AP has quit [Ping timeout: 276 seconds]
mgraf has quit [Ping timeout: 276 seconds]
_phaul has quit [Ping timeout: 250 seconds]
_phaul has joined #ruby
TCZ has quit [Quit: Bye Bye]
<Bish>
i think what confuses me that IO includes "closed?" into sockets
<Bish>
which remains false, even if eof? is true
<Bish>
why is that?
<Bish>
because eof? true means there is no way the socket can still be used (without connecting again) if thats possible
_phaul has quit [Ping timeout: 250 seconds]
<Bish>
or am i wrong with anything there?
bitwinery has joined #ruby
_phaul has joined #ruby
fuzzface has quit [Ping timeout: 246 seconds]
_phaul has quit [Ping timeout: 265 seconds]
_phaul has joined #ruby
renich has joined #ruby
_phaul has quit [Ping timeout: 240 seconds]
<havenwood>
&>> require 'socket'; a, b = UNIXSocket.pair; a.close_write; [a.closed?, b.eof?]
<rubydoc>
stderr: playpen: application terminated abnormally with signal 31 (Bad system call) (https://carc.in/#/r/84qe)
<havenwood>
Bish: #=> [false, true]
<havenwood>
Bish: With #close_write, EOF is sent without closing read.
yokel has quit [Remote host closed the connection]
yokel has joined #ruby
_phaul has joined #ruby
mgraf_ has joined #ruby
_phaul has quit [Ping timeout: 252 seconds]
_phaul has joined #ruby
_phaul has quit [Ping timeout: 268 seconds]
cthu| has quit [Read error: Connection reset by peer]
cthu| has joined #ruby
<Bish>
havenwood, al2o3-cr: thanks for your help
_phaul has joined #ruby
millerti has joined #ruby
<Bish>
i went home from work (because slow response)
<millerti>
Is it possible to run a Ruby program setuid root? I tried setting the s bit on a ruby program, but I get permission denied when trying to write a particular file owned by root.
<Bish>
havenwood: but in my example (talking with the docker daemon via unixsocket)
<Bish>
the server sends eof, but closed? remains false
<Bish>
why doesn't it close the connection if there is _no way_ to ever receive something?
ur5us has joined #ruby
_phaul has quit [Ping timeout: 240 seconds]
<nofxx>
millerti, just like any other way to write on *nix, you need to run as root to do that
<al2o3-cr>
millerti: setuid bit doesn't work for scripts in linux.
<Bish>
ohshit it doesn't?
sammi`_ has joined #ruby
<millerti>
I know it doesn't work on Bash scripts, but googling, I found that the Ruby interpreter is aware of the s bit.
jenrzzz has joined #ruby
<al2o3-cr>
millerti: no scripts.
<Bish>
yeah but does it matter? i mean the ruby script cannot elevate itself just because its reading a file
<Bish>
the ruby interpreter*
davispuh has joined #ruby
jenrzzz has quit [Read error: Connection reset by peer]
sammi` has quit [Ping timeout: 268 seconds]
r29v has joined #ruby
mwlang_ has quit [Quit: mwlang_]
lucasb has quit [Quit: Connection closed for inactivity]
jenrzzz has joined #ruby
_phaul has joined #ruby
<Bish>
al2o3-cr: i read the manpage, yeah u can individiually close read and write
<Bish>
but why the heck doesn't it close the connection?
<Bish>
and if i have a pair of unixservers, why the heck is the second not closed? while i invoked .close on the first one
<Bish>
i am guessing closed? is just for files?
_phaul has quit [Ping timeout: 240 seconds]
_phaul has joined #ruby
mgraf_ has quit [Ping timeout: 240 seconds]
bruce_lee has quit [Ping timeout: 240 seconds]
bruce_lee has joined #ruby
ellcs has quit [Ping timeout: 250 seconds]
mgraf__ has joined #ruby
jenrzzz has quit [Read error: Connection reset by peer]
_phaul has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
Fernando-Basso has quit [Ping timeout: 265 seconds]
_phaul has joined #ruby
dellavg has quit [Ping timeout: 240 seconds]
slavicBohemian has quit [Ping timeout: 265 seconds]
SlavicBohemian_ is now known as SlavicBohemian
_phaul has quit [Ping timeout: 268 seconds]
captain_none_ame has joined #ruby
<captain_none_ame>
hi
<havenwood>
captain_none_ame: hi!
<captain_none_ame>
In a regular fight, who win Perl or Ruby ?
mroutis has quit [Quit: leaving]
mroutis has joined #ruby
<captain_none_ame>
hi Mr. havenwood
<captain_none_ame>
Mr. havenwood , In a regular fight, who win Perl or Ruby ?
_phaul has joined #ruby
<havenwood>
captain_none_ame: Perl 5 or Perl 6?
mwlang_ has joined #ruby
<captain_none_ame>
Perl 5
<captain_none_ame>
Perl 6, is a new language
<captain_none_ame>
I am talking about Perl
<captain_none_ame>
Mr. havenwood
<havenwood>
captain_none_ame: My formal title is havenwood, Esq.
<uplime>
havenwood: surely you mean raku!
<havenwood>
uplime: I thought it!
Fernando-Basso has joined #ruby
<uplime>
hehe
mgraf__ has quit [Ping timeout: 265 seconds]
mroutis has quit [Client Quit]
ellcs has joined #ruby
<captain_none_ame>
havenwood, Esq Is ruby dying ?
<havenwood>
captain_none_ame: Nope, it doesn't seem like any of the top ten languages are dying. They've gotten fairly well entrenched. There are a few new players but the old ones aren't falling off these days like in the past.
_phaul has quit [Ping timeout: 268 seconds]
<captain_none_ame>
Ok thanks. Do you knows some things about Rails havenwood , Esq ?
<havenwood>
captain_none_ame: Yes, many Rubyists know of Rails.
Guest50338 has joined #ruby
Guest50338 is now known as RougeR__
<captain_none_ame>
Which is better Laravel, django or Rails ?
r29v has quit [Quit: r29v]
<uplime>
if your project is already in python, django is better. if your project is already in ruby, rails is better
<uplime>
if your project is already in php, laravel is better
<captain_none_ame>
Hi Mr. uplime
<uplime>
hello
<havenwood>
captain_none_ame: Those are three fairly similar tools. They're all nicely done and well maintained.
<havenwood>
captain_none_ame: All MVC pattern architecture too.
<captain_none_ame>
Mr. uplime If there is no project yet ? Which is better to start from scratch ?
<uplime>
whichever language you're most comfortable with
<havenwood>
captain_none_ame: Django is for perfectionists with deadlines and Rails is for making friendly programmers happy. Which appeals to you more?
<uplime>
havenwood may be too close to this
<captain_none_ame>
both
<havenwood>
captain_none_ame: What does the app do?
<captain_none_ame>
Is there any solution to replace the ":" in Python with curly braces ?
<captain_none_ame>
The problem with phoenix is that I should learn a lot of things to go with it
<uplime>
is that the elixir one?
<captain_none_ame>
I'm also not confortable with functionnal programming
<havenwood>
uplime: Aye. Super nicely done.
<uplime>
yeah, it seems pretty nice. the bit i played around with it, it reminded me of rails
<havenwood>
captain_none_ame: I've had a Laravel, Django, Rails and Phoenix app in the past. I loved the Rails app best since it was the most polished code and had the most glorious tests.
<captain_none_ame>
Also some folks said it is not as stable as the 3 others
mroutis has joined #ruby
<havenwood>
captain_none_ame: Elixir isn't as entrenched, but it's quite stable.
<captain_none_ame>
Good , I will try it one day
<havenwood>
It is functional, but in an accessible way.
<havenwood>
I think it's easier to teach Elixir than Ruby, but I love Ruby.
<captain_none_ame>
And you hate Perl
<havenwood>
captain_none_ame: Perl 5 or Perl 6?
<captain_none_ame>
5
<havenwood>
captain_none_ame: There are a fair number of monks here.
<captain_none_ame>
havenwood Which hosting provider do you recommand for a Ruby project ?
deepredsky has quit [Ping timeout: 268 seconds]
<captain_none_ame>
Sorry if my English look perlish, I'am not an english native
_phaul has quit [Ping timeout: 276 seconds]
<havenwood>
captain_none_ame: AWS, GCP or Azure are often good bets. Or a one-click deploy to Heroku.
lxsameer has quit [Ping timeout: 252 seconds]
<captain_none_ame>
Perfect thanks.
<captain_none_ame>
Last question before I stop to annoy you
<captain_none_ame>
Which is better for creating a good project fast Rails or Django ?
<captain_none_ame>
GOOD *
mgraf__ has joined #ruby
RougeR__ has quit [Ping timeout: 252 seconds]
davor has quit [Ping timeout: 268 seconds]
_phaul has joined #ruby
davor has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
akem__ is now known as akem
nicola_ has quit [Quit: nicola_]
NODE has quit [Client Quit]
nowhere_man has joined #ruby
_phaul has quit [Ping timeout: 276 seconds]
NODE has joined #ruby
chalkmonster has joined #ruby
NODE has quit [Client Quit]
chalkmon1 has quit [Ping timeout: 250 seconds]
Meowcenary has quit []
NODE has joined #ruby
_phaul has joined #ruby
grilix has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 265 seconds]
<havenwood>
captain_none_ame: If you say what the project is going to do we'll know how GOOD it needs to be and then can help you pick a framework with the appropriate goodness.