GithubHelp home page GithubHelp logo

baku89 / glisp Goto Github PK

View Code? Open in Web Editor NEW
975.0 27.0 27.0 30.73 MB

Glisp is a Lisp-based design tool that combines generative approaches with traditional design methods, empowering artists to discover new forms of expression.

Home Page: https://glisp.app

License: MIT License

JavaScript 11.31% HTML 0.77% Vue 38.71% TypeScript 48.56% Stylus 0.64%
lisp graphics lisp-interpreter creative-coding generative-art computational-art design

glisp's Introduction

Baku Hashiomoto 橋本 麦

Baku's GitHub stats Top Langs

glisp's People

Contributors

baku89 avatar chimanaco avatar david-jankoski avatar dependabot[bot] avatar micuat avatar miyamonz 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glisp's Issues

`reverse` works destructively

function reverse modifies original array since it calls Javascript's destructive reverse.
I don't know if it's Intentional behavior or not, I think it's not Lisp-ish.

reproducible code;

(def array [0 1 2])
(reverse array)
(prn array) ;; [2 1 0]

#@{:expanded true} showing off on layer expansion

Description

#@{:expanded true} tag is showing off in the code window next to the code targeted within the layer window and is happening on layer expansion.

Screenshot

Screenshot 2022-12-25 at 07 55 16

Steps to reproduce

The issue was also reproduced with Safari, but the main environment was Brave : Version 1.46.144 Chromium: 108.0.5359.128 (Official Build) (arm64)

  1. Open glisp
  2. Select any code example
  3. In the Layers window, select any layer and click on the left arrow associated to trigger expansion
  4. In the Code window, the code is well highlighted but the #@{:expanded true} tag is showing off

More

I found this really great tool because of mal, thank you ! 💯

paste-from-clipboard won't work on Firefox

Error message:

useAppCommands/<@webpack-internal:///./src/components/PageIndex/use-app-commands.ts:195:9
evalExp@webpack-internal:///./src/mal/eval.ts:424:37
eval@webpack-internal:///./src/mal/scope.ts:124:20
readEval@webpack-internal:///./src/mal/scope.ts:107:20
REP@webpack-internal:///./src/mal/scope.ts:100:21
handler@webpack-internal:///./node_modules/cache-loader/dist/cjs.js?!./node_modules/ts-loader/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/Console.vue?vue&type=script&lang=ts&:68:21
JQConsole</JQConsole.prototype._HandleEnter/continuation</<@webpack-internal:///./node_modules/jq-console/jqconsole.min.js:1:22879
JQConsole</JQConsole.prototype._HandleEnter@webpack-internal:///./node_modules/jq-console/jqconsole.min.js:1:23107
JQConsole</JQConsole.prototype._HandleKey@webpack-internal:///./node_modules/jq-console/jqconsole.min.js:1:20827
bind/<@webpack-internal:///./node_modules/jq-console/jqconsole.min.js:1:586
dispatch@webpack-internal:///./node_modules/jquery/dist/jquery.js:5428:16
add/elemData.handle@webpack-internal:///./node_modules/jquery/dist/jquery.js:5233:6

glisp with embedded elements

Hi all! I would like to know if it is possible to create an interface of inline elements in the glisp.

Idea

This is a curious question and not an implementation request, I don't know how to program and this would just be a concept, idea.

So... would it be possible to create a glisp with embedded elements?

`eval*` doesn't work properly in some cases

https://glisp.app/commit:69e6023/?code_url=https%3A%2F%2Fgist.githubusercontent.com%2Fmicuat%2Fa267b81b207787cc5aaed6a7656d3c86%2Fraw%2F07698838c485e05cf236ed3b312db2768edae342%2Fclampbug.glisp

this doesn't work

(background "aliceblue")

(defvar x 100)
(defvar m0 0)
(defvar m1 100)
(transform (translate [(clamp x m0 m1) 74.29997253417969])
  (circle [0 0] 100)
)

this works

(background "aliceblue")

(defvar x 100)
(defvar m0 0)
(defvar m1 100)
(circle [(clamp x m0 m1) 74.29997253417969] 100)

it used to work - and currently broken on both master and develop branches

Translation links in docs navbar broken

現行のドキュメントのナビゲーションバー,Translationの部分のリンクの挙動は以下のように壊れています.

  • 🇺🇸 Englishをクリックする
    • https://glisp.app/docs/#/en/ -> https://glisp.app/docs/#/en/en/ -> https://glisp.app/docs/#/en/en/en/
  • 🇯🇵 日本語はクリックすることが出来ません

Docsifyには詳しくないので憶測ですが,https://docsify.now.sh/custom-navbar を参照するに以下のように修正すると良いのではないでしょうか.

https://github.com/baku89/glisp/blob/master/docs/_navbar.md

- Translations
  - [🇺🇸 English](/en/)
  - [🇯🇵 日本語](/)

undo behavior for text

(text "abc" [0 0] :size 100 ) ; (1)

when the text "abc" is changed

(text "def" [0 0] :size 100 ) ; (2)

then move the text with the handle

(text "def" [64.3184 -204.2108] :size 100 ) ; (3)

rolls back to the first state (1) but (for the user's perspective) the expected behavior is to go back to (2) I think

getting started typo

https://github.com/baku89/glisp/blame/master/docs/get-started.md#L11

I first thought 左上 is correct, but anyways the origin is at the center and +x is right, +y is down. I don't know what is a good way to describe this.

for example, doc in p5.js says

(0,0) can be found at the top left with the positive direction to the right horizontally and down vertically.
-- https://p5js.org/learn/coordinate-system-and-shapes.html

so I will rephrase that (origin at center) in the english doc

rect bug when parameters are clamped

https://glisp.app/commit:69e6023/?code_url=https%3A%2F%2Fgist.githubusercontent.com%2Fmicuat%2Ff8b1e0001efcf2115bca90dcbee93979%2Fraw%2F9d24021efc890dc514710bd0805c32cca9d69384%2Fclamprectbug.glisp

(defvar vx 100)
(defvar vy -55.20002746582031)

(def W 100)
(def H 100)
(background "aliceblue")

(style (stroke "salmon" 2)
	(rect [(clamp vx (- W) W) (clamp vy (- H) H) 341.5 279.00096130371094]))

in this case, when x y are bound by clamp, width and height still moves in an unexpected way (I guess it's trying to compensate values somehow)

Publish to Gist failed before adding any changes to code

コードの編集をせずにPublish to Gistをした際、codeが空文字列になっていてgist APIがエラーを返します。

Gist API returns error when tried publish-gist without adding any changes to code.

VM8:1 POST https://api.github.com/gists 422 (Unprocessable Entity)
(anonymous)	@	VM8:1
eval	@	console.ts?4e39:194
eval	@	tslib.es6.js?9ab4:74
__awaiter	@	tslib.es6.js?9ab4:70
publishToGist	@	console.ts?4e39:183
eval	@	console.ts?4e39:221
evalExp	@	eval.ts?f834:573
eval	@	scope.ts?f0c7:134
readEval	@	scope.ts?f0c7:116
REP	@	scope.ts?f0c7:108
handler	@	Console.vue?d189:70
eval	@	jqconsole.min.js?b832:1
JQConsole._HandleEnter	@	jqconsole.min.js?b832:1
JQConsole._HandleKey	@	jqconsole.min.js?b832:1
eval	@	jqconsole.min.js?b832:1
dispatch	@	jquery.js?1157:5429
elemData.handle	@	jquery.js?1157:5233

const code = ConsoleScope.var('*sketch*') as string

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.