kssreeram

Joined 17 years ago

Karma
339
Submissions
29
Member since
Sep 8
Working on better programming tools.

Follow me at: https://twitter.com/kssreeram

View on Hacker News

Recent submissions

Comment · 2 years ago
I can see that.

For me, it did replace ChatGPT for one reason: The convenience of a lightweight Iris window being just a hotkey away.

Comment · 2 years ago
I guess having to enter the API key is not a great user experience for regular people who aren’t developers.
Comment · 2 years ago
Comment · 15 years ago
“People talk about pivoting all the time now, but if something isn’t working after four months, we’ll just shoot it in the head and start again,”

Early adopters beware. If the idea doesn't work out for them, they'll pull the product from under you.

Comment · 16 years ago
The title is misleading. It's an implementation of _a_ concatenative language. It's not Factor.
Comment · 16 years ago
We are currently using Clay for a few projects within Tachyon for performance sensitive code. It's simply being used as a better C, and since Clay can generate light-weight C compatible DLLs, it fits in very well.

Quillpad itself predates Clay and hence doesn't use it.

Comment · 16 years ago
You can control type specialization to a certain extent with overloading. For instance, if a procedure takes two arguments, and if both these types can vary independently, then you can use overloading to ensure that both arguments are converted to a common type.

    procedure foo;
    
    [T1,T2]
    overload foo(a:T1, b:T2) {
        // by default, convert both arguments
        // to the type of first argument.
        foo(T1(a), T1(b));
    }
    
    // the following overload specializes for the case
    // when both arguments are of the same type.
    [T]
    overload foo(a:T, b:T) {
        ...
        implement the logic here
        ...
    }
Comment · 16 years ago
Hi. Pointers to type T have the type Pointer[T]. '&' operator is for getting the address of a lvalue, and the '^' operator is for dereferencing. '^' is a better choice than C's '*' for dereferencing because, I can conveniently use the same operator for dereferenced field-access too, whereas C had to invent another operator "->" for that.

    record Point[T] {
        x : T;
        y : T;
    }
    
    updateViaPointer(ptr) {
        ptr^.x += 1;
        ptr^.y += 2;
    }
    
    test() {
        var p = Point(10, 20);  // type will be inferred as Point[Int]
        updateViaPointer(&p);
    }
Comment · 16 years ago
> Generic programming is something you can do in any language, ...

That's not true.

Generic Programming is about writing re-usable code that is also very efficient. On the whole, it requires the following:

- Static types

- Overloading

- Type-parametric functions (templates)

- Type specialization.

Not all languages have these features.

Generic programming first took off with C++, when it introduced templates. But a few languages before and after C++ have supported generic programming: Ada, Haskell, D, etc.

edit: formatting.

Comment · 16 years ago
Comment · 16 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton