Re: [racket] try-racket alternative

2015-02-26 Thread Mark
s where they can't install DrRacket on computers very easily. Mark Racket Users list: http://lists.racket-lang.org/users

[racket-users] [newbie] Help with streams

2015-12-20 Thread mark
ame "anglo" "male")) but that seems to miss out on the goodness of streams/generators. Any help/tips appreciated. TIA, .. mark. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop

[racket] Sending s-expr to repl

2010-06-24 Thread Mark Carter
Scheme newbie here. I've always had a bee in my bonnet for the Lispy languages, but had never gotten into them fully for one reason or another. I've been playing with DrRacket, and have been able to plot graphs using it. Way cool! Anyway, my actual question is: using DrRacket, is there a way of

[racket] Racket collections

2010-06-27 Thread Mark Carter
Is thee a way of adding a directory to the 'collects' path, or some other way of specifying where Racket should look for collections? _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

Re: [racket] All black images...Ahhh

2010-07-21 Thread Mark Engelberg
I recently reported a bug that sounds extremely related: (Problem Report 11033) where empty white scenes were sometimes showing up as black. Also on Windows. You might want to check whether this fix addresses that bug as well, and if so, you can close out that problem report.

[racket-users] Re: Examples of sending HTML email w/ Racket?

2021-07-31 Thread mark M
k/axio.git mark@ll~ $ raco pkg install https://github.com:AxioFramework/axio.git raco pkg install: invalid package source; cannot parse URL given: https://github.com:AxioFramework/axio.git don't seem to work ; kindly help #noob On Wednesday, April 8, 2020 at 9:54:48 AM UTC-7 br...@lojic.com

[racket-users] Re: Core Team: I need you decide what I should do about the spammer.

2021-12-20 Thread Mark Bestley
mane.io bridge set up for the Discourse mail list. -- Mark -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. T

[racket-users] Re: can't open DrRacket 8.5 on M1 macOS

2022-07-06 Thread Mark Bestley
t; screen) > carefully, you will notice that something shows up and then disappears > immediately > every time (00:02 and 00:16) DrRacket is opened. This suggests that DrRacket > is > closed immediately after being opened. > This is a known problem see Github issue https://g

Re: [racket] Module docs

2011-08-30 Thread Mark Carter
- Original Message - > From: Matthew Flatt > To: Mark Carter > Cc: "users@racket-lang.org" > Sent: Tuesday, 30 August 2011, 15:07 > Subject: Re: [racket] Module docs > >T hanks for the details. I see that `raco setup' in a fresh install on > W

Re: [racket] Module docs

2011-09-04 Thread Mark Carter
>From: Matthew Flatt >Sent: Friday, 2 September 2011, 15:56 >I think the problems that you saw are now fixed in the nightly build. I did the following: 1. Deleted c:\Racket directory (where I install Racket) 2. Deleted C:\Users\mcarter\AppData\Roaming\Racket

[racket] Scribble: escaping the semicolon

2011-09-04 Thread Mark Carter
I'm documenting my module in a scribble file, and I have a @racket segement in which I would like to include a semicolon. How do I escape a semicolon? _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

Re: [racket] Scribble: escaping the semicolon

2011-09-04 Thread Mark Carter
- Original Message - > From: Neil Van Dyke > Does "scribble/comment-reader" do what you need? Unfortunately, I can't really say, as the Racket documentation on my machine seems to be broken at the moment :( All I'm trying to do is put in a literal semi-colon. I've tried ;; and @; ,

Re: [racket] Module docs

2011-09-17 Thread Mark Carter
- Original Message - > From: Matthew Flatt > The latest nightly build works correctly on my machine. That seems to fix things. Many thanks! _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

[racket] Datalog suitable for an accounts package?

2011-09-18 Thread Mark Carter
I've been in the process of writing a little financial accounts package in Racket. I'm wondering if, instead of writing a lot of scheme code, a lot of funtionality could be more expressively and concisely be written in Datalog. I've never used Datalog before, nor Prolog, but I know it's somethin

Re: [racket] Datalog suitable for an accounts package?

2011-09-18 Thread Mark Carter
Fascinating. Thanks for the link. I have a lot - and I do mean a lot - to learn about it. I tried putting in some simple "facts", and noted how the querying worked. Oh my. It was a bit of an eye-opener. I see what you mean about the querying. It's as if a lot of what is in the developers "domai

[racket] Datalog: summing

2011-09-19 Thread Mark Carter
How do I create summing rules? Suppose I have the following facts: post(cash, 26) . post(cash, -16) . post(cash, 50) . post(beer, 20) . How do I create a rule "bal" bal(X, ???) such that the ??? gives me the sum of the second arguments in post satisfying the first argument X? Also, is there a

[racket] scribble items

2011-09-25 Thread Mark Carter
In scribble, I'm trying to create an unnumbered list like so: * Foo * Bar I do #lang scribble/manual @itemlist{ @item{Foo} @item{Bar} } but it gives me itemlist: contract violation, expected: item?, given: " "   contract from: /scribble/base.rkt, blaming:     C:\Users\mcarter\repos\tacc\carali\

[racket] Looking for awk examples

2011-09-29 Thread Mark Carter
I'm looking to implement some simple programs using mzlib/awk, but the manual page is rather impenetrable to me. Are there any examples I can use to get an idea as to how to use it? _ For list-related administrative tasks: http://lists.racket-

[racket] Question about round

2011-09-29 Thread Mark Engelberg
I'm a bit baffled by this behavior: > (exact? (round (sin 30))) #f > (integer? (round (sin 30))) #t > How is it possible to have an inexact integer? I would expect the answer to both of these tests to be true. Thanks, Mark _ Fo

Re: [racket] Question about round

2011-09-30 Thread Mark Engelberg
makes sense. Still seems weird and inconvenient for round to give you back an inexact integer rather than an exact one, but I can see now how this behavior matches the standard. Thanks, Mark _ For list-related administrative tasks: http://l

[racket] Poll: Does anybody besides Doug use 'plot'?

2011-09-30 Thread Mark Carter
> At Eli's suggestion, I'm conducting a poll. Does anybody on this list > use the 'plot' module, or know of someone who does? Well, I've used it in the past, and I'm thinking about using it in the future. Nice module! Don't worry about breaking compatability on my account, though. One thing I

[racket] Functions as symbols

2011-10-07 Thread Mark Carter
I would like to treat a symbol as a function, and apply it to some arguments. In other words, if I did something like (define sym '+) (apply '+ '(1 2)) I would obtain the answer 3. Is there any way I can do this? The following works, but I'm wondering if it's the best way: (eval `(apply ,sym '(1

Re: [racket] Why internal definitions?

2011-11-16 Thread Mark Engelberg
I frequently find myself wishing that you could use internal definitions in cond without introducing additional indentation, for example something like: (define (fun-for-list l) (cond [(empty? l) ...] (define fst (first l)) [(even? fst) ...] [(odd? fst) ...])) rather than (defi

[racket] Disable/Enable Tests

2011-11-27 Thread Mark Engelberg
In the latest version of Racket, I see a menu item to disable and enable tests. What testing library does this work with? The htdp testing library, rackunit, something else? Thanks, Mark _ For list-related administrative tasks: http

[racket] Challenge Questions

2011-12-02 Thread Mark Soric
t finished covered graphs in class - any suggestions would be greatly appreciated. The questions should be challenging but not impossible and no higher than the Intermediate Student with Lambda level. Thanks! Mark _ For list-related administrative tas

Re: [racket] shortest paths, resource allocation/scheduling

2011-12-05 Thread Mark Engelberg
Check out Algorithm T in chapter 7.2.1.3 of Knuth, volume 4A part 1. Put your items into a vector, and use Algorithm T to generate the indices of the elements to extract. _ For list-related administrative tasks: http://lists.racket-lang.org/listin

Re: [racket] Mark Tarver is the man!

2012-01-01 Thread Mark Engelberg
The PLT team clearly cares passionately about creating and maintaining real, usable languages and tools. That is why Racket exists. Very few academic projects produce anything nearly as useful and professional. I find your comparison to Shen somewhat ironic, because, as much as I admire Shen, I

Re: [racket] Mark Tarver is the man!

2012-01-01 Thread Mark Engelberg
On Sun, Jan 1, 2012 at 4:50 PM, Raoul Duke wrote: > horses for courses, to some degree - Shen is all about portability, > and it is very young. No doubt. I have my eye on Shen. It could mature into something very cool, and I'm hoping that happens. I meant my opinion to be about the breadth of

[racket] Getting started with Scribble

2012-03-16 Thread Mark Engelberg
7;m looking for something lightweight. Is there a way? Thanks, Mark Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Getting started with Scribble

2012-03-16 Thread Mark Engelberg
;; The zero test [else (* n (factorial (sub1 n)))])) ] But when I hit Run, it doesn't seem to recognize factorial in the interactions window. On Fri, Mar 16, 2012 at 6:41 PM, David Van Horn wrote: > On 3/16/12 8:42 PM, Mark Engelberg wrote: > >> So I'm trying to fi

Re: [racket] Getting started with Scribble

2012-03-16 Thread Mark Engelberg
that mode, by default, a line is treated as text unless it has a > at the beginning of the line to indicate it is code. I was under the impression that with Scribble, I could do something similar (mostly text, but with occasional code blocks), but would have the additional benefits of Scrib

Re: [racket] Getting started with Scribble

2012-03-16 Thread Mark Engelberg
On Fri, Mar 16, 2012 at 7:45 PM, Mark Engelberg wrote: > scribble/lp is related, but more involved to use. Specifically, I just > tried it and it doesn't seem to work with the scribble html button that > appears in DrRacket. I keep getting the following error: > scrib

Re: [racket] Getting started with Scribble

2012-03-16 Thread Mark Engelberg
Ugh, scratch my scratching that. I'm still getting the error. On Fri, Mar 16, 2012 at 7:47 PM, Mark Engelberg wrote: > On Fri, Mar 16, 2012 at 7:45 PM, Mark Engelberg > wrote: > >> scribble/lp is related, but more involved to use. Specifically, I just >> tried it a

Re: [racket] Getting started with Scribble

2012-03-16 Thread Mark Engelberg
OK, I pasted in the code from the docs just to make sure it wasn't something in my code. Then I hit the "Scribble HTML" button that appears in the upper-right corner of DrRacket. I see the following in the interactions window: Welcome to DrRacket, version 5.2 [3m]. Language: scribble/lp; memory

Re: [racket] Getting started with Scribble

2012-03-17 Thread Mark Engelberg
I'm still curious to get scribble/lp working, but I've figured out an immediate solution to my question. I was able to get the behavior I want with just a simple macro: @(define-syntax-rule (code l) (begin @schemeblock[l] l)) Below is a sample of its use to get the behavior I want wh

Re: [racket] Getting started with Scribble

2012-03-17 Thread Mark Engelberg
On Sat, Mar 17, 2012 at 5:36 AM, Robby Findler wrote: > That is now how scribble/lp works. You need to make another file and > use @lp-include on the first to get a document that actually > scribbles. There is more explanation of this in the docs, right below > that first example. > > Robby > > OK

Re: [racket] Getting started with Scribble

2012-03-17 Thread Mark Engelberg
On Sat, Mar 17, 2012 at 11:44 AM, Eli Barzilay wrote: > Note that what Haskell does is *semi*-literate-programming, something > that has little to do with literate programming. Neil Van Dyke is > working on a tool that is going to be more like > semi-literate-programming. > > I understand that l

Re: [racket] Scribble to latex

2012-06-08 Thread Mark Millikan
Two work arounds: 1. Launch DrRacket from a terminal with 2. Run == This fragment from racket/collects/redex/private/dot.rkt succinctly describes the problem and a hard-coded solution to the root problem: ;; these paths are explicitly checked (when find-executable-path ;

Re: [racket] Scribble to latex

2012-06-12 Thread Mark Millikan
Did you try my first workaround suggestion? It lets you keep PATH modifications to typical *nix ones: such as install scripts expect/suggest easing maintenance, ymmv. On Mon, Jun 11, 2012 at 3:31 PM, Danny Yoo wrote: > On Wed, Jun 6, 2012 at 2:40 PM, Viera Proulx wrote: > > I am starting to pl

[racket-users] raco demod : '"cannot instantiate `racket/gui/base' a second time in the same process"

2015-04-24 Thread Mark Lee
is only required once. What could be causing this error? Regards, Mark -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegro

[racket-users] Re: raco demod : '"cannot instantiate `racket/gui/base' a second time in the same process"

2015-04-24 Thread Mark Lee
27;#)) > - > The program runs fine when I compile it with (raco make) and (raco exe). In > addition, the windowing library is only required once. What could be causing > this error? > > Regards, > Mark This error also repeats if I just (raco demod) the windowing

[racket-users] Re: raco demod : '"cannot instantiate `racket/gui/base' a second time in the same process"

2015-04-25 Thread Mark Lee
(_cast8910 '1 _scheme _pointer)) > > > >(error > > > > '"cannot instantiate `racket/gui/base' a second time in the same > > > > process") > > > >'#)) > > > >

[racket-users] Re: raco demod : '"cannot instantiate `racket/gui/base' a second time in the same process"

2015-04-25 Thread Mark Lee
> > > '"cannot instantiate `racket/gui/base' a second time in the same > > > > > > process") > > > > > >'#)) > > > > > > ----- > > > The program runs fine when I compile

[racket-users] Source Code Level Flattener

2015-04-26 Thread Mark Lee
e and imports them into a *-mega.rkt file. This file can be subsequently compiled with raco make <*-mega.rkt>. The code can be found at : https://github.com/bluerider/flattener Regards, Mark -- You received this message because you are subscribed to the Google Groups "Racket

[racket-users] Strange behavior when writing to a file

2015-06-02 Thread Mark Lee
hone-Number : 000-000- Regards, Mark database-test.rkt Description: application/kdeuser1 signature.asc Description: This is a digitally signed message part.

Re: [racket-users] Strange behavior when writing to a file

2015-06-03 Thread Mark Lee
On Tuesday, June 02, 2015 04:47:33 PM Matthew Flatt wrote: > I think you wanted `(and (>=` in place of `(or (<`. That did it, thanks a lot! Mistake on my part when I wrote it, the string-length check was added afterwords so I used an or statement instead of an and. Regards, Mark

[racket-users] read-line reads only a character at a time from file.

2015-12-17 Thread Mark Thom
As an exercise, I'm implementing a simple grep function in Racket: (define (grep-file pattern . files) (for ([file-path (in-list files)]) (with-input-from-file file-path #:mode 'text (lambda () (for ([line (read-line (current-input-port) 'return-linefeed)] [i (i

Re: [racket-users] read-line reads only a character at a time from file.

2015-12-17 Thread Mark Thom
Thanks very much! -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/

Re: [racket-users] Fwd: Us congress hearing of maan alsaan Money laundry قضية الكونغجرس لغسيل الأموال للمليادير معن الصانع

2016-02-03 Thread Mark Lee
To All, This message has been chronically sent to the mailing list. Can we classify it as spam and unrelated to the Racket Language? Regards, Mark On Wed, Feb 3, 2016 at 3:17 PM, Kasem A wrote: YouTube videos of U.S. Congress money laundering hearing of Saudi Billionaire " Maa

Re: [racket-users] IO in racket is painful

2016-03-22 Thread Mark Engelberg
Hi, I have coached several teams on using Racket in programming contests. In our local contests, the most common input format is to have one line per dataset, and each dataset is typically several pieces of data separated by spaces. For this common input format, the 2htdp/batch-io teachpack is th

Re: [racket-users] IO in racket is painful

2016-03-22 Thread Mark Engelberg
On Tue, Mar 22, 2016 at 9:20 PM, Stephen Chang wrote: > :) I had started writing up a parsack example, and I was all set to > admonish the OP for not creating a parser when you want a parser but > then I saw it was for a programming contest where I guess this sort of > scanf/regexp hackery is ok?

Re: [racket] Nested scope in D vs Racket

2010-08-21 Thread Mark Engelberg
On Sat, Aug 21, 2010 at 8:39 AM, Shriram Krishnamurthi wrote: > Or if you prefer the new direction we're going in: > (define (bar x) >  (lambda () >    (define x x) >    x)) I like the new direction. Where are all the possible places that a define can go without wrapping it in a local? How do

Re: [racket] text formatting questions

2010-08-22 Thread Mark Engelberg
I don't know how DrRacket is implemented, but you might want to look at this article for ideas about ways to represent strings in a manner that allows for efficient editing: http://www.cs.ubc.ca/local/reading/proceedings/spe91-95/spe/vol25/issue12/spe986.pdf

[racket] Web input-string with pre-fllled value

2010-08-24 Thread Mark Carter
I'm trying to construct a simple tax calculator in Racket for use over the web. Here's my code so far: #lang web-server/insta (require web-server/formlets) (define new-post-formlet (formlet (div "Amount: " ,{input-string . => . amount} ;,(select-input '("Net" "Gross") . => . type)

Re: [racket] Web input-string with pre-fllled value

2010-08-25 Thread Mark Carter
- Original Message > From: Nadeem Abdul Hamid > To: Mark Carter > Cc: users@racket-lang.org > Sent: Tue, 24 August, 2010 19:33:05 > Subject: Re: [racket] Web input-string with pre-fllled value > > > > > I would like to pre-fill the VAT Rate inp

Re: [racket] Web input-string with pre-fllled value

2010-08-25 Thread Mark Carter
- Original Message > From: Jay McCarthy > I'm interested in figuring out what is overwhelming and alleviating > it. Unless you're overwhelmed by its featurefullness ;) Yes - there's just a lot to absorb all at once. The example blog for Racket is very good. There's things that pu

[racket] Slackware 13.1 compilation

2010-08-26 Thread Mark Carter
I downloaded sources for Racket 5.0.1, as I would like to build it for Slackware. After unpacking and moving to the src directory, I type ./configure and then make A lot of compilation goes on, but it bails out with: ./../../wxcommon/wxJPEG.cxx:967: warning: 'png_struct_def::jmpbuf' is deprecat

[racket] Scribble url/hyperlink

2010-09-03 Thread Mark Carter
I'm trying to write some documentation using Scribble. It looks quite good, but I'm having some problems with understanding how I express internal links. Suppose my URL is http://www.google.com and I want the descriptive text to be Google Search Engine. How is it done in Scribble? __

[racket] Fw: Scribble url/hyperlink

2010-09-03 Thread Mark Carter
> @link["url"]{descriptive text} > Thanks, but I still can't get it to work. Here's what I typed: @link["http://beginnersinvest.about.com/cs/valueinvesting1/a/101302a.htm"]{Seven tests of Defensive Stock Selection} I've tried all sorts of variants, with quotes in various places, but noth

Re: [racket] Fw: Scribble url/hyperlink

2010-09-03 Thread Mark Carter
- Original Message > From: Jay McCarthy > Are you requiring scribble/manual? What error makes you think it doesn't work? Ah, I see! I had been using #lang scribble/base instead of #lang scribble/manual Changing it makes things right. Many thanks! _

[racket] Dirt-simple exceptions

2010-09-05 Thread Mark Carter
I can't get my head around Racket's exception mechanism. I want to say "try something, and if it fails, return a specified default value". This returns the expected result: (with-exception-handler (lambda (x) "Oops") (/ 1 0)) because it returns "Oops". However, if I type (with-exception-han

Re: [racket] Dirt-simple exceptions

2010-09-05 Thread Mark Carter
- Original Message > From: Robby Findler > (with-handlers ([exn:fail? (lambda (exn) put-specified-default-here)]) > try-something-here) That's the fellow! Here's a little convenience macro I defined: (define-syntax catch-errors (syntax-rules () ((catch-all error-v

[racket] A VAT calculator using Racket web server

2010-09-06 Thread Mark Carter
So, I'm learning the ropes of using Racket as a webserver. I'm building a simple VAT (tax) calculator. I present my code at the end of this post (which you can also download via google code). I think it would be helpful to me if you could critique it a little. The idea is that you point your

[racket] Creating protocols

2010-09-08 Thread Mark Carter
Suppose I wanted to make a client/server application that communicates via a protocol which has to be designed for that application. A neat way of doing it would be for the client to send s-exprs to the server via TCP, which were then evaluated. This is a huge security risk, though, because natu

[racket] 2htdp/image question

2010-09-10 Thread Mark Engelberg
Why is it that (empty-scene 100 100) produces a white scene with a black border around all four edges, but (place-image (circle 10 'solid 'red) 10 10 (empty-scene 100 100)) produces a scene with a black border only on its top and left edges? (This is in Racket 5.0.1 on Windows) ___

Re: [racket] News flash! Racket once again a legal choice for developing iPhone apps!

2010-09-14 Thread Mark Engelberg
Just curious, does wescheme support "universe" programs? If so, what does that support entail? Do you run both the server and client on the wescheme website, or can you run the universe server on wescheme and connect to it via desktop Racket running a universe client?

Re: [racket] SIGCSE AWARDS

2010-10-05 Thread Mark Engelberg
It's always a delight to see Matthias being appreciated outside of our little community. Congrats! _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

[racket] Using lex and yacc

2010-10-12 Thread Mark Carter
Are there any examples on using lex and yacc, as I'm having trouble getting started. I am trying to write a simple calculator. Here's what I've got so far: #lang racket/base (require parser-tools/lex) (define lex (lexer ((:+ "[0-9]") (values 'int (string->number lexeme)))

[racket] Counter servlet

2010-10-12 Thread Mark Carter
I thought I'd try to implement a stateful counter web app using DrRacket. Here's my code: #lang racket define a really simply counter ;;; required libraries (require web-server/formlets web-server/servlet web-server/servlet-env) (define (counter request) (let ((coun

Re: [racket] Counter servlet

2010-10-13 Thread Mark Carter
> From: Jay McCarthy > (a ([href ,what-you-have]) "link text") OK now guys, now I'm getting seriously excited about the prospect using Racket for web servers. I reworked my stateful counter example. Here it is: #lang racket a stateful web server (require web-server/formlets web-

[racket] pregexp vs regexp

2010-11-02 Thread Mark Engelberg
As far as I can tell, pregexp functionality is a superset of regexp functionality. Furthermore, the added functionality uses patterns that are unlikely to occur by accident in normal regular expressions. So is there any advantage to using regexp over pregexp? Why is there a need for both to coexi

Re: [racket] pregexp vs regexp

2010-11-02 Thread Mark Engelberg
It sounds like it's mostly a backwards-compatibility issue. So when teaching students from scratch about regular expressions, is it reasonable to only mention pregexps? Is there anything lost by doing that? _ For list-related administrative tasks:

Re: [racket] Racket v5.0.2

2010-11-06 Thread Mark Engelberg
x27;t find any in the documentation. Thanks, Mark _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

[racket] member et al.

2010-11-10 Thread Mark Engelberg
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 contracts and typed modules, shouldn't Racket's predicates actuall

Re: [racket] member et al.

2010-11-10 Thread Mark Engelberg
elps with the notion of Any as Boolean. It seems like there's no way to pass a non-Boolean to something that's expecting a Boolean, so the only thing that's really "coping" here is the user, who is forced to loosen all the types or explicitly convert to a Boolean. What am I mi

Re: [racket] member et al.

2010-11-11 Thread Mark Engelberg
On Thu, Nov 11, 2010 at 9:56 AM, Jay McCarthy wrote: > (define (andmap f l) >  (if (empty? l) >     #t >     (and (f (first l)) (andmap f (rest l) > > If and has to return a boolean, then it leaves space on the stack to > check if andmap returns a bool or to convert "truth" to #t. Thus this >

Re: [racket] member et al.

2010-11-11 Thread Mark Engelberg
On Thu, Nov 11, 2010 at 10:57 AM, Jay McCarthy wrote: > This 'if' introduces a stack frame that is not otherwise needed. > > Jay OK, I see your point now. I was thinking of it as one more test at the end so I wasn't thinking of it as having a real cost, but I see how this makes the fold-like imp

[racket] Writing module documents

2010-12-12 Thread Mark Carter
My personal module is coming together, and I would like to write some documentation for it. Scribble seems the way to go, but I don't really know how to tackle the problem. What's the best practise? Create a folder called scribblings and write scrbl files within it? Is there a way that the html

[racket] Question about fields in Racket OO

2010-12-15 Thread Mark Engelberg
e superclass, I might have (field [a 300]) but in the subclass, I want to do something like (inherit-field [a 200]) However, as far as I can tell, the syntax doesn't support anything other than (inherit-field a) Thanks, Mark _ For list-relate

Re: [racket] A puzzle

2011-01-19 Thread Mark Engelberg
It looks like the puzzle is to find an interleaving of execution that makes sense. Other than solving it by hand, one idea I have is to wrap around each line of code some sort of error handler that keeps trying that line until it succeeds. This should work if the puzzle has been designed so that

Re: [racket] A puzzle

2011-01-19 Thread Mark Engelberg
Hmm, I don't think the greedy approach will work. The first line of the second thread, (set! a (list c)), will execute without error immediately, but it really needs to happen between the evaluation of a and (first a) in the first line of the first thread. Probably needs to be done by hand. _

Re: [racket] This is not a solution! Re: A puzzle

2011-01-21 Thread Mark Engelberg
On Wed, Jan 19, 2011 at 5:29 PM, Hendrik Boom wrote: > I see a lot of code, but what's the puzzle.  Presumably there's some > kind of question that has to be answered about it? > > -- hendrik The program is a multithreaded program that crashes unless the executions of the threads are interleaved

[racket] Question about Moby

2011-01-25 Thread Mark Engelberg
This program: #lang racket (require (planet dyoo/moby:3:9)) gives me this error: ..\..\Documents and Settings\Mark\Application Data\Racket\planet\300\5.0.2\cache\dyoo\js-vm.plt\1\12\private\translate-bytecode-structs.rkt:25:8: compile: unbound identifier in module in: internal:indirect? Any

Re: [racket] Lazy take is the identity?

2011-01-26 Thread Mark Engelberg
I get an error in 5.0.2, rather than 0. --Mark P.S. I was surprised to see that list-ref in #lang lazy takes the args in opposite order than in #lang racket (which takes the list first). On Tue, Jan 25, 2011 at 11:27 PM, John Clements wrote: > I would expect this program to signal an er

Re: [racket] Making animations in racket (or, why racket is hard to transition to from scratch)

2011-02-05 Thread Mark Engelberg
There are projects that are trivial in Scratch that are hard in Racket, and vice versa. Porting your Scratch projects to Racket is not likely to be a very productive use of your time because they have such different strengths and weaknesses. I think your best bet is to pick some projects which ar

Re: [racket] stream-cons from racket/stream isn't lazy

2011-03-05 Thread Mark Engelberg
I've had some email discussions about this with the Racket team in the past, so here's a quick unofficial summary of what I've learned, while you're waiting for a more official response: racket/stream is not really a "stream library" by the typical Scheme definition of stream. It's really a libra

[racket] Slideshow preview mode

2011-03-11 Thread Mark Engelberg
Is there a way to trigger the preview mode from within the slideshow's racket file (so that it goes to preview mode when I hit the Run button while viewing the file in DrRacket) as opposed to "slideshow -d myslideshow.rkt" from the command line? _ F

[racket] Setting web server root

2011-03-14 Thread Mark Carter
Suppose I just create a simple web server: (define (kickoff req) (kickoff (send/suspend (lambda (k-url) (response/xexpr `(html (body (a ([href ,k-url]) "Hello world!" ;;; Start the server (define (go) (define log-to (build-path (find-system-path 'home-dir)

[racket] Scribble code

2011-03-14 Thread Mark Carter
I have some code that I would like to put in scribble. So far, I have: Example use of stats: @code{"(require carali/money) (stats 'barc '( 41.00 43.20 40.60 50.20 55.66 52.74 64.87 66.25 21.63 22.70 )) "} When I run scribble,

[racket] Question about modules

2011-04-06 Thread Mark Engelberg
protect me from this? Shouldn't it be possible for the math library to use its own required version of the memoize library, without it screwing up my ability to require the latest version of the memoize library? Thanks, Mark _ F

[racket] Generating docs

2011-04-07 Thread Mark Carter
I'm still quite puzzled as to how to document my modules. I have a directory called "carali", which contains rkt files. One of the files is http.rkt, containing the code: (module maths racket (provide http-get) (require racket/port) (require net/url) (require scribble/srcdoc) (provide/doc (

[racket] Embedded docs

2011-04-07 Thread Mark Carter
OK, I cleared up some of my problems in a previous post. It seems I have to do raco setup to rebuild the module and documentation. There's a problem, though. I have: (provide/doc (proc-doc/names http-get (-> string? string?) ; the output (string-url) @{Say something meaningful

[racket] Embedded docs

2011-04-07 Thread Mark Carter
Responder wrote: --- begin --- You need to enable @{...} syntax. If you module currently starts #lang racket/base change it to #lang at-exp racket/base which mixes @{...} syntax support onto the `racket/base' language. --- end --- My reply: It doesn't work. I get module: illegal use (not

Re: [racket] Embedded docs

2011-04-07 Thread Mark Carter
> From: Vincent St-Amour > A #lang declaration implicitly wraps the rest of the file in a module > form. Putting an explicit module form there is redundant, and is an > error. Ah, well, that is interesting. Many thanks. _ For list-related adm

[racket] Module docs - still a problem

2011-04-07 Thread Mark Carter
OK, I'm trying to generate module docs, so I run raco setup but I get raco setup: --- building documentation --- raco setup: error running: (lib carali/http.rkt) dynamic-require: name is not provided: 'doc by module: # raco setup: rendering: scribblings/main/start.scrbl Any clues on this one

Re: [racket] generating 0 or more than 1 additions in the body of for/list, for/vector, for/hash

2011-04-15 Thread Mark Engelberg
Where is this sequence->list function of which you speak? Did you mean the stream->list function, which despite its name, actually behaves like you'd expect a function called sequence->list function to behave? On Fri, Apr 15, 2011 at 12:30 PM, Jay McCarthy wrote: > I thought of something else yo

Re: [racket] Functional struct update with subtypes

2011-05-11 Thread Mark Engelberg
On Wed, May 11, 2011 at 1:10 PM, David Van Horn wrote: > Here are some struct definitions and a function, based on Land of Lisp: > > (struct monster (id [hit #:mutable]) #:transparent) > (struct orc monster (club) #:transparent) > (struct hydra monster () #:transparent) > (struct slime monster (sl

Re: [racket] Functional struct update with subtypes

2011-05-11 Thread Mark Engelberg
I played around briefly with define-local-member-name but it seemed like a rather awkward way to achieve "protected"-ness. From the example in the help desk, it seems like the classes need to have some sort of let wrapped around them to share a non-public method between them. It seems like to set

Re: [racket] Tutorial: writing a language (brainf*ck) in Racket

2011-06-13 Thread Mark Engelberg
Excellent tutorial. This really helped me understand how to write a language with a non-lispy syntax within Racket. Thanks. _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

Re: [racket] Again on bindings visibility in eval

2011-07-14 Thread Mark Engelberg
n't break. Here's the comparable Clojure code to what Eli did: (def x (atom 2)) (let [loop 5 when 2 test 4 body 3 recur 4] (while (< @x 10) (println @x) (reset! x (inc @x Thanks. --Mark P.S. I'm enjoying this discussion. I feel like I

  1   2   >