[OT] unbelievable: #ifdef _OTHER_LIB_H

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 26 14:20:37 PST 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??


More information about the Digitalmars-d mailing list