Hacker Newsnew | past | comments | ask | show | jobs | submit | rustnote's commentslogin

People dismiss modern notebooks as Knuth's style of literate programming, where they are more for exploring and documenting an existing codebase or just experimenting. So people are often arguing over two completely different things.

I love notebooks, made VS Code extensions for Go (gobook) and for Rust (rustnote). Give them a try if anyone is interested, still lots of features to add, but the source code is standard markdown, so the code results can be saved straight to Github and they render there.


That is amazing! Have you considered creating a notebook for TypeScript? I saw Microsoft created an extension but never cared to publish it: https://github.com/microsoft/vscode-nodebook


Yeah I have, I'm just focusing on getting the Rust language server working first which is quite tricky, then I'll be adding other languages.


how about https://github.com/winnekes/itypescript

(also obserablejs) for a different take on it.

I have a feeling notebooks are not as popular for javascript since it's quite limiting relative to what a code sandbox can do.


I guess on a load balancer or DNS level? A request has to hit a single domain name / IP before it's load balanced to the distributed system right?


Multiple devices in very different parts of the world can respond to the same IP address. A great example are DNS servers like 1.1.1.1 and 8.8.8.8- you get routed to the nearest site that can handle your request. A common example of how this is implemented is via anycast: https://www.cloudflare.com/learning/cdn/glossary/anycast-net...


It's plenty loved, I'd say the most loved, but still a fair way behind Oracle in terms of popularity just because of legacy stuff. Damn legacy code, hecking JQuery was still the most used JS framework until just this year!


Oracle and popularity don't really go together. Oracle is really common, just like root-canal treatments. Wouldn't refer to either as popular, though.


> but still a fair way behind Oracle in terms of popularity

I have a vague feeling that those who use Oracle are using it due to circumstance or corporate necessity.


One of the last straws for a job I had once was realizing that the oracle python client would convert money fields into float.

Oracle had its tentacles everywhere in that company. I think even they wanted to stop using it but it was just integrated to too much.


Oracle is a hot mess but it also has some really powerful features, like table sharding , that actually works if you manage to set it up correctly.


To be clear, Oracle's popularity isn't popularity in the sense of popular folk love. Unless you mean popularity in the most rancid disgust available en masse.


So there's a runtime cost for using generics?


The linked article is a proposal but at least when I tried Go a couple of weeks ago, it did not use that approach and to the best of my knowledge that proposal has not yet been implemented. Instead as of now Go uses the straight forward approach of generating one implementation for every instantiation just like C++ compilers do.

The upside is there is no runtime cost to using generics, the downside is there is significant compile time and link time cost to generics.


The hybrid approach is absolutely implemented: https://github.com/golang/go/blob/master/src/cmd/compile/int...


> the downside is there is significant compile time and link time cost to generics.

Are we talking statistically significant or productivity significant compile time cost? Go has a fairly fast compiler, it would be a shame if generics made that a less stand-out feature.


Yes, the same cost as calling a method through an interface. IIUC, the concrete implementation can change.


No, it does not have the same cost as calling a method through an interface.


I like what Chris Lattner said about language design in Lex Fridman podcast, that you know when you're doing something right because it "feels" right. Rust has a bunch of syntactic sugar which gets critised in many languages, but to me things like error returns with ? "feels" right. Love Go as well, and the error handling makes a lot of sense in concept but it just doesn't "feel" nice to look at or use.

I like there's a language that has such a strong vision, but dealing in absolutes has drawbacks, a little sytactic sugar would make error handling a lot nicer.


eh having used both, rust's approach isn't any better. when you need to decorate an error, which generally is a lot of the time, rust has the same ergonomics as golang. they optimized code for a generally rare situation.

I do appreciate rusts match syntax though.


For what it's worth I really like how go handles errors.


I’m with you in this one, Go’s error handling was intuitive to me. It was my first compiled and typed language, though. That might bias my experience.


> that you know when you're doing something right because it "feels" right

Absolutely false. When you write the really groundbreaking and important software "feels right" is absolutely not what you should be experiencing.

The correct mode you should be in is "holy fuck how did I get here, and can I come out in one piece"?

(A: no, you can't, but the new you will be a better you.)


You might like this extension for VS Code: https://marketplace.visualstudio.com/items?itemName=rustnote...

I just got it to a usable state today, does what you're asking which is run rust code without a main function. Just open a .md file and you're good to go. Also saves the outputs to markdown so you can upload to blog sites. I've only tried it on Linux btw might not work on other platforms.


People love writing Rust, if they want to try rewriting stuff why not? Might end up better might end up worse, can't hurt. I doubt it's out of spite for other languages, think it's just out of personal passion and curiosity.


Of course! I also write / rewrite / reinvent lots of things, for fun or out of curiosity.

The issue with this topic specifically is that these rewrites are considered a solution to a plethora of extremely difficult problems (safety, etc.).


This course is what made me fall in love with computer science.


Coal isn't just for electricity, it usually rises and falls with the price of steel because it's needed for the process. Also has use in a bunch of other things like water filters.


I thought water filters use charcoal, not coal.


Error handling is one area I way prefer in Rust. It's trivial but having a single line "expect" to throw on some additional text to an error if it doesn't need anything else is really nice. In Go even something really simple might have a bunch of three line error checks everywhere and it just doesn't feel nice to me.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: