HNHacker News
TopNewBestAskShowJobs

mschwaig

298 karma · joined January 22, 2015

submissionscomments
mschwaig··on Show HN: Beat my tank through strategy and programming
If you are viewing this on mobile you can go to the README.md file to see some text with pictures:

https://github.com/huangyz0918/TankLogo/blob/master/README.m...

mschwaig··on Porting C to Rust
> A lot of these complaints are just, well, it’s called Progress. If we designed the C in 2018 and made it so we actually wanted to use it, then it would look very different. Probably a lot like Nim or Swift. I think that’s still a niche that is currently unfilled; a modern, powerful language that doesn’t try to provide the same guarantees as Rust and so can be much more minimalist.

I think zig is quite a good candidate to fill that niche. It is very compatible with C, but it offers meaningful improvements while still being very picky about what goes into the language.

mschwaig··on Raytracing a Black Hole
AFAICT the parent comment is referring to Double Negative (dneg). The visual effects company responsible for the black hole shots in the movie Interstellar.
mschwaig··on LiteTree: SQLite with Branches
I first read this as IMDd for Internet Movie Database and got confused, but probably you mean LMDB for Lightning Memory-Mapped Database, which makes much more sense. :)
mschwaig··on The dream of driverless cars is dying
I watched some of the progress updates that you posted on youtube for that project and I was amazed by what you could acheive at home with a powerful GPU and publicly available software.

Here's the playlist with all of those videos if anyone else is interested: https://www.youtube.com/playlist?list=PLQVvvaa0QuDeETZEOy4Vd...

mschwaig··on Zig: programming language designed for robustness optimality and clarity [video]
Rust has lifetimes and ownership as language concepts so that you have to be explicit about who owns a resource, for example memory, but it does not give you a lot of control about what to do when an allocation fails.

Zig is designed so that you can still peogrammatically deal with a failing allocation, as does well-written C, but it does not have a ownership system like Rust.

mschwaig··on EFail – Vulnerabilities in end-to-end encryption technologies OpenPGP and S/MIME
Both is an about euqally difficult problem, but modes that require a nonce fail much more spectacularly than modes that require an IV.

Typically with a re-used IV the same plain text will lead to the same cipher text, which can be an issue.

On the other hand with a re-used nonce you can basically recover the xor of two plain texts from two cipher texts. This leads to plain text very quickly and is a much more serious issue.

mschwaig··on A guide to better embedded C++
I think the syntax is not too far off from C.

I am not affiliated with the project, only supporing it on Patreon, so I cannot speak about the designer's intentions with Zig specifically.

Generally in language design, if something works the same way as in other languages, that's great. You can re-use the keywords/syntax and build on peoples prior knowledge. However if you have some feature that actually works quite a bit differently from other languages the syntax should probably be different. Otherwise people might feel at home right away on a superficial level, but actually get bitten by the surprising ways in which the new thing works differently to the one they are used to later.

mschwaig··on A guide to better embedded C++
I picked C over C++ in an quasi-embedded environment given we would have a team with highly variable C/C++ skills.

I was worried people would get too fancy with C++. Probably it would have been fine if we would have taken away most of the language.

It turns out the problem with C in that setting was that good C code seems to require a lot of ceremony and conventions for things like error handling and modularity.

I hope that Zig (https://ziglang.org) will become a viable alternative in that space. It's quite a small language, more comparable to C than to C++ or Rust. It's meant to result in similar LLVM bitcode as well-written C, while being highly compatible with C and and giving you some extra safety guarantess over C as well.

mschwaig··on Please Stop Using Adblock (But Not Why You Think)
Maybe you mean Brave. That's a browser that blocks ads, bit pays out bitcoin to site owners. I found this one today while researching.
mschwaig··on Please Stop Using Adblock (But Not Why You Think)
I remember reading about some project where as a user you would automatically take part in the bidding process for ad placement on the websites you yourself visited.

The idea was to outbid real ad networks and serve yourself bogus no-op ads while paying the websites you visited through their usual channels.

Does anyone remember reading about this as as well? What happened to that project?

mschwaig··on 7-Zip: From Uninitialized Memory to Remote Code Execution
Windows is special here because Microsoft never properly solved the distribution problem for software.

If you want the typical user on Windows to run updated software, your software has to at least entice updating if not auto-update straight away.

Not solving this whole distribution mess is by far the worst downside of Windows as a platform. Not getting malware when installing software on your Windows PC is hard.

mschwaig··on Ask HN: Why would you choose Rust over Go or Node?
I would like to add that a Ruby or Node developer might very well want to rewrite some performance-critical service in Rust, which the strict language enables them to do without shooting themselves in the foot too much.
mschwaig··on Ask HN: Why would you choose Rust over Go or Node?
Rust puts you very close to the metal, which can be great for writing high performance code, while forcing you to be very explicit about how you use memory.

This is great if memory managment and high performance are a big concern for you, if they are not you might want to choose a language like Go or Node which allow you to gloss over such details until they really become an issue.

Do not fix problems you do not have by throwing Rust at them, but feel free make the climb of learning it to expand you horizon. :)

