Activator/Play commands make Cygwin bash commands invisible - bash

I'm using Cygwin and any time I use an Activator command (e.g., activator run or activator "eclipse with-source=true"), any text thereafter is invisible. It's being typed, because if I hit enter, the command will be executed, but I cannot see it.
I've done some searching of this issue, and I'm not the only one to experience it, as I've learned I can blindly type stty sane and I'll get my text visible again, but that's a bit onerous.
Other tips suggest commenting out a certain line in <activator>\minimal\activator, but looking through that file, I see many lines for detecting if the terminal being used is Cygwin and then specific handling for that, so I'm not sure what to edit nor why it isn't already handling the fact that I'm using Cygwin.
Any help would be appreciated, thanks!

Related

Running Java/C++ Programs in Sublime (no command prompt): There is one unaddressed issue

I've gone through the questions and the solution proposed works great. It helps us both compile and run programs in Sublime text editor instead of opening the command line prompt every time you need to run a program.
However, it doesn't work when you have to accept input from the console (Like cin and Scanner(System.in)). How do you fix those?
Running programs within Sublime Text cannot accept input, regardless of the language they're written in. To interact with your program, you'll have to run it through the shell. The only way around this is if you're using an interpreted language like Python, Ruby, Perl, JavaScript, etc., in which case you can install the SublimeREPL package and run your code via an interactive session. Unfortunately, since you're using compiled languages, this is not an option.

Livecode standalone program takes 30 seconds to load

I've run into an issue with a program I created using Livecode, and now I'm looking for some help from the experts. My Google-fu is strong, yet the answer eludes me...
So here's the deal. I made a very basic note-taking program for Windows only, using very noob skills. I've been using it daily for work for the past month at least. It functions exactly as it should, except for these few things that don't make sense:
When loading the program, it takes 25-30 seconds to load. Not convenient considering it's pretty basic; one button and 5-6 text input fields, with the same number of label fields. And one background. The button just clears the text input fields.
I started to notice a problem when I went to create a batch file to load all my work programs. When the program is loaded thru Command Prompt, if I close CMD it will close the program too. I tried the same using Powershell, and it still closes as soon as the Powershell window closes. Really really strange.
I managed to find another standalone program made with Livecode, downloaded it and tested the CMD command to see if the same thing happened. It didn't, that program loaded instantly and it is ENORMOUS. It also didn't close when I closed the CMD window. I even tried this: opened my program and the downloaded program using the same CMD session, and when I closed CMD, my program closed but the downloaded one did not.
Then, I downloaded the source code for the program that was working correctly. I created a standalone for it, and tried to open that. It acts the same way as my note program does.
I don't get it. It's got to be something in my Standalone Application Settings considering what happened in the last step I mentioned, and I've been over and over those settings for hours, but I just don't have the knowledge of LC to know what to look for. I've scoured the web looking for answers to this, but it seems to be just me having this issue (story of my life, lol).
I'll be happy to post any codes, scripts, or files needed, please let me know. I just don't know which things to post =P
Any suggestions are very much appreciated!! Thank you. =)
If you call the program from the prompt directly, e.g. using
C:\program files (x86)\your_standalone.exe
the app is treated as a command line app. I have also noticed that a LiveCode app can sometimes close if the invoking command line prompt is closed, while it may sometimes continue to run. Perhaps the handling of the relaunch message has to do with it, since this message basically handles commands from the command line.
If you want the command line process to finish independently from the invoked LiveCode application, you can use the start command:
start "" "C:\program files (x86)\your_standalone.exe"
don't have enough info to be able to tell what your issue is. But that much of a delay is not usual for LiveCode apps so something is definitely wrong. How long does your app take to load if you open the stackfile in the IDE?
Not sure what StackOverflow allows but if you could upload your scripts and if possible stackfile that will give us more to go on
This has nothing to do with Windows, Batchfiles, or CMD.
CMD can workaround your problem, if it's a GUI program. See Start command, and read the help as it explains the starting behaviour of CMD and CMD's Start.
Explorer has different rules. Anything else that starts programs call CreateProcessExW which has it's own rules.

Process running when starting terminal on Mac OSX

Whenever I start terminal on my Macbook Pro it is running a process. I have to use ctrl+C to kill it. If I close the window directly it warns me that following processs are running: login, bash, bash, perl5.12.
Any idea what might be going on here and how I get back to the normal state?
I personally had this issue a while ago. First check to see if it is from one of your profiles. Assuming you are using bash, we will look at your bash profile.
First, make sure the problem is actually stemming from your bash profile. Source the scrips as follows.
source ~/.bash_profile
source ~/.profile
If after running those you observe the same hanging problem where you have to cntrl+c, then you know what script has the problem.
The best way to remedy the situation is to comment out different parts of your script to figure out where the problem is. Backup your profile and then comment out half of your profile and do a
source ~/.bash_profile
and if it hangs or not will tell you what half the problem is on. Keep repeating this until you find the problem. It sounds longer than it actually is.

Can't seem to get Node.js Command Line to interpret what I write, keeps returning "..."?

So honestly, I don't really 'get' what's going on here, I mean, can I open the regular windows cmd.exe and use node from there? Or does it have to be from the node.js command window? Can I move files around on my system using the node.js command window? And yes, I currently can't figure out how to get it to interpret what i write, although it was working perfect before, but now I cant seem to escape from '...' every line, with no response.
Thanks
I use Node on *nix, so I'm not sure if it's different in Windows. But on *nix systems, the ellipses means it's waiting on you to finish a code block or the like. You should be able to hit CTRL+C (again, might be different in Windows) to cancel out of the edit you're in or CTRL+Z to kill the REPL entirely.

When I try to launch a script, it opens and then immediately closes

I am trying to make a simple ruby script. However, when I run it, the command line opens, and closes almost immediately. I had the same problem with a visual basic console application, so I'm not sure if this is a problem with command prompt.
I am running Windows 8 with Ruby 1.9.3. Any help is appreciated.
This is a common symptom when developing command line applications on Windows, especially when using IDEs.
The correct way to solve the problem is to open the command line prompt or PowerShell manually, navigate to the directory where the program is located and execute it manually via the command line:
ruby your_program.rb
This is how command line programs were designed to be executed from the start. When you run your code from an IDE, it opens a terminal and tells it to execute your program. However, once your program has finished executing, the terminal has nothing to do anymore and thus closes.
However, if you open the terminal, then you the one telling it what to do, not the IDE, and thus the terminal expects more input from you even after the program has finished. It doesn't close because you haven't told it to close.
You can also use this workaround at the end of your Ruby script:
gets
This will read a line from standard input and discard it. It prevents your program, and thus the terminal, from finishing until you've pressed return.
Similar workarounds can be used in any language such as C and C++, but I don't think they are solving the actual problem.
However, don't let this discourage you! Feel free to use gets while you are learning. It's a really convenient workaround and you should use it.
Just be aware that these kinds of hacks aren't supposed to show up in production code.
Are you running from the command line or as an executable. Try placing a busy loop at the end to see the output or wait for keyboard input. If you run outside a command line the command line exits upon completion of the script.

Resources