Git Product home page Git Product logo

vygr / chrysalisp Goto Github PK

View Code? Open in Web Editor NEW
1.6K 73.0 94.0 175.94 MB

Parallel OS, with GUI, Terminal, OO Assembler, Class libraries, C-Script compiler, Lisp interpreter and more...

License: GNU General Public License v2.0

Shell 0.48% Makefile 0.25% C++ 51.96% Common Lisp 20.00% PHP 1.13% Assembly 8.45% Batchfile 1.26% Pawn 0.11% NASL 3.90% PowerShell 1.20% NewLisp 0.08% C 3.40% HTML 2.76% SourcePawn 3.45% BitBake 1.58%
os lisp assembly vm gui osx linux x86-64 aarch64 raspberry-pi-3

chrysalisp's Issues

What are CPMs files?

I noticed that images were in the cpm format, is there a way to include JPGs into a project?

Branding

I was wondering what you thought about adding a wallpaper, it could be its own app apps/desktop/app.lisp? I'm not a fan of desktop icons, but I definitely enjoy setting a background. This could tie into creating a logo for ChrysaLisp, and adding it to the default boot. I'd be happy to tackle the making of logo, if you can help me make an app that always stays at lowest zIndex.

Text Fields and Editor

I've been trying to work on a text editor and it occurs to me that a text field widget would be really vauable. I've been working through the terminal and the docs app examples and it's proving difficult to really get anything going.

Add Time APIs

I would like to build a clock app tutorial, and I would need a way to do a few things.

  • Time based refresh.
  • Time API, hours, minutes, seconds.
  • Timer(timeout/interval) methods.

RISC-V backend

Hi again,
For another side project I'm going to be working on implementing a RISC-V compliant CPU and I thought as an additional test an for general fun and games, getting ChrysaLisp running on it would be a very interesting experiment.

So, …. where should I start looking in order to add another backend.

Thanks,
Martyn

Distinction between the different uses of color

There seems to be different uses to 'color, in some cases like the label, it defines the foreground, in other cases, like the grid->button, it defines the background. It would be nice to have something like foreground and background.

What does create-slave do?

I've started reviewing and want to start with adding a few command to the TUI. I came upon the function but not sure what it is doing...

Thanks

Advanced Debugging Features?

You might wish to consider implementing advanced debugging features, like Medic:

And Ripple (for which unfortunately I have yet to find source code, and which one must distinguish from @ripple, with which it has, to my knowledge, zero relation):

Both of the above made by @lixiangqi & @mflatt. 🙂

P.S.:
Only semi-related to the above, here's a semi-related paper from December that might interest y'all: https://hal.inria.fr/hal-01662336/document

MakeFile SDL Library links for OSX

While the MakeFile looks for SDL in /Library/Frameworks/,
brew installs in usr/local/Cellar/.

Would you like me to add the instructions for homebrew in the makefile? or explain how to link the homebrew libraries into Frameworks?

Running on embedded hardware

Apologies if I'm way too far in left field on this issue. Love all the care, thought, and work going into this.
Any hopes this code base could offer some of the promises of the Tao system of lore, specifically related to pushing code to tiny/networked hardware that isn't 64-bit (8-bit Arduino/AVR)?
Maybe that's too small a target, but how about something like an ARM Cortex-M0?
What do you think the smallest target is reasonable for this project?

Sphinx docs don't build on Mac

cd into doc folder.
make clean
make html

Error reported here is:
Running Sphinx v1.8.3

Extension error:
source_parser for 'restructuredtext' is already registered
make: *** [html] Error 2

That's after using Macports update to get all the latest updates and pulling all the Sphinx packages with:

pip install -r Requirements.txt

GUI and TUI error on startup

When running either the following error occurs:

Error: (ffi sym path flags) wrong_types ! < (ffi find-rev "class/seq/lisp_rfind" 0) > File: class/lisp/boot.inc(39)

Logo for ChrysaLisp

Branding can be an important part of attracting developers. The ability to add wallpaper would also help. I've designed a logo for the OS. Feel free to use it, make suggestions, or decide it's not what you're looking for.

I don't know if this is helpful at all: https://github.com/Ramarren/png-read

ChrysaLisp v 0 6 512px
Logo.zip

Shell commands and pathing

Currently the Terminal application assumes that a command entered can be resolved in the cmd/ folder.

It would be desirable to be able to enter a command at the shell prompt and have the terminal app search through a configured 'path' to resolve the location of the command location and load from there unless the user has provided a qualified command.

For example, assuming Terminal preloaded a configuration file upon startup from config/shell.profile (or similar) containing:

export PATH=cmd/:examples/  ; Search order is important
export ENV_VAR1=blah 

The export declaration semantics are that PATH and ENV_VAR1 are automagically added to the environment.

Upon Terminal startup it reads and processes the profile and, with the configuration of PATH, can do a search through the locations to resolve the request. (Is the environment ready this early?)

Alternately the user can specify an absolute path at the command

Use sprites for graphics, from the ground up?

See here:

http://alvyray.com/Sprite/

Albeit—and I don't think that that makes for much of a caveat—I do think the concept of sprites presented there could do with a move from rectilinear polygons to some (further) generalization of isothetic polygons which could represent any planigon

(I do suspect that such a generalization likely already exists somewhere in the literature, whose name—and hence literature on it!—I have yet to find. The Wikipedia page for rectilinear polygons—but not the one for isothetic ones!—points to two generalizations, but neither of them seems particularly helpful for representing e.g. a regular hexagon…)

backdrop app ?

GUI process currently uses a black label as the screen widget. Should at least be able to specify any view class, and would be very nice if could run a live application to supply the view.

Should be possible to have a live backdrop like Boing running etc

Basic paint application

To complete a first demo, Chrysa should have at least a few expected applications, i’d suggest building a painting application, something to the order of MS Paint.

That would include the saving/loading of files, which I don’t think any of the apps support at the moment.

Screenshots

Do you have any screenshots that showcase the OS as it's working, even if it's console-only?

issues raised by clock app

  1. Font cache is never getting flushed ! Clock keeps on filling it up for ever...
  2. Mystery of the flickering last digit, looks like a dual buffer dirty region issue ! (shows up if Boing is running causing the buffers to keep swapping)

File management

I know it's currently possible to open file-streams that exist. Is it possible to create new files, view folder contents. Would this require adding new dependencies?

Segmentation fault

This is causing a segmentation fault:

(reduce (lambda (acc el) (cat acc el)) '(fee fie foe fum) (list))

Before getting to this simple reproduction, I was seeing Malloc fail !!!funcs.sh: line 60:

The zerofil function?

I was looking at the list of functions and I couldn't find an equivalent to zerofill, or strpad. I was wondering if there was a Chrysa-wide function that could be used to pad an int with zeros, or something of the sort. I'll define one in the clock app to pad the minutes and seconds, but I would like to know for the future :)

Thanks!
Chrysa is amazing.

screen shot 2018-10-05 at 9 43 33 pm

Provide capabilities for Internet Protocol stack

Are there any big-picture plans for this?

From my limited view of how ChrysaLisp works, perhaps just exposing a few primitives for socket creation would do the job (assuming this happens via main.c's host_funcs table).

On the other hand, it would be an interesting path to use a plan9-style set of primitives for accessing external servers (http://9p.cat-v.org/documentation/, https://en.wikipedia.org/wiki/9P_(protocol), https://blog.aqwari.net/9p/).

Interested to know if there are plans in motion and I'm willing to forge into the unknown or help others as well.

`str-to-num` expected behavior?

Not sure if these are expected but doesn't seem to be consistent with name of the function:

(str-to-num "-20")
-280
(str-to-num "20.9")
1369702
(str-to-num "-0")
-30

Define GUI window size in ./run.sh

It would be very helpful for dev if I could send a window size as a script parameter so it doesn’t always take the full screen on load.

doc/Requirements.txt seems to be missing

While following the instructions on a fresh git clone.
cd doc
pip install --user -r Requirements.txt
make html
'Requirements.txt' is not present in the directory.

A few items

Ran into a few things:

(push 1 '(2 3)) ; => got (2 3 1) but expected (1 2 3)
(find "foo" '("fie" "foo" "fun") ; => got nil but expected 1 (index of "foo")

Also, if there is some other way you want me to convey observations, suggestions, etc. just let me know

Global windows controls

I was wondering if you we could start building windows management shortcuts.
I would love it if we could use win/cmd + key to control maximize, minimize, hide, stick to left, etc..
What do you think?

Fullscreen causes background flicker.

I've ensured that SDL2 is at 2.0.10 and SDL2_TTF is at 2.0.15. I've cloned the most recent ChrysaLisp.

As an aside I had some intermittent issues with flickerring in a normal mac window in previous versions, but have not had those outside of fullscreen since that round of changes was pushed. Returning Chrysalisp to a normal window resolves all issues.

After switching to fullscreen, symptoms are:
Except for the clock face itself, the clock causes screen flickering black every second.
Animations causes the screen to pulse at the fps of the animation.
Windows moved leave tracer images of the window.
Canvases and buttons do not appear to flicker as reliably, but will eventually.
Any input (keyboard or mouse) causes the screen to switch on and off. This is most easily demonstrated with keyboard input.

To recreate:
./run.sh
enter fullscreen

Things I've tried:
Using the supplied snapshot
using the README.md instructions
using the INTRO.md instructions
removing all apps from launcher startup list.
removing each specific app from launcher.

Screen Shot 2019-12-22 at 7 07 33 AM

Screen Shot 2019-12-20 at 6 12 13 PM

Screen Shot 2019-12-22 at 6 57 18 AM

POLO: Plain Ol' Lisp Object

Toying around:

(defun init-data-element (environment data-element)
  (def environment data-element nil))

(defmacro class (name properties)
  (defq
    _i (sym (str name ".new"))
    _d (sym (str name ".del"))
    _g (sym (str name ".get"))
    _s (sym (str name ".set")))
  `(progn
     (def: ,properties (env))
     (defq ,name (list (list nil) (list nil)))
     (defun ,_i ()
       (defq _mye (env -1))
       (each (curry init-data-element _mye) ,properties)
       _mye)
     (defun ,_g (obj data-element)
       (eval data-element obj))
     (defun ,_s (obj data-element val)
       (set obj data-element val))
     (defun ,_d (clz) (print "In deinit for " ,name))
     ))

(class test '(a b))
(defq t1 (test.new))
(test.get t1 a)
(test.set t1 a "value")
(print t1)

A proposal for the file system

NOTE: I really need to put my computer away in the middle of the night. This is a huge undertaking and I will someday start it in my own little corner of github. I'm going to mark this closed.

Abstraction of a hierarchy agnostic file system which provides self encapsulated elements of component, permission, and member systems:

Component System

  • Metadata may include binary data linking low level file system specifics, applications, or may be text with unique identifiers, tags, data types, application references, etc.
  • Tags act as a specific form of organizational metadata allowing for a hierarchy agnostic approach to file handling which can associate devices, records, data types and uids.
  • Records are containers for data and metadata. Record metadata may refer to one or more applications, contain mixed data types, and be associated with zero or more tags.
  • Applications consist of the binaries, data, and metadata necessary to interoperate with and utilize records and other applications using apis and pipelines.
  • Systems data includes physical hardware, drivers, the file system, and the operating system. Access may be restricted via blacklists, whitelists, and through the permission system.

Permission System

  • Allows for standard permissions of R-W-X for the component system.
  • Adds permissions for Protected, Encrypted, and Hidden all system elements.
  • Permissions may differentiate between local and remote members and component elements.

Member System

  • Members include users and groups and makes a distinction between local and remote members.
  • Replaces root user with a primary system operator with self-selected username.
  • Sysop usernames may be anonymized via proxy users and group communications.
  • Mail is delivered and may be picked up at a central repository by those with permission to do so.
  • Maintains a level of security through anonymity and inaccessibility. Out of site out of mind.
  • Sysops need not even know the existence or privileges of other sysops.
  • SysOps may be accountable for very specific system tasks or sysytem-wide oversight.

UI/UX design suggestions.

These are just some thoughts I've had concerning the GUI. These shouldn't be considered priority items. I may choose one or two that I think I can complete in the cscript.

I've been considering the titlebar of the window. It seems like having a toolbar class that acts as a titlebar for windows my be a better option. It would eliminate special functions like window-set-title for the more universal (set window 'text "title"). This would allow for different flows to be set, having toolbars at the bottom or on the side of a window.

If this were implemented with fullscreen windows, it could provide a customizable toolbar for the gui without the need to access the screen view at all, as it's just a window. Which leads to the point of styling.

Certain things like padding of elements would be useful in UI design. If styling issues like 'color 'ink_color and the like are kept in a separate class it would make markdown readers, with or without css, much easier to write.

Specific component-connect functions could be kept in a class library for things that are oft used. Things like closing a window, maximizing or full-screening a window, could be accessible as single functions, like hide-window. This allows the ability to expand that library to things like opening a dialog or viewing a hidden field or window without the need to recreate boiler plate code.

I would write a library of boiler plate if you think it would be better implemented in ChryaLisp instead of at the gui/ level. But, I think the point of keeping things at a lower level was to improve efficiency?

That brings me to another point. Am I correct that hide-window function does what it says, and does not close the window? Is it possible to retrieve or show-window things that have been "closed." If this were implemented at the component level, would it allow hiding and showing of any widget? Is this a complicated matter? This allows for hiding and showing toolbars and views creating more dynamic UX.

Pardon any suggestions that are already implemented and I've not found them.

A bit of a checklist for UI/UX design and implementation.

  • [x ] sane defaults that allow users to simply (ui-tree window (create-window).
  • automatically place windows in a cascading fashion from the previous window unless a user explicitly requests a specific position.
  • add fullscreen mode and/or no_titlebar and undecorated flags.
  • [ x] eliminate certain widget specific functions where more universal functions are sufficient. This allows easier adaptability for different widgets.
  • hide/show component functions or style options.
  • implement percentage based flows to allow all views/components to be scaled. I think the background already does something similar?
  • implement styling as separate from a specific class to avoid hardcoding things like default 'fonts. Add padding and margins to components.
  • create a certain number of fonts globablly upon start-up so that they may be used without creating fonts for specific views. 'font and 'font_size.
  • Implement buttons as views to easily enable the creation of image buttons or film buttons. This would create cohesion for buttons, instead of requiring creation of a pseudo-button.
  • implement hide and show at the component level to allow easily hiding and showing windows/buttons/etc.
  • Make determinations on what should be implemented at the gui class level and what should be implemented in lisp as a boilerplate library using the gui classes.
  • Keyboard chords macros using modifier keys.
  • Mouse down/mouse up/right-click events.

Again, these are merely suggestions, and I will be happy to help given time and my own limitations.

`docstrings` equivalent

In the interest of having good documentation, it would be nice if objects were self-describing in some way. I don't really do lisp, I work with python, but my understanding is that in lisp objects an implement a "describe", "inspect", or "documentation" method?

To get such a system integrated with sphinx (for auto-generating object documentation), we'd need a way to get that information out of ChrysaLisp, presumably a command that output all the documentation in a semi-structured way. Sphinx already has support for common lisp, and if we think that would work on chrysa-lisp I could try setting that up, but I think it would require that the code could actually run under common lisp.

I might be able to just set ChrysaLisp as the lisp executable for sphinx to use, but I don't know if that would work or not.

Raw, but working, ChrysaLisp argument processor

From a crawl, walk, run perspective - I'm still looking for the kneepads to start crawling with.

Here is the heart and test driver - Gist link

I haven't hooked up the 'help' yet, been focused on class spikes and getting something working. I moved away from the raw 'class' for the moment but may return on that another time...

Narrow test, I've since fixed boundary conditions:

tstap cat this is just stdio input
tstap cat -f cmd/echo.cmd

chyrsa(sh): a different approach to the shell.

Please name the shell chyrsash. It's in ".*[a-z]sh" format like *Nix shells.

Instead of putting energy into just another shell, use the existing Lisp interpreter with an included lisp file to allow for parsing of commands and normal system interaction.

Users could have a per user preference automator—or pupa.lisp—startup script that performs certain commands on login.

I would be interested in working on this. I can also work on simple bug fixes in the UI.

Look and Feel

I was just poking around Oberon Native and Genera, I’ve always had a crush on aliases type and pixel UIs. I was wondering if you’d be into helping me to build the Chrysa UI into the likes of these OS classics. I’m curious to know what that would entail, if disabling aliasing is something that can be done.

I think that could make Chrysa stand out. I’d love to hear your thoughts on that.

Context aware tab completion

Gui Terminal now does basic path completions. But should be aware of the structure of a pipe command line and complete to commands in command positions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.