![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 10/11/2010 05:55 PM, scott wrote:
>>> (\+|-)[0-9]+(\.[0-9]+)?(E(\+|-)?[0-9]{1,3})?
>>
>> do
>> option (char '+' <|> char '-')
>> many1 digit
>> option (char '.')
>> many1 digit
>> option (do char 'E'; option (char '+' <|> char '-'); many1 digit)
>
> Hmm, now which one is more readable?
Exactly.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
>> Yes, I've used SSH myself. It's quite neat that I can have an old 386
>> laptop sitting in a cupboard somewhere and operate it basically as if
>> I was sitting in front of it. On the other hand, would it be so hard
>> to do so with a less primitive interface?
>
> it's strange that I guy used to programming languages feels awkward
> about a text interface.
No, it feels awkward when you sit at a text terminal that's using ANSI
escape codes to generate colours and block graphics characters to "draw"
a "graphical" user interface. I mean, why not just have a /real/
graphical user interface?
> Notepad in all its glorious graphical user
> interface is much more featureless and rudimentar than vi on an old Unix
> terminal.
Sure. But that's because Notepad sucks beyond belief. ;-)
I'm not arguing that the CLI is useless. I'm arguing that ASCII-art
"graphical" UIs are silly.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 10/11/2010 10:07 PM, Darren New wrote:
> Invisible wrote:
>> I've always thought that manpages and the ugliest, lamest, most
>> archaic thing ever, so I don't see that that's much of an advantage.
>
> Oh, wait. Aren't you the one that goes on about LaTeX and Postscript?
> :-) I'm not sure what you have against a text-based program for
> generating typeset output.
TeX, PostScript, HTML, it's all good.
I'm just saying that the finished product looks awful.
The reason I put up with TeX, in spite of its innumerable and obvious
limitations, is that it produces very, very nice output. troff doesn't
seem to compare to that.
> Plus, they didn't produce stuff on screen. This is hardcopy land.
> Screens were advanced stuff. :-)
Apparently that's also why all Unix commands fail to offer even the most
basic feedback as to what's happening, unless something actually goes
wrong. It's to save paper.
So really, Unix invented environmentalism, 60 years ahead of the rest of
Western civilisation. :-P
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Invisible escreveu:
> I'm not arguing that the CLI is useless. I'm arguing that ASCII-art
> "graphical" UIs are silly.
and I agree here. However, ssh, bash or vi don't even attempt such
sillyness, so I wonder what's your point with ssh as example of that...
--
a game sig: http://tinyurl.com/d3rxz9
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Invisible escreveu:
>> do you really believe spelling out "option (char '+' <|> char '-')" is
>> any worth as opposed to "(\+|-)"?
>
> Um, *yes*. Why, do you think it doesn't have worth?
it's far more verbose and, thus, hurts readability?
come on! do you even need those quotes around the symbols?
>>> xs <- many1 digit
>>> if length xs > 3 then fail else return ()
>>
>> no, sorry. Truly overkill against "\d{3}".
BTW, my mistake. Should be "\d{0,3}"
> So define a combinator for it:
>
> manyN 0 _ = return []
> manyN n p = do x <- p; xs <- manyN (n-1) p; return (x:xs)
>
> And now, forever more, you can merely write
>
> manyN 3 digit
>
> Problem solved.
then try this in your little language:
// A phone number with or without hyphens:
[2-9]\d{2}-?\d{3}-?\d{4}
It looks pretty much like a template for a phone number. I'm sure yours
will look like a little backwards forth script and will be much harder
to figure out.
I also wonder if it's the postfix nature of regexes that bothers you...
--
a game sig: http://tinyurl.com/d3rxz9
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
nemesis <nam### [at] gmail com> wrote:
> do you really believe spelling out "option (char '+' <|> char '-')" is
> any worth as opposed to "(\+|-)"?
Btw, "(\+|-)" is unnecessarily complex. Just use "[+-]". That's exactly
what the [] syntax is for.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Invisible <voi### [at] dev null> wrote:
> No, it feels awkward when you sit at a text terminal that's using ANSI
> escape codes to generate colours and block graphics characters to "draw"
> a "graphical" user interface. I mean, why not just have a /real/
> graphical user interface?
Do you understand the concept of bandwidth? And that it can be quite
limited?
The VT protocol was designed back when you were lucky if you could
transfer than a few kilobytes per second, so they had to maximize what
you could do while at the same time minimizing the need to transfer data.
Today this might be more obsolete than it was 20 years ago, but there
are still benefits to that. The standard is quite well-established and
has been around forever, so almost every system in existence supports it.
Also, being text-based (and low-bandwidth) you can create or port terminal
emulators to almost any system with a screen and a keyboard, even very
exotic ones. For instance, it's pretty common for unix-savvy people to
have a terminal emulator on their cellphones so that they can contact
their computer or whatever remotely. A remote GUI would simply not do.
> I'm not arguing that the CLI is useless. I'm arguing that ASCII-art
> "graphical" UIs are silly.
Sometimes you have to resort to them to organize what is displayed.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
>> Um, *yes*. Why, do you think it doesn't have worth?
>
> it's far more verbose and, thus, hurts readability?
Far more verbose, and as a consequence it's almost self-explanatory what
it does. (Unlike a collection of symbols that have no widely-accepted
meaning outside of regex languages...)
> come on! do you even need those quotes around the symbols?
Yes. Because this is a real programming language, you could replace the
character name with a variable, for example. In this way you can make
the pattern parameterised.
> then try this in your little language:
>
> // A phone number with or without hyphens:
> [2-9]\d{2}-?\d{3}-?\d{4}
>
> It looks pretty much like a template for a phone number. I'm sure yours
> will look like a little backwards forth script and will be much harder
> to figure out.
I actually can't figure out what that does, so I can't implement it.
> I also wonder if it's the postfix nature of regexes that bothers you...
No, mostly it comes down to these:
1. Commands have cryptic names like "*" or "+".
2. Literal characters aren't quoted, so it's hard to tell what's literal
and what's a command.
(And 3. since spaces are literal characters, you can't even use spacing
to make the structure of the expression clearer.)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> Today this might be more obsolete than it was 20 years ago, but there
> are still benefits to that. The standard is quite well-established and
> has been around forever, so almost every system in existence supports it.
It sounds a bit like Unix itself: It's not actually a very good idea,
but everything in Creation supports it, and so it will remain around
forever.
Actually, I found a rather interesting description of the history of
Unix the other day. I'll have to see if I can find it again. As you read
it, you discover that many design decisions that look stupid are in fact
merely obsolete. They served a purpose 60 years ago, it's just that they
aren't the best choice any more.
> Also, being text-based (and low-bandwidth) you can create or port terminal
> emulators to almost any system with a screen and a keyboard, even very
> exotic ones. For instance, it's pretty common for unix-savvy people to
> have a terminal emulator on their cellphones so that they can contact
> their computer or whatever remotely. A remote GUI would simply not do.
These days, the fashion seems to be for everything from print servers to
network hubs to be controlled by HTML over HTTP. Which is equally
stupid, but looks more pretty...
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Invisible <voi### [at] dev null> wrote:
> Actually, I found a rather interesting description of the history of
> Unix the other day. I'll have to see if I can find it again. As you read
> it, you discover that many design decisions that look stupid are in fact
> merely obsolete. They served a purpose 60 years ago, it's just that they
> aren't the best choice any more.
That would be quite strange, given that Unix was originally developed
41 years ago.
> > Also, being text-based (and low-bandwidth) you can create or port terminal
> > emulators to almost any system with a screen and a keyboard, even very
> > exotic ones. For instance, it's pretty common for unix-savvy people to
> > have a terminal emulator on their cellphones so that they can contact
> > their computer or whatever remotely. A remote GUI would simply not do.
> These days, the fashion seems to be for everything from print servers to
> network hubs to be controlled by HTML over HTTP. Which is equally
> stupid, but looks more pretty...
Well, it has the advantage that it's still relatively low-bandwidth and
usable with any web browser in any system, and you can do things with the
mouse.
Of course the downside is that you need something that can run a web
browser.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |