Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Laya the open source version of Jev(convaiinnovations.com ↗)
    142comments
  2. A graphical desktop for the ZX Spectrum(github.com/mindbox77 ↗)
    47comments
  3. Tin: full-text search for Postgres(planetscale.com ↗)
    41comments
  4. AI-generated posters don’t have to be horrible(john.hartnup.uk ↗)
    454comments
  5. Human brain is two separate organs, Stanford Medicine-led research finds(stanford.edu ↗)
    180comments
  6. “The Secret Life of Circuits” is here(coredump.cx ↗)
    51comments
  7. Asking Authors About Their Own Papers(medium.com/tmlrorg ↗)
    35comments
  8. Black Holes or Black Hole Stars? Astronomers Spar over 'Little Red Dots'(quantamagazine.org ↗)
    13comments
  9. I built the fastest PHP webserver in the world(qbixserver.com ↗)
    28comments
  10. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    551comments
  11. San Francisco Onion Futures Company(onionfutures.com ↗)
    116comments
  12. GPT-6 Astra Solves a WWI German Radio Cipher(prinzai.com ↗)
    132comments
  13. New evidence for hidden chambers beyond Tutankhamun's tomb(nature.com ↗)
    5comments
  14. If math is more than proof, we need to better celebrate the rest of it(terrytao.wordpress.com ↗)
    190comments
  15. What Zig felt like, coming from Rust(besok.github.io ↗)
    106comments
  16. Learning Another Language May Be One of the Best Ways to Keep Your Brain Healthy(theconversation.com ↗)
    39comments
  17. Cloudflare Quick Tunnels(cloudflare.com ↗)
    301comments
  18. How to Write with an LLM(sockpuppet.org ↗)
    360comments
  19. Agreement between the USA and Denmark (1951,2004) [pdf](state.gov ↗)
    13comments
  20. You can run Git on object storage if you re-make packfiles(tigrisdata.com ↗)
    24comments
  21. Communication by means of modulated Johnson noise(pnas.org ↗)
    18comments
  22. Saving another 100TB of RAM(cloudflare.com ↗)
    89comments
  23. SDCC – Small Device C Compiler(sourceforge.net ↗)
    23comments
  24. Ray Ozzie and the Optimism of Being Early(reproof.app ↗)
    11comments
  25. Science Is Open Software(jepedersen.dk ↗)
    51comments
  26. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    44comments
  27. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    122comments
  28. Ctenophores: Wonders of Biology(quantamagazine.org ↗)
    7comments
  29. OpenJev(openjev.com ↗)
    279comments
  30. From Stonemasons to Carpenters(thelastsoftwareengineer.substack.com ↗)
    4comments

Deno – A secure TypeScript runtime on V8

25 pointsby 8y agogithub.com
18 comments
8y agoHN ↗

This is an excellent hindsight-2020 project, and the concept is overall an improvement on Node, but I'm afraid the ship has sailed and Node's momentum is too high to stop. Not that mainstream usage was ever its goal, it was basically a proof of concept for Ryan Dahl to demonstrate how he would do things differently if he could start over, and that yes, it would be demonstrably better than Node. On one hand I wish TypeScript got more love, but on the other hand its inherent unsoundness kind of makes me want something like ReasonML[1] to win out in the long term instead.

[1] https://reasonml.github.io/

8y agoHN ↗

What’s unsound about TypeScript? I’m just learning it as we use it a lot at work

8y agoHN ↗

TypeScript is a structural typing model vs nominal one, such as Java, which we are more used to. Not that one is more sound than the other, just different approaches.

I actually like the structural system a lot, and found that combined typescript expressiveness, typing a code base with TS is much more intent driven and requires much less contortionism that a class-for-everything nominal system such as Java. In fact, we ported one of our java backend to node/TS, 40% less code, and as typed if not more. Also, there are simple ways to bring some of the nominal characteristics when needed, but in a language like JS where object literal is a intrasic part of the language, a structural typing system is great fit.

So, yes, their are different approach, but not sure soundness is a good description of those differences.

Now, if TypeScript is used to code JavaScript ”a la” Java, then yes, it could be seen as a loss of functionality.

8y agoHN ↗

Why not a secure runtime on Golang instead? just curious since I saw in another article here today that the author of Deno(also the creator of nodejs) prefers Go for server stuff.

Leveraging JS popularity is one reason I can think of.

8y agoHN ↗

It seems like they've chosen Rust for the backend. This is a great fit in terms of preventing data races and having a no-GC performance profile.

8y agoHN ↗

JavaScript is garbage-collected. They are using Rust to avoid having two garbage collectors.

8y agoHN ↗

    import { test } from "https://unpkg.com/deno_testing@0.0.5/testing.ts"

Won't this get old really quickly? Most of my Javascript files start with 3-4 imports of the form `import React from "react"`, `import { sortBy } from "lodash"`. Having to type out the full path/version for those imports feels like a step backwards in usability, and makes it more likely that I'll end up with mismatched versions of dependencies.

8y agoHN ↗

Not a problem if the version part is excluded. Golang uses similar imports(think all the github.com/user/package) and seems fine.

But this could lead to a mess, as different files may end up using different version of same package.

8y agoHN ↗

Aims to support top-level await.

As a node developer: yum.

8y agoHN ↗

top level await is not important.

The easiest solution to this is just put one single line of code at the top of your application, then you can have as many awaits as you like under that.

8y agoHN ↗

It's more complex than just adding an IIFE, which is why Ryan mentioned it. You can't await an import, for example.