I am writing a big project in Julia at the moment and the only option that I found to debug this code is Debug.jl. It is sooo(!) overwhelming to debug this code without a debugger like the one MATLAB has.
Are there any such debugging tools? I could adopt them even if they are in alpha stage.
Anyone has timeline estimates as to when they are planned to appear?
There is work in progress by Keno Fischer (one of the core Julia developers) on a debugger called Gallium.jl.
This is a very complicated piece of work, due to the nature of Julia as a JIT-compiled language; for example, as one piece, it will include a C++ REPL! As I understand it, there are still some technical issues that prevent it being used, but it will hopefully be available for general consumption "soon".
See this video for a demo, and this discussion on the julia-dev mailing list for the latest news.
Related
I apologize in advance for my overall "noobness." This is my first question on stack overflow, and I am quite new to Qt, and game editor programming as well. That said, I do feel that my programming skill is not too far behind.
I've been looking for a question like this for two days, both on and off this website, and haven't found a single one. That could be because I don't know the right words to describe what I'm looking for simply.
I am beginning to build a simple game editor and engine with Qt. Please do not give the response of "Do you really want to make a game editor/engine" or "don't". I have my reasons why I am sure this is what I want to create. My question has to do with the "export to executable" or "build" feature that editors have. I've been trying to wrap my head around it, but I don't know how I would even begin to make that work. For all I know it could be one line of code, or ten-thousand.
Can someone please just point me in the right direction for what kind of programming I would need to do to make that work? If it's difficult and involves concepts I don't already know, that is actually kind of a good thing, because it means more learning for me. I just need some direction.
Thank you!
Alone "If it's difficult and involves concepts I don't already know" is enough to close this question. As if we know what you know and don't know...
Game editors are in general separated from the actual game building process that creates an executable as the final product. This is due to the overall complexity of putting all parts of the production chain into a single piece of software.
That said you can "connect" an editor to the building tools that you have to use in order to produce an executable. There are examples for this like the Unity SDK (including Unity Engine, Unity Editor etc.).
A huge exception to this general practice is Adventure Game Studio, which went open-source since not that long ago. I do believe that AGS is using .NET and C# in particular. It is almost all-in-one package including a built-in tool for generating executables from its custom language and adding the engine to it. It seems that this is what you are looking for though the complexity of such piece of software might be intimidating. If it's too much you can of course simply try to seamlessly add external building tools to your editor. Qt Creator is a nice example for this as well as probably 99% of all IDEs out there - editor simply provides the interface to interact with the building tools which are not part of it.
Last but not least you have to consider the maintenance that will be required in the future. Integrating the building infrastructure in your editor might seem like a good idea at first however what happens when you want to replace relatively large chunks of code in either your editor or this same building infrastructure, or even in both? My suggestion is to create the editor and just add an interfacing mechanism to existing building tools, which can easily be changed without ruining your editor's code or the one that represents your set of building tools.
In practice game editors do not build games to executable, they merely package game scripts and resources into a format the already implemented game executable can read. The game executable is not created by the game editor, it is implemented conventionally.
That being said, you might want to compile game scripts to native - in that case you must bundle the used compiled with the game, and invoke it from a child process to compile the script code to a shared library plugin, which you can dynamically load and use in the game engine. There is no magic here, whether it is a game or any other application, it is the same basic stuff.
In short, the game editor does not build executables - compilers do. Not unless you want, in addition to a game engine, also create your own C++ compiler too ;)
I am currently considering writing a small game. It is essentially a map where you can zoom out and in, and in certain places click on info boxes where, at some point, I hope to integrate minigames. Granted, game might be overstating it. Think of it as an interactive map. The theme is how mathematics can be applied in peoples every day life to raise awareness on the usefullness of mathematics.
The question is how I as fast as possible can make a reasonable prototype. If I recieve enough positive response on this I might try to code "the real thing" and use the prototype to obtain funding.
However, I am at a crossroad. I want something to work rather fast and have some C++ experience coding optimization problems, mainly in c-style. I am not convienced, though, that coding it in C++ is the fast way to obtain a prototype. Though I have some experience coding in C++, but have no experience in coding any sort of GUI.
As I see it there is a number of possibilites:
C++, possibly using some library, such as boost or ???.
Start out purely webbased, using e.g. HTML 5 and java.
Python
C#/.NET
Others, such as?
I have to admit I have little experience with anything besides C++ and the STL.
So my question to this wonderful forum is basically, is there a language that provides a significant advantage? Also, any additional insight or comments is more than welcome!
Python is a simpler language than C++, and for prototyping it will help you focus on the task at hand. You can use Pygame, a game library built on the excellent cross-platform SDL library. It provides 2D graphics, input, and audio mixing features. SDL is mainly a C library (and thus compatible with C++), and there are a number of very useful libraries that integrate with it:
SDL_image for loading images in various formats
SDL_ttf for rendering text using TrueType fonts
SDL_mixer for audio mixing
SDL_net for networking
SDL_gfx for graphics drawing primitives
So if you prototype in Python using Pygame, there is a reasonable chance you’ll be able to port what you make over to C++ with minimal hassle, if and when you choose to do so.
Possible options:
Go with what you know the best. Anything else will require a learning curve, which may be weeks to months long. If you're willing to take that road in order to make your prototype, then there are some really great tools available.
BlitzBasic is a good way to go, and is basically designed to be for games
I've done little games in Java using Slick2D - but you'll need good grounding in object-oriented coding to work effectively in Java. If you've got that from C++, then you can see a tech demo I built in Slick2D called Pedestrians. It's open source, and has demo videos here.
You might also ask your question on https://gamedev.stackexchange.com/ - a Q/A site dedicated to game programming
This question is inspired by the remark of Duncan Murdoch on the r-devel mailing list in response to a bug report about Sweave :
This is fixed in R-patched. (It would
have been fixed in 2.12.0 if more
people tested the betas...).
Honestly, I've stayed away from beta -aka development- versions for a number of reasons, and these are reasons I hear from more people :
I am a bit horrified it would
somehow cause conflicts with my
current R distribution. As I need it
for work, having to repair it regularly would be a loss of
time I can't explain to my boss
I wouldn't have a clue how to test
efficiently. I reckon every test I
could come up with has already been
run by the development team.
I still find it difficult to figure
out when something is a bug, and
when (most often) it is my own
stupidity kicking in.
But as I understood, it would be a valuable contribution to the R community, and I'm willing to do my bit of the testing as well if I can fit it somehow into my own work. I was thinking of keeping the beta on the side and running my scripts through it as well as a checkup. Saving the constructed objects allows a quick and easy all.equal() to see if something is wrong.
Anybody some more/better ideas on how I could help testing with a minimum amount of effort and a maximum amount of efficiency?
I'd also like to promote this a bit more on our department as well. Apart from the "It's time to give back to the community", any other good reasons why testing betas is worth the effort? How can I counter the arguments given above?
Edit:
As Dirk Eddelbuettel pointed out in the comments, part of the deal is preventing the path variables in Windows. I have some ideas on that, but pointers on how to practically organize your computer for testing R-devel versions are greatly appreciated as well.
I fear you misunderstand. This may not be straightforward or obvious at first so maybe this helps:
"patched" is not "beta". Patched is what R 2.12.1 will be.
There is no conflict. It drops in for 2.12.0.
It is a separate download, and a nightly build available from here.
This is not r-devel but r-patched.
It is our duty as users to test pre-releases as well. So if anything, in an ideal word you would have R-patched installed --- as well as R-devel!
Testing can be as easy as installing another version, keeping it outside your path and then adjusting PATH and R_HOME dynamicaly from a script. Testing means running it on your code and data to prevent you from getting bitten by bugs once the new code is released.
I wouldn't have a clue how to test efficiently. I reckon every test I could come up with has already been run by the development team.
I still find it difficult to figure out when something is a bug, and when (most often) it is my own stupidity kicking in.
The problem is, software is not (or not only) going to be used by developers. It is going to be used by people that may not have programming knowledge at all (I'm speaking generally, this is valid for R as well as for any other software).
If the help or the interface or the general way the software is built do not give you enough informations on how to do something, well, that is maybe not a bug, but it is something that can be improved (and pointed out to the devs).
Also, remember that the developers wrote the software. They know how to use it and often they will be biased in testing it mainly by using it correctly and see if it gives the good result rather than by "trying to break it".
By using it in YOUR way (which may possibly be "uncorrect"), you are effectively running tests that maybe escaped the developers, just because they were not thinking of using it like you did.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
What good IDEs are there for R in Linux?
I've tried Rcmdr and Eclipse, but neither seems to have the same usability as Tinn-R in Windows. Are there any other options?
A newcomer to the scene, which IMO looks very promising - and downright baller - relative to other existing IDEs like Rattle and JGR, is RStudio. It's free software, is cross-platform, looks very polished, and even has features like automatic refactoring.
Update 2012-04-12: I've been running it for a bit on our DB server, and I love that it's a web app that saves your sessions, resume-able from anywhere else. Plotting requires not only no X tunneling or png-writing but is easier to use than out-of-the-box R. Extremely easy to get up and running, and it comes with packages for Debian/Ubuntu (which I use).
The company/development is moving pretty fast, aiming to be the de facto standard IDE for all R users. If I'm gushing, it's probably because I was pleasantly surprised by the quality of the IDE after a long time of using sub-par IDEs, not just for R but for plenty of other languages. So this was a bit out of the blue. I still need more time to really dig into it but I like what I'm seeing so far.
JGR isn't bad:
http://rforge.net/JGR/
Most people I know rave about Emacs + ESS:
http://ess.r-project.org/
But it's not quite the same thing as Tinn-R.
Along different lines ...
If you're looking at a high level functions for data mining, then Rattle is an option:
http://rattle.togaware.com/
and another high level app for interactive plotting:
http://code.google.com/p/playwith/
I have found that the Emacs-ESS combination is well worth the learning curve. I enjoy being able to:
have code and R console side by side
send the current line, paragraph, file, or function to the R console without touching the mouse
easily interact with R sessions on remote computers
enjoy all the editing abilities of Emacs
Here's the website for the project:
http://ess.r-project.org/
Here's a helpful document about ESS in particular:
http://www.demog.berkeley.edu/Refs/ess.pdf
Brand new IDE out there (as of Feb 2011) is http://www.rstudio.org/. Seems very promising from what I've seen so far.
Although Eclipse was mentioned by the OP, I do not know if he ment it with the StatET plugin.
Eclipse with StatET is a really great IDE besides e.g. EmacsSpeaksStatistics (ESS), but as in other environments the user have to learn it's the basic usage first. The only handicap of this IDE could be the relatively high resources requirements as based on Java, but this makes the program OS independent of course.
Why I really would suggest to take the time to learn use StatET efficiently (cauction: very subjective list!):
be able to run your code really fast and easily with comfigurable shortcuts (by Ctrl+r by default),
thanks to the script editor and running environment is heavily integrated, debuging and reviewing your code cannot be easier,
configurabled environments by default (e.g.: R scripts),
you may define templates for frequent commands and those's environment (e.g.: loop, if conditions etc),
highly customizable syntax highlight,
TeXlipse integrated to view and edit tex code with ease (LaTeX support for Eclipse),
Roxygen support for literate programming (very handy at package development to automatically generate Rd files (manuals) from inline comments),
easily extendable with othet Eclipse plugins (e.g.: spell checking, (SQL) database management, image viewer, running external programs like Sweave).
A nice guide to read is A Guide to Eclipse and the R plug-in StatET by Longhow Lam.
Gedit + RGedit plugin + Snippets plugin
You've suggested eclipse; there is a plugin called StatEt which work quite well (even Sweave is supported!).
There is a KDE 4 based IDE called RKward. It's nice because of:
Workspace Browser
Integrating the R console
data.frames editor
Syntax colored editor
GUI frontend for installing CRAN packages
For my case, I would recommend RKward for linux, it is a KDE. I've been using RStudio in Windows, but when I switched to Ubuntu, I find RKward easy to use, and has a good interface.
You can create a data frame without coding it with data.frame() function.
If you are used to Eclipse, StatET (mentioned by mbq) is probably the right choice for you.
That being said I have a more exotic choice to offer that you might want to consider, if you like auto suggestion and pure syntax highlighting is not enough for you. At least for me auto completion of R-Code did not work with StatET.
Now I use Komodo Edit with Sciviews-K and R64. Sending Code from editor to R works really well and the editor offers auto-completion for R-Code which is really nice – in particular if you are new to R. I work on a Mac, but it should be easy to setup for Linux too.
I think it has lost some popularity because it wasn't to stable in the past, but at I feel it's much better now and it hardly crashes in my setup. So you might wanna give it a chance too.
EDIT: If you work on Mac Textmate with the corresponding R bundle might be interesting, too. Recently I am about to switch to Textmate. If you don't care about the $45 for textmate, it's probably the most stable choice I tested so far. But it's only available on a Mac. But hey I am really amazed by this editor (and as you can see I like testing setups ;).
EDIT: I realize this thread is still being read by someone, so I definitely need to mention RStudio. It came out of nowhere and quickly became the choice of a lot of people. And it's well deserved. It still has some bugs (like not being able to stop RSessions) but it has tremendous auto-complete with context help. But at least on my setup (Mac) it's more stable than StatET / Eclipse. Sweave and ROxygen is not really supported yet, but the developers are very active. Definitely worth trying.
EDIT II: Because it's fun to track this here's another edit. RStudio continues to win more and more users. The combination of RStudio, Roxygen2 and particularly knitr integration has likely been the largest contribution to this development. While Rstudio was rather used by applied users and in teaching and has improved to dramatically that there's isn't many situations in which another IDE / editor is a better choice. Being maried to ESS seems like to only valid reason left to not use it. Also the documentation of its ecosystem is just great. The latest: Package development by Hadley http://r-pkgs.had.co.nz/description.html and his advanced programming http://adv-r.had.co.nz/
I strongly recommend learning emacs+ess, but for a more modern-looking interface you can try RKward: http://sourceforge.net/apps/mediawiki/rkward/index.php?title=Main_Page.
I use Geany in combination with R. Geany provides a terminal in which one can start an R session and shortcuts an be defined in order to send highlighted text to the terminal.
www.geany.org
RGedit, great tool if you're keen on GNOME default text editor. Lacks autocompletion in script mode, though... but you can define snippets in a separate plugin (Snippets)... You can send code directly to R session running in the terminal window, tabbed multiple R sesions, there are several GUI templates for common data analysis (t-test, correlation), long story short, take a look at:
http://sourceforge.net/projects/rgedit/
Few months ago (when I gave my blogging skills a try), I wrote a review for RGedit, here's a link (and a little bit of self-advertising):
http://psy-stat.com/?p=12
EDIT:
Oh, and you can use Geany and set it up so you can send code chunks to R session... I've never done it, but I know it's manageable!
EDIT #2:
here's a helpful link: http://sgsong.blogspot.com/2010/08/integrating-r-with-geany.html
This might be what you're looking for. It integrated Komodo and the SciViews package. I found it a bit too fiddley (I prefer vi) but if you're looking for a full blown IDE/editor for R in Linux it's pretty close to Tinn-R for Windows and it's written by the same guys!
Link:
http://www.sciviews.org/SciViews-K/index.html
Rattle: http://rattle.togaware.com/
Emacs with ESS. Probably not as polished as Eclipse, but I do like it.
Personnaly, I use gedit and my console. It works great :)
I just finished a small project where changes were required to a pre-compiled, but no longer supported, ASP.NET web site. The code was ugly, but it was ugly before it was even compiled, and I'm quite impressed that everything still seems to work fine.
It took some editing, e.g. to remove control declarations, as they get put in a generated file, and conflict with the decompiled base class, but nothing a few hours didn't cure.
Now I'm just curious as to how many others have had how much success doing this. I would actually like to write a CodeProject article on defining, if not automating, the reverse engineering process.
Due to all the compiler sugar that exists in the .NET platform, you can't decompile a binary into the original code without extremely sophisticated decompilers. For instance, the compiler creates classes in the background to handle enclosures. Automating this kind of thing seems like it would be a daunting task. However, handling expected issues just to get it to compile might be scriptable.
Will:
Due to all the compiler sugar that exists in the .NET platform
Fortunately this particular application was incredibly simple, but I don't expect to decompile into the original code, just into code works like the original, or maybe even provides an insight into how the original works, to allow 'splicing' in of new code.
i had to do something similar, and i was actually happier than if i had the code. it might have taken me less time to do it, but the quality of the code after the compiler optimized it was probably better than the original code. So yes, if its a simple application, is relatively simple to do reverse engineer it; on the other hand i would like to avoid having to do that in the future.
If it was written in .NET 1.1 or .NET 2.0 you'll have a lot more success than anything compiled with the VS 2008 compilers, mainly because of the syntactic suger that the new language revisions brought in (Lambda, anonymous classes, etc).
As long as the code wasn't obfuscated then you should be able to use reflector to get viable code, if you then put it into VS you should immidiately find errors in the reflected code.
Be on the look out for variables/ method starting with <>, I see that a lot (particularly when reflecting .NET 3.5).
The worst you can do is export it all to VS, hit compile and determine how many errors there are and make a call from that.
But if it's a simple enough project you should be able to reverse engineer from reflector, at least use reflector to get the general gist of what the code is doing, and then recode yourself.