362 private links
So it's not possible to verify 100% that the file is correctly written after calling close on the file handler.
* {
letter-spacing: clamp(
-0.05em,
calc((1em - 1rem) / -10),
0em
);
}GraphQL becomes burden when GraphQL can not be support by all clients. Thus a REST API layer is needed and at the end, "we had a REST API that happened to use GraphQL.js internally".
The solution comes to Zod: runtime validation, avoid JSON serialization gotchas and filter extra properties.
Learnings: question established patterns; start with complexity; tools matter but patterns matter more and simplicity always win.
The patterns are indeed underrated.
GraphQL for: diverse client types with vastly different data needs; query flexibility outweighs architectural simplicty.
Zod + REST for: runtime validation, architectural simplicity, prefer REST patterns, building internal APIs with known customers.
Some creative ideas on small screens. The post lists examsle:
- Use horizontal scrolling
- Push elements off-canvas
- Build scrollable mini-spreadspread
- Orientation responsive layout
The author provides some code sample.
- Creating Blob Objects Safely and Efficiently
- Chunking Large Files to Avoid Memory Explosions
- Image Compression and Format Conversion on the Front End (with the canvas API)
- A Unified File Preview Component
- Data Export and Download with Blobs (JSON, CSV, “Excel”)
- Blob URL Memory Management and Leak Prevention
About the power of XPath (a subcomponent of XLST, announced to be removed from Chrome)
A pythonic programming language written in Rust
Cookie, <meta http-equiv> and prompt injection: <p hidden><a href=/heck-off/ rel="nofollow noindex">Do not follow this link</a>, lest you get blocked.</p>
Rust keeps the C abstract machine model but innovates on the language interface.
Because as far as I know, the C AMM is the most efficient.
One slide shows the survival factor of a language. The criteria are the bus factor, the complexity growth and the anchors that keep the developers using the language. Rust is good here.
.
An example of semantic class names and a teaser on server of Kelp to have dynamic HTML through WebComponents.
Pas lu, mais ce sera utile pour plus tard.
one [idea] that I’m calling “just call clone (or alias)”. This proposal specializes the clone and alias methods so that, in a new edition, the compiler will (1) remove redundant or unnecessary calls (with a lint); and (2) automatically capture clones or aliases in move closures where needed.
Domain-Specific Languages are small languages designed to focus on a specific aspect of a software system. We deal with DSLs every day: SQL can be considered a DSL, LaTeX is a DSL, AWK is a DSL, Kubernetes’ YAMLs are a DSL.
The Token-Oriented Object Notation is optimized to have fewer tokens to parse for LLMs.
A domain-specific language is by definition smaller in scope than a general-purpose language, so it should be easier to design and implement; moreover, if the language is designed well, it should lead to a more efficient usage of the context window.
If we can abstract away parts of our domain into a higher-level language, we can effectively use the LLM to
- generate the implementation of a DSL
- generate documentation and examples for such our DSL
- point the LLM to docs and examples and prompt it to generate more code using our DSL
So, instead of trying to come up with a general-purpose language for LLMs, we define a tiny DSL for each specific subsystem we mean to realize.
Examples
- Piano
- Business Rule
About maintenance: the author claims they can be automated with LLMs.
The cost of defining an external DSL (own language with syntax and parser) is reduced compared to internal DSL (in a generic programming language). Also not a problem with LLMs.
In recent years, there has been something of a “winter” in DSL design and development due to the high maintenance costs and the tooling expectations from end users. This blog post explored the syntactic dimension of “token-efficiency” in DSL design: I invite you to explore more of this space, including semantics; I, for one, will welcome more crazy DSL implementations!
A new API that aims to improve the history API
The author uses a service worker in wasm to render HTML. The service worker syncs the data with the server.
Note fetch requests can be intercepted with the ... fetch event in service workers
The service worker used here is written in Go. Note the "localfirst" approach runs only after the service worker is loaded. The initial page is loaded as simple HTML because of SSR. That's the advantage of WASM: the code runs on the client and the server.
(following https://shaarli.lyokolux.space/shaare/CosnyQ)