HNHacker News
TopNewBestAskShowJobs

dded

766 karma · joined December 13, 2013

submissionscomments
dded··on On compiling 34 year old C code
Would this code not have run on the VAX 11-780? I think the 780 had a 512-byte page size (and therefore I think it ought to have offered write protection at that granularity).
dded··on US Supreme Court declines to hear appeal by patent troll
I'm encouraged that patent trolls are getting knocked. But my fear is that patent law will hit such a state that only large corporations can wield them. If I'm a small patent holder, and I'm liable for court costs if I lose a suit, then it becomes far too risky to defend my patent against a corporation that violates it.
dded··on Why is reading lines from stdin much slower in C++ than Python?
> Straightforward C is slow;

I've never found it to be so, and it's not a common complaint.

dded··on Why is reading lines from stdin much slower in C++ than Python?
Nope. I doubt I did that, but even if I did, it couldn't explain the slowdown. Sometimes I needed to hold the netlist in memory (as a graph), and thus allocated space for every line anyways. (Actually, up to five times for each line: data structure, device name, source name, drain name, gate name.) Unless I ran out of memory, this never caused a significant slowdown.
dded··on Byte Magazine Smalltalk-80 Issue
Is the "Microsoft" in the ad on p 111 the Microsoft? I don't recognize that logo. The address on the ad is Bellevue, WA.
dded··on PSA: Back Up Your Shit
> but I actually /do/ throw my letters in the trash

You still send and receive letters? Somebody sits down, puts pen to paper and writes a letter? Folds it, puts it in an envelope, adds postage, and mails it?

Outside of hokey "Christmas letters" (typed once, printed, and mailed to many), I haven't seen a real letter in many years.

I'd say I envy you, but then someone else would reply and tell me that if I like letters so much I should send one. And I suppose I should, but I know I won't. I'll send an e-mail.

In any case, if I got letters I wouldn't throw them in the trash.

dded··on Why is reading lines from stdin much slower in C++ than Python?
Slight? It would turn a 10-min run into over 2 hours.
dded··on Why is reading lines from stdin much slower in C++ than Python?
Back about 15 or more years or so ago, I wrote all my small utility programs in C. These were typically small programs, but I often had a lot of (text) input data in the form of netlists. I started reading about C++, and getline() and some of the containers (that I had to build from scratch in C), so I decided that C++ was for me. There were a number of disappointments, but a big one was that C++'s getline() was more than an order of magnitude slower than fgets() (on my system etc., etc.).

With some experimenting, I discovered that even Perl was much faster than C++ with getline(). (Note that this was input of a file, not stdin as in this article.)

I've not used getline() since.

dded··on Quick tip for developers who use OS X
It at least used to be the case that GNU Readline was GPL-licensed, instead of LGPL, as to make readline a "carrot" to encourage GPL adoption. That shouldn't be an issue for bash, which is also GPL licensed.
dded··on Ask PG: Is HN Expired Link Eventual Fix Planned?
One of the worst things about expiring links is that they punish you for taking the time to read articles and long discussions. If I'm just skimming through, there's no problem with expiring links.
dded··on Very funny, gdb. Ve-ery funny
Well, things have improved a lot, but there's way more truth in what you say than there should be.
dded··on Very funny, gdb. Ve-ery funny
In the hw world we debug with waveform viewers (Simvision, DVE, and the like). You can see the value of any signal at any point in time. Move forward and backward in time. Search for when a bus switches, or even for when it switches to a particular value. You can even say "show me all points at which foo == 16'hdead and bar == 16'hbeef and x is high but y is not 8'h7."

Now I understand it's a different problem, but sometimes I think you sw guys live in the dark ages.

dded··on The Syntax vs The Spirit
And there are as many ways to spell "else if".
dded··on Ask PG: Why not use the ▲ unicode character instead of a gif on HN?
> Why aren't you using a terminal that can handle UTF-8?

Perhaps they're still on RHEL5. Many of us are.

dded··on The Command Line Crash Course
I heartily second Stiff's recommendation for Kernighan and Pike. (And being from the 80s, it assumes more of a multi-user Unix environment as apposed to a sysadmin p.o.v.)
dded··on Why CCP is still using Python 2
"Most"? Really? Most of the XP machines I know of are being used like any normal desktop machine: email, browsing, office, thumb drives, etc.

I know things are different with industrial machine control, they might be different at my doctor's office, and so forth. But I don't think those special situations add up to "most". Not yet.

dded··on Rust 0.9 released
You can put a pointer type into a library?
dded··on Homogenization of scientific computing – Python is eating other languages’ lunch
If you're an Emacs user, have you tried Esc-/ (or M-/) for autocompletion? Note that this works in any mode, not just Python mode.
dded··on Homogenization of scientific computing – Python is eating other languages’ lunch
I hope you're wrong about Lua, which I've never used. But allow me to say that I have to use Tcl, and I hate it. I want to like it, the syntax is clean and code has a nice look to it.

