guile

How to abbreviate 'note with the same note an octave higher, parenthesized' in Lilypond?

非 Y 不嫁゛ 提交于 2019-12-05 08:17:15
Currently I write lilypond code that looks like this: \version "2.14.2" P = #parenthesize \relative c, { \clef bass <c \P c'> <e \P e'> <g \P g'>2 <c, \P c'>4 <d \P d'> <e \P e'>2 } where I repeatedly mean ' this note, together with the same note one octave higher, parenthesized'. I'd like a way to abbreviate this, so that I can write something like this: \version "2.14.2" poct = ... \relative c, { \clef bass \poct c \poct e \poct g2 \poct c,4 \poct d \poct e2 } As suggested in a helpful answer to an earlier question of mine , I have tried to use a music function , but there is no way I can

Execute command line from Scheme (Guile)

混江龙づ霸主 提交于 2019-12-04 05:24:59
The question is described on the title, basically I'd like to execute a command line from scheme, let's say 'ls' and obtaining the output. So my questions are: Is it possible? How? Thanks a lot in advance! By the way I use Guille. You need one of these system and system* . Example: (system "ls") From the documentation: Guile Reference — Scheme Procedure: system [cmd] — C Function: scm_system (cmd) Execute cmd using the operating system's “command processor”. Under Unix this is usually the default shell sh. The value returned is cmd's exit status as returned by waitpid, which can be interpreted

Lisp Web Frameworks? [closed]

旧街凉风 提交于 2019-11-28 15:16:12
What are the popular (ok, popular is relative) web frameworks for the various flavours of LISP? Matthias Benkard PLT Scheme features a built-in, continuation-based web server . Update: PLT Scheme is now called Racket. Hunchentoot is also quite widespread What is Weblocks? Weblocks is a continuations-based web framework written in Common Lisp. http://common-lisp.net/project/cl-weblocks/ Most (perhaps all) of the well-known Common Lisp web frameworks have already been mentioned, so I'll just add some comments. Hunchentoot is not a "web framework" in the sense that most people mean. It's an HTTP

Implement yield and send in Scheme

扶醉桌前 提交于 2019-11-27 23:19:47
I'm trying to port yield and yield from from Python to Scheme. Here is an implementation I've done: (define (coroutine routine) (let ((current routine) (status 'new)) (lambda* (#:optional value) (let ((continuation-and-value (call/cc (lambda (return) (let ((returner (lambda (value) (call/cc (lambda (next) (return (cons next value))))))) (if (equal? status 'new) (begin (set! status 'running) (current returner)) (current (cons value returner))) (set! status 'dead)))))) (if (pair? continuation-and-value) (begin (set! current (car continuation-and-value)) (cdr continuation-and-value)) continuation

Lisp Web Frameworks? [closed]

心已入冬 提交于 2019-11-27 09:07:27
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . What are the popular (ok, popular is relative) web frameworks for the various flavours of LISP? 回答1: PLT Scheme features a built-in, continuation-based web server. Update: PLT Scheme is now called Racket. 回答2: Hunchentoot is also quite widespread 回答3: What is Weblocks? Weblocks is a continuations-based web