mschwaig··on Tesla owner almost crashes on video trying to recreate fatal Autopilot accident
An autopilot does not have to outperform a human driver in every imaginable situation as long as we make smart tradeoffs regarding what the machine can and cannot deal with and there are still significant advantages over humans in the managable common case.

There may not be a solution in sight for making robots deal with badly marked roads for example, but we might be able to just sidestep the problem with better road markings or more conservative handover-to-human protocols in areas with improperly marked roads.

mschwaig··on Making network authentication simple in a Bring Your Own Device environment
Can you elaborate why not?
mschwaig··on Open-source clone of the Age of Empires II engine
Sure, I know, but the parent poster complained about how Steam was a terrible thing about the HD version. I wanted to know if it creates practical problems if you want to mess with a game that has Steam integration.

Probably that was too far off topic by me.

mschwaig··on Ask HN: Good resources about legacy code?
It's funny how you can write something terrible now and put it into production anyways, skipping the process of slow but steady degradation altogether. BAM! Instant legacy code.
mschwaig··on Open-source clone of the Age of Empires II engine
I had a look at some .NET code integrating steam once and the integration itself looked quite clean and lightweight.

I'd be interested if people got banned or something like that for modifying games when they were clearly not hacking/cheating/cracking/impacting the experience of others.

From DSfix for Dark Souls I know that it can be fine with them if you hook function calls to improve rendering for example.

I imagine you also have to distinguish between Steam and VAC (anti-cheat) integration.

mschwaig··on Google retires the Pixel C tablet as it shifts focus to the Pixelbook
I did the same thing. Totally agree with your comment.

The glass back is ridiculously impractical and makes the Tab4 8 Plus slip down from furniture a lot.

If anyone wants to get that tablet make sure to get some sort of case for it. Otherwise it's a decent device and Android feels very close to stock except for a few unnecessary Lenovo apps you can't remove and the software update app which seems to be customized unnecessarily and a little poorly as well.

mschwaig··on The sunk cost fallacy: Devs describe how it almost destroyed them
But how could they stop when they knew it could probably be half a milimeter thinner! :O
mschwaig··on Excel team considering Python as scripting language: asking for feedback
So when I google how to do something in Python I will have to comb through solutions specific to v2, v3 and now also Excel? ;)

Aside from that it sounds like a cool idea.

mschwaig··on A CMS with no server and 18 lines of configuration
I guess this is also ok with GitHubs TOS since you eventually use their built-in features for static site generation to serve your content instead of abusing the Repo itself as a CMS.

Is that right?

mschwaig··on LineageOS for microG – Access Google services without closed software
Someone built a location API or crypto API or whatever so that apps can use that data.

If there is a permission that violates the trust between the system and an app using aforementioned APIs all bets are off. This is similar to why rooted devices are bad for security.

mschwaig··on Project Jigsaw: Complete
Sure you can use shading to move everything you don't want in your public API into some other package, or you can use something like ProGuard to obfuscate everything but your intentional public API. However those things will still be public.

The only way to not have those things visible for the user of your library is to only use one package in your implementation.

mschwaig··on Project Jigsaw: Complete
The biggest pain for me was that it felt like there was no good way to create a library with some internal structure in the form of packages without exposing parts of your internal implementation as public.

When Jigsaw was delayed I was playing with the idea to create a project called shitty-jigsaw, which would just merge all of the packages in a module and change the access modifiers to be more restrictive according to some module definition.

mschwaig··on What Is Space?
I'm reading the whole book right now and the chapter after the one from the article is about time and goes more into spacetime according to relativity.

So far it seems to me that they sometimes provide an oversimplified analogy which they revise in a later chapter.

mschwaig··on Accidentally destroyed production database on first day of a job
You can be inept WHILE covering your ass. I'm not saying he's a genius.
mschwaig··on Accidentally destroyed production database on first day of a job
He might be inept, but in this instance the CTO is mainly just covering his own ass.
mschwaig··on The beginning of Git supporting other hash algorithms
On the other hand a hash function that works well in all scenarios that constitute a theoretically sound use of a cryptographic hash function is infinitely harder to misuse.
← PreviousPage 3 of 5Next →