[racket-users] Re: Removing duplicates from a list while still maintaining order in Dr. Racket.

2020-07-21 Thread Prabhakar Ragde
Could you point us to the original homework question so we can be sure of 
the requirements? Thanks.

On Monday, July 20, 2020 at 12:04:45 PM UTC-4, JJ C wrote:
>
> In Beginning Student with List Abbreviations
>
> I am struggling to come up with functions to remove duplicates from a list 
> while maintaining the order of the list.
>
> one function to remove duplicates from the left,
>
> i.e. 1 2 1 3 2 4 5 -> 1 2 3 4 5
>
> and one from the right.
>
> i.e. 1 2 1 3 2 4 5 -> 1 3 2 4 5
>
> What are the functions for removing duplicates from each left and right 
> side? If you need to, use helper functions and append, cond, cons, equal?, 
> etc but not using reverse or any built-in functions.
>

-- 
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/d99af45d-b59c-4878-83b8-c77d145858bbo%40googlegroups.com.


[racket-users] Re: Understanding P. Ragde's Proust

2020-06-30 Thread Prabhakar Ragde
The "free online resource" I alluded to earlier is up on my Web page now.

https://cs.uwaterloo.ca/~plragde/flaneries/LACI/

I call it a "flânerie", but it's a mini-textbook on logic and proof 
assistants, using Racket to first construct a small proof assistant 
(Proust), expanding it to handle propositional and predicate logic, and 
then moving into discussion of the much larger Agda and Coq systems. --PR

On Monday, March 16, 2020 at 8:25:38 AM UTC-4, Adrian Manea wrote:
>
> Dear Prof. Ragde,
>
> Thank you very much for the reply! I watched your talk at the Racket con 
> more carefully today and noticed you specifically point out that you don't 
> give your students the whole code and that the entire project is presented 
> as a "proof of concept" and used especially for didactic purposes.
>
> I totally appreciate this approach and I have to say I don't feel quite 
> prepared to fill in the details myself. So I'm doing my best to learn some 
> preliminaries and general Racket first!
>
> Thank you,
> Adrian
>
> On Monday, March 16, 2020 at 12:08:51 PM UTC, Prabhakar Ragde wrote:
>>
>>
>> Hi! Sorry, I only get this list as a digest, so I didn't see your message 
>> until this morning. The code in the paper is not complete, and the paper 
>> isn't written so that a beginner in Racket could easily extract a working 
>> program from it. When I teach students this material, I give them a working 
>> starter file, and I will send that to you by private email, where we can 
>> also continue to discuss as needed.
>>
>> I am at this moment working on converting my course materials on this 
>> topic into a free online resource similar to the one I did for functional 
>> data structures. But this is not ready yet. I hope to finish it in the next 
>> few months and I will post here when it is ready. --PR
>>
>

-- 
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/1f0d4dd7-6534-4a66-9d45-525e31c1b436o%40googlegroups.com.


[racket-users] Re: Understanding P. Ragde's Proust

2020-03-16 Thread Prabhakar Ragde


On Sunday, March 15, 2020 at 10:00:59 AM UTC-4, Adrian Manea wrote:
>
>
> I'm a mathematician delving into type theory and proof assistants and with 
> special interests in Racket.
>
> I'm now trying to understand and implement P. Ragde's Proust 
>  "nano proof assistant" and work 
> through the examples in his article. However, I'm pretty much a beginner in 
> Racket and I'm getting some errors.
>

Hi! Sorry, I only get this list as a digest, so I didn't see your message 
until this morning. The code in the paper is not complete, and the paper 
isn't written so that a beginner in Racket could easily extract a working 
program from it. When I teach students this material, I give them a working 
starter file, and I will send that to you by private email, where we can 
also continue to discuss as needed.

I am at this moment working on converting my course materials on this topic 
into a free online resource similar to the one I did for functional data 
structures. But this is not ready yet. I hope to finish it in the next few 
months and I will post here when it is ready. --PR

-- 
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/55610873-9554-4ce5-b5a6-33a7d29524bb%40googlegroups.com.


[racket-users] Re: Getting young children started with Racket

2018-03-04 Thread Prabhakar Ragde
On Saturday, March 3, 2018 at 8:41:16 AM UTC-5, Paulo Matos wrote:
>
> Hello, 
>
> I have a 7yo daughter currently in 1st grade (Germany) and she was given 
> a password for the school computer. Having never touched a computer 
> before she is now being introduced to typing and the mouse. 
>
> I wonder if anyone has any experience with the following: 
>
> 1. Is it useful for a child this age to get introduced to programming if 
> they are not actively looking to learn? 
> 2. Is racket a good way to introduce it? 
> 3. Is 7yo / 1st grade a good time or too early and I should wait?
>

I used Racket with both my children at age 9. Here is a short writeup about 
it originally posted to this mailing list.

https://web.archive.org/web/20080612194829/http://home.adelphi.edu/sbloch/class/hs/testimonials/prabhakar.shtml

In answer to your questions, I would say (1) Demo it and see what they 
think, but let it be their decision; (2) Yes, the best one I know of!; (3) 
They need the potential to grasp the abstractions that an identifier may 
refer to a specific value or may range over all values, and the ability to 
distinguish those two situations. Seven might be a bit young, but you know 
your child best. Bootstrap did not exist when my children were the right 
age, and I would definitely think about that now.

Neil is right that some light instruction combined with suggested but not 
required exercises and encouragement to explore is best. Of course that has 
to be tailored to the situation. Exploration can be frustrating if things 
are obscure or counterintuitive. And my younger child wanted to learn how 
to use Terminal in OS X by typing things into it. I had to explain why that 
was dangerous! --PR


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


[racket-users] Good Data Structures Book?

2016-12-14 Thread Prabhakar Ragde

Lawrence Bottorff wrote:


Can someone suggest a good text for data structures that would
compatible with Racket? All I see are treatments using C/C++, Java,
Python, i.e., the usual suspects. Or, how do you people at
Racket-friendly/based universities teach undergrad data structures?


I am developing such a course for a spring term (May-August) offering at 
the University of Waterloo (though it will probably use OCaml). There 
does not appear to be an ideal textbook; I plan to synthesize materials. 
There are FP books which cover some of the material in various 
languages: Simon Thompson's Haskell book, Algorithms by Rabhi and 
Lapalme (also Haskell), Larry Paulson's ML book. (In my opinion, Okasaki 
and Bird are too advanced for a first DS course.) Mark Allen Weiss's DS 
book in C is the best conventional book I have found; it is not afraid 
of recursion.


One issue is that an early FP approach may well cover some topics from a 
typical DS course, since it is possible to do so earlier. Examples from 
my own experience include various sorting algorithms, O-notation and 
algorithm analysis, various heap implementations of priority queues, 
treaps, AVL trees, RB trees, AA trees, tries, and KMP text search. I 
have covered these in various incarnations of first-year Racket courses 
(not all at once).


I'd be happy to consult if you are considering developing a course. --PR

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


[racket-users] slow LaTeX error output while using Scribble?

2016-03-29 Thread Prabhakar Ragde
I've started to do Scribble work within DrRacket with 6.4, and I've 
noticed that when I use the "Scribble PDF" button, and something goes 
wrong, the copious LaTeX error output that shows up in the Interactions 
window is much slower to scroll to completion than before (on the order 
of tens of seconds, where it used to be nearly instantaneous once it 
started to appear). Has anyone else noticed this? --PR


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


[racket-users] Scribble PDF button on OS X 10.11

2016-01-12 Thread Prabhakar Ragde
I upgraded to OS X 10.11 (El Capitan), and now when I launch DrRacket 
from the Dock, the "Scribble PDF" button cannot find the pdflatex 
executable. Upgrades tend to mess things up but in this case 
/usr/local/texbin no longer exists and cannot be created in the new OS. 
It was a symlink to /usr/local/texlive/... before, and I put a symlink 
to that where I could create one and put that path in my .bash_profile 
and in /etc/paths. Now I can launch DrRacket from Terminal and it works. 
But not from the Dock.


This is not really a Racket problem, but I hope someone reading this has 
encountered and has a solution. Thanks. --PR


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


[racket-users] TeX- and LaTeX-inspired keybindings

2015-07-14 Thread Prabhakar Ragde
Is there a simple way to extend the list of these and/or provide 
synonyms? (DrRacket documentation, section 3.3.8.) I would like to, for 
example, be able to type \and, or at least \land, rather than \wedge. 
Thanks. --PR


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


[racket-users] Re: Removing duplicates from a list while maintaining order

2015-06-03 Thread Prabhakar Ragde
This is a homework question of mine (though I don't think the OP is 
doing homework for a course for credit; I'd be curious to know where he 
found it). I usually state the restrictions on 'reverse' and 'remove', 
but not 'member?'. The restriction on 'reverse' is so that students 
don't write one of the functions by reversing, calling the other, 
reversing again. Also sometimes when students violate structural 
recursion, they get a reversed result, and I don't want them applying 
'reverse' as a quick fix. The restriction on 'remove' is on the built-in 
function of that name, because it only removes one element, and using it 
leads students away from structural recursion. Recently I have taken to 
hinting that they should write something like remove*. --PR


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