Re: [dev] GPL free Linux

2018-11-12 Thread Anthony J. Bentley
Hadrien Lacour writes:
> On Sun, Nov 11, 2018 at 09:43:12PM -0700, Anthony J. Bentley wrote:
> > Markus Wichmann writes:
> > > Why would you do something so pointless? First of all, licences only
> > > matter if you plan on redistribution, so most here won't care. Second,
> > > all the GPL demands is that you distribute the source, which any good
> > > distribution should do, anyway, right?
> >
> > GPL also demands that you not combine the code with GPL-incompatible
> > terms, even if those terms are free themselves. A ridiculous requirement
> > that violates the spirit and practice of free software.
> >
>
> Even if this discussion is pointless, I'll humour the list; attacking the
> methods and not the goal (which is to eradicate proprietary software) without
> proposing an alternative methode is at best fallacious.

The obvious alternative is to use one of the many decades-old licenses
that do in fact allow code to be combined with practically any other
reasonable license. Eradicating proprietary software is far more effort
than it's worth, whereas making it irrelevant is eminently achievable.

> On the other hand, I'd like to ask why would someone use a non copylefted
> license? Almost all the time (especially for applications, not libraries), th
> e
> main reason is intellectual masturbation, not a concrete goal like GPL's one.

The reason I use non-copyleft licenses is so every person and project
using other free licenses can use, copy, modify, and distribute my code.



Re: [dev] GPL free Linux

2018-11-11 Thread Anthony J. Bentley
Markus Wichmann writes:
> Why would you do something so pointless? First of all, licences only
> matter if you plan on redistribution, so most here won't care. Second,
> all the GPL demands is that you distribute the source, which any good
> distribution should do, anyway, right?

GPL also demands that you not combine the code with GPL-incompatible
terms, even if those terms are free themselves. A ridiculous requirement
that violates the spirit and practice of free software.



Re: [dev] [PATCH][blind] alloca #include for BSDs

2018-01-29 Thread Anthony J. Bentley
Nick writes:
> Quoth Yuri: 
> > You should also change your config.mk files to allow external optimization
> > and other flags. For example:
> > 
> > > CFLAGS   = -std=c99 -Wall -pedantic -O2
> > 
> > should be changed to
> > 
> > > CFLAGS   ?= -O2
> > 
> > > CFLAGS   += -std=c99 -Wall -pedantic -O2
> > 
> > This way you can allow externally supplied optimization flags while still
> > being able to add your own flags. Same with CPPFLAGS and LDFLAGS.
>
> I believe the reason suckless projects stick to = rather than += or 
> ?= is that they aren't POSIX / OSI standard. I don't think there's a 
> compelling reason to switch to your syntax, as distribution builders 
> or whoever can still easily see what the CFLAGS were and add to them 
> if they want or need to.

Variables set with = can easily be overridden by packagers simply by
passing them as arguments to make(1).

That's fine for warnings and optimization flags since changing them
doesn't hurt anything. If -std=c99 is necessary for the build, it
shouldn't be in CFLAGS at all for that reason.



Re: [dev] suckless.org TLS / HTTPS support

2017-09-01 Thread Anthony J. Bentley
ilf writes:
> In the current setup, users who type the domain suckless.org into their
> URL get HTTP cleartext. I think these users should get HTTPS.

Just print a big ugly warning over HTTP: "HTTP is not supported. Update
your bookmarks."

It's the only step that will lead people both to change some of their
old links to HTTPS and to keep them from creating new HTTP links.

Automatic redirects are pointless because they don't lead users to
more secure behavior yet can be MITMed.

And if you're going to embrace a flawed-yet-beneficial protocol like 
HTTPS, you might as well go all the way.

-- 
Anthony J. Bentley



Re: [dev] [st] Release planned?

2016-08-11 Thread Anthony J. Bentley
Christoph Lohmann writes:
> Greetings.
> 
> On Thu, 11 Aug 2016 16:17:30 +0200 Paul Menzel  wrote:
> > Dear suckless folks,
> > 
> > 
> > st 0.6 was released in June 2015, that means over a year ago.
> > 
> > Since then, there were another 76 commits included into the master branch.
> > 
> > ```
> > $ git describe --tags origin/master
> > 0.6-76-g308bfbf
> > ```
> > 
> > Are there plans to get release 0.7(?) out, so that users, not building 
> > from repository, but from release source archives, can profit from them?
> 
> There shouldn’t be users not building from the repository.

Ah, there's the suckless lunacy I've missed so much.



Re: [dev] neatroff

2016-08-10 Thread Anthony J. Bentley
Eli Cohen writes:
> I was wondering this. troff is for a lot more than man pages. i did
> notice some man files were included, but there's no way to read them.
> perhaps nroff would be more appropriate for stali, but i don't know of
> a good minimal version.

There's always mandoc. But anti-Unix lack of piping blah blah.

-- 
Anthony J. Bentley



Re: [dev] "Note On Webkit Versions"

2016-05-01 Thread Anthony J. Bentley
Sanel Zukan writes:
> > - FLTK is 100k sloc C++; includes support for Cairo, GL, kitchen sinks
> 
> All these things can be disabled at compile time. Maybe you are not fond
> of C++, but find me portable and usable C UI toolkit without tons of
> dependencies (gtk, I look at you).

libagar?

-- 
Anthony J. Bentley



Re: [dev] [dmenu] versioning and patching

