Showing posts with label Mono. Show all posts
Showing posts with label Mono. Show all posts

Tuesday, January 15, 2013

F# 3.0 on Mono 3.0 on FreeBSD

(continued from phosphorescence: Mono 3.0.x is also ready for FreeBSD)

When we want to use F# on Mono 3.0 on FreeBSD, we should build from source file, not from ports' fsharp.

How

$ git clone https://github.com/fsharp/fsharp.git
$ cd fsharp
$ vi configure.ac
In configure.ac, update around sgen options as acomments. Reasons later.
#if test "x$MONO_SGEN" = "xno"; then
#       mono_gc_options=
#else
#       mono_gc_options=--gc=sgen
#fi
And then,
$ ./autogen.sh --with-gacdir=/usr/local/lib/mono/gac
$ gmake
$ sudo gmake install
Let's launch F# REPL.
$ fsharpi

Why disable sgen option on F#

The reason is the status of LLVM support for Mono on FreeBSD.

mono-sgen - The FreeBSD Forums
  • Mono LLVM option for FreeBSD is not stable.
  • For Mono on POSIX, pthread is the only thread mechanism until LLVM (supporting "__thread") will support mono on FreeBSD stably.
  • On FreeBSD, so that we can use pthread without sgen, and also can use sgen without pthread.

Saturday, January 12, 2013

Mono 3.0.x is also ready for FreeBSD

In yesterday, Mono 3.0.3 is also ready for FreeBSD ports. We can use Mono's new features on FreeBSD.

Unfortunately, F# 3.0 is NOT bundled in Mono 3.0, and not be able to build from FreeBSD ports yet.

(continue to phosphorescence: F# 3.0 on Mono 3.0 on FreeBSD)

Friday, July 13, 2012

F# add-in for MonoDevelop 3.0

A few days ago, F# add-in for MonoDevelop 3.0 has been in beta.

This is easy to install, because we just install via add-in feature.


Saturday, December 10, 2011

Mono 2.10.7 for Mac has been released

A few days ago, Mono Framework 2.10.7 has been released only for Mac OS X. this release includes fixes for gtk related bug - e.g. Multi-byte characters are garbled on MonoDevelop. So that, since 2.10.7, we just install and use Mono and MonoDevelop without multi-byte font settings like phosphorescence: Modify the default font of Mono after 2.10.3.

Monday, November 21, 2011

Mono Project is looking for answers to the questionnaire

On download page of Mono project, they are looking for answers to the questionnaire. In current status, Mono project faces to mobile products, and less facing to existing products and features. So, if you want to run ASP.NET MVC, F# and so forth on Mono Framework in the future as same as current, please visit the site and appear with answering the questionnaire.

On download page of Mono project

Monday, August 15, 2011

Modify the default font of Mono after 2.10.3

(Since MonoFramework 2.10.7, there are no needs to do this instructions. Please update your MonoFramework to 2.10.7 or above.)

After Mono Framework 2.10.3, the way was changed how we modify the default font of Mono application like MonoDevelop. In this post, I write the way to modify from "Lucida Grande" to "Hiragino Maru Gothic Pro".
  1. Detect gtkrc file. If you are a MacOS X user, this file is in /Library/Frameworks/Mono.framework/Versions/Current/etc/gtk-2.0/gtkrc
  2. patch below onto /Library/Frameworks/Mono.framework/Versions/Current/etc/gtk-2.0/gtkrc
    58a59
    > font_name = "Hiragino Maru Gothic Pro 14"
    216c217
    < gtk-font-name = "Lucida Grande 12"
    ---
    > gtk-font-name = "Hiragino Maru Gothic Pro 12"

Monday, July 11, 2011

Mono 2.12 is coming soon

There are a draft of release note for Mono 2.12. This release will make improvement both for SGen and for C# compiler.

Saturday, June 11, 2011

Comparison of Ruby's Enumerable and C#'s Linq to Object #2

The samples for Grouping in interactive shell.

Ruby 1.9's Enumerable on Mac OS X

$ irb1.9
irb(main):001:0> one_to_ten = 1..10
=> 1..10
irb(main):002:0> one_to_ten.group_by {|i| i % 3}
=> {1=>[1, 4, 7, 10], 2=>[2, 5, 8], 0=>[3, 6, 9]}

Mono(C#)'s Linq to Object on Mac OS X

$ csharp
Mono C# Shell, type "help;" for help

Enter statements below.
csharp> using System.Linq;
csharp> int[] oneToTen = new int[]{1,2,3,4,5,6,7,8,9,10};
csharp> oneToTen.GroupBy(i => i % 3).ToDictionary(g => g.Key, g => g.ToList());
{{ 1, { 1, 4, 7, 10 } }, { 2, { 2, 5, 8 } }, { 0, { 3, 6, 9 } }}

Thursday, June 9, 2011

Comparison of Ruby's Enumerable and C#'s Linq to Object #1

The samples for restriction and projection in interactive shell.

Ruby 1.9's Enumerable on Mac OS X

$ irb1.9
irb(main):001:0> one_to_ten = 1..10
=> 1..10
irb(main):002:0> one_to_ten.find_all {|i| i % 2 == 1 }.collect {|i| i**2}
=> [1, 9, 25, 49, 81]

Mono(C#)'s Linq to Object on Mac OS X

$ csharp
Mono C# Shell, type "help;" for help

Enter statements below.
csharp> using System.Linq;
csharp> int[] oneToTen = new int[]{1,2,3,4,5,6,7,8,9,10};
csharp> oneToTen.Where(i => i % 2 == 1).Select(i => Math.Pow(i, 2));
{ 1, 9, 25, 49, 81 }

Thursday, March 10, 2011

Calling IronRuby in F# on Mono

This is just a hobby, but wonderful. Mono 2.10 only can do it as out-of-the-box!
Microsoft (R) F# 2.0 Interactive build 2.0.0.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

For help type #help;;

> #r "/Library/Frameworks/Mono.framework/Versions/Current/lib/ironruby/bin/IronRuby.dll";;

--> Referenced '/Library/Frameworks/Mono.framework/Versions/Current/lib/ironruby/bin/IronRuby.dll'

> #r "/Library/Frameworks/Mono.framework/Versions/Current/lib/ironruby/bin/IronRuby.Libraries.dll";;

--> Referenced '/Library/Frameworks/Mono.framework/Versions/Current/lib/ironruby/bin/IronRuby.Libraries.dll'

> #r "/Library/Frameworks/Mono.framework/Versions/Current/lib/ironruby/bin/Microsoft.Scripting.dll";;   

--> Referenced '/Library/Frameworks/Mono.framework/Versions/Current/lib/ironruby/bin/Microsoft.Scripting.dll'

> open IronRuby;;
> let runtime = IronRuby.Ruby.CreateRuntime();;          

val runtime : Microsoft.Scripting.Hosting.ScriptRuntime

> let engine = runtime.GetEngine("Ruby");;
Binding session to '/Library/Frameworks/Mono.framework/Versions/Current/lib/ironruby/bin/IronRuby.Libraries.dll'...
val engine : Microsoft.Scripting.Hosting.ScriptEngine

> engine.Execute("class Hello;def world;'Hello World';end;end");;
val it : obj = null
> engine.Execute("puts Hello.new.world");;
Hello World
val it : obj = null

Friday, February 18, 2011

Mono 2.10 has three more languages out-of-the-box

In two days ago, Mono 2.10 had been released. The most notable change is "three more languages out-of-the-box". These are F#,:
IronPython,:
and IronRuby.:

Saturday, November 27, 2010

Both openSUSE and Mono will be alive, maybe.

4 days ago, Novell agreed to be bought by Attachmate. And my interest is "Will both openSUSE and Mono be alive, or not?".

For Mono, there is a Miguel de Icaza's tweet.
After the Novell acquisition, Mono continues as-is, but our paychecks will come from Attachmate instead of Novell.

For openSUSE, there is a n article that says "openSUSE is safe".

I hope both projects are alive.

Wednesday, November 24, 2010

One more instruction for installing MonoDevelop F# add-in on Linux

If you install MonoDevelop F# add-in on Linux and you use with non-root user, you should do one more instruction:
sudo chmod a+w -R /etc/mono/registry/

Monday, November 22, 2010

F# in MonoDevelop on Mac OS X

In the article "F# in MonoDevelop and cross-platform web sites & screencasts", there are the instruction for installing F# in MonoDevelop on Linux. But someone ( of course, me too ) want to use this on Mac OS X and that instruction not suitable for on Mac OS X. So I introduce in this post.

0. Install F#

see also in this post.

Friday, November 19, 2010

.NET Book Zero equals Mono Book Zero

.NET Book Zero is the most famous book as free and online PDF, for C# beginners.
http://www.charlespetzold.com/dotnet/

But, of course, this book also useful for Mono beginners like me. I am reading both this book and Professional F# 2.0.

Friday, October 22, 2010

If you want to use Mono 2.8 on openSUSE 11.3 immediately...

In default Mono repository for openSUSE 11.3 (http://download.opensuse.org/repositories/Mono/openSUSE_11.3/), there are packages of version 2.6, not 2.8. If you want to use Mono 2.8 on openSUSE 11.3 immediately, use the repository below:

http://ftp.novell.com/pub/mono/download-stable/openSUSE_11.3/

Saturday, October 16, 2010

Install F# on Mac OS X

This article is for Mono 2.8.x and older. Mono 2.10.x and newer contain F# out-of-the-box.
Since Mono 3.0.2, Our Mac can run F# 3.0. Please check F# 3.0 on Mac

F# is an object-oriented functional language by Microsoft. It's based on C#. I try to explain what technologies of Java-lang are corresponding to:
execution environmentobject-oriented languageobject-oriented functional language
Java technologiesJVMJavaScala
.NET technologiesCLRC#F#

And F# is also available on Mono, not only .NET . Let's install F# on Mac OS X from scratch!

Tuesday, October 20, 2009

Gestalt and Moonlight

I learned 'Gestalt' recently - that is browser-side Ruby/Python/XAML scripting (instead of ECMAScript) driven with jQuery and Silverlight. Is that the product only for Windows? No! Gestalt supports not only Silverlight but also Moonlight.

I try to run sample bundled with Gestalt onto the Firefox on the my openSUSE.
  1. Install Firefox add-on of moonlight from here
  2. Download the zip of Gestalt from here
  3. Uncompress the zip of Gestalt
  4. Open the XAML sample files Gestalt/samples/getting.started/03_xaml.html, Gestalt/samples/getting.started/04_animation.html and Gestalt/samples/getting.started/05_final.html
If Gestalt/samples/getting.started/03_xaml.html succeeded, Firefox renders like below:

But samples of Ruby or Python didn't work in intact. I guess it's suspicious that Moonlight on the openSUSE 11.1 is 1.0, not 2.0 even though Firefox add-on of moonlight is 2.0 beta.