Better HN
topnewbestaskshowjobs
Log inSign up

EmilienCosson

5 karma · joined Nov 29, 2024 (1y ago) · 8 submissions

contact@emiliencosson.fr software developer
Submissions

comment 2mo ago · link · parent

Now the page shows all services are operational and the outage has been archived with no history.

comment 1y ago · link · parent

I was thinking that too, and eventually thought that their servers run slow at night, with low activity.

3.

Ask HN: How Do You Learn to Love Your Job?

2 points · by EmilienCosson · 1y ago · 2 comments

comment 1y ago · link · parent

I think it is useful to say the blog post is using svelte 4, and the svelte 5 docs mention:

“When to use stores

Prior to Svelte 5, stores were the go-to solution for creating cross-component reactive states or extracting logic. With runes, these use cases have greatly diminished.

when extracting logic, it’s better to take advantage of runes’ universal reactivity: You can use runes outside the top level of components and even place them into JavaScript or TypeScript files (using a .svelte.js or .svelte.ts file ending) when creating shared state, you can create a $state object containing the values you need and then manipulate said state state.svelte

export const userState = $state({ name: 'name', /* ... */ }); App

<script lang="ts"> import { userState } from './state.svelte.js'; </script>

<p>User name: {userState.name}</p> <button onclick={() => { userState.name = 'new name'; }}> change name </button>

Stores are still a good solution when you have complex asynchronous data streams or it’s important to have more manual control over updating values or listening to changes. If you’re familiar with RxJs and want to reuse that knowledge, the $ also comes in handy for you.”

https://svelte.dev/docs/svelte/stores#When-to-use-stores

5.

Germany – Car Drives into Crowd(abcnews.go.com ↗)

3 points · by EmilienCosson · 1y ago · discuss

comment 1y ago · link · parent

Thank you.

comment 1y ago · link · parent

!! Spoil:

Since we cannot refer to the liar, we can refer to the extended puzzle's author.

The author states that the goal of the extended puzzle is to determine if there is, 'IF ANY' (!!), a correct statement among [A, B, C, D, E]. Thus, there can be zero or at most one statement we can conclude as being true for sure.

The liar didn't said if he has hats. Maybe he has 0. Maybe 1. Maybe n. We just don't know.

'A: The liar has at least one hat.' > We cannot conclude this statement as sure, since maybe the liar has in fact 0 hats.

'B: The liar has only one green hat.' > He has maybe 0 hats. Or maybe n | n>1.

'C: The liar has no hats.' > He has maybe 1 hat. Or maybe n | n>1.

'D: The liar has at least one green hat.' > He might not have any hats at all.

'E: The liar has no green hats.' > Since the liar may have 2 hats, one could be green and the proposition could still be false, as it is a lie.

Since we cannot conclude any of the statements as being definitively true, the extended puzzle's answer is none of them are true for certain. It depends on how many hats the liar has.