Re: [racket-users] RE: student project idea: semi-WYSIWYG Scribble editor (Was: Racket 6.9)

2017-04-30 Thread Hendrik Boom
On Sun, Apr 30, 2017 at 01:24:23AM +0200, Jos Koot wrote:
> Hi Matthias,
> Put it your way it seems managable for a simple user like me.
> I don't immediately see how to follow all details of your advice,
> but I'll look into it in due time. I'll need time for that
> and probably from time to time some more advice.
> For instance, I would like to avoid repeated execution of interactions
> that are not mutated, for they may slow down.
> The rendering of a scribble can easily take 10 or more seconds.

That's the main reason I'm not using Scribble.  I'm writing a novel, 
and rendering it in scribble takes enough time to set up a coffee 
maker, not just to pour out a cup in the next room.

But I like Scribble enough to have written a C++ implementation of the 
very few Scribble primitives I actually use frequently.  That renders 
the entire novel faster than I can blink.  It takes longer for my 
browser to read the generated HTML than it takes to produce it.

Of course my code doesnt allow the writer to code new features in 
Scribble.  That's a serious loss.

I was using the version of Scribble that's packaged with Debian/Devuan 
Jessie.  Are there known serious performance issues with that, such as 
not running actual machine code?

-- hendrik

> A memoizing interaction (and companions) seems possible, though.
> May be much more memoizing is possible for speed up.

If Scribble is has to be as slow as I found it to be, it's necessary.  

I'm not sure if Scribble is well-suited to memozation.  THings like 
index entries and page numbers seem prety well to require global 
reprocessing.

--  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.
For more options, visit https://groups.google.com/d/optout.


RE: [racket-users] RE: student project idea: semi-WYSIWYG Scribble editor (Was: Racket 6.9)

2017-04-29 Thread Jos Koot
Hi Matthias,
Put it your way it seems managable for a simple user like me.
I don't immediately see how to follow all details of your advice,
but I'll look into it in due time. I'll need time for that
and probably from time to time some more advice.
For instance, I would like to avoid repeated execution of interactions
that are not mutated, for they may slow down.
The rendering of a scribble can easily take 10 or more seconds.
A memoizing interaction (and companions) seems possible, though.
May be much more memoizing is possible for speed up.
May be, for once, I can be useful for Racket
as a thanks to PLT to be so useful for me for many years.
This is a promise to try, not one to succeed.
Jos  

-Original Message-
From: Matthias Felleisen [mailto:matth...@ccs.neu.edu] 
Sent: domingo, 30 de abril de 2017 0:39
To: Jos Koot
Cc: Neil Van Dyke; Racket Users
Subject: Re: [racket-users] RE: student project idea: semi-WYSIWYG Scribble 
editor (Was: Racket 6.9)


What you need to know is — at a high level — how to write a thread that, 
in DrRacket, conceptually clicks the ‘render as HTML’ button every time 
you hit a key. It’s kind of like background syntax checking. except that 
the result shows up in your browser not in DrRacket. So your GUI skills
aren’t really in demand. Just concurrent programming and managing 
threads (you don’t want to run it as a thread but as a place and you 
want to kill threads that don’t finish shipping their stuff to the browser
in time for the next keystroke to be processed.) 





> On Apr 29, 2017, at 6:13 PM, Jos Koot <jos.k...@gmail.com> wrote:
> 
> Hi Neil,
> Your idea crossed my mind when I started to use scribble,
> but I don't think I know enough of Scribble,
> (let alone HTML etc) for such a task.
> I hardly have experience in making Guis.
> I am a simple, but very content user of Racket.
> Thanks to you and all others of PLT,
> Jos
> 
> -Original Message-
> From: Neil Van Dyke [mailto:n...@neilvandyke.org] 
> Sent: sábado, 29 de abril de 2017 23:25
> To: Jos Koot; 'Racket Users'
> Subject: student project idea: semi-WYSIWYG Scribble editor (Was: Racket 6.9)
> 
> If some undergrad wanted a summer programming project... make a 
> semi-WYSIWYG editor for Scribble documents.
> 
> You might have a long scrolling text window, in which things like 
> boldface/italics/color/textsize that Scribble would render are editable 
> text, and Scribble markup itself doesn't appear on-screen. Things like 
> print pagination probably would not appear here, though, but you'll want 
> to special-case what normally ends up as rendered Table of Contents, for 
> navigation purposes.  This can be tricky, especially if you're not 
> closed-world to a particular set of Scribble primitives, but let the 
> user extend it with arbitrary constructs layered atop those (but you 
> could avoid intractability situations by always preserving the structure 
> the user specifies, and only going to WYSIWYG-ish display when 
> you can determine (programmatically) how the text in the renderer 
> relates to the text of the construct arguments.
> 
> Alternatively, and simpler: you might have two window panes, one in 
> which the user writes Scribble source, and another that gives an 
> almost-live semi-WYSIWYG view of how the source would render. Ideally 
> have the semi-WYSIWYG one approximate UI cues like text cursor point and 
> selection highlighting in the semi-WYSIWG view.
> 
> You could start with the latter, and then later implement the former as 
> an alternative mode that user could switch to/from dynamically. This 
> development path would certainly make your GUI-based selection of 
> regions for arbitrary extensible Scribble constructs, and traceability 
> of text between constructs and semi-WYSIWYG, easier to debug. :)
> 
> You might decide to implement this within the DrRacket framework, which 
> includes a bunch of GUI and support stuff that you'll need anyway, 
> beyond what the Racket `gui` packages provide.
> 
> 
> Jos Koot wrote on 04/29/2017 05:00 PM:
> [...]
>> Indeed I like WYSIWYG,
>> but nowadays I use scribble too (most scribble/manual)
>> (frequently rendering in order to see what I get and
>> looking into the docs in order to see how to get what I want)
>> A very nice thing of scribble is that you can make
>> elaborate procedures and syntax transformers,
>> much easier to write and more flexible and reliable
>> than Java macros in MS-word, I think.
>> And, of course, the @interaction[] and companions,
>> which I don't have in MS-word.
> [...]
> 
> -- 
> 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

