Re: [dev] st: Large pile of code

2013-04-25 Thread Christoph Lohmann
Greetings. On Thu, 25 Apr 2013 17:58:17 +0200 Carlos Torres wrote: > On Thu, Apr 25, 2013 at 2:59 AM, Alexander Sedov > wrote: > > Code should look compact to keep people from adding bloat. Multiple > > files by themselves add nothing to understanding, other than need to > > constantly switch c

Re: [dev] st: Large pile of code

2013-04-25 Thread Alexander Sedov
2013/4/25 Roberto E. Vargas Caballero : > When you want pass it any type of data? (of course, without using typeof) Do you already want it? Also, you can have multiple functions, as math.h does.

Re: [dev] st: Large pile of code

2013-04-25 Thread Carlos Torres
On Thu, Apr 25, 2013 at 2:59 AM, Alexander Sedov wrote: > 2013/4/25 Kent Overstreet : >> So, to restate - code should be harder to understand to keep people >> from contributing? > Code should look compact to keep people from adding bloat. Multiple > files by themselves add nothing to understandin

Re: [dev] st: Large pile of code

2013-04-25 Thread Roberto E. Vargas Caballero
On Thu, Apr 25, 2013 at 12:38:02PM +0200, markus schnalke wrote: > [2013-04-24 17:14] random...@fastmail.us > > > > A) Why do min and max need to be macros at all? > > That's the point, IMO. All the problems are introduced by performance > optimizations that might not even necessary. If you write i

Re: [dev] st: Large pile of code

2013-04-25 Thread markus schnalke
[2013-04-24 17:14] random...@fastmail.us > > A) Why do min and max need to be macros at all? That's the point, IMO. All the problems are introduced by performance optimizations that might not even necessary. If you write it as a function you simply don't need to care for double-evaluation. It wil

Re: [dev] st: Large pile of code

2013-04-25 Thread hiro
one liners -> one filers ?

Re: [dev] st: Large pile of code

2013-04-25 Thread Kent Overstreet
On Wed, Apr 24, 2013 at 11:59 PM, Alexander Sedov wrote: > 2013/4/25 Kent Overstreet : >> So, to restate - code should be harder to understand to keep people >> from contributing? > Code should look compact to keep people from adding bloat. Multiple > files by themselves add nothing to understandi

Re: [dev] st: Large pile of code

2013-04-24 Thread Alexander Sedov
2013/4/25 Kent Overstreet : > So, to restate - code should be harder to understand to keep people > from contributing? Code should look compact to keep people from adding bloat. Multiple files by themselves add nothing to understanding, other than need to constantly switch contexts when one file's

Re: [dev] st: Large pile of code

2013-04-24 Thread Alexander Sedov
There's no such thing as "doing it wrong", there are people who know how to use macros and people who do not. As suckless aims advanced users, I think we can safely assume that most people here know how to use them, and won't blow their leg off with it. Linux kernel can enjoy luxury of being compil

Re: [dev] st: Large pile of code

2013-04-24 Thread Kent Overstreet
On Wed, Apr 24, 2013 at 11:48 PM, Alexander Sedov wrote: > Personally, I suspect that this is not going to be positive change in > long run. Dividing into multiple files lowers tolerance threshold for > adding new code. If before that somebody would not add 500 sloc, no > matter what, now he can c

Re: [dev] st: Large pile of code

2013-04-24 Thread Alexander Sedov
Personally, I suspect that this is not going to be positive change in long run. Dividing into multiple files lowers tolerance threshold for adding new code. If before that somebody would not add 500 sloc, no matter what, now he can convince yourself and others that it is REALLY useful, and make a n

Re: [dev] st: Large pile of code

2013-04-24 Thread Kent Overstreet
On Wed, Apr 24, 2013 at 2:14 PM, wrote: > On Wed, Apr 24, 2013, at 15:32, Kent Overstreet wrote: >> I switched to gnu99 for typeof() - it makes it possible to write min >> and max macros that don't evaluate their arguments twice, and IMO is a >> very worthwhile extension. > > Wait, you switched _

Re: [dev] st: Large pile of code

2013-04-24 Thread random832
On Wed, Apr 24, 2013, at 15:32, Kent Overstreet wrote: > I switched to gnu99 for typeof() - it makes it possible to write min > and max macros that don't evaluate their arguments twice, and IMO is a > very worthwhile extension. Wait, you switched _to_ gnu99? For _that_? A) Why do min and max need

Re: [dev] st: Large pile of code

2013-04-24 Thread Kent Overstreet
On Wed, Apr 24, 2013 at 7:23 AM, wrote: > On Wed, Apr 24, 2013, at 9:32, Carlos Torres wrote: >> I like the seperation of term.c from st.c, I agree that makes reading >> st.c clearer. I can't comment on the removal of forward declarations, >> typedefs and static vars though the resulting differ

Re: [dev] st: Large pile of code

2013-04-24 Thread Carlos Torres
i haven't tried rebasing his code yet. but if i have time later this week i might try it. for fun. --Carlos On Wed, Apr 24, 2013 at 10:23 AM, wrote: > On Wed, Apr 24, 2013, at 9:32, Carlos Torres wrote: >> I like the seperation of term.c from st.c, I agree that makes reading >> st.c clearer.

Re: [dev] st: Large pile of code

2013-04-24 Thread random832
On Wed, Apr 24, 2013, at 9:32, Carlos Torres wrote: > I like the seperation of term.c from st.c, I agree that makes reading > st.c clearer. I can't comment on the removal of forward declarations, > typedefs and static vars though the resulting difference is legible as > well. (frankly code in al

Re: [dev] st: Large pile of code

2013-04-24 Thread Carlos Torres
I like the seperation of term.c from st.c, I agree that makes reading st.c clearer. I can't comment on the removal of forward declarations, typedefs and static vars though the resulting difference is legible as well. (frankly code in alphabetical order makes me want to sort it according to code

[dev] st: Large pile of code

2013-04-23 Thread Kent Overstreet
First off - nice work! Awhile back I started hacking on st in my spare time. I haven't added anything earth shaking - the majority of what I've been doing has been refactoring and rewriting bits to make the code better. Anyways, the way I've been doing things has diverged enough that I don't know