Jump to page: 1 26  
Page
Thread overview
[OT] unbelievable: #ifdef _OTHER_LIB_H
Nov 26, 2014
Adam D. Ruppe
Nov 26, 2014
CraigDillabaugh
Nov 26, 2014
Adam D. Ruppe
Nov 26, 2014
ketmar
Nov 26, 2014
H. S. Teoh
Nov 26, 2014
Adam D. Ruppe
Nov 26, 2014
H. S. Teoh
Nov 27, 2014
Adam D. Ruppe
Nov 27, 2014
Adam D. Ruppe
Nov 27, 2014
ketmar
Nov 27, 2014
deadalnix
Nov 27, 2014
weaselcat
Nov 27, 2014
ketmar
Nov 27, 2014
deadalnix
Nov 27, 2014
Adam D. Ruppe
Nov 27, 2014
Adam D. Ruppe
Nov 29, 2014
Nick Sabalausky
Nov 26, 2014
ketmar
Nov 26, 2014
H. S. Teoh
Nov 27, 2014
Adam D. Ruppe
Nov 27, 2014
Joakim
Nov 27, 2014
ketmar
Nov 27, 2014
Joakim
Nov 27, 2014
ketmar
Nov 27, 2014
Joakim
Nov 27, 2014
ketmar
Nov 28, 2014
Jérôme M. Berger
Nov 28, 2014
Adam D. Ruppe
Nov 28, 2014
Adam D. Ruppe
Nov 28, 2014
H. S. Teoh
Nov 28, 2014
deadalnix
Nov 28, 2014
Joakim
Nov 28, 2014
ketmar
Nov 28, 2014
CraigDillabaugh
Nov 28, 2014
CraigDillabaugh
Nov 28, 2014
ketmar
Nov 28, 2014
H. S. Teoh
Nov 28, 2014
ketmar
Nov 28, 2014
Adam D. Ruppe
Nov 28, 2014
ketmar
Nov 28, 2014
ketmar
Nov 28, 2014
H. S. Teoh
Nov 27, 2014
deadalnix
Nov 27, 2014
Jacob Carlborg
Nov 27, 2014
Jacob Carlborg
Nov 28, 2014
deadalnix
Nov 28, 2014
Jacob Carlborg
Nov 28, 2014
deadalnix
Nov 27, 2014
Adam D. Ruppe
Nov 27, 2014
H. S. Teoh
Nov 27, 2014
Chris
Nov 26, 2014
ketmar
Nov 26, 2014
Adam D. Ruppe
Nov 26, 2014
Andrej Mitrovic
Nov 26, 2014
H. S. Teoh
Nov 29, 2014
Iain Buclaw
November 26, 2014
So my computer died on me again last week and I had to buy new hardware. I was forced to update the software to run the new hardware... and it is painful.

I hate all software and have learned that if I want a job done right, I have to do it myself. Rarely, I find other people's software is OK with some slight modifications, so I try to do that.

xterm is one example. I basically like it but it is ugly and stupid so needs a few fixes. As such, I maintain my own private fork of it.

I went ahead and compiled that on the new thing today.... and it failed. wait what?!


#ifndef _XLIB_H_
#error Please include <X11/Xlib.h> before "xutf8.h"
#endif


That's in the xterm source code. Yes, it depends on the presence of a particular include guard.

The X11 source apparently recently changed to:

#ifndef _X11_XLIB_H_
#define _X11_XLIB_H_


thereby breaking xterm... and blackbox... and who knows what else. This one was brought to my attention thanks to the #error directive. But there's certainly other things silently being compiled out now, as the program does not work correctly after fixing this.

Unbelievable.


Praise D's modules.


PS the fonts are all hideous on the new linux too. I should have just bought a Windows license.
November 26, 2014
On Wednesday, 26 November 2014 at 20:06:02 UTC, Adam D. Ruppe wrote:
>
> xterm is one example. I basically like it but it is ugly and stupid so needs a few fixes. As such, I maintain my own private fork of it.
I would hate to hear what you have to say about software that you don't like :o)

>
>
> PS the fonts are all hideous on the new linux too. I should have just bought a Windows license.
What is your new linux distro?



November 26, 2014
On Wed, Nov 26, 2014 at 08:06:01PM +0000, Adam D. Ruppe via Digitalmars-d wrote:
> So my computer died on me again last week and I had to buy new hardware. I was forced to update the software to run the new hardware... and it is painful.

I have a high distrust of brand new *hardware*, because they inevitably are gratuitously incompatible with my current software and require new-fangled OSes bloated with features I never use. Because of this, I only ever upgrade once every 5 years (if not longer). And when I do, I'll be sure to spend plenty of time researching what hardware isn't horribly broken or requires a specific version of a specific OS and doesn't work with anything else. Vendor lock-in is evil.


> I hate all software and have learned that if I want a job done right, I have to do it myself. Rarely, I find other people's software is OK with some slight modifications, so I try to do that.

	I don't trust computers, I've spent too long programming to
	think that they can get anything right. -- James Miller

:-)


> xterm is one example. I basically like it but it is ugly and stupid so needs a few fixes. As such, I maintain my own private fork of it.

You're brave. :-P  Me, I've given up on xterm long ago, and use rxvt-unicode these days. At least it supports Unicode & Unicode fonts without *too* much pain. But still...

Speaking of which, whatever happened with your D-based terminal app from a while back? You did get it to the point where it could support inline images and stuff, which is pretty cool; if you could get it to the point where it works well with Unicode fonts, I'd dump rxvt and use your terminal instead. :-P


> I went ahead and compiled that on the new thing today.... and it failed.  wait what?!
> 
> 
> #ifndef _XLIB_H_
> #error Please include <X11/Xlib.h> before "xutf8.h"
> #endif
> 
> 
> That's in the xterm source code. Yes, it depends on the presence of a particular include guard.

Whoa. That's ... messed up in more ways than I can name!


> The X11 source apparently recently changed to:
> 
> #ifndef _X11_XLIB_H_
> #define _X11_XLIB_H_
> 
> 
> thereby breaking xterm... and blackbox... and who knows what else.

Yeah, that's the downside of maintaining your own fork of stuff. Upstream (presumably) would've taken care of updating these ugly bits of code, but you don't get the benefit of that unless you regularly pull from upstream and merge, which is a lot of work to begin with.


> This one was brought to my attention thanks to the #error directive. But there's certainly other things silently being compiled out now, as the program does not work correctly after fixing this.

Sigh... what else is new. That's the unvaryingly sad story I find with every sufficiently-complex C/C++ program. No matter how well-intentioned you start out and no matter how clean the initial design, it inevitably gravitates towards an incomprehensible patchwork of hacks upon bandages over patches to older hacks, containing hundreds of implicit assumptions (that's been already forgotten since the second last guy took over the codebase). Break any one of these hidden assumptions, and little inscrutable malfunctions start showing up everywhere.


> Unbelievable.
> 
> Praise D's modules.

Not just D modules, but many other aspects of D tend to keep your program away from sinking into the rathole of patches upon hacks upon bandages over patches, that every C/C++ program inevitably gravitates towards.

(Unfortunately, some areas of D haven't been ironed out enough in this respect, and sometimes you do still have to do ugly hacks to make things work. But generally, D does give you the tools to limit the scope of such hacks so that they don't creep and take over program readability.)


> PS the fonts are all hideous on the new linux too. I should have just bought a Windows license.

Shouldn't you be able to just install the good ole fonts and expunge the ugly new ones? Or has Linux "desktop" code devolved to the point of hard-coding specific font names for everything?

<soapbox> This is one of the reasons I've completely given up on the whole "desktop metaphor" movement. It has become all glitz and no substance IMNSHO; all about this font vs. that font rather than actually solving real problems. Give me ratpoison and a bare terminal emulator any day, and my productivity gets boosted 300%. Even when I'm using Windows, that purportedly sports "better" UI design than Linux, I find myself spending more time fighting with the UI than actually getting anything done. The GUI emperor has no clothes, and I'm calling BS on the whole movement! </soapbox>


T

-- 
The irony is that Bill Gates claims to be making a stable operating system and Linus Torvalds claims to be trying to take over the world. -- Anonymous
November 26, 2014
On Wednesday, 26 November 2014 at 20:59:30 UTC, CraigDillabaugh wrote:
> I would hate to hear what you have to say about software that you don't like :o)

hehe

> What is your new linux distro?

Slackware 14.1. I've been a Slackware user for a long time and I still find it less unbearable than the alternatives, but it often annoys me.

I should have probably just compiled a new kernel and left everything else the same. On my old system, I deleted all but four of the fonts because I couldn't stand them. Tried to do that here, and X wouldn't start. But I think I have it ok enough now, the text still looks pretty bad, but I'm getting used to it (ugh).

I seriously considered putting Windows on though and running linux in a VM. But I don't like the Windows mouse behavior, I like my sloppy focus and especially the lack of click raising windows. And my hotkeys on keys reserved by the system in Windows.

On the other hand, I don't like it when it takes a whole day to get basic things working. Argh. But hopefully once it is up it'll give me a lot of use again.
November 26, 2014
On Wed, 26 Nov 2014 21:07:00 +0000
"Adam D. Ruppe via Digitalmars-d" <digitalmars-d@puremagic.com> wrote:

> Slackware 14.1. I've been a Slackware user for a long time and I still find it less unbearable than the alternatives, but it often annoys me.
ah, now i understand why i like your code so much! ;-)


November 26, 2014
On Wednesday, 26 November 2014 at 21:02:20 UTC, H. S. Teoh via Digitalmars-d wrote:
> I have a high distrust of brand new *hardware*, because they inevitably are gratuitously incompatible with my current software and require new-fangled OSes bloated with features I never use.

Yeah. My old computer started randomly freezing up though and I don't like that. Lasted only about 4 years. Though I might have solved the problem by disabling the second processor core in it, it went 10 days without trouble after doing that, whereas before it only went 7.

But I ordered the new hardware just in case it failed completely, and when it all got here yesterday, I figured might as well give it a try.

BTW this is my first computer without a floppy disk drive. I feel naked without one. Thankfully, it has an internal speaker though, I still have my beloved beeps.

> You're brave. :-P  Me, I've given up on xterm long ago, and use
> rxvt-unicode these days.

I never got into rxvt-unicode. I use xterm and plain rxvt together. I put rxvt on the right application menu key (next to right ctrl) to pop it up instantly and I dismiss it just as fast. I sometimes have ten rxvts open though who are only acting as controlling ttys for other applications. The megabyte of virtual space it saves over xterm seems important to me....

...though the new box has 16 GB of memory and I've never come close to using even 4 GB before.

> Speaking of which, whatever happened with your D-based terminal app from a while back?

I think I'm going to be using it now. It is working fine on this box whereas xterm is failing on me. I'm sure it has unicode issues though... but if I'm replacing my beloved, reliable xterm with it, I'll be forced to fix those eventually!

I think I want to change the color scheme though. I like black xterms and my thing only does white. I think. Maybe I added an option and forgot what it is.

The unicode support right now btw looks like I can handle individual code points fine, but not combining characters and surely not more. Individual codepoints are probably good enough for me though.

The other part of my terminal emulator was also a gnu screen replacement. I got it to the point where it worked pretty well... but not well enough to break my inertia toward good old screen. Maybe I'll revisit that too though.


BTW this system update seems to have changed my mutt too. Tab is bringing it back to the old items (marked O) instead of beeping when I'm out of new items (marked N). I'm not a big fan.

> Yeah, that's the downside of maintaining your own fork of stuff.
> Upstream (presumably) would've taken care of updating these ugly bits of
> code, but you don't get the benefit of that unless you regularly pull
> from upstream and merge, which is a lot of work to begin with.

