Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Laya the open source version of Jev(convaiinnovations.com ↗)
    80comments
  2. What Zig felt like, coming from Rust(besok.github.io ↗)
    45comments
  3. A graphical desktop for the ZX Spectrum(github.com/mindbox77 ↗)
    8comments
  4. AI-generated posters don’t have to be horrible(john.hartnup.uk ↗)
    372comments
  5. Tin: full-text search for Postgres(planetscale.com ↗)
    3comments
  6. Human brain is two separate organs, Stanford Medicine-led research finds(stanford.edu ↗)
    166comments
  7. “The Secret Life of Circuits” is here(coredump.cx ↗)
    37comments
  8. Asking Authors About Their Own Papers(medium.com/tmlrorg ↗)
    6comments
  9. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    521comments
  10. Black Holes or Black Hole Stars? Astronomers Spar over 'Little Red Dots'(quantamagazine.org ↗)
    7comments
  11. San Francisco Onion Futures Company(onionfutures.com ↗)
    94comments
  12. GPT-6 Astra Solves a WWI German Radio Cipher(prinzai.com ↗)
    121comments
  13. If math is more than proof, we need to better celebrate the rest of it(terrytao.wordpress.com ↗)
    174comments
  14. Learning Another Language May Be One of the Best Ways to Keep Your Brain Healthy(theconversation.com ↗)
    12comments
  15. Cloudflare Quick Tunnels(cloudflare.com ↗)
    299comments
  16. How to Write with an LLM(sockpuppet.org ↗)
    358comments
  17. Communication by means of modulated Johnson noise(pnas.org ↗)
    16comments
  18. You can run Git on object storage if you re-make packfiles(tigrisdata.com ↗)
    23comments
  19. Saving another 100TB of RAM(cloudflare.com ↗)
    87comments
  20. SDCC – Small Device C Compiler(sourceforge.net ↗)
    22comments
  21. Science Is Open Software(jepedersen.dk ↗)
    47comments
  22. From Stonemasons to Carpenters(thelastsoftwareengineer.substack.com ↗)
    4comments
  23. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    44comments
  24. Ray Ozzie and the Optimism of Being Early(reproof.app ↗)
    6comments
  25. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    119comments
  26. Ctenophores: Wonders of Biology(quantamagazine.org ↗)
    6comments
  27. NASA-IBM Lunar Foundation open-Source Geospatial AI Model(usra.edu ↗)
    5comments
  28. How OpenAI Used Its Own LLMs to Design Its Jalapeño Chip(ieee.org ↗)
    115comments
  29. OpenJev(openjev.com ↗)
    276comments
  30. Goroutine Leak Profiles(go.dev ↗)
    6comments

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.