Comments (2)
This problem (forcing me to turn off Orchil's local echo) is a candidate for @noahgibbs to work on next week. I'm fairly sure it can be solved in Orchil (say for instance) but if it is an interaction with SkotOS Noah has the skills to figure it out there too.
from orchil.
I had originally thought this was just reversing lines of text, and so it was (perhaps) a race condition. But it turns out it's more interesting than that.
For instance: repeatedly type "clientpref local_echo on" to get five or six lines of "The client preference 'local_echo' is already set to 'on'." Look up above them: there's a prompt (the greater-than sign.)
Now, type "look." The words "You look around" will appear above all the "client preference" output lines, next to the prompt. After that it will figure out that it's supposed to be putting the output lower down, and it will start outputting lines in the right place.
=======
This problem is pretty clearly in Orchil, not in the interaction with the websocket tunnel. That's good! Problems at the border between two different pieces of software are hard.
=======
There is a currentSubElements array, as Orchil figures out where it should currently be printing to. It's basically a stack of open tags (imagine being midway through printing bold+italic entry inside a table.) The more "raw" output modes (printScreened/printUnscreened) interact with it a bit as they figure out where to create Line elements in the browser's DOM using newLineElement().
=====
Pretty sure the problem is the prompt. It's keeping the old prompt around as a printable line in currentSubElements even after printing more lines. But I'm having trouble telling where/how the prompt line gets created.
=====
You can see where the error will happen by examining currentSubElements in the JS console. If you're at the prompt, it contains a single div. You can stick in an identifying chunk of text to verify which div:
currentSubElements[0].innerText += "(yo)"
Now print a couple of 'raw' lines by entering this text in the Gables input area a few times:
clientpref local_echo on
Now check currentSubElements again. There's only one div - the same one it added "(yo)" to. And that's where it's going to print when it can print again. And that's the bug we're seeing.
One good possible solution could be if Orchil figured out we'd printed past the old prompt ("> ") and added a new one. I'll keep looking at it. Once I figure out how the prompt happens, the solution may be obvious.
from orchil.
Related Issues (14)
- Question: Minified js/css HOT 1
- Gamewide Config Files Would Be a Nice Improvement HOT 2
- Orchil converts colour hex to a quartet HOT 20
- Links include double-escaped characters HOT 1
- A Request for Functional MACROs HOT 4
- Former Skotos Links and Map Arrows Broken HOT 14
- Orchil doesn't set background colour, link colour, etc. from SkotOS server-side colour theme HOT 13
- Have Orchil default to dark colour theme by default HOT 1
- Suggestion: Autologging for Orchil HOT 11
- Broken map links. HOT 2
- Text entry field is not themed HOT 1
- Orchil seems to strip characters with diacritics instead of just the diacritic. HOT 2
- @macro command conflicts with TEC's @macro command HOT 2
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 orchil.