Algorithmic solutions Leda - algorithm

There is a LEDA program.
http://www.algorithmic-solutions.com/
which basically provides GUI to algorithms. I d like to get into that, I was curious if I can code with C# or JAVA for LEDA. I have looked at their website and googled it. But i didnt see any other languages beside c/c++,
Does anyone know if i can use C# or Java for LEDA?

LEDA is a C++ library. You could, theoretically, write wrappers to use this from Java or C#, but there are none included.
All of the samples will all require C++.

Related

Is there a way to create a GUI in Lua?

I am working on a Genetic Algorithm solution to TSP in Lua, and have reached a point where I need a better method of troubleshooting and checking results. The best way to do this would be with a GUI, but I can't seem to find anything about GUIs in Lua.
I've done some searching around Google, and haven't found anything built in to the language. I have found Toolkits such as the one found here:
http://lua-users.org/wiki/GraphicalUserInterfaceToolkits
However, I am new enough to Lua that I do not know how to properly use these. Any help on the matter would be greatly appreciated.
A few ideas:
But first, what platform are you on?
Are you constrained by platform? If not, I've done very exciting things directly on an iPad, in Codea. Pure Lua, built on OpenGL, so built-in API for graphics support.
Beyond that, you could probably use Love2d. It's meant for game dev, but you could probably adapt it to your needs. It's a Lua API, has graphics support, and is cross-platform. I don't know much about it (yet), so others could pipe in with their thoughts/opinions.
If you are still shaky in Lua, I suggest to stick to the console for a while. GUI, whatever the language, is usually messy and unsatisfying for beginners.
If you already know some HTML and Javascript, consider using Lua with a web framework, and using the browser to control your program through a REST API:
Awesome-Lua#Web/Networking Platforms
Apart from that, I have yet to find a GUI framework that feels right for Lua. Almost everything is a thin wrapper around a C or C++ API and handles exactly like that. On the other hand, with the web and Electron on the rise there seems little need for it.

Where can i find code for a compiler?

So I am trying to make a small programming language as a project. But the thing is I have no clue how to begin. I know how a compiler works and all but don't know how the code would be written for it. I searched everywhere for example for the code of any compiler but couldn't find anything. Where would I find this, or could someone explain to me the format and method I should use for creating the compiler? Also if you were wondering I am thinking of using c++ for writing the compiler.
I recommend taking a free online course in Compiler Construction. Guided material and thoughtfully designed coursework is the best way to ease into this sort of thing, in my opinion.
LLVM.org; open source modern C, C++, Objective-C and more

Find links/relationships between 2 variables/objects in the code

EDIT:
I found that doxygen can generate call graphs for classes, but I could not find any options or examples where the call(er) graph is generated for public/private members of the class(es) such as fields, methods, etc.? See the example that I provided below.
Is it possible to find links/relationships between 2 variables/objects in the code using some IDE tools and code editors, i.e. in Visual Studio, Sublime, etc.
e.g.
a=func(b,c);
w=func(a,c);
Here w and b are indirectly related to each other.
In convoluted code it is very difficult to manually find such relationships.
I understand that reflection and dynamic nature of some languages can limit such analysis.
You need to provide the language you are looking to use. If I take a guess and say C/C++ you can use CCTree and Cscope in general for this functionality. Most open source developers use Cscope extensively for this purpose.
Eclipse CDT also has call graph's. It is a bit of a pain to work outside of VisualStudio for this purpose I know. But cost is part of the reason to use open source instead.
Your best bet to cover all languages for the purpose of browsing is Exuberant Ctags. This works with a fair amount of editors and all the languages you listed. With that large a list of languages and use cases its probably worth your time to learn either vim or emacs and the integrations supported here.
For Python you can also take a look at pyscope with cscope. Another excellent alternative for Python is Rope. Rope supports finding definitions and usages as part of its standard set of tools.
Most developers do not need CCTree as browsing code bases with cscope is relatively straightforward. I have used exuberant ctags + emacs on a huge variety of language for years. It takes a touch of time to learn, but the upsides are
it's free, portable, and powerful. Another alternative to CCTree is codegraph for some of your target languages.
Found a list of tools and comparison:
https://github.com/OpenGrok/OpenGrok/wiki/Comparison-with-Similar-Tools
EDIT
possible in doxygen, but only for classes and their relationships
I found it, this is code map in VS Ultimate:
http://blogs.msdn.com/b/visualstudioalm/archive/2014/11/12/announcing-visual-studio-2015-preview-availability.aspx

Programming Unity Games with Ruby

So I see that unity has the support for c#, JS and Boo.
I could learn one of these but I would like to make a 'compiler' or something similar that would let me write ruby code and either output JS code or make a layer that could be read by the Unity compiler.
Is this even a possibility. Im willing to invest many hours in this and have a fair bit of experience.
If your question is actually "how do I compile Ruby to JavaScript" then that's easier to answer:
Opal: Ruby to JavaScript compiler
However, you're going to be mucher better off learning one of the supported languages. It's very hard to debug "your" code when what's running is a paraphrasing of the code in another language.
I'm not that familiar with C# but if it's anything like C, it's quite possible you could create bindings from Ruby to Unity and just use it directly. Likely you could even get some kind of community going. This would be much preferable to trying to auto-refactor languages.
I recommend the "play my code" site.
It is possible to "conpiles Ruby to JavaScript", to operate the Ruby Game in a browser, just as JS.
http://www.playmycode.com/build/edit/6172
Unity 3d doesn't use Javascript, i think unity corporation call it as javascript just for marketing purposes, Unity uses UnityScript which is Boo based implementation, you can see the source here https://github.com/bamboo/unityscript
So, even if you got some compilers ruby to javascript such as Opal, you'll still compile it to JavaScript and not UnityScript, there's a big diferences between them:
Javascript is a prototype based language, and UnityScript is an class based.
UnityScript is more JScript.NET than Javascript.
See more at http://wiki.unity3d.com/index.php?title=UnityScript_versus_JavaScript
I think the easily way to integrate ruby language rather to write a full compiler is integrate IronRuby, which is a Ruby implementation written in C#, which will generate bytecodes for CLR that Unity can read.
I did a similar project with python, which uses IronPython (https://github.com/cesardeazevedo/Unity3D-Python-Editor), it's still very limited, such you still have to call python code from C#, but it works and there's a interpreter that can help you in your development, if you want to create thousands of game objects with simple python commands.

Need a secure Cross platform gui language

It may sound like a lot, but I am looking for a language that is cross platform that I can compile into a single stand alone exe. The source code needs to be secure (Not just hidden) and have some sort of gui toolkit. Do any exist?
In C++, I know 2 cross-platform UI toolkits: Qt and WxWidgets.
You won't find a language with more GUI toolkits or that is more cross-platform than the C programming language.
In python here is the list cross platform gui
For Java you can use Swings and AWT
Well, your source secure is a problem - how do you define secure and why do you think you need it like this?
Cross plattform with only one compilation - hits only on .NET/mono and Java, both not interpreted, but work with a intermediate compilation of some sort of VM. Code can be relatively easy decompiled, though it can be obfuscated.
Cross plattform with compilation for every plattform is far easier, with C, C++ and many many more your have a great choice. You could then watch out for your GUI-Toolkit of choice and check the languages that have bindings for it.
I use REAL Studio (formally REALbasic) for creating standalone cross-platform applications. The apps are also compiled and fully native, so it sounds like they would meet your definition of secure.
And REAL Studio is a lot easier to start with Qt (unless you already happen to be a C++ expert).

Resources