Better HN
topnewbestaskshowjobs
Log inSign up

gtrubetskoy

2,838 karma · joined Dec 28, 2012 (13y ago) · 522 submissions

Submissions

comment 2y ago · link · parent

The name Maestro has already been used for a workflow orchestrator which I worked on back in 2016. That maestro is SQL-centric and infers dependencies automatically by simply examining the SQL. It's written in Go and is BigQuery-specific (but could be easily adjusted to use any SQL-based system).

https://github.com/voxmedia/maestro/

comment 3y ago · link · parent

The original from July 2019 https://twitter.com/humblehack/status/1088982929940848647

$ echo -n 'The SHA256 for this sentence begins with seven, seven, f, zero, a, b, b and five.' | sha256sum 77f0abb54cd09ad7b654bd5e762d7be58e7daffd1a0da6a56f5135bd667856a3 -

comment 5y ago · link · parent

I forked Redis to create Thredis almost 9 years ago. Some notes on how it was implemented:

https://github.com/grisha/thredis/blob/master/README-THREDIS

Then I added SQLite to it, more details here:

http://thredis.org

This was all done mostly for fun, though I did use it in a an actual project for a while.

comment 6y ago · link · parent

Python becoming Tcl

comment 6y ago · link · parent

The details of how the data is stored are described in this 1979 paper by Douglas Comer: "The Ubiquitous B-Tree" [1]. Since it was invented, much hasn't really changed: practically all relational databases use some variation of this structure. I wrote about it in [2], which might help explain some aspects of how it works.

[1] https://dl.acm.org/doi/10.1145/356770.356776

[2] https://grisha.org/blog/2013/05/11/relational-database-on-to...

Edit: also [3] is about how to store SQLite in a Redis hash (rather than on-disk file).

[3] https://grisha.org/blog/2013/05/29/sqlite-db-stored-in-a-red...

comment 6y ago · link · parent

I remember the days when having to switch between x86, ppc, sparc, etc was a thing (not to mention the many flavors of UN*X) and we survived. In fact I think it was more fun back before the x86/Linux server domination. Architecture diversity is good.

comment 6y ago · link · parent

> Also, what is the pollution you are talking about?

For example reactive oxygen species.

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1865572/

comment 6y ago · link · parent

I wouldn't rank glucose above fats. As I understand it, it's not exactly a "shorter battery" than fat - it is simply a form of energy that is abundant in plant life, but fat is still a (much) "better battery".

The reason our body always favors burning glucose first is NOT because glucose is "better" but actually because it is an inferior type of fuel (it creates "pollution" and is difficult to burn - you can develop diabetes from too much of it) - so our evolved system tries to get rid of it first, while hanging on to the "good stuff" for as long as it can.

comment 6y ago · link · parent

If you are using BigQuery and your "workflow" amounts to importing data from Postgres/MySQL databases into BQ and then running a series of SQL statements into other BigQuery tables - you might want to look at Maestro, it written in Go and is SQL-centric, there is no Python dependency hell to sort out:

https://github.com/voxmedia/maestro/

With the SQL-centric approach you do not need to specify a DAG because it can be inferred automatically, all you do is maintain your SQL and Maestro takes care of executing it in correct order.

comment 6y ago · link · parent

Related - see my Ask HN on how to host your own blog without giving it to the centralized blogging services (I won't name):

https://news.ycombinator.com/item?id=23206094

comment 6y ago · link · parent

My take on it is - just write for yourself. If, when you read it, it sounds like a good write up to you for whatever your own reasons are, that is all that's required. If no one else reads it, fine. But you might be surprised, a lot of other people may find it interesting as well :)

12.

Ask HN: Do you blog under your own domain? How?

27 points · by gtrubetskoy · 6y ago · 39 comments

comment 6y ago · link · parent

I didn't :)

comment 6y ago · link · parent

Subinterpreters existed from the very early days in the C API and were key to the implementation of mod_python (which I wrote). So if you used mod_python, you used subinterpeters without realizing it.

http://modpython.org/live/current/doc-html/pythonapi.html#mu...

EDIT: And it looks like I had subinterpreters in the first released version in May 2000, so the initial git (formerly SVN) commit already had them https://github.com/grisha/mod_python/blob/9b211b7e8a65f1af4b...

EDIT2: Just noticed this comment:

  * Nov 1998 - support for multiple interpreters introduced.

comment 6y ago · link · parent

One problem with this article is the number of times the solution involves COUNT(DISTINCT).

One of the best SQL interview questions is "Explain what is wrong with DISTINCT and how to work around it".

comment 6y ago · link · parent

Github was cool when git was new years back - but these days, and especially given how git inherently is not centralized, it is not very clear to me why we all cling to github. With a little work, all that it offers can be done without any help of a centralized server/corporation.

comment 7y ago · link · parent

I've spent a lot of time trying to understand PoW and came to the conclusion that is a distributed clock of sorts, described here https://grisha.org/blog/2018/01/23/explaining-proof-of-work/

comment 7y ago · link · parent

  RecursionError: maximum recursion depth exceeded

comment 7y ago · link · parent

Github goes down on Monday around 9am pacific time - must be totally random.

comment 7y ago · link · parent

Any compact disk works as a spectrometer.

https://www.cs.cmu.edu/~zhuxj/astro/html/spectrometer.html

comment 7y ago · link · parent

I once submitted a blog post [1] and later received an email from someone at HN saying that it was a great article but didn't do so well and if I re-submit it, they will make sure it does better, so I did and it went to the top.

[1] - https://news.ycombinator.com/item?id=16862077

comment 7y ago · link · parent

FWIW - my notes on how locking was done in Thredis: https://github.com/grisha/thredis/blob/master/README-THREDIS

comment 7y ago · link · parent

Heh, I did this back in 2012: http://thredis.org/ (Not only is it threaded, it also supports SQL).

comment 7y ago · link · parent

Here is my own version:

  $ echo -n 'The SHA256 for this sentence begins with: one, eight, two, a, seven, c and nine.' | sha256sum 
  182a7c930b0e5227ff8d24b5f4500ff2fa3ee1a57bd35e52d98c6e24c2749ae0
(Edit: a better version).

comment 7y ago · link · parent

The piano keyboard (usually) has 7 octaves. Frequency doubles every octave, therefore if the lowest key is C, then the highest C all the way on the right is

   C*2^7
You can also follow fifths and arrive at the same note after 12 fifths. A fifth of a note is 3/2 of its frequency. Thus, starting from the same C, you arrive at

   C*(3/2)^12
But...

   (3/2)^12 = 129.7, while 2^7 = 128.
And that's (roughly) the problem that Bach's temperament addresses by ever so slightly adjusting the frequency so that in any key it sounds "right".

comment 7y ago · link · parent

There was a fascinating Defcon 26 talk on "predatory publishing" which may explain how this kind of thing happens:

https://www.youtube.com/watch?v=ras_VYgA77Q

https://en.wikipedia.org/wiki/Predatory_open-access_publishi...

comment 7y ago · link · parent

My guess is that this is in line with the Go tradition of first handling all the odd cases leaving the essential part of what the function (or block of code in this case) attempts to do as the last part. So "if !found" to me suggests that this is more of an exception than the rule and this is why the code is written so as to deal with it first.

comment 8y ago · link · parent

It's interesting that this happened on the same day Trump and Jinping met, there is a possibility they both knew about this prior to the meeting. On Monday stock market goes up on "improving China relations", on Tuesday the Dow tanks 800 points on "no news". Chances are the sell-off was because some people learned about it on Tuesday.
12345
18