Re: [dev] [sw] Suckless web-framework

2010-04-05 Thread Connor Lane Smith
Hey,

On 4 April 2010 07:57, Mate Nagy mn...@port70.net wrote:
 This means that making your page respect an imaginary standard gives no
 results except than a pretty badge. Rather than striving towards such an
 ideal, I find it much more useful (dare I say suckless) to make your web
 markup as *minimalist* as possible (e.g. no closing tags, no quotes
 where you can skip them, no CSS, no JS, the simplest =HTML4
 formatting). This will make your page work on all browsers forever, and
 as a bonus, make it easily processible with external tools (and the user
 can still specify any kind of custom style they want).

Websites like this are extremely difficult to parse. Is this p the
end of a paragraph or the beginning? Let's test both! In making your
HTML not at least resemblant of XML (that is, all tags close) you
aren't making things simpler, you're just producing more complexity
elsewhere.

I'm not even sure how fewer characters equates as simpler: LOC is
only an approximation of how suckless our code is. When given a
trade-off between two simple lines or one complex one, write two. A
paragraph makes sense as ptext/p: it opens, it closes. Quotes are
nice too. I'm not saying it should validate as XHTML, but simplicity
is more profound than wc.

You may say that, yes, all modern browsers can parse fucked-up HTML.
But what if we at Suckless were to attempt to write an HTML parser (oh
god) like htmlfmt? It would help quite a lot if we had fewer demented
websites out there. Be kind to your fellow hackers: make simple
websites, not ones which skimp on characters in the name of quirks
mode.

cls



Re: [dev] [sw] Suckless web-framework

2010-04-05 Thread Moritz Wilhelmy
On Mon, Apr 05, 2010 at 11:38:42AM +, Connor Lane Smith wrote:
 Hey,
 
 On 4 April 2010 07:57, Mate Nagy mn...@port70.net wrote:
  This means that making your page respect an imaginary standard gives no
  results except than a pretty badge. Rather than striving towards such an
  ideal, I find it much more useful (dare I say suckless) to make your web
  markup as *minimalist* as possible (e.g. no closing tags, no quotes
  where you can skip them, no CSS, no JS, the simplest =HTML4
  formatting). This will make your page work on all browsers forever, and
  as a bonus, make it easily processible with external tools (and the user
  can still specify any kind of custom style they want).
 
 Websites like this are extremely difficult to parse. Is this p the
 end of a paragraph or the beginning? Let's test both! In making your
 HTML not at least resemblant of XML (that is, all tags close) you
 aren't making things simpler, you're just producing more complexity
 elsewhere.
 
 I'm not even sure how fewer characters equates as simpler: LOC is
 only an approximation of how suckless our code is. When given a
 trade-off between two simple lines or one complex one, write two. A
 paragraph makes sense as ptext/p: it opens, it closes. Quotes are
 nice too. I'm not saying it should validate as XHTML, but simplicity
 is more profound than wc.
 
 You may say that, yes, all modern browsers can parse fucked-up HTML.
 But what if we at Suckless were to attempt to write an HTML parser (oh
 god) like htmlfmt? It would help quite a lot if we had fewer demented
 websites out there. Be kind to your fellow hackers: make simple
 websites, not ones which skimp on characters in the name of quirks
 mode.
 
 cls
 
 

I completely agree.



Re: [dev] Re: sprop: simple xprop replacement

2010-04-05 Thread Jacob Todd
On Mon, Apr 05, 2010 at 02:18:49AM +, Connor Lane Smith wrote:
 On 5 April 2010 02:08, Connor Lane Smith c...@lubutu.com wrote:
  Mostly for fun, here's a simple replacement for xprop.
 
 A slightly improved version. (Sorry for the spam, I'm a perfectionist.)
 
 cls
Thanks for this, Connor.

Now for a replacement for X.org. ;)

-- 
I am a man who does not exist for others.


pgp77TeWBH51N.pgp
Description: PGP signature


Re: [dev] [sw] Suckless web-framework

2010-04-05 Thread Jonas H.

On 04/05/2010 03:33 AM, Nibble wrote:

As for HTML, don't usediv class=header. Useheader.
Same goes fordiv id=footer
Instead ofdiv id=\side-bar\, usemenu


Is it just a aesthetic issue?



No it's HTML5.



Re: [dev] [sw] Suckless web-framework

2010-04-05 Thread Uriel
Actually, modern browsers parse HTML much faster than XHTML (yes, I
was fooled by the XML scam once too, and it was not until recently
that I discovered even the myth of it making parsing of webpages
faster was totally bunk).

Which is one of the many reasons why XHTML is (thankfully) dead with
HTML5 (yes, you can write XHTML5, but nobody does it, and nobody
should).

uriel

