jcoglan / heist Goto Github PK
View Code? Open in Web Editor NEWScheme in as little Ruby and as much Scheme as possible. Supports macros, continuations, tail recursion and lazy evaluation.
Scheme in as little Ruby and as much Scheme as possible. Supports macros, continuations, tail recursion and lazy evaluation.
how about performance with ruby? It convert code in ruby and after exec? A program write in heist have the same performance of a program writ i nruby?
(number->string 1.2)
fails by complaining that to_s expect 0 args, but 1 was given. This is because Ruby's Float#to_s doesn't support the radix arg, as Fixnum#to_s does. I have a partial fix in byteit101@d8b26cc that allows default base 10 to work for floats, but punts on the full float radix support.
(eq? 36893488147419103232 36893488147419103232)
; => #f
So this doesn't seem to be documented anywhere but the heist language supports ruby string interpolation. You might remove all the builtin functions that do bad stuff (load?) and then think you have a safe sandbox. However, the string interpolation allows the sandbox to be broken.
require 'heist'
scheme = Heist::Runtime.new
scheme.eval('"#{puts :foo}"')
I'm not sure if this ruby string interpolation syntax is done on purpose or not because it seems a bit weird to embed a different language for string interpolation. Possibly this was a lazy way of implementing \ escapes.
heist/lib/heist/parser/nodes.rb
Line 134 in 3f372b2
Anyway, I think it should be documented that the language supports this feature.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.