Readit News logoReadit News
mathiasgredal commented on Run Ruby on Rails in the browser using WebAssembly   web.dev/blog/ruby-on-rail... · Posted by u/danielwetan
mathiasgredal · a year ago
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.

mathiasgredal commented on Women who make Samsung semiconductors are striking   english.hani.co.kr/arti/e... · Posted by u/eric__cartman
hbogert · 2 years ago
This is one of the reasons I'm pessimistic that intel will regain the Fab crown. How can you compete with this?
mathiasgredal · 2 years ago
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.

mathiasgredal commented on Bend: a high-level language that runs on GPUs (via HVM2)   github.com/HigherOrderCO/... · Posted by u/LightMachine
klabb3 · 2 years ago
This is very exciting. I don’t have any GPU background, but I have been worrying a lot about CUDA cementating itself in the ecosystem. Here devs don’t need CUDA directly which would help decoupling the ecosystem from cynical mega corps, always good! Anyway enough politics..

Tried to see what the language is like beyond hello world and found the guide[1]. It looks like a Python and quacks like a Haskell? For instance, variables are immutable, and tree-like divide and conquer data structures/algorithms are promoted for getting good results. That makes sense I guess! I’m not surprised to see a functional core, but I’m surprised to see the pythonic frontend, not that it matters much. I must say I highly doubt that it will make it much easier for Python devs to learn Bend though, although I don’t know if that’s the goal.

What are some challenges in programming with these kind of restrictions in practice? Also, is there good FFI options?

[1]: https://github.com/HigherOrderCO/bend/blob/main/GUIDE.md

mathiasgredal · 2 years ago
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...

mathiasgredal commented on Porting HPC Applications to AMD Instinct MI300A Using Unified Memory and OpenMP   arxiv.org/abs/2405.00436... · Posted by u/arcanus
mathiasgredal · 2 years ago
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...
mathiasgredal commented on C++17 Parallel Algorithms and Hipstdpar   rocm.blogs.amd.com/softwa... · Posted by u/mathiasgredal
mathiasgredal · 2 years ago
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.

mathiasgredal commented on Physically attractive attorneys tend to have greater success in federal court   psypost.org/physically-at... · Posted by u/bookofjoe
bicijay · 2 years ago
Physically attractive people tend to have greater success in life.
mathiasgredal · 2 years ago
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?

mathiasgredal commented on Low Cost Robot Arm   github.com/AlexanderKoch-... · Posted by u/pbrowne011
Gracana · 2 years ago
The problem with backlash comes into play when the direction of force on an axis changes. If you are applying force in one direction and all the backlash has been taken up, everything is fine -- any force you apply or movement you make will be transmitted to the tool like you'd expect. However, if you have to decelerate, or you've gone over-center, or the tool/load pulls harder than you're pushing, now you have to apply force in the other direction, which you can't do until you take up the backlash.

If your axis has high enough friction, then nothing will move when your actuator is in the decoupled backlash region, so you can compensate by adding the backlash amount to your target position whenever you switch directions. But that means you need more friction than tool force, with bigger motors and drivetrain to compensate. It's often easier just to build a system with zero backlash, then you can focus on tuning for system rigidity/resonance (as shown in your link).

mathiasgredal · 2 years ago
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.
mathiasgredal commented on Build Initramfs Rootless   blog.izissise.net/posts/i... · Posted by u/todsacerdoti
mathiasgredal · 2 years ago
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.

mathiasgredal commented on Go Enums Suck   zarl.dev/articles/enums... · Posted by u/pionar
mathiasgredal · 2 years ago
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.

u/mathiasgredal

KarmaCake day93May 23, 2020View Original