Re: [racket] two languages at a time in DrRacket
Ya :) It works but I don't think it is the right way to do it. Jay On Wed, Jun 30, 2010 at 6:12 PM, Shriram Krishnamurthi <sk <at> cs.brown.edu> wrote: > "easy" is great. I assume I should ignore the comment that says > > ; XXX This is almost certainly wrong. > > Shriram > -- -- Jay McCarthy <jay <at> cs.byu.edu> Assistant Professor / Brigham Young University http://teammccarthy.org/jay "The glory of God is Intelligence" - D&C 93 _________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users
Re: [racket] Anyone using Dorodango? Any other movement towards an R6RS package system?
On 06/30/2010 03:04 AM, Noel Welsh wrote: > I really > think the Scheme world would be much much much better served by these > developers contributing their efforts to a single implementation. In particular, one nice thing about Racket is that it provides not so much a language implementation, but an inter-language implementation interface. So you could (in theory) write a Racket module that turned itself into native binary assembler, but then use it together with another module that was JIT compiled bytecode. You could even (in theory) write a language in Racket that produced an intermediate C representation that was then compiled with a C compiler into a program. So all those programs like Chicken, Ypsilon, Larceny and such, the same effort put into those projects would have produced an equally effective Racket language capable of doing the same damn thing, while also being 100% compatible with anything written in "#lang racket". People will always disagree on exactly what's important to have in a scheme implementation, but I like to think that we could work together enough to at least be able to load each other's modules. And once that has been accomplished, I don't see why we couldn't call the system to do so "Racket" because that's exactly what Racket is.
Re: [racket] Anyone using Dorodango? Any other movement towards an R6RS package system?
This is a very elegant argument. It has just occurred to me that, AFAIK, a .plt file is just a mime-encoded gzipped tar. To use Planet as a distribution mechanism for R6RS modules should therefore be straightforward (on Unix systems). The only thing needed beyond creating the tarball is an info.rkt file. N. On Thu, Jul 1, 2010 at 7:04 AM, synx <plt@...> wrote: > In particular, one nice thing about Racket is that it provides not so > much a language implementation, but an inter-language implementation > interface. ...
Re: [racket] Anyone using Dorodango? Any other movement towards an R6RS package system?
> The only thing needed beyond creating the tarball is an > info.rkt file. You underestimate the Scheme "community"'s ability to divide. The controversy will shift entirely to what is acceptable in info.rkt files. Soon you will end up with the Revised^n Reports on the Racket Information File Format, which will be accused of all sorts of unSchemely practices like being too static, allowing square brackets, etc. Shriram
Re: [racket] Anyone using Dorodango? Any other movement towards an R6RS package system?
Okay guys. Time to move this one to cls. Scheme is a noble endeavor and if you want to poke it with a stick, do it elsewhere. Robby On Thursday, July 1, 2010, Shriram Krishnamurthi <sk <at> cs.brown.edu> wrote: >> The only thing needed beyond creating the tarball is an >> info.rkt file. > > You underestimate the Scheme "community"'s ability to divide. The > controversy will shift entirely to what is acceptable in info.rkt > files. Soon you will end up with the Revised^n Reports on the Racket > Information File Format, which will be accused of all sorts of > unSchemely practices like being too static, allowing square brackets, > etc. > > Shriram > _________________________________________________ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/users > _________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users
[racket] Redefining selectors - another newbie question
Thankyou racket gurus for your advice. My program using a "loop" now works: (for-each (fn(x)(display x)(newline)) (.. 10 1)) (display "blastoff!") -- I have another question, is it possible (preferably easy) to use dot notation for the auto-generated selectors (e.g. for (point x y z), instead of point-x can we use point.x)? I am not exactly sure how to redefine that since it is auto-created on construction of the struct. I have just donned my flame-proof clothing. Thanks.
Re: [racket] affing a panel to DrRacket
it's lives, but I'm still a little confused on how I set where it sits in the layout, and how to make it dragable - the class is not enough. I appreciate the help - I'm having a bad run at making sense of the documentation.
the relevant bit;
[...]
(define (tabs-mixin super%)
(class super%
(define text (new text%))
(super-new)
(let* ((area-container (send this get-area-container))
(test-panel (new panel:horizontal-dragable% (parent area-container)))
(text (new text%))
(ed (new editor-canvas% (parent test-panel))))
(send ed set-editor text)
#;(send area-container add-child test-panel)) ;;; I need a parent to instantiate a panel.
))
[...]
As you can see I'm also curious about the nature of the add-child method, given that the panel is added at instantiation, and a parent is required.
Thanks again for your help.
,
Stephen
Full file;
#lang racket/base
(require mred
racket/class
scheme/file
scheme/contract
framework/framework
framework
racket/unit
drracket/tool-lib
drscheme/tool
)
(provide tool <at> )
(define tool <at>
(unit
(import drracket:tool^)
(export drracket:tool-exports^)
(define (phase1) (void))
(define (phase2) (void))
(define (tabs-mixin super%)
(class super%
; frame:basic<%>
; frame:basic-mixin: do not add children directly to a frame:basic (unless using make-root-area-container)
; use the get-area-contaner method instead
(define text (new text%))
(inherit get-current-tab get-menu-bar get-button-panel register-toolbar-button)
(super-new)
(let* ((area-container (send this get-area-container))
(test-panel (new panel:horizontal-dragable% (parent area-container)))
(text (new text%))
(ed (new editor-canvas% (parent test-panel))))
(send ed set-editor text)
#;(send area-container add-child test-panel))
))
(drracket:get/extend:extend-unit-frame tabs-mixin)
))
;; info file
#lang setup/infotab
(define name "Cosmonaut")
(define version "0.1")
(define release-notes '("for Racket 5"))
(define blurb '("Cosmonaut lets you explore the PLaneT package repository from within DrScheme."))
(define doc.txt "doc.txt")
(define homepage "http://sp.degabrielle.name/cosmonaut")
(define drracket-tools '(("cosmonaut.rkt")
;("fossil.rkt")
;("tabs.rkt")
))
(define drracket-tool-names '("Cosmonaut"
;"Fossil"
;"Tabs"
))
;(define drracket-tool-icons (list (list "cosmonaut.png" "fossil.png" "projectmgr.png")))
(define drracket-tool-urls '(("http://sp.degabrielle.name/cosmonaut")
;("http://sp.degabrielle.name/Fossil")
;("http://sp.degabrielle.name/Tabs")
))
On Wed, Jun 30, 2010 at 5:02 PM, Robby Findler <robby <at> eecs.northwestern.edu> wrote:
You want to create a tool, add in a frame-mixin (both via the tools
interface), and then use the frame:basic<%> mechanism for adding
panels to the frame.
If that's not enough to get you started, I'll write up a little
example tool that does it.
Robby> _________________________________________________
On Wed, Jun 30, 2010 at 8:30 AM, Stephen De Gabrielle
<spdegabrielle <at> gmail.com> wrote:
> Hi,
>
> Please forgive my ignorance, I'm trying to work out how to add a panel
> (like program contour) to DrRacket.
>
> Does anyone know the correct method, or can point me to source code, or the
> right bit of the documentation?
>
> Cheers,
>
> Stephen
>
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/users
>
--
--
Stephen De Gabrielle
stephen.degabrielle <at> acm.org
Telephone +44 (0)20 85670911
Mobile +44 (0)79 85189045
http://www.degabrielle.name/stephen
<div>
<p>it's lives, but I'm still a little confused on how I set where it sits in the layout, and how to make it dragable - the class is not enough. I appreciate the help - I'm having a bad run at making sense of the documentation.<br><br>the relevant bit; <br>[...]<br> (define (tabs-mixin super%)<br> (class super%<br> (define text (new text%))<br> (super-new)<br> (let* ((area-container (send this get-area-container))<br> (test-panel (new panel:horizontal-dragable% (parent area-container)))<br>
(text (new text%))<br> (ed (new editor-canvas% (parent test-panel))))<br> (send ed set-editor text)<br> #;(send area-container add-child test-panel)) ;;; I need a parent to instantiate a panel.<br>
)) <br>[...]<br><br>As you can see I'm also curious about the nature of the add-child method, given that the panel is added at instantiation, and a parent is required.<br><br>Thanks again for your help.<br>, <br>
Stephen<br><br>Full file; <br><br>#lang racket/base<br>(require mred<br> racket/class<br> scheme/file<br> scheme/contract<br> framework/framework<br> framework<br> racket/unit<br>
drracket/tool-lib<br> drscheme/tool<br> )<br><br>(provide tool <at> )<br><br>(define tool <at> <br> (unit<br> (import drracket:tool^)<br> (export drracket:tool-exports^)<br> (define (phase1) (void))<br>
(define (phase2) (void))<br> <br>(define (tabs-mixin super%)<br> (class super%<br> ; frame:basic<%> <br> ; frame:basic-mixin: do not add children directly to a frame:basic (unless using make-root-area-container)<br>
; use the get-area-contaner method instead<br> (define text (new text%))<br> <br> (inherit get-current-tab get-menu-bar get-button-panel register-toolbar-button)<br> (super-new)<br> <br>
(let* ((area-container (send this get-area-container))<br> (test-panel (new panel:horizontal-dragable% (parent area-container)))<br> (text (new text%))<br> (ed (new editor-canvas% (parent test-panel))))<br>
(send ed set-editor text)<br> #;(send area-container add-child test-panel))<br> ))<br> <br> <br> (drracket:get/extend:extend-unit-frame tabs-mixin)<br> ))<br><br>;; info file<br>#lang setup/infotab<br><br>(define name "Cosmonaut")<br>(define version "0.1")<br>(define release-notes '("for Racket 5"))<br>(define blurb '("Cosmonaut lets you explore the PLaneT package repository from within DrScheme."))<br><br>(define doc.txt "doc.txt")<br>(define homepage "<a href="http://sp.degabrielle.name/cosmonaut">http://sp.degabrielle.name/cosmonaut</a>")<br><br><br>(define drracket-tools '(("cosmonaut.rkt") <br>
;("fossil.rkt") <br> ;("tabs.rkt")<br> ))<br><br>(define drracket-tool-names '("Cosmonaut"<br> ;"Fossil"<br>
;"Tabs"<br> ))<br><br>;(define drracket-tool-icons (list (list "cosmonaut.png" "fossil.png" "projectmgr.png")))<br>(define drracket-tool-urls '(("<a href="http://sp.degabrielle.name/cosmonaut">http://sp.degabrielle.name/cosmonaut</a>")<br>
;("<a href="http://sp.degabrielle.name/Fossil">http://sp.degabrielle.name/Fossil</a>")<br> ;("<a href="http://sp.degabrielle.name/Tabs">http://sp.degabrielle.name/Tabs</a>")<br>
))<br><br><br><br><br><br><br><br><br><br>On Wed, Jun 30, 2010 at 5:02 PM, Robby Findler <span dir="ltr"><<a href="mailto:robby <at> eecs.northwestern.edu">robby <at> eecs.northwestern.edu</a>></span> wrote:<br></p>
<div class="gmail_quote"><blockquote class="gmail_quote">You want to create a tool, add in a frame-mixin (both via the tools<br>
interface), and then use the frame:basic<%> mechanism for adding<br>
panels to the frame.<br><br>
If that's not enough to get you started, I'll write up a little<br>
example tool that does it.<br><br>
Robby<br><div>
<div></div>
<div class="h5">
<br>
On Wed, Jun 30, 2010 at 8:30 AM, Stephen De Gabrielle<br>
<<a href="mailto:spdegabrielle <at> gmail.com">spdegabrielle <at> gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> Please forgive my ignorance, I'm trying to work out how to add a panel<br>
> (like program contour) to DrRacket.<br>
><br>
> Does anyone know the correct method, or can point me to source code, or the<br>
> right bit of the documentation?<br>
><br>
> Cheers,<br>
><br>
> Stephen<br>
><br>
</div>
</div>> _________________________________________________<br>
> For list-related administrative tasks:<br>
> <a href="http://lists.racket-lang.org/listinfo/users" target="_blank">http://lists.racket-lang.org/listinfo/users</a><br>
><br>
</blockquote></div>
<br><br clear="all"><br>-- <br><br>--<br>Stephen De Gabrielle<br><a href="mailto:stephen.degabrielle <at> acm.org">stephen.degabrielle <at> acm.org</a><br>Telephone +44 (0)20 85670911<br>Mobile +44 (0)79 85189045<br><a href="http://www.degabrielle.name/stephen">http://www.degabrielle.name/stephen</a><br><br>
</div>
Re: [racket] Redefining selectors - another newbie question
(define posn.x posn-x) But that's not quite what you wantOn Jul 1, 2010, at 10:35 AM, Brad Long wrote: > Thankyou racket gurus for your advice. My program using a "loop" now works: > (for-each (fn(x)(display x)(newline)) (.. 10 1)) (display "blastoff!") > -- > I have another question, is it possible (preferably easy) to use dot notation for the auto-generated selectors (e.g. for (point x y z), instead of point-x can we use point.x)? I am not exactly sure how to redefine that since it is auto-created on construction of the struct. > > I have just donned my flame-proof clothing. > > Thanks. > > _________________________________________________ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/users
Re: [racket] Redefining selectors - another newbie question
This is fairly easy, but do you really want to avoid typing '-'? I think what you want is this: Given: (struct point (x y)) (define pt (point 1 2)) Currently, you write: (point-x pt) You want to write: (pt.x) Amirite? N. On Thu, Jul 1, 2010 at 3:35 PM, Brad Long <brad@...> wrote: > Thankyou racket gurus for your advice. My program using a "loop" now works: > (for-each (fn(x)(display x)(newline)) (.. 10 1)) (display "blastoff!") > -- > I have another question, is it possible (preferably easy) to use dot > notation for the auto-generated selectors (e.g. for (point x y z), instead > of point-x can we use point.x)? I am not exactly sure how to redefine that > since it is auto-created on construction of the struct. > > I have just donned my flame-proof clothing. > > Thanks.
On Jul 1, 2010, at 10:35 AM, Brad Long wrote:
> Thankyou racket gurus for your advice. My program using a "loop" now works:
> (for-each (fn(x)(display x)(newline)) (.. 10 1)) (display "blastoff!")
> --
> I have another question, is it possible (preferably easy) to use dot notation for the auto-generated
selectors (e.g. for (point x y z), instead of point-x can we use point.x)? I am not exactly sure how to
redefine that since it is auto-created on construction of the struct.
>
> I have just donned my flame-proof clothing.
>
> Thanks.
>
> _________________________________________________
> For list-related administrative tasks:
>
RSS Feed