Better HN
topnewbestaskshowjobs
Log inSign up

slashdev

17,493 karma · joined May 14, 2013 (13y ago) · 5,497 submissions

Founder of revscope.co

Revenue focused web analytics to help you quickly identify where to focus your effort to best increase revenue.

And embersofvictory.com

Retro turn-based strategy game.

Submissions

comment 4y ago · link · parent

We can debate syntax but a Go or Python based template language is not conceptually any different to JSX based syntax. Both are essentially functions that take some input data and return the data formatted in HTML.

comment 4y ago · link · parent

I hate SPAs. I would never do another SPA again if it were up to me. It just adds too much mental context switching and overhead. I can develop fully server-side apps that are lighter, run faster, and at least 20% less development effort (I actually compared that for the same task: https://medium.com/@mustwin/is-react-fast-enough-bca6bef89a6). So why would I ever do an SPA again if it were up to me? I would use https://github.com/jfyne/live which is inspired by Phoenix LiveViews. This is my professional opinion, having many years of experience in both kinds of web apps.

comment 4y ago · link · parent

I like Hugo quite a lot, but I don't like Go's standard library templates. I wonder if it is possible to use https://github.com/valyala/quicktemplate with Hugo?

comment 4y ago · link · parent

If you mean for function calls, I believe you're correct, not taking into account inline functions.

However, for code generation Go obviously uses registers since way before the 1.0 days.

comment 4y ago · link · parent

Presumably gun control means some forms of restrictions and registration programs, not outlawing of gun ownership. I really don't see a connection.

comment 4y ago · link · parent

I believe this should say Onsite / REMOTE (U.S. only). To avoid wasting the time of people outside the US.

comment 4y ago · link · parent

When Mexico masses troops on the border you'll be glad your weapons are unregistered?

I don't see the connection here with the Ukraine and gun control.

comment 4y ago · link · parent

I think it's useful for people who are unfamiliar with who the Inuit are.

comment 4y ago · link · parent

I choose boring happily over being dead.

I don't think I would be willing to give my life to defend a country unless against a terrible evil like the Nazis.

comment 4y ago · link · parent

Huh? Explain

comment 4y ago · link · parent

Evil is a pretty strong word to toss around like that. The Nazis were evil. How is the West evil?

Western countries do a number of bad things, but they're not evil.

comment 4y ago · link · parent

With military aircraft? I don't think that's covered by international law, it doesn't sound right. Any country would object.

comment 4y ago · link · parent

I've had this a couple times. Mostly the code didn't make sense when I woke up, but just once it was actually a solution to a problem I was working on and I went and implemented it.

I'd rather dream about more fun things though.

The more time I spend as an adult the more boring and mundane my dreams seem to get. The other night I was buying chicken in the supermarket and wincing at the price.

comment 4y ago · link · parent

> I'd give your criticism some consideration if I thought you had even the slightest knowledge of what we're talking about.

Doesn't sound like an arrogant person to me...

FYI I understand how magnetic confinement fusion works at a high-level, as a non-scientist.

There's a lot of assumptions you're making here. First that we need hydrogen-hydrogen fusion. Many current reactor designs use deuterium and tritium (nasty stuff tritium.) It doesn't have to be plain hydrogen, it just has to be elements common enough that we won't run out (or that we can breed using neutrons - that gamma radiation you talk about - from the fusion reactor.) Some designs are more exotic with fuel using isotopes of helium, lithium, boron. Second many current reactor designs use a plasma temperature well above 15M K. I've heard of 100M K and that's not an upper limit.

But you're also making assumptions about the volume of a reactor - we don't even know if magnetic confinement fusion will end up being the best design, but if we assume it does - then stronger magnetic fields really decrease the volume required. In fact development of stronger magnets based on high-temperature superconductors may be the biggest breakthrough in fusion research in the last decade - see https://news.mit.edu/2021/MIT-CFS-major-advance-toward-fusio...

> And here you are expressing doubt that we'll achieve even the easiest kind of fusion reactor.

We don't have a break-even reactor yet by the way - we have achieved fusion for short periods of time and by putting in far more energy than could be produced. That milestone is probably still at least a decade away.

My point again is that we don't know enough to be able to say what's possible and what isn't. History is littered with people arrogant enough to say what we can never achieve and humans keep surprising. Sometimes even things that seem impossible - like detecting planets around other stars when the physics of optics is very clear that an optical telescope could never directly image a planet in another solar system. That was wrong on two fronts, one it doesn't account for gravitational lensing, and two it didn't account that we might cheat and detect planets indirectly. And so the arrogant people were wrong again. Don't make that mistake.

comment 4y ago · link · parent

It doesn't surprise me. Your arrogance does though, I didn't expect you to double down on an unreasonable position. How can we possibly know what we don't know yet. Not about how fusion works in theory, but about the limits of the economics of fusion reactors at any point in the future.

What I'm saying is it's too soon to say what's possible with fusion and what isn't. We don't even have a break even reactor yet. We can even say for certain that we ever will.

comment 4y ago · link · parent

It's premature to say what's practical with fusion and what isn't. It's entirely possible that we find a way to build an efficient hydrogen fusion reactor. In which case it might not make sense to travel so far away from our planet just to collect energy from photons when that costs more than just doing the fusion ourselves. Remember it's actually more expensive to travel towards the sun than away from it (because you have to shed velocity relative to the starting velocity on Earth.) It's too arrogant to think we know the answer to that now.

comment 4y ago · link · parent

That actually seems like a pretty good idea.

comment 4y ago · link · parent

Minus forest fires and other extreme weather events. Tough to say it will be positive, but more so than for other countries, apart from Russia.

comment 4y ago · link · parent

I think that there's another angle here too. That Putin made demands of NATO publicly and NATO rejected them completely just as publicly has backed him into a corner. Perhaps he only meant to bluff to extract concessions in the beginning, but now there's no way out without looking weak. I think he has to at least make a symbolic invasion now for political reasons. I feel very sorry for the Ukrainians caught up in this game, as they don't seem to have a win condition, and they're the ones going to pay the ultimate price.

comment 4y ago · link · parent

It's tough to be properly nuanced and specific in a tweet. "I've never read a business plan , but I ask all the big questions that should be answered in a business plan." Just isn't pithy for a tweet.

Honestly Twitter is a terrible idea in most cases that just leads to people shouting at each other - because 140 characters isn't enough to communicate anything in a balanced way.

comment 4y ago · link · parent

Did they get an offer like that, or did they work there when it was 10 people? Because that makes a big difference.

comment 4y ago · link · parent

Automating with LetsEncrypt doesn't mean your certificates don't expire. It just means the failure case looks different. Typically something gets messed up with the server configuration such that the auto renew doesn't run or it doesn't run successfully.

comment 4y ago · link · parent

If you're Bangladesh, give up on being a country and join India so your people at least have somewhere to migrate to.

If you're New Orleans, time to give up on being a city. Start preventing new construction. Incentivize people to leave.

Things like that really if we're going to get honest with ourselves about where things are headed.

comment 4y ago · link · parent

Could you log the headers and body though? I looked into it a little and it looks tricky (requires buffering incoming request body to individual files, which are then your logs of the request body which have to be correlated somehow with the log files.)

1615.

Ask HN: How to log full HTTP requests

2 points · by eloff · 4y ago · 2 comments

comment 4y ago · link · parent

I recently had to research and compare analytics services for work. Type in Heap vs MixPanel and look at the results, the entire first page is garbage comparison sites. I really struggled to find any impartial, real reviews.

comment 4y ago · link · parent

In a context of an interview it means how performance of an algorithm scales with respect to the input length. This is measured in Big O notation. Understanding that is seldom very helpful on the job, but it's very important for interviews, so make sure you learn it.

comment 4y ago · link · parent

Yes, the API is probably suboptimal for Go. It's better to make a wrapper that does the query and fetches many results in one call, into a Go buffer.

comment 4y ago · link · parent

Yes, function calls across the boundary are slow. It's fine if the functions do lots of work, it's very expensive for function calls that should be cheap.

For sqlite it might not matter too much, since any query does quite a bit of work.

comment 4y ago · link · parent

If you mean they have to solve the same problems with very careful design and programming, yes. It's non trivial. Even Postrgres had a correctness issue around fsync for nearly twenty years.

If you roll your own, that's very hard to get right. I wouldn't have confidence in such a system that I've built myself.

1
535455
184