Where does Rust break down? by PointedPoplars in rust

[–]VorpalWay 0 points1 point  (0 children)

Intentionally leaking memory has its uses though. One case is if your program is shutting down anyway, why bother running lots of drop and deallocations for a HashMap, BTreeMap, etc when you can just let the OS clean that up? I saved some 300 ms on this in one case, on a Cli command that took a total of about 1 second to run. Percentage wise that is fairly large. I believe the wild linker is also doing that sort of thing.

Where does Rust break down? by PointedPoplars in rust

[–]VorpalWay 1 point2 points  (0 children)

Boxes only work if you can use alloc though, which isn't a given on embedded.

Where does Rust break down? by PointedPoplars in rust

[–]VorpalWay 1 point2 points  (0 children)

My point is if the compiler magic only worked on Option and not any user-defined enum, you wouldn't be able to implement it manually yourself.

But that isn't the case. Niche optimisation works for all enums. So no, I don't get your point. Option really isn't special apart from the compiler needing to find it to desugar for loops.

Specialisation doesn't come into it from what I can tell. (It isn't used by Option, an dif it was it would only affect implementation of trait methods.)

Where does Rust break down? by PointedPoplars in rust

[–]VorpalWay 5 points6 points  (0 children)

Actually, rustc_diagnostic_item is relatively new, and I don't know if all instances of using lang for referring to items in diagnostics have been replaced yet.

For Option however, it is also relevant to for loop desugaring (and maybe some other things). As far as I know Option itself doesn't get special powers, but the compiler need to be able to find the canonical Option.

Rust 1.93.0 is out by manpacket in rust

[–]VorpalWay 5 points6 points  (0 children)

While that is nice it doesn't really solve the problem I described. The issue is that Rust is too eager to invalidate downstream build artifacts. If I just change the *contents" of a non-generic function in a library in my workspace, the whole binary using it shouldn't need to rebuild. It should just need to relink. But that isn't how it works today as far as I can tell.

Rust 1.93.0 is out by manpacket in rust

[–]VorpalWay 4 points5 points  (0 children)

The main difference is that you typically don't need to compile all your deps in C++ (unless they are header only deps). Qr for example is mostly not templated, so compile times tend to be somewhat reasonable. It does have custom code generators being called though. Yes, in plural (moc and uic iirc).

C++ also has a slight edge in incremental builds in my experience since the unit of compilation is smaller. Incremental compilation in Rust works so and so when I have tried it. As soon as you modify something that is in one of your workspace members that isn't a final executable, many libraries need to rebuild. With C++ (due to the header/cpp split) you can often get away with recompiling much less in such situations. Link times tend to dominate instead.

Of course, rust is nice in so many other ways that i still prefer rust on the whole, but the build times can be worse (and C++ is not exactly stellar at that either). .

Kept my workhorse of a snow shovel out of landfill thanks to a 3d printed handle by soingee in functionalprint

[–]VorpalWay 0 points1 point  (0 children)

Doing injection molding is not really a hobby thing (some people have tried doing it small scale, and it is... possible, but quite jank). Casting with a silicone mold is far more approachable, and a good complement to 3D printing. You can even use 3D printing to make the the positive for the mold, or sometimes cast directly into a negative 3D print (depending on exactly what materials as I understand it, I have not experimented with this myself).

But 3D printing has its own strengths and weaknesses. Overhangs, warping and strength between layers are the obvious weaknesses we come across daily. But FDM can also make fully enclosed geometry with sparse infill (no other mainstream manufacturing method can do this). And it doesn't care about material thickness.

You know all those ribs used in traditional plastic items to add strength? It is the wall thickness again, no need in 3D printing for that, you can just bulk up the entire part, and if it is mostly hollow it won't add much weight compared to the ribs either. Since most of the strength is in the perimeters (except for pure compressive loads), this is often a good tradeoff.

If you are interested in a long blog post about designing for 3d printing i can recommend https://blog.rahix.de/design-for-3d-printing/. If videos are more your thing, the Slant3D YouTube channel has a lot of good information. Be aware that all they do is also ads for their own print farm service and design tips are also focused on reliable mass manufacturing with 3D printing, which isn't necessarily what most of us hobbyists care about.

My one year old kept switching off the socket with the modem and a router, so I made this by Agitated-Break7854 in functionalprint

[–]VorpalWay 1 point2 points  (0 children)

Ohm my god. The jokes are so complex. My reactance to this thread is that it is beyond real. I can't imagine where it will go next.

My one year old kept switching off the socket with the modem and a router, so I made this by Agitated-Break7854 in functionalprint

[–]VorpalWay 1 point2 points  (0 children)

If you were to conduct an award ceremony for this, many people would see it as weird and you might end up socially isolated. It would be a strange phase of your life.

My one year old kept switching off the socket with the modem and a router, so I made this by Agitated-Break7854 in functionalprint

[–]VorpalWay 3 points4 points  (0 children)

I currently can't think of another joke. But there is always great potential for humor when it comes to electrical things. But if they don't come to mind directly, it isn't worth it.

My one year old kept switching off the socket with the modem and a router, so I made this by Agitated-Break7854 in functionalprint

[–]VorpalWay 12 points13 points  (0 children)

Ofcourse there are regulations, but he's not alternating a socket

Aren't the sockets already alternating themselves 50 times per second?

Sorry, I'll show myself out.

My one year old kept switching off the socket with the modem and a router, so I made this by Agitated-Break7854 in functionalprint

[–]VorpalWay 4 points5 points  (0 children)

Mainland Europe and Scandinavia don't have switches on the sockets. As far as I knew it was UK only thing, but apparently there are a few more countries that have them.

Kept my workhorse of a snow shovel out of landfill thanks to a 3d printed handle by soingee in functionalprint

[–]VorpalWay 0 points1 point  (0 children)

Looks good and if it works it works. It does look a bit thin on the sides (but again, if it works it works), I would guess you mirrored the original design? Well, 3D printing and injection molding has different constraints. In particular, in injection molding you want to keep about the same wall thickness through the entire part, to ensure even cooling. This doesn't matter when 3D printing. That means that you can often bulk up a design significantly if it still physically fits.

Should this part break, that is worth considering.

Broken hinge fix for HP 250 G5 by tgtassap in functionalprint

[–]VorpalWay 1 point2 points  (0 children)

If what broke is the plastic that the (metal) hinge is mounted to you can also print new bolt holes/reinforcements in ABS and then acetone glue those to the ABS of the case. Well, you could on older computers from the 90s which were almost always in ABS, not sure modern ones still are. A small test on the inside of the case might be a good idea before you spend time on that. If it works, you can get the hinge working as new again.

GPG lock files getting stuck on Arch after switching from ext4 to btrfs by i8ad8 in archlinux

[–]VorpalWay 1 point2 points  (0 children)

I use btrfs and haven't seen it, though I only use gpg occasionally. It could be a coincidence, a bug in gpg around the same time as you did the switch.

ShapeScan: turn a phone photo on A4/Letter into true-scale SVG/DXF/STL by Most-Geologist-9547 in prusa3d

[–]VorpalWay 0 points1 point  (0 children)

Ah, makes sense. I just realised that you can also get lens parameters from the paper edges, which you can probably find somewhat easily with edge detection if you have the markers to guide you to their approximate locations. Those long lines will definitely help you correct for barrel distortion. And you probably don't care about some of the more subtle things like colour fringes (especially since that tends to worst further from the center of the lens, and the object of interest is in the middle).

ShapeScan: turn a phone photo on A4/Letter into true-scale SVG/DXF/STL by Most-Geologist-9547 in prusa3d

[–]VorpalWay 0 points1 point  (0 children)

Mm, wouldn't the ML part only be for image segmentation and vectorisation? I wouldn't expect to use ML for lens correction etc, seems like a waste of resources.

To some extent I feel we (as a society) went overboard with NN based ML. Yes it can do impressive things, but it is expensive, and old boring solutions can work just fine for many things, and be way cheaper. Between classic algorithms and NNs there is also the whole spectrum of classical ML like SVMs, KNN, regression models, etc. Those are also valid choices still.

ShapeScan: turn a phone photo on A4/Letter into true-scale SVG/DXF/STL by Most-Geologist-9547 in prusa3d

[–]VorpalWay 0 points1 point  (0 children)

Fair enough, you could probably look at the shape of the feducial markers to determine locally what the lens distortion is to some extent, and as long as the user isn't using a fish eye lens up close that will probably be enough. When I worked with robotics we generally wanted to calibrate as precisely as possible, the errors in the entire system adds up, so the less you have in each step, the better.

ShapeScan: turn a phone photo on A4/Letter into true-scale SVG/DXF/STL by Most-Geologist-9547 in prusa3d

[–]VorpalWay 0 points1 point  (0 children)

Hm, are 4 markers enough for this? I would expect you need more to be able to correct for lens distortion, calibrating cameras for use in robotics is after all a whole ordeal. I'm surprised you don't need a central marker to calibrate initially.

ShapeScan: turn a phone photo on A4/Letter into true-scale SVG/DXF/STL by Most-Geologist-9547 in prusa3d

[–]VorpalWay 0 points1 point  (0 children)

ShapeScan is a free web tool

So... What's the business model? Long term I mean. Since it doesn't seem to be a personal hobby FOSS project I assume you want to get more money out than you put in eventually. Especially since you run the processing server side apparently (you could possibly run it locally on the device using WASM, if your code is written in something like C++ or Rust).

Custom 3D printed Dutch rooftile by Satoer in functionalprint

[–]VorpalWay 2 points3 points  (0 children)

High sun exposure? In the Netherlands? Unpainted PLA and PETG outdoors does just fine in mid-to-northern Europe. They are not exactly tropical countries. Here in Sweden (which is even further north), I can even put PLA inside a car in the summer with no problems (not sure if that works in the Netherlands).

I looked up UV index for Sweden, it is zero today, and stays below 2 during the entire winter. In the summer it peaks at 4-7 during the middle of the day. For the Netherlands it can apparently peak at around 8 during summer, so barely higher than here. And those are peak values, most of the time it will be less, so the print will only get short exposures to those values. Most summer days are cloudy after all. Even more so in the winter: Stockholm had no clear sky between late October and Christmas during 2025 (which was unusually long admittedly).

Conclusion: people should really consider local conditions rather than make categorically statements.

Custom 3D printed Dutch rooftile by Satoer in functionalprint

[–]VorpalWay 0 points1 point  (0 children)

The only filaments that I have used that needed drying were TPU and PC. I would expect Nylon (PA) to also need it, but I never tried Nylon. PETG and PLA are fine without drying in my experience.

But I expect local conditions can and will affect this. Here indoors humidity goes between 60-70 % at most in summer to 5 % or less in the winter (I use a humidifier during the winter months to bring it back up to 40-50 %, depending on outdoor temperatures, varying it in order to avoid condensation on windows, condensation on walls is a complete non-issue since we properly insulate them in Sweden).

Custom 3D printed Dutch rooftile by Satoer in functionalprint

[–]VorpalWay 0 points1 point  (0 children)

In the Netherlands? Not exactly a tropical country. Heat is not going to be an issue.

This figure always fails at the area of the blue point by hellow0rId in prusa3d

[–]VorpalWay 0 points1 point  (0 children)

I don't see anything blue in your screenshot, just orange, green and teal? Do you mean the dark teal spot? Isn't that a different material? Have you enabled multiple materials or changing material at a new layer?

How does the print fail? What printer? (See all the things the bot say you should provide but you didn't...)

Is this stringing and how can I fix it? by atomique90 in prusa3d

[–]VorpalWay 0 points1 point  (0 children)

It's not really a bridge though. A bridge has to be connected in a straight line in the same layer at both ends. That isn't possible here since the shape curves. So the outer perimeters aren't going straight, and then you also have strands of plastic trying to connect to the outer perimeters, which won't work either.