Better HN
topnewbestaskshowjobs
Log inSign up

andreabergia

364 karma · joined Mar 12, 2023 (3y ago) · 47 submissions

Currently working as Sr Staff SWE at ServiceNow, working on the JavaScript engine, and hacking on https://github.com/mozilla/rhino/

Blog: https://andreabergia.com Made in Italy

Submissions

1.

JDK 26: G1 GC Throughput Improvements by 5-15%(ionutbalosin.com ↗)

2 points · by andreabergia · 6mo ago · discuss

comment 9mo ago · link · parent

> So you could presumably also set it up to implement its suggestions (i.e. if it "executes" its proposed definition for `succ` that would actually just update it in the global namespace). Fun stuff.

Yep, I've had that working in some earlier version of the tooling.

> I'd suggest rethinking this; people usually expect the tab key to auto-complete.

That's a fair point.

> At any rate, thanks for writing the description yourself.

I might let an LLM write the code, and even the user's manual, but I write my own blog post and comments. :-)

3.

Show HN: A live Python REPL with an agentic LLM that edits and evaluates code

4 points · by andreabergia · 9mo ago · 4 comments

4.

Untapped Way to Learn a Codebase: Build a Visualizer(jimmyhmiller.com ↗)

244 points · by andreabergia · 9mo ago · 46 comments

comment 10mo ago · link · parent

https://andreabergia.com/ - my personal website and blog, which I'm currently redesigning!

6.

A field guide to sandboxes for AI(luiscardoso.dev ↗)

1 points · by andreabergia · 10mo ago · discuss

comment 11mo ago · link · parent

Thanks! That's really reassuring and will definitely help my nights! :-D

comment 1y ago · link · parent

I work at ServiceNow, which sells an enterprise platform and a ton of products built on top of it. Internal teams and customers can extend the platform by writing JavaScript, hence we have a JS runtime in the platform (the venerable https://github.com/mozilla/rhino/), which our team works on.

comment 1y ago · link · parent

Same here! I am now actually working in compilers, which is one thing I'm really passionate about, but not something I was doing professionaly. I managed to turn a toy project and some blog posts into an actual job at almost 40, so, thank you HN!

comment 1y ago · link · parent

  from gremllm import Gremllm

  # Be sure to tell your gremllm what sort of thing it is
  counter = Gremllm('counter')
  counter.value = 5
  counter.increment()
  print(counter.value)  # 6?
  print(counter.to_roman_numerals()) # VI?
I love this!

11.

Gremllm(github.com ↗)

129 points · by andreabergia · 1y ago · 18 comments

comment 1y ago · link · parent

Of course I didn't assume to be 100% productive immediately, and I did spend a few weeks on this experiment, not just some days. My point was more about how even modern C++ felt (to me) dated and annoying to use compared to more modern language, because of the strong (but very valid!) focus on backward compatibility that C++ has. Furthermore, the long history and baggage means that for any thing, there are _many_ different ways of doing it, which doesn't help.

And anyway, it was not a particularly serious (or, for that matter, well written or argued) discussion. As I mentioned in literally the first line, it's just a rant :-)

PS: I am unsure what you mean with "relying on LLM for configuring things says it all". In my experience, this is one area where LLMs _really_ do help a lot - it has been much faster than going through the documentation (which I also did quite a bit of, in particular for conan).

13.

Emjay – implementing function calls in my JIT compiler(andreabergia.com ↗)

1 points · by andreabergia · 1y ago · discuss

comment 1y ago · link · parent

Thanks!

15.

Emjay – a simple JIT that does math(andreabergia.com ↗)

3 points · by andreabergia · 1y ago · 2 comments

16.

Crazy Debugging Stories – Recursion(andreabergia.com ↗)

1 points · by andreabergia · 2y ago · discuss

17.

How is this blog built?(andreabergia.com ↗)

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

18.

Playing with Nom and Parser Combinators(andreabergia.com ↗)

2 points · by andreabergia · 2y ago · discuss

19.

A JVM in Rust part 8 – Retrospective(andreabergia.com ↗)

3 points · by andreabergia · 3y ago · discuss

20.

A JVM in Rust part 6 – Methods and exceptions(andreabergia.com ↗)

4 points · by andreabergia · 3y ago · discuss

comment 3y ago · link · parent

Remote is a requirement, due to family reasons. Salary.

Vacations, health insurance, parental leave are all given by law here (Italy). But, if they weren't, I guess they'd be pretty important.

comment 3y ago · link · parent

Good point. Someone (probably you) opened a GitHub issue about this too.

I might actually fix this one :-)

comment 3y ago · link · parent

That sounds reasonable (and way better than what I have implemented).

I am not sure I am going to try it though - it probably is a bit too much code to change for something that I consider "done" and I am not working on. :)

comment 3y ago · link · parent

Agreed, it _is_ annoying. It bubbles up everywhere and it feels like "something to silence the compiler" more than "something to express the safety of the code", as other people have pointed out.

comment 3y ago · link · parent

The problem arises by the fact that `Class` needs to refer to other classes:

    pub struct Class<'a> {
        pub superclass: Option<ClassRef<'a>>,
    }
    pub type ClassRef<'a> = &'a Class<'a>;
Given that classes are managed by the arena, I know the reference will not be dangling thanks to the 'a lifetime.

Initially I had implemented this with raw pointers, without lifetimes, but then I switched to the reference because it felt more "idiomatic" and I had to put the lifetimes just about everywhere to make the compiler happy.

If there are better ways to do this, I would be really happy to learn, though!

comment 3y ago · link · parent

Thanks, fixed!

comment 3y ago · link · parent

Well, I think it is written rather clearly in the first blog post of the series and in the github readme, whose second line is:

> Important note: this is a hobby project, built for fun and for learning purposes.

I am not going to repeat that in every part of the series. :-)

28.

A JVM in Rust part 5 – Executing instructions(andreabergia.com ↗)

98 points · by andreabergia · 3y ago · 33 comments

comment 3y ago · link · parent

It is Visual Studio 2019, _not_ VS Code.
12