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 Lark-cython lets you double the speed of Lark's LALR parser (Python)
So, I think the main reasons are -

- Lark is already very fast. It's a lot easier to optimize something that takes 3 minutes :)

- There is still some Python code that is being run. For example, in the tree constructor. That can be solved in future versions.

- I'm not yet taking full advantage of Cython. For example, I'm still keeping the lookup map as a dictionary instead of an array. Also I'm still mostly working with CPython objects instead of native objects (like char*).

erezsh··on PRQL – A proposal for a better SQL
It seems people here are really interested in alternatives to SQL. So perhaps you'd also like to have a look at https://github.com/erezsh/Preql

(Same name, same goal, different approach, and already working)

erezsh··on Israel police uses NSO’s Pegasus to spy on citizens
This is breaking news, and not yet confirmed. And yet everyone even slightly tech-related in Israel is currently talking about this. It even sparked intense arguments in some security related forums that I shall not name. To say "nobody really seems to care at all" is just ignorant.
erezsh··on Ask HN: Which games do you recommend to improve thinking and reasoning?
Prismata is a little known online card game with very simple rules but it's incredibly hard to master.

The community is pretty small, but active enough that you can usually find an opponent if you wait a few minutes. (But try to beat the computer first, it's hard enough!)

erezsh··on Show HN: Meetup with other travelers in a new place
Looks like a great start. I'd love to see a feature that says where travelers are going to be, not just where they are.

Also, a list of interests / desired activities, so I can see what we have in common.

erezsh··on Ask HN: Who wants to collaborate?
Thanks! I'm planning to make a short youtube video that shows how to use it. The user interface is open-ended, which I consider a strength, but it means not all the uses are immediately obvious.

Things I'm thinking of adding:

- Allow to sync to dropbox/drive/etc. (currently sync is only to couchdbs)

- Improve full-text search

- "Save session" shortcut, to tag all open tabs in the window at once. (so you can later recall all the tabs at once by finding the tag)

- Automatically extract meta keywords from a url to suggest tags. (that's already written, I just need to test it and smooth it)

- Maybe save content of the page too? Maybe allow to also store pages that aren't bookmarked? (Currently I don't do it because it takes too much space and affects search speed)

- Automatically publish your bookmarks to a webpage (with filtering the tags you want to display). Maybe even add a social element to it, a little like delicious was.

I can probably think of more ideas. In most of my projects, I usually have more ideas than time :)

erezsh··on Ask HN: Who wants to collaborate?
I'm building Total Recall (https://github.com/erezsh/TotalRecall/), a keyboard-first browser extension for bookmarks that's fast and useful. It lets you search through your bookmarks using a local full-text search, with support for tags and extra notes.

I'm doing it in my spare time, which is scarce, so I'd love another pair of hands to help me make it super duper great. (it's already great but it's just normal great). Ideally someone with some experience making extensions, but really anyone who's willing to put in the time and take it seriously, even if only for an hour a week.

Let me know if you're interested!

erezsh··on How I learned to stop worrying and push to master
Yeah, and let me tell you, it's an absolute nightmare to get to work when you need two features that weren't written to compile at the same time.

I'm not saying it's necessarily a bad idea. Just that it isn't a replacement for abstraction. If you have more than a couple of #ifdef blocks per feature, you might be setting yourself up for future pain.

erezsh··on FerretDB: A truly open-source MongoDB alternative
Meanwhile, half the world start-ups base their entire tech stack on the goodwill of amazon and google, not to pull the rug from under them in hundreds of legal ways.
erezsh··on Ask HN: What are the best-designed things you've ever used?
I'll rephrase it - programming is the only field I know deeply enough to be deeply impressed by the accomplishments I'm seeing.

I'm sure I interact with well designed entities all the time, without even knowing it. One of the properties of really good design, imho, is that it's not meant to be easy to notice.

erezsh··on Ask HN: What are the best-designed things you've ever used?
"Ever" is a tough one but ..

Python is still the best-designed language I ever used, warts and all. It's often grouped with Javascript because they're both interpreted and "duck-typed", but imho the gap between them is huge.

Svelte is amazing for UI logic. It makes hard things feel easy and simple, and really hard things to feel possible.

QBasic was a horrible language, but its IDE (if you can call it that) was incredibly helpful for beginners. Maybe I'm nostalgic, but I never experienced such helpful hand-holding in programming ever since.

Sorry it's all about programming. Most real world design is either too trivial or too impossible to make an impression.

erezsh··on Books I loved reading this year
What if I'm feeling cynical about humankind but for very different reasons? Like historical trajectory, discrepancy of growth between technology and culture, or even cynical about the very idea of life?
erezsh··on Show HN: SingUI – compose modern front end with pure vanilla JavaScript
> ERROR: Cross-origin localStorage blocked by browser but required for devserver.

> Please enable 3rd party cookies or add an exception for stackblitz.io to resolve.

You know, I don't think I will.

erezsh··on Show HN: Pimp My Readme
Just because you code like it's the 90s doesn't mean everyone else has to. But I'm pretty sure even in the 90s everyone had word-wrap, so the 72 columns thingy never really made sense for texts that don't have indentation.
erezsh··on Google had a plan called “Project NERA” to turn the web into a walled garden
The unique value Google has is the mass of users who provide them with data, by clicking (or not clicking) their search results. It's the same way with most of the big websites - they wouldn't get to where they are if they started out today. But having all this pre-existing traffic is a huge part of why they're more useful than their competitors.
erezsh··on Cue: A new language for data validation
> For instance, there is no need for generics and enums, sum types and null coalescing are all the same thing.

Can anyone qualify that claim? How does one translate type generics to Cue?

erezsh··on Non-Commercial Licenses Are Non-Free Licenses
Thanks for the stimulating conversation. I'm almost out of juice, so I'll just reply to a few things --

> both of us are making propaganda

That may be. As long as we're being honest about it, I think that's fine. I feel like the article wasn't being honest about being propaganda.

> It may well be that the best way to guarantee free artefacts is by distributing Non-Free software

I don't really follow. If charging 1$ from everyone ends up being the best outcome for free software (we're talking about free as in speech, right?), then yeah, I think that makes it free. Just not as in beer. I don't see how it can be otherwise.

> The idea that clauses like 1, 6, and 9 are just corporate quirks

I'm not saying any of them are quirks. I'm saying that they are not axioms. If you write an article trying to defend them, you should try to actually defend them, rather than say "this is how it's always been" or "this is the mainstream, just accept it."

It's very likely that if we argued about the actual free/open-source licenses, I would end up agreeing with most of what you say.

But I still believe the article in question was written in bad faith, and you didn't convince me otherwise.

erezsh··on Non-Commercial Licenses Are Non-Free Licenses
> having a bunch of other people come in who fundamentally do not understand why those distinctions exist or why they matter

The "fields on endeavor" clause is a disputed clause. It wasn't a widely-accepted tenet when the term "free software" started out. It was added later when "open-source" started to gain popularity.

It's true that the main proponents of "fields of endeavor", namely the OSI, have a much stronger voice than the rest of us. Does it mean they get to define what is free software? They would like to think so, but I'm not sure that being the mainstream, or having a budget due to corporate backing, means they have a monopoly over a movement that started by individuals long before the OSI started.

There are also plenty of voices, right now, within the OSI, talking about removing the "fields of endeavor" clause. There was a big internal "controversy" over it only a few months ago.

Having a discussion about the term "free software" and about the "fields of endeavor" clause, without mentioning any of these facts, is more propaganda, than an attempt to argue in good faith.

If they want to push their own brand of "free software", that's fine. But they should at least be honest about what they're doing. Not argue that they don't care about the "fields of endeavor" clause, but just trying to correct some philosophical/technical inaccuracy.

FTA:

> Isn't prohibiting the usage of some artefacts for commercial purpose good for free artefacts? Maybe it is. May be it is not. That is irrelevant while deciding whether a license is considered free or not.

No, it's not irrelevant. The better philosophy should win, not the one with the most corporate backing.

erezsh··on Non-Commercial Licenses Are Non-Free Licenses
Exactly. They're trying to phrase it like a philosophical non-judgemental distinction. But if it contains no judgement, then what's the point?

In my view, the whole thing is a fallacy. Freedom is always in degrees. I can't take existing GPL software and claim that I wrote it. It is limiting my speech. So is it not free?

The thing is, "free" is a word with positive connotations. And "non-free" sounds bad. So what we're seeing is people with different ideologies, each trying to draw the border at what "free" should mean in that context, in order to fit their perspective and agenda.

The sooner we admit this, the sooner we can drop this hair-splitting and ask the actual question behind it -- which approach to licensing is better for the world?

erezsh··on Let's write a compiler, part 1: Introduction, selecting a language, and planning
If you're using a good parser, switching between begin-end and curlies should be a one minute job.

Now, updating the tests and the library code.. that's a different story.

erezsh··on Official Elasticsearch Python library no longer works with open-source forks
You write "accordingly" as if it's obvious what's the correct course of action for a company that's in direct competition with a titan, and any other course of action must disappoint their users.

What would you have them do? Would only their demise appease you?

erezsh··on Show HN: Let AI predict how old you are
> created: 1 day ago

nice!

erezsh··on Show HN: Python Source Code Refactoring Toolkit via AST
I actually have a prototype of something like that, built on top of Lark. It's still far from being complete or user friendly, but I'm already successfully transpiling a subset of Python to Javascript.

It still needs a lot of handholding, but at the same time I get to use gems like -

    ... = TemplateTranslator({
    'isinstance($a, str)': "typeof($a) == 'string'",
    'isinstance($a, bool)': "typeof($a) == 'boolean'",
    'len($a)': '$a.length',
    'str($a)': '$a.toString()',
    'getattr($a, $b)': '$a and $a[$b]',
    'getattr($a, $b, $c)': '($a and $a[$b]) or $c',
    'hasattr($a, $b)': '$b in $a',
    '$a.join($b)': '$b.join($a)',
    ... })
erezsh··on Show HN: Python Source Code Refactoring Toolkit via AST
It's a good start, but there are many other differences. a[i] can mean getattr (but usually not), and can throw a KeyError. Similarly, a.b may return null if it doesn't exist, while in Python it will throw an AttributeError. You might need to add uses of global or nonlocal. And there are a lot of other small details.

However, I think it will be much easier than translating the other way around :)

erezsh··on Israel tries to limit fallout from the Pegasus spyware scandal
FBI arrests in Israel have happened in the past.
erezsh··on Israel tries to limit fallout from the Pegasus spyware scandal
> but won't change the world nor the game

I don't think that was ever the point. In a game of cat-and-mouse, you don't skip on a chance to spray the cat.

erezsh··on I requested my photographs from the Department of Homeland Security (2015)
> I'm not radical anymore

Nice try;)

erezsh··on Against SQL
It's definitely an interesting approach. I imagine it makes the parsing much easier.
erezsh··on Against SQL
Python has a data structure like this called NamedTuple.

I also noticed it's popping up everywhere, in this case sql rows (kind of). Conceptually I like the idea of using it as the mechanism for function arguments, but I didn't want the syntax to be too confusing for beginners.

Although yours seems a little bit different, because different fields can have the same name.

Just for the heck of it, here's how your second example would look in preql:

    (stops
    { lat, lon => }
    { lat => lon: min(lon) } 
    { lon }    // not necessary. just drops the lat column
    )
erezsh··on Against SQL
I don't have a lot of experience writing Lisp-y code, so perhaps I'm speaking from ignorance, but I think there is a reason that syntax never gained huge traction. Imho a syntax that's concise and expressive is important for effective coding. Having operators for the most common operations is just a small complication that yields a big reward.

Having said that, the amount of keywords and operators that you see in Preql right now, isn't likely to grow by much. I have the basic and common operators covered, and for the most part, the rest can be done with regular functions.

I agree about introspection, which is why in Preql you can ask for the type of any value, list the columns of a table, get the resulting SQL of an expression as a string, and so on. And certainly more can and should be done towards that.

← PreviousPage 3 of 8Next →