Re: [dev] upload via html?

2013-05-13 Thread Sam Watkins
HTTP PUT is a reasonable way to do it, but browsers don't support it well. Meanwhile, HTTP POST multipart/form-data with CGI is least worst. I don't like PHP, it is fully insane and has a long history of poor security. HTTP PUT with ranges would be useful, could mount filesystems over HTTP.

Re: [dev] rio for linux

2013-05-03 Thread Sam Watkins
On Fri, May 03, 2013 at 09:25:04AM +0200, Jens Nyberg wrote: I have never tried rio but if I were to design one today I would have a simple synthetic filesystem that for each window multiplexes the framebuffer which is basically how rio works I assume. For maximum performance each instance

Re: [dev] rio for linux

2013-05-01 Thread Sam Watkins
On Wed, May 01, 2013 at 10:43:06AM +0200, hiro wrote: You could try http://www.omgubuntu.co.uk/2012/03/how-to-easily-skin-ubuntus-unity-desktop/ first? I'm guessing that you are mocking my idiocy? (in your eyes)

Re: [dev] rio for linux

2013-05-01 Thread Sam Watkins
On Wed, May 01, 2013 at 05:43:30PM +0200, KarlOskar Rik?s wrote: By replying to his comment you make yourself not just an idiot in his eyes. By mocking me and/or calling me an idiot, without offering any relevant comment on my topic, you disgrace yourself exceedingly in my eyes! but whatever,

Re: [dev] rio for linux

2013-05-01 Thread Sam Watkins
On Wed, May 01, 2013 at 09:21:32AM +0200, Christoph Lohmann wrote: For now all the monkeys are jumping on the wayland train. I don't much like the smell of wayland, although it might be simpler / better than X11. Is it unacceptable to dis X11 here? Although we may have to live with it and

Re: [dev] rio for linux

2013-05-01 Thread Sam Watkins
The problem is the complexity of writing a replacement and all the compatibility layers needed to make it usable in the productive world. The window to a framebuffer thing appeals to me because it would be simple, performant, easy to implement, easy to code for, easy to port libs and apps to

[dev] rio for linux

2013-04-30 Thread Sam Watkins
I don't love X11, and I'm wondering if anyone has ported or made anything in the sprit of rio / 9wm to run on top of Linux framebuffer. I realise rio relies on Plan 9 dynamic namespaces and such, but we might be able to do something similar on Linux. Would this be worthwhile, or not? I know few

[dev] Re: rio for linux

2013-04-30 Thread Sam Watkins
Further to that, I like the idea of a low security window system, where any app can potentially poke pixels to the entire screen but is advised to draw within a certain rectangle. This could benefit performance. Also, if a window is partly obscured such that its drawable area would not be a

Re: [dev] [st] pasting to gvim sucks

2013-04-11 Thread Sam Watkins
On Thu, Apr 11, 2013 at 05:00:00PM +0100, Nick wrote: Best to figure out what is more correct, do that, and patch any applications that do things the wrong way. I guess other terminals manage this okay, in spite of their faults, why not check to see what they are doing?

Re: [dev] [st] windows port?

2013-04-11 Thread Sam Watkins
One of the main suckless devs Uriel did commit suicide not long ago. Perhaps people here could refrain from saying kill yourself, out of respect to him. Or did he talk that way also? Did the same people spit the dummy, when dwm was ported to Windoze? There are already tolerable terminals for

Re: [dev] print utility

2013-04-04 Thread Sam Watkins
On Thu, Apr 04, 2013 at 09:30:49AM +0200, Martti K??hne wrote: On Sun, Mar 31, 2013 at 4:53 AM, Calvin Morrison mutanttur...@gmail.com wrote: Forget this whole LINE_MAX thing, I am looking at your suggestion in the other message. For line buffering, I also use char arrays I tend to use

Re: [dev] print utility

2013-04-02 Thread Sam Watkins
On Tue, Apr 02, 2013 at 01:29:11PM +0200, markus schnalke wrote: [2013-04-02 15:23] Sam Watkins s...@nipl.net I suggest to extend your program so it can also print a range of lines (and thus subsume the functions of 'head' and 'tail' while doing more and yet staying fairly focused). You

Re: [dev] print utility

2013-04-02 Thread Sam Watkins
What is the shortest shell command you can write, that replaces $A with $B in a text stream for any A and B? On Tue, Apr 02, 2013 at 06:32:19PM -0700, Noah Birnel wrote: A1=$(printf '%s' $A | sed 's,,\\,g; s,\\,,g') B1=$(printf '%s' $B | sed 's,,\\,g; s,\\,,g') awk '{ gsub('$A1',

Re: [dev] print utility

2013-04-01 Thread Sam Watkins
On Sat, Mar 30, 2013 at 10:27:05PM -0400, Calvin Morrison wrote: Is there a better way to read a whole line? For this tool you don't need to read whole lines, just read blocks and count newlines until you perhaps get to the right line number, and print everything the next newline. I agree that

Re: [dev] print utility

2013-04-01 Thread Sam Watkins
I reckon by far the most common thing people do with sed is to replace one (sort of) string with another. But even this core sed business is ridiculous with sed. e.g. A=/usr/bin B=/bin sed 's/$A/$B/' in out # won't work Changing delimiters doesn't help for the general case. I would have to

Re: [dev] print utility

2013-04-01 Thread Sam Watkins
e.g. A=/usr/bin B=/bin sed 's/$A/$B/' in out # won't work I'm also not representative of the sed community, but to suggest that this is what people primarily use it for is just ignorant. Ok perhaps I misjudged that, and I was a bit harsh on sed. Sure, sed is good at running ed scripts

Re: [dev] Re: [slcon] Call for Papers 2013

2013-03-26 Thread Sam Watkins
You missed the best part: * socket activation Yuk! We can use programs that simply don't suck, so the machine boots nice and quick without such silliness.

Re: [dev] Makefile/markdown based static site generator

2013-02-20 Thread Sam Watkins
On Thu, Feb 21, 2013 at 12:10:04PM +0800, Kai Hendry wrote: Thanks Nick for sharing that Makefile. I've decided to use the first HTML comment in the markdown as the page title. Why not make it the same as the main heading? or use the first line of the markdown? or use the file name / folder

Re: [dev] Makefile/markdown based static site generator

2013-02-20 Thread Sam Watkins
On Thu, Feb 21, 2013 at 01:27:58PM +0800, Kai Hendry wrote: I thought of using the filename, e.g. foo/bar/cat.mdwn - foo/bar/index.html with the page title cat. how about foo/bar/cat.mdwm - cat.html , title cat foo/bar/index.mdwm - index.html , title bar expressing that as a Makefile

Re: [dev] Makefile/markdown based static site generator

2013-02-19 Thread Sam Watkins
Makefile/markdown based static site generator I did something similar, but without having looked at your code yet I can tell you that yours sucks less than mine! hehe

Re: [dev] [suckless] Migration to git

2013-02-14 Thread Sam Watkins
On Thu, Feb 14, 2013 at 07:24:28AM +0100, Lukas Fleischer wrote: It's a one-liner: $ git reset $(git commit-tree -m foobar HEAD^{tree}) Pretty fast: git reset $(git commit-tree -m foobar HEAD^{tree}) 0.00s user 0.01s system 70% cpu 0.009 total `git gc` also works perfectly

Re: [dev] [suckless] Migration to git

2013-02-13 Thread Sam Watkins
On Wed, Feb 13, 2013 at 12:56:44AM +0100, Jens Nyberg wrote: People who can not grasp git thinks it's bad, it's that simple. The git core is really very good and even almost suckless. The git front end is very functional and capable, but also a catastropic chaos of bolted on inconsistent

Re: [dev] [suckless] Migration to git

2013-02-13 Thread Sam Watkins
I've been working with git lately, trying to do some unusual things, and I need to say this is one of the least suckless pieces of software I've ever worked with. It's complex, obscure, inconsistent, quirky... tell what you did Ok, here is one day in the life of messing about with git.

Re: [dev] Suckless and Wayland

2013-02-13 Thread Sam Watkins
On Wed, Feb 13, 2013 at 07:20:10PM -0500, Strake wrote: because major distribs like Fedora or Ubuntu plan to use it. They can use clay tablets for all I care. there is no way any linux distro in the foreseeable future will drop support for Xlib, that would be ridiculous. If they use

Re: [dev] [suckless] Migration to git

2013-02-13 Thread Sam Watkins
On Thu, Feb 14, 2013 at 11:07:36AM +0800, Chris Down wrote: Are you kidding me? Are you unaware of git rebase? git rebase is slower and does not always work, I don't really want to go into the gory details

Re: [dev] Find window with dmenu

2013-02-12 Thread Sam Watkins
People wrote: grep? awk? sed? Or you can just use the simplest tool for the job now, grep, and if your needs change some day, you can use a different tool. OMFG I had to switch to a different tool the sky is falling the sky is falling. No seriously.

Re: [dev] Find window with dmenu

