News for hackers. Stuff that matters.

laut

Re:Two days with Volkswagen’s electric ID.4 on Sunday February 28, 2021 @02:52AM (#26291524)
The Mercedes AMG C 63 S costs USD $76,200 (MSRP) in the US according to https://www.mbusa.com/en/vehicles/model/c-class/sedan/c63ws
The Wrangler 4xe is a plug-in hybrid and began production last year. That car is featured on the US website too.

Jeep also has the Renegade 4xe and Compass 4xe. All plug-in hybrids. Fiat might not have brought them to the US yet.

Re:Hotwire: HTML over the Wire on Sunday January 03, 2021 @05:25PM (#25625795)
Yes, the `phx-click` doesn't automatically get translated to a link or form submission. You can still design the page to work without javascript. For instance by having a "+" button be a normal form or link and then have phx-click intercept it when javascript is enabled. This can be done with one LiveView module without having to also have a separate regular controller.

One way to do it would be to in the `mount` function handle normal non-javascript params being sent and a `handle_event` function handle `phx-click`.

I don't know if there is already a way to have `phx-click` with fallback to HTTP in a less "manual" way. It should be possible to make.

Re:Hotwire: HTML over the Wire on Wednesday December 23, 2020 @05:32PM (#25523051)
> But with LV wouldn't you need to create both a LV and a regular controller? That's a huge amount of code duplication.

You just do LiveView instead of a regular controller. No duplication.

When you request a page, it is render on the server and all of the HTML is returned over HTTP as usual.

After the client has received the HTML updates, live updates can go over a websocket. For instance you start typing in a search field, this is sent to the server over websockets. Then the server might have a template for that page that adds search suggestions in a list under that search field. The server basically automatically figures out how the page should be rendered on the server side with the suggestions showing. By "re-rendering" the template with changed data used with the server side template. Then it sends back a diff to the client over websockets. The diff adds/changes the search suggestions to the page. The diff is very small and it's all very fast.

Re:Dieter Rams: ten principles for good design on Sunday November 01, 2020 @02:12AM (#24957732)
Apple copied that from the Beocom 6000 phone by Bang & Olufsen.
Re:Apple Commits $2.5B to Ease California Housing Crunch on Monday November 04, 2019 @09:50PM (#21449150)
Supply of housing can increase if it makes sense to build housing. Zoning and other regulation can make it impossible, risky or unprofitable to build housing.
In Denmark you can get milk at the grocery store that was inside the cow less than 24 hours ago. Ultra High Temperature pasteurization is not really normal in Denmark, but I think it is in Germany.
Re:Passport Index 2016 on Sunday July 17, 2016 @01:32PM (#12110915)
On the map (https://www.passportindex.org/byRank.php) Greenland should probably have a "more powerful" colour since they get a Danish passport.
Re:Unity raises $181M round at a reported $1.5B valuation on Wednesday July 13, 2016 @01:46PM (#12088135)
In general people in Denmark don't have a ton of money to invest after paying taxes. If they do invest in Danish companies, those companies are held back somewhat by rules and further taxes. Some years ago there was a "entrepreneur tax" in Denmark which was an extra tax that affected business angels.

Employees could also be required to pay taxes on employee stocks - money that they had not earned yet because they had not sold them.

http://www.business.dk/navne/ivaerksaetterskat-skal-ses-efte... http://penge.dk/pension-skat/ejere-af-medarbejderaktier-risi...

Yeah. Weird, but amusing. And they seem so confident about it too.
Depending on what you need to do, UTC does not always work: http://www.creativedeletion.com/2015/03/19/persisting_future...
They might have more resources, but they also have constraints. For instance a tzdata update was just released yesterday. Apple has a lot of resources but I don't see an updated from them today on iOS nor Mac OS X. Elixir tzdata automatically updates to the new version.

Does Apple even have resources that work on tzdata code? Or do they just use open source code?

I wrote more about the issue here: http://www.creativedeletion.com/2015/12/03/timezone-updates-...

In particular for Elixir I trust the time zone data from Tzdata more than for any other language, mostly because I know it is designed to have up to date data. (And well, I know the code because I wrote it myself.)

Even if a system is good in many ways it does not matter if the data is not up to date.

UTC can also fail if your users need to see or enter times that are not in UTC. E.g. for a meeting or a train schedule or an appointment etc. See this http://www.creativedeletion.com/2015/03/19/persisting_future...
You are right. I have heard that one before too. That one is sort of implicitly covered by this part in the blog post:

"CST is also used for: Cuba Summer Time, China Time, Central Standard Time (Australia). PST is used for Pakistan Standard Time and Pacific Standard Time. If you want a unique identifier for the time zone in the Pacific West of the USA it looks like this: “America/Los_Angeles”."

In this case the name of the time zone "people live in" is "Europe/London", not GMT.

Operating systems kind of suck at it. Which is why for Elixir I made Tzdata (https://github.com/lau/tzdata) not rely on any timezone information from the operating systems. A feature I would like from operating systems is to tell me the true time during leap seconds. E.g. 23:59:59, 23:59:60, 00:00:00 Instead of repeating 23:59:59 or just pretending the leap second never happens.
Hi. I'm the author of the article. And also of Elixir Tzdata and https://github.com/lau/calendar I recommend using Calendar instead of Timex.

I'm curious: Why where you using e.g. GMT+5 or GMT-5?

Re:Why Erlang Matters on Saturday April 09, 2016 @11:49PM (#11464790)
The fault tolerance allow you to have processes and state to be available reliably for longer than the duration of a HTTP request.

You can have continuously running processes without relying on something outside of the language. You can more easily distribute such code as an Elixir package. The code can work without relying on e.g. cron or redis being available and configured.

Yes SF and NYC have rent control. And other regulations that make it less profitable to build and rent out homes. This reduces supply of rental homes, which increases prices.

"In many cases rent control appears to be the most efficient technique presently known to destroy a city - except for bombing." - Assar Lindbeck

Re:Falsehoods Programmers Believe About Phone Numbers on Saturday March 19, 2016 @11:49PM (#11321706)
Also: Falsehoods programmers believe about time and time zones:

http://www.creativedeletion.com/2015/01/28/falsehoods-progra...

Re:Denmark confirms US sent rendition flight for Snowden on Friday February 05, 2016 @10:05AM (#11041835)
It might be a English translation of a Danish way of saying "business jet". Talking about the type of plane. As opposed to bigger commercial jets. E.g. a Gulfstream V is a business jet often used by business people. Even when used or owned by government, some people might keep calling it a "privatfly" - private plane.
Re:Timezone updates need to be fixed on Friday January 29, 2016 @05:24PM (#10999010)
Good point. For that that situation you would want to use something like UTC (or TAI). It is the duration from the starting point that we care about, not the future date.
Re:Timezone updates need to be fixed on Thursday January 28, 2016 @05:21PM (#10991894)
If the user expects 8:00 local time then it should stay 8:00 local time. That is at least how people would want their applications to work 99% of the time. If someone enters 8:00 and then the software suddenly changes it to something else, that is confusing.

If you actually look at what happens when timezone laws change, people continue to anchor to their local times.

Re:Timezone updates need to be fixed on Thursday January 28, 2016 @05:12PM (#10991827)
Did you read the article? If a user wants to save a local time and you then convert it to UTC and save that instead, then it can in some cases be impossible to later find out what the entered local time was.

The users will rightfully expect their time to stay 14:00 Santiago time if they enter 14:00 Santiago time.

Re:Timezone updates need to be fixed on Thursday January 28, 2016 @12:40PM (#10989721)
It is not misguided, it is a good practice. Read more about why here: http://www.creativedeletion.com/2015/03/19/persisting_future...
Re:Timezone updates need to be fixed on Thursday January 28, 2016 @12:20PM (#10989545)
AFAIK you can use the tzinfo-data gem. Someone needs to manually update it though. So far it looks like it is still on the previous 2015g and not on 2016a that just got released: https://github.com/tzinfo/tzinfo-data

Older »