Comments (14)
I'm guessing the issue to be with the readline part, I changed the color library to "github.com/grookit/color" and managed to fix those ANSI escape characters printing out... but when the readline part starts the problems persists, and the background changes.
And I tried running readline separately and still the issue persisted even on a new project. so I'm guessing the issue is with the readline (we might need to configure it because they did mention it works on PowerShell)... ill look more into it till then
from alda.
Am I allowed to use a different library instead of readline?
from alda.
from alda.
That's interesting! I thought that Powershell supported ANSI escape sequences. I found this article, for example. It looks like that's new in Powershell 7, though, and I'm not sure if the library for colored text that we're using in Alda is smart enough to recognize that environment and emit the right escape codes.
Alda does support the standard NO_COLOR
environment variable, so you can remove those ANSI escape sequences by setting NO_COLOR
to anything (e.g. NO_COLOR=true
) in your environment variables. Can you give that a try?
from alda.
Seems like it gets rid of the ←[0m
like markings, but it doesn't get rid of the black recolouring of the screen...
from alda.
I don't know of anything that we're doing in Alda that would behave differently there than other programs. Are there color theme settings that you can change, such that you can set them to the same color, e.g. black?
from alda.
I mean, blue is the default colour of PowerShell... Seems odd that it should overwrite the colour in this way
from alda.
Do other programs behave this way in PowerShell, too?
from alda.
Not that I know of. Alda 1 doesn't have this problem.
from alda.
That's interesting! I wonder if this might be a peculiarity of Go.
alda-player
isn't written in Go. Can you try running alda-player info
and tell me if it has the same problem?
from alda.
I wonder if this might be a peculiarity of Go.
Not sure. Running alda-player info
and even alda --help
don't seem to cause the same problem. Only with the repl it seems...
from alda.
OK, interesting.
My suspicion is that one of the Go libraries that we're using in the client is doing something strange. I don't have much bandwidth to devote to looking into this, but if a contributor felt like tackling this (or at least investigating further), it would be very much appreciated!
from alda.
Hi, I'd be willing to look into this!
from alda.
I answered you on Slack already, but for visibility here:
- Changing libraries is definitely an option.
- Changing the
log.SetOutput(...)
part could be an issue. I think I added that part to make sure that log messages don't interfere with inputting lines in the REPL. So whatever library we switch to, we should just make sure that log messages don't interfere with the REPL experience. - If you could make a PR, I'll be happy to test on Linux!
from alda.
Related Issues (20)
- player processes get stuck HOT 14
- How to make Pedal On and Off in Alda HOT 4
- Can't Create Chord with Cram Expression HOT 6
- Alda REPL: "Play right away" offset calculation doesn't work with voices HOT 1
- Alda REPL server sometimes "claims" more than 1 player on startup
- Exiting Alda REPL in "server only" mode kills all player processes
- Alda REPL "skips" rests at the end of a line
- open /tmp/alda-doctor1917232005/1666820313.mid: no such file or directory HOT 6
- Are there any PORTABLE version of alda that can run without java? HOT 1
- Time to play is too long HOT 15
- can I see debug messages while the player is running? HOT 4
- `pitch` behavior changed from Alda 1 to Alda 2 HOT 4
- Lisp function `part` got deleted in Alda 2 HOT 1
- No way to download Alda 2 HOT 4
- `exec java` resolving to the wrong path HOT 4
- cannot run alda HOT 3
- No Sound HOT 5
- client/parser/scanner.go: invalid rune quoting HOT 9
- Can i generate an mp3 with my code? HOT 3
- [BUG] MIDI failure in JVM on fresh install cause alda and alda-player to both fail HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alda.