Better HN
topnewbestaskshowjobs
Log inSign up

macgyverismo

90 karma · joined Oct 12, 2019 (7y ago) · 41 submissions

news.ycombinator.com@arjanhouben.nl
Submissions

comment 2mo ago · link · parent

I have come to think of this in the context of 'you can lead a horse to water (but can't make it drink)'. Good therapy is exactly that. There is surprisingly little personal knowledge needed to help someone. It's mostly about steering someone away from negative feedback loops. As much as I believe in human interactions, I actually think that LLMs can be helpful in this regard, provided the LLM provider doesn't prey on us. That last part is why I'm reluctant to advise people to use LLMs for these use cases. I feel that this is not a technical problem, more an alignment issue. Not of AI, but of other people. (in the form of big tech)

comment 4mo ago · link · parent

That explains it. I guess my actual question was, why would you prefer submodules over fetchcontent :)

comment 4mo ago · link · parent

Why use git submodule, when the repo already use CMakes Fetchcontent?

comment 7mo ago · link · parent

honest question, do you not care about/take into account the negative externalities such as animal suffering and/or environmental impact?

comment 7mo ago · link · parent

I have to say, since CMakes FetchContent module has been available I have not had a need for a dependency manager outside of CMake itself.

What exactly is it you do/need that can't be reasonably solved using the FetchContent module?

https://cmake.org/cmake/help/latest/module/FetchContent.html

comment 7mo ago · link · parent

I think this video nicely articulates something modern software has lost. Modern software does not feel like it was meant for you. No longer a tool for you to use. I am hopefull we will bring some of that back.

7.

The kenopsia of dead software [video](youtube.com ↗)

2 points · by macgyverismo · 7mo ago · 1 comment

comment 8mo ago · link · parent

It's not criminal as the power usage is (assumed to be) paid for. It is criminal or at least problematic that the cost of power does not include (negative) externalities, we should strive to change that.

9.

Datacenters behaving like acoustic weapons [video](youtube.com ↗)

2 points · by macgyverismo · 9mo ago · discuss

comment 1y ago · link · parent

Lovely article, I am amazed at the lengths compilers go through to get the best performance. Thanks for writing this!

Reading the part about pure functions (including the extension [[gnu::pure]]) made me feel that this is a part where the C++ default is actually wrong. Not just because it could be better/hindsight/other languages have it/etc. but because it is in conflict with its own motto, don't pay for what you don't use. I really hope I can enable a compiler flag some time in the future that would make my variables const, and my functions pure by default.

comment 1y ago · link · parent

I can see how the author came to the conclusion that libmodem written in rust would have prevented the issue, but isn't it simply pushing the problem further down the stack?

The author needed to use unsafe in order to pass his pointer to libmodem, but libmodem is going to require a pointer with static lifetime itself. Which would have prevented the issue in the first place had the author done this.

I can see why you wouldn't want to use static, it hinders testability, but that means you need to ensure that the pointer you supply libmodem outlives libmodem. I would use RAII to do that in C++ and I am sure in rust you could/would do the same.

I guess I am asking, is there anything here that a libmodem written in rust would have magically solved? It feels like wishful thinking, but I am open to learn where I am mistaken.

In any case, kudos for finding this bug. Having worked with Zephyr/NRF connect SDK and this exact chip myself I can definitely relate to the pain they (can) bring.

comment 1y ago · link · parent

I'm sure, but could you point me in the direction of these tools? I would love to supply GDB with some aliases for much used templates so I can have less verbose outputs

comment 2y ago · link · parent

I love it too, it tends to bend to my will, for better or worse. It feels like it doesn't stand in my way, and that further translates to feeling like there is nothing between my program and the hardware it runs on.

No need to school me on how that isn't true, I'm just describing my feeling and why I love C++.

comment 2y ago · link · parent

This is what keeps tripping me up, it is very difficult to be both general and not opinionated. C++ is general, you can use it however you want. Especially in many unsafe ways. Like it or not, this is great news for a general low-level language. A language that tells me how to build, where my files should live and what tools I am to use may be a great user experience, it is not very general. Still not sure what to make of this and where I land on this.

comment 2y ago · link · parent

The comment in your frobulate code suggests one is to forbulate, yet reading The code it is very clear that there will only be frobulation happening in the outlined proceedings. Perhaps a minor revision is required.

comment 2y ago · link · parent

That matches the 'static_assert' portion of my sample code. The implied claim of the parent I replied to was that rust could do this even for runtime values, such as the one I am using in the main of my sample. In c++ it is the same function running both the compile time check and the unchecked runtime variant, so there is zero overhead at runtime. I can't possibly think of a way how rust would be able to make the same code in my sample safe without adding runtime checks. If I am mistaken here I sure would like to know.

comment 2y ago · link · parent

can you show me how rust does this? I'm genuinely curious. I've made a toy example to show how c++ checks for undefined behavior at compile time, I am unaware of rust being able to do the same without runtime costs (however small they may be, this is a toy example after all) https://godbolt.org/z/cT9bqz8z7

comment 2y ago · link · parent

This borrow checker runs at runtime, which I find not as interesting. Everything starts to look a lot like std::unique_ptr which I think is mostly unneeded as it ads pointer indirection.

Could someone explain to me when one would use this? Is it for educational purposes perhaps?

comment 2y ago · link · parent

I feel your pain. For me the biggest hurdle was taken away once I realized the following 3 things:

- everything in Rust-land is named differently. They are not different, but use different names.

- nothing wants to be a value

- nothing is implemented by default.

If you can get those 3 items in your brain, you can start thinking in Rust. Coming from one c++ dev to another; You may still not like the language. I know I dont, even though I agree with the premise that defaults should be ‘safe’

comment 2y ago · link · parent

I've had an electric one (heater in the base) for more than 15 years and it recently broke in a way that was not repairable. I really want to buy a new electric one with a reasonable volume, but they seem to be very rare. I'm thinking of brazing a heater element to a normal one, the automatic shut-off feature and consistent temperature profile is a must-have for me.

comment 2y ago · link · parent

I started using this library last week. It was easy to get started and running. When I wanted to do stuff beyond the provided example I found nothing worked as I had expected. For example, you supply a user pointer when you create a lws_context. There is a user pointer argument in the callback where you do all the actual work. One would expect these to be the Same, but they are not. Instead you have to use two different calls to get from your current connection to the user pointer which is set for all connections. Did it work? Yes. But it was very suprising behavior. Another problem I ran into was getting the event loop to be non-blocking for use in a coroutine. Appearently I was expected to use one of the preselected event libraries, which I was not. I was expected to implement a dozen or so callbacks for which there was little or no helpfull documentation. Eventually I found that there was a hack where I could pass -1 to the timeout parameter. Now the service call was non blocking. It would have been fine if the call had blocked for a millisecond or so, but that did not work. So the time-out parameter was either -1 or any other value. I kept bumping into suprises like this. The library solved a problem for me, so I will continue to use it. Unfortunately I cant recommend it to anyone unless you are willing and able to spend a good portion of your time getting this beast tamed.

comment 2y ago · link · parent

I have played with this idea on and off over the last few years. For c++ mind you. I have started a few times writing such a thing and each time ended up concluding I was making it way too complex. I wholehartedly agree with the idea/concept, but the implementation feels to complex for my taste.

comment 3y ago · link · parent

There is work done one this. search for: software defined microwave (SDC)

comment 3y ago · link · parent

This was very much in line with my own thinking, or at least that is what I suspect and can’t know for sure.

With the recent AI buzz I got to think, maybe the keep from the story are higher level concepts that exist only after the underlaying layers have been trained and can therefore not be adressed before.

comment 3y ago · link · parent

I’ve been using this technique as well, but I found that debugging static_asserts is quite hard. I often fall back to calling the failing test at runtime and stepping through. Any suggestions for a different workflow?

comment 4y ago · link · parent

They need atomic operations which can still stall most of your massivly parallel machine.

comment 4y ago · link · parent

I love the creative use of the rolling shutter, instead of seeing it as a downside, they turned the line-by-line nature of the sensor into sample rate multiplier.

28.

Lead Acid Alternative Battery(gelion.com ↗)

1 points · by macgyverismo · 4y ago · 1 comment

comment 4y ago · link · parent

earnest question; why would I use this instead of graphviz?

comment 4y ago · link · parent

Let’s play devils advocate; does it return a filtered list, does it change itself or both? As clear as it may look at first, I still would have to look in the docs to find out.
12