HNHacker News
TopNewBestAskShowJobs

TYMorningCoffee

165 karma · joined August 3, 2020

josephmate.github.io
submissionscomments
TYMorningCoffee··on How 'Factorio' seduced Silicon Valley and me
If you've been consistently redeeming free games from Epic you might already have it. It was free on 2020-08-06[1].

[1] https://josephmate.github.io/EpicFreeGamesList/

TYMorningCoffee··on Maybe Functions
> Here’s a specific example, it’s a “maybe” function as it only returns the friends of a user, if the user is logged in. Basically it introduces a possible return null.

    function maybeGetUser(): User | null {
      if (!loggedIn) {
        return null;
      }
      return fetchUser();
    }

I believe this is an error. The code sample I took from the article is about getting a user, not the user's friends.

Since that function will return a list, an empty List might work.

TYMorningCoffee··on Oscilloscope watch ships after 10 years on Kickstarter
I have jkj mapped to escape
TYMorningCoffee··on Let’s not encrypt (2019)
> "What if someone MITM-es your recipes blog?"

You can alter the ingredients to be lethal.

TYMorningCoffee··on Let’s not encrypt (2019)
Yes, but SSL is not used for plain HTTP.

Also, I think you meant TLS but that is only used in HTTPS not HTTP.

TYMorningCoffee··on FreeBSD spends 7% of its boot time running a bubblesort on its SYSINITs
GTA online was struck too

How I cut GTA Online loading times by 70% https://nee.lv/2021/02/28/How-I-cut-GTA-Online-loading-times...

TYMorningCoffee··on Finding Java Thread Leaks with JDK Flight Recorder and a Bit of SQL
> and the stack trace of the parent thread when starting the child thread

That's incredibly useful. We have a strict policy of all threads and pools being named, but sometimes default named threads sneak in making it difficult to figure out where the thread is used for.

TYMorningCoffee··on Daily Sketch 2
I would like to hear more about the old code you had and how it got corrupted by time. What is the before and after?

You might be able to recover them by building or downloading an older version of your browser or whatever dependency that caused the issue.

TYMorningCoffee··on Grep.app – Search across a half million Git repos
Your search has a lot of false positives like AKIAIOSFODNN7EXAMPLE
TYMorningCoffee··on Structured Concurrency Definition (2019)
Structured concurrency is in Java 19 early access [1]. Try it out! They reuse the try with resources to implement it.

[1] https://openjdk.org/jeps/428

TYMorningCoffee··on Rewrite it in Rust
Maybe it can be reworded to say that the energy you spent on looking for memory issues is saved and can allow more focus on logical errors.

I find doing a code review a demanding task that leaves me drained by the end of it. Despite being drained, I still I don't feel confident I've been thorough enough.

TYMorningCoffee··on On the Algebraic Properties of Flame Graphs
What ordering do flame graphs have? You can move the stacks around, provided that the methods earlier in the stack match, since the graph only shows proportion of that stack chain.
TYMorningCoffee··on Internal document explains why Google has become slow and bureaucratic
Google Ads, kubernetes, go to name some more
TYMorningCoffee··on Ask HN: What sub $200 product improved your 2022
It's a shame how you and your friend received very different products. An additional hypothesis: Could it have been a counterfeit?
TYMorningCoffee··on Freedom Mobile's 4 digit password limit
Ah wow, no pause after

As a comparison, banks' 2FA will get disabled after too many resets.

TYMorningCoffee··on Freedom Mobile's 4 digit password limit
From the article it was not clear that the 2FA was the 5 digit pin.

10 guess every 10 minutes with an expectation that after 5000 guesses you'll have a correct guess is 3.4 days (500*10 minutes).

TYMorningCoffee··on 26 Programming Languages in 25 Days
Even with the latest java? With records and switch pattern matching on records, you can model some stuff better. It's not as good as pattern matching in other languages but getting better.

I agree with your point though. I remember being asked a question and I blanked with how to model it in Java. Then I switched mid interview to python and it clicked for me.

TYMorningCoffee··on Challenging algorithms and data structures every programmer should try
I think the author excluded hashing because it is too well known.
TYMorningCoffee··on Show HN: Obsidian Canvas – An infinite space for your ideas
Would adding a setting for the backend server sufficiently increase the complexity to get it published?
TYMorningCoffee··on Vim Foot Pedal
I did jkj instead.
TYMorningCoffee··on A neat XOR trick
I think he meant to use a hash map plus a numOfOnes counter instead of hash set. With a hash map, you don't need to build the entire window every loop. It's only a constant amount of work per iteration, achieving O(N)
TYMorningCoffee··on Experiment: The costs of slow build times
There also qualitative benefits like the knowledge the developer and the company gains. Also, the developer might enjoy the change of scenery.
TYMorningCoffee··on Experiment: The costs of slow build times
The causality could be reversed: the high quality causes faster less flakey builds. There could be a hidden variable like developers on the better repo are better developers or the better repository solves a less complex problem.

However, I do agree with you. For me it's so much more pleasant working on the faster repo and it feels like it's because of the faster build. But the above criticism again applies to my feelings.

TYMorningCoffee··on Graphviz 7
.gz is already used by gzip[1]. This wiki[2] says it is .gv . I've always used .dot so I don't know what to use anymore.

edit: according to this[3] discussion , Microsoft uses .dot. I then found this wiki[4] page that supports the claim. dot is used by Microsoft Word document template files. I will switch to .gv

[1] https://en.wikipedia.org/wiki/Gzip

[2] https://en.wikipedia.org/wiki/DOT_(graph_description_languag...

[3] https://forum.graphviz.org/t/what-is-the-file-extension-for-...

[4] https://en.wikipedia.org/wiki/List_of_filename_extensions_(A... [4]

TYMorningCoffee··on Tell HN: Slack is having network issues in Threads and group DMs/channels
I had the same issues yesterday. However today, Slack says, "Slack is trying to connect."

Edit: restarting slack resolved the connection issue.

TYMorningCoffee··on High System Load with Low CPU Utilization on Linux? (2020)
How does pSnapper translate [kworker/6:99], [kworker/6:98], etc into the pattern (kworker/*:*)? I would like similar functionality for log analysis.

Edit: Nevermind. I skipped over the key paragraph here:

> By default, pSnapper replaces any digits in the task’s comm field before aggregating (the comm2 field would leave them intact). Now it’s easy to see that our extreme system load spike was caused by a large number of kworker kernel threads (with “root” as process owner). So this is not about some userland daemon running under root, but a kernel problem.

TYMorningCoffee··on W4 Games raises $8.5M to support Godot Engine growth
Could you profile it with windows perfview[1]?

[1] https://github.com/microsoft/perfview

TYMorningCoffee··on Achieving 5M persistent connections with Project Loom virtual threads
I was only able to get to 840,000 open connections with my experiment. My machine only has 8GB of memory. https://josephmate.github.io/2022-04-14-max-connections/

Is there anyway for the TCP connections share memory in kernel space? My experiment only uses two 8 byte buffers in userspace.

TYMorningCoffee··on Static analysis at GitHub
I didn't have to do anything and sourcegraph indexed my project: https://sourcegraph.com/github.com/josephmate/OdinCodeBrowse...

Are you taking about a self hosted or private repo? In that case, I am not familiar.

TYMorningCoffee··on Static analysis at GitHub
GitHub released a great java parser that I think is related to this work https://github.com/javaparser/javaparser

I'm also using that parser for a side project where developers can cross link their source code and host them statically: https://github.com/josephmate/OdinCodeBrowser#readme

← PreviousPage 2 of 3Next →