Most popular wiki in Ruby seeks kind maintainer

  • Thread starter David Heinemeier Hansson
  • Start date
D

David Heinemeier Hansson

Okay, okay, okay. Instiki does need a new maintainer. At least a
temporary steward until I'm ready to resume that role. Are you it?

The kick: Instiki just surpassed 8,000 downloads on RubyForge, which
makes it the most downloaded piece of software there if you don't count
Ruby itself.

But Instiki has special needs, which is why I've been hesitant to call
for a maintainer. See, Instiki needs to be and do less. But do it
better.

So while all the pending patches are pretty cool in one aspect or
another, they're mostly about adding stuff to Instiki.

Here's what I'd like a new Instiki maintainer to work on:

* Fix the bugs. There are quite a few. Especially render bugs.

* Switching from Marshal to YAML outputs. The biggest fear in Instiki
is that something horrible goes wrong with the persisted data and all
is lost in a big ball of Marshalled, binary mud. Having a humanly
readable format would be very nice. This needs A LOT of testing,
though.

* Image uploads... perhaps even file uploads. This one is really
tricky, though. It's very easy to create a big honking thing. We need
an Instiki approach to the problem. Bill Atkins and I already had a few
thoughts on the subject.

Who's willing for glory and honor?
--
David Heinemeier Hansson,
http://www.basecamphq.com/ -- Web-based Project Management
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://macromates.com/ -- TextMate: Code and markup editor (OS X)
http://www.loudthinking.com/ -- Broadcasting Brain
 
A

Alexey Verkhovsky

David said:
Okay, okay, okay. Instiki does need a new maintainer. At least a
temporary steward until I'm ready to resume that role. Are you it?


David,

As I said in the chat, I'm sure somebody more qualified than me will
take it up. But just in case nobody does, I can.

Alex
 
A

Austin Ziegler

* Switching from Marshal to YAML outputs. The biggest fear in Instiki
is that something horrible goes wrong with the persisted data and all
is lost in a big ball of Marshalled, binary mud. Having a humanly
readable format would be very nice. This needs A LOT of testing,
though.

I recommend *not* using YAML. In my experiences with Ruwiki, YAML support is
not yet stable enough -- especially for large data -- for general use.

-austin, trying to get some of these same features in Ruwiki...
 
F

Francis Hwang

More generally, let me ask: What formats are people using to persist
Ruby objects to disk? What are pluses and minuses? I can't figure out
when I should use something like YAML and when I should use the Marshal
module and if there's anything else out there that people are using,
I'm probably going to get sort of confused but should probably hear
about them anyway.

I recommend *not* using YAML. In my experiences with Ruwiki, YAML
support is
not yet stable enough -- especially for large data -- for general use.

-austin, trying to get some of these same features in Ruwiki...

Francis Hwang
http://fhwang.net/
 
L

Lothar Scholz

Hello Francis,

FH> More generally, let me ask: What formats are people using to persist
FH> Ruby objects to disk? What are pluses and minuses? I can't figure out
FH> when I should use something like YAML and when I should use the Marshal
FH> module and if there's anything else out there that people are using,
FH> I'm probably going to get sort of confused but should probably hear
FH> about them anyway.

If you want a readable object file that can edited by a human
(configuration file) use YAML otherwise use Marshal.

You can read YAML file also with Python, Perl und PHP applications
 
F

Francis Hwang

Hello Francis,

FH> More generally, let me ask: What formats are people using to
persist
FH> Ruby objects to disk? What are pluses and minuses? I can't figure
out
FH> when I should use something like YAML and when I should use the
Marshal
FH> module and if there's anything else out there that people are
using,
FH> I'm probably going to get sort of confused but should probably hear
FH> about them anyway.

If you want a readable object file that can edited by a human
(configuration file) use YAML otherwise use Marshal.

You can read YAML file also with Python, Perl und PHP applications

Why wouldn't I just use YAML all the time? Are there certain types of
classes that aren't going to turn into YAML well? Stability issues with
YAML libs? (I've mostly used Marshal in the past, so pardon if my YAML
questions are naive.)

Francis Hwang
http://fhwang.net/
 
J

John Wilger

What's wrong with good old fashined XML? Isn't this sort of thing what
XML was designed for?


Why wouldn't I just use YAML all the time? Are there certain types of
classes that aren't going to turn into YAML well? Stability issues with
YAML libs? (I've mostly used Marshal in the past, so pardon if my YAML
questions are naive.)



Francis Hwang
http://fhwang.net/


--
Regards,
John Wilger

-----------
Alice came to a fork in the road. "Which road do I take?" she asked.
"Where do you want to go?" responded the Cheshire cat.
"I don't know," Alice answered.
"Then," said the cat, "it doesn't matter."
- Lewis Carrol, Alice in Wonderland
 
A

Austin Ziegler

More generally, let me ask: What formats are people using to
persist Ruby objects to disk? What are pluses and minuses? I can't
figure out when I should use something like YAML and when I should
use the Marshal module and if there's anything else out there that
people are using, I'm probably going to get sort of confused but
should probably hear about them anyway.

Well, I should qualify my statements some, because I don't want to
maling _why's work, which is nothing short of amazing, ultimately.
For short configuration items, YAML is rather impressive. It is
human editable, it's rich, and it's reasonably stable.

However, syck -- the YAML parser built into Ruby -- is unusable in
Ruby 1.8.1 (which is still the officially released version of Ruby)
on Windows and has other issues in versions of Ruby up through 1.8.2
preview 2. I have not yet verified whether the problems I had in
1.8.2p2 with syck have been fixed, and I've not been in a position
to verify them lately.

Ruwiki has specific needs that may or may not be present in a
generic application that needs something externally editable. In
particular, Ruwiki files can be large because of the content --
which is a large \n-delimited string. For a Ruwiki file at work and
for the Ruwiki::WikiMarkup pages, syck failed (as in coredump) in
Ruby 1.8.1 on Windows on writing strings longer than about 7k and
reading strings longer than about 4k. I don't think it was a
Windows-only problem. In Ruby 1.8.2p2, syck was confused by \n and
sometimes escaped them when it shouldn't, resulting in unusable
code.

Because of this, and because I needed a human-editable format that
was simple, reasonably quick, and reliable, I created what has since
become Ruwiki::Exportable. This is a general-purpose markup, but it
is not a type-smart format (like YAML), leaving it up to the reader
and the writer to ensure that the data it writes out will be
meaningfully read back in. The format looks something like (this is
actually the default ruwiki.conf):

ruwiki-config!css: ruwiki.css
ruwiki-config!date-format: %Y.%m.%d
ruwiki-config!datetime-format: %Y.%m.%d %H:%M:%S
ruwiki-config!debug: true
ruwiki-config!default-page: ProjectIndex
ruwiki-config!default-project: Default
ruwiki-config!language: en
ruwiki-config!storage-options: flatfiles!data-path: ./data
flatfiles!extension: ruwiki
ruwiki-config!storage-type: flatfiles
ruwiki-config!template-path: ./templates/
ruwiki-config!template-set: default
ruwiki-config!time-format: %H:%M:%S
ruwiki-config!title: Ruwiki
ruwiki-config!webmaster: (e-mail address removed)
webrick-config!addresses:
webrick-config!do-log: true
webrick-config!log-dest: <STDERR>
webrick-config!mount: /
webrick-config!port: 8808
webrick-config!threads: 1

When read, this will look like (in Ruby):

{ 'ruwiki-config' =>
{ 'css' => 'ruwiki.css',
'date-format' => "%Y.%m.%d",
#...
},
'webrick-config' =>
{ 'addresses' => "",
#...
}
}

I have to know that webrick-config!addresses resulting in ""
actually means []. I have to know in a .ruwiki file that
"properties!edit-date: 1101267172" actually means "Tue Nov 23
22:32:52 Eastern Standard Time 2004" because it's Time.now.to_i.

I also have to know that the value listed for "storage-options" is
actually a nested Ruwiki::Exportable document. The formal definition
for a Ruwiki::Exportable document is:

<group-id>!<item-id>:<1whitespace>VALUE
[<1whitespace>CONTINUED VALUE]*

That is, if I want to continue a value, I simply continue it by not
specifying another <group-id> at the beginning and indenting the
embedded value with ONE whitespace -- either a tab or a space (it
was originally only tabs, which is still what Ruwiki::Exportable
uses by default on export to string).

YAML knows some of the type stuff -- and most of the problems I have
seen are when syck is wrong on that guess or otherwise mangles it.

I'm actually quite pleased with Ruwiki::Exportable -- it's
reasonably fast and simple to understand, but it is one level
separated from the actual object (it uses a hash as the canonical
format for the data, not the object itself, as Marshal and YAML do).

I prefer YAML to XML for most editable configuration files, but YAML
has its own issues.

-austin
 
L

Lothar Scholz

Hello John,

JW> What's wrong with good old fashined XML? Isn't this sort of thing what
JW> XML was designed for?

Yes, it's only there because some people like the YAML flavour a
little bit more then old fashined XML.

It is easier to read and it is more dense. Also it does not try to do
sophisticated things like namespaces etc.

But i never used it, i also prefer good old fashined XML.
 
A

Austin Ziegler

What's wrong with good old fashined XML? Isn't this sort of thing what
XML was designed for?

The biggest problem with XML is verbosity and impedance mismatch with
Ruby objects for Marshal-ing.

-austin
 
W

why the lucky stiff

Austin said:
Well, I should qualify my statements some, because I don't want to
maling _why's work, which is nothing short of amazing, ultimately.

Austin, you need not worry. I'd really rather hear frustrations come
out openly and bluntly. Having them concealed and timid only prevents
me from knowing how to improve my libraries. I appreciate your being
forthright.
Ruwiki has specific needs that may or may not be present in a
generic application that needs something externally editable. In
particular, Ruwiki files can be large because of the content --
which is a large \n-delimited string. For a Ruwiki file at work and
for the Ruwiki::WikiMarkup pages, syck failed (as in coredump) in
Ruby 1.8.1 on Windows on writing strings longer than about 7k and
reading strings longer than about 4k. I don't think it was a
Windows-only problem. In Ruby 1.8.2p2, syck was confused by \n and
sometimes escaped them when it shouldn't, resulting in unusable
code.

I'm sure syck can handle large quantities of text, as well as continuous
strings, since the (Poignant) Guide and my blog have both been using
syck since February of this year. But I definitely don't use the
emitter (the outputting component of syck) as much as your wiki must.

I feel that syck's parser is quite strong, but the emitter is very poor
in comparison. Would you offer up your time in helping me test and kill
further bugs in the emitter? (This is an open invitation to any of you
out there who have an interest in improving YAML support.)
I prefer YAML to XML for most editable configuration files, but YAML
has its own issues.

You've mentioned coredumps on outputting YAML and oddities with line
endings. Did I miss anything else? Could you outline exactly what
other issues you've encountered?

And do they revolve centrally around the Syck implementation or are they
related to the nature of YAML and its specification?

_why
 
A

Austin Ziegler

I'm sure syck can handle large quantities of text, as well as
continuous strings, since the (Poignant) Guide and my blog have
both been using syck since February of this year. But I definitely
don't use the emitter (the outputting component of syck) as much
as your wiki must.

Well, I know that with Ruby 1.8.1 I couldn't read a 15k YAML file
without coredumping. When I split the 12k content section into
multiple parts with an array, I found that on Windows the coredump
happened with a big block of text between 7k and 8k; on Linux it was
closer to 11k. These tests were several months ago, and they went
away with Ruby 1.8.2 preview 2. Unfortunately, there was the \n
problem you fixed after preview 2, and I haven't had time to rerun
my tests with preview 3: this will be run in the next day or two as
I prepare to release Ruwiki 0.9.0 (I still have to verify the YAML
and Marshal storage formats since I support them even though I use
and prefer the Ruwiki::Exportable format).
I feel that syck's parser is quite strong, but the emitter is very
poor in comparison. Would you offer up your time in helping me
test and kill further bugs in the emitter? (This is an open
invitation to any of you out there who have an interest in
improving YAML support.)

I can definitely give you some test data and a program (it's part of
Ruwiki, actually) to test it so you can look at the results, but I
don't have a lot of time to commit to testing at this point -- as
soon as I release Ruwiki 0.9.0, I have to start work on both Ruwiki
0.10.0 and Diff::LCS 1.2.0.
You've mentioned coredumps on outputting YAML and oddities with
line endings. Did I miss anything else? Could you outline exactly
what other issues you've encountered?

And do they revolve centrally around the Syck implementation or
are they related to the nature of YAML and its specification?

XML is overly verbose and YAML is problematic because of space/tab
issues. I like YAML because it's cleaner than XML, but I don't like
the indentation model.

-austin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,084
Latest member
HansGeorgi

Latest Threads

Top