HackerTrans
TopNewTrendsCommentsPastAskShowJobs

stux

no profile record

Submissions

The Git repositories of XZ projects are available on GitHub again

github.com
100 points·by stux·2 ปีที่แล้ว·16 comments

comments

stux
·9 เดือนที่ผ่านมา·discuss
These sqlc-style libraries are a great solution to the problem of “make running a query as easy as calling a function”, but I’ve always thought SQL’s lack of composability is a more interesting problem that I haven’t seen addressed (the problems with views are well documented).
stux
·12 เดือนที่ผ่านมา·discuss
This is interesting! A field being nullable because it's legitimately optional in the domain model is one thing, but for new fields which shouldn't be nullable in the domain model, unless you can pick a reasonable identity value, you need a concept of absence that's different from null. Luckily the intersection of "non-nullable fields" and "fields with no reasonable identity value" and "fields which didnt exist in v1 of the domain model" is normally pretty small, but it's painful when it happens.

This reminds me of frozen/nonfrozen enums in Swift. You can do exhaustive case analysis on frozen enums, but case analysis on nonfrozen enums requires adding an `@unknown default` case.

https://docs.swift.org/swift-book/documentation/the-swift-pr...
stux
·2 ปีที่แล้ว·discuss
Rails definitely seems optimized for creating code, but how is it at maintaining code? I've never used it, but it seems like Ruby's dynamic types would make it really challenging to do large refactors. What techniques do rails developers use?
stux
·2 ปีที่แล้ว·discuss
> with functions named by their normalized hash contents, and referred to anywhere by that, but I can't seem to remember what it's called right now. Something like "Universe" I think?

Unison: https://www.unison-lang.org/docs/the-big-idea/
stux
·2 ปีที่แล้ว·discuss
> Flutter founder here.

Given that the literal founder of Flutter is in this thread using this introduction multiple times, it’s kinda hard to give you the benefit of the doubt that you honestly just meant “a founder using Flutter”.
stux
·2 ปีที่แล้ว·discuss
https://github.com/flutter/flutter/pulls?q=is%3Apr+author%3A...

- 0 open PRs

- 2 PRs merged, 1 PR closed in the past 4 years

- All PRs reviewed by a member of the Flutter team within 24hrs

- [“If I'm still supposed to write tests, even for this change, then this is probably as far as I take the PR.”](https://github.com/flutter/flutter/pull/128910#issuecomment-...)

- 40+ PRs from 2019

So, disgruntled ex-employee?
stux
·2 ปีที่แล้ว·discuss
> Anonymous enums/structs in parameters

Can you share an example of this? It sounds really interesting but I couldn’t find any references. Do you mean the parameter “packs” features?
stux
·2 ปีที่แล้ว·discuss
Edit: nvm, dupe of https://news.ycombinator.com/item?id=39984512
stux
·3 ปีที่แล้ว·discuss
> Aggregate functions can now include an ORDER BY clause after their last parameter.

Hopefully that means we'll soon get support for `DISTINCT` in `GROUP_CONCAT`.

Atm you can do `group_concat(x, '|')` and `group_concat(distinct x)`, but you can't do `group_concat(distinct x, '|')`.
stux
·3 ปีที่แล้ว·discuss
As the article notes,

> Redundant conditions are nice because they require no changes to the database [...] This makes them useful for queries that are only sometimes run or where indexes can't be easily added to the main conditions

but where possible I typically prefer adding an index on the expression that the query is using (if your database supports it) since it expresses your intent more clearly. A redundant condition is more likely to get "optimized away" by other developers or changes in the query planner.