@cesarb

35 Followers
467 Following
487 Posts
Lula veta parcialmente a nova lei de licenciamento ambiental

Decisão do presidente restringiu licença por autodeclaração, manteve salvaguarda à Mata Atlântica e alterou procedimento para obras estratégicas.

Deutsche Welle

During an investigation today I ran across a quite long piece of base64 data which only used the 62 alphanumerics, and not + or /. "That's a weird coincidence," I thought, "what are the odds of that? Surely you'd expect a + or / by chance sooner or later."

Turns out: not very unlikely at all. + and / translate to binary 111110 and 111111. In base64 those sequences have to occur at an even bit shift. If the encoded data is ASCII text then the top bit of every byte is 0, so neither sequence can occur at any shift that puts part of it in the top two bits. The only possibility is that it appears in the bottom 6 bits of a byte, so you get a byte value of the form 0?11111?. There are four of those, and one of them is 0x7f, which isn't printable.

So the answer is: any printable ASCII document which avoids the three characters >?~ will encode to purely alphanumeric base64. And that's not very hard at all – plenty of syntaxes don't happen to use those. The encoded data in this case turned out to be JSON, in which all the strings were either alphanumeric identifiers or other pieces of base64.

My intuition "surely you expect a + or / by chance" was based on mentally modelling base64 as some kind of random transformation. Not a good model, as it turned out!

the fact that the vendors are all hyperventilating on their blogs, telling me that everyone is doing it, that the time for discussion is over, it's the FUTURE, can't you SEE it's the FUTURE, if you don't buy it NOW you'll be OBSOLETE, just a DINOSAUR, EMBRACE IT OR DIE, BECOME A COLLABORATOR!!! NOW!! BEFORE OUR Q4 EARNINGS REPORT! PLEASE! is not doing a lot to convince me that my impression that it is actually garbage is _wrong_, this is not the sales pitch I usually get for _good_ products
🚨 Plantão da Globo anunciando a decretação de prisão domiciliar de Jair Bolsonaro pelo ministro Alexandre de Moraes

Os chineses, que levam a sério o seu programa espacial, lançaram no ano passado o Atlas Geológico do Globo Lunar, o mapeamento de mais alta resolução já publicado sobre a Lua, fazendo uso das imagens coletadas pelas missões da própria China e atualizando os mapas anteriores, da época do Projeto Apollo.

O Atlas detalha mais de 12.000 crateras, além de outras informações geológicas, topográficas e tectônicas da superfície lunar, em escala 1:2.500.000.

Mais: https://english.cas.cn/newsroom/cas_media/202404/t20240422_660730.shtml

#Newsletter

Para especialistas, exceções são recuo de Trump e abrem margem para negociação

https://www.conjur.com.br/2025-jul-30/excecoes-de-trump-e-adiamento-do-tarifaco-amenizam-clima-mas-omc-ainda-e-caminho/

Exceções de Trump e adiamento do 'tarifaço' reduzem temperatura

Especialistas que avaliam ordem executiva assinada por Donald Trump nesta quarta (30/7) alivia tensão, mas reforça tom ideológico

Consultor Jurídico
RP2350 A4, RP2354, and a new Hacking Challenge - Raspberry Pi

New A4 stepping of our RP2350 microcontroller now available, with security and other improvements. Plus: another RP2350 Hacking Challenge!

Raspberry Pi

I want to defend Wayland here and explain a crucial piece that I think people are missing...

The splitting of protocols in Wayland and compositor reimplementation were to allow for new form factors. It had to sacrifice the guarantee of all desktop app functionality being present to achieve that.

The idea (as I see it) was never to have 500 desktop compositors all trying to reimplement the same thing with slight differences. Iinstead, it was for 500 different interfaces for different platforms that are compatible with the same apps (e.g. desktop, laptop, phone, car screens, AR/VR, watch). Different form factors have totally different ways of dealing with interface, but share enough common features where it makes sense to have 1 base protocol and many other ones for device/form specific features.

Problem is, while in 2008-2016 we had a ton of new experimental UIs coming out on a semi-regular basis (that was the peak of the whole convergent phone/tablet craze, smartwatches started, fancy car UI, touch tables, early AR/VR) things have quieted down. The purpose of Wayland's insane modularity hasn't been visible to most people given it's almost always complained about in a desktop contest vs X11. But X11 was literally only designed for a desktop form factor and has been refined for that 1 purpose for decades!

As an example of different form factors, Wayland lets IVI (in-vehicle infotainment) systems work way better than Xorg could have. Desktop window layouting on that platform would inherently produce massive amounts of unnecessary complexity, and the ability to direct scanout saves on power/expensive compute. Automotive Grade Linux and COVESA maintain reference interfaces for cars so companies can iterate a ton faster. Wayland gives the app compatibility and they can make the system UI work with more flexibility and ease than an X11 window manager.

Take Linux Mobile too, the compositor can reliably enforce window layout and boundaries and composition. While this could technically be done with an X window manager and compositor, doing it with Wayland guarantees reliability as the app simply doesn't have a choice or room for error. Some things like drag and drop of toolbars doesn't make much sense on mobile given how small the screens are.

There's some interfaces where X11 is basically impossible to use. In AR/VR (where i am making a Wayland compositor) the concept of a screen simply does not exist. How is an app supposed to position itself when the very concept of 3D is not part of the protocol? In Wayland I don't have to implement the protocols that don''t work (e.g. layer shell) and therefore any apps that don't need it will be compatible..

Wayland has allowed for insane levels of flexibility, things that no other display server architecture can do reasonably. Total flexibility between app and screen, direct scanout without hacks, AR/VR support, etc.

