forum-msg-id-133415-edit
Original date:2019-01-13 22:22:57 Edited by: ghaberek Subject: Re: Some initial clarifications
Holy cow there's a lot to unpack here. Everyone's provided some great answers so far; I'd just like to throw my hat in the ring as well.
I am going to continue the work I did some years ago in C++, and I'm trying to find the best language/environment for me. I want to implement algorithms for clustering and genetic algorithms.
Shameless plug: if you're fluent in C++ and want to burn some brain cells knocking out some code, I sure could use some help on wxEuphoria.
At the time, I was fighting the language, more than using my brain cycles to solve the problems at hand. I was almost decided to go with Pascal, but then saw Euphoria in my bookmarks and decided to read more about it.
Just curious, where did you come across Euphoria? Was it recently? I've been dropping hints over on Reddit at r/learnprogramming.
As I'm looking for simple things in life and oE and Phix seem to fit this initial requisite, there are some more questions I'd like some explanation.
I appreciate the simple things in life. Alan Kay once wrote, "simple things should be simple, complex things should be possible." Words to live by.
1. In C++, I used vector (and arrays) containers as I needed to make computations between the 2D place of a element in a matrix and its eight neighbors. For that vector and arrays, as they are random access very fast fitted the necessity. Is it possible to do this in oE with equivalent speed? I don't mind 30 or 50% more execution time, but can not tolerate ten times more.
You should have no problem implementing this in Euphoria. You'll find it quite fast and with the Euphoria-to-C translator, you'll speeds equivalent to hand-written C.
If you're curious how the translator works, Rob Craig posted some excellent notes on its internals years ago: Translator Internals (Jan 27, 2007).
2. I've seen the most recent speed benchmark in the forum. Are there any other more intensive benchmarks comparing oE to C or C++ in respect to speed and memory use?
Not a whole lot but there are some around. Check out Interpreter Benchmarking, Interpreter Benchmark Results and Profiling.
One thing to keep in mind is that there is a huge advantage to using high-level language like Euphoria or Python due to the safety and simplicity they offer over inherently-complex languages like C or C++.
Even though the execution speed might be a bit slower, reducing your development and debugging time is often worth the speed trade-off.
3. Have no experience in parallelism and in C++ looked hard for me that have no formal education in programming. I know the subject is not easy for many kinds of work. In oE, is it simpler than in C/C++?
It doesn't look like this been adequately address yet in this thread: Euphoria has cooperative Multi-tasking, which only ever uses one thread to do some fancy context-shifting within the application.
It really just interleaves your functions, so instead of running steps A-A-A-A and then B-B-B-B, you can run A-B-A-B-A-B-A-B.
Not Categorized, Please Help
|