Giter Site home page Giter Site logo

scala-notebook's Introduction

Scala Notebook

A more friendly, browser-based interactive Scala prompt (REPL).

Based on the IPython notebook project, this project will let you interact with Scala in a browser window, which has the following advantages over the standard REPL:

  • Easy to view and edit past commands
  • Commands can return HTML or images, allowing richer interactivity (charts, for example)
  • Notebooks can be saved and loaded, providing a bridge between interactive REPL and classes in a project
  • Supports mixing Scala expressions and markdown, letting you create rich, interactive documents similar to Mathematica

While I think this tool will be helpful for everyone using Scala, I expect it to be particularly valuable for the scientific and analytics community.

Using Scala Notebook

Building From Source

  • To build and run from SBT, type
project server
run

Alt text

Development

Build Status

IDE Setup

  • If you're using an IntelliJ project, note that by default IntelliJ will not include SSP files resources. Change settings in IntelliJ to to include '*' as resource extension.

Overview

Having the web server process separate from the process doing the evaluation is also important in Scala; we want to separate the user's actions from the web server, allowing a restart of the client process (after building new client libraries, for example).

To that end, the project is organized as follows:

  • server is the web server
  • common are the classes shared by both
  • observable
  • kernel
  • subprocess

Architecture

  • Server
  • Kernel(s)
  • Widgets

scala-notebook's People

Contributors

chrismyang avatar copumpkin avatar elemgee avatar fernandoacorreia avatar folone avatar hanxue avatar kencoder avatar krisher avatar nightscape avatar paulp avatar rozza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scala-notebook's Issues

is it available to draw charts?

in ipython notebook, making a chart is really easy

I go around this wiki and sources, but I couldn't find how to make a chart easily

How to import a class from a jar?

I'm trying to combine it with Apache Spark (one of the hottest framework for data analysis) but I don't know how to do it. Can someone give me a hint so I can possibly implement it myself? Of course, if someone is still maintaining this project.

Creating a new notebook crashes the kernel immediately if you run other services on localhost

It then restarts and all is well, but the crash in the log is as follows:

Embedded server running on port 8899. Press any key to stop.
net.liftweb.json.JsonParser$ParseException: unknown token h
Near: ho
    at net.liftweb.json.JsonParser$Parser.fail(JsonParser.scala:228)
    at net.liftweb.json.JsonParser$Parser.nextToken(JsonParser.scala:313)
    at net.liftweb.json.JsonParser$$anonfun$2.apply(JsonParser.scala:184)
    at net.liftweb.json.JsonParser$$anonfun$2.apply(JsonParser.scala:141)
    at net.liftweb.json.JsonParser$.parse(JsonParser.scala:80)
    at net.liftweb.json.JsonParser$.parse(JsonParser.scala:45)
    at net.liftweb.json.package$.parse(package.scala:41)
    at com.bwater.notebook.ObservableIntent$$anonfun$1$$anonfun$apply$1.apply(ObservableIntent.scala:61)
    at com.bwater.notebook.ObservableIntent$$anonfun$1$$anonfun$apply$1.apply(ObservableIntent.scala:25)
    at scala.PartialFunction$$anon$1.apply(PartialFunction.scala:75)
    at unfiltered.netty.websockets.SocketPlan.messageReceived(plans.scala:182)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
    at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:458)
    at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:538)
    at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:437)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
    at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:91)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processSelectedKeys(AbstractNioWorker.java:385)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:256)
    at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:35)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)
2013-04-03 20:10:41,670  INFO [RemoteProcess-akka.actor.default-dispatcher-2] (akka.event.slf4j.Slf4jEventHandler) - Slf4jEventHandler started

I added some more debugging and it turns out that the bad message the parser doesn't like is host=.butterfly. I'm trying to find where it gets sent now. It looks like a cookie, but I have no idea how it got set and why the kernel is receiving it.

Interactive graphs

Sorry for raising an issue for general discussion, but there doesn't seem to be a mailing list.

I have the beginning of a fork of Scala Notebook which provides interactive graphs via Breeze and Breeze-Bokeh. For those unfamiliar, Breeze is a numpy-like library for Scala, while Breeze-Bokeh is a (highly experimental) Scala backend to the BokehJS plotting library.

The goal is to give Scala-Notebook functionality closer to IPython-Notebook.

Currently it's just a proof of concept and the code is kind of ugly, also doesn't do much besides line plots. Is there any interest in integrating such functionality into the official Scala-Notebook project?

Also, can anyone suggest a more modular way of adding this functionality? My fork just adds breeze and breeze-bokeh to the server dependencies and edits core Scala Notebook files to render the Bokeh graphs.

To try it ou clone my fork and click "Run All" in the Welcome notebook.

https://github.com/stucchio/scala-notebook

[error] (server/compile:js-source-graph) java.net.ConnectException: Connection timed out

Hi guys,

I'd like to run scala-notebook however failed. The only one I did is change all the '127.0.0.1' to my server's ip address and I got error like title.

Full log of my situation is below;

$ sbt
[info] Loading project definition from /data1/jun/programming/scala-notebook/project
[warn] Multiple resolvers having different access mechanism configured with same name 'sbt-plugin-releases'. To avoid conflict, Remove duplicate project resolvers (resolvers) or rename publishing resolver (publishTo).
[info] Set current project to scala-notebook (in build file:/data1/jun/programming/scala-notebook/)

clean
[success] Total time: 0 s, completed Jul 25, 2013 4:33:32 PM
project server
[info] Set current project to notebook-server (in build file:/data1/jun/programming/scala-notebook/)
run
[info] Updating {file:/data1/jun/programming/scala-notebook/}subprocess...
[info] Resolving org.scalatest#scalatest_2.9.2;1.8 ...
[info] Done updating.
[info] Updating {file:/data1/jun/programming/scala-notebook/}observable...
[info] Resolving org.scalatest#scalatest_2.9.2;1.8 ...
[info] Done updating.
[info] Updating {file:/data1/jun/programming/scala-notebook/}common...
[info] Resolving org.scalatest#scalatest_2.9.2;1.8 ...
[info] Done updating.
[info] Updating {file:/data1/jun/programming/scala-notebook/}kernel...
[info] Resolving org.scalatest#scalatest_2.9.2;1.8 ...
[info] Done updating.
[info] Updating {file:/data1/jun/programming/scala-notebook/}server...
[info] Resolving org.scalamock#scalamock-core_2.9.2;2.4 ...
[info] Done updating.
[info] Compiling 9 Scala sources and 1 Java source to /data1/jun/programming/scala-notebook/subprocess/target/scala-2.9.2/classes...
[info] Compiling 9 Scala sources to /data1/jun/programming/scala-notebook/observable/target/scala-2.9.2/classes...
[info] Compiling sbt-js source /data1/jun/programming/scala-notebook/observable/target/scala-2.9.2/resource_managed/main/observable/js/equiv.js
[info] Compiling sbt-js source /data1/jun/programming/scala-notebook/observable/target/scala-2.9.2/resource_managed/main/observable/js/observable.js
[info] Compiling 9 Scala sources to /data1/jun/programming/scala-notebook/common/target/scala-2.9.2/classes...
[info] Compiling 9 Scala sources to /data1/jun/programming/scala-notebook/kernel/target/scala-2.9.2/classes...
[warn] /data1/jun/programming/scala-notebook/kernel/src/main/scala/HackIMain.scala:15: method stop in class Thread is deprecated: see corresponding Javadoc for more information.
[warn] line.thread.stop()
[warn] ^
[warn] one warning found
[info] Compiling 11 Scala sources to /data1/jun/programming/scala-notebook/server/target/scala-2.9.2/classes...
[trace] Stack trace suppressed: run last server/compile:js-source-graph for the full output.
error java.net.ConnectException: Connection timed out
[error] Total time: 239 s, completed Jul 25, 2013 4:37:36 PM

Thanks

Widgets don't work

new InputBox("")

res3: com.bwater.notebook.widgets.InputBox = <InputBox widget>

No widget is displayed anywhere

Run error with sbt 0.12.1 and 0.12.4

Hi,

Compilation is successful but getting below error while running server using "run" command
trace] Stack trace suppressed: run last server/compile:js-source-graph for the full output.
error java.nio.charset.MalformedInputException: Input length = 1

Steps followed -

  1. sbt (v 0.12.1)
  2. compile
  3. project server
  4. run
    Am I doing something wrong?
    Pawan

Create a Github scala-notebook organization?

Hi all,

I really like scala-notebook, but looking at Github's network graph it looks as if everyone is doing his own thing and there are many long-lived forks whose functionality is not merged back into the main project.
The

Also forks like spark-notebook (advanced functionality but specialized to Spark) and alternative projects like ScalaKata or Zeppelin were created which are trying to achieve something similar with slightly different focus.

IMO a lot of energy gets lost by reinventing the wheel that many times instead of reusing a stable basis which scala-notebook could provide.

What do you think of creating a top-level scala-notebook organization on Github where more collaborators can have access rights and maintenance can be distributed on more shoulders?

Best regards
Martin

Cannot type '&' character

When editing the code block below, I Scala Notebook does not allow me to type in the & character.

image

The workaround is to copy and paste & from the clipboard. Note that on a new cell below, I can type & normally.

Copy and pasting the code block works well, but when I type it out, at this point the & character cannot be used

image

Multi Dimensional Mathematical / Vectorised Spreadsheets

Can't exit to SBT prompt if kernel running

  1. Run SN from sbt (i.e., "project server; run")
  2. Don't open a notebook! Simply type any key: you get returned to the SBT prompt
  3. Now open a notebook (make sure the kernel comes up)
  4. Hit a key.

Expected: returned to SBT prompt
Actual: Stuck in SBT netherworld, an unceasing nightmare where you are forced to either exit the SBT process entirely, or wait an eternity for a sweet release that will never arrive.


We're getting out the the Server main method, so I'm like 99% sure that there's just some daemon thread that SBT is blocking on to complete.

(In case it's helpful, the remote actor child process is definitely exiting).

KernelTests are broken

KernelTests seem to be really broken, running ScalaTest 2.x.x + ScalaMock 3.1.RC1.
Even causes other tests not to be run by ScalaTest.

[info] A kernel calculator
[info] - should perform simple math
2014-05-03 20:20:14,467  INFO [main] (com.bwater.notebook.kernel.pfork.BetterFork$) - Remote process starting
2014-05-03 20:20:14,797  INFO [main] (com.bwater.notebook.kernel.pfork.BetterFork$) - Remote process starting
2014-05-03 20:20:14,808  INFO [main] (com.bwater.notebook.kernel.pfork.BetterFork$) - Remote process starting
2014-05-03 20:20:15,190  INFO [Remote-akka.actor.default-dispatcher-4] (akka.event.slf4j.Slf4jEventHandler) - Slf4jEventHandler started
2014-05-03 20:20:15,208 DEBUG [Remote-akka.actor.default-dispatcher-3] (akka.event.EventStream) - logger log1-Slf4jEventHandler started
2014-05-03 20:20:15,208 DEBUG [Remote-akka.actor.default-dispatcher-3] (akka.event.EventStream) - Default Loggers started
2014-05-03 20:20:15,382  INFO [Remote-akka.actor.default-dispatcher-3] (NettyRemoteTransport(akka://[email protected]:63920)) - RemoteServerStarted@akka://[email protected]:63920
2014-05-03 20:20:15,490  INFO [Remote-akka.actor.default-dispatcher-4] (akka.event.slf4j.Slf4jEventHandler) - Slf4jEventHandler started
2014-05-03 20:20:15,506 DEBUG [Remote-akka.actor.default-dispatcher-2] (akka.event.EventStream) - logger log1-Slf4jEventHandler started
2014-05-03 20:20:15,507 DEBUG [Remote-akka.actor.default-dispatcher-2] (akka.event.EventStream) - Default Loggers started
2014-05-03 20:20:15,511  INFO [Remote-akka.actor.default-dispatcher-3] (akka.event.slf4j.Slf4jEventHandler) - Slf4jEventHandler started
2014-05-03 20:20:15,516  INFO [Remote-akka.actor.default-dispatcher-3] (NettyRemoteTransport(akka://[email protected]:63920)) - RemoteClientStarted@akka://[email protected]:63877
2014-05-03 20:20:15,516 DEBUG [Remote-akka.actor.default-dispatcher-3] (RemoteClient(akka://Remote)) - Starting remote client connection to [akka://[email protected]:63877]
2014-05-03 20:20:15,520 DEBUG [Remote-akka.actor.default-dispatcher-3] (NettyRemoteTransport(akka://[email protected]:63920)) - RemoteServerClientConnected@akka://[email protected]:63920: Client[akka://[email protected]:63877]
2014-05-03 20:20:15,541 DEBUG [Remote-akka.actor.default-dispatcher-3] (akka.event.EventStream) - logger log1-Slf4jEventHandler started
2014-05-03 20:20:15,541 DEBUG [Remote-akka.actor.default-dispatcher-3] (akka.event.EventStream) - Default Loggers started
2014-05-03 20:20:15,570 DEBUG [Remote-akka.actor.default-dispatcher-4] (LocalActorRefProvider(akka://Remote)) - Received command [DaemonMsgCreate(Props(<function0>,akka.actor.default-dispatcher,NoRouter,Deploy(,Config(SimpleConfigObject({})),NoRouter,RemoteScope(akka://[email protected]:63920))),Deploy(,Config(SimpleConfigObject({})),NoRouter,RemoteScope(akka://[email protected]:63920)),akka://[email protected]:63920/remote/[email protected]:63877/user/$d,Actor[akka://[email protected]:63877/user])] to RemoteSystemDaemon on [akka://Remote]
2014-05-03 20:20:15,576 DEBUG [Remote-akka.actor.default-dispatcher-4] (akka.serialization.Serialization(akka://Remote)) - Using serializer[akka.serialization.JavaSerializer] for message [akka.dispatch.Supervise]
2014-05-03 20:20:15,585 DEBUG [Remote-akka.actor.default-dispatcher-4] (akka.serialization.Serialization(akka://Remote)) - Using serializer[akka.serialization.JavaSerializer] for message [akka.dispatch.NullMessage$]
2014-05-03 20:20:15,658  INFO [Remote-akka.actor.default-dispatcher-2] (NettyRemoteTransport(akka://[email protected]:63922)) - RemoteServerStarted@akka://[email protected]:63922
[INFO] [05/03/2014 20:20:15.672] [MySpec-akka.actor.default-dispatcher-3] [akka://MySpec/user/$b/$a] ReplCalculator preStart
Exception in thread "Thread-33" Exception in thread "Thread-37" java.io.EOFException
    at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2598)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1318)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
    at sbt.React.react(ForkTests.scala:116)
    at sbt.ForkTests$$anonfun$mainTestTask$1$Acceptor$2$.run(ForkTests.scala:75)
    at java.lang.Thread.run(Thread.java:745)
java.io.EOFException
    at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2598)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1318)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
    at org.scalatest.tools.Framework$ScalaTestRunner$Skeleton$1$React.react(Framework.scala:906)
    at org.scalatest.tools.Framework$ScalaTestRunner$Skeleton$1.run(Framework.scala:895)
    at java.lang.Thread.run(Thread.java:745)

Scala 2.9.3

When I try to run this with Scala 2.9.3, I'm getting a lot of sbt.ResolveExceptions. Is that to be expected since the recent move to Scala 2.10?

ctrl-m causes newline

OS: Mac OS X 10.9 (Mavericks)
Browser: Google Chrome 33.0.1707.0

The ctrl-m shortcuts work in chrome, but with the side effect of adding a new line.

image

update to scala 2.10

I'm in a quest to update to scala 2.10

paulp did a huge refactor on the repl ( scala/scala@48cc8b4#src/compiler/scala/tools/nsc )

this is the dependency graph I got from https://github.com/jrudolph/sbt-dependency-graph + dot and the updates I have to make on dependencies. Also I found some bugs on the dependencies like

  • ReactiveX/RxJava#192
  • observable depends on rxjava-core 0.5.0 ( should be 0.5.3 )
  • server depends on unfiltered-json that depends on lift-json but common depends directly on lift-json. If you put unfiltered and lift json versions out of synch you will have some transitive dependencies. ( so common should depends on unfiltered-json )

dependencies-compile dot

PermGen OutOfMemory on clean build

From a clean checkout and build, my sbt (with stock configuration) OOM's on PermGen. Not really an SN problem, but logging so that this is a known issue.

Here is a good tutorial on how to increase your perm gen for SBT: http://suhinini.me/2012/07/16/error-during-sbt-execution-java-lang-outofmemoryerror-permgen-space/

And, for completeness, here is the stack trace:

java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: PermGen space
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
at java.util.concurrent.FutureTask.get(FutureTask.java:83)
at sbt.ConcurrentRestrictions$$anon$4.take(ConcurrentRestrictions.scala:195)
at sbt.Execute.next$1(Execute.scala:85)
at sbt.Execute.processAll(Execute.scala:88)
at sbt.Execute.runKeep(Execute.scala:68)
at sbt.EvaluateTask$.run$1(EvaluateTask.scala:155)
at sbt.EvaluateTask$.runTask(EvaluateTask.scala:170)
at sbt.Aggregation$$anonfun$4.apply(Aggregation.scala:46)
at sbt.Aggregation$$anonfun$4.apply(Aggregation.scala:44)
at sbt.EvaluateTask$.withStreams(EvaluateTask.scala:130)
at sbt.Aggregation$.runTasksWithResult(Aggregation.scala:44)
at sbt.Aggregation$.runTasks(Aggregation.scala:59)
at sbt.Aggregation$$anonfun$applyDynamicTasks$1.apply(Aggregation.scala:105)
at sbt.Aggregation$$anonfun$applyDynamicTasks$1.apply(Aggregation.scala:100)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:62)
at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:62)
at sbt.Command$.process(Command.scala:90)
at sbt.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(MainLoop.scala:71)
at sbt.MainLoop$$anonfun$next$1$$anonfun$apply$1.apply(MainLoop.scala:71)
at sbt.State$$anon$2.process(State.scala:170)
at sbt.MainLoop$$anonfun$next$1.apply(MainLoop.scala:71)
at sbt.MainLoop$$anonfun$next$1.apply(MainLoop.scala:71)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.MainLoop$.next(MainLoop.scala:71)
at sbt.MainLoop$.run(MainLoop.scala:64)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:53)
at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:50)
at sbt.Using.apply(Using.scala:25)
at sbt.MainLoop$.runWithNewLog(MainLoop.scala:50)
at sbt.MainLoop$.runAndClearLast(MainLoop.scala:33)
at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:17)
at sbt.MainLoop$.runLogged(MainLoop.scala:13)
at sbt.xMain.run(Main.scala:26)
at xsbt.boot.Launch$.run(Launch.scala:55)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:45)
at xsbt.boot.Launch$.launch(Launch.scala:69)
at xsbt.boot.Launch$.apply(Launch.scala:16)
at xsbt.boot.Boot$.runImpl(Boot.scala:31)
at xsbt.boot.Boot$.main(Boot.scala:20)
at xsbt.boot.Boot.main(Boot.scala)

Certificate required

I'm trying to run server but faced with weird issue:

``

[debug] sbt-js template properties {}
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid ce
rtification path to requested target
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)

Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to reques
ted target
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
at sun.security.validator.Validator.validate(Validator.java:260)
at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1479)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:212)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512)
at sun.net.www.protocol.http.HttpURLConnection.access$200(HttpURLConnection.java:90)
at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1432)
at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1430)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java:713)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1429)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at java.net.URL.openStream(URL.java:1038)
at com.untyped.sbtgraph.Graph$class.downloadAndCache(Graph.scala:155)
at com.untyped.sbtjs.Graph.downloadAndCache(Graph.scala:11)
at com.untyped.sbtgraph.Graph$class.getSource(Graph.scala:41)
at com.untyped.sbtjs.Graph.getSource(Graph.scala:11)
at com.untyped.sbtgraph.Graph$class.getSource(Graph.scala:35)
at com.untyped.sbtjs.Graph.getSource(Graph.scala:11)
at com.untyped.sbtjs.JsmSource$$anonfun$parents$3.apply(JsmSource.scala:11)
at com.untyped.sbtjs.JsmSource$$anonfun$parents$3.apply(JsmSource.scala:10)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.immutable.List.foreach(List.scala:318)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
at scala.collection.AbstractTraversable.map(Traversable.scala:105)
at com.untyped.sbtjs.JsmSource.parents$lzycompute(JsmSource.scala:10)
at com.untyped.sbtjs.JsmSource.parents(JsmSource.scala:8)
at com.untyped.sbtgraph.Graph$class.parents(Graph.scala:172)

Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:145)
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131)
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
at sun.security.validator.Validator.validate(Validator.java:260)
at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)

Ok.. I'm trying to run it on java 8.

update to 2.11.1 / akka 2.3.3

Are you guys working on a transition to the new akka/scala versions? If not, are there any showstoppers that you know of?

thanks!

Insert Above / Insert Below interferes with Mac OS X

In Mac OS X, the Ctrl + ↑ and Ctrl + ↓ keys are used for Mission Control by default.

image

Using Ctrl + Shift + ↑ and Ctrl + Shift + ↓ will also active the OS shortcuts; with the effect taking place slowly.

Is it possible to change the keyboard binding to something else, or add an option to rebind keyboard shortcuts?

P/S: the default keyboard shortcuts in Scala Notebook is great, and makes more sense than iPython Notebook's Ctrl + m modifier.

Cannot build with sbt

When I try to build with sbt I get:

Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? r
error: error while loading CharSequence, class file '/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar(java/lang/CharSequence.class)' is broken
(bad constant pool tag 15 at byte 1484)
[error] Type error in expression

I couldn't access WebPage

Hello,

I cloned by git and run sbt command project server, run.

So server was successfully started, i tried to open page localhost:8899 but Unauthorized returned

How could solve it?

Question about IPython notebook.

Hi !

Really impressive, And I like how the interface look like !
May I ask how long it took you to do it ?

On IPython side we are moving toward allowing multiple type of kernel for the notebooks and other frontend, to avoid other languages to have to reinvent the weel and keep the pain of synchronizing the javascript and duplicating code.

Do you think it would be feasible / would you be interesting in merging this/and or making this compatible with the IPython notebook ?

Thanks !

Unable to read initscript from ./init.scala

When I run scala-notebook and try to write some code like print("hello world")
I get following error:

2013-11-06 00:55:19,247 WARN pool-7-thread-1 - Unable to read initscript from ./init.scala
java.io.FileNotFoundException: File './init.scala' does not exist
at org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:137)
at org.apache.commons.io.FileUtils.readFileToString(FileUtils.java:1102)
at org.apache.commons.io.FileUtils.readFileToString(FileUtils.java:1120)
at com.bwater.notebook.server.ScriptFromFile$$anonfun$script$4.apply(ScalaNotebookConfig.scala:114)
at com.bwater.notebook.server.ScriptFromFile$$anonfun$script$4.apply(ScalaNotebookConfig.scala:114)
at scala.util.control.Exception$Catch$$anonfun$either$1.apply(Exception.scala:110)
at scala.util.control.Exception$Catch$$anonfun$either$1.apply(Exception.scala:110)
at scala.util.control.Exception$Catch.apply(Exception.scala:88)
at scala.util.control.Exception$Catch.either(Exception.scala:110)
at com.bwater.notebook.server.ScriptFromFile.script(ScalaNotebookConfig.scala:114)
at com.bwater.notebook.server.ScalaNotebookConfig$$anonfun$kernelInitScripts$1.apply(ScalaNotebookConfig.scala:26)
at com.bwater.notebook.server.ScalaNotebookConfig$$anonfun$kernelInitScripts$1.apply(ScalaNotebookConfig.scala:26)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
at scala.collection.immutable.List.foreach(List.scala:76)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:233)
at scala.collection.immutable.List.map(List.scala:76)
at com.bwater.notebook.server.ScalaNotebookConfig.kernelInitScripts(ScalaNotebookConfig.scala:26)
at com.bwater.notebook.server.Dispatcher$WebServer$.startKernel(Dispatcher.scala:206)
at com.bwater.notebook.server.Dispatcher$WebServer$$anonfun$12.apply(Dispatcher.scala:218)
at com.bwater.notebook.server.Dispatcher$WebServer$$anonfun$12.apply(Dispatcher.scala:215)
at com.bwater.notebook.server.ClientAuth$$anonfun$withCSRFKeyAsync$1.apply(Dispatcher.scala:310)
at com.bwater.notebook.server.ClientAuth$$anonfun$withCSRFKeyAsync$1.apply(Dispatcher.scala:307)
at scala.PartialFunction$$anon$3.apply(PartialFunction.scala:97)
at scala.PartialFunction$$anon$3.apply(PartialFunction.scala:96)
at unfiltered.response.Pass$PartialAttempt.attemptWithPass(pass.scala:67)
at unfiltered.response.Pass$PassingAttempt$class.attempt(pass.scala:60)
at unfiltered.response.Pass$PartialAttempt.attempt(pass.scala:62)
at unfiltered.response.Pass$OnPassAttempt.apply(pass.scala:83)
at unfiltered.netty.async.Plan$class.messageReceived(plans.scala:33)
at unfiltered.netty.async.Planify.messageReceived(plans.scala:43)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:75)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:563)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
at unfiltered.netty.cycle.Plan$$anonfun$unfiltered$netty$cycle$Plan$$guardedIntent$1.apply(plans.scala:31)
at unfiltered.netty.cycle.Plan$$anonfun$unfiltered$netty$cycle$Plan$$guardedIntent$1.apply(plans.scala:30)
at unfiltered.response.Pass$$anonfun$fold$1$$anonfun$apply$2.apply(pass.scala:46)
at scala.Option.getOrElse(Option.scala:108)
at unfiltered.response.Pass$$anonfun$fold$1.apply(pass.scala:45)
at unfiltered.response.Pass$FunctionAttempt.apply(pass.scala:72)
at unfiltered.netty.cycle.Plan$$anonfun$messageReceived$1$$anonfun$apply$mcV$sp$2$$anonfun$apply$mcV$sp$3.apply$mcV$sp(plans.scala:47)
at unfiltered.netty.cycle.Plan$class.catching(plans.scala:24)
at unfiltered.netty.cycle.Planify.catching(plans.scala:63)
at unfiltered.netty.cycle.Plan$$anonfun$messageReceived$1$$anonfun$apply$mcV$sp$2.apply$mcV$sp(plans.scala:46)
at unfiltered.netty.cycle.DeferralExecutor$$anon$1.run(deferrals.scala:55)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Uncaught error from thread [NotebookServer-akka.actor.default-dispatcher-4] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[NotebookServer]
java.lang.UnsupportedClassVersionError: com/bwater/notebook/kernel/pfork/ChildProcessMain : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at com.bwater.notebook.kernel.pfork.BetterFork.execute(BetterFork.scala:88)
at com.bwater.notebook.kernel.remote.RemoteActorSystem$.spawn(RemoteActorSystem.scala:103)
at com.bwater.notebook.Kernel$ExecutionManager.preStart(Kernel.scala:36)
at akka.actor.ActorCell.create$1(ActorCell.scala:508)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:600)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:209)
at akka.dispatch.Mailbox.run(Mailbox.scala:178)
at akka.dispatch.ForkJoinExecutorConfigurator$MailboxExecutionTask.exec(AbstractDispatcher.scala:516)
at akka.jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:259)
at akka.jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:975)
at akka.jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1479)
at akka.jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)
2013-11-06 00:55:19,296 ERROR NotebookServer-akka.actor.default-dispatcher-6 - Uncaught error from thread [NotebookServer-akka.actor.default-dispatcher-4] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled
java.lang.UnsupportedClassVersionError: com/bwater/notebook/kernel/pfork/ChildProcessMain : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at com.bwater.notebook.kernel.pfork.BetterFork.execute(BetterFork.scala:88)
at com.bwater.notebook.kernel.remote.RemoteActorSystem$.spawn(RemoteActorSystem.scala:103)
at com.bwater.notebook.Kernel$ExecutionManager.preStart(Kernel.scala:36)
at akka.actor.ActorCell.create$1(ActorCell.scala:508)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:600)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:209)
at akka.dispatch.Mailbox.run(Mailbox.scala:178)
at akka.dispatch.ForkJoinExecutorConfigurator$MailboxExecutionTask.exec(AbstractDispatcher.scala:516)
at akka.jsr166y.ForkJoinTask.doExec(ForkJoinTask.java:259)
at akka.jsr166y.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:975)
at akka.jsr166y.ForkJoinPool.runWorker(ForkJoinPool.java:1479)
at akka.jsr166y.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)
2013-11-06 00:55:19,345 INFO New I/O worker #24 - Opening Socket iopub for 175c9dfa-50a8-4b74-938a-9410c52f7ef2 to WebSocket([id: 0x1c18af96, /127.0.0.1:58602 => /127.0.0.1:8899])
2013-11-06 00:55:19,345 INFO New I/O worker #23 - Opening Socket shell for 175c9dfa-50a8-4b74-938a-9410c52f7ef2 to WebSocket([id: 0x56357775, /127.0.0.1:58601 => /127.0.0.1:8899])

Specifying custom kernel.classpath causes kernels to fail to start, due to classpath error

If you specify a kernel.classpath as a configuration, it ends up setting the entire kernel classpath to exactly what you set kernel.classpath to, instead of kernel.classpath + default.

The culprit appears to be this line, which looks quite reasonable but actually does not do what you want.

As a simple test case, try these two snippets in your REPL of choice (perhaps Scala Notebook itself, perhaps?):

Some(List("foo")) getOrElse(Nil) :+ "bar"
=> List(foo)

while

Some(List("foo")).getOrElse(Nil) :+ "bar"
=> List(foo, bar)

Someone smarter and Scala-ier than me can probably explain to me why the extra dot causes the parser to do something different, but I am struck, once again, by the danger of using operator-style (i.e., dot-less) invocation of methods.

TODO list (should probably move to wiki or something)

(These are mostly by @krisher from a while back)

UI

  • Horizontal code / output layout (side by side instead of current top/bottom)
  • Config and init scripts editable (at least viewable) in web UI
  • Notebook grouping in dashboard
  • Shared / Collaborative editing
  • Notebook overview (e.g. list of variables/values, functions)

IDE features (integrate with Ensime?)

  • Compile error underlines
  • Hyperlink to source (also in external editor/IDE?)
  • Expression type info (e.g. ctrl-q in IntelliJ)
  • Better auto-complete
  • Scaladoc hovers

Multi-user / distributed kernels

  • Per-kernel configuration
  • Multi-user auth / security
  • Distributed Akka (spawn VM's over a cluster?)
  • Better separation between SN server and kernel management system
  • Restore IPython-like cluster interface?

Build / Deployment

  • Propagate RequireJS (curl.js) through non-3rd party javascript (the IPython sourced stuff), or make sure this is minified into a single file.
  • Compile & Lint javascript
  • Javascript testing framework (qunit + test driver?)
  • Improve development workflow (more play-like?)

Library updates

  • Unfiltered -- update or switch?
  • Akka to 2.1
  • Scala 2.10

Other

  • Replace REPL with something else...
    • The way REPL holds state is simultaneously useful and not exactly what we want... In an ideal world we could compile at the cell level, and track dependencies across cells.
  • Pure scala representation of notebooks (round trip editing)
  • Proper use of typesafe config (reference config + namespaces)
  • Multiple notebook directories
  • Etag / improved cache control for static resources

MalformedInputException

Hi,

It runs 100% fine in my local machine. But when I try to run scala-notebook in unix server,
it returns below error message.

project server
..
run
[info] No sbt-js sources requiring compilation
[trace] Stack trace suppressed: run last server/compile:js-source-graph for the full output.
error java.nio.charset.MalformedInputException: Input length = 1

Are anyone familiar with this message?

Thanks!
Randy

Default to Input/Output display rather than overwriting Input

For consistency with notebook models like iPython and Mathematica when a cell is evaluated the output should probably not "overwrite" the code by default but instead be displayed below it. This can be toggled after each evaluation using the view interface but the default behavior should be "input/output".

Is there a way to specify this by default as a command line argument?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.