2016-03-14 Thread Anthony J. Bentley
Boruch Baum writes:
> 1] I want to request that dmenu produce 'correct' output for its
> --version command. Currently, the ouput is identical to --help ouput and
> gives no version information at all.

--help and --version give the same output because they're both
invalid options.

-- 
Anthony J. Bentley



Re: [dev] surf release?

2015-06-01 Thread Anthony J. Bentley
7heo writes:
 Suckless comes from suck less. We're not here to settle down on wrong
 solutions.

Suckless has settled on the wrong solutions for years. Case in point:
customizing software by compiling it. How often do you recompile mv, cp
and rm? Even compiling your kernel is something that should be
discouraged. Not because compiling is bad, but because a glut of
features is bad. Customization, knobs, conditional compilation...
all of these things are anti-Unix.

Suckless is full of people who fetishize Unix without understanding it.



Re: [dev] books that rock

2015-04-25 Thread Anthony J. Bentley
Roberto E. Vargas Caballero writes:
 Books that I have in my list of next readings:
 
 - The awk language
 - Software Tools in Pascal, Kernighan and Plauger (I think there is
 a version of this book in C, isn't it?)

You should also include The Elements of Programming Style by
Kernighan  Plauger. My personal favorite computer-related book.

-- 
Anthony J. Bentley



Re: [dev] [style] variable declaration locations and varriable length arrays vs malloc

2015-03-02 Thread Anthony J. Bentley
Evan Gates writes:
 Declaring variables at the top of a block, as opposed to top of the
 function has a few uses, but the most useful (in my limited
 experience) is combining it with C99's variable length arrays to
 create buffers without calls to malloc/free. For example:
 
 while ((d = readdir(dp))) {
 char buf[strlen(path) + strlen(d-d_name) + 1];
 
 }

VLAs are a fundamentally broken feature because they do not allow any
error checking. alloca() is the same.

-- 
Anthony J. Bentley



Re: [dev] [dmenu] [PATCHES 1-5] Changes and cleanup

2014-12-23 Thread Anthony J. Bentley
Dimitris Papastamos writes:
 On Tue, Dec 23, 2014 at 04:11:16PM +0100, k...@shike2.com wrote:
  
   The style(9)-changes were absolutely necessary and it's better to do thi
 s
   as early as possible instead of waiting and waiting until it's too late
   and you have a really big number of patches for a given program.
   
   The thing I dislike most about the style changes is the alignment of
   variable and function definitions, and the reason I don't like
   alignment-based definitions is because the moment you need to add a new
   variable or function that has a column that's one character longer than
   the existing definitions, you end up with a diff that modifies a bunch
   of a lines that are not necessarily related to the new feature.
   
  
  I agree with Eric here. I don't see the point of variables alignment.

The point of this rule is not visual alignment. Width of the type doesn't
matter; it is always one tab. The advantage is that you can find the
declaration of member foo by grepping for ^Ifoo.

Similarly, the function name at beginning of line rule is so you can
find the bar() function definition by grepping for ^bar(.

-- 
Anthony J. Bentley



Re: [dev] GCC situation

2014-11-24 Thread Anthony J. Bentley
Dmitrij D. Czarkoff writes:
 I believe it is not actively developed for several years, and it seems
 to have lost its momentum.

It's certainly not active, but neither is it completely dead. Actually,
they just branched a new release beta.

http://marc.info/?l=pcc-listm=141612991809812w=2

Another interesting C project is libfirm+cparser.

-- 
Anthony J. Bentley



Re: [dev] rebooting the web (it was: surf rewrite for WebKit2GTK)

2014-10-31 Thread Anthony J. Bentley
FRIGN writes:
 On Fri, 31 Oct 2014 20:04:58 +0100
 Alexandre Niveau alexandre.niv...@gmail.com wrote:
  !DOCTYPE html
  meta charset=UTF-8
  titlePage title/title
  pHello world/p
 
 This is not valid XHTML.

Then that’s XHTML’s deficiency. This has been valid HTML (except the
doctype) for over 15 years. There’s no ambiguity either; all XML would
do is add redundant elements.

  I'd say it's hard to suck less than that as far as HTML goes...
 
 Well, look at what XHTML 2.0 tried to achieve (it was a step in the
 right direction). I'll never use HTML5 for the simple reason that
 it's a bloated hell. So you better not insult the suckless-philosophy
 with some HTML5-smartness.

HTML is hardly what I would call a good language. But XHTML is no better.
Talk about bloat—xslt? seriously? HTML, in practice, is simpler and saner
than XHTML.

  Also it's worth noting that while it's still recommended to keep the 
  meta charset tag in there, using any encoding other than UTF-8 is 
  invalid HTML5 [3].
 
 No, read your link again. It was talking about XML-documents, which
 actually declare the charset in a sane place (at the bloody beginning).

The sane place is the HTTP header. Well, saner would be to assume UTF-8
by default, but this is the next best option.

  I believe that all these simplifications do not break backwards 
  compatibility too much (that's the whole point), but I'm not certain. 
  Maybe that's the reason why you still have to use XHTML?
 
 Have to? XHTML is my weapon of choice, because it is not parsed with
 a stupid and bloated SGML-parser but with an XML-parser.

Come on. HTML hasn’t been parsed as SGML since the early 90s.

HTML5 has been some steps forward and some steps back. But one of the
unambiguously good things they did was drop any pretense of SGML
compatibility, and introduce well‐defined error handling rules (instead
of the XML practice of dropping things on the floor as soon as it sees
a missing angle bracket).

Talk about error handling. What should happen when you get some mojibake
in UTF-8 output? Obviously you should replace with U+FFFD and continue
as normal, like everything else does. But XML will terminate processing
right there… if you’re lucky. More likely, you’ll see a pretty yellow
screen of death and zero meaningful content. What a robust technology to
base the suckless world on.

The real disgusting parts of HTML5 are CSS and Javascript, and the XML
bits that are seeping in, like MathML. An XHTML world would embrace
those, or replace them with alternatives that are even worse.

XML is just SGML with a little air freshener sprayed over it.

-- 
Anthony J. Bentley



Re: [dev] rebooting the web (it was: surf rewrite for WebKit2GTK)

2014-10-31 Thread Anthony J. Bentley
Dmitrij D. Czarkoff writes:
 Sorry for replying to single message with two.
 
 Anthony J. Bentley said:
  HTML5 has been some steps forward and some steps back. But one of the
  unambiguously good things they did was drop any pretense of SGML
  compatibility, and introduce well‐defined error handling rules (instead
  of the XML practice of dropping things on the floor as soon as it sees
  a missing angle bracket).
 
 IMO this is the worst thing about HTML currently.  There may be only
 three possible rules for sane markup language:
 
  * drop offendig subtree,
  * abort rendering on first error or
  * replace malformed document with warning.

How many Unix tools behave this way? Does grep abort upon encountering
invalid UTF-8 sequences in a file? No. Does troff abort rendering on
invalid macro usage? Practically never.

-- 
Anthony J. Bentley



Re: [dev] surf rewrite for WebKit2GTK

2014-10-26 Thread Anthony J. Bentley
F Hssn writes:
 On Sun, Oct 26, 2014 at 12:34 AM, Andrew Hills ahi...@ednos.net wrote:
  On 10/25/14 13:41, F Hssn wrote:
 
  Following suckless's minimal philosophy, I'd be interested to find out
  ... snip ...
  latest webkit.
 
 
  Do you really want to write your own Javascript engine?
 
 
 Well, I hadn't thought of that but now that you mentioned, I
 downloaded v8 and spidermonkey sources, 0.5 vs 1.2 million (both
 mostly C++). Then in v8 I noticed it has directories for architectures
 like arm arm64 mips mips64 ia32. I removed those directories and left
 only x87 and x64 and ended up with 333k, with 223k lines of C++ source
 files.
 
 To answer your question, I guess it comes down to how much time I have
 (as always) which is, not much. But I would definitely like some
 suckless cleanup in this direction, just like in other directions.

Duktape isn't perfect but it's at least within the realm of sanity:
http://duktape.org/

-- 
Anthony J. Bentley



Re: [dev] Introducing the imagefile-format

2014-07-28 Thread Anthony J. Bentley
FRIGN writes:
 The only reason I used ntohl() and htonl() here is
 the fact they're POSIX, and endian.h isn't.

Isn't yet... http://austingroupbugs.net/view.php?id=162

-- 
Anthony J. Bentley



Re: [dev] Why do you use tmux/screen?

2014-07-01 Thread Anthony J. Bentley
Dimitris Zervas writes:
 Hello,
 
 After a year or so in the list, I think each and every one is using tmux or
 screen (I think more tmux, but do not start a war please, that's not the
 subject).
 Why is that?

I use tmux with ii for IRC. I was tired of always confusing the irssi and
tmux keybindings, so I removed irssi from the equation. One window per
channel, with one pane running tail -f and the other redirecting text to
stdin. Now I only have one set of keybindings to memorize.

-- 
Anthony J. Bentley



Re: [dev] suckless distro

2014-06-25 Thread Anthony J. Bentley
Sylvain BERTRAND writes:
 Using a makefile is overkill. Should be a sh script.
 
 Makefiles should be used only when there are too many source
 files to recompile for a build increment.

For an opinion that matters, try Kernighan  Pike (The Unix Programming
Environment, pg. 241):

  It's a nuisance to have to type two commands to compile a new version of
  [our example]. Although it's certainly easy to make a shell file that does
  the job, there's a better way, one that will generalize nicely later on
  when there is more than one source file in the program. ...

  make is most useful when the program being created is large enough to be
  spread over several source files, but it's handy even for something as
  small as [our example].

In other words, one advantage that make provides is a simple interface for
building any program, whether small or large. Said interface should not
come at the cost of complexity, but good makefiles are simple anyway (the
one in their example is two lines).

-- 
Anthony J. Bentley



Re: [dev] reboot, arrow in the knee because of the GNU GPL???

2014-06-25 Thread Anthony J. Bentley
Sylvain BERTRAND writes:
 I firmely disagree with you on this: the event of somebody hurt
 by the GNU GPL with real life facts is of highest importance for
 all open source coders. And communication would have been
 an enrichment for the suckless community.
 The thread will die because I think those facts do not exist.

You have already been provided with the classical case, which you immediately
dismissed as biased, no reason given. Other real-world examples, like the
gratuitous incompatibility of different GPL versions as in LibreDWG or Samba,
have been brought up on this list in previous discussions.

-- 
Anthony J. Bentley



Re: [dev] reboot, arrow in the knee because of the GNU GPL???

2014-06-25 Thread Anthony J. Bentley
Sylvain BERTRAND writes:
 On Wed, Jun 25, 2014 at 09:32:33PM -0600, Anthony J. Bentley wrote:
  Sylvain BERTRAND writes:
  I firmely disagree with you on this: the event of somebody hurt
  by the GNU GPL with real life facts is of highest importance for
  all open source coders. And communication would have been
  an enrichment for the suckless community.
  The thread will die because I think those facts do not exist.
  
  You have already been provided with the classical case, which you immediate
 ly
  dismissed as biased, no reason given. Other real-world examples, like the
  gratuitous incompatibility of different GPL versions as in LibreDWG or Samb
 a,
  have been brought up on this list in previous discussions.
 
 I heard about GNU GPL version wars, was only aware of the benign
 Linus T. one.
 
 Let me laught:
 Do you really think a GNU GPL version war can reasonnably
 compensate the defect of code closing from MIT/BSD-like licenses.

Yes.

-- 
Anthony J. Bentley



Re: [dev] [surf] WebKit1 deprecated

2014-05-29 Thread Anthony J. Bentley
Nick writes:
 Quoth YpN: 
  About netsurf, yeah why not. But it lacks some properties IMHO.
  One of my friend tried to run a CSS2 website from me and the support
  was horrible, despite the care applied to the code.
  CSS2 support isn't complete.
 
 Probably. There isn't javascript support yet, either (though they're 
 working on it).

Current released versions do support using libmozjs-1.8.5. I can't
speak to how well it works, having never enabled it. No doubt it is
incomplete, but it might be in a usable state.

-- 
Anthony J. Bentley



Re: [dev] [GENERAL] License manifest

2014-05-12 Thread Anthony J. Bentley
Amadeus Folego writes:
 Hi there,
 
 I just noticed most of suckless projects use the MIT License, and I just
 wondered if there was any place on the suckless wiki that stated why
 this was preferred, but found none.
 
 So I thought that maybe this was something largely discussed already and
 searched on the mailing list archives but found nothing as well.
 
 So, given this context, is there any manifesto about this particular License
 choice? E.G is there a reason to avoid GPL?

If your license does not fit in a page, it is a poor license.

$ wc -w * | sort -n
  73 wtfpl
 118 isc
 155 zlib
 171 mit
 197 unlicense
 221 bsd
 978 cc0
1234 lgpl3
1577 apache2
1965 cc-by
2154 cc-by-sa
2968 gpl2
4372 lgpl2.1
5214 gpl3
5535 agpl3
   26932 total

Personally, I stick with ISC.

-- 
Anthony J. Bentley



Re: [dev] [GENERAL] License manifest

2014-05-12 Thread Anthony J. Bentley
Christoph Lohmann writes:
 On Mon, 12 May 2014 18:18:37 +0200 FRIGN d...@frign.de wrote:
  Well, let's take a look at the GPL first: It's a strict free software
  license, which means that it doesn't permit incorporating or even
  linking a GPL-software without publishing the software itself under a
  free software license and/or ship the software with the source-code
  used.
  We at suckless agreed that there should be the freedom for everyone to
  use the software in proprietary software as well.
  That's why the GPL is often considered harmful, as it inhibits the free
  flow of knowledge and often leads to complete rewrites of software,
  just because the authors are pissed off by it.

Not just people who dislike it. Even GPL lovers have to rewrite their
software due to the GPL.

Example: LibreCAD, a fork of QCad, which had been relicensed by the
authoring company under the GPLv2. LibreCAD wanted to support AutoCAD's
DWG file format. Unluckily for them, LibreDWG (a FSF project) is licensed
GPLv3+, and the FSF refused to relicense. The GPL made the code so free
they couldn't use it.

Example: the SMB implementations in Samba (GPLv3+) and the Linux kernel
(GPLv2), which literally cannot share even a single line of code. It's
really fascinating that people seem to love the idea of a license that is
so easily made incompatible with _itself_.

 And, as OpenSSL shows, corporate assholes never really give back.
 With the GPL you at least get their crown jewels, if they piss you off.

Yeah, ask Landley how much useful code Busybox got out of all those lawsuits.
Corporations are terrible at writing code. We don't want their garbage.

-- 
Anthony J. Bentley



Re: [dev] [GENERAL] License manifest

2014-05-12 Thread Anthony J. Bentley
Christoph Lohmann writes:
 Greetings.
 
 On Mon, 12 May 2014 22:02:57 +0200 Anthony J. Bentley anth...@cathet.us w
 rote:
  Christoph Lohmann writes:
   On Mon, 12 May 2014 18:18:37 +0200 FRIGN d...@frign.de wrote:
Well, let's take a look at the GPL first: It's a strict free software
license, which means that it doesn't permit incorporating or even
linking a GPL-software without publishing the software itself under a
free software license and/or ship the software with the source-code
used.
We at suckless agreed that there should be the freedom for everyone to
use the software in proprietary software as well.
That's why the GPL is often considered harmful, as it inhibits the free
flow of knowledge and often leads to complete rewrites of software,
just because the authors are pissed off by it.
  
  Not just people who dislike it. Even GPL lovers have to rewrite their
  software due to the GPL.
  
  Example: LibreCAD, a fork of QCad, which had been relicensed by the
  authoring company under the GPLv2. LibreCAD wanted to support AutoCAD's
  DWG file format. Unluckily for them, LibreDWG (a FSF project) is licensed
  GPLv3+, and the FSF refused to relicense. The GPL made the code so free
  they couldn't use it.
 
 At  least  this allows a viral spreading of the license. It could be the
 major factor for its survival strategy.

What allows the GPL to survive are the mindless legions who use it, taking
rms' words as gospel, who do not think critically about what software
freedom means.

If people would think critically, they would realize that a man who uses
and advocates nonfree licenses like the GFDL and CC NoDeriv is ideologically
inconsistent, and his 5000-word preferred license should not be trusted
without manual review.

OpenBSD has done more for freedom by releasing free software under free
licenses, developing and promoting patent-free protocols like CARP, and
reverse-engineering wireless drivers. As a philosophy, shut up and hack
is just better. And the advantage of a license that is as simple as:

   Permission to use, copy, modify, and distribute this software for any
   purpose with or without fee is hereby granted, provided that the above
   copyright notice and this permission notice appear in all copies.

is self-evident.

-- 
Anthony J. Bentley



Re: [dev] [GENERAL] License manifest

2014-05-12 Thread Anthony J. Bentley
 your employer (if you work as a programmer) or school,
if any, to sign a copyright disclaimer for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
http://www.gnu.org/licenses/.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
http://www.gnu.org/philosophy/why-not-lgpl.html.


I bask in the simplicity of the GPL. I just don't understand how people
keep claiming that licenses like this one could be simpler:


Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.


Clearly, the GPL is just as simple to understand and explain to others
as a permissive license. After all, copyright law is complex.

-- 
Anthony J. Bentley



Re: [dev] [GENERAL] License manifest

2014-05-12 Thread Anthony J. Bentley
Nick writes:
 Quoth Anthony J. Bentley:
  Nick writes:
   GPL is nearly as conceptually simple as permissive licenses, I 
   think.
 
  ...
  
  Clearly, the GPL is just as simple to understand and explain to others
  as a permissive license. After all, copyright law is complex.
 
 I don't think you read what I wrote carefully. I was using the word 
 conceptual to separate the general meaning of the license with its 
 legal implementation, which I fully agree is (probably needlessly) 
 long and tedious (hence why I mentioned Fontana's recent simple 
 version as a nice thing).

To separate the general meaning of the license with its legal
implementation is ridiculous. The legal implementation is the only part
that matters.

This is the main failing of Creative Commons. Who can explain the difference
between CC BY-SA 3.0 and CC BY-SA 4.0? Between ported and unported? Even the
Creative Commons website states on every license page:

  This is a human-readable summary of (and not a substitute for) the license.

Who has actually read the Creative Commons licenses? Who has read the GPL?
Summaries and general concepts are pointless because they are not what is
legally in effect. The only sensible license is one that is so simple that
it needs no summary.

-- 
Anthony J. Bentley



Re: [dev] tiny pdf viewer (with vim key shortcuts)

2014-05-01 Thread Anthony J. Bentley
patrick295767 patrick295767 writes:
 What about a lightweight pdf viewer for giving talks ?
 
 I am now modifying and  recompiling xpdf. It is quite a light pdf viewer.
 
 You plug your Linux box, and give a great talk ;) !

MuPDF is nice but has a disgusting license (AGPL).



Re: [dev] Optimizing C compiler c++ compiler/runtime

2013-12-20 Thread Anthony J. Bentley
On Fri, Dec 20, 2013 at 5:49 AM, Sylvain BERTRAND sylw...@legeek.net wrote:
 There is also the question of finding a new C99 optimizing
 compiler written properly in C of course.

 tinycc is interesting. It would require just a few basic
 optimization passes to make it a reasonable alternative to gcc.

 There is also the openwatcom compiler.

 Anything else?

I’ve been curious about libfirm and cparser but haven't looked at them
closely yet.

“Firm is a C-library that provides a graph-based intermediate
representation, optimizations, and assembly code generation suitable
for use in compilers.”

http://pp.info.uni-karlsruhe.de/firm/

“cparser is a library containing a parser, lexer and semantic analysis
for the ISO C99 language. It should be used as a compiler frontend, a
base for source-source transformation, or source-checker tools.”

http://sourceforge.net/projects/cparser/

-- 
Anthony J. Bentley



Re: [dev] [st] problem reading man pages

2013-05-21 Thread Anthony J. Bentley
G David Modica writes:
 Hi, 
 
 I just noticed that man pages are not rendered properly under st-0.4.1 tip.
 For example in man st the SYNOPSYS line shows as:
st  [-a]  [-c   ] [-f ] [-g ] [-o ] [-t  ] [-w
  ] [-v] [-e...]
 
 st-0.3 shows the line as:
st  [-a]  [-c  class] [-f font] [-g geometry] [-o file] [-t title] [-w
  windowid] [-v] [-e command...]  (actually class, font, etc are all underline
 d)
 
 xterm shows the same thing.
 
 Is there a bug in st-0.4.1 or have I mis-configured something?

Would be helpful to specify what program generates your manpages. Manuals look
fine here with st tip and mandoc...

-- 
Anthony J. Bentley



Re: [dev] [st] problem reading man pages

2013-05-21 Thread Anthony J. Bentley
G David Modica writes:
 On 19:01 Tue 21 May , Anthony J. Bentley wrote:
  Would be helpful to specify what program generates your manpages. Manuals l
 ook
  fine here with st tip and mandoc...
 
 
 No idea how man pages are generated.  I am running Archlinux.  Any idea how I
  can tell how they are generated?

man man

look for the config file...

-- 
Anthony J. Bentley



Re: [dev] [st] [PATCH] 8bit-meta like xterm

2013-04-23 Thread Anthony J. Bentley
Thorsten Glaser writes:
 I think it is easier a compose key, which allows you define non ascii
 characteres using keystrokes (compose-key ' a - á). This is the solution
 use in my USA keyboard and could generate spanish accents.
 
 Sure, that works too, and I use it for things like ① but Compose
 takes three keystrokes (up to five) sequentially, while Meta takes
 two or three in parallel (the “up to” is the shift key).

Well, you can define multiple compose keys to make things easier. I used
to have ' ` ^ generate dead accents, so I could get most accented characters
in just two keystrokes (e.g., ' e → é), while using the compose key for
other things (math symbols, typography, Greek letters…). I don’t do that
anymore, since typing ' ' to get a single ' is too hard to get used to.

 The nice thing about ASCII and the QWERTY layout is that it has
 all ASCII characters easily available, so you can enter *all*
 latin1-subset-of-Unicode characters with just it.

I can appreciate that but memorizing the layout of ISO-8859-1 to do it
seems arcane. The mnemonics I define for compose are easier (if a bit
slower to type), and even the X11 defaults aren’t too bad.

-- 
Anthony J. Bentley



Re: [dev] ST 0.4 and OpenBSD 5.2

2013-04-19 Thread Anthony J. Bentley
Gregor Best writes:
 I'm on OpenBSD -current at the moment and the latest git HEAD of st compiles
 with the following patch:
 
   diff --git a/config.mk b/config.mk
   index 88355c7..f1a24d7 100644
   --- a/config.mk
   +++ b/config.mk
   @@ -26,3 +26,4 @@ LDFLAGS += -g ${LIBS}
# compiler and linker
CC ?= cc
   
   +CFLAGS += -I/usr/X11R6/include/freetype2

That's because the st makefiles use $(shell ...) which is a GNUism.

Here is a patch that fixes it:


diff --git a/config.mk b/config.mk
index 88355c7..4d0a869 100644
--- a/config.mk
+++ b/config.mk
@@ -12,11 +12,11 @@ X11LIB = /usr/X11R6/lib
 
 # includes and libs
 INCS = -I. -I/usr/include -I${X11INC} \
-   $(shell pkg-config --cflags fontconfig) \
-   $(shell pkg-config --cflags freetype2)
+   `pkg-config --cflags fontconfig` \
+   `pkg-config --cflags freetype2`
 LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lutil -lXext -lXft \
-   $(shell pkg-config --libs fontconfig)  \
-   $(shell pkg-config --libs freetype2)
+   `pkg-config --libs fontconfig`  \
+   `pkg-config --libs freetype2`
 
 # flags
 CPPFLAGS = -DVERSION=\${VERSION}\ -D_BSD_SOURCE -D_XOPEN_SOURCE=600



Re: [dev] ST 0.4 and OpenBSD 5.2

2013-04-19 Thread Anthony J. Bentley
Christoph Lohmann writes:
 Greetings.
 
 On Fri, 19 Apr 2013 21:11:22 +0200 Anthony J. Bentley anth...@cathet.us w
 rote:
  That's because the st makefiles use $(shell ...) which is a GNUism.
 
 I’ve applied your patch. Thanks.
 
 Shouldn’t using GNUisms then provide a meaningful error when they appear
 on BSD make?

Some do. That particular one doesn't.

-- 
Anthony J. Bentley



Re: [dev] [st] Segmentation fault when clicking the top of window

2013-03-24 Thread Anthony J. Bentley
Markus Teich writes:
 Since i am currently working on a debugging tool, i would very much 
 like to reproduce this bug.

I can reproduce this on OpenBSD -current with st-0.3.

$ ldd `which st`
/usr/local/bin/st:
StartEnd  Type Open Ref GrpRef Name
156e5c60 156e5ca0f000 exe  10   0  /usr/local/bin/st
157068525000 157068a56000 rlib 04   0  
/usr/X11R6/lib/libX11.so.15.1
15705d6ca000 15705dad5000 rlib 01   0  
/usr/lib/libutil.so.11.4
15705e2d6000 15705e6e7000 rlib 01   0  
/usr/X11R6/lib/libXext.so.12.0
15705dad5000 15705dee8000 rlib 01   0  
/usr/X11R6/lib/libXft.so.8.0
15705ff6c000 1570603af000 rlib 02   0  
/usr/X11R6/lib/libfontconfig.so.8.0
15706ab84000 15706b06c000 rlib 01   0  
/usr/lib/libc.so.66.2
15705ec3d000 15705f05b000 rlib 04   0  
/usr/X11R6/lib/libxcb.so.2.4
157069adf000 157069f03000 rlib 02   0  
/usr/lib/libexpat.so.10.0
157069655000 157069adf000 rlib 02   0  
/usr/X11R6/lib/libfreetype.so.19.0
15705d1b6000 15705d5cb000 rlib 02   0  
/usr/lib/libz.so.4.1
157062dbb000 1570631c4000 rlib 01   0  
/usr/X11R6/lib/libXrender.so.5.0
157068a56000 157068e58000 rlib 02   0  
/usr/X11R6/lib/libpthread-stubs.so.1.0
157067ed6000 1570682d9000 rlib 01   0  
/usr/X11R6/lib/libXau.so.9.0
1570631c4000 1570635c9000 rlib 01   0  
/usr/X11R6/lib/libXdmcp.so.10.0
15706a60 15706a60 rtld 01   0  
/usr/libexec/ld.so

full backtrace attached.

-- 
Anthony J. Bentley
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as amd64-unknown-openbsd5.3...
(gdb) run
Starting program: /usr/local/bin/st 
[New process 3477]

Program received signal SIGSEGV, Segmentation fault.
0x16f6ed5090c4 in brelease (e=) at st.c:801
801 term.dirty[sel.ey] = 1;
(gdb) bt full
#0  0x16f6ed5090c4 in brelease (e=) at st.c:801
now = {tv_sec = 140187732356736, tv_usec = 4294967295}
#1  0x16f6ed5062a2 in run () at st.c:2787
ev = {type = 5, xany = {type = 5, serial = 90, send_event = 0, 
display = 0x16f8f25cb000, window = 31457281}, xkey = {type = 5, 
serial = 90, send_event = 0, display = 0x16f8f25cb000, window = 31457281, 
root = 120, subwindow = 0, time = 560361752, x = 243, y = -1, 
x_root = 876, y_root = 433, state = 256, keycode = 1, same_screen = 1}, 
  xbutton = {type = 5, serial = 90, send_event = 0, display = 0x16f8f25cb000, 
window = 31457281, root = 120, subwindow = 0, time = 560361752, x = 243, 
y = -1, x_root = 876, y_root = 433, state = 256, button = 1, 
same_screen = 1}, xmotion = {type = 5, serial = 90, send_event = 0, 
display = 0x16f8f25cb000, window = 31457281, root = 120, subwindow = 0, 
time = 560361752, x = 243, y = -1, x_root = 876, y_root = 433, 
state = 256, is_hint = 1 '\001', same_screen = 1}, xcrossing = {type = 5, 
serial = 90, send_event = 0, display = 0x16f8f25cb000, window = 31457281, 
root = 120, subwindow = 0, time = 560361752, x = 243, y = -1, 
x_root = 876, y_root = 433, mode = 256, detail = 1, same_screen = 1, 
focus = 11584256, state = 3271602371}, xfocus = {type = 5, serial = 90, 
send_event = 0, display = 0x16f8f25cb000, window = 31457281, mode = 120, 
detail = 0}, xexpose = {type = 5, serial = 90, send_event = 0, 
display = 0x16f8f25cb000, window = 31457281, x = 120, y = 0, width = 0, 
height = 0, count = 560361752}, xgraphicsexpose = {type = 5, serial = 90, 
send_event = 0, display = 0x16f8f25cb000, drawable = 31457281, x = 120, 
y = 0, width = 0, height = 0, count = 560361752, major_code = 0, 
minor_code = 243}, xnoexpose = {type = 5, serial = 90, send_event = 0, 
display = 0x16f8f25cb000, drawable = 31457281, major_code = 120, 
minor_code = 0}, xvisibility = {type = 5, serial = 90, send_event = 0, 
display = 0x16f8f25cb000, window = 31457281, state = 120}, 
  xcreatewindow = {type = 5, serial = 90, send_event = 0, 
display = 0x16f8f25cb000, parent = 31457281, window = 120, x = 0, y = 0, 
width = 560361752, height = 0, border_width = 243, 
override_redirect = -1}, xdestroywindow = {type = 5, serial = 90, 
send_event = 0, display = 0x16f8f25cb000, event = 31457281, window = 120}, 
  xunmap = {type = 5, serial = 90, send_event = 0, display = 0x16f8f25cb000, 
event = 31457281, window = 120, from_configure = 0}, xmap = {type = 5

Re: [dev] Adding utmpx stuff

2012-10-09 Thread Anthony J. Bentley
Roberto E. Vargas Caballero writes:
   This patch adds utmpx support in st, which means that st sessions
 will be visible using who or, who is the correct behaviour of a terminal
 emulator, but this means that the binary needs have setgid, which is
 something we have to thing carefully.
 
 Other important about this patch is the portability of it. I have
 used the POSIX definitions, but as far as I know, there are some BSD that
 don't support very well this functions (specially OpenBSD).

In case anyone is curious why utmpx is not in OpenBSD, it's in the archives:
http://marc.info/?l=openbsd-techm=127910804900619w=2

--
Anthony J. Bentley



Re: [dev] New friends

2012-07-31 Thread Anthony J. Bentley
Christoph Lohmann writes:
 Greetings comrades,
 
 in  our reckless effort to improve the software world a new friend might
 have appeared [0].
 
 
 Sincerely,
 
 Christoph Lohmann
 
 [0] http://klang.eudyptula.org/
 

Funny, considering OpenBSD's sndio interface[1] goes the opposite route and
moves audio to userland. I'm curious how the two compare.

--
Anthony J. Bentley

[1] http://www.openbsd.org/porting/audio-port.html



Re: [dev] sbase TODO patch

2012-02-10 Thread Anthony J. Bentley
Paul Onyschuk writes:
 On Fri, 10 Feb 2012 07:52:54 -0500
 Kurt H Maier khm-suckl...@intma.in wrote:
 
  
  out of curiosity, can someone explaing the #ifndef/#if nightmare that
  is occurring in this file?
  
 
 RCS markers (RCSid) are wrapped inside #ifdef to avoid spitting out
 compiler warnings, when they aren't used. You can find RCS markers
 everywhere inside *BSD repositories (I can speak about OpenBSD and
 NetBSD source code I'm familiar with). If you don't plan to use them,
 you can remove them safely.

Most of them were stripped out of OpenBSD a couple years ago. The
commit message by deraadt:

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable).  these days, people use source.  these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)

--
Anthony J. Bentley



Re: [dev] network usage graphs

2011-12-24 Thread Anthony J. Bentley
On 12/24/11, Szabolcs Nagy n...@port70.net wrote:
 * hiro 23h...@googlemail.com [2011-12-24 02:00:47 +0100]:
 Deleting the first line of my log is currently done with sed 1d
 original.dattemp; mv temp original.dat. Is there no better way?

 sed -i 1d original.dat

That’s a GNUism.



Re: [dev] Re: sbase

2011-06-09 Thread Anthony J. Bentley
On Thu, Jun 9, 2011 at 6:58 PM, Connor Lane Smith c...@lubutu.com wrote:
 On 9 June 2011 13:40, stateless statel...@archlinux.us wrote:
 Attached cmp.c and cmp.1.

 Thanks! I'm also not bothering with '-', so I took that out, which
 meant we could simplify the code a lot.

Don’t we have /dev/stdin for that anyway?

--
Anthony J. Bentley



Re: [dev] suckless wget/curl

2011-05-27 Thread Anthony J. Bentley
On Fri, May 27, 2011 at 3:49 PM, ilf i...@zeromail.org wrote:
 Since I can't be the first to realize that, is there already a suckless
 alternative for simple HTTP/FTP data transfer?

NetSurf uses curl, but wants to get rid of it. It might be worth:
a) looking at their plans for a fetch implementation, or
b) if there is already a suckless one, pointing it out to them so they
can use it.

I don’t think they have implemented anything yet.

--
Anthony J. Bentley



Re: [dev] Re: Version control for Sta.li

2011-03-20 Thread Anthony J. Bentley
  I just found a version control system that I hadn't heard of and might wo
 rk well for Stali: Fossil.  It's by the author of SQLite

Here’s an interview with the author.
http://cisx1.uma.maine.edu/~wbackman/bsdtalk/bsdtalk194.ogg

Word in the grapevine is that NetBSD is switching to it.



Re: [dev] browser flash videos and mpeg plugins

2011-02-26 Thread Anthony J. Bentley
 has anyone noticed that within the last few weeks, sites no longer establish
 a /tmp/FlashX* file?  I used to pause the in-browser and run mplayer on that
 file since mplayer works better; but now what am I to do?

Newer versions of Flash delete the file immediately, but the file is
still open in memory and you can grab it from there.

--
Anthony J. Bentley



Re: [dev] browser flash videos and mpeg plugins

2011-02-26 Thread Anthony J. Bentley
  Newer versions of Flash delete the file immediately, but the file is
  still open in memory and you can grab it from there.
 
 How?

In the comments at
http://www.omgubuntu.co.uk/2010/09/saving-flash-videos-in-linux-tmp-no-longer-works/

Disclaimer: it’s a search result, I haven’t tried it, don’t trust
random scripts from the Internet, read it through first…

--
Anthony J. Bentley



Re: [dev] Stripping html from email

2010-08-23 Thread Anthony J. Bentley
 Is there currently a tool or script that I can use to strip html
 from emails?  Basically, it should work like this:
 
 - Read the message from stdin
 - If there is no html, leave as is
 - If it finds both html and plain text, strip the html attachment
 - If it finds html but no plain text, leave as is
 
 In case something like this doesn't exist, I wouldn't mind writing
 one for myself (awk sounds like the right tool for the job).

It’s not quite what you’re asking for, but I have nmh set up like this:
mhshow-show-text/html: lynx -dump %F | less

Lynx sucks but it sorta works well enough here, I guess.



[dev] st on OpenBSD?

2010-08-22 Thread Anthony J. Bentley
Hi guys,

I am interested in using st on OpenBSD, but it does not compile since
OpenBSD does not implement posix_openpt et al:

st.c: In function 'ttynew':
st.c:243: warning: implicit declaration of function 'posix_openpt'
st.c:245: warning: implicit declaration of function 'grantpt'
st.c:247: warning: implicit declaration of function 'unlockpt'
st.c:249: warning: implicit declaration of function 'ptsname'
st.c:249: warning: assignment makes pointer from integer without a cast
st.c:253: error: 'O_NDELAY' undeclared (first use in this function)
st.c:253: error: (Each undeclared identifier is reported only once
st.c:253: error: for each function it appears in.)
*** Error code 1

It looks like there was once effort to make it work[1] but I don’t
guess it’s still in… any advice?

1: http://lists.suckless.org/dwm/0806/6070.html



Re: [dev] Re: stali and OpenBSD userland etc.

2010-04-10 Thread Anthony J. Bentley
On Sat, Apr 10, 2010 at 06:26:12PM +0200, finkler wrote:
 What is missing in OBSD:
 base64
It's not quite the same, but OpenBSD does have b64encode/b64decode.
Part of uuencode I believe.

--Anthony J. Bentley



Re: [dev] [sw] Suckless web-framework

2010-04-05 Thread Anthony J. Bentley
On Mon, Apr 05, 2010 at 11:38:42AM +, Connor Lane Smith wrote:
 Websites like this are extremely difficult to parse. Is this p the
 end of a paragraph or the beginning? Let's test both! In making your
In case it's not clear: implicit end tags are _valid_ html, and
completely unambiguous. E.g., pp will _always_ be interpreted as
p/pp/p, never pp/p/p. I don't see how it's unclear,
either -- you can't have a p (or ul or table) nested within a p
anyway, so it's not hard to interpret.

 But what if we at Suckless were to attempt to write an HTML parser (oh
This reminds me -- has anyone used hubbub? I'd love an excuse to make
a project with it.

--Anthony J. Bentley