10 interesting stories served every morning and every evening.
When prompted with an idea, ChatGPT will automatically generate tailored, detailed prompts for DALL·E 3 that bring your idea to life. If you like a particular image, but it’s not quite right, you can ask ChatGPT to make tweaks with just a few words.
DALL·E 3 will be available to ChatGPT Plus and Enterprise customers in early October. As with DALL·E 2, the images you create with DALL·E 3 are yours to use and you don’t need our permission to reprint, sell or merchandise them.
...
Read the original on openai.com »
Craft how data syncs on and off onto your app using Shapes.
Shapes allow you to manage dynamic partial replication between Postgres in the cloud and SQLite in the local app.
...
Read the original on electric-sql.com »
The U. K. Parliament has passed the Online Safety Bill (OSB), which says it will make the U.K. “the safest place” in the world to be online. In reality, the OSB will lead to a much more censored, locked-down internet for British users. The bill could empower the government to undermine not just the privacy and security of U.K. residents, but internet users worldwide.
A clause of the bill allows Ofcom, the British telecom regulator, to serve a notice requiring tech companies to scan their users–all of them–for child abuse content. This would affect even messages and files that are end-to-end encrypted to protect user privacy. As enacted, the OSB allows the government to force companies to build technology that can scan regardless of encryption–in other words, build a backdoor.
These types of client-side scanning systems amount to “Bugs in Our Pockets,” and a group of leading computer security experts has reached the same conclusion as EFF–they undermine privacy and security for everyone. That’s why EFF has strongly opposed the OSB for years.
It’s a basic human right to have a private conversation. This right is even more important for the most vulnerable people. If the U. K. uses its new powers to scan people’s data, lawmakers will damage the security people need to protect themselves from harassers, data thieves, authoritarian governments, and others. Paradoxically, U.K. lawmakers have created these new risks in the name of online safety.
The U. K. government has made some recent statements indicating that it actually realizes that getting around end-to-end encryption isn’t compatible with protecting user privacy. But given the text of the law, neither the government’s private statements to tech companies, nor its weak public assurances, are enough to protect the human rights of British people or internet users around the world.
Online platforms will be expected to remove content that the U. K. government views as inappropriate for children. If they don’t, they’ll face heavy penalties. The problem is, in the U.K. as in the U.S., people do not agree about what type of content is harmful for kids. Putting that decision in the hands of government regulators will lead to politicized censorship decisions.
The OSB will also lead to harmful age-verification systems. This violates fundamental principles about anonymous and simple access that has existed since the beginning of the Internet. You shouldn’t have to show your ID to get online. Age-gating systems meant to keep out kids invariably lead to adults losing their rights to private speech, and anonymous speech, which is sometimes necessary.
In the coming months, we’ll be watching what type of regulations the U. K. government publishes describing how it will use these new powers to regulate the internet. If the regulators claim their right to require the creation of dangerous backdoors in encrypted services, we expect encrypted messaging services to keep their promises and withdraw from the U.K. if that nation’s government compromises their ability to protect other users.
...
Read the original on www.eff.org »
In 2019, Svelte 3 turned JavaScript into a reactive language. Svelte is a web UI framework that uses a compiler to turn declarative component code like this…
…into tightly optimized JavaScript that updates the document when state like count changes. Because the compiler can ‘see’ where count is referenced, the generated code is highly efficient, and because we’re hijacking syntax like let and = instead of using cumbersome APIs, you can write less code.
A common piece of feedback we get is ‘I wish I could write all my JavaScript like this’. When you’re used to things inside components magically updating, going back to boring old procedural code feels like going from colour to black-and-white.
Svelte 5 changes all that with runes, which unlock universal, fine-grained reactivity.
Even though we’re changing how things work under the hood, Svelte 5 should be a drop-in replacement for almost everyone. The new features are opt-in — your existing components will continue to work.
We don’t yet have a release date for Svelte 5. What we’re showing you here is a work-in-progress that is likely to change!
A letter or mark used as a mystical or magic symbol.
Runes are symbols that influence the Svelte compiler. Whereas Svelte today uses let, =, the export keyword and the $: label to mean specific things, runes use function syntax to achieve the same things and more.
For example, to declare a piece of reactive state, we can use the $state rune:
At first glance, this might seem like a step back — perhaps even un-Svelte-like. Isn’t it better if let count is reactive by default?
Well, no. The reality is that as applications grow in complexity, figuring out which values are reactive and which aren’t can get tricky. And the heuristic only works for let declarations at the top level of a component, which can cause confusion. Having code behave one way inside .svelte files and another inside .js can make it hard to refactor code, for example if you need to turn something into a store so that you can use it in multiple places.
With runes, reactivity extends beyond the boundaries of your .svelte files. Suppose we wanted to encapsulate our counter logic in a way that could be reused between components. Today, you would use a custom store in a .js or .ts file:
tsimport { writable } from ‘svelte/store’;
export function createCounter() { const { subscribe, update } = writable(0);
return { subscribe, increment: () => update((n) => n + 1) };}
Because this implements the store contract — the returned value has a subscribe method — we can reference the store value by prefixing the store name with $:
This works, but it’s pretty weird! We’ve found that the store API can get rather unwieldy when you start doing more complex things.
With runes, things get much simpler:
import { writable } from ‘svelte/store’;
export function createCounter() {
const { subscribe, update } = writable(0);
let count = $state(0);
return {
subscribe,
increment: () => update((n) => n + 1)
get count() { return count },
increment: () => count += 1
Note that we’re using a get property in the returned object, so that counter.count always refers to the current value rather than the value at the time the function was called.
Today, Svelte uses compile-time reactivity. This means that if you have some code that uses the $: label to re-run automatically when dependencies change, those dependencies are determined when Svelte compiles your component:
This works well… until it doesn’t. Suppose we refactored the code above:
tsconst multiplyByHeight = (width) => width * height;Parameter ‘width’ implicitly has an ‘any’ type.Cannot find name ‘height’.70062304Parameter ‘width’ implicitly has an ‘any’ type.Cannot find name ‘height’.$: area = multiplyByHeight(width);Cannot find name ‘area’.Cannot find name ‘width’.23042304Cannot find name ‘area’.Cannot find name ‘width’.
Because the $: area = … declaration can only ‘see’ width, it won’t be recalculated when height changes. As a result, code is hard to refactor, and understanding the intricacies of when Svelte chooses to update which values can become rather tricky beyond a certain level of complexity.
Svelte 5 introduces the $derived and $effect runes, which instead determine the dependencies of their expressions when they are evaluated:
As with $state, $derived and $effect can also be used in your .js and .ts files.
Like every other framework, we’ve come to the realisation that Knockout was right all along.
Svelte 5′s reactivity is powered by signals, which are essentially what Knockout was doing in 2010. More recently, signals have been popularised by Solid and adopted by a multitude of other frameworks.
We’re doing things a bit differently though. In Svelte 5, signals are an under-the-hood implementation detail rather than something you interact with directly. As such, we don’t have the same API design constraints, and can maximise both efficiency and ergonomics. For example, we avoid the type narrowing issues that arise when values are accessed by function call, and when compiling in server-side rendering mode we can ditch the signals altogether, since on the server they’re nothing but overhead.
Signals unlock fine-grained reactivity, meaning that (for example) changes to a value inside a large list needn’t invalidate all the other members of the list. As such, Svelte 5 is ridonkulously fast.
Runes are an additive feature, but they make a whole bunch of existing concepts obsolete:
* the difference between let at the top level of a component and everywhere else
* $:, with all its attendant quirks
* different behaviour between and
* the store API, parts of which are genuinely quite complicated
* lifecycle functions (things like onMount can just be $effect functions)
For those of you who already use Svelte, it’s new stuff to learn, albeit hopefully stuff that makes your Svelte apps easier to build and maintain. But newcomers won’t need to learn all those things — it’ll just be in a section of the docs titled ‘old stuff’.
This is just the beginning though. We have a long list of ideas for subsequent releases that will make Svelte simpler and more capable.
You can’t use Svelte 5 in production yet. We’re in the thick of it at the moment and can’t tell you when it’ll be ready to use in your apps.
But we didn’t want to leave you hanging. We’ve created a preview site with detailed explanations of the new features and an interactive playground. You can also visit the #svelte-5-runes channel of the Svelte Discord to learn more. We’d love to have your feedback!
...
Read the original on svelte.dev »
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more about the CLI.
Please sign in
to use Codespaces.
If nothing happens, download GitHub Desktop and try again.
If nothing happens, download GitHub Desktop and try again.
If nothing happens, download Xcode and try again.
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
...
Read the original on github.com »
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in
to your account
...
Read the original on github.com »
Edit: brief addendum after hitting the HN frontpage; MNIST is a straightforward dataset, and higher accuracies are possible with various methods. The novelty of this post isn’t aiming for state-of-the-art results, but showcasing the potential of using compression as a unique, model-free classification tool. The code golf just adds a layer of complexity for fun.
We can ‘solve’ MNIST up to ~78% accuracy with the following code-golfed obscurity:
If you just want to see the code sample, here is a link to the Jupyter Notebook containing the code to run this experiment.
Lets dive into why and how: yesterday while in the one-hour train ride from Eindhoven to Rotterdam, I was inspired by the post text generation from data compression and the (quite controversial) paper on parameter free text classification to play around with using compression as an image classification mechanism. Previously, I worked on image compression for computer vision on the edge, so interested in applying the technique to the most seminal yet basic dataset, I attempted to use GZIP + K-NN as a classification mechanism for the MNIST (handwritten digits) dataset.
Breaking down the technique, it boils down to two components: GZIP and NCD (Normalized Compression Distance) as a similarity metric, and k-NN (k-Nearest Neighbors) for classification. In this approach, GZIP is essentially our tool which gives us a way to measure the complexity or information content of individual data points. NCD provides a normalized measure of how similar two data points are, based on how much more (or less) effort it takes to compress them together compared to compressing them separately.
For each test sample, the algorithm computes its NCD with every training sample (in our case, 100 training samples), sorts them, and selects the k smallest distances. The majority class among these k=5 closest neighbors is then predicted as the label for the test sample. As this is quite computationally expensive, I only took a subset of the test images to arrive at my accuracy measure. Of course, it would be more correct to use the full set, but I leave this an an exercise to the reader ;).
Here is a less obscured version of the algorithm:
Note: after writing this post, I found this article by Andreas Kirsch taking a similar approach back in 2019. His approach reaches around 35% accuracy.
...
Read the original on jakobs.dev »
Welcome to the largest gaming community on Lemmy! Discussion for all kinds of games. Video games, tabletop games, card games etc.
What Are You Playing?
Submissions have to be related to games
More information about the community rules can be found here.
...
Read the original on lemm.ee »
We have successfully completed our migration to RAM-only VPN infrastructure
Today we announce that we have completely removed all traces of disks being used by our VPN infrastructure!
In early 2022 we announced the beginning of our migration to using diskless infrastructure with our bootloader known as “stboot”.
Our VPN infrastructure has since been audited with this configuration twice (2023, 2022), and all future audits of our VPN servers will focus solely on RAM-only deployments.
All of our VPN servers continue to use our custom and extensively slimmed down Linux kernel, where we follow the mainline branch of kernel development. This has allowed us to pull in the latest version so that we can stay up to date with new features and performance improvements, as well as tune and completely remove unnecessary bloat in the kernel.
The result is that the operating system that we boot, prior to being deployed weighs in at just over 200MB. When servers are rebooted or provisioned for the first time, we can be safe in the knowledge that we get a freshly built kernel, no traces of any log files, and a fully patched OS.
...
Read the original on mullvad.net »
The DuckDB IDE for Your Terminal.
The DuckDB IDE for Your Terminal.
Any shell, any terminal, any machine. Fish in tmux on Alpine over SSH? Sure. Windows cmd? Yep.
The features you’d expect from an IDE, delightfully running right in your terminal.
* View tables, columns, and their types across one or more attached databases.
* View up to 10k results in an interactive table. Multiple queries loaded into separate tabs.
* Connect to any MotherDuck database in local or SaaS mode.
* Need more room? Press F10 to view the Editor or Results in full-screen mode.
* Export query results and configure the export using a helpful UI.
Thousands are using Harlequin. Join them with pipx install harlequin.
...
Read the original on harlequin.sh »
To add this web app to your iOS home screen tap the share button and select "Add to the Home Screen".
10HN is also available as an iOS App
If you visit 10HN only rarely, check out the the best articles from the past week.
If you like 10HN please leave feedback and share
Visit pancik.com for more.