Click here to Skip to main content
15,885,757 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
AnswerRe: What are your experiences working with 'meaning' in code? Pin
Gerry Schmitz12-Apr-18 5:40
mveGerry Schmitz12-Apr-18 5:40 
SuggestionMaking a dynamic tool system : help, advice Pin
new Human("Carson");10-Mar-18 5:36
new Human("Carson");10-Mar-18 5:36 
GeneralRe: Making a dynamic tool system : help, advice Pin
Richard MacCutchan10-Mar-18 22:17
mveRichard MacCutchan10-Mar-18 22:17 
GeneralRe: Making a dynamic tool system : help, advice Pin
jschell14-Mar-18 16:21
jschell14-Mar-18 16:21 
GeneralRe: Making a dynamic tool system : help, advice Pin
Mycroft Holmes14-Mar-18 17:34
professionalMycroft Holmes14-Mar-18 17:34 
GeneralRe: Making a dynamic tool system : help, advice Pin
Eddy Vluggen15-Mar-18 1:44
professionalEddy Vluggen15-Mar-18 1:44 
GeneralRe: Making a dynamic tool system : help, advice Pin
BillWoodruff17-Mar-18 16:11
professionalBillWoodruff17-Mar-18 16:11 
QuestionWhat is the fastest and bestest programming language for math and games? Pin
mirkocontroller5-Mar-18 3:42
mirkocontroller5-Mar-18 3:42 
Hi!

TLDR:

I want a programming language that fulfills the following requirements:

Musthaves:
1) can compile to small executables that run as fast as C++ (maybe ideally the language transpiles to C++)
2) static typesystem (for speed and cleanness, a C++-like template system is also cool)
3) not a hell of torture and despair to program in
4) free
5) big standard (math) library or c++ bindings
6) compiles on all platforms

Nicetohaves:
- scripting and stepping through the code while debugging
- designed for matrix operations like matlab or julia (so I can write A*B instead of matrixMultiply(A, B))
- usable GPU bindings
- nice graphics and plots would be nice but I'm fine doing that in three.js and communicating via socket

Where famous things fail:
c++: point 3!!
python: point 1, 2
matlab: point 1, 2, 4
octave: point 1, 2
julia: point 1 (such a shame!!! it seemed so perfect!)

Things I did not try yet but might checkout: Go, cython and Felix
I appreciate if you could share any experiences with those and why they might suck for my purposes. And I happily take suggestions if you know the perfect thing for me!


The long story:

I am an engineer and the main things I program are mathematical algorithms (often involving a lot of spacial transformation and trajectory planning and such) and games. Over the years I have tried many programming languages. I started in VB and then moved to C++ at some point. I often go back to C++ when I need the performance but it's just such a pain to develop in it... Just the thing with the h and cpp files which entails that I have to write everything twice is ultra annoying. I know the IDE can assist me but I just want lean code. At university I learned matlab. Developing in matlab is orders of magnitude more pleasant, lemmetellya... However, I can only distribute my code to people who have a matlab license. Which does not include myself anymore. I heard numpy and python are alternatives, so I tried them. They are nice to work with but the code runs terribly slow.

During yet another fed-up-with-all-this look through the internet, I stumbled upon Julia. Julia seemed to have it all. I binge-read the documentation and loved so many aspects about it! UTF-8 source code so you can write a cross for cross product and a dot for dot product! Greek variable names! Scripting and compiling capabilities! Nested for-loops that can be escaped with a single break (so there is actually no reason to use goto anymore Wink | ;) ), matrix operations and functions with multiple return parameters are nice! Arbitrary precision built in! Everything seemed too good to be true! But then, when I wanted to create a stand-alone executable, it created 50 dll files with 200MB in sum for a helloworld program. That's just not cool. I hope the developers tackle this last thing, then it might really become my home language.

So I went back to C++ yet again. This time I tried to nicen it up as much as I could. The Lazy C++ project took the h/cpp pain away. But I didn't want to stop there. I wrote my own pre-pre-processor that does many search-n-replaces with the files that I write and turns them into lzz code (which is then turned into h and cpp). For instance:

func divide maps (int x, int y) to [int q; int r] sothat
	return {x/y, x%y};
endf
which is translated into:
struct divide_result{int q; int r;};
divide_result divide(int x, int y){
	return {x/y, x%y};
}
or
for i from 0 to 9 do
loop

And many things like that. And I'm happy with it, I like the syntax much more than the brackety C++ gibberish. And a lot of typing redundancy is gone. However... I found that - surprisingly - no IDE supports syntax highlighting, code folding and all that for my own code. If the compiler finds an error, I have to check where it is in C++ and then find that place in my code. This extra step becomes annoying over time. Also, my transpiler is far from intelligent and there are many pitfalls that it does happily run into, not telling me what's wrong because it just does regex replaces. And writing a proper parser is just too much work. And also, I feel like I stumble into every pitfall that c++ offers, resulting in much more debugging than in any other language. I know that good practice can avoid much of that but therefore one has to know all the good practices and that takes... well.. a lot of practice.

So. Before I continue my everlasting pilgrimage in search of the perfect programing language, I seek advice in you, dear internet, for I cannot be the only one who has embarked on this quest of disappointment and pain!

Guide me!
AnswerRe: What is the fastest and bestest programming language for math and games? Pin
Richard MacCutchan5-Mar-18 4:07
mveRichard MacCutchan5-Mar-18 4:07 
GeneralRe: What is the fastest and bestest programming language for math and games? Pin
Vivi Chellappa20-Jul-18 2:15
professionalVivi Chellappa20-Jul-18 2:15 
GeneralRe: What is the fastest and bestest programming language for math and games? Pin
Richard MacCutchan20-Jul-18 2:31
mveRichard MacCutchan20-Jul-18 2:31 
GeneralRe: What is the fastest and bestest programming language for math and games? Pin
Vivi Chellappa20-Jul-18 10:17
professionalVivi Chellappa20-Jul-18 10:17 
AnswerRe: What is the fastest and bestest programming language for math and games? Pin
Gerry Schmitz5-Mar-18 8:24
mveGerry Schmitz5-Mar-18 8:24 
GeneralRe: What is the fastest and bestest programming language for math and games? Pin
mirkocontroller5-Mar-18 22:20
mirkocontroller5-Mar-18 22:20 
GeneralRe: What is the fastest and bestest programming language for math and games? Pin
Pete O'Hanlon5-Mar-18 23:22
mvePete O'Hanlon5-Mar-18 23:22 
GeneralRe: What is the fastest and bestest programming language for math and games? Pin
Gerry Schmitz6-Mar-18 5:38
mveGerry Schmitz6-Mar-18 5:38 
AnswerRe: What is the fastest and bestest programming language for math and games? Pin
Eddy Vluggen6-Mar-18 5:55
professionalEddy Vluggen6-Mar-18 5:55 
AnswerRe: What is the fastest and bestest programming language for math and games? Pin
jschell10-Mar-18 10:20
jschell10-Mar-18 10:20 
AnswerRe: What is the fastest and bestest programming language for math and games? Pin
Member 1377603012-Apr-18 3:57
Member 1377603012-Apr-18 3:57 
QuestionHow can certain languages hold 96-bit values? Pin
deXo-fan25-Feb-18 1:27
deXo-fan25-Feb-18 1:27 
GeneralRe: How can certain languages hold 96-bit values? Pin
harold aptroot25-Feb-18 2:09
harold aptroot25-Feb-18 2:09 
GeneralRe: How can certain languages hold 96-bit values? Pin
deXo-fan25-Feb-18 2:58
deXo-fan25-Feb-18 2:58 
GeneralRe: How can certain languages hold 96-bit values? Pin
harold aptroot25-Feb-18 3:42
harold aptroot25-Feb-18 3:42 
AnswerRe: How can certain languages hold 96-bit values? Pin
Eddy Vluggen25-Feb-18 4:58
professionalEddy Vluggen25-Feb-18 4:58 
QuestionOPENID Connect Sharing Token. Pin
idreesbadshah20-Feb-18 1:04
idreesbadshah20-Feb-18 1:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.