HNHacker News
TopNewBestAskShowJobs

erezsh

327 karma · joined May 18, 2009

Skilled Programmer

My blog: http://blog.erezsh.com/

My github: https://github.com/erezsh

submissionscomments
erezsh··on Against SQL
> adding a column to a table might accidentally break existing queries

Just a column, no. Adding a new foreign key might, but that's something that a type-checker/compiler can let you know about.

> They should Use NATURAL JOIN

NATURAL JOINs are better than nothing, but they're flawed too. Column names are supposed to convey meaning or intention, not just the type of data that they contain.

erezsh··on Against SQL
I share the author's point of view, which led me to start a new relational programming language that compiles to SQL. It's a way to build on existing databases, like postgres or mysql, with all of their advantages, but improve on many of SQL's limitations.

If that sounds interesting, you can find it here: https://github.com/erezsh/Preql

erezsh··on Against SQL
> Why can't this be expressed as an INNER JOIN?

`from foo, bar, quux` is an inner join, it's a shorthand syntax. He's lamenting that he has to keep specifying and matching ids, when the database can figure it out on its own from the foreign keys.

erezsh··on Science expressed in terms of what happens is getting in the way of progress
> It is because of a deep misconception, which, paradoxically, originated within my own field, theoretical physics. The misconception is that once you have specified everything that exists in the physical world and what happens to it—all the actual stuff—then you have explained everything that can be explained.

If any scientist actually thinks this, then science is in deep trouble.

erezsh··on We’re all paying for someone else’s 4-hour work week, not ours
Might be because it contains overt racism? Although I guess we've grown desensitized to that these days.
erezsh··on We’re all paying for someone else’s 4-hour work week, not ours
> Someone’s gotta run the hotels and restaurants and laundromats that serve our beloved digital nomads. Someone’s gotta run the coffee shops where they hang out. Someone’s gotta pick up their trash, and grow their food. Someone’s gotta build those mansions and pools. Someone’s gotta run the internet they use.

Exactly, and if those digital nomads weren't there, these people would be out of a job.

If you don't like the inequality in the world, try and fix it. I don't bear any responsibility as an individual to fix these wrongs that happened before I was even born. But if I wanted to do it, going there to spend my money is an excellent way to help.

erezsh··on Abstract Syntax Tree for Patching Code and Assessing Code Quality
Sorry, no repo yet.
erezsh··on Abstract Syntax Tree for Patching Code and Assessing Code Quality
> SCM and liberal use of code reformatting tools usually don't mix well

Care to elaborate about that?

It seems to me like the resulting code will be very consistent, and only change when I either improve the transpiler, or when Prettier issue an update to their formatting. But that's unlikely, and anyway I can just use a fixed version.

erezsh··on Abstract Syntax Tree for Patching Code and Assessing Code Quality
> Python to JavaScript

That's cool. I'm working on something very similar, with the goal of generating idiomatic Javascript, which seems to be a goal for your code as well.

I did make a few different choices.

- Instead of worrying about formatting and indent, I just output whatever I feel like, and run Prettier afterwards. That way I don't have to worry about whitespace, indents, or superfluous parenthesis. - I integrated it with type analysis, so that operators like `+=` will produce different code for each type (ints vs lists, for example). - I also include the comments from the python source in the target javascript

But these things aside, I can see a lot of similarities!

erezsh··on Show HN: Py2many – Transpile Python3 to 7 languages
I think you can get away with keeping it unordered for 95% of the code. But the remaining 5% are going to fail in very confusing, and possibly inconsistent ways.
erezsh··on Show HN: Py2many – Transpile Python3 to 7 languages
I like the idea, but it's seems a little premature to show it, since there's very little information. For example, what is the supported subset? Are there any divergences in behavior? (for example, are the dicts always ordered?)

Also, just wondering how modular it is. How hard would it be to add another target, say Javascript?

erezsh··on We were promised Strong AI, but instead we got metadata analysis
No. I don't think it's in their hands anymore.
erezsh··on Show HN: Pixel Physics
https://imgur.com/a/xaRWqTY

Looks like you'll have to do some sort of value propagation.

erezsh··on Show HN: Pay to Play Social Media
The idea is nice, but I think implementing something like that well is going to be very challenging.

One one hand, you'll have users trying hard to game the system (if you think karma is motivating, try actual money), populism, and on the other hand filter bubbles. I think these are strong forces, and it would be hard to stir it away from being full of low effort emotional-appealing posts.

erezsh··on Calendso: An open source Calendly alternative
That's a very quick diagnosis, that all their users just have a communication problem.

Calendly can be used to hold office-hours, and to allow users or customers an easy way to get face time with you.

Also, I have a lot of acquaintances that are always busy, and scheduling with them can often take several ping-pong hits. I like the idea of a software taking care that of that hassle for us.

erezsh··on Ask HN: Would issue “bounties” make contributing to open source more appealing?
It would make me more likely to contribute, if it was an appropriate amount of compensation for that issue.

In that case, I would also want to have a clear understanding of under what conditions my pull request will be accepted, and when.

erezsh··on OpenSearch: AWS fork of Elasticsearch and Kibana
I like to think, or at least I hope, that OSS isn't going to decline, it's just going to evolve. The existing OSI licenses weren't meant for a world of clouds and SAAS. I believe we'll have to find the next-generation of licenses that can succeed where AGPL tried and failed.
erezsh··on An interview with the man who keeps uploading my feet to WikiFeet
I wish more people were obsessed with useful or insightful information the way they are with sex kinks.
erezsh··on How to make a Python package in 2021
How does flit compare to poetry? The seem to be both doing the same thing, and in a very similar way.
erezsh··on Things I hate about PostgreSQL (2020)
imho all of these are easily offset by the fact that unlike in sqlite or mysql, `cast('1,031' as int)` will throw an error instead of returning 1.
erezsh··on Funds for Open Source
I'm not saying Elastic's model is the open-source ideal. But a product that can't find a financial model won't exist either.

ES may not give their contributors the same rights on paper, but in practice there is no discernable difference, other than that the contributors aren't allowed to directly compete with them (iirc).

erezsh··on Funds for Open Source
I'm generally a fan of the open collective, and I appreciate your contributions to open source. But I'm disappointed to learn that you took part in this irrational attack on the FSF. I feel that it has in fact made the open source space weaker and significantly less safe. I hope you will reconsider your stance on this issue.

(I'm not a fan of RMS btw, this isn't about him at all. It's about principles and protocols)

erezsh··on Funds for Open Source
nit-pick: Only according to the OSI, whose credibility within the community isn't what it once was.
erezsh··on Show HN: Reclist.me – Share your favorite books, podcasts, newsletters
I mean you ask to see my private twitter posts and such (there's like 5 permissions iirc), when all you really need is to verify my identity.
erezsh··on Show HN: Reclist.me – Share your favorite books, podcasts, newsletters
I've recently thought of creating a page full of my recommendations, so I can send it to my friends and to unsuspecting strangers. So, this came at a good time. However, I imagined something a little different for myself.

Firstly, I'd make the sections easier to navigate. Your current implementation requires scrolling until I find "software" or "movies", whereas I'd like my visitors to be able to find them quickly.

Another thing, is that I usually would like to add a short note next to each recommendation, explaining why I like it, or saying what I think of it. Just putting the names or links by themselves seems a little barren to me.

Lastly, you ask too many permissions imho.

These are just my thoughts, so take them as you will.

erezsh··on Show HN: Dendron – fast open-source note-taking in VSCode
I notice that your directory structure and markdown formatting are very similar to those that are used by static site generators such as Hugo or Nikola.

Do you have, or thought about, integration with one of these?

I like the idea of writing my notes in Dendron and being able to automatically publish them (or a subset of them).

erezsh··on GitHub, fuck your name change
Funny, the way I remember it, they forced Sanders out without any voting (and for the second time in a row!)
erezsh··on Show HN: Preql – a database query language that compiles to SQL
> I think there is a real risk of it becoming more than just a sugar/ergonomics layer

I'm not sure it's actually a risk. The improvements to optimization in C compilers have benefitted everyone, though it took C a long while to be better at it than humans. I think the same idea applies here, as long as we choose our abstractions and optimizations carefully.

> it reminds me of GraphQL

Good catch, GraphQL has been one of my inspirations.

erezsh··on Show HN: Preql – a database query language that compiles to SQL
I feel like Preql makes SQLAlchemy and other ORMs obsolete. And I think it's also ready to replace pipelines that are plain SQL, although probably with the help of a few escape hatches (via its SQL() function).

There are many worthwhile GUI tools for data analysis, which stand on their own. But perhaps they could benefit from having an embedded Preql console.

erezsh··on Show HN: Preql – a database query language that compiles to SQL
I started this project mid 2019, with the goal of creating a database interface that I would actually enjoy using, rather than dread. By that point, I've done several machine learning and data engineering projects, all of which used SQL, and I felt like I spent way too much time wrestling with "data plumbing" and SQL's antics, instead of being able to focus on the data itself. So, I set out to fix it, and created Preql.

I chose a unique approach, which is to create a new programming language, that compiles to SQL. That way, it could access all of the good that SQL has to offer (and there is plenty), but with all the features of a modern language, and without the design limitations of ORMs. It allowed me to add sorely missed features like first-class functions, modules, and type safety.

I built Preql in Python, which allows for a very smooth interface between the two. For parsing, I used a library called Lark, which I created three years ago. I also created a new library called Runtype, which proved very helpful for writing the compiler.

While Preql is still in its early stages, I'm very proud of what I've accomplished so far, and I hope you'll decide to take it out for a spin.

← PreviousPage 4 of 8Next →