Better HN
topnewbestaskshowjobs
Log inSign up

floitsch

707 karma · joined Mar 29, 2013 (13y ago) · 167 submissions

I worked on Dart. Now developing Toit.
Submissions

comment 3w ago · link · parent

After Dart, where we "had to" use familiar syntax (JavaScript), we experimented with less-noisy syntax for Toit. We removed everything that wasn't necessary first. Over time we added some parts (like `extends`, `implements`, ...) back, but we got used to the non-parens calls (similar to shell or Caml) and like it now. To me, every other language feels cluttered and noisy.

Wrt performance: depending on the program/benchmark Toit is sometimes 10x faster than MicroPython. For small loops that just do some arithmetic it's less noticeable, but real programs with method-calls benefit a lot from the static class definitions.

comment 3w ago · link · parent

We probably could have made it work without the `--`. Coming from Posix, the `--` feels natural, and it also allows for code completion.

comment 3w ago · link · parent

It's a good point.

LLMs have not been trained on Toit code as much as they have on Python or JS. No question about that. Without the Toit skills (https://github.com/toitlang/ai-instructions) LLMs used to be really bad. (They might be better now, but I never bothered to remove the skill files). From that point of view, Toit isn't a good choice.

On the other hand, Toit provides containers and a fast refresh-cycle. Both are godsends for AI agents: the containers make it so that the agent doesn't accidentally bring down the whole system when there is a bug, and the refresh cycle makes iterating on programs much faster. (Something I find agents to be really good at).

Fwiw, there isn't any clever metaprogramming in Toit.

comment 3w ago · link · parent

A few more bullet points to encourage readers to have a look at Toit:

- Faster than Python. Depending on the benchmark up to x10.

- Can be compiled to executables. Currently `-o` just takes an interpreter and attaches the bytecodes, but Kasper also started experimenting with native output.

- Cleaner base. Objects aren't just hashtables. This can be seen as a downside as well (making the language less flexible), but in my book it's a win.

- The `--named=value` syntax is just a winner :)

comment 3w ago · link · parent

I think "toy language" isn't really fair. Toit has been developed for 7 years, some of which with multiple engineers working on it full time. (The blog post says 4 years, but that's just for the v2.0.0 development).

Toit doesn't have a lot of users, but it is used in production (for example by Consibio) and is definitely developed for production environments.

comment 3w ago · link · parent

We looked at these when we started. The problem with them is that they weren't designed with constrained resources in mind and it shows. For example, objects are hash tables and method calls are thus expensive. An obligatory top level execution makes startup slow, ...

If you have a bigger machine you can optimize some of this (V8), but these optimizations typically need memory and/or a JIT. (And Python struggles to optimize even on stronger machines).

By starting from scratch (with what we learned from V8 and Dart) you can design something that feels similar but is much cleaner and faster to run.

comment 3w ago · link · parent

It's from Austin Powers.

"toit like a tiger"

https://youtu.be/gu31VyXlTzo

comment 3w ago · link · parent

Kasper and I are still working on it.

9.

Toit v2.0.0(toit.io ↗)

238 points · by floitsch · 3w ago · 72 comments

10.

Eight-year study links more childhood screen time to better cognitive processing(spacedaily.com ↗)

4 points · by floitsch · 3mo ago · discuss

11.

Day-ahead electricity prices hit –€500/MWh in France and Germany(data.nordpoolgroup.com ↗)

9 points · by floitsch · 6mo ago · discuss

comment 10mo ago · link · parent

I felt the same, but then thought of experts in their field. For example, my PhD advisor would already know all these papers. For him the prompt would actually be similar to what was shown in the video.

comment 10mo ago · link · parent

You are absolutely right, and a follow-up CL fixed the non-Zba code path. At the time of writing of the blog post, the generated code was however still using the 4 instructions instead of just two.

V8 is a huge project and ports almost have to start from backends of existing architectures. Over time we (I recently worked on the RISC-V port) improve the situation.

Note that it's also crucial to stay somehow similar to the x86 and ARM backends as the V8 team frequently makes changes to these and keeping up with them would be a nightmare if the RISC-V backend was too different.

"Does no one at Google know RISC-V" This work wasn't done by Google. Also, you don't hire RISC-V experts, but V8 experts (or other similar VMs) for such a port. I, for example, had never worked with RISC-V before. As such, it can happen that some code of the RISC-V backend is written by engineers that aren't yet experts in RISC-V.

14.

A glimpse into V8 development for RISC-V(riseproject.dev ↗)

65 points · by floitsch · 10mo ago · 8 comments

comment 10mo ago · link · parent

When Plasma crashes, all programs keep running. The only noticable thing (to me) is that the order of my apps in the task bar is different.

comment 11mo ago · link · parent

Pretty impressive.

When I published Grisu (Google double-conversion), it was multiple times faster than the existing algorithms. I knew that there was still room for improvement, but I was at most expecting a factor 2 or so. Six times faster is really impressive.

17.

Make the most of compiled C loops on the 68000(dciabrin.net ↗)

69 points · by floitsch · 1y ago · 19 comments

comment 1y ago · link · parent

Sleef is a SIMD library that is often used (transitively) when working with LLMs.

Its maintainer now requests $1000 for approval of PRs.

Here is an example where they reject a small PR to add loongarch64 support from individual contributor: https://github.com/shibatch/sleef/pull/672

19.

Regarding the Monetization of Project Maintenance(github.com ↗)

1 points · by floitsch · 1y ago · 2 comments

comment 1y ago · link · parent

If they can get the data without a user's consent, then it's independent of this new feature and thus unrelated. If you believe that the government has unlimited access, then it was most likely already possible before this feature. Now, there is at least a "proper" way to give law enforcement access.

comment 1y ago · link · parent

In that case they don't need consent anyway and it's not about this new feature.

comment 1y ago · link · parent

Speed and reliability.

We found that Python isn't really designed for constrained environments. The object model, in particular, makes it hard to have fast method calls. The memory layout is also affected by the language, leading to bigger objects and a worse GC.

If you are just running a small hello world, or a number crunching loop, then both languages behave similarly. However, if you actually want to run something more consequential in production you will have an easier time with Toit.

comment 1y ago · link · parent

A similar project: https://toitlang.org (or https://toit.io).

Currently it's only targeting the ESP32 family, but the code is pretty portable. By default, it probably also needs more resources due to OS-like abstractions, allowing for multiple containers to run on parallel, etc. Obviously that also brings some nice advantages. For example, installing or updating, a new container is just a few lines of code.

We have been working on it for more than 5 years now, and it's definitely at a stage where lots of projects would benefit from it.

comment 1y ago · link · parent

You will improve your language skills this way, but if your skill level isn't high enough it's going to be exhausting to the native speaker as well.

I have been living in Denmark for 15 years now, and it's still easier to do conversations in English. When I speak Danish it requires more mental capacity from the other side.

I am speaking Danish from time to time, but it's only to get better at it. The English proficiency in Denmark (and probably the Netherlands) is so high that you need to be really good at the native tongue before it is easier than English in conversations.

25.

Show HN: A GitHub action to publish Discord help forums(github.com ↗)

1 points · by floitsch · 1y ago · discuss

26.

Show HN: GitHub action to publish Discord help forums(github.com ↗)

1 points · by floitsch · 1y ago · discuss

27.

EU Court fines EU for breaching own data protection law(reuters.com ↗)

2 points · by floitsch · 1y ago · 1 comment

comment 1y ago · link · parent

Balcony solar requires the 50Hz of the energy grid. If you turn off the main power they will stop feeding into the system.

29.

ESA to support the development of EU's secure communication satellites system(esa.int ↗)

1 points · by floitsch · 1y ago · discuss

123456