Lurker News
With the quarantine being placed in effect in a lot of cities across the world, we all likely have a little bit more time to focus on personal projects or learning something new from the comfort of our homes. What are you guys up to these days?

Comments (1,237) 697 threads

Earlier comments
loufe5 replies#
I bought an old trench coat from a thrift store and outfitted it with 350 programmable LEDs , an Arduino to control them, and a 24 AA battery bank for a music festival last year, it was a hit. I'm currently working on adding another 150 LEDs, fixing the power system (I burnt out the Arduino after a couple hours), and looking into adding a microphone and learning some sound programming to make the suit change colours to the beat for this year. I always wanted a living technicoloured dreamcoat.
technicolorwhat2 replies#
No way. Show me.
canada_dry1 reply#
Nice! Only 5mos til Burningman.

Continue this thread — 1 reply

barbs1 reply#
Did you make an account just to ask this comment? haha :D
technicolorwhat#
yes
leggomylibro1 reply#
Nice! FYI, you can use those USB phone-charging battery bricks for a nice compact 5V output in those sorts of projects. I think TSA-approved ones run up to 100Wh, and they're easy to recharge.

Most of them will cut power after a minute of so if you don't draw more than like 100mA of current, but that shouldn't be a problem with 350 LEDs. It'll save your Arduino's voltage regulator some grief, too :)

loufe#
Ah that's a great idea for the Arduino itself! My board burnt out because my independant battery source for the board didn't work out so I wired it in parallel with my batteries (3x8 AA batteries in series put through a voltage adjuster). I'll be buying one!
harikb#
Suggestion - it should light up when you sense someone else within 6 ft (or may be it already keeps people away)
simonsarris4 replies#
Working on simeville, a little 2D Canvas demo that builds a town. You can try it yourself here: https://simonsarris.github.io/simeville/ (pardon the graphics, they're stand-ins right now)

Click to make buildings (above the tree line only right now) and click and drag the sun down to go to night. Drag the moon to return to day.
Gif of night sky: https://twitter.com/simonsarris/status/1235761030996901888
The point is to replace the background town that's currently on https://simonsarris.com (which is animated purely by CSS right now, including the birds) with a much more interactive and playful one. (the current site background gives you an idea of what will be built and why it currently only works behind the tree line). The time consuming part right now is making pretty graphics. I had begun with buildings made from Canvas drawing code, with procedural params and all that, but I'm switching to images because it will be much prettier in the long run.

m00dy#
I just checked your demo. Good Job
bartread#
Looking good: I should have read your comment in full before I tried it because I was sitting here wondering why I could only create buildings in the sky. Neat idea though, and it'll be awesome when it looks as good as the picture you have on your website at the moment.
tcgv#
Not sure why, but it is very relaxing dragging the moon up going into night ;)
dybber#
Cool, would like to check it out, but doesn't seem to work on neither Firefox nor Safari: "TypeError: document.getElementById(...) is null" on line 58 in main.js
burtonator4 replies#
I'm working on Polar:

https://getpolarized.io/
It's been out for about 1.2 years now and we're really starting to nail some important features.
JUST about to post a new release now.
COVID19 is having us pivot a bit in that we're going to experiment with collaborative group reading in the hopes that students can work more efficiently with their colleagues without having to leave home.
The core idea is to have a fully-integrated reading platform sort of like an integrated development environment but for non-fiction material (textbooks, research papers, documentation, plus web content).
Right now we support PDF and web content but are actively working on EPUB and improved reading of web content.
The key functionality is built around annotating your documents and taking notes and building flashcards so you can maintain a personal knowledge repository.
It's also Open Source and supports cloud sync. We have a mobile webapp now and working on porting it over to Android soon.

maxrmk1 reply#
Love the github-style activity tracker. It seems like such a small thing, but it's been a huge help in keeping myself in the habit of making regular progress.
burtonator#
Agreed.. the gamification can be huge. I'd like to keep iterating on this moving forward.
rapnie1 reply#
Can it be used without external services, like firebase?
getpolarized#
You can use it as a standard desktop app without logging in but then you don't really have cloud sync.
oliv__#
Looks great!
Ryperhun#
Wow this looks really good. It would be good to have integrated support with Kindle devices then I would definetly subscribe.
antonrevyako2 replies#
I'm working on static analyzer for SQL: https://holistic.dev

It's a useful tool for DBA to identify issues in SQL queries automatically. Only 50 rules for now, but more than 1000 described in backlog :)
Funny, but initially this tool aimed at developers' needs.
I've made a lot of microservices, which only started the database queries. I came up with the idea of making a tool that would automatically generate all the microservices based on SQL queries. The MVP of such a tool was implemented, which reduced the developer workload by at least a quarter. In this tool, it was required to write queries in a certain way that did not make it universal and did not give a connection with the database structure.
The next step was to create a system that relies on the text description of the database schema in SQL format (DDL) and automatically understands the types that will return the SQL query. Such a tool can automatically inform the developer about possible errors on the interface between the application and database when changing the structure or the SQL queries themselves. It can also be built into the CI to provide the automatic code review at the version control system level and prevent the erroneous code from entering the repository.
But the developers did not appreciate all the advantages, as most projects are developed using ORM :(
But at the same time, DBAs expressed interest in implementing a system of the automatic search for bad requests already on the production database.
Any questions are welcome :)

ibizaman2 replies#
That looks really cool. Any chance you can share the code? Or share more about what you did? Like what does those micro services look like and what do they do? Also what you say about type errors makes me think about static typing. Does it relate to that concept?

I too have been diving into writing raw SQL some while ago and I liked it.

antonrevyako2 replies#
Thank you for the feedback! The service will be put into commercial operation as saas in the coming months. I do not plan to open the source code, unfortunately.

The idea is that the tool will only work with the sources of SQL queries, and I had to work hard to implement it.
The work consists of several steps 1) get the AST (Abstract Syntax Tree) database schema (DDL). At this stage, only Postgresql up to version 10 is supported. Soon I will deal with the parser from Postgresql 13. This is not a trivial task. I have to build everything from the source code of Postgresql :)
2) Building a database model. We parse all DDL-commands one by one and apply changes. For example, apply all ALTER TABLE to the table described above, add user-defined functions to the list of built-in functions, and so on. It is necessary to have a complete overview of all types of tables, indexes, and each table described in a DDL script.
3) get an AST query (DML) and build a model of the result. This is the most complex and interesting part :) The task is to get a list of field names and their types, which will be returned after the query execution. You need to consider CTE and the list of tables specified in FROM. You need to understand what function will be called and what result will be output. For example, function ROUND is described in three variants, from different arguments and with varying types of result, function ABS - in six variants. I.e., it is required to understand the types of arguments before selecting a suitable one :) In the process, implicit type casting is considered if necessary.
The same is valid for operators. An operator in Postgresql is a separate entity that you can create yourself. Postgresql 11, for example, describes 788 operators.
Various types of syntax are taken into account, for example - SELECT , t1., id, public.t2.name, t3.* FROM t1, t2, myschema.t3 - will be parsed correctly.
But even this is not the most challenging thing :) The most exciting thing is to be able to understand two things: A. whether each of the fields can be NULL or not. It depends on many factors, such as - how the JOIN of the table with the source column is made, whether there is a FOREIGN KEY, what type of JOIN is used, what conditions are described in the ON section, what is written in the WHERE conditions. B. How many records will return the query described in the NONE, ONE, ONE OR NONE, MANY, MANY OR NONE categories. Again, this is affected by the conditions described in JOIN and WHERE, whether there are aggregation functions, whether there is GROUP BY, whether there are functions that return multiple records.
This function, by the way, is also used in the first step - to get types for VIEW.
This was a brief description of the first part of the service ;). It can already be a service in itself. It is possible to generate types and all code of microservices, including JSON-schema and tests, based on DLL and DML set. But as I wrote above, most people prefer to use an ORM such as Django or RoR. :( For this reason, I've removed this functionality from a playground and will take it to a separate project when I get my hands on it. It will also include various tools, such as - information about all possible exceptions that may be thrown by request, automatic creation of migrations to CI if your DDL files are in the repository, whether there are unused indexes or fields and many other exciting things :)
And the second part of the service that I plan to promote in the first place is a tool to search for bugs, architectural, and performance problems automatically. The target audience here is DBA, who have to deal with forgeries RoR-developers and their colleagues :) This part is entirely based on all information obtained in the previous stages. Part of the errors can be understood by AST (linter principle), but the most interesting rules are based on knowledge about types, understanding of NULL/ IS NOT NULL, and the number of returned records.
There are more than a thousand such rules, but I suppose there will be about 5000 of them in the next couple of years :) Also described are about 200 rules that can lead to runtime errors, but they are not needed by DBA, because their job is to find problems in valid queries :) There will be more than 1000 such rules as well since Postgresql describes more than 1700 runtime errors.
And yes, this is all about Postgresql. After I start commercially using Postgresql, I plan to do the same for Mysql and then perhaps for Clickhouse if there are no special offers of cooperation :)

