GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Include text editor with standard distribution · Issue #66 · NodeOS/NodeOS

Include text editor with standard distribution #66

New issue
Copy link
New issue
Copy link
Closed
Closed
Include text editor with standard distribution#66
Copy link
Milestone
1.0.0

Description

@dbkaplun
dbkaplun
opened on Sep 16, 2014
Issue body actions

I think it would be a great idea if NodeOS came with a text editor. That would be one small but important step to having a fully functional, self-contained operating system. @groundwater and I spoke in #node-os on Freenode and he approves. There are two written in NodeJS that I know about: hipster, and slap. Full disclosure, I am the author of slap, so I am biased, but I strongly believe every OS should at least have a text editor. :)

Activity

  1. groundwater commented on Sep 16, 2014

    @groundwater
    groundwater
    on Sep 16, 2014
    Contributor
    More actions

    I love this idea. We should test out how well slap works on a nodeos instance.

  2. piranna commented on Sep 16, 2014

    @piranna
    piranna
    on Sep 16, 2014
    Member
    More actions

    "first-class mouse support"... I would love to see this on NodeOS :-) @Beardtree how did you achieved it? I have been reading on the topic and seems there's some dark ansi codes to manage mouse position and buttons, isn't it? How do you get the mouse events, using gdm? We should then to implement something similar (or use gdm itself until a Jascript-pure implementation is available...).

    I like the idea of having a text editor, it fully makes sense. Only point I hope we don't end with simple vs full-featured, vim vs emacs, hipster vs slap flame-wars here on NodeOS... :-P

  3. piranna
    added
    ready
    on Sep 16, 2014
  4. dbkaplun commented on Sep 16, 2014

    @dbkaplun
    dbkaplun
    on Sep 16, 2014
    Author
    More actions

    I can confirm that it works great! Steps to reproduce:

    1. On the host machine: npm install slap && sudo docker run --volume=$(pwd)/node_modules/slap:/slap:rw -i -t nodeos/nodeos
    2. You should be inside the container now: /slap/index.js (yes, this is the whole command)

    I tried to install it via npkg. I had to run npkg install npm to update npm to at least v1.4. However, since there is no git executable, installation failed. I've opened #67, requesting git be added.

    P.S. @piranna: all mouse events are sent as keystrokes after a certain ANSI escape code sequence is sent. All that's required for mouse support is a sane-enough terminal emulator, so no NodeOS dependencies for this are necessary. :)

  5. groundwater commented on Sep 16, 2014

    @groundwater
    groundwater
    on Sep 16, 2014
    Contributor
    More actions

    I like the idea of having a text editor, it fully makes sense. Only point I hope we don't end with simple vs full-featured, vim vs emacs, hipster vs slap flame-wars here on NodeOS... :-P

    The beauty of a fully open package ecosystem like npm is that everyone is free to choose their own path 😄

  6. piranna commented on Sep 16, 2014

    @piranna
    piranna
    on Sep 16, 2014
    Member
    More actions

    @Beardtree I'll need to test the mouse support myself, I'm trully curious about that point :-) On Docker and QEmu (let's hope we can upload updated images soon...) it's currently using /dev/console, I know it support ansi codes but the point is, how to read the mouse events and convert them to anse escape sequences? Does /dev/console is capable to do it, or it's necesary a gpm-like tool to do it? My question is more related to this point :-)

  7. dbkaplun commented on Sep 16, 2014

    @dbkaplun
    dbkaplun
    on Sep 16, 2014
    Author
    More actions

    @piranna to test, see my above comment for steps to reproduce. The way mouse support works is very simple -- slap outputs a special ANSI escape code that says "send mouse events!" to stdout, which GNOME terminal/Terminal.app/xterm/etc captures. Then $TERMINAL starts sending ANSI mouse codes to stdin, which slap captures. There is no need for any middle layer, or interpretation by NodeOS or nsh. Hope that clears things up!

  8. piranna commented on Sep 16, 2014

    @piranna
    piranna
    on Sep 16, 2014
    Member
    More actions

    Ok @Beardtree, just to be sure we are talking about the same, open a vterm (alt-ctrl-F1), launch slap there and tell me what's happening ;-)

  9. dbkaplun commented on Sep 16, 2014

    @dbkaplun
    dbkaplun
    on Sep 16, 2014
    Author
    More actions

    @piranna ah yes, GPM/related is not currently supported in slap. That being said, I don't think many people will be installing NodeOS on their root partition just yet so mouse support in a plain old graphical terminal emulator will have to do for now. :P

  10. piranna commented on Sep 17, 2014

    @piranna
    piranna
    on Sep 17, 2014
    Member
    More actions

    I told you ;-)

    Ok, to resume: mouse support is easy with ansi codes but it's in a per-application (or library) basis, and this codes needs to be generated by a mouse driver like gpm. I'll add this to the alpha.

  11. piranna
    modified the milestone: This milestone has been deleted on Feb 8, 2015
  12. piranna commented on Mar 30, 2015

    @piranna
    piranna
    on Mar 30, 2015
    Member
    More actions

    I've added Slap on the demo users filesystem, so I'll close this. There are problems with blessed related to terminfo, once a solution is found and they are fixed blessed-based apps will work fine.

  13. piranna
    closed this as completedon Mar 30, 2015
  14. piranna
    removed
    ready
    on Mar 30, 2015
  15. dbkaplun commented on Mar 30, 2015

    @dbkaplun
    dbkaplun
    on Mar 30, 2015
    Author
    More actions

    Sweet! How do I test this out? Is there a link to a commit or something?

  16. piranna commented on Mar 30, 2015

    @piranna
    piranna
    on Mar 30, 2015
    Member
    More actions

    I add it some commits ago and forgot about this issue, you can get it on master :-) As I said there are problems with blessed, latest ones should have a valid terminfo for Linux terminal based on Ubuntu linux-vt one so it should look fine in a QEmu window, but remotely on Terminator or gnome-terminal it shows a blank screen due to Unicode and control characters... :-/

  17. TylerLeonhardt commented on Dec 12, 2015

    @TylerLeonhardt
    TylerLeonhardt
    on Dec 12, 2015
    Contributor
    More actions

    This looks great! How can I test this? Has this been added in?

  18. piranna commented on Dec 12, 2015

    @piranna
    piranna
    on Dec 12, 2015
    Member
    More actions

    This looks great! How can I test this? Has this been added in?

    Yes, slap is available inside the basic image :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      • 1.0.0No due date

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.