On Tue, Jun 24, 2014 at 8:50 AM, Roberto E. Vargas Caballero
wrote:
> CEIL(x) ((int) (x) + ((x) > 0 ? 1.0 : 0.0))
>
> Positive:
> CEIL(3.3) => 3 + (3.3 > 0 ? 1.0 : 0.0) => 4.0
>
> Negative:
> CEIL(-3.3) => -3 + (-3.3 > 0 ? 1.0 : 0.0) => -3
>
here's a shorter equivalent:
#
On 06/24/2014 11:58 AM, Markus Teich wrote:
> I've built me a hardware tailored kernel, containing only the drivers, my
> laptop
> needs and mostly statically linked. Only a few drivers (UMTS modem, wifi,
> audio)
> are built as modules for convenience reasons, so I don't have to reboot if one
>
again the recommendation of using
make localmodconfig
> #define CEIL(x) ((int)(x) + ((x) > 0))
Wow, good solution. The only problem I can see is the return type, that
in your solution is integer. I think it is not a big problem because
this value will be used in some expression where the type convertion
will be done.
The original author of the comm
Andrew Gwozdziewycz said:
> Arch is pretty good, has great documentation and is quite lightweight.
The most suckless aspect of Arch is nearly undisposable systemd, I
believe.
--
Dmitrij D. Czarkoff
On Mon, Jun 23, 2014 at 09:44:05AM -0400, Andrew Gwozdziewycz wrote:
> On Sat, Jun 14, 2014 at 3:28 PM, grayfox wrote:
> > Hey,
> >
> > i used Arch for some years but changed to Gentoo this week. It's not
> > really BSD-equivalent by default but with some time you can do
> > everything you want ve
On Wed, Jun 25, 2014 at 01:49:58PM +0530, Weldon Goree wrote:
> On 06/24/2014 11:58 AM, Markus Teich wrote:
> > I've built me a hardware tailored kernel, containing only the drivers, my
> > laptop
> > needs and mostly statically linked. Only a few drivers (UMTS modem, wifi,
> > audio)
> > are bui
On Mon, Jun 23, 2014 at 06:46:33PM +0200, Sylvain BERTRAND wrote:
> On Mon, Jun 23, 2014 at 05:23:02PM +0200, FRIGN wrote:
> > [0]: http://sta.li/faq
> > [1]: http://dl.suckless.org/stali/clt2010/stali.html
> > [2]: http://www.catonmat.net/blog/ldd-arbitrary-code-execution/
>
> BTW, regarding a st
On 06/24/2014 04:20 PM, Dimitris Papastamos wrote:
>
> Systemd is not the only issue.
>
Specifically, maintaining a stable platform is something of an
impossibility. Upstream fixes are too-rarely backported
(and what the else would I use a distro for?), and so
when Heartbleed_2.0 or whate
On 2014-06-24 12:39 +0200, Dmitrij D. Czarkoff wrote:
> The most suckless aspect of Arch is nearly undisposable systemd, I
> believe.
Assuming you've meant "suckful". :)
Excuse my ignorance but can you elaborate on the "undisposability" of
systemd? I'm running Arch on two machines (armv6 and x86_
On 06/24/2014 04:22 PM, Dimitris Papastamos wrote:
>
> There's also smdev[0] if you are interested.
>
Neat, thanks. I'll definitely try it out.
On Wed, Jun 25, 2014 at 04:42:19PM +0530, Weldon Goree wrote:
>
>
> On 06/24/2014 04:20 PM, Dimitris Papastamos wrote:
> >
> > Systemd is not the only issue.
> >
> Frankly the least suckfull distro I am familiar with
> is the venerable Slackware, which is still full of suck,
> but full of vani
Weldon Goree wrote:
> Neat, thanks. I'll definitely try it out.
Heyho Weldon,
please fix your mailservers time.
--Markus
On Tue, 24 Jun 2014 09:13:11 +0200
Martti Kühne wrote:
> #define CEIL(x) ((int)(x) + ((x) > 0))
Martti, you definitely are a candidate for the best macro-hack of
2014 ;).
Cheers
FRIGN
--
FRIGN
On Tue, 24 Jun 2014 08:50:01 +0200
"Roberto E. Vargas Caballero" wrote:
> I think a correct version may be:
>
> CEIL(x) ((int) (x) + ((x) > 0 ? 1.0 : 0.0))
>
This is not quite right, given we want to return an int (according to
xw.ch, xw.cw and common sense (ceilf doesn't make sense)), i
On Tue, Jun 24, 2014 at 3:19 PM, FRIGN wrote:
> On Tue, 24 Jun 2014 09:13:11 +0200
> Martti Kühne wrote:
>
>> #define CEIL(x) ((int)(x) + ((x) > 0))
>
> Martti, you definitely are a candidate for the best macro-hack of
> 2014 ;).
>
Here's another one. Non-branching sign extraction...
#define SG
"Dmitrij D. Czarkoff" writes:
> Andrew Gwozdziewycz said:
>> Arch is pretty good, has great documentation and is quite lightweight.
>
> The most suckless aspect of Arch is nearly undisposable systemd, I
> believe.
Arch can be booted without systemd rather easily:
https://github.com/chneukirchen/
I don't really get why using would make the program more
complex, add to SLOC, make it slower... I don't think it is a big loss
to use -lm, as it is mostly a problem with the libc you might be using
if you have to link with an extra library for math functions.
Also, specifying something as a
On Tue, 24 Jun 2014 16:30:16 +0200
Jakob Kramer wrote:
> Finally, I don't think that reimplementing a function that already is in
> the standard library for "more efficiency" makes any sense. Correctness
> is most important, and I rather trust my C library implementation on that.
Jakob, this i
On Tue, Jun 24, 2014 at 03:33:10PM +0200, FRIGN wrote:
> However, I favor Martti's verson, which is just plain genius:
>
> CEIL(x) ((int)(x) + ((x) > 0))
Perhaps I'm missing something here, but this completely fails whenever
(x) is already a whole number; CEIL(3.0) => 4.0 which is not the correct
On Tue, 24 Jun 2014 09:46:33 -0500
Eric Pruitt wrote:
> CEIL(x) ((int)(x) + ((x) > 0))
>
> Perhaps I'm missing something here, but this completely fails whenever
> (x) is already a whole number; CEIL(3.0) => 4.0 which is not the correct
> behaviour.
Damn, you are right -.-. Back to the drawing
On Tue, Jun 24, 2014 at 6:50 AM, Dimitris Papastamos wrote:
> On Mon, Jun 23, 2014 at 09:44:05AM -0400, Andrew Gwozdziewycz wrote:
>> On Sat, Jun 14, 2014 at 3:28 PM, grayfox wrote:
>> > Hey,
>> >
>> > i used Arch for some years but changed to Gentoo this week. It's not
>> > really BSD-equivalent
On Tue, Jun 24, 2014 at 11:09:11AM -0400, Andrew Gwozdziewycz wrote:
> On Tue, Jun 24, 2014 at 6:50 AM, Dimitris Papastamos wrote:
> > On Mon, Jun 23, 2014 at 09:44:05AM -0400, Andrew Gwozdziewycz wrote:
> >> On Sat, Jun 14, 2014 at 3:28 PM, grayfox wrote:
> >> > Hey,
> >> >
> >> > i used Arch fo
On Tue, Jun 24, 2014 at 5:03 PM, FRIGN wrote:
> On Tue, 24 Jun 2014 09:46:33 -0500
> Eric Pruitt wrote:
>
>> CEIL(x) ((int)(x) + ((x) > 0))
>>
>> Perhaps I'm missing something here, but this completely fails whenever
>> (x) is already a whole number; CEIL(3.0) => 4.0 which is not the correct
>> b
On Tue, 24 Jun 2014 11:09:11 -0400
Andrew Gwozdziewycz wrote:
> I guess it depends on how you define lightweight. If you define
> lightweight as "the distro only has 6 packages," then a) I think
> you're being insane, b) more power to you. There's another way to
> define lightweight (the way I me
>
> True.
> Hence, and following other sources about this topic [0], I suggest
>
> #define CEIL(x) ((int)(x) + ((int)(x) > 0) * ((x - (int)(x)) > FLT_EPSILON))
>
On another note, I'd even use && instead of * there, but that would
require another pair of parentheses.
On Tue, Jun 24, 2014 at 05:16:08PM +0200, Martti Kühne wrote:
> True.
> Hence, and following other sources about this topic [0], I suggest
>
> #define CEIL(x) ((int)(x) + ((int)(x) > 0) * ((x - (int)(x)) > FLT_EPSILON))
>
> cheers!
> mar77i
>
> [0]
> http://randomascii.wordpress.com/2012/02/25/com
On Tue, Jun 24, 2014 at 8:19 AM, FRIGN wrote:
> On Tue, 24 Jun 2014 11:09:11 -0400
> Andrew Gwozdziewycz wrote:
> …
>> Don't want pulseaudio? Fine, don't install it. Don't want GNOME? Don't
>> install it. The number of *available* packages has no impact on that,
>> but it sure is convenient when
On Tue, 24 Jun 2014 17:16:08 +0200
Martti Kühne wrote:
> #define CEIL(x) ((int)(x) + ((int)(x) > 0) * ((x - (int)(x)) > FLT_EPSILON))
FLT_EPSILON is very smart. I'll not withdraw your nomination for the
award.
However, why * and not &&? The latter would stop at x > 0 and not do
the diff-check in
On Tue, 24 Jun 2014 08:28:42 -0700
Ryan O’Hara wrote:
> How do you usually get around Skype being Skype?
It was an example. People seriously using Skype now are forced to have
PA installed. And many people have to use Skype because their work
requires it.
> Where does that assumption come into
Am 24.06.2014 16:46, schrieb Eric Pruitt:
On Tue, Jun 24, 2014 at 03:33:10PM +0200, FRIGN wrote:
However, I favor Martti's verson, which is just plain genius:
CEIL(x) ((int)(x) + ((x) > 0))
Perhaps I'm missing something here, but this completely fails whenever
(x) is already a whole number
On Tue, Jun 24, 2014 at 8:35 AM, FRIGN wrote:
> On Tue, 24 Jun 2014 08:28:42 -0700
> Ryan O’Hara wrote:
>
>> How do you usually get around Skype being Skype?
>
> It was an example. People seriously using Skype now are forced to have
> PA installed. And many people have to use Skype because their
On Tue, Jun 24, 2014 at 8:33 AM, Dimitris Papastamos wrote:
> On Tue, Jun 24, 2014 at 08:28:42AM -0700, Ryan O’Hara wrote:
>> How do you usually get around Skype being Skype?
>
> Have a separate /emul namespace for crapware. Use ns-tools[0] to manage
> it.
>
> This also helps with multilib crap.
On Tue, Jun 24, 2014 at 08:28:42AM -0700, Ryan O’Hara wrote:
> On Tue, Jun 24, 2014 at 8:19 AM, FRIGN wrote:
> > On Tue, 24 Jun 2014 11:09:11 -0400
> > Andrew Gwozdziewycz wrote:
> > …
> >> Don't want pulseaudio? Fine, don't install it. Don't want GNOME? Don't
> >> install it. The number of *avai
On Tue, Jun 24, 2014 at 5:34 PM, Jakob Kramer wrote:
>
> On 2014-06-24 Jakob Kramer wrote:
>> Finally, I don't think that reimplementing a function that already is
>> in the standard library for "more efficiency" makes any sense.
>> Correctness is most important, and I rather trust my C library
>>
On Tue, 24 Jun 2014 18:27:57 +0200
"Roberto E. Vargas Caballero" wrote:
> > CEIL(x) ((int)(x) + ((x) > 0 && ((x) - (int)(x)) > FLT_EPSILON))
>
> This solution begins to be too much complex. In this case I begin to
> agree with Martti, and I think the best solution is to use ceil.
*ceilf
To the
> CEIL(x) ((int)(x) + ((x) > 0 && ((x) - (int)(x)) > FLT_EPSILON))
This solution begins to be too much complex. In this case I begin to
agree with Martti, and I think the best solution is to use ceil.
Regards,
--
Roberto E. Vargas Caballero
On Tue, 24 Jun 2014 18:27:57 +0200
"Roberto E. Vargas Caballero" wrote:
> This solution begins to be too much complex. In this case I begin to
> agree with Martti, and I think the best solution is to use ceil.
We must think if it is really necessary to do the
FLT_EPSILON-check.
We are dealing w
On Tue, Jun 24, 2014 at 7:32 PM, FRIGN wrote:
>
> CEIL(x) ((int)(x) + ((x) > 0 && (int)(x) != (x)))
>
There are insignificant differences to results with this number
(256.9), but it's a significantly faster than glibc's ceilf (which
takes about 200%).
cheers!
mar77i
On Tue, Jun 24, 2014 at 7:47 PM, Martti Kühne wrote:
> On Tue, Jun 24, 2014 at 7:32 PM, FRIGN wrote:
>>
>> CEIL(x) ((int)(x) + ((x) > 0 && (int)(x) != (x)))
>>
>
> There are insignificant differences to results with this number
> (256.9), but it's a significantly faster than glibc's ceilf (wh
FRIGN wrote:
> We are dealing with floats with at most 2 decimal places.
Heyho,
in this case you could also argue, that this macro is only used to get an upper
bound for the character size in st and not for the least upper bound and then
use the even simpler version with CEIL(3.0) == 4.
But, as
On Tue, 24 Jun 2014 19:47:34 +0200
Martti Kühne wrote:
> There are insignificant differences to results with this number
> (256.9), but it's a significantly faster than glibc's ceilf (which
> takes about 200%).
But who'd specify a scaling factor of 1.9 or sth.?
BTW: Casting to int yields
On Tue, Jun 24, 2014 at 08:19:34PM +0200, FRIGN wrote:
> But who'd specify a scaling factor of 1.9 or sth.?
I have a height scaling factor of 1.0001 in my configuration file, and
the only reason I even bothered to implement the kerning patch in the
first place was to work around a rendering is
On Tue, Jun 24, 2014 at 01:54:00PM -0500, Eric Pruitt wrote:
> [1]:
> http://www.linuxquestions.org/questions/slackware-14/underline-_-in-xterm-invisible-4175434364/page2.html
I linked to the wrong page. The correct URL is as follows:
http://www.linuxquestions.org/questions/slackware-14/underli
> But who'd specify a scaling factor of 1.9 or sth.?
> BTW: Casting to int yields the exact same results for both CEIL and
> ceilf in my setup.
There is an implicit casting because xw.cw and xw.ch are integers,
so the explicit casting is redundant. This macro is used only in one place,
xloadfo
On Mon, Jun 23, 2014 at 03:16:40PM +0200, Anders Eurenius wrote:
> Oh, I guess the mailing list manager swallowed the subscribe message
> ---
>
> Hello
>
> The render- patches are independent of each other, but depend on the
> first reorder-and-extend.
Please, if you send several patches then se
> impressive patch. I see that it probably has taken some time to write.
I totally agree. These patch serie seems very good.
> > The fast-blink support involves a bit of mucking about in the main
> > loop, and is a bit more debatable. I'm not entirely happy with it, but
> > it does separate thin
> Yeah. ^[[6m=>Fast blink isn't even on the (now) canonical reference
> http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
We use http://www.vt100.net/ as canonical reference.
> I'm not really that enamored with the fastblink patch either, but I felt the
> main loop needed to suck less. Not s
> This is not good practice[0], given gettimeofday is inaccurate for this
> matter (take time-jumps for instance). POSIX.1-2008 even marks it as
> obsolete!
I agree with you and I like the patch. If nobody have problems with
it I will apply it.
Regards,
--
Roberto E. Vargas Caballero
On Tue, 24 Jun 2014 21:47:27 +0200
"Roberto E. Vargas Caballero" wrote:
> I agree with you and I like the patch. If nobody have problems with
> it I will apply it.
Cool! :)
Yeah, it's the first step on refactoring the main loop. I see some
potential.
Cheers
FRIGN
--
FRIGN
My dislexia is getting worse, and if we join it with my poorenglish
the result is the next paragraph:
> I have a similar feeling, since the blinking time is different for
> every processor, and in some cases the slow blink of ons terminal is similar
> to the fast blink of another terminal, so I am
Ok, no problem.
aes
From eedd5902aa34efb9d2cd7bd2565286753a318c64 Mon Sep 17 00:00:00 2001
From: Anders Eurenius
Date: Sat, 21 Jun 2014 20:29:36 +0200
Subject: [PATCH 1/8] Reorder and extend glyph attributes
Faint, invisible, struck and fast blink are added as glyph attributes.
Since there's a
Render invisible attribute
Implement invisible mode by setting the foreground color to be the same
as the background color. Not rendering anything would also be an
alternative, but this seems less likely to cause surprises in
conjunction with any hacks.
cheers
aes
From f006ec9
Render struck-out attribute
Implement crossed-out text with an XftDrawRect call, similar to how
underline is implemented. The line is drawn at 2/3 of the font ascent,
which seems to work nicely in practice.
cheers
aes
From e45994272eb3043ce9a75d4c8dd3d11c8d76472c Mon Sep 17 00:00
Render struck-out attribute
Implement crossed-out text with an XftDrawRect call, similar to how
underline is implemented. The line is drawn at 2/3 of the font ascent,
which seems to work nicely in practice.
cheers
aes
Render faint attribute
Faint text is implemented by allocating a new color at one-half
intensity of each of the r, g, b components, or if the text bold at the
same time, it is not made lighter.
cheers
aes
From 1d820c2e5d94e12d6e012536995fd2aa895b3e20 Mon Sep 17 00:00:00 2001
From:
Move default rows, cols to config.def.h
Add default_cols, default_rows as static ints in the config.def.h
header, instead of using constants directly in the code.
cheers
aes
From ba8a00c0c2b10b5b3224ce6c9f498e07352cec5d Mon Sep 17 00:00:00 2001
From: Anders Eurenius
Date: Sat, 21 Jun
Refactor the mainloop
Try to separate the different concerns of the main loop into separate,
simpler functions. I think it's a useful step, but I also think that
more should be done.
cheers
aes
From 015e8b45b18690d81e2505309753efaa8af9799d Mon Sep 17 00:00:00 2001
From: Anders Eu
Add fast blink support
Fast blink is implemented using the new main loop changes. It may mark a
few characters too many as dirty when the blink state hasn't changed,
but it's not a major issue.
cheers
aes
From 9a1709928bd2e2bd8f8d7b5a63f9aec5d073d376 Mon Sep 17 00:00:00 2001
From
2014-06-25 1:51 GMT+04:00 Anders Eurenius :
> Move default rows, cols to config.def.h
>
> Add default_cols, default_rows as static ints in the config.def.h
> header, instead of using constants directly in the code.
>
> cheers
> aes
Greetings,
is this really necessary? Default constants
2014-06-25 3:42 GMT+04:00 Alexander S. :
> 2014-06-25 1:51 GMT+04:00 Anders Eurenius :
>> Move default rows, cols to config.def.h
>>
>> Add default_cols, default_rows as static ints in the config.def.h
>> header, instead of using constants directly in the code.
>>
>> cheers
>> aes
> Gre
2014-06-25 1:50 GMT+04:00 Anders Eurenius :
> Render faint attribute
>
> Faint text is implemented by allocating a new color at one-half
> intensity of each of the r, g, b components, or if the text bold at the
> same time, it is not made lighter.
>
> cheers
> aes
Greetings,
could y
2014-06-24 23:16 GMT+04:00 Roberto E. Vargas Caballero :
>> But who'd specify a scaling factor of 1.9 or sth.?
>> BTW: Casting to int yields the exact same results for both CEIL and
>> ceilf in my setup.
>
> There is an implicit casting because xw.cw and xw.ch are integers,
> so the explicit ca
On Tue, Jun 24, 2014 at 07:32:10PM +0200, FRIGN wrote:
> We are dealing with floats with at most 2 decimal places. I propose we
> just go for
>
> CEIL(x) ((int)(x) + ((x) > 0 && (int)(x) != (x)))
>
Well, if we know that much already then the easiest to read version
would be:
#define CEIL(x) ((i
On 06/24/2014 06:27 PM, Markus Teich wrote:
>
> please fix your mailservers time.
>
Gah! Sorry, all. Worse yet, it was the local time on my laptop (though I
thought I had set postfix to mangle supplied Date: headers), and now I
have a ~24h clock skew in the middle of a large cross-compile.
WMG
> Greetings,
> could you provide a use-case for this attribute? It seems very obscure
> to me, and not so long ago, there was a huge debate which resulted in
> mucking with colours being interpreted as negative.
Not really. I'm going to keep it in, but you go ahead and do whatever.
cheers
aes
66 matches
Mail list logo