Re: [racket-users] RE: student project idea: semi-WYSIWYG Scribble editor (Was: Racket 6.9)

2017-04-29 Thread Matthias Felleisen

What you need to know is — at a high level — how to write a thread that, 
in DrRacket, conceptually clicks the ‘render as HTML’ button every time 
you hit a key. It’s kind of like background syntax checking. except that 
the result shows up in your browser not in DrRacket. So your GUI skills
aren’t really in demand. Just concurrent programming and managing 
threads (you don’t want to run it as a thread but as a place and you 
want to kill threads that don’t finish shipping their stuff to the browser
in time for the next keystroke to be processed.) 





> On Apr 29, 2017, at 6:13 PM, Jos Koot  wrote:
> 
> Hi Neil,
> Your idea crossed my mind when I started to use scribble,
> but I don't think I know enough of Scribble,
> (let alone HTML etc) for such a task.
> I hardly have experience in making Guis.
> I am a simple, but very content user of Racket.
> Thanks to you and all others of PLT,
> Jos
> 
> -Original Message-
> From: Neil Van Dyke [mailto:n...@neilvandyke.org] 
> Sent: sábado, 29 de abril de 2017 23:25
> To: Jos Koot; 'Racket Users'
> Subject: student project idea: semi-WYSIWYG Scribble editor (Was: Racket 6.9)
> 
> If some undergrad wanted a summer programming project... make a 
> semi-WYSIWYG editor for Scribble documents.
> 
> You might have a long scrolling text window, in which things like 
> boldface/italics/color/textsize that Scribble would render are editable 
> text, and Scribble markup itself doesn't appear on-screen. Things like 
> print pagination probably would not appear here, though, but you'll want 
> to special-case what normally ends up as rendered Table of Contents, for 
> navigation purposes.  This can be tricky, especially if you're not 
> closed-world to a particular set of Scribble primitives, but let the 
> user extend it with arbitrary constructs layered atop those (but you 
> could avoid intractability situations by always preserving the structure 
> the user specifies, and only going to WYSIWYG-ish display when 
> you can determine (programmatically) how the text in the renderer 
> relates to the text of the construct arguments.
> 
> Alternatively, and simpler: you might have two window panes, one in 
> which the user writes Scribble source, and another that gives an 
> almost-live semi-WYSIWYG view of how the source would render. Ideally 
> have the semi-WYSIWYG one approximate UI cues like text cursor point and 
> selection highlighting in the semi-WYSIWG view.
> 
> You could start with the latter, and then later implement the former as 
> an alternative mode that user could switch to/from dynamically. This 
> development path would certainly make your GUI-based selection of 
> regions for arbitrary extensible Scribble constructs, and traceability 
> of text between constructs and semi-WYSIWYG, easier to debug. :)
> 
> You might decide to implement this within the DrRacket framework, which 
> includes a bunch of GUI and support stuff that you'll need anyway, 
> beyond what the Racket `gui` packages provide.
> 
> 
> Jos Koot wrote on 04/29/2017 05:00 PM:
> [...]
>> Indeed I like WYSIWYG,
>> but nowadays I use scribble too (most scribble/manual)
>> (frequently rendering in order to see what I get and
>> looking into the docs in order to see how to get what I want)
>> A very nice thing of scribble is that you can make
>> elaborate procedures and syntax transformers,
>> much easier to write and more flexible and reliable
>> than Java macros in MS-word, I think.
>> And, of course, the @interaction[] and companions,
>> which I don't have in MS-word.
> [...]
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.