But the everything-is-a-string [1] semantics is awkward to deal with. As with shell scripting, a lot of what you do amounts to solving problems with quoting. I find Tcl hard to debug, and I don't like the scoping (upvar!).

I'd much rather use Emacs Lisp. In fact, Cadence uses a language of their own, called Skill, for some of their tools. It's so close to Emacs Lisp it may as well be identical, and it's far easier to deal with than Tcl.

[1] That's no longer true under the hood. But Tcl behaves as if it's true.

dded··on Homogenization of scientific computing – Python is eating other languages’ lunch
Thanks for this reply. I thought the "bizarre blind spot" comment was some sort of (absurd) thought that numpy users were unaware that C was being used under the hood.

> it eventually will catch up and surpass two-language systems for scientific computing.

Assuming that, like hardware engineers, scientists have a fair bit of general-purpose scripting to do, Julia will itself be part of a different kind of two-language solution unless it is up-to-snuff w.r.t. said general-purpose scripting. This implies libraries and good interaction with OS utilities. Any thoughts on whether or not this will be an issue with Julia?

dded··on Introducing R to a non-programmer in one hour
This fails on a Mac (10.9) and on CENTOS5 (2.6.18):

    #include <unistd.h>
    #include <fcntl.h>
    #include <stdio.h>

    int main()
    {
        int fd = creat("foo/bar", 1);
        if (fd == -1) {
            printf("error\n");
        } else {
            close(fd);
        }
        return 0;
    }
dded··on “SPDY does not clearly outperform HTTP over cellular networks” [pdf]
That'd be ~120,000 (according to Wikipedia). In case anyone else didn't know that off the top of their head.

A better analogy for Americans would be Springfield. You can almost just pick one: IL, MA, MO (OH is a bit too small).

dded··on Two Huge Companies Betting On Firefox OS
> On the phone front, LG showed off its entry level phone, the Fireweb

Interesting, given that LG just announced WebOs on their TVs: http://www.businessweek.com/news/2014-01-06/lg-unveils-inter...

dded··on Introducing R to a non-programmer in one hour
> that is, the forward-slash was part of the filename, not the path...which I didn't even know was possible on any platform

Nor did I. Which platform?

dded··on Introducing R to a non-programmer in one hour
I really like Excel for adding up columns of numbers. Any task where you want to see the data (and the quantity of data is low enough to realistically be seen) and the operations performed on the data are relatively simple and straight-forward.

But once the operations start getting more involved, I really start disliking Excel (or any spreadsheet). Excel shows the data but hides the formulas. At this point, I very much prefer a script.

dded··on Python code to solve xkcd 1313 by Peter Norvig
Thanks for the pandoc link, I'll try that tonight. My ipython does already have notebook, numpy, matplotlib, and more set-up; I didn't realize I was missing anything till I tried nbconvert.

But I've just recently installed all this, and have only kicked it around a little. Mostly, I wanted plotting.

dded··on Dijkstra on Haskell and Java (2001)
> The bottom-up people [...] only add abstractions [later]

I don't think bottom-up verses top-down are like political camps. I think it's more innate, like right-brained vs. left-brained.

I can't understand abstractions till I first understand the lower level. I could never learn algebra without first learning arithmetic. (BTW, I'm old enough to have lived through the New Math philosophy which insisted that every grade school text book start with a chapter on set theory before moving on to, say, fractions.) This doesn't mean that I can't start with a functional model, but it does mean that I start with simple functions and move up.

dded··on Dijkstra on Haskell and Java (2001)
Haskell is a relatively difficult language to try. Introductions and books almost seem to expect you to understand the syntax when you begin. And I/O is introduced late, which makes it hard to play around with.
dded··on Dijkstra on Haskell and Java (2001)
> Before people can write "Hello world", they're told they have to write "public static void main(String[] args)"

Bootstrapping is hard. My introduction was in Fortran, and I had written a couple of sort implementations before I ever learned to enter an array by any means other than hard-coding it into the program. Kernighan and Ritchie did an excellent job with bootstrapping programming concepts in their book on C.

And, somewhat off-topic, but since you mentioned Hello World and I mentioned K&R, it's worth noting that K&R's meaning when they said that Hello World was the first program you should write in any language was that you need to be able to run something. You have to be able to enter the program, compile it, link it, run it. Today a book can offer an example for Linux, one for Windows, and one for Mac and cover nearly everyone. Not so simple in 1978, when K&R first came out, so they basically tell you to get Hello World running with the help of a local expert (perhaps a teacher), and then come back to the book and start learning.

dded··on Dijkstra on Haskell and Java (2001)
> It's a shame more classes don't actually just have all 100 students work together on a single code base - it would be incredibly beneficial

I up-voted your comment as a whole, but I really disagree with this statement. It's reality in many situations, but I think it's a shame that anyone has to work together with a team of 100 on anything, ever. You deal with it, and you solve the problems associated with it, but those are problems of management and process.

← PreviousPage 3 of 7Next →