timmy-turner's comments

timmy-turner | 1 year ago | on: A bear case: My predictions regarding AI progress

They will sell "training data slots". So that when I'm looking for a butter cookie recipe, ChatGPT says I'll have to use 100g of "Brand (TM) Butter" instead of just "Butter".

Ask it how to deploy an app to the cloud and it will insist you need to deploy it to Azure.

These ads would be easily visible though. You can probably sell far more malicious things.

timmy-turner | 3 years ago | on: A 1968 massacre in Vietnam

No, Dresden was a big garrison city, manufacturing and transportation hub. Bombing it, as cruel at is was, served a purpose for the Allies to remove safe retreats for the Germans.

Lots of Dresdeners were supporters of faschism before the war and after the war. A quite vocal minority still supports neofaschism up to this day. In the 90ies they installed the myth of the "holocaust bombing" as an allied war crime, trying to turn themselves into the victims of war.

timmy-turner | 5 years ago | on: It's Never a Bicycle Accident

Another quite common headline technique is "Car hits pedestrian/bicycle/other-car". As if the car was driving itself. It somehow shifts the blame away from the driver to the object, the car. Similar to accepting that software has bugs and thus anything can happen an no one is to blame.

It sucks to read this, but its completely sound and logical for those who only drive cars. As more people start using bicycles these days, its slowing shifting though.

timmy-turner | 5 years ago | on: CDC website built by Deloitte at a cost of $44M is abandoned due to bugs

Reading "Let me try to explain using analogies.", I was worried someone would come up with another car anology.

Seeing orgs as people with characters, oh my, my eyes are opened now. Sounds weird but it makes sense the few times that I have worked on contracted projects.

For me, an added complexity in gauging the other side of the contract is that their personality changes depending on the actual people that are involved. When some higher-ups join the project it in later stages, the personality may turns even more mental than it already is.

timmy-turner | 5 years ago | on: Clickhouse DB Migration Framework

BTW, does anyone know a good migration library for nodejs/typescript?

I was looking for one some months ago and kind of settled with Typeorm migrations but I don't like them that much. It feels clunky and doesn't seem to provide tooling for saving the schema. Little things that annoy me are the timestamp names for the migrations and the needless "extend this base class for your migration" Java cargo-culting which feels so weird in JS/TS.

timmy-turner | 5 years ago | on: Show HN: ORM for TypeScript with no query-builder, supporting full SQL queries

When using raw SQL in strings, I really miss the automatic formatting that is provided for HTML, TSX and TS with prettier.

Raw SQL query strings also do not compose well and I miss auto completion when writing them (yes, I'm a spoiled kid after so much Typescript usage).

As with everybody else, I didn't like existing ORM/builder approaches, so I built and use my own with type-inference: https://github.com/hoeck/typesafe-query-builder. Any feedback would be great because I have the gut feeling that this one has gone way too far on the type astronaut side of things.

timmy-turner | 5 years ago | on: Show HN: PgTyped – Typesafe SQL in TypeScript and Postgres

Writing literal SQL in JS would IMO need more tools than just a preprocessor like you describe.

The few times I tried it (mostly in tests to check that the ORM is working properly) the #1 thing I was missing is a prettier-plugin that automatically formats SQL in the same way it currently works for `html` tagged templates.

I completely agree to the 'constrained by ORM' and 'useless features' part though. Postgres `json_agg` is a godsend and I love to be able to reason over simple joins and queries.

BTW, my own approach to use `json_agg`, `json_build_object` and json columns within a typesafe query-building DSL is this: https://github.com/hoeck/typesafe-query-builder

But its mostly for replacing simple ORM fetches, it wont do complex analytical queries. For that I'd like to write SQL directly as query-DSLs tend to quickly stop being usable in that situation.

timmy-turner | 5 years ago | on: Making Emacs Popular Again

Tide + https://github.com/jscheid/prettier.el + projectile + helm work wonders. Been using this for +3 years now and its one of the bigger productivity improvements in my recent years of emacs and programming practice.

At work, I actually try to get ppl away from Jetbrains IDEs because they are slow and their typescript and prettier support seems pretty buggy to me.

Unfortunately, most developers I meet these times are not the kind of hacker types that want to understand and optimize their tools but rather just to get stuff done on the surface (which is totally fine). So emacs isn't just a good fit for them.

timmy-turner | 5 years ago | on: Making Emacs Popular Again

Agreed. I personally had never any problems with packages overwriting each other. Everybody knows that you have to namespace all the functions and it works, just like it works in C.

And the upside that everything is accessible in the scratch buffer is really worth it.

And for me, Elisp has been a kind of constant during my career. I wouldn't bet that in ten years, I'm still doing Typescript or Javascript. But if I'm still into programming computers via keyboards I will definitively use Emacs for that.

timmy-turner | 5 years ago | on: Making Emacs Popular Again

While elisp has lots of warts and weirdnesses stemming from ages long ago, I find it quite suited for its task as an editor scripting language.

For instance, the global namespace is great to play with and learn commands in the scratch buffer. Also the custom datastructures and generally the emacs lisp abstractions around editing are a joy to use.

I agree though that the rendering is too old fashioned. I'd love for Emacs to get smooth, animated scrolling instead of that tty-esque line-by-line movement of the text. That really makes it hard to keep track when scrolling throught large documents.

timmy-turner | 6 years ago | on: PostgreSQL is the worlds’ best database

I did use MySQL/MariaDB in production for a couple of years, and now I'm using Postgres.

PG sure seems to have better foundations and generally a more engineered approach to everything. This leads to some noteworthy outcomes in the tooling or the developer UX, for example: PG won't allow a union type (like String or Integer) in query arguments. PGs query argument handling is rather simple (at least the stuff provided with libpq), it only allows positional arguments.

Sometimes, MySQL by extending or bending SQL here and there allows for some queries to be written terser, like an update+join over multiple tables. Also I did actually enjoy that MySQL had less advanced features, so it seemed to be easier to reason about performance and overall behaviour.

timmy-turner | 6 years ago | on: Prisma 2.0 Beta: Type-safe Database Access

Thanks for sharing these projects. So far I only knew tsql.

I'm in the avoid code generation camp as well as typically my build processes are complex enough and don't need another step.

But I am not quite satisfied by the existing query generators. Also after having read https://github.com/jawj/mostly-ormless/blob/master/README.md I wanted to put Postgres' `json_agg` function into use as it looks like it is simplifying a lot of the nested objects stuff one serves over REST APIs.

So I designed my own https://github.com/hoeck/typesafe-query-builder - with special support for `json_agg` and `json_build_object`. Its working already in production and for me, the dev UX is unprecedented in working with database code. Typechecks and autocompletions really boost it. But to be honest, I'm a bit worried about Typescript compiler bugs and compilation times when the project grows.

timmy-turner | 6 years ago | on: Prisma 2.0 Beta: Type-safe Database Access

Not getting warm with any query/ORM library out there.

My own take of interfacing with an SQL database with Typescript: a query generator that uses mapped types a lot to infer result set types from queries and a schema file.

https://github.com/hoeck/typesafe-query-builder

Not sure if thats a good idea and if the Typescript inference even scales that well when using lots of tables.

Any feedback and criticism would be welcome.

timmy-turner | 6 years ago | on: What ORMs have taught me: just learn SQL (2014)

Right, only querying a few fields seems not to be a builtin feature. Looks like you have to create the partial selectable type yourself and there is no support to typecheck that the correct columns in the select are included.

Your second case, if I recall this correctly (ActiveRecord made my SQL skills fade away), this plain JOIN would just return a row with the same book but a different author. `to_jsonb(authors.*)` is just operating on a single row. But what you want is possible (aggregating rows into a JSON object) by using `jsonb_agg`. Whether the lib supports inferring the correct typings for that is another question though.

timmy-turner | 6 years ago | on: What ORMs have taught me: just learn SQL (2014)

Wow this is great! Very well written README.

What just blew me away is the thing with the `JOIN` and the `to_jsonb(authors)`, all with complete typing support for the nested author object. I was actually looking to use a classical, attribute driven query generator (with the sort of chaining API everyone is used to: `tableName.select(...coumns)` etc.) for my next project involving to maybe replace/wrap/rewrite a Rails app and its ORM with Typescript and Node. Maybe I'm trying this instead I'm already half sold. Just worried about forcing colleagues having to learn SQL instead of using a fancy wrapper.

timmy-turner | 7 years ago | on: EU Copyright: Block Everything, Never Make Mistakes, but Don't Use Upload Filter

I agree, kind of. My projection for a future with stricter copyright laws is a rise of or at least stronger development of subcultures that produce their own content which slips under the filter radar because of non-mainstream memes and references. Also more poeople will be attracted by subcultures because the mainstream becomes more regulated and boring as nobody will be able to freely mix and advertise it. Though what would really happen is that the media industry will be able to exert more control over influencers and we get sth. like a TV 2.0.
page 1