HNHacker News
TopNewBestAskShowJobs

kssreeram

339 karma · joined September 8, 2009

Working on better programming tools.

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

submissionscomments
kssreeram··on Show HN: Open-source macOS AI copilot using vision and voice
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.

kssreeram··on Show HN: Open-source macOS AI copilot using vision and voice
I guess having to enter the API key is not a great user experience for regular people who aren’t developers.
kssreeram··on Show HN: Open-source macOS AI copilot using vision and voice
People reading this should check out Iris[1]. I’ve been using it for about a month, and it’s the best macOS GPT client I’ve found.

[1]: https://iris.fun/

kssreeram··on Milk: Kevin Rose's New Company Aims to Solve Big Problems on the Mobile Web
“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.

kssreeram··on Factor implementation in 150 lines of Python
The title is misleading. It's an implementation of _a_ concatenative language. It's not Factor.
kssreeram··on Clay: A new language for generic programming (based on LLVM)
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.

kssreeram··on Clay: A new language for generic programming (based on LLVM)
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
        ...
    }
kssreeram··on Clay: A new language for generic programming (based on LLVM)
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);
    }
kssreeram··on Clay: A new language for generic programming (based on LLVM)
> 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.

kssreeram··on Clay: A new language for generic programming (based on LLVM)
I implemented goto because I've seen it being useful in other languages. That said, there's no other occurrence of goto in clay.

http://stackoverflow.com/questions/24451/goto-usage

kssreeram··on Clay: A new language for generic programming (based on LLVM)
Hi folks, I'm the author of Clay. There aren't any docs ready yet, but I'll try to answer whatever questions I can. Also, there's a long thread over at reddit with many interesting questions.

http://www.reddit.com/r/programming/comments/ctmxx/the_clay_...

kssreeram··on Ad Hominem Is More Important Than You Recognize
People seem to prefer entertainment over enlightenment.
kssreeram··on Dijkstra's review of Backus's FP Turing Award speech
Here's an interesting quote from article:

"In short, [Backus's lecture] is a progress report on a valid research effort but suffers badly from aggressive overselling of its significance, long before convincing results have been reached. This is the more regrettable as it has been published by way of Turing Award Lecture."

kssreeram··on One year of Redis
Thanks.

I do hope to revive cspace sometime in 2010.

kssreeram··on One year of Redis
Projects which help in earning your living will do fine. You'll probably end up working on it everyday. On the other hand, it's harder to find time for projects which are not related to how you make a living. And, if you struggle to find time for a project, then it's going to be hard to sustain it.

Opensource projects typically fall in the latter category. The ideal situation is if you manage to establish some sort of connection between your pet project and your source of income.

edit: typos

kssreeram··on One year of Redis
"So make a careful choice when starting the development of a new open source project, don't pick something you are interested in today, but something you'll probably be interested in for the next decade."

+1 for that. Sustaining opensource projects is hard. I feel sad when I see that I've not been able to maintain my own opensource project (http://cspace.in) for more than a year.

kssreeram··on Walter Bright on C's Biggest Mistake
I feel the lack of a module system is the biggest mistake in C. It is tiresome to prefix every single public function: list_append, list_delete, hashmap_insert etc.
kssreeram··on High Performance at Massive Scale: Lessons Learned at Facebook
Interesting quote from the article:

"Jeff also relayed an interesting philosophy from Mark Zuckerberg: 'Work fast and don’t be afraid to break things.' Overall, the idea to avoid working cautiously the entire year, delivering rock-solid code, but not much of it. A corollary: if you take the entire site down, it’s not the end of your career."

kssreeram··on Java is pass-by-value, Dammit (and so are Ruby and Python, Dammit)
This is a common point of confusion. There are two distinct orthogonal language properties at play here:

1) Variables being references(pointers) to objects.

2) Function arguments being passed by reference or by value.

In Python, all variables are pointers to heap allocated objects, and these pointers are simply passed by value when calling functions.

In C++, it is much easier to understand this distinction as it provides full control to the programmer on both aspects.