Re: [dev] ASCII Delimited Text

2018-05-21 Thread Truls Becken
As an anecdote, I actually wanted to use US/RS delimited text at work a while ago to consume XML downloaded from some service. The idea was to use XSLT to convert the data to a sane format that I could easily ingest. As it turns out, that was a no-can-do because XSL transforms are defined in an

Re: [dev] securiy guidance

2018-03-06 Thread Truls Becken
Some libraries to look at are; libressl, libtomcrypt, nacl.cr.yp.to, libsodium, nettle, libgcrypt and libmcrypt.

Re: [dev] securiy guidance

2018-03-05 Thread Truls Becken
Hi Peter, I know this is not what you asked about, but there is one other thing people dislike about pass; the file hierarchy is in plain text. If you can fix that, you might attract some users. -Truls On Mon, Mar 5, 2018 at 11:06 AM, wrote: > Hello, > > this mail won't be

Re: [dev] [st] mouse usage, right click to plumb selection

2017-09-12 Thread Truls Becken
Plumbing with cwd sounds interesting if it works reliably. I see that one has to configure ones shell specifically to output an escape code that the patched ST will recognize. Question about the patch itself; why start a shell and construct a command that involves cd to change directory? Wouldn't

Re: [dev] Linking a directory tree of configuration files

2017-08-31 Thread Truls Becken
On 2017-08-31 09:19, Thomas Levine wrote: > it would be acceptable to have something like cp -R that differed > only in that it made hard links instead of copies This sentence stood out to me because cp already does that with the -l switch.

Re: [dev] JIT & VM discussion

2016-06-19 Thread Truls Becken
How about QBE, which is one step up from assembly?

Re: [dev] Miscellaneous sbase issues

2015-05-05 Thread Truls Becken
+1 for option 3) Why would anybody want to trust somebody that creates malicious archives like that? A symlink in an archive should just be a symlink, nothing more. -Truls

[dev] [sbase] [PATCH] cut: clean up file loop

2014-12-17 Thread Truls Becken
--- cut.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/cut.c b/cut.c index aca0083..99ec4ce 100644 --- a/cut.c +++ b/cut.c @@ -162,21 +162,19 @@ main(int argc, char *argv[]) if (!mode) usage(); - if (!argc) + + if

[dev] [sbase] Why do extra work when the kernel will do it more efficiently?

2014-12-16 Thread Truls Becken
Hi everyone, As the original contributor of sbase cut, I can't help wondering what the purpose of the mem freeing added in the two commits from 1st of June is supposed to be. The most efficient and reliable way to free allocated memory is to terminate the process. There is no reason to clean

[dev] Re: [sic] [PATCH] Treat non-option arguments as commands

2014-10-01 Thread Truls Becken
On 2014-10-01, at 01:05, Eric Pruitt wrote: I think that still has the same problem mentioned in my other email: the remote server may not accept commands until the initial handshake is finished. Sure, but solving that is independent of how you give sic the commands to send. -Truls

Re: [dev] [sic] [PATCH] Treat non-option arguments as commands