2013-02-12 Thread Sam Watkins
markus schnalke wrote: I disagree because grep (with -E or as egrep) does support Extended Regular Expressions, which sed does not. if you want fancy regular expressions, just use perl (troll ducks for cover!) ;)

Re: [dev] [suckless] Migration to git

2013-02-12 Thread Sam Watkins
On Mon, Nov 26, 2012 at 11:25:18AM +0100, Christoph Lohmann wrote: I am proposing a migration of all mercurial to git repositories. I've been working with git lately, trying to do some unusual things, and I need to say this is one of the least suckless pieces of software I've ever worked with.

Re: [dev] FTP script: how to store password?

2013-02-09 Thread Sam Watkins
On Sat, Feb 09, 2013 at 12:20:58PM +0100, Hugues Moretto-Viry wrote: Hi guys, I'm writing a little FTP client in pure shell + curl for my personal needs. Anyway, I need to store my passwords so I chose SQlite, because I don't want to put them in a regular file or in the script.

Re: [dev] FTP script: how to store password?

2013-02-09 Thread Sam Watkins
ai.ki sam something nipl.net sam whatever This looks much like a reinvention of netrc. Netrc is already there and widespread. Also, users know that it contains sensible data. The things not so perfect of netrc are minor compared to that. A good point, in fact curl can use

Re: [dev] FTP script: how to store password?

2013-02-09 Thread Sam Watkins
On Sat, Feb 09, 2013 at 11:20:38AM -0800, Charlie Kester wrote: On 02/09/2013 03:48, hiro wrote: store them in a dbus transmission loop. Please don't. sarcasm detection fail

Re: [dev] Suckless Beer Recipe Creator

2013-02-06 Thread Sam Watkins
Wolfgang Sanyer wrote: Hello Group :-) I've written what I believe to be a Beer Recipe Creator that Sucks Less. https://github.com/ezzieyguywuf/recipator Anything to do with beer sucks less that your average shell tool! For my money, python is a highly suckless language, at least the

Re: [dev] Suckless generic diagram creation software?

2013-02-06 Thread Sam Watkins
On Wed, Feb 06, 2013 at 04:37:02PM -0800, Charlie Kester wrote: On 02/06/2013 12:32, Carlos Torres wrote: graphviz +1 yeah, graphviz is really very good, I've used it to automatically generate graphs of program structure (for graph-structured programs, not like C code). I didn't try their

Re: [dev] snotes v0.9 - a simple notes system

2013-02-06 Thread Sam Watkins
Apparently the BSD way to specify editor ($EDITOR / $VISUAL / mailcap) sucks pretty bad. I reckon mailcap is basically a good idea, but doesn't work very well, and could use some occam's razor. I hazard to guess that the freedesktop people have reimplemented it rather than fixed it :/ Anyway,

Re: [dev] st very slow to refresh when x is oriented left / right

2013-02-06 Thread Sam Watkins
On Tue, Feb 05, 2013 at 04:59:28PM +, Nick wrote: 'xrandr -o left', as that is clearly superior. the newer versions of st, using XFT, are very slow at refreshing when things are in this mode interesting, it might be good to design apps or libs to render using 'vertical scan-lines' in the

Re: [dev] Associative arrays implementation in rc shell scripts

2013-01-17 Thread Sam Watkins
On Thu, Jan 17, 2013 at 12:54:55PM +0700, Peter A. Shevtsov wrote: I've made a simple associative arrays implementation in rc shell script. I'm an rc newbie too, I like the associative arrays. The code looks ok to me - but I wouldn't know! Do we really have to use bc for simple arithmetic in

[dev] convergence

2013-01-01 Thread Sam Watkins
On Tue, Jan 01, 2013 at 02:13:14PM +1100, Daniel Bryan wrote: Bash is my go-to for system scripting, but for something that will run 100% of the time on my system for years it's not over-engineering to do it efficiently. It would be nice to extend C with suitable function and macro libraries,

Re: [dev] convergence

2013-01-01 Thread Sam Watkins
On Wed, Jan 02, 2013 at 12:04:21PM +1100, Daniel Bryan wrote: On the other hand, it's not the fact that C is compiled that makes it more efficient than the interepreted bash - it's the fact that C is just reading files and filling buffers, whereas Bash is doing a dozen fork+execs. Yes. It's

Re: [dev] convergence

2013-01-01 Thread Sam Watkins
On Tue, Jan 01, 2013 at 09:36:29PM -0500, Corey Thomasson wrote: Implementing an entire userland in a library could only lead to a lot more sucking. Yes, maybe it would. On the other hand I think it can be good to use the software tools / flow based programming approach at a smaller scale than

Re: [dev] convergence

