leibnitz27

Joined 9 years ago

Karma
182
Submissions
40
Member since
Aug 24
Likes the little things. 80s micros, decompilation, and pointless but fun optimizations.
View on Hacker News

Recent submissions

Comment · 10 months ago
Comment · 11 months ago
Comment · 1 year ago
I'm building a tool shed completely from scratch. Actually doing woodwork (ok ok it was also an excuse to get a nice nail gun) and seeing something tangible at the end of your efforts is surprisingly nice if your day job is entirely virtual.
Comment · 1 year ago
If it compiles, ship it. Even if it's subtly broken.....

I, for one, look forward to the contracting gigs fixing garbage code. :)

The pull back on this will be brutal.

Comment · 2 years ago
This. The adoption of LLMs for code generation, even with this statement well understood, feels inevitable, and there's going to be some amazing consultancy work fixing the garbage that gets put near production.
Comment · 2 years ago
For me, the end of the computer magazine was the end of print Dr Dobbs. For years, it was a wonderful staple that was just there. The world's a sadder place for its loss. :(
Comment · 3 years ago
Comment · 3 years ago
Can't be the only person who grew to associate anti-fingernail-biting taste with YAY BITING FINGERNAILS.
Comment · 4 years ago
Comment · 4 years ago
Comment · 5 years ago
Excel never dies, but BOY does it get worse with each iteration.

It often feels to me that in the last several releases all that's been done is apply more and more lipstick to a pig that's already 90% lipstick.

I recently fired up excel 2003 on a whim (yep, I'm that much of a party animal.)

MY GOD. It was blazingly fast. Beautiful. Usable. (If you ignore the fact that the one good change in the last 2 decades is the XLOPER12, allowing >255 rows and lots of columns). (X)

(X) Yes, Lambda looks interesting, but HOF aren't really necessary in basic sheets, I'd rather they got it usable first.

Comment · 6 years ago
I have an OSS 'fun project' - I'm still amazed by the number of issues/emails I get raised which say:

"You should rewrite in" / "Why does't it do" / "Make it do".

It's nice that people are using it. I generally (try to) assume this is a language/cultural thing, and people don't realise that they're coming across as a bit rude in English.

But, it would be nicer if people approached commenting on OSS by first thinking "Author is doing this for fun, unpaid, and I'm getting something nice out of his/her time", THEN writing their comment.

I'd get the same issues raised, and that's fine. But the language might read a bit nicer.

Comment · 6 years ago
I haven't raised mine, as I consider it to be a refinement of the bug noted in https://twitter.com/tagir_valeev/status/1210431331332689920 (Don't know if java devs have responsed to that.)

(again, reachability analysis of unrelated code changes semantics.)

The problem is that this IS defined behaviour - the scope of the instanceof-assigned variable is dependent on whether or not the taken if-statement is provably exiting.

This is intended to allow

  {
    if (!(obj instanceof String s)) return;

    // s exists now.
  }
But it's not been thought through.
Comment · 6 years ago
Nope - the if condition is not considered in flow analysis. Read the end:

https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.htm...

"14.21. Unreachable Statements It is a compile-time error if a statement cannot be executed because it is unreachable.

This section is devoted to a precise explanation of the word "reachable." The idea is that there must be some possible execution path from the beginning of the constructor, method, instance initializer, or static initializer that contains the statement to the statement itself. The analysis takes into account the structure of statements. Except for the special treatment of while, do, and for statements whose condition expression has the constant value true, the values of expressions are not taken into account in the flow analysis."

Comment · 6 years ago
negative instanceof is a disaster

I posted a bit about it here http://www.benf.org/other/cfr/java14instanceof_pattern.html

it was first noted https://twitter.com/tagir_valeev/status/1210431331332689920 here

but the main thing is that if the 'taken' conditional is guaranteed to exit, then scope hiding happens, if not, not.

But in java

if (true) { throw new Exception(); }

is not guaranteed to exit.

So: https://github.com/leibnitz27/cfr_tests/blob/master/src_14/o...

In case you don't want to run, as of java (build 14-ea+34-1452) this prints:

Fred

WIBBLE

  public class InstanceOfPatternTest10 {
    static String s = "WIBBLE";

    public static void test(Object obj) {
        if (!(obj instanceof String s)) {
            throw new IllegalStateException();
        }
        System.out.println(s);
    }

    public static void test2(Object obj) {
        if (!(obj instanceof String s)) {
            if(true) {
                throw new IllegalStateException();
            }
        }
        System.out.println(s);
    }

    public static void main(String ... args) {
        test("Fred");
        test2("Fred");
    }
}

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton