Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@zonuexe
Last active December 18, 2015 00:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zonuexe/5698222 to your computer and use it in GitHub Desktop.
Save zonuexe/5698222 to your computer and use it in GitHub Desktop.
# -*- mode: lisp-mode ; coding: utf-8; -*-
(Class.new do
(define_singleton_method :let, ->(*‌){‌})
(let
[(display = ->(ary){
(puts \
%(\n\(my-lisps . ) +
%(\() +
(ary.map(&->(‌‌‌){
‌‌‌.to_s.gsub(%( ), %(\\ ))})
.send(:join, %( )) + %(\)\))))}),
(lisps =
'(Arc
Clojure
Common\ Lisp
Cyan
Emacs\ Lisp
ISLISP
MAC\ LISP
Matz\ Lisp
Nsclisper
Scheme
TAO)
'),
(lisp–chooser = ->(‌){
(loop do
(let (‌‌= (‌.sample 3))) &&
((‌‌.include? %(Matz\ Lisp).intern)?
(break (‌‌)):
(p (‌‌)))
(next) end)}.
(eval \
(?%+?i+ (lisps)) ||
(lisp–chooser)))]
(display. (lisp–chooser))) end)

Remarks

Just run it with no argument:

ruby entry.rb

I confirmed the following implementations/platforms:

  • ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]
  • jruby 9.0.1.0 (2.2.2) 2015-09-02 583f336 Java HotSpot(TM) 64-Bit Server VM 25.0-b70 on 1.8.0-b132 +jit [darwin-x86_64]

Description

あなたの学ぶべきプログラミング言語を紹介します。

Internals

Lisp語族の末裔だと噂のMatzLispの持ち味を活かすことに力入れた。

Limitation

特にない

@zonuexe
Copy link
Author

zonuexe commented Jun 3, 2013

履歴かっこわるいので前のGistを消すところに力を入れた

@zonuexe
Copy link
Author

zonuexe commented Jun 3, 2013

よく見たら括弧の位置がずれてたところを直すことに力を入れた

@zonuexe
Copy link
Author

zonuexe commented Jun 4, 2013

言語の持ち味を活かすことに力を入れた

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment