[racket-users] Re: Racket + Graphviz

2019-08-01 Thread Ryan Kramer
This looks interesting! I have thought about trying to generate Entity 
Relationship diagrams given a database schema, but assumed that laying out 
the boxes would be a hard problem. Looks like GraphViz might do a decent 
job at this. I'll try it out and let you know how it goes.

-- 
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/9566c624-74ce-4e8d-a332-00fc5b582ba4%40googlegroups.com.


Re: [racket-users] Re: Racket + Graphviz

2019-08-01 Thread Hadi Moshayedi
On Thu, Aug 1, 2019 at 12:23 PM Ryan Kramer 
wrote:

> This looks interesting! I have thought about trying to generate Entity
> Relationship diagrams given a database schema, but assumed that laying out
> the boxes would be a hard problem. Looks like GraphViz might do a decent
> job at this. I'll try it out and let you know how it goes.
>

Yesterday I learnt that also PlantUML can be used using stdin/stdout
interface and it can generate SVG, which can be converted to Pict using
rsvg. I was thinking spending some time on trying to have some kind of
Racket library for that too. It might be a better tool for generating ER
diagrams. See http://plantuml.com/ie-diagram

-- Hadi

-- 
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/CAK%3D1%3DWq_MFLn4tHrfCWYGyC1qGdvYKGS7C_CxBy7Z4Zxfto4Pg%40mail.gmail.com.


Re: [racket-users] [standard-fish] Reverse engineered quilt design

2019-08-01 Thread Daniel Prager
Hi Stephen

What specifically would you like to hear more about?


Cheers

Dan

On Thu., 1 Aug. 2019, 00:39 Stephen De Gabrielle, 
wrote:

> Hi Daniel
>
> On Wed, 31 Jul 2019 at 14:16, Daniel Prager 
> wrote:
>
>> On Wed, Jul 31, 2019 at 6:28 PM Stephen De Gabrielle <
>> spdegabrie...@gmail.com> wrote:
>>
>>> Wow.
>>>
>>
>> Thanks Stephen, and good on you for this fun competition!
>>
> :)
>
>
>> It's been almost 5 years since RacketCon 2014, where I talked about
>> youpatch.com, still up and running, BTW.
>>
> TBH. I’d like to hear more about it.
>
>>
>> https://www.youtube.com/watch?v=8psnTEjYIEA
>>
>> I've done some other experiments subsequently, and may one day develop a 
>> *#lang
>> quilt*, but have been diverted by other stuff lately.
>>
>
> That sounds like an idea for another competition. I wonder how people feel
> about hats?
>
>
>
>> 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/CAFKxZVXb1rH2g8brH%2BK6fh7QW6ZTT%3D_-gB__1-1NHqpqNPz_RQ%40mail.gmail.com.


Re: [racket-users] [standard-fish] Reverse engineered quilt design

2019-08-01 Thread Stephen De Gabrielle
How your use of racket has evolved over the past 5 years
* how you handled the changes to racket in that time 
* what was good (and bad) about using Racket

in general what has changed since that presentation?

Stephen



On Thursday, August 1, 2019 at 10:03:19 AM UTC+1, Daniel Prager wrote:
>
> Hi Stephen
>
> What specifically would you like to hear more about?
>
>
> Cheers
>
> Dan
>
> On Thu., 1 Aug. 2019, 00:39 Stephen De Gabrielle,  > wrote:
>
>> Hi Daniel
>>
>> On Wed, 31 Jul 2019 at 14:16, Daniel Prager > > wrote:
>>
>>> On Wed, Jul 31, 2019 at 6:28 PM Stephen De Gabrielle <
>>> spdega...@gmail.com > wrote:
>>>
 Wow. 

>>>
>>> Thanks Stephen, and good on you for this fun competition!
>>>
>> :)
>>
>>
>>> It's been almost 5 years since RacketCon 2014, where I talked about 
>>> youpatch.com, still up and running, BTW.
>>>
>> TBH. I’d like to hear more about it.
>>
>>>
>>> https://www.youtube.com/watch?v=8psnTEjYIEA
>>>
>>> I've done some other experiments subsequently, and may one day develop a 
>>> *#lang 
>>> quilt*, but have been diverted by other stuff lately.
>>>
>>
>> That sounds like an idea for another competition. I wonder how people 
>> feel about hats?
>>
>>
>>
>>> 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/52dd3fc0-1bcb-4649-8c43-ae566db0999e%40googlegroups.com.


Re: [racket-users] Symex: a DSL for symbolic expressions

2019-08-01 Thread Hendrik Boom
On Wed, Jul 31, 2019 at 06:40:05PM -0400, Neil Van Dyke wrote:
> 
> For structured editing related work in sexp, of course there's Emacs
> structural operations that have been in there forever (not well-known,

Certainly not well known.
I've been using emacs for decades, and I never heard of them.
What are they?  Do you have a ilnk to their documentation?

-- 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/20190801103655.3cwjoqc3ahdqj4ci%40topoi.pooq.com.


Re: [racket-users] Re: Racket + Graphviz

2019-08-01 Thread Neil Van Dyke

Hadi Moshayedi wrote on 8/1/19 4:14 PM:
On Thu, Aug 1, 2019 at 12:23 PM Ryan Kramer > wrote:


This looks interesting! I have thought about trying to generate
Entity Relationship diagrams given a database schema, but assumed
that laying out the boxes would be a hard problem. Looks like
GraphViz might do a decent job at this. I'll try it out and let
you know how it goes.

Yesterday I learnt that also PlantUML can be used using stdin/stdout 
interface and it can generate SVG, which can be converted to Pict 
using rsvg. I was thinking spending some time on trying to have some 
kind of Racket library for that too. It might be a better tool for 
generating ER diagrams. See http://plantuml.com/ie-diagram


I tend to use UML's notation for "static object modeling" when doing 
what's essentially entity-relationship modeling.  (There's other UML 
models, but usually people just mean the main diagram, and often just to 
show only attributes and inheritance and nothing else.  Few people might 
do rigorous state modeling, protocol event traces, etc.)


Your DB schema is relational?  If you're willing to represent DB 
relational tables and columns as UML classes with attributes, the UML 
notation might be more compact and understandable than an ER one you'd 
use, but you have to decide how much of the DB semantics you want to 
represent, and how.  For example, if you want to talk about DB joins you 
use, you might just use only attribute annotations for candidate keys, 
*or* you might use much more visual UML associations that are in 
addition to the attributes.  (For target implementations *without* joins 
like that, you'd probably instead use association roles, without 
attributes at all, and indicate navigability directions of the 
associations.)


Regarding laying out the boxes, that particular UML notation might be 
modeled as a constraint satisfaction problem, but it's a tricky one.[1]  
For example, in practice, you might usually want your generalization 
associations to have a high priority for super being above sub, usually 
less so for aggregation assemblies, link attributes (if you have those) 
tending to come off a horizontal edge, etc.  Then you get into things 
like edge routing for reducing crossings and bends, while still spacing 
out your vertices, plus the various adornments on edges that complicate 
things.  And maybe you want stability of layout between changes to also 
be a factor... One of the several methodologists' camps that went into 
UML (and from which that particular UML notation largely came), Rumbaugh 
et al.'s OMT, developed an interactive diagramming tool that was more 
limited than real CASE systems, but did the best job of constraint-based 
interactive editing that I'd seen (but not enough constraints to do 
automatic layout): OMTool, from a GE lab.[2]


[1] For a similar visual language, my industry R group once hired a 
very smart PhD student in computational geometry graph drawing to tackle 
it, and they made some progress, but it still wasn't entirely a solved 
problem afterwards.


[2]  Racket aside: I actually used OMTool, until I no longer had access 
to it, and kludged up a simple but practical Java generator/updater for 
it, "https://www.neilvandyke.org/jomtool/;. You'll notice Jomtool was 
written in Emacs Lisp, rather than Java, even though I was an early Java 
expert and advocate, and working in Java.  When I went looking for a new 
platform for rapid R work, especially in PL and symbolic Web 
processing, I admitted that a Lisp was more productive than my beloved 
Java for many things, and I ended up choosing Scheme.  Even though 
Scheme didn't have basic OO features, and I'd been working very heavily 
in OO architecture/design/OOP/methodology, and had been invited to be on 
a UML committee -- it still looked like a win.  Scheme turned out to be 
a good choice for those R purposes, but industry is a much longer and 
more complicated story, and there are disruption opportunities close on 
the horizon.


--
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/f36020f9-acbd-d126-3013-ebe8eb2655af%40neilvandyke.org.


Re: [racket-users] Symex: a DSL for symbolic expressions

2019-08-01 Thread Siddhartha Kasivajhula
>
> > generalization of modal user interfaces that has a "language-oriented
> > programming" flavor.
> Applying traditionally-sexp structural-based editing to non-sexp
> languages seems relevant to non-sexp Racket2 syntax (e.g., Honu), and
> other non-sexp languages.


The generalization I'm referring to there is actually about Vim-style modal
interfaces -- a totally separate idea unrelated to language syntax. The
generalization you're talking about is intriguing as well, and I recently
learned about this library 
which could probably be leveraged to get language-agnostic structural
editing.

There was also some work on DrRacket (nee DrScheme):
> http://www.cs.brown.edu/research/plt/software/divascheme/


Divascheme looks great! The interface in symex.el is really similar to it,
as a matter of fact (which may be because they are both similar to Vim...).
If there are any features here that you miss and would like to see in
Emacs, I'm happy to look into adding it to symex since it seems like they
have a similar conceptual approach.

In addition to deriving structural editing from language descriptions,
> there's also opportunity for DSL/macros/learning additional
> language-sensitive structural transformations (I couldn't see whether
> symex.el tackles these).


Not at the moment. Symex operates at the syntactic level of the code and
not the semantic level, so only syntactic transformations are possible for
now. Xah Lee (a prolific and occasionally iconoclastic Emacs blogger) also
talks about some semantic-level transformations here
 -- it would be
great to have such functionality at some point, and again, maybe
tree-sitter or LSP  can help with this.




On Thu, Aug 1, 2019 at 3:37 AM Hendrik Boom  wrote:

> On Wed, Jul 31, 2019 at 06:40:05PM -0400, Neil Van Dyke wrote:
> >
> > For structured editing related work in sexp, of course there's Emacs
> > structural operations that have been in there forever (not well-known,
>
> Certainly not well known.
> I've been using emacs for decades, and I never heard of them.
> What are they?  Do you have a ilnk to their documentation?
>
> -- 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/20190801103655.3cwjoqc3ahdqj4ci%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/CACQBWF%3DkwvQ2Mqeq%2B9k9t3mf9ZUKk-oshoCS%3DgaeTZYiq3A5GQ%40mail.gmail.com.


Re: [racket-users] Unwelcome surprises using Scribble on a 90,000-word novel

2019-08-01 Thread Robby Findler
On Thu, Aug 1, 2019 at 12:54 PM Hendrik Boom  wrote:
> At present, @include-section invokes require.  Does it need to?  Does
> it actually export identifiers to the invoking scribble file?  Or is
> this just a convenient way of getting it to process the #lang line and
> treat the included file with scribble (or, I suppose, other) syntax and
> semantics?

Each #lang scribble/base (or other scribble languages) program turns
into a module that exports `doc`. @include-section[] uses that fact to
do its work. I think changing this aspect of scribble is not likely to
work well but if you wanted some other way (that wasn't section-based)
to break up your book then you could probably build it. Alternatively,
going with the flow would entail deciding to break up files only based
on the sectioning structure (roughly).  :)

Robby

-- 
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/CAL3TdOPy-vmF7MscGMEwj8mpsRKz2Xzu-upNahZdEX%2Br0WBiLA%40mail.gmail.com.


Re: [racket-users] Symex: a DSL for symbolic expressions

2019-08-01 Thread Neil Van Dyke

Hendrik Boom wrote on 8/1/19 6:36 AM:

On Wed, Jul 31, 2019 at 06:40:05PM -0400, Neil Van Dyke wrote:

For structured editing related work in sexp, of course there's Emacs structural 
operations that have been in there forever (not well-known,



Here's where some of them are listed in the current manual:

https://www.gnu.org/software/emacs/manual/html_node/elisp/List-Motion.html#List-Motion

In addition to those movement ones: backward-kill-sexp, kill-sexp, 
mark-sexp, raise-sexp, transpose-sexps, indent-sexp, indent-pp-sexp.  
And others, such as for evaluation and macro expansion.


You can find some of them with the Emacs command:

    M-x apropos RET sexp RET

The manuals for Emacs and Emacs Lisp are also available through Emacs's 
ancient (but still surprisingly productive) Info hypertext system.  For 
example, you can pull up the Emacs Lisp manual, and press `i` for an 
index search with autocomplete, or `s` for a full-text search (followed 
by the comma key for paging through the search hits).  There are also 
one-key commands for going left/right/up/down through pages, navigating 
to subtopic table of contents entries, etc.


For approximating some of that for the Racket (PLT Scheme) manuals, when 
I made Quack, I used the Emacs frontend to the `w3m` text mode Web 
browser, and added a few Info-mode-like keybindings: 
https://www.neilvandyke.org/w3mnav/


Incidentally, people could also work through SICP in this Info format, 
on underpowered computers that couldn't run a Web browser at the time, 
or even on dumb terminals, thanks to Emacs: 
https://www.neilvandyke.org/sicp-texi/


I ate a little of my own underpowered computer dogfood (it wasn't just 
for developing nations and underserved domestic communities), since much 
of my early Scheme code was written on this little computer, on battery 
power, while sitting against a tree in a park in Harvard Square (tip: 
dim the CCFL display backlight, and angle for the LCD to passively catch 
ambient light), and there was no way I was going to let Firefox kill my 
battery: https://www.neilvandyke.org/linux-thinkpad-560e/


(I actually made my original Scheme embedded API documentation system 
generate that same TexInfo source format, which targeted both Info and 
TeX like the GNU manuals do, and spent quite a while on TeX typographic 
tweaking for article-like API PDFs for small Scheme packages, but 
eventually switched to Scribble as the native format, to work better for 
Racket.  Though, I never got Scribble as visually concise as TexInfo 
`@result{}` for tight code evaluation examples, nor as fast to navigate 
as Info mode.)


--
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/1d4be9fc-216c-1b92-5749-c8e7f5a31691%40neilvandyke.org.


Re: [racket-users] [standard-fish] Reverse engineered quilt design

2019-08-01 Thread Daniel Prager
On Thu, Aug 1, 2019 at 9:53 PM John Clements 
wrote:

> That’s a really nice example of the uses of abstraction in non-programming
> domains. Thanks!
>

Thanks, John!

I think there's real potential for a *#lang quilt *as a(nother) creative
way to teach aspects of programming while exploring a subset of
computational art.

Mirela and I made some progress in this direction, from which this example
emerged, but there's a fair bit more to be done.

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/CAFKxZVXbfPN8oyQZRx6Hvio88yAxOOGpF5CBZ-GhNsWJX%3DkR1Q%40mail.gmail.com.


Re: [racket-users] [standard-fish] Reverse engineered quilt design

2019-08-01 Thread Daniel Prager
Hi Stephen

On Thu, Aug 1, 2019 at 8:31 PM Stephen De Gabrielle 
wrote:

> How your use of racket has evolved over the past 5 years
> * how you handled the changes to racket in that time
> * what was good (and bad) about using Racket
>
> in general what has changed since that presentation?
>

Not a lot to report.

Incremental improvements — go play with the site — didn't make youpatch.com
hugely successful, and we didn't pivot in a big way, but the site's still
there and gets used. Occasionally there's a flurry of quilt designs created
as new quilters find the site and tell their friends.

I experimented with making more traditional quilts using random-ness and
symmetry, but haven't released that software commercially.

I found Racket terrific for the reasons mentioned in the talk, but because
I didn't take anything else commercial — I've mainly been doing non-tech
work of late — so I haven't really upped my Racket game, although I
continue to tinker and learn as time permits.

The changes to Racket occasionally broke something on the site, but those
changes were easily fixed.

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/CAFKxZVWzUFgf%2BDcDj5ZOErVd9Xa%3DS5NUtw_PK1UXctYP00byGw%40mail.gmail.com.


[racket-users] Retina display for OpenGL

2019-08-01 Thread Kshitij Sachan
I've set up an OpenGL context that is displayed in a snip (I chose a snip 
because I want to be able to move the camera around and generally respond 
to user input). However, I've noticed that the OpenGL context in Racket 
looks considerably worse than when I run the same OpenGL code in C++ (the 
racket code is actually calling a C library function using the FFI).

I believe this is because the Racket snip isn't able to take advantage of 
the Retina display on my Mac. Is this the correct reason, and if so, is 
there any way to fix this and make the quality better?

-- 
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/95c8ead6-f607-4920-81e4-d200a54326a4%40googlegroups.com.


[racket-users] Re: Retina display for OpenGL

2019-08-01 Thread 'Mark Warren' via Racket Users
I've never used this before so I may be completely wrong, but you can 
supply gl-config% to the make-gl-bitmap and there is a method on it 

(send 

 a-gl-config set-hires-mode 

 hires-mode)

That may be what you need.

On Thursday, 1 August 2019 14:36:07 UTC+1, Kshitij Sachan wrote:
>
> I've set up an OpenGL context that is displayed in a snip (I chose a snip 
> because I want to be able to move the camera around and generally respond 
> to user input). However, I've noticed that the OpenGL context in Racket 
> looks considerably worse than when I run the same OpenGL code in C++ (the 
> racket code is actually calling a C library function using the FFI).
>
> I believe this is because the Racket snip isn't able to take advantage of 
> the Retina display on my Mac. Is this the correct reason, and if so, is 
> there any way to fix this and make the quality better?
>

-- 
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/bdd9bd94-c517-4945-8b1b-c3b0ceea7e3e%40googlegroups.com.


[racket-users] Re: Retina display for OpenGL

2019-08-01 Thread Kshitij Sachan
Here is some more information about how I get the OpenGL context.

First, I make a bitmap using `make-gl-bitmap`. Then, I make a bitmap-dc% 
object that contains my glbitmap and get its gl-context% object using 
`get-gl-context`.

On Thursday, August 1, 2019 at 9:36:07 AM UTC-4, Kshitij Sachan wrote:
>
> I've set up an OpenGL context that is displayed in a snip (I chose a snip 
> because I want to be able to move the camera around and generally respond 
> to user input). However, I've noticed that the OpenGL context in Racket 
> looks considerably worse than when I run the same OpenGL code in C++ (the 
> racket code is actually calling a C library function using the FFI).
>
> I believe this is because the Racket snip isn't able to take advantage of 
> the Retina display on my Mac. Is this the correct reason, and if so, is 
> there any way to fix this and make the quality better?
>

-- 
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/df6b6b3a-7b3a-49d3-a7ed-188ef7febb27%40googlegroups.com.


[racket-users] Re: Retina display for OpenGL

2019-08-01 Thread Kshitij Sachan
That looked so promising! Unfortunately I just tried it, and nothing 
changed. :(

On Thursday, August 1, 2019 at 10:02:35 AM UTC-4, Mark Warren wrote:
>
> I've never used this before so I may be completely wrong, but you can 
> supply gl-config% to the make-gl-bitmap and there is a method on it 
>
> (send 
> 
>  a-gl-config set-hires-mode 
> 
>  hires-mode)
>
> That may be what you need.
>
> On Thursday, 1 August 2019 14:36:07 UTC+1, Kshitij Sachan wrote:
>>
>> I've set up an OpenGL context that is displayed in a snip (I chose a snip 
>> because I want to be able to move the camera around and generally respond 
>> to user input). However, I've noticed that the OpenGL context in Racket 
>> looks considerably worse than when I run the same OpenGL code in C++ (the 
>> racket code is actually calling a C library function using the FFI).
>>
>> I believe this is because the Racket snip isn't able to take advantage of 
>> the Retina display on my Mac. Is this the correct reason, and if so, is 
>> there any way to fix this and make the quality better?
>>
>

-- 
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/c83d2a6b-0381-4233-a98c-97d268f7227d%40googlegroups.com.


[racket-users] Re: Retina display for OpenGL

2019-08-01 Thread 'Mark Warren' via Racket Users
That's a shame, I'm afraid I'm out of ideas then. Hopefully someone else 
will know.

On Thursday, 1 August 2019 14:36:07 UTC+1, Kshitij Sachan wrote:
>
> I've set up an OpenGL context that is displayed in a snip (I chose a snip 
> because I want to be able to move the camera around and generally respond 
> to user input). However, I've noticed that the OpenGL context in Racket 
> looks considerably worse than when I run the same OpenGL code in C++ (the 
> racket code is actually calling a C library function using the FFI).
>
> I believe this is because the Racket snip isn't able to take advantage of 
> the Retina display on my Mac. Is this the correct reason, and if so, is 
> there any way to fix this and make the quality better?
>

-- 
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/0452ca69-81f7-45e0-9718-3ca95a42ce68%40googlegroups.com.


[racket-users] Re: Racket v7.3.0.900 is available for testing

2019-08-01 Thread Roman Klochkov
Run DrRacket on Windows. OK
Run my program. OK.
Try to build exe file

Got this in console:
module: current code inspector cannot redeclare module
  module name: #
  context...:
   declare-module!58
   declare-this-module
   eval-module8
   for-loop
   declare-submodules
   declare-this-module
   eval-module8
   C:\Program Files (x86)\Racket\collects\compiler\embed.rkt:449:0: get-code
   C:\Program Files 
(x86)\Racket\collects\compiler\..\racket\private\map.rkt:88:19: loop
   C:\Program Files (x86)\Racket\collects\compiler\embed.rkt:449:0: get-code
   C:\Program Files 
(x86)\Racket\collects\compiler\..\racket\private\map.rkt:88:19: loop
   C:\Program Files (x86)\Racket\collects\compiler\embed.rkt:449:0: get-code
   C:\Program Files 
(x86)\Racket\collects\compiler\..\racket\private\map.rkt:88:19: loop
   C:\Program Files (x86)\Racket\collects\compiler\embed.rkt:449:0: get-code
   C:\Program Files 
(x86)\Racket\collects\compiler\..\racket\private\map.rkt:88:19: loop
   C:\Program Files (x86)\Racket\collects\compiler\embed.rkt:449:0: get-code

вторник, 23 июля 2019 г., 20:48:48 UTC+5 пользователь johnbclements написал:
>
>Version 7.3.0.900 is now available for testing from 
>
>   https://pre-release.racket-lang.org/ 
>
> (Note that this is not available from the usual download site.) 
>
> If all goes well, we will turn this version into a v7.4 release 
> within a couple of weeks. 
>
> This release is the first one to include Chez-Scheme-based builds 
> (labeled “Racket CS” on the pre-release page), and we’d be interested in 
> hearing about any issues you encounter with these builds. 
>
> Your help and feedback in testing this new release candidate would be 
> much appreciated. 
>
>
>
>

-- 
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/c9d2855c-68a2-4117-8e1a-fa469e47285d%40googlegroups.com.


[racket-users] Unwelcome surprises using Scribble on a 90,000-word novel

2019-08-01 Thread Hendrik Boom
Well, my novel draft made it through Scribble, but not intact.


(1) Some of the @ commands I use are intended to cause conditional 
inclusion of their contents, dependong on a command-line arameter (which  
haven't yet implemented in scribble.  This is so I can keep my athor's 
notes about the text in the text itself, read them while looking at 
drafts, but have them removed for the final reader's copy.

I've tested this by defining one of these operations (@snip) to delete 
all its contents all of the time, and that works.  (Command line 
dependence will come later).

But it is not possible to snip out entire sections.  In particular,
   @snip{
  @include-section{"author-only-section.scrbl"}
   }
fails, complaining that there's a nested require. 

Is there some way around this?

(2) When I use include-section from the main file, the actual text in 
the main file appears first, and the included files are all saved up ane 
emitted after the text in the main file.  I expected the sections to be 
included where the include-section command was instead of being saved to 
the end.

Is there some way to force immediate rather than deferred inclusion?  
Text that is intended to frame a section, before and after, no 
longer does.  The only way around this seems to be to put the after-text 
into the section itself, which is *not* the structure I want.

Of course one ot the uses I have for this is for author-only text that 
talks bout problems with the section, rather than being contained in 
teh section itself.  But I can imagine it being useful in text intended 
for the reader as well.

Wrapping text around sections makes a real difference if each section is 
compiled to its own HTML page.

(3) This one isn't a real problem, but is an annoyance, since I can 
instead make major changes to the source files and make them work.

When the scribble source file is already formatted in the style normally 
used in English books, with a few spaces (in my case 5) starting every 
paragraph and no blank line separating them, the division into 
paragraphs is completely ignored and everything is run together into one 
paragraph.  Is this actually intended?  Yes, I agree it seems to be 
according to spec, because there aren't any blank lines between 
paragraphs, just intentation on the first line, but is this actually 
useful for any purpose?

-- 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/20190801112544.5rv3mdrutjci7dif%40topoi.pooq.com.


Re: [racket-users] Unwelcome surprises using Scribble on a 90,000-word novel

2019-08-01 Thread Benjamin Lerner

On 8/1/19 7:25 AM, Hendrik Boom wrote:


Well, my novel draft made it through Scribble, but not intact.


(1) Some of the @ commands I use are intended to cause conditional
inclusion of their contents, dependong on a command-line arameter (which
haven't yet implemented in scribble.  This is so I can keep my athor's
notes about the text in the text itself, read them while looking at
drafts, but have them removed for the final reader's copy.

I've tested this by defining one of these operations (@snip) to delete
all its contents all of the time, and that works.  (Command line
dependence will come later).

But it is not possible to snip out entire sections.  In particular,
@snip{
   @include-section{"author-only-section.scrbl"}
}
fails, complaining that there's a nested require.

Is there some way around this?


You need to define @snip as a macro, rather than as a function, so that 
it can eliminate the syntax that does the require:


|(define-syntax (ship stx) (syntax-case stx () [(snip . forms) (if 
(getenv "SHOW-SNIP") #'(begin . forms) #'(begin))])) |


Use this with bracket arguments, as in |@snip[@include-section{blah}]|


(2) When I use include-section from the main file, the actual text in
the main file appears first, and the included files are all saved up ane
emitted after the text in the main file.  I expected the sections to be
included where the include-section command was instead of being saved to
the end.

Is there some way to force immediate rather than deferred inclusion?
Text that is intended to frame a section, before and after, no
longer does.  The only way around this seems to be to put the after-text
into the section itself, which is *not* the structure I want.


How are you invoking scribble? If you’re using the |-html| argument 
(rather than |-htmls|) or |-pdf|, I think it should be producing a 
single file in the manner you expect, /unless/ you have sectioning 
commands in the included file, in which case I’m not sure what it does.



Of course one ot the uses I have for this is for author-only text that
talks bout problems with the section, rather than being contained in
teh section itself.  But I can imagine it being useful in text intended
for the reader as well.

Wrapping text around sections makes a real difference if each section is
compiled to its own HTML page.

(3) This one isn't a real problem, but is an annoyance, since I can
instead make major changes to the source files and make them work.

When the scribble source file is already formatted in the style normally
used in English books, with a few spaces (in my case 5) starting every
paragraph and no blank line separating them, the division into
paragraphs is completely ignored and everything is run together into one
paragraph.  Is this actually intended?  Yes, I agree it seems to be
according to spec, because there aren't any blank lines between
paragraphs, just intentation on the first line, but is this actually
useful for any purpose?


Since the majority of uses of Scribble seem to have been 
formatted-for-web technical documentation, where the formatting is 
non-indented paragraphs separated by blank lines, and since Racket’s 
syntax isn’t typically whitespace sensitive, I think this probably just 
made sense at the time, but you’d have to ask Matthew for more info there…



-- 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/3b749de8-d684-b8c7-a31d-45103641ed92%40ccs.neu.edu.


Re: [racket-users] [standard-fish] Reverse engineered quilt design

2019-08-01 Thread 'John Clements' via Racket Users
That’s a really nice example of the uses of abstraction in non-programming 
domains. Thanks!

John

> On Jul 30, 2019, at 19:04, Daniel Prager  wrote:
> 
> Here's a photo of the original quilt from Red Pepper Quilts (not my work):
> 
> 
> 
> More images, including details, here:  
> http://bastings54.rssing.com/browser.php?indx=6115008=60
> 
> And here's my reverse-engineered Racket version:
> 
> 
> 
> Top-level code, below.
> 
> 
> #lang racket
> 
> (require threading
>  "quilt.rkt")
> 
> ;; EXAMPLES
> ;;
> 
> ;; Build a super-duper quilt from rectangles, hsts, squares, and a
> ;; few qsts
> 
> (define qst_ (qst 1 'black 'white))
> (define qst__ (qst 1 'black 'black 'black 'white))
> (define hst_ (hst 1 'black 'white 'forward))
> 
> (define (around-the-world . ss)
>   ; error on (< (length ss) 3)
>   (define ts (map (λ (s)
> (if (symbol? s)
> (square 1 s)
> s))
>   ss))
>   
> (let around ([n(- (* 2 (length ss)) 3)])
>   (define half (/ (- n 1) 2))
>   (if (= n 3)
>   (apply surround (take ts 3))
>   (let* ([ps (take (drop ts half) (min (+ half 1)
>(- (length ts) half)))]
>  [center (first ps)]
>  [corner (last ps)]
>  [ts (rest (reverse (rest ps)))]
>  [side (apply beside 
>   (append (make-list (- half (length ts) 1)
>  corner)
>   ts))])
> (surround (around (- n 2))
>   (reflect side center)
>   corner)
> 
> (define (diamond center [surround 'white])
>   (4-square (hst 1 surround center 'forward) R))
> 
> (define hst-strip
>   (~> (reflect (beside/n 4 hst_) qst__)
>   (B (H hst_))
>   reflect))
> 
> (define b1 (around-the-world 'black
>  qst_
>  'cerise
>  'lupine
>  'caribbean
>  hst_))
> 
> (define b2 (around-the-world 'black
>  qst_
>  'amber
>  'cactus
>  'maize
>  hst_))
> 
> (define diamond-strip
>   (beside/n 11 (diamond 'black) (diamond 'caribbean)))
> 
> (define geese
>   (beside/n 9 (A (V hst_) hst_)))
> 
> (define quilt
>   (~> (grid [b1 (R geese) b2]
> [geese (diamond 'maize 'cactus) (H geese)]
> [b2 (L geese) b1])
>   (surround hst-strip hst_)
>   (surround diamond-strip (diamond 'caribbean))
>   (add-strips 'cactus)
>   (add-strips 'caribbean)
>   (add-strips 'black)))
> 
> 
> (parameterize ([units 20]
>[show-outline #t])
>   (draw quilt))
> 
> 
> -- 
> 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/CAFKxZVUFCee6LXoejHcrToKnDzOi4AUPLjCk%3DFX%3DF-MLkqLHCA%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/cf635a09-de1b-4e66-ae9e-aa3a41925756%40mtasv.net.


Re: [racket-users] Re: Racket v7.3.0.900 is available for testing

2019-08-01 Thread Matthew Flatt
At Thu, 1 Aug 2019 06:06:29 -0700 (PDT), Alex Harsanyi wrote:
> When I runActivityLog2 there is some code which prints out a number to the 
> console when the application starts up -- this does not happen if I build 
> the application with Racket 7.3, so it is not a spurious printf in my 
> code.  It is just a number: if I run it using racket.exe, it is always 
> 98908, if I build an executable, the value printed out is always 98914, and 
> a new console window is opened, which is very annoying for a GUI 
> application. I tried creating a simple GUI application, with just a frame, 
> but nothing was printed out when I ran that one, so I am not sure how to 
> investigate it further.

I see that calling `(collect-garbage 'major)` returns a number when it
should return `(void)`.

Repair pushed, but I don't that we'll get this repair into the release.
For v7.4, Racket CS will be advertised as "beta". It's close enough to
be worth trying (to expose bugs like this one), but there are likely to
be too many problems to switch to it for production use for most Racket
projects.

> Also, in one of the test runs, I got a warning printed out on the console:
> 
> (racket.exe:6532): Pango-WARNING **: 20:39:36.824: couldn't load font 
> "Helvetica Bold Not-Rotated 14px", falling back to "Sans Bold Not-Rotated 
> 14px", expect ugly output.
> 
> I only got this warning once and could not reproduce it anymore.  As with 
> the number, I never saw this warning (or any unexpected text) printed out 
> on the console with previous Racket versions.

The problem here is that Pango warnings (or warnings from glib-based
libraries i ngeneral) are not being redirected to logging. I forgot to
fill in that piece for Racket CS, and I'll put it back on my list.

> Should I create issues for these in the Racket, or some other repository?

Racket issues are fine, although the latter is probably more
specifically a `racket/draw` issue.

Thanks for your consistent help!
Matthew

-- 
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/5d42ea1e.1c69fb81.db42.82a6SMTPIN_ADDED_MISSING%40gmr-mx.google.com.


Re: [racket-users] [ANN] Racket implementation of magic language

2019-08-01 Thread Jonathan Simpson
Thanks for the feedback. I haven't used scribble before, but I'll look into 
it. Do you feel that it would be helpful to add scribble documentation for 
the magic language itself, or are you just referring to the API provided by 
#lang magic modules?

For the language itself, I can see documentation being helpful if I can 
keep it up to date with the functionality currently supported by #lang 
magic. I'll also need to check on how the magic man pages are licensed. It 
would save a lot of time if I could copy from there as needed. Otherwise it 
will be a lot of work. The long term goal is to be able to slap a #lang 
magic on top of any magic file taken from the file command's repository and 
it will just work. At that point #lang magic will effectively be able to 
share the excellent documentation provided by the file command. Of course, 
another goal is to add enhancements that don't break compatibility.

I'll also do some more work to improve the github README as you suggested.

Thanks for your input!

-- Jonathan

On Thursday, August 1, 2019 at 1:07:36 AM UTC-4, Neil Van Dyke wrote:
>
> Jonathan Simpson wrote on 7/31/19 9:54 PM: 
> > #lang magic is my implementation of the mini language used by the Unix 
> > file command. 
>
> Nice.  In addition to the practical merits, and the craft, it's also an 
> example of a useful legacy DSL we can point to (like lex, yacc, make), 
> and which Racket now implements. 
>
> You might want to make API documentation for it in Scribble.  (Your 
> racket-users post contains helpful information that's not currently with 
> the code in GitHub.  Also, we're currently having trouble with 
> racket-users Google Groups often inexplicably not showing up in Google 
> searches, which is yet another reason to try to consolidate 
> documentation with the code in a simple way.) 
>
> Besides API documentation helping others to use some code, as well as 
> establishing an API of *what* as distinct from *how*... the 
> documentation is also a well-deserved chance to show off your work in 
> different way than the code itself, and with Scribble slickness. Or 
> Markdown. 
>
>

-- 
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/2f60e998-99d7-424b-a3ae-28f78149430a%40googlegroups.com.


Re: [racket-users] Re: Racket v7.3.0.900 is available for testing

2019-08-01 Thread Alex Harsanyi
I installed the latest version, and Racket and raco run fine, but I am 
sorry to report some more problems with it: 

When I runActivityLog2 there is some code which prints out a number to the 
console when the application starts up -- this does not happen if I build 
the application with Racket 7.3, so it is not a spurious printf in my 
code.  It is just a number: if I run it using racket.exe, it is always 
98908, if I build an executable, the value printed out is always 98914, and 
a new console window is opened, which is very annoying for a GUI 
application. I tried creating a simple GUI application, with just a frame, 
but nothing was printed out when I ran that one, so I am not sure how to 
investigate it further.

Also, in one of the test runs, I got a warning printed out on the console:

(racket.exe:6532): Pango-WARNING **: 20:39:36.824: couldn't load font 
"Helvetica Bold Not-Rotated 14px", falling back to "Sans Bold Not-Rotated 
14px", expect ugly output.

I only got this warning once and could not reproduce it anymore.  As with 
the number, I never saw this warning (or any unexpected text) printed out 
on the console with previous Racket versions.

Should I create issues for these in the Racket, or some other repository?

Alex.


On Wednesday, July 31, 2019 at 10:06:40 AM UTC+8, Matthew Flatt wrote:
>
> The latest release candidate at pre-release.racket-lang.org fixes this 
> problem. 
>
> Thanks again! 
>
> At Fri, 26 Jul 2019 22:58:38 -0700 (PDT), Alex Harsanyi wrote: 
> > I can install the windows version of Racket CS and DrRacket (and my 
> > program) runs fine, however when I try to run "raco" I get a message 
> > windows with the "Can't find C:\Program FIles\Racket\.\racket > Variant:Replace This>.exe": 
> > 
> > 
> > 
> > I have no extra packages installed or migrated to this installation. 
> > 
> > Alex. 
> > 
> > On Friday, July 26, 2019 at 8:41:15 PM UTC+8, Matthew Flatt wrote: 
> > > 
> > > At Tue, 23 Jul 2019 18:50:57 -0600, Matthew Flatt wrote: 
> > > > At Tue, 23 Jul 2019 17:47:35 -0700 (PDT), Alex Harsanyi wrote: 
> > > > > I installed the windows version of the Racket CS build and, when 
> > > trying to 
> > > > > run DrRacket I get the following error in a console: 
> > > > > 
> > > > > variable force-unfasl is not bound 
> > > > 
> > > > This is a build problem that we're investigating. 
> > > 
> > > The latest pre-release build of Racket CS for Windows installs and 
> runs 
> > > (at least for me): 
> > > 
> > >  http://pre-release.racket-lang.org/ 
> > > 
> > > 
> > > Thanks again for helping us check the pre-release builds! 
> > > 
> > > 
> > 
> > -- 
> > 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...@googlegroups.com . 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/racket-users/b6d41e86-bbcd-4c8b-82de-7fa99e4f
>  
> > 7dd4%40googlegroups.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/82bf365e-92e0-4188-88c0-7dda0e833a45%40googlegroups.com.


[racket-users] evaluating Scribble for prose

2019-08-01 Thread David Storrs
tl;dr

When writing prose, what are the 'killer features' of Scribble that make
people choose it over any other tool?  (Specifically in the context of
prose -- Scribble is unbeatable when writing Racket documentation.)

Learning scribble seems like a big investment, and when writing prose I'm
not convinced that it has more batteries-included expressive power than
HTML.  For one thing, according to the docs you need to physically replace
the scribble.css file to change the appearance of the HTML output and I
haven't seen an option to inline it.

For point of example, I would describe the 'killer features' of HTML+CSS to
be:  separation of presentation and semantics; easily perform complete
transformations on appearance just by changing the CSS; store presentation
commands externally or internally in a discrete segment; rich ecosystem for
modification, publication, translation to other formats; and universal
availability of the viewer.



Long form:

I write about 3-6,000 words per week for a shared-world story I co-author.
I'm also toying with the idea of going back and writing a sequel to one of
my earlier novels.  The question then becomes:  What should I write them in?

Scribble is the obvious and unbeatable choice for technical writing about
Racket, since you can evaluate code inline and the results are included for
you.  For prose, I'm less clear.

I typically write raw HTML and put a stylesheet on it to get whatever
effect I want.  It lets me cleanly separate content from presentation so
that I can straightforwardly transform things for various media and display
sizes, although when I'm publishing to a XenForo forum I need to use a
simple script to translate HTML to BBCode.  Also on the down side, I have
to go back and manually generate a separate version containing the
commentary for my Patreon readers.

It would be nice to have a tool that:

A) Could conditionally include sections depending on environment variables
or command-line switches
B) Could seamlessly generate PDF, MOBI, EPUB, and clean and valid HTML that
either inlines the CSS or links to a specified CSS file as specified at
publication time.  (The inline option is important for when publishing on
Amazon.)
C) Handles UTF-8 correctly

I see that other people have used Scribble for non-technical purposes, so
I'm curious to find out more.  Is Scribble the right tool for the job and
why?

-- 
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/CAE8gKoejrP58nf08%2BNTys-F5LmHjYEN%2BL--_pKz-zcMRk1UUpA%40mail.gmail.com.


[racket-users] Re: [standard-fish] Summer competiton 2019

2019-08-01 Thread Stephen De Gabrielle
Hi, 

I forgot to mention some other tools you can use to make your entries: 


   - https://docs.racket-lang.org/metapict/  
   - https://docs.racket-lang.org/pict3d 
   
Let me know if I have missed any,

Great entries so far!

Stephen 



On Tuesday, July 30, 2019 at 8:28:51 PM UTC+1, Stephen De Gabrielle wrote:
>
> *Subject: [standard-fish] Summer competiton 2019*
> *'Summer standard fish competition 2019'*
> [image: image]  
> Competition: Make an image with Racket this summer! Win stickers! 
>
> Rules: 
> * you can make images any way you like. I suggest *pict *or *htdp2e/image, 
> but you can use whatever you like!*
> * Images can be of anything.  Images do not have to be of fish. There is 
> no advantage in fish images.
> * You can enter as many times as you like.
>
> It is easy to enter - just post your entry on racket-users, either by 
> email or via google groups, with the prefix '[standard-fish]' just like 
> this email. 
>
> Please remember to put [standard-fish] at the begining of the email 
> subject line so I can easily identfy your entry.
>
> You can paste your code onto the the end of your message, or inlcude a 
> link to a GitLab or GitHub repository/file,  a GitHub Gist, or anything 
> else appropriate.
> - I don't recommend using attachments on the mailing list/google groups.
>
> What will you win? I'll send Racket stickers 
>  to the top 10 winners! 
>
> Closing date: 1 September 2019 judging will take place in the first two 
> weeks of September, and winners will be announced 14 September. (I'm away 
> for most of August so I look forward to seeing your creations on my return)
>
> Note: Not an official Racket competition. I am not a member of the Racket 
> team, nor am I doing this on their behalf. I am covering the cost of the 
> stickers and postage.
>
> Any questions: email me at spdegabrielle at gmail dot com
>
> Have a good summer holidays!
>
> Stephen
>
> ---
>
> Need help getting started?  
>
>- Quick: An Introduction to Racket with Pictures 
> 
>- Pict: Functional Pictures 
> 
>-  2htdp/image 
>- https://github.com/standard-fish/paper-doll - provided by Matthew 
>Flatt: *'In case it's of interest, enclosed is some code extracted 
>from one of my talks. Start by running "demo.rkt". Someone might be 
>interested to play with it or turn it into something better. Since there 
> is 
>no documentation, that someone would have to read the code to extract the 
>various acceptable values for arguments. The most obvious direction for 
>improvement is that choices like hair style and color should have been 
>separated into different arguments."*
>
> Having trouble? - ask a question on racket-users. You can also try 
> stack-overflow and reddit but YMMV.
>
>  standard-fish 
> 
> [image: image]  
>
>
>

-- 
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/b951707a-91c6-428f-837a-33b5ee8e401d%40googlegroups.com.


[racket-users] Re: Racket + Graphviz

2019-08-01 Thread Stephen De Gabrielle
this looks very nice! Thank you for sharing this. 

Don't forget to put it in a `package` and publish it on 
https://pkgs.racket-lang.org/ 

kind regards, 

Stephen 


On Wednesday, July 31, 2019 at 11:52:05 PM UTC+1, Hadi Moshayedi wrote:
>
> Hello Racketeers,
>
> Recently I've started thinking about on how we can create different kinds 
> of diagrams in Racket. One of the tools that seemed easy to be exposed as a 
> library in Racket seems to be Graphviz. You can pipe in the graph 
> definition into it and it will pipe out the json layout of how to draw the 
> graph.
>
> So I started working on https://github.com/pykello/racket-graphviz, which 
> is in early stages, but I thought I can share here for some feedback.
>
> Some highlights are:
>  - Digraphs are defined as s-expressions
>  - (digraph->pict ...) converts the digraph to a Racket Pict which can be 
> composed with other Picts and you can use in slideshow, etc.
>  - Graphviz has some standard node shapes, but with this library you can 
> use any Pict value as the node shape! See the examples in the README file.
>
> I have plans like being able to query the layout of each node so we can 
> draw an arrow from a Graphviz layout to anything else.
>
> After making this something useful, I was thinking about writing some 
> other libraries to make different kinds of system diagrams (sequence 
> diagram, timeline diagram, ...) easy to generate in Racket.
>
> Any feedback? Do you think this can be useful?
>
> -- Hadi
>
>
>

-- 
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/f43b67f9-d594-4702-8d04-311b91244147%40googlegroups.com.


Re: [racket-users] [standard-fish] Reverse engineered quilt design

2019-08-01 Thread Stephen De Gabrielle
Thanks Daniel. the ideal of a #lang quilt sounds good.

S.

On Thursday, August 1, 2019 at 1:22:55 PM UTC+1, Daniel Prager wrote:
>
> Hi Stephen
>
> On Thu, Aug 1, 2019 at 8:31 PM Stephen De Gabrielle  > wrote:
>
>> How your use of racket has evolved over the past 5 years
>> * how you handled the changes to racket in that time 
>> * what was good (and bad) about using Racket
>>
>> in general what has changed since that presentation?
>>
>
> Not a lot to report.
>
> Incremental improvements — go play with the site — didn't make 
> youpatch.com hugely successful, and we didn't pivot in a big way, but the 
> site's still there and gets used. Occasionally there's a flurry of quilt 
> designs created as new quilters find the site and tell their friends.
>
> I experimented with making more traditional quilts using random-ness and 
> symmetry, but haven't released that software commercially.
>
> I found Racket terrific for the reasons mentioned in the talk, but because 
> I didn't take anything else commercial — I've mainly been doing non-tech 
> work of late — so I haven't really upped my Racket game, although I 
> continue to tinker and learn as time permits.
>
> The changes to Racket occasionally broke something on the site, but those 
> changes were easily fixed.
>
> 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/a0f2a35f-3415-42ef-9411-7710c3f216db%40googlegroups.com.


Re: [racket-users] Unwelcome surprises using Scribble on a 90,000-word novel

2019-08-01 Thread Hendrik Boom
On Thu, Aug 01, 2019 at 07:41:46AM -0400, Benjamin Lerner wrote:
> On 8/1/19 7:25 AM, Hendrik Boom wrote:
> 
> > Well, my novel draft made it through Scribble, but not intact.
> > 
> > 
> > (1) Some of the @ commands I use are intended to cause conditional
> > inclusion of their contents, dependong on a command-line arameter (which
> > haven't yet implemented in scribble.  This is so I can keep my athor's
> > notes about the text in the text itself, read them while looking at
> > drafts, but have them removed for the final reader's copy.
> > 
> > I've tested this by defining one of these operations (@snip) to delete
> > all its contents all of the time, and that works.  (Command line
> > dependence will come later).
> > 
> > But it is not possible to snip out entire sections.  In particular,
> > @snip{
> >@include-section{"author-only-section.scrbl"}
> > }
> > fails, complaining that there's a nested require.
> > 
> > Is there some way around this?
> 
> You need to define @snip as a macro, rather than as a function, so that it
> can eliminate the syntax that does the require:
> 
> |(define-syntax (ship stx) (syntax-case stx () [(snip . forms) (if (getenv
> "SHOW-SNIP") #'(begin . forms) #'(begin))])) |
> 
> Use this with bracket arguments, as in |@snip[@include-section{blah}]|

That looks plausible.  Except that when the snipped text is shown, it 
should be in a different colour so as to identify it as snipped text.  
Even if i were to modify the macro to include a colour specification 
(and I don't know enough about macros or scribblt to accomplish this 
myself), I'd just end up with the colour specification wrapping the 
include-section command.  This probably woudn't work for the same 
reasons as the original snip function.

I think I'm going to have to snip section text within the section 
(which will still leave a number for an empty section) or find another 
mechanism for including sections.

At present, @include-section invokes require.  Does it need to?  Does 
it actually export identifiers to the invoking scribble file?  Or is 
this just a convenient way of getting it to process the #lang line and 
treat the included file with scribble (or, I suppose, other) syntax and 
semantics?

-- hendrik

> 
> > (2) When I use include-section from the main file, the actual text in
> > the main file appears first, and the included files are all saved up ane
> > emitted after the text in the main file.  I expected the sections to be
> > included where the include-section command was instead of being saved to
> > the end.
> > 
> > Is there some way to force immediate rather than deferred inclusion?
> > Text that is intended to frame a section, before and after, no
> > longer does.  The only way around this seems to be to put the after-text
> > into the section itself, which is *not* the structure I want.
> 
> How are you invoking scribble? If you’re using the |-html| argument (rather
> than |-htmls|) or |-pdf|, I think it should be producing a single file in
> the manner you expect, /unless/ you have sectioning commands in the included
> file, in which case I’m not sure what it does.

Just
scribble whole.scrbl
where whole.scrbl is the file that @include-section's all the others.

>From what you say, scribble is indeed supposed to work the way I 
thought it would work.  So there's something peculiar about my 
input.

I'll try and make a simpler case that gives the same symptoms to see 
what happens.

> 
> > Of course one ot the uses I have for this is for author-only text that
> > talks bout problems with the section, rather than being contained in
> > teh section itself.  But I can imagine it being useful in text intended
> > for the reader as well.
> > 
> > Wrapping text around sections makes a real difference if each section is
> > compiled to its own HTML page.
> > 
> > (3) This one isn't a real problem, but is an annoyance, since I can
> > instead make major changes to the source files and make them work.
> > 
> > When the scribble source file is already formatted in the style normally
> > used in English books, with a few spaces (in my case 5) starting every
> > paragraph and no blank line separating them, the division into
> > paragraphs is completely ignored and everything is run together into one
> > paragraph.  Is this actually intended?  Yes, I agree it seems to be
> > according to spec, because there aren't any blank lines between
> > paragraphs, just intentation on the first line, but is this actually
> > useful for any purpose?
> 
> Since the majority of uses of Scribble seem to have been formatted-for-web
> technical documentation, where the formatting is non-indented paragraphs
> separated by blank lines, and since Racket’s syntax isn’t typically
> whitespace sensitive, I think this probably just made sense at the time, but
> you’d have to ask Matthew for more info there…

It probably *could* be done, because the indentation information does 
seem to be tucked away somehere in