[racket] segmentation fault while compiling mzscheme 4.2.5 on Xen environment

2010-06-18 Thread Danny Yoo
I'm seeing the following error when trying to install mzscheme on a Xen-hosted virtual environment. In the middle of 'make', I see this: # make mzschemecgc make[4]: Entering directory `/home/dyoo/local/plt-4.2.5/src/mzscheme' gc

Re: [racket] segmentation fault while compiling mzscheme 4.2.5 on Xen environment

2010-06-18 Thread Danny Yoo
On Fri, Jun 18, 2010 at 3:20 PM, Eli Barzilay wrote: > On Jun 18, Danny Yoo wrote: >> What other debugging information can I provide? > > Create a core dump, then use gdb to get a stack trace. Ok, here's what I'm seeing: d...@go:~/local/plt-4.2.5/src/mzscheme/gc2$ gdb

Re: [racket] segmentation fault while compiling mzscheme 4.2.5 on Xen environment

2010-06-25 Thread Danny Yoo
> Meanwhile, configure with `--disable-futures' to disable the use of > thread-local variables in the run-time system, and then the build seems > to work ok. Thank you so much! Yes, this appears to work for me now. _ For list-related administrati

[racket] silly toy code to simulate semaphores

2010-07-04 Thread Danny Yoo
I was just reading though John Reppy's "Concurrent Programming in ML" and wanted to play with some code. Out of curiosity, I wrote the following code to try to see what it would look like to simulate semaphores using channels. How does it look? ;;

[racket-users] Does password reset work on pkgs.racket-lang.org?

2021-01-30 Thread Danny Yoo
Hi everyone, Unfortunately, it looks like the password on my account (d...@hashcollision.org) on pkgd.racket-lang.org got compromised recently, so I'm trying to figure out how to reset it now. I don't see an option to do so except in the Login page. When I try to do so, I ask it to "Email me

Re: [racket] Racket Badges

2011-08-31 Thread Danny Yoo
> I wish you could earn Racket badges and levels for completing exercises, > getting +1'ed on the mailing list, and contributing code and documentation. +1. Stack Overflow does this sort of achievement system. It feels very much like a game. _ F

[racket] recent updates to Whalesong development: web-world

2011-09-02 Thread Danny Yoo
We're smack in the middle of implementing web-world for Whalesong, which is analogous to regular world, but with web pages. Unlike regular world, the callbacks in web-world take in both the world as well as a functional representation of the DOM. We have a few programs and some initial documenta

[racket] Using the profiler effectively?

2011-09-04 Thread Danny Yoo
I've never been able to use the Racket profiler module effectively, which makes me very sad. I want to use it because Whalesong takes way too much time to compile. I'm looking at: http://docs.racket-lang.org/profile/index.html. I've been able to run my program with it, and it dumps out an impres

Re: [racket] recent updates to Whalesong development: web-world

2011-09-05 Thread Danny Yoo
On Fri, Sep 2, 2011 at 4:33 PM, Danny Yoo wrote: > We're smack in the middle of implementing web-world for Whalesong, > which is analogous to regular world, but with web pages.  Unlike > regular world, the callbacks in web-world take in both the world as > well as a functional

Re: [racket] recognizing undefined; shared in TR

2011-09-05 Thread Danny Yoo
On Mon, Sep 5, 2011 at 2:18 PM, Shriram Krishnamurthi wrote: > On Sat, Sep 3, 2011 at 11:17 PM, Shriram Krishnamurthi > wrote: >> Is there a way of checking whether a value position is undefined? >> Specifically, I'm trying to recognize the undefined value put in >> structures by SHARED.  It app

Re: [racket] recent updates to Whalesong development: web-world

2011-09-05 Thread Danny Yoo
I got some good feedback, and made some changes! The code that's generating should behave under Firefox now. Please try this again: http://hashcollision.org/whalesong/examples/todo/todo.html _ For list-related administrative tasks: http://

Re: [racket] Using the profiler effectively?

2011-09-05 Thread Danny Yoo
> >  http://stackoverflow.com/questions/54971/profiling-visualization-tools > > which has a number of pointers that look useful.  It also looks like > graphviz is the most popular recommendation, so perhaps that's the > best way to go -- slapping a GUI or an HTML rendering around it. As an exampl

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

2011-09-07 Thread Danny Yoo
On Wed, Sep 7, 2011 at 12:00 PM, Joan Arnaldich wrote: > Something worth noting is that they only offer CGI, whatever the > language... so you won't be able to run the racket web server. AFAICT, > the most cost-effective options for running the web server would still > be a virtual shared host or

Re: [racket] Using the profiler effectively?

2011-09-07 Thread Danny Yoo
> JFYI, I have revised the documentation, which had a bunch of pretty > bad points.  But that's probably not what you want; hopefully my > earlier reply was helpful, and more hopefully someone will write up a > "guide" part for the docs, to similarly clarify things. Apologies: I'm still very conf

Re: [racket] recent updates to Whalesong development: web-world

2011-09-09 Thread Danny Yoo
> 2. Unfortunately Internet Explorer 8 on Windows 7 gives a page with > red text saying: > > 'Error: unable to focus to "add-button": "JScript object expected"' > > 3. As for Internet Explorer 9: I keep telling Windows Update, "Yeah, > I'll take a rain-check on that, thanks". But when I eventually

Re: [racket] Define-type language form, and macros

2011-09-11 Thread Danny Yoo
On Sun, Sep 11, 2011 at 1:44 PM, Jeremy Kun wrote: > Is there an existing Racket analogue for the "define-type" language form > from the PLAI text? You can pull out specific things from a language or module by using: (require (only-in some-module language-feature-1 l

[racket] fruit flies

2011-09-12 Thread Danny Yoo
I wanted to share another small web-world demonstration in Whalesong. Try this in Google Chrome:    http://hashcollision.org/whalesong/examples/boid/boid.html Source code:    http://hashcollision.org/whalesong/examples/boid/boid.rkt    http://hashcollision.org/whalesong/examples/boid/index.html

Re: [racket] fruit flies

2011-09-12 Thread Danny Yoo
> Danny: why do you think that changing those elements does less work > than what happens when you create a new scene with the 2htdp/universe > version of this program? The diff-based approach I'm taking in web-world makes it easier to preserve pieces of state embedded in the dom, without the user

[racket] srcloc structures, lists, vectors

2011-09-14 Thread Danny Yoo
I wanted to double check my understanding on why source locations have several representations in Racket. One of them is the srcloc structure: http://docs.racket-lang.org/reference/exns.html#(def._((lib._racket/private/base..rkt)._srcloc)) But there's also the list and vector representations, all

Re: [racket] Call racket with long code from racket

2011-09-14 Thread Danny Yoo
On Tue, Sep 13, 2011 at 8:03 AM, Noel Welsh wrote: > That is not one expression, but several. Wrap it in a (begin ...) and > it should work. I.e. Yikes! Don't continue to encourage him to use process here. At the very least, even the raw use of eval is probably safer than what's being proposed.

Re: [racket] Quoted expressions in #lang racket

2011-09-18 Thread Danny Yoo
> Such a cold community. :( > I give up. I'm sorry for bothering you with my bad english and stupidity, > I'll never post to this group again. Hello! Whoa! I think you are reading a lot more aggression out of those replies than what actually exists. Your english is fine; no one has made a singl

Re: [racket] Quoted expressions in #lang racket

2011-09-18 Thread Danny Yoo
[CCing the Racket mailing list] > Yes, I got this to work. But, what if I don't want to use DrRacket, but just > pure old console Racket.exe instead? Or emacs? Oh! Then it should just print like Lisp mode, if I remember correctly. Give me a sec; let me double check that. ;

[racket] Controlling module bindings with filtered-out?

2011-09-19 Thread Danny Yoo
Sometimes I want to write a module language that extends the functionality of another, but I want to write that extension in racket/base, not in the extending language. At the moment, I do this like this: ;;;

Re: [racket] red underline of language name

2011-09-25 Thread Danny Yoo
> In #lang scribble/manual, if I type > > @codeblock{ > #lang racket > } > > the output (in HTML) has the word "racket" underlined, which seems > fair enough; I see this is the case if I run scribble manually: scribble --html some-file.scrbl However, the red underline shows up, not because it

[racket] request for testing .apk file

2011-09-25 Thread Danny Yoo
I'm working on automating the build process for Android phone packages (.apk) for Whalesong. Before I do so, I'd like people who have android phones to try the following: http://hashcollision.org/tmp/WhereAmI-debug.apk This is that geolocation test program from earlier, but as an Android pac

Re: [racket] request for testing .apk file

2011-09-26 Thread Danny Yoo
An alternative to the APK stuff, offline web-app using HTML 5's application caching, is also in place. See: http://hashcollision.org/tmp/where-am-i/where-am-i.html or http://hashcollision.org/tmp/rain/index.html Once you visit the page once, it should persist in the cache. If you try

Re: [racket] Looking for awk examples

2011-09-29 Thread Danny Yoo
The awk macro refers to the documentation in scsh; there are examples of the awk macro there in: http://www.scsh.net/docu/html/man-Z-H-9.html#node_sec_8.2.1 Some of the examples there may need some adaptation, as I don't think Racket has an "sre" library to support the writing regexps with s

Re: [racket] typo in signatures?

2011-10-04 Thread Danny Yoo
> Not sure what inexact=? does.  What's needed is something like a > three-argument function that tests |x-y| < epsilon.  Epsilon should > not be implicit. It's not in the racket/base language, but it sounds like you're describing =~ from the teaching languages: http://docs.racket-lang.org/

[racket] Request for help from windows ie users

2011-10-05 Thread Danny Yoo
I've been receiving reports that my WeScheme project has been raising errors on IE.  In response, I've rolled back to a previous version (reverting CodeMirror 2 back to CodeMirror 1). I want to make sure that IE is running WeScheme fine. If you have time, please you visit:    http://www.weschem

Re: [racket] Codify

2011-10-27 Thread Danny Yoo
> It wasn't clear to me from the video how someone programs the behavior of > the games.  I wonder whether that is currently slick visual programming, or > it's pretty much traditional programming (albeit with text editor features > like a pop-up color chooser). I've got it downloaded and have loo

Re: [racket] release date for RacketCon videos?

2011-11-02 Thread Danny Yoo
On Fri, Sep 30, 2011 at 12:52 PM, Sam Tobin-Hochstadt wrote: > The videos are still being processed, and I hope they will be up soon, > but I don't have an estimated date. Just curious: is anything happening with regards to the videos? _ For list

[racket] compile-context-preservation-enabled and info.rkt files?

2011-11-03 Thread Danny Yoo
I'd like to be able to tell raco make to use (compile-context-preservation-enabled #t) when compiling my PLaneT package. I don't see a configuration option I can provide in info.rkt, so I'm not sure if this is possible with the current info.rkt system. Motivation: Whalesong does its work by grabb

Re: [racket] compile-context-preservation-enabled and info.rkt files?

2011-11-03 Thread Danny Yoo
On Thu, Nov 3, 2011 at 3:42 PM, Eli Barzilay wrote: > 50 minutes ago, Danny Yoo wrote: >> I'd like to be able to tell raco make to use >> (compile-context-preservation-enabled #t) when compiling my PLaneT >> package.  I don't see a configuration option I can pro

[racket] Moby is obsoleted by Whalesong

2011-11-07 Thread Danny Yoo
In the absence of an official revokation procedure for PLaneT packages, I've released a mock package of Moby. It's there just to print the following message: Moby is obsolete, and has been replaced with the Whalesong project. See: http://hashcollision.org/whalesong for installation a

[racket] Whalesong 1.5 released!

2011-11-07 Thread Danny Yoo
Whalesong is a Racket to JavaScript compiler that's intended to replace Moby Scheme. It's documentation can be found here: http://hashcollision.org/whalesong The documentation shows how to generate the launcher for 1.5. Major changes include: * Corrected bug that would cause Whalesong

[racket] PLaneT down?

2011-11-08 Thread Danny Yoo
Is PLaneT down for anyone else? _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

[racket] building iterators on trees

2011-11-09 Thread Danny Yoo
I've been thinking about how to support hash-iterate-first and hash-iterate-next in Whalesong. In Whalesong, my functional hash implementation is based on left-leaning red-black trees. The hash-iterate-* functions are a little weird for me since they return numbers, and I had expected them to pro

[racket] Whalesong 1.7 released

2011-11-09 Thread Danny Yoo
Here's a list of changes in Whalesong 1.7: * Added primitives: hash-keys, hash-values, hash-for-each, hash-map, write. * Merged some changes to support sk's cs019 language level. I didn't make a separate release note for 1.6. In 1.6, Whalesong constraints its use of the stack to support

Re: [racket] [typed] optional parameter

2011-11-11 Thread Danny Yoo
On Fri, Nov 11, 2011 at 12:07 PM, Paul Leger wrote: > On 11/11/2011 11:02 AM, Sam Tobin-Hochstadt wrote: >> >> Unfortunately, Typed Racket needs a little more help from the >> programmer here.  This will work: >> >> #lang typed/racket >> (: g (case->  (->  Number) >>              (Number ->  Numbe

Re: [racket] Feature request: requires make it into Interactions even if Definitions have an error

2011-11-14 Thread Danny Yoo
On Mon, Nov 14, 2011 at 3:12 PM, Todd O'Bryan wrote: > One thing that annoys me about DrRacket is that, if you have an error > in the Definitions pane, none of your required modules are loaded, so > if you try to fiddle in the Interactions window, you get "undefined" > errors. By error, do you m

Re: [racket] Feature request: requires make it into Interactions even if Definitions have an error

2011-11-14 Thread Danny Yoo
On Mon, Nov 14, 2011 at 9:04 PM, Todd O'Bryan wrote: > I should have been clearer. It is compile-time errors. Runtime work fine. Ok, cool. I have this problem myself, but as a professional programmer, I use a revision control system like 'git' to save my hide. The basic idea is that I checkpoin

[racket] question on 32 vs 64 bit environments

2011-11-14 Thread Danny Yoo
Quick check: does the Racket bytecode format change whether or not the platform is 32-bit or 64-bit? I would guess not, but I want to make sure. Thanks! _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

Re: [racket] new to Scheme and functional programming- weird error I can't wrap my mind around

2011-11-17 Thread Danny Yoo
> Using the draw-circle function defined in draw.ss, I wanted to draw a green > circle centered at (posn 150 150), with radius 20. >> (draw-circle (make-posn 150 150) 20 'green) > . . draw-circle: expects a posn as first argument, given # > I don't understand the above error. Draw-circle expects a

Re: [racket] formlets and . => .

2011-11-17 Thread Danny Yoo
> I don't know what => means in formlets. The documentation talks about what => means in the context of a formlet here: http://docs.racket-lang.org/web-server/formlets.html#(part._.Static_.Syntactic_.Shorthand) _ For list-related administrati

Re: [racket] Error generating scribble docs by PLaneT packager

2011-11-20 Thread Danny Yoo
On Sun, Nov 20, 2011 at 11:25 PM, Nadeem Abdul Hamid wrote: > I'm trying to create a planet archive and am getting the error below. > Any ideas on what might be wrong? Thanks, Yeah, I've seen it when a PLaneT package uses the planet/version or scribble/planet libraries. If you're using those too

[racket] Whalesong 1.8 released

2011-11-21 Thread Danny Yoo
Hi everyone, This release addresses some bugs: --- Bugs fixed: * appcache manifests did not allow for external network communication. * --compress-javascript didn't work under certain situations in 1.7. * view-up, view-down, view-left, view-right produced bad error messages without trace

[racket] Whalesong 1.9 released

2011-11-22 Thread Danny Yoo
Hi everyone, Whalesong 1.9 corrects a few issues, particularly the use of external CSS stylesheets on the Android phone browsers. --- Changes: * Added view-has-attr? and remove-view-attr. * Added example that shows the use of checkboxes. See the "hot-cross-buns" example in http://hash

Re: [racket] Whalesong 1.9 (Internal Typed Racket Error)

2011-11-22 Thread Danny Yoo
There's a bug in Racket 5.2 that prevents Whalesong from compiling. Try either a pre-release version of Racket, or Racket 5.1.3. _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

[racket] Whalesong 1.11 released

2011-12-04 Thread Danny Yoo
Hi everyone, Whalesong 1.11 is a bug-fix release that may slightly impact the performance of Whalesong applications. Changes: * Whalesong's will not release control to the browser during long-running computations. Program output may be a little bit more delayed as a result. * Miscellane

Re: [racket] beginner question about macros

2011-12-04 Thread Danny Yoo
> I currently learning scheme macros, and trying to figure out how to do > two particulars things: [code cut] You may want to look at syntax-case style macros, which let you do computation at compile time. When I try to write macros purely via syntax-rules templates, occasionally I have difficu

[racket] Whalesong 1.12 released

2011-12-08 Thread Danny Yoo
Hi everyone, Whalesong 1.12 includes a few more error traps to catch misuse of web-world primitives; the major change is that using the web-world handler functions outside the lexical context of a big-bang is now illegal. So the following buggy code: (define a-view (initial-view ...)) (bi

Re: [racket] Racket Web Server

2011-12-11 Thread Danny Yoo
> I am new to Racket and Lisp/Scheme in general. I am trying to write a simple > rest web service in Racket, but I'm not making much progress. Unfortunately, > I don't find the Racket docs to be very helpful. I guess my brain just isn't > wired right ;-) Asking questions on the mailing list woul

Re: [racket] In rkt or scheme, is there way to refer to the value of last expression?

2011-12-12 Thread Danny Yoo
> Just for the readability, is it possible to write > > some-list > (proc-1 some-list) > (proc-2 (val-of-last-expression)) > ... > (proc-n (val-of-last-expression)) ;where n is 'largeish' > > instead of > > (proc-n ... (proc-2 (proc-1 some-list Possible. The syntax in Racket is progr

Re: [racket] nested require modules and global variable

2011-12-17 Thread Danny Yoo
On Saturday, December 17, 2011, Niitsuma Hirotaka < hirotaka.niits...@gmail.com> wrote: > Is this valid behavior? > The sub.scm file you posted looks malformed, so some copy-and-paste error probably happened. Otherwise, can you also say what you expected to see? __

Re: [racket] Racket documentation for web development is just awful!

2011-12-18 Thread Danny Yoo
2011/12/17 Racket Noob : > >  I've already read. Continue tutorial is not bad, I passed through it > (congratulations, Danny Yoo, you're man!) Wait, wait. You can't thank me on this one and ignore Jay on this: he's a co-author. He absolutely shares the blame for t

Re: [racket] nested require modules and global variable

2011-12-18 Thread Danny Yoo
On Sunday, December 18, 2011, Niitsuma Hirotaka wrote: > How about this? > http://d.hatena.ne.jp/niitsuma/20081113/1324207362 > I add some comment > Ok, thanks for posting that code. Do you expect modules to be re-invoked on every require? I am trying to understand your concern about "valid beh

[racket] nested require modules and global variable

2011-12-19 Thread Danny Yoo
On Sunday, December 18, 2011, Niitsuma Hirotaka wrote: > Thank you. > I clearly understand. > > By the way, > Are there standard way exporting global variable from some module ? I usually avoid global name exports unless the name stands for a constant value. Otherwise, I may export a parameter

[racket] extracting "docstrings" from documentation

2011-12-19 Thread Danny Yoo
I'm trying to extract documentation strings for all the functions in racket/base. By documentation strings, I truly mean strings. Here's the progress I'm making on this: https://github.com/dyoo/extract-docstring It's buggy still, and I'm working out the kinks. The process I'm using to app

Re: [racket] extracting "docstrings" from documentation

2011-12-19 Thread Danny Yoo
On Mon, Dec 19, 2011 at 3:37 PM, Robby Findler wrote: > What is the usecase for this information? Giving people quick access > to docs in the REPL? For my particular use case, I need to take slices of the documentation and re-present them in a Scribble document. Specifically: WeScheme has a sub

[racket] Hashcollision tutorials may be momentarily down tomorrow

2011-12-26 Thread Danny Yoo
The server that hosts my web site will be swapping machines and IP addresses tomorrow, so the tutorials I've got on it may be momentarily innaccessible tomorrow. I'll try to get the DNS records corrected tomorrow when the swap happens as quickly as I can. (I'm in Palm Springs now with intermitte

Re: [racket] Embedding an image in Racket source

2012-01-03 Thread Danny Yoo
On Tuesday, January 3, 2012, José Lopes wrote: > Hello, > > I am using Racket 5.2.0.7. > I defined a name that holds an image, embedded in a Racket source file, and I exported the name. > Does this describe the situation you're seeing? http://bugs.racket-lang.org/query/?cmd=view%20audit-trail&da

Re: [racket] a question of style, and one of performance

2012-01-08 Thread Danny Yoo
On Sun, Jan 8, 2012 at 3:23 PM, Jordan Schatz wrote: > This code runs, but I'm guessing that its not the "right way" to do it. > > (define (js-date [i (current-date)]) >  (let ([original-format (date-display-format)] >        [return ((λ () >                     (date-display-format 'rfc2822) >  

Re: [racket] getting complete paths to Racket executables

2012-01-08 Thread Danny Yoo
On Sat, Jan 7, 2012 at 4:18 AM, Neil Van Dyke wrote: > How do I get the complete path to Racket executables like "raco", in a > portable way? 'find-exe' from the compiler/find-exe library should do the trick: http://docs.racket-lang.org/raco/exe.html#(def._((lib._compiler/find-exe..rkt)._find-ex

Re: [racket] Redefinitions in modules

2012-01-10 Thread Danny Yoo
On Tue, Jan 10, 2012 at 4:09 PM, Robby Findler wrote: > It isn't redefined, it is shadowed-- the definitions in a module are > in one lexical scope lower than the module position. Racket's module > system doesn't allow redefinition. The relevant section in the documentation that mentions the abil

Re: [racket] Performance difference between BSL and #lang racket

2012-01-15 Thread Danny Yoo
> What language difference(s) might be responsible for the vast performance > difference we're observing?  If it would be helpful to see the code I can > share it, but it's about 1000 LoC and I don't think it's proper to post it > publicly.  I've tried to construct a small program that shows the

Re: [racket] Web application question.

2012-01-16 Thread Danny Yoo
> Can someone tell me, is there some advantage or added funtionality in using > the @syntax in a template over the first example using quosiquotes? Section 7.4 of the Web Server docs shows a difference: http://docs.racket-lang.org/web-server/templates.html#(part._.Escaping) A version with qu

Re: [racket] Error installing whalesong

2012-01-17 Thread Danny Yoo
On Tue, Jan 17, 2012 at 5:09 PM, J G Cho wrote: > Following instruction per http://hashcollision.org/whalesong/, I tried to run > > #lang racket/base > (require (planet dyoo/whalesong:1:12/make-launcher)) in DrRacket. (v > 5.2 with unlimited memory flag, OSX Snow Leop with 1GB memorty) Whalesong

Re: [racket] Error installing whalesong

2012-01-18 Thread Danny Yoo
> I am thinking, write the code in rkt enjoying its syntax check, unit > testing, etc. Use whalesong to provide runtime.js+lib.js for various > clients that can use js. If not, serve it over HTTPS via PLT > WebServer. (I am thinking I don't have to do another re-write like > this for sometime.) > >

[racket] Gah; hashcollision.org is down, as is docs for Whalesong

2012-01-18 Thread Danny Yoo
My apologies! My hosting provider is doing something very strange at the moment, and all the content on hashcollision.org is currently offline. I'm not doing some kind of SOPA protest! I'm trying to figure out what's going on now. Racket Users list: http://lists.racket-l

[racket] is planet.racket-lang.org under heavy load?

2012-01-19 Thread Danny Yoo
It's taking a good few seconds for it to respond to http requests. Racket Users list: http://lists.racket-lang.org/users

[racket] dynamic compilation

2012-01-20 Thread Danny Yoo
For the upcoming version of WeScheme, I'm planning to use the real 'compile' from Racket. I'm trying to better understand a part of the compilation system. Here's a sample program I'm using to play: ;

Re: [racket] PLaneT: Broken table of contents links in scribble

2012-01-24 Thread Danny Yoo
> After struggling to document my first planet package, I find that > either Scribble or PLaneT is incorrectly rendering the links in > my package documentation's table of contents. Is this a bug or am > I doing something wrong? > > To see the issue, visit: > http://planet.plt-scheme.org/package-so

Re: [racket] how to trace stack by command line tools?

2012-02-02 Thread Danny Yoo
On Thu, Feb 2, 2012 at 12:59 AM, mikeyao wrote: > I'm learning scheme and code in emacs and geiser. I want to watch the whole > recursive process to understand well. I know drracket can do it. Is it other > tools(command line) that can use in emacs? A simple tool you can use is the 'racket/trace

Re: [racket] how to trace stack by command line tools?

2012-02-02 Thread Danny Yoo
> I have tried trace library but I have a problem. > If I put my definitions in the interactive window, everything is fine. > But if I put the definitions in the definition window and then I try to > trace them, I get error "set!: cannot modify a constant: ". > Why? Let me assume you're doing some

[racket] an example for web-server for local web development?

2012-02-02 Thread Danny Yoo
I end up needing to look at an HTML file in a web-serving context every once in a while. Rather than copy the files over to my personal web server, I do this instead: ;; #!/usr/bin/env racket #lang racket/base ;; Quick and dirty program to view a local file under a web se

Re: [racket] Porter stemming algorithm

2012-02-04 Thread Danny Yoo
Where's the source? On Feb 4, 2012 4:40 PM, "John Sampson" wrote: > Hello - > > I have found code for a Scheme version of the Porter stemming algorithm. > > Supposedly it has been tested on PLT Scheme but when loaded into > DrRacket there are many unreadable characters and syntax errors. > > Is t

Re: [racket] racket-libxmmsclient

2012-02-06 Thread Danny Yoo
On Mon, Feb 6, 2012 at 4:23 AM, Neil Caldwell wrote: > Hi everyone, > > As I may have mentioned in an earlier thread, I've started developing > bindings to libxmmsclient, the client library for xmms2. +1; very cool! Racket Users list: http://lists.racket-lang.org/users

Re: [racket] comparing structure types through contracts

2012-02-07 Thread Danny Yoo
Would a structure type property be a viable alternative? Example: ;; #lang racket/load (module a racket (define-values (prop:S S? S-ref) (make-struct-type-property 'S)) (provide S?) (define-struct s (a b) #:transpare

Re: [racket] Porter stemming algorithm

2012-02-08 Thread Danny Yoo
On Sun, Feb 5, 2012 at 3:42 AM, John Sampson wrote: > Hello - > > see http://programmingpraxis.com/2009/09/08/porter-stemming/ Awesome. Ok, I've taken the code there and put it up as a Racket PLaneT package to make it easier to use. For example: ;;

Re: [racket] Porter stemming algorithm

2012-02-08 Thread Danny Yoo
On Wed, Feb 8, 2012 at 4:59 PM, John Sampson wrote: > Hello - > > Many thanks for your interest. I have used the version just uploaded to > PLaneT > and it works. For a Racket ignoramus like me this is a buzz! Many thanks to > all. No problem! Currently, I've got no time to write the proper doc

[racket] prop:dict question

2012-02-12 Thread Danny Yoo
I was looking at trying to implement a structure that represents a dictionary, but some of the elements of the interface don't make too much sense to me yet: there are elements corresponding to ref/set as I expected, but what I didn't expect were iteration as well.. Since there's a separate protoc

[racket] Is the racket home page down for anyone else?

2012-02-13 Thread Danny Yoo
I can't get to documentation or PLaneT at the moment. Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Making a Racket function "recallable"

2012-02-13 Thread Danny Yoo
On Mon, Feb 13, 2012 at 11:52 PM, Joe Gilray wrote: > Warning: extreme newbie question ahead. > > I wrote the following fibonacci function: > > ; function that returns the next fibonacci number each time it is called > ; invoke as (fib) > (define fib >   (let ([n0 -1] [n1 1]) >     (lambda () >  

Re: [racket] Making a Racket function "recallable"

2012-02-13 Thread Danny Yoo
>  (let ([fib-sequence (in-producer fib 'donttellmecauseithurts)]) I realize that I forgot to add explanation. This line creates a "sequence" by repeatedly calling your fib function. in-producer will continue to call fib until it sees the second argument. But since the fibonacci numbers don't en

Re: [racket] Making a Racket function "recallable"

2012-02-13 Thread Danny Yoo
On Tue, Feb 14, 2012 at 12:32 AM, Joe Gilray wrote: > Danny, > > Thanks for the explanations.  These are powerful ideas.  It appears not to > generate the sequence until needed, very nice. > > How could I modify this to do the "less than n" idea? A stream is a sequence, and also has a few more f

Re: [racket] Making a Racket function "recallable"

2012-02-15 Thread Danny Yoo
On Wed, Feb 15, 2012 at 3:10 AM, Joe Gilray wrote: > The code that Danny wrote to create fib-stream works great with his > peek-fibs function, but I really don't understand stream-first. > > I wrote: > > ; function to use the fib-stream to generate a list of all fibs < n > (define (fib-stream-less

Re: [racket] Making a Racket function "recallable"

2012-02-15 Thread Danny Yoo
> I've learned a lot tonight.  I have been reading the manuals, but they are > hard to get your arms around when you are just starting out. Also it would > be great if the manuals had more and longer examples.  Have anyone looked > into doing a Racket "cookbook"? Some of the documentation is meant

[racket] Whalesong 1.15 released

2012-02-16 Thread Danny Yoo
Hi everyone, Whalesong 1.15 is mostly a bug-fix release. At the very least, Whalesong 1.15 should match Racket's behavior on the following silly program: ;; #lang planet dyoo/whalesong (define (puzzle n) (if (= n

[racket] sad user face?

2012-02-18 Thread Danny Yoo
So I'm looking at the Realm of Racket page at: http://realmofracket.com/, and the kid who is sitting on the left looks, well, unhappy. Is he dealing with a tough programming problem? Please tell me he will be happier when the book's finally released. :) Racket Users list:

Re: [racket] Porter stemming algorithm

2012-02-18 Thread Danny Yoo
>> Many thanks for your interest. I have used the version just uploaded to >> PLaneT >> and it works. For a Racket ignoramus like me this is a buzz! Many thanks to >> all. Ok, I just added docs to it. :) Here: http://planet.racket-lang.org/package-source/dyoo/porter-stemmer.plt/1/2/planet-docs/

[racket] Producing a PLoT with labels on the histogram bars

2012-02-20 Thread Danny Yoo
Just wanted to post this just in case it helps anyone else: ;;; #lang racket (require plot) ;; histogram-with-points: (sequenceof (sequence any/c real)) -> (listof renderer2d) ;; ;; Given a sequence of data to draw as ba

Re: [racket] Multi-return Function Call

2012-02-21 Thread Danny Yoo
>  "It is possible to extend the basic notion of 'function call' to >  allow functions to have multiple return points. This turns out to be >  a surprisingly useful mechanism. This article conducts a fairly >  wide-ranging tour of such a feature..." Hmmm! I haven't done a deep look into the pape

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

2012-02-23 Thread Danny Yoo
The following code is bigger than the limit, but I've always thought it was cute: #lang racket ;; see: http://mail.python.org/pipermail/tutor/2001-April/004888.html (define (a n) (* 2 n (add1 (* 2 n (define (b x y) (if (<= (abs x) (abs y)) (+ (a (- y)) (abs (- y x)))

Re: [racket] Changing the font style to "fixed" for WeScheme's display function

2012-02-25 Thread Danny Yoo
On Saturday, February 25, 2012, Ashok Bakthavathsalam wrote: > Is there a way to set the font style used by the "display" function to be > a "fixed" type? Hi Ashok, At the moment, no. I'll put on my TODO to change the default font to 'fixed', and hope to have that ready as soon as possible. __

Re: [racket] Splitting Racket source code by scope?

2012-02-27 Thread Danny Yoo
On Mon, Feb 27, 2012 at 11:38 AM, Rüdiger Asche wrote: > I'd like to split the components of my Racket project into multiple files > according to this structure: > > contents of file1: > > (letrec ((id1 body1) >         ... >         >         ... >        ) >   (main execution body using id1, id

[racket] Cool things in Whalesong: RaphaelJS!

2012-02-27 Thread Danny Yoo
Hi everyone, The following is work that Jens Axel Soegaard has done: he's written bindings for RaphaelJS in Whalesong! The following is very, very tentative, but it's so cool I can't bear to stay quiet about it. :) First, see the program source: http://hashcollision.org/tmp/raphael-demo/rap

Re: [racket] Splitting Racket source code by scope?

2012-02-28 Thread Danny Yoo
On Tue, Feb 28, 2012 at 2:31 AM, Rüdiger Asche wrote: > yes, but the docs for include also say that "If the source is not a complete > path string, then path-spec is resolved relative to > (current-load-relative-directory) if it is not #f, or relative to > (current-directory) otherwise." Is that a

Re: [racket] Cool things in Whalesong: RaphaelJS!

2012-02-28 Thread Danny Yoo
On Tue, Feb 28, 2012 at 12:56 AM, Danny Yoo wrote: > Hi everyone, > > The following is work that Jens Axel Soegaard has done: he's written > bindings for RaphaelJS in Whalesong!  The following is very, very > tentative, but it's so cool I can't bear to stay quiet abo

Re: [racket] What is the equivalent of ToExpression in Mathematica?

2012-02-29 Thread Danny Yoo
On Wed, Feb 29, 2012 at 4:33 PM, Ashok Bakthavathsalam wrote: > Will eval-string work even if the string is the normal mathematical > notation? > For example, "1+1" or "8*74-2" ? No, but there is an example in Racket's parser-tools library (parser-tools/examples/calc) that will parse very simple

Re: [racket] Splitting Racket source code by scope?

2012-02-29 Thread Danny Yoo
Hi Rüdiger, The top of all four files should have #lang racket at the very top. This declares the file to be a module in the full Racket language. Other documentation out there that are a few years old might refer to the older style of defining modules, where there's an outer "(module foo m

  1   2   3   4   5   6   7   8   >