[plt-scheme] Easter egg on my face

From: pedro pinto (pedro.e.pinto at gmail.com)
Date: Tue Aug 30 21:37:30 EDT 2005

My Dr Scheme (v299.200, windows XP) stopped working. As soon as I type 
something on the definitions pane CPU usage goes to 100% and that's all she 
wrote. I suspect the issue is related to today's Easter egg (is that Eli? is 
a happy birthday in order?) as it started happening right after it was 
displayed. 
   -pp


 On 8/30/05, plt-scheme-request at list.cs.brown.edu <
plt-scheme-request at list.cs.brown.edu> wrote: 
> 
> Send plt-scheme mailing list submissions to
> plt-scheme at list.cs.brown.edu
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> or, via email, send a message with subject or body 'help' to
> plt-scheme-request at list.cs.brown.edu
> 
> You can reach the person managing the list at
> plt-scheme-admin at list.cs.brown.edu
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of plt-scheme digest..."
> 
> 
> [Please handle PLT Scheme list administrative tasks through the Web:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme]
> 
> 
> Today's Topics:
> 
> 1. changed policy for native libraries? (David Herman)
> 2. SXML and JavaScript (Arend P. van der Veen)
> 3. Re: SXML and JavaScript (David Herman)
> 4. Re: changed policy for native libraries? (David Herman)
> 5. Re: changed policy for native libraries? (David Herman)
> 6. Re: changed policy for native libraries? (Matthew Flatt)
> 7. Re: changed policy for native libraries? (David Herman)
> 8. modules, autodoc, and the drscheme multimedia format (Corey Sweeney)
> 9. Re: modules, autodoc, and the drscheme multimedia format (Matthew 
> Flatt)
> 10. Announcing DivaScheme: voice-based program editing (Shriram 
> Krishnamurthi)
> 11. FFI stuff: getting a fileno file descriptor from an input port? (Danny 
> Yoo)
> 12. Re: FFI stuff: getting a fileno file descriptor from an input port? 
> (Matthew Flatt)
> 
> --__--__--
> 
> Message: 1
> To: PLT Scheme <plt-scheme at list.cs.brown.edu>
> From: David Herman <dherman at ccs.neu.edu>
> Date: Mon, 29 Aug 2005 09:51:44 -0400
> Subject: [plt-scheme] changed policy for native libraries?
> 
> Has the policy changed for when mzscheme loads a native library
> instead of an .ss file? I've updated to the latest nightly binary and
> all of a sudden the scheme-pg package won't load the native version
> of its back-end module. I've made sure the .so file has a newer time-
> stamp than the .ss file.
> 
> Help!
> 
> Thanks,
> Dave
> 
> 
> --__--__--
> 
> Message: 2
> Date: Mon, 29 Aug 2005 10:17:41 -0400
> From: "Arend P. van der Veen" <apvanderveen at att.net>
> To: PLT Scheme List <plt-scheme at list.cs.brown.edu>
> Subject: [plt-scheme] SXML and JavaScript
> 
> Hi,
> 
> I am trying to use SXML with some javascript code. The problem that I
> having is that the <, > ect in javascript are being escape sequenced.
> For example,
> 
> (html
> (head
> (title ,(alist-get 'title properties))
> (script (@ (language "Javascript")(type "text/javascript"))
> "
> function isblank(s) {
> if (s = null) || (s = \"\")
> return true;
> else {
> for (var i=0;i<s.length'i++) {
> var c = s.charAt(i);
> if ((c ~= ' ') && (c != '\n') && (c != '')) return false;
> }
> }
> return true;
> }
> "
> )))
> 
> becomes:
> 
> <html><head><title>Test</title>
> <script language="Javascript" type="text/javascript">
> function isblank(s) {
> if (s = null) || (s = &quot;&quot;)
> return true;
> else {
> for (var i=0;i&lt;s.length'i++) {
> var c = s.charAt(i);
> if ((c ~= ' ') &amp;&amp; (c != '
> ') &amp;&amp; (c != '')) return false;
> }
> }
> return true;
> }
> </script></head></html>
> 
> Any help in how to support this would be great.
> 
> Thanks,
> Arend
> 
> 
> 
> --__--__--
> 
> Message: 3
> Cc: PLT Scheme List <plt-scheme at list.cs.brown.edu>
> From: David Herman <dherman at ccs.neu.edu>
> Subject: Re: [plt-scheme] SXML and JavaScript
> Date: Mon, 29 Aug 2005 10:51:46 -0400
> To: "Arend P. van der Veen" <apvanderveen at att.net>
> 
> Did you try the standard CDATA trick?
> 
> <script type="text/javascript">
> // <![CDATA[
> function isPositive(n) {
> return (n > 0);
> }
> // ]]>
> </script>
> 
> See also:
> 
> http://javascript.about.com/library/blxhtml.htm
> 
> HTH,
> Dave
> 
> On Aug 29, 2005, at 10:17 AM, Arend P. van der Veen wrote:
> 
> > Hi,
> >
> > I am trying to use SXML with some javascript code. The problem
> > that I having is that the <, > ect in javascript are being escape
> > sequenced. For example,
> >
> > (html
> > (head
> > (title ,(alist-get 'title properties))
> > (script (@ (language "Javascript")(type "text/javascript"))
> > "
> > function isblank(s) {
> > if (s = null) || (s = \"\")
> > return true;
> > else {
> > for (var i=0;i<s.length'i++) {
> > var c = s.charAt(i);
> > if ((c ~= ' ') && (c != '\n') && (c != '')) return false;
> > }
> > }
> > return true;
> > }
> > "
> > )))
> >
> > becomes:
> >
> > <html><head><title>Test</title>
> > <script language="Javascript" type="text/javascript">
> > function isblank(s) {
> > if (s = null) || (s = &quot;&quot;)
> > return true;
> > else {
> > for (var i=0;i&lt;s.length'i++) {
> > var c = s.charAt(i);
> > if ((c ~= ' ') &amp;&amp; (c != '
> > ') &amp;&amp; (c != '')) return false;
> > }
> > }
> > return true;
> > }
> > </script></head></html>
> >
> > Any help in how to support this would be great.
> >
> > Thanks,
> > Arend
> >
> >
> > For list-related administrative tasks:
> > http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> >
> 
> 
> --__--__--
> 
> Message: 4
> Cc: PLT Scheme <plt-scheme at list.cs.brown.edu>
> From: David Herman <dherman at ccs.neu.edu>
> Subject: Re: [plt-scheme] changed policy for native libraries?
> Date: Mon, 29 Aug 2005 11:02:11 -0400
> To: David Herman <dherman at ccs.neu.edu>
> 
> I think I got it -- web-server-text3m seems to handle PLTCOLLECTS
> incorrectly.
> 
> Dave
> 
> On Aug 29, 2005, at 9:51 AM, David Herman wrote:
> 
> > Has the policy changed for when mzscheme loads a native library
> > instead of an .ss file? I've updated to the latest nightly binary
> > and all of a sudden the scheme-pg package won't load the native
> > version of its back-end module. I've made sure the .so file has a
> > newer time-stamp than the .ss file.
> >
> > Help!
> >
> > Thanks,
> > Dave
> >
> > For list-related administrative tasks:
> > http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> >
> 
> 
> --__--__--
> 
> Message: 5
> Cc: PLT Scheme <plt-scheme at list.cs.brown.edu>
> From: David Herman <dherman at ccs.neu.edu>
> Subject: Re: [plt-scheme] changed policy for native libraries?
> Date: Mon, 29 Aug 2005 11:10:55 -0400
> To: David Herman <dherman at ccs.neu.edu>
> 
> Okay, now I really get it. I see I have to build the native library
> separately with mzc3m if I want to load it from mzscheme3m or web-
> server-text3m. Sorry for the flurry of emails.
> 
> Dave
> 
> On Aug 29, 2005, at 11:02 AM, David Herman wrote:
> 
> > I think I got it -- web-server-text3m seems to handle PLTCOLLECTS
> > incorrectly.
> >
> > Dave
> >
> > On Aug 29, 2005, at 9:51 AM, David Herman wrote:
> >
> >
> >> Has the policy changed for when mzscheme loads a native library
> >> instead of an .ss file? I've updated to the latest nightly binary
> >> and all of a sudden the scheme-pg package won't load the native
> >> version of its back-end module. I've made sure the .so file has a
> >> newer time-stamp than the .ss file.
> >>
> >> Help!
> >>
> >> Thanks,
> >> Dave
> >>
> >> For list-related administrative tasks:
> >> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> >>
> >>
> >
> >
> 
> 
> --__--__--
> 
> Message: 6
> From: Matthew Flatt <mflatt at cs.utah.edu>
> To: David Herman <dherman at ccs.neu.edu>
> Cc: PLT Scheme <plt-scheme at list.cs.brown.edu>
> Subject: Re: [plt-scheme] changed policy for native libraries?
> Date: Mon, 29 Aug 2005 09:26:03 -0600
> 
> At Mon, 29 Aug 2005 11:10:55 -0400, David Herman wrote:
> > Okay, now I really get it. I see I have to build the native library
> > separately with mzc3m if I want to load it from mzscheme3m or web-
> > server-text3m.
> 
> No, using mzc3m is the same as using mzc. (It just runs the compiler
> via MzScheme3m instead of MzScheme.)
> 
> The short answer is that I need to write proper documentation for
> making extensions compatible with 3m. I will do that soon; let me know
> if it can't wait a few days.
> 
> Matthew
> 
> 
> --__--__--
> 
> Message: 7
> Cc: PLT Scheme <plt-scheme at list.cs.brown.edu>
> From: David Herman <dherman at ccs.neu.edu>
> Subject: Re: [plt-scheme] changed policy for native libraries?
> Date: Mon, 29 Aug 2005 11:29:52 -0400
> To: Matthew Flatt <mflatt at cs.utah.edu>
> 
> Okay. I just noticed the (system-library-subpath) is different for
> 3m, which explains why it wasn't noticing the native-compiled
> library. I'm just going to continue using the imprecise collector for
> now.
> 
> I suppose I can wait a few days for the documentation on making 3m-
> compatible extensions, since I don't really have the time to modify
> the scheme-pg extension anyway. But if you don't mind, please let me
> know when you have added that documentation.
> 
> Thanks,
> Dave
> 
> On Aug 29, 2005, at 11:26 AM, Matthew Flatt wrote:
> 
> > At Mon, 29 Aug 2005 11:10:55 -0400, David Herman wrote:
> >
> >> Okay, now I really get it. I see I have to build the native library
> >> separately with mzc3m if I want to load it from mzscheme3m or web-
> >> server-text3m.
> >>
> >
> > No, using mzc3m is the same as using mzc. (It just runs the compiler
> > via MzScheme3m instead of MzScheme.)
> >
> > The short answer is that I need to write proper documentation for
> > making extensions compatible with 3m. I will do that soon; let me know
> > if it can't wait a few days.
> >
> > Matthew
> >
> >
> 
> 
> --__--__--
> 
> Message: 8
> Date: Mon, 29 Aug 2005 13:30:13 -0500
> From: Corey Sweeney <corey.sweeney at gmail.com>
> To: PLT Scheme List <plt-scheme at list.cs.brown.edu>
> Subject: [plt-scheme] modules, autodoc, and the drscheme multimedia format
> 
> Does there exist a "autodoc" system for the module system? Nothing
> fancy. I'm not even looking for full prototypes, just the name of the
> provided functions. For example, suppose I had the following
> "thin-client.ss" file:
> 
> (module thin-client (lib "plt-pretty-big-text.ss" "lang")
> blah
> blah
> blah
> (provide (all-defined)))
> 
> <<then do something like:>>
> 
> bash $ drdoc thin-client.ss
> 
> <<and get something like:>>
> 
> module name: thin-client
> 
> procedures:
> connect-to-server
> =20
> disconnect-from-server
> 
> 
> ------------
> 
> or, another option... Is there a way to access the drscheme
> multimedia format? Currently for text .scm files, I wrote a script
> that greps for defines and ';**' comments at the end of a line which
> are used to mark a line as important to go in the summary. But many
> files in the drscheme multimedia format are inaccessable to me. I
> realize that I could export every file to "text format", and then grep
> through those, but I'm hoping for a automatic process in which with
> once command i'll be able to generate all my documentation.
> 
> ---
> 
> i found "(lookup-documentation module-path-v label-sym)",in the docs,
> but i can't figure what "label-sym" is supposed to be. My guess is
> that it's a user-defined symbol that lets you insert documentation
> into the middle of the code, and you write a function to extract it
> and print it as you want. (which is cool, and i might use in the
> future). But I was hoping for auto-extraction of my unmodified
> sources. I tried:
> 
> (provide-and-document
> (all-defined)), but that didn't work.
> 
> Is there more info on how to use this?=20
> 
> -----
> 
> Oh, and if it matters, my modules are actually wrappers. So my
> thin-client.ss file is actually:
> 
> (module thin-client (lib "plt-pretty-big-text.ss" "lang")
> (require (lib "lib-general.ss" "general"))
> (require (lib "include.ss"))
> (include "thin.client.scm")
> (provide (all-defined)))
> 
> 
> 
> 
> Corey
> 
> 
> --__--__--
> 
> Message: 9
> From: Matthew Flatt <mflatt at cs.utah.edu>
> To: Corey Sweeney <corey.sweeney at gmail.com>
> Cc: PLT Scheme List <plt-scheme at list.cs.brown.edu>
> Subject: Re: [plt-scheme] modules, autodoc, and the drscheme multimedia 
> format
> Date: Mon, 29 Aug 2005 14:57:19 -0600
> 
> At Mon, 29 Aug 2005 13:30:13 -0500, Corey Sweeney wrote:
> > or, another option... Is there a way to access the drscheme
> > multimedia format? Currently for text .scm files, I wrote a script
> > that greps for defines and ';**' comments at the end of a line which
> > are used to mark a line as important to go in the summary. But many
> > files in the drscheme multimedia format are inaccessable to me. I
> > realize that I could export every file to "text format", and then grep
> > through those, but I'm hoping for a automatic process in which with
> > once command i'll be able to generate all my documentation.
> 
> For now, you have to load it into a text% and use
> `open-input-text-editor'.
> 
> I intend to replace the current binary format with an S-expression
> format, but I don't have an ETA for that.
> 
> > i found "(lookup-documentation module-path-v label-sym)",in the docs,
> > but i can't figure what "label-sym" is supposed to be.
> 
> It's the `doc-label-id' of `provide-and-document', which is an
> experimental documentation system that I think doesn't work right.
> 
> > (provide-and-document
> > (all-defined)), but that didn't work.
> >
> > Is there more info on how to use this?
> 
> See the docs for `provide-and-document' (with the caveat that I
> implemented it and I don't like it). This form has a different syntax
> than `provide'.
> 
> Matthew
> 
> 
> --__--__--
> 
> Message: 10
> Date: Mon, 29 Aug 2005 20:15:01 -0400
> From: Shriram Krishnamurthi <shriram at gmail.com>
> Reply-To: sk at cs.brown.edu
> To: plt-scheme at list.cs.brown.edu
> Subject: [plt-scheme] Announcing DivaScheme: voice-based program editing
> 
> DivaScheme
> ...for times when you wish your doctor would listen
> 
> DivaScheme enhances DrScheme with voice-based program editing.
> DivaScheme's commands support both the creation of new code and the
> modification of existing code.
> 
> DivaScheme introduces a command shell, the Diva Box, that recognizes
> the system's commands. These commands can be entered by voice
> dictation, via keyboard shortcuts, or by typing them in full (as when
> employing an amanuensis). Using these commands results in a form of
> structured program editing. DivaScheme is sensitive to the current
> language level and knows the language constructs defined at that level
> (but only for the Scheme variants). The current version does not
> recognize macro-based programmer extensions to the language.
> 
> DivaScheme does not itself perform voice recognition; we instead
> expect users to employ their favorite voice recognition system. We
> have tested DivaScheme using the commercial Dragon Naturally Speaking
> package. We look forward to user feedback on their experiences.
> 
> You can find the software and installation instructions at
> 
> http://www.cs.brown.edu/research/plt/software/divascheme/
> 
> DivaScheme was designed and implemented by Romain Legendre, Guillaume
> Marceau, Kathi Fisler and Shriram Krishnamurthi. We thank Jay
> McCarthy for his help.
> 
> 
> --__--__--
> 
> Message: 11
> Date: Mon, 29 Aug 2005 19:08:39 -0700 (PDT)
> From: Danny Yoo <dyoo at hkn.eecs.berkeley.edu>
> To: plt-scheme at list.cs.brown.edu
> Subject: [plt-scheme] FFI stuff: getting a fileno file descriptor from an 
> input port?
> 
> Hi everyone,
> 
> 
> I'm starting to play with the foreign function interface; the FFI paper:
> 
> http://repository.readscheme.org/ftp/papers/sw2004/barzilay.pdf
> 
> mentions an implementation of c-read:
> 
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> (define c-read
> (get-ffi-obj "read" "libc.so.6"
> (_fun _int
> (buf : _string)
> (_int : (string-length buf))
> -> _int)))
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> 
> which is lovely. But, unfortunately, I'm not quite sure how to call this.
> *grin* Basically, I wanted to do something like:
> 
> (c-read (current-input-port) (make-string 20))
> 
> but this didn't work, of course:
> 
> ##################################
> > (define buf (make-string 20))
> > (procedure-arity c-read)
> > (c-read (current-input-port) buf)
> Scheme->C: expects argument of type <int32>; given #<input-port:stdin>
> ##################################
> 
> 
> The first argument should be a file descriptor integer, but I haven't
> figured out a clean way to get a file descriptor from a file port. I'm
> assuming that this is non-obvious because:
> 
> http://list.cs.brown.edu/pipermail/plt-scheme/2003-October/003588.html
> 
> uses "cffi.ss" to call fileno:
> 
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> (define stdin-fileno (c-lambda () int
> "___result = fileno(stdin);
> "))
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> 
> 
> I've been staring at src/mzscheme/src/port.c, and see that it has a FILE*
> structure, so I'm pretty sure that I can use cffi to access that
> structure. But I'm wondering if there's a way to get at the fileno of an
> arbitrary file input port without having to invoke the compiler: I'd like
> to avoid cffi if that's possible.
> 
> The closest I've been able to find in the Mzscheme manual is the function
> port-file-identity, which isn't quite right, but is close.
> 
> 
> Thanks for any help!
> 
> 
> --__--__--
> 
> Message: 12
> From: Matthew Flatt <mflatt at cs.utah.edu>
> To: Danny Yoo <dyoo at hkn.eecs.berkeley.edu>
> Cc: plt-scheme at list.cs.brown.edu
> Subject: Re: [plt-scheme] FFI stuff: getting a fileno file descriptor from 
> an input port?
> Date: Mon, 29 Aug 2005 20:26:34 -0600
> 
> At Mon, 29 Aug 2005 19:08:39 -0700 (PDT), Danny Yoo wrote:
> > mentions an implementation of c-read:
> >
> > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> > (define c-read
> > (get-ffi-obj "read" "libc.so.6"
> > (_fun _int
> > (buf : _string)
> > (_int : (string-length buf))
> > -> _int)))
> > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> > [...]
> > The first argument should be a file descriptor integer, but I haven't
> > figured out a clean way to get a file descriptor from a file port. [...]
> >
> > I've been staring at src/mzscheme/src/port.c, and see that it has a 
> FILE*
> > structure, so I'm pretty sure that I can use cffi to access that
> > structure.
> 
> FILE* ports and file-descriptor ports are different. FILE* ports
> aren't used unless some extension or embedding program creates them.
> 
> Extracting the file descriptor for a port is not easy. You'd have
> to go through the `port_data' field of an import port or output port;
> it will refer to a Scheme_FD struct, which contains an fd field. The
> Scheme_FD struct is private to "port.c".
> 
> If it's useful, we could add a scheme_get_port_file_descriptor()
> function to MzScheme. You want to do more than just call read() I take
> it (since MzScheme already provides `read-bytes!')?
> 
> Matthew
> 
> 
> 
> 
> End of plt-scheme Digest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20050830/7529e0f5/attachment.html>

Posted on the users mailing list.