On Mon, Apr 5, 2010 at 1:38 PM, Connor Lane Smith c...@lubutu.com wrote:
 Hey,

 On 4 April 2010 07:57, Mate Nagy mn...@port70.net wrote:
 This means that making your page respect an imaginary standard gives no
 results except than a pretty badge. Rather than striving towards such an
 ideal, I find it much more useful (dare I say suckless) to make your web
 markup as *minimalist* as possible (e.g. no closing tags, no quotes
 where you can skip them, no CSS, no JS, the simplest =HTML4
 formatting). This will make your page work on all browsers forever, and
 as a bonus, make it easily processible with external tools (and the user
 can still specify any kind of custom style they want).

 Websites like this are extremely difficult to parse. Is this p the
 end of a paragraph or the beginning? Let's test both! In making your
 HTML not at least resemblant of XML (that is, all tags close) you
 aren't making things simpler, you're just producing more complexity
 elsewhere.

 I'm not even sure how fewer characters equates as simpler: LOC is
 only an approximation of how suckless our code is. When given a
 trade-off between two simple lines or one complex one, write two. A
 paragraph makes sense as ptext/p: it opens, it closes. Quotes are
 nice too. I'm not saying it should validate as XHTML, but simplicity
 is more profound than wc.

 You may say that, yes, all modern browsers can parse fucked-up HTML.
 But what if we at Suckless were to attempt to write an HTML parser (oh
 god) like htmlfmt? It would help quite a lot if we had fewer demented
 websites out there. Be kind to your fellow hackers: make simple
 websites, not ones which skimp on characters in the name of quirks
 mode.

 cls





Re: [dev] [sw] Suckless web-framework

2010-04-05 Thread Connor Lane Smith
On 5 April 2010 15:13, Uriel lost.gob...@gmail.com wrote:
 Actually, modern browsers parse HTML much faster than XHTML (yes, I
 was fooled by the XML scam once too, and it was not until recently
 that I discovered even the myth of it making parsing of webpages
 faster was totally bunk).

My point was not that we should write XHTML, but that we should write
simple HTML, and that simple does not solely mean fewer characters.
(Nor does it solely mean efficiency. I have a dog on my shelf
telling me: simplicity, clarity, generality.) I was considering from
the point of view of the author of a new, say, htmlfmt. To quote,

On Mon, Apr 5, 2010 at 1:38 PM, Connor Lane Smith c...@lubutu.com wrote:
 I'm not even sure how fewer characters equates as simpler: LOC is
 only an approximation of how suckless our code is. When given a
 trade-off between two simple lines or one complex one, write two. A
 paragraph makes sense as ptext/p: it opens, it closes. Quotes are
 nice too. I'm not saying it should validate as XHTML, but simplicity
 is more profound than wc.

Thanks,
cls



Re: [dev] [sw] Suckless web-framework

2010-04-05 Thread Charlie Kester

On Mon 05 Apr 2010 at 08:29:24 PDT Connor Lane Smith wrote:

On 5 April 2010 15:13, Uriel lost.gob...@gmail.com wrote:

Actually, modern browsers parse HTML much faster than XHTML (yes, I
was fooled by the XML scam once too, and it was not until recently
that I discovered even the myth of it making parsing of webpages
faster was totally bunk).


My point was not that we should write XHTML, but that we should write
simple HTML, and that simple does not solely mean fewer characters.
(Nor does it solely mean efficiency. I have a dog on my shelf
telling me: simplicity, clarity, generality.) I was considering from
the point of view of the author of a new, say, htmlfmt. To quote,

On Mon, Apr 5, 2010 at 1:38 PM, Connor Lane Smith c...@lubutu.com wrote:

I'm not even sure how fewer characters equates as simpler: LOC is
only an approximation of how suckless our code is. When given a
trade-off between two simple lines or one complex one, write two. A
paragraph makes sense as ptext/p: it opens, it closes. Quotes are
nice too. I'm not saying it should validate as XHTML, but simplicity
is more profound than wc.


While pondering the import of your message, and thinking about how
ordinary language uses quotation marks to both open and close a quote,
it struck me that my email client was giving me an elegant example of
how the need for a closing tag can be eliminated.  See how the ''
character is used?

As for paragraphs, separating them with blank lines always made more
sense to me than p tags, and here again, no closing tag is required.

I agree with Uriel: XML and XHTML are monstrosities.  But so is HTML.
;)




Re: [dev] [sw] Suckless web-framework

2010-04-05 Thread Connor Lane Smith
On 5 April 2010 17:34, Charlie Kester corky1...@comcast.net wrote:
 it struck me that my email client was giving me an elegant example of
 how the need for a closing tag can be eliminated.  See how the ''
 character is used?

 As for paragraphs, separating them with blank lines always made more
 sense to me than p tags, and here again, no closing tag is required.

You just reinvented Markdown. ;)

cls



Re: [dev] [sw] Suckless web-framework

