yahns Ruby server user/dev discussion
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [ANN] yahns 1.15.0 -_- sleepy app server for Ruby
@ 2017-03-23  4:07  6% Eric Wong
  0 siblings, 0 replies; 5+ results
From: Eric Wong @ 2017-03-23  4:07 UTC (permalink / raw)
  To: ruby-talk, yahns-public

A Free Software, multi-threaded, non-blocking network
application server designed for low _idle_ power consumption.
It is primarily optimized for applications with occasional users
which see little or no traffic.  yahns currently hosts Rack/HTTP
applications, but may eventually support other application
types.  Unlike some existing servers, yahns is extremely
sensitive to fatal bugs in the applications it hosts.

* git clone git://yhbt.net/yahns
* https://yhbt.net/yahns/README
* https://yhbt.net/yahns/NEWS.atom.xml (supported by most "RSS" readers)
* we only accept plain-text email yahns-public@yhbt.net
* and archive all the mail we receive: https://yhbt.net/yahns-public/
* nntp://news.public-inbox.org/inbox.comp.lang.ruby.yahns

lrg nabgure ubeevoyl-anzrq freire :>

Changes:

    yahns 1.15.0
    
    Minor changes to reduce allocations and simplify our code
    and dependencies.  Nothing particularly interesting unless
    you're the type of person who appreciates brake pedals
    in with holes drilled in them for weight reduction.
    
    11 changes since 1.14.1 (2016-12-14):
          stream_input: avoid allocation for common #read case
          proxy_pass: add a note about the instability of this
          tee_input: simplify conditional for writing to temporary file
          proxy_http_response: reduce memory pressure from larger headers
          http_response: make response headers eligible for GC, sooner
          update more referenced URLs to be HTTPS
          chunk_body: nodoc this internal class
          Revert "use olddoc 1.1.0 for generating NEWS + NEWS.atom.xml"
          gemspec: stop advertising "private" email address
          doc: design_notes: we do not use EPOLLEXCLUSIVE
          README: update with disclaimer about subscription
    
    Ovt punatrf pbzvat...

Please note the disclaimer:

  yahns is extremely sensitive to fatal bugs in the apps it hosts.  There
  is no (and never will be) any built-in "watchdog"-type feature to kill
  stuck processes/threads.  Each yahns process may be handling thousands
  of clients; unexpectedly killing the process will abort _all_ of those
  connections.  Lives may be lost!

  yahns hackers are not responsible for your application/library bugs.
  Use an application server which is tolerant of buggy applications
  if you cannot be bothered to fix all your fatal bugs.

-- 
EW

^ permalink raw reply	[relevance 6%]

* [PATCH 3/4] Revert "use olddoc 1.1.0 for generating NEWS + NEWS.atom.xml"
  2017-03-05 22:29  6% [PATCH 0/4] documentation cleanups and tidying Eric Wong
@ 2017-03-05 22:30  6% ` Eric Wong
  0 siblings, 0 replies; 5+ results
From: Eric Wong @ 2017-03-05 22:30 UTC (permalink / raw)
  To: yahns-public

This reverts commit bcf0f0efb3173b18957ddba2af6592219a2d72a3.

The dependency on olddoc makes it slightly more difficult for
users to package their own and distribute RubyGems.  We will
also not host HTML RDoc files since we have no internal API
to support.
---
 .gitignore  |   1 -
 .olddoc.yml |   7 -----
 Rakefile    | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 3 files changed, 97 insertions(+), 12 deletions(-)
 delete mode 100644 .olddoc.yml

diff --git a/.gitignore b/.gitignore
index c1c147f..45603bb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,4 +15,3 @@
 .gem-manifest
 .tgz-manifest
 /doc
-/LATEST
diff --git a/.olddoc.yml b/.olddoc.yml
deleted file mode 100644
index 67b78d0..0000000
--- a/.olddoc.yml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-cgit_url: https://yhbt.net/yahns.git
-git_url: git://yhbt.net/yahns.git
-rdoc_url: https://yhbt.net/yahns/
-ml_url: https://yhbt.net/yahns-public/
-public_email: yahns-public@yhbt.net
-private_email: yahns@yhbt.net
diff --git a/Rakefile b/Rakefile
index b776c4a..3eb0219 100644
--- a/Rakefile
+++ b/Rakefile
@@ -66,12 +66,105 @@ def tags
   end.compact.sort { |a,b| b[:time] <=> a[:time] }
 end
 
+def xml(dst, tag, text = nil, attrs = nil)
+  if Hash === text
+    attrs = text
+    text = nil
+  end
+  if attrs
+    attrs = attrs.map { |k,v| "#{k}=#{v.encode(xml: :attr)}" }
+    attrs = "\n#{attrs.join("\n")}"
+  end
+  case text
+  when nil
+    if block_given?
+      dst << "<#{tag}#{attrs}>"
+      yield
+      dst << "</#{tag}>"
+    else
+      dst << "<#{tag}#{attrs}/>"
+    end
+  else
+    dst << "<#{tag}#{attrs}>#{text.encode(xml: :text)}</#{tag}>"
+  end
+end
+
 desc 'prints news as an Atom feed'
 task "NEWS.atom.xml" do
-  # gem install 'olddoc', 'olddoc prepare' has no API besides the
-  # command-line.  This requires olddoc 1.1 or later.
-  system('olddoc', 'prepare') or abort "olddoc prepare failed #$?"
+  require 'uri'
+  cgit_uri = URI('https://yhbt.net/yahns.git')
+  uri = URI('https://yhbt.net/yahns/')
+  new_tags = tags[0,10]
+  time = nil
+  project_name = 'yahns'
+  short_desc = File.readlines('README')[0].split(' - ')[0]
+  new_tags = tags[0,10]
+  atom_uri = uri.dup
+  atom_uri.path += 'NEWS.atom.xml'
+  news_uri = uri.dup
+  news_uri.path += 'NEWS.html'
+  dst = ''
+  xml(dst, 'feed', xmlns: 'http://www.w3.org/2005/Atom') do
+    xml(dst, 'id', atom_uri.to_s)
+    xml(dst, 'title', "#{project_name} news")
+    xml(dst, 'subtitle', short_desc)
+    xml(dst, 'link', rel: 'alternate', type: 'text/html', href: news_uri.to_s)
+    xml(dst, 'updated', new_tags.empty? ? '1970-01-01:00:00:00Z'
+                                      : new_tags[0][:time])
+    new_tags.each do |tag|
+      xml(dst, 'entry') do
+        xml(dst, 'title', tag[:subject])
+        xml(dst, 'updated', tag[:time])
+        xml(dst, 'published', tag[:time])
+        xml(dst, 'author') do
+          xml(dst, 'name', tag[:tagger_name])
+          xml(dst, 'email', tag[:tagger_email])
+        end
+        uri = cgit_uri.dup
+        uri.path += '/tag/'
+        uri.query = "id=#{tag[:tag]}"
+        uri = uri.to_s
+        xml(dst, 'link', rel: 'alternate', type: 'text/html', href: uri)
+        xml(dst, 'id', uri)
+        xml(dst, 'content', type: 'xhtml') do
+          xml(dst, 'div', xmlns: 'http://www.w3.org/1999/xhtml') do
+            xml(dst, 'pre', tag[:body])
+          end # div
+        end # content
+      end # entry
+    end # new_tags.each
+  end # feed
+
+  fp = Tempfile.new('NEWS.atom.xml', '.')
+  fp.sync = true
+  fp.write(dst)
+  fp.chmod 0644
+  File.utime(time, time, fp.path) if time
+  File.rename(fp.path, 'NEWS.atom.xml')
+  fp.close!
 end
 
 desc 'prints news as a text file'
-task 'NEWS' => 'NEWS.atom.xml'
+task 'NEWS' do
+  fp = Tempfile.new('NEWS', '.')
+  fp.sync = true
+  time = nil
+  tags.each do |tag|
+    time ||= tag[:time_obj]
+    line = tag[:subject] + ' / ' + tag[:time].sub(/T.*/, '')
+    fp.puts line
+    fp.puts('-' * line.length)
+    fp.puts
+    fp.puts tag[:body]
+    fp.puts
+  end
+  fp.write("Unreleased\n\n") unless fp.size > 0
+  fp.puts "COPYRIGHT"
+  fp.puts "---------"
+  fp.puts "Copyright (C) 2013-2017 all contributors <yahns-public@yhbt.net>"
+  fp.puts "License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>"
+  fp.chmod 0644
+  File.utime(time, time, fp.path) if time
+  File.rename(fp.path, 'NEWS')
+  fp.close!
+end
-- 
EW


^ permalink raw reply related	[relevance 6%]

* [PATCH 0/4] documentation cleanups and tidying
@ 2017-03-05 22:29  6% Eric Wong
  2017-03-05 22:30  6% ` [PATCH 3/4] Revert "use olddoc 1.1.0 for generating NEWS + NEWS.atom.xml" Eric Wong
  0 siblings, 1 reply; 5+ results
From: Eric Wong @ 2017-03-05 22:29 UTC (permalink / raw)
  To: yahns-public

Eric Wong (4):
      update more referenced URLs to be HTTPS
      chunk_body: nodoc this internal class
      Revert "use olddoc 1.1.0 for generating NEWS + NEWS.atom.xml"
      gemspec: stop advertising "private" email address

 .gitignore                     |   1 -
 .olddoc.yml                    |   7 ---
 Documentation/yahns-rackup.pod |   2 +-
 Documentation/yahns_config.pod |   4 +-
 HACKING                        |  13 +++---
 README                         |   2 +-
 Rakefile                       | 101 +++++++++++++++++++++++++++++++++++++++--
 examples/logrotate.conf        |   2 +-
 lib/yahns/chunk_body.rb        |   3 +-
 yahns.gemspec                  |   2 +-
 10 files changed, 112 insertions(+), 25 deletions(-)


^ permalink raw reply	[relevance 6%]

* [PATCH] use olddoc 1.1.0 for generating NEWS + NEWS.atom.xml
@ 2015-10-15 16:40  7% Eric Wong
  0 siblings, 0 replies; 5+ results
From: Eric Wong @ 2015-10-15 16:40 UTC (permalink / raw)
  To: yahns-public

This removes the build-time dependency on Nokogiri, which can
be time-consuming to install.  We won't be supporting any public
APIs, so we will not actually support RDoc here.
---
 .gitignore  |  1 +
 .olddoc.yml |  7 ++++++
 Rakefile    | 72 ++++---------------------------------------------------------
 3 files changed, 12 insertions(+), 68 deletions(-)
 create mode 100644 .olddoc.yml

diff --git a/.gitignore b/.gitignore
index 3c8af53..2d6dc88 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,4 @@
 .gem-manifest
 .tgz-manifest
 /doc
+/LATEST
diff --git a/.olddoc.yml b/.olddoc.yml
new file mode 100644
index 0000000..585a3a2
--- /dev/null
+++ b/.olddoc.yml
@@ -0,0 +1,7 @@
+---
+cgit_url: http://yhbt.net/yahns.git
+git_url: git://yhbt.net/yahns.git
+rdoc_url: http://yahns.yhbt.net/
+ml_url: http://yhbt.net/yahns-public/
+public_email: yahns-public@yhbt.net
+private_email: yahns@yhbt.net
diff --git a/Rakefile b/Rakefile
index 8a2ca77..e8e4af0 100644
--- a/Rakefile
+++ b/Rakefile
@@ -61,76 +61,12 @@ def tags
   end.compact.sort { |a,b| b[:time] <=> a[:time] }
 end
 
-url_base = 'http://yahns.yhbt.net'
-cgit_url = 'http://yhbt.net/yahns.git'
-git_url = 'git://yhbt.net/yahns.git'
-since = "v0.0.2"
-
 desc 'prints news as an Atom feed'
 task "NEWS.atom.xml" do
