Showing posts with label macosx. Show all posts
Showing posts with label macosx. Show all posts

Friday, September 1, 2017

Lua rocks on Mac



Install macports, install readline.

Install luajit.

Install luarocks.

Edit luarocks_installed/etc/luarocks/config-5.1.lua to use libs from /opt/local (those from macports):

external_deps_dirs = {
"/opt/local",
}


In luarocks install inspect, prompt.

/luarocks_installed/bin/luap

Enjoy repl with history and autocomplete.

Sunday, December 11, 2011

FreePascal experience

Tried FPC 2.4.4 recently, what I must say, Lazarus and console fpide are unusable under Ubuntu 11.10 and MacOSX -- crash all the time, no debugger support and strange GUI bugs, although I have not tried them under Windows.

However, the big POSITIVE side is that the compiler (FPC) is a lightning fast one and easy to install at any platform. It's even faster than javac. I'm really impressed. And GDB understands well pascal programs, tried to debug and it's amazingly feature rich. The language is plain simple and you can easily program in any decent text editor. I really enjoyed playing around with it. The generated applications are lightweight like in good old times, native, fast, not so hungry for memory and cpu resources. Also FPCMAKE is a good tool if you plan to develop a more or less complex application.

FPDOC tool is not what I like to use (it requires documentation not in the source comments but in a separate xml file), better to pick pasdoc (http://pasdoc.sipsolutions.net/) for those who used to javadoc and doxygen.


As for the Pascal programs I've used -- they are not pretty stable, I think it's the fault of the poor memory management strategy applied. It's better to use reference-counting techniques like in GNUstep/Cocoa than TComponent's sole ownership and dangling pointers.

Playing with the compiler I have tried to implement a base class to do that counting and one more to track weak references. It was a success, so it's not the language fault but the programmers who use it, because my solution looks good and I plan to publish a library on GitHub if I ever program in FP.

One more deficiency is the lack of Unicode strings support in OS calls, e.g. for file names on Windows. Although it's no problem under Linux and/or MacOSX.

Generally FPC is a great tool, and there are a lot of useful libraries to make life easy.

Monday, October 31, 2011

D programming under MacOS X 10.6, LDC

See http://dsource.org/projects/ldc/wiki/OSXBuildInstructions

Macports to install llvm package (2.9). Then get the latest LDC (tip) from bitbucket mercurial repo, ccmake, adjust paths to match those of MacPorts (/opt/local).

Then build and install tango, as described in the link above.

Edit ldc.conf


switches = [
"-I/opt/local/include/d",
"-I/opt/local/include/d/tango/core/vendor",
"-L-L%%ldcbinarypath%%/../lib",
"-L-ltango",
"-d-version=Tango",
"-defaultlib=tango-ldc",
"-debuglib=tango-ldc"
];

Thursday, January 27, 2011

LDC under MacOSX

Can't build it yet but the information I gathered is as follows:

Setup

sudo port install llvm
sudo port install llvm-devel
sudo port install mercurial
sudo port install ruby
sudo port install cmake

hg clone -r 0.9.2 https://bitbucket.org/lindquist/ldc
svn co http://svn.dsource.org/projects/tango/tags/releases/0.99.9 tango




Building LDC


cmake -DCMAKE_BUILD_TYPE=Release -DDEFAULT_TARGET="x86_64-apple-darwin10" ../ldc
make -j2




Building Tango





Links


https://bitbucket.org/lindquist/ldc
http://www.dsource.org/projects/tango
http://dsource.org/projects/ldc/wiki/BuildInstructionsTangoTrunk

Wednesday, January 26, 2011

ext2/3 from macosx

http://code.google.com/p/macfuse/

http://sourceforge.net/projects/fuse-ext2/