243 private links
I don't understand some things here
A transition to open or close a modal
- gen blocks: similar to python generators as far as I understand. They are lightweight compared to the classic Iterator pattern
- default field values (and avoid new() for it)
- inner structs
- never type
- try expressions
The ability to run scripts is also a great feature imho.
Create a type similar to another existing type :O
The integer used by the Django data model is an Int, but the database used BigInt. The discrepancy occured for the row IDs greater than the maximum value of the int.
Specifically, several tables—including this one—were specified as using an int for their primary key in Django, but used bigint in the real database.
There’s a taste of “commercial frontend development” being less interested in shipping HTML that is valid and error-free than is our community of frontend developers.
There is few talks about HTML conformance, valid HTML, HTML validation or standards compliance.
A programming task implemented in multiple languages
A framework similar to Express (JS) in API design
Nothing new for me, but the explanations are great. I came down to follow the same path to learn!
Utility types are useful to provide intent: Partial
Vibe coding does not mean “using AI tools to help write code”. It means “generating code with AI without caring about the code that is produced”.
About the this
keyword
WebTUI is a CSS library that brings the beauty of Terminal User Interfaces (TUIs) to the browser
Funny!
There is a new lh
for "line-height" unit in css.
* + *
as known as the howl selector: targets all elements that have the previous same selector.
This selector is great because it has no specificity.
An alternative is *:not(:first-child)
Dump the database as SQL statements instead of copying it with indexes. Then compress the resulting txt file.
# Create the backup
sqlite3 my_db.sqlite .dump | gzip -c > my_db.sqlite.txt.gz
# Reconstruct the database from the text file
cat my_local_database.db.txt | sqlite3 my_local_database.db
As complete script example:
# Create a gzip-compressed text file on the server
ssh username@server "sqlite3 my_remote_database.db .dump | gzip -c > my_remote_database.db.txt.gz"
# Copy the gzip-compressed text file to my local machine
rsync --progress username@server:my_remote_database.db.txt.gz my_local_database.db.txt.gz
# Remove the gzip-compressed text file from my server
ssh username@server "rm my_remote_database.db.txt.gz"
# Uncompress the text file
gunzip my_local_database.db.txt.gz
# Reconstruct the database from the text file
cat my_local_database.db.txt | sqlite3 my_local_database.db
# Remove the local text file
rm my_local_database.db.txt
There should be better ways though.
Use types to enforce consistency.
Les Refinement Types sont des objets qui permettent de s'assurer de la cohérence des données en mathématique on appellerait ceci un sous-ensemble.