Re: [racket-users] Smart contracts in Racket

2021-04-20 Thread Adam Golding
Thanks Stephen, perhaps you can help get the ball rolling again--I had
written to suggest that racketers may want to enter the moralis hackathon
as there are some points of convergence:

- racket seeks to bridge multiple languages, moralis seeks to bridge
multiple blockchains with different smart contract languages
- racket has a powerful contract system which will ultimately need to
interoperate with smart contracts
- racket is aimed at web applications as one use case and moralis is first
(I think) in what will be many CMS-type platforms for the new web3
paradigm--if racket does not have a web3 solution it will be left behind
and it is already not widely used for web servers--this is an
opportunity for the Racket community to front-run the web development
industry, get it?

I am not an experienced racketer but I would be happy to help out.  I also
got Mr. Ivan to create an #off-topic in the moralis discord for
brainstorming that is not strictly development, by analogy to how freenode
has both #math and #not-math.  I also suggest the racket discord create a
channel specifically for decentralized systems of all kinds--torrents,
web3, crypto, voting systems, markets, etc.

Cheers,
Adam



On Tue, 20 Apr 2021 at 10:47, Stephen De Gabrielle 
wrote:

> Dear all,
>
> I write to apologise for my behaviour.
>
> I inappropriately deleted a post and subsequent discussion from the Racket
> Discord.
>
> I believe this community is for all kinds of developers making all kinds
> of programs with Racket, and I want everyone to feel welcome to participate
> in ways that suit them.
>
> Kind regards
>
> Stephen
>
> On Tuesday, April 20, 2021 at 1:58:55 AM UTC+1 --- wrote:
>
>> I was just told this topic is off-topic on the racket discord--clearly an
>> injustice:
>>
>>
>> --
> 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/1e4ec15c-4c14-46bc-813f-0212360e6f9en%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/CALiGnDBzr0%2Bs3A8ssyDA%3DO%3DECMh%2Bkg8%3Do8LKKTceY-cAb-7Tmg%40mail.gmail.com.


Re: [racket-users] Smart contracts in Racket

2021-04-20 Thread Stephen De Gabrielle
Dear all,  

I write to apologise for my behaviour. 

I inappropriately deleted a post and subsequent discussion from the Racket 
Discord. 

I believe this community is for all kinds of developers making all kinds of 
programs with Racket, and I want everyone to feel welcome to participate in 
ways that suit them. 

Kind regards

Stephen

On Tuesday, April 20, 2021 at 1:58:55 AM UTC+1 --- wrote:

> I was just told this topic is off-topic on the racket discord--clearly an 
> injustice:
>
>
>

-- 
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/1e4ec15c-4c14-46bc-813f-0212360e6f9en%40googlegroups.com.


Re: [racket-users] Typed Racket: type relations

2021-04-20 Thread Sam Tobin-Hochstadt
On Mon, Apr 19, 2021 at 3:19 PM Dominik Pantůček
 wrote:
>
> >>>
> >>> However, I would suggest that the right fix here is to use refinement
> >>> types, and specify exactly what you want. Unfortunately, the
> >>> refinement types feature (good intro here:
> >>> https://blog.racket-lang.org/2017/11/adding-refinement-types.html)
> >>> isn't quite able to prove everything you want, but that's the
> >>> direction we should go. For example, it can already prove that rd in
> >>> the rgb-distance^2 function has this type: (define-type PMByte (Refine
> >>> [v : Fixnum] (and (< v 256) (< -256 v
> >>
> >> This is exactly what I was looking at (and for), but I am unable to use
> >> it correctly:
> >
> > I think you need to add #:with-refinements after the #lang line.
>
> Awesome! Now TR can properly reason about the differences.
>
> I guess it is not possible to make TR deduce the proper type of (* rd
> rd) like:
>
> (define-type Byte^2 (Refine [v : Fixnum] (and (>= v 0) (< v (* 255 255)
>
> Are there any plans of adding such reasoning?

I'm not currently working on this, but I'd be happy to help out if you
want to take this on.

The relevant code is here:
https://github.com/racket/typed-racket/blob/master/typed-racket-lib/typed-racket/typecheck/integer-refinements.rkt#L129-L143.

The problem is that the spec of * is basically to create a linear
expression precisely describing the result, and then say that the
result is equal to that. But such a linear expression doesn't exist
for *, of course. So you'd have to have a different strategy then
(that's when `(Object? product-obj?)` is #f).

> Honestly, when I went through the code for binary fx... operations I
> realized that making them variadic is possible but not straightforward
> at all. Without digging deeper it seems to me that it is actually a lot
> of work. I will look into it again later on.

Here's a first step, which might help get you started:
https://github.com/samth/typed-racket/commit/2514e7107b4da5322a07fe260123432f4055

Sam

-- 
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/CAK%3DHD%2Ba2P_rDZYD_13U4_nifiALycxKOYxfTcJXOVgZqnekJmA%40mail.gmail.com.


Re: [racket-users] Typed Racket: type relations

2021-04-20 Thread Sam Tobin-Hochstadt
It's a little more complicated than that -- the _constraints_ have to
be linear -- that is, the expressions in the refinements, but the
expressions reasoned about can be more general. However, it doesn't do
very much useful with multiplication by bounded values at the moment.

Sam

On Mon, Apr 19, 2021 at 7:31 AM Hendrik Boom  wrote:
>
> On Sun, Apr 18, 2021 at 09:05:11AM +0200, Dominik Pantůček wrote:
> ...
> ...
> >
> > I would really like to be able to reason about the Integer bounds (and
> > therefore signs) dynamically. So that when you have something like:
> >
> > (: square (-> Fixnum Nonnegative-Fixnum))
> > (define (square x)
> >   (fx* x x))
> >
> > You will get something better than:
>
> >
> > multiplication.rkt:7:2: Type Checker: type mismatch
> >   expected: Nonnegative-Fixnum
> >   given: Fixnum
> >   in: (fx* x x)
> >
> > I will look into the refinements implementation to see what are the
> > current limits and what the future possibilities might be.
>
> Reading the documentation you link to, it seems that the problem is that
> (fx* x x) is not linear in x.
> It says that it can reason only about linear expressions.  This is a
> quadratic 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/20210419113103.c4fupxvl6ieb3uub%40topoi.pooq.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/CAK%3DHD%2Bbi1VmQ0zt5RnCnqSojvyzoBA%3D-WMN9CxSun-g1bv%3DJGw%40mail.gmail.com.


[racket-users] Re: Understanding recursion in the function normalize-definition form the racket sources

2021-04-20 Thread 'Wayne Harris' via Racket Users
On Sat, 17 Apr 2021 05:02:00 -0700 (PDT)
Dan Synek  wrote:

> I am trying to implement a variation of define. In order to do that I am 
> trying to understand the source of the define macro in racket.
>  It calls a function normalize-definition which looks like this:
>   (define-values (normalize-definition)
> (case-lambda 
>  [(stx lambda-stx check-context? allow-key+opt?)
>   (let-values ([(id mk-rhs body)
> (normalize-definition/mk-rhs stx lambda-stx 
> check-context? allow-key+opt? #t)])
> (values id (mk-rhs body)))]
>  [(stx lambda-stx check-context?) (normalize-definition stx lambda-stx 
> check-context? #f)]
>  [(stx lambda-stx) (normalize-definition stx lambda-stx #t #f)])))
> 
> In the two last cases of the case-lambda there is a call to 
> normalize-definition. It is not a recursive call, since define-values 
> cannot be used recursively. I cannot find any other normalize-definition in 
> the modules required by the norm-define module.
>  If I try to enter a copy of the definition (renamed to 
> normalize-definition1) I get (as expected) that normalize-definition1 is 
> undefined.
> What is going on?

Beginner here.  I don't see the problem you seem to be referring to
here.  In this example below, I recursively define arglen using
define-values.  

#lang racket/base

(define-values (arglen)
  (case-lambda
[() 'no-list]
[(ls) (if (null? ls)
  0
  (+ 1 (arglen (cdr ls]))

case-lambda-recursion.rkt> (arglen)
'no-list
case-lambda-recursion.rkt> (arglen (list))
0
case-lambda-recursion.rkt> (arglen (list 1))
1
case-lambda-recursion.rkt> (arglen (list 1 1))
2
case-lambda-recursion.rkt> (arglen (list 1 1 1))
3
case-lambda-recursion.rkt> 


-- 
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/20210417093414.7527%40protonmail.com.


Re: [racket-users] Add Link to the racket Discord to the racket website?

2021-04-20 Thread schle...@gmail.com
@Adam What I see with your link is a giant wall of text, It is quite 
overwhelming to get greeted by huge correspondence like that.
This thread was simply about helping somebody who wants to find help with 
basic racket problems find a place where there are people who can help in 
an interactive manner that is an alternative to the mailing list.

@Yury nobody has to use discord, it is simply an option for those who 
accept the cons of using a service like that, because it works for them.

Yury Bulka schrieb am Dienstag, 20. April 2021 um 10:46:01 UTC+2:

> Just my 5 cents...
>
> Recently I had to register on a discord "server" to ask a question
> within another community - and the experience was of a high barrier of
> entry. I needed to provide my age, confirm my email, then (that might be
> an issue of that particular "server" - I'm not sure) I was forced to
> wait 5 minutes before I could interact. Also I notice now that discord
> sends me email notifications that contain third-party tracking.
>
> Another walled garden trying to make me an addict of their service.
>
> The only thing I want to do now is delete any of my presence on discord.
>
> The IRC + Matrix combination is much more open and inclusive I think.
>
> And there is a question of transparency of governance and moderation of
> course.
>
> --
> Yury Bulka
> https://mamot.fr/@setthemfree
> #NotOnFacebook
>
>
>
> Adam Golding  writes:
>
> > I'm not so sure now: 
> https://groups.google.com/g/racket-users/c/SkJAKkQhlgw
> >
> >
> > On Mon, 19 Apr 2021 at 03:39, Adam Golding  wrote:
> >
> >> seconded
> >>
> >> On Sun, 18 Apr 2021 at 14:56, schle...@gmail.com 
> >> wrote:
> >>
> >>>
> >>> The racket discord is managed quite well, I think it should be added to
> >>> the racket website so that newcomers can find it easier, just a 
> thought.
> >>>
> >>> Maybe below the link to slack?
> >>>
> >>> --
> >>> 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.
> >>> To view this discussion on the web visit
> >>> 
> https://groups.google.com/d/msgid/racket-users/a8e865db-f585-477d-b397-fceaa7cb3131n%40googlegroups.com
> >>> <
> https://groups.google.com/d/msgid/racket-users/a8e865db-f585-477d-b397-fceaa7cb3131n%40googlegroups.com?utm_medium=email&utm_source=footer
> >
> >>> .
> >>>
> >>
>
>

-- 
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/ced9d8f6-2a69-43da-9305-2d4af8aded25n%40googlegroups.com.


Re: [racket-users] Add Link to the racket Discord to the racket website?

2021-04-20 Thread Adam Golding
IRC + Matrix?  I've just been using mIRC, lol

On Tue, 20 Apr 2021 at 04:45, Yury Bulka 
wrote:

> Just my 5 cents...
>
> Recently I had to register on a discord "server" to ask a question
> within another community - and the experience was of a high barrier of
> entry. I needed to provide my age, confirm my email, then (that might be
> an issue of that particular "server" - I'm not sure) I was forced to
> wait 5 minutes before I could interact. Also I notice now that discord
> sends me email notifications that contain third-party tracking.
>
> Another walled garden trying to make me an addict of their service.
>
> The only thing I want to do now is delete any of my presence on discord.
>
> The IRC + Matrix combination is much more open and inclusive I think.
>
> And there is a question of transparency of governance and moderation of
> course.
>
> --
> Yury Bulka
> https://mamot.fr/@setthemfree
> #NotOnFacebook
>
>
>
> Adam Golding  writes:
>
> > I'm not so sure now:
> https://groups.google.com/g/racket-users/c/SkJAKkQhlgw
> >
> >
> > On Mon, 19 Apr 2021 at 03:39, Adam Golding 
> wrote:
> >
> >> seconded
> >>
> >> On Sun, 18 Apr 2021 at 14:56, schle...@gmail.com  >
> >> wrote:
> >>
> >>>
> >>> The racket discord is managed quite well, I think it should be added to
> >>> the racket website so that newcomers can find it easier, just a
> thought.
> >>>
> >>> Maybe below the link to slack?
> >>>
> >>> --
> >>> 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/a8e865db-f585-477d-b397-fceaa7cb3131n%40googlegroups.com
> >>> <
> https://groups.google.com/d/msgid/racket-users/a8e865db-f585-477d-b397-fceaa7cb3131n%40googlegroups.com?utm_medium=email&utm_source=footer
> >
> >>> .
> >>>
> >>
>
>

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


Re: [racket-users] Add Link to the racket Discord to the racket website?

2021-04-20 Thread Yury Bulka
Just my 5 cents...

Recently I had to register on a discord "server" to ask a question
within another community - and the experience was of a high barrier of
entry. I needed to provide my age, confirm my email, then (that might be
an issue of that particular "server" - I'm not sure) I was forced to
wait 5 minutes before I could interact. Also I notice now that discord
sends me email notifications that contain third-party tracking.

Another walled garden trying to make me an addict of their service.

The only thing I want to do now is delete any of my presence on discord.

The IRC + Matrix combination is much more open and inclusive I think.

And there is a question of transparency of governance and moderation of
course.

--
Yury Bulka
https://mamot.fr/@setthemfree
#NotOnFacebook



Adam Golding  writes:

> I'm not so sure now: https://groups.google.com/g/racket-users/c/SkJAKkQhlgw
>
>
> On Mon, 19 Apr 2021 at 03:39, Adam Golding  wrote:
>
>> seconded
>>
>> On Sun, 18 Apr 2021 at 14:56, schle...@gmail.com 
>> wrote:
>>
>>>
>>> The racket discord is managed quite well, I think it should be added to
>>> the racket website so that newcomers can find it easier, just a thought.
>>>
>>> Maybe below the link to slack?
>>>
>>> --
>>> 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/a8e865db-f585-477d-b397-fceaa7cb3131n%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/87pmyp1gzf.fsf%40privacyrequired.com.


Re: [racket-users] Add Link to the racket Discord to the racket website?

2021-04-20 Thread Adam Golding
I'm not so sure now: https://groups.google.com/g/racket-users/c/SkJAKkQhlgw


On Mon, 19 Apr 2021 at 03:39, Adam Golding  wrote:

> seconded
>
> On Sun, 18 Apr 2021 at 14:56, schle...@gmail.com 
> wrote:
>
>>
>> The racket discord is managed quite well, I think it should be added to
>> the racket website so that newcomers can find it easier, just a thought.
>>
>> Maybe below the link to slack?
>>
>> --
>> 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/a8e865db-f585-477d-b397-fceaa7cb3131n%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/CALiGnDBkMpjmS1QNL3pzqg3CCY1TFPUjagXT8zBfVy%3D%2BrzuYjQ%40mail.gmail.com.