Giter Site home page Giter Site logo

dyne / zencode-tools Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 1.0 115 KB

Development tools to aid writing and debugging Zencode

Home Page: https://dev.zenroom.org

License: GNU Affero General Public License v3.0

Makefile 0.75% Go 13.23% Lua 0.56% C 81.93% Shell 3.53%
bubbletea golang tui zenroom

zencode-tools's Introduction

Zencode tools

Set of terminal based tools (TUI) to ease development of Zencode

One can start cloning this and installing golang apt-get install golang should suffice, min 1.16 is OK, debian latest packages 1.18.

This repository is currently an import of some bubbletea examples, a nice library for TUI.

It will provide two tools: zenexplorer and zendebug.

Zenexplorer

Zenexplorer is a TUI for zencode code completion, it does fuzzy matching of zencode statements as you type, in a terminal. it shows the statement, the scenario it belongs (as description below in gray) and when hit enter it copies the statement inside the clipboard.

Inside zencode-tools type make then run ./zenexplorer and you will see.

Code is in

Zenexplorer is very simple and just needs an array from zencode statement introspection, perhaps we can produce the latest JSON array from a github action.

Zendebug

Zendebug is a more complex TUI: a triple pane editor (may be more, may zoom into one) supposed to contain zencode, data and stderr/out. The key Ctrl-enter should execute zencode in the left pane with data from center pane and show stderr/out in the right pane. For a start, this doesn't work yet (search for TODO).

Next we will need to be able to set breakpoints in zencode lines (textarea.Prompt chars) and then execute zenroom with a special configuration break=number which Zenroom core will implement soon: Zenroom will break at a specific zencode line and print out a json representation of the HEAP at that moment.

Then Zendebug will have keys for step or next and run to restart: every step zenroom will be re-executed so code can change during a debug session without problems.

Breakroom

Zenroom debugger: place breakpoints in Zenroom to read the memory state.

License

Software Tools to work with Zenroom

Copyright (C) 2022 Dyne.org foundation

Originally written as example code in Bubblewrap

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see gnu.org/licenses.

zencode-tools's People

Contributors

albertolerda avatar andrea-dintino avatar jaromil avatar matteo-cristino avatar puria avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

matteo-cristino

zencode-tools's Issues

remove `delete` action (backspace) on statements loaded

After deleting a search the backspace hit deletes loaded statements, this should not happen.

Also handy to have esc and ctrl-g as keys to quit the / search.

Worth thinking if zenexplorer should start directly in "search mode" since we use it just for that, then / key is not needed.

Restroom-test fails because of different version of glibc

I was trying to deploy an oracle from https://github.com/dyne/zenswarm-oracle, but restroom-test fails with the following error:

./restroom-test: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./restroom-test)
./restroom-test: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./restroom-test)

indeed the machine has:

$ ldd --version
ldd (Debian GLIBC 2.31-13+deb11u7) 2.31

the machine is:

Linux zen.prosume.io 5.10.0-19-amd64 #1 SMP Debian 5.10.149-2 (2022-10-21) x86_64 GNU/Linux

Not completely sure if this issue should be reported here or on the zenswarm-oracle repository.

command-line execution of yaml execution chains

The .yml files are now executed only by a running restroom-mw via its API, it is very useful to test them via command-line without starting restroom. This CLI tool may be done quickly in Go by ignoring the restroom-mw extended zencode statements, or exporting in Typescript the part of restroom that does the execution and trying to implement one that is not a middleware but a CLI tool.

Setup github actions

This repo should be built and its binaries published entirely via github actions.

Setup a workflow so that builds are versioned and offered for download, main targets linux/win/osx PC and maybe raspi.

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.