Skip to content

Instantly share code, notes, and snippets.

describe "Fiddled with Bacon" do
it "supports expect" do
expect(2 + 3).to == 5
end
end
Fiddled with Bacon
- supports expect

Keybase proof

I hereby claim:

  • I am dastels on github.
  • I am dastels (https://keybase.io/dastels) on keybase.
  • I have a public key whose fingerprint is 2A20 D7F0 8D3D 22A6 524D 38D2 5002 6809 F52D 2A21

To claim this, I am signing this object:

@dastels
dastels / gist:9311961
Created March 2, 2014 19:11
Boggle search
def start
(0...15).each do |start_position|
return true if search(@query,
integer_to_yx(start_position),
[integer_to_yx(start_position)])
end
false
end
@dastels
dastels / gist:7847199
Created December 7, 2013 19:12
Specification of frames in iLisp
(describe frame-syntax
(check '{a: 1} '(make-frame a: 1)))
(describe frame-rendering
(check (str (make-frame a: 1)) "{a: 1}"))
(describe naked-symbols
(check a: 'a:))
(describe frame-access
(let ((balance 0)
(root (tap (UIView.)
(.frame= (list '(0 0)
(list (-> *device* .screen .width)
(-> *device* .screen .height))))
(.backgroundColor= (UIColor/whiteColor))))
(balance-label (tap (UILabel.)
(.frame= '((10 10) (80 75)))
(.text= "Balance")))
(let ((w (.window *app*))
(root (.init (UIView.)))
(input (.init (UITextField.)))
(output (.init (UITextField.)))
(convert-f-c (UIButton/buttonWithType: UIButtonTypeSystem))
(convert-c-f (UIButton/buttonWithType: UIButtonTypeSystem))
(close (UIButton/buttonWithType: UIButtonTypeSystem)))
(.frame= root '((10 200) (220 200)))
(.backgroundColor= root (UIColor/lightGrayColor))
@dastels
dastels / with_close.lsp
Created October 2, 2013 05:05
F <-> C converter with a close button
(let ((w (.window *app*))
(root (.init (UIView.)))
(input (.init (UITextField.)))
(output (.init (UITextField.)))
(convert-f-c (UIButton/buttonWithType: UIButtonTypeSystem))
(convert-c-f (UIButton/buttonWithType: UIButtonTypeSystem))
(close (UIButton/buttonWithType: UIButtonTypeSystem)))
(.frame= root '((10 200) (220 200)))
(.backgroundColor= root (UIColor/lightGrayColor))
@dastels
dastels / temperature.lsp
Created October 1, 2013 02:02
another test
(let ((w (.window *app*))
(root (.init (UIView.)))
(input (.init (UITextField.)))
(output (.init (UITextField.)))
(convert-f-c (UIButton/buttonWithType: UIButtonTypeSystem))
(convert-c-f (UIButton/buttonWithType: UIButtonTypeSystem)))
(.frame= root '((10 200) (300 300)))
(.backgroundColor= root (UIColor/lightGrayColor))
(let ((w (.window *app*))
(root (.init (UIView.)))
(input (.init (UITextField.)))
(output (.init (UITextField.)))
(convert-f-c (UIButton/buttonWithType: UIButtonTypeSystem))
(convert-c-f (UIButton/buttonWithType: UIButtonTypeSystem)))
(.frame= root '((10 200) (300 300)))
(.backgroundColor= root (UIColor/lightGrayColor))
@dastels
dastels / gist:6759610
Last active December 24, 2015 06:49
First working GUI iLisp code: a F<->C temperature convertor. Shows use of views, text fields, and buttons with callbacks.
(let ((w (.window *app*))
(root (.init (UIView.)))
(input (.init (UITextField.)))
(output (.init (UITextField.)))
(convert-f-c (UIButton/buttonWithType: UIButtonTypeSystem))
(convert-c-f (UIButton/buttonWithType: UIButtonTypeSystem)))
(.frame= root '((10 200) (300 300)))
(.backgroundColor= root (UIColor/lightGrayColor))