Re: [racket-users] Need advice on XML representation

2020-03-10 Thread Tom Gillespie
Hi Hendrik,
I explored this question when I had to decide how to implement an
exchange format for identifier metadata. SXML supports more of the
standard, specifically for my use cases it was critical that I have support
and representation for xml namespaces, which xexprs in racket do not have.
Depending on your exact use cases sxml also has built in support for sxpath
queries, which I used for webscraping here
.
In short, if you have to work with more of XML than just the fact that it
has SGML syntax I would strongly

recommend SXML over any of the alternatives. Neil Van Dyke (cced) is the
current maintainer of sxml and some associated libraries, and might be able
to give a more concrete answer to some of your questions if you don't find
answers in some of the links below. Best!
Tom

Two threads with relevant information.
https://groups.google.com/forum/?utm_medium=email_source=footer#!searchin/racket-users/sxml|sort:date/racket-users/QsTMrgfzBxQ/VghJQURTGAAJ
https://groups.google.com/forum/?utm_medium=email_source=footer#!msg/racket-users/NMv8ezKStZU/-4D9J-okCgAJ


On Mon, Mar 9, 2020 at 7:06 AM Hendrik Boom  wrote:

> I need a recommendation.
> I have a bunch of XML to read in, interpret, process, and to write out as
> corresponding Racket code.
> The resulting Racket code will not be XMLis at all.
> Searchni, I find mention of SXML, xexprs, and there seems to be an XML
> package as sell.
>
> Which is mode useful, considering likely longevity, support code,
> compatibility with standards, and so forth.
>
> Are any of these amenable producing output while reading input, in case my
> code ever needs to be run on a small computer?
>
> -- hendrik
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/20200309140608.5f5tztvwns543tiv%40topoi.pooq.com
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CA%2BG3_PNQod8UsO7P21vGFoqqe0AG3sTnba84rkmNuMai3SvCHQ%40mail.gmail.com.


Re: [racket-users] download catalog down?

2020-02-27 Thread Tom Gillespie
Hi Matthew,
Thank you for the detailed explanation. The issued turned out to be a
problem on my end with my experimental ebuild for installing all 3
implementations of racket on one system, so I will figure out what I was
doing wrong and get it sorted out. No problem with anything racket! Best,
Tom


On Thu, Feb 27, 2020 at 6:09 PM Matthew Flatt  wrote:

> The URL
>
>  https://download.racket-lang.org/releases/7.6/catalog/
>
> is a fine catalog configuration. If you use that catalog and query it
> with something like
>
>   raco pkg catalog-show racket-lib
>
> then `raco pkg` will form the URL
>
>   https://download.racket-lang.org/releases/7.6/catalog/pkg/racket-lib
>
> and fetch that. Or, if you use something like
>
>  raco pkg catalog-copy
>
> then `raco pkg` will form the URL
>
>   https://download.racket-lang.org/releases/7.6/catalog/pkgs
>
> But fetching the catalog URL without extending it is not part of the
> catalog protocol.
>
> At Thu, 27 Feb 2020 15:43:57 -0800, Tom Gillespie wrote:
> > Hi Matthew,
> >  Thanks, this would seem to suggest that something in the settings
> > for raco is misconfigured on my system. Does that make sense? Thanks!
> > Tom
> >
> > On Thu, Feb 27, 2020 at 3:00 PM Matthew Flatt 
> wrote:
> > >
> > > That path isn't served, but something like
> > >
> > >   https://download.racket-lang.org/releases/7.6/catalog/pkg/racket-lib
> > >
> > > or
> > >
> > >   https://download.racket-lang.org/releases/7.6/catalog/pkgs
> > >
> > > should work (and does work for me).
> > >
> > > At Thu, 27 Feb 2020 14:22:55 -0800, Tom Gillespie wrote:
> > > > Hi,
> > > > I (and raco) get a 404 error when trying to access
> > > > https://download.racket-lang.org/releases/7.6/catalog/.
> > > >
> > > > I'm seeing the following error on the page.
> > > >
> > > > > ((uncaught-exception-handler)
> > > >
> > > >
> >
> (*(+(*)(*(+(*)(*)(*)(*)(*))(+(*)(*)(*)(*)(*))(+(*)(*)(*)(*(+(*)(*)(*)(*
> > > > uncaught exception: 404
> > > >
> > > > Help? Thanks!
> > > > Tom
> > >
> > > --
> > > 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.
> > > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/racket-users/5e5849f7.1c69fb81.93987.1584SMTP
> > IN_ADDED_MISSING%40gmr-mx.google.com.
> >
> > --
> > 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.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/racket-users/CA%2BG3_PPA06VKCc0Wuzu%2B3H-AsPS
> > LmZkRiy_DmR5GnghDsZ-%3DRA%40mail.gmail.com.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/5e587651.1c69fb81.19a69.26b0SMTPIN_ADDED_MISSING%40gmr-mx.google.com
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CA%2BG3_PNA01572%2BU1SJ%2B2vc_A_cdHRR3nVJBWdbkU1D%2BWPaijMQ%40mail.gmail.com.


Re: [racket-users] download catalog down?

2020-02-27 Thread Tom Gillespie
Hi Matthew,
 Thanks, this would seem to suggest that something in the settings
for raco is misconfigured on my system. Does that make sense? Thanks!
Tom

On Thu, Feb 27, 2020 at 3:00 PM Matthew Flatt  wrote:
>
> That path isn't served, but something like
>
>   https://download.racket-lang.org/releases/7.6/catalog/pkg/racket-lib
>
> or
>
>   https://download.racket-lang.org/releases/7.6/catalog/pkgs
>
> should work (and does work for me).
>
> At Thu, 27 Feb 2020 14:22:55 -0800, Tom Gillespie wrote:
> > Hi,
> > I (and raco) get a 404 error when trying to access
> > https://download.racket-lang.org/releases/7.6/catalog/.
> >
> > I'm seeing the following error on the page.
> >
> > > ((uncaught-exception-handler)
> >
> > (*(+(*)(*(+(*)(*)(*)(*)(*))(+(*)(*)(*)(*)(*))(+(*)(*)(*)(*(+(*)(*)(*)(*
> > uncaught exception: 404
> >
> > Help? Thanks!
> > Tom
>
> --
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/5e5849f7.1c69fb81.93987.1584SMTPIN_ADDED_MISSING%40gmr-mx.google.com.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CA%2BG3_PPA06VKCc0Wuzu%2B3H-AsPSLmZkRiy_DmR5GnghDsZ-%3DRA%40mail.gmail.com.


[racket-users] download catalog down?

2020-02-27 Thread Tom Gillespie
Hi,
I (and raco) get a 404 error when trying to access
https://download.racket-lang.org/releases/7.6/catalog/.

I'm seeing the following error on the page.

> ((uncaught-exception-handler)
   
(*(+(*)(*(+(*)(*)(*)(*)(*))(+(*)(*)(*)(*)(*))(+(*)(*)(*)(*(+(*)(*)(*)(*
uncaught exception: 404

Help? Thanks!
Tom

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CA%2BG3_PNQh4S2Ok%3DmPNkkT4vd%3DhoLHHEFyYjQMvAN5COu5VuU7w%40mail.gmail.com.


Re: [racket-users] Using the top level to fix unbound identifier

2019-08-13 Thread Tom Gillespie
It is the same error, but I think it is occurring at a different place.
Running raco macro-stepper on name-test.rkt  the original error was
happening in define-values (because format-id was not used). After making
the format-id changes it occurs during the expansion of use-name when
expanding the line macro. Therefore I don't think that putting it in #%top
will fix your problem because it is now a hygiene error. I'm not entirely
sure why it complains but it seems like it is related to 2.4 Internal
definitions from Macros that work together (
https://www.cs.utah.edu/plt/publications/jfp12-draft-fcdf.pdf), local-expand
<https://docs.racket-lang.org/reference/stxtrans.html#%28def._%28%28quote._~23~25kernel%29._local-expand%29%29>
and syntax-local-make-definition-context
<https://docs.racket-lang.org/reference/stxtrans.html#%28def._%28%28quote._~23~25kernel%29._syntax-local-make-definition-context%29%29>
seem like they might be what is needed? Best,
Tom

PS I've encountered similar issues a number of times and haven't taken the
time to figure out the right way to deal with it, so your issue is a nice
clear cut example.

On Tue, Aug 13, 2019 at 7:45 PM Jonathan Simpson  wrote:

> On Tuesday, August 13, 2019 at 10:41:33 PM UTC-4, Jonathan Simpson wrote:
>>
>> I changed the lines in named-query from
>>
>> [name (datum->syntax stx (string->symbol (syntax->datum #'magic-name)))
>> to
>> (format-id stx "~a" (syntax-e #'magic-name))
>>
>>
> Of course this should be
>
> (datum->syntax stx (string->symbol (syntax->datum #'magic-name)))
> to
> (format-id stx "~a" (syntax-e #'magic-name))
>
>
>
>> and I still get the same error. I also switched to using format-id where
>> I use the name, with no change either. Am I using this correctly?
>>
>> The format-id change is easier to read, so it is worth keeping even if it
>> doesn't solve this issue.
>>
>> -- Jonathan
>>
>> On Tuesday, August 13, 2019 at 10:10:25 PM UTC-4, Tom Gillespie wrote:
>>>
>>> Without have read this carefully, are you maybe looking for
>>> https://docs.racket-lang.org/reference/syntax-util.html#%28def._%28%28lib._racket%2Fsyntax..rkt%29._format-id%29%29?
>>> If you just pass string->symbol and then use datum->syntax you will get
>>> binding errors.
>>> Tom
>>>
>>> On Tue, Aug 13, 2019 at 7:03 PM Jonathan Simpson 
>>> wrote:
>>>
>>>> I have a bug I'm trying to fix in #lang magic(
>>>> https://github.com/jjsimpso/magic). I'm pretty sure I know what the
>>>> cause is and I know what I want to do, but I don't know how to do it. The
>>>> situation is this:
>>>>
>>>> In the following magic code, a new function(called a named query in
>>>> magic) tga-image is defined and later used inside the definition of the
>>>> function test-scope. The issue is that tga-image is an unbound identifier
>>>> in test-scope. If tga-image is used outside of a function there isn't a
>>>> problem because the syntax object passed to use has the binding. What I
>>>> would like to do is define tga-image at the top level. When test-scope is
>>>> being expanded it doesn't find the binding for tga-image and tags it with
>>>> #%top, so I think putting tga-image at the top level will solve my problem.
>>>> I also think that this is not a bad solution for my use case.
>>>>
>>>> #lang magic
>>>>
>>>>
>>>> # display tga bitmap image information
>>>> 0 name  tga-image
>>>> >2 byte <34Targa image data
>>>>
>>>>
>>>> 0 name  test-scope
>>>> >2 byte <34Test Scope
>>>> >0 use  tga-image
>>>>
>>>> After parsing, this code becomes:
>>>>
>>>> (module magic-mod magic/expander
>>>>   (magic
>>>>#f
>>>>#f
>>>>(named-query
>>>> (name-line (offset 0) (name-type "name") "tga-image")
>>>> (level)
>>>> (line (offset 2) (type (numeric "byte")) (test (numtest "<" 34)) 
>>>> (message
>>>> "Targa image data")))
>>>>(named-query
>>>> (name-line (offset 0) (name-type "name") "test-scope")
>>>> (level)
>>>> (line (offset 2) (type (numeric "byte")) (test (numtest "<" 34)) 
>>>> (message
>>>> "Test Scope"))
>>

Re: [racket-users] Using the top level to fix unbound identifier

2019-08-13 Thread Tom Gillespie
Without have read this carefully, are you maybe looking for
https://docs.racket-lang.org/reference/syntax-util.html#%28def._%28%28lib._racket%2Fsyntax..rkt%29._format-id%29%29?
If you just pass string->symbol and then use datum->syntax you will get
binding errors.
Tom

On Tue, Aug 13, 2019 at 7:03 PM Jonathan Simpson  wrote:

> I have a bug I'm trying to fix in #lang magic(
> https://github.com/jjsimpso/magic). I'm pretty sure I know what the cause
> is and I know what I want to do, but I don't know how to do it. The
> situation is this:
>
> In the following magic code, a new function(called a named query in magic)
> tga-image is defined and later used inside the definition of the function
> test-scope. The issue is that tga-image is an unbound identifier in
> test-scope. If tga-image is used outside of a function there isn't a
> problem because the syntax object passed to use has the binding. What I
> would like to do is define tga-image at the top level. When test-scope is
> being expanded it doesn't find the binding for tga-image and tags it with
> #%top, so I think putting tga-image at the top level will solve my problem.
> I also think that this is not a bad solution for my use case.
>
> #lang magic
>
>
> # display tga bitmap image information
> 0 name  tga-image
> >2 byte <34Targa image data
>
>
> 0 name  test-scope
> >2 byte <34Test Scope
> >0 use  tga-image
>
> After parsing, this code becomes:
>
> (module magic-mod magic/expander
>   (magic
>#f
>#f
>(named-query
> (name-line (offset 0) (name-type "name") "tga-image")
> (level)
> (line (offset 2) (type (numeric "byte")) (test (numtest "<" 34)) (message
> "Targa image data")))
>(named-query
> (name-line (offset 0) (name-type "name") "test-scope")
> (level)
> (line (offset 2) (type (numeric "byte")) (test (numtest "<" 34)) (message
> "Test Scope"))
> (level)
> (line (offset 0) (type (use "use")) (test (use-name "tga-image"))
>
> This is the most relevant code in my expander (I highlighted creation of
> name's binding in red):
>
> (define-syntax (named-query stx)
>   (syntax-case stx (name-line)
> [(_ (name-line (_ 0) (_ "name") magic-name))
>  (with-syntax ([name (datum->syntax stx (string->symbol
> (syntax->datum #'magic-name)))])
>#'(define name
>(lambda (new-offset) (void]
> [(_ (name-line (_ 0) (_ "name") magic-name) . rst)
>  (with-syntax ([name (datum->syntax stx (string->symbol
> (syntax->datum #'magic-name)))]
>[modified-rst (cons (datum->syntax #'rst
> always-true-line) #'rst)])
>#'(define name
>(lambda (new-offset)
>  (syntax-parameterize ([name-offset (make-rename-transformer
> #'new-offset)])
>;(printf "name: offset = ~a~n" name-offset)
>(query . modified-rst)]))
>
> (define-syntax (magic-module-begin stx)
>   (define (query? expr)
> (if (and (pair? expr)
>  (equal? (car expr) 'query))
> #t
> #f))
>   (define (named-query? expr)
> (if (and (pair? expr)
>  (equal? (car expr) 'named-query))
> #t
> #f))
>   (define (wrap-with-delimiter-print expr)
> (list 'when* expr '(printf "*** ")))
>
>   (let ([exprs (cdadr (syntax->datum stx))])
> ;(display queries)
> (let ([queries (filter query? exprs)]
>   [named-queries (filter named-query? exprs)])
>   #`(#%module-begin
>  #,@named-queries
>  (define (magic-query)
>(or #,@queries))
>  (define (magic-query-run-all)
>; any-true? creates a binding for last-level-offset which we
> probably don't want here. investigate.
>(any-true? #,@(map wrap-with-delimiter-print queries)))
>  (provide magic-query magic-query-run-all)
>
> The full code is at
> https://github.com/jjsimpso/magic/blob/master/expander.rkt.
>
> If there isn't an easy way to pass the top level syntax object into
> named-query, then I may have to do something with syntax parameters. I
> think that would be more complicated since I'm potentially defining lots of
> functions.
>
> Any help is appreciated! I thought this would be an easy one, but I've
> spent a while on it already. Hopefully there is a simple solution.
>
> -- Jonathan
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/ee664882-1dec-4bb8-b66b-bd6ee80316dc%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop 

Re: [racket-users] Directory-specific installation of packages?

2019-07-23 Thread Tom Gillespie
I have periodically investigated installing racket packages via gentoo in a
dev-racket/package way that matches how python packages are installed (a
far saner experience than any of python's native packaging tools). I always
hit roadblocks because raco wants to hit an sqlite database that is outside
the build sandbox. I usually attempt to do this via raco, but perhaps there
are other ways, which might apply in this case as well. If your colleagues
just need the compiled program and do not need the underlying code, why not
use raco exe and distribute the standalone binary? Best,
Tom

On Tue, Jul 23, 2019 at 12:17 AM Stephen De Gabrielle <
spdegabrie...@gmail.com> wrote:

> Hi James
>
> Did you have any luck with using homebrew to package and distribute your
> Racket program?
>
> I thought Bottles might be the way to go but I’m not sure:
> https://docs.brew.sh/Bottles
>
> I have two ideas
> a) add installing racket from homebrew to a bash script that launches your
> prog
> b) using the create executable function in DrRacket (or raco) to build a
> stand-alone version that can be modified to distribute via homebrew
>
> Kind regards
>
> Stephen
>
> PS I think this is a great idea that I’m sure others will use.
>
> On Mon, 22 Jul 2019  at 14:05, James Geddes 
> wrote:
>
>> Dear All,
>>
>> For reasons (explained below, possibly foolish reasons) I am trying to do
>> the following:
>>
>> 1. Have `raco pkg install` install a package X to a specific directory,
>> including, in the same directory, all of the dependencies of X, but
>> excluding those dependencies that are already present in the current
>> installation's collections; and
>>
>> 2. Have `raco exe myprok.rkt` look in that custom directory for `(require
>> X)`?
>>
>> I tried the `--scope-dir` option to `raco pkg install` but that installed
>> what looks like the entire racket standard library (see below).
>>
>> Many thanks,
>>
>> James
>>
>>
>>
>> PS. What I'm /really/ trying to do is distribute a little command-line
>> programme that I wrote in Racket to my colleagues using the homebrew
>> package manager. My programme depends on the gregor library.
>>
>> Most of my colleagues don't have Racket. Homebrew likes to compile from
>> source, so I will need to have homebrew download the dependencies I need
>> for compilation. But now, homebrew really doesn't like you to write outside
>> a very small set of directories during the installation process, and those
>> don't appear to include the standard Racket collections directories.
>>
>> (I could well have misunderstood this. I don't understand at all how
>> homebrew interacts with language-specific package managers like raco, pip,
>> cabal, and so on. My sense is that the non-raco ones install dependencies
>> in project-specific directories and I suspect homebrew has specific support
>> for Python libraries.)
>>
>> Anyway, my program depends on the gregor library, so I tried this:
>>
>> $ raco pkg install --scope-dir tmp gregor-lib
>>
>> $ ls tmp
>>
>> 2d-lib pict-doc
>> at-exp-lib pict-lib
>> base   pict-snip-lib
>> cext-lib   pkgs.rktd
>> class-iop-lib  plai-lib
>> cldr-bcp47 planet-doc
>> :
>> [ ~100 rows omitted]
>> :
>> net-docweb-server-doc
>> net-libweb-server-lib
>> option-contract-libwxme-lib
>> parser-tools-doc   xrepl
>> parser-tools-lib   xrepl-doc
>> pconvert-lib   xrepl-lib
>> pict   zo-lib
>>
>>
>>
>>
>>
>>
>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/racket-users/2C6D9102-2F63-4A0E-A033-C7FECC5F9CF8%40gmail.com
>> .
>>
> --
> 
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CAGHj7-%2BqQLRNVf3_EntEsyS8uYofgHo3DMz_%2B0WdFMuN7uk0cw%40mail.gmail.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CA%2BG3_PMrh%3D%2BJhYgxoy9nm5%3DhUFpw7GhYxbNC5qovvWt3xZa%2B9g%40mail.gmail.com.


Re: [racket-users] The case, and a proposal, for elegant syntax in #lang racket2

2019-07-18 Thread Tom Gillespie
Apologies for the long mail. I wanted to get
these thoughts out now while they are fresh.
Tom

Can Racket make semantics a matter of syntax?
If it can, can it produce errors when certain
syntactic forms are incompatible with the
specified semantics? Can all forms in the
language be mapped to all runtime features
such that each form can be marked as compatible
or incompatible with each feature?

#+proper-tail-calls
#+continuations
#+delimited-contiuations
#+unwind-protect
#+strong-static-types
#+event-loop
#+interpreted-same-as-compiled
#+jit
#+c-preprocessor-style-macros

I was revisiting slib today.
I tried to port it about 3 years ago, and had had no success.

Does LOP work?
This is an academic question.
Can we convince new, untrained folk, to use LOP?
This is a promulgation question.

I think that one powerful argument in favor of LOP would be to use
the Racket ecosystem to implement and support the entire history of
scheme programs.

This demonstration would be a feat that to my knowledge no other programming
environment has ever been able to achieve.

Schemes are notorious for their ... creative extension of standards.
If Racket can demonstrate and provide a practical solution for taking
random scheme code (e.g. by adding #lang r4rs as the first line of a file),
and having the semantics just work, then that would be game changing
beyond the wildest dreams of even the most cynical academics. This
couldn't happen without a monumental effort to provide facilities for
capturing language semantics in a meaningful way beyond simple syntax.

This thread started as syntax, but the quote from Matthias during
the introduction to Racket School seems quite relevant. The real
prize here is not in creating the greatest syntax ever known to humanity [0]
but in the mapping between syntax and semantics. Of the many goals that
Racket2 could pursue, this seems like the one that could have the most
lasting impact. Leave the syntax to #lang algo-me-harder. Syntax can
devolve in a political issue, and in the happy realm of Turing completeness
everyone can have whatever they want as far as syntax is concerned.
You can have all the unicode delimiters you want, I just need my λ.
The real challenge (it seems) is to provide a tool that makes it
possible to translate the semantics of one language to another in
a way that is consistent, understandable, and ideally, performant.
(If it is not performant, then an even greater prize would be to
be able to show which syntactic feature was missing performant
semantic support in the offending runtime.)

It seems to me that Matthew has paved the way for this. The differences in
semantics between Chez Scheme and Racket and Matthew's solutions provide
solid examples for future semantic extensions to Racket. They also provide
a taxonomy of the kinds of changes that would need to be made other runtimes
to support a performant implementation of Racket's syntax.

I can appreciate why Matthew might like to consider alternate direction
after having spent the last 2 years working on performance optimizations
and semantics translation. However, I wonder whether the knowledge gained
as a result is equally valuable. Could it be implemented into Racket
itself? Said another way, can we have #lang common-lisp with all the
syntax, working as a Lisp-2, and have a performant implementation of
unwind-protect that can be used in `#lang r4rs with-extended-semantics`?
Even if we couldn't do this, could Racket be the place where we can
prove (by virtue of the machinery that it provides) that continuations
and unwind-protect are incompatible at a fundamental level? Matthew's
work also means that a solution to this problem might also look like
a page in the documentation which provides a comprehensive overview of
which runtimes provide performant and correct implementations of certain
language features, allowing users to choose their runtime to fit their
needs.

>From a practical standpoint, writing new code almost seems silly when
you can burgle libraries that have had man centuries of development
put into them by writing the translation layer for the semantics --
especially if we get Racket's support for locating bugs by way of syntax
objects.

This vision for Racket2 is beyond pie in the sky, and perhaps a departure
for the usual vision for LOP, but I wonder whether Racket is now ideally
poised to act as the bridge for the infinite and as yet unimagined syntaxes
of the future and the enormous variety of existing runtimes.

I consider it a mark of the maturity of the community that leadership is
planning how to manage the community politics around the next phase of
the language, well in advance of any transition. However, I can't help
but wonder whether there are goals that we all agree on that would avoid
the need for a political process altogether. Maybe the objective of the
political process should be just that -- to find a direction which obviates
the need for said process.

---

[0] The idea that there 

Re: [racket-users] The case, and a proposal, for elegant syntax in #lang racket2

2019-07-18 Thread Tom Gillespie
I was going to mention that common lisp has a notion of return arity, and
that certain functions can return zero results. I didn't realize that
(values) also worked in racket. Zero return arity has some nasty
consquences in existing systems. Both racket and guile barf on expressions
like (eq? (values) (values)) and like NaN results with zero arity should
probably always not be equal. Without having any idea of the actual state
of the art, I would guess that type systems can handle zero arity returns
but would guess that there may be some implementation overhead. This seems
related to the question: How do you detect that 'nothing' has happened (re:
to why do analog clocks start at 12)? Unlike nearly every other language I
have ever encountered Racket supports pretty much all of the possible
solutions, with (values), (void), and (null)/'(). In principle this means
that we can choose whichever solution works best for our use case, but
leaves open the question of how the default choice of (void) as well as the
diversity of options impacts code quality, readability, and terseness. I'm
sure someone has done a study on that but a quick search produced nothing
obvious. I also expect that some of the long time members of the community
could also provide some insight into the design decisions to include an
explicit representation of void in the language (seems to have happened
some time back in 2005). If I had to guess, having an explicit
representation makes the language more homogeneous since you aren't forced
to check whether a result has zero return values every single time but
instead can simply check whether the value returned is void (in a strict
sense it is impossible to test the equality of something with nothing, in
line with the NaN example before -- there isn't even a register with a
value in it for (values)). Would love to hear from those with more
knowledge of the history here.
Tom


On Wed, Jul 17, 2019 at 11:16 PM Sorawee Porncharoenwase <
sorawee.pw...@gmail.com> wrote:

> The other thing I'd like to see would be the option to return nothing.
>> Not #, '(), or #f.  Nothing.  It's useful e.g. when you want to
>> simultaneously transform and filter a list.
>>
>
> Would (values) satisfy your criteria?
>
> #lang racket
>
> (define (my-filter-map proc xs)
>   (match xs
> ['() '()]
> [(cons x xs)
>  (call-with-values
>   (thunk (proc x))
>   (case-lambda
> [() (my-filter-map proc xs)]
> [(x) (cons x (my-filter-map proc xs))]))]))
>
> (my-filter-map (λ (x) (if (odd? x) (values) (add1 x))) '(1 2 3 4)) ;=> '(3 5)
>
> One thing I don’t like about it is that zero values (and multiple values
> in general) are really unwieldy to work with and doesn’t compose well with
> the rest of Racket. You can for example translate v >>= f in Haskell to
> just (and v (f v)) in Racket. But trying to do the same thing with zero
> values is a headache.
>
>>
>> On Wed, Jul 17, 2019 at 11:50 PM Daniel Prager 
>> wrote:
>>
>>> I'm confused on one point.
>>>
>>> Why would a new canonical notation be preferable to, say, also fully
>>> supporting an alternative general notation (like Shriram's p4p, or a
>>> derivative thereof) or even multiple notations in addition to retaining
>>> good old s-expressions?
>>>
>>> The idea would be that you could transform freely and readably between
>>> alternative notations, enabling round-tripping without degradation.
>>>
>>> I imagine that effectively providing tooling, syntax-extension, good
>>> error messages, and documentation across multiple notations would be (ahem)
>>> challenging, but so long as we're dreaming big ...
>>>
>>>
>>> Dan
>>>
>>> --
>>> 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.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/racket-users/CAFKxZVV-njHNCCLDP-RsDq%2BjbXrOGpOnaEp9Ob4ugTbdtmckAw%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/racket-users/CAE8gKodKrWNeL3tJQ5uO4X64jKzBVmYY2P9BgLsd%3Dqh8bhSQyw%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the 

Re: [racket-users] The search for routy

2019-06-14 Thread Tom Gillespie
https://github.com/Junker/routy found via `racket routy git` seems right?

On Thu, Jun 13, 2019 at 11:56 PM Gregor Kopp  wrote:

> Hi!
> I found here docs: https://docs.racket-lang.org/routy/
> I'd like to try this for fast prototyping, but can't find the package as
> my google-fu is sloppy I guess.
> Any help please, sirs and madams?
>
> Thank you, Gregor
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/df56c1d0-7626-4284-bb77-089af462dacf%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CA%2BG3_PPNzm2qE%2BnoUQP%2BsSyJ8dByiWPWC9WWhAMSOx9J83c_Vw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Haskell

2019-05-14 Thread Tom Gillespie
Hackett  comes to mind, but that
might be going in the opposite direction of what you are thinking.

On Tue, May 14, 2019 at 11:40 AM 'John Clements' via Racket Users <
racket-users@googlegroups.com> wrote:

> Hmm… While I certainly agree that functional languages are good at
> manipulating program representations, this job (manipulating programs) is
> more or less *the one thing* that Racket does better than any other
> language. So… I guess I’d be more likely to use Racket to manipulate
> Haskell programs than vice versa. Of course, your mileage may vary… :)
>
> John Clements
>
>
> > On May 14, 2019, at 8:23 AM, Josh Rubin  wrote:
> >
> > It just occurred to me that Haskell could be a powerful way to
> manipulate programs in other languages (like Scheme or Racket).
> Unfortunately, I don't know Haskell. Has anybody been down this path?
> > --
> > Josh Rubin
> >
> > jlru...@gmail.com
> >
> >
> >
> >
> >
> > --
> > 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.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/d2961559-f8af-c6d0-15e1-9c20b3dab959%40gmail.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/a2d3bd9a-5057-4c36-aa52-0862ad103a0b%40mtasv.net
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CA%2BG3_PPT2PDAw9CE_QvRnsjKnJ29xRrNNoVEMnJkjD2PPo00Aw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] vi-mode for racket cli

2019-04-15 Thread Tom Gillespie
I'm not sure if this will fix your vi-mode issues, but here is some info on
the readline situation. You should be able to get readline support by
installing readline-gpl via `raco pkg install readline-gpl` (as the name
suggests it was removed from core racket due to gpl compatibility
concerns).  Some additional info in the docs
, with an additional note
that `racket -il xrepl` is another way to start racket with readline
support (once you have readline-gpl installed). Best!
Tom


On Mon, Apr 15, 2019 at 1:20 AM Marc Kaufmann 
wrote:

> Hi all,
>
> I use vi-mode in the cli and in all the repls that use readline. Racket's
> repl does not use readline for reading. Is there a way to get vi-mode going
> anyway, either by wrapping readline around first or something else? And if
> it's possible, would this require switching off something else that is
> really important to have in the REPL?
>
> I hope someone else figured this one out before.
>
> Cheers,
> Marc
>
> --
> 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/optout.
>

-- 
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/optout.


Re: [racket-users] Error location in test submodules

2019-04-05 Thread Tom Gillespie
Hi Greg,
Thank you for the very detailed explanation. I was also very much not
my intention to belittle racket-mode and I will evoke my "yes indeed my
knowledge was quite incomplete." I have learned many very useful things
from this thread (C-u C-c C-c is a reminder that stopping by the manual is
usually surprisingly productive in all parts of the racket world)! As you
suggest, I'm also fairly certain that some of my issues came from me
writing my own macros and stripping the loc without realizing what I was
doing (syntax vs syntax/loc was on the list of things to contribute to the
docs but has now been bumped up). I wonder if there is a way to indicate
that the source location of a piece of code has been stripped and warn the
user about it and whether that would result in a blizzard of warnings or
whether it might be useful for indicating a potential source of missing
debug information (a hard problem).

Best!
Tom

PS Extra major thank you for all your work on racket-mode I find myself
missing many of its features whenever I have to work in another language or
editor!

On Thu, Apr 4, 2019 at 8:48 PM Greg Hendershott 
wrote:

> > Are you using emacs racket-mode? I have experience this issue only in
> that mode since it does not (to my knowledge) implement all the error
> anchoring features of DrRacket.
>
> It might just be that you have DrRacket set to user a higher
> errortrace level than racket-mode?
>
> That is, in DrR, Language | Choose Language | Dynamic Properties, you
> may have chosen one of the "Debugging"  radio buttons and checked
> "Preserve stack trace".
>
> In racket-mode, the equivalent is the `racket-error-context` variable:
>
>
> https://github.com/greghendershott/racket-mode/blob/master/Reference.md#racket-error-context
>
> If you have it set to 'low or 'medium, you might not get as much error
> context as with 'high (just like if you had "weaker" options in that
> DrR dialog box, DrR wouldn't show you as good error context).
>
> As Eric notes, you can leave this set to 'low or 'medium, and do C-u
> C-c C-c to re-reun with it temporarily set to 'high. This can be a
> nice way to get the best of both worlds: Normally things build and run
> faster (errortrace can be slow). If you experience an error, and the
> message isn't ideal, you can C-u C-c C-c.
>
>
> Finally, racket-repl-mode tries to notice Racket error messages in the
> output and "linkify" them. You can click them with the mouse, or use
> the standard M-x next-error (often bound to C-x `) to go to the error
> location. This works with rackunit failures as well as errors.
>
> Of course, it helps if the error file is /path/to/foo.rkt instead of
> foo.rkt. Sometimes Racket tries to be helpful and abbreviate long
> pathnames to be . racket-mode tries to defeat this abbreviation
> so go-to-error can work. :)
>
> Also, some macros don't do the ideal thing -- i.e. don't use e.g.
> syntax/loc or quasisyntax/loc -- and the error location is inside the
> macro when it might make more sense for it to be the macro use site.
> There's not much racket-mode can do about that, AFAICT.
>
>
> p.s. I didn't feel like you were dissing racket-mode, so I hope the
> above doesn't sound defensive. I want to explain what it attempts to
> do. I dogfood it heavily and I don't like it to annoy me. :)  However
> I know it's far from perfect.  Also there are sometimes long stretches
> where I have to be mostly just another user of racket-mode for $WORK,
> and can't really detour to work on racket-mode much. Fortunately there
> are other people who help contribute fixes and improvements (although
> sometimes I get so busy I can barely keep up with their offered help,
> and feel doubly guilty).
>

-- 
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/optout.


Re: [racket-users] project idea: drracket notebook mode

2018-12-26 Thread Tom Gillespie
Neil mentioned Ryan's work on this in the thread about hacker news. There 
are a number of issues with getting jupyter to play nicely with #langs some 
of which I have submitted a pr for, but my solution is partial and very 
suboptimal. A drracket-like solution, even just for kernels is likely not 
trivial. Matthew Butterick and Jay came up with a solution for embedding 
languages that uses #lang at-exp which might point a way to a potential 
solution, but might be barking up the wrong tree. As a side note the 
jupyter ecosystem is in the middle of transitioning from notebook to lab 
and last time I checked there seem to have been breaking changes which 
caused iracket to fail, though that my just have been on my setup.
Tom

On Thursday, December 27, 2018 at 12:53:13 AM UTC-5, Andrew Gwozdziewycz 
wrote:
>
> It seems like the better bang for buck might be implementing a Jupyter 
> kernel, and leveraging that ecosystem.
>
> https://github.com/jupyter/jupyter/wiki/Jupyter-kernels
>
> On Dec 20, 2018, at 02:46, Neil Van Dyke  > wrote:
>
> If anyone is looking to avoid relatives over the winter holiday season, 
> here's an idea for a big feature to add to DrRacket (which I really wish I 
> could do myself right now)...
>
> If you've not seen a "notebook" interface, like in Jupyter Notebook and 
> some other data science-oriented tools, one way to look at it is like a 
> literate programming REPL that can be edited, stored to a file, and 
> loaded.  You can also share these notebooks with others, or generate 
> formats like HTML or Markdown (such as for blog posts).
>
> The notebook is a document that's a sequence of text cells and code cells, 
> and the code cells include the output (e.g., expression results, displayed 
> plots) from the last time the code cell was evaluated (if it was).  Each 
> code cell also displays a small serial number that indicates in what order 
> it was last evaluated (if it has been), which is not necessarily the 
> top-to-bottom order of the document while you're working with it.  Of 
> course, you can clear this code evaluation and output at any time, and 
> cause all the code cells to be evaluated in-order.
>
> IIRC, DrRacket emphasizes the Definitions window over the Interactions 
> window (aka REPL), to reduce confusion for students.  I think the confusion 
> level of the Notebook interface is somewhere between that of Definitions 
> window and a REPL.  So the notebook interface might not be good for new 
> students, unless they're already comfortable with the notebook interface 
> from other classes.
>
> Implementation-wise... the people here who built DrRacket can correct me 
> or say more about this, but it seems DrRacket implementation might already 
> include most of the difficult work of implementing a notebook interface.  
> The evaluation engine is there, and there's UI for snips in the Interaction 
> window, and UI for embedding blocks of other formats in the Definitions 
> window.  Maybe combine/adapt that in a new Notebook window, or implement 
> this as features of the Definitions window.  Then you can decide whether to 
> also implement the JSON save format of Jupyter Notebook, for possible later 
> interoperation.  And other things after that, like in-buffer Markdown or 
> Scribble rendering of text cells.
>
> -- 
> 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...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
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/optout.


[racket-users] Re: What is the best way to daemonize a Racket program on linux?

2018-11-28 Thread Tom Gillespie
If you're not into 
systemd https://gist.github.com/tgbugs/c2990382b3fdfef86a2a3a1bc0516099 is 
an example of an openrc init script that I use to daemonize a servlet 
(running behind nginx) which is an echo server that responds with the ip of 
the requester and that is initialized like this:
(serve/servlet main
 #:port 4000
 #:servlet-path server-base-path
 #:server-root-path "/dev/null"
 #:servlet-regexp #rx""
 #:servlet-responder responder  ; prevent stack trace from 
leaking
 #:file-not-found-responder 404-responder
 #:stateless? #t
 #:banner? #f
 #:launch-browser? #f
 #:command-line? #t)


On Wednesday, November 28, 2018 at 6:56:25 PM UTC-8, Brian Adkins wrote:
>
> I briefly looked at the daemonize package on Ubuntu linux, but couldn't 
> get it to work properly. I found the following Rosetta Code page:
>
> https://rosettacode.org/wiki/Run_as_a_daemon_or_service#Racket
>
> So, I just tried the code in that example, and it seems to work fine:
>
> (module+ main
> * ((get-ffi-obj 'daemon #f (_fun _int _int -> _int)) 0 0)*
>  (serve/servlet
>   dispatcher
>   #:log-file "hello.log"
>   #:stateless? #t
>   #:port 6995
>   #:command-line? #t
>   #:file-not-found-responder not-found
>   #:launch-browser? #f
>   #:servlet-regexp #rx""))
>
> I'm just wondering if there is a better way to accomplish this since it 
> feels a bit kludgy to me.
>
> Thanks,
> Brian
>
>

-- 
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/optout.


Re: [racket-users] distributed computation support for handin-server?

2018-10-25 Thread Tom Gillespie
That is inviting the students with a more hackerish mentality to find ...
alternative ways of scoring points. Probably better to not even entice them
with the possibility, given the bureaucratic headaches that it could cause.
Tom

On Wed, Oct 24, 2018 at 11:11 PM 'John Clements' via Racket Users <
racket-users@googlegroups.com> wrote:

> Another random thought; has anyone thought of pushing this out to the
> student computer, by supplying students with a hopefully-opaque executable
> that runs the tests on a student program and then outputs a digitally
> signed test result?
>
> John
>
>
> > On Oct 23, 2018, at 21:50, Greg Hendershott 
> wrote:
> >
> > Have you considered some sort of yield-management incentive, such as
> > offering a higher grade to students who submit during less-busy
> > periods? :P
> >
> >
> > Although I don't know anything about the handin server, or very much
> > about load-balancing, just riffing:
> >
> > A simple round-robin HTTP proxy probably won't maximize processor
> > utilization. Maybe that doesn't matter. If it matters, I might start
> > with a single HTTP server that puts jobs in a queue, and let dedicated
> > racket-process-per-cpu processes pull them out one by one.
> >
> > I might try just using the filesystem for the queue. Something like:
> > Handin jobs are saved to files under a "to-do" dir. Workers claim jobs
> > by renaming a files into an "underway" dir, one"), and later clean
> > delete that and plop a result file into a "done" dir. The HTTP server
> > watches that, sends the response. (You could instead use a "real"
> > database, or even a whole messaging system. But this might be one of
> > those cases where the filesystem is the least-worst choice.)
>
>
>
> --
> 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/optout.
>

-- 
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/optout.


Re: [racket-users] Racket-on-Chez snapshots

2018-10-01 Thread Tom Gillespie
If by lately you mean any time in 2018 there is Matthew's report from back
in January.
https://blog.racket-lang.org/2018/01/racket-on-chez-status.html
http://www.cs.utah.edu/~mflatt/racket-on-chez-jan-2018/
If you are feeling adventurous you can also build it from source
https://github.com/racket/racket/blob/master/Makefile#L245.

On Mon, Oct 1, 2018 at 11:07 AM, Brett Gilio  wrote:

>
> Philip McGrath writes:
>
>> In light of
>> the promising outlook for Chez replacing the current Racket VM in the
>>
>
> -Philip
>>
>
>
> Hey, could you provide a resource with more information on Chez possibly
> replacing the Racket VM? I haven't been keeping up to date on this.
>
> --
> Brett M. Gilio
> Free Software Foundation, Member
> https://gnu.org/software/guix | https://emacs.org
>
>
> --
> 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/optout.
>

-- 
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/optout.


[racket-users] Re: Upgrading Racket

2018-09-28 Thread Tom Gillespie
The compiled versions of all your modules are stale. One way to fix this is 
to run  `raco setup`. On my 
system I have to run it as root, but you may be able to run it as the user 
that installed Racket.

On Friday, September 28, 2018 at 5:49:21 PM UTC-7, James wrote:
>
> I just tried upgrading to Racket 7 on one of my machines (macOS 10.11.6) 
> and I get the error shown below in DrRacket.  I thought I should mention it 
> since I am probably not the only one.  I installed with the obvious method, 
> which is to just drag the new Racket folder over to applications as it 
> indicates in the disk image.  Did I miss some standard set of instructions 
> for upgrading?  This happens any time I try to run something from DrRacket. 
>
> read (compiled): wrong version for compiled code 
>   compiled version: 6.10 
>   expected version: 7.0 
>   in: rkt/compiled/main_rkt.zo 
>
> James

-- 
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/optout.


[racket-users] Where to start in DrRacket to support highlighting for Syntax Warnings?

2018-09-14 Thread Tom Gillespie
Hi all,
The language I'm developing has a strong use case for syntax warnings 
 for reporting cases of missing 
information (aka optional syntactic elements) to the user. I have done a 
first pass integration, and after reading Jack Firth's slides 
 (which end by suggesting 
DrRacket integration) I set out to complete the task. However after mucking 
about in the DrRacket source code for a while I have been unable to figure 
out the right place to hook in to provide DrRacket with the syntax location 
information (pretending that the warnings are errors for the purposes of 
display). Can someone point me in the right direction to get started? Many 
thanks!
Tom

-- 
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/optout.


[racket-users] Re: Modify Scribble HTML for integration with site

2018-08-19 Thread Tom Gillespie
I'm not sure if this is exactly what you are looking for, but it is 
possible to use style [0] along with xexpr-property [1] and cdata [2] to 
augment the html inside a scribble doc see [3]. I have only tested this 
inside of scribble/core, not in scribble directly, but I don't see why you 
wouldn't be able to set the style on a block of text in a #lang scribble 
document. Here 
(https://github.com/tgbugs/protc/blob/master/protc-tools-lib/protc/export.rkt#L229-L271)
 
is an example of defining form and input for writing html forms. Best,
Tom

0. 
https://docs.racket-lang.org/scribble/core.html?q=style#%28def._%28%28lib._scribble%2Fcore..rkt%29._style%29%29
1. 
https://docs.racket-lang.org/scribble/core.html?q=xexpr-property#%28def._%28%28lib._scribble%2Fhtml-properties..rkt%29._xexpr-property%29%29
2. 
https://docs.racket-lang.org/xml/index.html?q=cdata#%28def._%28%28lib._xml%2Fmain..rkt%29._cdata%29%29
3. https://docs.racket-lang.org/scribble/extra-style.html?q=style

On Monday, August 13, 2018 at 9:14:18 AM UTC-7, Joel Dueck wrote:
>
> I would like to include some scribble/manual docs as part of a larger web 
> site, and would like to provide some extra navigation links for the reader 
> so they can see “how to get back out again”.
>
> Is there a facility within Scribble for augmenting the HTML just after the 
> beginning of the  tag?
>
> I see there are ways to supplement the CSS and the content of . I 
> can also specify a prefix file but when targeting HTML it seems this is 
> only used for the doctype and nothing else. I've done a bunch of searching, 
> can’t see that this has ever come up before!
>
> If nothing else I have the option of displaying the Scribble pages within 
> an iframe, but I'd prefer not to do this.
>

-- 
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/optout.