Re: [racket] How can I save all the definitions in racket to a file?

2010-06-24 Thread Vincent St-Amour
At Thu, 24 Jun 2010 03:03:08 -0700, Insik Cho wrote: > After I'm working in console 'racket,' I don't want to lose all the > definitions I have made. > > How can I save the definitions to an external file, i.e., 'xxx.ss'? You can try running racket with rlwrap. In addition to giving it readline s

Re: [racket] doubly linked list lib

2011-08-31 Thread Vincent St-Amour
Are you planning to put this on PLaneT? Vincent At Wed, 31 Aug 2011 11:46:34 +0200, Marijn wrote: > > [1 ] > [1.1 ] > [1.1.1 ] > Hi Laurent, > > On 08/30/11 09:18, Laurent wrote: > > Thank you very much for this nice intermediate solution, though I need > > constant-time append, split, inse

Re: [racket] Basic Questions Regarding Macros

2011-08-31 Thread Vincent St-Amour
At Wed, 31 Aug 2011 12:41:18 -0500, Todd Bittner wrote: > Finally, reading through the reference, #' serves, I believe, as shorthand > for (syntax), but in what practical situations would I then call it? When writing macros with `syntax-rules', you won't need it. Racket also supports procedural m

Re: [racket] Installing

2011-09-02 Thread Vincent St-Amour
.sh files are shell scripts, you typically run them at the command line. To install Racket using a shell script installer: - open a terminal - type "sh ", using the right path to the installer (where you downloaded it) and press enter. - Follow the instructions. Vincent At Thu, 1 Sep 2011 15:

Re: [racket] hosts with racket (or PLT-Scheme) support

2011-09-07 Thread Vincent St-Amour
They also advertize "newer versions": http://example72.nfshost.com/versions.php Unfortunately, 370 is not newer than 4.1.2. Vincent At Wed, 7 Sep 2011 13:48:04 +0100, Stephen De Gabrielle wrote: > > Hi, > > I just came across this one by accident. > > http://example.nfshost.com/versions.php

Re: [racket] online check syntax error display tweak

2011-09-09 Thread Vincent St-Amour
I like it. However with the highlight on the right, I find it kind of hard to correlate the highlight with the relevant code, which is likely to be on the left side. Wouldn't it be easier if the highlight was in the left margin? Vincent At Thu, 8 Sep 2011 22:48:47 -0500, Robby Findler wrote: >

Re: [racket] online check syntax error display tweak

2011-09-09 Thread Vincent St-Amour
At Fri, 9 Sep 2011 10:58:23 -0500, Robby Findler wrote: > I thought about that, but I didn't want it to overlap the text and I > didn't want it to slide everything over to make space. What about horizontal lines before and after the relevant line, running across the whole editor. Finding the relev

Re: [racket] online check syntax error display tweak

2011-09-09 Thread Vincent St-Amour
At Fri, 9 Sep 2011 12:07:26 -0400, Matthias Felleisen wrote: > > On Sep 9, 2011, at 12:05 PM, Vincent St-Amour wrote: > > > At Fri, 9 Sep 2011 10:58:23 -0500, > > Robby Findler wrote: > >> I thought about that, but I didn't want it to overlap the text

Re: [racket] online check syntax error display tweak

2011-09-09 Thread Vincent St-Amour
At Fri, 9 Sep 2011 11:20:36 -0500, Robby Findler wrote: > > On Fri, Sep 9, 2011 at 11:05 AM, Vincent St-Amour > wrote: > > At Fri, 9 Sep 2011 10:58:23 -0500, > > Robby Findler wrote: > >> I thought about that, but I didn't want it to overlap the text

Re: [racket] opt-lambda: does not type check when defaults are provided

2011-09-24 Thread Vincent St-Amour
At Sat, 24 Sep 2011 15:02:44 -0400 (EDT), Jeremiah Willcock wrote: > > The following program: > > #lang typed/racket > (opt-lambda: ((a : Symbol 'foo)) a) > > does not type check with the current Git version of Racket, producing the > following error: > > opt-bug.rkt:2:0: Type Checker: Error i

Re: [racket] Garbage collection informaton

2011-09-29 Thread Vincent St-Amour
At Thu, 29 Sep 2011 18:12:32 -0600, Matthew Flatt wrote: > * If you create a log receiver within Racket, you can look for >messages that have a `gc-info' prefab struct (10 fields) value, >which provides all the information in the string message plus start >and end times in real time (l

Re: [racket] Question about round

2011-09-30 Thread Vincent St-Amour
At Fri, 30 Sep 2011 09:25:50 -0400, Eli Barzilay wrote: > > Could we get an exception to the coercions in the case of +/-inf.0? > > Or an alternative min/max that don't do it? > > My guess is that changes in this area are hopeless, since they'll > break a bunch of code in unexpected ways. (Not to

Re: [racket] lc with redex

2011-10-05 Thread Vincent St-Amour
Is this on PLaneT? Vincent At Wed, 5 Oct 2011 16:37:02 +0200, Jos Koot wrote: > > To whom it concerns, > > A new lambda-calculus-with-redex version is available on my web page: > > http://www.telefonica.net/web2/koot/ > > Inform me, please, when encountering any problems or errors or when

Re: [racket] Trace rejects set!

2011-10-10 Thread Vincent St-Amour
At Mon, 10 Oct 2011 10:09:49 -0700 (PDT), michael rice wrote: > I'm looking at some old Scheme code and find that the code still > works under (#lang racket) but trace is unhappy with  the use of set! > in the traced function. > > set!: cannot modify a constant: next-leaf-generator I added `(trac

Re: [racket] Trace rejects set!

2011-10-10 Thread Vincent St-Amour
At Mon, 10 Oct 2011 10:31:39 -0700 (PDT), michael rice wrote: > > Welcome to DrRacket, version 5.1.3 [3m]. > Language: racket; memory limit: 128 MB. > > (trace next-leaf-generator) > set!: cannot modify a constant: next-leaf-generator Try adding `(trace next-leaf-generator)' to the program itself

Re: [racket] Saving and restoring many parameters

2011-10-18 Thread Vincent St-Amour
At Tue, 18 Oct 2011 13:40:12 -0600, Neil Toronto wrote: > Executive summary: Is there a good way to save a large set of parameter > values, or *all* the parameter values, and then restore them when needed? Would parameterizations help? Vincent _

Re: [racket] Saving and restoring many parameters

2011-10-20 Thread Vincent St-Amour
At Thu, 20 Oct 2011 09:54:56 -0600, Neil Toronto wrote: > I know Blake has wanted these before, so I might throw them into unstable. Please do. I've wanted these before as well. Vincent _ For list-related administrative tasks: http://lists.racke

Re: [racket] impersonators/chaperones for lists

2011-10-22 Thread Vincent St-Amour
At Sat, 22 Oct 2011 22:10:27 +0200, Shriram Krishnamurthi wrote: > I'm missing why there are impersonators and chaperones for various > datatypes but not for lists. There's surely a good reason why, but I > am having trouble reconstructing what it might be. Anyone? I believe it's because lists a

Re: [racket] [typed racket] type case

2011-10-23 Thread Vincent St-Amour
At Sun, 23 Oct 2011 12:03:23 -0300, Eric Tanter wrote: > However, of course, this does not work if the return type is compatible with > Void: > > (: f ((U String Integer) -> Any)) > (define (f x) > (cond > [(string? x) (string=? x "hi")] > [(exact-nonnegative-integer? x) (= x 7)])) > >

Re: [racket] print problem on Windows

2011-11-03 Thread Vincent St-Amour
At Thu, 03 Nov 2011 09:28:28 +0100 (CET), jvjul...@free.fr wrote: > Is it a known problem ? Yes, it's recorded in PR 12156. http://bugs.racket-lang.org/query/?cmd=view&pr=12156 The audit trail points to potential workarounds, so it may be worth checking out. Vincent _

Re: [racket] Reading in data structures from files (specifically structs)

2011-12-13 Thread Vincent St-Amour
Structs are generative, so this won't work. Prefab structs are probably what you want here. Vincent At Tue, 13 Dec 2011 22:05:40 -0600, Todd Bittner wrote: > > [1 ] > [1.1 ] > I'm trying to do something like the following: > > I create a struct, say (struct foo (bar baz) #:transparent), whe

Re: [racket] W: A Game Written in Racket

2011-12-20 Thread Vincent St-Amour
Neat! I can't figure out the fourth level, though. :) Vincent At Tue, 20 Dec 2011 17:39:04 -0500, Thom Chiovoloni wrote: > > [1 ] > [1.1 ] > Hello Racket users! > > As some of you might know, last weekend was Ludum > Dare, > a game development competition wh

Re: [racket] W: A Game Written in Racket

2011-12-20 Thread Vincent St-Amour
At Tue, 20 Dec 2011 19:47:20 -0500, Thom Chiovoloni wrote: > Haha, the fourth is a hallway, so you probably mean the fifth, in which > case you need to make all the floors the same. Right. I thought these two were together. I figured the floor puzzle, but can't go anywhere after that. Is that the

Re: [racket] Strange behaviour with in-range

2011-12-30 Thread Vincent St-Amour
Also, if you want nested iteration, use `for*'. Vincent At Fri, 30 Dec 2011 17:55:12 -0500, Nadeem Abdul Hamid wrote: > > The for form iterates by drawing an element from each sequence; if any > sequence is empty, then the iteration stops. So this: > > (for ([i (in-range 2 4)] >[j (in-

Re: [racket] Documentation enhancement suggestions

2012-01-04 Thread Vincent St-Amour
At Mon, 2 Jan 2012 14:49:34 +, Erich Rast wrote: > But here is another suggestion that I would find > tremendously helpful: an auto-hover live help that pops up information > about function definitions plus a short explanation of what the function > does directly in the IDE, Similar to that, I

Re: [racket] why does TR stop printing helpful "type (:print-type ) to see more" message ?

2012-01-05 Thread Vincent St-Amour
At Thu, 5 Jan 2012 09:16:31 -0800, John Clements wrote: > It appears that TR only prints the message "[Use (:print-type > ) to see more.]" once. I think this is the wrong choice, and > that it should be printed every time. Once the user has seen that message once, he knows that there's a way to di

Re: [racket] Q. about intent of TR wrt floats

2012-01-05 Thread Vincent St-Amour
At Thu, 5 Jan 2012 09:10:49 -0800, John Clements wrote: > I just had trouble with the type of log; I wanted to pass it a > positive real, and get back a Real. After inspecting the type, I see > that it works for Positive-Float. Is this deliberate, in order to get > more optimizable code (if the i

Re: [racket] TR: predicate for a Float ?

2012-01-06 Thread Vincent St-Amour
At Fri, 6 Jan 2012 08:47:39 -0800, John Clements wrote: > 1) Not all of the types printed in (:print-type Foo) are necessarily > bound in the user code, right? I tried at one point substituting the > result of (:print-type something-or-other) for something-or-other, and > got a message about an unb

Re: [racket] TR: predicate for a Float ?

2012-01-06 Thread Vincent St-Amour
At Fri, 6 Jan 2012 12:10:58 -0500 (EST), J. Ian Johnson wrote: > All unions get flattened, so generally there are multiple possible > reconstructions of larger types. It's a set-cover problem - > NP-complete. But hey, proving well-typedness in TR is co-NPC, > so... heh. I think Vincent has a greedy

Re: [racket] TR: (almost) no way to dismiss performance report window?

2012-01-06 Thread Vincent St-Amour
At Fri, 6 Jan 2012 12:24:40 -0800, John Clements wrote: > On my mac, the window summoned by a double-click after running > Performance Report has no close box, and no close buttons, and no > obvious way to dismiss it. It turns out that choosing "Racket > Quit" > from the menu gets rid of it, but o

Re: [racket] Calling TR modules from Racket modules is slow?

2012-01-06 Thread Vincent St-Amour
At Fri, 6 Jan 2012 13:15:54 -0800, John Clements wrote: > Welcome to DrRacket, version 5.2.0.7--2012-01-05(fd5e40f/g) [3m]. > Language: racket/load; memory limit: 256 MB. > a million in-module typed adds > cpu time: 404 real time: 425 gc time: 273 > a million untyped adds > cpu time: 372 real time:

Re: [racket] TR: predicate for a Float ?

2012-01-06 Thread Vincent St-Amour
At Fri, 6 Jan 2012 14:09:48 -0800, John Clements wrote: > > They should be. Which one was unbound? That sounds like a bug. > > Your commit message suggests that you figured this out already? I did find something along the way. Is it the same you noticed? > >> 3) What would be *really* awesome wo

Re: [racket] weird names in FrTime code [was: Re: for/hash: bad syntax in: for/hash]

2012-01-11 Thread Vincent St-Amour
At Wed, 11 Jan 2012 15:06:19 +0100, Marijn wrote: > Similarly there is a core/erl.rkt that seems > to be implementing some thread management. (I think that each > signal/behavior is implemented as a separate thread). No idea what > `erl' is supposed to mean. Anybody have any idea what these letters

Re: [racket] Use of "struct:"

2012-01-27 Thread Vincent St-Amour
At Fri, 27 Jan 2012 18:41:27 -0300, Paul Leger wrote: > > Hi all, > A simple question. I try typing the following example > (module nest racket > (provide (struct-out egg)) > (struct egg (color wt))) > > in this way > (module nest typed/racket > (provide (struct-out egg)) > (s

Re: [racket] 'Single-Flonum' error in Typed Racket

2012-02-18 Thread Vincent St-Amour
Fixed. Pushing soon. Thanks for the report. Vincent At Sat, 18 Feb 2012 16:59:36 -0500, SF wrote: > > Running this program in DrRacket... > > #lang typed/racket > (provide (all-defined-out)) > (: foo Single-Flonum) > (define foo 1.0f0) > > ...gives me this error: > > expand: unbound identif

Re: [racket] Optimization; converting 'Float' to 'Fixnum' in Typed Racket

2012-02-18 Thread Vincent St-Amour
At Sat, 18 Feb 2012 21:07:05 -0500, SF wrote: > I'm trying to optimize some code that processes a bunch of data, > basically image pixels, which currently takes on the order of several > seconds and seems like it should be much faster (important because > it's an interactive application). Coming fr

Re: [racket] Optimization; converting 'Float' to 'Fixnum' in Typed Racket

2012-02-18 Thread Vincent St-Amour
At Sat, 18 Feb 2012 21:39:33 -0600, Robby Findler wrote: > > Still, good to > > know. I didn't think of using Typed Racket like that. > > > > I should mention that this is the best method I've found so far: > > > > (: float->int (Float -> Integer)) > > (define (float->int x) > >  (floor (inexact->e

Re: [racket] Optimization; converting 'Float' to 'Fixnum' in Typed Racket

2012-02-18 Thread Vincent St-Amour
At Sat, 18 Feb 2012 22:14:05 -0600, Robby Findler wrote: > What if his code used fx+ and friends instead of + and friends? `fx+' and friends are not as fast as `unsafe-fx+' and friends, but since they're guaranteed to return fixnums (or error), they're more TR-friendly. Good point. Vincent __

Re: [racket] Optimization; converting 'Float' to 'Fixnum' in Typed Racket

2012-02-18 Thread Vincent St-Amour
At Sat, 18 Feb 2012 21:47:52 -0600, Robby Findler wrote: > On Sat, Feb 18, 2012 at 9:39 PM, SF wrote: > > On Sat, Feb 18, 2012 at 9:18 PM, Robby Findler wrote: > >> I'm not sure of the precise answer, but I don't think that all floats > >> (even the integers) have a corresponding fixnum. > > > > M

Re: [racket] Optimization; converting 'Float' to 'Fixnum' in Typed Racket

2012-02-18 Thread Vincent St-Amour
At Sat, 18 Feb 2012 23:04:33 -0500, Vincent St-Amour wrote: > > The problem is that I can't find a way to convert a Float to a Fixnum, > > only to an Integer. None of fl->fx, unsafe-fl->fx, or > > fl->exact-integer work, as Type Checker tells me they're unty

Re: [racket] Custom GUI container

2012-02-25 Thread Vincent St-Amour
Neat! That would make a great planet package, Vincent At Sat, 25 Feb 2012 11:40:32 -0700, Kieron Hardy wrote: > > Hi all, > > I needed a GUI container that allows the contained components to choose > where they are placed in the container. i.e. A container that doesn't try > to stretch and r

Re: [racket] Type-class-like idiom in Racket?

2012-03-04 Thread Vincent St-Amour
You may want to have a look at unstable/generics: http://docs.racket-lang.org/unstable/Generics.html?q=unstable/generics It's currently unstable, but I'm working on moving it to a more permanent place in the near future, hopefully by the next release. Vincent At Sun, 4 Mar 2012 14:15:55 -0800,

Re: [racket] Type-class-like idiom in Racket?

2012-03-05 Thread Vincent St-Amour
At Sun, 4 Mar 2012 20:36:23 -0800, Helmut Rohrbacher wrote: > The only thing is, how do you extend these properties to built-in types > like LIST and VECTOR? I'm guessing that you'd need to wrap them in a > user-defined type... You could do that, or you could handle them specially in your generic

Re: [racket] Getting started with Scribble

2012-03-17 Thread Vincent St-Amour
At Sat, 17 Mar 2012 00:52:21 -0700, Mark Engelberg wrote: > One thing I still haven't figured out is how to get a comment (introduced > with a semicolon) that is in the code block to show up in the scribbled > output. (In the example below, the comment ";; the zero test" doesn't show > up in the s

Re: [racket] Unicode art

2012-03-21 Thread Vincent St-Amour
Using the same font in a different application, do you get the same gaps? If so, it's probably a font issue. Vincent At Wed, 21 Mar 2012 10:39:52 +0100, Pierpaolo Bernardi wrote: > > Hello, > > not sure if this is a DrRacket or font question. > > I'm doing drawings with the unicode box drawin

Re: [racket] typed racked questions

2012-04-30 Thread Vincent St-Amour
At Mon, 30 Apr 2012 05:51:00 +0100, Bikal Gurung wrote: > 1) Can we mix/import modules written in untyped racket to a module that is > used typed racket. I have experimented with a few modules using and they > seem to work in general but not really sure about the mechanism that makes > it work. How

Re: [racket] typed racked questions

2012-04-30 Thread Vincent St-Amour
igned to > > make it easy to switch, a module at a time, when you decide you want > > types. > > > > > 3) Are typed racket programs faster than untyped ones? The documentation > > > says so but I was wondering if there has been any benchmark or study > > being &g

Re: [racket] typed racked questions

2012-05-01 Thread Vincent St-Amour
At Mon, 30 Apr 2012 23:07:38 +0100, Bikal Gurung wrote: > hmmm ... I am getting some error. My repl session below. I am using 'db' > module. > > > bind-prepared-statement > . Type Checker: untyped top-level identifier lifted.474 in: > bind-prepared-statement > > > > Not sure what to make of it. M

Re: [racket] typed racked questions

2012-05-01 Thread Vincent St-Amour
At Mon, 30 Apr 2012 23:12:35 +0100, Bikal Gurung wrote: > What are DrRacket and other racket libs written in ? typed/untyped racket ? DrRacket is written in untyped Racket, with a bit of Typed Racket. Most libraries are untyped, but some are typed (quickly skimming the PLaneT listing: purely func

Re: [racket] idioms for abstracting over definitions

2012-05-08 Thread Vincent St-Amour
Here's one way to do it: (define-values (top-right-x top-right-y) (let () (define (mk x?) (lambda (a-grid-plane a-cell) (match-define (cell row-pos col-pos) a-cell) (define cell-size (grid-plane->cell-size a-grid-plane)) (match-define (size cell-w cell-h) cell-s

Re: [racket] Typed Racket Performance Optimization

2012-05-10 Thread Vincent St-Amour
As Neil said, `fllog' is guaranteed to return floats. If you want to know for which input types `log' has a return type of `Float', you can use `:query-result-type' at the TR REPL. -> (:query-result-type log Float) (case-> (Nonnegative-Flonum -> Float) (Float-Zero -> Negative-Float)) If

Re: [racket] A little improvement

2012-05-10 Thread Vincent St-Amour
Using list comprehensions: (define (fix str) (for/fold ([str str]) ([old '(" / " " " "%" "-")] [new '("_" "_" "" "_")]) (regexp-replace* old str new))) Vincent At Thu, 10 May 2012 15:49:26 -0500, Grant Rettke wrote: > > Using this to help out with a task at wor

Re: [racket] Typed/Racket Runtime Optimized Bounded (Index) Increment Operation

2012-05-15 Thread Vincent St-Amour
At Mon, 14 May 2012 18:52:33 -0400, Ray Racine wrote: > I love seeing all them little green boxes informing me that Typed/Racket > has elided runtime operation. Some of my recent code is doing a great deal > of processing (Vectorof Float) with vector-ref / vector-set!. > > I'm wondering if there

Re: [racket] disabling contracts again

2012-05-18 Thread Vincent St-Amour
Typed Racket's implementation uses conditional contracts internally. There's a switch that determines, at syntax time, whether contracts are added or not. This can completely eliminate the run time overhead of contracts. This cannot retroactively enable/disable contracts to compiled code; you need

Re: [racket] Functional Data Structures for Typed Racket?

2012-05-22 Thread Vincent St-Amour
They're available on PLaneT: http://planet.racket-lang.org/display.ss?package=pfds.plt&owner=krhari Asumu has an updated version on github. https://github.com/takikawa/tr-pfds Vincent At Wed, 23 May 2012 11:48:42 +1000, Simon Haines wrote: > > [1 ] > [1.1 ] > I'm pretty keen to try out some

Re: [racket] H264 Codec in Racket

2012-06-14 Thread Vincent St-Amour
At Thu, 14 Jun 2012 17:12:05 -0700 (PDT), Anurag Mendhekar wrote: > 2. Typed racket is also something we will explore. Are there any > benchmarks out there for typed v. untyped racket? Our PLDI 2011 paper has benchmark results: http://www.ccs.neu.edu/racket/pubs/pldi11-thacff.pdf We've continued

Re: [racket] actions with a proc

2012-07-03 Thread Vincent St-Amour
At Tue, 03 Jul 2012 14:55:00 +0200, Maleval Sebastien wrote: > Hi, I'm trying to use file functions, and I asked myself if it was > possible to execute, and in the same time, write in a ".exe" file. > Someone know what function I must use for this ? As far as I know, Windows does not let you wri

Re: [racket] Check Syntax arrows for #lang languages

2012-07-03 Thread Vincent St-Amour
At Tue, 3 Jul 2012 17:47:57 +0200, Jens Axel Søgaard wrote: > However there is one thing missing. After clicking the check syntax > button in DrRacket I do not get any arrows showing bindings. > Obviously I must have missed something, but what? > Is something required to turn on the arrows? If you

Re: [racket] actions with a proc

2012-07-03 Thread Vincent St-Amour
For future reference, we figured out a solution. Deleting the executable file as it's running achieves the same goal. Vincent At Tue, 03 Jul 2012 21:06:19 +0200, Maleval Sebastien wrote: > > Le 03/07/2012 18:53, Vincent St-Amour a écrit : > > At Tue, 03 Jul 2012 14:55:00 +

Re: [racket] Typed Racket and macros expanding to for*:

2012-07-24 Thread Vincent St-Amour
You could capture the continuation outside `for*' check the index in the body and jump out when it gets out of range. (let/ec: done : Void (for*: (for:-clause ...) (unless (< i m*n) (done (void))) (define x (let () . defs+exprs)) (vector-set! v i x) (set!

Re: [racket] Typed Racket and macros expanding to for*:

2012-07-24 Thread Vincent St-Amour
At Tue, 24 Jul 2012 10:06:20 -0400, Matthias Felleisen wrote: > I don't see any other way than use a #:when clause that checks i. That doesn't work, it would be an infinite loop that never executes the body. Vincent Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Typed Racket and macros expanding to for*:

2012-07-24 Thread Vincent St-Amour
At Tue, 24 Jul 2012 11:11:01 -0400, Matthias Felleisen wrote: > This kills an infinite or a large-number-of-iterations loop that the > programmer may have tried to specify with the for:-clauses. It does, but isn't it the point? Once the matrix is full, iteration should stop. Vincent _

Re: [racket] Racket development: Running/compiling from source rather than from a pre-built collection

2012-07-25 Thread Vincent St-Amour
Patrick, I usually keep multiple single-directory (i.e. not unix-style) Racket installs around, including one for development. I keep each install separate, and switch between them using this script: https://github.com/takikawa/racket-dev-goodies/blob/master/plt-bin Vincent At Tue, 24 Jul

Re: [racket] Formating Printing of Real Number

2012-07-27 Thread Vincent St-Amour
Does `real->decimal-string' do what you want? Vincent At Fri, 27 Jul 2012 14:27:17 -0400, Ray Racine wrote: > > [1 ] > [1.1 ] > Unable to locate a means to control the output formatting of > Real/Floats/what-have-you either via current formatting facilities (format > procedure etc) or via som

Re: [racket] Implementing an equal? method for a class

2012-07-28 Thread Vincent St-Amour
You could have `simple-grid%' implement the `equal<%>' interface. http://docs.racket-lang.org/reference/objectequality.html?q=equal%3C%25%3E#%28def._%28%28lib._racket/private/class-internal..rkt%29._equal~3c~25~3e%29%29 Vincent At Sat, 28 Jul 2012 19:35:47 -0700, Gregory Woodhouse wrote: > > O

Re: [racket] 'Adult' Racket? (was rackunit vs test-engine)

2012-08-08 Thread Vincent St-Amour
At Wed, 8 Aug 2012 12:28:37 -0400, Danny Yoo wrote: > > > I wish that I had known about rackunit earlier. What other > > 'adult' features of Racket should people would you recommend to > > readers of HtDP? > > When you think of objects in the Java or C++ sense, there are two > concepts there tha

Re: [racket] structural program comparison tool in Racket

2012-09-13 Thread Vincent St-Amour
At Thu, 13 Sep 2012 17:06:35 -0400, Asumu Takikawa wrote: > > On 2012-09-14 04:34:21 +0800, Yin Wang wrote: > > I'm developing a tool for "diffing" program by parse trees and not > > text. It is written in Racket and can process Lisp family languages, > > C++, JavaScript and Python. It has a JavaS

Re: [racket] TR performance bug: removing variable ref slows things down substantially?

2012-09-14 Thread Vincent St-Amour
I can't reproduce what you describe. With `flvector-set!': cpu time: 3404 real time: 3405 gc time: 0 Without: cpu time: 548 real time: 546 gc time: 64 Are you running the two versions in the same way? Vincent At Fri, 14 Sep 2012 16:19:56 -0700, John Clements wrote: > > [1 ] > [1.1 ] > Okay

Re: [racket] TR req: could 'modulo' be more optimized or specialized?

2012-09-14 Thread Vincent St-Amour
Replacing `modulo' with `fxmodulo' removes the allocation for me. Thankfully, Typed Racket can do it for you, and Optimization Coach can help you get there. OC reports that the upper bound on `i', `(* 10 44100)', can't be proven to be a fixnum. If you add an explicit check (i.e. `(assert (* 10 44

Re: [racket] Typed Racket vs. Haskell

2012-09-18 Thread Vincent St-Amour
At Tue, 18 Sep 2012 09:55:36 -0700, John Clements wrote: > On Sep 18, 2012, at 8:30 AM, thorso...@lavabit.com wrote: > > > Hi, > > > > I'm a beginner, but I have some experience with Scheme and Haskell. > > > > Haskell is famous for its strict type system. Is it possible to achieve > > this in a

Re: [racket] Typed Racket vs. Haskell

2012-09-18 Thread Vincent St-Amour
At Tue, 18 Sep 2012 16:08:29 -0400 (EDT), thorso...@lavabit.com wrote: > > > It's also possible to write Typed Racket programs "types first", like > > one would in Haskell, and I sometimes do. The "sums-of-products" > > programming style of Haskell and ML can be expressed easily with Typed > > Rac

Re: [racket] Typed Racket vs. Haskell

2012-09-20 Thread Vincent St-Amour
At Thu, 20 Sep 2012 02:41:02 -0400 (EDT), thorso...@lavabit.com wrote: > > The required "translation" step will be mostly > > removing the type declarations. Doing the same with Haskell etc would > > most likely be much harder. > > Is it possible not to remove types? Yes. A Typed Racket is a Rac

Re: [racket] users Digest, Vol 114, Issue 64

2015-02-26 Thread Vincent St-Amour
I haven't had any problems. You can sign up from this URL: https://groups.google.com/forum/#!forum/racket-users/join As for digests, I don't know. Vincent At Thu, 26 Feb 2015 11:51:52 -0500, Paul Ojanen wrote: > > Thank you for the notice and warning regarding the move to Google Groups. >

Re: [racket] sxpath, txpath and accessors

2015-03-02 Thread Vincent St-Amour
I think this is what you're looking for: ((sxpath '(aaa xxx (sxml:preceding '(www doc) I recommend the short tutorial near the top of this document: http://pkg-build.racket-lang.org/doc/sxml/sxpath.html It doesn't discuss `sxml:preceding` specifically, but it shows similar const

Re: [racket] sxpath, txpath and accessors

2015-03-03 Thread Vincent St-Amour
th`. Since, AFAICT, we're just packaging that library (i.e. not developing it) and its development appears to have stopped, I don't expect `txpath` to go anywhere. Vincent At Tue, 3 Mar 2015 06:56:34 -0500, Sanjeev K Sharma wrote: > > On Mon, Mar 02, 2015 at 09:52:53AM -0500, Vi

Re: [racket] Considering backward-incompatible change to Plot

2015-03-17 Thread Vincent St-Amour
I use Plot a lot, but pretty much only use `plot-pict` and `plot-file`, so this change wouldn't affect me. Not sure how useful that information is to you, but here it is anyway. :) Vincent At Tue, 17 Mar 2015 12:33:47 -0400, Neil Toronto wrote: > > Plot has been converted to Typed Racket in t

[racket] Announcing (fifth RacketCon) and Call for Speakers

2015-03-18 Thread Vincent St-Amour
(fifth RacketCon) will be held on September 27th in St. Louis. Like last year, we are pleased to be co-located with Strange Loop[1]. RacketCon is a yearly event where members of the Racket community get together, featuring talks and demos about the things you do with Racket. If you've built some

Re: [racket-users] pict/code with other languages

2015-03-26 Thread Vincent St-Amour
I use the `java-lexer` package to typeset JavaScript code: https://github.com/stamourv/java-lexer To turn those into picts, you can use `codeblock->pict` from `unstable/gui/scribble`. Vincent At Thu, 26 Mar 2015 09:45:50 -0700 (PDT), Jack Firth wrote: > > I'd like to typeset some Javascri

Re: [racket-users] Re: pict/code with other languages

2015-03-26 Thread Vincent St-Amour
Good catch! I just pushed a fix. Thanks! Vincent At Thu, 26 Mar 2015 10:38:53 -0700 (PDT), Jack Firth wrote: > > Fantastic, thank you. Sidenote - I had to (require java-lexer) instead of > (require java/code) like the readme says. > > -- > You received this message because you are subscrib

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread Vincent St-Amour
This is really cool! Do you have plans for operations on durations? Vincent At Wed, 25 Mar 2015 21:55:31 -0400, Jon Zeppieri wrote: > > I recently uploaded Gregor, a date and time library, to the package server. > > Features: > > - representations for and generic operations on: > - dates

Re: [racket-users] ANN: Gregor, a date and time library

2015-03-26 Thread Vincent St-Amour
At Thu, 26 Mar 2015 14:30:28 -0400, Jon Zeppieri wrote: > > On Thu, Mar 26, 2015 at 10:51 AM, Vincent St-Amour > wrote: > > This is really cool! > > > > Do you have plans for operations on durations? > > > > Vincent > > More vague thoughts than

Re: [racket-users] Racket and FastCGI

2015-04-03 Thread Vincent St-Amour
At Thu, 2 Apr 2015 20:14:12 -0700 (PDT), Lux wrote: > Also, as I use -intensively- Racket docs every day I need to know how > I can (if it is possible) contribute providing some sample code here > and here, as I think this is something where it is severely lacking. A > small snippet showing how to

Re: [racket-users] advice for writing desktop app

2015-04-03 Thread Vincent St-Amour
At Fri, 03 Apr 2015 10:40:18 +0200, Gour wrote: > So, it looks, (almost) everything is there present in Racket, so I wonder > whether you consider that writing desktop GUI app is suitable niche for > Racket making one productive and still getting decent performance? I have written GUI applications

Re: [racket-users] Racket and FastCGI

2015-04-03 Thread Vincent St-Amour
At Fri, 3 Apr 2015 08:14:10 -0700 (PDT), Lux wrote: > > Thanks for your welcoming words, Vincent. > > For some reasons I was certain Racket github repository was a sort of > mirror of the real almost secret repository where superheroes are > working hard to make it real... The core repo is indee

Re: [racket-users] How to find most efficient constructs/instructions beside benchmarking?

2015-04-06 Thread Vincent St-Amour
At Mon, 6 Apr 2015 00:37:51 -0700 (PDT), Lux wrote: > > It is more efficient (second myList) or (car (cdr myList)) if it is > any difference at all? I second what Matthias said. > What are the principles I can keep in mind when I try to make code as > efficient as possible? You may be intereste

Re: [racket-users] What is the purpose of the undocumented #:dispatch option for define-generics?

2015-04-24 Thread Vincent St-Amour
Carl introduced it in this commit: https://github.com/plt/racket/commit/97b78ace5b3f7cebe7604513142ba488acee6903 The motivation seems to allowing dispatch to fail faster (and go on to the next case) for defaults / fast-defaults. E.g., if you know that the only lists that are dicts are alists, then

Re: [racket-users] google groups transition pretty much done

2015-04-29 Thread Vincent St-Amour
add1 Thanks John! Vincent At Wed, 29 Apr 2015 13:06:57 -0400, Neil Toronto wrote: > > On 04/29/2015 12:06 PM, 'John Clements' via Racket Users wrote: > > TL;DR. All OK. > > > > Only if you’re interested, a brief status report on the transition to > > Google Groups: > > > > - all old users inv

Re: [racket-users] scribble confusion ...

2015-04-30 Thread Vincent St-Amour
At Tue, 21 Apr 2015 04:06:19 -0700 (PDT), thomas.lynch wrote: > > Manual says: > > " > remember that the Scribble is just an alternate for S-expressions > " > > Please pardon the question .. ah then what good is it? We already > have S-expressions. Perhaps it looks a lot nicer? .. but i

[racket-users] (fifth RacketCon) Registration is Now Open

2015-05-07 Thread Vincent St-Amour
Registration [1] for (fifth RacketCon) [2] is now open! (fifth RacketCon) will be held on September 27th in St. Louis. Like last year, we are pleased to be co-located with Strange Loop[3]. RacketCon is a yearly event where members of the Racket community get together, featuring talks and demos a

Re: [racket-users] racket-explorer now deals with cyclic/mutable data

2015-05-24 Thread Vincent St-Amour
Works like a charm now! Thanks! Vincent At Fri, 22 May 2015 16:52:10 -0400, Tony Garnock-Jones wrote: > > Hi all, > > I've updated racket-explorer (https://github.com/tonyg/racket-explorer) > to handle cyclic (and mutable) data by lazily (and repeatedly) unfolding > children only when the tri

Re: [racket-users] Generic collections in Racket

2015-05-25 Thread Vincent St-Amour
At Sun, 24 May 2015 17:26:12 -0700, Alexis King wrote: > > > 1. What if you do care about the order? IOW should there also be > > generic "cons" and "snoc"? > > Having a generic cons is a good idea, and I will consider a good way to > incorporate it. However, there are lots of tradeoffs in variou

Re: [racket-users] test amazes me

2015-05-25 Thread Vincent St-Amour
At Mon, 25 May 2015 08:03:22 +0200, Jos Koot wrote: > > Now I am looking into rackunit and (planet schematics/schemeunit:3). I believe the former is a descendant of the latter, so you're probably better off sticking to Rackunit. Vincent -- You received this message because you are subscribed to

[racket-users] (fifth RacketCon) Second Call for Speakers

2015-06-04 Thread Vincent St-Amour
The schedule for (fifth RacketCon) [1] is starting to take shape, but we still have room for more speakers. If you've built something cool with Racket, we want to hear about it! We're looking for speakers to give 15 minute talks about their Racket-based applications, libraries, etc. If that sounds

Re: [racket-users] using something similar to grep for data extraction

2015-06-09 Thread Vincent St-Amour
`dropf` and `takef` from racket/list should be what you're looking for. (define lines (file->lines "x.txt")) (define content (takef (dropf lines (lambda (x) (not (equal? x ";start" (lambda (x) (not (equal? x ";end") Vincent On Tue, 09 Jun 2015 09:43:25 -0500

Re: [racket-users] right abstraction for this?

2015-06-11 Thread Vincent St-Amour
As Greg points out, it was directly inspired by SQL's `group-by`. I've found it really handy when thinking about data in a relational way. Anyone opposed to moving it to `racket/list`? That would make it more discoverable? Vincent At Thu, 11 Jun 2015 11:17:26 -0700, 'John Clements' via users-r

Re: [racket-users] tex2page and Racket(latest version) problem

2015-06-16 Thread Vincent St-Amour
Hi, How did you install Racket? It looks like you have used the wrong installer. You probably want the Mac OS 64 bit version. Vincent On Tue, 16 Jun 2015 07:21:30 -0500, youga wrote: > > I want to use tex2page on my mac. tex2page use a scheme compiler. > I follow the tex2page install, but I ca

Re: [racket-users] Reporting Simple Bugs and Fixing Them

2015-06-19 Thread Vincent St-Amour
For changes like typoes, Github has a "pencil" button at the top of its source view that simplifies the pull-request process. https://help.github.com/articles/editing-files-in-another-user-s-repository/ Vincent At Thu, 18 Jun 2015 21:44:50 -0400, Alexander D. Knauth wrote: > > > You could pr

Re: [racket-users] Intro Projects

2015-07-28 Thread Vincent St-Amour
I believe the page is mostly up to date. But just in case, you may want to skim pkgs.racket-lang.org before diving in to a particular project, to see if someone already implemented something similar. Vincent On Tue, 28 Jul 2015 02:56:06 -0500, Andrew Gwozdziewycz wrote: > > Hi All, > > What

Re: [racket-users] Feel confused with some concepts

2015-07-29 Thread Vincent St-Amour
On Wed, 29 Jul 2015 05:51:33 -0500, Yanpeng Li wrote: > > I don't know if a new Racket user can ask some `fool questions' > here. I am learning sicp using Dr. Racket, it is interesting(the book > and the Racket language). I encounter some concepts, such as module, > library, collection, package wh

[racket-users] Full (fifth RacketCon) Program is up!

2015-07-29 Thread Vincent St-Amour
The full program of (fifth RacketCon) is now available! [1] Don't forget to register! [2] RacketCon is a yearly event where members of the Racket community get together, featuring talks and demos about the things you do with Racket. On the menu is "The Racket Manifesto" by Matthias Felleisen, pl

  1   2   3   4   5   >