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

OP probably talking about Phoenix's "LiveView" (https://www.phoenixframework.org/ check the video about it).

Phoenix LiveView is a framework where it keeps websocket open with the client and renders DOM changes server side and passes it to the client [0]. Thus with fully server side development without any JS you can have almost full SPA experience.

[0] Have no experience with it, and only read about it some time ago, so don't judge me on the details, but the gist of the "LiveView" idea should be like that.

But you still need JS to update the DOM and handle the websocket stuff, right? Or is this all somehow done with JS disabled?

It’s done with JS but that’s all written for you. But as a bonus, LiveView apps do work without JS (they just aren’t updated over web sockets anymore).

I assume you have to specifically design your site to work with both the request/response model and the LiveView model in order for this to actually work, as opposed to LiveView being able to plug that hole automatically for you.

To be a little more concrete, here's an example:

  <%= live_patch "about", to: Routes.about_path(@socket, :index) %>
which creates:

  <a href="/about" data-phx-link="patch" data-phx-link-state="push">about</a>
The data attributes are read by the LiveView HTML and are otherwise ignored by a JSless broswer.

Edited to fix glaring code sample error.

You can design singularly for LiveView and it handles everything. But if you want both request/response and LiveView (e.g. to mix the two or fallback to r/r when no js) you have to be more explicit in your design. It’s mostly trivial though. I have authentication pages that use the old controllers but pages that use only LiveView without any hassle.

Nope, all you need to do is make sure that everything has a route (which is very much encouraged in LiveView) and it works.

Right. It uses JS but you don’t write any. Or very little. Or in a custom DSL/framework.

Important distinction, as it wouldn't work when JS is disabled in browsers.

I don't see the point of going back to full server side, you have to scale more with more users.

The only benefit would be if it all worked without running JS in browsers, but it doesn't.

> as it wouldn't work when JS is disabled in browsers.

You can make it work when JS is disabled as well, you fall back to rendering regular HTML. It does require a little extra work, but it’s not insurmountable (e.g. using @conn instead of @socket).

>you have to scale more with more users

I might opt for additional optimizations once it gets bigger, but I’m not too worried about scaling Erlang processes.

Yup, this is my thinking as well. If I go back to fully server side, it's because I can somehow instruct the browser to update without JS involved.

Don't you have to scale your api too ?

I have (limited) experience scaling long-lived websocket connections and it _sucked_. It is _way_ easier to scale out little Node servers that are "stateless" than it is to ensure that Client A is connected to Socket A.

I would much rather scale out my REST/Graph/RPC API instead of having to scale out a WS API.

Yes, but now you have to scale both the data layer logic and view layer logic when doing server side rendering.

So now it's two times the hassle, two times the money spent

99% of the time no one runs into scaling issues and worrying about it is premature optimisation. I have to remind myself that all the time.

And no, same hassle, same money spent. Thought about from the start server-side rendered pages are almost as cacheable as API responses will be. If you can't cache you're in for a world of expense at scale whichever way you go.

> Photography Community

Only for iPhone owners?

It certainly appears to be. That's a bit confusing, however. Every example photograph rather prominently notes the camera, not phone, it was taken with. The features seem primarily useful for camera-and-raw-processing photographers. The website doesn't seem to indicate that it's iPhone only, but the feedback section, and the lack of any way to log in or sign up other than the link to the iOS App Store, certainly suggests that it is. The feedback section even suggests that it doesn't support iPads well, and is phone-focused.

What's the intended usage here? Take a photograph with your camera, transfer it to your computer, process it there, export it... then transfer it to your phone in order to post it? Why?

It's not a great workflow but everyone serious does it with instagram, too (even with phone photos, doing post on the phone is awful).

But that's the only way to use instagram, and I don't think it's great workflow.

Pretty common for mobile apps to start on iOS only.

Especially since iOS users spend more money. From my experience, you can have equivalent apps for iOS and Android, yet the iOS version will drive 90% of revenue. If I were them I wouldn't bother creating an Android version until they've proven the model works with iOS. If it doesn't work with iOS, adding Android will only slow their dev velocity and increase their burn rate.

It's becoming a chicken or the egg issue. Every time I open up Play store "premium" apps section is complete trash and "freemium" apps are design in either milking the ads (free but 20 second ad after every action) or the whales (paying 160usd/year subscription for a phone app) - no one is serving middle-class consumer on Android. Then creators complain that there's no middle-class consumer market on Android?

Glass already went to the trash bin for me. If you can barely support 1 app at 5usd/month price point what sort of longevity message is that sending?

But why not an webapp from the beginning ?

> Epik was founded in 2009 by Rob Monster

The founder's name is like from The Onion article.

The whole site looks like it's parody information ("epic" with a K, "Rob Monster", nazi stuff, etc) but it becomes weirder when you realize they aren't parodying anything and all of it is accurate.

Very interesting that Anonymous went after them. I guess it just goes to show you that Anonymous is nobody's puppet, however much any given cause would like to consider them its personal army.

Apparently NOT Epik's personal army: far from it.

I always had this question, though maybe there's a simple answer why nobody is doing this.

Why it's not mandatory to have some smallish engine attached, which at the end of satellite's life would lower the orbit enough until atmosphere picks it up and it will slow down significantly on it's own and burn up?

Is it because most satellites will not fully burn and actually hit the ground, i.e. it's liability?

Is it because of too great of a risk of crossing and colliding with a satellite in another orbit, i.e. liability again?

Is it because "attaching smallish engine" which will fire at satellite's end life is actually really hard thing to do?

Something else?

The engine is not the problem. It's the fuel. Large orbit changes take a lot. Lowering orbit is not easier than raising orbit, it takes the same delta-v.

IMO what should happen is we should ban putting satellites in high orbits. Satellites in low orbit decay naturally within a few years due to atmospheric drag. Satellites in high orbit will stay there essentially forever. More importantly, any collision in high orbit creates a permanent debris cloud which will spread over time and pollute orbit forever, being essentially impossible to clean up even with sci-fi technology. A collision in low orbit creates a similar debris cloud but it will be naturally cleaned up in a few years or less.

Putting satellites in high orbits made sense back when it was incredibly expensive to launch each satellite, because satellites last longer in high orbit and you don't need as many to cover an area. Also, stationary satellite dishes only work with geostationary satellites, and geostationary orbit is a very high orbit. But today we can use phased arrays to communicate with moving satellites without physically moving a dish, and SpaceX is about to drop launch prices through the floor with Starship, making it feasible to launch enough satellites to cover the Earth even in low orbit and replace them frequently. So to me, the space debris pollution risk of high orbit satellites can no longer be justified.

> Lowering orbit is not easier than raising orbit, it takes the same delta-v.

Why is this? From a layman's perspective it seems like gravity would be a massive form of help here and therefore lowering orbit should require much less fuel.

Orbit is unintuitive. Objects in orbit are not just floating up there. They are constantly falling under the influence of gravity, just as objects here on Earth. The reason they don't hit the Earth when they fall is that they are traveling sideways at 25,000+ km/h. This is so fast that they miss hitting the Earth, and simply fall forever.

When a rocket launches to orbit, it only goes up a little bit, just to get out of the atmosphere, and then spends most of its time/fuel on going sideways to reach orbital velocity. If you watch a rocket launch you can see that the rocket starts to tip over and go sideways soon after leaving the pad. This is also why launching from a plane doesn't help you very much, because going up is the easy part of getting to orbit. A plane can't help you with the hard part of getting to 25,000 km/h sideways.

For an object in orbit to stop missing the Earth as it falls, it must slow down that sideways velocity, and gravity doesn't help with that.

Gravity is already helping all it wants to. Gravity is constantly redirecting the velocity in the circular orbit. A velocity change will push it into a new orbit, that will be slightly offset from the old one. You need so much velocity change to offset the orbit so much, and then you are still orbiting - still in something of a a steady state trajectory, just a slightly different one. It’s symmetric in fact

Think of raising an orbit like moving an item from one side of your desk to the other.

You have to put energy into doing it, but the end result is just as much in balance with gravity as the starting point. So if you want it back where it was, you need to spent the same amount of energy to move it in exactly the same way in the opposite direction.

Gravity 'helps' too much, by making you go faster as you get lower, and then you slingshot right back up to your original height.

That's why a lopsided orbit is stable. It wouldn't be if down was easier than up.

Well there are other reasons for debris besides just satellites going out of commission. For example in 2007 China deliberately blew up the Fenyun-1C satellite for some kind of research purpose accounting for probably thousands of current pieces of debris up there.

“Research” - they were testing their orbital targeting capabilities.

It depends on the orbit.

The satellites we put in orbit will naturally have orbits which will decay in a matter of days to hundreds of millions of years. End of life is indeed a consideration for launch approval and many satellites do accelerate their decay with onboard thrust.

Some satellites can’t, would require too much thrust to get back to earth. Some push in to higher orbits to get out of the way for replacement satellites.

Some satellites break in orbit and can’t be controlled.

The FCC _is_ working on making orbital cleanup mandatory: https://www.fcc.gov/document/mitigating-orbital-debris-new-s...

Yes but the FCC is going the wrong direction with that. Firstly it treats constellations differently than individual satellites which makes no sense from a statistical and mathematical perspective and it would also completely kill off the smallest of satellites that students learn with that are primarily launched by universities.

> For purposes of calculating the probability of successful post-mission disposal, we define successful post-mission disposal for spacecraft in LEO as re-entry into the Earth’s atmosphere within 25 years or less following completion of the spacecraft mission.

I don't see the problem.

Because there are no "good" suggestions? (or they are harder to find, lack documentation, etc.)

I am completely with you. IMHO, it is because of easy numbers. Here's CO2 per km and here's Wh per km.

Also people (pushed by oil lobby??) not only forget whole pipeline (pun intended) of petrol industry, but are very concerned that couple hundred kg of batteries is worse than tens of thousands of liters of petrol burned over lifetime of a vehicle.

I often drive between Chęstochowa and Łódź in winter. I have no direct proof that it's from this exact plant, but the smell and smog is horrendous there.

What amazes me the most is how far it goes. From my anecdotal experience the smell goes 50-100km in radius depending on the weather.

If weather is "right" you can smell burning coal out of Katowice, though maybe smell comes from residential buildings as well, I am not sure. Maybe a local could provide better info.

Given you talk about winter, I rather think this smell is from burning coal (...and other questionable materials) in residential buildings for heating.

Could be, though burning coal for heating in this century looks a bit bizarre. But I guess you could not beat how economical it is.

I know, it's absolutely baffling to me, but I know loads of people in Poland who still have coal fired boilers for heating. When asked about this, they say that there is no natural gas pipeline anywhere near them(and local council isn't interested in putting one in), and not everyone has space for an LNG tank in their garden(or even a garden) and heating with electricy would literally make them bankrupt very quickly. So....coal is the only option that everyone can afford.

Coal dust is still very cheap, also old stoves have a wide opening, so trash can and is burned along with it.

Poor insulation is a problem as well.

How a thing like "swatting" exist at all? AFAIK it can happen multiple times to the same location and directed against same people too [0].

It happens for baseless unconfirmed allegations against someone.. "Oh I have heard that he/she is a drug dealer and they are walking with a gun in their backyard" - and whole swat unit is sent - no questions asked. What the hell?

This happens to the super rich and famous too [1]. SWAT team comes to the neighbourhood full of 20MM+ houses and is not second guessing what's going on?

[0] a bit too lazy to search, though there were infamous swattings of famous youtubers.

[1] https://en.wikipedia.org/wiki/Swatting#Other_notable_cases

The whole Special Weapons and Tactics things seems a bit over the top, especially coming from the UK where maybe some cop will maybe knock on the door and ask if everything is ok.

I imagine that police responding to a home in a country which is armed to the teeth is quite different.

to play devils advocaat.

Is it not better for the police to wrongfully turn up to a potentially dangerous situation then to not and people get hurt or killed?

Problem is how violent US policing is [0].

Police/SWAT do not turn up to assess the situation. It looks like they turn up to release their anger, aggression and "play" with their assault weapons. Swatters do this, because it will cause big material and mental losses to the victim, with a high chance of death [1]. In this case police/swat is a "poor man's assassin".

It's very funny for me to read "Measures against swatting" from that wiki article ([1]), when it happens only in US (and maybe Brazil). This does not happen in other 1st world country, because police is accountable for their ammunition and especially citizens shot. In US you can instigate fake raids and kill innocent people in their sleep, and nothing will happen to you as long as you say that you feared for your life. [2]

[0] I know I am stereotyping, though from western 1st world countries US is undoubtedly the leader in police violence https://en.wikipedia.org/wiki/List_of_killings_by_law_enforc...

[1] https://en.wikipedia.org/wiki/Swatting#Injuries_or_deaths_du...

[2] https://en.wikipedia.org/wiki/Killing_of_Breonna_Taylor

>Is it not better for the police to wrongfully turn up to a potentially dangerous situation then to not and people get hurt or killed?

Not so long as they tend to leave a trail of citations for petty BS infractions nobody cares about and everyone resents wherever they go.

AFAIK FreeCAD has Python API.

Though dunno about UX using it, probably not as streamlined as OpenSCAD, though maybe more powerful?


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