and it kinda defeats the point: merging from upstream means I'm stuck with their new "features" too, unless I carefully go through and am really selective about keeping the changes... at which point, I think it is useless. If a bug bothered *me*, I'd fix it myself, so I don't need every bug fix from upstream anyway,


> you start out and no matter how clean the initial design

well, xterm isn't clean anyway :P


> Not just D modules, but many other aspects of D tend to keep your program away from sinking into the rathole of patches upon hacks upon bandages over patches, that every C/C++ program
> inevitably gravitates towards.

indeed.

> Shouldn't you be able to just install the good ole fonts and expunge the ugly new ones?

I tried that and then X wouldn't start. Part of what annoys me is there isn't an xorg.conf anymore. Perhaps I could add one, but by default there isn't one at all and it tries to auto configure everything. That's great when it works, but I'm not sure what to do when it doesn't.

> The GUI emperor has no clothes, and I'm calling BS on the whole movement! </soapbox>

I like guis sometimes. Though much of it is just me wanting to watch a youtube while doing something else in another few windows.
November 26, 2014
On Wed, 26 Nov 2014 20:06:01 +0000
"Adam D. Ruppe via Digitalmars-d" <digitalmars-d@puremagic.com> wrote:

> xterm is one example. I basically like it but it is ugly and stupid so needs a few fixes. As such, I maintain my own private fork of it.
ah, terminal emulators... i ended writing my own after i found that rxvt is effectively dead, mrxvt too, and rxvt-unicode is just a mess.

looking back i must say that i'd better adopt rxvt-unicode instead of writing my own emulator, 'cause writing terminal emulator that works with all console software is a PITA.


November 26, 2014
On Wednesday, 26 November 2014 at 21:34:43 UTC, ketmar via Digitalmars-d wrote:
> looking back i must say that i'd better adopt rxvt-unicode instead of writing my own emulator, 'cause writing terminal
> emulator that works with all console software is a PITA.

true.... but I set my sights lower: I just want "works for me". After a bunch of guess and checking, I got the two most complex programs I use - mutt and vim - including with or without gnuscreen to work, and that's good enough.

If I have to use a complex program that doesn't work right in it, I figure I can always fall back on xterm, rxvt, or the Linux console.

November 26, 2014
On 11/26/14, Adam D. Ruppe via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> That's in the xterm source code. Yes, it depends on the presence of a particular include guard.

Oh you should know how much trouble I went through when I was building my C++ wrapping tool (initially just a wxWidgets wrapping tool). The include stuff was 90% of the mess. So much frustration with *order of inclusions*. It's probably *the* reason why I completely burnt-out on continuing working on tool after several months.

I can't believe there are brand-new programming languages being developed where the author(s) still insist(s) on textual inclusion. I'm sorry, but the detour you took with that simple decision causes an insane mess for both the tools and the end-user, don't repeat the mistake of C and C++ anymore, please! D's modules are a **massive blessing**.
November 26, 2014
On Wed, Nov 26, 2014 at 09:21:21PM +0000, Adam D. Ruppe via Digitalmars-d wrote:
> On Wednesday, 26 November 2014 at 21:02:20 UTC, H. S. Teoh via Digitalmars-d wrote:
> >I have a high distrust of brand new *hardware*, because they inevitably are gratuitously incompatible with my current software and require new-fangled OSes bloated with features I never use.
> 
> Yeah. My old computer started randomly freezing up though and I don't like that. Lasted only about 4 years. Though I might have solved the problem by disabling the second processor core in it, it went 10 days without trouble after doing that, whereas before it only went 7.

That's not a good sign at all. Have you considered just replacing the power supply? The second last time (i.e., >10 years ago :-D) I had to replace my computer was when the PSU started to fail, causing random shutdowns, reboots, and freezes. Replacing the power supply brought things back to normal for a few more years.

Then my previous PC (~8 years ago :-P) suffered a rather horrible catastrophe: I was out-of-town for a while and had deposited it for safekeeping at my cousin's, and then when I came back I had my roommate fetch it for me. Unfortunately, he left it in the trunk overnight, causing it to accumulate morning dew -- both outside and, unbeknownst to me, also inside. Stupidly thinking that it was good enough to wipe off the dew from the outer casing, I plugged it in and turned it on, and instantly there was the loudest buzzing sound I've ever heard coming from a PC, the apartment blew a fuse, and there was the smell of smoke in the air. I was so traumatized that I didn't dare look inside the chassis until a looong time later. :-P  When I did, I saw exploded capacitors inside the PSU along with re-frozen arcs of exploded molten material shooting off in various directions inside the casing, and other such brown blobs of melted PSU components.

But here's the funny thing... I took out the motherboard, bought a new chassis and PSU, and plugged it all in, and it booted with no problems!!!! Apparently, the PSU took the brunt of the short circuit caused by the moisture, and the mobo was unharmed. You have no idea what a huge sigh of relief I had... and the hardy little mobo continued running until about 4 years ago when I finally replaced it with a newer system because I was doing a lot of image rendering with povray and wanted to take advantage of a multicore CPU (multiple parallel renders) -- so I upgraded from single core to an AMD hexacore. :-D  The mobo is probably still functional today -- I just have to find a spare chassis to host it.

So yeah, tl;dr, PSU's tend to last shorter than mobo's. You might be lucky that your mobo is still fine, it's just the PSU that's starting to die.


> But I ordered the new hardware just in case it failed completely, and when it all got here yesterday, I figured might as well give it a try.

IME, that's almost a sure setup for disappointment. :-P  The first time I got my new mobo, I suddenly realized to my horror that the mobo is incompatible with my old RAM, sound card, AGP video card, and ... hard drives(!). So I had to go out and buy a whole buncha new stuff and adaptors. That'll teach me a lesson on not doing my research properly before shelling out the cash...


> BTW this is my first computer without a floppy disk drive. I feel naked without one. Thankfully, it has an internal speaker though, I still have my beloved beeps.

Haha... right now I'm in the predicament of no longer having a floppy drive, yet my old electronic piano still uses one, so now I can no longer copy my recordings to my PC. :-(

But speaker beeps... I hate those!!! I hate them so much, that not only I didn't compile the driver into my custom kernel, I didn't even connect the wires from the mobo to the speaker. :-P  I like my PC to be completely mute except when I ask it to make a sound.


> >You're brave. :-P  Me, I've given up on xterm long ago, and use rxvt-unicode these days.
> 
> I never got into rxvt-unicode. I use xterm and plain rxvt together. I put rxvt on the right application menu key (next to right ctrl) to pop it up instantly and I dismiss it just as fast. I sometimes have ten rxvts open though who are only acting as controlling ttys for other applications. The megabyte of virtual space it saves over xterm seems important to me....

I find xterm far too bloated and quirky for my tastes. I also like to minimize RAM usage where possible. Sadly, RAM usage for Xorg is never controllable, same goes for all browsers except Elinks. If only Elinks supported Javascript and CSS (at least rudimentary CSS), I'd be quite tempted to dump GUI browsers completely for it.


> ...though the new box has 16 GB of memory and I've never come close to using even 4 GB before.

Really?? I would've thought DMD easily soaks up 4GB if you do enough recursive CTFE / template metaprogramming... :-P


> >Speaking of which, whatever happened with your D-based terminal app from a while back?
> 
> I think I'm going to be using it now. It is working fine on this box whereas xterm is failing on me. I'm sure it has unicode issues though... but if I'm replacing my beloved, reliable xterm with it, I'll be forced to fix those eventually!

Yeah! I'd love to see the day when I can use a completely "D-certified" terminal emulator. :-P


> I think I want to change the color scheme though. I like black xterms and my thing only does white. I think. Maybe I added an option and forgot what it is.

I like off-white terminals. Better yet, if your terminal could support the xterm 256-color escape sequences... I'd totally make my text-based puzzle solver game make full use of that. :-P  Oh wait, your terminal *does* already support inline images...


> The unicode support right now btw looks like I can handle individual code points fine, but not combining characters and surely not more. Individual codepoints are probably good enough for me though.

Shouldn't byGrapheme handle most of that out-of-the-box already?  I'm assuming if you have the right fonts installed all you need to do is to hand off the grapheme sequence to the font rendering library, and it should do the Right Thing(tm)? Or is that a naïve assumption?


> The other part of my terminal emulator was also a gnu screen replacement. I got it to the point where it worked pretty well... but not well enough to break my inertia toward good old screen. Maybe I'll revisit that too though.

Ooooh, I'd love that! I do use screen a lot, but some aspects of it annoy me a lot. Like the non-transitivity of terminal settings, so $TERM doesn't get set properly, and even when it does, screen sometimes misinterprets sequences not meant for it. Ideally, screen (or your replacement thereof) should be able to detect the end user's terminal (even if it's proxied via ssh, etc.) and do the Right Thing(tm) on the server end so that applications get the right $TERM settings.


> BTW this system update seems to have changed my mutt too. Tab is
> bringing it back to the old items (marked O) instead of beeping when
> I'm out of new items (marked N). I'm not a big fan.

I have a muttrc that basically completely remaps most of the keys... I just copy it to every new PC / server / VPS I use regularly, and it saves a lot of frustration. :-)


> >Yeah, that's the downside of maintaining your own fork of stuff. Upstream (presumably) would've taken care of updating these ugly bits of code, but you don't get the benefit of that unless you regularly pull from upstream and merge, which is a lot of work to begin with.
> 
> and it kinda defeats the point: merging from upstream means I'm stuck with their new "features" too, unless I carefully go through and am really selective about keeping the changes... at which point, I think it is useless. If a bug bothered *me*, I'd fix it myself, so I don't need every bug fix from upstream anyway,

Right, so basically you lose the benefit of having upstream do the menial fixes like rename the include guard (which shouldn't even be there in the first place, but hey, C/C++ *is* the land of ugly hackery).


> >you start out and no matter how clean the initial design
> 
> well, xterm isn't clean anyway :P

Touché.


[...]
> >Shouldn't you be able to just install the good ole fonts and expunge the ugly new ones?
> 
> I tried that and then X wouldn't start. Part of what annoys me is there isn't an xorg.conf anymore. Perhaps I could add one, but by default there isn't one at all and it tries to auto configure everything. That's great when it works, but I'm not sure what to do when it doesn't.

Haha, yeah... I'd have preferred that the autogenerated config is saved somewhere, so that when the automatic system gets it wrong, I at least have a fighting chance to figure it out and fix it. I think at some point it *used* to do that. But nowadays it's just too black-boxy and I have to dig into Xorg.*.log and hope I can actually guess what went wrong. But how to fix it... no idea at all. :-/


> >The GUI emperor has no clothes, and I'm calling BS on the whole movement!  </soapbox>
> 
> I like guis sometimes. Though much of it is just me wanting to watch a youtube while doing something else in another few windows.

Well, there *are* times when GUIs are appropriate... like when watching youtube, or browsing in general (most websites suck so bad with a non-GUI interface it's not even funny... gone are the days when most of the content of a webpage is useful information, nowadays finding information is like finding a needle in a haystack of fluff and eye-candy -- but that belongs in another rant :-P), or hand-drawing diagrams in vector graphics, or doing image/video editing (though even that is mostly scriptable thanks to imagemagick). But I find the current bandwagon of shoehorning *every* possible user interaction to point-n-grunt GUI rather silly. Where would human society be if we had no language with grammatical structures capable of expressing complex ideas, but had to resort to point-n-grunts to communicate with each other? Yet when it comes to HCI the current trend is exactly to discard the medium of expressing complex concepts via grammatical constructions from simpler atoms (i.e., the Unix command-line), in favor of point-n-grunt rodent-dependent UIs. Supposedly that's "more productive", though I'm honestly baffled how anyone could believe that.


T

-- 
Who told you to swim in Crocodile Lake without life insurance??
« First   ‹ Prev
1 2 3 4 5 6