text:
The case for a mount-based router

Following up on #1404 @lhorie @barneycarroll
The gist of a mount-based router is the following (omitting attrs, path and the race condition mitigation for clarity, and assuming a RouteResolver):

When routes are defined, mount a component whose view returns [curent.render(m(current.component))].

When routes are set (explicitly or through history navigation):

define a resolve(component) function that sets current.render and current.component, then trigger a redraw.
Pass said function to payload.onmatch.

That's it.
The additional conditional logic is there to assign fallbacks for component, onmatch and render when one is missing, and to ignore the onmatch and render  fields on components.
I find this more declarative and thus easier to reason about, but it may be a matter of taste.
Pros:

Redraws are identical to what happens with mounted trees, thus:

There's no router-related conditional logic on redraw (easier to debug).
The route matching logic doesn't run on redraw as it does currently
No isAction business is needed in router/router (and by consequence in api/router). Once again, less complexity.
There's no need to return resolveRoute from router.defineRoute either.
Harnessing the public API to make such a complex component ensures it is robust (thinking about timing here mostly).

Cons:

Adds a component and a fragment to the tree for render/render to diff (probably minor when compared to the route matching logic).
File size, maybe? I'll have to test.
???

Another thing in this design is that it treats components as if they were inheriting from a default RouteResolver (whose methods can't be overridden). It means that render-time logic is identical for both components and RouteResolvers.

Ok, I finally understand where you were going w/ the mount-based strategy. I refactored api/router again to take advantage of your optimization for skipping route matching logic on non-routed redraws, except that I'm using render directly (which requires no wrapper components) instead of mount

It looks fine at a glance, I'll scrutinize it later. With the redraw service as a common ground, it looks like the best of both worlds.

authors: lhorie pygy


text:
BUG: the calenar panel showing and click action is wrong when has earlier diary notes

Before Submitting: Double-check that you are running the latest version of the plugin. The bug might have already been fixed 😄

Describe the bug
The calendar panel showing and click action is wrong when has earlier diary notes.
Steps to reproduce

My Daily notes config see the bellow:

Calenar plugin config see the bellow:

When I startup Obsidian.app in macOS 13.1, the calendar panel showing was wrong: the day without diary note, but show little points. when I click this date, and open the wrong diary note. for example: click the date is 2023/02/27, and open diary note is 2010/10/27, the year and month was wrong.

And the prev month panel was missing every diary note, even those has diary notes.

diary note files in Finder.app

Expected behavior

The calendar panel show the right points under the date by is it exists diary notes.
Click calendar date, please open the right daily note file.
Switch to other month, show and can click the right diary notes.

Screenshots
See the obove.
Environment (please specify)
OS
macOS 13.1
Obsidian Version (e.g. v0.10.6)
v1.1.9
(Settings → About → Current Version)
Theme (if applicable):
Default
If the bug is visual, please provide the name of the Community Theme you're using.

Hello, my situation is similar to yours. My structure of notes be like: 2022/02/10.md
By refering to @Mariana-Yui 's comment in https://github.com/liamcain/obsidian-calendar-plugin/issues/224#issuecomment-1210689344 . There is a function named  getDateFromFile defined in .obsidian\plugins\calendar\main.js line 125, which will handle your file and parse it into a date.
In orginal version(1.5.10), only filename is considered. Therefore, for our scene, the program cannot obtain full date as expected.
So, I modified my main.js
diff main.js.ori main.js.new

132c132
<     const noteDate = window.moment(file.basename, format, true);
---
>     const noteDate = window.moment(file.path.match(/\d{4}\/\d{2}\/\d{2}/g), 'YYYY/MM/DD', true);

This works for me now.

add function:
function parseDateFormatToRegExp(format) {
  // https://momentjs.com/docs/#/displaying/
  const source = format.replace(/\[([^\]]+)\]|(\.)|(YYYYYY|YYYY|GGGG|gggg|DDDD|DDD|MM|DD|WW|ww|M|D|W|w|Q|d|E|e)/g, function($0, plaintext, dot, token) {
    if (plaintext) return plaintext;
    if (dot) return '\\.';
    switch(token) {
      case 'YYYYYY':
        return '[+-]\\d{6}'
      case 'YYYY':
      case 'GGGG':
      case 'gggg':
        return '\\d{4}';
      case 'DDDD':
        return '\\d{3}';
      case 'DDD':
        return '\\d{1,3}';
      case 'MM':
      case 'DD':
      case 'WW':
      case 'ww':
        return '\\d{2}';
      case 'M':
      case 'D':
      case 'W':
      case 'w':
        return '\\d{1,2}';
      case 'Q':
      case 'd':
      case 'E':
      case 'e':
        return '\\d';
    }
    return $0;
  });
  return new RegExp(source, '');
}

Change:
-   const format = getSettings[granularity]().format.split("/").pop();
-   const noteDate = window.moment(file.basename, format, true);
+   const format = getSettings[granularity]().format;
+   const noteDate = window.moment(file.path.match(dateFormatToRegExp(format)), format, true);

@hotoo's code almost worked for me, I use the format YYYY/M/Do - dddd (eg 2022/11/29th - Tuesday) which uses dddd and Do format, so I added cases for those.  Since the cases now include groups to match on the text of the days, I added the g flag to the RegExp.
function parseDateFormatToRegExp(format) {
  // https://momentjs.com/docs/#/displaying/
  const source = format.replace(/\[([^\]]+)\]|(\.)|(YYYYYY|YYYY|GGGG|gggg|DDDD|dddd|DDD|MM|DD|Do|WW|ww|M|D|W|w|Q|d|E|e)/g, function($0, plaintext, dot, token) {
    if (plaintext) return plaintext;
    if (dot) return '\\.';
    switch(token) {
      case 'YYYYYY':
        return '[+-]\\d{6}'
      case 'YYYY':
      case 'GGGG':
      case 'gggg':
        return '\\d{4}';
      case 'DDDD':
        return '\\d{3}';
      case 'dddd':
        return '(Mon|Tues|Wednes|Thurs|Fri|Satur|Sun)day';
      case 'DDD':
        return '\\d{1,3}';
      case 'MM':
      case 'DD':
      case 'WW':
      case 'ww':
        return '\\d{2}';
      case 'Do':
        return '\\d{1,2}(st|nd|rd|th)';
      case 'M':
      case 'D':
      case 'W':
      case 'w':
        return '\\d{1,2}';
      case 'Q':
      case 'd':
      case 'E':
      case 'e':
        return '\\d';
    }
    return $0;
  });
  return new RegExp(source, 'g');
}

@liamcain see this pr please :)

source: gharchive/issue

authors: honor2016tw hotoo twormtwo

repo: liamcain/obsidian-calendar-plugin

license: MIT

license_type: permissive

license_source: github-api


text:
update July31,2019

What type of PR is this?

Uncomment only one  /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:
/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

update

source: gharchive/pull-request


text:
The list of eLife endorsements is always out of date

[ ] Can we determine if a a bioRxiv article has been published by eLife?
[ ] Can we add the eLife decision letters as review summaries to these articles?

Looked at Europe PMC's search as they have the data, but can't see a way to query for it.

DOI metadata doesn't contain it.
curl -v https://doi.org/10.1101/856153 -H "Accept: application/vnd.crossref.unixref+xml" -L

The bioRxiv article page calls https://connect.biorxiv.org/bx_pub_doi_get.php?doi=10.1101/856153 which contains the information.

As far as I'm aware, eLife wants to start recording articles that were preprints, but don't know if it will be back-dated.
bioRxiv seem to have the information (no idea if it's complete or not), but isn't available for querying.

curl -v https://doi.org/10.7554/eLife.53445 -H "Accept: application/vnd.crossref.unixref+xml" -L

contains a URL to eLife's JATS XML, which can be used to fetch the decision letter.

PeerJ review DOIs contain a link to the PeerJ article (not bioRxiv):
curl -v https://doi.org/10.7287/peerj.4898v0.1/reviews/1 -H "Accept: application/vnd.crossref.unixref+xml" -L

but not from the PeerJ article to the review:
curl -v https://doi.org/10.7717/peerj.4898 -H "Accept: application/vnd.crossref.unixref+xml" -L

repo: libero/prc


text:
Matrix4#getRotation() is calculating incorrect rotation for one particular matrix

We use a custom model format(extracted from a collada version of the asset) where the node transforms (translation, rotation and scale) are saved as a single 4x4 matrix in row major order(similar to collada). We have written a custom model loader that parses this out into models.
We use a Matrix4 to extract the individual components out and set it to the model, like so.
            Matrix4 nodeMatrixCache = new Matrix4();

            //Convert to column order. node.matrix.matrix is a float array of size 16
            nodeMatrixCache.set(node.matrix.matrix).tra();

            final Vector3 translation = new Vector3();
            final Vector3 scale = new Vector3();
            final Quaternion rotation = new Quaternion();

            nodeMatrixCache.getRotation(rotation, true);
            nodeMatrixCache.getTranslation(translation);
            nodeMatrixCache.getScale(scale);

            modelNode.rotation = rotation;
            modelNode.scale = scale;
            modelNode.translation = translation;

We are using the exact same code for multiple assets, and all are loading perfectly fine, except for one. The matrix is [-0.003857 -2.209997 0.000000 0.000000
0.000000 0.000000 2.210000 0.012000
-2.209997 0.003858 0.000000 0.000000
0.000000 0.000000 0.000000 1.000000] (in row-major order).
This one particular asset gives a rotation of [-0.49956352 0.22691926 0.5004361 0.49956352] when we extract the rotation.
However, if we convert the collada to G3DJ, the rotation that we see in the node is [-0.499563 0.500436 0.500436 0.499563]. Index 1 of the rotation matrix has a drastically different value, and it's screwing up the model's rotation when it appears.
Any idea what the problem could be?
P.S: The reason we are not using G3DB is because we need to stream the assets from the network, so we have a custom format that is much smaller than G3DB.

Please provide an sscce showing the issue you're reporting.
Btw, you really should reconsider your approach, extracting values from a matrix like that is going to cause issues.

I'm pretty new to this, and I don't know what an sscce is. Would you please
enlighten me?
Yes, this is a temporary stop gap measure. I'm planning to set up a
pipeline in the near future which will use fbx-conv to convert to g3dj and
then we will convert g3dj to a new format, which will enable us to move
away from this approach.
But for the present, we need to get some of the basic stuff working before
we can go ahead with that.
On Jul 1, 2015 11:02 PM, "Xoppa" notifications@github.com wrote:

Please provide an sscce showing the issue you're reporting.
Btw, you really should reconsider your approach, extracting values from a
matrix like that is going to cause issues.
—
Reply to this email directly or view it on GitHub
https://github.com/libgdx/libgdx/issues/3250#issuecomment-117759006.

Never mind, I got what an sscce is. I'll add one right now.

Here's an example -
public class DesktopLauncher {

    public static void main(String[] arg) {

        LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();

        final Game game = new Game();
        new LwjglApplication(doowupScene, config);

        Matrix4 matrix4 = new Matrix4();

        //Column order matrix
        matrix4.set(new float[]{
                -0.003857f, 0.0f, -2.209997f, 0.0f,
                -2.209997f, 0.0f, 0.003858f, 0.0f,
                0.0f, 2.21f, 0.0f, 0.0f,
                0.0f, 0.012f, 0.0f, 1.0f
        });

        final Vector3 translation = new Vector3();
        final Vector3 scale = new Vector3();
        final Quaternion rotation = new Quaternion();

        matrix4.getRotation(rotation, true);
        matrix4.getTranslation(translation);
        matrix4.getScale(scale);

        //Expected output: [-0.499563,  0.500436,  0.500436,  0.499563]
        Gdx.app.log("Test", "Rotation: " + rotation.toString());

        //Expected output: [ 2.210000,  2.210000,  2.210000]
        Gdx.app.log("Test", "Scale: " + scale.toString());

        //Expected output: [ 0.000000,  0.012000,  0.000000]
        Gdx.app.log("Test", "Translation: " + translation.toString());
    }
}

Thanks, should be fixed now

OK, that was quick! Thanks!
On Jul 2, 2015 1:42 PM, "Xoppa" notifications@github.com wrote:

Thanks, should be fixed now
—
Reply to this email directly or view it on GitHub
https://github.com/libgdx/libgdx/issues/3250#issuecomment-117952924.

authors: vinaysshenoy xoppa

repo: libgdx/libgdx


text:
Get game controller id/index assigned by backend

This is a new method that returns an id or index number generated for a game controller by the backend. They are assigned differently by each backend when the controller is connected.
Javascript returns the value of Gamepad.index
Android returns the value of InputDevice.getId()
Lwjgl2 & Lwjgl3 return an index
This is mostly useful if you need to interface with code on a specific backend. This would let you expand the controller functions without having to edit libGDX.

IMO having this method in the core interface does not make any sense. There's nothing platform-agnostic you can do with this information.

@MrStahlfelge It's mostly for if someone needs to expand/fix something in the controller support for Android/Javascript without having to edit/update libGDX. The game engine I'm switching away from is closed source, but it's not really necessary when you know how to edit libGDX. Now that I have a good setup for editing libGDX I'm no longer in need of this. I'll be fine with it whether it gets accepted or not.

I think this make sense to have an unique ID to identify a controller especially to identify if a controller changed? Any reason this shouldn't be added?

I don't know much about controllers but I agree with @MrStahlfelge this doesn't seem right on the core interface. @noblemaster Isn't there a proper mechanism to notify when controllers are connected/disconnected?
OP answers he doesn't needs this anymore but the original use case for it was to "fix/expand" a specific implementation. If a controller implementation needs a "fix" we want it done in libGDX project. Regarding the "expand" part I think we need a specific example to justify adding this.

Added feature getUniqueId() to controllerutils in the meantime

Now that I have a good setup for editing libGDX I'm no longer in need of this.
Closing this because has conflicts, won't get updated and there's no reason to return the internal assigned id back to the core.

authors: GrantOjanen MrStahlfelge noblemaster obigu


text:
Fix #3935 and other improvements

I've gone through our Android Music implentation and checked against MediaPlayer docs (https://developer.android.com/reference/android/media/MediaPlayer) and I've been able to make some tweaks that fix some of our long standing issues (such as #3935).
Main changes:

seekTo(0) call has been removed from stop() and it's the line that caused #3935. This is not needed as stop() already resets the position indirectly as to play it again, prepare() must be called. The commit that added it is ec5ab7a323941c441acf724865cf961771a4a41e , @NathanSweet any idea what it fixed? On 2011 some Android devices had all kinds of strange issues and this might have been a workaround for one of them.

Edit: Found the probable cause for the fix on https://github.com/libgdx/libgdx/pull/3399 (I'm a fish, it's a good thing I let stuff written for my future me). The SO links point to Froyo problems so it should be safe to remove.

Removed isPlaying() checks from play() and pause(). According to the documentation calling play() when player is on Play state or pause() when it's on Pause state has no effect so we avoid an unnecessary JNI call but I think there's a more important thing it fixes. According to the docs :

Note that the transition from the Started state to the Paused state and vice versa happens asynchronously in the player engine. It may take some time before the state is updated in calls to isPlaying(), and it can be a number of seconds in the case of streamed content.
This means that if we we have a paused Music and call play() and pause() in a short interval of time, it may happen that on the pause() call, the isPlaying() check returns false and the method is not executed.

Improvements to the MusicTest that was impossible to run on a device where everything looked tiny.

Playing with the MusicTest, hammering buttons, positions slider, etc... on a real device (Samsung S7) I haven't been able to break it while before it was pretty easy to make it fail.

I don't remember why the seek was added, sorry. I don't see that the [prepare](https://developer.android.com/reference/android/media/MediaPlayer#prepare() docs) mention it changes the playback position, so it isn't clear if the seek is needed. Maybe it's buried in the rest of the docs? Even if you see prepare seeks to 0 on your device, it could have had different behavior in MediaPlayer previously or on some devices.

Yeah, it's not explictely mentioned in the docs and in one of the SO links it shows that some specific device (unsupported Gingerbread 2.3) was not resetting the position (https://stackoverflow.com/questions/6849045/mediaplayer-instance-stop-behaves-like-a-pause) so it may very well be it was added for those buggy devices.
Expected behaviour on any player (from a Walkman to VLC Player) is that Stop resets the position of the music/video to the beginning and that is consistent with the Android devices I've tested.
To make sure the changes don't break on weird devices I've made a release of one of my games (min SDK 19) that uses Music intensively that uses a custom libGDX with this PR merged. Most of the users are kids with devices you've never heard of, if there are devices out there that don't properly set position to 0 on stop, we will hopefully know.

@NathanSweet I've just found confirmation on the MediaPlayer docs that Music position should be set to 0 on start()
Starts or resumes playback. If playback had previously been paused, playback will continue from where it was paused. **If playback had been stopped, or never started before, playback will start at the beginning.**

It's been 2 weeks since I released this fix on one of my apps and nobody has complained about Music issues (no crashes either) so I think it's safe to merge after review.

authors: NathanSweet obigu


text:
SSH functionality is disabled

As identified in #478, libgit2 is building without SSH support. Not sure when this broke, but this is how it stands in 0.8.5.
I suspect something in the update_libgit2 script which uses cmake to build libgit2.

This is only an issue with the iOS build.

license: mit

license_source: bigquery


text:
Fixes for fuzzer bugs.

Initialize full image area with RenderPadding if frame is outside image
Use unaligned store/load in all stages
Only run per-group render pipeline if modular could decode something

Wait, it will cause full-image-padding for each group?

Good point, I changed it to do the full padding only for group 0. PTAL

repo: libjxl/libjxl


text:
[docs] fix-lcs-description-doc-error

Fixes #1193

:hourglass: Testing commit 9115556e64cc28d8782c4b617618185640c1b1c6 with merge 6fb8430cbb57d2abe44f456b1e86038cd5b92744...

:sunny: Test successful - checks-circle_commit_workflow
Approved by: davidiw
Pushing 6fb8430cbb57d2abe44f456b1e86038cd5b92744 to master...

authors: alexkayabula bors-libra

repo: libra/libra


text:
[language][move-lang] support pretty printing errors

Summary
This adds support for pretty printing errors when running the move-lang functional tests.
Before:
    [0] Transaction(0)
    [1] Stage(Compiler)
    [2] "error: \n\n   ┌── /var/folders/hd/zt73s2xj5gb2csy_9nhdwq7w1qz8wg/T/.tmp3ha6BX:2:9 ───\n   │\n 2 │ let x = 1 + true;\n   │             ^^^^ Incompatible arguments to \'+\'\n   ·\n 2 │ let x = 1 + true;\n   │         - The type: integer\n   ·\n 2 │ let x = 1 + true;\n   │             ---- Is not compatible with: \'bool\'\n   │\n\n"
    [3] Status(Failure)

After:
    [0] Transaction 0
    [1] Stage: Compiler
    [2] Error:

    error:

       ┌── /var/folders/hd/zt73s2xj5gb2csy_9nhdwq7w1qz8wg/T/.tmpaflJZx:2:9 ───
       │
     2 │ let x = 1 + true;
       │             ^^^^ Incompatible arguments to '+'
       ·
     2 │ let x = 1 + true;
       │         - The type: integer
       ·
     2 │ let x = 1 + true;
       │             ---- Is not compatible with: 'bool'
       │

    [3] Status: Failure

Test Plan
Manually test with a file with compile errors.

@bors-libra r=tnowacki

:pushpin: Commit ff0e7fb has been approved by tnowacki

:hourglass: Testing commit ff0e7fb02fdf1f3daae7573c03cdf91434a90625 with merge 7457b507241663ec6eccc7c4df87b63d664ecaa6...

:sunny: Test successful - checks-actions_land_blocking_test, checks-circle_commit_workflow
Approved by: tnowacki
Pushing 7457b507241663ec6eccc7c4df87b63d664ecaa6 to master...


text:
Tracks skip after few seconds when using the pipe backend

This is a re-surfacing of
https://github.com/plietar/librespot/issues/231 and
https://github.com/librespot-org/librespot/issues/54
I'm trying to use librespot to stream audio from spotify over a pipe backend into my multiroom audio system (in Elixir). The data is flowing and everything basically works from an integration point of view (data flows into the elixir process and nothing crashes), but the spotify player skips to the next track every few seconds.
Reading the above issues, it seems that this is because librespot sends an inappropriate notification to the spotify player once it has downloaded all the data for a song, which in the case of the pipe backend happens within a few seconds (as the pipe backend just pulls the data in as fast as the network will let it).
I'm using librespot master HEAD as my source and compiling with cargo build --release --no-default-features
Really keen to get this working please let me know how I can help.

After some time I finally found the problem. You have to "pace" reading from stdout.
I have to sleep for 2 seconds before reading the next batch. Less than 2 sec. and the skipping happens again.

@tadly Do you have an example of how to achieve that?

@rystaf hope you can read python :P
This is what I used to test some stuff and is not optimal but it works.
It spawns an HTTP server which you can connect to and have audio playing.
Either use your browser and go to http://localhost:8000 or use any other audio player that supports streaming.
#!/usr/bin/env python
import threading
import time
import collections
from http.server import BaseHTTPRequestHandler, HTTPServer
import uuid
from socketserver import ThreadingMixIn
from subprocess import PIPE, Popen

class LibreSpot:
    __instance = None

    samplerate = 44100
    channels = 2
    bits = 16

    samplesize = None

    _thread = None
    _proc = None
    _exit = None
    _queues = None

    def __init__(self, device_name, bitrate=160, initial_volume=50):
        self.device_name = device_name
        self.bitrate = bitrate
        self.initial_volume = initial_volume

        # Calculate byte-size for 1 sec. of audio
        self.samplesize = int(self.samplerate * self.bits * self.channels / 8)

        self._exit = threading.Event()
        self._queues = {}

    @classmethod
    def get(cls) -> 'LibreSpot':
        if not cls.__instance:
            cls.__instance = LibreSpot()
        return cls.__instance

    @property
    def is_running(self):
        return not self._exit.is_set()

    def subscribe(self):
        handle = str(uuid.uuid4())
        self._queues[handle] = collections.deque(maxlen=self.samplesize)
        return handle

    def unsubscribe(self, handle):
        del self._queues[handle]

    def run(self):
        self._proc = Popen(
            [
                'librespot',
                '--disable-audio-cache',
                '-n',
                self.device_name,
                '-b',
                str(self.bitrate),
                '--initial-volume',
                str(self.initial_volume),
                '--backend',
                'pipe',
            ],
            stdout=PIPE,
        )

        chunk_size = self.samplesize // 4
        while True:
            if self._exit.is_set():
                break

            # Read 250 ms of audio data and add it to all buffers
            chunk = self._proc.stdout.read(chunk_size)
            for handle, q in self._queues.items():
                q.extend(chunk)

            # Wait 250 ms before reading the next chunk as otherwise
            # spotify would start skipping tracks
            time.sleep(.25)

    def start(self):
        self._thread = threading.Thread(target=self.run)
        self._thread.start()

    def stop(self):
        self._exit.set()
        self._thread.join()

    def read(self, handle):
        if len(self._queues[handle]) < self.samplesize:
            return b''

        chunk = bytearray(bytes(self._queues[handle]))
        self._queues[handle].clear()
        return chunk

class StreamHandler(BaseHTTPRequestHandler):
    protocol_version = 'HTTP/1.1'

    def _wav_header(self, sample_rate, bits, channels):
        # For streaming the data-size has to be 0 as otherwise clients don't
        # stream but try to buffer everything which is not possible
        datasize = 0

        header = bytes('RIFF', 'ascii')
        header += (datasize + 36).to_bytes(4, 'little')
        header += bytes('WAVE', 'ascii')
        header += bytes('fmt ', 'ascii')
        header += (16).to_bytes(4, 'little')
        header += (1).to_bytes(2, 'little')
        header += (channels).to_bytes(2, 'little')
        header += (sample_rate).to_bytes(4, 'little')
        header += (sample_rate * channels * bits // 8).to_bytes(4, 'little')
        header += (channels * bits // 8).to_bytes(2, 'little')
        header += (bits).to_bytes(2, 'little')
        header += bytes('data', 'ascii')
        header += (datasize).to_bytes(4, 'little')

        return header

    def do_GET(self):
        self.send_response(200)
        self.send_header('Content-Type', 'audio/wav')
        self.end_headers()

        print('New client:', self.client_address)

        librespot = self.server.librespot

        self.wfile.write(
            self._wav_header(librespot.samplerate, librespot.bits,
                             librespot.channels))

        handle = librespot.subscribe()
        while librespot.is_running:
            chunk = librespot.read(handle)

            # Prevent high cpu-loads
            if not chunk:
                time.sleep(.1)
                continue

            try:
                self.wfile.write(chunk)
            except (ConnectionResetError, BrokenPipeError):
                break

        print('bye bye:', self.client_address)
        librespot.unsubscribe(handle)

class ThreadedHTTPServer(ThreadingMixIn, HTTPServer):
    librespot = None

    def __init__(self, *args, librespot, **kwargs):
        self.librespot = librespot

        HTTPServer.__init__(self, *args, **kwargs)

if __name__ == '__main__':
    librespot = LibreSpot('Python', 320)
    librespot.start()

    httpd = ThreadedHTTPServer(('', 8000), StreamHandler, librespot=librespot)

    try:
        httpd.serve_forever()
    except KeyboardInterrupt:
        pass

    librespot.stop()
    httpd.server_close()

I've been poking around at this too. IMHO the problem is a result of the player using the byte-offset within the audio stream being used to directly represent the playback position. This works when the sink write is basically synchronous (I've done some measurements and the time taken to write to the rodio backend is basically the duration of the sample being written). But obviously with the pipe backend, the duration of the write is basically zero.
The approach above adds a delay to the pipe write by slowing down the read - since the pipe will block until read. My system is using erlang to read from a fifo pipe and I just receive messages when new data comes in, so I don't have that option.
Instead I've tried adding a delay to the pipe write which tries to match the expected duration of the audio being written - basically emulating the behaviour of the other sinks.
You can see the change here: https://github.com/librespot-org/librespot/compare/dev...magnetised:pipe-playback-delay
This works well enough - the backend occasionally falls behind the expected position, I'm guessing due to cumulative delays because of imprecise sleep durations - but I've minimised this by using a tight loop of small sleeps, rather than just a single sleep call of the required duration.
I'm mystified why I can't just use the right value for the duration of the sample - ~22.6 microseconds per sample - if I use that then the playback is constantly rewinding. Maybe there's something obvious I'm missing there though.
In reality I would prefer to re-write the player to use time-based calculations for the track position. This would allow me to do some buffering within my application since I'd have access to excess audio data, rather than just enough to play.
I suspect that the reason for using the byte position, enforced by the synchronous sink write function, is to make sure that the system stays in sync with the actual playback speed of the audio system, rather than assuming a 1:1 ratio between the system clock and the playback speed. Would you agree?
If I moved to using time-based position, I think it would involve tweaking the player to add a clock based position measurement in the play loop and removing any handling of the end of the audio download. Is that something you'd accept, or is it not worth my effort? (The player code is fairly involved and I have a horrible feeling there would be a lot of edge cases to handle).

@magnetised - thanks for the analysis! I've been struggling with this issue, too. In the end I did a dirty hack. Yours seems nicer to me. Have you been using it successfully?

Have you been using it successfully?

@michaelherger a bit... my rough tests over a couple of hours were prett successful - the tracks kept playing until the progress at in the Spotify app reached the end and there weren't that many skips backwards. So at that level it works (for me).
I don't like the "14" magic number though so would like to be sure I wasn't just solving for my particular laptop rather than a generic solution. Maybe if you get a chance you could see how it works for you - that would double the amount of data available 😅
One problem is the lack of info sent to the sink (it just gets PCM data) which is fair enough but prevents stuff like analysing the track duration and buffering.
I suppose I could experiment with beefing up the sink API a little to enable this stuff (for most backends it would just be a no-op for the additional calls) but it feels bed to mess up the super simple version that's there.

I agree we should pace the pipe writes a bit, it should not need to be super accurate because no consumer should be relying on that. And since the pipe output doesn't need to support using it for anything except playback, changing it to write at the normal playback rate (ish) should be fine. The current system of pacing the writes (and therefore librespot's apparent current playback position) by relying on the pipe getting full is not very nice.
Assuming the writing is paced, why do you need extra information to implement an input buffer (other than the fixed sample rate and size)? Does your program really not already have an input buffer between the read end of the pipe and the output device you are writing? What would you do with that extra information?

I'm having a similar problem.
I'm writing an adaption layer in Rust using Neon for Node.js so that code in Node.js can call librespot functions. I wrote a custom sink for Player like so:
struct EmittedSink {
    emitter: mpsc::Sender<Event>
}

impl audio_backend::Sink for EmittedSink {
    fn start(&mut self) -> std::result::Result<(), std::io::Error> {
        Ok(())
    }

    fn stop(&mut self) -> std::result::Result<(), std::io::Error> {
        Ok(())
    }

    fn write(&mut self, data: &[i16]) -> std::result::Result<(), std::io::Error> {
        self.emitter.send(Event::AudioData {
            data: data.to_vec()
        }).expect("event emitted");

        Ok(())
    }
}

Another part then uses the Receiver side of the mpsc channel to hand off audio data to Node.js when a poll function is called from JS. The issue is that I can't figure out how to put backpressure on the sink / channel; streaming with Spotify Connect results in track skipping. Any ideas on how to fix this? @magnetised's solution didn't seem to work for me.
Apologies if this is the wrong place to ask, I'm very new to Rust.

@codetheweb That is a cool project, I'd be quite interested in something similar. Is your code up somewhere I can take a peek it at?

I'll try to clean it up and post it later tonight.
I accidentally committed my credentials in my local repo at some point... 😛
I plan to make a high-level interface available with play/pause/seek/enable connect/event emitters etc. Use case is a Spotify Connect Discord music bot. I've been wanting to learn Rust for a while and this seemed like a good project to get my feet wet.

@ashthespy check it out here: https://github.com/codetheweb/librespot-node.
Like I said, it's still extremely rough around the edges. Playing a song by track ID works fine (because it doesn't matter how much is buffered) but spirc is kinda broken.
I based it on this repo, which played audio directly using the default sink instead of passing it back to Node.js.
An example script (put in dev.js in src/):
import Spotify, {ESpotifyQuality, ESpotifyConnectDeviceType, ESpotifyVolumeCtrl} from '.';
import Speaker from 'speaker'

const spotify = new Spotify({
  username: '',
  password: '',
  quality: ESpotifyQuality.Bitrate96
});

// Load specified track (by id) and starts playing
spotify.play('15O20RQyWJgKrkHID9ynT9');

setTimeout(() => {
spotify.enableConnect({
  deviceName: "testdevice",
  deviceType: ESpotifyConnectDeviceType.Tablet,
  initialVolume: 50,
  volumeCtrl: ESpotifyVolumeCtrl.Fixed
});
}, 2000);

const speaker = new Speaker({
    channels: 2,
    bitDepth: 16,
    sampleRate: 44100
})

spotify.stream.pipe(speaker);

setInterval(() => {
    console.log('playing? ', spotify.isPlaying());
}, 1000);

If you wanna talk further, feel free to open an issue over there or use one of the contact methods listed on my site.

I think I have the same issue. After a few days of fiddling around I finally managed to get librespot running and the data is feed to a pipe, which is read by snapserver running on the same machine. However as soon as I start playing a song it skips immediately to the next song, not even 1 second, and the pipe grew to a few gigs in less than a minute. I can provide some logs if this helps.
I really like to get this to work, it's the last piece missing for my multiroom solution and highly appreciate any help with this.

I was curious about this, as it's impacting something I've been working on as well. A little testing has shown that the problem only appears to emerge when the --passthrough flag is present.

Well, that's not possible. When the issue was created --passthrough did not even exist.

Well ain't that something. It's what I'm seeing at the moment, though: Without passthrough, piping audio out works fine. With it, I get skipping.

It may depend on where you pipe it to. Something like pacat has just a little buffer, so everything will be fine. If you use a fifo or a file, they could grow very fast, and after a short while the player reaches the end of the track.

Can you let us know what you're piping to? Or if this is no longer an issue?

Try /dev/null to reproduce it quickly.

Closing, no further feedback.

Even without practical impact, it's still not the way it should be

authors: Burningstone91 Johannesd3 ashthespy codetheweb gjdawson jdertmann kingosticks magnetised michaelherger roderickvd rystaf tadly

repo: librespot-org/librespot


text:
uv__loops_init allocates memory which cannot be freed

On Windows, changelist https://github.com/libuv/libuv/commit/6fa3524ea7ad8d54ce733a6e7da283701c9c06fc introduced a dynamic allocation to keep track of uv_loops.  Unfortunately, libuv provides no mechanism to free this memory and it causes my unit tests to fail because they detect a memory leak.
I would like to provide a pull request where either:

uv__loops_remove deallocates the uv__loops structure when the last loop is closed.  Then, of course, when a new loop is created, uv_loop_init should check if the structure is allocated and allocates it if necessary.  There would be a little bit of extra overhead, but considering that creating/closing loops is no something that gets done very often, I don't think it's a concern;
alternatively, I would add a uv_loops_cleanup which frees the memory and resets the global variables in such a way that the uv_once will be executed again.  The client application could then explicitly call this function to cleanup libuv.

I believe the first option is more sensible.  Let me know if such pull request would make it to the master branch.

See #1125, a pull request for the first option would be welcome.

@gaspardpetit does https://github.com/cjihrig/libuv/commit/d9a0c45cea353067f9cb34603add36482a42d974 work for you?

Perfect!

authors: bnoordhuis cjihrig gaspardpetit

repo: libuv/libuv


text:
benchmark-multi-accept failed in Windows

Version: 1.x
Platform: windows10

Is there any final solution to this problem?
Or multi-accept without pipe?

I'm trying to use code similar to benchmark-multi-accept and hit the same issue - in a callback from uv_listen on uv_pipe I'm calling uv_accept and getting EAGAIN - which, according to the documentation, should never happen (uv_accept should always succeed).


text:
[website] Use a responsive Sphinx theme

http://docs.libuv.org/en/v1.x/
Not an expert in Sphinx so I cannot help too much, but AFAIK there are responsive themes for Sphinx.
Or may be I'm the only who reads API documentations when traveling via subway :)

Site looks fine to me in mobile safari, text is nice and readable.
Then again my phone is huge so YMMV :)

This is NOT a responsive design. Two columns when in portrait mode is not "nice". Two completely different text sizes (in left and right column) is not "nice":

The "search" field and "GO" button are not usable:

The hyper mini "previous | next" buttons behind another layer (with print options) is not "nice" not even usable:

I'll see is there is a better theme we can use. I initially chose this one
because it's built-in and color-matches well with the logo.
On Apr 2, 2016 13:57, "Iñaki Baz Castillo" notifications@github.com wrote:

http://docs.libuv.org/en/v1.x/
Not an expert in Sphinx so I cannot help too much, but AFAIK there are
responsive themes for Sphinx.
Or may be I'm the only who reads API documentations when traveling via
subway :)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/libuv/libuv/issues/801

Check this one out: http://notes.saghul.net
On Apr 3, 2016 07:49, "Saúl Ibarra Corretgé" saghul@gmail.com wrote:

I'll see is there is a better theme we can use. I initially chose this one
because it's built-in and color-matches well with the logo.
On Apr 2, 2016 13:57, "Iñaki Baz Castillo" notifications@github.com
wrote:

http://docs.libuv.org/en/v1.x/
Not an expert in Sphinx so I cannot help too much, but AFAIK there are
responsive themes for Sphinx.
Or may be I'm the only who reads API documentations when traveling via
subway :)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/libuv/libuv/issues/801

http://notes.saghul.net

Looks ugly but seems responsive :)

authors: ibc kthelgason saghul


text:
build: downgrade QEMU version to 6.2 for GitHub Actions workflow

For unknown reasons 7.2 was removed from de registry.
Fixes: https://github.com/libuv/libuv/issues/4625

Weird, the test runner runs, but each tests fails with that exec format error.

Weird, the test runner runs, but each tests fails with that exec format error.

maybe related w/ the compilers/toolchains?

It looks like newer version now may be just compatibility wrappers, and aren't installing binfmt properly with this setup? Maybe just apt install would get a new enough version so this manual work isn't needed anymore?
(https://packages.debian.org/sid/qemu-user-static)

Or perhaps there is a ppa with more recent builds, if latest Ubuntu is too old?

With ubuntu-24.04 it should be new enough (8.x); you will want to apt-get install qemu-user qemu-user-binfmt

I fixed it just now in #4630. Thanks anyway for the pull request, @juanarbol.

authors: bnoordhuis juanarbol saghul vtjnash


text:
Build error on sec-remarks related to YOUTUBE_REGEX

Some reason build is failing on sec-remarks note
11:38:36 AM: info  - Compiled successfully
11:38:36 AM: info  - Collecting page data...
11:38:40 AM: info  - Generating static pages (0/302)
11:38:42 AM: info  - Generating static pages (75/302)
11:38:43 AM: info  - Generating static pages (150/302)
11:38:43 AM: info  - Generating static pages (226/302)
11:38:44 AM: Error occurred prerendering page "/notes/sec-remarks". Read more: https://nextjs.org/docs/messages/prerender-error
11:38:44 AM: TypeError: Cannot read properties of null (reading '1')
11:38:44 AM:     at Paragraph (/opt/build/repo/site/.next/server/pages/[...slug].js:509:77)

Debugging in dev mode get more informative:

What i can't work out is why this regex is matching at all in that doc as no href links at all.
Testing locally have found that YOUTUBE_REGEX is testing true on https://www.sec.gov/news/speech/gensler-remarks-crypto-markets-040422

@khalilcodes suggest we remove YOUTUBE_REGEX everywhere if we can and just use YOUTUBE_ID_REGEX.


text:
Improve Docker build times in CI

Docker builds are really slow right now because they start from scratch. Caching seems like the obviously correct approach here (and the Dockerfile is structured to be conducive to caching, which works well locally), but I can't seem to get it to work.
Some references I found while investigating:

https://github.com/dtinth/github-actions-docker-layer-caching-poc/blob/master/.github/workflows/dockerimage.yml
https://dev.to/dtinth/caching-docker-builds-in-github-actions-which-approach-is-the-fastest-a-research-18ei
https://github.com/docker/build-push-action/issues/7
https://github.com/docker/build-push-action/issues/50

Fixed in https://github.com/liftM/hipsterfy/commit/9aa44f5b0cde2acdd03fa2dc84507082085b4ab4.

repo: liftM/hipsterfy


text:
Incorrect kafka_consumergroup_group_offset Metric

All the kafka_consumergroup_group_offset metrics for various consumer groups are all zero which leads to the lag metrics being insanely large (i.e. equal to the latest offsets), which is incorrect as the same metrics are shown correctly using kafka-consumer-groups.sh
Helm Chart used: kafka-lag-exporter-0.4.1
Kafka Version used: 1.1.0
Kafka is deployed on kubernetes, and is not a Strimzi Kafka
Debug logs also look fine, no errors:
2019-06-14 07:45:46,218 WARN  o.a.k.c.admin.AdminClientConfig  - The configuration 'sasl.jaas.config' was supplied but isn't a known config.

2019-06-14 07:45:46,480 INFO  o.a.kafka.common.utils.AppInfoParser  - Kafka version: 2.2.1
2019-06-14 07:45:46,480 INFO  o.a.kafka.common.utils.AppInfoParser  - Kafka commitId: 55783d3133a5a49a
2019-06-14 07:45:46,529 INFO  org.apache.kafka.clients.Metadata  - Cluster ID: 3r4hHZncSxSz0vhHRSRuMA
2019-06-14 07:45:46,567 DEBUG c.l.k.ConsumerGroupCollector$ akka://kafka-lag-exporter/user/consumer-group-collector-centrallogging - Updating lookup tables
2019-06-14 07:45:46,602 DEBUG c.l.k.ConsumerGroupCollector$ akka://kafka-lag-exporter/user/consumer-group-collector-centrallogging - Reporting offsets
2019-06-14 07:45:46,657 DEBUG c.l.k.ConsumerGroupCollector$ akka://kafka-lag-exporter/user/consumer-group-collector-centrallogging - Clearing evicted metrics
2019-06-14 07:45:46,658 DEBUG c.l.k.ConsumerGroupCollector$ akka://kafka-lag-exporter/user/consumer-group-collector-centrallogging - Polling in 5 seconds
2019-06-14 07:45:51,678 DEBUG c.l.k.ConsumerGroupCollector$ akka://kafka-lag-exporter/user/consumer-group-collector-centrallogging - Collecting offsets
2019-06-14 07:45:51,776 DEBUG c.l.k.ConsumerGroupCollector$ akka://kafka-lag-exporter/user/consumer-group-collector-centrallogging - Updating lookup tables
2019-06-14 07:45:51,779 DEBUG c.l.k.ConsumerGroupCollector$ akka://kafka-lag-exporter/user/consumer-group-collector-centrallogging - Reporting offsets
2019-06-14 07:45:51,823 DEBUG c.l.k.ConsumerGroupCollector$ akka://kafka-lag-exporter/user/consumer-group-collector-centrallogging - Clearing evicted metrics
2019-06-14 07:45:51,823 DEBUG c.l.k.ConsumerGroupCollector$ akka://kafka-lag-exporter/user/consumer-group-collector-centrallogging - Polling in 5 seconds
2019-06-14 07:45:56,838 DEBUG c.l.k.ConsumerGroupCollector$ akka://kafka-lag-exporter/user/consumer-group-collector-centrallogging - Collecting offsets

Thanks for trying out the project @abhishekjiitr.  When Kafka Lag Exporter reports group offsets it will default to 0 for any group partitions where an offset is not provided.  I've seen this occur when a consumer group is created, but has had nothing committed to it.  For example, when offsets are managed by the user instead of being committed to Kafka, or when groups are just used for consumer group member balancing and not offset management.
Can you provide more information?  Could you attach Kafka Lag Exporter metrics for the consumer group thta's being reported with group offsets of 0, along with your call to and output of kafka-consumer-groups.sh?

I have the same issue, even though our topics are in used a lot. Other lag checkers (burrow, remora, command-line, and yahoo's kafka-manager) see correct numbers.
kafka_consumergroup_group_offset{cluster_name="logging",group="inventorycrawler",topic="inventorycrawler",partition="9",member_host="/10.139.129.194",consumer_id="logstash-10-513ec4b2-0060-4159-bfea-0f6fe5fe307c",client_id="logstash-10",} 0.0
vs.
kafka_consumergroup_group_lag{cluster_name="logging",group="inventorycrawler",topic="inventorycrawler",partition="9",member_host="/10.139.129.194",consumer_id="logstash-10-513ec4b2-0060-4159-bfea-0f6fe5fe307c",client_id="logstash-10",} 29460.0
What is reported here as the lag is the actual offset of the consumer, and also the latest offset produced. It's not possible, that this partition isn't consumed. And the group offset gets updated ...
Output of kafka-consumer-groups.sh:
inventorycrawler 9          29460           29460           0               logstash-10-513ec4b2-0060-4159-bfea-0f6fe5fe307c /10.139.129.194 logstash-10

@smlgbl I misunderstood the original problem.  That's indeed a regression bug.  Looking into it now.

@seglo Thank you very much. I'd really like this to work - burrow and remora have proven unreliable...

Some sample metrics from the lag exporter (with topic & cluster name obfuscated):

kafka_consumergroup_group_offset{cluster_name="CLUSTER",group="sysloggroup",topic="MY_TOPIC",partition="0",member_host="/172.16.9.1",consumer_id="sysloggroup-0-cea4fb38-30ce-4131-a46f-31b14c440769",client_id="sysloggroup-0",} 0.0
kafka_partition_latest_offset{cluster_name="CLUSTER",topic="MY_TOPIC",partition="0",} 3.22118322E8

@abhishekjiitr @smlgbl Try 0.4.3 and let me know if it works for you.

It's working better, but does not report the same lags as the other tools ... the green is the "correct" lag (all the other tools agree :)

Yes, it is much better than the last version, the metrics look correct now
Thanks @seglo!

@smlgbl Thanks for checking.  The peaks in the chart you're showing are from kafka-lag-exporter?  Can you confirm it's the kafka_consumergroup_group_lag metric?   Can you confirm that it's not being aggregated in any way (i.e. max lag from a set of partitions for a topic)?

authors: abhishekjiitr seglo smlgbl

repo: lightbend/kafka-lag-exporter


text:
Fails to create index for UTF strings

Fails to create due to #9. Exception stack trace:
java.lang.IllegalArgumentException: requirement failed: Min é is greater than max a
	at scala.Predef$.require(Predef.scala:224)
	at org.apache.spark.sql.execution.datasources.parquet.ParquetStringStatistics.<init>(statistics.scala:171)
	at org.apache.spark.sql.execution.datasources.parquet.ParquetStatisticsRDD$.convertStatistics(ParquetStatisticsRDD.scala:238)
	at org.apache.spark.sql.execution.datasources.parquet.ParquetStatisticsRDD$$anonfun$5.apply(ParquetStatisticsRDD.scala:219)
	at org.apache.spark.sql.execution.datasources.parquet.ParquetStatisticsRDD$$anonfun$5.apply(ParquetStatisticsRDD.scala:212)

Example to reproduce:

Seq("a", "é").toDF("name").coalesce(1).write.parquet("temp/bad.parquet")
spark.read.parquet("temp/bad.parquet").where("name > 'a'").show

When trying the same query with index, exception above is thrown.

Example to show incorrect result:

Seq("aa", "bé", "bb").toDF("name").coalesce(1).write.parquet("temp/bad2.parquet")

spark.read.parquet("temp/bad2.parquet").where("name > 'bb'").show

returns this result:
+----+
|name|
+----+
|  bé|
+----+

spark.index.create.indexByAll.parquet("temp/bad2.parquet")
spark.index.parquet("temp/bad2.parquet").where("name > 'bb'").show

returns wrong result:
+----+
|name|
+----+
+----+

Fixed in #31.

repo: lightcopy/parquet-index


text:
go.mod: update LND version

Bump LND version to include this tls fix.
Will replace the replace once the LND PR is merged & a new tag is pushed
Fixes #696

will update once lnd 0.17.4 is out

repo: lightninglabs/lightning-terminal


text:
wallet: fix p2tr addresses not being marked as used

Depends on https://github.com/btcsuite/btcwallet/pull/799.
Found while testing https://github.com/lightningnetwork/lnd/pull/6387.
Makes sure that P2TR addresses are being marked as used correctly.

Can be rebased now that the btcwallet PR has been merged in.

Rebased.

authors: Roasbeef guggero

repo: lightningnetwork/lnd


text:
lab issue command fails with a panic for not assigned issues

e.g I ran in a repository lab issue 1158 and the command returns the issue details, but if I ran lab issue 1159 the command panics out. The difference is that the last is not assigned. If I assign my self to issue 1159 the command returns the details.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x771e18]

goroutine 1 [running]:
github.com/lighttiger2505/lab/commands/issue.issueDetailOutput(0xc4201b8000, 0x488, 0xc420182180)
        /home/travis/gopath/src/github.com/lighttiger2505/lab/commands/issue/detail.go:89 +0x588
github.com/lighttiger2505/lab/commands/issue.(*detailMethod).Process(0xc4201a2040, 0xc42011ac40, 0xc4200344e0, 0xc420136200, 0xc420028a35)
        /home/travis/gopath/src/github.com/lighttiger2505/lab/commands/issue/detail.go:26 +0x84
github.com/lighttiger2505/lab/commands/issue.(*IssueCommand).Run(0xc42014c4b0, 0xc42001c0b0, 0x1, 0x1, 0xc42011a600)
        /home/travis/gopath/src/github.com/lighttiger2505/lab/commands/issue/issue.go:68 +0x1fa
github.com/lighttiger2505/lab/vendor/github.com/mitchellh/cli.(*CLI).Run(0xc4200ea500, 0xc42001de90, 0x8db2a8, 0x9)
        /home/travis/gopath/src/github.com/lighttiger2505/lab/vendor/github.com/mitchellh/cli/cli.go:255 +0x1eb
main.realMain(0x9268e0, 0xc42000c018, 0x9235ac, 0x6, 0x923910, 0x7, 0xc42002e0b8)
        /home/travis/gopath/src/github.com/lighttiger2505/lab/main.go:176 +0xf90
main.main()
        /home/travis/gopath/src/github.com/lighttiger2505/lab/main.go:39 +0x69

lab version: ver: v0.6.3 rev: 781b5e3

Thanks. The problem has been reproduced.


text:
Support workspace/didChangeWorkspaceConfiguration

Dropped spec that connect with initializationOptions.

Does workspace_config look like this when this PR is merged?
if executable('sqls')
    augroup LspSqls
        autocmd!
        autocmd User lsp_setup call lsp#register_server({
        \   'name': 'sqls',
        \   'cmd': {server_info->['sqls', '-log', 'sqls.log']},
        \   'whitelist': ['sql'],
        \   'workspace_config': {'settings': {
        \     'sqls': {
        \       'driver': 'mysql',
        \       'data_source_name': 'root:root@tcp(127.0.0.1:13306)/world',
        \     },
        \   }},
        \ })
    augroup END
endif

settings is created by vim-lsp. then:
if executable('sqls')
    augroup LspSqls
        autocmd!
        autocmd User lsp_setup call lsp#register_server({
        \   'name': 'sqls',
        \   'cmd': {server_info->['sqls', '-log', 'sqls.log']},
        \   'whitelist': ['sql'],
        \   'workspace_config': {
        \     'sqls': {
        \       'driver': 'mysql',
        \       'data_source_name': 'root:root@tcp(127.0.0.1:13306)/world',
        \     },
        \   },
        \ })
    augroup END
endif

Thank you. It worked.


text:
Reduce Apk Size

first of all ur app looks good. but the  apk size is more than expected.
as compared to other open source music players such as auxio, zen, symphony and many more out there.

Yeah idk why it's like that. Even with R8 enabled it's a bit big :shrug: but tbh who even cares about that when most phones have a so much storage.

repo: lighttigerXIV/SimpleMP-Compose


text:
Ammonite-REPL 0.4.3 startup fails with "MissingRequirementError" on Ubuntu 15.04 linux

First & most importantly, thank you for Ammonite.
Ammonite 0.3.2 has been working fine on my Ubuntu 15.04 linux
machine. The weekend came, so I tried to use the new standalone
Ammonite (amm) 0.4.3. When I run it, I get the fatal error:
scala.reflect.internal.MissingRequirementError: object java.lang.Object in compiler mirror not found.
I get the same with sbt when I update the dependencies, clean, & then run test:console.
I believe that I followed the documented instructions correctly. Forgive me if I missed
something obvious.
The only funny things about my machine are that I am using Java 8 (OpenJDK Server VM, Java 1.8.0_45-internal) & a custom linux 4.1.4 (BFQ patches).  scala 2.11.6 & 2.11.7 give the same
results (standalone ammonite probably has its own scala).
sbt is 0.13.8.
shell: GNU bash, version 4.3.30(1)-release (i686-pc-linux-gnu)
Issue #119 is similar, but that is Windows and is, I believe, fixed as well as it can be.
If you think this is an issue local to my machine, I would appreciate any hints on tracking
it down. If you need more traceback and/or environment information, I can supply it.
Thank you,
Lee

Can you provide a full shell session demonstrating this? It seems to work fine for me on my ubuntu 14.04 box:
haoyi-mbp:changes_dev haoyi$ ssh  ubuntu@www.scala-js-fiddle.com
Ubuntu 14.04.2 LTS
Saving password to keychain failed
Identity added: /Users/haoyi/.ssh/id_rsa (/Users/haoyi/.ssh/id_rsa)
Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-48-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Wed Aug  5 11:55:54 UTC 2015

  System load:  0.01              Processes:           102
  Usage of /:   18.3% of 7.74GB   Users logged in:     0
  Memory usage: 37%               IP address for eth0: 10.231.193.33
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

105 packages can be updated.
53 updates are security updates.

Last login: Wed Aug  5 11:55:55 2015 from 116.88.55.4
ubuntu@ip-10-231-193-33:~$ ls
amm  log  scala-js-fiddle
ubuntu@ip-10-231-193-33:~$ rm amm
ubuntu@ip-10-231-193-33:~$ rm -rf ~/.ammonite/
ubuntu@ip-10-231-193-33:~$  curl -L -o amm https://git.io/vOdoc; chmod +x amm; ./amm
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0   406    0     0   4114      0 --:--:-- --:--:-- --:--:--  4114
100 29.3M  100 29.3M    0     0  50.2M      0 --:--:-- --:--:-- --:--:-- 90.1M
Loading Ammonite Repl...
@ List(Seq(Seq("mgg", "mgg", "lols"), Seq("mgg", "mgg")), Seq(Seq("ggx", "ggx"),Seq("ggx", "ggx", "wt  fx")))
res0: List[Seq[Seq[String]]] = List(
  List(List("mgg", "mgg", "lols"), List("mgg", "mgg")),
  List(List("ggx", "ggx"), List("ggx", "ggx", "wtfx"))
)
@
@ Bye!
ubuntu@ip-10-231-193-33:~$ echo 'libraryDependencies += "com.lihaoyi" % "ammonite-repl" % "0.4.3" % "test" cross CrossVersion.full; initialCommands in (Test, console) := """ammonite.repl.Repl.run("")"""' > build.sbt
ubuntu@ip-10-231-193-33:~$ sbt test:console
Getting org.scala-sbt sbt 0.13.8 ...
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.8/jars/sbt.jar ...
	[SUCCESSFUL ] org.scala-sbt#sbt;0.13.8!sbt.jar (341ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/main/0.13.8/jars/main.jar ...
	[SUCCESSFUL ] org.scala-sbt#main;0.13.8!main.jar (590ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.8/jars/compiler-interface-bin.jar ...
	[SUCCESSFUL ] org.scala-sbt#compiler-interface;0.13.8!compiler-interface-bin.jar (353ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.8/jars/compiler-interface-src.jar ...
	[SUCCESSFUL ] org.scala-sbt#compiler-interface;0.13.8!compiler-interface-src.jar (358ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_8_2/0.13.8/jars/compiler-interface-bin.jar ...
	[SUCCESSFUL ] org.scala-sbt#precompiled-2_8_2;0.13.8!compiler-interface-bin.jar (351ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_9_2/0.13.8/jars/compiler-interface-bin.jar ...
	[SUCCESSFUL ] org.scala-sbt#precompiled-2_9_2;0.13.8!compiler-interface-bin.jar (359ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_9_3/0.13.8/jars/compiler-interface-bin.jar ...
	[SUCCESSFUL ] org.scala-sbt#precompiled-2_9_3;0.13.8!compiler-interface-bin.jar (702ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/actions/0.13.8/jars/actions.jar ...
	[SUCCESSFUL ] org.scala-sbt#actions;0.13.8!actions.jar (381ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/main-settings/0.13.8/jars/main-settings.jar ...
	[SUCCESSFUL ] org.scala-sbt#main-settings;0.13.8!main-settings.jar (357ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/interface/0.13.8/jars/interface.jar ...
	[SUCCESSFUL ] org.scala-sbt#interface;0.13.8!interface.jar (380ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/io/0.13.8/jars/io.jar ...
	[SUCCESSFUL ] org.scala-sbt#io;0.13.8!io.jar (388ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/ivy/0.13.8/jars/ivy.jar ...
	[SUCCESSFUL ] org.scala-sbt#ivy;0.13.8!ivy.jar (418ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/launcher-interface/0.13.8/jars/launcher-interface.jar ...
	[SUCCESSFUL ] org.scala-sbt#launcher-interface;0.13.8!launcher-interface.jar (293ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/logging/0.13.8/jars/logging.jar ...
	[SUCCESSFUL ] org.scala-sbt#logging;0.13.8!logging.jar (430ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/logic/0.13.8/jars/logic.jar ...
	[SUCCESSFUL ] org.scala-sbt#logic;0.13.8!logic.jar (317ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/process/0.13.8/jars/process.jar ...
	[SUCCESSFUL ] org.scala-sbt#process;0.13.8!process.jar (353ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/run/0.13.8/jars/run.jar ...
	[SUCCESSFUL ] org.scala-sbt#run;0.13.8!run.jar (318ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/command/0.13.8/jars/command.jar ...
	[SUCCESSFUL ] org.scala-sbt#command;0.13.8!command.jar (398ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/classpath/0.13.8/jars/classpath.jar ...
	[SUCCESSFUL ] org.scala-sbt#classpath;0.13.8!classpath.jar (405ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/completion/0.13.8/jars/completion.jar ...
	[SUCCESSFUL ] org.scala-sbt#completion;0.13.8!completion.jar (381ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/api/0.13.8/jars/api.jar ...
	[SUCCESSFUL ] org.scala-sbt#api;0.13.8!api.jar (371ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-integration/0.13.8/jars/compiler-integration.jar ...
	[SUCCESSFUL ] org.scala-sbt#compiler-integration;0.13.8!compiler-integration.jar (482ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-ivy-integration/0.13.8/jars/compiler-ivy-integration.jar ...
	[SUCCESSFUL ] org.scala-sbt#compiler-ivy-integration;0.13.8!compiler-ivy-integration.jar (275ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/relation/0.13.8/jars/relation.jar ...
	[SUCCESSFUL ] org.scala-sbt#relation;0.13.8!relation.jar (266ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/task-system/0.13.8/jars/task-system.jar ...
	[SUCCESSFUL ] org.scala-sbt#task-system;0.13.8!task-system.jar (352ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/tasks/0.13.8/jars/tasks.jar ...
	[SUCCESSFUL ] org.scala-sbt#tasks;0.13.8!tasks.jar (329ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/tracking/0.13.8/jars/tracking.jar ...
	[SUCCESSFUL ] org.scala-sbt#tracking;0.13.8!tracking.jar (300ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/testing/0.13.8/jars/testing.jar ...
	[SUCCESSFUL ] org.scala-sbt#testing;0.13.8!testing.jar (290ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/control/0.13.8/jars/control.jar ...
	[SUCCESSFUL ] org.scala-sbt#control;0.13.8!control.jar (260ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/collections/0.13.8/jars/collections.jar ...
	[SUCCESSFUL ] org.scala-sbt#collections;0.13.8!collections.jar (362ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/incremental-compiler/0.13.8/jars/incremental-compiler.jar ...
	[SUCCESSFUL ] org.scala-sbt#incremental-compiler;0.13.8!incremental-compiler.jar (359ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compile/0.13.8/jars/compile.jar ...
	[SUCCESSFUL ] org.scala-sbt#compile;0.13.8!compile.jar (357ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/persist/0.13.8/jars/persist.jar ...
	[SUCCESSFUL ] org.scala-sbt#persist;0.13.8!persist.jar (425ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/classfile/0.13.8/jars/classfile.jar ...
	[SUCCESSFUL ] org.scala-sbt#classfile;0.13.8!classfile.jar (343ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/cross/0.13.8/jars/cross.jar ...
	[SUCCESSFUL ] org.scala-sbt#cross;0.13.8!cross.jar (261ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/serialization_2.10/0.1.1/jars/serialization_2.10.jar ...
	[SUCCESSFUL ] org.scala-sbt#serialization_2.10;0.1.1!serialization_2.10.jar (406ms)
downloading https://repo1.maven.org/maven2/org/scala-lang/modules/scala-pickling_2.10/0.10.0/scala-pickling_2.10-0.10.0.jar ...
	[SUCCESSFUL ] org.scala-lang.modules#scala-pickling_2.10;0.10.0!scala-pickling_2.10.jar (46ms)
downloading https://repo1.maven.org/maven2/org/scalamacros/quasiquotes_2.10/2.0.1/quasiquotes_2.10-2.0.1.jar ...
	[SUCCESSFUL ] org.scalamacros#quasiquotes_2.10;2.0.1!quasiquotes_2.10.jar (42ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/cache/0.13.8/jars/cache.jar ...
	[SUCCESSFUL ] org.scala-sbt#cache;0.13.8!cache.jar (391ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/test-agent/0.13.8/jars/test-agent.jar ...
	[SUCCESSFUL ] org.scala-sbt#test-agent;0.13.8!test-agent.jar (263ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/apply-macro/0.13.8/jars/apply-macro.jar ...
	[SUCCESSFUL ] org.scala-sbt#apply-macro;0.13.8!apply-macro.jar (327ms)
:: retrieving :: org.scala-sbt#boot-app
	confs: [default]
	52 artifacts copied, 0 already retrieved (17674kB/155ms)
[info] Set current project to ubuntu (in build file:/home/ubuntu/)
[info] Updating {file:/home/ubuntu/}ubuntu...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] downloading https://repo1.maven.org/maven2/com/lihaoyi/ammonite-repl_2.10.4/0.4.3/ammonite-repl_2.10.4-0.4.3.jar ...
[info] 	[SUCCESSFUL ] com.lihaoyi#ammonite-repl_2.10.4;0.4.3!ammonite-repl_2.10.4.jar (77ms)
[info] downloading https://repo1.maven.org/maven2/com/lihaoyi/ammonite-terminal_2.10/0.4.3/ammonite-terminal_2.10-0.4.3.jar ...
[info] 	[SUCCESSFUL ] com.lihaoyi#ammonite-terminal_2.10;0.4.3!ammonite-terminal_2.10.jar (46ms)
[info] downloading https://repo1.maven.org/maven2/com/lihaoyi/ammonite-ops_2.10/0.4.3/ammonite-ops_2.10-0.4.3.jar ...
[info] 	[SUCCESSFUL ] com.lihaoyi#ammonite-ops_2.10;0.4.3!ammonite-ops_2.10.jar (41ms)
[info] downloading https://repo1.maven.org/maven2/org/scalamacros/quasiquotes_2.10/2.0.0/quasiquotes_2.10-2.0.0.jar ...
[info] 	[SUCCESSFUL ] org.scalamacros#quasiquotes_2.10;2.0.0!quasiquotes_2.10.jar (35ms)
[info] downloading https://repo1.maven.org/maven2/org/apache/ivy/ivy/2.4.0/ivy-2.4.0.jar ...
[info] 	[SUCCESSFUL ] org.apache.ivy#ivy;2.4.0!ivy.jar (87ms)
[info] downloading https://repo1.maven.org/maven2/com/lihaoyi/scalaparse_2.10/0.2.1/scalaparse_2.10-0.2.1.jar ...
[info] 	[SUCCESSFUL ] com.lihaoyi#scalaparse_2.10;0.2.1!scalaparse_2.10.jar (22ms)
[info] downloading https://repo1.maven.org/maven2/com/lihaoyi/upickle_2.10/0.3.5/upickle_2.10-0.3.5.jar ...
[info] 	[SUCCESSFUL ] com.lihaoyi#upickle_2.10;0.3.5!upickle_2.10.jar (49ms)
[info] downloading https://repo1.maven.org/maven2/com/lihaoyi/pprint_2.10/0.3.5/pprint_2.10-0.3.5.jar ...
[info] 	[SUCCESSFUL ] com.lihaoyi#pprint_2.10;0.3.5!pprint_2.10.jar (35ms)
[info] downloading https://repo1.maven.org/maven2/com/github/scopt/scopt_2.10/3.3.0/scopt_2.10-3.3.0.jar ...
[info] 	[SUCCESSFUL ] com.github.scopt#scopt_2.10;3.3.0!scopt_2.10.jar (70ms)
[info] downloading https://repo1.maven.org/maven2/com/lihaoyi/fastparse_2.10/0.2.1/fastparse_2.10-0.2.1.jar ...
[info] 	[SUCCESSFUL ] com.lihaoyi#fastparse_2.10;0.2.1!fastparse_2.10.jar (55ms)
[info] downloading https://repo1.maven.org/maven2/com/lihaoyi/fastparse-utils_2.10/0.2.1/fastparse-utils_2.10-0.2.1.jar ...
[info] 	[SUCCESSFUL ] com.lihaoyi#fastparse-utils_2.10;0.2.1!fastparse-utils_2.10.jar (32ms)
[info] downloading https://repo1.maven.org/maven2/com/lihaoyi/derive_2.10/0.3.5/derive_2.10-0.3.5.jar ...
[info] 	[SUCCESSFUL ] com.lihaoyi#derive_2.10;0.3.5!derive_2.10.jar (35ms)
[info] downloading https://repo1.maven.org/maven2/org/spire-math/jawn-parser_2.10/0.7.0/jawn-parser_2.10-0.7.0.jar ...
[info] 	[SUCCESSFUL ] org.spire-math#jawn-parser_2.10;0.7.0!jawn-parser_2.10.jar (11ms)
[info] Done updating.
[info] Starting scala interpreter...
[info]
Loading Ammonite Repl...
@ 1 + 1
res0: Int = 2
@

It might be a 15.04 vs 14.04 problem, but somehow I doubt it.. The distros aren't that different!

Thank you for the rapid response.  Let me get you the information which
I can gather before a family Sunday afternoon.  I hope  It might be useful.
This is from a Ubuntu 15.04 machine running the stock linux kernel.
The java version is 1.7 (vs. 1.8 in base note above).
As I discovered at the end of the session, there is no sbt on that
machine. I'll copy sbt down later and supply the rest of the requested
info.
I appreciate the help.
ssh localhost
Welcome to Ubuntu 15.04 (GNU/Linux 3.19.0-25-generic i686)

Documentation:  https://help.ubuntu.com/

Last login: Sun Aug  9 10:36:09 2015 from localhost
$ mkdir ammonite_debug
$ rm -rf ~/.ammonite
$ cat ~/.profile
If not running interactively, don't do anything
[ -z "$PS1" ] && return

PS1='$ '
EOF
$ printenv
XDG_SESSION_ID=4
TERM=xterm-256color
SHELL=/bin/bash
XDG_SESSION_COOKIE=
SSH_CLIENT=127.0.0.1
SSH_TTY=/dev/pts/4
USER=user1
MAIL=/var/mail/user1
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
PWD=/home/user1
LANG=en_US.UTF-8
SHLVL=1
HOME=/home/user1
LOGNAME=user1
SSH_CONNECTION=
XDG_RUNTIME_DIR=/run/user/
_=/usr/bin/printenv
$ javac -version
javac 1.7.0_79
$
$ curl -L -o amm https://git.io/vOdoc; chmod +x amm; ./amm
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   402    0   402    0     0    389      0 --:--:--  0:00:01 --:--:--   389
100 29.3M  100 29.3M    0     0  1198k      0  0:00:25  0:00:25 --:--:-- 1541k
Loading Ammonite Repl...
Exception in thread "main" scala.reflect.internal.MissingRequirementError: object java.lang.Object in compiler mirror not found.
at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:17)
at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:18)
at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:53)
at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:45)
at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:45)
at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:66)
at scala.reflect.internal.Mirrors$RootsBase.getClassByName(Mirrors.scala:102)
at scala.reflect.internal.Mirrors$RootsBase.getRequiredClass(Mirrors.scala:105)
at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass$lzycompute(Definitions.scala:257)
at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass(Definitions.scala:257)
at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1394)
at scala.tools.nsc.Global$Run.(Global.scala:1215)
at ammonite.repl.interp.Compiler$$anon$4.(Compiler.scala:142)
at ammonite.repl.interp.Compiler$.apply(Compiler.scala:120)
at ammonite.repl.interp.Interpreter.init(Interpreter.scala:225)
at ammonite.repl.interp.Interpreter.(Interpreter.scala:265)
at ammonite.repl.Repl.(Repl.scala:28)
at ammonite.repl.Repl$.repl$1(Repl.scala:138)
at ammonite.repl.Repl$.run(Repl.scala:146)
at ammonite.repl.Repl$$anonfun$main$1.apply(Repl.scala:130)
at ammonite.repl.Repl$$anonfun$main$1.apply(Repl.scala:130)
at scala.Option.foreach(Option.scala:257)
at ammonite.repl.Repl$.main(Repl.scala:130)
at ammonite.repl.Repl.main(Repl.scala)
$ mv ~/.ivy2 ~/dot_ivy2
$  echo 'libraryDependencies += "com.lihaoyi" % "ammonite-repl" % "0.4.3" % "test" cross CrossVersion.full; initialCommands in (Test, console) := """ammonite.repl.Repl.run("")"""' > build.sbt
$ sbt test:console
No command 'sbt' found, did you mean:
Command 'srt' from package 'python-pysrt' (universe)
Command 'sb' from package 'lrzsz' (universe)
Command 'mbt' from package 'mbt' (universe)
Command 'rbt' from package 'python-rbtools' (universe)
Command 'slt' from package 'slt' (universe)
Command 'sbmt' from package 'atfs' (universe)
Command 'sb2' from package 'scratchbox2' (universe)
Command 'lbt' from package 'lbt' (universe)
Command 'sat' from package 'sat-xmpp-core' (universe)
sbt: command not found
$ logout
Connection to localhost closed.

Here is the log using Paul P.'s sbt script.  The plain vanilla build.sbt gives
scala 2.10.4.
I suspect the issue is Java 7 & 8. For grins, I may install Java 6 and
see what happens.
If it would be useful, I could probably create a stock Ubuntu 14.04.?
LXC container or Virtualbox virtual machine and see what happens.
At least the light & coffee holder on my machine work ;-)
Thank you for your help.
Welcome to Ubuntu 15.04 (GNU/Linux 3.19.0-25-generic i686)

Documentation:  https://help.ubuntu.com/

Last login: Sun Aug  9 19:12:46 2015 from localhost
$ cd ammonite_debug/
$ ls -l
total 4
-rw-rw-r-- 1 lee49 lee49 170 Aug  9 10:46 build.sbt
$ cat build.sbt
libraryDependencies += "com.lihaoyi" % "ammonite-repl" % "0.4.3" % "test" cross CrossVersion.full; initialCommands in (Test, console) := """ammonite.repl.Repl.run("")"""
$ rm -rf ~/.ammonite
$ ~/bin/sbt test:console
Downloading sbt launcher for 0.13.8:
From  http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.8/sbt-launch.jar
To  /home/lee49/.sbt/launchers/0.13.8/sbt-launch.jar
OpenJDK Client VM warning: TieredCompilation is disabled in this release.
Getting org.scala-sbt sbt 0.13.8 ...
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_8_2/0.13.8/jars/compiler-interface-bin.jar ...
[SUCCESSFUL ] org.scala-sbt#precompiled-2_8_2;0.13.8!compiler-interface-bin.jar (5043ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_9_2/0.13.8/jars/compiler-interface-bin.jar ...
[SUCCESSFUL ] org.scala-sbt#precompiled-2_9_2;0.13.8!compiler-interface-bin.jar (1927ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_9_3/0.13.8/jars/compiler-interface-bin.jar ...
[SUCCESSFUL ] org.scala-sbt#precompiled-2_9_3;0.13.8!compiler-interface-bin.jar (1792ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/actions/0.13.8/jars/actions.jar ...
[SUCCESSFUL ] org.scala-sbt#actions;0.13.8!actions.jar (1645ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/main-settings/0.13.8/jars/main-settings.jar ...
[SUCCESSFUL ] org.scala-sbt#main-settings;0.13.8!main-settings.jar (1669ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/interface/0.13.8/jars/interface.jar ...
[SUCCESSFUL ] org.scala-sbt#interface;0.13.8!interface.jar (1522ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/io/0.13.8/jars/io.jar ...
[SUCCESSFUL ] org.scala-sbt#io;0.13.8!io.jar (1717ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/ivy/0.13.8/jars/ivy.jar ...
[SUCCESSFUL ] org.scala-sbt#ivy;0.13.8!ivy.jar (3034ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/launcher-interface/0.13.8/jars/launcher-interface.jar ...
[SUCCESSFUL ] org.scala-sbt#launcher-interface;0.13.8!launcher-interface.jar (1350ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/logging/0.13.8/jars/logging.jar ...
[SUCCESSFUL ] org.scala-sbt#logging;0.13.8!logging.jar (1403ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/logic/0.13.8/jars/logic.jar ...
[SUCCESSFUL ] org.scala-sbt#logic;0.13.8!logic.jar (1503ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/process/0.13.8/jars/process.jar ...
[SUCCESSFUL ] org.scala-sbt#process;0.13.8!process.jar (1779ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/run/0.13.8/jars/run.jar ...
[SUCCESSFUL ] org.scala-sbt#run;0.13.8!run.jar (1403ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/command/0.13.8/jars/command.jar ...
[SUCCESSFUL ] org.scala-sbt#command;0.13.8!command.jar (1679ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/classpath/0.13.8/jars/classpath.jar ...
[SUCCESSFUL ] org.scala-sbt#classpath;0.13.8!classpath.jar (1418ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/completion/0.13.8/jars/completion.jar ...
[SUCCESSFUL ] org.scala-sbt#completion;0.13.8!completion.jar (1854ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/api/0.13.8/jars/api.jar ...
[SUCCESSFUL ] org.scala-sbt#api;0.13.8!api.jar (2283ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-integration/0.13.8/jars/compiler-integration.jar ...
[SUCCESSFUL ] org.scala-sbt#compiler-integration;0.13.8!compiler-integration.jar (1322ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-ivy-integration/0.13.8/jars/compiler-ivy-integration.jar ...
[SUCCESSFUL ] org.scala-sbt#compiler-ivy-integration;0.13.8!compiler-ivy-integration.jar (1185ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/relation/0.13.8/jars/relation.jar ...
[SUCCESSFUL ] org.scala-sbt#relation;0.13.8!relation.jar (1283ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/task-system/0.13.8/jars/task-system.jar ...
[SUCCESSFUL ] org.scala-sbt#task-system;0.13.8!task-system.jar (1687ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/tasks/0.13.8/jars/tasks.jar ...
[SUCCESSFUL ] org.scala-sbt#tasks;0.13.8!tasks.jar (1592ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/tracking/0.13.8/jars/tracking.jar ...
[SUCCESSFUL ] org.scala-sbt#tracking;0.13.8!tracking.jar (1263ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/testing/0.13.8/jars/testing.jar ...
[SUCCESSFUL ] org.scala-sbt#testing;0.13.8!testing.jar (1349ms)
downloading https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.10.4/scala-compiler-2.10.4.jar ...
[SUCCESSFUL ] org.scala-lang#scala-compiler;2.10.4!scala-compiler.jar (12587ms)
downloading https://repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.10.4/scala-reflect-2.10.4.jar ...
[SUCCESSFUL ] org.scala-lang#scala-reflect;2.10.4!scala-reflect.jar (3432ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/control/0.13.8/jars/control.jar ...
[SUCCESSFUL ] org.scala-sbt#control;0.13.8!control.jar (1135ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/collections/0.13.8/jars/collections.jar ...
[SUCCESSFUL ] org.scala-sbt#collections;0.13.8!collections.jar (2526ms)
downloading https://repo1.maven.org/maven2/jline/jline/2.11/jline-2.11.jar ...
[SUCCESSFUL ] jline#jline;2.11!jline.jar (768ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/incremental-compiler/0.13.8/jars/incremental-compiler.jar ...
[SUCCESSFUL ] org.scala-sbt#incremental-compiler;0.13.8!incremental-compiler.jar (1729ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compile/0.13.8/jars/compile.jar ...
[SUCCESSFUL ] org.scala-sbt#compile;0.13.8!compile.jar (1444ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/persist/0.13.8/jars/persist.jar ...
[SUCCESSFUL ] org.scala-sbt#persist;0.13.8!persist.jar (1746ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/classfile/0.13.8/jars/classfile.jar ...
[SUCCESSFUL ] org.scala-sbt#classfile;0.13.8!classfile.jar (1485ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-tools.sbinary/sbinary_2.10/0.4.2/jars/sbinary_2.10.jar ...
[SUCCESSFUL ] org.scala-tools.sbinary#sbinary_2.10;0.4.2!sbinary_2.10.jar (1635ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/cross/0.13.8/jars/cross.jar ...
[SUCCESSFUL ] org.scala-sbt#cross;0.13.8!cross.jar (1109ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt.ivy/ivy/2.3.0-sbt-fccfbd44c9f64523b61398a0155784dcbaeae28f/jars/ivy.jar ...
[SUCCESSFUL ] org.scala-sbt.ivy#ivy;2.3.0-sbt-fccfbd44c9f64523b61398a0155784dcbaeae28f!ivy.jar (3312ms)
downloading https://repo1.maven.org/maven2/com/jcraft/jsch/0.1.46/jsch-0.1.46.jar ...
[SUCCESSFUL ] com.jcraft#jsch;0.1.46!jsch.jar (1096ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/serialization_2.10/0.1.1/jars/serialization_2.10.jar ...
[SUCCESSFUL ] org.scala-sbt#serialization_2.10;0.1.1!serialization_2.10.jar (1872ms)
downloading https://repo1.maven.org/maven2/org/scala-lang/modules/scala-pickling_2.10/0.10.0/scala-pickling_2.10-0.10.0.jar ...
[SUCCESSFUL ] org.scala-lang.modules#scala-pickling_2.10;0.10.0!scala-pickling_2.10.jar (1186ms)
downloading https://repo1.maven.org/maven2/org/json4s/json4s-core_2.10/3.2.10/json4s-core_2.10-3.2.10.jar ...
[SUCCESSFUL ] org.json4s#json4s-core_2.10;3.2.10!json4s-core_2.10.jar (1007ms)
downloading https://repo1.maven.org/maven2/org/spire-math/jawn-parser_2.10/0.6.0/jawn-parser_2.10-0.6.0.jar ...
[SUCCESSFUL ] org.spire-math#jawn-parser_2.10;0.6.0!jawn-parser_2.10.jar (581ms)
downloading https://repo1.maven.org/maven2/org/spire-math/json4s-support_2.10/0.6.0/json4s-support_2.10-0.6.0.jar ...
[SUCCESSFUL ] org.spire-math#json4s-support_2.10;0.6.0!json4s-support_2.10.jar (390ms)
downloading https://repo1.maven.org/maven2/org/scalamacros/quasiquotes_2.10/2.0.1/quasiquotes_2.10-2.0.1.jar ...
[SUCCESSFUL ] org.scalamacros#quasiquotes_2.10;2.0.1!quasiquotes_2.10.jar (953ms)
downloading https://repo1.maven.org/maven2/org/json4s/json4s-ast_2.10/3.2.10/json4s-ast_2.10-3.2.10.jar ...
[SUCCESSFUL ] org.json4s#json4s-ast_2.10;3.2.10!json4s-ast_2.10.jar (461ms)
downloading https://repo1.maven.org/maven2/com/thoughtworks/paranamer/paranamer/2.6/paranamer-2.6.jar ...
[SUCCESSFUL ] com.thoughtworks.paranamer#paranamer;2.6!paranamer.jar (589ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/cache/0.13.8/jars/cache.jar ...
[SUCCESSFUL ] org.scala-sbt#cache;0.13.8!cache.jar (1775ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/test-agent/0.13.8/jars/test-agent.jar ...
[SUCCESSFUL ] org.scala-sbt#test-agent;0.13.8!test-agent.jar (1209ms)
downloading https://repo1.maven.org/maven2/org/scala-sbt/test-interface/1.0/test-interface-1.0.jar ...
[SUCCESSFUL ] org.scala-sbt#test-interface;1.0!test-interface.jar (529ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/apply-macro/0.13.8/jars/apply-macro.jar ...
[SUCCESSFUL ] org.scala-sbt#apply-macro;0.13.8!apply-macro.jar (1616ms)
:: retrieving :: org.scala-sbt#boot-app
confs: [default]
52 artifacts copied, 0 already retrieved (17674kB/4804ms)
Getting Scala 2.10.4 (for sbt)...
downloading https://repo1.maven.org/maven2/org/scala-lang/jline/2.10.4/jline-2.10.4.jar ...
[SUCCESSFUL ] org.scala-lang#jline;2.10.4!jline.jar (742ms)
downloading https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.4/jansi-1.4.jar ...
[SUCCESSFUL ] org.fusesource.jansi#jansi;1.4!jansi.jar (1165ms)
:: retrieving :: org.scala-sbt#boot-scala
confs: [default]
5 artifacts copied, 0 already retrieved (24459kB/4877ms)
[info] Set current project to ammonite_debug (in build file:/home/lee49/ammonite_debug/)
[info] Updating {file:/home/lee49/ammonite_debug/}ammonite_debug...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] downloading https://repo1.maven.org/maven2/com/lihaoyi/ammonite-repl_2.10.4/0.4.3/ammonite-repl_2.10.4-0.4.3.jar ...
[info] 	[SUCCESSFUL ] com.lihaoyi#ammonite-repl_2.10.4;0.4.3!ammonite-repl_2.10.4.jar (941ms)
[info] downloading https://repo1.maven.org/maven2/com/lihaoyi/ammonite-terminal_2.10/0.4.3/ammonite-terminal_2.10-0.4.3.jar ...
[info] 	[SUCCESSFUL ] com.lihaoyi#ammonite-terminal_2.10;0.4.3!ammonite-terminal_2.10.jar (449ms)
[info] downloading https://repo1.maven.org/maven2/com/lihaoyi/ammonite-ops_2.10/0.4.3/ammonite-ops_2.10-0.4.3.jar ...
[info] 	[SUCCESSFUL ] com.lihaoyi#ammonite-ops_2.10;0.4.3!ammonite-ops_2.10.jar (652ms)
[info] downloading https://repo1.maven.org/maven2/org/scalamacros/quasiquotes_2.10/2.0.0/quasiquotes_2.10-2.0.0.jar ...
[info] 	[SUCCESSFUL ] org.scalamacros#quasiquotes_2.10;2.0.0!quasiquotes_2.10.jar (1439ms)
[info] downloading https://repo1.maven.org/maven2/jline/jline/2.12/jline-2.12.jar ...
[info] 	[SUCCESSFUL ] jline#jline;2.12!jline.jar (675ms)
[info] downloading https://repo1.maven.org/maven2/org/apache/ivy/ivy/2.4.0/ivy-2.4.0.jar ...
[info] 	[SUCCESSFUL ] org.apache.ivy#ivy;2.4.0!ivy.jar (1809ms)
[info] downloading https://repo1.maven.org/maven2/com/lihaoyi/scalaparse_2.10/0.2.1/scalaparse_2.10-0.2.1.jar ...
[info] 	[SUCCESSFUL ] com.lihaoyi#scalaparse_2.10;0.2.1!scalaparse_2.10.jar (705ms)
[info] downloading https://repo1.maven.org/maven2/com/lihaoyi/upickle_2.10/0.3.5/upickle_2.10-0.3.5.jar ...
[info] 	[SUCCESSFUL ] com.lihaoyi#upickle_2.10;0.3.5!upickle_2.10.jar (1518ms)
[info] downloading https://repo1.maven.org/maven2/com/lihaoyi/pprint_2.10/0.3.5/pprint_2.10-0.3.5.jar ...
[info] 	[SUCCESSFUL ] com.lihaoyi#pprint_2.10;0.3.5!pprint_2.10.jar (597ms)
[info] downloading https://repo1.maven.org/maven2/com/github/scopt/scopt_2.10/3.3.0/scopt_2.10-3.3.0.jar ...
[info] 	[SUCCESSFUL ] com.github.scopt#scopt_2.10;3.3.0!scopt_2.10.jar (424ms)
[info] downloading https://repo1.maven.org/maven2/com/lihaoyi/fastparse_2.10/0.2.1/fastparse_2.10-0.2.1.jar ...
[info] 	[SUCCESSFUL ] com.lihaoyi#fastparse_2.10;0.2.1!fastparse_2.10.jar (626ms)
[info] downloading https://repo1.maven.org/maven2/com/lihaoyi/fastparse-utils_2.10/0.2.1/fastparse-utils_2.10-0.2.1.jar ...
[info] 	[SUCCESSFUL ] com.lihaoyi#fastparse-utils_2.10;0.2.1!fastparse-utils_2.10.jar (332ms)
[info] downloading https://repo1.maven.org/maven2/com/lihaoyi/derive_2.10/0.3.5/derive_2.10-0.3.5.jar ...
[info] 	[SUCCESSFUL ] com.lihaoyi#derive_2.10;0.3.5!derive_2.10.jar (547ms)
[info] downloading https://repo1.maven.org/maven2/org/spire-math/jawn-parser_2.10/0.7.0/jawn-parser_2.10-0.7.0.jar ...
[info] 	[SUCCESSFUL ] org.spire-math#jawn-parser_2.10;0.7.0!jawn-parser_2.10.jar (870ms)
[info] Done updating.
[info] Starting scala interpreter...
[info]
Loading Ammonite Repl...
scala.reflect.internal.MissingRequirementError: object scala.runtime in compiler mirror not found.
at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:16)
at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:17)
at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:48)
at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:40)
at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:61)
at scala.reflect.internal.Mirrors$RootsBase.getPackage(Mirrors.scala:172)
at scala.reflect.internal.Mirrors$RootsBase.getRequiredPackage(Mirrors.scala:175)
at scala.reflect.internal.Definitions$DefinitionsClass.RuntimePackage$lzycompute(Definitions.scala:183)
at scala.reflect.internal.Definitions$DefinitionsClass.RuntimePackage(Definitions.scala:183)
at scala.reflect.internal.Definitions$DefinitionsClass.RuntimePackageClass$lzycompute(Definitions.scala:184)
at scala.reflect.internal.Definitions$DefinitionsClass.RuntimePackageClass(Definitions.scala:184)
at scala.reflect.internal.Definitions$DefinitionsClass.AnnotationDefaultAttr$lzycompute(Definitions.scala:1024)
at scala.reflect.internal.Definitions$DefinitionsClass.AnnotationDefaultAttr(Definitions.scala:1023)
at scala.reflect.internal.Definitions$DefinitionsClass.syntheticCoreClasses$lzycompute(Definitions.scala:1153)
at scala.reflect.internal.Definitions$DefinitionsClass.syntheticCoreClasses(Definitions.scala:1152)
at scala.reflect.internal.Definitions$DefinitionsClass.symbolsNotPresentInBytecode$lzycompute(Definitions.scala:1196)
at scala.reflect.internal.Definitions$DefinitionsClass.symbolsNotPresentInBytecode(Definitions.scala:1196)
at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1261)
at scala.tools.nsc.Global$Run.(Global.scala:1290)
at ammonite.repl.interp.Compiler$$anon$4.(Compiler.scala:142)
at ammonite.repl.interp.Compiler$.apply(Compiler.scala:120)
at ammonite.repl.interp.Interpreter.init(Interpreter.scala:225)
at ammonite.repl.interp.Interpreter.(Interpreter.scala:265)
at ammonite.repl.Repl.(Repl.scala:28)
at ammonite.repl.Repl$.repl$1(Repl.scala:138)
at ammonite.repl.Repl$.run(Repl.scala:146)
at .(:8)
at .()
at .(:7)
at .()
at $print()
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:734)
at scala.tools.nsc.interpreter.IMain$Request.loadAndRun(IMain.scala:983)
at scala.tools.nsc.interpreter.IMain.loadAndRunReq$1(IMain.scala:573)
at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:604)
at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:568)
at xsbt.ConsoleInterface$$anon$1.createInterpreter(ConsoleInterface.scala:54)
at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:839)
at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:837)
at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:837)
at scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:135)
at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:837)
at scala.tools.nsc.interpreter.ILoop.main(ILoop.scala:904)
at xsbt.ConsoleInterface.run(ConsoleInterface.scala:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:101)
at sbt.compiler.AnalyzingCompiler.console(AnalyzingCompiler.scala:76)
at sbt.Console.sbt$Console$$console0$1(Console.scala:22)
at sbt.Console$$anonfun$apply$2$$anonfun$apply$1.apply$mcV$sp(Console.scala:23)
at sbt.Console$$anonfun$apply$2$$anonfun$apply$1.apply(Console.scala:23)
at sbt.Console$$anonfun$apply$2$$anonfun$apply$1.apply(Console.scala:23)
at sbt.Logger$$anon$4.apply(Logger.scala:85)
at sbt.TrapExit$App.run(TrapExit.scala:248)
at java.lang.Thread.run(Thread.java:745)
Welcome to Scala version 2.10.4 (OpenJDK Client VM, Java 1.7.0_79).
Type in expressions to have them evaluated.
Type :help for more information.
scala>
[success] Total time: 54 s, completed Aug 9, 2015 7:44:08 PM
$

