TODO quick summary of game rules? Perhaps: battlecode.org/assets/files/battlecode-guide-xsquare.pdf
Some mechanics:
- inter agent communication
- compute power is limited by limiting Java bytecode count execution per bot per cycle
Bought: 2017 for approximately 2400 pounds to be Ciro Santilli's main personal laptop.
Specs:
- screen: 15.6 inches, 16:9
- weight: 2691g (self weight in 2023)
- charger weight: 700g (self weight in 2023)
Identifiers:
- Ethernet MAC address: 54:e1:ad:b5:5b:08
- Wi-Fi MAC address: 44:03:2c:a2:27:81
That makes Ciro Santilli most mad about this film is the fact that the dude was passionate about writing, and when he became a genius, rather than write the best novels ever written, he decided instead to play the stock market instead. This paints an accurate picture of 2020's society, where finance jobs make infinitely more money than other real engineering jobs, and end up attracting much of the talent.
Another enraging thing is how his girlfriend starts liking him again once he is a genius, and instead of telling her to fuck off, he stays with her.
The other really bad thing is the ending. He fixed the drug by himself? He scared off De Niro just like that?
How to decide if an ORM is decent? Just try to replicate every SQL query from nodejs/sequelize/raw/many_to_many.js on PostgreSQL and SQLite.
There is only a very finite number of possible reasonable queries on a two table many to many relationship with a join table. A decent ORM has to be able to do them all.
If it can do all those queries, then the ORM can actually do a good subset of SQL and is decent. If not, it can't, and this will make you suffer. E.g. Sequelize v5 is such an ORM that makes you suffer.
The next thing to check are transactions.
Basically, all of those come up if you try to implement a blog hello world world such as gothinkster/realworld correctly, i.e. without unnecessary inefficiencies due to your ORM on top of underlying SQL, and dealing with concurrency.
The polynomials together with polynomial addition and multiplication form a commutative ring.
This post-quantum cryptography competition by NIST is a huge milestone of the field.
It was mind blowing when in 2022, after several years of selection, one of the 7 finalists was broken on a classical computer, not even in a quantum computer! news.ycombinator.com/item?id=30466063 | eprint.iacr.org/2022/214 Breaking Rainbow Takes a Weekend on a Laptop by Ward Beullens. Dude announced he had a break a few days before submission: twitter.com/WardBeullens/status/1492780462028300290 On Twitter. He's so young. Epic.
Edit: and then, after the third round, things were a bit unclear, so they made a fourth round with 4 choices out of the 7 from round 3, and in August 2022 one of the four was broken again on a classic CPU!!! OMG: arstechnica.com/information-technology/2022/08/sike-once-a-post-quantum-encryption-contender-is-koed-in-nist-smackdown/
Used to identify organic compounds.
Seems to be based on the effects that electrons around the nuclei (shielding electrons) have on the outcome of NMR.
So it is a bit unlike MRI where you are interested in the position of certain nuclei in space (of course, these being atoms, you can't see their positions in space).
Oxford Master Course in Mathematical and Theoretical Physics Updated 2024-12-23 +Created 1970-01-01
At least they have a fucking clear course schedule unlike the undergrad.
To run examples on a specific database:All examples can be tested on all databases with:
./index.js
or./index.js l
: SQLite./index.js p
: PostgreSQL. You must manually create a database calledtmp
and ensure that peer authentication works for it
cd sequelize
./test
Overview of the examples:
- nodejs/sequelize/index.js: a bunch of basic examples
- nodejs/sequelize/update.js: This file is also where we are storing our expression-foo for now, e.g. how to do stuff like
col1 + col2
. Such knowledge can however be used basically anywhere else however, e.g. inAS
orWHERE
clauses, not just inUPDATE
. - nodejs/sequelize/count.js: a simplified single-table count example. In practice, this will be usually done together with JOIN queries across multiple tables. Answers: stackoverflow.com/questions/22627258/how-does-group-by-works-in-sequelize/69896449#69896449
- nodejs/sequelize/date.js: automatic date typecasts
- nodejs/sequelize/like.js: LIKE
- nodejs/sequelize/camel_case.js: trying to get everything in the database camel cased, columns starting with lowercase, and tables starting with uppercase. The defaults documented on getting started documentation do uppercase foreign keys, and lowercase non-foreign keys. It's a mess.
- nodejs/sequelize/ignore_duplicates.js: ignore query on unique violation with
ignoreDuplicates: true
which does SQLiteINSERT OR IGNORE INTO
or PostgreSQLON CONFLICT DO NOTHING
. Closely related Upsert versions:- Upsert
- nodejs/sequelize/upsert.js:
.upsert
selects the conflict column automatically by unique columns. Both SQLite and PostgreSQL doINSERT INTO ON CONFLICT
. PostgreSQL usesRETURNING
, which was added too recently to SQLite: www.sqlite.org/lang_returning.htmlAt nodejs/sequelize/composite_index.js we have a.upsert
test with a composite index. Works just fine as you'd expect with a compositeON CONFLICT
. Well done. - nodejs/sequelize/update_on_duplicate.js:
.bulkCreate({}, { updateOnDuplicate: ['col1', col2'] }
. Produces queries analogous to.upsert
. This method is cool because it can upsert multiple columns at once. But it is annoying that you have to specify all fields to be updated one by one manually. - stackoverflow.com/questions/29063232/how-to-get-the-id-of-an-inserted-or-updated-record-in-sequelize-upsert/72092277#72092277
- stackoverflow.com/questions/55531860/sequelize-bulkcreate-updateonduplicate-for-postgresql
- Upsert
- nodejs/sequelize/inc.js: demonstrate the
increment
method. In SQLite, it produces a statement of type:UPDATE `IntegerNames` SET `value`=`value`+ 1,`updatedAt`='2021-11-03 10:23:45.409 +00:00' WHERE `id` = 3
- nodejs/sequelize/sync_alter.js: illustrates
Model.sync({alter: true})
to modify a table definition, answers: stackoverflow.com/questions/54898994/bulkupdate-in-sequelize-orm/69044138#69044138 - nodejs/sequelize/truncate_key.js
- nodejs/sequelize/validation.js: is handled by a third-party library: github.com/validatorjs/validator.js. They then add a few extra validators on top of that.The
args: true
thing is explained at: stackoverflow.com/questions/58522387/unhandled-rejection-sequelizevalidationerror-validation-error-cannot-create-pr/70263032#70263032 - nodejs/sequelize/composite_index.js: stackoverflow.com/questions/34664853/sequelize-composite-unique-constraint
- nodejs/sequelize/indent_log.js: stackoverflow.com/questions/34664853/sequelize-composite-unique-constraint
- association examples:
- nodejs/sequelize/one_to_many.js: basic one-to-many examples.
- nodejs/sequelize/many_to_many.js: basic many-to-many examples, each user can like multiple posts. Answers: stackoverflow.com/questions/22958683/how-to-implement-many-to-many-association-in-sequelize/67973948#67973948
- ORDER BY include:
- nodejs/sequelize/many_to_many_custom_table.js: many-to-many example, but where we craft our own table which can hold extra data. In our case, users can like posts, but likes have a integer weight associated with them. Related threads:
- nodejs/sequelize/many_to_many_same_model.js: association between a model and itself: users can follow other users. Related:
- nodejs/sequelize/many_to_many_same_model_super.js
- nodejs/sequelize/many_to_many_super.js: "Super many to many": sequelize.org/master/manual/advanced-many-to-many.html This should not exist and shows how bad this library is for associations, you need all that boilerplate in order to expose certain relationships that aren't otherwise exposed by a direct
hasMany
with implicit join table.
- nested includes to produce queries with multiple JOIN:
- nodejs/sequelize/nested_include.js: find all posts by users that a given user follows. Answers: stackoverflow.com/questions/42632943/sequelize-multiple-where-clause/68018083#68018083
- nodejs/sequelize/nested_include_super.js: like nodejs/sequelize/nested_include.js but with a super many to many. We should move this to nodejs/sequelize/many_to_many_super.js.
- two relationships between two specific tables: we need to use
as:
to disambiguate them- nodejs/sequelize/many_to_many_double.js: users can both follow and like posts
- nodejs/sequelize/one_to_many_double.js: posts have the author and a mandatory reviewer
- hooks
- internals:
- nodejs/sequelize/common.js: common utilities used across examples, most notably:
- to easily setup different DBRM
- nodejs/sequelize/min_nocommon.js: to copy paste to Stack Overflow
- nodejs/sequelize/min.js: template for new exapmles in the folder
- nodejs/sequelize/common.js: common utilities used across examples, most notably:
~1TB.
Internal hard drive likely removed from some old computer I lost track of, kept in a crappy case, incredible stuff.
Ubuntu 20.04
gnome-disks
benchmark, NTFS partition: 40MB/s.Every invertible matrix can be written as:where:Note therefore that this decomposition is unique up to swapping the order of eigenvectors. We could fix a canonical form by sorting eigenvectors from smallest to largest in the case of a real number.
- is a diagonal matrix containing the eigenvalues of
- columns of are eigenvectors of
Intuitively, Note that this is just the change of basis formula, and so:
- changes basis to align to the eigenvectors
- multiplies eigenvectors simply by eigenvalues
- changes back to the original basis
Companies have been really slow to support SVG features in their browsers, and that is very saddening: medium.com/@michaelmangial1/introduction-to-scalable-vector-graphics-6450c03e8d2e
You can't drop SVG support for
canvas
until there's a way to run untrusted JavaScript on the browser!SVG does have some compatibility annoyances, notably SVG fonts. But we should as a society work to standardize and implement a fix those, the benefits of SVG are just too great!
Examples:
- svg/svg.svg a minimal somewhat sane SVG:
- if the
width
andheight
properties were not given, you get the default 300x150, which seems to be set in the SVG standard:
- if the
- how to add na SVG image to a HTML file:
- svg/svg.html: external image. The included file is svg/svg.svg.
- svg/inline.html: inline.
- svg/billion-laughs.svg
- svg/html.svg
- svg/triangle.svg
- svg/viewBox.svg: this attribute allows you to control the default SVG
svg width=
andheight=
while keeping the coordinates of the drawing untouched. If theviewBox
aspect ratio differs from the width/height ratio, you likely want to play withpreserveAspectRatio
, otherwise you would get white spaces by default on the generated image - CSS with SVG:
- svg/style.svg: inline CSS
- svg/style-external.svg: external CSS with:
<?xml-stylesheet type="text/css" href="svg.css" ?>
, see also: stackoverflow.com/questions/18434094/how-to-style-svg-with-external-css- svg/subdir/style-external.html: is the relative CSS relative to the HTML or to the SVG? Answer: to the SVG... OMG. So how to make it work reliably?
- svg/current-color.html and svg/current-color.svg: illustrates
fill="currentColor"
. Only works for inline SVG however... See also: stackoverflow.com/questions/13000682/how-do-i-have-an-svg-image-inherit-colors-from-the-html-document/13002311
- JavaScript with SVG:
- svg/defs.html hows how
defs
works- svg/defs-external.html tries to include external
defs
from svg/defs.svg, but that fails like everything else related to external SVGs
- svg/defs-external.html tries to include external
Their website, and in particular the recruitment section, are so creepy.
There's not mention of bombs. No photos of atomic explosions. The words "atomic" and "weapon" do not even show up in the front page!!! The acronym AWE is instead used everywhere as an euphemism.
In the recruitment section we can see a bunch of people smiling: web.archive.org/web/20211007213222/https://www.awe.co.uk/careers/working-at-awe/, suggesting:There's even children outreach!!!
We make nukes, and we do it with a smile!
Ciro Santilli is not against storing a few nukes to be ready against dictatorships. But don't be such a pussy! Just say what the fuck you are doing more clearly! You are making weapons to kill people and destroy things in order to maintain the Balance of power. If the public can't handle such facts, then shut down the fucking program.
This is mostly stuff from before 2016 when Ciro was anxious to document his contributions to get a job.
Most of the projects here are also minor contributions, or Ciro later noticed that the projects were not useful enough to work on and that he was actually wasting his time.
Ciro Santilli's self perceived compassionate personality Updated 2024-12-23 +Created 1970-01-01
Ciro Santilli fantasizes that he is more compassionate than average.
He feels that this manifests itself notably through his desire/ability to create amazing documentation content and notably for free.
Also related is Ciro's worry about social inequality and how to reduce it.
In school, especially before university, Ciro felt that he always treated "the ugly/unpopular" (it is horrifying that such perception of a person exists! but true) girls really well, which led some of them to like him romantically. In part this was de to Ciro Santilli's self perceived compassionate personality and enter through the narrow gate approach to life. But was also partly Ciro's fault, he should have been clearer that he was not truly interested, but he was also lonely, curious about how it was like having girlfriend, and it feels good to have someone like you. This was a sin.
He also feels like he treated working class employees (and don't forget, this is Brazil, e.g. his building janitors in São Paulo lived in the nearby favela!) with extreme equality, sometimes even better, than other richer people.
One thing Ciro does not do however is give money to beggars on the street. Those beggars do make Ciro feel extremely bad for not giving, but he feels that they must be drug addicts to be out on the street like that, and that this money would be better invested in OurBigBook.com. But maybe this is just wrong. How fucked up the world is, how far away are we from unconditional basic income???
Once Ciro was hanging out with one of his father's on a group tourist, and she was a lesbian borderline/actually activist social reform person, and she promptly gave to a beggar without batting an eye, and that made a big impression on Ciro, making him feel even worse about himself.
It must be said that at times this compassion can be a weakness see Ciro's trip to the Municipal Market of São Paulo.
There are unlisted articles, also show them or only show them.