From: Lawrence Bottorff <borgauf@gmail.com>
To: emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>
Subject: Modules, libraries, eggs, etc.
Date: Tue, 6 Sep 2016 15:17:28 -0400 [thread overview]
Message-ID: <CAFAhFSWO1_KM1Rw6QbUP1LHtQoxSDz1V4xEd9NBu5DGiYq+6zQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1080 bytes --]
Racket has a nice module system whereby a module is kept in a plain text
.rkt file. For example,
#lang racket
(provide print-cake)
; draws a cake with n candles
(define (print-cake n)
(show " ~a " n #\.)
(show " .-~a-. " n #\|)
(show " | ~a | " n #\space)
(show "---~a---" n #\-))
(define (show fmt n ch)
(printf fmt (make-string n ch))
(newline))
is in cake.rkt so that
#+begin_src scheme :session ch2
(require "cake.rkt")
(print-cake (random 30))
#+end_src
produces the actual ascii -- albeit in the *Geiser dbg* buffer (or run from
the associated REPL ch2):
; -*- geiser-scheme-implementation: racket -*-
(require "cake.rkt")
(print-cake (random 30))
=> #<void>
.......................
.-|||||||||||||||||||||||-.
| |
-----------------------------
So, this means I can do some Racket in org-mode, but the module side has to
be outside. This seems not so elegant. Is there a babel language where the
entire ecosystem is inside Emacs/org-mode? I'd like to have the module
paradigm and have it all inside Emacs/org-mode.
LB
[-- Attachment #2: Type: text/html, Size: 1682 bytes --]
next reply other threads:[~2016-09-06 19:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-06 19:17 Lawrence Bottorff [this message]
2016-09-06 19:55 ` Modules, libraries, eggs, etc John Kitchin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFAhFSWO1_KM1Rw6QbUP1LHtQoxSDz1V4xEd9NBu5DGiYq+6zQ@mail.gmail.com \
--to=borgauf@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).