Here's some fun and useful stuff that's been done with Wayland, stuff that X11 could never reasonably do:

  • LG Smart TV UI: https://youtu.be/4cmYCK9PBkM

  • Multiple user collaboration on touch tables with arbitrary rotation: https://youtu.be/8xtjJTJAQsY

  • AR/VR apps running in windows and volumes at the same time, all interactable back in 2014 (eat your heart out magic leap and apple): https://github.com/evil0sheep/motorcar

  • Presentation slides that were themselves a Wayland compositor written in Qt and QML so therefore allowed fully interactive live demos in an integrated form factor with a very popular and easy to code UI framework: https://youtu.be/mIg1P3i2ZfI

  • Cosmic panels are actually Wayland compositors, meaning widgets can draw literally anything from any toolkit in any language.

  • Now, could Wayland devs maybe have distributed features across protocols better? Worked with app toolkit devs to ensure the protocols they made actually fit what the apps and compositors needed? Stopped bikeshedding (though imo many cases of "bikeshedding" are simply accounting for other form factors)? Absolutely!

    My point here is simple: there was a reason for making it this modular, for not having a standard implementation. It wasn't just devs trying to impose some ideology, it wasn't some corporate takeover. It's good reasons that people using X11 on their desktop/laptop don't encounter. If we made something that wasn't universal, most apps wouldn't be compatible with it and therefore everything but the desktop form factor would lack apps.

    QtWS17 - Intro to the WebOS QtWayland Compositor, Florian Haenel, LG Electronics

    YouTube

    Saving an image to a bird

    https://www.tomshardware.com/pc-components/storage/yes-you-can-store-data-on-a-bird-enthusiast-converts-png-to-bird-shaped-waveform-teaches-young-starling-to-recall-file-at-up-to-2mb-s

    They converted an image to a waveform, played it to a young starling who imitated it well enough that it could be recorded and the waveform converted back to an image.

    The linked video is full of info about bioacoustic monitoring too

    Yes, you can store data on a bird — enthusiast converts PNG to bird-shaped waveform, teaches young starling to recall file at up to 2MB/s

    Who needs Starlink when you've got an actual starling

    Tom's Hardware
    "Brasil virou pedra no sapato de Trump na América do Sul"

    Em entrevista, cientista político Christian Lynch avalia que tarifaço mira aspirações de autonomia do Brasil e que a Trump só interessam governos submissos. "O tarifaço é o começo de um processo sistemático de agressão."

    Deutsche Welle
    ×

    I have written down all that I know about designing functional mechanical parts for 3d-printing. Took two years, but I finally managed to finish it... Please let me know what you think!

    https://blog.rahix.de/design-for-3d-printing/

    #3dprinting @3dprinting #dfm #DesignForManufacturing

    @rahix Fantastic reference! This is the sort of guide I wish I had when I was first learning to design mechanical parts.

    I'd love to see a follow-up on the practicalities of how to apply some of these in FreeCAD - eg. designing shadow lines into enclosures, splitting parts with dovetails, or even just adding clearances to reference surfaces. I know how to do all of these, but I'm sure I'm missing some clever techniques.

    @q3k Yeah, FreeCAD design techniques are a whole other beast.

    On that note, I've been meaning to write some sort of PartDesign addon that lets you parametrically add some of these common design features without having to manually build them each time. Would massively boost productivity, I think, but I haven't gotten around to it yet...

    @rahix Great resource! Thanks!

    @xro, @ripper Probably a good basis for workshops and a handy reference.

    @neuron @rahix @xro I had already bookmarked the toot. Just skimmed through the blog post. And yeah, quite a comprehensive reference/guide! Will definitely forward this to people asking for advice! :)
    @rahix just wanted to send the blog post to a colleague at work. And Microsoft Teams says this site is malicious and doesn't send the message.
    I don't think you can do a lot about that but just wanted to let you know...
    @ripper ugh, what a mess... if you do stumble over anything i could change, to make the site look less malicious to corporate filters, let me know
    @rahix @3dprinting Impressive work. It looks very comprehensive but also seems to include in a compact way many best practices you normally only gain by experience. Some sections also remind me of my design training at university. The New 3d-printing design almanach ...
    @sebastian @3dprinting Thanks for the kind words! What you describe is exactly what I was aiming for — sharing practical knowledge as a collection of heuristics.
    @rahix @3dprinting this is amazing and I will be sharing it everywhere, thank you!!!
    @rahix @3dprinting Great reference! 👏
    @rahix @3dprinting this is awesome. Have you thought of reformation as a eBook?

    @rahix @3dprinting woaaah love the site design! and a very nice reference for all the "how much tolerance" questions.

    the intentional sharp corners are a really cool idea!

    For bigger diameter threads (M8 and up), modelling the threads in CAD and printing them is an option, although quality of such threads is not always good

    hah I've done that with M2.5 xD

    @rahix @3dprinting That's a wonderful resource, thank you! I will definitely be using some of these ideas in my future designs.

    @rahix @3dprinting wow what i beautiful writeup

    pretty sure i've done some of these, badly

    @rahix this is great stuff. Do I see that you're using FreeCAD? I'd love to feature this on the official @FreeCAD blog.
    @concretedog @FreeCAD Thanks! I sure am, it's FreeCAD all the way :) Feel free to feature it!
    @rahix oh excellent! I might ping you the odd question when I write this up. It's excellent work though!
    @rahix Love that you mention OpenFLexure in this... I've just written and submitted and article to @rpimag about the project. Their design stuff/print optimisation is awesome.
    @rahix @3dprinting Looks like an excellent guide, will read in details, but at first sight, it looks very useful and interestring!
    @rahix
    I wish I had had this a year ago. I still got a lot of value from reading it!
    @3dprinting@techhub.social

    @rahix @3dprinting Wow this is great work!

    For R2.2 about horizontal holes, I accidentally discovered another option.

    Model horizontal holes as threaded holes even if you do not intend to use the threads to mate with another part. The serpentine path of the threads allows very large successful overhangs.

    The downside is, of course, that it's computationally expensive to model, and it's easiest when there is a standard thread form with a minor diameter compatible with your design intent.

    @rahix @3dprinting Here's another one:

    The solution is one that's also often used for additional security of metal joints as well: Use additional screw locking measures, like lock-nuts or a threadlocking adhesive.
    A small (2–3 thread) untapped portion with a design size of the major diameter (thanks to internal circle shrink) or slightly smaller will work like a nylon locking nut. This can work with only partially tapped threads in post processing, modeled and printed threads, or threaded inserts.

    (Crush rib threads usually provide this locking on their own, as far as I can tell.)

    @mcdanlj interesting idea! i don't have much insight into the vibration resistance of formed threads. i would expect them to perform a bit worse than a real nyloc nut, because of the plastic deformation. For sure the effect will lessen on reassembly.

    I've been meaning to run some tests on this topic anyway. I have had many problems with fasteners loosening, but no reliable guide on the effectiveness of each mitigation option. If I get around to this, I will certainly publish the results :)

    @rahix Vis-a-vis reassembly: Like a nyloc nut, it's not something you want to use where you are frequently removing and re-inserting the screw. In at least some applications, nyloc is considered a single-use locking nut.

    Not all plastics act the same here. PETG acts a lot like nylon in my experience. PLA being semi-crystalline is more likely to crack. ABS handles this well but isn't as tight as PETG.

    I've used this for one-time assembly in a print head made from ABS, and the screws never came loose in the life of the print head.

    Note that this technique can pair with threaded inserts, too, if the screw is longer than the insert, as long as you clear the melted blob at the back somehow or another. I've only done this a few times though, mostly because I have moved away from inserts for my own use, as I've discovered that as long as you drive screws using the "back off until it clicks" method to avoid cross-threading, plastic thread forms can survive many cycles. I think that the advice not to use plastic threads due to degradation in reassambly is in large part an artifact of ham-fisted reassembly and cross-threading chowdering the threads. I would suggest that plastic threads, properly handled, are typically fine for dozens of cycles.

    I will still use inserts when I want virtually unlimited cycles.

    @rahix @3dprinting Thank you very much for your impressive work 🙏
    @rahix that's really useful, thank you

    @rahix @3dprinting

    Glad to find the author of this excellent piece here in the Fediverse!

    I was toying with the idea of writing something like this myself. But, honestly, I'll never find the time. Nor would it be as good as what you've put together here.

    @rahix @3dprinting Oh, another tip for threads. When you tap threads in plastic, use a spiral flute bottoming tap. These make continuously-cut chips that eject out the top of the hole. You can appropriately chuck them in a drill and tap in a single pass, to the full depth. They leave a beautifully-cut thread form that allows more cycles than if you use a straight-flute tap. (A spiral-tip "gun tap" will not typically eject chips out the far side of the hole in plastic like it will in metal, because plastic chips don't break much)

    @rahix @3dprinting The reason for the bottoming tap, even if you are not tapping a blind hole, is that it cuts a thicker chip that evacuates better. This advice does not necessarily apply to metal, but in plastic, a thicker chip is less likely to bind up in the tap and turn to binding garbage in the cut, in my experience.

    For an open hole, a normal progressive spiral-flute tap, or a modified bottoming spiral-flute tap, will still typically work. I've used them, and they are still better than straight-flute taps. It's just that I've found bottoming taps best. Less rubbing, they don't get as hot when power-tapping, and they leave the cleanest thread forms.

    @rahix @3dprinting I cannot tell you how much I love the style, content and approach to teaching that you've accomplished here. Well done!
    @rahix @3dprinting
    It was an awesome read, thank you for the time and effort. I will use it the next trainings we organize on Freecad !
    @rahix @3dprinting this is fantastic, thanks so much! 😃👍
    @rahix This has some absolutely brilliant ideas - especially the sacrificial layer concept.
    @rahix @3dprinting Thanks for sharing. Wow.
    @rahix this is really good stuff! I came up with some fun ways of making stronger prints using vase mode as well. You can double the wall thickness by modeling the part as hollow with the desired wall thickness and creating a vertical cut through it on one side (with no gap). This allows the path to reach both the inside and outside surfaces. The passes at the cut will melt enough to adhere, creating a solid joint there. Hard to describe without pictures, sorry.
    You can also make cuts partway through the thickness to create internal ribs for stiffening if the inner and outer surfaces are more than two line-widths apart from each other.
    @twigmouse Thank you :) I know what you're talking about, there is an incredible amount of cool things you can do with this! The tray I featured in "Unconventional vase mode" also uses this approach and way back, I found this video on YT talking about such designs: https://youtu.be/gCgyBmYq_bQ
    How to make Complex Multi Surface models 3D printed in Vase Mode T3DP

    YouTube
    @rahix oh cool! Guess I wasn’t the first to come up with the idea.
    @rahix this is totally awesome 😍 Thanks for all your work, and thanks for sharing!