[dev] [announce] rat - ridiculously abysmal tar

2012-11-06 Thread Andreas Krennmair

Hello everyone,

Yesterday, out of frustration and boredom, I started a minimalistic 
implementation of tar in Go which I named rat ('tar' reversed, but also 
'ridiculously abysmal tar'). Today, I reached a point where I can show that 
piece of software to you.


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). Since the Go standard library already comes with implementations of the 
gzip and bzip2 algorithms, no external binaries for compression/decompression 
are necessary.


You can find the current source code here:
https://github.com/akrennmair/rat

Feedback and patches are welcome.

Best regards,
Andreas



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 content?

(Because lazyness is good, and I've grown accustomed to; tar cf stuff.tbz 
~/stuff)

-Truls


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

2012-11-06 Thread Christoph Lohmann
Greetings.

On Tue, 06 Nov 2012 16:10:33 +0100 Andreas Krennmair a...@synflood.at wrote:
 Hello everyone,
 
 Yesterday, out of frustration and boredom, I started a minimalistic 
 implementation of tar in Go which I named rat ('tar' reversed, but also 
 'ridiculously abysmal tar'). Today, I reached a point where I can show that 
 piece of software to you.

Go  is  never  simple.  It’s  like proposing a Python project here to be
»suckless«.

Out  of  frustration  and  boredom I looked up the suckless.org page and
found [0]. Please contribute there instead of creating megabytes of  bi‐
naries in prototyping languages.


Sincerely,

Christoph Lohmann

[0] https://github.com/Gottox/sltar




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

2012-11-06 Thread Andreas Krennmair

* Christoph Lohmann 2...@r-36.net [2012-11-06 16:20]:

On Tue, 06 Nov 2012 16:10:33 +0100 Andreas Krennmair a...@synflood.at wrote:

Hello everyone,

Yesterday, out of frustration and boredom, I started a minimalistic
implementation of tar in Go which I named rat ('tar' reversed, but also
'ridiculously abysmal tar'). Today, I reached a point where I can show that
piece of software to you.


Go  is  never  simple.  It’s  like proposing a Python project here to be
»suckless«.


b...but I though Go was suckless? ;_;




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

2012-11-06 Thread Christoph Lohmann
Greetings.

On Tue, 06 Nov 2012 17:00:06 +0100 Andreas Krennmair a...@synflood.at wrote:
 * Christoph Lohmann 2...@r-36.net [2012-11-06 16:20]:
 On Tue, 06 Nov 2012 16:10:33 +0100 Andreas Krennmair a...@synflood.at 
 wrote:
  Hello everyone,
 
  Yesterday, out of frustration and boredom, I started a minimalistic
  implementation of tar in Go which I named rat ('tar' reversed, but also
  'ridiculously abysmal tar'). Today, I reached a point where I can show that
  piece of software to you.
 
 Go  is  never  simple.  It’s  like proposing a Python project here to be
 »suckless«.
 
 b...but I though Go was suckless? ;_;

No.  There  was  only one person pretending go to be suckless because of
its pseudo Plan 9 heritage.


Sincerely,

Christoph Lohmann




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

2012-11-06 Thread Calvin Morrison
On 6 November 2012 11:00, Christoph Lohmann 2...@r-36.net wrote:

 Greetings.

 On Tue, 06 Nov 2012 17:00:06 +0100 Andreas Krennmair a...@synflood.at
 wrote:
  * Christoph Lohmann 2...@r-36.net [2012-11-06 16:20]:
  On Tue, 06 Nov 2012 16:10:33 +0100 Andreas Krennmair a...@synflood.at
 wrote:
   Hello everyone,
  
   Yesterday, out of frustration and boredom, I started a minimalistic
   implementation of tar in Go which I named rat ('tar' reversed, but
 also
   'ridiculously abysmal tar'). Today, I reached a point where I can
 show that
   piece of software to you.
  
  Go  is  never  simple.  It’s  like proposing a Python project here to be
  »suckless«.
 
  b...but I though Go was suckless? ;_;

 No.  There  was  only one person pretending go to be suckless because of
 its pseudo Plan 9 heritage.


 Sincerely,

 Christoph Lohmann



Uriel?


[dev] [st] patch to support mouse wheel scrolling

2012-11-06 Thread Brandon Invergo
Gentlemen,

Because, unfortunately, you sometimes have a mouse in your hand...

Here's a patch to add support for buttons 4 and 5 on your mouse (usually
the scroll wheel). Like the keyboard bindings in conf.def.h, you can
choose strings to write to the tty upon pressing these buttons (well,
upon scrolling the wheel, usually). 

The default values that I gave them (\031 and \005) will scroll in
less (and man pages, of course), in screen's copy mode, and in
vim...anything that uses CTRL-Y and CTRL-E to scroll. Obviously these
won't work for Emacs users; for them I would recommend setting them to
\033[A and \033[B, which will move the cursor one line at a time,
eventually scrolling when it reaches the edge of the terminal.

Enjoy,
-brandon

diff -r 19d11014bc63 config.def.h
--- a/config.def.h  Mon Nov 05 04:02:20 2012 +0100
+++ b/config.def.h  Tue Nov 06 19:37:50 2012 +0100
@@ -86,6 +86,10 @@
{ XK_F12,   XK_NO_MOD, \033[24~ },
 };
 
+/* Mouse scrollwheel functions */
+static char button4[] = \031;
+static char button5[] = \005;
+
 /* Internal shortcuts. */
 #define MODKEY Mod1Mask
 
diff -r 19d11014bc63 st.c
--- a/st.c  Mon Nov 05 04:02:20 2012 +0100
+++ b/st.c  Tue Nov 06 19:37:50 2012 +0100
@@ -673,6 +673,10 @@
sel.mode = 1;
sel.ex = sel.bx = x2col(e-xbutton.x);
sel.ey = sel.by = y2row(e-xbutton.y);
+   } else if(e-xbutton.button == Button4) {
+   ttywrite(button4, strlen(button4));
+   } else if(e-xbutton.button == Button5) {
+   ttywrite(button5, strlen(button5));
}
 }
 


Re: [dev] [st] line drawing?

2012-11-06 Thread Roberto E. Vargas Caballero

 I just upgraded my st install to latest tip, and now all the line
 drawing characters (such as in mutt) are a lowercase 'd'.  This
 seems suboptimal.  Older st versions had stuff in config.h for
 configuring these, but that seems gone now.

I just have tested it and it seems work for me. What locale are you using?



Re: [dev] [st] patch to support mouse wheel scrolling

2012-11-06 Thread Carlos Torres
You're not saying that emacs sucks right?

I couldn't resist...
On Nov 6, 2012 1:51 PM, Brandon Invergo bran...@invergo.net wrote:

 Gentlemen,

 Because, unfortunately, you sometimes have a mouse in your hand...

 Here's a patch to add support for buttons 4 and 5 on your mouse (usually
 the scroll wheel). Like the keyboard bindings in conf.def.h, you can
 choose strings to write to the tty upon pressing these buttons (well,
 upon scrolling the wheel, usually).

 The default values that I gave them (\031 and \005) will scroll in
 less (and man pages, of course), in screen's copy mode, and in
 vim...anything that uses CTRL-Y and CTRL-E to scroll. Obviously these
 won't work for Emacs users; for them I would recommend setting them to
 \033[A and \033[B, which will move the cursor one line at a time,
 eventually scrolling when it reaches the edge of the terminal.

 Enjoy,
 -brandon




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

2012-11-06 Thread Alex Hutton
On 7 November 2012 03:00, Christoph Lohmann 2...@r-36.net wrote:


  b...but I though Go was suckless? ;_;


 No.  There  was  only one person pretending go to be suckless because of
 its pseudo Plan 9 heritage.


Which languages qualify as suckless?

Cheers,
Alex


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

2012-11-06 Thread Kai Hendry
On 7 November 2012 09:58, Alex Hutton highspeed...@gmail.com wrote:
 Which languages qualify as suckless?

Have you not noticed http://hg.suckless.org/ ?



Re: [dev] I don't want to live on this planet anymore

2012-11-06 Thread Sébastien Lacombe
In other words,

It's a big difference between the number of lines for a software and the
understanding of the fonction and the operations, and I think it's the
point.

The Suckless meaning, in this perspective, to be easily accessible
to the understanding of anybody, like the principle of unix.

Sébastien Lacombe 

On 2012-11-06, à 20:43:56 -0500, Luis Anaya wrote :
 
 Back in the '90s many companies bragged about the thousands and
 thousands of lines of code in X or Y program. 
 
 You seldom see those nowadays being that announcing the lines of codes is
 equivalent of announcing how much bloat there is in their code. 
 
 Honestly, a good program does not have to be large, but complete (or meet
 requirements) and be useful. 
 
 One thing is for sure, I bet that in his youth, this professor never
 participated in the one line program in BASIC competition that were
 common the days of yore. :)
 
 -- 
 Luis Anaya
 papo anaya aroba hot mail punto com
 Do not use 100 words if you can say it in 10 - Yamamoto Tsunetomo
 



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

2012-11-06 Thread KarlOskar Rikås
C++  Java.
On Nov 7, 2012 2:58 AM, Alex Hutton highspeed...@gmail.com wrote:

 On 7 November 2012 03:00, Christoph Lohmann 2...@r-36.net wrote:


  b...but I though Go was suckless? ;_;


 No.  There  was  only one person pretending go to be suckless because of
 its pseudo Plan 9 heritage.


 Which languages qualify as suckless?

 Cheers,
 Alex



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

2012-11-06 Thread Brandon Invergo
 Which languages qualify as suckless?

Only Brainfuck. Anything more is superfluous.



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

2012-11-06 Thread pmarin
Obviously C. Also you have to love  Xlib, GTK+ and vintage console terminals.

On Wed, Nov 7, 2012 at 2:58 AM, Alex Hutton highspeed...@gmail.com wrote:
 On 7 November 2012 03:00, Christoph Lohmann 2...@r-36.net wrote:


  b...but I though Go was suckless? ;_;


 No.  There  was  only one person pretending go to be suckless because of
 its pseudo Plan 9 heritage.


 Which languages qualify as suckless?

 Cheers,
 Alex



Re: [dev] [st] line drawing?

2012-11-06 Thread Roberto E. Vargas Caballero
 If I switch to Liberation Mono it works.  This is a pretty serious
 regression, since I used to be able to use whatever font I wanted
 without issue.

It is a problem related to the switch to Xft. It impossible a font
has all the unicode glyphs, so if the font fails in a glyph you have a
problem. It is not clear for us how other terminals fix this problem, but
maybe we should add this issue to the TODO list.