Program Octave in Xcode - xcode

Community,
probably my question seems really stupid, but maybe someone can guide me out of it.
I installed everything as described here: https://adampash.com/how-to-install-octave/
and I can use Octave now in my terminal.
Is it possible to program Octave in the Xcode window to use the debugging options or something similar? Or is it just possible within the terminal?
I have used Google to find a solution. Unfortunately, I haven't found any that described my question.
Thank you
Paul

No, you can't use Xcode. Xcode is for C, C++, Objective C, Swift, and other languages, but not Octave/Matlab. There's a reason for this: Xcode mostly supports compiled languages. Octave is an interpreted language with a heavy emphasis on interactive use. So a different sort of IDE is appropriate for it.
Octave has its own built-in GUI that is a sort of IDE. Use that instead of Xcode.
If you have Octave built with Qt support (which is the default for Homebrew and Octave.app installs on Mac), you can run it with octave --gui from the command line, or by double-clicking the Octave.app icon in /Applications.
The installation instructions in that link are out of date. There is no longer a --with-x11 option for brew install octave, you no longer need X11 or XQuartz, and it's no longer in homebrew/science. Just run:
brew install octave
NOTE as of April 2019: The current Homebrew Octave is Octave 5.1.0, which has significant stability problems with its GUI. Instead, you probably want to use Octave 4.4.1 for now. To do that, download Octave.app 4.4.1.

Related

How to include CMake compatible with Cygwin on CLion on Windows?

I'm trying to configure CLion with Cygwin, but I'm having trouble with CMake. The program says that the bundled version doesn't work in that environment and that the CMake from Cygwin is outdated (needs a newer version). However, I tried installing an independant CMake but then the program says it isn't compatible with Cygwin. How do I fix this?
screenshot
I'm teaching a C++ programming class this semester. All of my students were able to successfully install/configure CLion without too much trouble. Most of them are on Windows boxes, Win7 and Win10.
In my instructions, I referred them to this video, which was the best I could find: https://www.youtube.com/watch?v=i2h_976SpV0
Some of the students were missing the debugger the first time they tried this. In the cygwin installer, the number of check boxes is enormous and many of the names are remarkably similar. When we went back through and re-ran the installer, in each case we were able to find a place where they had checked the wrong box.
So my recommendation would be re-run your cygwin installation after watching the video once through. Then go back to the frame in the video where he shows all his checked install options and very carefully compare your checked boxes against the presenter's.
Good luck!

PyCharm Embedded Terminal Points to Different Python

Currently using mac osx. I am curious as to why these terminals are pointing to different pythons, i.e. the iTerm -> Homebrew python, whereas Pycharm-embeeded-terminal -> Apple-provided python.
Pycharm's terminal doesn't change the Python version corresponding to Python version at Project Interpreter
seems closest to my question, but but not quite in that the os there is Windows and the solution doesn't help in my case.
I had same issue, but with Android Studio, which is also IntelliJ based IDE. You should edit some files in your IDE's settings manually
My question
Answer
Then you should restart your IDE.

YouCompleteMe without MacVim

I've been reading about youcompleteme plugin for VIM.
The problem is, however, that I want a setup I just can move onto my other dev platforms (OpenIndiana, FreeBSD, Linux and OS X).
Wouldn't using macvim make that somewhat difficult, moving plugin from platform to platform?
Cheers
MacVim is simply a distribution of Vim for Mac OS but most of Vim plugins are compatible with the multiples versions of Vim for the different OS.
Still YouCompleteMe comports a compiled component so your question is legit to wonder if it will work on different OSes. According to the installation section of the Readme of the project, YCM can be installed on OSX, Linux and FreeBSD with a plugin manager like Vundle. (I really don't know OpenIndiana and it isn't mentioned on the Readme page so I can't say if you'll have a problem with this one)
One point you should take care is that if you update the plugin and the compiled component has changed you'll have to recompile it but it doesn't happen that often and you should get a warning at the update.
TL;DR This shouldn't be an issue to use YCM on most of the common OSes but when updating remember that you might need to recompile the compiled component sometimes.

What is a recommended approach for building Emacs from the unreleased development sources in a Mac OS X environment?

I am sort of switching to a Mac based development environment as the Mac line of laptops and workstations contains some very nice systems, albeit pricey. As an occasional Emacs developer, I want to build Emacs from the git/bazaar sources. Much to my surprise, the first time I attempted to do this using Xcode4, I discovered that the version of autoconf supplied with Xcode is less than that required by Emacs. So this raises the question: what approaches do those who develop Emacs daily using Mac hardware take in order to have the required libraries and headers available to build and run the Emacs development code on OS X? Left to my own devices, I will fetch and build the versions of components required by Emacs that are not satisfied by Xcode and put those into /usr/local/... but it does occur to me that other approaches, using fink for one example, might be less work and/or more satisfying, hence the question. This also applies to the add-on packages for graphics support (pdf, dvi, png, etc.) that are not supplied by Xcode.
The directions in the file nextstep/INSTALL is to issue the following commands:
./configure --with-ns
make install
The resulting "app" can be found in nextstep/Emacs.app.
However, there is an XCode project provided with Emacs, but I haven't got it to work.
I use the macports package 'emacs-app', which is just emacs configured --with-ns. They're currently at version 23.2.1
Even if you want to build emacs direct from GNU repos, using macports to get autotools should save you some time and energy. The autoconf package is at 2.68, and emacs configure.ac requires 2.65

GCC without Xcode on OS X

I've just unwrapped my new MacBook Pro (yay!) and am now setting it up properly for development. Since I want to avoid clutter, I'm wondering if I really need to install the Xcode tools at all (I never use the IDE or Mac specific tools), since I'll install a newer version of GCC anyway, using MacPorts.
So, is there any benefit in installing Xcode? Is it necessary? What kind of set-up does it do behind the scenes? Basically: can I skip this or will it come back to haunt me because some Unix development tools just assume that OS X is always set up in this way?
In order to perform an easy and successful install of MacPorts, already having tools from the xCode installer is necessary. You only need the install option that places a copy of the unix/header files outside of xcode; everything else can remain uninstalled.
A friend of mine recently released this:
https://github.com/kennethreitz/osx-gcc-installer
Have fun :)
I tried this trick and I was constantly chasing missing header files and such. Just install XCode.
We primarily use the Xcode IDE for building Cocoa/Carbon applications. Xcode typically has different project templates (and project settings fixed accordingly). As long as you are not going to generate a Universal Binary or a framework I think you should be ok. As far as I am concerned, when I am too pissed with Xcode, I go back to the command line, set up the paths myself and start using GDB.
First of all, congratulations on the new MBP. I recently bought a 15" unibody myself. =)
You can safely skip Xcode installation, and you can install almost everything Xcode installs through MacPorts, except Xcode itself, of course.
However, I believe you'll find yourself installing Xcode one day anyway, and installing Xcode is much easier than installing all the tools (especially GCC) through MacPorts.
You can strip down the Xcode install quite a lot - when you install Xcode there is a "Customise" button where you can remove a lot of stuff (gigabytes worth).
You can also go in and delete stuff from /Developer/, for example the 10.3 SDK is about 150MB (I think), and if you're not writing software for that it's quite safe to delete. Obviously be careful when deleting, but if you break things, you can always reinstall the Developer Tools!
Apple now provides the command line tools as a separate download from Xcode. They work with Lion and Mountain Lion. You can download them from the Apple Developer Center.
(This is noted on the osx-gcc-installer GitHub page.)

Resources