<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Self Modifying. &#187; howto</title>
	<atom:link href="http://blog.selfmodifying.com/tag/howto/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.selfmodifying.com</link>
	<description>The weblog of Ryan Garver.  A coffee nut.  An agile freak.</description>
	<lastBuildDate>Mon, 30 Aug 2010 03:40:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.selfmodifying.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/dd4961a826989b7a52e1ae8fbe14143a?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Self Modifying. &#187; howto</title>
		<link>http://blog.selfmodifying.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.selfmodifying.com/osd.xml" title="Self Modifying." />
	<atom:link rel='hub' href='http://blog.selfmodifying.com/?pushpress=hub'/>
		<item>
		<title>Up and running with MagLev</title>
		<link>http://blog.selfmodifying.com/2009/11/21/up-and-running-with-maglev/</link>
		<comments>http://blog.selfmodifying.com/2009/11/21/up-and-running-with-maglev/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 17:58:05 +0000</pubDate>
		<dc:creator>Ryan Garver</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[maglev]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[smalltalk]]></category>

		<guid isPermaLink="false">http://blog.selfmodifying.com/?p=74</guid>
		<description><![CDATA[The MagLev alpha was released recently.  Before I get too far in to this post I need to make it clear that I&#8217;m not affiliated with the MagLev development team.  I&#8217;m not really even much of a Ruby interpreter hacker.  I&#8217;m a curious ruby developer that has heard some interesting things about the project and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.selfmodifying.com&amp;blog=7311382&amp;post=74&amp;subd=selfmodifying&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://groups.google.com/group/maglev-discussion/browse_thread/thread/1102993e9e21492a" target="_blank">The MagLev alpha was released recently</a>.  Before I get too far in to this post I need to make it clear that I&#8217;m not affiliated with the MagLev development team.  I&#8217;m not really even much of a Ruby interpreter hacker.  I&#8217;m a curious ruby developer that has heard some interesting things about the project and wanted to get it up and running now that it&#8217;s available.  I decided to make this post because the install and setup procedure is anything but standard.  It&#8217;s not complicated, just not what you normally would expect.</p>
<p>First lets get the code:</p>
<pre class="brush: bash;">
$ git clone git://github.com/MagLev/maglev.git

Initialized empty Git repository in /Users/rgarver/Sources/maglev/.git/
remote: Counting objects: 28955, done.
remote: Compressing objects: 100% (12671/12671), done.
remote: Total 28955 (delta 15669), reused 28427 (delta 15200)
Receiving objects: 100% (28955/28955), 14.97 MiB | 539 KiB/s, done.
Resolving deltas: 100% (15669/15669), done.
Checking out files: 100% (2180/2180), done.
Initialized empty Git repository in /Users/rgarver/Sources/maglev/.git/remote: Counting objects: 28955, done.remote: Compressing objects: 100% (12671/12671), done.remote: Total 28955 (delta 15669), reused 28427 (delta 15200)Receiving objects: 100% (28955/28955), 14.97 MiB | 539 KiB/s, done.Resolving deltas: 100% (15669/15669), done.Checking out files: 100% (2180/2180), done.

$ cd maglev
</pre>
<p>Great, we have the code.  Next step is to do a base install.  This installs the base libraries and GemStone which is the fabled persistence layer that MagLev has integrated.  <a href="http://en.wikipedia.org/wiki/Gemstone_Database_Management_System">GemStone</a> is a object persistence layer originally built for Smalltalk.  If you haven&#8217;t ever played with Smalltalk or some of the variants (eg: Squeak) I recommend it.  It will turn your head upside down.</p>
<pre class="brush: bash;">
$ ./install.sh
[Info] Starting installation of MagLev-22578.MacOSX on sirius.local
Password:
Sat Nov 21 09:22:44 PST 2009
[Info] Setting up shared memory
  Total memory available is 4096 MB
  Max shared memory segment size is 4 MB
  Max shared memory allowed is 4 MB
[Info] Increasing max shared memory segment size to 2048 MB
kern.sysv.shmmax: 4194304 -&gt; 2147483648
[Info] Increasing max shared memory allowed to 2048 MB
kern.sysv.shmall: 1024 -&gt; 524288
[Info] Adding the following section to /etc/sysctl.conf
# kern.sysv.shm* settings added by MagLev installation
kern.sysv.shmmax=2147483648
kern.sysv.shmall=524288
kern.sysv.shmmin=1
kern.sysv.shmmni=32
kern.sysv.shmseg=8
[Info] Setting up GemStone netldi service port
[Info] Adding &quot;gs64ldi  51456/tcp&quot; to /etc/services
[Info] Downloading GemStone archive using /opt/local/bin/wget
--2009-11-21 09:22:44--  http://glass-downloads.gemstone.com/maglev/GemStone-22578.MacOSX.zip
Resolving glass-downloads.gemstone.com... 207.171.185.197
Connecting to glass-downloads.gemstone.com|207.171.185.197|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 74858717 (71M) [application/zip]
Saving to: `GemStone-22578.MacOSX.zip'

100%[==========================================================================&gt;] 74,858,717   847K/s   in 1m 45s

2009-11-21 09:24:32 (694 KB/s) - `GemStone-22578.MacOSX.zip' saved [74858717/74858717]

[Info] Uncompressing GemStone archive into /Users/rgarver/Sources
[Info] Linking gemstone to /Users/rgarver/Sources/GemStone-22578.MacOSX
[Info] updating MSpec, RubySpec, and RBS submodules
Submodule 'benchmark' (git://github.com/acangiano/ruby-benchmark-suite.git) registered for path 'benchmark'
Submodule 'spec/mspec' (git://github.com/rubyspec/mspec.git) registered for path 'spec/mspec'
Submodule 'spec/rubyspec' (git://github.com/rubyspec/rubyspec.git) registered for path 'spec/rubyspec'
Initialized empty Git repository in /Users/rgarver/Sources/maglev/benchmark/.git/
remote: Counting objects: 7332, done.
remote: Compressing objects: 100% (5521/5521), done.
remote: Total 7332 (delta 1595), reused 6917 (delta 1274)
Receiving objects: 100% (7332/7332), 9.90 MiB | 578 KiB/s, done.
Resolving deltas: 100% (1595/1595), done.
Submodule path 'benchmark': checked out 'd807eea7f7b2f38240bc177a0c22e599081882ea'
Initialized empty Git repository in /Users/rgarver/Sources/maglev/spec/mspec/.git/
remote: Counting objects: 2745, done.
remote: Compressing objects: 100% (1080/1080), done.
remote: Total 2745 (delta 1848), reused 2484 (delta 1644)
Receiving objects: 100% (2745/2745), 378.57 KiB | 383 KiB/s, done.
Resolving deltas: 100% (1848/1848), done.
Submodule path 'spec/mspec': checked out 'bcec47c70e0678a29fd0c1345358c4daf7b971a3'
Initialized empty Git repository in /Users/rgarver/Sources/maglev/spec/rubyspec/.git/
remote: Counting objects: 26787, done.
remote: Compressing objects: 100% (8705/8705), done.
remote: Total 26787 (delta 18332), reused 25672 (delta 17482)
Receiving objects: 100% (26787/26787), 3.71 MiB | 520 KiB/s, done.
Resolving deltas: 100% (18332/18332), done.
Submodule path 'spec/rubyspec': checked out 'b0a18cf80dc706d39ee550831b8b941224b60fb6'
[Info] Creating new default 'maglev' repository
[Info] Generating the MagLev HTML documentation
[Info] Finished upgrade to MagLev-22578.MacOSX on sirius.local

[Info] MagLev version information:
maglev 0.6 (ruby 1.8.6) (2009-11-20 rev 22578-1067) [x86_64-linux]
GEMSTONE: 3.0.0 Build: 64bit-22578
MONTICELLO: MagLev-ao.1067.mcz
MAGLEV: commit e2a4fe2e0f7ca85cdcb141e6b56913eba802eefd
        Author: Allen Otis &lt;otisa@abaco.gemstone.com&gt;
        Date:   Thu Nov 19 19:57:09 2009 -0800
[Info] GemStone version information:
GemStone/S 64 Bit
3.0.0 Build: 64bit-22578
Fri Nov 20  8:22:00 2009

[Info] Adding these to your .bashrc will make it easier to run MagLev
export MAGLEV_HOME=/Users/rgarver/Sources/maglev
export PATH=$MAGLEV_HOME/bin:$PATH

[Info] After you complete this upgrade and verify MagLev is working, run
  rake stwrappers
to generate the .rb files for the GemStone/Smalltalk FFI
in MAGLEV_HOME/lib/ruby/site_ruby/1.8/smalltalk/
</pre>
<p>As you can see on OS X it will build everything for 64bit which is pretty cool.  It also downloaded a bunch of support libraries and updated all of the submodules.  If you ever update the code locally you are supposed to run &#8216;$ ./update.sh&#8217; to rebuild everything and get it all up and running.</p>
<p>Once you have it installed you should add the following lines to your .profile or .bashrc</p>
<pre class="brush: bash;">
export MAGLEV_HOME=/Users/rgarver/Sources/maglev
export PATH=$MAGLEV_HOME/bin:$PATH
</pre>
<p>You&#8217;ll need to make sure you run those lines on the command line also.  Once the environment is setup you can run &#8216;$ rake maglev:start&#8217;.  This command apparently boots up the core MagLev engine.</p>
<pre class="brush: bash;">
$ rake maglev:start
(in /Users/rgarver/Sources/maglev)
startstone[Info]: Starting Stone repository monitor &quot;maglev&quot;.
startstone[Info]: GemStone server 'maglev' has been started.
</pre>
<p>Once that is started you are good to go:</p>
<pre class="brush: bash;">
$ maglev-irb
/Users/rgarver/.irbrc
error , no such file to load -- readline,
          during /Users/rgarver/Sources/maglev/lib/ruby/1.8/irb/completion.rb
error , no such file to load -- readline,
          during /Users/rgarver/.irbrc
irb(main):001:0&gt; puts 'hi'
hi
=&gt; nil
irb(main):002:0&gt;
</pre>
<br />Posted in programming Tagged: howto, install, maglev, programming, ruby, smalltalk <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/selfmodifying.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/selfmodifying.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/selfmodifying.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/selfmodifying.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/selfmodifying.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/selfmodifying.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/selfmodifying.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/selfmodifying.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/selfmodifying.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/selfmodifying.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/selfmodifying.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/selfmodifying.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/selfmodifying.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/selfmodifying.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.selfmodifying.com&amp;blog=7311382&amp;post=74&amp;subd=selfmodifying&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.selfmodifying.com/2009/11/21/up-and-running-with-maglev/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d928b55d9910cba3360cda7f214cf6e3?s=96&#38;d=&#38;r=PG" medium="image">
			<media:title type="html">Ryan</media:title>
		</media:content>
	</item>
	</channel>
</rss>