From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: Modules, libraries, eggs, etc. Date: Tue, 6 Sep 2016 15:55:21 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bea38c44775e1053bdc2db9 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhOAo-0001nE-5X for emacs-orgmode@gnu.org; Tue, 06 Sep 2016 17:44:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhOAl-0001st-Sl for emacs-orgmode@gnu.org; Tue, 06 Sep 2016 17:44:53 -0400 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]:36601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhOAl-0001sj-IO for emacs-orgmode@gnu.org; Tue, 06 Sep 2016 17:44:51 -0400 Received: by mail-wm0-x22c.google.com with SMTP id b187so86120592wme.1 for ; Tue, 06 Sep 2016 14:44:51 -0700 (PDT) In-Reply-To: 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: Lawrence Bottorff Cc: emacs-orgmode Mailinglist --047d7bea38c44775e1053bdc2db9 Content-Type: text/plain; charset=UTF-8 It sounds like you should incorporate some tangling prior to running some blocks so that the external files would exist when required. The only other approach is something like a :session. I don't know if that is setup for scheme/racket though. John ----------------------------------- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Tue, Sep 6, 2016 at 3:17 PM, Lawrence Bottorff wrote: > 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 > --047d7bea38c44775e1053bdc2db9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
It sounds like you should incorporate some tangling prior = to running some blocks so that the external files would exist when required= .

The only other approach is something like a :session. = I don't know if that is setup for scheme/racket though.

John

-----------------------------------
Professor John Kitchin= =C2=A0
Doherty Hall A207F
Department of Chemical Engineering
Carne= gie Mellon University
Pittsburgh, PA 15213
412-268-7803

On Tue, Sep 6, 2016 at 3:17 PM, Lawrence Bot= torff <borgauf@gmail.com> wrote:
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)
=C2=A0 (show " = =C2=A0 ~a =C2=A0 " n #\.)
=C2=A0 (show " .-~a-. " = n #\|)
=C2=A0 (show " | ~a | " n #\space)
=C2= =A0 (show "---~a---" n #\-))
=C2=A0
(define (= show fmt n ch)
=C2=A0 (printf fmt (make-string n ch))
= =C2=A0 (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 -- albei= t in the *Geiser dbg* buffer (or run from the associated REPL ch2):

; -*- geiser-scheme-implementation: racket -*-=
(require "cake.rkt")
(print-cake (random 30)= )


=3D> #<void>
<= br>
=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<= /div>
-----------------------------

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 ent= ire ecosystem is inside Emacs/org-mode? I'd like to have the module par= adigm and have it all inside Emacs/org-mode.

LB

--047d7bea38c44775e1053bdc2db9--