Better HN
topnewbestaskshowjobs
Log inSign up

codesnik

1,035 karma · joined Mar 11, 2009 (17y ago) · 496 submissions

Submissions

comment 2y ago · link · parent

wow. Where I can read about those steel nuts? I wasn't able to google anything on the matter.

comment 2y ago · link · parent

misspelling.. or?

comment 2y ago · link · parent

I suppose it makes more sense for left to right text interfaces?

comment 2y ago · link · parent

no. it was a private project, and my solution wasn't general enough.

for functions/views/etc: I've used https://github.com/omniti-labs/pg_extractor then removed roles from dump (because the fluctuated between developers) and executed

  perl -000 -i -lne 'print if ! /^--/ && ! /^SET /' `find schema/ -name '*.sql'` || exit 1
to remove a lot of useless comments and flags from the dump (pg_dump output isn't too readable). This oneliner can strip too much, though, comments in functions shouldn't start from the 0 column.

The same script had been run on CI too, to verify that developer didn't forget to run it in the PR.

comment 2y ago · link · parent

I've made some automatic schema dumping scripts for supabase/postgres code to become searchable and git-diffable and PR-friendly. And I eventually was able to make unit testing to work good enough that I even wrote migrations in a test-first way, it was just quicker to iterate. But overall experience felt like I'm constantly combating problems, solved looong time ago for other languages and ecosystems. It was weirdly fun, but what killed my interest is that row level security policies kill performance of even simple queries so much, and EXPLAIN doesn't help to well with it.

comment 2y ago · link · parent

That's some pretty terse code. I'm surprised author was able to enhance the game after 40 years.

comment 2y ago · link · parent

Used it and can't actually recommend it. RLS policies slows down even simplest queries 1000x times sometimes, and postgres' current EXPLAIN ANALYZE isn't helping much. Testing app on it is still a pain. Default migration engine is oneway. Backed in database backups are close to useless. I mean, I managed to solve a lot of those issues for myself, but it still felt like I'm reinventing bicycles instead of doing actual work, and I still had a subpar experience.

comment 2y ago · link · parent

I still wonder what are the reasons to steal some features from "pry" instead of just adopting pry itself.

comment 3y ago · link · parent

"Let me see your O face!"

comment 3y ago · link · parent

For me it's an attention issue. I went for a checkup and it was a first time I've been in silenced cabin where doctor checks hearing. And I wasn't able to hear some of the frequencies, because of ringing in my ears, which was louder. And doctor expressed some concern about it.

Before that I rarely ever noticed it. Now it is very loud and constant. Maybe it was like that for a long-long time, but now I just focus on it too much.

comment 3y ago · link · parent

in my opinion, Ruby (and also aforementioned perl back in it's era, but this would be pointless to defend) is one of the languages where syntax and semantics looks like they took order of magnitude more thought than most of other languages.

comment 3y ago · link · parent

offtopic, but are your "remote" positions available for developers outside of US?

comment 3y ago · link · parent

because a) everyone's intuition is different, b) sometimes uneducated intuition is just wrong. On a surface level things looks good, but in some specific situation intuitive ways of doing things could be not consistent or don't have any solution at all. In this cases you just stuck with magic box of software which did something and you have no idea what and reach for backup.

Git is not like that. It is very-very simple. If you learn basics of it, your intuition will align with git's "intuition" too, and you can do crazy things with total peace of mind, without googling or looking into source code of git to see how they had to make something "intuitive" in some definition of the word.

comment 3y ago · link · parent

also, using stash is only a first level. git cherry-pick, git rebase --interactive, git reset --hard HEAD^ and friends allows do such moves and cosmetic extractions after the commit itself. I also prefer to split cosmetic changes and feature changes, so I extract cosmetic stuff to the main all the time.

comment 3y ago · link · parent

why crucified? you're doing exactly what I do. All the people who have any trouble with git whatsoever try to use it as a black box for some high-level whatever ideas of what is their workflow should be. And git is not that, git is a thin wrapper around simple and elegant data structure. If you understand it, then everything clicks and git doesn't EVER gives any trouble.

Your friends are unreasonable, unless you collaborate with them on the same branches and rewrite them after you shared them.

comment 3y ago · link · parent

I can't wait for "tone it down" AI button in the next chrome version.

comment 3y ago · link · parent

lemme guess, you all converged to Java?

comment 3y ago · link · parent

"so, translated beliefs could be just expensive status symbols coming from dishonesty and having too much of free time. So here are examples of leftist beliefs, see?"

comment 3y ago · link · parent

replace how? it can complement it, probably, in edge functions, but replace?

Postgrest-js is something you can put in your code running in client's browser or phone, or in any place you cannot trust code won't be tampered, thanks to many quirks and limitations of PostgREST.

How to make an actual postgres connection, which is simultaneously limited enough to be secure and safe to your data and data of other users, and still be useful for anything, I have no idea. Is it possible at all? Or, ok, how many different users it could handle?

comment 3y ago · link · parent

"by the 3rd or 4th century AD" - that early?!

comment 3y ago · link · parent

TIL "ampersand" etymology. from the Oxford dictionary: "Origin: late 18th century: alteration of and per se and ‘& by itself is and ’, formerly chanted as an aid to learning the sign."

comment 3y ago · link · parent

I didn't know it can serialize continuation! I always thought that with seaside you have to run a single server, and any reboot would just kill the state.

comment 3y ago · link · parent

relative speed against other stars is very much detectable by red and blue shift of light. We would definitely know if sun revolves around something, meanining changes its direction.

comment 3y ago · link · parent

launch where exactly?

comment 3y ago · link · parent

law tests would be good, though they probably have to be "evaled" via the same mechanism which would apply them. Meaning, courts :\

I personally would be happy if any country would attach rationale for the law to the law itself. And possibly some KPI to see if it works. So the law could be reevaluated later, to see if it works at all, or maybe counterproductive, or maybe some major actual application of the law is not why it was introduced.

comment 3y ago · link · parent

It'd be fine if it wouldn't spam google images results, and resulting images are often completely cut out of context, or origin link is not working.

comment 3y ago · link · parent

um, are we talking about English? because most words spelled backwards would be ambiguous how to read. With amount of different reading "rules" in English, it arguably close to being ideographic.

comment 3y ago · link · parent

and if employer wants everyone in the factory for 14 hours 7 days a week, well...

comment 3y ago · link · parent

Researching remorse, N=1

comment 3y ago · link · parent

I'd love to see an example of such an accepted accountability at least once in my life.
1
789
17