Re: [dev] The mysterious 31

2010-08-03 Thread Wolf Tivy
> Let me rephrase that, given the nature of this list. There's not > much science to simple string hash functions. Cryptographic hash > functions are another matter entirely. I'll also add that 31 > happens to be a prime number. The first thing that struck me was that 31 in binary is all ones,

Re: [dev] The mysterious 31

2010-08-03 Thread David Tweed
On Wed, Aug 4, 2010 at 5:01 AM, David Tweed wrote: > On Wed, Aug 4, 2010 at 2:53 AM, Jacob Todd wrote: > It's also worth remembering that K & R was written at a time many > decades ago when performance aspects of computer architecture were a > lot, lot simpler. Apparently they have > > #define HA

Re: [dev] curses samterm

2010-08-03 Thread Wolf Tivy
> Sounds like vi. except with a clean command set and less legacy baggage.

Re: [dev] The mysterious 31

2010-08-03 Thread David Tweed
On Wed, Aug 4, 2010 at 2:53 AM, Jacob Todd wrote: > In K&R, chapter 6, section 6, there is a funtion called hash that hashes a > string, which will be stored in a linked list. The function in question is on > page 144, but here it is for those of you who don't have K&R handy. > >        /* hash:  

Re: [dev] The mysterious 31

2010-08-03 Thread Kris Maglione
On Tue, Aug 03, 2010 at 11:03:50PM -0400, Kris Maglione wrote: There isn't much science to hash functions, Let me rephrase that, given the nature of this list. There's not much science to simple string hash functions. Cryptographic hash functions are another matter entirely. I'll also add tha

Re: [dev] The mysterious 31

2010-08-03 Thread Kris Maglione
On Tue, Aug 03, 2010 at 09:53:27PM -0400, Jacob Todd wrote: In K&R, chapter 6, section 6, there is a funtion called hash that hashes a string, which will be stored in a linked list. The function in question is on page 144, but here it is for those of you who don't have K&R handy. /* hash

[dev] The mysterious 31

2010-08-03 Thread Jacob Todd
In K&R, chapter 6, section 6, there is a funtion called hash that hashes a string, which will be stored in a linked list. The function in question is on page 144, but here it is for those of you who don't have K&R handy. /* hash: form hash value for string s */ unsigned ha

Re: [dev] curses samterm

2010-08-03 Thread Jacob Todd
On Tue, Aug 03, 2010 at 04:29:34PM -0700, Wolf Tivy wrote: > My current idea is just to have the screen displaying the file (where?) > with dot highlighted. A few lines at the bottom would have > the command line, maybe it would dynamically adjust for multiline > commands, I dunno. You could cursor

Re: [dev] curses samterm

2010-08-03 Thread Joe
[08/03/10] @11:28AM PDT, mei...@marmaro.de wrote: > [2010-08-03 10:14] Joe > > NAME > >ed - text editor > > > > SYNOPSIS > >ed [-] [-sx] [-p string] [file] > > It should be: ed [-] [file] I concur. fwd: sj...@apple.com. My only other choice is 9 man ed: SYNOPSIS

Re: [dev] curses samterm

2010-08-03 Thread Wolf Tivy
  > Curses does support mouse use at this point, and seeing as the > use of > the mouse to select text is one of the big features of sam, I think > it'd be important to keep that. Instead of using the menu, the options > from it could all be mapped to single or chorded keystrokes of the > left han

Re: [dev] curses samterm

2010-08-03 Thread Evan Gates
> So on that note, it looks like curses is the way to go (as has been > previously suggested). Then the issue is how closely our curses > samterm would resemble bitmap samterm. Considering all the clicky > menus and scrollbars and such, it may be best for the curses interface > to be a totally diff

[dev] [dmenu] enhanced filecompletion patch

2010-08-03 Thread Bert Münnich
Hi, After reading this list for quite some time and with the upcoming release of the next stable version of dmenu around, I've decided to share a small but hopefully useful extension. I've expanded the filecompletion patch made by Jeremy Jay (http://lists.suckless.org/dwm/0901/7355.html). I've tr

Re: [dev] curses samterm

2010-08-03 Thread hiro
> ED(1) > ED(1) > NAME >ed - text editor > > SYNOPSIS >ed [-] [-sx] [-p string] [file] > > DESCRIPTION >ed is a line-oriented text editor. It is used to create, display, > mod- >ify and otherwise manipulate text files. > > WARNING > Everyone involved in the de

Re: [dev] curses samterm

2010-08-03 Thread markus schnalke
[2010-08-03 10:14] Joe > > ED(1)ED(1) > NAME >ed - text editor > > SYNOPSIS >ed [-] [-sx] [-p string] [file] It should be: ed [-] [file] meillo

Re: [dev] curses samterm

2010-08-03 Thread Wolf Tivy
> Yes, indeed. Both acme and samterm ship with their very own window > manager, so you can fullscreen acme in rio and pretend you're using > wmii. And samterm is even worse: a stacking window manager > within a > stacking window manager (so you can stack while you stack). > > There is a good reas

Re: [dev] dmenu: state of the tip

2010-08-03 Thread Connor Lane Smith
Hey, On 3 August 2010 18:14, Gene Auyeung wrote: > Hi, a small typo in dmenu.c.  533s/i++/++i Fixed, thanks. I seem to make more typos when programming in a cafe. I blame the coffee. cls

Re: [dev] dmenu: state of the tip

2010-08-03 Thread Gene Auyeung
Hi, a small typo in dmenu.c. 533s/i++/++i --- dmenu.c 2010-08-03 10:06:53.083866866 -0700 +++ bugfix.c2010-08-03 10:06:19.600536452 -0700 @@ -530,7 +530,7 @@ main(int argc, char *argv[]) { else if(!strcmp(argv[i], "-p")) prompt = argv[++i];

Re: [dev] curses samterm

2010-08-03 Thread Joe
[08/03/10] @ 3:43AM PDT, ur...@berlinblue.org wrote: > > In case you're wondering why I know *that*, nano is the least bad > > editor on the standard Arch Linux install CD image (the others are joe > > and traditional, breaks-if-you-push-a-cursor-key-in-insert-mode vi; > > I'd be happy with ed, bu

Re: [dev] curses samterm

2010-08-03 Thread Connor Lane Smith
Hey, On 3 August 2010 17:43, Joseph Xu wrote: > I said I'm guessing no more than 20 people will find it useful if it was > written. I think in this case samterm is more important than sam itself when it comes to attracting users. Few will convert to using sam if it is ugly and tedious to use. An

Re: [dev] curses samterm

2010-08-03 Thread Joseph Xu
On 8/3/2010 11:14 AM, Connor Lane Smith wrote: Hey, On 3 August 2010 09:50, Joseph Xu wrote: Very few people use sam to begin with, even fewer would like the curses interface. I'm guessing no more than 20 people. The best reason not to write a program ever: nobody is using it yet. I said I

Re: [dev] curses samterm

2010-08-03 Thread Connor Lane Smith
Hey, On 3 August 2010 09:50, Joseph Xu wrote: > Very few people use sam to begin with, even fewer would like the curses > interface. I'm guessing no more than 20 people. The best reason not to write a program ever: nobody is using it yet. > Usually I'll have acme always running and just plumb s

Re: [dev] curses samterm

2010-08-03 Thread Jacob Todd
On Tue, Aug 03, 2010 at 12:20:39AM -0700, Wolf Tivy wrote: > I hadn't thought of it like that before. Good point. > Excuse me while I also remove indentation from my my code. > Would you indent your prose? What nonsense have > I been practicing? I do indent my prose, by using paragraphs. > > Thank

Re: [dev] curses samterm

2010-08-03 Thread Uriel
On Tue, Aug 3, 2010 at 12:26 PM, Robert Ransom wrote: > On Tue, 3 Aug 2010 12:01:24 +0200 > Uriel wrote: > >> Anyone that considers for even one second to use nano should be taken >> out and shot on the spot. > > It's not so bad if you build it with the --disable-wrapping-as-root > configure opti

Re: [dev] curses samterm

2010-08-03 Thread Robert Ransom
On Tue, 3 Aug 2010 12:01:24 +0200 Uriel wrote: > Anyone that considers for even one second to use nano should be taken > out and shot on the spot. It's not so bad if you build it with the --disable-wrapping-as-root configure option and only use it as root. In case you're wondering why I know

Re: [dev] curses samterm

2010-08-03 Thread Uriel
On Tue, Aug 3, 2010 at 6:41 AM, Wolf Tivy wrote: > I find it useful to be able to edit files using my regular editor > after I break X, or if I don't feel like starting it up. > I like curses stuff even in X because it is nice to open up an editor > and have it tempoarily reuse the terminal window

Re: [dev] curses samterm

2010-08-03 Thread hiro
Fortune worthy: X doesn't break that often for me. --Joseph Xu, 8/3/10

Re: [dev] curses samterm

2010-08-03 Thread Joseph Xu
On 8/3/2010 12:41 AM, Wolf Tivy wrote: I find it useful to be able to edit files using my regular editor after I break X, or if I don't feel like starting it up. X doesn't break that often for me. I like curses stuff even in X because it is nice to open up an editor and have it tempoarily reu

Re: [dev] curses samterm

2010-08-03 Thread Robert Ransom
On Tue, 03 Aug 2010 00:20:39 -0700 Wolf Tivy wrote: > Excuse me while I also remove indentation from my my code. > Would you indent your prose? http://google.com/search?q=sense-lining Robert Ransom signature.asc Description: PGP signature

Re: [dev] curses samterm

2010-08-03 Thread Wolf Tivy
> > Luxuries like syntax coloring would be nice but really not critical. > Would you like reading a book with all adjectives bolded and > nouns italicized? > You may want to take a look at ALGOL 68. I hadn't thought of it like that before. Good point. Excuse me while I also remove indentation fro