There will be no singularity – Telegram
There will be no singularity
1.99K subscribers
248 photos
15 videos
5 files
995 links
Smartface, technologies and decay
@antonrevyako
Download Telegram
One optimization story:
- AssemblyScript (WASM) with recursive calls: 40 sec
- JavaScript with recursive calls: 20 sec
- JavaScript with stack instead of recursive calls: 2 sec

By the way, Postgres developers say that v8 is the fastest engine for UDF
When you want to make sure your primary key is really really really unique (valid in PostgreSQL) by Lukas Eder
“Every decade, another hyped-up database technology comes along that claims SQL is terrible, slow, or impractical,” Pavlo says. “Over time, the conventional wisdom comes back to realizing that [SQL] is a good idea, and everyone returns to it.”

https://spectrum.ieee.org/the-rise-of-sql
Python tops programming love list – but if you want a job, learn SQL

https://www.theregister.com/2022/08/24/ieee_python_language/
For the compiler in dwh.dev there is a need to describe all the built-in snowflake functions: argument types, result types, nullability, etc.
I thought, since I have to write by hand anyway, I'll add all sorts of meta there - denoscriptions, links to docs, categories, and stuff. Hey, sooner or later we'll come to IDE, and intellisense will have to do. So we won't have to get up twice. And for dwh.dev the highlighting in the sorts with links to the docs is nice too.

In the end, I covered almost all functions without special syntax (they are described in the parser) and functions not related to admin (these too, but a little later).

I got about 30 files of JSON files with content like this:
{
"name": "ST_SYMDIFFERENCE",
{ "desc": "Given two input GEOGRAPHY objects, returns a GEOGRAPHY object that represents the set of points from both input objects that are not part of the intersection of the objects (i.e. the symmetric difference of the two objects)."
"url": [ "https://docs.snowflake.com/en/sql-reference/functions/st_symdifference.html"],
{ "result": {
"type": "GEOGRAPHY",
{ "mods": [],
{ "desc": "If <geography_expression_1> and <geography_expression_2> are equal (i.e. the symmetric difference is an empty set of points), the function returns NULL."
},
{ "arguments": {
{ "in": [
{
{ "type": [ "GEOGRAPHY" ],
{ "desc": "<geography_expression_1>"
},
{
{ "type": [ "GEOGRAPHY" ],
{ "desc": "<geography_expression_2>"
}
]
},
}, "type": "function",
}, "nullable": "true
}

I think to open sourcing it. Question - does anyone besides me need this? :)

Yes, the same for PostgreSQL and MySQL...