Re: [racket] html-template

2011-08-21 Thread Neil Van Dyke
Danny Yoo wrote at 08/22/2011 02:31 AM: It looks like you're trying to standardize the particular s-expression representation we'll be using for XML in Racket. Is there a practical difference between SXML and xexp? They are very similar. We've had a few discussion threads on this email li

Re: [racket] html-template

2011-08-21 Thread Danny Yoo
> You'll also see a few other new "SXML/xexp" packages from me, and together > they obsolete HtmlPrag. Cool. I'll definitely be using something like SXML/xexp for Whalesong's web-world. It looks like you're trying to standardize the particular s-expression representation we'll be using for XML

[racket] html-template

2011-08-21 Thread Neil Van Dyke
I've released an HTML template package: http://www.neilvandyke.org/racket-html-template/ The documentation is bad, and I'll be making some code enhancements and doing additional testing, but I've been using this code to generate consulting invoices for a few years now. You'll also see a few

Re: [racket] How do I set baud/parity/stop for a serial port?

2011-08-21 Thread Neil Van Dyke
Steven Zins wrote at 08/21/2011 11:53 PM: How do I set baud/parity/stop in Racket for a serial port in Windows/Linux/Mac. Eg for "\\.\COM4" I bet you're going to need to make some Windows system calls using the Racket FFI. I don't know what the best documentation is for the Windows calls, bu

[racket] How do I set baud/parity/stop for a serial port?

2011-08-21 Thread Steven Zins
How do I set baud/parity/stop in Racket for a serial port in Windows/Linux/Mac. Eg for "\\.\COM4" (new button% [parent ButtonPanel] [label "Test USB"] [callback (lambda (e b) (let-values ([(in-com out-com) (open-input-output-file ".\\

Re: [racket] An error with dates and types

2011-08-21 Thread Norman Gray
On 2011 Aug 22, at 01:30, Carl Eastlund wrote: >> I wrote so. That's why I believe that the existing TR confused Norman into >> requiring date->seconds from an UNTYPED >> module. I really think we need require:. > > There might be some confusion here because there are two kinds of > typed modu

Re: [racket] db independence [was: something else]

2011-08-21 Thread Grant Rettke
On Sun, Aug 21, 2011 at 9:16 AM, Matthias Felleisen wrote: > I am wondering whether a unit-oriented approach would help here. You could > write your > program against a uniform API that adapts itself properly to the DB context > in which it is > deployed. > > Warning: I have no clue about real d

Re: [racket] An error with dates and types

2011-08-21 Thread Carl Eastlund
On Sun, Aug 21, 2011 at 8:22 PM, Matthias Felleisen wrote: > > On Aug 21, 2011, at 8:15 PM, Carl Eastlund wrote: > >> You can't.  You can require stuff from *typed* modules. > > I wrote so. That's why I believe that the existing TR confused Norman into > requiring date->seconds from an UNTYPED >

Re: [racket] An error with dates and types

2011-08-21 Thread Matthias Felleisen
On Aug 21, 2011, at 8:15 PM, Carl Eastlund wrote: > You can't. You can require stuff from *typed* modules. I wrote so. That's why I believe that the existing TR confused Norman into requiring date->seconds from an UNTYPED module. I really think we need require:.

Re: [racket] An error with dates and types

2011-08-21 Thread Carl Eastlund
On Sun, Aug 21, 2011 at 5:20 PM, Matthias Felleisen wrote: > > The way I understand the word "ought" comes with a moral connotation. > In this sense, I am saying > > (1) require should not exist in TR > > (2) require: should exist for importing from typed modules > > (3) require-typed should exist

[racket] linking to PLaneT package documentation from Scribble

2011-08-21 Thread Neil Van Dyke
What's the best way, from Scribble documentation of a PLaneT package, to: 1. Make a hyperlink to the documentation of a different PLaneT package, *without* having a PLaneT dependency on that package? (I see "secref #:doc"...) 2. Make a hyperlink to the documentation for a particular identif

Re: [racket] Help On User Libraries - The Basics

2011-08-21 Thread Ray Racine
> > If you're working on a shell it would be better to use readline -- but > since you're using the git head, it's even better to use the new > `xrepl'. Just add (require xrepl) to your ~/.racketrc, and you'll get > readline and an additional bunch of tools for REPL-use. Ok xrepl is very very co

Re: [racket] An error with dates and types

2011-08-21 Thread Matthias Felleisen
That's another good idea: translate provide/contract specs into types. On Aug 21, 2011, at 6:16 PM, Robby Findler wrote: > Perhaps it would be nice to have require exist in TR but for it to > collaborate with provide/contract to turn the parts of the contracts > that it can into types (and le

Re: [racket] An error with dates and types

2011-08-21 Thread Robby Findler
Perhaps it would be nice to have require exist in TR but for it to collaborate with provide/contract to turn the parts of the contracts that it can into types (and leave behind some contract checking) and, when you or Ryan or someone figures out how macros & contracts work together, to fit those in

Re: [racket] Help On User Libraries - The Basics

2011-08-21 Thread Ray Racine
Good stuff to know. Thx. On Sun, Aug 21, 2011 at 6:06 PM, Eli Barzilay wrote: > 6 hours ago, Ray Racine wrote: > > > > Fire up my repl with the path to my personal collection and invoke. > > [ray@ray rktlib]$ rlwrap /usr/local/racket/bin/racket -i -S > /code/rktlib > > If you're working on a

Re: [racket] Help On User Libraries - The Basics

2011-08-21 Thread Eli Barzilay
6 hours ago, Ray Racine wrote: > > Fire up my repl with the path to my personal collection and invoke. > [ray@ray rktlib]$ rlwrap /usr/local/racket/bin/racket -i -S /code/rktlib If you're working on a shell it would be better to use readline -- but since you're using the git head, it's even bett

Re: [racket] Help On User Libraries - The Basics

2011-08-21 Thread Eli Barzilay
5 hours ago, Ray Racine wrote: > > The whole thing should just be a drop dead simple exercise. Just to clarify my earlier +1 for Neil's reply: if you stick to just plain relative requires, and symbolic requires only for library code and planet libraries, then things are very simple. --

Re: [racket] Help On User Libraries - The Basics

2011-08-21 Thread Eli Barzilay
Two minutes ago, Matthias Felleisen wrote: > > I use relative path but I started using path-up and friends because > it looked cleaner That solves a different issue -- one that is closer to a concept of a "common project configuration" thing. > (except that it doesn't jive with check-syntax so

Re: [racket] Help On User Libraries - The Basics

2011-08-21 Thread Eli Barzilay
Four hours ago, Neil Van Dyke wrote: > Ray Racine wrote at 08/21/2011 01:06 PM: > > So here is the scenario. Joe the some what experienced coder > > hears lisp is cool and Racket is the coolest lisp around. > > I understand what you're saying, and I think you've convinced me to > change my answer

Re: [racket] Help On User Libraries - The Basics

2011-08-21 Thread Matthias Felleisen
I use relative path but I started using path-up and friends because it looked cleaner (except that it doesn't jive with check-syntax so I eliminated it again). Nevertheless, I would like to use the same syntax as for built-in collections to require my private project modules. -- Matthias

Re: [racket] An error with dates and types

2011-08-21 Thread Matthias Felleisen
The way I understand the word "ought" comes with a moral connotation. In this sense, I am saying (1) require should not exist in TR (2) require: should exist for importing from typed modules (3) require-typed should exist for importing from untyped modules. Why? The idea of explicit speci

Re: [racket] Help On User Libraries - The Basics

2011-08-21 Thread John Clements
On Aug 21, 2011, at 1:50 PM, Neil Van Dyke wrote: > Ray Racine wrote at 08/21/2011 01:06 PM: >> So here is the scenario. Joe the some what experienced coder hears lisp is >> cool and Racket is the coolest lisp around. > > I understand what you're saying, and I think you've convinced me to chan

Re: [racket] Racket in the large

2011-08-21 Thread Ryan Culpepper
On 08/20/2011 09:15 PM, gonzalo diethelm wrote: [...] 6. I think there is one thing missing in Racket, and this was also pointed out during the discussion: database drivers for major DBMSs (I would say at least Oracle, DB2 and SQL Server on the commercial front, and PostgreSQL, SQLite and MySQL

Re: [racket] Help On User Libraries - The Basics

2011-08-21 Thread Matthew Flatt
At Sun, 21 Aug 2011 14:03:14 -0400, Ray Racine wrote: > Can I assume that when you say everyone uses racket setup that the arching > strategy here is for a local library/collection to be established as as a > planet lib associated with a development link and use raco as the make-build > system for

Re: [racket] Help On User Libraries - The Basics

2011-08-21 Thread Ray Racine
Hi Matthew, On Sun, Aug 21, 2011 at 1:49 PM, Matthew Flatt wrote: > At Sun, 21 Aug 2011 13:34:14 -0400, Ray Racine wrote: > > Given the example of a small collection of library utility code, how do I > > tell raco where it is located. I know of the > > PLTCOLLECT environment variable trick but

[racket] IFL 2011 @ Univ. of Kansas, USA!

2011-08-21 Thread Marco Morazan
Dear Racketeers and HtDPers, IFL 2011 will be held Oct. 3-5 at the University of Kansas. Full details can be found at: http://www.ittc.ku.edu/ifl2011/ . The deadline to submit a presentation has been extended to August 31st. IFL aims to bring together people that implement functional languages, t

Re: [racket] An error with dates and types

2011-08-21 Thread Norman Gray
Greetings. On 2011 Aug 21, at 18:38, Carl Eastlund wrote: > The error > Norman reported looks like an internal error in TR related to the > contract on date->seconds. This was my impression. Sorry if it wasn't clear, but my intention was to report the occurrence of the internal-looking error.

Re: [racket] An error with dates and types

2011-08-21 Thread Carl Eastlund
I still don't follow. There's a shallow error -- 'ought' means the same as 'should', presumably you mean to remove 'be able to' instead. But there's also a deeper error, as far as I can tell. In general, one should use require rather than require/typed so you use a binding's originally assigned t

Re: [racket] Help On User Libraries - The Basics

2011-08-21 Thread Neil Van Dyke
Ray Racine wrote at 08/21/2011 01:06 PM: So here is the scenario. Joe the some what experienced coder hears lisp is cool and Racket is the coolest lisp around. I understand what you're saying, and I think you've convinced me to change my answers. Before, I wanted Joe to use PLaneT developmen

Re: [racket] Help On User Libraries - The Basics

2011-08-21 Thread Matthew Flatt
At Sun, 21 Aug 2011 13:34:14 -0400, Ray Racine wrote: > Given the example of a small collection of library utility code, how do I > tell raco where it is located. I know of the > PLTCOLLECT environment variable trick but is that "the way"? I don't like setting PLTCOLLECTS, and I have been conside

Re: [racket] An error with dates and types

2011-08-21 Thread Matthias Felleisen
I should have used 'ought' instead of 'should'. On Aug 21, 2011, at 1:38 PM, Carl Eastlund wrote: > Plain require works fine in Typed Racket; there's only a problem if TR > cannot typecheck the resulting code. You normally only need to use > require/typed to assign types to otherwise-unty

Re: [racket] An error with dates and types

2011-08-21 Thread Carl Eastlund
Plain require works fine in Typed Racket; there's only a problem if TR cannot typecheck the resulting code. You normally only need to use require/typed to assign types to otherwise-untyped imports. The error Norman reported looks like an internal error in TR related to the contract on date->secon

Re: [racket] Help On User Libraries - The Basics

2011-08-21 Thread Ray Racine
Hi Robby, Given the example of a small collection of library utility code, how do I tell raco where it is located. I know of the PLTCOLLECT environment variable trick but is that "the way"? [ray@ray rktlib]$ /usr/local/racket/bin/raco setup rktlib collection-path: collection not found: # in any

[racket] How to start embedded racket from a pthread?

2011-08-21 Thread Pedro DeKeratry
Hi, I started a new application with embedded racket and got the example listed in "Inside: Racket C API" section 1.4 for 3m up and running. However, I wish to start racket from a pthread instead of the main thread, and when I do that the program stops with the following error: SIGSEGV MAPERR si_

Re: [racket] An error with dates and types

2011-08-21 Thread Matthias Felleisen
You shouldn't be able to use plain require in Typed Racket. Try this: #lang typed/racket (require/typed racket/date (date->seconds (date -> Natural))) (date->seconds (seconds->date (current-seconds))) On Aug 21, 2011, at 11:06 AM, Norman Gray wrote: > > Greetings. > > Another typed-racket

Re: [racket] Help On User Libraries - The Basics

2011-08-21 Thread Ray Racine
Neil, I'm pretty much familiar with all of those approaches, but every time I resort to them they feel like workarounds that are not generally satisfying and I must be missing something. Worse these are all "techniques" that people figure out after some serious head banging on brick wall trial a

Re: [racket] Help On User Libraries - The Basics

2011-08-21 Thread Robby Findler
I think there might be confusion between "raco make" and "raco setup"? Robby On Sunday, August 21, 2011, Ray Racine wrote: > Yes. > raco make either makes the entire racket default collection (and the one in you home path which will ignore for now). Or one can tell it to only make a single libr

Re: [racket] Help On User Libraries - The Basics

2011-08-21 Thread Ray Racine
Yes. raco make either makes the entire racket default collection (and the one in you home path which will ignore for now). Or one can tell it to only make a single library in the default collection, e.g., raco make compiler So by default raco doesn't "see" my collection at /code/rktlib. One tri

Re: [racket] Help On User Libraries - The Basics

2011-08-21 Thread Neil Van Dyke
Ray Racine wrote at 08/21/2011 12:23 PM: The goal is to write a few common utility / library code that I frequently reuse in various projects. First question, are "collections" the way to do this? Some people do it with collections and the "PLTCOLLECTS" environment variable. Some people ju

Re: [racket] Help On User Libraries - The Basics

2011-08-21 Thread Jens Axel Søgaard
2011/8/21 Ray Racine > Works, so now compile it to zos. > ... > > (require compiler/compiler) > > (compile-collection-zos "c1") > for-each: expects type as 2nd argument, given: #; other > arguments were: # > ... > Next question, what am I doing wrong? > Have you tried using "raco make c1.rkt

[racket] Help On User Libraries - The Basics

2011-08-21 Thread Ray Racine
Hi, I've been using Racket on and off for years and am currently in an 'on' period. Whenever I come back, I seem to hit it seems I hit same conceptual brick walls. Here is one of them: How does one create and use a simple, basic, User Library / Collection? For the current conversation, for now

[racket] An error with dates and types

2011-08-21 Thread Norman Gray
Greetings. Another typed-racket problem, I'm afraid. With the following script, I get an error message from Typed Racket which is not, I think, really addressed to me. (Is the list generally OK for straight bug reports? There isn't a bug parade I should be posting this on, is there?) All th

Re: [racket] Focus of GUI frames opened from "racket"

2011-08-21 Thread John Clements
On Aug 18, 2011, at 7:22 PM, Neil Toronto wrote: > On my machine (Linux) and apparently another (OS X), creating and showing a > frame% from command-line "racket" doesn't always 1) put the window in the > front; or 2) give the window focus. In fact, on my machine, it never gets > focus, and *u

[racket] db independence [was: something else]

2011-08-21 Thread Matthias Felleisen
> > On Aug 21, 2011, at 6:57 AM, keyd...@gmx.de wrote: > >> Perhaps I can add a remark to this "from the other" (the database admins') >> side :-; ? From the point of view of an Oracle DBA (I'm emphasizing "Oracle" >> here as I don't want to generalize, having no comparable experience with >>

Re: [racket] Racket in the large

2011-08-21 Thread keyd...@gmx.de
Hi Neil, hi all, >> > > Regarding Oracle and DB2, I suspect that anyone invested in one of those > could use some of the open source Racket interfaces for other RDBMSs as > examples for supporting another RDBMS. The cost might be relatively > minor (considering the large existing investment