Code Monkey home page Code Monkey logo

drakon.tech's People

Contributors

stepan-mitkin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

drakon.tech's Issues

A very confusing error!

hi
I apologize for your interruption again,but I get a very confusing error.I can not understand!
when I run the ./build,I get a error as fellows:
robot@robot:~/Robot_Project/drakon.tech$ sudo tclsh ./build

Building "lua" files: "/home/robot/Robot_Project/drakon.tech/app"
Minifying Javascript files
/home/robot/Robot_Project/drakon.tech/clos
/home/robot/Robot_Project/drakon.tech/tmp/dkt/static
ContextMenu.js
/home/robot/Robot_Project/drakon.tech/static/ContextMenu.js
ContextMenu.js... couldn't execute "java": no such file or directory
while executing
"exec java -jar /home/robot/Robot_Project/drakon.tech/clos/compiler.jar --js_output_file=/home/robot/Robot_Project/drakon.tech/tmp/dkt/static/$file_onl..."
("foreach" body line 13)
invoked from within
"foreach file $jsfiles {
set file_only [ file tail $file ]
if {$file_only != "loader.js"} {
# puts "1"
puts $closdir
puts $outdir
puts $file_o..."
(file "./build" line 105)

and I try to check my envoriment, so I run the code on terminal. I don't get error.my code is:
% set reslut [java -jar ./clos/compiler.jar --js_output_file=/home/robot/Robot_Project/drakon.tech/tmp/dkt/static/ContextMenu.js /home/robot/Robot_Project/drakon.tech/static/ContextMenu.js]

It is very confusing!

No exit from loop

Converging Case branches above a foreach loop cause an infinite loop

json format

This is an idea for a possible unified JSON source schema for DRAKON diagrams, I'm posting it here because this is the closest thing I could find to a discussion board for the drakon tech editor.

image

"diagrams": {
    "diagram": {
        "name": "fibonacci",
        "parameters": [n],
        "icons": [
            "icon": {
                "type": "question",
                "text": "n === 0",     
                "branch": {
                    "answer": "no",
                    "icons": [
                        "icon": {
                            "type": "question",
                            "text": "n > 2",
                            "branch": {
                                "answer": "yes",
                                "icons": [
                                    "icon": {
                                        "type": "action",
                                        "text": "return fibonacci(n -2) + fibonacci(n -1)"
                                    }
                                ],
                                "connect": [0, 1],
                            },
                        },
                        "icon": {
                            "type": "action",
                            "text": "return 1"
                        },
                    ],
                    "connect": [0, 1],
                },
            },
            "icon": {
                "type": "action",
                "text": "return 0"
            },
        ],
    },
},

This is a simple JSON format to describe DRAKON diagrams. It is intended to be a standardized and portable format for DRAKON diagrams. The format would allow for easy conversion from JSON to visual diagrams in an IDE as well as allow for easy creation of language-specific code generators, such as for javascript, lua, and others.

The diagrams object holds all of the diagrams in a drakon JSON source file. Each diagram has three properties, the name string, the parameters array, and the icons array.

The icons array holds icon objects. Each icon object holds information about the icon's type, which can be an action or a question.

Each icon contains a text property which holds the literal text that goes inside the diagram icon. Each question icon type also holds a branch property which itself holds three properties: answer, connect, and icons. The answer property determines the yes/no orientation of the question. The connect property determines which parent branch and where on the parent branch the end of the branch will connect to. For example, the default case would be a connect value of [0, 0], which would connect the branch directly below the parent question icon. A value of [0, 1] would connect the same way, except skip one icon downward on the branch the question icon was located on. A value of [0, -1] would connect above the question icon, creating an arrow loop. Finally, a value of [-1, 2] would connect to a grandparent branch and skip downward two icons on the grandparent branch.

Sequencing, selection, and repetition are all possible using this simple schema. More advanced representations of chains of question icons, such as select or case structures, can be automatically generated by the IDE without modifying the source, based on interpreter rules.

Ideally, a language agnostic iterator such as next(iterable) would be implemented for each language. This would prevent the need for language specific for loop icon and their syntax, such as foreach or for or i++. Instead, arrow loops could be used with the next() function and the appropriate code could be generated from language-specific code generators. The next() function would ideally try to iterate in order, and if no order exists, then over all values it can in any order, and finally allow for an extra parameter to control iteration direction to be ascending or descending.

Interpreter rules would also be useful for representing select/case constructs, built from a series of simple yes/no question icons. For example, if the questions are in such a manner that they function equivalent to a select/case construct, allow the user to make the diagram display this way, or not, in the IDE, without modifying the source. This option could be stored as a global setting in the IDE rather than stored as metadata in the source.

when run "sudo luarocks install luasoap",get a error!

hi thanks for your good job,it is very exciting.But when I try to use your code,and I got a error.when I run sudo luarocks install luasoap,it is:
`Installing https://rocks.moonscript.org/luasoap-4.0.1-1.rockspec...
Using https://rocks.moonscript.org/luasoap-4.0.1-1.rockspec... switching to 'build' mode

Missing dependencies for luasoap:
http-digest >= 1.2.2-1

Using https://rocks.moonscript.org/http-digest-1.2.2-1.src.rock... switching to 'build' mode

Missing dependencies for http-digest:
md5

Using https://rocks.moonscript.org/md5-1.3-1.rockspec... switching to 'build' mode

Error: Failed installing dependency: https://rocks.moonscript.org/http-digest-1.2.2-1.src.rock - Failed installing dependency: https://rocks.moonscript.org/md5-1.3-1.rockspec - Error fetching file: Failed downloading https://github.com/keplerproject/md5/archive/1.3.tar.gz - tlsv1 alert protocol version
`
sould you help me?Thanks very much!

Add the diagram url before the generated code for each function

Today I was doing a code review. One of our programmers implemented a new feature, but did not realise he was editing a generated javascript file.

So the changes are now in javascript code and not in the drakon diagrams.

We added a readme in the project, pointing to de drakon tech site, but he did not see at that. He searched through the code to see where he had to make changes, so he also never saw the header.

Would it be possible to add comments to the generated code before each function? The comment could even include a drakon.tech url..

// Created with drakon tech. Diagram url: https://app.drakon.tech/ide/doc/channelme/59
function handleChatMessage(model, topic, message) {

}

That way he probably would have realized it was generated code, and could immediately jump into the diagram.

A GPT-powered CoPilot-like DRAGON to erode software developer profession even further

Hi. While making an argument about why non-English-based programming languages are unsuitable for practical software development (and using DRAGON (BTW it was the first "programming language" I have learned in the age of 5, though have never used for anything practical) as one of the examples) I have come with an idea that I want to share with you.

As we know, the unreacheable holy grail of programming is writing programs in the form "makeЗа36ись();".

Icons even in a natural-language-based dialect of DRAGON usually contain kinda simple actions and the flowchart defines just the high-level structure.

It can be possible to transform these simple actions into pieces of code with a neural network capable transforming natural language into code, like GitHub CoPilot or other GPT-based networks. But these pieces of code should be stitched together, this can be done by doing everything incrementaly, one-icon at time, because GPT-based networks are auto-completers. So basically one needs to transform a DRAGON-scheme into a program one icon at time, starting from a bare stub filled in with algo name, injecting natural language descriptions from action icons into the AST, then calling auto-completion generating. IDK how to do it the best, I guess the best control over the autocompletion will be achieved if every Action icon is temporarily mapped to a function (this way specifying its input arguments) outputting all the state of the program, then inlining its generated body, but I'm not sure if GPT will remember the context. I guess the best for remembering the context is to define the function immediately where it is called and then call it, to help GPT to know the context. For Question icons a predicate lambda should be generated.

I guess it can be a way to transform a natural language-based DRAGON schemes into the programs in programming languages. Of course they will likely require some postprocessing to beckme workable. It can be tried to be done with GPT too, piping it with the wrong source, compiler error and the commanf to fix the error, then triggering autocompletion.

Hotkeys for Go to definition and Go up

  1. Hotkey/shortcut to go to a diagram from another diagram when the diagram pointer is selected, instead of having to right click and choose >diagram\nsuggestion: ctrl+enter\
  2. Hotkey for the 'up' button, the button after the build button. suggestion: ctrl+u

Add colored backgrounds for the Dark scheme

Please add colored backgrounds to the different types of diagram icons for the second to last 'dark' theme, the one which is mostly yellow and black.

The colors should match the colors of the icons in the toolbar, so yellow for question icons, red for choice/case icons, green for loop icons.

When I have nested loops on the same skewer, it is hard to tell how nested I am, even for simple skewers when all I have to identify is by the silouette alone, but colors like this will help make that apparent.

Render a button close to elements for a popup menu

When one presses right-click in order to generate the code, sometimes the right-click handler is not bound.
Would it be an idea to render a button close to elements which allows one to pop up the menu?

Do not show a "parameters" valence point when clicking on the "Action" icon

При выборе в меню иконы Действие на схеме, у иконы Заголовок появляется точка иконы Параметры.\nМожно было бы обойтись без этой точки ввода, т.к. в меню есть ввод Параметров.

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.