Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Jan 30 2019 14:37
    bhaskarmelkani starred lihaoyi/Ammonite
  • Jan 29 2019 04:27
    JYInMyHeart starred lihaoyi/Ammonite
  • Jan 29 2019 04:27
    JYInMyHeart starred lihaoyi/Ammonite
  • Jan 28 2019 15:07
    ishubelko starred lihaoyi/Ammonite
  • Jan 25 2019 22:38
    borissmidt starred lihaoyi/Ammonite
  • Jan 25 2019 17:12

    alexarchambault on 1.6.3


  • Jan 25 2019 17:11

    alexarchambault on master

    1.6.3 (compare)

  • Jan 25 2019 15:48
    alexarchambault commented #923
  • Jan 25 2019 01:15

    lihaoyi on gh-pages

    5ad9ae5538f23cab92ccd8c6b1617d8… (compare)

  • Jan 25 2019 00:50

    alexarchambault on master

    Partly revert 84d48542 (#923) … (compare)

  • Jan 25 2019 00:50
    alexarchambault closed #923
  • Jan 25 2019 00:50
    alexarchambault closed #920
  • Jan 25 2019 00:50
    alexarchambault closed #922
  • Jan 24 2019 23:13
    lihaoyi commented #923
  • Jan 24 2019 22:39
    alexarchambault closed #921
  • Jan 24 2019 22:39
    alexarchambault commented #921
  • Jan 24 2019 22:39
    alexarchambault edited #923
  • Jan 24 2019 22:38
    alexarchambault opened #923
  • Jan 24 2019 22:37
    david-bouyssie commented #919
  • Jan 24 2019 21:33
    nksureshkumar commented #922
Leon Burdinov
@Baccata I use amm -p ~/.ammonite/predefScript.sc to make sure they load same predef file.
Li Haoyi
there is no tepl object in scripts
repl is only in the repl
Leon Burdinov
makes sense :-)
the error message is misleading then. it says that load isn't a member of repl
of package ammonite.repl
I believe it's a scalac error
The point is that it finds something named repl, the package
but there is no load in it
hey ho ive just upgraded to 0.9.0 and require the corresponding ammonite_shell version - still using 0.8.2, sbt run actually works, but sbt assembly crashes pretty hard
can i move my predef tweaks into the main ?
i was wondering if could remove my dependency on the predef to the main
Olivier Mélois
@Shokodemon can you elaborate, both on your setup and what you're trying to achieve there ?
in particular, how are you depending on ammonite ?
@Baccata i found a part of the application im working on had differing ammonite shell versions in different buildfiles

@Baccata i finally managed to solve this by moving ammonite versions to a v/project/vars file and tracking it that way.

we load ammonite as a library and use it to query our database + infrastructure + dev scala on the fly

our main triggers an ammonite main and loads our classes into it
so our dependency tree is rather large, but i finally managed to upgrade to 0.9.9
without major pains
Olivier Mélois
coolsies :D
trying to push it and go 1.0.0
Olivier Mélois
If you're using sbt, the following plugin is really helpful to figure out incompatibilities : https://github.com/jrudolph/sbt-dependency-graph
(in particular, the whatDependsOn command)
i use tried to use that once
i'm a "junior devops"

and i inherited this, so the output is so large that it renders it a bit ... mhmm.

what it did help me with is realizing that there were different ammonite imports in different files, sadly thi it doesnt say which build files are to blame

wish it did that. i understand why lihao moved away from sbt
i managed 1.0.0, unified global version file ftw
pushing 1.6.6
and that broke akka. :D
Will Toher

I'm translating a bash script to ammonite, so I'd like to be able to run a lot of commands while suppressing their output. I thought I would use a construction like this:

import sys.process._
val devNull = ProcessLogger( _ => (), _ => ())
"ls" ! devNull

But when I try to run a script with just those lines, it hangs during compilation. The same lines run just fine in the REPL

Is there a reason this doesn't work? Am I doing something dumb?
Olivier Mélois

@wilt-rally not too sure what you're doing wrong there, but I highly recommend using the following library (developed by the maintainer of ammonite) to deal with files / subprocesses :


Will Toher
@Baccata thanks!
Jakub Kozłowski
Hi, is it possible to choose the Scala version used for running a standalone ammonite-repl?
or is it just the standard scala binary from $PATH?
 kubukoz@kubukoz-pro  ~/IdeaProjects  amm
Welcome to the Ammonite Repl 1.6.8
(Scala 2.12.8 Java 1.8.0_202)
If you like Ammonite, please support our development at www.patreon.com/lihaoyi
@ Bye!
 kubukoz@kubukoz-pro  ~/IdeaProjects  scala
Welcome to Scala 2.13.0 (OpenJDK GraalVM CE 1.0.0-rc15, Java 1.8.0_202).
Type in expressions for evaluation. Or try :help.

doesn't even look like it...
Brandon Elam Barker
Recently, i really wish it were possible to do something like sudo myFun where myFun is an arbitrary JVM function from within my Scala code. But I suppose that would be impossible under the linux security model as it currently stands.
Olivier Mélois
@kubukoz ammonite launchers are released for both 2.12 and 2.13. If you look closely at the one-liner install script, you can see the version appearing in the github URL : http://ammonite.io/#Ammonite-REPL.
https://github.com/lihaoyi/Ammonite/releases <--- here's the artifacts you can pick from
Anton Kulaga
I see that GraalVM allows building native images. Has anybody tried to build native immage of ammonite?
Jakub Kozłowski
nice @baccata, thanks
although the homebrew version installs 2.12
Olivier Mélois
@antonkulaga I don't think that'd be possible, on the account on ammonite relying on some JVM reflection features, which Graal can't translate to native
@kubukoz uninstall ammonite from brew, install it via the one-liner, problem solved :D
Jakub Kozłowski
yeah, thanks
does ammonite still phone home ?
Alexandre Archambault
@lihaoyi Just saw lihaoyi/Ammonite#984 (which I guess ought not to slow down things compared to before the addition of --thin)