Tiomaidh

Joined 16 years ago

Karma
379
Submissions
121
Member since
Jun 22
Student. Java dev (hey, it pays), Lisp and Python hacker. Also a Scottish fiddler and hispanohablante.

http://www.tsmacdonald.com, although there's not a whole lot there.

View on Hacker News

Recent submissions

Comment · 15 years ago
To play devil's advocate, wouldn't the exact same thing be possible with the above alternatives and Armed Bear Common Lisp? You can write full-stack in Common Lisp, it's just that different parts need to go through different compilers/interpreters/transformers/what-have-you. Just as it is with Clojure.

No, I think the thing to note here is that Clojure--for reasons I can only guess at--has a lot more sex appeal than CL.

Comment · 15 years ago
For debugging via print statements:

    public int echo(int x, String name)
    {
        System.out.println(name + ":\t" + x);
        return x;
    }
(I also have versions with only x as an argument, and with the other types).

In use:

    this.setPreferredSize(new Dimension(getPreferredSize.getWidth(), echo(getViewportHeight(itemCount), "Viewport"));
In addition to sparing me from System.out.println verbosity, it's really useful in situations like the above where the value you want to print isn't bound to a variable.
Comment · 15 years ago
What's to stop me from a) Submitting multiple requests b) Using a bot to submit a LOT of requests to bug the heck out of someone c) Using a bot to submit a LOT of requests and DOS betannoyer.com ?
Comment · 15 years ago
Nice/Useful.

Internal Server Error the first time I tried to load comments. (And every time afterwards.)

And it's kind of a bummer not to be able to log in and comment, upvote, etc. I understand it's a MVP though, so presumably that's coming. I'd offer to help a little, but I know Python, Lisp, and Java--not PHP, JS, and CSS, so sorry.

Comment · 15 years ago
Is it just me, or is everything the same except the colors?
Comment · 15 years ago
...and I was feeling reasonably good about reaching #18 efficiently. But don't really have the time to burn to claw my way up another 15 places. I was hoping that the raffle would be weighted by the number of points you have...oh well. Time to just hope I'm lucky.

By the way--thanks for babysitting this thread and responding to everyone.

Comment · 15 years ago
Thanks.

Also: I take it that you have to be in the top 10 to get something? Or is it that the top 3 get something, and 10 others are randomly selected to win a book? The award system is not explained too clearly...

Comment · 15 years ago
It's too bad they don't also give away the dead-tree version. Some things are nice to actually have on your shelf...
Comment · 15 years ago

    public class Singleton {
        private static Singleton self = null;
        private Singleton() {
            //...
        }
        public static Singleton getInstance() {
            if(self == null) {
                self = new Singleton();
            }
            return self;
        }
        ...
    }
So at any point in your code you can call Singleton.getInstance() to have access to the same Singleton object. So it's effectively the same thing as a global variable.

Edit: Added `static' to be more correct.

Comment · 15 years ago
Sure I perform window operations, but they're not nearly the same thing as using Windows--which entails a lot more than using windows.
Comment · 15 years ago
Comment · 15 years ago
As a big CLI fan, I mostly agree, especially with respect to launching programs. But as far as I see there's two big obstacles: 1) Many names are somewhat-obscure in the interest of shortness. But are therefore a bit harder to remember. Compare "ls" with "list-files". 2) Many programs (especially interactive programs)--text editors, office programs, file managers, web browsers--are, I think, more intuitive with a mouse. Want to open that link or edit that textbox? Click it. Want to move that file? Drag it.
Comment · 15 years ago
Both with essays and coding, there've been times when I was very grateful that there was a fixed moment in the document's life that I could easily go back to. Sometimes I start making changes and then think better of it[1]. Sometimes I edit something accidentally, and am very relieved that I'm asked whether I want to save my changes upon exiting the program. A possible solution is to have both normal saving and continuous autosaving to a backup file (as Word, Vim, etc. all do), but in practice that's a bit clunky.

[1] - Yes, I could hit the undo button repeatedly, since any editor worth its salt will have a virtually-unlimited undo. But it's reassuring to know that you've undo-ed to exactly the right point--in Vim, at least, the "+" indicating a modified file disappears once you've undone all your changes.

Comment · 15 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton