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

Are they trying to imply other city builders (or any game ever) are accurate? I want my Microwave Power Plant!

The is a huge difference between: I assume my crappy router's firewall works and is configured safe by default. And I assume my crappy router's doesn't forward ports by default.

That seems very optimistic, a team that can ship with two would probably be 10x as fast on average.

Of all the valid complaints about Github Actions or CI in general, this seems to be an odd one. No details about what was tried or not tried, but hard to see a `-run: go install cuelang.org/go/cmd/cue@latest` step not working?

Whilst I can not see a motivation I refuse to accept that parking machines are not advisarial design. Why do they have haf a dozen things that look a bit like tap n pay if they are not trying to make it eaiser for card skimmers.

It you bought anything except RAM, a laptop refusing to use 12% for no obvious reason would be note worthy.

You are also not required to indent code (in most languages); please do if you want me to read it though.

You can also indent with spaces and tabs at the same time, who's judging?

Not in python, which is how I always discover someone is using tabs ..

As long as you stay consistent with the whitespace count line by line, you can!

You monster.

Golang would like a word...

I would like Python a lot better if the tab character had been marked as a syntax error. Would have solved a lot of bullshit.

Closing optional HTML tags just adds more ambiguity. How many HTMLParagraphElements here, what do you think?

    <p>
      text1
      <p>
        text2
      </p>
    </p>

2. And there’s no ambiguity there, just invalid HTML because paragraphs aren’t nestable.

It may look nested but the first p is actually closed when the second p starts, according to https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...

Wouldn't this still result in just two paragraph elements? Yes, the first gets auto-closed, but I don't see how a third paragraph could emerge out of this. Surely that closing tag should just get discarded as invalid.

edit: Indeed, it creates three: the </p> seems to create an empty paragraph tag. Not the first time I've been surprised by tag soup rules.


Hence why I said “2” ;)

Browser will parse that as three HTMLParagraphElements. You may think that's invalid HTML, but browser will parse it and won't indicate any kind of error.

> Browser will parse that as three HTMLParagraphElements

Why?

> You may think that's invalid HTML, but browser will parse it and won't indicate any kind of error.

It isn’t an opinion, it literally is invalid HTML.

What you’re responding to is an assumption that I was suggesting browsers couldn’t render that. Which isn’t what I claimed at all. I know full well that browsers will gracefully handle incorrect HTML, but that doesn’t mean that the source is magically compliant with the HTML specification.


> Why?

I don't know why. Try it out. That's the way browsers are coded.

> It isn’t an opinion, it literally is invalid HTML.

It matters not. You're writing HTML for browser to consume, not for validator to accept. And most of webpages are invalid HTML. This very HN page contains 412 errors and warnings according to W3C validator, so the whole point of HTML validness is moot.


> I don't know why. Try it out. That's the way browsers are coded.

I’m not saying you’re wrong, but I’d need more than that to be convinced. Sorry.

> It matters not. You're writing HTML for browser to consume, not for validator to accept.

It matters because you’re arguing a strawman argument.

We weren’t discussing what a browser can render. We were discussing the source code.

So your comment wasn’t a rebuttal of mine. It was a related tangent or addition.


> I’m not saying you’re wrong, but I’d need more than that to be convinced. Sorry.

So basically my point is:

1. You can avoid closing some tags, letting browser to close tags for you. It won't do any harm.

2. You can choose to explicitly close all tags. It won't do anything for valid HTML, but it'll introduce subtle and hard to find DOM bugs by adding empty elements.

So you're trying to improve HTML source readability by risking to introduce subtle bugs.

If you want to do that, I'd recommend to implement HTML validation for build or test pipeline at least.

Another alternative is to use HTML comments to close tags, as this closing tag is supposed to be documentation-only and won't be used by browser in a proper code.


I get your point, but again, that’s not relevant to the point I was making.

You posted a terse comment with some HTML. I responded specifically about that comment and HTML. And you’re now elaborating on things as a rebuttal to my comment despite the fact that wasn’t the original scope of my comment.

Another example of that is how you’ve quoted my reply to the 2 vs 3 elements, and then answered a completely different question (one I didn’t even ask).

I don’t think you’re being intentionally obtuse but it’s still a very disingenuous way to handle a discussion.


> You're writing HTML for browser to consume, not for validator to accept.

