Re: [racket] Hosting other languages on Racket

2010-09-21 Thread Sam Tobin-Hochstadt
On Tue, Sep 21, 2010 at 2:55 PM, Grant Rettke wrote: > Is there a precedent for hosting other languages on the Racket VM in > the same way that JRuby and Clojure live in the JVM or F# and > IronPython live on the CLR? See the Algol60 experimental language, the #lang datalog language, Dave Herman'

Re: [racket] Hosting other languages on Racket

2010-09-21 Thread Sam Tobin-Hochstadt
On Tue, Sep 21, 2010 at 3:11 PM, Neil Van Dyke wrote: > Jay McCarthy wrote at 09/21/2010 03:02 PM: >> >> We already have hosted Javascript, Algol 60, Datalog, R5RS, and R6RS. In >> the past, we've had version of Java in the core. We have Python and SML out >> there from people at Utah. >> > > Do t

Re: [racket] match plus #:super structs => no nice fit?

2010-09-21 Thread Sam Tobin-Hochstadt
On Tue, Sep 21, 2010 at 5:31 PM, John Clements wrote: > It looks to me like match doesn't work nicely with #:super structs.  For > instance, this program: [snip] > It's easy to work around this, but it would be nice if it worked.  Am I > missing something obvious? I don't know if it's obvious

Re: [racket] match plus #:super structs => no nice fit?

2010-09-21 Thread Sam Tobin-Hochstadt
On Tue, Sep 21, 2010 at 5:45 PM, Ryan Culpepper wrote: > On 09/21/2010 03:36 PM, Sam Tobin-Hochstadt wrote: >> >> On Tue, Sep 21, 2010 at 5:31 PM, John Clements >>  wrote: >>> >>> It looks to me like match doesn't work nicely with #:super structs.

Re: [racket] TR error message

2010-09-21 Thread Sam Tobin-Hochstadt
On Tue, Sep 21, 2010 at 10:31 PM, Matthias Felleisen wrote: > > On Sep 21, 2010, at 9:01 PM, Shriram Krishnamurthi wrote: > >> If so why are many of the combinations missing? > > Because this is work in progress to support typed-based optimizations. > Roughly speaking, with types TR can macro-gen

Re: [racket] TR error message

2010-09-22 Thread Sam Tobin-Hochstadt
On Wed, Sep 22, 2010 at 7:39 AM, Shriram Krishnamurthi wrote: > Sorry, I still didn't get an answer to my basic question, which is how > to READ this message. Each line specifies a possible legal argument list. For example, the line: > Fixnum Zero specifies that it's legal to provide two argu

Re: [racket] TR error message

2010-09-22 Thread Sam Tobin-Hochstadt
On Wed, Sep 22, 2010 at 7:54 AM, Shriram Krishnamurthi wrote: > Thanks!  If I call < w/ three args I get the same output.  Shouldn't I > see three per line?  Or should I read it as "The last line subsumes > that case, the other lines indicate cases in which the optimizer can > work -- ie, there's

Re: [racket] TR error message

2010-09-22 Thread Sam Tobin-Hochstadt
On Wed, Sep 22, 2010 at 8:25 AM, Shriram Krishnamurthi wrote: > That is, the others are surely subsumed by some more > general type, and the error message can merely print the "least > subsumed" type(s) relative to the arguments. Yes, definitely. That's what I meant by: > Of course, in this ca

Re: [racket] Typed Racket blows a gasket on seeing a keyword

2010-09-24 Thread Sam Tobin-Hochstadt
On Thu, Sep 23, 2010 at 9:15 PM, Shriram Krishnamurthi wrote: > I don't know whether this is considered a "bug", so I'm not going to > annoy anyone by submitting a bug report, I don't speak for other people on this, but I always prefer bug reports if you think there's a problem with Typed Racket

Re: [racket] empty in patterns

2010-09-29 Thread Sam Tobin-Hochstadt
On Wed, Sep 29, 2010 at 8:14 AM, Shriram Krishnamurthi wrote: > Is it correct that one can write (cons a d) in a pattern, but not empty?   > Thus, > > (define (insert-many ns s) >  (match ns >    [(? empty?) s] >    [(cons a d) (insert a >                        (insert-many d s))])) > > works bu

Re: [racket] Checking infinite loops

2010-10-04 Thread Sam Tobin-Hochstadt
On Mon, Oct 4, 2010 at 12:02 PM, Stephen Bloch wrote: >  I don't know how much progress has been made on loop-checkers that "work > well enough in practice." I think the most practical work here is Microsoft's Terminator project: https://research.microsoft.com/en-us/um/cambridge/projects/termina

Re: [racket] Counter servlet

2010-10-13 Thread Sam Tobin-Hochstadt
On Wed, Oct 13, 2010 at 11:11 AM, Mark Carter wrote: > Has anyone managed to install Racket for the Amazon EC2 cloud? I managed to > compile it on a stock Fedora 8 micro image, but I couldn't quite get make > install to work. Everything was slow, and I was wondering if it was actually > the > fa

Re: [racket] a small programming exercise

2010-10-14 Thread Sam Tobin-Hochstadt
On Thu, Oct 14, 2010 at 12:18 PM, Shriram Krishnamurthi wrote: > It would seem TR should not take much longer than regular Run. There are a lot of things that make TR much slower than regular compilation. 1. `local-expand' makes everything slower. 2. TR necessarily involves multiple passes over

Re: [racket] a small programming exercise

2010-10-14 Thread Sam Tobin-Hochstadt
On Thu, Oct 14, 2010 at 10:22 AM, Jay McCarthy wrote: > I wrote mine in Racket then converted to Typed Racket. Attached is a different version of Jay's original code, ported to Typed Racket. There are 4 changes to the runtime code: 1. use `vector-set!' and `vector-ref' instead of `dict-update!'

Re: [racket] a small programming exercise

2010-10-14 Thread Sam Tobin-Hochstadt
On Thu, Oct 14, 2010 at 2:35 PM, Matthias Felleisen wrote: > Question is whether we can learn from your rewrite how to write a Guide on > Type Conversion for expert Racket programmers. -- Matthias There's only 1 entry in the Guide from that rewrite: - Whenever you get an error involving a polym

Re: [racket] How to use typed/racket within Emacs and scheme top level ???

2010-10-18 Thread Sam Tobin-Hochstadt
On Sun, Oct 17, 2010 at 9:32 PM, Hari Prashanth wrote: > Currently Typed Racket at repl does not completely work... Yes, and this is likely to remain the case, at least in general. Typed Racket is designed to be used in modules. The REPL is supported for simple interactions, but the form-at-a-ti

[racket] A Workshop on Racket

2010-11-01 Thread Sam Tobin-Hochstadt
. Filling out the survey doesn't commit you to anything. If you have any other comments, questions, or feedback, please send them to me directly. For the organizers, Sam Tobin-Hochstadt _ For list-related administrative tasks: http://lists.r

Re: [racket] Writing type predicates in typed/racket

2010-11-06 Thread Sam Tobin-Hochstadt
On Sat, Nov 6, 2010 at 6:52 PM, Eric Dobson wrote: > I don't think that define-predicate will give me a constant time > branch? because it returns something of type (Any -> Boolean : t), and > so can't use the fact that the car and cdr are num-trees without > checking it. `define-predicate' shoul

Re: [racket] new GUI and drawing libraries in v5.0.99.1

2010-11-07 Thread Sam Tobin-Hochstadt
On Sun, Nov 7, 2010 at 8:22 AM, Jakub Piotr Cłapa wrote: > > I downloaded Racket v5.0.99.1 for OS X Intel and I cannot find the required > libraries in the package: > > [...@jpc Racket v5.0.99.1] ls -lR|grep pixman > [...@jpc Racket v5.0.99.1] > > Have I missed something? The libraries are automa

Re: [racket] Writing type predicates in typed/racket

2010-11-07 Thread Sam Tobin-Hochstadt
On Sun, Nov 7, 2010 at 10:40 AM, Eric Dobson wrote: > I ran a test and it looks like define-predicate is not constant time, > is there a way for me to write branch? that is constant time? > Otherwise a traversal algorithm turns from linear to quadratic. So, it looks like TR is failing to prove th

Re: [racket] Lisp game development on Reddit

2010-11-08 Thread Sam Tobin-Hochstadt
On Mon, Nov 8, 2010 at 10:38 PM, Matthias Felleisen wrote: > > We should start with a Racket version for Land of Lisp. > It would be much nicer in the Universe world than in an > old Lisp world. David Van Horn has already started on writing some of the LoL programs in Universe. -- sam th sa...@c

Re: [racket] member et al.

2010-11-10 Thread Sam Tobin-Hochstadt
On Wed, Nov 10, 2010 at 9:29 PM, Mark Engelberg wrote: > Racket still offers several primitives, such as member, that are > primarily used as predicates, but don't actually return a Boolean. > Racket's cond handles any of these return values as true, but now that > Racket is gravitating towards co

Re: [racket] member et al.

2010-11-11 Thread Sam Tobin-Hochstadt
On Thu, Nov 11, 2010 at 12:21 AM, Mark Engelberg wrote: > > I could loosen the types of these Booleans to be Any, but then I'm not > really reflecting the "predicate intent" of these functions. This seems to be your primary issue. But I don't see why it's a problem. In particular, you were happ

Re: [racket] member et al.

2010-11-11 Thread Sam Tobin-Hochstadt
On Thu, Nov 11, 2010 at 2:07 PM, Mark Engelberg wrote: > Is Typed Racket able to observe that if the arguments to and/or are > all Booleans, then the result will definitely be a Boolean?  If so, > then and/or's flexible behavior in no way diminishes the value of > having "true predicates" availab

Re: [racket] separate big source into several files

2010-11-12 Thread Sam Tobin-Hochstadt
On Fri, Nov 12, 2010 at 8:43 PM, 김태윤 wrote: > I am trying to separate big source file into several files > (each files should use each others' definition mutually) You want units: http://docs.racket-lang.org/guide/units.html -- sam th sa...@ccs.neu.edu

Re: [racket] Getting context info from ellipses pattern vars when calling DATUM->SYNTAX

2010-11-14 Thread Sam Tobin-Hochstadt
On Sat, Nov 13, 2010 at 5:09 PM, D Marshall wrote: > > I understand that DATUM->SYNTAX gets it's context > information from it's first argument.  I have no problems > when using simple (non-ellipses) pattern variables, however, > I haven't been unable to get a strictly "ellipses pattern" > to work

Re: [racket] Getting context info from ellipses pattern vars when calling DATUM->SYNTAX

2010-11-14 Thread Sam Tobin-Hochstadt
On Sun, Nov 14, 2010 at 9:57 PM, Jon Rafkind wrote: > On 11/14/2010 07:52 PM, Sam Tobin-Hochstadt wrote: >> On Sat, Nov 13, 2010 at 5:09 PM, D Marshall wrote: >>> I understand that DATUM->SYNTAX gets it's context >>> information from it's first argument.  

Re: [racket] Typed macros in untyped code

2010-11-18 Thread Sam Tobin-Hochstadt
On Thu, Nov 18, 2010 at 7:48 PM, Neil Toronto wrote: > Why aren't typed macros allowed to be used in untyped code? Don't the > annotation forms like (: ...) expand to no-ops? This is an important limitation - the typed macros have access to the unprotected versions of the typed identifiers from t

Re: [racket] recommendations how to use Typed Racket with rackunit?

2010-11-28 Thread Sam Tobin-Hochstadt
On Sun, Nov 28, 2010 at 12:41 PM, keyd...@gmx.de wrote: > Hi, > > changing some typed racket code from using define-struct: to struct:, I have > problems getting my test code to run. > While still using define-struct:, I had a language specification of #lang > typed/racket/no-check, because omit

Re: [racket] recommendations how to use Typed Racket with rackunit?

2010-11-29 Thread Sam Tobin-Hochstadt
On Mon, Nov 29, 2010 at 3:20 PM, keyd...@gmx.de wrote: >> Check out the `racket/load' language for exactly this purpose. > > Sorry I don't get it - is there a way I could use it to have both struct: and > not get the syntax error? > I've tried (without really understanding the chapter in the refe

Re: [racket] typed/rackunit

2010-12-03 Thread Sam Tobin-Hochstadt
On Fri, Dec 3, 2010 at 3:59 PM, keyd...@gmx.de wrote: > Hi, > > just a short question regarding testing in typed racket - might it be that I > can use > > #lang typed/racket > (require typed/rackunit) > > to write "simple checks" with check-equal? etc., but that test-case. > test-suite etc. are

Re: [racket] Scribble: Different output for LaTeX and HTML backends

2010-12-07 Thread Sam Tobin-Hochstadt
On Tue, Dec 7, 2010 at 11:30 AM, Matthias Felleisen wrote: > > Define a Scribble function like this: > > (define (exact . items) >  (make-element (make-style "identity" '(exact-chars)) >                items)) > (provide exact) This relies on a Latex macro named \identity being defined earlier in

Re: [racket] Rookie Question on Functional Languages

2010-12-09 Thread Sam Tobin-Hochstadt
On Thu, Dec 9, 2010 at 2:12 PM, Matthias Felleisen wrote: >> (do ([x 10 (- x 1)]) ((zero? x)) (displayln x)) (for ([x (in-range 10 0 -1)]) (displayln x)) Also, it would be nice if the default `step' value for `in-range' was: (if (<= start end) 1 -1) Then my program would be 3 characters shor

Re: [racket] ":" preferred to "define:"?

2010-12-22 Thread Sam Tobin-Hochstadt
On Wed, Dec 22, 2010 at 12:36 PM, Neil Van Dyke wrote: > Why is ":" preferred to "define:", when usually you're just going to follow > the ":" form with a "define" form? > > The Typed Racket Reference says: > >> In most cases, use of ":" is preferred to use of "define:". Two reasons: 1. Adding `

Re: [racket] raise-ing an exception inside prompt

2010-12-22 Thread Sam Tobin-Hochstadt
On Wed, Dec 22, 2010 at 12:52 PM, Keiko Nakata wrote: >> The relevant docs are in raise, with-exception-handler, and >> uncaught-exception-handler. > > Can I get to know where is the source, as drracket does not navigate me? The source for `with-handlers' and `prompt' you can find by using check

Re: [racket] status of keyword argument support in TR?

2010-12-22 Thread Sam Tobin-Hochstadt
On Wed, Dec 22, 2010 at 9:48 PM, Neil Van Dyke wrote: > What's the status of keyword argument support in Typed Racket? The below is still the current state, unfortunately. > http://groups.google.com/group/plt-scheme/browse_thread/thread/2da648c872fc6d97 > > Sam Tobin-Hochstadt

Re: [racket] status of keyword argument support in TR?

2010-12-28 Thread Sam Tobin-Hochstadt
On Sun, Dec 26, 2010 at 10:11 PM, Neil Van Dyke wrote: > If you guys know now what the TR ":" syntax will look like for the usual > keyword arguments, I would like to know what it is. First, if you have a preference, I'll be happy to consider it. My current idea is: (A B #:foo C -> D) (A [B #:f

Re: [racket] Macro expansion

2010-12-29 Thread Sam Tobin-Hochstadt
On Wed, Dec 29, 2010 at 5:45 PM, Markku Rontu wrote: > Unless, I am perhaps able to control the expansion from the outer-macro > and have it expand all its contents before going on with its own work. > How would I go about with this? The correct tool for this is `local-expand': http://docs.rac

Re: [racket] setf in scheme

2010-12-30 Thread Sam Tobin-Hochstadt
On Thu, Dec 30, 2010 at 10:34 AM, Razvan Rotaru wrote: > > I was just wondering whether there is anything like setf in scheme. As far > as I know there isn't, so I'm asking you, the more experienced schemers out > there. If not, why? Could it be crafted with macros? The Swindle collection of impr

[racket] Setting up Scribble documentation in a .plt archive

2011-01-06 Thread Sam Tobin-Hochstadt
We're trying to create .plt archive for distribution, along with documentation for the software. Currently, when I install the plt file from the menu in DrRacket, it installs the software successfully, but seems to skip the documentation. The output looks like this: setup-plt: --- compiling coll

Re: [racket] Efficiency of tight loops in Racket

2011-01-14 Thread Sam Tobin-Hochstadt
On Fri, Jan 14, 2011 at 12:18 AM, David Nolen wrote: > I'm curious if there's something more like along the lines of a step-by-step > tutorial for the FFI? I can see that it's well documented, but it would > great if there was something more along the lines of an introductory > tutorial. It's not

Re: [racket] redefining primitives?

2011-01-18 Thread Sam Tobin-Hochstadt
(composed in my mail buffer, so it might not compile) #lang racket/load (module student racket (require lang/htdp-intermediate) (define (my+ x y) (+ x y)) (provide (rename-out [my+ +]) (except-out (all-from-out lang/htdp-intermediate) + list))) (module test 'student ;; both

Re: [racket] overlay and overlay/xy

2011-01-30 Thread Sam Tobin-Hochstadt
On Sun, Jan 30, 2011 at 10:04 PM, Robby Findler wrote: > Do others that may depend on 2htdp/image have an opinion? Looking at both the code that we've developed for my current course, and the code that students have written (~55k lines), the only uses of `overlay/xy' are as a replacement for `pla

Re: [racket] Racket workshop for users still being considered?

2011-02-01 Thread Sam Tobin-Hochstadt
On Tue, Feb 1, 2011 at 11:09 AM, Scott Hickey wrote: > Back November, there was post about opening up the Racket workshop to > users, not just committers. Are there plans to go forward with this? There will be a meeting/workshop for anyone interested in Racket, taking place this summer. We're wo

Re: [racket] Setting background color in slideshow

2011-02-02 Thread Sam Tobin-Hochstadt
On Wed, Feb 2, 2011 at 11:25 AM, Evan Farrer wrote: > I'm attempting to use slideshow for a presentation and I really want to use > white text on a black background. I can see how to change the color of the > text, but I don't see how to manipulate the color of the blackground. I'm > currently

Re: [racket] Writing UTF-16 to a socket/file

2011-02-12 Thread Sam Tobin-Hochstadt
On Sat, Feb 12, 2011 at 2:35 PM, Gregory Woodhouse wrote: > Is it possible to ensure that data written to a socket or file is encoded as > UTF-16? I ask because Health Level 7 (HL7) 2.5.1 allows messages to use > UTF-16 as opposed to US-ASCII, but it has to be a fixed width encoding. Note that

Re: [racket] Multiplying by 0

2011-02-14 Thread Sam Tobin-Hochstadt
No, it's not a bug. Since 1e100 is an inexact number, there's uncertainty about the minimum of those two numbers, and the result is therefore inexact. On Mon, Feb 14, 2011 at 3:09 PM, Gregory Woodhouse wrote: > Oops... Now that has to qualify as a bug. > > On Feb 14, 2011, at 11:58 AM, Joe Marsh

Re: [racket] Multiplying by 0

2011-02-14 Thread Sam Tobin-Hochstadt
On Mon, Feb 14, 2011 at 5:01 PM, Joe Marshall wrote: > My point was that inexactness leads to a lot of nasty incoherence. > > But in the spirit of asking naive questions... > > On Mon, Feb 14, 2011 at 12:14 PM, Sam Tobin-Hochstadt > wrote: >> No, it's not a bu

Re: [racket] Ad-hoc polymorphism in Typed Racket

2011-02-15 Thread Sam Tobin-Hochstadt
On Tue, Feb 15, 2011 at 7:02 AM, Noel Welsh wrote: > So this isn't really ad-hoc, is it? I can't extend the type in another > module (typically done with structure properties in Racket). Anyway, a > union type will do for me, for now. It's ad-hoc for me, but not for thee. :) We have a story for

Re: [racket] tests/eli-tester feedback (Was: Racket unit testing)

2011-02-17 Thread Sam Tobin-Hochstadt
On Thu, Feb 17, 2011 at 8:18 AM, Jakub Piotr Cłapa wrote: > I don't think that having to use a separate form just to test macros would > be a bad idea. The primary hard part about testing macros is not syntax errors, but writing an "alpha-equvialent-to" comparison function, which to my knowledge

Re: [racket] tests/eli-tester feedback (Was: Racket unit testing)

2011-02-17 Thread Sam Tobin-Hochstadt
e have far fewer tools. > > Jay > > 2011/2/17 Sam Tobin-Hochstadt : >> On Thu, Feb 17, 2011 at 8:18 AM, Jakub Piotr Cłapa >> wrote: >>> I don't think that having to use a separate form just to test macros would >>> be a bad idea. >> >> The

Re: [racket] Pattern matching on structures defined using make-struct-type

2011-02-20 Thread Sam Tobin-Hochstadt
On Sun, Feb 20, 2011 at 2:14 PM, Marco Maggesi wrote: > Hi, > is it possible to use patterns like (struct struct-id (pats)) to match > structures which are defined with make-struct-type? > Example: > (define-values (s:tuple make-tuple tuple? tuple-ref tuple-set!) >   (make-struct-type 'tuple #f 1

Re: [racket] sort in typed racket

2011-02-21 Thread Sam Tobin-Hochstadt
On Mon, Feb 21, 2011 at 3:37 PM, Danny Yoo wrote: > > : Type Checker: Inference for polymorphic keyword functions not > supported in: (sort (quote (hello world)) #:key symbol->string > string > Is there something else I'm missing here? No, there's nothing you're missing. This error message is gi

Re: [racket] thank you for typed racket

2011-02-22 Thread Sam Tobin-Hochstadt
On Tue, Feb 22, 2011 at 11:18 AM, Shriram Krishnamurthi wrote: > So: are we henceforth forbidden from praising Sam for his work unless > we can demonstrate that the work would have been *impossible* in any > other language? Without taking a position on the question raised here, I want to emphasi

Re: [racket] fold/null-list? in srfi/1

2011-02-26 Thread Sam Tobin-Hochstadt
R5RS forms such as '(1 2 3) create mutable lists. However, the `srfi/1' library expects Racket's usual immutable lists. On Sat, Feb 26, 2011 at 11:40 AM, Li-Ta Lo wrote: > Hi, > > I am using R5RS mode in Racket 5.1. I was trying to use > the fold function form srfi/1. I got the error message tha

Re: [racket] fold/null-list? in srfi/1

2011-02-26 Thread Sam Tobin-Hochstadt
I recommend just using plain Racket, instead of the R5RS language. Choose "Use the language declared in the source" in the Language dialog. On Sat, Feb 26, 2011 at 11:52 AM, Li-Ta Lo wrote: > How should I create an immutable list? > > Ollie > > On Sat, Feb 26, 2

Re: [racket] typed racket: inconsistent interaction between typed and untyped code?

2011-03-04 Thread Sam Tobin-Hochstadt
On Fri, Mar 4, 2011 at 6:14 PM, Carl Eastlund wrote: > Ah.  This looks like the bug I've seen reported elsewhere that causes > blame to be associated with the wrong module.  The actual problem > going on here appears to be that test-sim passes an "Any" to > toplevel-vals, but sim-structs expects t

Re: [racket] typed racket: inconsistent interaction between typed and untyped code?

2011-03-04 Thread Sam Tobin-Hochstadt
On Fri, Mar 4, 2011 at 7:00 PM, Danny Yoo wrote: >> Sadly, off the top of my head, I don't have a quick workaround for >> you.  Maybe Sam will have a better suggestion. > > I'm still confused, because I'm in untyped code, which I had assumed > would maintain types at runtime through the use of con

Re: [racket] executable speed estimate?

2011-03-06 Thread Sam Tobin-Hochstadt
On Sun, Mar 6, 2011 at 3:10 PM, Charles Hixson wrote: > Where can Racket be expected fall in comparison with other languages in > executable speed? > > I'm looking at C-Ada-SBCL Lisp-Clojure-Java-Python-Ruby as a kind of a rough > map.  I checked speeds reported by http://shootout.alioth.debian.or

Re: [racket] Different behavior when using (#%require scheme/base)

2011-03-08 Thread Sam Tobin-Hochstadt
`scheme/base' provides a binding called `exp', which requires 2 arguments. When the compiler expands your definition, it looks at the variable reference in the body of the function *before* it binds your new `exp' definition. Therefore, it uses the `exp' that it has in scope at that time -- the o

[racket] Announcing the first Racket Days

2011-03-11 Thread Sam Tobin-Hochstadt
- as well as anything that we haven't thought of. All sorts of presentations are welcome, from extended tutorials to short demos to experience reports. Be creative! To obtain a slot on the program, please send a title and a brief abstract on what you would like to present to: Sam T

Re: [racket] help with typed racket function?

2011-03-13 Thread Sam Tobin-Hochstadt
On Sun, Mar 13, 2011 at 8:36 PM, Danny Yoo wrote: > I'm trying to make a function that can discriminate typed boxes: I > tried the following in Typed Racket: > > (: ensure-number-box (Any -> (Boxof Number))) > (define (ensure-number-box x) >  (if (and (box? x) (number? (unbox x))) >      x >      

Re: [racket] scheme code in assembly level

2011-03-14 Thread Sam Tobin-Hochstadt
Take a look at https://github.com/samth/disassemble It doesn't do exactly what you want, but it may be helpful. On Mon, Mar 14, 2011 at 8:09 AM, 김태윤 wrote: > hello > is there any way I can debug scheme code in assembly level? > it would be awesome if I can debugging as like ollydbg or softice. >

Re: [racket] Scribble code

2011-03-14 Thread Sam Tobin-Hochstadt
Use either `racketblock' or `codeblock' for this. The documentation for typesetting code in Scribble is here: http://docs.racket-lang.org/scribble/scribble_manual_code.html On Mon, Mar 14, 2011 at 8:54 AM, Mark Carter wrote: > I have some code that I would like to put in scribble. So far, I have

Re: [racket] scheme code in assembly level

2011-03-14 Thread Sam Tobin-Hochstadt
oun...@racket-lang.org >> [mailto:users-boun...@racket-lang.org] On Behalf Of Sam >> Tobin-Hochstadt >> Sent: 14 March 2011 13:49 >> To: 김태윤 >> Cc: users@racket-lang.org >> Subject: Re: [racket] scheme code in assembly level >> >> Take a look at https

Re: [racket] scheme code in assembly level

2011-03-15 Thread Sam Tobin-Hochstadt
mplemented in C, you should just use GDB to see their assembly code. sam th On Tue, Mar 15, 2011 at 6:00 AM, 김태윤 wrote: > is it only for just in time function? > anyway, thank you so much! > > On 14 March 2011 21:48, Sam Tobin-Hochstadt wrote: >> Take a look at https://github.co

Re: [racket] struct-copy with sub-types

2011-03-25 Thread Sam Tobin-Hochstadt
On Fri, Mar 25, 2011 at 5:52 AM, Pierpaolo Bernardi wrote: > > No answers? > > it looks to me that > > (struct-copy sub S [b 4]) > > should work, but it doesn't.  Isn't this a bug? I believe this is a bug. Please submit it using the bug report tool in DrRacket. -- sam th sa...@ccs.neu.edu ___

Re: [racket] drracket editor running too slow

2011-03-28 Thread Sam Tobin-Hochstadt
I have 10.10 on a machine at home, and I don't see the problem described either. On Mon, Mar 28, 2011 at 2:41 PM, Robby Findler wrote: > I didn't see any problems with a 10.04 VM in the latest Racket either > and, sadly, my version of parallels doesn't run 10.10. I've got an > order in for the ne

Re: [racket] Newbie question: Teach Yourself Scheme in Fixnum Days - macros

2011-03-30 Thread Sam Tobin-Hochstadt
On Wed, Mar 30, 2011 at 12:23 PM, Matthew Flatt wrote: > At Wed, 30 Mar 2011 11:20:30 -0400, Prabhakar Ragde wrote: >> This comment is about more than macros: Since students are often drawn >> to TYS even though I never mention it to them, I've always been tempted >> to "translate" TYS into what i

Re: [racket] Newbie question: Teach Yourself Scheme in Fixnum Days - macros

2011-04-04 Thread Sam Tobin-Hochstadt
On Mon, Apr 4, 2011 at 8:13 AM, Matthias Felleisen wrote: > > On Apr 4, 2011, at 5:45 AM, Archie Maskill wrote: > > On Wed, Mar 30, 2011 at 11:29 AM, John Sampson wrote: >> >> Do you think these give a better explanation of macros? On the whole, I >> have found Teach Yourself Scheme >> relatively

Re: [racket] in-line documentation program? Like Javadoc or Doxygen

2011-04-05 Thread Sam Tobin-Hochstadt
Take a look at the `scribble/srcdoc' library: http://docs.racket-lang.org/scribble/srcdoc.html On Tue, Apr 5, 2011 at 4:44 PM, Charles Hixson wrote: > > I was really looking for something simple like Doxygen or Javadoc. > Something that steps through the code, looks at comments, and pulls out of

Re: [racket] [scribble] comments?

2011-04-07 Thread Sam Tobin-Hochstadt
@;{ this is a comment that spans lines } On Thu, Apr 7, 2011 at 12:35 PM, Eric Tanter wrote: > Hi, > > In the Scribble language, @; introduces a comment. > I'm looking for the Scribble equivalents of #| |# and #; > I've tried the obvious (@#|, @#;) but it does not work. > > Is there a way to comm

Re: [racket] Problems with Typed Racket

2011-04-09 Thread Sam Tobin-Hochstadt
On Sat, Apr 9, 2011 at 5:50 PM, Renzo Orsini wrote: > I was trying Typed Racket for the first time. > > when I do "Check Syntax" on the following function (which in a (untyped) > Racket program works correctly) (I simplified the real function): > > #lang typed/racket > > (: elaborate (String Stri

Re: [racket] Problems with Typed Racket

2011-04-11 Thread Sam Tobin-Hochstadt
, but I would like to know if it is > stable enough for a medium sized research project. I encourage you to use Typed Racket for this, and it should certainly be stable enough for your project. > > > On Apr 10, 2011, at 24:34 , Robby Findler wrote: > >> On Sat, Apr 9, 2011

Re: [racket] non-terminating type check for typed racket

2011-04-17 Thread Sam Tobin-Hochstadt
On Sun, Apr 17, 2011 at 3:04 PM, Danny Yoo wrote: > This behavior appears for both Racket 5.0.1 as well as Racket 5.1. > I've git tagged my project as 'infinite-typecheck' at the point where > I'm seeing this behavior. > >    https://github.com/dyoo/js-sicp-5-5/tree/infinite-typecheck We'll take

Re: [racket] non-terminating type check for typed racket

2011-04-17 Thread Sam Tobin-Hochstadt
On Sun, Apr 17, 2011 at 7:36 PM, Danny Yoo wrote: > On Sun, Apr 17, 2011 at 6:10 PM, Sam Tobin-Hochstadt > wrote: >> On Sun, Apr 17, 2011 at 3:04 PM, Danny Yoo wrote: >>> This behavior appears for both Racket 5.0.1 as well as Racket 5.1. >>> I've git tagge

Re: [racket] non-terminating type check for typed racket

2011-04-18 Thread Sam Tobin-Hochstadt
On Mon, Apr 18, 2011 at 12:26 PM, Eli Barzilay wrote: > > And one more point -- I see this: > >  (define-struct Rep (seq free-vars free-idxs stx) #:transparent) >  [...] >  (p/c (struct Rep ([seq exact-nonnegative-integer?] >                    [free-vars (hash/c symbol? variance?)] >            

Re: [racket] non-terminating type check for typed racket

2011-04-18 Thread Sam Tobin-Hochstadt
On Mon, Apr 18, 2011 at 1:48 PM, Danny Yoo wrote: > On Mon, Apr 18, 2011 at 1:38 PM, Danny Yoo wrote: >> Hi Sam, >> >> Ok, I've reduced the example to a smaller, self-contained 188-line >> program, with a bunch of type declarations followed by a trivial >> function definition: > > Ok, reduced fur

Re: [racket] Specifying the type of a function that contains a type test (but isn't one)

2011-04-18 Thread Sam Tobin-Hochstadt
On Mon, Apr 18, 2011 at 3:02 PM, Jeremiah Willcock wrote: > Given the following Typed Racket program: > > #lang typed/racket > > (: greater-than-5? (Any -> Boolean)) > (define (greater-than-5? x) >  (and (integer? x) (> x 5))) First, you probably want to use `exact-integer?' here, see the TR docs

Re: [racket] non-terminating type check for typed racket

2011-04-18 Thread Sam Tobin-Hochstadt
On Mon, Apr 18, 2011 at 2:27 PM, Sam Tobin-Hochstadt wrote: > On Mon, Apr 18, 2011 at 1:48 PM, Danny Yoo wrote: >> On Mon, Apr 18, 2011 at 1:38 PM, Danny Yoo wrote: >>> Hi Sam, >>> >>> Ok, I've reduced the example to a smaller, self-contained 1

Re: [racket] non-terminating type check for typed racket

2011-04-18 Thread Sam Tobin-Hochstadt
On Mon, Apr 18, 2011 at 7:41 PM, Danny Yoo wrote: >> This program now compiles in approximately 3 seconds on my machine, >> whereas previously it was more than 2 minutes. > > Awesome!  I look forward to trying this out.  Will this make the > upcoming Racket release? Yes. -- sam th sa...@ccs.neu.

Re: [racket] define-syntax-rule/id

2011-04-19 Thread Sam Tobin-Hochstadt
On Mon, Apr 18, 2011 at 2:42 PM, Jon Rafkind wrote: >     (with-syntax ([id (datum->syntax (car (syntax->list #'(arg ...))) > (string->symbol >    (let ([arg (syntax-e #'arg)] > ...) >    

Re: [racket] general facility for annotating procedures

2011-04-21 Thread Sam Tobin-Hochstadt
Here's a quick little example using `prop:procedure': https://gist.github.com/935350 On Thu, Apr 21, 2011 at 5:06 PM, Eric Tanter wrote: > Ah, this is wonderful! > > not only does it exist, but in a better way than I had dreamed of ;-) > I wish I had known about that long ago... > > Thanks! > >

Re: [racket] define-syntax-class

2011-04-27 Thread Sam Tobin-Hochstadt
2011/4/27 Nadeem Abdul Hamid : > What am I missing in the code below (reproduced from the "Fortifying > Macros" paper)? When run, this gives me an error: "syntax-parse: not > defined as syntax class in: binding". If I move the syntax class > definition into the bodies of define-syntax, then it work

Re: [racket] require/typed predicates

2011-05-04 Thread Sam Tobin-Hochstadt
On Wed, May 4, 2011 at 9:59 PM, Carl Eastlund wrote: > On Wed, May 4, 2011 at 9:14 PM, David Van Horn wrote: >> I used to be able to write things like this in TR: >> >> #lang typed/racket >> (require/typed lang/htdp-advanced >>  [char? (Any -> Boolean : Char)]) >> >> But now I get: >> >> Type Che

Re: [racket] Building on Mac OS X 10.7 Lion (Developer Preview 3)

2011-05-09 Thread Sam Tobin-Hochstadt
On Mon, May 9, 2011 at 3:11 AM, Elliott Cable wrote: > Great advice! Okay, success in building v5.1.1 release with those two > flags; but no luck with building latest git (@f60f234) *without* those > flags. So, whatever fix you pushed hasn’t fixed all of the issues > *yet*. > > Here’s the stdout f

Re: [racket] Style and Performance question

2011-05-09 Thread Sam Tobin-Hochstadt
On Mon, May 9, 2011 at 11:19 PM, Robby Findler wrote: > Even without typed racket, this: > > (define (my-sqrt y) >  (let loop [(x (/ y 2.0))] > is much faster than this: > > (define (my-sqrt y) >  (let loop [(x (/ y 2))] Yes, this is one of the optimizations TR does. :) As to why TR is so much

Re: [racket] Style and Performance question

2011-05-10 Thread Sam Tobin-Hochstadt
On Mon, May 9, 2011 at 11:37 PM, Robby Findler wrote: > I don't think that this is accurate, Sam. You're totally right. The "optimization" I suggested is not correct (and TR doesn't do it), and the speedup is almost entirely due to using floats, not to using TR. I was pretty confused there. --

Re: [racket] Style and Performance question

2011-05-10 Thread Sam Tobin-Hochstadt
On Tue, May 10, 2011 at 6:03 AM, Matthias Felleisen wrote: > When I converted it, the type checker asked for something other than x and I > realized that I needed to get an inexact in somewhere. " What error did the typechecker give you? The exact-rational version type checks fine for me. -- s

Re: [racket] typed racket and module paths

2011-05-10 Thread Sam Tobin-Hochstadt
On Tue, May 10, 2011 at 6:04 PM, Danny Yoo wrote: > > I'm trying to deal with module paths in Typed Racket, and have the > following so far.  I'm not exactly sure how to write the types for > RelativeString, UserString, or PackageString, so I've just aliased > them to String.  But does the followi

Re: [racket] Getting started with R6RS

2011-05-14 Thread Sam Tobin-Hochstadt
On Sat, May 14, 2011 at 9:26 AM, Elliott Cable wrote: > Both of you misunderstood. A) I don’t use DrRacket (partially because > I’m working on the Lion developer privew, and DrRacket won’t build > there; and partially because I have an inbuilt disrespect for > graphical IDEs.) and B) I’ve already

Re: [racket] Typed Racket - Setof assertions

2011-05-14 Thread Sam Tobin-Hochstadt
On Sat, May 14, 2011 at 1:07 PM, Ray Racine wrote: > First I think typed/racket is fantastic.    But when you stray from the > path, its quicksand. :) I'm glad you're enjoying it. > I'd like to cast / assert  a given (Setof Any) to a (Setof String). > Path #1 - Come up with the following assert

Re: [racket] Typed Racket - Setof assertions

2011-05-14 Thread Sam Tobin-Hochstadt
On Sat, May 14, 2011 at 3:57 PM, Ray Racine wrote: > Sam, > Tried it.  What am I missing?  Thanks. > #lang typed/racket > (require >  (except-in racket/set >    set/c)) > (define-predicate setof-string?  (Setof String)) > racket@> ,enter "/code/knozama/fca/src/main/racket/harvest/test.rkt" > test.

Re: [racket] Getting started with R6RS

2011-05-14 Thread Sam Tobin-Hochstadt
On Sat, May 14, 2011 at 6:35 PM, Eli Barzilay wrote: >> they’re really not at all so great for somebody like me, who expects >> to understand every line of the first source-code file he’s writing >> in a language that is new to him, as he writes them. > > The main thing that I think was a failure

Re: [racket] Typed Racket - Setof assertions

2011-05-15 Thread Sam Tobin-Hochstadt
On Sat, May 14, 2011 at 4:05 PM, Sam Tobin-Hochstadt wrote: > On Sat, May 14, 2011 at 3:57 PM, Ray Racine wrote: >> Sam, >> Tried it.  What am I missing?  Thanks. >> #lang typed/racket >> (require >>  (except-in racket/set >>    set/c)) >> (

Re: [racket] Prefix multiple provides

2011-05-19 Thread Sam Tobin-Hochstadt
This should work: (provide (prefix-out x: (combine-out x1 x2 x3))) 2011/5/19 José Lopes : > Hello, > > Is there a way of prefixing out multiple definitions? > >    (provide >        (prefix-out x: x1 x2 x3 ...)) > > Regards, > José Lopes > > -- > José António Branquinho de Oliveira Lopes > 586

Re: [racket] Racket 5.1.1 performance issues

2011-05-20 Thread Sam Tobin-Hochstadt
Most likely, you have run 'make', but not 'make install', and so the source files in the collects haven't been precompiled. Try running 'make install' and you should see much better performance. On Fri, May 20, 2011 at 8:20 AM, Janus Troelsen wrote: > Hi guys, > > I'm running a debug build of Ra

[racket] RacketCon -- July 23 & 24

2011-05-23 Thread Sam Tobin-Hochstadt
e found on the web page: http://con.racket-lang.org Sam Tobin-Hochstadt _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

Re: [racket] `assert', `and' and `or' in Typed Racket

2011-05-24 Thread Sam Tobin-Hochstadt
On Tue, May 24, 2011 at 11:16 AM, Richard Lawrence wrote: > > Curiously, if I change `(assert s string?)' to `(string? s)', the > example passes the type check.  So I guess maybe the short-circuiting > nature of `and' and `or' is a red herring here, and what I don't > understand is something about

Re: [racket] `assert' in Typed Racket

2011-05-24 Thread Sam Tobin-Hochstadt
On Tue, May 24, 2011 at 1:41 PM, Richard Lawrence wrote: > Sam Tobin-Hochstadt > writes: > >> (assert x p?) is equivalent to (if (p? x) x (error ...)) except that >> the result is known to have the appropriate type (here `String'). > > Ah, OK, I think I see my m

<    1   2   3   4   5   6   7   8   9   10   >