How to install / use Prolog on Mac Monterey - macos

I have xQuartz installed as I use VSCode to code with c++. I am a bloody beginner and have absolutely no clue how to use SWI Prolog with the built in editor on my Mac. Or VSCode as an editor.
None of the questions posted here previously help me as I don't understand any of the instructions given.
Could someone tell me what to do in the easiest way possible? I have never used the terminal to install things so should you give me instructions, make these fool proof.
I got as far as downloading SWI Prolog from the website and dragging it into my applications folder. It opens as seen here. What else do I need to do? I would ideally have the same editor that is being used here

Page https://www.swi-prolog.org/IDE.html says:
SWI-Prolog Editor (Windows)
Gerhard Röhner has developed an integrated Prolog editor in MS-Windows following the conventions of this platform. The embedded SWI-Prolog provides functionality similar to swipl-win.exe, including the possibility to run XPCE GUI programs.
And the linked website has this image:
That suggests there is no macOS version of the program you want to run, and you would need a way to run Windows software on a Mac.
On Windows, I get "Prolog" and "SWI Prolog" as different menu items, and SWI Prolog gives me the same kind of terminal screen you see, but "Prolog" gives me a GUI editor environment. Quite plain, but more features than the terminal. Maybe there is similar on your Mac install?
https://swish.swi-prolog.org/ is an online editor for SWI Prolog which is good for testing small code.

Related

c++ hide terminal with GTKMM gui apps

I've been looking around on the cplusplus forum and here on stackoverflow, but I have not been able to find an answer. All I find is Windows stuff or people working with IDE'S that do the work for them.
I am creating an application with c++ and GTKMM and nothing else, I just have a texteditor and a compiler that I control with my terminal (I adress this because a lot of people always talk about IDE'S and stuff) on UNIX based computers.
When I run my application (./application) I always see my terminal along with my gui application and I would like to hide the terminal. How would I achieve this?
Thanks in prior :)
So I found out it differs from operation system. I've written out what I've found on my website, so check it out if you want to create a mac application.

SWI-Prolog Editor for OS X

I was searching for a SWI-Prolog editor for Mac OS X but i could not find one, so is there one or do I have to use another editor to build Prolog files?
Thanks
I do not use mac OS-X myself, but there are two very good SWI-Prolog editors that are cross-platform (thus also work on OS-X):
PDT works with the Eclipse IDE. It has good syntax coloring, an in-IDE Prolog console, a dynamically generated visualization of the call graph, to name only a few of the many features it has. See http://sewiki.iai.uni-bonn.de/research/pdt/docs/v2.1/start I believe refactoring of Prolog code is not there yet, but the developers plan to add that cool feature in the future as well.
PCE Emacs, an Emacs implementation by Jan Wielemaker that uses SWI-Prolog's graphical library XPCE. The UI elements look very Windows '95-ish, but don't be fooled by mere appearances here. PCE Emacs is completely tuned to SWI-Prolog and is probably the most versatile editor for SWI-Prolog out there. You can simply run it from within the SWI-Prolog console by typing emacs.
Hope this helps!
Assuming that you're considering not only IDEs but also text editors, the Logtalk distribution includes support for a large number of text editors that is also usable for editing Prolog source code. See https://github.com/LogtalkDotOrg/logtalk3/tree/master/coding for a list of all supported text editors.
I use OS X and work in Emacs with prolog-mode.
This version has all the features one would expect, including syntax highlighting, auto indent, and full interaction with an inferior Prolog process. The mode supports in principle any Prolog system, though it is primarily maintained with SWI Prolog in mind.
It lacks many of the features of PCE Emacs, but has all of the features of GNU Emacs, and I'm pretty happy with it.

wxpython program mirrors individual letters horizontally. how?

