HNHacker News
TopNewBestAskShowJobs

pca006132

634 karma · joined February 7, 2021

submissionscomments
pca006132··on Testing AMD's Giant MI300X
why not infinite brains so you can have more computational power than these GPUs?
pca006132··on CADmium: A local-first CAD program built for the browser
Yeah, triangle mesh library and NURBS are very different, they do different things. Interesting to know that the solvespace folks wanted to try integrating manifold. Feel free to open an issue or discussion if needed, there were many changes as manifold was actively developed and gaining more users.

I am also interested in having a simple constraint solver for some kind of constructive geometry useful for CAD modeling, but not necessarily a full-fledged NURBS kernel. I think it can be interesting for text-based modeling, probably similar to some of the CadQuery APIs.

pca006132··on 2023 ACM Turing Prize awarded to Avi Wigderson
Yeah randomization in algorithms and crypto serve different purpose. But overall introducing randomness can allow you to do amazing things that deterministic algorithm/schemes cannot do.
pca006132··on Open source pioneer Perens says it's time to contemplate a post-open world
Don't see how this can work. How would you encourage collaboration between projects when they are kind of competing for resources? How to track the 'contribution' of certain projects?

Some projects may be more important to some and less important to the others, does it mean they need to pay a subscription plus a donation to support that a specific project?

And it feels like this will become a paywall, like those academic publishers, with most of the money going to 'administrative fees' as well as legal fees.

pca006132··on 2023 ACM Turing Prize awarded to Avi Wigderson
No, there are complexity classes for random algorithms. And randomness is also crucial for some cryptographic protocols, typically you want to show that the probability the adversary can do what they want is very slim, e.g. 2^-n for some large n.
pca006132··on Brain waves appear to wash out waste during sleep in mice
Never knew this before! Thanks for sharing.
pca006132··on Brain waves appear to wash out waste during sleep in mice
If I understand correctly, for most publishers you are allowed to host a copy on your personal web as well as the university library catalog?
pca006132··on Better PC cooling with Python and Grafana
but it isn't hard to add thermocouples to a heatsink? perhaps the reason for not doing this is because the improvement is not visible in standard benchmarks? it is not improving the overall performance, not reducing the peak noise, just make the transition smoother...
pca006132··on Mercury – Compiler optimized, private Firefox fork
But Firefox can already do LTO and PGO? I thought that firefox let the underlying cryptography library do its work, and those are already using AVX and AES as well.
pca006132··on Ask HN: How can I learn about performance optimization?
Well I don't intend to mean they are the same, but optimization to improve the latency can often improve throughput as well. Whatever...
pca006132··on Ask HN: How can I learn about performance optimization?
Performance optimization covers a lot of topics, it depends on what you are trying to optimize.

1. Latency vs throughput. Oftentimes they are the same, i.e. reduce the time it takes to do something. However, when you passed a certain threshold, techniques that can optimize throughput will hurt latency, so it is important to know what you are looking for. There are also low level details if you have rather extreme latency requirement, e.g. pinning the cores, kernel settings etc.

2. Knowledge about the overall system and your input distribution. While this seems trivial, often times you can get large performance improvement by avoiding redundant work, either by caching or lazy evaluation. Some computation may only exist because they may be needed later, and these can be avoided by lazy evaluation.

3. Better algorithms. Again, this seems trivial but oftentimes people are using algorithms that are far from optimal. And even if the algorithm can be asymptotically, there may be faster algorithms for special cases or faster in practice. Optimizing special cases may be rewarding if they occur frequently. Do you really need optimal solutions? Can you allow randomization? Can you do optimization on the queries to make it faster overall without optimizing individual operations?

4. Parallelization. Can you do parallelization? Are your problem instances large enough, or individual stages slow enough to benefit from parallelization? Do you have computation that are trivially parallelizable and can benefit from offloading to the GPU? If your code is waiting on some events, can you make them async? Can you avoid locks or atomic operations in your parallel code?

5. Data structure optimization. Can you reduce the number of allocation needed? Can you make the data structure more linear and predictable so the CPU can have better cache utilization? Can you compress certain data if they are sparse?

6. Low level CPU/GPU optimizations. There are a lot of great resources out there, but only do it when you are very sure it will be worth it, i.e. they are bottleneck in your system.

pca006132··on Making Rust binaries smaller by default
The problem is musl does not support execinfo. For a simple hello world, I managed to statically link with musl to get something with 7888 bytes.
pca006132··on Asus Zenbook Duo 2024
Would be nicer if there is a DE on Linux that supports these fancy screen configurations.
pca006132··on Stealthy Linux rootkit found in the wild after going undetected for 2 years
I think there is also bubblewrap which flatpak uses, which can limit access to folders, and also XDG desktop portal which allows GUI applications to access files that are not available to them. Not sure if these are widely used though, iirc a lot of flatpak packages just have "normal" permission. Also, these are not very helpful for CLI applications.
pca006132··on Saying Goodbye to OpenSubtitles.org API
Nice, so now we have OpenAI and OpenSubtitles that has 'Open' in their name and not open :)
pca006132··on C++: The most important complexities
Feel that it is also important to know when iterators/references to elements will be invalidated, in addition to knowing the complexities of the operations.
pca006132··on C++: The most important complexities
I remember it works for libc++ (partially, see https://libcxx.llvm.org/Status/PSTL.html), but forgot when I linked against libc++ last time...
pca006132··on C++: The most important complexities
Are they fresh graduates? It is very important to understand the workload distribution for any optimization. Even if small things can sometimes get large, optimizing for the small case can often yield large gain as they may occur frequently. And complex data structures are usually worse in the small case...
pca006132··on C++: The most important complexities
Clang does support parallel stl already (requires either TBB or OpenMP). Our project https://github.com/elalish/manifold made use of this to speed up mesh processing algorithms a lot.
pca006132··on Still no love for WPA3 on the Raspberry Pi 5
This is targeting hobbyist and not the typical kind of production usage for embedded systems. I rarely heard of embedded people encouraging customers to hack their production system...
pca006132··on Using Prolog as the AST
No, static analysis can also analyze multiple functions. What you are looking for is called interprocedural analysis and is more expensive than single function analysis (aka intraprocedural analysis). More generally what you want is context-sensitive (knows the calling context) and probably flow-sensitive (knows the control flow). The more precise the analysis, the more expensive they are. There are points-to analysis that can be pretty precise, e.g. https://arxiv.org/abs/1801.09189

> I am less concerned about that as computation resources exploded due to AI and solving SAT is getting faster and faster

Sadly we are usually very concerned about this. The complexity of these problems are usually NP-hard, so we usually have either heuristics (imprecise), exponential algorithms, or fixed-parameter tractable algorithms (practically speaking, O(2^c n) for a pretty large c), which are either imprecise or too slow. This is still an area with active research. The main problem is that, even if your computational power gets 2x faster, you cannot solve problems 2x larger within the same amount of time. It doesn't scale... (but of cause, usually we are dealing with sparse problems so the scaling is not in LOC for example)

pca006132··on What every developer should know about GPU computing
I am really curious about what kind of optimizations are enabled when you know the microarchitectural design of various CPUs, but without writing assembly by hand. I only know the basics such as optimizing data structure for better cache locality, add some fast paths, manual unrolling, but have no idea about how to work around things like pipeline stalls. It would be really helpful if you can point to some materials about this!
pca006132··on We have used too many levels of abstractions
Yeah I don't think college should be abolished, I just think that college should adapt to this trend of online education, instead of just acting like 100 years ago where there is no internet. And they should probably try to make better use of online education materials instead of offering their own courses that are worse...
pca006132··on We have used too many levels of abstractions
While I also attended college, I sometimes wonder if a college degree is really needed to learn these general stuffs. I learn a lot while doing projects completely unrelated to schoolwork, before registering for the course. I still have to register for the course because of graduation requirements, but I just skipped all the lectures and only took the exams. There are nice materials and textbooks available, and I think anyone motivated enough can learn them without needing a college degree, and probably have a better understanding than most college graduates. I really hope that colleges can just allow students to take an exam and skip some of the courses, so to not waste everyone's time. This is 2023, not 2003, most people have access to internet and CS education is widely available. No need to force everyone to attend introductory courses that are not well designed anyway.

Regarding abstractions, I think the craziest thing is that frontend projects are probably the most complicated beasts that I have ever dealt with. I worked with compiler written in Python, embedded system projects where pointers are everywhere, numerical algorithms which are notoriously hard to debug, but still frontend projects still managed to be a lot more complicated than them. I generally stay away from frontend stuff recent years...

pca006132··on Text-to-CAD: Risks and Opportunities
While this would be nice, I don't think enough people working on these algorithms are trained to use formal theorem proving tools.
pca006132··on Text-to-CAD: Risks and Opportunities
Wondering why no BRep support means it is not a CAD. It seems that OpenVSP doesn't use BRep but uses parametric surface [1]. I wonder if mesh-based modeling + some constraints solving will get you a CAD, or are there other requirements that I don't know? I only work on mesh processing library on my free-time and I don't know much about BRep.

[1] https://github.com/elalish/manifold/discussions/549#discussi...

pca006132··on Text-to-CAD: Risks and Opportunities
I doubt if it is possible to have a practical small kernel. Take mesh processing in https://github.com/elalish/manifold for example, we encountered a lot of problems when trying to deal with inexact floating point arithmetic. Using exact arithmetic can probably result in much simpler code (doesn't make sense in our case because the point of the library is about dealing with inexact arithmetic), but exact means slow. Also, a lot of code is about fast-paths that occurs frequently, data structures and algorithms that cut down complexity but are difficult to implement. Can we remove those fast-paths and complex algorithms? Probably yes, but this will slow things down a lot.
pca006132··on Text-to-CAD: Risks and Opportunities
I think the interesting thing about CAD kernel is that there are different representations and limitations to each representation. You have triangular (or polygonal) mesh, BREP which uses NURBS, SDF which is based on functional representation. I have experience working with triangular meshes and SDF so here are my opinions about them, please correct me if I am wrong:

Triangular mesh is conceptually simple, but requires many faces to approximate curved surfaces with high precision (you may be able to use subdivision surface in some cases but intersection/union in those cases are more challenging). Also, for more complicated models, floating point errors really add up and you either have to use an exact representation (which is really slow) or try some other approaches which can be robust w.r.t. errors (e.g. https://github.com/elalish/manifold but it is really hard to get right). Another disadvantage comparing with BREP is the lack of constraint solving, which I will write about it below.

SDF is nice for mathematically defined objects. They are computationally intensive, so some sdf libraries use GPU to speedup the computation. There are approaches that can speed up the evaluation, but doesn't work well if the function is not really the distance (https://github.com/curv3d/curv/blob/master/docs/shapes/Shape...).

-----

Constraints solving: This is a big problem with mesh-based CAD. Traditional CAD usually allows you to have under-defined constraints, and users can iteratively set constraints until the model is fully defined. There is no such a thing (yet) with mesh-based CAD. Also, we don't really have nice ways to represent constraints relative to curved surfaces because there is no curved surface in our mesh...

Also, one particular challenge with text-based (or code-based) CAD is how to select the surfaces with an ergonomic API. GUI can solve this problem but writing a good GUI is a complicated task (that I am not willing to touch).

pca006132··on Implementing a GPU's programming model on a CPU
I guess that a lot of people are uncomfortable thinking about vector instructions, and dealing with masks manually? And for vector instructions you need to align things properly, pad the arrays such that they are of the right size, that people are not used to I guess.
pca006132··on Undermining Democracy: The EU Commission's Controversial Push for Surveillance
So now malicious users can give bad proposals, get it rejected, and block other potentially good proposals for 5 years? Sounds like a good DoS scheme.
← PreviousPage 3 of 12Next →