[racket-users] please encourage people to use racket-users (Was: Help understanding cond expression)

2019-01-12 Thread Neil Van Dyke

 Google+ forum


BTW, Google+ is disappearing soon[1], which is yet another reason to 
encourage people to -- rather than fragment our small community amongst 
every upstart you're-the-product social media play -- instead use the 
official `racket-users` forum (available as both email list and Web 
interface).


We can have an outpost presence on the various current hot properties, 
while using message/post traffic there mostly only as an announcements 
channel.  If, when people not familiar with the main `racket-users` 
forum, start discussion from which they/others might benefit, it would 
help to point them to `racket-users`.


(If I had my druthers, there'd just be the main `racket-users` and 
`racket-dev` forums, plus a non-logged watercooler IRC channel primarily 
for community personalizing.  Outposts everywhere else would mostly only 
be to say "Racket exists, and all the action is at racket-users".)


Centralization isn't always totally bad. :)

[1] https://en.wikipedia.org/wiki/Google%2B#Shutdown_of_consumer_version

--
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] Help understanding cond expression

2019-01-12 Thread Hassan Shahin
Thanks Jon.

yes. I did, and you are right. I posted the same question a Google+ forum 
(https://plus.google.com/108613325307702875646/posts/1BaDJFoat4D), and I 
also got a reply that:
"John is being parsed as a variable, and thus, its binding is looked up in 
the local environment. Of course, there is none, hence the error."

- Hassan

On Sunday, January 13, 2019 at 7:52:53 AM UTC+2, Jon Zeppieri wrote:
>
>
>
> On Sun, Jan 13, 2019 at 12:37 AM Hassan Shahin  > wrote:
>
>> Thanks Jack and Mike!
>>
>> You are right. Arguments to procedures will be evaluated before the 
>> invocation of the procedure. 
>>
>
> This is true, but it's not really the issue in your case. Even in #lang 
> lazy, which does not eagerly evaluate procedure arguments, your program 
> would still be an error, because the expression `John` has no meaning at 
> all unless you define it. Try the following in both #lang racket and #lang 
> lazy:
>
> --- definitions window ---
> #lang lazy ;; or racket
>
> (define type-of (lambda (item other-message)
>   (cond
> [(pair? item) 'pair]
> [(null? item) 'empty-list]
> [(number? item) 'number]
> [(symbol? item) 'symbol]
> [else
>  other-message
>  'some-other-type])))
>
> --- interactions window ---
> (type-of #\e (displayln "hello"))
> (type-of (cons 2 3) (displayln "hello"))
> (type-of John (displayln "hello"))
>
> ---
>
> The `John` example will fail in both languages, but you'll observe the 
> difference with the other two examples.
>
> - Jon
>
>
>
>

-- 
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] Help understanding cond expression

2019-01-12 Thread Jon Zeppieri
On Sun, Jan 13, 2019 at 12:37 AM Hassan Shahin  wrote:

> Thanks Jack and Mike!
>
> You are right. Arguments to procedures will be evaluated before the
> invocation of the procedure.
>

This is true, but it's not really the issue in your case. Even in #lang
lazy, which does not eagerly evaluate procedure arguments, your program
would still be an error, because the expression `John` has no meaning at
all unless you define it. Try the following in both #lang racket and #lang
lazy:

--- definitions window ---
#lang lazy ;; or racket

(define type-of (lambda (item other-message)
  (cond
[(pair? item) 'pair]
[(null? item) 'empty-list]
[(number? item) 'number]
[(symbol? item) 'symbol]
[else
 other-message
 'some-other-type])))

--- interactions window ---
(type-of #\e (displayln "hello"))
(type-of (cons 2 3) (displayln "hello"))
(type-of John (displayln "hello"))

---

The `John` example will fail in both languages, but you'll observe the
difference with the other two examples.

- Jon

-- 
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] Help understanding cond expression

2019-01-12 Thread Hassan Shahin
Thanks Jack and Mike!

You are right. Arguments to procedures will be evaluated before the 
invocation of the procedure. I thought that because (if) is not an ordinary 
procedure, and because one can express if in terms of cond (or vice versa) 
that my procedure is also a non ordinary procedure, which is not the case.

Thanks again

On Sunday, January 13, 2019 at 7:29:10 AM UTC+2, Jack Rosenthal wrote:
>
> On Sat, 12 Jan 2019 at 21:12 -0800, Hassan Shahin wrote: 
> > When I apply the procedure to 'John it will evaluate to 'symbol. The 
> idea 
> > of the procedure is to check the "type" of the given item, which is not 
> > decided aprior. If I give it 'John I know it is a symbol. 
> > May be my question should be formulated as this: Since John is not a 
> pair, 
> > an empty-list, a number, not a symbol, why the execution doesn't proceed 
> to 
> > the else expression no matter what John is, unless you are telling me 
> that 
> > the item given to the procedure is evaluated first. 
>
> Perhaps you meant to define John before: 
>
> (define John '(1 2 3)) 
> (type-of John) => 'pair 
>
> Since type-of is a procedure, this means that when it is applied, it's 
> arguments will be evaluated during application. Evaluating a symbol 
> which is not defined will result in an error. 
>
> -- 
> Jack M. Rosenthal 
> http://jack.rosenth.al 
>
> A virtual filesystem? I don't know what you are trying to achieve, 
> but there's probably a better way. 
> -- Me 
>
>

-- 
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] Help understanding cond expression

2019-01-12 Thread Jack Rosenthal
On Sat, 12 Jan 2019 at 21:12 -0800, Hassan Shahin wrote:
> When I apply the procedure to 'John it will evaluate to 'symbol. The idea 
> of the procedure is to check the "type" of the given item, which is not 
> decided aprior. If I give it 'John I know it is a symbol.
> May be my question should be formulated as this: Since John is not a pair, 
> an empty-list, a number, not a symbol, why the execution doesn't proceed to 
> the else expression no matter what John is, unless you are telling me that
> the item given to the procedure is evaluated first.

Perhaps you meant to define John before:

(define John '(1 2 3))
(type-of John) => 'pair

Since type-of is a procedure, this means that when it is applied, it's
arguments will be evaluated during application. Evaluating a symbol
which is not defined will result in an error.

-- 
Jack M. Rosenthal
http://jack.rosenth.al

A virtual filesystem? I don't know what you are trying to achieve,
but there's probably a better way.
-- Me

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


signature.asc
Description: PGP signature


Re: [racket-users] Help understanding cond expression

2019-01-12 Thread Hassan Shahin
Thanks Mike.

When I apply the procedure to 'John it will evaluate to 'symbol. The idea 
of the procedure is to check the "type" of the given item, which is not 
decided aprior. If I give it 'John I know it is a symbol.
May be my question should be formulated as this: Since John is not a pair, 
an empty-list, a number, not a symbol, why the execution doesn't proceed to 
the else expression no matter what John is, unless you are telling me that 
the item given to the procedure is evaluated first.


On Sunday, January 13, 2019 at 6:58:45 AM UTC+2, Mike MacHenry wrote:
>
> You need to apply the function to 'John, with a single quote in front of 
> it. The word John without that quote is just a variable reference to 
> something that you have not actually defined. 
>
> On Sat, Jan 12, 2019 at 11:34 PM Hassan Shahin  > wrote:
>
>> I have this definition for a procedure:
>>
>> (define type-of (lambda (item)
>>  (cond
>>[(pair? item) 'pair]
>>[(null? item) 'empty-list]
>>[(number? item) 'number]
>>[(symbol? item) 'symbol]
>>[else 'some-other-type])))
>>
>> My understanding is that if the first 4 conditions fail (=> #f 
>> ), then the last expression (the 
>> else expression) is evaluated. 
>> When I apply this procedure to John, as in (type-of John) I get an error 
>> (; john: undefined; ; cannot reference an identifier before its 
>> definition). 
>>
>> What is going on?
>> Thanks
>>
>> -- 
>> 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] Help understanding cond expression

2019-01-12 Thread Mike MacHenry
You need to apply the function to 'John, with a single quote in front of
it. The word John without that quote is just a variable reference to
something that you have not actually defined.

On Sat, Jan 12, 2019 at 11:34 PM Hassan Shahin  wrote:

> I have this definition for a procedure:
>
> (define type-of (lambda (item)
>  (cond
>[(pair? item) 'pair]
>[(null? item) 'empty-list]
>[(number? item) 'number]
>[(symbol? item) 'symbol]
>[else 'some-other-type])))
>
> My understanding is that if the first 4 conditions fail (=> #f
> ), then the last expression (the
> else expression) is evaluated.
> When I apply this procedure to John, as in (type-of John) I get an error
> (; john: undefined; ; cannot reference an identifier before its
> definition).
>
> What is going on?
> Thanks
>
> --
> 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.


[racket-users] Help understanding cond expression

2019-01-12 Thread Hassan Shahin
I have this definition for a procedure:

(define type-of (lambda (item)
 (cond
   [(pair? item) 'pair]
   [(null? item) 'empty-list]
   [(number? item) 'number]
   [(symbol? item) 'symbol]
   [else 'some-other-type])))

My understanding is that if the first 4 conditions fail (=> #f 
), then the last expression (the else 
expression) is evaluated. 
When I apply this procedure to John, as in (type-of John) I get an error 
(; john: undefined; ; cannot reference an identifier before its definition)
. 

What is going on?
Thanks

-- 
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] Making evaluators / handin server setup

2019-01-12 Thread Jordan Johnson
Hi Matthew et al.,

Following up some work from last fall:

On Oct 6, 2018, at 15:58, Matthew Flatt  wrote:
> At Wed, 26 Sep 2018 15:57:12 -0700, Jordan Johnson wrote:
>>> (require racket/sandbox)
>>> (make-evaluator "beginner-lang.rkt")
>> . . ../../../../../../../../Applications/Racket 
>> v7.0/collects/racket/private/kw-file.rkt:102:2: open-input-file: `read' 
>> access 
>> denied for /Users/jteach/Library/Racket/7.0/pkgs/.LOCKpkgs.rktd
> 
> That was a problem with creating a sandbox in DrRacket, as opposed to
> `racket` at the command line or with the handin server. It's fixed for
> the next release.

Having downloaded Racket 7.1, I’m playing with evaluator-related code again 
(for the first time since October), and now am seeing this behavior in DrRacket:

> > (require racket/sandbox)
> > (define e (make-evaluator 'lang/htdp-beginner))
> . . ../../Applications/Racket v7.1/collects/pkg/private/lock.rkt:26:0: 
> directory-exists?: `exists' access denied for /Applications/Racket 
> v7.1/share/pkgs
> > 

Command-line `racket’ doesn’t exhibit this problem; it just creates the 
evaluator and lets me run with it. This is on Mac OS X (High Sierra, 10.13.4).

I’m posting here in case it’s the same as (or related to) the bug Matthew 
mentioned, meaning the bug wasn’t completely squashed the first time around. Is 
there another likely possibility I’m missing? Is there something more I can do 
to help diagnose what’s going on?

Thanks,
Jordan

-- 
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] FIGLIO DI PUTTANA ANGELO LIETTI DI MEDIOLANUM, NDRANGOLANUM, MAFIOLANUM, HITLERANUM! TENEVA I RAPPORTI CON GLI IMPRENDITORI ASSASSINI DI COSA NOSTRA: FRANCESCO ZUMMO E IGNAZIO ZUMMO! AI

2019-01-12 Thread 'ROBERTO GORINI 4-UPPER LTD LUGANO-LA-SUISSE' via Racket Users
FIGLIO DI PUTTANA ANGELO LIETTI DI MEDIOLANUM, NDRANGOLANUM, MAFIOLANUM, 
HITLERANUM! TENEVA I RAPPORTI CON GLI IMPRENDITORI ASSASSINI DI COSA 
NOSTRA: FRANCESCO ZUMMO E IGNAZIO ZUMMO! AI TEMPI DELL'ARRESTO 
DELL'AVVOCATO PEDOFILO E NAZI: PAOLO SCIUME'! VERME SCHIFOSISSIMO ANGELO 
LIETTI: BANCHIERE BASTARDAMENTE CRIMINALE, NATO A MILANO IL 2.2.1961!
 
STATE ALLA LARGA DAL BANCHIERE BASTARDAMENTE CRIMINALE E NOTORIAMENTE MOLTO 
PEDOFILO GIOVANNI PIROVANO DI MEDIOLANUM, MAFIOLANUM, NDRANGOLANUM, 
CAMORRANUM, LAVALAVAPERCOCALEROSCOLOMBIANUM, RICICLANUM, NAZISTANUM!
1 )
UNITO AL MEGA RICICLA SOLDI MAFIOSI ANGELO LIETTI PURE DI BANCA MEDIOLANUM, 
MAFIOLANUM, NDRANGOLANUM, CAMORRANUM, LAVALAVAPERCOCALEROSCOLOMBIANUM, 
RICICLANUM, NAZISTANUM! I DUE TENEVANO I RAPPORTI CON GLI IMPRENDITORI 
ASSASSINI DI COSA NOSTRA: IGNAZIO ZUMMO E FRANCESCO ZUMMO! QUESTO AI TEMPI 
DEL LORO ARRESTO!
https://ricerca.repubblica.it/repubblica/archivio/repubblica/2006/10/31/mafia-condannati-costruttori-zummo.html
COME AI TEMPI DELL'ARRESTO DELL'AVVOCATO NAZISTA, RAZZISTA E PURE 
NOTORIAMENTE PEDOFILO: PAOLO SCIUME' DI MALAVITOSISIMA COMPAGNIA DELLE 
OPERE!!!
https://ricerca.repubblica.it/repubblica/archivio/repubblica/2009/01/24/riciclaggio-arrestato-sciume-avvocato-della-finanza-milanese.html
CON CUI, NOTORIAMENTE, TRAFFICAVA PURE "IL PERICOLOSISSIMO" RICICLA SOLDI 
MAFIOSI GIOVANNI RAIMONDI DI CRIMINALE PIA PARTECIPAZIONI. EX DI SOCIETA' 
FINANZIARIE E BANCHE " TUTTE COSA NOSTRA", GESFID LUGANO E BANCA SAI ( OVE 
MEGA RICICLAVA SOLDI MAFIOSI E PER I LIGRESTI, OSSIA STESSA MERDA ULTRA 
STRA ARCI CRIMINALE.. DI QUESTO NE PARLA ANCHE L'AMMIREVOLISIMO, PER LO 
MENO IN QUESTO, PENTITO GASPARE MUTOLO, PIU' O MENO, A FINE VIDEO, QUI 
https://www.youtube.com/watch?v=gmjdXBIcBt0 ). "PERICOLOSISSIMO" RICICLA 
SOLDI MAFIOSI GIOVANNI RAIMONDI ( EX DI DELINQUENTISSIMA SOCIETA' "AGENTE 
DI CAMBIO GIOVANNI RAIMONDI"). ORA IMBOSCATOSI, VIA SUOI PAPPONI FURBASTRI 
E NAZISTI DI COMUNIONE E LIBERAZIONE, PRESSO OSPEDALE GEMELLI!
http://www.progettoalternativo.com/2016/08/comunione-e-liberazione-dietro-la.html
http://www.mittel.it/wp-content/uploads/DEF-CV-Raimondi.pdf
NOTO PER PRIMA SFRUTTARE GLI ALTRI FINO ALL'OSSO, E POI, UNA VOLTA FATTO 
QUESTO, SENZA MOTIVO ALCUNO (PUR SEMPRE FINGENDOSI AMICO), INIZIARE A 
DISCONOSCERLI. E PURE COMPLOTTARLI E DENIGRARLI SU BASE DI IMMENSE BALLE 
DETTE A FINI "BERLUSCONAZIFASCISTI". E DI NASCOSTO. E DI DIETRO ( IL TUTTO 
INSIEME AL NOTO RICICLA SOLDI MAFIOSI E PEDERASTA INCULA RAGAZZINI PAOLO 
GORLINI DI BERGAMO E DI BANCA ALBERTINI SYZ .. ED AL NOTO PEDERASTA, PURE 
MEGA RICICLA SOLDI MAFIOSI, GIANPAOLO GAMBA, SEMPRE DI BANCA ALBERTINI 
SYZ FAMOSO PER INONDARE IL LIECHTENSTEIN DI SOLDI DI COSA NOSTRA, 
CAMORRA E NDRANGHETA
http://ricerca.gelocal.it/messaggeroveneto/archivio/messaggeroveneto/2008/03/28/NZ_06_SEE1.html
SI, SI, PROPRIO COSI': E' UN MASSONE DI TIPO CRIMINALISSIMO E PEDOFILO, 
GIANPAOLO GAMBA DI BANCA ALBERTINI SYZ...  BANCHIERE TUTT'UNO CON 
CRIMINALISSIMI MASSONI SUOI COMPARI, PURE SUPER NARCO TRAFFICANTI, COME IL 
MEGA PREGIUDICATO PASQUALE CLAUDIO LOCATELLI DI BERGAMO .
https://www.repubblica.it/cronaca/2015/08/11/news/da_bergamo_al_messico_l_impero_del_signore_della_coca-120775546/
  
DI BERGAMO COME IL PRIMA CITATO, SUO MEGA RICICLA SOLDI MAFIOSI, PAOLO 
GORLINI DI BANCA ALBERTINI SYZ ).
IN OGNI CASO, COME RIPORTATO AD INIZIO POST, IL LEIT MOTIV CHE MI FA 
SCRIVERE E' IL NOTO PEDOFILO INCULA BAMBINI GIOVANNI PIROVANO DI 
CRIMINALISSIMA BANCA MEDIOLANUM E PURE DI ABI
https://www.bancamediolanum.it/corporate-governance/governance/giovanni-pirovano
COME LO E' L'IMMENSO LAVA CAH MAFIOSO ANGELO LIETTI DI CRIMINALISSIMA 
MEDIOLANUM: BANCHIERE DELINQUENTISSIMO, NATO A MILANO IL 2.2.1961!
https://plus.google.com/102748838138805675155/posts/bgZUHnLXr4Z

-- 
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: FYI Racket & DrRacket tagged projects on GitHub

2019-01-12 Thread Hendrik Boom
On Sat, Jan 12, 2019 at 06:44:26PM +0100, Tomasz Rola wrote:
> On Sat, Jan 12, 2019 at 11:10:27AM +0100, 'Paulo Matos' via Racket Users 
> wrote:
> > 
> > 
> > On 11/01/2019 17:23, Greg Trzeciak wrote:
> > > What would be really neat if https://pkgs.racket-lang.org/ would include
> > > date-added to all the packages. This way one could create automatic list
> > > of newly added packages and let's say distribute it in the newsletter
> > 
> > Which newsletter are you referring to here?
> > 
> > I had been thinking of getting a Racket Newsletter out of the ground but
> > haven't come around to it yet. Have you discussed previously something
> > in this direction? If so, I would like to help.
> 
> MHO:
> 
> If there is something to post in a form of "newsletter", then I think
> it could as well be posted here - why not - with perrmission from the
> group/moderators. Say, once per month? Bi-weekly?
> 
> If the said newsletter is in txt format rather than html, you may want
> to put it into org-mode in Emacs and post it as saved file from
> that.

Text-form is a lot easier to read in security-conscious text-only email 
readers.

> See y-tube for a glimpse of what org-mode is up to.  I would
> say, it is very neat tool for hierarchical contents (books, speeches
> etc). Some are using it to prepare presentations, and I guess it could
> be used for blogging (i.e. writing posts and converting them to actual
> markup later). I use it "as is" for a very primitive personal wiki
> (might improve some if I sit on it and add some code - primitive it is
> but it works without web server and on vt100 so I will not trade it
> for anything "better" - YMMV).

I tried org-mode.  More unobvious keystroke sequences to follow, in 
addition to the ones I learned decades ago and are now muscle memory.  
And when I transformed it to other formats (probably html, but possibly 
pdf) I ended up with many huge headers that took so much space that the 
document was quite unreadable.  Perhaps I just don't know how to use it 
properly.

I found markdown to be a lot better for nested point-form work, even 
though emacs won't collapse or expanding subtrees.  (or will it?  If so 
I don't know of it)

How does scribble do this?  Does it look good in source form?

-- 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] Getting errors running PLT-Redex book example

2019-01-12 Thread Mike MacHenry
Thanks Ben. Good to know. Hey Robbie, it's been a while. Hope everything is
going well. Great book. :)

-mike

On Jan 12, 2019 12:04, "Robby Findler"  wrote:

Hi Mike! Thanks for pointing this out. I've updated the errata
(Thanks, Ben for those links; I was having trouble finding the date of
the change.)


Robby


On Sat, Jan 12, 2019 at 4:41 AM Mike MacHenry 
wrote:
>
> Hey everyone,
>
> I'm having an issue with one of the examples from Semantics Engineering
With PLT Redex. Specifically in 12.3 on page 225, the definition for the
iswim-standard reduction relation. As printed in the book, I get the error
"reduction-relation: shortcut name may not be a non-terminal in: M".
Following this advice I've changed the M and N on this line, both the
binding and the reference, to A and B respectively. This seems to work just
fine. Have I misunderstood something or found a typo? I checked the books
errata and didn't see any mention of it in there.
>
> Thanks a bunch,
> -mike
>
> --
> 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] Re: FYI Racket & DrRacket tagged projects on GitHub

2019-01-12 Thread Tomasz Rola
On Sat, Jan 12, 2019 at 11:10:27AM +0100, 'Paulo Matos' via Racket Users wrote:
> 
> 
> On 11/01/2019 17:23, Greg Trzeciak wrote:
> > What would be really neat if https://pkgs.racket-lang.org/ would include
> > date-added to all the packages. This way one could create automatic list
> > of newly added packages and let's say distribute it in the newsletter
> 
> Which newsletter are you referring to here?
> 
> I had been thinking of getting a Racket Newsletter out of the ground but
> haven't come around to it yet. Have you discussed previously something
> in this direction? If so, I would like to help.

MHO:

If there is something to post in a form of "newsletter", then I think
it could as well be posted here - why not - with perrmission from the
group/moderators. Say, once per month? Bi-weekly?

If the said newsletter is in txt format rather than html, you may want
to put it into org-mode in Emacs and post it as saved file from
that. See y-tube for a glimpse of what org-mode is up to.  I would
say, it is very neat tool for hierarchical contents (books, speeches
etc). Some are using it to prepare presentations, and I guess it could
be used for blogging (i.e. writing posts and converting them to actual
markup later). I use it "as is" for a very primitive personal wiki
(might improve some if I sit on it and add some code - primitive it is
but it works without web server and on vt100 so I will not trade it
for anything "better" - YMMV).

-- 
Regards,
Tomasz Rola

--
** A C programmer asked whether computer had Buddha's nature.  **
** As the answer, master did "rm -rif" on the programmer's home**
** directory. And then the C programmer became enlightened...  **
** **
** Tomasz Rola  mailto:tomasz_r...@bigfoot.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] Getting errors running PLT-Redex book example

2019-01-12 Thread Robby Findler
Hi Mike! Thanks for pointing this out. I've updated the errata
(Thanks, Ben for those links; I was having trouble finding the date of
the change.)

Robby

On Sat, Jan 12, 2019 at 4:41 AM Mike MacHenry  wrote:
>
> Hey everyone,
>
> I'm having an issue with one of the examples from Semantics Engineering With 
> PLT Redex. Specifically in 12.3 on page 225, the definition for the 
> iswim-standard reduction relation. As printed in the book, I get the error 
> "reduction-relation: shortcut name may not be a non-terminal in: M". 
> Following this advice I've changed the M and N on this line, both the binding 
> and the reference, to A and B respectively. This seems to work just fine. 
> Have I misunderstood something or found a typo? I checked the books errata 
> and didn't see any mention of it in there.
>
> Thanks a bunch,
> -mike
>
> --
> 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] Getting errors running PLT-Redex book example

2019-01-12 Thread Ben Greenman
You discovered a backwards incompatible change to Redex. Changing M
and N to A and B is a good fix. (The errata really should talk about
this.)

Here are two related threads:
https://groups.google.com/d/msg/racket-users/be54SG881GU/bndA4eiGAQAJ
https://groups.google.com/d/msg/racket-users/NMuBaVlcDAU/v0WyrxZbDQAJ

-- 
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] Racket-openCV package use?7

2019-01-12 Thread Stephen De Gabrielle
Hi

Can can anyone point me to any package or other Racket code that uses the
Racket OpenCV package ?

https://github.com/oetr/racket-opencv

Kind regards,

Stephen


-- 


-- 
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] Issue about tcp port, server doesn't receive bytes using read-bytes-avail!* and client using write-bytes

2019-01-12 Thread Jay McCarthy
You need to flush-output

On Sat, Jan 12, 2019 at 10:55 AM Zhonghua Zhu 
wrote:

> I am writing a tcp server program.
> Server uses non-blocking reading and client uses write-bytes, then server
> never read any bytes and write-bytes returns the right value.
> But when I change client's write-bytes to write-bytes-avail, server
> receives bytes immediately.
>
> I don't know why this happens.
>
> It seems like (byte-ready? in) always returns false when client using
> write-bytes.
>
> Here is the server and client program.
>
> Server Program
>
> #lang racket
>
> (require racket/tcp)
>
> (define (prn-ln . args)
>   (displayln (apply format args)))
>
> (define server-listener #f)
> (define listen-port 8000)
>
> (set! server-listener (tcp-listen listen-port))
>
> (define in #f)
> (define out #f)
> (define bytes (make-bytes 4))
> (define len 0)
>
> (define (read-sock)
>   (when (and in
>  (byte-ready? in))
> (set! len (read-bytes-avail!* bytes in 0 4))
> (prn-ln "read len ~a" len)
> (prn-ln "read int ~a" (integer-bytes->integer bytes #f #f 0 4
>
> (define (game-loop)
>   (if (not in)
>   (when (tcp-accept-ready? server-listener)
> (set!-values (in out) (tcp-accept server-listener))
> (displayln "a new socket come in"))
>   (read-sock))
>   (sleep 1)
>   (game-loop))
>
> (game-loop)
>
> Client Program
>
> #lang racket
>
> (require racket/tcp)
>
> (define-values (in out) (tcp-connect "127.0.0.1" 8000))
>
> (define bytes (make-bytes 4))
> (define number 10)
> (integer->integer-bytes number 4 #f #f bytes 0)
>
> (define (loop)
>   (define ret (write-bytes bytes out 0 4))
>   (displayln (format "ret ~a" ret))
>   (sleep 1)
>   (loop))
>
> (loop)
>
> --
> 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.
>
-- 
-=[ Jay McCarthy   http://jeapostrophe.github.io]=-
-=[ Associate ProfessorPLT @ CS @ UMass Lowell ]=-
-=[ Moses 1:33: And worlds without number have I created; ]=-

-- 
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] Issue about tcp port, server doesn't receive bytes using read-bytes-avail!* and client using write-bytes

2019-01-12 Thread Zhonghua Zhu
I am writing a tcp server program.
Server uses non-blocking reading and client uses write-bytes, then server 
never read any bytes and write-bytes returns the right value.
But when I change client's write-bytes to write-bytes-avail, server 
receives bytes immediately.

I don't know why this happens.

It seems like (byte-ready? in) always returns false when client using 
write-bytes.

Here is the server and client program.

Server Program

#lang racket

(require racket/tcp)

(define (prn-ln . args)
  (displayln (apply format args)))

(define server-listener #f)
(define listen-port 8000)

(set! server-listener (tcp-listen listen-port))

(define in #f)
(define out #f)
(define bytes (make-bytes 4))
(define len 0)

(define (read-sock)
  (when (and in
 (byte-ready? in))
(set! len (read-bytes-avail!* bytes in 0 4))
(prn-ln "read len ~a" len)
(prn-ln "read int ~a" (integer-bytes->integer bytes #f #f 0 4

(define (game-loop)
  (if (not in)
  (when (tcp-accept-ready? server-listener)
(set!-values (in out) (tcp-accept server-listener))
(displayln "a new socket come in"))
  (read-sock))
  (sleep 1)
  (game-loop))

(game-loop)

Client Program

#lang racket

(require racket/tcp)

(define-values (in out) (tcp-connect "127.0.0.1" 8000))

(define bytes (make-bytes 4))
(define number 10)
(integer->integer-bytes number 4 #f #f bytes 0)

(define (loop)
  (define ret (write-bytes bytes out 0 4))
  (displayln (format "ret ~a" ret))
  (sleep 1)
  (loop))

(loop)

-- 
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: FYI Racket & DrRacket tagged projects on GitHub

2019-01-12 Thread Greg Trzeciak
I don't think I mentioned newsletter before but I did raise the issue of 
missing date-added in packages before - my expertise is in data 
usefulness/usability so it really hurts my feelings ;)

I agree about hidden gems I stumble upon by pure chance. 
>From time to time I try to search pkgs site for new tag - but this is 
tedious and because of date-added problem it also includes updated packages 
(and that includes the "subpackages" like *-doc, *-test, *-lib) which 
muddies the water even further.
I can't help much with packages as a concept (because I don't fully 
understand all the implications of package management) but I can help with 
what we can do with the information extracted.

As to the newsletter - I remember Julia lang listing new packages on their 
website with a chart showing how many were added each month - now they are 
doing it in the form of newsletter - here is the content of the most recent 
one: https://juliacomputing.com/blog/2019/01/04/january-newsletter.html

Some ideas:
1. Add "date-added" to meta data on packages
2. Sort out the subpackages issue (at least for display on website and 
making it identifiable in the meta data)
3. Automatically post info to Racket Users Group when a new package (not 
subpackages though) with description, docs and tests implemented is added.
4. Add "intro-post.scrbl" for authors to introduce their packages. This 
after approval could be posted as a blog post and a blog post automatically 
advertised on twitter. This could help authors advertise their packages and 
encourage to bring more goodies.
5. Simple version of #4: use readme.md as a content for blog post if 
approved.
6. Provide statistics on new and updated packages.
7. Make it easy/clear on how to contribute to racket blog (how to post) and 
that it is welcomed.
8. Racket outreach - invite racket users to write a blog posts, recent 
example: I would like to hear from guys from https://fractalide.com/ on 
their use of racket.
9. Take the burden for the marketing of racket from the core Racket team - 
their contribution is much more valuable in other areas. How? I have no 
idea :) But maybe by things like #7 it will be easier to get other people 
on board.

That's all for now.

G.


On Saturday, January 12, 2019 at 11:10:42 AM UTC+1, Paulo Matos wrote:
>
>
>
> On 11/01/2019 17:23, Greg Trzeciak wrote: 
> > What would be really neat if https://pkgs.racket-lang.org/ would 
> include 
> > date-added to all the packages. This way one could create automatic list 
> > of newly added packages and let's say distribute it in the newsletter 
>
> Which newsletter are you referring to here? 
>
> I had been thinking of getting a Racket Newsletter out of the ground but 
> haven't come around to it yet. Have you discussed previously something 
> in this direction? If so, I would like to help. 
>
> If not, maybe we can open a discussion around this theme. Do people find 
> it interesting/useful? One of the things that made me think about this 
> was that regularly I find little library gems in the Racket world that I 
> wouldn't find otherwise so maybe a newsletter that highlights one of 
> these one every two weeks or so would be great. Another thing it would 
> be useful for is to highlight recent Racket developments, new libraries, 
> libraries requiring a maintainer, etc. 
>
> -- 
> Paulo Matos 
>

-- 
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] Getting errors running PLT-Redex book example

2019-01-12 Thread Mike MacHenry
Hey everyone,

I'm having an issue with one of the examples from Semantics Engineering 
With PLT Redex. Specifically in 12.3 on page 225, the definition for the 
iswim-standard reduction relation. As printed in the book, I get the error 
"reduction-relation: shortcut name may not be a non-terminal in: M". 
Following this advice I've changed the M and N on this line, both the 
binding and the reference, to A and B respectively. This seems to work just 
fine. Have I misunderstood something or found a typo? I checked the books 
errata and didn't see any mention of it in there.

Thanks a bunch,
-mike

-- 
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: FYI Racket & DrRacket tagged projects on GitHub

2019-01-12 Thread 'Paulo Matos' via Racket Users



On 11/01/2019 17:23, Greg Trzeciak wrote:
> What would be really neat if https://pkgs.racket-lang.org/ would include
> date-added to all the packages. This way one could create automatic list
> of newly added packages and let's say distribute it in the newsletter

Which newsletter are you referring to here?

I had been thinking of getting a Racket Newsletter out of the ground but
haven't come around to it yet. Have you discussed previously something
in this direction? If so, I would like to help.

If not, maybe we can open a discussion around this theme. Do people find
it interesting/useful? One of the things that made me think about this
was that regularly I find little library gems in the Racket world that I
wouldn't find otherwise so maybe a newsletter that highlights one of
these one every two weeks or so would be great. Another thing it would
be useful for is to highlight recent Racket developments, new libraries,
libraries requiring a maintainer, etc.

> 
> 
> On Friday, January 11, 2019 at 3:18:40 PM UTC+1, spdegabrielle wrote:
> 
> FYI 
> 
> Racket & DrRacket tagged projects on GitHub can be found at 
> 
> https://github.com/topics/racket  
> 
> https://github.com/topics/drracket  
> 
> A great way to discover Racket activity that you wouldn’t otherwise see.
> 
> Kind regards
> 
> Stephen
> 
> -- 
> 
> 
> -- 
> 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.

-- 
Paulo Matos

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