i'm running Boa Constructor, an old wxpython gui builder.
today, the program decided to play tricks and switched all its GUI from right to left.
far worse, when i'm editing text inside the program, each letter is reveresed.
What part of windows does font mirroring?
How to disable letter mirroring?
why a program i used for several years suddenly thinks i need spanish internationalization? nothing in my computer is set for spanish.
how can I program this behavior myself (i don't really care, just curious. any programming language solution is ok here)
i'm asking several questions together because it seems somehow related.
my settings:
windows xp, (English interface setup!)
python 2.5.4
wxpython 2.8.11
All other Windows programs are left to right,
regional settings are for hebrew, israel
I don't know what you did, but you might want to check out the following instructions for enabling RTL: http://www.tavultesoft.com/kb/?id=41 and then see if you can reverse it.
I know wxPython can do internationalization. See http://wiki.wxpython.org/Internationalization and http://wiki.wxpython.org/RecipesI18n for information on that. Basically it involves .po and .mo files, which I doubt you can accidentally create. That's a weird issue.

Simple Ruby Editor?

This editor isn't intended for me. It's intended for teaching someone else Ruby. I largely use Emacs when writing Ruby. Does anyone know of an editor that
indents the current line correctly when you press tab,
can indent the whole file correctly (keyboard shortcut would be nice),
has syntax highlighting for Ruby,
other than that works kind of like Windows Notepad (maybe with a toolbar of icons),
has a built in terminal (not absolutely required),
has multiple editor tabs,
and works on Windows, Linux, or both?
Or anything somewhat close?
Edit:
I'm also going to add that I'd like to be available for free (legally for an indefinite period of time). Open source wouldn't hurt.
Check Notepad++
I don't think that jEdit has a built-in terminal, but I believe it does everything else you need. It's implemented in Java, so it should run on any platform for which a JVM exists, including Windows and Linux.
Since it's about teaching ruby RedCar and Diakonos are good choices. They have most of the features you mention and as a bonus both are written in Ruby.
If you are not a die hard fan of emacs, then there's always vim and its plugins for any programming language. Here's one for Ruby: rails.vim : Ruby on Rails: easy file navigation, enhanced syntax highlighting, and more
If you are new to vim, this cheat sheet should help you: vim graphical cheat sheet
I like gedit - it doesn't have a terminal, but should work fine for the other requirements. It can run on Windows with Cygwin.
For a full-blown IDE, Aptana Studio is great. It meets your requirements.
If your main goal is to teach then you could try using Hackety Hack. It is somewhat weak at times, but I found it fun and simple to use, but then again I already knew ruby pretty well.
For a beginner being able to run the programs easily is very important so you want something where irb and ruby can be run very simply. Aptana seems to be a pretty good IDE for this sort of thing, but I have never used it myself aside for web development.
Aside from those two I suggest Notepad++... Also the free KomodoEdit might be worth a look. Personally I say teach the other person emacs, but then again shrug

How can a Windows programmer be sufficiently productive on Mac OS X?

I've been using MacBook Pro for a few months at home, and I was wondering if there's a good book or guide that can help me be a better programmer on Mac. Maybe Mac-equivalent of Beginning Linux Programming. Note I am not looking for resource on how to program Mac application, instead I am looking for more general guide of using Mac for general development environment.
As a background, I am a Windows programmer by day. I've also done some Linux and BSD over the years, esp in school, like socket programming, graphics, make install type stuff. At home, I'll be doing Java, Scala, PHP, etc. on Mac.
So far, I've been using Eclipse, QuickSilver, and TextMate. VMWare Fusion, XCode and NetBeans are set up, but I don't use them. A DVI KVM switch is hooked up to real keyboard, trackball, and monitor. Recently stayed up till late fighting with MacPorts, and figured out I needed x86_64. The most struggle I had was configuring PHP. I don't know why they don't ship with MySQL and GD library. I eventually figured it out Googling around, and built the extensions from source. I have a feeling that I didn't get the memo and didn't read some basic guide on how to become a programmer on Mac, like how the whole architecture works. How can a Windows programmer be sufficiently productive on Mac OS X?
Related: Setting up a Mac for programmers
Edit: The specific type of application I want to develop doesn't really matter in my opinion. It could be Java, Scala, PHP as I mentioned or Cocoa, C++, or whatever.
What I am looking for is specific book, resource, advice on how to be more effective programmer on Mac, preferably something beyond "install XYZ".
Having converted from Windows to Mac OS X about five years ago, I often find myself thinking the same thing. I just cannot be productive on Windows (as much, I can be productive) as I can on Mac OS X.
To be honest, there are lots of small differences between Mac OS X and Windows. I find the biggest reason for people thinking like this (at it normally only applies to gamers and developers) is that they are trying to use the Mac like a Windows machine. You need to learn to accept that you have to use the command key, not the control key, etc.
It sounds like you are using a Mac because you have to as opposed to because you want to. It really is a much better platform than Windows once you get used to it.
I think a lot of Windows programmers come to Mac and don't try to learn it properly because they are complacent thinking they know it all because they have "used Windows all their life". I guess once you discover Spotlight, Expose, Mac OS X Keyboard shortcuts, etc. You will find your self being MUCH more productive that you ever were on Windows.... and its actually a fun OS to use.
Checkout some of the best Mac applications you can get here and here. You can also do a search for "top 100 mac apps".
Also, I noticed you were trying to setup some kind of web server directly into Mac OS X. It does ship with one, but if you are going to add MySQL and some other extensions I wouldn't go the MacPorts route. Get VMWare Fusion or VirtualBox (open source) and run the server in a VM. Much cleaner. I have a subversion/trac FreeBSD VM that handles my local version control.
I would like to add that if you don't presently use Xcode, you should definitely learn it and use it asap. It's a much nicer IDE to use than Visual Studio and it will make your life much easier.
Don't forget you have probably spent years on Windows help sites, you're going to a small degree need to do that with the Mac. Whenever you have a problem about using the Mac, ask a question on ServerFault. We are all more than eager to help you out.
Good luck.
You seem to want an overview of how Mac OS X works at a system level, more than recomenations about tools and so forth. If that's the case, I'd start with the (very basic) Mac OS X System Architecture Guide from Apple, then move on to Getting Started with Mac OS X, which should give you enough of an overview to get started.
It's not clear from your question what you intend to actually make with your programming time, but if you decide to persue Cocoa/OS X development, I recommend Cocoa Programming for Mac OS X by Aaron Hillegass.
I have a similar situation like yours. I use Windows for development and about a year back purchased a MBP for home (as I shifted to an office). I find it really difficult to get any real work done on my MBP. Somehow am used to the Windows environment with dual screens. But let that not stop you. A couple of software which I suggest you should get are:
Transmit - Good ftp client
MAMP - Runs a webserver nearly out-of-the-box. Good for basic development
Quicksilver - Helps in quick finding of applications
Spaces along with gestures (Configure your gestures to move from one screen to another, I use three fingers glide. its amazing)
Entourage - for email
Terminal - for ssh (putty alternative) (included)
Dreamweaver/BBedit/Textmate (all pretty decent. but i love editplus on windows. not a fan of IDE)
I assume your question is not about learning COCOA and more about being more effective using a MAC. Well, the above tools might help you.
Unfortunately, your question isn't very clear as to what you really want.
If you're looking to write anything cross-platform, it can be very helpful to have a virtual machine for testing. When in Linux, I've always used VirtualBox, and it works on OS X as well.
Also, as for choice of IDE, a lot of it comes down to your preference. Eclipse is nice because there's a plugin for almost everything for it. My experience with TextMate is limited, but my local Ruby Users Group swears by it.
Finally, a suggestion for not just Mac, but any platform really. Learn your hotkeys, set up new ones for things you commonly do, and use them frequently. Not having to take your hands off the keyboard to click a mouse through a few menus can really improve productivity. It may take a little time for them to grow on you, but once they become second nature, you'll wonder how you lived without them.
Basically, you can apply all your Linux/UNIX knowledge that you already have to the Mac. If you use the Terminal (/Applications/Utilities/Terminal.app) you can run all your favorite UNIX commands. Mac has a special command called "open" which is equivalent to the Windows "start" command (used to launch programs and files). You can also use "open -a" to open an application by name (e.g. "open -a Finder").
You might want to reconsider Xcode. Xcode opens more quickly than Eclipse and provides very good syntax highlighting, brace matching, block indenting, and more. Xcode doesn't have to be used as an IDE, you can also use it as a code editor, just like you are currently using TextMate.
For code editing (and everything else), try Aquamacs (http://www.aquamacs.org). It's a Cocoa-native build of Emacs, and it's brilliant for any programming task.

Resources