I copied/pasted the linked to Misc.scala into a file Misc.scala:
https://www.cs.helsinki.fi/u/wikla/OTS/Sisalto/examples/lists/Misc.scala
and edited it in SMC. Proper syntax highlighting is already supported.
In a terminal, I then did
scala Misc.scala
and it ran and output stuff:
~$ scala Misc.scala
assoc [true]
msort((x: Int, y: Int) => x < y)(List(5, 7, 1, 3)) [List(1, 3, 5, 7)]
forList [List((2,1), (3,1), (3,2), (4,1), (4,2), (4,3))]
>
> I think the first step is to have small code pieces working, then
> being able to edit the source files with syntax highlighting (i.e.
> associating *.scala files with the editor), and only then and if it is
> feasible, to also thinking about integrating it into the sagews via
> such a magic command.
>
> Another question is, if there is an existing program for interactive
> scala programming (like ipython for python)
>
> -- h
>
> --
> You received this message because you are subscribed to the Google Groups "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
sage-cloud+...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-cloud/CAGG4CB4OcBwMJX0G3yKKLDpHTD096u7guHCU1yupg-f8anN-ew%40mail.gmail.com.