• Welcome to PlanetSquires Forums.
 
Main Menu

Recent posts

#81
General Board / Re: Request to Paul
Last post by Paul Squires - February 13, 2024, 03:04:41 PM
Quote.... that sounds like "where there's light, there's shadow".
Great quote!

I know enough of Rust and Svelte to be able to build my cross platform application using Tauri. However, I am stuck with the problem that Rust does not seem to have any extensive libraries to interface to my Interactive Brokers account. My interface is in C++ and my current application is 100% written in C++ (https://tradetracker.planetsquires.com). I guess I could try to integrate my C++ code to call Rust via the FFI layer but that is an experiment for another day and introduces yet another layer of indirection.

I am going to look at this github project (https://github.com/webview/webview) that uses C++ to interface with Webview2 on Windows and WebKit on Mac/Linux. It uses C++ and according to the github page "It supports two-way JavaScript bindings (to call JavaScript from C/C++ and to call C/C++ from JavaScript)."  This could be exactly what I need and it seems somewhat similar to Tauri but uses C++ instead of Rust. I expect though that maybe there is a lot of missing "magic" that may be needed.

If that option does not work out then I think that I will simply stick with the tried and test qt framework development using C++ and qml. Although, I really wanted to build the front end of the application using web technologies this time.

If nothing else, at least I am learning a few new things and keeping my programming brain engaged  ;D  ;D




#82
General Board / Re: Request to Paul
Last post by Joerg B. - February 11, 2024, 05:48:42 AM
Hello Paul

.... that sounds like "where there's light, there's shadow".
Just as you described Rust, there is an advantage to cross-platform programming.
If you get stuck in your work, it often helps to take a break to get back on track. ;)
#83
General Board / Re: Request to Paul
Last post by Paul Squires - February 10, 2024, 02:19:08 PM
I am not 100% sure that I will continue with my Rust journey at this time. I need a specific interface to my stock trading platform and all of the Rust implementations of it are not exactly what I need. I may just stick with C++ in order to make my project cross platform.
#84
General Board / Re: Request to Paul
Last post by Paul Squires - February 02, 2024, 09:28:57 PM
I just noticed that Slint (slint.dev) has a C+ api so if I fail at being proficient with Rust then at least I can fallback to C++ for the Slint option. I guess I could use an older toolkit like wxWidgets or Qt but that would be a last resort.
#85
General Board / Re: Request to Paul
Last post by Paul Squires - February 02, 2024, 04:26:20 PM
Hi Joerg,

My opinion is that you need to know a low level language like C or C++ before engaging with Rust. Rust is harder to learn than C.

Rust is a low level systems programming language and as such takes it for granted that you know things like heap and stack memory management, and pointers/references, etc. I am finding that coming from C++ to Rust is not that bad of a transition (so far) although there are a few things that are new to me like the borrow checker (by far the biggest new feature to learn) and the way that methods can be chained together all in one call (kind of like functional programming ala Haskell). C++ has started doing that kind of programming syntax as well so I need to adapt to it.

I can see why there is so much hype around Rust. The compiler basically enforces everything at compile time so you can not make memory corruption mistakes. There is no such thing as Null pointers. It seems like constructing a program takes more time, effort, and thought upfront but the payoff is a more secure and performant result.

Hopefully I will get good at Rust because I want to use it to help write cross platform applications with either Tauri or Slint.






#86
General Board / Re: Request to Paul
Last post by Joerg B. - February 02, 2024, 03:24:19 PM
Hallo Paul

Do you think that Rust, which is based on C, is easier to learn than C?
I admit that I didn't know Rust as a programming language before.
#87
General Board / Re: Request to Paul
Last post by Paul Squires - February 02, 2024, 09:42:23 AM
I have been programming in C++ pretty much exclusively for the past 6 months. I feel pretty good about my C++ skills at this point. I am now switching to learn Rust. I think that once I learn Rust, that I will have enough languages in my toolkit to serve me long term (although I wouldn't mind trying Go also).
#88
General Board / Re: Request to Paul
Last post by Paul Squires - January 25, 2024, 10:21:19 AM
Yes, health is everything. I've had a couple of big health scares over the past 3 years. Makes you appreciate life and those close to you.

Fingers crossed that your health improves by retirement also!
#89
General Board / Re: Request to Paul
Last post by Joerg B. - January 25, 2024, 09:58:26 AM
Hello Paul

I'm glad to hear that you are doing well!
Now that you are retired, you have plenty of time to deepen your knowledge and understanding of C++ :-)

I don't officially retire until 01.12.2026. ;D
Unfortunately, I can't say the same for myself.
God willing, I'll get well again. :)
#90
General Board / Re: Request to Paul
Last post by Paul Squires - January 25, 2024, 09:00:56 AM
Hi Joerg!

Thanks for the post. Yes, everything is good with me. I retired the first of December and have been doing C++ programming almost non-stop since then. I really wanted to get a better understanding of the language and try to become somewhat proficient in it. As you can see, my FreeBasic / WinFBE work has fallen off a bit because of that.

Hope all is well with you also!

Thanks,
Paul