277 karma · joined September 3, 2018
We are consuming sources as they are provided in npm using "compat layer" that is part of Deno's standard library. We had to provide special module resolution, but besides polyfill for built-in Node APIs, it works very similar to how Node consumes these packages.
On another note: huge thanks for rust-analyzer, not only is it my main daily driver, but we also used it as a reference for implementation of "deno lsp" - the language server that ships with Deno.
Deno Land is a startup founded by creators of Node.js, the runtime used by millions of developers that laid the foundations for the modern web. We are continuing to innovate with our new runtime called Deno, which is already one of the most popular projects on GitHub [1].
By repurposing web browser technology for the server software, we aim to accelarate a new generation of extreme low-latency edge applications. Our nascent commercial product [2] is cloud service for hosting software built with Deno; it is one of just a couple implementations of serverless at edge in existence. Our software is being used across the industry by companies like Slack.
Head of Growth: https://deno.com/jobs/growth
Apply at jobs@deno.com
[1] https://github.com/topics/deno [2] https://deno.com/deploy
If those tools help you write better code and you prefer to code in Ocaml/F# then it definitely makes sense, but of course this is personal preference.
Drop by at our Discord server [0] to get some tips on how to set up such project.
As for the NextJS; there are also a projects that try to mimic its API like AlephJS [3] and Fresh [4].
[0] https://github.com/oakserver/oak [1] https://github.com/asos-craigmorten/opine [2] https://github.com/drashland/deno-drash [3] https://github.com/alephjs/aleph.js [4] https://github.com/lucacasonato/fresh
Deno 1.13 is one of the biggest releases to date - we're especially happy with stabilization of native HTTP server bindings. We plan to focus on squeezing the last bits of performance out of it in the coming weeks.
Personally I'm most excited about type checking example code in Markdown files. It's critical to keep your documentation up to date and doing so for code blocks embedded in JSDoc comments or Markdown files was very challenging. With this release we got you covered - just run "deno test --doc" on your codebase.
[0] https://github.com/tidwall/buntdb [1] https://github.com/tidwall/tile38
[1] https://kitsonkelly.com/posts/deno-is-a-browser-for-code/
I completely agree with that! But on the other hand with plethora of tools available it can be quite overwhelming to configure all the tools, especially for new users.
> I've tried to get Deno to work before in production, but it had so many compatibility issues last I tried it would take weeks or months to refactor things so it would work.
Work on compatibility layer with Node is ongoing [1]. With every release there's some new API being compatible, but far from over.
You can achieve the same thing with Deno! By default Deno downloads all dependencies into a central cache directory, but by providing DENO_DIR env variable with a path you can tell Deno to change that cache dir. And these files are cached indefinitely; Deno will not try to fetch them again on next run (unless you opt into it with --reload flag).
Deno is different than Node in several aspects; most notably:
- Deno supports only ES modules, there's no built-in support for CommonJS modules
- Deno's APIs are all promised based
- Deno does not use NPM, instead it can pull code from any URL, much like browsers do
- Deno has built-in permission system that by default runs your code in full sandbox allowing to opt-in into breaking out of sandbox (eg. to read a file from disk)
- As you've mention Deno can run .ts files without explicit build step
- Deno comes with a full toolchain in a single binary (formatter, linter, test runner, bundler, doc generator)
For packages that use native Node APIs there's a Node compatibility layer being developed as part of the standard library: https://deno.land/std@0.80.0/node. It's still lacking a lot of modules and doesn't provide seamless experience, but with every release it's getting better.
I'll be more than happy to answer your questions about Deno and its development.
deno --allow-net=0.0.0.0:8000 https://deno.land/std/examples/echo_server.ts
Or even provide a list of addresses: deno --allow-net=0.0.0.0:8000,localhost https://deno.land/std/examples/echo_server.tsQuestion about contributions has been raised on gitter several times already and the answer was to look for "good first issue" labels in GitHub repo. However there are not many of them right now.
It's expected that this should land in next month.
Contrary to Go, when using Deno you don't need to invoke any command to install a package. You just put your import statement with full URL (you can pin version there, eg. https://unpkg.com/liltest@0.0.5/dist/liltest.js) and Deno downloads it on first run and caches for later use. Changing $DENO_DIR is somehow equivalent to changing node_modules location. This eliminates need for package manager.
EDIT: typo