Re: [racket-users] How to set type signature for recursive lazy list

2021-07-13 Thread Ben Greenman
On 7/13/21, Kiong-Gē Liāu  wrote:
> Ben,
>
> Thanks, changing "stream" to "stream apply" does solve the issue.
>
> I tried to push it further little bit with the following code to see if
> typed racket can support generic like Haskell or Scala:
>
> #lang typed/racket
>
> (require pfds/stream)
>
>
> (define-type (OverFoldable A) (-> (Listof A) A))
>
> (define-type (FibStreamCons A) (-> (Listof A) (Stream A)))
>
> (define-type (FibStream A) (-> (OverFoldable A) (Listof A) (Stream A)))
>
> (: sum (OverFoldable Number))
> (define (sum xs) (apply + xs))
>
> (: gfib_2 (All (A) (FibStream A)))
> (define (gfib_2 f xs)
>   (: gfib_t (All (A) (FibStreamCons A)))
>   (define (gfib_t ys)
> (stream-cons (last ys) (gfib_t (append (cdr ys) (list (f ys))
>   (stream-append (apply stream (drop-right xs 1)) (gfib_t xs)))
>
> However, I got the following error message:
>
> ; /home/kiong-ge/Programming/Racket/typed_racket_test.rkt:28:61: Type
> Checker: type mismatch
> ;   expected: (Listof A)
> ;   given: (Listof A)
> ;   in: ys
>
> But, according to this error message, expected and given types are exactly
> the same, not sure how to deal with this issue.

I think the problem is 2 different type variables that both print as
the letter A.

When I remove the "All" from the type for gfib_t (FibStreamCons A), it
typechecks.

-- 
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/CAFUu9R5nuj-peuqFRVFRR6fKY4waAwaXNdTbmJzNfVTBBx9GbQ%40mail.gmail.com.


Re: [racket-users] How to set type signature for recursive lazy list

2021-07-13 Thread Kiong-Gē Liāu
Ben, 

Thanks, changing "stream" to "stream apply" does solve the issue. 

I tried to push it further little bit with the following code to see if 
typed racket can support generic like Haskell or Scala: 

#lang typed/racket

(require pfds/stream)


(define-type (OverFoldable A) (-> (Listof A) A))

(define-type (FibStreamCons A) (-> (Listof A) (Stream A)))

(define-type (FibStream A) (-> (OverFoldable A) (Listof A) (Stream A)))

(: sum (OverFoldable Number))
(define (sum xs) (apply + xs))

(: gfib_2 (All (A) (FibStream A)))
(define (gfib_2 f xs)
  (: gfib_t (All (A) (FibStreamCons A)))
  (define (gfib_t ys) 
(stream-cons (last ys) (gfib_t (append (cdr ys) (list (f ys))
  (stream-append (apply stream (drop-right xs 1)) (gfib_t xs)))

However, I got the following error message:

; /home/kiong-ge/Programming/Racket/typed_racket_test.rkt:28:61: Type 
Checker: type mismatch
;   expected: (Listof A)
;   given: (Listof A)
;   in: ys

But, according to this error message, expected and given types are exactly 
the same, not sure how to deal with this issue. 

Thanks, 
Kiong-Gē. 





On Monday, July 12, 2021 at 10:03:42 AM UTC-5 Ben Greenman wrote:

> On 7/11/21, Kiong-Gē Liāu  wrote:
> > Hi, in non-typed racket, I can define a generalized Fibonacci sequence
> >
> > X[n+k] = f(X[n], X[n+1], , X[n+k-1])
> >
> > using the following code
> >
> > #lang racket
> >
> > (require racket/stream)
> >
> > (define (gfib f xs)
> > (define (gfib_t xs)
> > (stream-cons (last xs) (gfib_t (append (cdr xs) (list (f xs))
> > (stream-append (drop-right xs 1) (gfib_t xs)))
> >
> > (define (sum xs) (apply + xs))
> > ;; Example of a (0, 1) initialized Fibonacci sequence
> > (define gfib20 (gfib sum '(0 1 )))
> >
> > But using typed racket, the following code
> >
> > #lang typed/racket
> >
> > (require pfds/stream)
> >
> > (define (sum [xs : (Listof Number)] ) (apply + xs))
> >
> > (define (gfib [f : (-> (Listof Number) Number)] [xs : (Listof Number)] )
> > (define (gfib_t [ys : (Listof Number)] )
> > (stream-cons (last ys) (gfib_t (append (cdr ys) (list (f ys))
> > (stream-append (stream (drop-right xs 1)) (gfib_t xs)))
> >
> > leads to error message
> >
> > ; /home/kiong-ge/Programming/Racket/typed_racket_test.rkt:8:11: Type
> > Checker: insufficient type information to typecheck. please add more type
> > annotations
> > ; in: gfib_t
> >
> > How should I set the type signature in the typed racket in order to get 
> the
> > same result generated non-typed racket code ?
> >
> > Thanks,
> > Kiong-Ge.
>
> First, gfib_t needs a return type annotation. You can either add `:
> (Stream Number)` to the end of the line, or write a full signature
> above the define
>
> (: gfib_t (-> (Listof Number) (Stream Number)))
> (define (gfib_t ys)
>
> After this, the typechecker can run. But it finds a problem with
> stream-append. The issue here is that the two arguments to
> stream-append have different types. One contains lists of numbers and
> the other contains numbers.
>
> typed.rkt:11:2: Type Checker: Polymorphic function `stream-append'
> could not be applied to arguments:
> Argument 1:
> Expected: (Rec Stream (U (Boxof (U (-> (Pairof A Stream)) (Pairof
> A Stream))) Null))
> Given: (Rec x₀ (U (Boxof (U (-> (Pairof (Listof Number) x₀))
> (Pairof (Listof Number) x₀))) Null))
> Argument 2:
> Expected: (Rec Stream (U (Boxof (U (-> (Pairof A Stream)) (Pairof
> A Stream))) Null))
> Given: (Rec x₀ (U (Boxof (U (-> (Pairof Number x₀)) (Pairof
> Number x₀))) Null))
>
> in: (stream-append (stream (drop-right xs 1)) (gfib_t xs))
>
> Change (stream (drop-right xs 1)) to (apply stream (drop-right xs 1))
> and you should be OK.
>
> (It might be possible to call stream-append with a list and a stream
> --- like the untyped code does --- but I haven't figured out how to do
> that. Better stick with the Stream datatype.)
>

-- 
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/96dd8061-da49-4d53-9d04-244c186bd640n%40googlegroups.com.


Re: [racket-users] Question from a beginner. Why Racket Over Scheme?

2021-07-13 Thread 'John Clements' via Racket Users
Allow me to be very slightly less cautious than Robby: it may not be clear from 
this text that nearly every BSL program is also a Racket program *and* a Scheme 
program. If you work through HtDP—or even a part of it—you will be, I claim,  
both a Scheme and a Racket programmer. (And perhaps also a better Python, C, 
and Haskell programmer).

In other words: if your concern is that HtDP will not teach you Scheme, you 
need not worry.

John

> On Jul 13, 2021, at 11:19, Robby Findler  wrote:
> 
> I would say that the stuff in HtDP is teaching you the fundamentals of 
> programming; it isn't (about) teaching you a specific programming language. 
> These fundamentals apply to any programming language you might wish to 
> program in. And, of course, the book does use a (set of) languages to teach 
> you, but that's more about having something so that you can practice than it 
> is about teaching you the specifics of BSL.
> 
> If your goal is to learn how to program, just in general, I think HtDP is the 
> book for you. If your goal is something else, then HtDP may not be for you.
> 
> I should also add that I think that the learning the fundamentals of how to 
> program is a wonderful thing and I am very happy that I have learned them. It 
> is even better than my job overlaps with my favorite hobby (which happens to 
> be programming); I consider myself extremely lucky because of that!
> 
> best,
> Robby
> 
> 
> On Tue, Jul 13, 2021 at 10:12 AM joseph turco  
> wrote:
> I see. The stuff in HtDP, does it transfer over to any Racket syntax?
> 
> On Tue, Jul 13, 2021 at 10:56 AM George Neuner  wrote:
> 
> On 7/13/2021 10:13 AM, joseph turco wrote:
>> Hello,
>> 
>> Im am looking at learning a programming language, and have been bouncing 
>> around with scheme/racket/dyalog APL/squeak. upon investigation of scheme 
>> and racket, i found that in regards to racket, there really isn't a 
>> "Beginners book" that teaches the language. The only beginner book i could 
>> really see being close to teaching the language is HtDP, but that doesn't 
>> technically teach racket, but BSL. For scheme, im able to find beginner 
>> books, unless im not looking deep enough. Maybe if you fine folk don't mind 
>> pointing me in the right direction? Please excuse my ignorance.
>> 
>> -- Joseph T
> 
> Welcome.
> 
> Racket[*] largely is based on Scheme, and so much of what you learn about 
> Scheme will transfer.  Racket supports R5RS and R6RS Scheme as legacy 
> languages, so you can learn about Scheme /using/ Racket and its tools.  Then 
> when you are more comfortable, you can transition to using the Racket module 
> language instead.
> 
> George
> [*]  At least the untyped Racket language.  Racket really is a /suite/ of 
> languages: there also is a typed Racket, a lazy Racket, and various DSLs 
> (domain languages) which compile to and (mostly) freely intermix with Racket.
> 
> 
> -- 
> 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/CADhp54TpmGXSVDTjbcL%3DYqxiQDmytrMotcxJ7oKgTnniPQOwmg%40mail.gmail.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/CAL3TdONjgSWi3fpY9yAyvzpsFqW-cCzqQYCbhpUeMK_te_R49w%40mail.gmail.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/76ed8878-cf98-4835-a87b-53d2a750676b%40mtasv.net.


[racket-users] Re: Racket web-server question

2021-07-13 Thread Rohan Posthumus

Good evening Simon,

Thank you so much for all your suggestions. I finally figured it out (after 
going down a few rabbit holes).
It wasn't the database/connection that was the problem. When I used other 
software to view the tables, I could see that the queries were correct.
My mistake was that I did not understand a few of Racket's concepts (xexpr, 
quoting, interop between #lang etc.). 
I ended up rewriting #lang scribble/html code to xexpr and everything just 
worked after that.

Thanks again for your (and David Storrs') inputs. My app is a couple of 
thousands of lines of Racket code and no errors:-)

Kind regards
Rohan


On Thursday, July 8, 2021 at 5:33:07 PM UTC+2 schle...@gmail.com wrote:

> That is strange, I haven't had that problem.
> I assume you are using a sqlite db that is stored in a file? (not an in 
> memory one because that would be reset everytime?)
> Are you sure you aren't doing your updates in some kind of transaction 
> that remains unfinished for some reason for a long time?
>
> Not really sure how to help you, without more information.
> Things you could try:
> different/newer sqlite versions, e.g. by using bogdan's 
> https://pkgs.racket-lang.org/package/libsqlite3
> try the `#:use-place #t` parameter in the `sqlite3-connect` function and 
> see if that changes anything.
> maybe try to create a minimal example and see if that still has that 
> problem and share that code, so we can try to reproduce the problem
>
> Whats your racket and sqlite version?
> What OS / architecture are you on?
> Have you tried a crud with only racket scripts and sqlite? (trying without 
> the webserver to make the test simpler and know that that part can be 
> ignored by bug analysis)
>
> I am not sure whether there exists any verbose logging that could be 
> enabled for db interactions.
> This issue suggests there is a bit of logging, that could need better 
> documentation: https://github.com/racket/db/issues/10
>
> Simon
> rohanpo...@gmail.com schrieb am Dienstag, 6. Juli 2021 um 09:53:41 UTC+2:
>
>> Good morning everyone,
>>
>> Sorry, this is a bit of a noob question, but this is my first Racket 
>> program :-)
>> I build a CRUD in Racket web-server, everything seems to work well but my 
>> Sqlite database does not update the data until I restart the server. I 
>> tried a few things, but all in vain. 
>>
>> Any suggestions?
>>
>> Kind regards
>> Rohan
>>
>

-- 
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/494ff1f5-82d5-4eac-92c4-ec7814efac3en%40googlegroups.com.


Re: [racket-users] Right click on hierarchical-list-item?

2021-07-13 Thread Chris Lemmer-Webber
Just found out about keymaps.  Well!  That seems to be the answer.
Thanks :)

Chris Lemmer-Webber writes:

> Hello,
>
> I'm using the mrlib/hierlist in a GUI I have, and I wanted to add a
> right-click menu.  I'm trying to do that, but I can't find an
> appropriate place to notice the event.
>
> I noticed I can set up a clickback, but it doesn't seem aware of whether
> it's a right or left button click.  I have the following code:
>
>
> (define (set-text-mixin room room-channel room-ui-manager)
>   (mixin (hierarchical-list-item<%>)
>   ((interface () set-text))
> (inherit get-editor)
> (super-new)
> ; set-text: this sets the label of the item
> (define/public (set-text str)
>   (define t (get-editor))  ; a text% object
>   (send t erase)
>   ;; We need a way to capture right-clicks, so we're creating our
>   ;; own snip here
>   (define str-snip
> (new (class string-snip%
>(super-new)
>(define/override (on-event dc x y editorx editory ev)
>  ;; pk is a print debug tool, should print this out
>  (pk 'on-event dc x y editorx editory ev)
>  (super on-event dc x y editorx editory ev)
>   (send str-snip insert str (string-length str) 0)
>   (send t insert str-snip))
> (define/public (get-room)
>   room)
> (define/public (get-room-channel)
>   room-channel)
> (define/public (install-as-current)
>   ($ room-ui-manager 'install-as-current
>
> This does set the text of the item appropriately, and I figured trying
> to override the string-snip, but the pk (print debug) inside of the
> overridden on-event never gets called.  Not sure why.  Does on-event
> never get passed through to the snips inside of heirarchical list menu
> items?
>
> Is there a better, simpler solution?

-- 
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/87im1ennda.fsf%40dustycloud.org.


[racket-users] Right click on hierarchical-list-item?

2021-07-13 Thread Chris Lemmer-Webber
Hello,

I'm using the mrlib/hierlist in a GUI I have, and I wanted to add a
right-click menu.  I'm trying to do that, but I can't find an
appropriate place to notice the event.

I noticed I can set up a clickback, but it doesn't seem aware of whether
it's a right or left button click.  I have the following code:


(define (set-text-mixin room room-channel room-ui-manager)
  (mixin (hierarchical-list-item<%>)
  ((interface () set-text))
(inherit get-editor)
(super-new)
; set-text: this sets the label of the item
(define/public (set-text str)
  (define t (get-editor))  ; a text% object
  (send t erase)
  ;; We need a way to capture right-clicks, so we're creating our
  ;; own snip here
  (define str-snip
(new (class string-snip%
   (super-new)
   (define/override (on-event dc x y editorx editory ev)
 ;; pk is a print debug tool, should print this out
 (pk 'on-event dc x y editorx editory ev)
 (super on-event dc x y editorx editory ev)
  (send str-snip insert str (string-length str) 0)
  (send t insert str-snip))
(define/public (get-room)
  room)
(define/public (get-room-channel)
  room-channel)
(define/public (install-as-current)
  ($ room-ui-manager 'install-as-current

This does set the text of the item appropriately, and I figured trying
to override the string-snip, but the pk (print debug) inside of the
overridden on-event never gets called.  Not sure why.  Does on-event
never get passed through to the snips inside of heirarchical list menu
items?

Is there a better, simpler solution?

-- 
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/87lf6ano18.fsf%40dustycloud.org.


Re: [racket-users] Question from a beginner. Why Racket Over Scheme?

2021-07-13 Thread Robby Findler
I would say that the stuff in HtDP is teaching you the fundamentals of
programming; it isn't (about) teaching you a specific programming language.
These fundamentals apply to any programming language you might wish to
program in. And, of course, the book does use a (set of) languages to teach
you, but that's more about having something so that you can practice than
it is about teaching you the specifics of BSL.

If your goal is to learn how to program, just in general, I think HtDP is
the book for you. If your goal is something else, then HtDP may not be for
you.

I should also add that I think that the learning the fundamentals of how to
program is a wonderful thing and I am very happy that I have learned them.
It is even better than my job overlaps with my favorite hobby (which
happens to be programming); I consider myself extremely lucky because of
that!

best,
Robby


On Tue, Jul 13, 2021 at 10:12 AM joseph turco 
wrote:

> I see. The stuff in HtDP, does it transfer over to any Racket syntax?
>
> On Tue, Jul 13, 2021 at 10:56 AM George Neuner 
> wrote:
>
>>
>> On 7/13/2021 10:13 AM, joseph turco wrote:
>>
>> Hello,
>>
>> Im am looking at learning a programming language, and have been
>> bouncing around with scheme/racket/dyalog APL/squeak. upon investigation of
>> scheme and racket, i found that in regards to racket, there really isn't a
>> "Beginners book" that teaches the language. The only beginner book i could
>> really see being close to teaching the language is HtDP, but that doesn't
>> *technically* teach racket, but BSL. For scheme, im able to find
>> beginner books, unless im not looking deep enough. Maybe if you fine folk
>> don't mind pointing me in the right direction? Please excuse my ignorance.
>>
>> -- Joseph T
>>
>>
>> Welcome.
>>
>> Racket[*] largely is based on Scheme, and so much of what you learn about
>> Scheme will transfer.  Racket supports R5RS and R6RS Scheme as legacy
>> languages, so you can learn about Scheme /using/ Racket and its tools.
>> Then when you are more comfortable, you can transition to using the Racket
>> module language instead.
>>
>> George
>> [*]  At least the untyped Racket language.  Racket really is a /suite/ of
>> languages: there also is a typed Racket, a lazy Racket, and various DSLs
>> (domain languages) which compile to and (mostly) freely intermix with
>> Racket.
>>
>> --
> 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/CADhp54TpmGXSVDTjbcL%3DYqxiQDmytrMotcxJ7oKgTnniPQOwmg%40mail.gmail.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/CAL3TdONjgSWi3fpY9yAyvzpsFqW-cCzqQYCbhpUeMK_te_R49w%40mail.gmail.com.


Re: [racket-users] Question from a beginner. Why Racket Over Scheme?

2021-07-13 Thread joseph turco
I see. The stuff in HtDP, does it transfer over to any Racket syntax?

On Tue, Jul 13, 2021 at 10:56 AM George Neuner  wrote:

>
> On 7/13/2021 10:13 AM, joseph turco wrote:
>
> Hello,
>
> Im am looking at learning a programming language, and have been
> bouncing around with scheme/racket/dyalog APL/squeak. upon investigation of
> scheme and racket, i found that in regards to racket, there really isn't a
> "Beginners book" that teaches the language. The only beginner book i could
> really see being close to teaching the language is HtDP, but that doesn't
> *technically* teach racket, but BSL. For scheme, im able to find beginner
> books, unless im not looking deep enough. Maybe if you fine folk don't mind
> pointing me in the right direction? Please excuse my ignorance.
>
> -- Joseph T
>
>
> Welcome.
>
> Racket[*] largely is based on Scheme, and so much of what you learn about
> Scheme will transfer.  Racket supports R5RS and R6RS Scheme as legacy
> languages, so you can learn about Scheme /using/ Racket and its tools.
> Then when you are more comfortable, you can transition to using the Racket
> module language instead.
>
> George
> [*]  At least the untyped Racket language.  Racket really is a /suite/ of
> languages: there also is a typed Racket, a lazy Racket, and various DSLs
> (domain languages) which compile to and (mostly) freely intermix with
> Racket.
>
>

-- 
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/CADhp54TpmGXSVDTjbcL%3DYqxiQDmytrMotcxJ7oKgTnniPQOwmg%40mail.gmail.com.


Re: [racket-users] Question from a beginner. Why Racket Over Scheme?

2021-07-13 Thread George Neuner


On 7/13/2021 10:13 AM, joseph turco wrote:

Hello,

Im am looking at learning a programming language, and have been 
bouncing around with scheme/racket/dyalog APL/squeak. upon 
investigation of scheme and racket, i found that in regards to racket, 
there really isn't a "Beginners book" that teaches the language. The 
only beginner book i could really see being close to teaching the 
language is HtDP, but that doesn't /technically/ teach racket, but 
BSL. For scheme, im able to find beginner books, unless im not looking 
deep enough. Maybe if you fine folk don't mind pointing me in the 
right direction? Please excuse my ignorance.


-- Joseph T


Welcome.

Racket[*] largely is based on Scheme, and so much of what you learn 
about Scheme will transfer.  Racket supports R5RS and R6RS Scheme as 
legacy languages, so you can learn about Scheme /using/ Racket and its 
tools.  Then when you are more comfortable, you can transition to using 
the Racket module language instead.


George
[*]  At least the untyped Racket language.  Racket really is a /suite/ 
of languages: there also is a typed Racket, a lazy Racket, and various 
DSLs (domain languages) which compile to and (mostly) freely intermix 
with Racket.


--
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/a5940fd5-a3b1-152e-7efc-66c98a2ad941%40comcast.net.


Re: [racket-users] Question from a beginner. Why Racket Over Scheme?

2021-07-13 Thread joseph turco
Sure! I have dabbled into python (but not fully, only learned variables,
lists, dictionaries, for loops, if statements, while loops), but other than
that i dont have much experience. I do not have a CS degree or
(unfortunately) plan to get one. This is purely for a hobby.

On Tue, Jul 13, 2021 at 10:22 AM John Clements 
wrote:

> Good to hear from you! There are actually a number of different books that
> I might suggest. In order to best direct you, it might be useful to know
> something about your programming background?
>
> Best,
>
> John Clements
>
> > On Jul 13, 2021, at 10:13, joseph turco 
> wrote:
> >
> > Hello,
> >
> > Im am looking at learning a programming language, and have been bouncing
> around with scheme/racket/dyalog APL/squeak. upon investigation of scheme
> and racket, i found that in regards to racket, there really isn't a
> "Beginners book" that teaches the language. The only beginner book i could
> really see being close to teaching the language is HtDP, but that doesn't
> technically teach racket, but BSL. For scheme, im able to find beginner
> books, unless im not looking deep enough. Maybe if you fine folk don't mind
> pointing me in the right direction? Please excuse my ignorance.
> >
> > -- Joseph T
> >
> >
> > --
> > 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/CADhp54SQ%3DhwO1V%3DshEzNOpkFhn3tPg2vextUrXAEcSMf0vsgpA%40mail.gmail.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/CADhp54RZvnOkRpXAzJnkauT1LcHhH93bEjuiDc7436gOT0YjAA%40mail.gmail.com.


Re: [racket-users] Question from a beginner. Why Racket Over Scheme?

2021-07-13 Thread 'John Clements' via Racket Users
Good to hear from you! There are actually a number of different books that I 
might suggest. In order to best direct you, it might be useful to know 
something about your programming background?

Best,

John Clements

> On Jul 13, 2021, at 10:13, joseph turco  wrote:
> 
> Hello,
> 
> Im am looking at learning a programming language, and have been bouncing 
> around with scheme/racket/dyalog APL/squeak. upon investigation of scheme and 
> racket, i found that in regards to racket, there really isn't a "Beginners 
> book" that teaches the language. The only beginner book i could really see 
> being close to teaching the language is HtDP, but that doesn't technically 
> teach racket, but BSL. For scheme, im able to find beginner books, unless im 
> not looking deep enough. Maybe if you fine folk don't mind pointing me in the 
> right direction? Please excuse my ignorance.
> 
> -- Joseph T
> 
> 
> -- 
> 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/CADhp54SQ%3DhwO1V%3DshEzNOpkFhn3tPg2vextUrXAEcSMf0vsgpA%40mail.gmail.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/9a732155-e6fb-43a3-ad7e-979269a0473d%40mtasv.net.


[racket-users] Question from a beginner. Why Racket Over Scheme?

2021-07-13 Thread joseph turco
Hello,

Im am looking at learning a programming language, and have been
bouncing around with scheme/racket/dyalog APL/squeak. upon investigation of
scheme and racket, i found that in regards to racket, there really isn't a
"Beginners book" that teaches the language. The only beginner book i could
really see being close to teaching the language is HtDP, but that doesn't
*technically* teach racket, but BSL. For scheme, im able to find beginner
books, unless im not looking deep enough. Maybe if you fine folk don't mind
pointing me in the right direction? Please excuse my ignorance.

-- Joseph T

-- 
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/CADhp54SQ%3DhwO1V%3DshEzNOpkFhn3tPg2vextUrXAEcSMf0vsgpA%40mail.gmail.com.


Re: [racket-users] Syntax Parse Bee 2021

2021-07-13 Thread Stephen De Gabrielle
It’s very exciting seeing the entries pouring in.

Reminder: Racket includes a macro debugger
 to make it easier
for the experienced to debug their macros and for beginners to study their
behaviour: https://docs.racket-lang.org/macro-debugger/index.html

Click ‘Macro Stepper’ in DrRacket or M-x  racket-stepper-mode in Racket
Mode if you prefer Emacs: https://www.racket-mode.com/#Macro-expand

Bw
Stephen

On Thu, 1 Jul 2021 at 01:23, Ben Greenman 
wrote:

> Hi folks,
>
> *Write a macro with Racket this summer! Win stickers!*
>
> The purpose of this event is to grow the syntax-parse-example
> documentation and repository to grow as a resource for the Racket
> community. But you do not need to submit a full example to win stickers ---
> any syntax-parse macro counts.
>
> *It's like a Quilting Bee, but for syntax parse macros!*
>
> Ground Rules:
>
>- you can write any macro as long as it uses syntax-parse somehow
>- enter as many times as you like
>- the first 20 individuals who enter will win exclusive stickers
>- open July 1 to September 1
>
> Submit by opening an issue here:
>
>
> https://github.com/syntax-objects/Summer2021/issues/new?assignees==entry=enter-the-syntax-parse-bee.md=%5Bentry+-+name%2Fdescription+of+macro%5D
>
> To help you get started, we suggest two categories of before-and-after
> macro:
>
>1. *Code Cleaning* : Introduce a macro where there was none before.
>Look for ways to make your source code more beautiful and/or less
>repetitive.
>2. *Macro Engineering* : Use the tools in syntax-parse to improve an
>existing  macro (which may or may not currently use syntax-parse). Try to
>make the old macro more maintainable, more robust against errors, and/or
>more flexible.
>
> Updates will be via Racket News, Racket-Users, Slack, Discord & Reddit.
>
> Whatever you decide, we hope that you learn and have fun!
>
> - Ben + Stephen
>
>
> PS a 'Bee' is a community effort toward a common goal. A quilting bee is
> for
> making a quilt. In this case the quilt is a patchwork of syntax-parse
> macros.
>
> - - -
>
> Syntax parse docs:
>  https://docs.racket-lang.org/syntax/stxparse.html
>
> Syntax parse examples:
>  https://docs.racket-lang.org/syntax-parse-example/
>
> Extra syntax classes:
>  https://docs.racket-lang.org/syntax-classes/
>
> Mythical Macros tutorial:
>  https://soegaard.github.io/mythical-macros/
>
> Macros and Languages in Racket book draft:
>  http://rmculpepper.github.io/malr/
>
> Fine print:
>
>- this is an UNOFFICIAL event run by Racket users (@spdegabrielle and
>@bennn)
>- entries must be submitted under the MIT license [1] for code and
>under CC [2] for accompanying prose
>- stickers will be mailed via USPS; international entries are allowed
>- please abide by the Racket Friendly Environment Policy [3]
>
>
> [1]
> https://github.com/racket/racket/blob/master/racket/src/LICENSE-MIT.txt
> [2] http://creativecommons.org/licenses/by/4.0/
> [3] https://racket-lang.org/friendly.html
>
>
> --
> 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/CAFUu9R6kCG%2BXFnYwOnD_9XyfNq%2BNbJnPVA_rpD4vGKPkzSXBDA%40mail.gmail.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/CAGHj7-KnZ0NbVKmLrGmj%3DZuoVJJfvx9Ns4Msbh_88z4SWqZ_ng%40mail.gmail.com.