Re: ***SPAM*** Re: [dev] suckless wget/curl

2011-05-28 Thread Dave Reisner
On Sat, May 28, 2011 at 01:54:44AM +0200, Eckehard Berns wrote:
> > Except [...] it doesn't work for every site, it seems. I'll probably
> > work out why when I have more time.
> 
> Might be chunked transfer encoding. At least that was the first thing
> that came to mind looking at your code.
> 
> > Still, I thought it was cute.
> 
> Yes, I actually liked it. Chunked transfer encoding might make coding
> wget with netcat and the shell impossible though.
> 

I'm sure I'll get hated for this, but it's entirely possible to read
chunked transfer with shell. I wrote a stupid proof of concept AUR agent
in bash which handles keep-alives and chunked/gzip encoded data -- the
only other dependencies are dd and gzip, and optionally yajl (for
formatting jsons).

https://github.com/falconindy/bin-scripts/blob/master/orb

Perhaps this will inspire someone...

dave




Re: Playing music (was: Re: [dev] mret)

2011-05-28 Thread Bjartur Thorlacius
On 5/26/11, hiro <23h...@googlemail.com> wrote:
> Hmm. How do you "buffer linewise"?
I knew that everything worked fine on sane ttys, but I just don't
understand how FIFOs are buffered and thus not what happened if you
tried to read from a pipe with less than 512 bytes written to it. I'm
back on Linux, and it seems to Just Work(tm), so just ignore it.

P.S. There was a typo in my previous email, here is the script as to
be run inside a single bash session. Drop the &/dev/null& if you run
this in a separate terminal. Killing mplayer will skip to the next
song. For anything more fancy, you'll probably want to connect a FIFO
to xargs' input.

 find -type f -print0 | shuf -z | xargs -0n1 mplayer -slave -quiet &>/dev/null&



Re: [dev] Sandy editor

2011-05-28 Thread Bjartur Thorlacius
On 5/27/11, Dieter Plaetinck  wrote:
> how ironic you pledge for "sane" keybindings and suggest
> bindings optimized for qwerty users...
>
> I use dvorak, so I would prefer bindings optimized for that, but I
> realise different people use different layouts, so everyone should be
> able to choose how they like it.
>
'Up' shouldn't be bound to a character. Neither 'w' nor ','. It should
be bound to a button. That would usually be an arrow key between the
textpad and the numpad. My point is that keyboard translation tables
are at a lower layer than text editing. You shouldn't need to download
a different editor for your different keyboard layout; you merely have
to redefine some constants or edit a keyboard translation table.
BTW, does anyone know how to configure "latch keys" in Linux, i.e. how
to make it so that pressing and releasing the Shift button will affect
the following keypress? I like modifier keys, but detest pressing
multiple keys simultaneously.



Re: [dev] Sandy editor

2011-05-28 Thread Peter John Hartman
On Sat, May 28, 2011 at 03:19:15AM +0200, Rafa Garcia Gallego wrote:
> I asked around, found about a couple of very keybind maps using only Control:
> 
> http://www.wordstar.org/wordstar/history/wmvswscmds.htm

Go joe!

Peter


-- 
sic dicit magister P
PhD Candidate
Collaborative Programme in Ancient and Medieval Philosophy
University of Toronto
http://individual.utoronto.ca/peterjh