Better HN
topnewbestaskshowjobs
Log inSign up

mathiasgredal

93 karma · joined May 23, 2020 (6y ago) · 55 submissions

Submissions

comment 2w ago · link · parent

I had always imagined a system of autonomous submarines that function as tugboats along popular routes and then container ships would just function as barges that are hauled by these autonomous submarines. These submarines recharge their batteries automatically by docking to underwater charging stations.

comment 1y ago · link · parent

Not exactly related to Ruby on Rails, but why doesn’t there exist a way to run a Python TKinter app in the browser using WASM?

I have a medium sized dependency-free TKinter program written in Python, and AFAIK there is no way to run it in the browser.

comment 2y ago · link · parent

In a society where the abuse of human labour was factored into the cost of the product, the 8-inch fab line would have been shut down, since the cost of the 8-inch wafers would now be prohibitive and not be competitive with the wafers from the 12-inch line. This in-turn would mean that customers would have to switch over to the 12-inch wafers.

We are not supposed to compete on who can abuse their workers the most to improve efficiency and to cut costs. Thankfully, knowledge work does not seem to scale the same way as manual labour, meaning that more abuse of the workers does not mean more output over the long-term.

comment 2y ago · link · parent

We have a replacement for CUDA, it is called C++17 parallel algorithms. It has vendor support for running on the GPU by Intel, AMD and NVIDIA and will also run on all your cores on the CPU. It uses the GPU vendors compiler to convert your C++ to something that can natively run on the GPU. With unified memory support, it becomes very fast to run computations on heap allocated memory using the GPU, but implementations also support non-unified memory

Vendor support:

- https://www.intel.com/content/www/us/en/developer/articles/g...

- https://rocm.blogs.amd.com/software-tools-optimization/hipst...

- https://docs.nvidia.com/hpc-sdk/archive/20.7/pdf/hpc207c++_p...

comment 2y ago · link · parent

Having looked briefly at the code I still think C++17 parallel algorithms are more ergonomic compared to OpenMP: https://rocm.blogs.amd.com/software-tools-optimization/hipst...

comment 2y ago · link · parent

GPGPU programming seems to be in a really good spot with the widespread adoption of C++17 parallel algorithms by GPU vendors.

Now, I can just program against this API using standard C++ code, that interacts with CPU heap allocated memory, and get really performant computation on it using standard map-filter-reduce semantics.

7.

C++17 Parallel Algorithms and Hipstdpar(rocm.blogs.amd.com ↗)

8 points · by mathiasgredal · 2y ago · 1 comment

comment 2y ago · link · parent

Which begs the question, if attractiveness is such a big predictor of success, why hasn’t everyone evolved to become very attractive? The evolutionary pressure for increased attractiveness should be very high, since it affects so many areas of your life, from career success, to getting partners etc.

Is it that the speed at which we evolve to become more attractive is superseeded by our ability to become better at discriminating for attractiveness?

comment 2y ago · link · parent

That was why OP suggested to have 2 motors on each joint, going in opposite direction. The problem with this is that you now have twice the amount of motors.

comment 2y ago · link · parent

Just use bsdtar, which will convert a tar archive to cpio: https://unix.stackexchange.com/a/581014

I have used it to convert docker images to Linux bootable initramfs archives for Rpi4.

comment 2y ago · link · parent

If you are already using gRPC in your codebase, then you can define your enums with Protobuf, which does much of the same as the tool shown in this article.

comment 2y ago · link · parent

Looks like great changes overall. Sadly they haven’t added columns to Dolphin, which is my only complaint from switching to KDE from macOS.

comment 2y ago · link · parent

You can get an S2 mini dev board for a $1 including shipping[1, 2]

[1]: https://imgur.com/HUt2qLY [2]: https://www.aliexpress.us/item/3256804697715980.html?

comment 2y ago · link · parent

Not possible, unless you want to do it using an emulator and external memory. The lowest you can go for Linux is probably an ESP32:

https://web.archive.org/web/20230515075935/http://wiki.osll....

https://github.com/jcmvbkbc/linux-xtensa/commits/xtensa-6.4-...

comment 2y ago · link · parent

