Skip to content

Instantly share code, notes, and snippets.

@zippy1981
Last active Dec 22, 2015
Embed
What would you like to do?
sudo apt-get update
sudo apt-get upgrade outdated
sudo apt-get remove firefox libreoffice-*
sudo apt-get dist-upgrade
# reboot now to get the latest kernel
sudo apt-get install dkms #makes it easier for vm guest additions for your hypervisor of choice to be added
#mow install guest additions
sudo apt-get install terminator vim
# I like a snapshot here
sudo apt-get install openjdk-7-jdk
# below doesn't seem to work install IntelliJ from the ubuntu one store
#sudo add-apt-repository https://UbuntuOne_UserName:Password@private-ppa.launchpad.net/commercial-ppa-uploaders/intellij-idea-ce/ubuntu/
#sudo apt-get install intellij-idea-ce
# Below is an outdated debian repo with sbt
# sudo dpkg -i http://apt.typesafe.com/repo-deb-build-0002.deb
# sudo apt-get install sbt
# To really install sbt:
wget -P /tmp http://repo.scala-sbt.org/scalasbt/sbt-native-packages/org/scala-sbt/sbt/0.13.0/sbt.deb
dpkg -i /tmp/sbt.deb
# sbt plugin configuration
echo 'addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "latest.integration")' > ~/.sbt/plugins/build.sbt
echo > ~/.sbt/plugins/build.sbt
echo addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "latest.integration") > ~/.sbt/plugins/build.sbt
sbt gen-idea
sbt make-pom #not sure if this actually makes a maven project or not.
sbt eclipse
maya@ubuntu:~/Documents/src/scala$ apt-cache policy intellij-idea-ce
intellij-idea-ce:
Installed: 12.1-0ubuntu1
Candidate: 12.1-0ubuntu1
Version table:
*** 12.1-0ubuntu1 0
500 https://private-ppa.launchpad.net/commercial-ppa-uploaders/intellij-idea-ce/ubuntu/ raring/main amd64 Packages
100 /var/lib/dpkg/status

Is an object a singleton or a class with all static methods and a private constructor?

A method is apparently the same thing as a java method (something in a class instance that optionally takes arguments, does things, and optionall returns something. A function is apparenly an actual object, which has an apply method that gets called by the JVM when you call the function.

there are three ways to define things:

  1. def defines a method, that gets evaluated every time its called
  2. val defines an immutable object
  3. var defines a mutable object.

This weekend I took to teaching myself scala. I did so in a ubuntu VM on my wife's iMac. As usual when I try a java project, I spend more time getting my environment up than programming. In the spirit of my Creating a minimally viable Centos instance for SSH X11 Forwarding post, I've put my notes up here for myself, and anyone else who might benefit from them.

I decided to go with the open source community edition of IntelliJ IDEA by JetBrains as my IDE (after using vim and bash to create and run the simple one file examples. I'm a big fan of their ReSharper and dotTrace profiler products for .NET, so if I end up doing more Java I will likely buy an IntelliJ license.

First some notes on setting up the VM itself:

  • I used a trial of Vmware Fusion because I could not install Ubuntu on the existing Parallels 6.0 hypervisor.
  • 1024 gigs of ram is not enough. Firefox and IntelliJ start swapping excessively and getting slow. 2048 is enough. I didn't try to turn the ram down anymore.
  • One CPU core has proven to be enough.

Now setting up

  • I installed IntelliJ from the ubuntu store. Didn't figure out the command line way of doing it
  • No need to install scala. sbt will install its own version, in typical java fashion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment