The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

CElliott (12) [Avatar] Offline
#1
I downloaded and installed SBT into Windows 8.1. I typed in sbt console, and it downloaded a bunch of stuff. Then I typed in "runMain appendixA/Test" and sbt appeared to define a resource string. Then I typed in runMain appendixA/Test or runMain appendixA/Test null or runMain chap01/HelloWorld and all I saw was

<console>:8: warning: postfix operator HelloWorld should be enabled
by making the implicit value scala.language.postfixOps visible.
This can be achieved by adding the import clause 'import scala.language.postfixOps'
or by setting the compiler option -language:postfixOps.
See the Scala docs for value scala.language.postfixOps for a discussion
why the feature should be explicitly enabled.
runMain chap01/HelloWorld

I can write programs in C, C++, Pascal, Lisp, VisualBasic, C#, Java, and Perl, but the above is Greek to me. Even if I knew where to find out what it was talking about, there is no way I want to pour thru pages of documentation just to read your book and work the examples.

I spent at least 4 hours trying to make Eclipse-Scala work. It emitted nothing but errors; there is nothing to show for all that time. I am used to Eclipse; I have written hundreds of Java programs on Eclipse. It would be so nice I if I could make it work with Scala and Figaro, but nothing. Eclipse-Scala is all new; the Eclipse is the latest version, the Scala is the latest version. But it will not do anything. There is no up-to-date documentation on the website. I know you don't want to support Eclipse-Scala, but you have to give us something to work with, and a working Eclipse would be a real treat.

I did make Test.scala work with the command line scala Test.scala. It produced "1.0." Wow!

I can't figure out if you are trying to be annoying or just don't care, but whichever it is, you are very good at it. I am sure you have no time, but either do your readers. All I want to do is learn practical probabilistic programming for a project I am working on. I can't spend hours and hours just trying to make the examples in the book work. It just is not practical.
avi.pfeffer (102) [Avatar] Offline
#2
Hi,

I'm really sorry for your experience. I've asked my team to look into it and see if anything's changed. We'll get it fixed.

Avi

avi.pfeffer (102) [Avatar] Offline
#3
build.properties
[ 18 bytes ]
Build.scala
[ 454 bytes ]
Hi,

The warning you saw was harmless. We've added a flag to the SBT script that will supress this warning. The script is attached to this message. I've also attached a properties file that updates SBT to the latest version. You should place these in your project subdirectory of the main project directory.

As far as getting Scala to work with Eclipse, you can run "sbt eclipse" from your main project directory - this should set up eclipse to use SBT properly. Please let me know if this works.

Thanks,

Avi