Well, if I found an unpatchable zero-click RCE exploit on an iPhone, then that would have a major effect on the stockprice when the news is announced. It definitely seems like it would be insider trading if i used that knowledge to do options trading.

comment 2y ago · link · parent

Yeah, but regular package binaries get nuked pretty quickly to make space for new ones, especially on mirrors.

comment 2y ago · link · parent

Sure, but how useful is that when you can’t install any packages, since the package repositories only host packages for supported versions.

When a distro goes EOL, the package repositories typically move to the next supported version and delete all of the old packages.

comment 2y ago · link · parent

Could someone enlighten me on how one goes about testing whether a particular crypto implementation is vulnerable to side-channel attacks?

In high school I implemented a basic ECDH key exchange algorithm, which I compiled to WASM, and it can be tested at the bottom of my blog: https://gredal.dev/projects/elliptic-curves

Using only the WASM blob, without looking at the source code for exploits, how would Alice find Bobs private key?

comment 2y ago · link · parent

Just because a compiler cannot prove whether or not a given set of C/C++ is safe, doesn’t mean that an expert in the language can’t write safe C++ and prove that it is actually safe.

comment 2y ago · link · parent

Why not just tax stock buybacks the same or higher than regular profits? This would force companies to either increase R&D/CAPEX spending or lower prices.

comment 2y ago · link · parent

Will C++17 parallel algorithms be supported?

https://on-demand.gputechconf.com/supercomputing/2019/pdf/sc...

Edit: Nevermind, I think I have misunderstood the purpose of this project. I thought it was a CUDA competitor, but it seems like it is just a shading language compiler for graphics.

comment 2y ago · link · parent

I know, but the fact that people can’t even tolerate the inconvenience of an EV gives little hope for public transport, car sharing, bicycles etc.

comment 2y ago · link · parent

Yeah, people here don’t seem to realize that burning fossil fuels is the primary driver(~90% of CO2 emission) of global warming: https://www.un.org/en/climatechange/science/causes-effects-c...

Still they can’t be inconvenienced the slightest by driving an EV, even though they have a much lower carbon footprint: https://lutpub.lut.fi/bitstream/handle/10024/163938/Kandidaa... (see figure 4)

I reality we could do much better than EV’s, since their production still has a large impact on the environment, and we should instead be focusing on cycling or using public transport, instead of driving everywhere.

I don’t have much hope for this, given what I see here.

comment 2y ago · link · parent

What prevents Apple from just integrating MacFUSE(or a reimplementation) into the their kernel, and then shipping it with the next release?

comment 2y ago · link · parent

I have done this, but for some reason Android SDK has to be weird, so you have to download the SDK seperately and then create a properties file in to root of the project with the path to the Android SDK. Everyone then also has to have their own version of this file, since the path is likely different. You also have to make sure that everyone downloads the same version of the SDK. (also the path to the SDK cannot have any spaces)

Why can it not be like other Gradle dependencies, where Gradle will just download the files automatically?

comment 2y ago · link · parent

Unless you want functioning airbags: https://www.euronews.com/business/2023/12/21/toyota-calls-ba...

comment 2y ago · link · parent

Why is this better than an arena style allocator?

comment 2y ago · link · parent

I get that there is a tradeoff with code density, although if you could have an encoding scheme or extended register mode to alleviate this. I was just thinking that if you have e.g a loop where you run out of registers, since you only have 16, then the compiler will swap the values to memory and reuse that register which creates an instruction dependency that doesnt really have to exist.

If the compiler could use the hidden registers, then the cpu would know that it could run this instruction ahead of time.

It is probably not worth it, since it adds a lot of complexity to an already complex system, which is why it isn’t done.

comment 2y ago · link · parent

Sure, but wouldn’t it make sense to extend the instruction set to allow the compiler to use these registers instead of reserving them for speculative / out-of-order execution? It was just a thought i had after watching a talk by a compiler guy: https://youtu.be/2EWejmkKlxs?feature=shared&t=2409

comment 2y ago · link · parent

I thought modern speculative cpu’s had way more registers than you can normally access. Why does it reserve these registers for speculative execution instead of exposing them to the program if it needs them?
12