Xamarin Studio fails to execute code with login shell in Mac Terminal - macos

I'm new to Xamarin on the Mac, and I'm running into some issues running my code. I don't think it should matter, but I'm using the D language plugin to develop my code.
When Terminal is set to Shells open with: Default login shell (which is zsh in my case, but bash results in the same issue), hitting the execute button causes Xamarin Studio to pop up a Terminal window which closes before it can do anything, and then Xamarin Studio reports Cannot execute "blah". ScriptError. I added an infinite loop at the beginning of my program to make sure the shell isn't exiting because the program terminated quickly, and sure enough the program seems not to be starting at all.
If I instead tell Terminal Shells open with: Command (complete path): /opt/local/bin/zsh, the terminal happily opens up and the window is named correctly as "Xamarin Studio External Console" but of course nothing is executed except for the shell itself.
Any way to debug or fix this would be greatly appreciated!

MonoDevelop/XamarinStudio uses xterm by default. Dunno if that piece of info might help.

Related

Run mode not there (IDLE Python 3.6)

Probably a very simple question. I just thought, after someone suggested it here, of trying (and installing) Python 3.6 on a Mac - I've been happily using 2.7 since now. I've never used the IDLE before having done everything via the command line + ATOM to write the program.
I see that 'normally' you should be able to write your program in the shell and then run it in the RUN window. However, I don't see a RUN mode in window, just the possibility of using, which you are anyhow, the shell window. I hope that makes sense!
Is this normal, or have I missed something?
p.s. I'm using OS X 10.8, if that's of any importance.
I am not exactly sure what you are asking, and whether it has anything to do with OSX, but I can explain IDLE. IDLE has two types of main window: a single Shell and multiple Editor windows.
Shell simulates python running in the interactive REPL mode that you get when you enter 'python' (or 'python3') in a console or terminal window. (The latter depends on the OS.) You enter statements at the >>> prompt. A single-line statement is run when you hit Enter (or Return). A multi-line statement is run when you hit Enter twice. This is the same as in interactive Python.
Editor windows let you enter a multi-statement program. You run the programs by selecting Run and Run module from the menu or by hitting the shortcut key, which by default is F5 (at least on Windows and Linux). This runs the program much the same as if you enter python -i myprogram.py in a console. Program output and input goes to and is received from the Shell window. When the program ends, Python enters interactive mode and prints an interactive prompt (>>>). One can then interact with the objects created by the program.
You are correct that Run does not appear on the menu bar of the Shell. It is not needed as one runs a statement with the Enter key.

Switching to Terminal for Octave GUI output

I'm trying to figure out why, when I have a large output in the GNU Octave version 4.0.3 running on MacOSX ElCapitan GUI - magic(500) for example - and the "-- less -- (f)orward, (b)ack, (q)uit" prompt comes on screen I have to switch to the terminal to actually execute the command. It's kind of annoying to have to click the terminal just to type "q" so I can continue working in octave-gui after displaying a large output. It would be nice if I didn't have to take up space on my desktop with an open terminal window. I've had the GUI run the command from the command window, but I guess the settings got messed up in some way? Any help on this would be awesome.
You can disable paging within octave using a number of methods listed here.
more off
page_screen_output(false)
page_output_immediately(True)

RubyMine Terminal Not Working Win10

I recently installed RubyMine v7.1.4 on my Windows 10 machine. I loaded up an existing project and tried to open a terminal window inside RubyMine. When I first open the terminal it is blank and after a few minutes the standard prompt appears. But after the prompt has appeared, I cannot type anything into the terminal. The cursor blinks like it is waiting for input but I cannot type anything.
I am able to use a normal command prompt to run the commands I need to but I would like to get the terminal within RubyMine working. The settings for the terminal appear to be correct, it is pointing at "cmd.exe". I am not sure if it is relevant but my RubyMine installation is on my C: drive but the code repository is on my E: drive.
If you have any suggestions, they would be greatly appreciated. Thanks!
I had the same issue, and discovered that it is also affecting IntelliJ, another JetBrains family IDE; the bug has been reported, but fortunately, you can force your Windows 10 console (full of new features, but perhaps buggy? https://wpdev.uservoice.com/forums/266908) to operate in 'legacy mode' while we wait for a formal fix, which will allow you to get your RubyMine terminals up and running again:
Terminal works in Windows 10 if you use legacy console. To do so, open a
command prompt window, right click on the title, then select Properties. At
the bottom, check "Use legacy console". Confirm the dialog. Go back to the IDE
and launch a new Terminal. It should work.
All credit to: IntelliJ Idea Terminal broken with Windows 10. | JetBrains Bug Report.

Launching a Shell Script using a Global Shortcut on OSX Snow Leopard

I have a shell script, which I launch several times during work everyday. I do this by launching terminal, and launching the script from within. However, I would like to be able to launch it (from within a terminal) with a global OSX keyboard shortcut (Cmd+Shift+R say).
There are quite a few applications which work in this manner already (for eg. EverNote, RemindMeLater, even the default Cmd-Space which brings up the search utility) and hence, I am guessing this should be at least theoretically possible.
Could someone please tell me if and how this can be done?
Instead of using a global shortcut key, maybe try creating an applescript that runs the shell script? So just open at AppleScript Editor, and enter something like this.
do shell script "//Your script";
Then save it as an application in the format drop down.
After that, you can run the script just by opening up the application with something like spotlight.

Annoyance when running scripts in Vim (Windows, Ruby)

I started using vim for my programming projects (mostly Ruby) and mostly everything works just as I want but I have a problem with compiling.
Lets say I am working on a Ruby script and I want to run it. I type :ruby sometging.rb (mapped to some other key). Then vim opens a new cmd.exe window and runs 'ruby something.rb'. Then it waits for me to press ENTER to close the window and continue working on the script.
Is there a way to configure vim on windows so that it always runs the script I'm working on in a separete window (always the same one, if none exists => open one), and not ask me to confirm with enter?
Don't know about gvim, but in normal vim you could put something like
map R <ESC>:tabnew<CR><ESC>:;%!ruby filename.rb<CR>
in your ~/.vimrc which would execute a Ruby file in a newtab when pressing R in command mode.
I've not used Ruby, but for I've found Dr Chip's RunView plugin really useful for running other interpreted languages.
Once it's installed, you can enter:
:RunView! <interpreter>
(where <interpreter> is presumably 'ruby' in your case) and it will open a (vertically if you include the !) split window with the output from passing the contents of the current window to the interpreter. Each time it is run, a new result log is appended to the end of the file (with a date and time stamp separating them).
If you have any issues with it, I'd recommend you contact Dr Chip via the Vim mailing list: he's very helpful (in fact he wrote the original version of RunView in response to a request I made on the mailing list).
This isn't exactly perfect but I use this to launch Python scripts.
command -nargs=* PY3 !start cmd /K Python.exe "%:p" <args>
It starts up a window that stays alive and doesn't interfere with my VIM window. Unfortunately it doesn't load it into an existing window.

Resources