Re: [dev] Question about arg.h

2013-11-05 Thread Chris Down
On 2013-11-06 06:38:23 +0100, Christoph Lohmann wrote:
> You have nothing to say, I guess.

What does it make you feel that I do not append a salutation and closing
to this e-mail? Does it bother you in any way? If so, why? If not, why
should I do so?


pgpFwshGOPNWT.pgp
Description: PGP signature


Re: [dev] Question about arg.h

2013-11-05 Thread Christoph Lohmann
Greetings.

On Wed, 06 Nov 2013 06:38:23 +0100 Chris Down  wrote:
> Good gribbly greetings my good chum,
> 
> On 2013-11-05 21:38:35 +0100, Alexander Huemer wrote:
> > P.S. I passionately hate people who top-post, don't give enough details 
> > and cannot say hi or bye in an email.
> 
> Having to prepend a salutation to every message, and then a goodbye
> message and your name is totally redundant. Unless I'm contacting you
> for business reasons, don't expect me to use them.
> 
> Applying real life social etiquette to e-mail is absolute nonsense, and
> should be challenged wherever its seen. Be terse, but communicate
> effectively. I do not believe in capital punishment, but due to many
> people's e-mail signatures exceeding a single line (or existing at all),
> I am considering changing my stance.

You have nothing to say, I guess.


Sincerely,

Christoph Lohmann




Re: [dev] Question about arg.h

2013-11-05 Thread Chris Down
Good gribbly greetings my good chum,

On 2013-11-05 21:38:35 +0100, Alexander Huemer wrote:
> P.S. I passionately hate people who top-post, don't give enough details 
> and cannot say hi or bye in an email.

Having to prepend a salutation to every message, and then a goodbye
message and your name is totally redundant. Unless I'm contacting you
for business reasons, don't expect me to use them.

Applying real life social etiquette to e-mail is absolute nonsense, and
should be challenged wherever its seen. Be terse, but communicate
effectively. I do not believe in capital punishment, but due to many
people's e-mail signatures exceeding a single line (or existing at all),
I am considering changing my stance.

Undoubtable good fortune and luck upon you and your ancestors,

Sir Christopholous Down Jr. VI


pgpBoqplvO4oD.pgp
Description: PGP signature


Re: [dev] Question about arg.h

2013-11-05 Thread Dmitrij D. Czarkoff
Alexander Huemer wrote:
>P.S. I passionately hate people who top-post, don't give enough details
>
>and cannot say hi or bye in an email.

I wonder about the last bit: aren't "hi" and "bye" implied?


-- 
Dmitrij D. Czarkoff



Re: [dev] man and man-db

2013-11-05 Thread Szymon Olewniczak
On Tue, Nov 05, 2013 at 10:58:58AM +, Raphaël Proust wrote:
> On Mon, Nov 4, 2013 at 11:45 AM, Szymon Olewniczak
>  wrote:
> > Which db engines
> > do you consider of being suckless?
> 
> I (as in “myself”, not as in “the suckless community”) think file
> based storage is a DB that sucks less than most systems out there.
But it has some disadvantages. For example searching 
database, without indexes can be very slow. Another issue rise when you
have huge files that cannot be fully loaded to RAM. When you would relay only
on the kernel, you could easily slow down your system with lots of
unnessesery IO operations. So when you think about this in that
way, you will realize that some database engine can be useful. 

> However, I would argue that the file abstraction is the important bit,
> not the implementation (i.e. if you have a file interface that does
> not rely on usual files can be close enough to the suckless philosophy
> (depending on the implementation). E.g. procfs is a database of the
> running processes on top of which is is reasonably easy to building
> clean, portable scripts and programs that do not suck too much. Other
> examples: devices in /dev, network connections in Plan9's /net.
Great idea. I'll look at it.

BR,
Szymon



Re: [dev] Question about arg.h

2013-11-05 Thread Alexander Huemer
On Tue, Nov 05, 2013 at 09:24:38PM +0100, Krol, Willem van de wrote:
> It's in sbase arg.h

The usage of the macro in these places does not make sense to me.

Kind regards,
-Alex

P.S. I passionately hate people who top-post, don't give enough details 
and cannot say hi or bye in an email.



Re: [dev] Question about arg.h

2013-11-05 Thread Krol, Willem van de
It's in sbase arg.h

On Tue, Nov 5, 2013 at 9:09 PM, Alexander Huemer  wrote:
> On Tue, Nov 05, 2013 at 08:26:01PM +0100, Krol, Willem van de wrote:
>> The arguments (argc, argv) _are used, in the for loop from ARGBEGIN.
>
> Are you talking about st or some other suckless.org project?
> I do not see the USED macro being used anywhere in st.
>
> Kind regards,
> -Alex
>



Re: [dev] Question about arg.h

2013-11-05 Thread Alexander Huemer
On Tue, Nov 05, 2013 at 08:26:01PM +0100, Krol, Willem van de wrote:
> The arguments (argc, argv) _are used, in the for loop from ARGBEGIN.

Are you talking about st or some other suckless.org project?
I do not see the USED macro being used anywhere in st.

Kind regards,
-Alex



Re: [dev] Question about arg.h

2013-11-05 Thread Krol, Willem van de
The arguments (argc, argv) _are used, in the for loop from ARGBEGIN.

On Tue, Nov 5, 2013 at 7:57 PM, Alexander Huemer  wrote:
> On Tue, Nov 05, 2013 at 07:23:30PM +0100, Krol, Willem van de wrote:
>> Indeed, casting to void doesn't have any effect. The variable doesn't
>> become unusable or something like that (no compiler warning or error).
>
> Casting to void has an effect. In case an argument to a function is not
> used anywhere in that function the compiler would give a warning,
> because that could be unintended.
> Having a macro for (void) is nice, because, as already said, it's
> shorter to type, and additionally so you have one place that you can
> change to make all those warnings visible for a whole project. I.e. you
> substitute that macro with an empty string.
>
> Kind regards,
> -Alex
>



Re: [dev] Question about arg.h

2013-11-05 Thread Alexander Huemer
On Tue, Nov 05, 2013 at 07:23:30PM +0100, Krol, Willem van de wrote:
> Indeed, casting to void doesn't have any effect. The variable doesn't
> become unusable or something like that (no compiler warning or error).

Casting to void has an effect. In case an argument to a function is not 
used anywhere in that function the compiler would give a warning, 
because that could be unintended.
Having a macro for (void) is nice, because, as already said, it's 
shorter to type, and additionally so you have one place that you can 
change to make all those warnings visible for a whole project. I.e. you 
substitute that macro with an empty string.

Kind regards,
-Alex



Re: [dev] Question about arg.h

2013-11-05 Thread Krol, Willem van de
Indeed, casting to void doesn't have any effect. The variable doesn't
become unusable or something like that (no compiler warning or error).

On Tue, Nov 5, 2013 at 7:18 PM, koneu  wrote:
> Krol, Willem van de wrote:
>> Hello, I was reading arg.h, because I want to use it in my program, but I
>> couln't figure out why the USED macro was used. Could someone clear
>> that up?
>>
>>  Willem
>
> It's so you don't have to type out (void) whenever you want to cast
> something to void without any real effect.
>



Re: [dev] Question about arg.h

2013-11-05 Thread koneu
Krol, Willem van de wrote:
> Hello, I was reading arg.h, because I want to use it in my program, but I
> couln't figure out why the USED macro was used. Could someone clear
> that up?
> 
>  Willem

It's so you don't have to type out (void) whenever you want to cast
something to void without any real effect.



[dev] Question about arg.h

2013-11-05 Thread Krol, Willem van de
Hello, I was reading arg.h, because I want to use it in my program, but I
couln't figure out why the USED macro was used. Could someone clear
that up?

 Willem



Re: [dev] Suckless remote shell?

2013-11-05 Thread Szabolcs Nagy
* Louis Santillan  [2013-11-04 23:19:21 -0800]:
> I wasn't suggesting anybody use newlib.  Rather, I was suggesting that
> all the interface a C, or Go, or Java, or ASM program ever needs
> between it and the "POSIX" OS is contained in 17 syscalls.  That's
> about as minimal, or suckless as you can get.  The fact that the
> newlib folks identified that fact is inconsequential.

newlib can be useful for baremetal or other embedded work

but you don't get far with 17 syscalls on unix, pretending
you do is just delusional

(with the listed syscalls you cannot even select for events,
or implement bsd socket api or any other networking stack
even if you try to export every os interface to the filesystem
like plan9 does you still don't have mount, you don't have
large file support, no hi res timer, no interrupt handling,
no clone or thread support etc)

i recommend you to strace a java hello world to see how many
syscalls java need.. (don't forget to use -f, it will create
threads)



Re: [dev] [dwm] spawn and monitor placement

2013-11-05 Thread Carlos Torres
On Fri, Oct 25, 2013 at 6:05 AM, Martin Kopta  wrote:
> Hi, I am still having problems with placement of windows while using two
> monitors [1]. I am using latest git version of dwm.
> When I have cursor on VGA1 and launch dmenu, it is created on VGA1.

I noticed the same behavior and i remember this is one of the last changes cls
made to dmenu.  my workaround is to simply apply the warp [1] patch.
This patch is usefull if you don't mind having your cursor move around as
you switch focus around windows and monitors.  it also makes the root
window get focus which makes new windows open on  that monitor.
additionally i like that the cursor follows the focus.  makes it easier for me
to find the mouse cursor (if i need to use it) and with multiple monitors
requires less travel.

[1]: http://dwm.suckless.org/patches/dwm-5.9-warp.diff



Re: [dev] Suckless remote shell?

2013-11-05 Thread Leon Winter
Hi,

> The reason for SSL is that AFAIK most of the suck in it comes from the
> CA system, that is, the huge number of pre-installed unlimited-trust
> entities, that can be completely disabled.

well, it is not just that (but for browsers mostly it is). There were
plenty of attacks on TLS recently so you really want to use TLS 1.2 as
of know. Also choose secure ciphers (same goes for SSH of course).

> - Server accepts only client certs from same CA as its own cert.

You could even use one CA only for servers and one only for clients.

> - Server only accepts connections with client cert!
> - Identification by common name in client cert.

Currently in TLS the client certificate is transmitted in plain text.
You may be okay with that. If you are not okay with that you can run two
TLS handshakes, the second one would be protected by the secure channel
established in the first one. The second handshake would then be used
to check the client certificate.
Or you do not use client certificate but some own stuff inside the TLS
secure channel after the handshake.
Google and some others are working on new concepts for TLS but instead
of just fixing the issue with the plaintext client certificate they
want to do something completely new[1].

You might have heard of mosh[2]. They basically use SSH for
bootstrapping to rely on the already deployed infrastructure and then
in fact use a custom protocol vaguely similar to DTLS. However they do
not simply forward a shell but do more fancy things like keeping track
of input and output with a prediction engine so they can compensate
latency to some extend. Last time I checked it was hardwired to AES128.
So even when your SSH uses a stronger cipher, mosh would still use
AES128 and thus lowering the security level although using SSH
initially for bootstrapping.

[1] http://tools.ietf.org/id/draft-balfanz-tls-channelid-01.txt
[2] http://mosh.mit.edu/



Re: [dev] man and man-db

2013-11-05 Thread Raphaël Proust
On Mon, Nov 4, 2013 at 11:45 AM, Szymon Olewniczak
 wrote:
> Which db engines
> do you consider of being suckless?

I (as in “myself”, not as in “the suckless community”) think file
based storage is a DB that sucks less than most systems out there.

However, I would argue that the file abstraction is the important bit,
not the implementation (i.e. if you have a file interface that does
not rely on usual files can be close enough to the suckless philosophy
(depending on the implementation). E.g. procfs is a database of the
running processes on top of which is is reasonably easy to building
clean, portable scripts and programs that do not suck too much. Other
examples: devices in /dev, network connections in Plan9's /net.

Of course a crappy fuse implementation exposing a file abstraction
after crossing layers of dummy network layers, bloated with huge
dynamic dependencies, implemented in a mix of ruby, perl and
javascript, does suck! A lot!


Cheers,
-- 
__
Raphaël Proust