From k.s.matheussen at gmail.com Sun Oct 5 12:35:27 2014 From: k.s.matheussen at gmail.com (Kjetil Matheussen) Date: Sun, 5 Oct 2014 21:35:27 +0200 Subject: [CM] Backtrace in s7 Message-ID: Hi Bil and the rest of you, I've added s7 as an extension language [1] to the 3.0 branch [2] of the Radium music editor [3]. Some details about it: A small web server running inside Radium is communicating with an external python script. This python script functions as a repl for S7 [5]. This method works excellently, since the repl doesn't have to be restarted if radium crashes, and you don't have to run radium (which is quite bloated) from inside emacs (which I'm using as lisp code editor). Right now I'm working on rewriting all the mouse handling in s7, since the current code (written in c) needs to be rewritten anyway, and this is simpler to implement in scheme than in c. S7 has so far been an excellent scheme implementation for me. It's impressively fast (even mysteriously impressively fast, at least for calculating the fibbonacci numbers), the api is dead simple, and it's simple to embed into other programs. It's a quite perfect extension language I would say. But I wonder if it's possible to get a more detailed backtrace if something goes wrong? For instance, if I run the following code: " (define (d) (e)) (define (c) (d)) (define (b) (c)) (define (a) (b)) (a) " I get this response: " syntax-error error message: [ ;e: unbound variable ; /home/kjetil/radium3.0/bin/scheme/mouse/bug.scm[9] ; "/home/kjetil/radium3.0/bin/scheme/mouse/bug.scm", line 2 ; ; d: (e) ; (load "/home/kjetil/radium3.0/bin/scheme/... " Which is good, but sometimes not good enough, since I tend to write a lot of spaghetti-like code. Ideally, something like this would be nice: " ;5. e: unbound variable, bug.scm[2] ;4. (d), bug.scm[4] ;3. (c), bug.scm[6] ;2. (b), bug.scm[8] ;1. (a), bug.scm[9] " I've looked over the documentation, experimented with code that catches exceptions and inspecting data that calls "owlet", but haven't found a way to get the kind of backtrace I want. Is it possible to get this type of backtrace at all? Or perhaps there is a different and perhaps better way to debug an s7 program? I can live without this kind of backtrace though, so it's not a big problem, and certainly not a show stopper. I also have a feature request, which might be a lot of work to implement, but would also be very nice to have. The feature is to give warnings for undefined variables and functions. For instance, if you try to evaluate (define (hello) (let ((hello2 9)) (+ hello2 hello3)) s7 would give a warning if hello3 isn't defined. Guile has recently gotten this feature, and when I developed a small software package for guile earlier this year, it probably saved me a lot of time, since discovering undefined variables and functions in code during runtime is harder and more random than getting a message about it during compile time. I think the lisp language "Shen" also has this feature, and that in Shen you can turn off the warning by using a special macro, I think the name might be "extern" or something like that. (I.e. "(extern hello3)"). Thanks for reading, -Kjetil [1] https://github.com/kmatheussen/radium/blob/3.0/api/protos.conf [2] https://github.com/kmatheussen/radium/tree/3.0 [3] http://users.notam02.no/~kjetism/radium/ [4] https://github.com/kmatheussen/radium/blob/3.0/embedded_scheme/scheme.cpp [5] https://github.com/kmatheussen/radium/blob/3.0/bin/scheme/repl.py -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Sun Oct 5 16:40:37 2014 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Sun, 5 Oct 2014 16:40:37 -0700 Subject: [CM] Backtrace in s7 In-Reply-To: References: Message-ID: <20141005233907.M21614@ccrma.Stanford.EDU> Thanks very much for the praise! > Is it possible to get this type of backtrace at all? Not without slightly rewriting the scheme code -- those are all tail-calls, so there is nothing in the s7 stack that represents the call sequence. Wrap everything in dynamic-winds or the equivalent to get a C-like stacktrace. > The feature is to give > warnings for undefined variables and functions. Ok -- I'll add a switch for this -- did Guile (Andy Wingo?) say why they chose to handle these with warnings? From k.s.matheussen at gmail.com Mon Oct 6 00:57:46 2014 From: k.s.matheussen at gmail.com (Kjetil Matheussen) Date: Mon, 6 Oct 2014 09:57:46 +0200 Subject: [CM] Backtrace in s7 In-Reply-To: <20141005233907.M21614@ccrma.Stanford.EDU> References: <20141005233907.M21614@ccrma.Stanford.EDU> Message-ID: On Mon, Oct 6, 2014 at 1:40 AM, Bill Schottstaedt wrote: > Thanks very much for the praise! > > > Is it possible to get this type of backtrace at all? > > Not without slightly rewriting the scheme code -- those are all > tail-calls, so there is nothing in the s7 stack that represents the > call sequence. Ah, I didn't think of that. > Wrap everything in dynamic-winds or the equivalent > to get a C-like stacktrace. > > Thanks! I don't know what you mean, but I'll experiment with dynamic-winds. > > The feature is to give > > warnings for undefined variables and functions. > > Ok -- I'll add a switch for this -- did Guile (Andy Wingo?) > say why they chose to handle these with warnings? > > I don't quite follow. Do you mean why they started to give these warnings in the first place? (I'm 99% sure it's possible to turn off though, but I haven't been reading the mailing list closely for many years). Or why they don't give errors instead? In the latter, errors would be incorrect. For this code: (define (a) (b)) (define (b) 50) guile gives the following output: " scheme@(guile-user)> (define (a) (b)) ;;; :2:0: warning: possibly unbound variable `b' scheme@(guile-user)> (define (b) 50) scheme@(guile-user)> " But of course, there is actually nothing wrong with the code, so an error would not be appropriate. But maybe Guile has an option to give error instead, I don't know. (of course, guile doesn't give warnings if the functions are defined in the other order: " scheme@(guile-user)> (define (b) 50) scheme@(guile-user)> (define (a) (b)) scheme@(guile-user)> ") -------------- next part -------------- An HTML attachment was scrubbed... URL: From bil at ccrma.Stanford.EDU Mon Oct 6 06:16:58 2014 From: bil at ccrma.Stanford.EDU (Bill Schottstaedt) Date: Mon, 6 Oct 2014 06:16:58 -0700 Subject: [CM] Backtrace in s7 In-Reply-To: References: <20141005233907.M21614@ccrma.Stanford.EDU> Message-ID: <20141006130927.M61845@ccrma.Stanford.EDU> > Do you mean why they started to give >these warnings in the first place? yes -- after googling around for awhile, I think this was introduced in guile 2.0, and is not universally popular -- for example gnucash: ;; Turn off the scheme compiler's "possibly unbound variable" warnings. ;; In guile 2.0 we get nearly 7500 of them loading the scheme files. ;; This is the default value for auto-compilation-options without "unbound-variable". (if (>= (string->number (major-version)) 2) (set! %auto-compilation-options '(#:warnings (arity-mismatch format duplicate-case-datum bad-case-datum)))) I still haven't found any rationale from the guile developers. Anyway, it's probably easy to add a switch. From k.s.matheussen at gmail.com Mon Oct 6 09:05:09 2014 From: k.s.matheussen at gmail.com (Kjetil Matheussen) Date: Mon, 6 Oct 2014 18:05:09 +0200 Subject: [CM] Backtrace in s7 In-Reply-To: <20141006130927.M61845@ccrma.Stanford.EDU> References: <20141005233907.M21614@ccrma.Stanford.EDU> <20141006130927.M61845@ccrma.Stanford.EDU> Message-ID: On Mon, Oct 6, 2014 at 3:16 PM, Bill Schottstaedt wrote: > > Do you mean why they started to give > >these warnings in the first place? > > yes -- after googling around for awhile, I think this was introduced > in guile 2.0, and is not universally popular -- for example gnucash: > > ;; Turn off the scheme compiler's "possibly unbound variable" warnings. > ;; In guile 2.0 we get nearly 7500 of them loading the scheme files. > ;; This is the default value for auto-compilation-options without > "unbound-variable". > (if (>= (string->number (major-version)) 2) > (set! %auto-compilation-options > '(#:warnings (arity-mismatch format duplicate-case-datum > bad-case-datum)))) > > I still haven't found any rationale from the guile developers. Anyway, > it's probably easy to add a switch. > > That would be much appreciated. I guess the usefulness of this varies among programmers. At least I often write the wrong name of a variable, or do a typo, and that quite often too. And getting a message about these minor typos and wrong-namings during compile time is not only a time saver (by not having to run the program in order to discover the error plus spend time figuring out where and why things went wrong), but I guess it can also prevent more long-living bugs. Anyway, I was very thankful to the guile developers for this feature when I made that software package earlier this year, since it saved me a lot of time. -------------- next part -------------- An HTML attachment was scrubbed... URL: From per.bloland at gmail.com Sat Oct 18 16:09:08 2014 From: per.bloland at gmail.com (Per Bloland) Date: Sat, 18 Oct 2014 19:09:08 -0400 Subject: [CM] 2015 ASCAP/SEAMUS Student Commission Competition Message-ID: (apologies for cross-postings) The Society for Electro-Acoustic Music in the United States (SEAMUS) is pleased to announce the 2015 ASCAP/SEAMUS Student Composer Commissioning Program. The purpose of this program is to stimulate student participation in SEAMUS activities, and to encourage young composers to pursue creative endeavors in electro-acoustic music. The program is administered by SEAMUS and funded by the American Society of Composers, Authors and Publishers (ASCAP) . The submission deadline is October 31, 2014. For more information, please visit the ASCAP/SEAMUS Competition information page . To submit via the online application, please visit the current submission site. Please note that you must be a current member of SEAMUS to submit to the competition. You can join or renew your membership at the newly redesigned SEAMUS website, http://www.seamusonline.org/. Joining takes only a few minutes. You must supply your seamusonline username to complete your submission. (Your seamusonline username is independent of your Start Conference, submission username.) If you submitted to the 2014 SEAMUS Conference at Wesleyan, your Start Conference submission username and password are still valid. RULES FOR SUBMISSION All submissions are to be made online, through the submission site. Only one work of electroacoustic music may be submitted, which must adhere to the following guidelines: ? Audio Files: music submissions should include a representative audio recording of the work. If a concert work, it must be the complete composition. Installations may be represented by an excerpted recording not to exceed 10 minutes in length. Judging of music submissions for ASCAP/SEAMUS Student Competition will be from audio files in the MP3 format. Multichannel works will be judged from a stereo mix, also MP3. Please assist us by submitting in MP3 format. Audio files must be prepared as a single LastnameFirstname_audio.MP3. ? Scores: for submissions involving a score, please submit an anonymized PDF score for review. Please do not mail in printed scores. Score submissions must be prepared as LastnameFirstname_score.PDF. ? Video Submissions: note that for works involving video, only the audio portion will be considered for judging purposes. You must be the composer of the music for the video. Please submit an MP3 of the music as specified above. ? Only one (1) entry per student. Other than the filename, please make sure to remove your name from all files, including MP3 metadata and PDF scores. Please limit the total size of all files to 40MB. This same work may be submitted to the SEAMUS 2014 National Conference via the conference submission page. All finalists in the ASCAP/SEAMUS Student Commission Competition must attend the SEAMUS 2014 National Conference. Submissions by High School and Undergraduate students will automatically be considered for the Allen Strange Memorial Award as well. AWARDS A maximum of two prizes may be awarded. The decision of the judges will be final. First Prize ? Commission of $1250 for a new work of electro-acoustic music ? Performance of commissioned work at the 2016 SEAMUS National Conference ? Recording of the commissioned work in the SEAMUS Compact Disc Series ? Certificate of recognition Second Prize ? Commission of $750 for a new work of electro-acoustic music ? Performance of commissioned work at the 2016 SEAMUS National Conference ? Certificate of recognition ELIGIBILITY Applicants to the 2015 ASCAP/SEAMUS Student Commissioning Competition must be student members of SEAMUS and must be either currently enrolled in an academic program in the United States (high school through doctoral studies) or a United States citizen studying abroad. All completed submissions will be verified for student status against current SEAMUS membership records. Per Bloland SEAMUS Member-at-Large -------------- next part -------------- An HTML attachment was scrubbed... URL: