This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| h c | | |
h := Hello new. | |
h m. "'Hello'" | |
h melf. "'Hello'" | |
h muper. "dnu" | |
c := CommaSpaceWorld new. | |
c m. "'Hello World!'" | |
c melf. "'Hello World!'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;; leaflet-quick-start.paren | |
;;; Map and Tile Layers | |
(defvar *default-lat-lng* '(51.505 -0.09)) | |
(defvar *default-zoom* 13) | |
(defvar *map* (ps:chain -l (map "map") (set-view *default-lat-lng* *default-zoom*))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;; react.lisp - Common Lisp/Parenscript wrapper for React v0.11.2 | |
;;; The MIT License (MIT) | |
;;; | |
;;; Copyright (c) 2015 Michael J. Forster | |
;;; | |
;;; Permission is hereby granted, free of charge, to any person obtaining a copy | |
;;; of this software and associated documentation files (the "Software"), to deal | |
;;; in the Software without restriction, including without limitation the rights | |
;;; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;; agent-ui.paren | |
(pt:defcomponent left-main-column () | |
(pt:jsl | |
(:div :class-name "col-md-4" ;; left main column | |
(:div :id "status-box") | |
(:button :class "btn btn-default btn-xs" :on-click (ps:@ this props on-callback-click) "(Re)Schedule Callback") | |
(:button :class "btn btn-default btn-xs" :on-click (ps:@ this props on-last-call-click) "Code Other") | |
(:button :class "btn btn-default btn-xs" :on-click (ps:@ this props on-sale-authorised-click) "Authorise Sale") | |
))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(in-package #:grok-cl-parenscript-react) | |
(hunchentoot:define-easy-handler (handle-tutorial :uri "/tutorial") | |
() | |
(cl-who:with-html-output-to-string (stream) | |
(:html | |
(:head | |
(:title "React Tutorial") | |
(:script :type "text/javascript" :src *react-url*)) | |
(:body |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(in-package #:grok-cl-parenscript-react) | |
(hunchentoot:define-easy-handler (handle-tutorial :uri "/tutorial") | |
() | |
(cl-who:with-html-output-to-string (stream) | |
(:html | |
(:head | |
(:title "React Tutorial") | |
(:script :type "text/javascript" :src *react-url*)) | |
(:body |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- other types, base relvars (tables), derived relvars (views), and functions elided ... | |
create view project_pk_in_campaign_started as | |
select distinct cli_id, prj_id from campaign join campaign_started using (cli_id, cmp_id); | |
create view active_project as | |
select cli_id, prj_id, prj_next_cold_call_limit | |
from project join project_pk_in_campaign_started using (cli_id, prj_id); | |
create view cold_call_queued as select * from cold_call where cc_status = 'queued'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foobar=# begin; create table foo (id serial primary key); alter table foo rename to bar; commit; | |
BEGIN | |
NOTICE: CREATE TABLE will create implicit sequence "foo_id_seq" for serial column "foo.id" | |
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" for table "foo" | |
CREATE TABLE | |
ALTER TABLE | |
COMMIT | |
foobar=# \d | |
List of relations | |
Schema | Name | Type | Owner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro defenum (name (&rest keys)) | |
"Define a function named %NAME, that takes an argument KEY and returns | |
an associated value from KEYS. If KEYS are scalar values, the associated | |
values are zero-based indices." | |
(let ((function-name (intern (format nil "%~:@(~A~)" name)))) | |
(flet ((ensure-alist (list) | |
(let ((i -1)) | |
(mapcar #'(lambda (x) | |
(destructuring-bind (key &optional (value (incf i))) | |
(alexandria:ensure-list x) |