xonix's comments

xonix | 2 months ago | on: Fabrice Bellard Releases MicroQuickJS

Re: TCO

Does the language give any guarantee that TCO was applied? In other words can it give you an error that the recursion is not of tail call form? Because I imagine a probability of writing a recursion and relying on it being TCO-optimized, where it's not. I would prefer if a language had some form of explicit TCO modifier for a function. Is there any language that has this?

xonix | 1 year ago | on: Show HN: Node.js ORM to query SQL database through an array-like API

My take on this is that it's not always the best idea to abstract-out SQL. You see, the SQL itself is too valuable abstraction, and also a very "wide" one. Any attempt to hide it behind another abstraction layer will face these problems:

- need to learn secondary API which still doesn't cover the whole scope of SQL

- abstraction which is guaranteed to leak, because any time you'll need to optimize - you'll need to start reason in terms of SQL and try to force the ORM produce SQL you need.

- performance

- deceptive simplicity, when it's super-easy to start on simple examples, but it's getting increasingly hard as you go. But at the point you realize it doesn't work (well) - you already produced tons of code which business will disallow you to simply rewrite

(knowledge based on my own hard experiences)

xonix | 1 year ago | on: LO – simple WASM native language

Right, this is not the problem par se. To me this is a rather philosophical question. Related to the motivation behind the project.

If someone has some particular domain problem to which they need to introduce the new programming language, then, probably, it should look somehow different to all existing languages, otherwise they would be used.

Alternatively, the motivation could be: OK I need ExistingLanguageX(-alike) but in the domain/environment where it's not present yet, for example, WASM.

The motivation question is always of interest to me since it allows to judje for the long-term perspectives of the project.

However don't take this as a discouragement rant, learning case is a good motivation/raison d'être too.

xonix | 1 year ago | on: LO – simple WASM native language

It's funny to watch how often new programming languages resemble visually (and conceptually) the language they are written in. You can put it the other way: just look at a syntax sample and try to guess the implementation language.

I can see some problem here. Probably, it means the author is under heavy influence of the implementation language, that limits their thinking and creativity scope to the concepts of that language.

xonix | 2 years ago | on: JEP Draft: Deprecate memory-access methods in sun.misc.unsafe for removal

Nice.

Once I did some experiments at programming in Java using only sun.misc.Unsafe for a memory access: https://github.com/xonixx/gc_less. I was able to implement this way basic data structures (array, array list, hash table). I even explicitely set a very small heap and used Epsilon GC to make sure I don't allocate in heap.

Just recently I decided to check if it still works in the latest Java (23) and to my surprise it appears - it is. Now, apparently, this is going to change.

xonix | 2 years ago | on: Show HN: Just.sh – compiler that turns Justfiles into portable shell scripts

makesure, a similar tool (https://maximullaris.com/makesure-vs-just.html) I'm developing, doesn't require installation in the traditional sense: https://github.com/xonixx/makesure#installation.

Also, I was considering adding the same feature (generating the equivalent shell script) to my tool, but after doing some analysis decided not to pursue this idea for the following reasons: https://github.com/xonixx/makesure/issues/83#issuecomment-98....

xonix | 2 years ago | on: Ten Things You Can Do with GraalVM (2018)

For me the most relevant selling point of GraalVM is beeing able to compile to native self-contained executable. But on the other hand, Golang delivers on this aspect much better (or at least much faster).

xonix | 2 years ago | on: I made nodb, a RESTFful API to store and fetch JSON

Correct me if I'm wrong, but to me passing the access token in the GET URL is not a good security practice. This increases the probability of unintentionally exposing the token. The URLs can be logged by proxy servers, application logs. Simply, user can accidentally send the link with token in chat, etc.

Usually in REST APIs the auth token is passed via some HTTP header.

page 1