I suspect the issue is Java 7 & 8. For grins, I may install Java 6 and
see what happens.

6 won't work, I use a bunch of java.nio stuff =)

If it would be useful, I could probably create a stock Ubuntu 14.04.?
LXC container or Virtualbox virtual machine and see what happens.

Running standalone amm in an LXD linux container running Ubuntu Trusty (14.04) gives the
same "Object not found in mirror' error.  Rats!
root@trusty-ammX1:~# java -version
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.14.04.1)
OpenJDK Client VM (build 24.79-b02, mixed mode, sharing)

I can try creating a VirtualBox Trusty machine by the light of day. That might
give a cleaner environment. Creating such a virtual machine takes quite
a while, because everything is emulated on a slow machine.
My current hypotheses are either:

A 32 bit vs 64 bit  issue. One of the first rules of software engineering is to blame the hardware ;-)

From looking at & around line 142 in Compiler.scala & knowing little about
compiler internals: a classpath (jcp) issue.  To the best of my knowledge, nothing in my bash
environment sets a classpath for the standalone amm. If I remember
correctly, the sbt script does set a classpath before invoking scala.

I may have made some progress.  By making three changes, I have the ammonite mostly
working with the project tests (which made debugging/thrashing way easier, thank you!)
The ammonite repl starts up and gives the test results:
[info] Tests: 153
[info] Passed: 130
[info] Failed: 23
[error] Failed tests:
[error] 	ammonite.repl.ProjectTests
[error] 	ammonite.repl.AutocompleteTests
[error] 	ammonite.repl.AdvancedTests
[error] 	ammonite.repl.ScriptTests
[error] (ops/test:test) sbt.TestsFailedException: Tests unsuccessful

Not a clean pass, but better than before.
The changes fall into two groups:
Following the January, 2015 answer at URL:
http://stackoverflow.com/questions/27934282/object-scala-in-compiler-mirror-not-found-running-scala-compiler-programatical, I added two lines to Compiler.scala
  trait Probe // DEBUG: added  by Lee Tibbert
  object Compiler { //  continue with original code

and
 settings.embeddedDefaults[Probe] // DEBUG: added by Lee Tibbert
 val scalac = new nsc.Global(settings, reporter) { g =>  // continue with original code

I feign no hypotheses as to what this magic does....
The second change was to comment out the setting of the classpath to jcp
//          override def classPath = jcp     // Commented out by Lee Tibbert

When I print out the jcp, the last entry appears as ?, which looks suspicious/broken.
When I print out the platform.classPath, the last entry appears as . (current directory).
I am operating from guesswork & looks here, rather than knowledge, but the latter looks
more appropriate (and allows the compiler object to be found.
I hope this helps. I am not trying to push the river here. Things that I do not
understand haunt me.  I am enjoying learning about ammonite & scalac internals here.
Lee

FYI:
SBT FAQ gives
a brief description of what settings.embeddedDefaults does. It links to a
5 year old original proposal gist by
Mark Harrah.  Basically, embeddedDefaults manipulates the classpath
to be the same(?) as the currently running code. That may or
may not be the design intent for Ammonite.... From the proposal (not
source)
The proposed approach is for the managed environment to put two resources on the

classpath: 'app.class.path' and 'boot.class.path'.
I have not tracked down the source code. Neither have I tried
putting printfs before & after the use of embeddedDefaults.
I think I may try to track down documentation for reflection
& VirtualDirectory.  Ammonite's use of VirtualDirectory("(memory)",  None)
for embeddedClasspath is clearly intentional & I would like to understand it.

Same for me on Ubuntu 14.04.

Here's a bit more info about the environment:
> java -version
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.14.04.1)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)

Though running on an oracle JVM works:
> /usr/lib/jvm/java-7-oracle/bin/java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

> /usr/lib/jvm/java-7-oracle/bin/java -jar amm
Loading...
Welcome to the Ammonite Repl 0.4.4
(Scala version 2.11.7 Java 1.7.0_80)

Are you all getting the error with 0.4.2? A line related to that was changed in 0.4.3 (to my instigation).

I am getting this error as well on Ubuntu 15.04 for ammonite versions 0.4.4 and 0.4.2
jvm:
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.15.04.1)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)

It works without errors with the oracle jvm:
java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)

If it's borked for people in 0.4.4 it's probably not @alexarchambault's change.
"Works on oracle, not on openJDK" sounds like a good lead. Anyone want to help dive in and debug? =D

I though it was useless put both oraclejdk7 and openjdk7 in one's .travis.yml... Looks like it's not :-)

While initializing the compiler shows this error message (which doesn't get shown for some reason):
error while loading , Error accessing /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/libatk-wrapper.so

That's because ammonite discovers and picks up this entry from the Java classpath and provides it to the scala compiler as a jar dependency.

PR in #161.

Btw. when debugging it helps to provide a more eloquent logger than the default which is defined like this:
var logger: String => Unit = s => ()

authors: LeeTibbert alexarchambault homburg jrudolph lihaoyi

repo: lihaoyi/Ammonite


text:
关于rem的问题，在iphone5和iphone6上html的font-size都是设置的为20px。

由于jquery-weui设置了html的font-size，而且也用到了rem，我不知道我能否更改这个设置值。
为什么想要更改呢？因为在iphone5和iphone6上html的font-size都是设置的为20px，我就没法用rem来控制元素宽度了。

rem是用来进行整页缩放的。如果和你的要求有冲突的话，建议把你的rem规则改成和jqweui一样，不然确实很难办。

@lihongxun945 我是采用类似淘宝的做法，通过屏幕宽度 / 格子数 来设置html的font-size，实现页面其他部分的等比缩放。
请问在使用jquery-weui的场景下，要满足我这个需求，有什么好的方式推荐么？
Tks~

后来思考了下，没必要做全站rem缩放，在一个区间用固定的rem值也是可以接受的。

哈喽，上面说的“建议把你的rem规则改成和jqweui一样”这句话，jqweui的适配规则是什么，能稍微解释一下么？我在源码中看见的是400-480范围内的html字体大小的变化，这个字体大小设置是怎么出来的？如果我是640px的应该怎么做呢？因为我们的设计师一般提供的设计图尺寸是640。还请稍微解释一下，非常感谢 @lihongxun945

authors: Huooo hstarorg lihongxun945


text:
Shrinking the terminal removes upper rows

When the terminal is enlarged blank space is added below the buffered row. However, when the terminal is shrunk, this blank space is not removed but rather the buffered rows starting at the top.
Compare this behavior with the behavior of xterm:
Actual (godot-xterm):

Expected (xterm):

This can causes issues when the Terminal is placed inside a TabContainer as it is actually resized (enlarged by two rows and then shrunk back to the original size) when switching tabs, which results in the output being hidden:

Interestingly, urxvt terminal exhibits similar behavior but removes the lower rows first. So, perhaps it is not a bug per se, but rather a behavior that needs to be configured or accounted for:

Somewhere along the way this started working as expected, so this issue can be closed.

repo: lihop/godot-xterm