
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
Minimal Lisp interpreter using 75LOC and only standard libraries excluding the REPL. Inspired by Lis.py.
$ lisp-repl
ctrl-c to exit
> (begin
(> (define incf
((> (lambda (x)
(((> (set! x (+ x 1))))
(> (define one 1)
(> (incf one))
2
>
gem install lisp
require "lisp"
Lisp.eval(<<-eos)
(begin
(define fact
(lambda (n)
(if (<= n 1)
1
(* n (fact (- n 1))))))
(fact 10))
eos # => 3628800
lisp-repl
constant literal number - A number evaluates to itself. Example: 12 or -3.45e+6
procedure call - (proc exp...) If proc is anything other than one of the symbols if, set!, define, lambda, begin, or quote then it is treated as a procedure. It is evaluated using the same rules defined here. All the expressions are evaluated as well, and then the procedure is called with the list of expressions as arguments. Example: (square 12) ⇒ 144
variable reference - var A symbol is interpreted as a variable name; its value is the variable's value. Example: x
definition - (define var exp) Define a new variable and give it the value of evaluating the expression exp. Examples: (define r 3) or (define square (lambda (x) (* x x))).
procedure - (lambda (var...) exp) Create a procedure with parameter(s) named var... and the expression as the body. Example: (lambda (r) (* 3.141592653 (* r r)))
conditional - (if test conseq alt) Evaluate test; if true, evaluate and return conseq; otherwise evaluate and return alt. Example: (if (< 10 20) (+ 1 1) (+ 3 3)) ⇒ 2
quotation - (quote exp) Return the exp literally; do not evaluate it. Example: (quote (a b c)) ⇒ (a b c)
assignment - (set! var exp) Evaluate exp and assign that value to var, which must have been previously defined (with a define or as a parameter to an enclosing procedure). Example: (set! x2 (* x x))
sequencing - (begin exp...) Evaluate each of the expressions in left-to-right order, and return the final value. Example: (begin (set! x 1) (set! x (+ x 1)) (* x 2)) ⇒ 4
FAQs
Unknown package
We found that lisp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.