September 16, 2013
On Sun, Sep 15, 2013 at 05:56:50PM +0200, Paulo Pinto wrote:
> Am 15.09.2013 16:24, schrieb H. S. Teoh:
> >On Sun, Sep 15, 2013 at 07:04:25AM +0200, Paulo Pinto wrote:
[...]
> >>At the begining of my UNIX days, it was a pleasure to use the usual set of APIs, which tend to be less convoluted than on Windows.
> >>
> >>Then I started looking into X11 programming with Xlib and Motif, and could not believe that they managed to make it even more complex than any other desktop graphics programming API!
> >[...]
> >
> >Once, in college, I had the totally hare-brained idea of *printing* out the Xlib documentation. Through the department's printer service. It came out as a stack of paper 6 *inches* thick (you do the math as to how many pages that is), which I still have today for posterity. :-P
> >
> >
> >T
> >
> 
> I can imagine, I remember the stack of books O'Reilley used to sell.
> 
> The department guys were very happy with you I guess. :)
[...]

Hehe... fortunately, the printer service was managed by a dedicated team, and I'm guessing they're pretty used to big jobs every now and then. I did get strange looks from them, though. :-)


T

-- 
There are four kinds of lies: lies, damn lies, and statistics.
September 16, 2013
On Sun, Sep 15, 2013 at 07:14:17PM +0200, Dicebot wrote:
> On Saturday, 14 September 2013 at 10:32:26 UTC, Nick Sabalausky wrote:
> >My understanding (purely from the link below) was that /usr/local/* was *specifically* for non-package-managered stuff, whereas /usr/* was *specifically* for package-managered things:
> >
> >http://unix.stackexchange.com/questions/8656/usr-bin-vs-usr-local-bin-on-linux
> 
> Not entirely true. You should never have anything not managed by package manager on Linux system, it is a reliable road to disaster. Better distinction is "/usr/" for packages from official repos, "/usr/local" for own custom packages.

Seriously? I installed unmanaged stuff all the time, and never had much of an issue. Though, granted, I never put them under /usr or /usr/local at all. It's usually in a dedicated subdirectory under $HOME.

Installing unmanaged stuff under the /usr tree is tricky business, because when you're trying to *uninstall*, you usually don't remember where all the bits have been scattered, and leaving them lying around can lead to trouble.


T

-- 
Without geometry, life would be pointless. -- VS
September 16, 2013
On Sun, Sep 15, 2013 at 05:04:43PM +0400, Dmitry Olshansky wrote:
> +1 for Sublime to stay on topic
> 
> OT:
> 
> I couldn't read the whole thread but...
> I wish to see this kind of burning passion during the Phobos code
> reviews ;)
[...]

+1. We need more Phobos reviewers (and that includes *everyone*... as people have said before, you don't need commit privilege to review, anyone can leave comments on the pull requests -- and we need all the extra eyes we can get).


T

-- 
"I'm running Windows '98."
"Yes."
"My computer isn't working now."
"Yes, you already said that."
-- User-Friendly
September 16, 2013
On Sunday, September 15, 2013 18:53:58 H. S. Teoh wrote:
> On Sun, Sep 15, 2013 at 07:14:17PM +0200, Dicebot wrote:
> > On Saturday, 14 September 2013 at 10:32:26 UTC, Nick Sabalausky
> > 
> > wrote:
> > >My understanding (purely from the link below) was that /usr/local/* was *specifically* for non-package-managered stuff, whereas /usr/* was *specifically* for package-managered things:
> > >
> > >http://unix.stackexchange.com/questions/8656/usr-bin-vs-usr-local-bin-on-> > >linux>
> > Not entirely true. You should never have anything not managed by package manager on Linux system, it is a reliable road to disaster. Better distinction is "/usr/" for packages from official repos, "/usr/local" for own custom packages.
> 
> Seriously? I installed unmanaged stuff all the time, and never had much of an issue. Though, granted, I never put them under /usr or /usr/local at all. It's usually in a dedicated subdirectory under $HOME.
> 
> Installing unmanaged stuff under the /usr tree is tricky business, because when you're trying to *uninstall*, you usually don't remember where all the bits have been scattered, and leaving them lying around can lead to trouble.

Which is exactly why you shouldn't do it normally. If fact, I would argue that you should pretty much _never_ install stuff not managed by the package manager in /usr. /usr/local is a different matter, because it's not usually managed by the package manager, but you still have to be very careful with it. Putting unmanaged stuff in dedicated subdirectories in $HOME is definitely a better approach.

- Jonathan M Davis
September 16, 2013
On Monday, 16 September 2013 at 01:48:31 UTC, H. S. Teoh wrote:
> Have you ever tried to configure sloppy focus on Windows?

yup. It kinda works until you get the idiot apps that raise themselves whenever they get focus! Which are a lot of them. Ugh.

> <rant about inability to do this in Windows deleted/> ;-)

I think you can with add ons...

> Heh. I just use 'bg', 'jobs', and 'fg' on a single terminal. :)

Yeah, I do that sometimes too, but you can get output mixed together! And you can't easily watch for updates without that. So I like to use windows and gnu screen. The windows actually come and go, as I just reattach a running screen session when needed.

I also really like the taskbar as a way to see everything (not iconfied in this workspace) at once. Blackbox doesn't have one by default, which is actually why I played with KDE at first for a while, but I got sick of that so I wrote my own. Nothing fancy (I'm tempted to port it to D though and add a few little features), but gives me at-a-glance updates and an easy way to find certain tasks.

My custom taskbar also disappears on workspaces 6, 7, and 8, which I use to display full-screen rdesktop and VM instances. By spinning my mouse wheel on the edge of the screen, I can pretend to be on various Windows boxes too!


I always have at least one xterm open with a screen session: 0 = where I run mplayer and other media players for background sound. 1 = mutt. 2 = alsamixer. 3 = elvis on a note-to-self file.

Then there's three gaim windows: the buddy list, the #d chatroom, and a chat with myself (Where I dump extra notes, and if someone else IMs me, it goes in that window instead of popping up a new one so much better.)

And usually gimp for looking at work mockups.


And everything else is random projects in rxvts or xterms (depending on if I need unicode or not - my rxvt doesn't support utf8). They are generally screen for bigger, longer running things, 0 = vim with all relevant source files open, screen 1 maybe make or debugger or ssh session, depending on the job.

I currently have 28 copies of rxvt and/or xterm open, just stuff I'll get back to eventually.


I actually used to run a second copy of X as well, on vt8, for full screen games, but I haven't played full screen games for a long time. I'd do a separate copy so it wouldn't mess up my other windows when changing the resolution or crashing.


Switching between the rxvts is easy btw: I can click them on the mousebar, wheel to a new workspace, or I have a bunch of keyboard shortcuts set up, all using the Windows key. Then at times I run nested screens, especially on the laptop.


Anyway though I love it because I can have so many more things open than I could ever handle on other systems.
September 16, 2013
On Sun, Sep 15, 2013 at 04:49:58PM -0400, Nick Sabalausky wrote:
> On Sun, 15 Sep 2013 19:18:14 +0200
> Joseph Rushton Wakeling <joseph.wakeling@webdrake.net> wrote:
> 
> > On 13/09/13 21:48, Namespace wrote:
> > > Just out of interest.
> > >
> > > I use Sublime 2, Notepad++ and as IDE currently Mono-D. But I will try this evening VisualD.
> > 
> > Vim, on Ubuntu. :-)
> > 
> > The actual reason is rather trivial.  I've always favoured a mixed tab-space indent style for code ("tabs for indentation, spaces for alignment"), as described here: http://www.emacswiki.org/emacs/SmartTabs
> > 
> 
> I love that comic!
> 
> I actually did the same tab/space thing for awhile. But my editors didn't really have a native understanding of it so it became manual editing of invisible characters, so now I just avoid that style of alignment regardless of tabs or spaces. Ie, instead of:
> 
> foobar(aaaaa, bbbbb, ccccc,
>        dddd, eeeee, fffff);
> 
> I'll just do:
> 
> foobar(
>     aaaaa, bbbbb, ccccc,
>     dddd, eeeee, fffff
> );
> 
> Not as pretty,

I disagree. I think it's prettier. :) The first style above has the disadvantage that the exact amount of indentation is usually a non-integral multiple of the indent size of the rest of the code, which I find jarring.


> but it works, it makes things simpler, Plus it avoids the former style's tendency to wind up with gigantically-sized indents.

Yeah... I'm torn between the two. The first style saves vertical space, which is important to me, but the second style makes more sense IMO, plus it lets you format complicated nested expressions in a nicer way, i.e.:

	foobar(
		isNumber(x) ?
			aVeryLongNestedExpression :
			anotherVeryLongNestedExpression,
		isIdent(y) ?
			yetAnotherVeryLongExpression :
			guessWhatAnotherLongExpression,
		(
			(x*x + y*y)^^2 +
			(z*z + w*w)^^2 +
			2.0*(
				sin(x+y-z)^^2 +
				cos(x-y+z)^^2
			)
		) - (
			3.0*(
				tan(x+y+z)^^2 +
				sec(x-y-z)^^2
			)
		),
		(real x, real y) {
			return (
				someConvolutedCode(x) +
				moreConvolutedCode(y)
			) - (
				hahaImHavingFun(x+y) +
				makingUpStuff(x-y)
			);
		}
	);


T

-- 
Once the bikeshed is up for painting, the rainbow won't suffice. -- Andrei Alexandrescu
September 16, 2013
On 16/09/13 11:47, H. S. Teoh wrote:
> On Sun, Sep 15, 2013 at 07:32:48PM +0200, Adam D. Ruppe wrote:
>> On Sunday, 15 September 2013 at 16:50:50 UTC, Dicebot wrote:
>>> After I have switched to Gnome Shell I can't use any other desktop
>>> manager comfortably.
>>
>> This is actually feel about my custom setup based on the Blackbox
>> window manager. It has a lot of little differences from the other
>> common options:
>>
>> 1) sloppy focus. omg it is so much better than click to focus
>
> Back when I was still using a GUI, sloppy focus was one of the only
> things that made it tolerable to use.

I kind of agree but I use "focus follows mouse" rather than sloppy.  I could never understand why most windows managers make "click to change focus" the default as clicking inevitably raises the newly focussed window to the top as well as changing the focus.  This greatly reduces flexibility when managing overlapping windows.

Peter
PS One of the reasons that I dumped Gnome 3 for Cinnamon is that the Gnome people seem determined to remove all user configuration options (in the pursuit of an homogenous desktop) and I figured that it was only a matter of time before they removed the ability to choose what type of focus control one wanted.  They'd already removed the ability to configure some things that I always changed from the default.
September 16, 2013
On Mon, Sep 16, 2013 at 04:04:24AM +0200, Adam D. Ruppe wrote:
> On Monday, 16 September 2013 at 01:48:31 UTC, H. S. Teoh wrote:
> >Have you ever tried to configure sloppy focus on Windows?
> 
> yup. It kinda works until you get the idiot apps that raise themselves whenever they get focus! Which are a lot of them. Ugh.

Exactly. A major annoyance when you're trying to type something while looking at something else in another window for reference.


[...]
> >Heh. I just use 'bg', 'jobs', and 'fg' on a single terminal. :)
> 
> Yeah, I do that sometimes too, but you can get output mixed together! And you can't easily watch for updates without that. So I like to use windows and gnu screen. The windows actually come and go, as I just reattach a running screen session when needed.

GNU screen is pretty awesome. But it has some warts that makes me not use it by default:

- Its default escape sequence is extremely annoying (ctrl-A clashes with
  bash's go-to-beginning-of-line, which I use literally *all* the time).
  Switching it to something like ctrl-U makes it more tolerable.

- It doesn't seem to pick up terminal settings correctly sometimes.
  Which results in needing to set $TERM manually, or type
  `TERM=rxvt-unicode program args`, instead of just `program args`.
  Quite annoying.


[...]
> I always have at least one xterm open with a screen session: 0 = where I run mplayer and other media players for background sound. 1 = mutt. 2 = alsamixer. 3 = elvis on a note-to-self file.

Heh, my ratpoison setup is pretty similar to your screen setup (ratpoison is essentially X11 windows inside GNU screen) : 0 = main rxvt (terminal for generic stuff, like poking around $HOME, reading manpages, editing TODO lists, etc.), 1 = browser, 2,3,... = other dedicated stuff, depending on what I'm working on.  Currently I have 2 = media players, 3 = D-related stuff (mostly for browsing Phobos when I need to look up something, or pulling git HEAD for dmd/druntime/phobos when I'm feeling bored).

Within each rxvt, I usually have vim opened to whatever I'm working on. I don't actually have multiple suspended jobs except when I'm working on something intensive, like working on a Phobos pull while editing /tmp/test.d for testing various implementation details, sometimes with `objdump -D | less` viewing the disassembly of some problematic code, or a manpage I'm referencing.


[...]
> And everything else is random projects in rxvts or xterms (depending on if I need unicode or not - my rxvt doesn't support utf8). They are generally screen for bigger, longer running things, 0 = vim with all relevant source files open, screen 1 maybe make or debugger or ssh session, depending on the job.
> 
> I currently have 28 copies of rxvt and/or xterm open, just stuff I'll get back to eventually.

Whoa, that's a lot. I usually have only 3-4 things open at a time, sometimes more (at work usually 6-7), but ratpoison is annoying in that having more than 9 things open causes slow switching 'cos you can't just do ctrl-T <digit>. It slows me down enough to lose the advantage of fast keyboard-driven switching, so I avoid it.


> I actually used to run a second copy of X as well, on vt8, for full screen games, but I haven't played full screen games for a long time. I'd do a separate copy so it wouldn't mess up my other windows when changing the resolution or crashing.

Heh. I used to have *three* X servers running, keyed to vt7, vt8, vt9, for 3 simultaneous login sessions, multiplexed by xdm. I still use xdm for X sessions, but nowadays I only have one instance of X running -- it's sorta a historical accident, xdm at some point in the past somehow stopped working properly with multiple local X servers (either that, or the X server didn't like other copies of itself running on the same machine), and I gave up trying to make them coexist peacefully, so I adapted my usage pattern to fit in a single session instead.

(Why multiple sessions, you ask? 'cos at one point I was experimenting with different WM setups to see which one(s) I like better, but I still wanted to continue working on whatever it is I was working on without interruption, so having multiple copies of X running allowed me to keep one long-running session for the continuing work, and other sessions that come and go as I play around with stuff. It also made it less prone to X11 upgrade problems -- there was a time when every other X server upgrade carried a risk of outright breaking into little pieces, but I like to live on the bleeding edge so I always upgrade everything. Having multiple sessions open means I can continue doing stuff with the long-running session while trying to fix the broken X server instead of getting interrupted and dropping back to the Linux consoles.)


> Switching between the rxvts is easy btw: I can click them on the mousebar, wheel to a new workspace, or I have a bunch of keyboard shortcuts set up, all using the Windows key. Then at times I run nested screens, especially on the laptop.

In ratpoison, it's just `ctrl-T <digit>` to switch between them.

TBH, I'm still not quite happy with the choice of escape sequence. If I had my way, I'd rather have <windowsKey> <F1..F12> instead. Maybe one of these days I'll write a D replacement for ratpoison that does just that. (Ratpoison does let you configure the escape key, but it doesn't work with <windowsKey> for some stupid reason).


> Anyway though I love it because I can have so many more things open than I could ever handle on other systems.

Yeah, people can rant and rave about how Linux sux and what-not, but the fact of the matter is, I could run 3 copies of X11, each with 15 windows open on a Pentium with 128MB RAM, and be fully functional, whereas it takes every last drop of juice the system's got just for Windows'98 to run without taking 3 seconds to paint the screen pixel-by-pixel every time you open/close a window. Of course, this is an unfair comparison, because those 3 copies of X11 are running twm, which, besides ratpoison, is as minimal as you can get, whereas Windows'98 is running some resource hungry graphics-intensive GUI. But the point is that the system lets you use a minimal WM should you choose to, rather than in Windows where you *have* to use whatever MS has decided everyone must use, and it's too-bad-so-sad if you need to upgrade your hardware just to be able to continue using it.


T

-- 
MSDOS = MicroSoft's Denial Of Service
September 16, 2013
On Sun, Sep 15, 2013 at 06:59:24PM -0700, Jonathan M Davis wrote:
> On Sunday, September 15, 2013 18:53:58 H. S. Teoh wrote:
> > On Sun, Sep 15, 2013 at 07:14:17PM +0200, Dicebot wrote:
> > > On Saturday, 14 September 2013 at 10:32:26 UTC, Nick Sabalausky wrote:
> > > >My understanding (purely from the link below) was that /usr/local/* was *specifically* for non-package-managered stuff, whereas /usr/* was *specifically* for package-managered things:
> > > >
> > > >http://unix.stackexchange.com/questions/8656/usr-bin-vs-usr-local-bin-on-> > >linux>
> > > Not entirely true. You should never have anything not managed by package manager on Linux system, it is a reliable road to disaster.  Better distinction is "/usr/" for packages from official repos, "/usr/local" for own custom packages.
> > 
> > Seriously? I installed unmanaged stuff all the time, and never had much of an issue. Though, granted, I never put them under /usr or /usr/local at all. It's usually in a dedicated subdirectory under $HOME.
> > 
> > Installing unmanaged stuff under the /usr tree is tricky business, because when you're trying to *uninstall*, you usually don't remember where all the bits have been scattered, and leaving them lying around can lead to trouble.
> 
> Which is exactly why you shouldn't do it normally. If fact, I would argue that you should pretty much _never_ install stuff not managed by the package manager in /usr. /usr/local is a different matter, because it's not usually managed by the package manager, but you still have to be very careful with it. Putting unmanaged stuff in dedicated subdirectories in $HOME is definitely a better approach.
[...]

For unmanaged stuff, I usually prefer to put each application in their own filesystem subtree, like /usr/src/${appname}/root (which is also just next to where I usually build the source to begin with), instead of mixing everything together like in /usr or /usr/local. That way, if something misbehaves, I can just use `rm -rf` to kill it off without needing to dig through /usr/local/bin, /usr/local/share/man/man*, /usr/local/lib, /usr/local/share, and who knows where else to find all the bits to clean up.


T

-- 
Acid falls with the rain; with love comes the pain.
September 16, 2013
On Mon, 16 Sep 2013 12:09:15 +1000
Peter Williams <pwil3058@bigpond.net.au> wrote:

> On 16/09/13 11:47, H. S. Teoh wrote:
> > On Sun, Sep 15, 2013 at 07:32:48PM +0200, Adam D. Ruppe wrote:
> >> On Sunday, 15 September 2013 at 16:50:50 UTC, Dicebot wrote:
> >>> After I have switched to Gnome Shell I can't use any other desktop manager comfortably.
> >>
> >> This is actually feel about my custom setup based on the Blackbox window manager. It has a lot of little differences from the other common options:
> >>
> >> 1) sloppy focus. omg it is so much better than click to focus
> >
> > Back when I was still using a GUI, sloppy focus was one of the only things that made it tolerable to use.
> 
> I kind of agree but I use "focus follows mouse" rather than sloppy. I could never understand why most windows managers make "click to change focus" the default as clicking inevitably raises the newly focussed window to the top as well as changing the focus.  This greatly reduces flexibility when managing overlapping windows.
> 

While I'm happy with click-to-focus[1] due to my many years with windows, I still have to say "click before the scroll wheel will actually work" is one of the biggest, most ridiculous GUI design blunders out there. It's exactly like requiring the user to click a control before right-click/middle-click/ctrl-click will work.

I think I've mentioned this in other threads, but on XP I used KatMouse[2] to fix that, and it was a HUGE usability improvement. Unfortunately, on Win7 it only works a small fraction of the time. And that's unlikely to change because it's closed source abandonware, just like all-too-many freeware apps on windows. (Honestly, I never understood the windows developer culture of producing closed-source freeware.)

[1] As long as the click-to-focus isn't "click a button in a different window and then click the same button *again* to make the button actually *receive* the 'clicked' event."

[2] KatMouse: http://ehiti.de/katmouse/

> PS One of the reasons that I dumped Gnome 3 for Cinnamon is that the Gnome people seem determined to remove all user configuration options (in the pursuit of an homogenous desktop)

That's the main thing that's kept me away from GNOME 3. If I want people stealing my ability to make my own choices and let them unilaterally decide what I want on my behalf, then there's already plenty of propriety Oses, both desktop and mobile, that are happy to do that for me. (Oh, shit, but now I need to find a self-appointed vicar to make *that* choice for me...)