I'm not a web programmer, but shouldn't one program against the specified interface instead of some edge case behavior of an implementation?


>Why?

Because the second open p-tag closes the first p-tag and then the last closing p has no matching starting p-tag and creates one thus resulting in 3 p-elements.

> It isn’t an opinion, it literally is invalid HTML.

the only "invalid" part is the last closing p.


At the end of the day, browsers have to handle most of the invalid atrocities thrown at it.

It doesn't make the code valid according to the specifications.


My point is that by closing optional tags you can introduce subtle bugs into your layout that might take some time to find and browser won't be of any help. You write closing tag, browser will implicitly add starting tag. It's better to memorise which tags are optional and do not close them at all.

You can also introduce subtle bugs by not closing them. Or forgetting which tags can be closed and thus leaving the wrong ones dangling.

So I think your argument here is tough to take at face value. It feels a lot more like you’re arguing personal preference as fact.


Precisely, it's an added burden to remember and what might be skipped. The less many exception, the better.

Though if a linter is formatting the whole codebase on its own in an homogeneous way, and someone else will deal with the added parsing complexity, that might feel okayish also to me.

Generally speaking, the less clutter the better. A bit like with a js codebase which is semicolon free where possible.

For pleasant experience of read and write, html in a simple text editor is very low quality. Pug for example is bringing far less clutter, though mandatory space indentation could be avoided with some alternative syntactic choices.


Excellent catch

Why would you nest paragraph tags?

They are not nested, according to HTML5 parsing rules. You get 3 (yes, three) sibling paragraphs, including an empty one.

There being nesting is just implied by the closing tags and indentation. But it is not actually there. I think this is the point of the example: Adding the closing tags just confuses the reader, by implying nesting that is not actually there, and even introduces a third empty paragraph. It might be better left out entirely.


That is invalid syntax. Only phrasing content is allowed the p element (https://developer.mozilla.org/en-US/docs/Web/HTML/Guides/Con...)

The second <p> is not inside of the first. The first <p> closes when the second <p> is encountered.

The syntax is invalid, but that's because the final </p> has no opening <p> that it can close.


This is invalid html, p tag can be nested in a p tag.

Even though it arguably should be, according to HTML5 parsing rules, this is not invalid. It is just interpreted differently from what most people would probably expect.

I think this is the point of the example, afaiui: The closing tags don’t clarify anything, quite the contrary, actually. They serve only to confuse the reader.


HTML is more content than programming logic, so it shouldn't be indented.

Would two DeLonghi Dedica machines count as dual boiler?

Ha, this entirely proves my point that these dual boiler machines can be cheaper!

Very well written reverse engineering documents.


Magnetic induction damping compasses are widely available???


Magnetic induction damping compasses have traditionally used a flat plate under the needle in order to arrest the motion of the needle. This component is not transparent. By removing the plate and adding the ring, you can see through the face, providing the benefits of a liquid damped compass without the possibility of a bubble forming.


Interesting, maybe new for pocket compasses. I had a marine plotting compass that used a massive copper cylindrical housing, with a sapphire glass bottom and window. It was very well damped. It was made in the 1940s, presumably when yachts were mostly wooden. (More modern boats would usually need significant compensation) or maybe it wasn’t for marine use? But anyway, it was a great plotting compass that I used extensively on my little fiberglass weekender sloop. Better than the westmarine garbage mounted on the cabin bulkhead by a long shot.


Lots of liquid damped compasses do not have a transparent base. The liquid is very good at protecting the needle (induction compasses often use a lock), prevents condensation, stabilises temperature, and is noncompressible for diving. Induction compasses tend to be used for fast reading whilst off-level, so tend only be useful for sighting compasses. TBH I am not sure even map compasses grain a lot from transparent dials, it is more that they are making the baseplate and top from transparent plastic and have no need to make the bottom from something else.


That's because the magnetic needle's orientation will only induce meaningful flux in a cross section large enough for it to have any damping effect. That braking effect is more or less proportional to the number of fieldlines cut and diminishes (from memory) to the cube of the size of the air gap.


Yes that's stated clearly in the video


I think there are better ways of admitting you didn't even manage to watch the first few mins of the video.


I think Brunton invented them in 1894.


Yes, but aren't transparent.


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

Search: