HNHacker News
TopNewBestAskShowJobs

w0utert

2,697 karma · joined September 20, 2011

submissionscomments
w0utert··on Farbfeld lossless image format: easy to parse, pipe, compress
PPM P6 probably wasn't "handmade" enough I guess :D
w0utert··on Apple unveils M1, its first system-on-a-chip for portable Mac computers
I like it as well, especially in applications like CLion/IntelliJ which have tons of keybindings I keep forgetting because they are different between Linux and macOS. The context-sensitive touch bar is actually very useful in these applications for things like rebuilding, changing targets, stepping through the debugger etc. without having to use the mouse.

There's a lot of things to complain about with Apple products, but if you ask me there's been enough touch bar bashing by now and people should just get over it. It's pretty useful in some situations, and IMO no real downsides, especially now that the esc key is a real physical key again. Why all the hate?

w0utert··on Covid vaccine: First ‘milestone’ vaccine offers 90% protection
>> because I'm pretty sure we already have something on order of 80+% protection without a vaccine

I think the way these studies are set up already accounts for that. In these trials they don't vaccinate just one group and then check how many people still got sick ('only 10% got sick so it 90% effective'), but instead they split the participants into a 'vaccinated' group and a 'placebo' group (double blind), then wait until X people in the total of all participants get sick, then compare how many of them got the vaccin and how many got the placebo. Since the total group is large, this should average out pretty much all variability in susceptibility to infection (assuming the participants are selected to include a wide range of attributes, of course).

I don't know how the maths work exactly but I think the 90% claim here means that if you take the vaccine you are 90% less likely to get sick from covid compared to someone else with comparable attributes.

w0utert··on Yet another alternative to floating-point numbers
Also very common in embedded systems that simply do not have any floating point capabilities at all. For my CS dissertation I had to implement part of an OpenGL pipeline on a VLIW DSP designed for video coding, and all it had was 32-bit integer ALU’s. Dealing with dynamic range was pretty much half of the total effort to map the reference code that used floating point to fixed point with mixed precision.
w0utert··on Google Sunsets Google Cloud Print
Stadia, probably >_<
w0utert··on Microsoft is letting employees work from home permanently
A policy like this is basically saying 'we only pay you as much as necessary to compete with your other employment options', which are currently still mostly those near where you are living.

If more companies allow remote work and they don't all do the same thing, this kind of 'geopay' policy will have to be abandoned.

But I agree it's completely backwards, you should be paid according to the value you create for the company, and nothing else.

w0utert··on Why the Arabic world turned away from science (2011)
I don't agree with your final conclusion, but I upvoted this regardless, because I think it is an interesting perspective that is worthwhile to philosophize on.

If the Covid-19 situation taught me anything, it would be that it's apparently very, very easy to convince the vast majority of the population they need behave, think and feel in some way, based on 'facts' and figures that are unproven, incomplete, out-of-context, or based on 'science' that is not or only barely amenable to empirical verification. We (the world) are doing so many things at once now to try to handle the pandemic, but my impression of all of it, is that we really have no idea what we are doing, what works and what doesn't, why things seem to be out of control, and (controversially) how bad it actually is in the grand scheme of things.

IMO science is most definitely not comparable to religion, but I will concede that -for most people- its role in their lives is very similar.

w0utert··on Bye-Bye, Apple
Agree, as far as 'I left Apple for reasons...' posts go, this one is very weak, there really is nothing in that article that is not irrelevant or trivially fixable. Even the 'things I miss' paragraph makes very little sense ('the fast browser', like Safari is in a special class of its own compared to browsers on other systems)?

IMO I think there have been way too many of these 'why I left Apple' posts, I don't see the point, they rarely add anything meaningful for anyone who hasn't already made up their mind and the discussion afterwards is always a repetition of the same tired anecdotes.

I'd guess anyone who doesn't like or need macOS is already running something else, and for those of use who still like macOS but also use other systems like myself it is trivially easy to run things in a VM so you can have the 'best of both worlds' (my opinion, YMMV).

w0utert··on Show HN: Chat bot powered by GPT-3
Interesting, I tried to simply ask it whether the service would filter any offensive content at all, but it seems totally unaware what 'offensive content' could even be:

Hey I'm here to answer your questions about Itemsy

Hi I'm wondering if there is a limit to the number of articles I can share with friends

There is no limit.

Do you perform any filtering on offensive content?

I'm sorry, I didn't get that. Could you please try again?

What if I try to share something that is offensive to some people?

I'm sorry, I didn't get that. Could you say that again?

So you can share content with other users with this service, correct?

Yes, you can share content with other users.

Ok, so, do you know the meaning of the word 'offensive'

I'm not sure what you mean. But I'm happy to tell you more about Itemsy.

Ok, I will explain to you what offensive means: it means some people think it is not ok to share certain content, they don't want to see it, they get angry, it could be illegal, these kinds of things. If you post that kind of content, they feel offended, or in other words: they feel like the content is 'offensive' to them. Do you know understand what I mean by 'offensive content'?

I'm not sure what you mean. Shall we chat about Itemsy a bit more?

no thanks this is not going anywhere

I'm sorry to hear that.

Me too, do you have any tips for dinner?

I'm not sure what you mean. But I'm happy to tell you more about Itemsy.

Pretty useless and hardly impressive IMO...

w0utert··on Static Linking Considered Harmful (2004)
The not-so-funny part is that it would probably be about the same effort to do that compared to convincing everybody to use shared linking for these kinds of things >_<
w0utert··on Static Linking Considered Harmful (2004)
Aha got it, thanks! Like you said it’s not pretty but it works, and somewhat better than the abomination they came up with instead, which involved building only the minimal part that depended on the new Lua 5.2 as shared library, then making fake shared libraries for all remaining unsatisfied symbols referenced from it to trick the linker, and compiling them in statically instead like they used to do before. Hard to explain, don’t ask me why they did it... :-/

Edit: there is one pretty glaring downside to this approach though, which is that both the component we need to patch up with renamed symbols and the liblua.a are also used in other places, so they would either have to be built differently depending on the application, or we would have to maintain multiple versions of the same 5.0 liblua.a and change the build config/detect logic, for even more confusion and ugliness >_<

w0utert··on Static Linking Considered Harmful (2004)
I’m not sure I understand how this would help? When linking the main application there will be two component .a files linked into it, that both contain references to symbols that should be resolved to something in a liblua.a, so that needs to be linked along as well, but one component needs to resolve them to liblua.a from Lua 5.2, the other to liblua.a from 5.0. Most (but not all) of the Lua symbols from both versions have the same names. How can objcopy resolve this? Multi-pass linking or something like that?
w0utert··on Static Linking Considered Harmful (2004)
Didn't see one of the IMO biggest downsides of static linking in that list, which is that there is no sane way to prevent symbol clashes if different components of your application need different versions of the same dependency.

When using shared linking dynamic libraries can link some of their dependencies statically into the .so, using strictly local symbols, allowing the application to load it even if it already links some other version of the same dependency.

We had this problem at my workplace where we developed a component that needed to embed a relatively modern version of the Lua interpreter. When the team that developed the application that used our component tried to link it, they found out that some ancient component they also had been linking in for some completely different and unrelated purpose had a transitive dependency on Lua 5.0, released almost 20 years ago. For backwards compatibility reasons it was not an option to modify the old component to use the newer Lua version, and linking both Lua versions statically into the same binary is impossible. This would never have been a problem if we could have shipped our component as a shared library (which we already build and use for other internal applications), because there the Lua interpreter could have been linked into the shared library privately.

w0utert··on Windows XP source code has leaked
Totally my experience as well, Windows 2000 really was the only Windows version I actually liked, it had very few faults for its time. Windows 7 probably comes second.

What I remember from XP is that it took until SP2 before all the problems were worked out, and SP3 actually introduced more annoyances in the name of security. I also think the default theme and general visual style of the XP is downright terrible and completely unworthy of a large professional company like Microsoft. The very first thing I always did was to switch back to the classic UI for everything (theme, start menu, all control panels, etc).

I don't care for any of the 'modern' Windows versions. They work, behind the scenes the technology has improved, but I they still annoy me in many ways, and the UI is IMO the worst it has ever been in the history of Windows. It looks cleaner but behind the veneer its just a giant heap of historical accidents piled on over the years, with no consistent direction of vision to be found. I get no joy using it, but I guess if you are used to working in Windows the OS is perfectly fine for what it does.

w0utert··on CadQuery: A Python parametric CAD scripting framework based on OCCT
I’m not super familiar with the FreeCAD file format internals, but I assume it implements history using Open CASCADE API’s, in an application specific format. We have some internally developed CAD tooling based on Open CASCADE that uses the OCAF framework to store history inside a custom container format. Any code that links OCCT can in theory get the contents of the container using API calls, but to interpret it, you would have to write a lot of application specific logic on top of that (we wrote our own wrapper API’s around that to expose the file format to e.g. scripts etc)
w0utert··on CadQuery: A Python parametric CAD scripting framework based on OCCT
>> STL (and .OBJ) are common exchange formats for mesh output. For solids, which FreeCAD and OpenCASCADE mostly deals in, the typical exchange formats would be STEP (and IGES).

Ah yes I meant STEP instead of STL of course, always mix those up. OCCT does not even have support for STL or OBJ import/export.

w0utert··on CadQuery: A Python parametric CAD scripting framework based on OCCT
Open CASCADE is the geometry kernel that does all the heavy lifting (all the geometry related operations and mathematics etc). FreeCAD is a primarily a user interface plus Python script bindings around this kernel. CadQuery implements a Python-based scripting DSL around Open CASCADE to let you build models using code.

File formats between these tools do not necessarily have to be compatible. Open CASCADE ships with exporters for a small number of common CAD file formats, STL being the one that is compatible with most other CAD tools. It also has it's own format for exporting just the geometry (.brep files), and the API provides storage facilities for building your own application-specific container formats (OCAF). I think FreeCAD uses OCAF to implement its native file format.

I know FreeCAD can import/export STL using Open CASCADE, so that's one way transfer models from/to other CAD tools, I would not be surprised of CadQuery can also do this (but I haven't used it so I can't say for sure).

w0utert··on Bill Gates made his fortune through sheer robber-baronry
>> This sounds like what Apple is doing right now and everyone keeps defending it when it actual fact it's even worse

What is it exactly that Apple is doing that you are referring to (I honestly don’t know)?

w0utert··on Modern C
>> I'm one of those, but in your defense I think we need to maintain a very high bar for "self explanatory".

I put 'self explanatory' in square quotes exactly because of that, at the time of writing the code many things may seem self explanatory for the person writing it, but even seemingly simple things can be very confusing for people who read the code for the first time. But obviously I'm not advocating comments that simply describe in words what the next line of code does mechanically, those are useless. But I do like comments that break up the algorithm in sections that are clearly marked by comments, even if some parts of those comments may seem trivial ('loop over all objects of type x and process those with property y', etc). For me the value is in being able to read the comments first and get an idea of the structure of the code and the though process behind it, before actually having to interpret the code itself.

>> At the same time, I think it's important to be aware that comments not immediately adjacent to what they describe are usually not visible in code review [..] I'm curious if you have any particular mechanisms for addressing the above?

Not really. In our team we don't really use code review tools for feedback about algorithms or higher level design of the code, my experience they are pretty awful for that anyway. We use bitbucket primarily to point out local improvements and ask questions why sections where added or changed, but for higher-level discussion we prefer offline tools like whiteboarding, and rotating people so everyone works on different parts of the codebase.

w0utert··on Modern C
Totally agree, I went through some of the code in his GitHub repo and it’s a joy to read through, making it clear what everything is for, how and why it works, which is rare especially for plain C.

I try to comment my code in a similar way, often ending up with up to 30% comment to code ratio. I know some (many?) people are very dismissive of this style and reject the idea you have to write any comments where the code is ‘self explanatory’, but I don’t care. It doesn’t take me a lot of extra time to document the general idea behind a piece of code and it makes my future life and that of other devs reading the code so much easier it’s easily worth the effort to write these comments and keep them up to date.

Like I said it’s rare to see OSS code written that way though, I’ve even thought on multiple occasions that some projects actively strip all code comments automatically for whatever reason, considering the total absence of any form of code documentation in them.

w0utert··on Netflix is now doing per-shot encoding for UHD content
So if I understand correctly, using this device you can e.g. hook up a HDMI 2.1 device directly to a HDMI 2.1 TV, then pass the audio through an eARC port to the device, which then outputs a normal HDMI signal with full audio support (including Dolby Atmos) you can plug into a HDMI 2.0 receiver that has no eARC or HDMI 2.1 support?

If that’s how it works that would be awesome as I bought an expensive 11.2 receiver not long ago, but when the new consoles are out I want to have VRR and ALLM, which means HDMI 2.1, which means it has to go straight into the TV, which means I would lose Dolby Atmos (assuming PS5 will support it of course, but that seems pretty likely)

w0utert··on Airbus pilot tries Microsoft Flight Simulator [video]
That’s funny to read, I took my first flying lesson a few weeks ago and had the exact same problem flying over completely flat terrain. I have some simulator experience which made me look at the instruments way too much, the instructor had to remind me continuously to stop doing that and look outside instead.
w0utert··on But I was helping the compiler
It would not break, but it’s still a logical fallacy to std::move something returned by value, no? Or is there a valid use case here?

I strictly use std::move in case of explicit transfer of ownership, and not to try to outsmart the compiler to ‘optimize’ something. As the article shows the compiler is smart enough to do all this by itself, it doesn’t need to be told to try to elide copies. But maybe I’m missing some valid use case where it would make sense to add the std::move in these kinds of situations?

w0utert··on But I was helping the compiler
Yes that was what I was thinking as well, std::move on the return value of a function that returns some private member by value makes no sense (someone please correct me if I’m mistaken here).

In the example in the article, the compiler may be able to perform all kinds of optimizations for example because the result is assigned to a const lvalue, and depending on the rest of the code in that function (which is not shown) it may be able to infer the assigned variable can never be aliased, so that’s one possible reason why the disassembly may be surprising. The C++ specification only prescribes how code should behave but it explicitly does not put restrictions how the compiler achieves that effect, to the point whole functions might be completely absent in the produced binary and replaced by a constant if it's possible to calculate the result of every invocation at compile time.

w0utert··on Conventional Commits
If you do this for short-lived feature branches only, why do you even need to squash merge for this? What I typically do for such things is to have a WIP commit that I amend and force push while working on the feature, then when everything is ready to merge I reset —-soft and make separate commits for each part of the work that can be compiled and tested indivually, rebase onto master and then fast-forward merge.
w0utert··on Vertigo – a public domain 3D flight simulator (2003)
Makes me wonder, ho does one start to build a serious flight simulator? Is there any publicly available resources about implementation techniques and pitfalls specific to flight simulators, like there are for so many other topics, so you don't have to learn everything the hard way, make all the obvious mistakes, etc? Or is this a topic where you can really work from first principles, using just basic physics and incrementally adding simulation of more advanced effects?
w0utert··on Direct evidence for T-cell immunity as a factor behind Covid-19 heterogeneity
One of the theories is that the density of the ACE2 receptor the virus binds to, is somehow correlated with testosterone levels, which is very low for young children, and low for women compared to men. This would provide an explanation why severe cases are extremely rare in young children, and comparatively high for men vs. women.
w0utert··on SIMD Everywhere: 0.5.0
Not sure how many cloud vendors are running CPU's with AVX-512 support, but I imagine that if they do you either have to pay for exclusive use of a single CPU (all cores), or thath they indeed disable AVX-512 instructions by patching the cpuid flags?

Note that the downclocking is only really a problem with AVX-512 and much less so with AVX2 and (AFAIK) not at all with AVX.

w0utert··on Swedish epidemiology boss says questioned Covid-19 strategy seems to be working
>> Sweden is still far away from herd immunity

The point this guy is trying to make is that Sweden appears to be quite close to herd immunity, considering both infections and deaths are apparently declining by itself now. What makes you think this is impossible?

w0utert··on German court bans Tesla ad statements related to autonomous driving
Not saying that Tesla makes bad cars or that electric vehicles are not the future, but you have to realise that the things you mention are not necessarily things everyone cares about or even appreciates. For many people all Tesla cars are way out of their budget for example, or not big enough, or they don't like the interior finish, or they actually enjoy the sound of a powerful ICE, or they don't like longer charging times and need/want longer range, or they like to be able to work on their own cars or take them to their preferred repair shop for maintenance, or they have a brand affinity and want to wait for an electric model of their favoured manufacturer, etc.

Even in spite of all the good things about Tesla's, the list of reasons people could have to not want buy a Tesla is endless.

This is not even considering the fact that some people (myself included) won't even consider a Tesla just for Musk's antics alone.

← PreviousPage 3 of 26Next →