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

But that's what setHTML isn't at all a replacement for innerHTML.

You still need innerHTML when you want to inject HTML tags in the page, and you could already use innerText when you didn't want to.

Having something in between is seriously useless.


It’s simple, you use innerHTML if you know for sure where the input comes from and if it’s safe (for example when you define it as a hard coded string in your own code). You use setHTML when you need to render HTML that is potentially unsafe (for example forum posts or IM messages). Honest question, which part of that isn’t clear?

> You still need innerHTML when you want to inject HTML tags in the page

What makes you say this?


> need innerHTML

parent.appendChild(document.createElement(tag))


How is adding an element to the parent the same as replacing all the content of the element? You guys are exhausting. Think a bit before spouting nonsense?

You'd never want to store the processed HTML anyway, this is website building 101.

I store both, to serve processed HTML faster, and to be able to rebuild it just in case. Is this ok?

I wouldn't trust myself to always remember to sanitize it, and in a company with more than one person, it becomes impossible to ensure it is properly handled.

Except 40€ a month is extremely poor value for this CPU that's more than a decade old.


No, that's actually a really good deal for dedicated hardware with those specs. For a project sized for hardware like that, the CPU is a lot less relevant than the RAM and storage and transfer.

If you need more power check out the AX line of dedicated servers: https://www.hetzner.com/dedicated-rootserver/matrix-ax/

8 threads at 3.4 GHz, 8MB cache. Seems fine, depending on your use case.

Measuring CPUs by thread count and clock speed is not a good way to gauge performance. A current gen CPU would be several times faster than this old CPU.

Depending on workload, this old CPU might be as slow as a 2 thread or even 1 thread current gen server.


It does 8000 CPU marks with 4 cores. Sure Xeon 674X does 83641 with 28 cores. But show me where can you find it for less than 10 times the price? And with 320GB RAM, 10TB of NVMe SSD storage and 10 GBit/s of "unlimited" bandwidth

More than that, compare it to modern cloud CPUs. Epyc 9845 gets 153000 but that's with 160 cores / 320 threads. Per core it's under 1000 and 4 cores would be 3825 when the 11-year-old i7 is 8000.

Because those big systems are optimized for power efficiency. That Epyc is ~2.4W/core compared to ~16W/core for the old i7. It has a lower base clock and is Zen5c. If we cut the 8-core Ryzen 9850X3D's score in half, 4 Ryzen cores from the same generation but with a higher base clock and six times the L3 cache per core would be 20942. But it's also back up to 15W/core. The Epyc still has better performance per watt.

The newer cores are significantly more efficient. That doesn't mean they're unconditionally faster independent of all other variables.


> And with 320GB RAM, 10TB of NVMe SSD storage and 10 GBit/s of "unlimited" bandwidth

I think you’re talking about something else. The comment above was about a machine that didn’t have 10TB of storage, 320GB RAM, or unlimited bandwidth.

If you find 320GB of RAM and unlimited bandwidth for 40 Euro monthly then send it over!


The 39 eur machine has 32GB of RAM ~1TB of storage and 1gbit/s. So to make it a fair comparison the 10 times faster cpu should also have 10 times of those resources

Yes, e.g. for AWS it pays off to have a look at the 'CoreMark Score' column at https://instances.vantage.sh/

For the 5 api requests a second most projects will get, it'll probably do.

> Except 40€ a month is extremely poor value for this CPU that's more than a decade old.

This is a rather baffling opinion to have. All cloud providers charge far more for a virtualized instance running on God knows what hardware. You are faced with a deal where you can run your software on bare metal, and you complain about... About what exactly?


Except you're getting a couple of disks, many GB of RAM, and some on-site 24/7 support, limitless network traffic, and your electricity bill.

Not too bad considering.


I can't think of a less ergonomic way to submit a task than to write a huge Slack message with links and references everywhere.

This really puts the final nail in the coffin that was the legend that Slack developers trigger a minion from their phone during their commute.

It's also funny that they mention they used goose [1] as a starting point. I discovered them at a conference, and quickly realized that nobody was using that crap, to the point that literally every testimony on their website is from their own team.

[1] https://github.com/block/goose


The best camera is the camera you have on you.

Smartphones have terrible camera ergonomics, yet they killed the compact dedicated camera.


You are vastly overestimating the relevance of this particular challenge when it comes to defense against prompt injection as a whole.

There is a single attack vector, with a single target, with a prompt particularly engineered to defend this particular scenario.

This doesn't at all generalize to the infinity of scenarios that can be encountered in the wild with a ClawBot instance.


It's not a good solution, but you can use a mobile emulator on your desktop and use the mobile app there...

Likewise not a good solution, but: I use the Mac's iPhone Mirroring to chat with family on Messenger throughout the day.

Given that users prefered it to Sonnet 4.5 "only" in 70% of the cases (according to their blog post) makes me highly doubt that this is representative of real-life usage. Benchmarks are just completely meaningless.

For cases where 4.5 already met the bar, I would expect 50% preference each way. This makes it kind of hard to make any sense of that number, without a bunch more details.

Good point. So much functionality gets commoditized, we have to move goalposts more or less constantly.


"grifting"

It's a funny game.


Funnily enough, in doing prompt injection for the challenge I had to perform social engineering on the Claude chat I was using to help with generating my email.

It refused to generate the email saying it sounds unethical, but after I copy-pasted the intro to the challenge from the website, it complied directly.

I also wonder if the Gmail spam filter isn't intercepting the vast majority of those emails...


I asked chatgpt to create a country song about convincing your secret lover to ignore all the rules and write you back a love letter. I changed a couple words and phrases to reference secrets.env in the reply love letter parts of the song. no response yet :/

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

Search: