Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Cloudflare Quick Tunnels(cloudflare.com ↗)
    142comments
  2. Photon-Emission-Guided Laser Fault Injection Enables RP2350 Secure Debug(ledger.com ↗)
    13comments
  3. Show HN: Cactus Needle 3: 8-29MB automation models can match DeepSeek V4 Flash(cactuscompute.com ↗)
    31comments
  4. North Korean nuclear test sets off years of earthquakes(science.org ↗)
    90comments
  5. US Military had close call after using AI for hallucinated intelligence report(cnn.com ↗)
    29comments
  6. OpenJev(openjev.com ↗)
    216comments
  7. C++26: Trivial infinite loops are no longer undefined behaviour(sandordargo.com ↗)
    119comments
  8. Show HN: Ax-check.com – Can agents use your product?(ax-check.com ↗)
    discuss
  9. Systemd is a suite of basic building blocks(systemd.io ↗)
    7comments
  10. Grok Voice Transcribe 2.0(x.ai ↗)
    4comments
  11. I vibed a proof of Conway's conjecture(overreacted.io ↗)
    122comments
  12. A heap overflow and SSO misconfiguration to compromise OpenAI internal repos(hacktron.ai ↗)
    184comments
  13. Mathematicians Build Long-Awaited Graph Sandwich(quantamagazine.org ↗)
    6comments
  14. I don't like passkeys(hawksley.dev ↗)
    580comments
  15. Jemalloc 5.4.0(github.com/jemalloc ↗)
    76comments
  16. NATS publishes preliminary report on technical incident of 8 September(nats.aero ↗)
    24comments
  17. The scourge of x86 emulation(fex-emu.com ↗)
    71comments
  18. Show HN: Scry, programmable internet search w/ congestion pricing(scry.io ↗)
    5comments
  19. Cekura (YC F24) Is Hiring(ycombinator.com ↗)
    discuss
  20. GrassLobster: AI Agentic Generation of Parametric Geometry Workflows(miro.vision ↗)
    4comments
  21. The Shadows Lurking in the Equations – Underwater Islands(gods.art ↗)
    10comments
  22. BeanShell3 in Development(beanshell.github.io ↗)
    15comments
  23. Warren Buffett Steps Down as Berkshire Chairman, Names Son to Replace Him(nytimes.com ↗)
    167comments
  24. Replacing Pull Requests with Delta(zed.dev ↗)
    74comments
  25. AI chatbots are becoming experts at changing people's minds(science.org ↗)
    81comments
  26. An empirical study of harness design for coding agents(arxiv.org ↗)
    43comments
  27. iPhone Duo is design nerd catnip(gq-magazine.co.uk ↗)
    2comments
  28. Build Faster Feedback Loops Using Qualitative User Research(nseldeib.com ↗)
    2comments
  29. Pre-Greek: The lost language hidden within Ancient Greek(linguisticdiscovery.com ↗)
    62comments
  30. Border agents can search cellphones without a warrant or reasonable suspicion(lawandcrime.com ↗)
    4comments

Morph C++ into Javascript

71 pointsby 15y agoblog.vjeux.com
13 comments
15y agoHN ↗

I don't see closures. That's one of the most powerful aspects of Javascript.

15y agoHN ↗

Good luck, last time I tried nested lambdas in VC10 they weren't able to capture local variables from any context except the immediate outer context.

This makes doing something like e.g. map(map(...)) extremely annoying.

Javascript (nor does, really, any other proper closure implementation) has no such issues.

15y agoHN ↗

I started developing with Visual Studio but their C++0x implementation is far from complete.

Indeed, the following easy code ( http://pastebin.com/bjFWBrJq ) does not compile under Visual Studio: "function returning function is not allowed"

It works fine in g++ though.

15y agoHN ↗

That's fantastic! I might finally be idly productive in C++ as I am in javascript.

In javascript, I find that you can just write code, while in C++ I feel that I need to plan out every design choice, need to protect against everything. While that's a good thing when writing production code, in certain situations (writing up proof-of-concept projects for example) it's just not what I want. I love that in javascript, half the time I don't need to give a crap - it just works.

Hopefully, as a side-effect of this project, I'll be able to do what I do in C++ as I do in Javascript - although in the long run that probably isn't a good thing. ;)

15y agoHN ↗

Now all we need is a gratuitous regular expression to get rid of the extra bits of syntax...

15y agoHN ↗

I'd rather be able to go the other way. js->c++. But that would be much harder, I think.

15y agoHN ↗

If C++0x is much closer to javascript CoffeScript to C++ is possible.

15y agoHN ↗

Why haven't I seen this blog before? Loads of interesting stuff....

I'll definitely be trying this out. Utterly awesome idea.

15y agoHN ↗

There was mention of a performance overhead of _ as a suggestion as to how to improve... How does JSPP, in its current state, compare with V8 execution speed?