syastrov3 replies#
This is actually something I thought of doing, but you actually did it. It would be amazing if you can find a way to open-source at least part of it.

But my application was to be able to use raw SQL queries instead of an ORM in an application. By statically analyzing the SQL queries, then you can, in a statically typed language, automatically type-check the parameters to and results of the queries. Combining that and an IDE like the Jetbrains ones, which provide intelligent SQL autocompletion/refactoring, then tbh., I think it would beat an ORM in terms of ergonomics. Some people like LINQ or various Haskell/Scala ORMs because they are type-safe. This would be totally natural to those who know SQL without the downsides of being totally unanalyzed and type-checked.
It would be like the clojure library called hugs, but with static type-checking.

Continue this thread — 3 replies

aksx1 reply#
i suggested building this at a bigco where i work last year, built a prototype using postgres and wrote the design doc.

sadly it wasn't picked up.
Congrats on product, there is a big market for it

Continue this thread — 1 reply

antonrevyako#
Look at this, I've returned the ability to export types :) In beta now available renderers for flow and ts. You can see alive how the export results change when you add columns or change constraints. If there are no foreign keys using JOINs, fields can become nullable, etc. I made a simple example: https://holistic.dev/en/playground/5596577a-ad0e-40e6-a05b-e... Remove -- before ALTER and see how the result of the type export will change.
Ros21 reply#
Does your roadmap include directly detecting against pg_stat_statements? Most of these tools go against the stats tables in the database directly ('SQL Doctor' from Idera comes to mind, that product is very solid)
antonrevyako#
Yes, absolutely. You can check requests from pg_stat_statements, slow query log, and any other source as you wish. If the SQL repository stores query in separate files, you can check these queries (e.g., before they are merged into the master).

It is crucial that you add the actual database schema (DDL) before checking.
This functionality will appear soon (client cabinet, API).
Please note that analysis is performed using static methods only! No connection to the database is required. In particular, statistics and other environmental parameters that may affect the query performance are not taken into the analysis. I would like to be able to enrich the data obtained by static methods with data from the database production, but at the moment, this is a very far-reaching plan.
The tool will make recommendations that are necessary, but not enough.
The actual database parameters affect the real query plan. There are a lot of such settings, and the impact changes over time.
Keeping an eye on these parameters and adjust them - there is a significant layer of work that is not a priority at this stage. Excellent tools have already been made for this purpose, such as postgres.ai.
DBA work is divided into two parts - to monitor the quality of queries and database schema and configure the parameters of production servers.
My tool covers the needs of the first part and does not cover the second part.
I talked to product owners of companies producing products or services related to the second part, and they agreed to integrate our products when I come ready.

Load more comments