HNHacker News
TopNewBestAskShowJobs

tkot

73 karma · joined February 25, 2021

submissionscomments
tkot··on Spaced repetition can allow for infinite recall
Just for the sake of spelling: Bosnia-Herzegovina Hungary Cisleithania
tkot··on Tell HN: I interviewed my dad before he died
Proof of my and your existence is impossible in a similar way - we could all be just brains in vats and all external stimuli might be hallucinations (or we could be just GPT-powered chat bots). In fact, I could be a hallucination of yours and you could be my hallucination. While the idea of solipsism is sort of an interesting thought experiment, it doesn't really help explain or predict anything.
tkot··on Miniclip to Discontinue Desktop Site and Transition Exclusively to Mobile Games
What is the reason why Java and Flash runtimes were somehow more prone to malware but JS seems fine? Is it some specific sandboxing technology or something else entirely?
tkot··on How the weak can win – A primer on protracted war
It does seem like almost entire world (including most of South America and Middle East) condemns this particular invasion, though:

> The vote on the “Aggression against Ukraine” resolution was 141-5, with 35 abstentions.

> Only Belarus, Syria, North Korea and Eritrea joined Russia in opposing the measure, (...)

https://apnews.com/article/russia-ukraine-vladimir-putin-uni...

tkot··on How the weak can win – A primer on protracted war
Will it be a lasting peace, though? Doesn't demilitarization mean that if another "people's republic" appears, let's say near Transnistria, Ukraine will be unable to do anything about it?
tkot··on The decline and fall of Java on the desktop
Python is definitely simpler to start with but it doesn't expose the beginners to some concepts directly - interfaces are implicit because of duck typing (unless you use the ABC module), everything is public (underscores are just a convention), there is no method overloading etc.

I think it might be more valuable to expose beginners to static typing because it's much easier to transition from "objects have distinct types" to "pretty much everything is just a hashmap" than the other way around.

The thing about C as a first language is that you need to not only learn what programming is but you also need to learn manual memory management which raises the bar significantly and it's pretty easy to write code that fails for reasons which are difficult for a beginner to figure out (like segfaults).

tkot··on The road to success is paved with rejection letters
I think it's a pretty reasonable assumption, even if the ordering is strictly personal (some people would take a job with better work-life balance instead of the better paying one, some would make a different choice, same thing with technology stacks etc.).

The second premise also seems to be true, though I would phrase it in a descriptive rather than prescriptive manners - the choices you make regarding job offers reveal your preferences ("the ordering of jobs").

Having no "job ordering" would result in people taking jobs based on a coin flip, wouldn't it?

tkot··on The time has come to replace file systems
And if you are running Linux then fsearch is worth giving a try: https://cboxdoerfer.github.io/fsearch/
tkot··on The End of Online Anonymity (2019)
I guess the same question could be asked in the opposite direction, so to speak - isn't a belief that such a right exists enough for it to exist, even if it's unwritten?
tkot··on Amazon Pip Horror Story
> he decided to go get his MS in CS, without even doing any research project and just opting for the GTA instead of GRA route.

Could you elaborate more on this? I'm assuming this is a detail of the US education system of which I don't know anything :)

tkot··on 50 Years of Prolog and Beyond
Could you point me to some resources about this sort of thing? I remember hearing about someone implementing transpilation of some subset of C++ to some subset of Java using Prolog but I couldn't find the actual code.
tkot··on Yet another hot take on “folders versus tags”
I have settled on putting tags (bunch of words I associate with given subject separated by underscores) in names of files/directories and using FSearch (https://github.com/cboxdoerfer/fsearch) to search for the tags in names/paths.

It's simple, it's portable, it's good enough. You could in theory improve it by having multiple views of the same data (let's say you want to save some notes about "Naturalis Historia" - should you put it under "ancient Rome" directory or under"biology"?) for example by using hardlinks but I don't know if there is a way to create a backup on another filesystem that will keep hardlinks as hardlinks (DAR seems promising http://dar.linux.free.fr/doc/Features.html but I have yet to try it).

tkot··on Practical Shell Patterns I Use
I think this is just how operator overloading works in Groovy: https://groovy-lang.org/operators.html#Operator-Overloading

"Or" is the name of the "|" operator. From the looks of it it's impossible to overload "||" in groovy.

By the way the "|" operator and the "or" method both call "pipeTo" directly so a third way to write it would be:

"ls".execute().pipeTo("grep -i old".execute()).waitForProcessOutput(System.out, System.out)

tkot··on Practical Shell Patterns I Use
How about Groovy?

("ls".execute() | "grep -i old".execute()).waitForProcessOutput(System.out, System.out)

It can also be written as

"ls".execute().or("grep -i old".execute()).waitForProcessOutput(System.out, System.out)

It's not exactly the same because it uses a thread and a buffer instead of an OS pipe but I guess it's close enough.

tkot··on “I am literally losing sleep” over Java (1996)
I think this is can be handled with Lombok using @Getter and @Setter annotations (https://projectlombok.org/features/GetterSetter). It is not exactly the same because you call generated methods instead using assignment syntax but I guess it's close enough - if you need some custom logic in the getter/setter then you remove the annotation and write your own implementation (I think Lombok might be smart enough to ignore the annotation if an appropriately named getter/setter is present).

Non-nullable types sound great, I wonder if this could be introduced to Java in a backwards-compatible way (I suppose it would follow the same path with introducing explicitly nullable types first, though I guess it could be handled using Optionals?).

tkot··on “I am literally losing sleep” over Java (1996)
Could you list these features? I was under the impression that apart from some things that can be easily done in C# but are pretty much impossible to do in Java (like value types* and pointers) the languages were pretty similar.

Some C# things seemed rather strange (like delegates), some purely cosmetic (like indexers) and there were also things that Java had but C# did not like covariant return types (available from C# 9.0)

*Project Valhalla is supposed to bring it to Java but I wouldn't hold my breath waiting for it.

tkot··on A neuroscientist prepares for death
Surely there is no escape from solipsism but since it's all-encompassing then how much actual value does it provide?

I mean, we can annotate every observation and every thought ever with "for all we know it could be just an illusion" and live as if we were constantly being tricked by a deceitful daemon Descartes-style but why should we do it, what is there to gain?

I could agree that monism / strict materialism is as baseless as any other view but I think its terseness deserves a bit more respect than being called "comical", if only for the sake of its elegance.

It's trivial to provide a longer description / a more complicated model of reality that will have as much explanatory power as a simpler one. It's much more challenging to find a shorter / simpler one that will work just as well.

Yes, I am aware that my assumption that challenging things are somehow more commendable than non-challenging things is completely baseless too :)

tkot··on $2,500 Ethernet Switch Effectively Isolates Audiophiles from Cash
It most likely has no impact, just like most (if not all) equipment targeting audiophiles.
tkot··on Once poor, always poor?
What distinction does the word "natural" provide? Chimpanzees use tools, does that make their behavior and societies "unnatural"?
tkot··on Is It Even Worth Working on FOSS Anymore?
Is CurlFtpFS still developed? Last time I considered using it it looked abandoned and there was some regression from years ago which supposedly made it really slow. I think rclone offers pretty much the same functionality and more?
tkot··on Bugs are evolving to eat plastic
Should we expect evolution to explain evolution, though? It reminds me a bit of the "falsifiability is not falsifiable" kind of argument - just like falsifiability doesn't apply to itself (it applies to science and falsifiability is a metascientific term), evolution is a biological term and doesn't apply to cosmogony.
tkot··on Bugs are evolving to eat plastic
What makes plastic something with a negative potential? Was lignin a "thing with negative potential" until some organisms capable of dissolving it appeared? What makes humans a separate thing from "God" - are they not a part of the same nature that created them (and lignin)?

Don't get me wrong - plastic pollution is a serious issue. it just seems to me that the "negativity" of plastic pollution lies in making life more difficult for humans. Appearance of lignin surely influenced whatever forms of life existed at the time, we just don't care that much because we were not around (though carbon deposits from that time were surely useful as a source of easily accessible energy). We are born and we die in a world where lignin is biodegradable and not much of a hassle so we might be inclined not to call it "negative" even though it shares some similarities with plastics.

Things sometimes play out in our favor (like the aforementioned coal deposits providing easily accessible energy) and sometimes they don't (like the CO2 from burning all this coal pushing the chemical composition of our atmosphere outside of favorable range of parameters). I don't really see any advantage of introducing additional beings into the description (I don't think it enables us to make more accurate predictions), though I guess it could be an interesting thought experiment along the lines of the Gaia hypothesis (or the Medea hypothesis for those of more pessimistic inclinations).

I apologize if I made myself unclear or impolite - I tried my best to make this response as understandable as possible while trying to keep it reasonably short.

tkot··on Implementing TLS Encrypted Client Hello [Nov 2021]
And the two most popular ways to encrypt DNS queries rely on TLS (DNS over TLS and DNS over HTTPS).
tkot··on Library Genesis Desktop app, now with IPFS support
I think it uses WPF for the interface, so Linux support would pretty much require a fork unless WPF starts supporting Linux.
tkot··on A terrible schema from a clueless programmer
Oh, so by fuzzy search you mean full text search, not just a simple 'LIKE A%' pattern - it's an entirely different kind of flying altogether (https://www.youtube.com/watch?v=3qNtyfZP8bE).

I don't know what kind of internal representation is used to store tsvector column type in PG, but I think GIN index lookups should be very simple to parallelize and combine (I believe a GIN index would basically be a map [word -> set_of_row_ids_that_contain_the_word] so you could perform them on all indexed columns at the same time and then compute intersection of the results?). But maybe two lookups in the same index could be somehow more efficient than two lookups in different indexes, I don't know.

I'm still sceptical about the LIKE/ILIKE scenario though. "WHERE firstname LIKE 'A%' and lastname LIKE 'Smith' " can easily discard all the Joneses and whatnot before even looking at the firstname column, whereas "WHERE combined_firstname_and_lastname LIKE 'A%SMITH' " will only be able to reject "Andrew Jones" after reading the entire string.

tkot··on A terrible schema from a clueless programmer
Would it not prevent some optimizations based on statistics regarding the data distribution, like using the most selective attribute to narrow down the rows that need to be scanned? I'm assuming there are 2 indexes, 1 for each column that gets combined.

Let's say you know the lastname (Smith) but only the first letter of the firstname (A) - in the proposed scenario only the first letter of the firstname helps you narrow down the search to records starting with the letter (WHERE combined LIKE "A%SMITH"), you will have to check all the rows where firstname starts with "A" even if their lastname is not Smith. If there are two separate indexed columns the WHERE clause will look like this:

WHERE firstname like "A%" AND lastname = "Smith"

so the search can be restricted to smaller number of rows.

Of course having 2 indexes will have its costs like increased storage and slower writes.

Overall the blog post conveys a useful message but the table example is a bit confusing, it doesn't look like there are any functional dependencies in the original table so pointing to normalization as the solution sounds a bit odd.

Given that the query from the post is always about concrete values (as opposed to ranges) it sounds like the right way to index the table is to use hash index (which might not have been available back in 2002 in MySql).

tkot··on Java 17 / JDK 17: General Availability
ArrayList would be something like C++ vector. Vector API is supposed to support using vector (SIMD) instructions supported by many CPUs today.
tkot··on Show HN: Kryptor – A simple, modern, and secure encryption tool
Would EncryptPad be enough for your needs?

https://evpo.net/encryptpad/

tkot··on Firefox 91 – Revert back to old tab style
I started using a theme called Qiyu Light (https://addons.mozilla.org/en-US/firefox/addon/qiyu-light/) after the tab style changed to be able to find current tab reliably.

It doesn't seem to change anything other than marking current tab blue.

tkot··on KDE Connect: Enabling communication between all your devices
It's unfortunate that KDE Connect doesn't seem to be working on latest Ubuntu LTS (Focal Fossa): https://bugs.launchpad.net/ubuntu/+source/kdeconnect/+bug/19...
← PreviousPage 2 of 3Next →