I'm sorry but all those examples and Deno's documentation in general should be in JavaScript. I respect the devs right to choose which ever language they want, but Deno seems to want to be the standard bearer for the power of scripting and web standards [1]. If that's the case, then they are causing more harm than good by focusing exclusively on TypeScript, which isn't a language as much as a set of macros on top of…
Deno Is Webby
31–40 of 215 posts
Re: Deno Is Webby
#32Efficiency seems to be a real priority w them. I like the simplicity in Deno Deploy also. You literally get a text box and just type in your cloud function. You don't have to install cli, set up tooling, for a quick try out.
You can also do the same by deploying a worker through the dashboard UI (including writing the code). Nothing to link though because you need an account. The playground is limited in what it can do because it’s not deployed. You can also use Pages to point at a repo which lets you build a website and server side code (through Pages Functions which actually runs your code in a worker).
[1] https://developers.cloudflare.com/workers/learning/playgroun...
Re: Deno Is Webby
#33Whenever someone has asked me "what would you change about Javascript" for the last 15 years, my answer has usually been "it badly needs a standard library." The standards committees have partly advanced that and Deno is following those leads, but I've got my fingers crossed that Deno will also fill in gaps (and those will make their way back into standards committee considerations). (My other answers have been more…
A couple of questions: “Make [] false-y” Why? “Add macros” Why? How? “Bring back `with`” Why?
I'm not sure about macros.
I kind of want to see `with` back also. The problem with it was ambiguity. The syntax could be adjusted to avoid the ambiguity. .e.g `.prop = val;` could be legal inside the block. But "why though" you ask. A `with` block makes it visually obvious that a block of code is specifically relating to getters/setters on a particular object instance.
Re: Deno Is Webby
#34I'm sorry but all those examples and Deno's documentation in general should be in JavaScript. I respect the devs right to choose which ever language they want, but Deno seems to want to be the standard bearer for the power of scripting and web standards [1]. If that's the case, then they are causing more harm than good by focusing exclusively on TypeScript, which isn't a language as much as a set of macros on top of…
How did people write semi elegant Ruby or python all these years, why wasn’t there such a massive push for types in those languages? Most likely because backend people chose the backend language of their choice, but on the frontend they detested JavaScript (you have no choice, you must JavaScript you anti authoritarian shit heads) so much they had to drown it with some kind of ketchup to make it edible (Typescript).
Re: Deno Is Webby
#35Whenever someone has asked me "what would you change about Javascript" for the last 15 years, my answer has usually been "it badly needs a standard library." The standards committees have partly advanced that and Deno is following those leads, but I've got my fingers crossed that Deno will also fill in gaps (and those will make their way back into standards committee considerations). (My other answers have been more…
Gonna guess you're a lisper ;) Definitely it's biggest warts are around core data types - mainly the implicit-casting rules - but those are also impossible to change at this point. "Don't break the web" and all that.
And yeah, making [] false-y would probably do bad compatibility-breaking things. That's from the department of wishes more than good practical going-forward choices.
Re: Deno Is Webby
#36Earlier quoted context omitted.
Both are implemented in deno per MDN’s compatibility table.
Deno does not have its own javascript implementation, it uses the V8 javascript engine, and V8 happens to implement padStart and padEnd. V8 was originally created as the javascript engine for Chrome, but it is used in many products now, including Node.js and Deno: https://v8.dev/
Re: Deno Is Webby
#37> You can log and style CLI output the same way you do it in the browser’s developer tools: using what you know with console.log > console.log("%cHello World", "color: red"); TIL, neat! If anyone else did too - https://developer.mozilla.org/en-US/docs/Web/API/console#sty... looks great Using alert/confirm/prompt for CLI tools is nice too, makes a lot of sense to build that in and use the web APIs for it.
Re: Deno Is Webby
#38I'm sorry but all those examples and Deno's documentation in general should be in JavaScript. I respect the devs right to choose which ever language they want, but Deno seems to want to be the standard bearer for the power of scripting and web standards [1]. If that's the case, then they are causing more harm than good by focusing exclusively on TypeScript, which isn't a language as much as a set of macros on top of…
Some part of me wonders if they wrote some clear optimizations for defined types that translate easily to Rust. I could give two shits about types honestly, but I’m also one of those weirdos that keeps function arity low, and object definitions concise. How did people write semi elegant Ruby or python all these years, why wasn’t there such a massive push for types in those languages? Most likely because backend peopl…
> why wasn’t there such a massive push for types in those languages
Are you just choosing to ignore all of the history of type checking Python and Ruby?
Re: Deno Is Webby
#39One of the things I love about Deno is that since it implements standard web APIs, many libraries built for the browser just work. For example, I recently made a simple static site generator with Deno to make my blog, and I found that I could use Marked for markdown support simply by importing it like this: import 'https://cdn.jsdelivr.net/npm/marked@3.0.7/marked.min.js'; // now I can use window.marked()
One of the many things about Node that Dahl explicitly wanted to "fix"* when building Deno was that the global namespace should be `window`, because that's what it is in JavaScript's natural habitat. *scare-quotes because the reader might feel strongly opposed to the term, not because I have an agenda
Re: Deno Is Webby
#40This is nice, until its not. I have spent a fair amount of time over the last several years trying to make node act like the browser, or vice versa. It's doubly confusing to juniors who don't understand the difference between a language and a runtime. alert() looks like a standard function and should be specified by the ECMAScript Language Specification. But its actually specified by the HTML standard, because its Wi…