Hacker News new | past | comments | ask | show | jobs | submit | more cwackerfuss's comments login

Nic Carter, a bitcoiner, had some interesting points about Bitcoin's energy consumption on Lex Fridman's podcast (EP. #173)

He suggests that most of the energy Bitcoin consumes generally comes from places that consistently produce an excess of energy that otherwise goes to waste. Miners, seeking to maximize profit, gravitate to areas where energy is cheap because supply > demand. I'm not sure what percentage of the energy could be considered "excess."

His other point was that the discussion of Bitcoin's energy consumption should be framed in the context of how much value it brings to the global community. Expecting a valuable global decentralized asset to be entirely without energy costs is unrealistic, it's just a matter of how much energy is feasible. Depending on how valuable Bitcoin is deemed to be, consuming the same amount of electricity as a small country might be justified in the short term, but should clearly be addressed in mid term.


> Bitcoin's energy consumption should be framed in the context of how much value it brings to the global community.

Sure, but how much is Bitcoin actually being used where it creates real value, as opposed to being something people invest in hoping it will go up farther.


Akon has been an active entrepreneur in Africa for a while now. He runs a solar company that provides electricity and jobs to Africans who would otherwise just be dependent on charitable giving. This project involving Akoin started in 2018 and he's been working closely with Senegal leadership to make it a success.

On the other hand, have you seen Will.i.am's smart watch? It's... Horrible https://youtu.be/5BRbMatqN3c


It seems building "smart cities" is a trend now... Saudi Arabia started one, Elon Musk wants to build something like that on Mars, and there's all these ideas of floating cities being passed around. I don't know much about Akon's entrepreneurial record but "smart futuristic city powered by a blockchain in Africa" seems like a huge and mostly imaginary leap from "local solar company". You'd be hard-pressed to come up with the cash to build this in America, so doing it in Africa feels like an unrealistic utopian dream disguising a ploy for money.


Smart cities have been a thing for a while, like in China or South Korea.

At least for Songdo in South Korea, it turns out that employers have no interest in rolling the dice on a brand new city with no proven track record, and residents don‘t really want to move to a place with no jobs. Plus cities designed from scratch in ivory towers tend to be very poor places to live nicely.


makes sense. could also explore versioned routing, where you detect multiple versions based on filename (e.g. *_v1), folder name, or some export naming convention.


Yes, good idea!


I have been a tad skeptical about how Blitz.js would accomplish "batteries-included" elegantly, but 5 min into reading the (very thorough) docs and it seems like a fantastic amount of abstraction to work with. You're a genius flybayer!

2 questions:

1. How the docs read right now, I'm cautious about the "recipes" concept. It's not clear why I'd need to use a recipe to install Tailwind instead of installing Tailwind via NPM. I'd love the docs to explain what "coupling," if any, occurs with Blitz <> a recipe's dependencies, so I can better understand what I'm opting into by choosing the framework.

2. Is there a roadmap for API-only implementation, like Rails? If I want to use some of my Blitz endpoints from another client is that possible?

Thanks!


Ha, thank you!

> Re: recipes

You don't have to use recipes. Recipes simply package a number of manual steps into a single automated command. Recipes let you install a library without looking up the install docs.

Recipes are roughly "install dependencies + codemods". So for example the `chakra-ui` recipe installs the needed dependencies and adds the theme provider to your app root.

There's currently zero coupling with recipes. The end result is exactly the same as if you did everything manually.

> Re: API-only

Currently you can do that. You can use the API routes (which give you direct access to Node req, res objects. And don't add any pages (or just a few, as you want).


Sweeet. I could actually see Blitz being really useful as an admin interface over an API, where the generated API drives web/mobile apps.


This is common. Web apps frequently fetch data from other domains, whether internal or third party.


Agreed, but a common extension does not mean it is required, nor that it should be demanded that an example of making a REST service needs to show how to do it.

The example is simply the beginning. It can be extended as needed depending on your use case. This is how most things Golang work. You start with the basics and add what you need on a case by case basis.

If you want something with every bell and whistle out of the box, Golang is going to be a disappointment generally as that is not the Golang mentality.

There are of course sufficient frameworks in Golang these days to provide such things though. Hence the article clearly says "standard library" to indicate that it isn't the last word on how to setup a REST service in Go.


Frontend developer here --

Although you could omit the closing tags, I don't see the benefit of doing so. If you know HTML, nesting is fundamental and not explicitly closing dom nodes would lead to confusion. You would also need to concern yourself with the "certain conditions" that must be met for it to work. Consistency and clarity over brevity!


I am not a frontend developer. I agree with you. I write my blog posts with handwritten HTML because that is how I began writing blog posts many years ago when Markdown was not as popular as it is now. Indeed I never omit any optional tags while writing my blog posts or blog layout.

I am not necessarily recommending that one should omit the optional tags. However, it is worth noting that the option to do so while conforming to the HTML5 spec is there. The "certain conditions" are not really much to worry about. I think they are drafted quite carefully and are quite sensible. If one is writing simple HTML documents, say, for blog posts, text-based articles, etc. one can safely omit the optional tags without running into issues due to the "certain conditions".


> Indeed I never omit any optional tags while writing my blog posts or blog layout.

Do you type <tbody> every time you write a table? That is an optional implicit tag that can be left out just like <html>, <head>, and <body>.


I don't type <thead> and <tbody>. I believe that's an exception to the practice of never omitting optional tags. Maybe there are a few more exceptions like that but none that I can remember right now. Thanks for posting this comment. It made me realize that my previous claim was inaccurate.


I write plenty of HTML by hand, for myself. I prefer to omit things like </p>, </li>, </td> and </tr>, because it takes less effort (and I hate text editor plugins that automatically add closing delimiters of any form, because they always do the wrong thing a meaningful fraction of the time in a way that I have to think about, more than if I just type the delimiters myself, though an accurate “insert at the cursor whatever is needed to close the last thing” shortcut might be handy), and reduces visual noise.

I also normally omit quotes on attribute values if correct to do so.

I mostly do these things when working on things of my own, when I know no one else needs to worry about them. When working on things others will touch, I don’t drop quite as many closing tags, and will normally leave attribute values quoted.


> I hate text editor plugins that automatically add closing delimiters

Glad I'm not the only one. The less an editor does automatically to "help" me the better. I agree, a shortcut to close the last opening syntax element would be nice, but for this to work properly the editor needs to be aware of how all the syntax elements interact, e.g. to differentiate between '<' used in a logical comparison and the same symbol as start of an XML tag. Or to correctly close an XML tag no matter if it has attributes.

I have a shortcut in Vim for three different kinds of brackets but it's a bit janky. Still better than the automatic stuff the typical IDE and modern editor does without asking, though.


> You would also need to concern yourself with the "certain conditions" that must be met for it to work.

You have to concern yourself with them anyway. If you do something that automatically closes an element, it's automatically closed at that point whether you put a close tag somewhere later on (that will be ignored) or not. This is like semicolon insertion in JS: the fact you're using semicolons does not mean you can ignore the rules for how they're inserted.


Especially with HTML as it's going to get minimized and hacked up to reduce the filesize. Including the closing tags makes the transpilers job easier and less error prone.


A transpiler that gets confused when optional tags are missing (a feature explicitly allowed by the spec) is a broken transpiler and it needs to be fixed. This is like the automatic semicolon insertion of JavaScript debate[1][2] all over again. These things are spelled out in the standards and tools that do not adhere to the standards are broken.

[1] https://web.archive.org/web/20201206065632/http://inimino.or...

[2] https://blog.izs.me/2010/12/an-open-letter-to-javascript-lea...


Yeah, fine. The tool is broken. Right.

But YOU have still an issue.

The Point is: There a lot of broken tools out there, and you can't know which of them will be used in the future. Just avoid a lot of headaches for your future self and your colleges by not testing out the spec-compliance of all those tools you'll probably use at some point.


> But YOU have still an issue.

I disagree.

> There a lot of broken tools out there

A tool that incorrectly handles optional tags may handle other parts of the spec incorrectly too. Such a tool may provide incorrect results for even perfectly well-written HTML. There is no know what it takes to make all the broken parsers out there happy.

I know you made a point about ETL tools[1] where XML parsers are used to parse HTML but there is no way to cater to such absurd use cases anyway. Using an XML parser to parse HTML5 is not going to work correctly anyway even if you do retain the optional tags because it would fail on other HTML5 tags that do not have closing tags such as <meta>, <link>, <img>, etc., empty attributes like <input disabled>, <input required>, etc. Web developers from all around the world are not going to start writing self-closing <img /> tags just because these broken ETL tools have decided to use an XML parser to parse HTML5.

There are plenty of good HTML5 parsers out there for almost every mainstream programming language. Just use them.

[1] https://news.ycombinator.com/item?id=25708209


Most of the "plenty of good HTML5 parsers out there" are broken. No wonder as the spec is nuts. (It took years before there was even a correctly working validator).

Also I was explicitly talking about XML compatible HTML. It's called so because it's XML compatible.

Btw, have you ever seen HTML in the web browser dev tools? Guess why it shows always the "optional" tags. ;-)


> Most of the "plenty of good HTML5 parsers out there" are broken.

Can you name a few popular and widely used HTML5 parsers that are broken and tell us what the bugs are in those parsers? I would be surprised if you can find or name even two such parsers that are popular but cannot handle optional tags correctly as required by the spec.

> Also I was explicitly talking about XML compatible HTML.

There is no such thing as XML compatible HTML (unless you mean XHTML which we are not discussing here). Maybe you mean XML-serialized HTML5. I can only guess since the terminology you are using is vague and unclear. In any case, HTML5 by itself is incompatible with XML. I mentioned this in my previous comment. Not all tags in HTML5 are self-closing, thus incompatible with XML. XML-serialized HTML5 is however compatible with XML, by definition, and in that case, one would use an XML parser, not an HTML5 parser. More importantly, you can safely omit the optional tags and still convert your HTML5 document into XML-serialized HTML5 document without any issues whatsoever. This was explained to you by anjbe here at https://news.ycombinator.com/item?id=25706163. He is absolutely right.

> Btw, have you ever seen HTML in the web browser dev tools? Guess why it shows always the "optional" tags. ;-)

You see all the tags there because it shows the entire DOM. The browser automatically creates the elements when optional tags are not explicitly present in the HTML. This is all spelled out in the spec very clearly. Any HTML5 parser worth its name follows the spec. I am not sure what your point is here.

See https://html.spec.whatwg.org/multipage/syntax.html#optional-... for details, especially:

"Omitting an element's start tag in the situations described below does not mean the element is not present; it is implied, but it is still there. For example, an HTML document always has a root html element, even if the string <html> doesn't appear anywhere in the markup."

I hope that explains why you always see the elements for the optional tags in a web browser's developer tools.


The minimizer should output HTML without unneccesary tags, and it should probably expect to run on its own output, so I don't see why adding unneccesary tags would help it work.


The man who collects rocks in his pockets eventually drowns.


The Umbrella Academy's music budget must have been massive. Binged it a few months back and there were tons of high profile songs.


I had another theory, budgets for streaming shows are falling. Adding a song as filler is probably one of the cheapest ways to add 3-4 mins to your 60 min contractually obligated episode length? Or maybe not. I have no idea if it's cheaper.

The Queen's Gambit had one in the 2nd to the last episode. It was clearly filler and has been called out by many critics. I still loved the series over all but after few moments of that filler I skipped forward to the end of the song.


Presumably it's because Umbrella Academy was a comic by a musician? Would explain the focus on music

I like the Noel Gallagher montage when thatb kid is walking trhough the apocalypse


I've noticed most Netflix productions seem to have _really_ good soundtracks.


You must be a masochist.. I'd rather spend 1/10th the time finding out if I have a hit on my hands and address scaling problems later than battling with kubernetes and kafka. Build product not infrastructure.


Yes I believe that's the joke.


Isn't it impossible for the 16kb partial to be valid json? Json starts in either a curly or square brace -- valid json more than 16kb would never close the outermost brace in the first 16kb of data, otherwise it would be invalid


The authors of Moment also actively recommend switching off Moment onto a different date library like Luxon or Date-fns. Shouldn't be on this list.


Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: