Hacker Newsnew | past | comments | ask | show | jobs | submit | wallstop's commentslogin

I mean, yes, but also, no - you can generate and cache (or return manual ownership to the caller) IL/whatever runtime code that doesn't box for any reflection thing that you need on the fly, assuming the type information is available. Like you make it an explicit API to do the code gen, no JIT required.

Just because the code isn't baked into the binary doesn't mean that it theoretically can't be done at runtime. At least, AFAICT.


It seems like you are contradicting yourself here. Just generate code that doesn't box on the fly, but without a JIT compiler? Boxing isn't even the biggest issue here - you could probably avoid that with a strongly typed reflection API, but I don't know if that makes it less useful.

IMO the big issue is AOT compilers only compile code that is referenced statically. Without a JIT you would have no choice but to error if you try to call something that wasn't compiled in. Compiling everything is not an option because generics.


JIT != capability to dynamically generate and run code at runtime, was my only point. A JIT can and does do that, but it is not the only way of doing that. And if there's a homegrown project like this, they can do whatever they want. Such as explicitly provide an API to do reflection like things instead of requiring JIT to implicitly handle it on the fly.

An approach that doesn't need runtime would be to allow reflection for types provided at compile time (say, with a config file). There are many ways to approach reflection, from none to some to full. This appears to have chosen none. It could have chosen some, or potentially even full.


Makes more sense doing what .NET is currently doing for NativeAOT right now: use source generators to extract what you need at build time.

You lost me a bit - everything you mention is client side, not server side.

The author's problem is that the are doing too many parallel agent things. It's very interesting that their solution space is "keep doing tons of parallel stuff, but with different tooling" instead of... "do less parallel stuff (and provide stronger attention)".


The whole point is that more things are processed in parallel by the machine and only one thing at a time by the human.


My perspective was that it seems like your problem is that you're exhausted from doing too much. This led you to a technical solution where you shuffle the order of things, but are still doing too much. Your result, as stated in the post: "I'm still exhausted". So is your solution actually solving your problem?


At some point, you will write your own holster and introduce User-Authority as an agent with a self-improvement gate. I refuse to stare into an abyss of my own creation.


What is missing here is any benchmarks backing up this argument for code structure.

Of note, as of C#9 (and maybe prior), the dotnet runtime does this automatically whenever it is deemed safe. https://devblogs.microsoft.com/dotnet/performance-improvemen...

The same technique is applied as an optimization, when deemed safe, in all current gen c compilers (gcc, llvm, etc).

I'm very confused why neither measurements nor references to when this is done automatically in most modern languages is included in the article.


At least in JVM land, it's pretty easy to thwart that optimization. Particularly if the condition is on a mutable yet unchanged in the loop value.

For example:

    var map = new HashMap<String, String>();
    map.put("foo", "bar");
    for (var i : items) {
      if ("bar".equals(map.get("foo")) {
        doStuff(i);
      }
    }
Even though `map` isn't mutated, it's hard enough for the JVM to detect and the underlying `get` functions are complex enough that it'll run the `get("foo")` every time, which can be quite expensive.


Can't speak for C# but in C/C++ the optimization can rarely be applied safely due to aliasing. If any part of the data you're working with involves a char* then C/C++ optimizers refrain from doing these kinds of optimizations because of how difficult it is to guarantee the absence of mutability.


I would rather the developer do it, not the compiler. I don't, as a matter of course, regularly _read_ compiler output. I do, however, read developer output.


I'm gonna jump in here with some self promo - back in college I TA'd a class that, for a few weeks, taught Malbolge, and the only assignment was for students to write a program that printed their name.

After spending a lot of time thinking about the language, I came up with a relatively simple algorithm based on the language design - there are a few operators that mutate state, so basically just try combinations of those until your next memory cell contains the thing that you want, then lock those instructions in and advance.

Basically RNG yourself to victory.

The original code for that algorithm is here (python, + my own interpreter): https://github.com/wallstop/malbolge-toolkit/tree/dd942fb981...

I've since llmified it as an exercise.

BUT! The whole reason for this comment is to nerd say that printing stuff is relatively easy if you invest the time in learning the language's primitives and think of programming in it more as algorithms to operate on the op codes instead of literally writing code.

Now, to do more interesting things other than printing - I'd have to spend even more time thinking about the language, which I don't want to


Pretty funny that I off-handedly used Malbolge as a random pull from my brain for “an extremely weird and not-really-but-kinda programming language” without even really remembering any details about it; and then I got to learn about your project!

Thanks for sharing!


I think the second sentence of the article covers that pretty simply? To run it in the browser with wasm?

> One of the most exciting things I've been doing with this is getting my Scheme to compile to the Web thanks to Hoot.


Yes, but why? If the purpose is to run Scheme, run Scheme: why jump through Hoots oops I mean hoops.


> Yes, but why?

Most likely answer is "because that's what they wanted to do", which is a totally legit reason.


How do you run Scheme directly in the browser?


Why would anyone want to run scheme in the browser? That's what I'm trying to understand.

If the goal is to run scheme, run scheme. If the goal is to port Hoop then I get it.

Why walk in water when you can take the ferry?


A couple of reasons that come to mind:

- For the same reasons people run js server-side: single codebase in the same language; familiarity with the language; other?

- Because some people simply like scheme and want to code the frontend of webapps in scheme

- Because they want to port Goblins to the browser and Goblins already work with scheme.


I guess we have very different ideas around what makes good music. Every single Suno produced song sounds like a 60kbps extremely compressed mp3 while also having extremely generic, uninspiring structures and complete lack of interesting sonic/instrumental layers.

It's great that people find joy in it, but as someone that is critical of both music production and fidelity, the current offerings fall incredibly short of anything I would ever want to listen to.


If this is a learning exercise, cool!

If this is a real thing, it needs a lot of work. Lots of failure modes, errors that are not being handled, sometimes exceptions, sometimes swallowing and printing to stdout, very inconsistent style, mixing and matching all kinds of C and C++ conventions, the fallback hard coded path of your specific user name + deep path ...

I would recommend not using this for any data that you actually care about.


Ah, yes, the "you're holding it wrong" defense. If one tool has a higher safety rating than another, significantly so, preventing entire classes of mistakes from happening that the other does not, in a kind of superset manner - even the most skilled craftsman will inevitably make mistakes that would have been prevented by the safer tool.


[flagged]


Yes, but you really have to go out of your way to segfault/ run afoul of memory safety issues, which are a pain in the ass to debug.


Anecdata, they might have had a system error. My Microsoft account that I use the free tier OneDrive on had the same email sent (you're over x% full, consider upgrading!). I suspected everything you did - eventually I logged in after verifying the email - nope, 5% usage or so.

I then went and deleted more stuff, but my money would be on a reporting glitch than a malicious money campaign.


A system error on a file storage system makes it even worse! But easy to imagine after the recent report on Azure https://news.ycombinator.com/item?id=47616242


Sorry, what I meant by "system error" was more "notification system error". Not error as in "data loss", error as in "reporting".


Myself–and many redditors–got this erroneous notification too. I don't think Microsoft ever sent out an "Oops, sorry, you don't actually need to pay us" correction though.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: