Re: [racket-users] How to discover a struct's interface without Dr Racket?

2021-10-29 Thread Siddhartha Kasivajhula
I was able to find this interface
,
but it doesn't quite provide the same information. E.g. (struct-type-info
struct:foo)

The ability to "introspect" values in a shell (or in the application) is
useful in languages like python (e.g. dir(object) tells you what methods it
provides, help(anything) gives you the interface/function signature,
docstrings, etc.). I haven't seen this style emphasized in Racket
documentation, and that may be because racket isn't object-oriented by
default as python is, so that there often isn't a single object
encapsulating all of this information.

But all the same, if there are analogous facilities in racket, like the
kind Brian asked about, I'd love to know as well.


On Fri, Oct 29, 2021 at 3:14 PM Brian Beckman  wrote:

> Well, as I understand it, a struct (usually? always?), #:transparent or
> not, when declared, defines symbols that are meant to be visible in the
> current scope, so (struct foo (a b)) defines foo #|constructor|#, foo?
> #|instance-predicate|# foo-a and foo-b #|data accessors|# , that I can call
> on instances:
>
> (struct foo (a b))
> (let ([my-foo (foo 42 37)]
>(list (foo? my-foo)
>  (foo-a my-foo)
>  (foo-b my-foo)))  ~~>  '(#t 42 37)
>
> I would like, given only the symbol foo referring to the struct type
> itself, to discover (at least) the list of procedures foo?, foo-a, foo-b,
> plus anything else the author of foo (the type) wants me to see.
>
>
> On Fri, Oct 29, 2021 at 1:45 PM John Clements 
> wrote:
>
>> In the text below, you refer to the “public” interface. Can I ask what
>> you mean by “public” in this context?
>>
>> John
>>
>> > On Oct 29, 2021, at 11:16 AM, Brian Beckman 
>> wrote:
>> >
>> > I believe that run time will be the most plausible use case. I may
>> write macros that refer to struct-procedure names at macro-writing time,
>> but I don't expect to invoke the struct procedures at macro-expansion time.
>> My primary issue is "discoverability:" how can I find out the interface of
>> any struct?
>> >
>> > On Thursday, October 28, 2021 at 1:00:15 PM UTC-7 jackh...@gmail.com
>> wrote:
>> > Are you intending to use the struct procedure names at compile time
>> (such as in a macro) or runtime?
>> >
>> > On Tuesday, October 26, 2021 at 5:02:46 PM UTC-7 bc.be...@gmail.com
>> wrote:
>> > I understand why structs are opaque, by default, but I want to discover
>> the public interface of some struct type, that is, a list of the procedures
>> defined by the struct.
>> >
>> > Here is an example. Suppose I want to find out all the procedures
>> defined on an instance of the syntax struct
>> >
>> > #'42
>> >
>> > Dr. Racket shows an expander clicky that shows some formatted
>> information inside the instance :
>> >
>> >
>> >
>> > Uncapitializing the names in the display reveals the interface:
>> >
>> > (syntax-position #'42) ~~> 790
>> > (syntax-span #'42) ~~> 2
>> > (syntax-original? #'42) ~~> #t
>> >
>> > etc.
>> >
>> > I want to discover those procedure names in my racket program, not
>> manually by visually inspecting graphics in Dr Racket.
>> >
>> > I found this trick for structs that I define:
>> >
>> > #lang racket
>> > (require (for-syntax racket/struct-info))
>> > (require racket/pretty)
>> >
>> > (struct foo (a b))
>> > (begin-for-syntax
>> >   (displayln
>> >(extract-struct-info
>> > (syntax-local-value
>> >  #'foo
>> >
>> > ~~>
>> >
>> >
>> >
>> > but it doesn't work for the syntax type
>> >
>> > (begin-for-syntax
>> >   (displayln
>> >(extract-struct-info
>> > (syntax-local-value
>> >  #'syntax
>> >
>> > ~~>
>> >
>> >
>> >
>> > I'd be grateful for advice and an example of how to get the interface
>> of "syntax" without Dr Racket and without grovelling docs.
>> >
>> > --
>> > 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/8e4ca03e-e276-4c42-a662-4fcf7c994387n%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/CAK2VK6tMxFH0oEq4iCgk7PW-4yJTB8xNr_b3F6GPwQS1MZVLwQ%40mail.gmail.com
> 
> .
>

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

Re: [racket-users] How to discover a struct's interface without Dr Racket?

2021-10-29 Thread Brian Beckman
Well, as I understand it, a struct (usually? always?), #:transparent or
not, when declared, defines symbols that are meant to be visible in the
current scope, so (struct foo (a b)) defines foo #|constructor|#, foo?
#|instance-predicate|# foo-a and foo-b #|data accessors|# , that I can call
on instances:

(struct foo (a b))
(let ([my-foo (foo 42 37)]
   (list (foo? my-foo)
 (foo-a my-foo)
 (foo-b my-foo)))  ~~>  '(#t 42 37)

I would like, given only the symbol foo referring to the struct type
itself, to discover (at least) the list of procedures foo?, foo-a, foo-b,
plus anything else the author of foo (the type) wants me to see.


On Fri, Oct 29, 2021 at 1:45 PM John Clements 
wrote:

> In the text below, you refer to the “public” interface. Can I ask what you
> mean by “public” in this context?
>
> John
>
> > On Oct 29, 2021, at 11:16 AM, Brian Beckman 
> wrote:
> >
> > I believe that run time will be the most plausible use case. I may write
> macros that refer to struct-procedure names at macro-writing time, but I
> don't expect to invoke the struct procedures at macro-expansion time. My
> primary issue is "discoverability:" how can I find out the interface of any
> struct?
> >
> > On Thursday, October 28, 2021 at 1:00:15 PM UTC-7 jackh...@gmail.com
> wrote:
> > Are you intending to use the struct procedure names at compile time
> (such as in a macro) or runtime?
> >
> > On Tuesday, October 26, 2021 at 5:02:46 PM UTC-7 bc.be...@gmail.com
> wrote:
> > I understand why structs are opaque, by default, but I want to discover
> the public interface of some struct type, that is, a list of the procedures
> defined by the struct.
> >
> > Here is an example. Suppose I want to find out all the procedures
> defined on an instance of the syntax struct
> >
> > #'42
> >
> > Dr. Racket shows an expander clicky that shows some formatted
> information inside the instance :
> >
> >
> >
> > Uncapitializing the names in the display reveals the interface:
> >
> > (syntax-position #'42) ~~> 790
> > (syntax-span #'42) ~~> 2
> > (syntax-original? #'42) ~~> #t
> >
> > etc.
> >
> > I want to discover those procedure names in my racket program, not
> manually by visually inspecting graphics in Dr Racket.
> >
> > I found this trick for structs that I define:
> >
> > #lang racket
> > (require (for-syntax racket/struct-info))
> > (require racket/pretty)
> >
> > (struct foo (a b))
> > (begin-for-syntax
> >   (displayln
> >(extract-struct-info
> > (syntax-local-value
> >  #'foo
> >
> > ~~>
> >
> >
> >
> > but it doesn't work for the syntax type
> >
> > (begin-for-syntax
> >   (displayln
> >(extract-struct-info
> > (syntax-local-value
> >  #'syntax
> >
> > ~~>
> >
> >
> >
> > I'd be grateful for advice and an example of how to get the interface of
> "syntax" without Dr Racket and without grovelling docs.
> >
> > --
> > 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/8e4ca03e-e276-4c42-a662-4fcf7c994387n%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/CAK2VK6tMxFH0oEq4iCgk7PW-4yJTB8xNr_b3F6GPwQS1MZVLwQ%40mail.gmail.com.


Re: [racket-users] How to discover a struct's interface without Dr Racket?

2021-10-29 Thread 'John Clements' via Racket Users
In the text below, you refer to the “public” interface. Can I ask what you mean 
by “public” in this context?

John

> On Oct 29, 2021, at 11:16 AM, Brian Beckman  wrote:
> 
> I believe that run time will be the most plausible use case. I may write 
> macros that refer to struct-procedure names at macro-writing time, but I 
> don't expect to invoke the struct procedures at macro-expansion time. My 
> primary issue is "discoverability:" how can I find out the interface of any 
> struct?
> 
> On Thursday, October 28, 2021 at 1:00:15 PM UTC-7 jackh...@gmail.com wrote:
> Are you intending to use the struct procedure names at compile time (such as 
> in a macro) or runtime?
> 
> On Tuesday, October 26, 2021 at 5:02:46 PM UTC-7 bc.be...@gmail.com wrote:
> I understand why structs are opaque, by default, but I want to discover the 
> public interface of some struct type, that is, a list of the procedures 
> defined by the struct.
> 
> Here is an example. Suppose I want to find out all the procedures defined on 
> an instance of the syntax struct
> 
> #'42
> 
> Dr. Racket shows an expander clicky that shows some formatted information 
> inside the instance :
> 
> 
> 
> Uncapitializing the names in the display reveals the interface:
> 
> (syntax-position #'42) ~~> 790
> (syntax-span #'42) ~~> 2
> (syntax-original? #'42) ~~> #t
> 
> etc.
> 
> I want to discover those procedure names in my racket program, not manually 
> by visually inspecting graphics in Dr Racket. 
> 
> I found this trick for structs that I define:
> 
> #lang racket
> (require (for-syntax racket/struct-info))
> (require racket/pretty)
> 
> (struct foo (a b))
> (begin-for-syntax
>   (displayln 
>(extract-struct-info
> (syntax-local-value
>  #'foo
> 
> ~~>
> 
> 
> 
> but it doesn't work for the syntax type
> 
> (begin-for-syntax
>   (displayln 
>(extract-struct-info
> (syntax-local-value
>  #'syntax
> 
> ~~>
> 
> 
> 
> I'd be grateful for advice and an example of how to get the interface of 
> "syntax" without Dr Racket and without grovelling docs.
> 
> -- 
> 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/8e4ca03e-e276-4c42-a662-4fcf7c994387n%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/281a49f3-7870-48ca-888b-d3e5002b0f24%40mtasv.net.


[racket-users] Re: How to discover a struct's interface without Dr Racket?

2021-10-29 Thread Brian Beckman
I believe that run time will be the most plausible use case. I may write 
macros that refer to struct-procedure names at macro-writing time, but I 
don't expect to invoke the struct procedures at macro-expansion time. My 
primary issue is "discoverability:" how can I find out the interface of any 
struct?

On Thursday, October 28, 2021 at 1:00:15 PM UTC-7 jackh...@gmail.com wrote:

> Are you intending to use the struct procedure names at compile time (such 
> as in a macro) or runtime?
>
> On Tuesday, October 26, 2021 at 5:02:46 PM UTC-7 bc.be...@gmail.com wrote:
>
>> I understand why structs are opaque, by default, but I want to discover 
>> the public interface of some struct type, that is, a list of the procedures 
>> defined by the struct.
>>
>> Here is an example. Suppose I want to find out all the procedures defined 
>> on an instance of the syntax struct
>>
>> #'42
>>
>> Dr. Racket shows an expander clicky that shows some formatted information 
>> inside the instance :
>>
>> [image: Screenshot from 2021-10-26 16-51-37.png]
>>
>> Uncapitializing the names in the display reveals the interface:
>>
>> (syntax-position #'42) ~~> 790
>> (syntax-span #'42) ~~> 2
>> (syntax-original? #'42) ~~> #t
>>
>> etc.
>>
>> I want to discover those procedure names in my racket program, not 
>> manually by visually inspecting graphics in Dr Racket. 
>>
>> I found this trick for structs that I define:
>>
>> #lang racket
>> (require (for-syntax racket/struct-info))
>> (require racket/pretty)
>>
>> (struct foo (a b))
>> (begin-for-syntax
>>   (displayln 
>>(extract-struct-info
>> (syntax-local-value
>>  #'foo
>>
>> ~~>
>>
>> [image: Screenshot from 2021-10-26 16-59-19.png]
>>
>> but it doesn't work for the syntax type
>>
>> (begin-for-syntax
>>   (displayln 
>>(extract-struct-info
>> (syntax-local-value
>>  #'syntax
>>
>> ~~>
>>
>> [image: Screenshot from 2021-10-26 17-00-33.png]
>>
>> I'd be grateful for advice and an example of how to get the interface of 
>> "syntax" without Dr Racket and without grovelling docs.
>>
>

-- 
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/8e4ca03e-e276-4c42-a662-4fcf7c994387n%40googlegroups.com.


[racket-users] Trends in Functional Programming in Education 2022 call for submissions

2021-10-29 Thread 'Elena Machkasova' via Racket Users
TFPIE 2022 Call for papers
https://wiki.tfpie.science.ru.nl/TFPIE2022
(February 11th 2022, Krakow, Poland co-located with TFP 2022 and Lambda 
Days)

TFPIE 2022 welcomes submissions describing techniques used in the 
classroom, tools used in and/or developed for the classroom and any 
creative use of functional programming (FP) to aid education in or outside 
Computer Science. Topics of interest include, but are not limited to:

  FP and beginning CS students
  FP and Computational Thinking
  FP and Artificial Intelligence
  FP in Robotics
  FP and Music
  Advanced FP for undergraduates
  FP in graduate education
  Engaging students in research using FP
  FP in Programming Languages
  FP in the high school curriculum
  FP as a stepping stone to other CS topics
  FP and Philosophy
  The pedagogy of teaching FP
  FP and e-learning: MOOCs, automated assessment etc.
  Best Lectures - more details below

In addition to papers, we are requesting best lecture presentations. What's 
your
best lecture topic in an FP related course? Do you have a fun way to 
present FP
concepts to novices or perhaps an especially interesting presentation of a
difficult topic? In either case, please consider sharing it. Best lecture 
topics
will be selected for presentation based on a short abstract describing the
lecture and its interest to TFPIE attendees. The length of the presentation
should be comparable to that of a paper. In addition, the speaker can 
provide
commentary on effectiveness or student feedback.

Submissions

Potential presenters are invited to submit an extended abstract (4-6 pages) 
or
a draft paper (up to 20 pages) in EPTCS style. The authors of accepted 
presentations will have their preprints and their slides made available on 
the workshop's website. Papers and abstracts can be submitted via easychair 
at the following link:

https://easychair.org/conferences/?conf=tfpie2022

After the workshop, presenters are invited to submit (a revised version of) 
their
article for the formal review. The PC will select the best articles for 
publication
in the Electronic Proceedings in Theoretical Computer Science (EPTCS). 
Articles rejected for presentation and extended abstracts will not be 
formally reviewed by the PC.

Important Dates:

 Submission deadline: January 5th 2022, Anywhere on Earth.
 Notification: January 10th 2022 (Note: earlier submissions will receive 
earlier response)
 TFPIE Registration Deadline: TBA
 Workshop: February 11th 2022
 Submission for formal review: April 15th 2022, Anywhere on Earth.
 Notification of full article: June 1st 2022
 Camera ready: July 1st 2022

Program Committee:

Peter Achten, Radboud University, Netherlands
Stephen Chang, University of Massachusetts Boston, USA
John Hughes, Chalmers University of Technology, Sweden
Elena Machkasova (Chair) - University of Minnesota Morris, USA
Kristina Sojakova - INRIA, Paris, France
Melinda Tóth, Eötvös Loránd University, Budapest, Hungary

Registration information:

This year TFPIE takes place on the second day of the Lambda Days, 
concurrent with TFP. Participants will need to register for the Lambda 
Days. Please note that TFP and TFPIE have in-person attendance only. For 
registration fee, the deadlines, and the link to register see the Lambda 
Days web site:
https://www.lambdadays.org/lambdadays2022

Registration and attendance are mandatory for at least one author of every 
paper that is presented at the workshop. Presenters will have their 
registration fee waived.

Only papers that have been presented at TFPIE may be submitted to the 
post-reviewing process.

Best regards,
Elena Machkasova,

  --
Dr. Elena Machkasova
Associate Professor of Computer Science
Division of Science and Mathematics
University of Minnesota, Morris
Office: Sci 2325
(320) 589-6308
http://cda.morris.umn.edu/~elenam/
Pronouns: she/her/hers or any other

-- 
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/d5839f44-458a-4bc2-807f-8684b12ef303n%40googlegroups.com.


[racket-users] Call for Contributions: BOB 2022 [March 11, Deadline Dec 6]

2021-10-29 Thread Michael Sperber


Send us some proposals for Racket talks!


 BOB Conference 2022
 "What happens when we use what's best for a change?"
  http://bobkonf.de/2022/cfc.html
 Berlin, Mar 11
Call for Contributions
 Deadline: December 6, 2021


You are actively engaged in advanced software engineering methods,
solve ambitious problem with software and are open to cutting-edge
innovation? Attend this conference, meet people that share your goals,
and get to know the best software tools and technologies available
today. We strive to offer a day full of new experiences and
impressions that you can use to immediately improve your daily life as
a software developer.

If you share our vision and want to contribute, submit a proposal for
a talk or tutorial!

NOTE: The conference fee will be waived for presenters. Travel
expenses will not be covered (for exceptions see "Speaker Grants").

Online or Onsite


We expect we'll be able to hold BOB 2022 in Berlin. If that is not
possible, we'll make BOB a successful online event, like BOB
2021. Should BOB happen online, we will likely ask for pre-recorded
talks to make room for questions and social interactions during the
actual conference day. (Of course, we'll provide assistance making
those recordings.) Tutorials will likely happen as a live-session.

Shepherding
---

The program committee offers shepherding to all speakers. Shepherding
provides speakers assistance with preparing their
sessions. Specifically:

- advice on structure and presentation
- review of talk slides
- assistance with recording
- review of recording, if applicable

Speaker Grants
--

BOB has Speaker Grants available to support speakers from groups
under-represented in technology. We specifically seek women speakers,
speakers of color, and speakers who are not able to attend the
conference for financial reasons.

Topics
--

We are looking for talks about best-of-breed software technology, e.g.:

- functional programming
- persistent data structures and databases
- event-based modelling and architecture
- "fancy types" (dependent types, gradual typing, linear types, ...)
- formal methods for correctness and robustness
- abstractions for concurrency and parallelism
- metaprogramming
- probabilistic programming
- math and programming
- controlled side effects
- program synthesis
- next-generation IDEs
- effective abstractions for data analytics
- … everything really that isn’t mainstream, but you think should be.

Presenters should provide the audience with information that is
practically useful for software developers.

Challenges
--

Furthermore, we seek contributions on successful approaches for
solving hard problems, for example:

- bias in machine-learning systems
- digital transformation in difficult settings
- accessibiltity
- systems with critical reliability requirements
- ecologically sustainable software development

We're especially interested in experience reports.
Other topics are also relevant, e.g.:

- introductory talks on technical background
- overviews of a given field
- demos and how-tos

Requirements


We accept proposals for presentations of 45 minutes (40 minutes talk +
5 minutes questions), as well as 90 minute tutorials for
beginners. The language of presentation should be either English or
German.

Your proposal should include (in your presentation language of choice):

- An abstract of max. 1500 characters.
- A short bio/cv
- Contact information (including at least email address)
- A list of 3-5 concrete ideas of how your work can be applied in a developer's 
daily life
- additional material (websites, blogs, slides, videos of past presentations, …)
- Don't be confused: The system calls a submission event.

Organisation


- Direct questions to contact at bobkonf dot de
- Proposal deadline: December 6, 2021
- Notification: December 17, 2021
- Program: December 22, 2021

Submit here:

https://bobcfc.active-group.de/en/bob2022/cfp

Program Committee
-

(more information here: https://bobkonf.de/2022/programmkomitee.html)

- Matthias Fischmann, Wire
- Matthias Neubauer, SICK AG
- Nicole Rauch, Softwareentwicklung und Entwicklungscoaching
- Michael Sperber, Active Group
- Stefan Wehr, Hochschule Offenburg

Scientific Advisory Board

- Annette Bieniusa, TU Kaiserslautern
- Torsten Grust, Uni Tübingen
- Peter Thiemann, Uni Freiburg

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