by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 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

    (compare)

  • 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
Ghost
@ghost~5b100290d73408ce4f9b6711
for comparison: This loop takes less than 0.5 seconds on scala REPL (like ammonite REPL), compiled code, or when run as a scala shell script. Outlier is amm script runner.
acse-fk4517
@acse-fk4517
@srnb_gitlab thanks, that did the trick!!
oybek
@oybek
Hello guys!
I'm searching how to send string to ammonite (so it compiles and saves result)
repl is embedded to my program, but sometimes I want to derive implicitly some
classes and automatically add them to repl
3 replies
how can I do this?
Yilin Wei
@yilinwei
@oybek Can't you just send the derivation to the repl?
James Riordan
@jamesosaurus_gitlab
Is it possible to import a .class file from a directory (e.g. it has not been packaged into a jar)?
David Hoyt
@davidhoyt

Is it possible to alter the coursier version conflict management? have a conflict like:

Conflicting dependencies:
io.netty:netty-codec-http2:4.1.43.Final or [4.1.38.Final]

I'd like it to choose 4.1.38.Final but ammonite (or coursier) exits.

sbt v1.3.12 doesn't seem to have the same problem
Simão Martins
@Lasering
Hi!
is there anyway to turn off showing the unicode code point instead of the character?
Welcome to the Ammonite Repl 2.1.4 (Scala 2.13.2 Java 14.0.1)
@ "Simão" 
res0: String = "Sim\u00e3o"
Olivier Mélois
@Baccata
@lihaoyi @alexarchambault : hey guys :wave: , the publishing of artifacts failed on the latest master : https://travis-ci.org/github/lihaoyi/Ammonite/builds/696389945. Any chance these could be retriggered ?
Li Haoyi
@lihaoyi
i clicked the retry button
Olivier Mélois
@Baccata
many thanks :)
Krister Svanlund
@kofish-sl
Hey, is it possible to have an ammonite script terminate with a non-zero exit code?
Krister Svanlund
@kofish-sl
Without having it print a massive spam-stacktrace that is
Damian Reeves
@DamianReeves
Hi, is there some sort of trick to get code-completion working on ivy dependencies either in VS Code or IntelliJ?
Wojtek Pituła
@Krever
Hey, I've hit classpath issue when using os-lib in jupyter. My guess is that is because of embedded os-lib instance. Is there a way to hide it? Or at least check what version comes as embedded?
Damian Reeves
@DamianReeves
Is there a jar that exists on maven that I can use as the startup for ammonite?
Anton Sviridov
@keynmol
@kofish-sl sys.exit(1) should still work in the script
@DamianReeves do you mean the code from dependencies themselves or autocompleting the $ivy.... blocks with actual suggestions from coursier?
Damian Reeves
@DamianReeves
Code from dependencies themselves
Anton Sviridov
@keynmol

Actually just recently ammonite script support in metals got merged and it's quite good.

The kicker is that it's not actually released yet, but you can make VS Code to use Metals' snapshot version: https://scalameta.org/metals/docs/editors/vscode.html#using-latest-metals-snapshot

I have this override in all of my of my projects and overall the support for Ammonite scripts is quite impressive. It takes a few Metals: Restart server to get it to pick up new dependencies, but the experience of editing an individual ammonite script in VS code with IDE features is quite incredible :)
Damian Reeves
@DamianReeves
thanks
Nitay Kufert
@nitayk

Hello, I need some help after I broke ammonite when trying to use https://github.com/mmolimar/kukulcan.
(I had to install java11, reinstall ammonite etc)

The current situation is when I try to launch ammonite I get:

 ~  amm
Loading...
Compiling /Users/nitaykufert/.ammonite/predef.sc
Compiling /Users/nitaykufert/.ammonite/predef.sc #2
predef.sc:11: object PathConvertible is not a member of package ammonite.ops
  import ammonite.ops.PathConvertible._
                      ^
predef.sc:12: not found: value cwd
  val p = ammoniteModules.orElse(scala.sys.env.get("AMMONITE_MODULES").map(s => Path(s))).getOrElse(cwd)
                                                                                                    ^
predef.sc:13: not found: value cwd
  val c = cwd
          ^
Compilation Failed
Olivier Mélois
@Baccata
@nitayk try to replace cwd by os.pwd
also remove the ammonite.ops import and use os.Path instead
Nitay Kufert
@nitayk
Thanks for the response.
I'll try it soon.
I got the predef file both under .ammonite & also in the ammonite-modules (with export AMMONITE_MODULES="/Users/nitaykufert/Supersonic/ammonite-modules";)
I can see the code is different - The error is thrown from .ammonite
Any idea of how I got to this situation?
Olivier Mélois
@Baccata
a quick googling led me to https://github.com/yeghishe/ammonite-modules which I assume is what you're referring to ... a wild guess would be that it ain't up to date with the latest ammonite, can't say for sure
Nitay Kufert
@nitayk
Thanks! for some reason I missed the fact that this is unrelated to the original repo :/
This fixed it for me: curl https://raw.githubusercontent.com/yeghishe/ammonite-modules/master/predef.sc > ~/.ammonite/predef.sc
(I belive your guess was right, as part of my efforts I've updated that repo but didn't override the predef file)
Thanks for the help and sorry for the google-quest, I just missed that in my searches
Oron Port
@soronpo
Hi all. Are you aware that Scala 3 will not support symbol literals (e.g. val target = root/'target/'file will not be possible). Do you have opinion on that? I did not see any discussion on this.
Li Haoyi
@lihaoyi
you can use strings in your path segments
it’s one more character but nbd
Oron Port
@soronpo
I am aware. Just so much user-code is out there with this syntax...
Li Haoyi
@lihaoyi
yeah, that’ll just have to change
Yann Moisan
@YannMoisan
hello. I'm trying to use a private maven repositories and I run into the following error :
@ import $repo.`https://xxx/content/repositories/releases`
Import Hook List($repo, https://xxx/content/repositories/releases) could not be resolved
Anton Sviridov
@keynmol
@YannMoisan which version are you using?
the "$repo" import hook is in 2.13-2.1.4-7-d1e71b9 version, which is not part of a release yet (you can still use it tho)
Yann Moisan
@YannMoisan
Welcome to the Ammonite Repl 2.1.4 (Scala 2.13.2 Java 13.0.2)
I've found a workaround. As it's cousier behind the hood, I've used :
export COURSIER_REPOSITORIES="ivy2Local|central|https://xxx/content/repositories/releases"
Anton Sviridov
@keynmol

$repo is equivalent to

interp.repositories() ++= Seq(coursierapi.MavenRepository.of("https://blabla"))

@

// your script

which should work out of the box in 2.1.4 and earlier versions

Soren
@srnb_gitlab
Is there an example out there of wrappers for commands? Typing %yay("-Syu", "--devel") all the time is kind of a bother.
deeex
@OverTheHeap_twitter
image.png
hi all, got an error like this, any ideas?
deeex
@OverTheHeap_twitter
ok, the version I'm having problem with is 0.9.1, but it works when switch to 0.8.2