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

2018-12-27 Thread Neil Van Dyke

Pasting some clarification from a different thread into this one...

Neil Van Dyke wrote on 12/26/18 5:09 PM:
BTW, to be clear (since it took me a while to unravel the vague and 
changing meanings of Jupyter and IPython the other day)...


What I proposed in another thread here was adding an user interface to 
DrRacket that's inspired by Jupyter Notebook and other notebook 
metaphors from stats tools.


There's also a different possible Jupyter angle for Racket, in which 
Racket is a backend for the Jupyter frontends (in lieu of DrRacket).  
I think that approach would also be useful for some people, and Ryan 
Culpepper is already tackling that one (and I wanted to let him 
publicize it on his schedule).


These two different approaches might interoperate, if the first 
approach also saves a Jupyter ".ipynb" file, and then notebooks files 
could be moved back and forth between DrRacket and Jupyter, and run in 
both.




These are two very different "Jupyter-related/inspired" things being 
talked about, both have merit and uses the other does not, and ideally 
both would be done.


I don't want to get into the incomplete list of pros I've thought 
of so far about each approach, but I think probably people can agree 
that a notebook interface in DrRacket (with all its tools, and its GUI 
app properties) is very different than getting Racket backend in a 
Jupyter Notebook Web browser interface.


The two approaches overlap for unusual use cases like "I just want to 
make a screenshot of *a* notebook interface, and I don't care what 
features it has, nor how it works for different people's workflows".  I 
think they'd each have very different strengths and shortcomings, for 
many/most real-world use cases.


(Not mentioning the IPython kernel backend approach was a glaring 
omission from my initial post, but I was consciously trying to avoid 
confusion, or stepping on Ryan's toes, if he wasn't ready to publicize 
his work like I think it deserves.  I should've known that many helpful 
eagle-eyed people would mention it if I didn't.  Maybe I shouldn't have 
referenced the current popularity of Jupyter Notebook at all, picked a 
likely-familiar older math package notebook metaphor to reference, and 
emphasized the desirability of keeping the DrRacket features, to preempt 
off-message Jupyter mentions or prime an objection handler for them.  
I'm a much better engineer/scientist than I am a marketer, and I'd much 
rather work through this kind of system problem myself than try to 
convince others to do so, so please be patient. :)


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


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

2018-12-27 Thread Spencer Florence
One exists:

https://github.com/rmculpepper/iracket

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

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


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

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

Ah! I had no idea. I didn't follow that other thread, and didn't see
an entry in the Jupyter Kernels list so just assumed this was not a
thing yet. Thanks for pointing out the reference to existing work
here!

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



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


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

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

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

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


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

2018-12-26 Thread Andrew Gwozdziewycz
It seems like the better bang for buck might be implementing a Jupyter kernel, 
and leveraging that ecosystem.

https://github.com/jupyter/jupyter/wiki/Jupyter-kernels

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

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


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

2018-12-26 Thread Neil Van Dyke

Stephen De Gabrielle wrote on 12/26/18 7:29 AM:

Would this replace ‘interactions’, or would it be a new editor<%>?


UI conceptual-wise, I think it would probably be a mode, in which 
Notebook window replaces Definitions and Interactions windows. 
Implementation-wise, I suspect it would probably start with the 
Definitions window and its current support for embedded things (like 
XML, comments), and also use work that was done for the REPL 
(evaluation, snips).  Someone would have to work through the details and 
figure out what's best (e.g., does the UI and implementation work better 
if the mode UI is like a toggle on the Definitions window, or a very 
separate thing).


You could imagine the initial notebook save format being a normal Racket 
module source code file, with Markdown/Scribble cells and cached results 
being embedded in comments or special syntax forms. Later, you might 
also want to do an IPython/Jupyter save format, perhaps writing both 
formats every time you save.


(BTW, I think it's important not to conflate this literate-ish format 
with embedded API documentation and unit tests, though there's 
potentially some good overlap for some of that, between notebooks and 
non-notebook reusable/maintainable uses of high-quality Racket modules.)


I wish I could work on this DrRacket notebook mode right now, and I hope 
someone else is inspired to do it well.


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


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

2018-12-26 Thread Stephen De Gabrielle
Like Maxima?

DrRacket interactions already does most of what Jupyter and Maxima does,
but lacks the functionality of cells, and the ability to re-evaluate them.

Would this replace ‘interactions’, or would it be a new editor<%>?

It’s a great idea - it seems a little like  ‘code bubbles’, but for the
repl.

S.

On Thu, 20 Dec 2018 at 10:47, Neil Van Dyke  wrote:

> If anyone is looking to avoid relatives over the winter holiday season,
> here's an idea for a big feature to add to DrRacket (which I really wish
> I could do myself right now)...
>
> If you've not seen a "notebook" interface, like in Jupyter Notebook and
> some other data science-oriented tools, one way to look at it is like a
> literate programming REPL that can be edited, stored to a file, and
> loaded.  You can also share these notebooks with others, or generate
> formats like HTML or Markdown (such as for blog posts).
>
> The notebook is a document that's a sequence of text cells and code
> cells, and the code cells include the output (e.g., expression results,
> displayed plots) from the last time the code cell was evaluated (if it
> was).  Each code cell also displays a small serial number that indicates
> in what order it was last evaluated (if it has been), which is not
> necessarily the top-to-bottom order of the document while you're working
> with it.  Of course, you can clear this code evaluation and output at
> any time, and cause all the code cells to be evaluated in-order.
>
> IIRC, DrRacket emphasizes the Definitions window over the Interactions
> window (aka REPL), to reduce confusion for students.  I think the
> confusion level of the Notebook interface is somewhere between that of
> Definitions window and a REPL.  So the notebook interface might not be
> good for new students, unless they're already comfortable with the
> notebook interface from other classes.
>
> Implementation-wise... the people here who built DrRacket can correct me
> or say more about this, but it seems DrRacket implementation might
> already include most of the difficult work of implementing a notebook
> interface.  The evaluation engine is there, and there's UI for snips in
> the Interaction window, and UI for embedding blocks of other formats in
> the Definitions window.  Maybe combine/adapt that in a new Notebook
> window, or implement this as features of the Definitions window.  Then
> you can decide whether to also implement the JSON save format of Jupyter
> Notebook, for possible later interoperation.  And other things after
> that, like in-buffer Markdown or Scribble rendering of text cells.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+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.