2013-01-01 Thread Sam Watkins
On Tue, Jan 01, 2013 at 11:03:08PM -0500, Jacob Todd wrote: I was the others in the thread to unsubscribe. I suggest you take a few more classes on the english language. s/was/want/ s/english/English/ s/Jacob Todd/some unfriendly guy/ Or, was it off-topic to talk about this here?

Re: [dev] Re: Migration to git

2012-11-29 Thread Sam Watkins
On Thu, Nov 29, 2012 at 06:18:25PM +0100, pancake wrote: definitively, git sucks I could have told you that! lol Mercurial is obviously much, much cleaner and simpler than git. There's a reason why the suckless / cat-v / bell / google guys are using it. Oh, wait... The basic git system is

Re: [dev] Migration to git

2012-11-28 Thread Sam Watkins
On Wed, Nov 28, 2012 at 11:13:11PM -0500, Calvin Morrison wrote: With the transfer to git, would it be possible for me to clone all of the suckless repositories in one fell sweep? for repo in foo bar baz; do git clone git://some.server/$repo; done This is about as 'one fell sweep' as it's

Re: Regarding dogma words [Was: Re: Regarding make-systems [Was: Re:[dev] Build system: redo]]

2012-11-26 Thread Sam Watkins
On Mon, Aug 13, 2012 at 01:24:57PM -0700, Michael Farnbach wrote: Troll is another word overused to utter meaninglessness. troll is a fishing term, it means dragging a line behind a boat, hoping for a bite. It's clear enough what this means in conversation. People on here are blisteringly rude,

Re: Regarding dogma words [Was: Re: Regarding make-systems [Was: Re:[dev] Build system: redo]]

2012-11-26 Thread Sam Watkins
On Mon, Aug 13, 2012 at 01:24:57PM -0700, Michael Farnbach wrote: Troll is another word overused to utter meaninglessness. *time passes* On Tue, Nov 27, 2012 at 03:56:22PM +1100, Sam Watkins wrote: troll is a fishing term, it means dragging a line behind a boat, hoping for a bite. It's clear

Re: [dev] I'm back

2012-11-22 Thread Sam Watkins
On Thu, Nov 22, 2012 at 10:46:15AM +0100, sta...@cs.tu-berlin.de wrote: Either me or you misunderstood the other one. The point is, you can configure borders or not in the dwm program already - no need to make major changes to it. Sam

Re: [dev] [surf] adblocking

2012-11-22 Thread Sam Watkins
On Thu, Nov 22, 2012 at 12:41:36PM +0100, hiro wrote: I would also like a score based system which would put responsibility of not visiting stupid sites back into the surfer's hands. Well, I dont think thepiratebay is a stupid site, but it sure has a lot of spammy ads on it without some adblock

Re: [dev] I'm back

2012-11-21 Thread Sam Watkins
On Wed, Nov 21, 2012 at 12:45:35PM +0100, sta...@cs.tu-berlin.de wrote: - borders are useful configuration border-width: 0 problem solved

Re: [dev] [surf] adblocking

2012-11-21 Thread Sam Watkins
On Wed, Nov 21, 2012 at 10:54:49AM +, Nick wrote: On Wed, Nov 21, 2012 at 11:23:08AM +0100, Christoph Lohmann wrote: Cross-site scripting is already a backwards compatibility to Google, like Windows is the backward compatibility to the proprietary world. But yes, it would be a

Re: [dev] [surf] adblocking

2012-11-20 Thread Sam Watkins
On 11-20 08:08, Andrew Hills wrote: Would it be possible to disable requests made by the page to any address outside the page's domain? This is a worthwhile option for the browser. It can block many ads, and also block cross-site request forgery exploits. CSRF exploits take advantage of a

Re: [dev] A window without focus

2012-10-26 Thread Sam Watkins
Manolo Mart?nez wrote: I have a cronjob that launches a window with notify-send Low Battery when, well, the battery is low. Is there a way to prevent this window from stealing focus? Use a window manager that doesn't steal focus? What window manager are you using? Seems off topic, unless

Re: [dev] Two mini pipe utils

2012-09-20 Thread Sam Watkins
Edgaras wrote: pd - pipe discarder ir - infinite reader Thanks, I make use of named pipes, and I think I will want to use these. Sam

Re: [dev] a suckless init system?

2012-08-14 Thread Sam Watkins
There are dependency based init systems, should use mk for it. net: 1 inetd: net 2: getty inetd mk 2 # go to runlevel 2 # inetd crashes mk 2 # bring it back to life It would need some sort of procfs view with process names, where unlink sends a term signal, and some extra features