davidhollander

Joined 16 years ago

Karma
996
Submissions
276
Member since
Dec 11
.
View on Hacker News

Recent submissions

Comment · 12 years ago
I've implemented pure LuaJIT servers (without libuv) which compare favorably to nginx in terms of latency and performance. But you should consider whether or not you will need SSL\HTTPS support. libuv is only an IO loop and will not provide this out of the box like nginx. Encryption is important and non-trivial. Most of the projects I've seen end up back at C and embedded Lua\LuaJIT (similar to OpenResty) rather than writing bindings and tests for SSL in the LuaJIT FFI because of this.
Comment · 13 years ago
Linux has natively supported xbox 360 controllers through the xpad kernel driver for a number of years, and Windows asks to install drivers when you plug in the controller.
Comment · 13 years ago
> but let's say something like X. Or your average window manager. Or, say, almost anything from GNOME.

This doesn't apply to embedded Linux, or Linux for servers, which could be argued to be just as "traditional" a use case as Linux for desktops.

Additionally, for the desktop use case, nearly every distribution uses a different window manager anyway. There are such a wide variety of window managers, I wouldn't know how to compute an "average" between them in a meaningful way. Although I use Linux for a desktop everyday, I don't have GNOME installed, and I would barely notice if X was missing and replaced by Wayland or a different component.

> I think it's misleading to read "Linux" and imagine "desktop GNU/Linux with all the trimmings."

Right. It's not Linux for the desktop, or Linux for the phone, or Linux for embedded devices, or Linux for servers, it's Linux for the living room. My point is that due to the diversity of the Linux ecosystem, there really wasn't such a thing as a "traditional" or "average" Linux Desktop in the first place, and that we can't even say Linux for desktop is the "traditional" or "average" use of Linux. Anything running the Linux kernel should be able to call itself Linux, without qualification.

Comment · 13 years ago
What are your definitions for "traditional Linux userspace software" and "traditional Linux users"? Do you consider Android to be "Linux"?
Comment · 13 years ago
> Unless you have lots and lots of time to spend micro-optimizing everything, you'll get better performance writing in Haskell.

This is stating the case too strongly. Performance wise, the naive, unoptimized solution in Haskell (ex. using the default String type instead of Data.ByteString, number crunching using lots of iteration\recursion) is going to be much slower than than the naive, unoptimized solution in C or Lua. However, for a given subset of the range between "zero" and "micro" levels of optimization, for a given problem, Haskell may still represent the local maximum.

Comment · 13 years ago
In a multi column layout, I might wish to alter the width of the web browser in the primary column somewhere between 30% to 68%, in 2% increments, by simply tapping [Win+L] to increase its width, or [Win+H] to decrease its width, without worrying about whether it is the focused window, and without worrying about having to focus or adjust any other window after the keystroke was made to prevent overlapping.

If you want a layout where a web browser takes up 60% of the width, and two terminals take up 20% of the width, it becomes not only possible but relatively easy.

Comment · 13 years ago
I have found cascading to be an unhappy medium in the past. In awesome-wm, I'll tap [Win+Space] to toggle between 100% overlapped (fullscreen with unoccluded task bar) and 0% overlapped (multi-column horizontal). [Win+J] and [Win+K] cycle windows. [Win+H] and [Win+L] resize the width of the primary column in a multicolumn layout.

So let's say I have a terminal window with VIM, and a web browser with a tutorial or documentation open up to the left of it. I quickly need to scroll the web page down to continue the example, BUT the VIM window is currently focused. Assuming the web browser can be scrolled using [J] and [K], I'll simply tap [Win-K, J, Win-J] to accomplish this task while avoiding modifying the layout or leaving the home row to use a pointing device. If I don't actually need to display multiple columns at the same time, I just press the change layout key to stop using a multicolumn layout.

So as a VIM user I've been very happy with this setup in awesome-wm for the past 2+ years, but if you wish to recommend an alternative I will definitely give it an install.

edit: I was able to write a new layout function for awesome-wm which implements diagonal cascading in the manner you described and retains my keybindings. I definitely agree that cascading makes it bluntly obvious which window is the currently focused one. I'll have to play around with it more.

Comment · 13 years ago
To me the most important factor for developing on a laptop mentioned in the article is the use of a tiling window manager.

For me an incredibly common task in web development is to have a web browser and 1 or more terminal windows tiled horizontally, side by side, in an [ A | B ] or [ A | [ B | C ]] configuration, where A is a web browser, and B and C are terminals.

In order for this to work for me on a screen resolution <= 1920x1080, the ratio ( width of A ) / ( width of screen ) should be dynamically adjustable using a single key combo, without causing window overlapping. If this ratio is fixed, and cannot be dynamically adjusted by the window manager, I experience one or more of the following problems at any given moment:

1. the web browser window is too narrow, causing wide documents to be clipped and a horizontal scroll bar to appear.

2. A terminal window is wider than 80 characters, causing unnecessary screen area to be consumed which could be better allocated toward the web browser.

3. A terminal window is less than 80 characters in width, preventing the entire line of code from being displayed.

To me Linux is the ideal laptop OS because it's the easiest OS to install a tiling window manager on, and a tiling window manager is what maximizes the platform's primary constraint: small screen area.

Comment · 13 years ago
I think this page supports your assessment:

http://www.google.com/ideas/projects/arms-visualization/

> "Global illicit networks — from drug smuggling and arms dealing to human trafficking and organ harvesting — affect millions of people across the world, generating over $2.1 trillion every year. Existing, publicly available information about illicit networks is often not presented in a format that allows the patterns of trade to be easily understood. Applying the power of data visualization to this information can enable a greater understanding of the underlying mechanics of these networks, which in turn can lead to much more targeted and effective efforts to counter them."

This paragraph makes it sounds like they are interested in illicit activity in a general and abstract sense and are considering participating in the War on Drugs.

Comment · 13 years ago
Anonymous Callbacks != Callbacks

Callbacks have been around forever in C using named functions, and are not specific to either the current generation of programming languages or programmers. One can still use a named function instead of a locally constructed lambda to represent a callback in a high level languages.

The primary difference is that when declaring named functions non-locally, one must explicitly share state through the parameter rather than implicitly sharing state through lexical scoping. It seems more accurate to label the problem of nesting lambdas to the point of ambiguity as "Lambda Abuse" or "Lexical Scoping Abuse" rather than "Callback Hell".

Comment · 13 years ago
> After you have run those commands, simply restart the SSH daemon so it starts up with the new keys in place

I believe if your version of OpenSSH is up to date, sshd will read the host key each time a session is opened and does not need to be restarted.

Comment · 13 years ago
Comment · 13 years ago
Comment · 13 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton