Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 28 17:54

    alexarchambault on v0.9.1

    (compare)

  • Nov 28 17:52

    alexarchambault on master

    Switch to metabrowse 0.2.3 Enable metabrowse by default Merge pull request #468 from al… (compare)

  • Nov 28 17:52
    alexarchambault closed #468
  • Nov 28 16:21
    alexarchambault commented #468
  • Nov 28 16:20
    alexarchambault synchronize #468
  • Nov 28 16:19
    alexarchambault commented #468
  • Nov 28 16:12
    alexarchambault opened #468
  • Nov 27 14:43

    alexarchambault on gh-pages

    Update website (compare)

  • Nov 27 12:27

    alexarchambault on v0.9.0

    (compare)

  • Nov 27 12:26

    alexarchambault on master

    Publish dummy javadoc for modul… (compare)

  • Nov 27 12:26
    alexarchambault closed #467
  • Nov 27 12:17

    alexarchambault on v0.9.0

    (compare)

  • Nov 27 12:12
    alexarchambault opened #467
  • Nov 27 02:26

    alexarchambault on v0.9.0

    (compare)

  • Nov 27 02:11

    alexarchambault on master

    Disable scaladoc for modules us… (compare)

  • Nov 27 02:11
    alexarchambault closed #466
  • Nov 27 02:02
    alexarchambault opened #466
  • Nov 27 01:45

    alexarchambault on master

    Other attempt at circumventing … (compare)

  • Nov 27 01:45
    alexarchambault closed #465
  • Nov 27 01:36
    alexarchambault opened #465
yang
@ererermao
import ammonite._, ammonite.ops._
import ammonite._

val path = java.nio.file.FileSystems.getDefault().getPath("/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/a.jar")
val x = ammonite.ops.Path(path)
interp.load.cp(x)
error logs:
cmd3.sc:6: object loadjar is not a member of package ammonite.interp
val res3_4 = interp.loadjar.cp(x)
                    ^Compilation Failed
Alexandre Archambault
@alexarchambault
@ererermao Remove the import ammonite._, like
import ammonite.ops._

val path = java.nio.file.FileSystems.getDefault().getPath("/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/a.jar")
val x = ammonite.ops.Path(path)
interp.load.cp(x)
yang
@ererermao
@alexarchambault Thank you very much for your reply, let me try
yang
@ererermao
It's work. Thank you very much. I like almond very much
Hubert Plociniczak
@hubertp

Hi All,
I'm having some issue when creating a custom kernel with Almond, it could very much be a coursier thing but maybe someone encountered it.
The custom kernel has dependencies from a private repo with basic auth. I placed credentials in ~/.config/coursier/credentials.properties, as that seems to be the default (and preferred?) way to pass credentials with the current coursier.
Unfortunately

coursier bootstrap -r jitpack -r "https://xyz.jfrog.io/xyz/libs-release-local" --embed-files=false io.xyz:foobar:0.0.1 -o kernel -f
...
unauthorized: https://xyz.jfrog.io/xyz/libs-release-local/io/xyz/somedep/0.5.222/some-dep-0.5.222.pom (Artifactory Realm)

but

coursier bootstrap -r jitpack -r "https://hubert:secret@xyz.jfrog.io/xyz/libs-release-local" --embed-files=false io.xyz:foobar:0.0.1 -o kernel -f

works fine. I would be fine with inlining my credentials to the repo but the problem comes back when trying to install that kernel:

> kernel --install
Error while downloading https://xyz.jfrog.io/xyz/libs-release-local/io/xyz/somedep/1.0.417-b6cb80a/somedep-1.0.417-b6cb80a.jar: Server returned HTTP response code: 401 for URL: https://xyz.jfrog.io/xyz/libs-release-local/io/xyz/somedep/1.0.417-b6cb80a/somedep-1.0.417-b6cb80a.jar, ignoring it

Looking at coursier code that seems to be expected because the created launcher doesn't keep the authentication data but maybe I'm missing something.

Gerard Maas
@maasg
Hi! I'm new to the channel and to Jupyter+Almond. I wanted to try the example on myBinder using the link in the home page of the Almond project.
When I try the Spark notebook, it fails with this error:
// almond master fails on binder with---
cmd2.sc:112: Symbol 'term ammonite.interp.api' is missing from the classpath.
This symbol is required by 'value org.apache.spark.sql.NotebookSparkSession.interpApi'.
Make sure that term api is in your classpath and check for conflicting dependencies with `-Ylog-classpath`.
A full rebuild may help if 'NotebookSparkSession.class' was compiled against an incompatible version of ammonite.interp.
import _root_.org.apache.spark.sql.{
       ^Compilation Failed
Compilation Failed
looks like a version mismatch somewhere. Is there a way to query the version of the Almond kernel in myBinder?
Alexandre Archambault
@alexarchambault
@maasg Help > "About the scala kernel" should give the version
Just tried the spark example on mybinder, it seems there's a mismatch between the version used in the notebook (0.6.0) and the almond version there (0.5.0). Possibly because of some issues building docker images on the CI currently.
New versions (> 0.8.0) accept _ as a version of almond-spark, so that mismatch problem should go away ultimately
Sören Brunk
@sbrunk
Yeah the example repo is a bit outdated. I'm planning to update it this week.
Gerard Maas
@maasg
@alexarchambault @sbrunk Thanks a lot!
trepidacious
@trepidacious
Is there a way to refresh local snapshot libraries without restarting kernel and re-running?
ReiReiRei
@ReiReiRei
Hi all is it possible to change ammonite version for kernel, i have to use scala 2.11 with spark 2.3.1 but i need latest version of ammonite to make it possible run this workaround https://github.com/lihaoyi/Ammonite/issues/763#issuecomment-514247269 ?
Alexandre Archambault
@alexarchambault
@ReiReiRei The problem is that Ammonite dropped support for 2.11 some time ago
2.11 would still be supported by almond if that wasn't the case
@trepidacious The session load / save API of Ammonite might work in almond (I never tried to use it)
It allows to roll-back a session up to a previous checkpoint, effectively "unloading" dependencies added since
trepidacious
@trepidacious
@alexarchambault Ah that sounds handy, I'll have a look. The restart isn't too bad but that sounds quicker.
hamero
@hamero
hi, trying to install almond behind fw (with nexus proxy for central repos) and I'm getting this jvm-repr 4.0 dependency missing, any ideas why?
Sören Brunk
@sbrunk
@hamero it seems like jvm-repr is only published to jitpack https://jitpack.io/#jupyter/jvm-repr
hamero
@hamero
ok, found this jupyter/jvm-repr#15, @alexarchambault do you think it can be published to central anytime soon?
Brian Schlining
@hohonuuli
Hi @alexarchambault , I just wanted to give a heads up that the docker images on dockerhub aren't up-to-date (See https://hub.docker.com/r/almondsh/almond/tags). The last tagged release is 0.6.0. Cheers (and thanks for your work, almond looks great!)
trepidacious
@trepidacious
Is it possible to disable repl printing completely? I've set up methods to plot graphs and display tables, and I can always print("something") explicitly if I want, so the repl output of variable definitions etc. isn't needed for my worksheet, and it makes it a lot longer
trepidacious
@trepidacious
I thought maybe I could implement a replacement PPrinter and provide it to repl.pprinter.update, but it's a case class so I guess not?
trepidacious
@trepidacious
I imagine almond could have an API method to disable the repl stuff though?
Sören Brunk
@sbrunk
@trepidacious as a workaround, you could set repl.pprinter() = repl.pprinter().copy(defaultHeight = 0) to almost disable repl printing
trepidacious
@trepidacious
@sbrunk Ah yes, I tried that and it does help, but it only seems to apply to some printing, I still see imports etc.
Sören Brunk
@sbrunk
@trepidacious yeah I agree we should be able to disable it completely but I guess it needs to be done in Ammonite
Srepfler Srdan
@schrepfler
can almond work with nteract somehow?
Sören Brunk
@sbrunk
@schrepfler yes in general, nteract should just work with almond. There were some almond-sh/almond#371. Not sure if they have been resolved.
Srepfler Srdan
@schrepfler
thanks @sbrunk
Andrew Valencik
@valencik

When I try and run the following in almond 0.82 I get an error:

interp.repositories() ++= Seq(
  coursier.MavenRepository("https://dl.bintray.com/cibotech/public")
)

object MavenRepository is not a member of package coursier

This appears to be the case on 0.81 as well. Scala 2.12.8 and 2.12.10
trepidacious
@trepidacious
@sbrunk So I had a look at the source and it seems like it might be possible to disable repl output from almond (although I haven't looked through the details or tested much at all)
@sbrunk If you set silent to true on this line you get println and html but no stuff from repl about declaring variables: https://github.com/almond-sh/almond/blob/master/modules/scala/scala-interpreter/src/main/scala/almond/Execute.scala#L226
If this could be enabled/disabled from the API I think that would do the trick
trepidacious
@trepidacious
I'll see if I can work out how you would do that and submit a pull request :)
Sören Brunk
@sbrunk
@trepidacious that's great! Don't hesitate to ask if you get stuck at some point.
trepidacious
@trepidacious
@sbrunk Thanks :) Really enjoying using almond, I wish I'd found it years ago!
trepidacious
@trepidacious
@sbrunk I've tested that approach with a real notebook and it works well - repl completely suppressed, but html, plotly and println all come through fine, makes the notebook much neater.
Sören Brunk
@sbrunk
@trepidacious awesome! Would you mind opening an issue or a PR to discuss your approach? I guess we also have to look for a way to configure this.
trepidacious
@trepidacious
@sbrunk I will do, I had a look through the issues and couldn't find anything covering it so far, I guess almond-sh/almond#287 might be slightly related, in that suppressing all output would cover that issue :)
Sören Brunk
@sbrunk

@valencik the coursier API hast changed. Try

interp.repositories() ++= Seq(
  coursierapi.MavenRepository.of("https://dl.bintray.com/cibotech/public")
)

Note that I've updated the EvilPlot example accordingly.

Andrew Valencik
@valencik
woooow, thank you! I actually could not come across a fix for that. Out of curiosity, how did you figure this out?
Either way, thank you again.
Sören Brunk
@sbrunk
@valencik I think I saw someone mentioning that in the Ammonite gitter channel. Otherwise, I probably would have asked @alexarchambault, as he’s also the author of Coursier and should know. 😃
trepidacious
@trepidacious
@sbrunk I created a pull request for the "silent repl" feature - seems to work but I'm new to the code so it might not be implemented the best way :) almond-sh/almond#450
Sören Brunk
@sbrunk
@trepidacious thanks! I’m going to give it a try tomorrow