Re: [racket-users] How to run multiple Racket installations?

2020-05-09 Thread Simon Schlee
You could use the nix package manager https://nixos.org/nix/ it runs on 
many linux platforms and macOS.

It has predefined racket and racket-minimal packages, you can define 
derived versions of those packages and adapt them to your needs.
It allows you to easily switch between different packages, you could e.g. 
use different profiles within nix to manage the different installations or 
create a own/private package for each one.

I just started using nix, but so far I would recommend it, it is refreshing 
to be able to undo your changes by just activating a previous 
state/generation.
https://pyvideo.org/europython-2014/rethinking-packaging-development-and-deployment.html

Simon

-- 
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/fa21bcff-7aa3-4e0a-bb4a-cd4aa561e302%40googlegroups.com.


Re: [racket-users] Another futures-related bug hunt

2020-05-09 Thread Matthew Flatt
At Sat, 9 May 2020 07:18:01 +0200, Dominik Pantůček wrote:
> would this be enough to open an issue for that?
> 
> (gdb) info threads
>Id   Target IdFrame
> * 1Thread 0x77c1b300 (LWP 19075) "tut22.rkt" 
> mark_backpointers (gc=gc@entry=0x559d10c0) at 
> ../../../racket/gc2/newgc.c:4078

Yes, this might identify the problem. Being stuck in a linked-list
iteration often means that there was a race updating the list.

The GC's write barrier is implemented by write-protecting pages and
handling SIGSEGV to record the modification (and remove write
protection until the next GC). If that handler is called in different
future threads, though, then there's currently a race on the list of
modified pages.

This race doesn't happen with places, because different places have
different GC instances. And it won't happen on Mac OS, because the
fault is handled at the Mach layer and routes exceptions for all
threads to a single handler thread.

I'll add a lock at lines 1092-1096 of "newgc.c", and we'll see if that
helps.

Thanks very much for your help!
Matthew

-- 
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/5eb6acea.1c69fb81.f6df9.aa57SMTPIN_ADDED_MISSING%40gmr-mx.google.com.


Re: [racket-users] Another futures-related bug hunt

2020-05-09 Thread Dominik Pantůček

Hello,



I'll add a lock at lines 1092-1096 of "newgc.c", and we'll see if that
helps.


should I open the issue or will you do it? (Speaking of race conditions...).

I'll re-run the tests with the lock once it is in the repo - sometimes 
it takes hours for this bug to exhibit and with 8 HTs the process in 
question consumes slightly more than 500% of CPU time - which means the 
computer sounds it's going to take off and fly. I'll keep it up and 
running overnight again.



And thank you for the explanation, digging in Racket internals has a 
very varying degree of difficulty :)



Cheers,
Dominik

--
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/606315e6-edd3-1ab5-48b2-770b6fd79893%40trustica.cz.


[racket-users] Mysterious multiple values in a typed-racket program

2020-05-09 Thread Hendrik Boom
I get the message 

readspec.rkt:195:8: Type Checker: Expression should produce 3 values, but 
produces 1 values of types String in: (for/set : (Setof String) (((l : String) 
(cast (in-lines input-port) (Sequenceof String (cast (string-trim l) 
String))

from the following function:

(define (read-manpages [input-port : Input-Port])
  (cast (for/set : (Setof String) (([l : String] (cast (in-lines input-port) 
(Sequenceof String
   (cast (string-trim l) String))
(Setof String)))

The expression it is complaining about is the (for/list ..) construction.

I'm trying to covert a Racket program to a typed Racket program.
As far as I can see, this function reads words, one to a line, from 
input-port and makes a set of these words.

It baffles me where the type checker gets the idea that 3 values are wanted 
anywhere.

I put in a lot of casts just to make sure I knew what types it had to work 
with.

The original code, without types:

(define (read-manpages input-port)
  (for/set ((l (in-lines input-port)))
   (string-trim l)))

Any ideas?

-- 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/20200509153840.ebbxgpzazrhdbldq%40topoi.pooq.com.


Re: [racket-users] Mysterious multiple values in a typed-racket program

2020-05-09 Thread Ben Greenman
On 5/9/20, Hendrik Boom  wrote:
> I get the message
>
> readspec.rkt:195:8: Type Checker: Expression should produce 3 values, but
> produces 1 values of types String in: (for/set : (Setof String) (((l :
> String) (cast (in-lines input-port) (Sequenceof String (cast
> (string-trim l) String))
>
> from the following function:
>
> (define (read-manpages [input-port : Input-Port])
>   (cast (for/set : (Setof String) (([l : String] (cast (in-lines input-port)
> (Sequenceof String
>(cast (string-trim l) String))
> (Setof String)))
>
> The expression it is complaining about is the (for/list ..)
> construction.
>
> I'm trying to covert a Racket program to a typed Racket program.
> As far as I can see, this function reads words, one to a line, from
> input-port and makes a set of these words.
>
> It baffles me where the type checker gets the idea that 3 values are wanted
>
> anywhere.
>
> I put in a lot of casts just to make sure I knew what types it had to work
> with.
>
> The original code, without types:
>
> (define (read-manpages input-port)
>   (for/set ((l (in-lines input-port)))
>(string-trim l)))
>
> Any ideas?

Well this is unfortunate.

`(l : String)` should be `l : String` with no parentheses

The code you have looks like this to Typed Racket:

```
(for/set : TYPE
  (((val0 val1 val2) (in-lines input-port)))
  LOOP-BODY)
```

-- 
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/CAFUu9R7wBS_hbZpXmFR097qxi8F-54rkogEXe6R0Nyqp_iMqDQ%40mail.gmail.com.


[racket-users] Re: How to avoid all packages when building from source?

2020-05-09 Thread Juan Francisco Cantero Hurtado

On 8/5/20 12:10, zeRusski wrote:

I just rebuilt Racket from git repo checkout. It takes a while but most of
that time is spent in `raco setup` which appears to be building all
packages in existence. E.g. games, redex-examples, realm of Racket chapter
6 (really?), plai, algol, etc. Why do I end up with the entire jungle? Is
there a way to avoid all these packages? Is there a way to figure where
these dependencies are coming from?


Use the snapshots from https://snapshot.racket-lang.org/. With that 
snapshots, you only need to build the interpreter.



--
Juan Francisco Cantero Hurtado http://juanfra.info

--
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/bdce0b9d-2ee5-2856-c204-600e62a825a5%40juanfra.info.


[racket-users] SOLVED: Mysterious multiple values in a typed-racket program

2020-05-09 Thread Hendrik Boom
On Sat, May 09, 2020 at 12:24:16PM -0400, Ben Greenman wrote:
> On 5/9/20, Hendrik Boom  wrote:
> > I get the message
> >
> > readspec.rkt:195:8: Type Checker: Expression should produce 3 values, but
> > produces 1 values of types String in: (for/set : (Setof String) (((l :
> > String) (cast (in-lines input-port) (Sequenceof String (cast
> > (string-trim l) String))
> >
> > from the following function:
> >
> > (define (read-manpages [input-port : Input-Port])
> >   (cast (for/set : (Setof String) (([l : String] (cast (in-lines input-port)
> > (Sequenceof String
> >(cast (string-trim l) String))
> > (Setof String)))
> >
> > The expression it is complaining about is the (for/list ..)
> > construction.
> >
> > I'm trying to covert a Racket program to a typed Racket program.
> > As far as I can see, this function reads words, one to a line, from
> > input-port and makes a set of these words.
> >
> > It baffles me where the type checker gets the idea that 3 values are wanted
> >
> > anywhere.
> >
> > I put in a lot of casts just to make sure I knew what types it had to work
> > with.
> >
> > The original code, without types:
> >
> > (define (read-manpages input-port)
> >   (for/set ((l (in-lines input-port)))
> >(string-trim l)))
> >
> > Any ideas?
> 
> Well this is unfortunate.
> 
> `(l : String)` should be `l : String` with no parentheses

Got it. It's confusing whenyuo need the parentheses around a type-binding and 
when you don't. 

-- hendrik

> 
> The code you have looks like this to Typed Racket:
> 
> ```
> (for/set : TYPE
>   (((val0 val1 val2) (in-lines input-port)))
>   LOOP-BODY)
> ```
> 
> -- 
> 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/CAFUu9R7wBS_hbZpXmFR097qxi8F-54rkogEXe6R0Nyqp_iMqDQ%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/20200509181040.iwzvd4un2btgcf4w%40topoi.pooq.com.


[racket-users] Ubuntu PPA also updated to v7.7

2020-05-09 Thread Asumu Takikawa
On 2020-05-02 15:02:57 -0400, 'John Clements' via Racket Users wrote:
> Racket version 7.7 is now available from
> 
> https://racket-lang.org/

The Ubuntu PPA was also updated to v7.7. Install instructions are on
the Launchpad page as usual:

  https://launchpad.net/~plt/+archive/ubuntu/racket

Please report any packaging bugs on Github:

  https://github.com/takikawa/racket-ppa

Cheers,
Asumu

-- 
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/20200510052919.5yyh3jfmoivbrzzd%40nixos.


Re: [racket-users] Quickscript of the day: Extract to function

2020-05-09 Thread Laurent
Major update:
- put-function is much faster, by triggering check-syntax as early as
possible and avoiding its re-computation.
- More warnings and error reporting (in particular regarding mutated
variables).
- Added more information at the top of the script file, in particular some
caveats.

Please report bugs here:
https://github.com/Metaxal/quickscript-extra/issues

If you have already installed this:
raco pkg update quickscript-extra
and if DrRacket is open, click on "Scripts | Manage scripts | Unload
persistent scripts" to restart the script.

On Thu, May 7, 2020 at 12:52 PM Stephen De Gabrielle <
spdegabrie...@gmail.com> wrote:

> Awesome - keep them coming.
>
> You should feature one in each Racket-News!
>
> Stephen
>
> On Thu, 7 May 2020 at 10:33, Laurent  wrote:
>
>> Have you ever wanted to extract a block of code out of its context and
>> wrap it in a function?
>>
>> Have you ever *not* done it because of the cognitive load(*) of figuring
>> out the function arguments and the return values?
>>
>> Well, now it's as easy as Ctrl-Shift-X and Ctrl-Shift-Y. Using
>> check-syntax, the extract-function and put-function scripts figure out what
>> goes in and out for you.
>>
>> Video: https://www.youtube.com/watch?v=XinMxDLZ7Zw
>> `raco pkg install quickscript-extra` to install, or
>> `raco pkg update quickscript-extra` if it's already installed.
>>
>> (*) a.k.a. laziness ;)
>>
>> --
>> 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/CABNTSaHpOYQM2X3TW%3DHYGP7_CTA8jCaj4Euh0mcjnus1aOdt-g%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/CABNTSaGB7iXj469Un70eqNqg8W0Pqc8muT8NDd5WY1pQv%2BJeXg%40mail.gmail.com.