Where can I download the Slang sources to SqueakVM? - smalltalk

Is there an archive somewhere that hosts the Slang sources for SqueakVM as a zip of .st sources? I want to just download them rather than attempting to coerce VMMaker to load into a running ST image and filing them out myself? I'm not trying to avoid this out of laziness, but because finding a set of instructions that actually work on a modern ST like Pharo amongst 30 years of archived discussions and dead links is apparently beyond me.
I have the bluebook, but it's pre-squeak, and not OCR'd either so I'd have to type it all in by hand.
To clarify: I don't want to run VMMaker. I don't want to build a new SqueakVM, I just want to be able to open the Slang sources for SqueakVM not Cog in a text editor and read them.

All Slang source bar recent releases of the Pharo fork is in the VMMaker package on http://source.squeak.org/VMMaker, project page http://source.squeak.org/VMMaker.html. Source packages consist of zip archives named .mcz, e.g. http://source.squeak.org/VMMaker/VMMaker.oscog-eem.839.mcz:
Archive: package-cache/VMMaker.oscog-eem.839.mcz
Length Date Time Name
-------- ---- ---- ----
16 07-30-14 19:41 package
724852 07-30-14 19:41 version
7186510 07-30-14 19:41 snapshot/source.st
7562064 07-30-14 19:41 snapshot.bin
-------- -------
15473442 4 files
However, as Nicolas Cellier says, accessing the source through Monticello is easier; for that you'll need to build a Squeak or Pharo image containing the loaded VMMaker and supporting packages. You'll also be able to run the VM simulator there-in to really explore it properly.
Scripts to build VMMaker images for the Cog branch are in the following svn directory, a part of the Cog svn source tree which contains generated sources from Slang, platform support code and build directories, in addition to the image directory:
http://www.squeakvm.org/svn/squeak/branches/Cog/image/
BuildSqueakTrunkVMMakerImage.st
The Cog VM is the fast JIT VM for Squeak. I am its principal author. My web site for Cog is http://www.mirandabanda.org/cogblog/. The site contains several blog posts that describe the VM, download directories for VM builds, an overview of the project, etc.
HTH

I can't help you with the sources directly but I can give you a recipe on to how to build the PharoVM for OS X (10.9). To get the Slang sources you probably don't even need to build the VM fully but only need to do what the README on github says to generate the sources (which is equivalent to step 1 in what follows).
follow instructions on https://github.com/pharo-project/pharo-vm
in the image, uncomment the debug line in PharoVMBuilder>>buildMacOSX32
in the image, remove all the occurrences of the compiler flag -fno-cse-follow-jumps
in the build files, change OS version number (two places) on the first 10 lines of build/CMakeLists.txt
change the line //#import <OpenGL/CGLMac ro.h> to #import <OpenGL/GL.h> in platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.m
follow the instructions on github
That's how I build my VM anyway. These instructions worked back in March 2014 and should still be valid by the time of writing.
Update
The above does not work anymore. I've written a script for building the PharoVM on 10.9 which can be found in my github repo. Feel free to use, copy, modify to your heart's content.

The question is which VMMaker? classical interpreter VM, or COG (JIT)?
If it's from Pharo, it will be COG, and the answer from Max is perfect, I have nothing to add.
If it's from Squeak, I don't recommend using a .st file, Monticello is really superior.
For classical VM, you might try one of the answers at How to load VMMaker in Squeak?
For COG, it's constantly changing, there's no more a prebuilt image, but if you load svn source from http://squeakvm.org/svn/squeak/branches/Cog then you'll find some startup script for loading all necessary package in a Squeak image, see end of README or image/Build*.st files.
Somehow, the recipe for building an image is better than a prebuilt image, so it's progress.

By far the easiest thing would be to load VMMaker into an image and read the code in the browser(s). That is, after all, the tool(s) intended for reading Smalltalk code. Slang is just Smalltalk with some restrictions and fudges to make it simple (hah! Have you read how the codegen classes do the transform?) to output C code and thus build the vm with 'normal' tools.
If you're trying to learn about the vm you could potentially gain some help from http://www.rowledge.org/resources/tim's-Home-page/Squeak/OE-Tour.pdf which is generally considered the standard work on the Squeak vm for now.

Related

Processing 3 IDE is half cyrillic

Recently I started to find interest in Processing and decided to download the offical Processing 3 IDE from https://processing.org/download/?processing. But half of the IDE is in cyrillic symbols.
Screenshot of the IDE
I already tried to change the configuration language etc. Also I downloaded the IDE to my workplace notebook and on the notebook the IDE was complete in normal english.
Now I dont know how to fix this problem, because there are no informations about a problem like this with the Processing 3 IDE.
A few things to try - you may have already.
I know you said you tried changing the config language, but I'm not sure if you changed the "language.txt" file in the directory "C:\Users\your_username\AppData\Roaming\Processing". Ensure it only contains one line - "en".
Fresh install of Processing (delete the folder you extracted to and the Processing folder in the directory mentioned above, and the sketchbook folder, usually in your documents).
UPDATE:
This is a solution which has worked for others experiencing this exact issue:
Download Processing 3.1.1 - https://github.com/processing/processing/releases/tag/processing-0250-3.1.1
Make sure Processing is not already running
Rename the java folder in the processing-3.2.3 directory to something else, eg. java_broken
Copy the java folder from 3.1.1 to the 3.2.3 directory
Try running the 3.2.3 version of processing.exe

What is stored in Packages/User directory?

How to save/restore Sublime Text 2 configs/plugins to migrate to another computer? states that, to backup a Sublime Text 2 installation, a user should preserve the ~/Packages/User directory (from the user's local data folder on whatever OS they're using).
However, http://andrew.hedges.name/blog/2012/01/19/sublime-text-2-more-sublime-with-a-drop-of-dropbox and most other walkthroughs for using Dropbox to sync Sublime's settings specify three directories: ~/Packages, ~/Installed Packages and ~/Pristine Packages.
What is the functional difference between backing up just ~/Packages/User, and the other 3 directories?
I think that Packages/User is the one in which you are supposed to put settings (according to Sublime's official and unofficial documentation). However, some people put them in the other folders from time to time.
The Dropbox advice may be a hedge against poor practice.
From here:
Installed Packages is:
You will find this directory in the data directory. It contains a copy
of every sublime-package installed. Used to restore Packages.
These are the packages installed as sublime-packages. I don't think package control uses this, but if you install something as a sublime-package maybe you want to keep it?
Pristine Packages is:
You will find this directoy in the data directory. It contains a copy
of every shipped and core package. Used to restore Packages.
So essentially a list of .sublime-package files used to restore if you break something.
Packages is:
The packages used by Sublime Text, either installed as part of sublime, or the plugins.
User is:
The user directory is your personal directory, containing configurations, additional snippets, etc.
Below are my personal views on what to save, so feel free to ignore it if you would like.
I would have to agree with the post saying just save the User directory, as Package Control will grab all of the plugins in the list if they aren't already installed. I didn't see this mentioned in that post, but you can also add repositories (by specifying a URL) to Package Control, which allows you to install Packages outside of those submitted to Package Control, but still hosted somewhere. One of the arguments I can see to saving the Packages directory completely is if you are using plugins that aren't hosted anywhere (though these could probably be moved to the Packages directory without any problems).
The Installed Packages and Pristine Packages are used to restore packages, so I wouldn't think these would be needed, but I'm sure there is some use case where it is.
Anyways, realize I got off topic a bit at the end there, but hope everything before that helps clarify.

Difference btw deb and src

I use the deb file for production and the source for development.Is this the correct way to do things?
I think that the deb might have certain optimizations(pyo or pyc) for production environment.
But since I have to move my custom modules, one at a time to the production,I find it increasingly difficult.
The actual addons path is here
(1) /usr/share/pyshared/openerp/addons
But the init.d points to
(2) /usr/lib/pymodules/python2.7/openerp/addons
In some modules the __init__.py is in 1 (eg: web_rpc)
and for some its in 2 (eg: hr)
What the actual difference btw
http://nightly.openerp.com/6.1/nightly/src/
and
http://nightly.openerp.com/6.1/nightly/deb/
I haven't tried the deb files, because we use the Ubuntu all-in-one script from openerpappliance.com. It downloads the source from Launchpad and then runs the deployment scripts for you. It will also do updates after you've installed.
We're very happy with the 5.0 version, but we haven't tried the 6.1 version, yet.
you can do with 6.1 is you can give multiple addons path to the your config file in comma separated , or else you can create link in addons folder for your customized folder while you can keep cumized module where you want, just put link(shortcut) to the addon sfoderl of your. this will give you flexibility.
Thank YOu

Create class diagram from already existent iphone code

does anybody know, how i could create automatically a UML class diagram from an already existent iphone project. Is it possible?
Thanks in advance.
Yes, you can use Doxygen:
Install Doxygen (with MacPorts: sudo port install doxygen).
Get a script like this and change the first lines to match your configuration.
Download these files and edit the Doxygen file so it says HAVE_DOT=YES and UML_LOOK=YES.
It will then generate and install a docset that you can read from the documentation browser, or just right click and show contents from Finder.
Or, if you want a graph of dependencies check: https://github.com/nst/objc_dep It uses graphviz.
See also OmniGraffle of all things. If you open an Xcode project with it, it will generate a full class diagram. It can be fairly overwhelming for a large project.

How to keep synchronized, per-version documentation?

I am working on a small toy project who is getting more and more releases. Until now, the documentation was just a set of pages in the wordpress blog I setup for the project. However, as time passes, new releases are out and I should update the online documentation to match the most recent release.
Unfortunately, if I do so, the docs for the previous releases will "disappear" as my doc pages are updated to the most recent version, therefore I decided to include the documentation in the release package and to keep the most recent documentation available online as a web page as well.
A trivial idea would be to wget the current docs from the wordpress pages, save them into the svn and therefore into the release package, repeating the procedure at every new release. Unfortunately, the HTML I get must be hacked by hand to fix the links (or I should hack wordpress to use BASE so that the HTML code is easily relocatable, something I don't want to do).
How should I handle the requirements of having at the same time:
user-browsable documentation for the proper version included in the downloadable package
most recent documentation available online (and properly styled with my web theme)
keep synchronized between the svn and the actual online contents (in wordpress, or something else that fits nicely with my wordpress setup)
easy to use
Thanks
Edit: started a bounty to see if I can lure more answers. I think this is a quite important issue, and it would be nice to have multiple hints and opinions for future readers.
I would check your pages into SVN, and then have your webserver update from its local SVN working copy when you're ready to release. Put everything into SVN--wordpress, CSS, HTML, etc.
WGet can convert all the links in the document for you. See the convert-links option:
http://www.gnu.org/software/wget/manual/html_node/Advanced-Usage.html
Using this in conjuction with the other methods could yield a solution.
I think there are two problems to be solved here
how and where to keep the documentation aligned with the code
where to publish the documentation
For 1 i think it's best to:
keep the documentation in a repository (SVN or git or whatever you already use for the code) as a set of files, instead of in a db as it is easier to keep a history of changes (an possibly to stay in par with the code releases
use an approach where the documentation is generated from a set of source files (you'd keep the sources in the repository) from which the html files for the distribution package or for publishing on the web are generated. The two could possibly differ, as on the web you'd need to keep some version information (in the URL) that you don't need when packaging a single release.
To do "2" there are several tools that may generate a static site. One of them is Jekyll it's in ruby and looks quite complete and customizable.
Assuming that you use a tool like jekyll and keep the files and source in SVN you might setup your repo in this way:
repo/
tags/
rel1.0/
source/
documentation/
rel2.0/
source/
documentation/
rel3.0/
source/
documentation/
trunk/
source/
documentation/
That is:
You keep the current documentation beside the source in the trunk
When you do a release you create a tag for the release
you configure your documentation generator to generate documentation for each of the repo/tags//documentation directory such that the documentation for each release is put in documentation_site/ directory
So to publish the documentation (point 2 above):
you copy on the server the contents of the documentation_site directory, putting it in the same base dir of your wordpress install or linking from that, such that each release doc can be accessed as: http://yoursite/project/docs/relXX/
you create a link to the current release documentation such that it can always be reached as http://yoursite/project/docs/current
The trick here is to publish the documentation always under a proper release identifier (in the URL, on the filesystem) and use a link (or a redirect) to make sure that the "current documentation" on the web server points to the current release.
I have seen some programs use help & manual. But I am a Mac user and I have no experience with it to know if it's any good. I'm looking for a solution myself for Mac.
For my own projects, if that were a need, I would create a sub-dir for the documentation, and have all the files refer from the known-base of there relatively. For example,
index.html -- refers to images/example.jpg
README
-- subdirs....
images/example.jpg
section/index.html -- links back to '../index.html',
-- refers to ../images/example.jpg
If the docs are included in the SVN/tarball download, then they are readable as-is. If they are generated from some original files, they would be pre-generated for a downloadable version.
Archive versions of the documentation can be unpacked/generated and placed into named directorys (eg docs/v1.05/)
Its a simple PHP script that can be written to get a list the subdirs of the /docs/ directory from the local disk and display a list, and highlighting the most recent, for example.