[racket-users] Re: Removing duplicates from a list while still maintaining order in Dr. Racket.

2020-07-21 Thread Prabhakar Ragde
Could you point us to the original homework question so we can be sure of the requirements? Thanks. On Monday, July 20, 2020 at 12:04:45 PM UTC-4, JJ C wrote: > > In Beginning Student with List Abbreviations > > I am struggling to come up with functions to remove duplicates from a list > while m

[racket-users] Re: Understanding P. Ragde's Proust

2020-06-30 Thread Prabhakar Ragde
s approach and I have to say I don't feel quite > prepared to fill in the details myself. So I'm doing my best to learn some > preliminaries and general Racket first! > > Thank you, > Adrian > > On Monday, March 16, 2020 at 12:08:51 PM UTC, Prabhakar Ragde wrote:

[racket-users] Re: Understanding P. Ragde's Proust

2020-03-16 Thread Prabhakar Ragde
On Sunday, March 15, 2020 at 10:00:59 AM UTC-4, Adrian Manea wrote: > > > I'm a mathematician delving into type theory and proof assistants and with > special interests in Racket. > > I'm now trying to understand and implement P. Ragde's Proust > "nano proof a

[racket-users] Re: Getting young children started with Racket

2018-03-04 Thread Prabhakar Ragde
On Saturday, March 3, 2018 at 8:41:16 AM UTC-5, Paulo Matos wrote: > > Hello, > > I have a 7yo daughter currently in 1st grade (Germany) and she was given > a password for the school computer. Having never touched a computer > before she is now being introduced to typing and the mouse. > > I wo

[racket-users] Good Data Structures Book?

2016-12-14 Thread Prabhakar Ragde
Lawrence Bottorff wrote: Can someone suggest a good text for data structures that would compatible with Racket? All I see are treatments using C/C++, Java, Python, i.e., the usual suspects. Or, how do you people at Racket-friendly/based universities teach undergrad data structures? I am develo

[racket-users] slow LaTeX error output while using Scribble?

2016-03-29 Thread Prabhakar Ragde
I've started to do Scribble work within DrRacket with 6.4, and I've noticed that when I use the "Scribble PDF" button, and something goes wrong, the copious LaTeX error output that shows up in the Interactions window is much slower to scroll to completion than before (on the order of tens of se

[racket-users] Scribble PDF button on OS X 10.11

2016-01-12 Thread Prabhakar Ragde
I upgraded to OS X 10.11 (El Capitan), and now when I launch DrRacket from the Dock, the "Scribble PDF" button cannot find the pdflatex executable. Upgrades tend to mess things up but in this case /usr/local/texbin no longer exists and cannot be created in the new OS. It was a symlink to /usr/l

[racket-users] TeX- and LaTeX-inspired keybindings

2015-07-14 Thread Prabhakar Ragde
Is there a simple way to extend the list of these and/or provide synonyms? (DrRacket documentation, section 3.3.8.) I would like to, for example, be able to type \and, or at least \land, rather than \wedge. Thanks. --PR -- You received this message because you are subscribed to the Google Grou

[racket-users] Re: Removing duplicates from a list while maintaining order

2015-06-03 Thread Prabhakar Ragde
This is a homework question of mine (though I don't think the OP is doing homework for a course for credit; I'd be curious to know where he found it). I usually state the restrictions on 'reverse' and 'remove', but not 'member?'. The restriction on 'reverse' is so that students don't write one

[racket] Generating PDF from Scribble on Windows

2015-03-11 Thread Prabhakar Ragde
I'm working with our online/distance-learning people to set up a course, and creating my slides in Scribble using the "Scribble PDF" button. A change in personnel is coming up, and the new developer is using Windows. My current developer is using OS X like I am, and he reports with some alarm t

Re: [racket] Curious error messages

2014-12-04 Thread Prabhakar Ragde
On 2014-12-03 11:43 PM, Stephen De Gabrielle wrote: I've had the same thing using scribble, but including screenshot images I just assumed it was pdflatex that was calling libpng, and the problem was either pdflatex how it was passing the image to libpng, or libpng itself, rather than anything in

Re: [racket] Curious error messages

2014-12-04 Thread Prabhakar Ragde
On 2014-12-04 7:35 AM, Jens Axel Søgaard wrote: By any chance: is the file saved inside a Dropbox ? When Dropbox synchronizes it might set a flag/time somewhere. I'm not using Dropbox on these files. I am using OS X. About the only thing that might be looking at these files is Spotlight (and a

[racket] Curious error messages

2014-12-03 Thread Prabhakar Ragde
I'm currently using Racket 6.1. For some time now, when editing Scribble files in DrRacket, I've been getting "file has changed on disk" messages when trying to save or render - not consistently, just every so often. These are files I am not editing in anything other than DrRacket. I click "ign

Re: [racket] proof assistants, DrRacket and Bootstrap

2014-09-28 Thread Prabhakar Ragde
On 2014-09-28, 12:57 AM, Bill Richter wrote: I'm making a dialect of HOL Light with different syntax by interpreting one of my programs as a string and then breaking the string up into the component pieces, but then I need this Toploop/exec hack to evaluate my variables. That sounds like the Sc

Re: [racket] proof assistants, DrRacket and Bootstrap

2014-09-27 Thread Prabhakar Ragde
On 2014-09-27, 5:50 PM, Bill Richter wrote: Thanks, Prabhakar, this is exactly what I wanted, and you know something about it (I was barely able to install Coq): I struggled with installing it also, especially since I'm using a Mac. Racket has spoiled us in that respect. But parsing an

Re: [racket] proof assistants, DrRacket and Bootstrap

2014-09-27 Thread Prabhakar Ragde
Bill Richter wrote: >Carl Eastlund developed Dracula for Rackety use of the ACL2 theorem >prover. Thanks, Ian! May I suggest that you try to handle Coq, Isabelle or HOL Light? I believe these are the foremost proof assistants. The fields medalist Vladimir Voevodsky uses Coq, in which the 4-c

[racket] proof assistants, DrRacket and Bootstrap

2014-09-27 Thread Prabhakar Ragde
I have a few questions that might be off-topic. Are you interested in formal proofs? Have you considered adapting DrRacket to give an integrated editor for a proof assistant? The proof assistants Coq and Isabelle use jedit and ProofGeneral, which I think aren't nearly as nice as DrRacket. I ac

Re: [racket] ] Converting symbols to procedures?

2014-08-11 Thread Prabhakar Ragde
Deren wrote: Don't quote. You want to pass the class in a list, pass the class in a list. You can also quasiquote and unquote. (list + *) can be written `(,+ ,*). This is overkill for such a small example, but is useful if you want to mix literal quotation and expressions while maintaining t

[racket] Python creep

2014-06-27 Thread Prabhakar Ragde
On 2014-06-26, 1:29 AM, users-requ...@racket-lang.org wrote: I heard Cornell and Harvard use OCaml, of all things. . . . Cornell appears to use Python and MATLAB in their first courses; I don't see OCaml until third year. Harvard uses OCaml in a second course; C, PHP, Javascript in a first.

Re: [racket] set!: eval-ing to lvalues

2014-04-23 Thread Prabhakar Ragde
Stephen Chang wrote: Reminds me of this: http://james-iry.blogspot.com/2009/05/brief-incomplete-and-mostly-wrong.html 1990 - A committee formed by Simon Peyton-Jones, Paul Hudak, Philip Wadler, Ashton Kutcher, and People for the Ethical Treatment of Animals creates Haskell, a pure, non-strict,

Re: [racket] Tail recursive module cons

2014-03-29 Thread Prabhakar Ragde
Yuhao Dong wrote: The thing is, Racket's "stack" is a list of continuations. I don't see how explicitly keeping the "stack" in an accumulator would help. Stack overflow won't be a problem since the "stack" is a list on the heap, and unless memory runs out you wont overflow. I think that tail

Re: [racket] Tail recursive module cons

2014-03-16 Thread Prabhakar Ragde
Matthias wrote: What does tail-recursion modulo cons mean? Some of my favourite academic paper titles: Friedman and Wise, "CONS should not evaluate its arguments" Baker, "CONS should not CONS its arguments" --PR Racket Users list: http://lists.racket-lang.org/users

[racket] Y combinator

2014-02-06 Thread Prabhakar Ragde
Matthew Johnson wrote: My question is really a plea for someone to fill in the gaps in a derivation of the Y combinator. This is the source I use as a basis for my classroom presentations, with a few more details thrown in. http://www.dreamsongs.com/Files/WhyOfY.pdf --PR __

Re: [racket] Prabhalar Ragde's code

2013-12-06 Thread Prabhakar Ragde
On 2013-12-06 9:48 AM, John Clements wrote: Yes, that code definitely has a dependency on an outside file called "math-utilities.rkt". The contents of Jens Axel's file: https://github.com/soegaard/bracket/blob/master/docs/pr-math.rkt is pretty much my "math-utilities.rkt". --PR ___

[racket] Scribble and/or Latex?

2013-08-30 Thread Prabhakar Ragde
Dave wrote: I'm an apprenticing high school math teacher looking for a documentation tool for use in preparing lesson plans and class presentations. I've been advised to use Latex. But as a former HtDP'er, I've been looking for an excuse to get back into Racket, and I thought learning Scribble

[racket] odd background expansion warning

2013-08-28 Thread Prabhakar Ragde
Just downloaded Racket 5.3.6. When I open a new DrRacket tab and type the following: #lang racket (require (for-label racket)) I get the following warning in large red letters at the bottom of the window where the background expansion messages are shown: +: contract violation expected: number

[racket] Third CfP for the International Workshop on Trends in Functional Programming In Education (TFPIE)

2013-04-08 Thread Prabhakar Ragde
Philip wrote: It should be noted that BYU's "Honor Code" applies only to students & staff. It does *not* apply to visitors. Does that mean there will be coffee at "coffee breaks"? --PR Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Redex question: parameterizing a language definition

2013-04-04 Thread Prabhakar Ragde
Robby wrote: Yes, David's right. The (a bit more long-term than I hoped) plan is to essentially improve and automate parts of what you call the rabbit hole in your stackoverflow question (as also discussed in the link David posted). I ran into this problem in a much simpler context while teach

Re: [racket] DrRacket editor behaviour change

2013-03-23 Thread Prabhakar Ragde
On 2013-03-23 3:00 PM, Robby Findler wrote: I'm not seeing that (in any version). Nothing is happening in between the two control-n's, right? Do you see the words "auto extend" in the corner of the drracket window? Can you coordinate some action you're taking with them disappearing? Hmmm. I ch

Re: [racket] DrRacket editor behaviour change

2013-03-23 Thread Prabhakar Ragde
On 2013-03-23 1:59 PM, Robby Findler wrote: Meanwhile, control-space, control-n works in the way you would seem to want it to work. Is there some more complex sequence that causes trouble? Yes: control-space, control-n, control-n. This used to move down and extend the blue selection highlight

Re: [racket] DrRacket editor behaviour change

2013-03-23 Thread Prabhakar Ragde
Robby wrote: Just to double check: you mean shift-down, not just down, right? DrRacket does indeed implement those keystrokes itself, but I'm seeing what you describe as the 5.3.1 behavior in 5.3.3 and in the git head under mac os x and under a relatively recent git version under linux. When y

Re: [racket] Scribble to PDF in Racket 5.3.2

2013-02-02 Thread Prabhakar Ragde
On 2013-02-02 4:59 PM, Prabhakar Ragde wrote: I think I will go ahead and upgrade TeX to the 2012 distribution and see if that makes a difference. --PR That fixed the problem. Thanks. --PR Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Scribble to PDF in Racket 5.3.2

2013-02-02 Thread Prabhakar Ragde
On 2013-02-02 4:13 PM, Robby Findler wrote: If you run scribble --latex --dest x file.scrbl and then cd into the newly created "x" directory and run "pdflatex file.tex" you should get a more readable transcript that will help us understand what's going on. Thanks. The relevant lines in the tran

[racket] Scribble to PDF in Racket 5.3.2

2013-02-02 Thread Prabhakar Ragde
Scribble will not render to PDF for me with Racket 5.3.2. It works fine with Racket 5.3.1. As is typical with LaTeX, I cannot find the exact source of the error in all the verbiage. There are several warnings associated with packages. My TexLive distribution is from 2008. Is 5.3.2 doing someth

Re: [racket] A primitive more fundamental than a continuation?

2012-12-02 Thread Prabhakar Ragde
Matthias wrote: The documentation (See Guide s10.3) says "A continuation is a value that encapsulates a piece of an expression context" Someone should submit a doc bug report to the Guile people. The 'expression' should be replaced (or supplemented) with 'evaluation'. Not "Guile", "Guide". T

Re: [racket] Doing collision detection in universe.ss

2012-11-28 Thread Prabhakar Ragde
Shriram wrote: Yaron, this summer my students, Kathi Fisler, and I built a block-based, functional language with types (expressed as colors) and testing. It runs in the browser, uses the WeScheme runtime and can express most Bootstrap programs. It needs more polish before we can release it to t

Re: [racket] An easy route to define-datatype in BSL?

2012-11-05 Thread Prabhakar Ragde
On 2012-11-05 6:43 AM, Matthew Flatt wrote: Here's a first cut at a module that you can import into BSL programs. The least obvious part is defining a new `define-type' and `type-case' that invents hidden names for the variants and them maps between them while expanding to the original forms.

[racket] An easy route to define-datatype in BSL?

2012-11-04 Thread Prabhakar Ragde
I'm debating trying to use something like define-datatype, as used in EOPL and PLAI (and available in the Racket languages that support those books) early in my first-year undergraduate class. (Opinions on the wisdom of this, or on my sanity in general, by direct e-mail, please.) In a teaching

[racket] redex + #lang = awesome

2012-10-24 Thread Prabhakar Ragde
David Van Horn wrote: Then I thought, PCF's binding structure is a lot like Racket's: wouldn't it be nice to get syntax coloring, syntax arrows, renaming, etc. That was about another 30 lines of code. Can you say a few words about how you achieved this? Thanks to Matthew's article and Racket

[racket] Quarter-circle in upper right of Definitions window?

2012-09-17 Thread Prabhakar Ragde
Sorry if this is a dumb question. This small quarter-circle, with an arrow in it, appears from time to time, and then disappears. It contains some links to documentation. I cannot tell what is causing it to appear and what causes it to disappear...? Thanks. --PR Racket Use

Re: [racket] Scribble->HTML: adding to head

2012-09-14 Thread Prabhakar Ragde
On 2012-09-11 8:07 PM, Matthew Flatt wrote: In the latest in the git repo, I've added `js-addition' to `scribble/html-properties'. It's like `css-addition': you can attach it to anything as a style property, and it bubbles up to the enclosing section that corresponds to the HTML page. When a `js

[racket] Scribble->HTML: adding to head

2012-09-11 Thread Prabhakar Ragde
How do I add a pair of tags to the of an HTML document rendered from a Scribble document (though code in the Scribble file)? I know how to put them into the . Thanks. --PR Racket Users list: http://lists.racket-lang.org/users

[racket] Teach Yourself Racket (version 0.1)

2012-08-31 Thread Prabhakar Ragde
I've been meaning for some time to write something called Teach Yourself Racket, and finally scraped an alpha version together under threat of classes starting (I'm going to use it in my grad course). I'd appreciate comments to help me improve it. https://cs.uwaterloo.ca/~plragde/tyr/ Followu

Re: [racket] state of math expressions in Scribble?

2012-07-05 Thread Prabhakar Ragde
Jens Axel wrote: Prabhalar Ragde's code from http://con.racket-lang.org/pr-slides.pdf works quite well. Code ready to use in: https://github.com/soegaard/bracket/blob/master/docs/pr-math.rkt Thanks for making this more accessible, Jens Axel. One caveat is that the MathJax approach only wor

Re: [racket] release date for RacketCon videos?

2012-05-15 Thread Prabhakar Ragde
Todd wrote: This is clearly a problem with you academic types not knowing how things work in the real world. San Francisco is *full* of people who, for the right price, will be happy to rifle through Mr. Dlouhy's things until they find the videos or determine that he doesn't have them. They migh

[racket] Using scribble as a shim for latex

2012-05-14 Thread Prabhakar Ragde
Ian wrote: Anyway, I now find myself wanting use the listings package to write some pseudocode with mathescape (thus, verbatim is not good enough). I cannot use the identity trick for the lstlisting environment for whatever reason. It causes pdflatex to explode. I've been using Scribble on top

Re: [racket] Challenge: in 140 chars or less

2012-02-23 Thread Prabhakar Ragde
Neil Toronto wrote: What's your favorite not just computable, but tweetable function? (define (r n) (for/fold ([s 1] [l '()]) ([i n]) (values (/ 1 (- (* 2 (floor s)) s -1)) (cons s l I tweeted this to make sure it fit. I had 23 characters to spare, could squeeze a bit of whitespace

[racket] match and debug in Advanced Student

2011-11-08 Thread Prabhakar Ragde
I never use the Debug button, but I let my students start using Advanced Student today, and of course they tried it out. The following program induces a strange error when the Debug button is pressed. (match 3 [`(,x) 3] [x 3]) The error is: internal error: skipped binding is used after

[racket] a few small Scribble questions

2011-11-06 Thread Prabhakar Ragde
If I use `racketgrammar' to define a grammar, and then want to refer to one of the non-terminals within it in subsequent text, can I get it to appear in the same font? When using `racketblock', can I get an identifier typeset in the same style as a syntactic form without having previously docu

Re: [racket] match in Advanced Student?

2011-10-31 Thread Prabhakar Ragde
On 10/31/11 3:42 PM, Shriram Krishnamurthi wrote: I found this confusing when I first encountered it -- the patterns are at the TOP of the page (but not linked from the match docs). Scroll to the top and look for "pattern" in the BNF. Thanks, Shriram. That plus the Guide entry will probably do

[racket] match in Advanced Student?

2011-10-31 Thread Prabhakar Ragde
Is there a written description (suitable for students) of which patterns are legal for `match' in Advanced Student, or do I have to dig into the implementation and then write one myself? Thanks. --PR _ For list-related administrative tasks: http:

Re: [racket] list in Beginning Student

2011-10-01 Thread Prabhakar Ragde
On 10/1/11 8:33 AM, Todd O'Bryan wrote: I actually wish it weren't in there. One student discovers it, and lots of students start using list instead of cons ... empty. That wouldn't be a problem except that most of them don't have the conceptual chops yet and I have to fix their confusion. Yes.

[racket] list in Beginning Student

2011-09-30 Thread Prabhakar Ragde
When did `list' sneak its way into Beginning Student (without List Abbreviations)? Or has it always been there, and I have always been just clueless? Thanks. --PR _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/user

[racket] Offtopic: Learning SML

2011-09-18 Thread Prabhakar Ragde
Grant Rettke wrote: Are _ML for the Working Programmer_ and _Elements of ML Programming, ML97_ a good place to start? I am a great fan of "Working Programmer", not of "Elements". Quite apart from its clear and sensible treatment of SML, "Working Programmer" has many case studies that will b

Re: [racket] match in Advanced Student?

2011-08-17 Thread Prabhakar Ragde
On 8/17/11 9:30 PM, Shriram Krishnamurthi wrote: This is indeed a very confusing thread because we're talking about requiring match but also requiring require, and while most "it"s refer to a "require", some are to the former kind and some to the latter kind. Just before I was tempted to point

Re: [racket] match in Advanced Student?

2011-08-17 Thread Prabhakar Ragde
On 8/17/11 6:02 PM, Robby Findler wrote: Could you just require match into bsl/isl? I had problems with BSL at some point, I think, but it hardly matters, there's no point in doing it before BSL+, where it does work, except not with posns. Which I don't think I'll use with my students in the

Re: [racket] match in Advanced Student?

2011-08-17 Thread Prabhakar Ragde
On 8/17/11 10:30 AM, Shriram Krishnamurthi wrote: My experience last year was that the restrictions on some of these sub-forms were arbitrary and not helpful. It also makes it harder for students because if they click on the "wrong" documentation, they don't understand why the thing that the docs

[racket] match in Advanced Student?

2011-08-17 Thread Prabhakar Ragde
Why does this expression successfully evaluate in #lang racket but gives a syntax error in Advanced Student? (match 1 [(or 1 2) 'pass] [else 'fail]) The or-clause is highlighted and the error is "match: expected a pattern, but found a part". Thanks. --PR _

Re: [racket] Macros and literal-id

2011-08-09 Thread Prabhakar Ragde
Neil Van Dyke wrote: The hardest macro tasks, in "syntax-rules", become opportunities to show off how well one can do scary-looking CPS that's really expensive at expansion time. For my edification, as well as that of other macro newbies, can you give some examples of this, and how syntax-cas

Re: [racket] Images in Scribble?

2011-07-01 Thread Prabhakar Ragde
Sam Tobin-Hochstadt wrote: You can see examples of using images in scribble examples in the documentation for the `2htdp/image' teachpack: https://github.com/plt/racket/blob/master/collects/teachpack/2htdp/scribblings/image.scrbl and the results: http://docs.racket-lang.org/teachpack/2htdpi

[racket] inter-column space in Scribble tables (LaTeX)

2011-06-24 Thread Prabhakar Ragde
Is there a simple way to put space between columns in Scribble tables rendered to LaTeX? Thanks. --PR _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

Re: [racket] Integrating scribble and LaTeX

2011-06-22 Thread Prabhakar Ragde
Don Blaheta wrote: I certainly don't expect that a feature be implemented just because I want it, and even good features may take a while due to being low priority or whatever. And there may well be some technical impediment to just creating a scribble.sty and working from there that I (a newco

Re: [racket] Integrating scribble and LaTeX

2011-06-21 Thread Prabhakar Ragde
On 6/21/11 9:07 PM, Robby Findler wrote: FWIW, there is a way to pull in arbitrary latex code in, but it has to interoperate with what scribble generates and setting it up, while not difficult, does require some familiarity with the way scribble works in a big picture kind of a way. But he want

[racket] Integrating scribble and LaTeX

2011-06-21 Thread Prabhakar Ragde
Don Blaheta wrote: I was looking to put some Racket code into a set of course notes I'm writing up in LaTeX, and rather than just using verbatim, I thought this would be a perfect time to figure out (at least the basics of) Scribble. Only, I can't figure out how to integrate it with LaTeX. Fa

Re: [racket] Gambit Scheme for the iPhone and iPad

2011-06-05 Thread Prabhakar Ragde
On 6/4/11 10:55 PM, Nevo wrote: Have you by chance bought that app and actually run on your iPhone/iPad? Yes. It's only 99 cents. I have not used it extensively, since I only noticed it yesterday afternoon. Also I have not used my iPad in general extensively! I put it on my iPhone also, just

[racket] Gambit Scheme for the iPhone and iPad

2011-06-04 Thread Prabhakar Ragde
I stopped reading comp.lang.scheme some time ago, so I wasn't aware until just now that in early May, Marc Feeley succeeded in placing a Gambit Scheme universal app (iPhone/iPad) in the App Store. http://itunes.apple.com/us/app/gambit-repl/id434534076?mt=8 This is the first indication I had th

Re: [racket] commenting out unbalanced parts of Scribble programs

2011-05-20 Thread Prabhakar Ragde
On 5/20/11 9:42 AM, Matthew Flatt wrote: Eli made Scribble's at-exp notation more general: It lets you pick the brackets for a comment after `@;', so you can pick a closer that isn't used in the region to comment out. For example, to comment out a single "}", @;{ } } would not work, b

