HNHacker News
TopNewBestAskShowJobs

Karliss

1,629 karma · joined March 9, 2015

submissionscomments
Karliss··on Flipper One – we need your help
Flipper zero was an arduino with half a dozen sensor, radio and other communication modules. Flipper one is a laptop/mobile phone class system in weird form factor no doubt its going to be more expensive. No point even comparing them. You can't call it a price hike if it's completely different category of product. There have been plenty of openish tinkerer laptop/mobile phones projects to know that paying high end laptop price for a device with compute power of last generation raspberry pi is a likely outcome.
Karliss··on Everything in C is undefined behavior
No UB, but the integer promotions rules apply.

When comparing signed and unsigned integers of same size the signed one will be converted to unsigned. In a reasonably configured project compiler will warn about it.

In case of integers smaller than int, promotion to int happens first.

In case of signed and unsigned integers of different size, the smaller one will be converted to bigger one.

Karliss··on Graphing Scientific Calculator Based on the ESP32
The licensing information is very conflicting

> Hardware and software that belongs to everyone. Waiting to be OSHWA certifie

> Hardware & Industrial Design All rights reserved. The hardware design, including but not limited to Are proprietary and the intellectual property of Juan Ramón. No commercial use or reproduction of the hardware is permitted without express authorization.

Same for software, the comparison table says MIT, other parts say GPL v3.

Also the whole concept of exam mode which is in any way effective seems contradictory with GPLv3. Any hardware means which would limit the ability to use modified version of software would violate GPLv3.

Karliss··on GenCAD
Even if you are completely skeptical about the AI cad model generation they also demonstrated their representation for model search/matching. Having a smarter search method for cad models based on 3d geometry in addition to traditional text search would be nice to have.
Karliss··on GenCAD
When skimming a research paper in addition to abstract don't forget to read "limitations and future work" and "conclusions".

In the limitation section they are quite direct with it: "images used .. are mostly isometric and noise-free CAD-images" and "limited CAD vocabulary used in this study needs to be extended by including more sophisticated CAD tokens such as revolve operation, edge operation (e.g., fillets/chamfers)". It currently supports only series of pads (can be subtractive). Many simple beginner exercises of seemingly similar complexity don't fit those constraints. Some of the parts shown could be more naturally created using wider set of tools, but technically can be created using only pads.

So even if you tried with clean screenshot of simple 3d model, it will likely fail if camera settings aren't right, and it will fail if model can't be represented using series of pad operations. Anything containing spheres, cones, nearly all lathe parts, fillets which can't be included in 2d sketches will fail. In theory arbitrary extrusion angles are supported, but all examples showed only axis aligned parts.

That said I wouldn't be surprised if it failed even if you considered exact limitations not just similar complexity in your attempts.

Assuming images in the googledrive are the training data, "mostly isometric and noise-free CAD images" is a bit of understatement. All of them are at very specific angles using and single style. Specific solid gray infill color for "images", and white infill with weird shading around perimeter for "sketches". Both with white background and pixelated non antialised 1px lines. No reason to expect it capable of processing anything which doesn't have exactly same visual style. For practical product that would have to be solved but that wasn't really the point of this research. All the style transference papers have show that it's more or less solvable problem, but for a paper exploring what model architecture and 3d representation could work best for AI cad it seems like unnecessary distraction that would only bloat the training costs and time. Most annoying part is that it makes hard to test the model with your own inputs.

Karliss··on GenCAD
This isn't B-rep based modelling. Far from it. It builds up the feature tree and then uses geometry kernel to generate B-rep based representation. The final generator output script could probably be adjusted to generate openscad. It only supports 2d drawings containing lines, arcs and circles and extrude operation for making them 3d. Operations like fillets and chamfers which depend on intermediate B-rep model state are not supported.

I would even argue that for basic modelling majority of tools/features in CAD operate at the abstraction closer to CSG for describing what and B-rep is only treated as how. Just like good chunk of code based CAD use combination of CSG for what and triangle mesh based geometry engine for how. That's assuming you consider standard 2d->3d operations (extrude, revolve, sweep along arbitrary 2d profile) as valid primitives for CSG.

User comes into direct contact of B-rep in very specific situations: 1 doing operations like fillets/chamfers/draft/thickness based on intermediate geometry, 2 attaching sketches or other features to generated geometry or using generated edges (instead of new sketches) for guiding operations like complex sweeps, 3 surface based modelling workflows where you build up the the solid from individual faces typically including complex curved surfaces.

In case of 1 and 2 the the dependency on b-rep based representation is only marginal, in theory you could select edges in triangle mesh based underlying representation but the final result but quality of result wouldn't be as nice and TNP issues for parametric model editing would likely be even bigger than it is for existing CAD. That's not really CSG territory anymore but isn't exclusive to B-rep either, and involves a bunch of work that's outside the scope of B-rep. In non parametric mesh modellers with more destructive editing workflows like blender chamfers and fillets work fine. And if anything for reliable parametric models you often want to limit dependencies on intermediate geometry as that depends on CAD keeping track of where each edge/face originated from outside the b-rep and increases the chance of TNP issues.

3 is critical for industrial design containing large amount of complex curved surfaces like cars and other consumer products, but there are also many more technical parts where it can be completely ignored. Cad tutorials for beginner tutorials almost completely ignore this category of cad modelling. The part about not being exclusive to b-rep also applies for surface modelling part.

Karliss··on Int a = 5; a = a++ + ++a; a =? (2011)
The same rule which makes the evaluation order of a++ + ++a unsequenced also applies to (x+y+z+a+b+c) where x,y,z could be any expression (in a sane case on separate variables and without mix of pre/post increments). Breaking questionable code and introducing UB where reordering changes result is just a side effect of this.

Just switching between left to right or right to left wouldn't be that useful but it also permits to interleave the subexpression evaluation. Grouping memory fetches/writes, taking into account how many execution units and registers of different kinds a CPU has can have some performance benefits.

For example if you have something like `++a[0] + ++a[1] + ++a[2] + ++a[3]` instead of evaluating each increment one by one both GCC and Clang will vectorize it loading all 4 values from memory using single simd instruction, incrementing and then writing result back to memory. And if you add fifth one (but not 8) which needs to be handled using regular instruction, that will be done after the first 4. If standard defined that left subexpression of addition is fully evaluated before the right expression that wouldn't be allowed.

Karliss··on Int a = 5; a = a++ + ++a; a =? (2011)
The UB comes from how C++ standard defines expression sequencing which is not relevant for Java. Languages other than C++ typically define such details more strictly so there is no UB or even concept of UB. JIT compilers don't change it as any non toy JIT will generate native instructions directly or through intermediate representation (instead of generating C++ text and passing that through regular C++ compiler) both of which should have much stricter semantics compared to what C++ guarantees.
Karliss··on Int a = 5; a = a++ + ++a; a =? (2011)
That's a different category. Standard defines and uses all 3 "undefined", "implementation defined" and "unspecified" behavior. The difference between last two is that compiler isn't required to document exact behavior. Unlike UB triggering it doesn't automatically summon nasal demons and range of possible behaviors is usually described by standard.
Karliss··on Valve releases Steam Controller CAD files under Creative Commons license
USB HID protocol has been designed with huge flexibility and self descriptive devices in mind so that in theory you shouldn't require a custom drivers for vast majority of current input devices even controllers order of magnitude more complex than anything currently sells. Just like you don't need a custom driver for each usb flash driver.

In practice half-assed HID drivers by OS, badly designed OS<->application APIs, hardware manufacturers copy pasting HID descriptors from other devices, not following the standard properly, firmware bugs getting fixed with drivers instead of firmware fixes, intentional discrepancies from standard, console manufacturers reinventing the wheel has lead to the current mess.

Karliss··on John Ternus to become Apple CEO
Before iphone mobile phones were running Java applets, which were sometimes even compatible across different phone manufacturers and users even could exchange them over infrared. In contrast first iPhone initially had no support for third party software, only web apps.
Karliss··on Louis Zocchi, games industry pioneer, has died
The point of percentile dice isn't to generate a string between "0%" and "100%", it is to test if action with chance of x% success gets done or not. For every o value of x, there are x out of 100 values which are strictly less than x, or if you count 0 as 100 then there are x out of 100 values which are less than or equal to x. Either way you get x% percent chance for event to happen. If the dice had 101 sides, the probabilities would be x/101 which aren't nice round percents.

It even works correctly for 0% and 100% chance events. Assuming 0 is counted as 0 - For 0% there are 0 numbers less than 0 on dice so chance of throwing number less that is 0/100=0%. For 100% all 100 numbers are less than 100 so no matter what the result of throw is you will succeed.

Karliss··on Mechanical Keyboard Sounds – A listening Museum
If you don't have a suitable recording just remove the entry. Reusing soundfiles doesn't help anyone and is misleading.
Karliss··on What are skiplists good for?
The same reason naive BST tree (non self balancing one) doesn't work. You need to be able to add and remove elements without any knowledge of future operations and without malicious input being able to force a degenerate structure which is equivalent to a flat linked list. It's a bit similar how treap achieves somewhat balanced tree using randomness instead of deterministic rebalancing algorithms.

If you knew all the items ahead of time and didn't require adding/removing them incrementally you could build optimal skiplist without randomness. But in such situations you likely don't need a skip list or BST at all. Binary search on sorted list will do.

Karliss··on CadQuery is an open-source Python library for building 3D CAD models
It isn't even necessary to create triangle meshes during export. You can export as step files. It is a commonly used brep based file format supported by almost any "proper" CAD software. Triangle mesh based modelers can't easily export good step files because they don't operate at that level of abstraction.
Karliss··on Taking on CUDA with ROCm: 'One Step After Another'
You missed the note at the top "GPUs listed in the following table support compute workloads (no display information or graphics)". It doesn't mean that all CDNA or RDNA2 cards are supported. That table is very is very misleading it's for enterprise compute cards only - AMD Instinct and AMD Radeon Pro series. For actual consumer GPUs list is much worse https://rocm.docs.amd.com/projects/radeon-ryzen/en/latest/in... , more or less 9000 and select 7000 series. Not even all of the 7000 series.
Karliss··on Steam on Linux Use Skyrocketed Above 5% in March
Steam Deck is currently ~25% of those 5% Linux users. Good chunk but not a majority. You can estimate it in two different ways which produce similar results: filtering to Linux only looking at OS list "SteamOS Holo 64 bit" is 24.48% and in the GPU list "AMD Custom GPU 0405"+"RADV VANGOGH" add up to 23.72%.
Karliss··on Open source CAD in the browser (Solvespace)
There are more than dozen different viewport navigation manipulation modes, latest version added two more (Solidworks and Siemens NX). You can pick whichever behaves closest to the program you are most used to.
Karliss··on OpenGridWorks: Electricity infrastructure, mapped
It is in the bottom right corner when clicking (i) button just like the https://osmfoundation.org/wiki/Licence/Attribution_Guideline... suggests. The only questionable part I see is that after page reload it flickers for half a second and then gets automatically hidden instead of getting hidden after manual interaction with map. Is there any other point in attribution requirements that it doesn't comply with?
Karliss··on Show HN: Twitch Roulette – Find live streamers who need views the most
Twitch can forward the stream as is without transcoding it. That's what transcoding not being guaranteed means. It will be a worse experience for viewers but it can work. Few years ago they even announced working with OBS on feature where streamers themselves can transcode and send multiple streams further reducing need for twitch to spend their compute resources on unprofitable streamers.
Karliss··on The Legibility of Serif and Sans Serif Typefaces (2022)
Most of those 160 pages, is repetitive mish mash of various historical research (many of questionable quality) on typeface readability loosely grouped by certain themes retold in a way that makes it even less clear about their results, quality and whether testing conditions are useful for making any good conclusions. Little value in reading it all unless you follow references and read what the quoted research actually did and said. The chapters have different thematic, but content and conclusions are very samey -> a bunch of questionable research and research which was inconclusive or didn't observe significant overall advantage of serif vs sans serif.

As for where it came from to me it very much feels like the defense of serif typefaces is largely typographers defending existence of their craft and people talking past each other with overgeneralized claims. There is definitely value in the art and craft of typography and I respect that. It would be too bland if everything used plain sans serif fonts that barely differ from each other, and you can definitely mess up typography making text hard to read when done badly. But I also believe that there is plenty of things based on traditions and "everyone knows x because that's how we have always done it".

As for sans serif for screens the obvious reason and also thing that comes up multiple times is low resolution text. At certain resolution there are simply not enough pixels for serifs. The author of paper suggest that with modern high resolution screens this argument doesn't stand. My personal opinion is that it's not a big issue at sufficiently high text size. But even on somewhat modern 2560x1440 screen I can find plenty of UI elements that have only 7-8 pixels high labels. Not everyone is using retina displays and not everything is long format text. Screen resolutions have increased, but so have information density compared to early computer screens, although there is recent trend of simplifying UI to the point of dumbing it down and adding excessive padding all over the place. There are other screens beside computers and mobile phones, many of them not very high resolution even by standards of early computer screens. It doesn't make sense to put high resolution screen and Linux computer in every little thing. Problem is made worse by lack of antialised text sometimes due to screen, sometimes MCU memory and compute limitations. You are probably not going to have modern font rendering stack on something like black and white washing machine screen, gas station pump or thermostat The research multiple times mentioned stuff like low resolution, but it hardly ever quoted hard numbers in a meaningful way. How many pixels a typeface needs to be comfortably represent serif? How many arcseconds? Surely there must be research related to that one. This might be part of problem for some comparative research - can't compare readability of serif/sans serif if there is no serif typeface at those resolution. Stuff like point 10 or point 12 without additional details is meaningless.

Some personal anecdote -> text antialising has huge effect. Made a sample text of serif and sans serif font and zoomed out to the point where lower case letters are ~6px high. I wouldn't expect there to be enough resolution for serif but you can perceive surprising amount of detail in letter shapes. Zoomed in on screenshot it's a blurry mess, but at normal zoom level the serif letters are fine. It's readable but wouldn't consider either of 2 comfortable. When scaled up to 8px both pieces were still harder to read than same height text in UI labels. Why is that? Why is one identical height sans serif text much more readable than other? Are UI labels better pixel aligned? Is it due to subpixel antialising? That's on a 90deg rotated screen, is subpixel antialising even working properly there?

Just for fun switch OS UI font to serif. Due to font sizing inconsistency it ended up being 1 pixel shorter (7px) than same size default UI font. Can those even be considered serifs when they are hardly a pixel each? It felt weird, nowhere near as bad I expected, but still weird.

Karliss··on More than 135 open hardware devices flashable with your own firmware
The link was posted by project's author so probably should have been Show HN.

Feels more like AI slop list of "a bunch of hardware that you can buy from hobbyist electronic stores" which has no idea what it wants to be, shiny on surface but deeper you look less sense it makes. Not surprised, the company who made it (likely single person) describes itself as "We're crafting interesting tools to speed up software development using Artificial Intelligence."

Good chunk of that stuff is not open hardware by any definition -> neither the hardware design being open nor the firmware not even community written firmware for proprietary hardware.

If you ignore the poor description of the site is the parametric search at least good? The values in parameter dropdowns seem to be filled based on currently displayed items, that might be fine for narrowing down once you already made a search but for initial search it means you get random subset of available values. The fact that whole thing is non-categorized, random mix of mismatched type of hardware doesn't make the parametric search better. Good parametric search needs well curated and structured database of descriptions made by people who understand corresponding product category, otherwise it's garbage in garbage out.

Having to wait half a minute while AI is reticulating splines even when you used quite specific keywords isn't a good search experience either.

So if it's not a good list of open hardware, not a good list of hardware you can flash open firmware, not a good search for electronic components what is it good for? Only value I see is as a fuzzy set of links and ~~tags~~ for exploring a subset of related hardware topics.

Edit: not tags those are broken. #tags return error, other tags(uses cases) and other other tags(compatible firmware) in many cases returns only 1-2 results which doesn't even include the item where you clicked on tag even though there are a lot more items using it.

Karliss··on C++26: The Oxford Variadic Comma
I doubt it will be a problem in practice.

Regular variadic arguments in general aren't used very often in C++ with exception of printf like functions. Not rare enough for majority of C++ programmers to not know about them, but definitely much more rare than their use in python. Main reason people know about it at all is printf. The "new" C compatible form has been supported since the first ISO standardized version of c++ if not longer. There haven't been a good reason to use the "old" form for a very long time. Which means that the amount of C++ code using deprecated form is very low.

Being deprecated means that most compilers and linters will likely add a warning/code fix suggestion. So any maintained project which was accidentally using C incompatible form will quickly fix it. No good reason not to.

As for the projects which for some reason are targeting ancient pre ISO standard c++ version they wouldn't have upgraded to newer standard anyway. So if new standard removed old form completely it wouldn't have helped with those projects.

So no you don't need to know the old form to read C++ code. And in the very unlikely case you encounter it, the way for accessing variadic arguments is the same for both forms through special va_list/va_arg calls. So if you only know the "new" form you should have a pretty good idea of whats going on there. You might lookup in references what's the deal with missing coma, but other than that it shouldn't be a major problem for reading code. This is hardly going to be the biggest obstacle when dealing with code bases that old.

Karliss··on Avoiding Trigonometry (2013)
The article answers to this near the very beginning.

> Now, don't get me wrong. Trigonometry is convenient and necessary for data input and for feeding the larger algorithm. What's wrong is when angles and trigonometry suddenly emerge deep in the internals of a 3D engine or algorithm out of nowhere.

In most cases it is perfectly fine to store and clamp your first person view camera angles as angles (unless you are working on 6dof game). That's surface level input data not deep internals of 3d engine. You process your input, convert it to relevant vectors/matrices and only then you forget about angles. You will have at most few dozen such interactive inputs from user with well defined ranges and behavior. It's neither a problem from edge case handling perspective nor performance.

The point isn't to avoid trig for the sake of avoiding it at all cost. It's about not introducing it in situations where it's unnecessary and redundant.

Karliss··on Lego's 0.002mm specification and its implications for manufacturing (2025)
0.001mm is 1 micron not 10.
Karliss··on LoGeR – 3D reconstruction from extremely long videos (DeepMind, UC Berkeley)
More like the opposite. Point cloud data captured with varying means has existed for a long time with raw data visualized more or less just like this. And SciFi movies/games use the effect of raw visualization as something futuristic/computer tech looking. Just like wireframe on black background, although that one is getting partially downgraded to more retro scifi status since drawing 3d wireframe isn't hard anymore. It started when any 3d computer graphics even basic wireframe was futuristic and not every movie could afford it, with some of them faking it with analog means. Any good scifi author takes inspiration from real world technology and extrapolate based on it, often before widespread recognition of technology by general population. Once something reaches the state of consumer product beyond just researchers and trained professionals, the visuals tend to get more polished and you loose some of the raw, purely functional, engineering style.
Karliss··on macOS Tahoe windows have different corner radiuses
Except it kind of fails at that too. The window corners seem to be either based on those squircle things or some kind of other varying radii curve which eases out into sides much more gradually than proper circles. The window buttons (close, minimize) the round toolbar buttons anchored to top right corner are based on proper circles. Attempting to center circle in a varying curvature corner results in varying spacing between the circle and corner, which defeats the whole point of why different windows have different corner size (not calling it radius because they are not circles).

When the top right corner contains a search field instead of rounded button, that also seems to use varying curvature instead of capsule with proper circles at the ends. Still results in varying spacing between window corner and the toolbar content.

And that's just the 2 top corners. Attempts to align top corners result in even bigger mismatch with the rest of the window content. For example calculator -> it has a grid of round buttons. While the window corners might match top bar (as good as they can due to different shapes) the main calculation buttons don't match the corners at all.

Similar problem affects many of the popups which have something like confirmation button anchored to bottom right corner.

Rounded scrollbar handle - not aligned with bottom left corner size, instead it awkwardly gets cut of by different amount in each program.

Menus also have this disease. The non circular corner curve of overall menu shape extends way past the corner of item highlight resulting in varying spacing and making it feel almost like whole menu has bulged out instead of flat sides.

Karliss··on Keybee: A Keyboard Designed for Smartphones
Not on a phone right now, but you have to type in sample text above and press check. Bad UI choice of showing bars before text has been entered and separating bars from the input field by additional text.
Karliss··on Microsoft team creates data-storage system that lasts for millennia
It is already way beyond double layer. The 4.8TB is achieved using 301 layers.
Karliss··on Show HN: Geo Racers – Race from London to Tokyo on a single bus pass
One of the 2 terminals in Cherbourg France, the city you reach by traveling from Dublin to France, but not the one I arrived in. It only had routes to England.
← PreviousPage 3 of 19Next →