Re: [racket-users] Here are many examples for learning Racket for new folks

2019-08-05 Thread Tim Meehan
SchemeWiki has SICP solutions as well
, and so do many others
(Eli Bendersky was another guy I had in my collection of links).

I'll also give another thumbs up for Exercism.io (especially "timotheosh,"
a mentor there who really pushed me to write better Racket code). The
Racket track could use some more mentors, but the reviews there are usually
pretty fast relative to other tracks (such as Scheme ... which is really
GNU Guile).

On Mon, Aug 5, 2019 at 9:19 AM Brian Adkins  wrote:

> On Sunday, August 4, 2019 at 7:35:00 PM UTC-4, Stephen De Gabrielle wrote:
>>
>> Awesome!
>>
>> You should post this on https://www.reddit.com/r/Racket/ the facebook
>> page, twitter, etc.
>>
>> s.
>>
>
> I don't have a reddit account; if someone else wants to post it, that's
> fine w/ me. Does anyone have a good idea of how participation is
> distributed across this mailing list, reddit, slack, etc.? I'd prefer to
> focus my efforts on one channel of communication.
>
> Brian Adkins
>
> --
> 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/0cb738a3-bbe8-4214-be97-5f22da3a46b2%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/CACgrOxL9z9zAT5h%2BchjQrMaiF8O87KTBRcCe4RvThO9Fyw8szA%40mail.gmail.com.


Re: [racket-users] finding the expander at run-time

2019-08-05 Thread Jesse Alama

On 5 Aug 2019, at 13:16, Dmitry Pavlov wrote:

Your task reminds me of the one I had some time ago, and the found 
solution is still used to this day.
You can see the old thread here: 
https://groups.google.com/forum/#!msg/racket-users/ATXEyp-4AJA/x0KHbeOhdFwJ


I am not sure it is compatible right away with what you are doing:
there is not "eval" there, but "eval-syntax"; also, dedicated 
(require-input-port)
and (prefix-input-port) procedures, written by Matthew, are used to 
exempt users of #lang line.


As for your problem with raco exe, see Matthew's suggestion to make a 
(dummy) my-package/main
and then do ++lib my-package/main, maybe it will help in your case, 
too.


Thanks for helping out here! The thread your link to is really helpful. 
The idea of sneaking in a #lang line is probably the path I'll explore 
for now.


Perhaps one could consider automating this by doing adding a #:lang 
keyword argument to dynamic-require? The idea would be that you'd 
pretend that the form is written in some other language.


--
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/0BC7781F-F8FE-48FC-8E36-C82B890BE01F%40lisp.sh.


[racket-users] Re: gui widgets over canvas

2019-08-05 Thread Alex Harsanyi
I can think of two options which only use the functionality that is 
currently
available in the racket GUI library:

One option is to use a `pasteboard%` instead of the `canvas%` and use an
`editor-snip%` for the text input, with the snip being moved where you need
it.  This solution will be limited to the text input widget only, unless you
want to write additional widgets, which will have to be implemented as 
`snip%`
instances.

Another option is to write your own panel widget by deriving from `panel%` 
and
overriding `container-size` and `place-children` -- this will give full
control over the placement of child items inside the panel: e.g. the canvas
could be placed at 0,0 and fill the entire client area, while the text input
will be placed on top of the canvas at the correct position.  This solution
allows placing arbitrary controls on the canvas.  For scrolling, I would
suggest making the canvas itself scrollable and have the panel update the
position of the text input: a scrollable panel works, but the canvas will 
not
know its viewing area and will have to draw all the rows and let the
underlying draw routines clip them -- this might be a performance issue for
very large number of rows.

Good luck with your project,
Alex.

On Monday, August 5, 2019 at 7:28:17 PM UTC+8, Neil Van Dyke wrote:
>
> For a million-rows spreadsheet GUI widget that's based on a canvas, and 
> wants to overlay a single normal widget like a `text-field%` at a time, 
> over the canvas, for cell value editing... what's the best way to get 
> that overlay to happen in Racket `gui`? 
>
> One idea: in the implementation of `panel%`, looks like I can force it 
> to be implemented as a canvas (`wx-vertical-canvas-panel%`).  If I could 
> draw the spreadsheet viewport to that same canvas, as well as parent 
> overlaid widgets to it, I suppose I could use panes to position and size 
> the editing widget.  I don't know whether that would work at all, on all 
> platforms, and in future Racket releases. 
>
> Or is there a better way? 
>
>

-- 
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/3b932c2d-c6c2-48ea-8906-605695579fe2%40googlegroups.com.


[racket-users] Re: DrRacket2?

2019-08-05 Thread Stephen De Gabrielle
Thanks.

On Monday, August 5, 2019 at 1:14:54 PM UTC+1, tbrooke wrote:
>
> Martin at nextJournal was looking into it but got distracted so I will try 
> to post a reminder - they have Clojure and supposedly they can support any 
> language via bash and/or Docker 
>
> I agree nextjournal or not notebook support would be nice and it would 
> help with newcomers since it is so easy to create interactive tutorials
>
> On Sunday, August 4, 2019 at 7:12:29 PM UTC-4, Stephen De Gabrielle wrote:
>>
>> I had a go with nextjournal but sadly there was no way to create racket 
>> 'nextjournal runtime'.
>>
>> s.
>>
>>
>> On Saturday, August 3, 2019 at 1:04:34 PM UTC+1, tbrooke wrote:
>>>
>>> I corresponded briefly with Martin Kavaler at https://nextjournal.com/  
>>> a notebook platform that supports Clojure and several other languages about 
>>> Racket -- It s
>>>
>>

-- 
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/9e9b2dff-126e-4fbd-a115-e861df944bfb%40googlegroups.com.


Re: [racket-users] Re: Alternative UI toolkits

2019-08-05 Thread Stephen De Gabrielle
Sorry, I meant whatever is used to make Visual Studio Code, and whatever 
the Mozilla equivalent is.

s.

On Monday, August 5, 2019 at 6:07:34 PM UTC+1, Neil Van Dyke wrote:
>
> XUL itself is deprecated/dead.  There might be an interesting (but 
> niche) Racket opportunity with WebExtensions, and you might want to wait 
> to see how they decide WASM fits into that, and what Racket's WASM story 
> becomes. 
>
> Also, bit of gut-feel speculation... There's some odd noises/rumblings 
> going on with browser extensions (and PR of same) in recent months, and 
> a few I noticed in the last week.  Anyone contemplating a new project 
> based on browser extensions should consider that the rules might be 
> changing soon, more likely than in the past.  (Beyond Chrome 
> anti-ad-blocking moves, which also was a gift to Mozilla when they 
> needed it.  But possibly other restrictions, such as in what else 
> extensions can do, and on who can effectively publish what extensions.  
> And maybe an improved or new monetization option.) 
>
>

-- 
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/c22cff90-2db7-401d-8965-4f093921222d%40googlegroups.com.


Re: [racket-users] Scribble text included out of order

2019-08-05 Thread Sam Tobin-Hochstadt
What's happening here is that Scribble is designed around sections as
the primary document organization, and it treats everything in
"testmain.scrbl" as being in the initial section, and then adds an
additional section for "testsect.scrbl". If you put `@section{}` on a
line before "bar bar" the you'll see the output in the order you
expect.

Scribble documents have to be organized in terms of sections, although
that doesn't mean that you have to see the section headings in the
resulting document. Scribble provides properties for hiding these
things. Here's a pair of files that should produce the output you
want: https://gist.github.com/samth/1b0fdec97be2f8622fff54de70a1cdef

Sam

On Fri, Aug 2, 2019 at 3:41 PM Hendrik Boom  wrote:
>
> On Thu, Aug 01, 2019 at 07:41:46AM -0400, Benjamin Lerner wrote:
> > On 8/1/19 7:25 AM, Hendrik Boom wrote:
>
> >
> > > (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.
>
> So I made a small case that exhibits this.  Presumably I'm doing
> something wrong if no one else has this problem.
>
> Main file testmain.scrbl:
>
> #lang scribble/base
>
> foo
> foo
>
> @include-section["testsect.scrbl"]
>
>
> bar bar
>
>
> Section testsect.scrbl:
>
> #lang scribble/base
>
> onion
> soup
>
>
> The command to run scribble:
>
> scribble testmain.scrbl
>
>
> The resulting testmain.html file read in firefox and cut and pasted
> into this email:
>
> foo foo
>
> bar bar
> 1
>
> onion soup
>
>
> Of course there's also a sidebar -- a table of contents with ???
> instead of titles, because I didn't have any titles.
>
> It's quite clear that the included section comes after *all* the text
> in the main file, instead of being interspersed where the
> @include-section occurred.
>
> -- 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/20190802194102.hu6t3rrthydmpkb4%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/CAK%3DHD%2Bbe-GtFKqxu_SzdJfFr5FRpdJxt8oQRq-hc7Xv9xKVykQ%40mail.gmail.com.


Re: [racket-users] Re: Alternative UI toolkits

2019-08-05 Thread Neil Van Dyke
XUL itself is deprecated/dead.  There might be an interesting (but 
niche) Racket opportunity with WebExtensions, and you might want to wait 
to see how they decide WASM fits into that, and what Racket's WASM story 
becomes.


Also, bit of gut-feel speculation... There's some odd noises/rumblings 
going on with browser extensions (and PR of same) in recent months, and 
a few I noticed in the last week.  Anyone contemplating a new project 
based on browser extensions should consider that the rules might be 
changing soon, more likely than in the past.  (Beyond Chrome 
anti-ad-blocking moves, which also was a gift to Mozilla when they 
needed it.  But possibly other restrictions, such as in what else 
extensions can do, and on who can effectively publish what extensions.  
And maybe an improved or new monetization option.)


--
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/9c08dff6-d504-87ac-f5dc-a1350389bd56%40neilvandyke.org.


Re: [racket-users] Re: Alternative UI toolkits

2019-08-05 Thread Stephen De Gabrielle
I was wondering about XUL and Chromium but I don’t know if they count as UI
toolkits

S.

On Mon, 5 Aug 2019 at 11:14, Neil Van Dyke  wrote:

> Thank you, Roman.
>
> For those who don't know, `gir` potentially lets people use many of the
> libraries behind the Gnome GUI desktop environment that's popular on
> GNU/Linux and other places.  It does FFI to the GObject object system
> that backs those libraries, and perhaps also uses the metadata now
> provided to making bindings easier.
>
> The Racket cross-platform GUI API, such as is used in the implementation
> of DrRacket, already uses a subset of some of these libraries (from both
> GTK version 3 and 2 sets) on many platforms, *but* GObject bindings let
> you do a lot more than the cross-platform toolkit, on platforms that
> support it (though unfortunately you then run only on those platforms).
>
> For related GObject/Gnome/GTK/etc. bindings work, the most active might
> be Guile (the GNU project's own Scheme dialect, which has some nice new
> work, if you haven't looked at it in a while), which has had a number of
> such attempts at GTK/etc. bindings, and a there's new work on
> GObject-based bindings: https://github.com/spk121/guile-gi
>
> The other really popular GUI desktop toolkit family (other than
> HTML GUIs) is Qt.  This has always been the main competitor to
> GTK/Gnome, is even moreso now than it used to be, and is something I
> considered adding as a new backend for Racket's cross-platform toolkit,
> especially for handhelds.  Other than Qt, you might want to build a more
> lightweight toolkit, atop OpenGL ES and/or Vulkan, and make it friendly
> for handhelds, desktop/laptop, and HUD/HR (and preferably also hooked
> into Racket's cross-platform GUI API, but you might want to also provide
> a non-cross-platform API to it).
>
> --
> 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/a9eb0d1a-4ef1-8d24-abce-ac73268bde4b%40neilvandyke.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAGHj7-%2Bs32AbUbDYEGiME94ZAL7Fp%3DhTbX9V2F%2B5MdN2Evtsrg%40mail.gmail.com.


[racket-users] Racket News - Issue 13

2019-08-05 Thread Paulo Matos
Here we are for another packed issue of Racket News!

https://racket-news.com/2019/08/racket-news-issue-13.html

Enjoy!
-- 
Paulo Matos

-- 
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/87d0hjbmkq.fsf%40linki.tools.


Re: [racket-users] Here are many examples for learning Racket for new folks

2019-08-05 Thread Brian Adkins
On Sunday, August 4, 2019 at 7:35:00 PM UTC-4, Stephen De Gabrielle wrote:
>
> Awesome!
>
> You should post this on https://www.reddit.com/r/Racket/ the facebook 
> page, twitter, etc.
>
> s.
>

I don't have a reddit account; if someone else wants to post it, that's 
fine w/ me. Does anyone have a good idea of how participation is 
distributed across this mailing list, reddit, slack, etc.? I'd prefer to 
focus my efforts on one channel of communication.

Brian Adkins

-- 
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/0cb738a3-bbe8-4214-be97-5f22da3a46b2%40googlegroups.com.


[racket-users] Summer BOB 2019 Final Call for Participation (Aug 21, Berlin)

2019-08-05 Thread Michael Sperber


... and, of course, BOB makes a *great* companion for Racketfest on Aug 17!


   Summer BOB 2019
  Conference
 “What happens if we simply use what’s best?”
   August 21, 2019, Berlin
   co-located with ICFP 2019
http://bobkonf.de/2019-summer/
 Program: http://bobkonf.de/2019-summer/program.html
Registration: http://bobkonf.de/2019-summer/registration.html


Are you interested in technologies beyond the mainstream, that are a
pleasure to use, and effective at getting the job done?

BOB is the forum for developers, architects and builders to explore
and discover the best tools available today for building software. Our
goal is for all participants to leave the conference with new ideas to
improve development back at the ranch.

Summer BOB is a one-time-only event, in the spirit of the spectacular
Winter BOB. The International Conference on Functional Programming is
coming to town, and Summer BOB will be right in the middle of it, on
the last day of ICFP proper, prior to all the workshops. BOB
participants will be able to attend ICFP talks on Aug 21 and vice
versa.

We are committed to diversity: We aim at exploring a wide range of
tools in a welcoming and friendly crowd of diverse people. To that
end, a number of support options for participants from groups
under-represented in tech are available.

Summer BOB will feature two tracks: one from practitioners, and one
from researchers, designed to cross-pollinate and inspire.

Topics include distributed programming, testing, linear algebra,
functional design patterns, type systems, formal methods, and
interactive development:

Using Formal Methods to Eliminate Exploitable Bugs
Kathleen Fisher

Purely functional distributed programming for collaborative applications
Adriaan Leijnse

Statistical testing of software
Stevan Andjelkovic

Dependent Types in Haskell
Stephanie Weirich

>From idea to working product in 7 days
Philipp Maier

In Search of Software Perfection
Xavier Leroy

Expressive Linear Algebra in Haskell
Henning Thielemann

Type-driven Development in Action
Edwin Brady

Functional Design Patterns
Franz Thoma

Liquidate your Assets
Niki Vazou

Scala Type Classes
Alexey Novakov

Types for Protocols
Peter Thiemann

Creating maintainable mobile games in Haskell
Christina Zeller

A Functional Reboot for Deep Learning
Conal Elliott



-- 
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/y9l5znbac3u.fsf%40deinprogramm.de.


[racket-users] Evaluating Scribble and Pollen for prose

2019-08-05 Thread Hendrik Boom
On Thu, Aug 01, 2019 at 11:13:53AM -0400, David Storrs wrote:
> 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.

I too am evaluating Scribble.  I realised years ago that my writing had 
suffered from the use of too many word processors as technology kept 
changing, and even though there were lots of conversion tools, they 
didn't always work properly.  I didn't want to spend time tracking down 
missing italics eternally.

Also, sometimes files got edited on different systems independently.  
(Blame my attantion deficit for this)  I spent time doing format 
conversions *and* reconciling differences by eyeball and typing.

It was plain I needed a new tool.  One that could handle plain Ascii 
text input (that's what my alphasmart did -- it was great for raw text 
input not not so great for editing) and still handle markup for italics 
and such.  And one that was compatible with computer-programmer-style 
revision control.  (I dopted monotone as my revision control system back 
then.)  Word processor file formats seem to go out of their way to make 
this impossible.

I ended up writing three generations of document compilers that could 
accept plain Ascii text and markup, producing whatever output I wanted 
at the time.

The third one, mt3, produces HTML and slightly sick TeX.  And it doesn't 
handle things I'm not currently using in my writing, such as tables, and 
mathematical notation, and category-theoretical diagrams.

It does do markdown-style nested bullet points, which are invaluable for 
planning and outlining.  But that's not writing prose either.

And it's getting complicated. Each generation of my document compiler 
was written as I learned what it wsa that I *reallt* needed.  Each was 
largely incompatible in its markup with the previous ones, but since the 
bulk of what I wrote was a bunch of ordinary paragraphs containing plain 
text, that wasn't much of a problem.  Searchnig and change=ing by hand 
in emacs was not a big deal.

But I want to do mathematics, have charts and diagrams, and so forth.

So before starting on a fourth generation, I decided to ook around.

An obvious candidate is TeX.  It does not generate HTML.

Another was, of course, scribble.

You may have read my difficulties with that in a few other threads on 
this mailing list in the past week or two.

First, there was excessive slowness.  That was fixed a week or two ago, 
making the whole project feasible.  I;m now using a recent snapshot of 
the development version.

Second there are problems with include-section.  I can't wrap an
@include-section with anything, so it can't be conditional on a 
command-line flag or anything else.  This is apparently because it used 
Racket's (require ...) internally, which has always to be top-level.  I 
gather that pollen uses the same technique, so I suspect it has the same 
problem.  (There do appear to be clumsy-looking workarounds involving 
changes in both the included and including files)

Third, Scribble takes all my included sections and moves them to the end 
of the document.  I don't know why, and I've been flat-out told it 
doesn't do that.  I'm waiting for a fix or explanation.

Finally, there are minor notational issues.  I like to start my 
paragraph with indentation instead of blank lines, just so that my input 
resembles the output.  Easier when editing.

Of course, I could start to rewrite scribble ...  But I've looked at the 
codebase before (trying to figure out how to make text red), and I find 
it hard to get into.

I've noticed Pollen can take markdown-stye input.  (which seems 
useful for my bullet-point planning and point-form sections) But 
I wonder ... is that just preprocessing markdown and producing markdown?  
Or is it indeed a surface syntax for pollen that gets absorbed into the 
same internal notation pollen uses for non-markdown text in the dame 
document.

Or is all this compatibility engineering and output generation the job 
of the document author, providing ultimate flexibility with little 
convenience.  I'm already writing document 

[racket-users] Re: DrRacket2?

2019-08-05 Thread tbrooke
Martin at nextJournal was looking into it but got distracted so I will try 
to post a reminder - they have Clojure and supposedly they can support any 
language via bash and/or Docker 

I agree nextjournal or not notebook support would be nice and it would help 
with newcomers since it is so easy to create interactive tutorials

On Sunday, August 4, 2019 at 7:12:29 PM UTC-4, Stephen De Gabrielle wrote:
>
> I had a go with nextjournal but sadly there was no way to create racket 
> 'nextjournal runtime'.
>
> s.
>
>
> On Saturday, August 3, 2019 at 1:04:34 PM UTC+1, tbrooke wrote:
>>
>> I corresponded briefly with Martin Kavaler at https://nextjournal.com/  
>> a notebook platform that supports Clojure and several other languages about 
>> Racket -- It s
>>
>

-- 
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/90bf3af7-9b60-4cec-aa59-d6aa03aad5db%40googlegroups.com.


[racket-users] gui widgets over canvas

2019-08-05 Thread Neil Van Dyke
For a million-rows spreadsheet GUI widget that's based on a canvas, and 
wants to overlay a single normal widget like a `text-field%` at a time, 
over the canvas, for cell value editing... what's the best way to get 
that overlay to happen in Racket `gui`?


One idea: in the implementation of `panel%`, looks like I can force it 
to be implemented as a canvas (`wx-vertical-canvas-panel%`).  If I could 
draw the spreadsheet viewport to that same canvas, as well as parent 
overlaid widgets to it, I suppose I could use panes to position and size 
the editing widget.  I don't know whether that would work at all, on all 
platforms, and in future Racket releases.


Or is there a better way?

--
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/ff0dc0e4-e387-5ab2-58c4-4a18d77c512b%40neilvandyke.org.


Re: [racket-users] finding the expander at run-time

2019-08-05 Thread Dmitry Pavlov

Hello,

Your task reminds me of the one I had some time ago, and the found 
solution is still used to this day.
You can see the old thread here: 
https://groups.google.com/forum/#!msg/racket-users/ATXEyp-4AJA/x0KHbeOhdFwJ


I am not sure it is compatible right away with what you are doing:
there is not "eval" there, but "eval-syntax"; also, dedicated 
(require-input-port)
and (prefix-input-port) procedures, written by Matthew, are used to 
exempt users of #lang line.


As for your problem with raco exe, see Matthew's suggestion to make a 
(dummy) my-package/main

and then do ++lib my-package/main, maybe it will help in your case, too.

Regards,

Dmitry



On 08/04/2019 09:40 PM, Jesse Alama wrote:

I'm working on a #lang and having some trouble with run-time paths.

Before I desparately type increasingly improbable combinations of
tenuously related thing hoping that the next invocation will be the
right one, I thought I'd write here. I've tried looking around on the
mailing list archives for help, but I can't quite find what I'm looking
for. My problem is surely not new, so I apologize if I'm inadvertantly
re-asking a question with a well-known answer. If this has already been
definitively answered here or somewhere else, I'm happy with a link to
the discussion.

For context: the users of my #lang aren't Racket programmers, don't know
of Racket, and shoulnd't have to. I'm building a command line tool. It's
made with Racket, of course, but it's essential that this tool not
require DrRacket, and should not require command line invocations like
"racket my-cool-thing.rkt filename.whatever". It should work like this:

   $ coolthing file.whatever

where coolthing is my compiled Racket program.

I get that there are ways of making executables, but I'm getting
confused about paths. Specifically, the path for my expander.

My code works as a proper #lang. That is, I can happily work with it in
DrRacket, and I get a REPL for free. That's really great. But, again,
there should be no (immediately visible) Racket dependency.

Here's what I've got:

* expander.rkt: the expander. Provides definitions according to which
   raw S-expressions get their meaning.

* info.rkt: present, but contains -- to my knowledge -- nothing
   especially relevant. (I almost omitted info.rkt from this list,
   thinking it was definitely irrelevant, but then it occurred to me that
   I may need to add some paths here.)

* grammar.rkt: Brag grammar (provides parse)

* secret.rkt: the principal program. Uses command-line, takes a filename
   as its sole argument, parses it using grammar.rkt, and is intended to
   execute the program along the lines of expander.rkt.

When I work in DrRacket, I know that a couple other files (main.rkt,
reader.rkt for read-syntax) are being used. I omitted them from this
list because (I think) they're not necessary for what I'm trying to
do. (But who knows: that may be where I'm wrong.)

In secret.rkt I've essentially got this:

   (define program (parse path))
   (parameterize ([current-namespace (make-base-empty-namespace)])
  (namespace-require '(file "expander.rkt"))
  (eval program))

This works at the command line (if I'm in the right directory) using

   racket client.rkt whatever.foo

but fails when the program is compiled using raco exe:

   open-input-file: cannot open module file
 module path: /Users/jesse/secret/examples/expander.rkt
 path: /Users/jesse/sources/secret/examples/expander.rkt
 system error: no such file or directory; rktio_err=3

It's clear to my that this fails, and why. The expander is missing. If I
try to be more clever and replace the '(file "expander.rkt") with '(lib
...) -- so that it looks like this:

   (define program (parse path))
   (parameterize ([current-namespace (make-base-empty-namespace)])
  (namespace-require '(lib "my-package/expander"))
  (eval expanded))

then I get aother error:

   standard-module-name-resolver: collection not found
 for module path: (lib "secret/expander")
 collection: "secret"
 in collection directories:
  /Users/jesse/secret/lib/plt/secret/collects

I've tried things like using ++lib with raco exe and ++collects-copy
with raco distribute, but I can't figure it out; I always get something
essentially equivalent to: "Can't find your expander.". I feel up
against the ropes: adding a main module to expander.rkt so that
command-line processing happens there (!). That feels pretty weird, but
maybe that would work. (Did I mention that I'm turning to increasingly
improbable ideas in my quest for a solution?) I'm sure I'm missing
something really simple here. Any ideas?

Jesse



--
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 

Re: [racket-users] pollen?

2019-08-05 Thread bruno cuconato
hi Hendrik,

you might want to try https://groups.google.com/forum/#!forum/pollenpub for
pollen-related queries


--
bruno cuconato
(on mobile)

On Mon, Aug 5, 2019, 05:12 Hendrik Boom  wrote:

> On Sun, Aug 04, 2019 at 02:17:33AM -0700, Simon Schlee wrote:
> > I have not completely read this thread in detail, but to me it seems
> like
> > it could be useful to you, to experiment with pollen and custom tags and
> > try to capture more semantic meaning with those tags.
> > I think you would have an easier time creating templates that layout the
> > code exactly like you want, it might be some more work to transition but
> > you would have more control over how things are rendered.
> > Have you already checked-out/considered using pollen?
>
> I've seen a web page about it but I haven't yet looked into it seriously.
> Will look again, in more detail.
>
> I gather that it's built upon scribble.  The manual (
> https://docs.racket-lang.org/pollen/ ) seems to be one meta-level above
> the level of the scribble tutorials I've found.  Instead of descibing
> how to put together a manuscript that can produce, say, both html and
> pdf (possibly via TeX) output it seems to describe how you could define
> notations that could to that.
>
> Now you need that for any kind of sophisticated use (which I gather is
> what I'll be doing) but it's really nice to know what's *already*
> available to produce documents.  Have I somehow missed that in the
> documentation bundle?
>
> Also... pollen seems to be somewhat based on scribble.
> Does is share scribble's problem of not being able to nest
> @include-section within another tag, like
> @italic{
>   @include-section["other-file"]
> }
>
> -- 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/20190805041210.zk7aonuutslxqw7m%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/CAPWro-gSOQSFyn%3DyHcZX4Yt-VVusnF6WKXLewWYyFF9HTRCrxQ%40mail.gmail.com.


Re: [racket-users] Re: Alternative UI toolkits

2019-08-05 Thread Neil Van Dyke
Sorry, typo: I meant "HUD/AR" as in "head-up display and augmented 
reality" (and also VR).


--
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/62de5cce-0768-166d-920b-88b413efb8f0%40neilvandyke.org.


Re: [racket-users] Re: Alternative UI toolkits

2019-08-05 Thread Neil Van Dyke

Thank you, Roman.

For those who don't know, `gir` potentially lets people use many of the 
libraries behind the Gnome GUI desktop environment that's popular on 
GNU/Linux and other places.  It does FFI to the GObject object system 
that backs those libraries, and perhaps also uses the metadata now 
provided to making bindings easier.


The Racket cross-platform GUI API, such as is used in the implementation 
of DrRacket, already uses a subset of some of these libraries (from both 
GTK version 3 and 2 sets) on many platforms, *but* GObject bindings let 
you do a lot more than the cross-platform toolkit, on platforms that 
support it (though unfortunately you then run only on those platforms).


For related GObject/Gnome/GTK/etc. bindings work, the most active might 
be Guile (the GNU project's own Scheme dialect, which has some nice new 
work, if you haven't looked at it in a while), which has had a number of 
such attempts at GTK/etc. bindings, and a there's new work on 
GObject-based bindings: https://github.com/spk121/guile-gi


The other really popular GUI desktop toolkit family (other than 
HTML GUIs) is Qt.  This has always been the main competitor to 
GTK/Gnome, is even moreso now than it used to be, and is something I 
considered adding as a new backend for Racket's cross-platform toolkit, 
especially for handhelds.  Other than Qt, you might want to build a more 
lightweight toolkit, atop OpenGL ES and/or Vulkan, and make it friendly 
for handhelds, desktop/laptop, and HUD/HR (and preferably also hooked 
into Racket's cross-platform GUI API, but you might want to also provide 
a non-cross-platform API to it).


--
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/a9eb0d1a-4ef1-8d24-abce-ac73268bde4b%40neilvandyke.org.


[racket-users] Re: Alternative UI toolkits

2019-08-05 Thread Roman Klochkov
https://github.com/Kalimehtar/gir

суббота, 3 августа 2019 г., 16:42:55 UTC+5 пользователь Stephen De 
Gabrielle написал:
>
> Hi
>
> Has anyone done any work on using racket with other UI toolkits? 
>
> I don’t think so but I thought it was worth asking - just in case.
>
> Stephen
> -- 
> 
>

-- 
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/12de9f64-ae44-4ac9-b241-af8ccf2a6dea%40googlegroups.com.


Re: [racket-users] drracket notebook mode and ipython/jupyter (Was: DrRacket2?)

2019-08-05 Thread Stephen De Gabrielle
Hi Neil,
I raised 'Make an RFC for Notebook mode in DrR or Jypyter. #100
'

I raised it because it seems like notebook mode support is important in any
new language. I *think* this doubly true for LOP where the intent is to
have multiple interoperable languages co-existing?

Kind regards,

Stephen



#100 https://github.com/racket/racket2-rfcs/issues/100

On Fri, Aug 2, 2019 at 6:25 PM Neil Van Dyke  wrote:

> Prior racket-users discussion on a hypothetical DrRacket Notebook Mode
> and the existing IPython/Jupyter kernel include:
>
> 2018-12-20
> https://groups.google.com/forum/#!topic/racket-users/MsAh2aBU5Sw
>
> 2019-06-26
> https://groups.google.com/d/msg/racket-users/XQXYxtCM2-k/AbTTqMqlAgAJ
>
> 2019-07-24
> https://groups.google.com/d/msg/racket-users/XQXYxtCM2-k/C97eRavaBQAJ
>
> Someone with funding or a person-month of volunteer time should do
> DrRacket Notebook Mode, something like described in that first thread.
> It will be a good thing.  And then other people will be inspired to make
> more language support progress on the data science and blogging/sharing
> possibilities.
>
> --
> 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/a547a3bd-5ccd-45b9-2db8-8c24495c114c%40neilvandyke.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAGHj7-KsBKCCh2k4W2Tr7PKT%2BH_%2BFBS43N6KWkBz%2B3QTEAhyWA%40mail.gmail.com.