2010-04-05 Thread Mate Nagy
On Mon, Apr 05, 2010 at 05:52:14PM +, Connor Lane Smith wrote:
 On 5 April 2010 17:34, Charlie Kester corky1...@comcast.net wrote:

  As for paragraphs, separating them with blank lines always made more
  sense to me than p tags, and here again, no closing tag is required.
 no closing tags are required for p either.

 HTML is not XML. don't confuse them.

Mate



Re: [dev] [sw] Suckless web-framework

2010-04-05 Thread David Tweed
On Mon, Apr 5, 2010 at 6:34 PM, Charlie Kester corky1...@comcast.net wrote:
 On Mon 05 Apr 2010 at 08:29:24 PDT Connor Lane Smith wrote:

 On 5 April 2010 15:13, Uriel lost.gob...@gmail.com wrote:

 Actually, modern browsers parse HTML much faster than XHTML (yes, I
 was fooled by the XML scam once too, and it was not until recently
 that I discovered even the myth of it making parsing of webpages
 faster was totally bunk).

 My point was not that we should write XHTML, but that we should write
 simple HTML, and that simple does not solely mean fewer characters.
 (Nor does it solely mean efficiency. I have a dog on my shelf
 telling me: simplicity, clarity, generality.) I was considering from
 the point of view of the author of a new, say, htmlfmt. To quote,

 On Mon, Apr 5, 2010 at 1:38 PM, Connor Lane Smith c...@lubutu.com wrote:

 I'm not even sure how fewer characters equates as simpler: LOC is
 only an approximation of how suckless our code is. When given a
 trade-off between two simple lines or one complex one, write two. A
 paragraph makes sense as ptext/p: it opens, it closes. Quotes are
 nice too. I'm not saying it should validate as XHTML, but simplicity
 is more profound than wc.

 While pondering the import of your message, and thinking about how
 ordinary language uses quotation marks to both open and close a quote,
 it struck me that my email client was giving me an elegant example of
 how the need for a closing tag can be eliminated.  See how the ''
 character is used?

Regardless of the strengths and weaknesses of HTML, the '' style has
it's own problems. Firstly, unless you've got an editor programmed for
the syntax it means you can't cut and paste just the content of a
quoted region. Secondly, don't forget that you've got to figure out
how to allow literal '' characters at the start of a line if you
want it to be able to work with absolutely any data someone wants to
display in there (such as 8 visual cut markers).

 As for paragraphs, separating them with blank lines always made more
 sense to me than p tags, and here again, no closing tag is required.

Of course, if there are other reasons why one might want to have
elements within a semantic paragraph which are one separated lines
then one needs to come up with a syntax for having visual blank lines
which aren't (as witnessed by the use of comment blank lines in
TeX/LaTeX:

preceding paragraph

start of paragraph content
%
$$displayedEqn$$
%
end of paragraph content

following paragraph

, which again spoils the simplicity. And note how I've just used some
blank lines in order to present an example within what is semantically
one paragraph). None of this is to say that a different markup
mechanism than HTML might work better, but it's easy to have an
initially simple proposal that suddenly sprouts a lot of complexity
when you add mechanisms for corner cases.

Personally, the ONE, SINGLE thing XML (and specialisations) had going
for it was that, for all it's annoyances, it was hoped to be dominant
enough that you only had to learn techniques, common bugs and
libraries for one syntax. Unfortunately the multiple ideas about how
to do a better markup language mean that that even that advantage
has gone.

-- 
cheers, dave tweed__
computer vision reasearcher: david.tw...@gmail.com
while having code so boring anyone can maintain it, use Python. --
attempted insult seen on slashdot



[dev] simple addictive wordgame

2010-04-05 Thread pancake
Last night I wrote a simple game based on a facebook one called
'word challenge'. in fact i dont have fb, and there are several
versions of the same game, but with different play rules.

This one is quite adictive, and, apart from the side that it needs
some fixes, but if you wanna try is just 350LOC (there are some
memory leaks, speed improvements and other fixes to do), but if you
wanna give it a try here's:

  http://lolcathost.org/b/wg.tar.gz

The dictionaries of words can be generated from rss or webs, and
english, catalan, shell dictionaries are provided in the same tarball.

another script can be used to record scores, push them online and
manage a menu to choose language, or so. To run:

  wg [dict]

Have phun

--pancake



Re: [dev] [sw] Suckless web-framework

2010-04-05 Thread Anthony J. Bentley
On Mon, Apr 05, 2010 at 11:38:42AM +, Connor Lane Smith wrote:
 Websites like this are extremely difficult to parse. Is this p the
 end of a paragraph or the beginning? Let's test both! In making your
In case it's not clear: implicit end tags are _valid_ html, and
completely unambiguous. E.g., pp will _always_ be interpreted as
p/pp/p, never pp/p/p. I don't see how it's unclear,
either -- you can't have a p (or ul or table) nested within a p
anyway, so it's not hard to interpret.

 But what if we at Suckless were to attempt to write an HTML parser (oh
This reminds me -- has anyone used hubbub? I'd love an excuse to make
a project with it.

--Anthony J. Bentley