[racket] commenting out unbalanced parts of Scribble programs

2011-05-20 Thread Prabhakar Ragde
In Scheme I can comment out unfinished, unbalanced code: #| (define (my-function |# How do I do this in Scribble? Thanks. --PR _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

Re: [racket] Scribble: exact-chars in multiarg-element

2011-05-19 Thread Prabhakar Ragde
On 5/18/11 11:32 PM, Robby Findler wrote: Can you set up a helper macro that is just the identity and end up with something like this? \newcommand{\somethingorother}[1]{#1} \setbeamerfont{myfont}{\somethingorother{size={40}{44}}} You would think so, but \setbeamerfont is finicky about th

[racket] Scribble: exact-chars in multiarg-element

2011-05-18 Thread Prabhakar Ragde
The 'exact-chars style property works with `element', but not with `multiarg-element'. (I can see why, in scribble/latex-render.rkt.) Was there a reason for this? I need to render something like \setbeamerfont{myfont}{size={40}{44}} and the braces around the numbers are being escaped, which of

Re: [racket] a couple of trivial Scribble questions

2011-05-15 Thread Prabhakar Ragde
On 5/15/11 9:44 PM, Matthew Flatt wrote: Yes, Check Syntax should be there. More importantly, you should see buttons to generate HTML and PDF. If you open the document source again in DrRacket, do the buttons appear? Does editing and reverting the `#lang' line make them appear? That did it. T

[racket] a couple of trivial Scribble questions

2011-05-15 Thread Prabhakar Ragde
I put the first example in section 1.1 of the Scribble documentation in Help Desk into a file test.scrbl in DrRacket (5.1.1). I can run it, and nothing happens. Should something? (I'll accept "No" as an answer, but then what does the Run button do?) And shouldn't there be a Check Syntax button?

Re: [racket] #lang

2011-05-15 Thread Prabhakar Ragde
Shriram wrote: (Btw, could you use a mail reader that preserves threads?) I read the digest versions of Racket mailing lists, and I have to explicitly do this (as with this message) by manually copying the Message-ID field. Furthermore, I had to learn how to configure Thunderbird to give me

[racket] sorry for the spam (was: Meeting)

2011-05-09 Thread Prabhakar Ragde
I will be better about checking autocompletions in future. My apologies. --PR _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

Re: [racket] Meeting

2011-05-09 Thread Prabhakar Ragde
On 5/9/11 5:54 PM, Colette Fortin wrote: I hope you are enjoying this beautiful sunshine. I was wondering if you had time to come in on Wednesday to have a first look at the financial information? I have time at 1:00 or 11:00. I'll take 11:00, thanks. Also we have our parenting seminar on W

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

2011-03-30 Thread Prabhakar Ragde
Matthias wrote: Do you think these give a better explanation of macros? On the whole, I have found Teach Yourself Scheme relatively easy to follow. Yes, but when it comes to macros, it espouses a view that was never compatible with any Report on Scheme and is even old-school for plain Lisp. If

[racket] [plt-edu] Re: SIGCSE AWARDS

2010-10-06 Thread Prabhakar Ragde
> Now I have to figure out how to get to Dallas to hear Matthias's > address... What is the likelihood that the address will be put on-line? I don't know about SIGCSE, but last week Matthias gave an invited talk at the International Conference on Functional Programming (ICFP) with the title "

Re: [racket] [BULK] Re: Looking for feedback on code style

2010-09-13 Thread Prabhakar Ragde
Chris Stephenson wrote: But, on the other hand, O(log n) is, for most practical purposes, very close to O(1), so why worry? Because we're not consistent about when we worry and when we don't. This thread, for example, is mostly about logarithmic factors. And we wouldn't accept a statement li

Re: [racket] [BULK] Re: Looking for feedback on code style

2010-09-13 Thread Prabhakar Ragde
On 9/13/10 2:46 PM, Stephen Bloch wrote: Do you know a better way to shuffle a list than to convert it to a vector, shuffle in place, then convert back to a list? You might look at this discussion: http://groups.google.com/group/comp.lang.scheme/browse_thread/thread/24270db01f684439/e54c99564028

Re: [racket] Looking for feedback on code style

2010-09-13 Thread Prabhakar Ragde
On 9/13/10 1:34 PM, Phil Bewig wrote: Fixed. See the comment at http://programmingpraxis.com/2009/12/11/selection/. Prabhakar: You are correct that shuffling once at the beginning is sufficient. But I am interested in your critique of shuffling. Do you know a better way to shuffle a list tha

Re: [racket] Looking for feedback on code style

2010-09-09 Thread Prabhakar Ragde
On 9/9/10 1:27 PM, Will M. Farr wrote: Nevertheless, it sure feels like it's O(N) (I've experimented quite a bit with timing tests, and the simple argument about averages I gave before "feels right"). Your intuition is correct; it's a bit tricky, but not too tricky, to show that the algorithm

Re: [racket] Looking for feedback on code style

2010-09-09 Thread Prabhakar Ragde
On 9/9/10 12:09 PM, Phil Bewig wrote: I did treaps, too: http://programmingpraxis.com/2009/06/26/treaps/. And I use them all the time, including where most people probably use hash tables, because so often you need the keys in order somewhere in your program. I'm sorry, I shouldn't have said "

Re: [racket] Looking for feedback on code style

2010-09-09 Thread Prabhakar Ragde
Will M. Farr wrote: Looks like Phil beat me to it, but here's some code that finds the n-th element of a list in O(N) time. The algorithm is similar to quicksort, but you don't sort both the sub-lists: partition the list into elements less than and greater or equal to a pivot. By counting the

Re: [racket] Looking for feedback on code style

2010-09-09 Thread Prabhakar Ragde
On 9/9/10 11:33 AM, Phil Bewig wrote: http://programmingpraxis.com/2009/12/11/selection/ This method takes O(n) time with high probability if the partitioning element is chosen deterministically and the data is randomly permuted (with all permutations equally likely) or if the partitioning el

Re: [racket] Looking for feedback on code style

2010-09-09 Thread Prabhakar Ragde
On 9/9/10 11:26 AM, David Van Horn wrote: The original post got me interested in median algorithms and I started to read up on the selection problem. Wikipedia (I know, I know) says the same thing as you: medians can be computed in O(n) time and points to selection as the way to do it. But I don

Re: [racket] Looking for feedback on code style

2010-09-09 Thread Prabhakar Ragde
Noel Welsh wrote: I think this is great code -- very clear. For production use you have the wrong data structure (Lists are O(n) random access and length; you want O(1) vectors), but that doesn't matter for your use. I don't think vectors help very much in this case (median-finding). For the

[racket] What is inexactness about?

2010-09-01 Thread Prabhakar Ragde
Stephen Bloch writes: An example in my textbook is (define TANK-CAPACITY-GALLONS #i13.6) (define MPG #i28) because the capacity of a gas tank, and miles-per-gallon fuel efficiency, are based on physical measurements and therefore inherently inexact. I think this is misguided. The proper resp