]> iEval git - clump.git/commitdiff
Add repl.png and three unused files
authorMarius Gavrilescu <marius@ieval.ro>
Thu, 6 Sep 2018 13:00:06 +0000 (16:00 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Thu, 6 Sep 2018 13:00:06 +0000 (16:00 +0300)
repl.png [new file with mode: 0644]
sbcl-init-for-test.l [new file with mode: 0644]
sbcl-test-script.l [new file with mode: 0644]
write-to-serial.pl [new file with mode: 0644]

diff --git a/repl.png b/repl.png
new file mode 100644 (file)
index 0000000..9beb0ee
Binary files /dev/null and b/repl.png differ
diff --git a/sbcl-init-for-test.l b/sbcl-init-for-test.l
new file mode 100644 (file)
index 0000000..8c97e41
--- /dev/null
@@ -0,0 +1,7 @@
+(defmacro named-lambda (name args &body body)
+  `(labels ((,name ,args ,@body))
+     #',name))
+
+(defun reverse-list (&rest args)
+  (reverse args))
+
diff --git a/sbcl-test-script.l b/sbcl-test-script.l
new file mode 100644 (file)
index 0000000..61a931c
--- /dev/null
@@ -0,0 +1,16 @@
+(defmacro named-lambda (name args &body body)
+  `(labels ((,name ,args ,@body))
+     #',name))
+
+(defun reverse-list (&rest args)
+  (reverse args))
+
+(defun fake-repl ()
+  (do ((+eof+ (gensym)))
+      (nil)
+       (setf - (read *standard-input* nil +eof+))
+       (when (eq - +eof+) (return-from fake-repl))
+       (format t "~A~%" (eval -))))
+
+(setq *print-pretty* 'nil)
+(fake-repl)
diff --git a/write-to-serial.pl b/write-to-serial.pl
new file mode 100644 (file)
index 0000000..24c1d06
--- /dev/null
@@ -0,0 +1,21 @@
+#!/usr/bin/perl
+use v5.14;
+use warnings;
+
+use Device::SerialPort;
+
+my $program;
+read STDIN, $program, 1000000;
+
+my $port = Device::SerialPort->new($ARGV[0] // '/dev/ttyUSB1') or die "$!";
+$port->baudrate(300);
+$port->parity('none');
+$port->databits(8);
+$port->stopbits(2);
+$port->handshake('none');
+
+$port->write_settings or die "$!";
+
+my $bytes_written = $port->write($program);
+my $bytes_to_write = length $program;
+die "Only wrote $bytes_written instead of $bytes_to_write" unless $bytes_written == $bytes_to_write;
This page took 0.021923 seconds and 4 git commands to generate.