2014-09-30 Thread Truls Becken
Hi, Did you try something like: cat ~/.sicrc - | sic or cat (echo :j #suckless) - | sic This should do what you want. The latter example depends on a shell extension, but process substitution is such a nice idea it should be in all shells, IMHO. -Truls

[dev] Re: [sic] [PATCH] Classic Suckless config.{def,}.h configurability

2014-09-30 Thread Truls Becken
The patch seems like a good idea. +1 for %Y-%m-%d as well. -Truls

Re: [dev] Looking for simple, alpha supporting image format

2014-07-18 Thread Truls Becken
On Fri, Jul 18, 2014 at 7:15 PM, Charlie Murphy cmsmur...@gmail.com wrote: Interesting. How could a header change the compression so much? How about putting the widthxheight in the file name and having RGBA data only inside? Would that result in the best possible compression? Or have a header,

[dev] [PATCH] [scron] Log to designated syslog facility

2014-07-06 Thread Truls Becken
--- crond.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crond.c b/crond.c index d416ece..2dbbb76 100644 --- a/crond.c +++ b/crond.c @@ -373,7 +373,7 @@ main(int argc, char *argv[]) TAILQ_INIT(ctabhead); if (dflag == 1) { - openlog(argv[0],

Re: [dev] C coded lightweight Linux vector graphics editor

2014-06-05 Thread Truls Becken
There is also the pic preprocessor for troff. -Truls

Re: [dev] lock (1) - a dead simple lock script

2014-04-11 Thread Truls Becken
On 2014-04-08, at 17:48, Calvin Morrison wrote: The script will either create the lock and exit, or ping the lock every two seconds until the lock is gone (via rmdir). I'm confused. Surely you also need to lock after old lock goes away? -Truls

Re: [dev] tmux/screen alternative

2014-02-23 Thread Truls Becken
On 2014-02-23, at 13:13, Raphaël Proust wrote: This is very interesting. The main complaint I have towards dtach(1) (I have the same complaint about screen(1) and tmux(1), but for those it's not the *main* complaint) is the need to first ssh into an interactive session. I'd like to do `dtach

Re: [dev] Announcing sinit - the suckless init

2014-02-15 Thread Truls Becken
Rich Felker included a really minimalistic init in his recent blog post Broken by design: systemd [1]. -Truls [1] http://ewontfix.com/14/

Re: [dev] Announcing sinit - the suckless init

2014-02-08 Thread Truls Becken
Hi, Wrapping the argument to spawn in Arg union is useless now. Probably a leftover from the design with FIFO. -Truls

Re: swc library to implement dwm under Wayland (was Re: [dev] gtk3 support for surf?)

2014-01-14 Thread Truls Becken
On 2014-01-14, at 11:42, FRIGN wrote: My advice would be to take a look at tinyx[2] and tinyxlib[3], which is relatively small and fitting the purpose well (dwm runs on it). Let's see what the future will bring us, but it now is all about making a decision. I'd like to mention that you

Re: [dev] [sbase] printf(1)

2013-12-19 Thread Truls Becken
On 2013-12-19, at 10:47, FRIGN wrote: Considering we have suckless standard libraries like uClibc, Whoops, I meant dietlibc. I kinda mixed up the names. musl FTW! -Truls

Re: [dev] New utility when

2013-12-13 Thread Truls Becken
On 2013-12-13, at 00:48, Samuel Holland wrote: And if you only need simple messages, then there's nothing wrong with having to quote the on success command: $ when -t -c xmessage Success command args... The advantage of specifying the message command as an argument (as opposed to ) is

Re: [dev] New utility when

2013-12-12 Thread Truls Becken
On 2013-12-12 at 04:54, Andrew Gwozdziewycz wrote: On 2013-12-11 at 19:08, Fernando C.V. wrote: Sounds like a little nice useful utility, even thoguh I don't like that the commands have to be passed quoted, as arguments just like that. Not sure if there's a much better way to do it, though.

Re: [dev] New utility when

2013-12-12 Thread Truls Becken
On 2013-12-12, at 13:28, Andrew Gwozdziewycz wrote: Are you suggesting that the shell handle the command after the ? Or you let the subshell I spawn do it? The shell would handle the command after . The command after recognized arguments is handled using fork + execvp, without a subshell.

Mailing list behaviour - was: [dev] [dmenu] [dwm] [patch] open in new terminal window

2013-11-11 Thread Truls Becken
Please don't reply to a random message in order to start a new thread! I see people do this from time to time on most of the lists I subscribe to. Almost never do anybody complain about it, but to me it seems just as bad as top posting. There is absolutely no reason to do this. And the irony of

Re: [dev] [sbase] Command list

2013-10-18 Thread Truls Becken
A few more suggestions: bc dc dd file find fmt install killall less make sh time which xargs (un)zip/gzip/bzip2/lzma/xz Some of these are more complex than others of course. -Truls

Re: [dev] [sbase] Command list

2013-10-18 Thread Truls Becken
On 2013-10-18, at 12:29, sin wrote: find: Useless, just do `du -a | grep blabla' I'm not interested in disk usage, but finding files based on certain properties, such as update time, ownership, permissions, etc. make: Do we really need this in sbase? Make is a basic tool, useful in lots of

Re: [dev] [sbase] Command list

2013-10-18 Thread Truls Becken
On 2013-10-18, at 14:53, Strake wrote: I'm not interested in disk usage, but finding files based on certain properties, such as update time, ownership, permissions, etc. du -a | cut -f 2 Yes, but how do you filter the result on some combination of file attributes? du -a | cut -f2 | xargs

Re: [dev] [sbase] Command list

2013-10-18 Thread Truls Becken
On 2013-10-18, at 15:45, Truls Becken wrote: If you want to do it this way around, a command is missing for filtering a list of file names, as already mentioned by Raphaël. It could be generalised to a command for filtering stdin by calling a predicate command, e.g: du -a | cut -f2 | filter

Re: [dev] [sbase] [patch] Add primitive du(1)

2013-10-16 Thread Truls Becken
A few trivial comments: Moving main() to the bottom and usage() to the top would eliminate the need to declare them. Functions push() and pop() seem to only be used once each. Would it be too bad to have these few lines directly in the du function? The switch in du would be slightly simpler

[dev] [sbase] [PATCH] Add cut(1)

2013-10-08 Thread Truls Becken
100644 --- a/LICENSE +++ b/LICENSE @@ -14,6 +14,7 @@ MIT/X Consortium License © 2012 Robert Ransom rransom.8...@gmail.com © 2013 Jakob Kramer jakob.kra...@gmx.de © 2013 Anselm R Garbe ans...@garbe.us +© 2013 Truls Becken truls.bec...@gmail.com Permission is hereby granted, free of charge, to any

Re: [dev] [sbase] [patch] Add hostname

2013-08-20 Thread Truls Becken
I guess usage should be eprintf(usage: %s [name]\n, argv0); Could use puts(buf); instead of printf(%s\n, buf); -Truls

Re: [dev] surf-0.6-searchengine

2013-08-06 Thread Truls Becken
On 2013-07-31, at 10:40, Ari Malinen wrote: I wrote patch which adds search engine integration. If you provide url which is not valid then surf passes it to search engine. I see this as better approach than the searchengines patch from surf.suckless.org. The advantage of the approach on the

Re: [dev] surf-0.6-searchengine

2013-08-06 Thread Truls Becken
On 2013-08-06, at 21:35, Chris Down wrote: On 2013-08-06 21:27, Truls Becken wrote: The advantage of the approach on the wiki is that you can have multiple search engines configured, or really, URL shortcuts with optional string substitution. Firefox has the same thing. I, for one, only

Re: [dev] [sbase] [patch] Adding tar v2

2013-07-17 Thread Truls Becken
On 2013-07-17, at 15:52, Markus Wichmann wrote: Speaking of which, is anyone up for some suckless binutils? Rob Landley has some vaporware here: http://landley.net/qcc/ -Truls

Re: [dev] [sbase] [patch] Adding tar v2

2013-07-12 Thread Truls Becken
On 2013-07-12, at 17:30, David Galos wrote: The argument parsing is a bit ugly, so simplifications are welcome, provided they keep the current functionality The goto seems uncalled for. An ordinary if does the job equally well. Also, I wonder if a mode variable isn't just as simple as the flg

Re: [dev] [sbase] Adding tar

2013-07-07 Thread Truls Becken
On 2013-07-07, at 05:53, David Galos wrote: If sbase gains programs to do compression, and the code is nicely librarized, I will consider thinking about considering adding letting tar do that. Why not call out to the compression program? Pipes are not patented by shells. This decouples things

Re: [dev] [sbase] Adding tar

2013-07-06 Thread Truls Becken
On 2013-07-06, at 12:15, David Galos wrote: In short, how do you fine folks invoke your tar? My habit relays on compression scheme detection: tar cf foo.txz ~/stuff tar xf bar.tbz -Truls

[dev] [sbase] afgets

2013-07-06 Thread Truls Becken
Greetings. In afgets() the size variable is never updated, which usually means it is always zero, in which case it has no purpose at all. I believe it is supposed to be updated on realloc? This way, calling afgets multiple times with the same arguments will reuse the space if possible. Also, the

Re: [dev] Parentheses

2013-07-04 Thread Truls Becken
On 2013-07-04, at 14:12, Bjartur Thorlacius wrote: type = argv[1][0] == 'b' ? S_IFBLK : S_IFCHR; type = ((argv[1][0] == 'b') ? S_IFBLK : S_IFCHR) Yes, David did the commit with parens around the test. Not around the elvis operator, though. -Truls

Re: [dev] [sbase] sponge

2013-06-25 Thread Truls Becken
On 2013-06-25, at 20:39, Calvin Morrison wrote: sponge sucks up stdin, waits till it is closed then puts it out to stdout Except it does not actually sponge in the stdout case, only when writing to file. Perhaps it would be better to drop support for stdout? Or cat temp file to stdout at the

Re: [dev] mail clients

2013-06-11 Thread Truls Becken
On 2013-06-10, at 21:35, Edgaras wrote: Also Christop/__20h__ is working on some mail client that sounded quite nice and interesting from the description, but afaik it is not yet available(?). I've heard Christoph mention this, but never seen a description. Do you have a link? -Truls

Re: [dev] Re: Why HTTP is so bad?

2013-05-27 Thread Truls Becken
On 2013-05-27, at 12:12, Fernando C.V. wrote: Either that or you will need a video player that speaks http. Which they usually do. It's called streaming and has been popular for roughly 15 years. -Truls

Re: [dev] diffdisplays

2013-05-01 Thread Truls Becken
In addition to what Carlos said about using damage evens and transparent overlays, you probably want some sort of notification of activity in windows not currently displayed on screen. This is similar to urgency wm hints, but triggered by window content change rather than explicit application

Re: [dev] rio for linux

2013-05-01 Thread Truls Becken
On 2013-05-01, at 07:30, Sam Watkins wrote: 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. Port drawterm to run on fb rather than x11? Then you can run the actual plan 9 desktop by connecting to a 9vx

Re: [dev] [PATCH] dmenu_run: Don't leave a shell running

2013-04-16 Thread Truls Becken
On 2013-04-16, at 10:17, Ross Lagerwall wrote: -dmenu_path | dmenu $@ | ${SHELL:-/bin/sh} +exec $(dmenu_path | dmenu $@) On 2013-04-16, at 15:47, Ross Lagerwall wrote: -dmenu_path | dmenu $@ | ${SHELL:-/bin/sh} +eval exec $(dmenu_path | dmenu $@) To not screw up the argument passing, you

Re: [dev] [ANNOUNCE] stem-0.1

2013-04-08 Thread Truls Becken
On 2013-04-08, at 09:22, Christian Hesse wrote: I just wanted to build a package for my distribution when I noticed there already was a package named stem. It's a python controller library for Tor: https://stem.torproject.org/ Looks like I have to choose another name for your script... You

Re: [dev] Find window with dmenu

2013-02-12 Thread Truls Becken
On 2013-02-12, at 13:22, Chris Down wrote: Considering he's already doing rudimentary filtering through in *addition* to sed calls, awk is more generalisable choice to the problem set. Alternatively, you could say that sed is the more generalisable choice since grep is pretty much a subset of

[dev] Re: [9base][awk] printf and utf-8

2013-01-22 Thread Truls Becken
On 2013-01-22, at 09:05, mauro tonon wrote: Also, awk can't know beforehand if the input string is UTF-8 encoded or not, so the only thing it can do is to count bytes Or take the Plan 9 approach of always assuming UTF-8. -Truls

Re: [dev] Starch has a web site

2012-12-06 Thread Truls Becken
On 2012-12-06, at 05:15, Strake wrote: Starch Linux has its own web site now: http://starchlinux.org so further announcements will be made there. Where should discussions take place? The home page does not mention any community links. The installation guideline suggests using the Arch

Re: [dev] I'm back

2012-11-25 Thread Truls Becken
On 2012-11-25, at 16:39, Noah Birnel wrote: I use dwm to manage 10-15 simultaneous RDP sessions. Since RDP eats all keystrokes, the mouse is the only way to switch between them. No mouse = I need a different WM. Assuming you are using rdesktop as RDP client, try option -K to allow window

Re: [dev] I'm back

2012-11-21 Thread Truls Becken
Borders are not drawn by dwm, the border width is a part of the window configuration dwm tells the X server to use on each window. The *only* drawing performed by dwm is the bar. Getting rid of the bar would also mean that the status string does not have to pass through dwm as it would rather

Re: [dev] [announce] rat - ridiculously abysmal tar

2012-11-06 Thread Truls Becken
On 2012-11-06, at 12:00, Andreas Krennmair wrote: It currently supports the tar operations c, t and x (which makes it a bit more useful than sltar) and the options -f, -C, -v, -z and -j (for decompression only). Cool. Did you consider auto detecting compression from file name and/or

Re: [dev] Build system: redo

2012-08-02 Thread Truls Becken
On 2012-08-02, at 00:15, pancake wrote: Tup is cool but i find it quite bloated to depend on sqlite. And requires to rebuild the cache for every new file. Apart from that the rules looks good and graph theory makes the papers cool. I have not tried Tup, but the idea of tracking

Re: [dev] [ii] exposed password on process monitoring

2012-04-20 Thread Truls Becken
On 2012-04-19, at 23:03, Kurt H Maier wrote: On Thu, Apr 19, 2012 at 10:27:04PM +0200, Truls Becken wrote: So for the user they seem to have the same effect. Perhaps 2) is partly the reason they do 1), by the way. Let's not make the fantastically naive mistake of assuming this userbase

Re: [dev] [ii] exposed password on process monitoring

2012-04-19 Thread Truls Becken
On 2012-04-19, at 17:54, Ivan Kanakarakis wrote: I guess some possible workarounds would be - reading the passwd from an environmental var (is that any safer?) - reading the passwd from a file (overkill ?) - ? what do you people think ? should this be 'fixed' in ii ? $ ii $ cat

Re: [dev] [ii] exposed password on process monitoring

2012-04-19 Thread Truls Becken
On Thu, Apr 19, 2012 at 20:05, Ivan Kanakarakis wrote: I think PASS is good, having it removed wouldn't really gain us much, nothing important in terms of loc and would have to replace that functionality, that the irc protocol provides with a delayed /j nickserv identify ... message. which

Re: [dev] [ii] exposed password on process monitoring

2012-04-19 Thread Truls Becken
On Thu, Apr 19, 2012 at 21:21, Kurt H Maier wrote: PASS has nothing to do with nickserv. nickserv has nothing to do with PASS. any server that uses data from the PASS string to do shit with nickserv is doing that on its own. Why is this not filtering into anyone's skull? Because: 1) as

Re: [dev] situ — change files in situ

2012-04-13 Thread Truls Becken
There is also sponge from http://kitenet.net/~joey/code/moreutils/ -Truls

Re: [dev] situ — change files in situ

2012-04-13 Thread Truls Becken
On Fri, Apr 13, 2012 at 19:50, Strake wrote: There is also sponge from http://kitenet.net/~joey/code/moreutils/ which would also corrupt file on failure, by what little documentation I can read through the markup. You are right. I thought that since it only opens the output file after stdin

Re: [dev] [surf] [patch] Close stdout after printing XID

2012-02-18 Thread Truls Becken
On Sat, Feb 18, 2012 at 14:50, Abby Cedar wrote: Need to close stdout otherwise it can't be used in a script until surf finishes. To test, try the below before and after the patch. xid=`surf -x `; echo $xid You are right. The following works around the problem, but is not very elegant;

Re: [dev] sbase TODO patch

2012-02-10 Thread Truls Becken
On 2012-02-09, at 23:52, Connor Lane Smith wrote: const char *s = (argc 2) ? y : argv[1]; while(puts(s) != EOF); On 2012-02-10, at 10:12, clamiax wrote: http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.bin/yes/yes.c?rev=1.8.22.1content-type=text/x-cvsweb-markup How about: #include stdio.h

Re: [dev] dwm rules do not check window's first class

2012-01-02 Thread Truls Becken
On 2012-01-02, at 09:34, James Campos wrote: I added a rule to place windows of a certain class to a certain tag. However, windows apparently have two classes, and this rule only works if it specifies the second class. I believe what you are looking for is the second Rule field, the one

Re: [dev] xv6

2011-11-12 Thread Truls Becken
In my defence, I both searched through the mailing list page using my browser, and searched for xv6 site:suckless.org with DDG, without finding anything. After Kurt pointed out that it had been discussed before, I tried the same query with Google, which found one mail mentioning xv6 in the middle

Re: [dev] Compilers

2011-11-12 Thread Truls Becken
On Sat, Nov 12, 2011 at 17:33, Bjartur Thorlacius wrote: Clang (cool, but bytecode) What do you mean? Yes, LLVM uses what it calls bitcode as part of the process, but the final result is a native binary. -Truls

[dev] xv6

2011-11-09 Thread Truls Becken
Hi, Professors at MIT have rewritten Unix V6 in 7000 lines of ANSI C for use in operating system class. I thought it might interest some people on this list. http://pdos.csail.mit.edu/6.828/2011/xv6.html -Truls