Hacker News new | past | comments | ask | show | jobs | submit | thidr0's comments login

SEEKING WORK | Pittsburgh | C++, Python, Robotics/Automation

Need help building or scaling your robot software? Need to rearchitect a prototype into a product and pay down some technical debt? Need some advice on best practices for robotics programming?

I can help with everything from high-level system architecture, to ROS programming, to pulling off the 3D math required to get your robot moving.

A Carnegie Mellon grad with expert C++ and Python skills, I’ve programmed robots as a robotics software engineer for over 8 years. Additionally, I can tap my network of roboticist friends can help solve any challenge.

Send me an email with a bit more about your problem or goals and we’ll go from there:

hn@fpw.33mail.com

Note: able to assist with other C++ or Python work if robotics isn’t your industry. Just ask!


Oddly, the worst response rate came from “no response needed.” Better not use that one the next time you want a response!


At least in C++11 and later, many classes of these memory bugs are eliminated with more modern container and pointer types. It’s not uncommon to have a company policy of not using “new” or “delete” anywhere.


Equating C with modern C++ is a common sleight of hand for rust evangelists. Most modern C++ projects with a fresh codebase have almost 0 use of new or delete. It turns out that C++ is a lot better than it used to be 10 years ago.


The problem is which modern C++ projects?

Android source code is definitely not one of them, and yet Google as ISO C++ contributor should know all about modern C++, right?

Ah, what about Microsoft and their UWP code samples for C++ developers, or the C++/WinRT based libraries?

As advocates from C++ Core Guidelines, surely those samples will be perfect examples from modern C++, right?

Or what about Bloomberg, with heavy contributors like John Lakos?

Maybe they are still in the process of adopting C++11 and C++14, while writing a book about language adoption issues.

I like C++ a lot, but we really need a compiler switch to turn off compiling Vintage C++, it would be marvelous.


Every single codebase you have just cited here (except for the nebulous "advocates from C++ core guidelines") is older than the Rust language. Look at high frequency trading code or maybe recent game engines for good C++ projects - I don't know if any of these are open source.

I 100% agree with breaking C compatibility, breaking ABI compatibility, and turning off vintage C++.


C++/WinRT is from 2015.

C++ Oboe SDK for Android was initially released in 2018.

Android Games Developer SDK was just released last month.

What game engines? Lumberyard , Unreal and Godot certainly not.

Vulkan C++ bindings from Khronos or Dawn for WebGPU? Also not.

The only modern C++ I can find in real life are at CppCon and C++Now talks, and books promoting it.

Even Bjarne Stroustroup has recently on a interview mentioned how he is disappointed how C++ Core Guidelines keep being largely ignored by the community.

There is even, yet again, a paper from him trying to advocate for better C++ on the next C++ mailing.


C++ is definitely better but it's still not memory safe. Compared to Rust, you still have little tracking which thread has access to which variable at which time. Even in modern C++, you still have to care about iterator invalidation.


It's far from done, but the GCC static analyzer actually can find iterator invalidation!


Some of it. Because a sound analysis would throw FPs up too frequently, they make the logical decision to use an unsound analysis. This is helpful, but cannot prevent the entire class of issues.


Having no instances of new or delete does not, in any way, prevent the entire class of memory vulnerabilities. Running off the end of a buffer when processing untrusted data is just as easy. Heck, you can still absolutely get UAF issues even if you never allocate on the heap simply by holding a reference to a stack allocated object past its lifetime. Given how weird the rules around lifetime extension are, this can happy is really really subtle ways.

C++11 is not a safe language. Not even close. It is much much much better than what came before, but it is not safe.


While unique/shared_ptr alleviate some of these issues the STL is still full of UB though, and that can’t be fixed easily.


What proportion of C++ code is "modern"?


It's still quite easy to have memory safety bugs in modern C++ though.

For example, std::string_view is basically a pointer, as soon as it points to a string that went out of scope you're in trouble if you use it again.


Another one is std::span, that contrary to Microsoft's gsl::span, WG21 decided it was a good idea not to do bounds checking.


The C++98 (Win32/MFC) codebase that I ocassionally touch has a lot of ill-designed abstractions in it, and is full of potential memory problems, but at least one can halfway see what's happening, and a full rebuild of the 30 years old codebase can be done in < 10 minutes.

Not sure if it's worse than the impossible to grok and slow to build C++11+ codebases that I've seen - everything is wrapped in unique_ptr and shared_ptrs, add lots of unused overloaded constructors and methods for every const and copy/move/value construct situation, then add an icing of templates. The trend is to assume that problems are solved by wrapping everything in more layers. But it seems like this ends in maybe fewer memory problems but also a lot less useful functionality, makes it a lot slower to build, and makes it so much harder to add, change and fix stuff.

The best code I've seen uses very, very few C++ features (if any at all) and just gets things done in a straightforward way without celebration.


Pattern matching is one of my favorite things about Haskell. But seeing it done here in a dynamically typed language is a more than little clunky (three indents needed to get to an expression). It would be better to be matched on the parameter list, but again Python’s typing would make that too difficult.


I think it works very well in Elixir which is also dynamically typed. It was there since the beginning though and it's more than just a "match/case" construct, it's built deep into the core of the language, so maybe that makes a difference


The two-space compromise might work:

    def handle(command):
        match command.split():
          case ["quit"]:
            print("Goodbye!")
            quit_game()
          case ["look"]:
            current_room.describe()
It'll be a bit odd, though.


I have never really pushed hard on style in my software journey. But this is different. That code sample is horrifying.


You need a friend to join you on the call to be able broadcast? I’d have a very hard time doing that, but would love to just talk into the ether solo. Creates an unnecessary network effect barrier IMO.


Live proxy


Could it become a violation of their API TOS if too many people use it (ie too many api calls in a minute)


The server is written in JavaScript, yes. But I don’t believe there is any client-side JavaScript


Yea, the server side is running on Node.js (with Pug template engine), but the client-side doesn't have any JS whatsoever.


Which also means that under heavy load, the server just crashes generating templates for that many users instead of just serving JS and rendering on the client-side. There's a reason we do things like this nowadays.


In my experience, this is not much of a problem. Server-side rendering is not that expensive, and can easily serve high volumes of users. After all, it has been used for decades, and is in continued use by most major sites. There's no significant performance difference between rendering HTML and rendering JSON.

Furthermore, there are easy ways to mitigate the cost of rendering on the server side. For example, on a site like reddit, most of the traffic is probably non-logged-in readers hitting the front page, so... cache the front page. Even for logged-in users, the front page listing only could be cached as rendered, since none of it really needs to be live. If liveness was desirable for only certain elements (e.g. voting buttons), it is possible to sprinkle on client-rendered elements.


but... then it would be the thing it's trying not to be.


I agree —- I find the Haskell IRC very friendly, even to the point of helping people do research and figure things out instead of just dropping answers. And there’s a beginners IRC for all those stupid questions I have


The Haskell channel(s) on the FP Slack (https://fpchat-invite.herokuapp.com/) are also exceptionally welcoming and I've seen people go above and beyond helping people again and again.


I track my budget in Sheets. I have some AWS Lambda functions that IFTT calls to update the sheets with new data


I'm interested in hearing more about this setup. What triggers the IFTTT calls and what do the Lambda calls accomplish?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: