From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lawrence Bottorff Subject: Modules, libraries, eggs, etc. Date: Tue, 6 Sep 2016 15:17:28 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c03c32acea1b3053bdba540 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhLsB-0001c2-B6 for emacs-orgmode@gnu.org; Tue, 06 Sep 2016 15:17:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhLsA-0007Mf-DN for emacs-orgmode@gnu.org; Tue, 06 Sep 2016 15:17:31 -0400 Received: from mail-oi0-x22f.google.com ([2607:f8b0:4003:c06::22f]:35118) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhLsA-0007MV-8r for emacs-orgmode@gnu.org; Tue, 06 Sep 2016 15:17:30 -0400 Received: by mail-oi0-x22f.google.com with SMTP id s131so51576891oie.2 for ; Tue, 06 Sep 2016 12:17:29 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode Mailinglist --94eb2c03c32acea1b3053bdba540 Content-Type: text/plain; charset=UTF-8 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)) => # ....................... .-|||||||||||||||||||||||-. | | ----------------------------- 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 --94eb2c03c32acea1b3053bdba540 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Racket has a nice module system whereby a module is kept i= n a plain text .rkt file. For example,

#lang racket=
(provide print-cake)
; draws a cake with n candles=
(define (print-cake n)
=C2=A0 (show " =C2=A0 = ~a =C2=A0 " n #\.)
=C2=A0 (show " .-~a-. " n #\|)<= /div>
=C2=A0 (show " | ~a | " n #\space)
=C2=A0 (sh= ow "---~a---" n #\-))
=C2=A0
(define (show fm= t n ch)
=C2=A0 (printf fmt (make-string n ch))
=C2=A0 (= newline))

is in cake.rkt so that
<= div>
#+begin_src scheme :session ch2
(require = "cake.rkt")
(print-cake (random 30))
#+end_sr= c

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))
<= div>

=3D> #<void>

=C2=A0 =C2=A0....................... =C2=A0=C2=A0
=C2=A0.-|= ||||||||||||||||||||||-.=C2=A0
=C2=A0| =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0
-----------------------------

So, this me= ans 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 eco= system is inside Emacs/org-mode? I'd like to have the module paradigm a= nd have it all inside Emacs/org-mode.

LB
--94eb2c03c32acea1b3053bdba540--