HNHacker News
TopNewBestAskShowJobs

mihaigalos

182 karma · joined February 14, 2020

submissionscomments
mihaigalos··on Carbon Language: An experimental successor to C++
As far as I'm concerned, C++ is there for legacy purposes only.

There are some nice frameworks and tools using it, sure. Yes, you are required to learn it if you are studying CS.

Any serious new development today is done using more modern languages such as Rust (i.e.: the linkerd service mesh proxy [1] for encrypted pod communication in a k8s cluster).

As even the Linux kernel is slowly transitioning to using Rust [2], it's only a matter of time before an inflection point is reached and it goes mainstream (if not already.)

[1] https://github.com/linkerd/linkerd2-proxy

[2] https://hackaday.com/2022/05/17/things-are-getting-rusty-in-...

mihaigalos··on UK pay falls at fastest rate on record as inflation hits
You could change cities, countries, continents. Yes, the prices are rising everywhere but rents in i.e. eastern Europe are 3-5x lower than in the west.
mihaigalos··on How I went about learning Rust
That's interesting. Would like to read about the solution more. Do you have a reference?
mihaigalos··on How I went about learning Rust
Wow, very nice! I didn't know that. I love how the language is evolving, it also now has generics.
mihaigalos··on How I went about learning Rust
Check out the discord article I posted in the original reply.

If I interpret the graphs correctly, I see:

Golang:

* baseline 20% cpu + spikes to 35% once the GC runs.

* response times of about 1ms + spikes up to 10ms.

Rust:

* baseline 12% cpu + flat, no spiking.

* response times of 20us + flat, no spiking (!).

In terms of scaling, I interpret the results in favor of Rust.

My reasoning is the more you run the GC, the bigger the penalty.

mihaigalos··on How I went about learning Rust
What are you looking for in the 2 languages? Here are some of my thoughts:

Golang

* Development speed: Golang wins by far. It's closer to Python in that regard, but with strong typing.

* Very nice multi-threading via Go routines and channels. Impressive semantics in simple syntax, requiring no synchronization mechanism on the user side.

* Large garbage collector penalty.

Rust

* Complete language with build system, crate, docs hosting.

* A lot more performance compared to Golang, on par with C++.

* Doctests (!).

* Slow to learn, slow to compile (probably not a deal-breaker, especially if you focus on microservices).

Concerning what would be a good usecase for Rust vs Golang, check this out:

https://discord.com/blog/why-discord-is-switching-from-go-to...

mihaigalos··on Surging supply and softening demand weigh on chipmakers
> the interesting question here is "why would they do that?"

* Unmonitored access to deep ocean waters for submarines.

* Shift world politics in their favor - unseat the US-led de-facto world order and replace it with a Chinese one.

The above are perfectly described in Ray Dalio's "Principles for Dealing with the Changing World Order".

He evaluates the probability of a war with China in the next 5-10 years at 35%.

Moreover, he argues the US itself is in Stage 5 of 6 of its Big Cycle, with stage 6 being insurrection/revolution.

mihaigalos··on Is Your Project Manager a Sith Lord? Three Ways to Find Out
The graphic in the article represents a Gantt chart implying a waterfall process. Nuff said.
mihaigalos··on V 0.3
Electron or Chrome are not the topic of this thread.

I also don't appreciate whataboutism, sorry.

mihaigalos··on V 0.3
V minor contributor here. My 2 cents: I do get the feeling claims were founded/solid but am not an expert on the subject.

Article's author citation related to V's version which got tested:

> I’ll be using the current version of V built from git which is 50ab2cfd1ae02d4f4280f38c60b8dbd17f7599f6.

To be perfectly fair to the language, for me, it was love at first sight. Syntax is beautiful.

If ever V reaches maturity (0 segfaults + addresses concerns raised in Reddit, HN and other sources such as ^), I would definitely prefer it to Golang, potentially even Rust.

Not to mention its future is secured if C projects are ported to V.

mihaigalos··on V 0.3
That was a rhetorical question, I am not implying you should do anything. Thank you for the transparency.
mihaigalos··on V 0.3
The community isn't too friendly, I'm sorry.

In the cited thread, I've deleted my contribution because of the tone of the discussion (passive-agressive know-it-alls with smirk emojis): https://github.com/vlang/v/discussions/7610#discussioncommen...

Is this how you welcome people to the community?

I enjoy V and contributed several PRs which got merged, but there's definitely an attitude problem there. I gave up contributions because of it.

mihaigalos··on V 0.3
I do think V is amazing and has a bright future. Thank you for putting time in it.

If I may, I still believe even 1 byte is a serious matter imho.

mihaigalos··on The Documentation Triangle, or, why code isn't self documenting
I have to disagree here.

Any fix should produce at least a test to guard against regressions of the bug it's trying to fix and encode the correct business logic.

The test name would then explain the why. The test variables present the story of the what. And finally, the API calls tell the story of how how.

mihaigalos··on The Documentation Triangle, or, why code isn't self documenting
> I find tests to be terrible usage documentation. Better than nothing to be sure, but compare compiler tests to a tutorial or example code for learning a programming language.

For example, Rust has documentation which is executed as tests (doctests). That way, when the code changes, the docs change automatically.

To your mocks counter-example: How exactly would you propose to do it otherwise? If you write down an example which works now, how would you guarantee it still works if i.e. you don't use mocks but a say, a real database, which you then change.

You would be in the case of 3 green parallel lines which are red and intersect. In a powerpoint/doc you can write whatever you want. Doesn't actually need to be true.

mihaigalos··on The Documentation Triangle, or, why code isn't self documenting
I see tests as documentation. They show you how to interact with a component and what the expected behavior should be. In BDD, you go one step further and write down a formal description of inputs and expected outputs.

Would agree that the higher level documentation (diagrams, process interaction, etc.) can be written down once the dust settles.

mihaigalos··on Write documentation first, then build
I see tests as executable documentation/specification. TDD reinforces that view.

i.e. rust even has the specification of parts of its functionality using asserts (in the docs):

https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#exa...

mihaigalos··on Everything Is Broken: Shipping Rust-Minidump at Mozilla
> Sure, you can write bad code in any language, but C and C++ are just bad languages.

Let's give them credit for what we've achieved using them. I would definitely pick Rust over C++ any time, I respect C++ for all the cool things it gave us.

mihaigalos··on What SRE Could Be
I particularly liked this article [1]. Certification is IMHO people selling just about anything as a silver bullet/snake oil.

There is no such magical solution, because one needs to adapt the Agile template to their organization's needs and that is where real skill is necessary.

[1] https://www.simplethread.com/agile-at-20-the-failed-rebellio...

mihaigalos··on What SRE Could Be
> I think this is the point where we're getting too serious about the discipline.

In my opinion, we are not serious enough. The role of the cited sysadmin is dying or dead in the modern company.

As an SRE, you are expected to directly contribute to the product to improve SLOs as well as several other dimensions you quoted (like user happiness).

I've personally performed code refactoring to reduce build job duration slowing down pipelines for _everybody_ in a component I was unfamiliar with. The code review was then performed by a code owner and the PR merged.

> The contracts define what kind of guarantees you have to give and on what timeline.

That's why you commit to ship product increments, not hard deadlines. See the failed launch of healthcare.gov, for example.

> How is SRE supposed to quantify if the users are happy?

The same way a dev would: review with stakeholders, "show-and-tell" where you collect feedback and improve your domain knowledge by focusing on the customer problem instead of your own vision of the solution.

> Or tell the devs how to design their apps to fail less often?

This is precisely why SREs would provide value by direct contribution.

> you literally end up an executive director of product.

We are all ambassadors of the product and can contribute past our designated "boundaries". That's what cross-functional is all about. No, you cannot make business decisions but if it is code, you have very high leverage.

> If we really want to make products that users are happy with, we need to teach executives how to achieve it, not SREs.

This has not happened yet and I suspect it never will.

> SREs shouldn't be driving the bus from the back row [..] Let's teach executives how to set everyone up to succeed [..].

Agreed. Do you have a concrete proposal? Without fundamental organizational change, this is impossible. Conway's law still applies, so does its inverse. Meaning you can break down silos (including at executive level) by migrating from component to cross-functional feature teams.

mihaigalos··on Ask HN: If Kubernetes is the solution, why are there so many DevOps jobs?
Spot on!
mihaigalos··on How to Store an SSH Key on a Yubikey
I backup everything directly to GitHub. I first encrypt/seal my passwords/files using a Yubikey+PIN then git push them.

Here's my take on the automation: https://github.com/mihaigalos/pass

mihaigalos··on The use of ‘class’ for things that should be simple free functions (2020)
I've had the pleasure of multiple trainings from Klaus Iglberger.

Here's a talk he gave concerning free functions at CPPCON'17 [1].

It's high-level enough to be understood by non-C++ devs and I believe it can be applied to any OO language.

[1] https://www.youtube.com/watch?v=zB_bhZCoX5M

mihaigalos··on Ask HN: Could you share the notes you took on a typical work day?
Sure. See this: https://github.com/mihaigalos/pass
mihaigalos··on Ask HN: Could you share the notes you took on a typical work day?
I'm keeping all my notes under source control in GitHub:

* notes from literature I read (articles, books, forums).

* code templates for easy starting of new projects.

* docker with tools I constantly use (including the window manager) - that way I can always have my setup anywhere on any OS.

* passwords (encrypted with YubiKey HW tokens + PIN via rage).

* interviews for candidates for our team.

* vacation destinations.

* ideeas for presents.

mihaigalos··on Everything with a battery should have an off switch
The trouble with a mechanical off switch is that you cannot easily / periodically turn it on, so it depends on your usecase.

AVR Picopower has been around for about 10y now. These devices dramatically drop power consumption to the point where batteries should last a very long time, definitely >1y, more like 3-5y.

The fact that modern devices drain a lot of juice is either sloppy SW design or sloppy HW design, since I believe the cost for microcontrollers is very similar.

mihaigalos··on The science behind ultrasonic motion sensing for Echo
Is this pet-friendly? Dogs can hear in excess of 50 kHz, the article states >=32 kHz carriers.
mihaigalos··on Show HN: Jira to Gitlab Issue Migration Tool
Is Jira still a thing in modern SW development?
mihaigalos··on Working Remotely? Pair SSH with Teleport
MITM certs are in place, yes. I suspected DNS lookup is denied, but that also works.

Not sure why my client is not connecting, if ssh is the outbound transport, perhaps it's because port 22 is blocked for non-network addresses?

mihaigalos··on Working Remotely? Pair SSH with Teleport
Most corporate networks won't allow you to open ports on your machine without approval. Solutions like tmate (awesome btw!) don't work because they're filtered.

I use tmux with a reverse ssh to a VM in our cloud and then a colleague can forward ssh to the VM.

← PreviousPage 3 of 4Next →