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
Yash Datta
@saucam
@alexarchambault thanks but I need to use scala 2.11 and hence I am stuck with older version , but is there no way to override this ?
nafg
@nafg
This message was deleted
Matthew de Detrich
@mdedetrich
So I am trying to run ammonite and I get the following
java.lang.UnsupportedClassVersionError: io/github/retronym/java9rtexport/Export has been compiled by a more recent version of the Java Runtime (class file version 57.0), this version of the Java Runtime only recognizes class file versions up to 55.0
I am using Ammonite repl 2.1.4 on JDK
openjdk 11.0.7 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10)
OpenJDK 64-Bit Server VM (build 11.0.7+10, mixed mode)
I will make an issue on this
Matthew de Detrich
@mdedetrich
Made issue here lihaoyi/Ammonite#1107
Yilin Wei
@yilinwei
@mdedetrich I've had that happen when I've been switching JDK's in my shell.
sken
@sken77
is there a way to choose Scala version in ammonite 2.2?
I just updated it. but its pointing to Scala 2.13.3, and I want it to point to a 2.11
or some specifically what ammonite version supports 2.11
Anton Sviridov
@keynmol

@sken77 I do some Scala teaching and often need to run examples against 2.12 and 2.13 in Ammonite, so I just pull amm-12 and am-13 releases directly from github and use them individually:

sh -c '(echo "#!/usr/bin/env sh" && curl -L https://github.com/lihaoyi/Ammonite/releases/download/2.1.4/2.12-2.1.4-7-d1e71b9) > /usr/local/bin/amm-12 && chmod +x /usr/local/bin/amm-12'

This doesn't help you directly, but I'm also not sure whether Ammonite is published for 2.11 anymore

^ this is based on looking at the releases page: https://github.com/lihaoyi/Ammonite/releases/
Anton Sviridov
@keynmol
1.6.7 seems to be the last one supporting 2.11: https://github.com/lihaoyi/Ammonite/releases/tag/1.6.7
Matthew de Detrich
@mdedetrich
@yilinwei I am not switching SDK's though? Can you be more specific?
Abhishek Srivastava
@abhishes_twitter
In Ammonite shell and MacOS, is there a way to make the URL clickable?
I am doing the Scala println on a bunch of URLs, which I then copy paste into a browser. I wonder if I can make my printed URLs clickable
Oron Port
@soronpo
@abhishes_twitter I think this is a terminal issue and not an ammonite issue. The right terminal should give you clickable links no matter what the underlying printing program is.
For example, Intellij has a plugin that makes even file paths clickable, so that if you print a filepath, you click it and it opens it in IJ
Abhishek Srivastava
@abhishes_twitter
@soronpo makes sense. thanks for clarification.
yes I am using iterm and command + click makes it clickable thanks!
Yilin Wei
@yilinwei
@mdedetrich I just meant that when I had that problem it was because I had switched JDK's in the middle of my shell session and there were something cached which caused issues - I ended up nuking all the class files I could find and restarting everything.
I'm not sure that's your problem, just that I've seen the error message before.
Matthew de Detrich
@mdedetrich
Right, I didn't do any kind of switching though. What do you mean by nuking class files, i.e. did you delete ~/.ammonite?
Yilin Wei
@yilinwei
Yes
But I was frustrated at the time; there's probably a better way.
Matthew de Detrich
@mdedetrich
Hmm I already deleted ~/.ammonite
Matthew de Detrich
@mdedetrich
@yilinwei Anything else comes to mind? Ammonite is completely unusable in its current state
Let me reinstall jdk, although I don't see how this would do anything
Matthew de Detrich
@mdedetrich
Yup nothing
Yilin Wei
@yilinwei
@mdedetrich nope, how did you install ammonite?
Yilin Wei
@yilinwei
(you could upgrade your jdk I guess, bit that's obviously undesirable)
Matthew de Detrich
@mdedetrich
I am running JDK 11, thats like the latest stable?
@yilinwei I installed via ArchLinux's official package, i.e. https://www.archlinux.org/packages/community/any/ammonite/
I also made a bug on ArchLinux for the package, https://bugs.archlinux.org/task/67353
Yilin Wei
@yilinwei
Hmm, we have exactly the same setup (also on Java 11, and installed from the aur).
I'm on commit 223e5635fe7ce47a21b2f90835934b6e875ecdb9. Do you want to try that one?
@mdedetrich
implisci
@implisci
The download URLs at ammonite.io using curl have an extra download in the path. https://github.com/lihaoyi/ammonite/releases/download/2.2.0/ @lihaoyi
Vincent Marquez
@vmarquez
Does anyone know if there's a super easy way to save an ammonite history to a file and load later on? did I miss this in the docs somewhere? (RTFM is an acceptable answer to this question...) :)
implisci
@implisci

@vmarquez

def writeH(h:String) = os.write.over(os.pwd / h, repl.history.filter(!_.contains("write")). mkString("\n")) 
// removes lines with "write" as we don't want them to execute on reload 
val x = 1
val z = 3
writeH("foo")
exit
// Now load history back right into REPL
def loadH(h:String) = interp.load.module(os.Path(os.pwd + "/" + h)) 
loadH("foo")
x  + z == 4 // true

You can place writeH and loadH functions in ./ammonite/predef.sc at the bottom so they are always available

3 replies
implisci
@implisci
Opened an Infinite Loop with Ammonite Script Runner Issue with Futures. lihaoyi/Ammonite#1109
Matthew de Detrich
@mdedetrich
@yilinwei I just installed ammonite-git (r2382.56b4d41e-1) from AUR and I am getting
The file '/usr/bin/amm' is marked as an executable but could not be run by the operating system.
If you run from fish shell. Interestingly it works from a normal shell fine
But yes the latest ammonite from git appears to work, but it doesn't run in non bourne shells such as fish (which I think is a historic problem with ammonite)
Matthew de Detrich
@mdedetrich
However thats probably because the AUR package doesn't wrap the amm executable manually in a shebang (see https://aur.archlinux.org/packages/ammonite-git/#comment-757431)
1 reply
Matthew de Detrich
@mdedetrich
@yilinwei So it seems to be fixed in the latest master however not sure if its fixed in the latest stable
Paul Snively
@paul-snively
Hi folks! What's the current blessed way to define initial predef-like code to execute when running Ammonite in sbt with test:run?
1 reply
colin-williams
@colin-williams
Trying to start Ammonite: java.lang.Exception: Failed to resolve ivy dependencies:Error downloading com.lihaoyi:ammonite-shell_2.13.1:2.0.4-6-ef64cbe
2 replies
Looks like I need to reinstall. Was this caused by the removal of a dependent jar?
sken
@sken77
is there a way to get commands like pwd or ls to work on intellij