<commit_before># Setting up and starting Cuis Smalltalk #

Cuis Smalltalk is available in 64 bits and 32 bits variants. It also available in the 32 bits V3 (pre Spur) image format. All three of them share the full source code and have essentially the same behavior, providing full portability for your code between them. These instructions are for the recommended format for each system, although most systems support all of them. 

In general, we recommend using VMs from [OpenSmalltalk GitHub releases](https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/latest). In addition, the [SqueakJS](https://squeak.js.org) JavaScript Squeak VM that can run in a web browser can run our -32 and our -v3 images.

These instructions assume you have the Git code versioning system installed in your system. This has the advantage to set you up to easily contribute code back to Cuis packages, using Git pull requests. If you prefer not to use Git, see details at the end of this document. If you are on Windows or Mac, and prefer not using the command line, you might follow [Getting started using Mac Finder or Windows Explorer](GettingStarted-NoCommandLine.md).

If you want to contribute back to the community, you can do pull requests to this repo and/or alternatively subscribe to the Cuis development mail list at http://cuis-smalltalk.org/mailman/listinfo/cuis-dev_cuis-smalltalk.org , and email your code there.

## For all systems: Create project folder and add Cuis Smalltalk ##

Note: The '--depth 1' option avoids cloning all repo history (most likely you don't need it) and makes cloning the repo much faster, using less disk space.

Note: If you are creating the main (or only) Cuis folder in your machine, you might prefer 'Cuis-Smalltalk' as the folder name instead of 'MyProject' or some specific project name.
```
mkdir MyProject
cd MyProject
git clone --depth 1 https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev.git
cd Cuis-Smalltalk-Dev
./clonePackageRepos.sh
```
After that, you may periodically update all your repos from GitHub:
```
cd MyProject/Cuis-Smalltalk-Dev
./pullAllRepos.sh
```
Additionally, after doing your stuff, you can check what you need to commit to GitHub:
```
cd MyProject/Cuis-Smalltalk-Dev
./statusAllRepos.sh
```

## For 64 bits Linux running on AMD/Intel x64 hardware ##

Note: For 32 bits Linux on Intel/AMD, use ```*_linux32x86_*``` vm and the ```*-32.image``` Cuis image.

### Get and set up an appropriate VM ###
```
cd MyProject
rm -r cogspur
wget -O cogspur.tgz https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/download/202112201228/squeak.cog.spur_linux64x64.tar.gz
tar -zxvf cogspur.tgz
mv ./sqcogspur64linuxht ./cogspur
```

### Starting Cuis Smalltalk ###
```
cogspur/squeak Cuis-Smalltalk-Dev/Cuis6.0-5069.image
```
If you get this error message (you won't get it if you run Cuis as root or sudo):
```
pthread_setschedparam failed: Operation not permitted
...
```
Then you need to do this (just one time):
```
sudo cp Cuis-Smalltalk-Dev/squeak.conf /etc/security/limits.d/squeak.conf
```
Log out and log back in, or reboot the machine.

## For MacOSX ##

### Get and set up an appropriate VM ###
```
cd MyProject
curl -L -o CogSpur.dmg https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/download/202112201228/squeak.cog.spur_macos64x64.dmg
Open Finder on your folder
Double click on the dmg file
Drag Squeak.app to your MyProject folder
```

### Starting Cuis Smalltalk ###
* drop the Cuis6.0-5069.image over the Squeak.app file
* If you get "Squeak is an app downloaded from the Internet. Are you sure you want to open it?", click on [Open]
* Alternatively, you might:
```
./Squeak.app/Contents/MacOS/Squeak Cuis-Smalltalk-Dev-master/Cuis6.0-5069.image
```

## For 64 bits Windows (Git Bash) ##

Note: For 32 bits Windows, use ```*_win32x86_*``` vm and the ```*-32.image``` Cuis image.

### Get and set up an appropriate VM ###
```
cd MyProject
rm -r cogspur
curl -k -L -o cogspur.zip https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/download/202112201228/squeak.cog.spur_win64x64.zip
unzip cogspur.zip -d cogspur
```

### Starting Cuis Smalltalk ###
```
cogspur/Squeak.exe Cuis-Smalltalk-Dev/Cuis6.0-5069.image
```

## For Raspberry Pi Raspian ##

### Get and set up an appropriate VM ###
```
cd MyProject
rm -r cogspur
wget -O cogspur.tgz https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/download/202112201228/squeak.cog.spur_linux32ARMv6.tar.gz
tar -zxvf cogspur.tgz
mv ./sqcogspurlinuxhtRPi ./cogspur
```

### Starting Cuis Smalltalk ###<commit_msg>Docs updates<commit_after># Setting up and starting Cuis Smalltalk #

Cuis Smalltalk is available in 64 bits and 32 bits variants. It also available in the 32 bits V3 (pre Spur) image format. All three of them share the full source code and have essentially the same behavior, providing full portability for your code between them. These instructions are for the recommended format for each system, although most systems support all of them. 

In general, we recommend using VMs from [OpenSmalltalk GitHub releases](https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/latest). In addition, the [SqueakJS](https://squeak.js.org) JavaScript Squeak VM that can run in a web browser can run our -32 and our -v3 images.

These instructions assume you have the Git code versioning system installed in your system. This has the advantage to set you up to easily contribute code back to Cuis packages, using Git pull requests. If you prefer not to use Git, see details at the end of this document. If you are on Windows or Mac, and prefer not using the command line, you might follow [Getting started using Mac Finder or Windows Explorer](GettingStarted-NoCommandLine.md).

If you want to contribute back to the community, you can do pull requests to this repo and/or alternatively subscribe to the Cuis development mail list at http://cuis-smalltalk.org/mailman/listinfo/cuis-dev_cuis-smalltalk.org , and email your code there.

## For all systems: Create project folder and add Cuis Smalltalk ##

Note: The '--depth 1' option avoids cloning all repo history (most likely you don't need it) and makes cloning the repo much faster, using less disk space.

Note: If you are creating the main (or only) Cuis folder in your machine, you might prefer 'Cuis-Smalltalk' as the folder name instead of 'MyProject' or some specific project name.
```
mkdir MyProject
cd MyProject
git clone --depth 1 https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev.git
cd Cuis-Smalltalk-Dev
./clonePackageRepos.sh
```
After that, you may periodically update all your repos from GitHub:
```
cd MyProject/Cuis-Smalltalk-Dev
./pullAllRepos.sh
```
Additionally, after doing your stuff, you can check what you need to commit to GitHub:
```
cd MyProject/Cuis-Smalltalk-Dev
./statusAllRepos.sh
```

## For 64 bits Linux running on AMD/Intel x64 hardware ##

Note: For 32 bits Linux on Intel/AMD, use ```*_linux32x86_*``` vm and the ```*-32.image``` Cuis image.

### Get and set up an appropriate VM ###
```
cd MyProject
rm -r cogspur
wget -O cogspur.tgz https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/download/202112201228/squeak.cog.spur_linux64x64.tar.gz
tar -zxvf cogspur.tgz
mv ./sqcogspur64linuxht ./cogspur
```

### Starting Cuis Smalltalk ###
```
cogspur/squeak Cuis-Smalltalk-Dev/Cuis6.0-5069.image
```
If you get this error message (you won't get it if you run Cuis as root or sudo):
```
pthread_setschedparam failed: Operation not permitted
...
```
Then you need to do this (just one time):
```
sudo cp Cuis-Smalltalk-Dev/squeak.conf /etc/security/limits.d/squeak.conf
```
Log out and log back in, or reboot the machine.

## For MacOSX ##

### Get and set up an appropriate VM ###
```
cd MyProject
curl -L -o CogSpur.dmg https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/download/202112201228/squeak.cog.spur_macos64x64.dmg
Open Finder on your folder
Double click on the dmg file
Drag Squeak.app to your MyProject folder
```

### Starting Cuis Smalltalk ###
* drop the Cuis6.0-5069.image over the Squeak.app file
* If you get "Squeak is an app downloaded from the Internet. Are you sure you want to open it?", click on [Open]
* Alternatively, you might:
```
./Squeak.app/Contents/MacOS/Squeak Cuis-Smalltalk-Dev/Cuis6.0-5069.image
```

## For 64 bits Windows (Git Bash) ##

Note: For 32 bits Windows, use ```*_win32x86_*``` vm and the ```*-32.image``` Cuis image.

### Get and set up an appropriate VM ###
```
cd MyProject
rm -r cogspur
curl -k -L -o cogspur.zip https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/download/202112201228/squeak.cog.spur_win64x64.zip
unzip cogspur.zip -d cogspur
```

### Starting Cuis Smalltalk ###
```
cogspur/Squeak.exe Cuis-Smalltalk-Dev/Cuis6.0-5069.image
```

## For Raspberry Pi Raspian ##

### Get and set up an appropriate VM ###
```
cd MyProject
rm -r cogspur
wget -O cogspur.tgz https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/download/202112201228/squeak.cog.spur_linux32ARMv6.tar.gz
tar -zxvf cogspur.tgz
mv ./sqcogspurlinuxhtRPi ./cogspur
```

### Starting Cuis Smalltalk ###
{'fraction_non_alphanumeric': 0.10178257042253522, 'fraction_numerical': 0.027068661971830985, 'mean_word_length': 4.35592221567472, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4111049', 'n_tokens_mistral': 3141, 'n_tokens_neox': 2878, 'n_words': 1125}