-  require 'nokogiri'
-  new_tags = tags[0,10]
-  time = nil
-  str = Nokogiri::XML::Builder.new do
-    feed :xmlns => "http://www.w3.org/2005/Atom" do
-      id! "#{url_base}/NEWS.atom.xml"
-      title "yahns news"
-      subtitle "sleepy, multi-threaded, non-blocking Ruby application server"
-      link! :rel => 'alternate', :type => 'text/plain',
-            :href => "#{url_base}/NEWS"
-      updated(new_tags.empty? ? "1970-01-01T00:00:00Z" : new_tags.first[:time])
-      new_tags.each do |tag|
-        time ||= tag[:time_obj]
-        entry do
-          title tag[:subject]
-          updated tag[:time]
-          published tag[:time]
-          author {
-            name tag[:tagger_name]
-            email tag[:tagger_email]
-          }
-          url = "#{cgit_url}/tag/?id=#{tag[:tag]}"
-          link! :rel => "alternate", :type => "text/html", :href =>url
-          id! url
-          message_only = tag[:body].split(/\n.+\(\d+\):\n {6}/).first.strip
-          content({:type =>:text}, message_only)
-          content(:type =>:xhtml) { pre tag[:body] }
-        end
-      end
-    end
-  end.to_xml
-
-  fp = Tempfile.new("NEWS.atom.xml", ".")
-  fp.sync = true
-  fp.write(str)
-  fp.chmod 0644
-  File.utime(time, time, fp.path) if time
-  File.rename(fp.path, "NEWS.atom.xml")
-  fp.close!
+  # gem install 'olddoc', 'olddoc prepare' has no API besides the
+  # command-line.  This requires olddoc 1.1 or later.
+  system('olddoc', 'prepare') or abort "olddoc prepare failed #$?"
 end
 
 desc 'prints news as a text file'
-task "NEWS" do
-  fp = Tempfile.new("NEWS", ".")
-  fp.sync = true
-  time = nil
-  tags.each do |tag|
-    time ||= tag[:time_obj]
-    line = tag[:subject] + " / " + tag[:time].sub(/T.*/, '')
-    fp.puts line
-    fp.puts("-" * line.length)
-    fp.puts
-    fp.puts tag[:body]
-    fp.puts
-  end
-  fp.write("Unreleased\n\n") unless fp.size > 0
-  fp.puts "COPYRIGHT"
-  fp.puts "---------"
-  bdfl = 'Eric Wong <normalperson@yhbt.net>'
-  fp.puts "Copyright (C) 2013, #{bdfl} and all contributors"
-  fp.puts "License: GPLv3 or later (http://www.gnu.org/licenses/gpl-3.0.txt)"
-  fp.chmod 0644
-  File.utime(time, time, fp.path) if time
-  File.rename(fp.path, "NEWS")
-  fp.close!
-end
+task 'NEWS' => 'NEWS.atom.xml'
-- 
EW


^ permalink raw reply related	[relevance 7%]

* [PATCH] use olddoc 1.1.0 for generating NEWS + NEWS.atom.xml
@ 2015-10-15  1:53  7% Eric Wong
  0 siblings, 0 replies; 5+ results
From: Eric Wong @ 2015-10-15  1:53 UTC (permalink / raw)
  To: yahns-public

This removes the build-time dependency on Nokogiri, which can
be time-consuming to install.  We won't be supporting any public
APIs, so we will not actually support RDoc here.
---
 .gitignore  |  1 +
 .olddoc.yml |  7 ++++++
 Rakefile    | 72 ++++---------------------------------------------------------
 3 files changed, 12 insertions(+), 68 deletions(-)
 create mode 100644 .olddoc.yml

diff --git a/.gitignore b/.gitignore
index 3c8af53..2d6dc88 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,4 @@
 .gem-manifest
 .tgz-manifest
 /doc
+/LATEST
diff --git a/.olddoc.yml b/.olddoc.yml
new file mode 100644
index 0000000..585a3a2
--- /dev/null
+++ b/.olddoc.yml
@@ -0,0 +1,7 @@
+---
+cgit_url: http://yhbt.net/yahns.git
+git_url: git://yhbt.net/yahns.git
+rdoc_url: http://yahns.yhbt.net/
+ml_url: http://yhbt.net/yahns-public/
+public_email: yahns-public@yhbt.net
+private_email: yahns@yhbt.net
diff --git a/Rakefile b/Rakefile
index 8a2ca77..e8e4af0 100644
--- a/Rakefile
+++ b/Rakefile
@@ -61,76 +61,12 @@ def tags
   end.compact.sort { |a,b| b[:time] <=> a[:time] }
 end
 
-url_base = 'http://yahns.yhbt.net'
-cgit_url = 'http://yhbt.net/yahns.git'
-git_url = 'git://yhbt.net/yahns.git'
-since = "v0.0.2"
-
 desc 'prints news as an Atom feed'
 task "NEWS.atom.xml" do
-  require 'nokogiri'
-  new_tags = tags[0,10]
-  time = nil
-  str = Nokogiri::XML::Builder.new do
-    feed :xmlns => "http://www.w3.org/2005/Atom" do
-      id! "#{url_base}/NEWS.atom.xml"
-      title "yahns news"
-      subtitle "sleepy, multi-threaded, non-blocking Ruby application server"
-      link! :rel => 'alternate', :type => 'text/plain',
-            :href => "#{url_base}/NEWS"
-      updated(new_tags.empty? ? "1970-01-01T00:00:00Z" : new_tags.first[:time])
-      new_tags.each do |tag|
-        time ||= tag[:time_obj]
-        entry do
-          title tag[:subject]
-          updated tag[:time]
-          published tag[:time]
-          author {
-            name tag[:tagger_name]
-            email tag[:tagger_email]
-          }
-          url = "#{cgit_url}/tag/?id=#{tag[:tag]}"
-          link! :rel => "alternate", :type => "text/html", :href =>url
-          id! url
-          message_only = tag[:body].split(/\n.+\(\d+\):\n {6}/).first.strip
-          content({:type =>:text}, message_only)
-          content(:type =>:xhtml) { pre tag[:body] }
-        end
-      end
-    end
-  end.to_xml
-
-  fp = Tempfile.new("NEWS.atom.xml", ".")
-  fp.sync = true
-  fp.write(str)
-  fp.chmod 0644
-  File.utime(time, time, fp.path) if time
-  File.rename(fp.path, "NEWS.atom.xml")
-  fp.close!
+  # gem install 'olddoc', 'olddoc prepare' has no API besides the
+  # command-line.  This requires olddoc 1.1 or later.
+  system('olddoc', 'prepare') or abort "olddoc prepare failed #$?"
 end
 
 desc 'prints news as a text file'
-task "NEWS" do
-  fp = Tempfile.new("NEWS", ".")
-  fp.sync = true
-  time = nil
-  tags.each do |tag|
-    time ||= tag[:time_obj]
-    line = tag[:subject] + " / " + tag[:time].sub(/T.*/, '')
-    fp.puts line
-    fp.puts("-" * line.length)
-    fp.puts
-    fp.puts tag[:body]
-    fp.puts
-  end
-  fp.write("Unreleased\n\n") unless fp.size > 0
-  fp.puts "COPYRIGHT"
-  fp.puts "---------"
-  bdfl = 'Eric Wong <normalperson@yhbt.net>'
-  fp.puts "Copyright (C) 2013, #{bdfl} and all contributors"
-  fp.puts "License: GPLv3 or later (http://www.gnu.org/licenses/gpl-3.0.txt)"
-  fp.chmod 0644
-  File.utime(time, time, fp.path) if time
-  File.rename(fp.path, "NEWS")
-  fp.close!
-end
+task 'NEWS' => 'NEWS.atom.xml'
-- 
EW


^ permalink raw reply related	[relevance 7%]

Results 1-5 of 5 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2015-10-15  1:53  7% [PATCH] use olddoc 1.1.0 for generating NEWS + NEWS.atom.xml Eric Wong
2015-10-15 16:40  7% Eric Wong
2017-03-05 22:29  6% [PATCH 0/4] documentation cleanups and tidying Eric Wong
2017-03-05 22:30  6% ` [PATCH 3/4] Revert "use olddoc 1.1.0 for generating NEWS + NEWS.atom.xml" Eric Wong
2017-03-23  4:07  6% [ANN] yahns 1.15.0 -_- sleepy app server for Ruby Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/yahns.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).