[racket-users] Re: Can't update scribble-lib with raco

2017-12-12 Thread Vishal Prasad
Ben,

Thanks, very clear explanation.

-Vishal

On Monday, December 11, 2017 at 11:34:04 PM UTC-5, Vishal Prasad wrote:
>
> Hey everyone,
>
> I'm not sure what to do here. I'm trying to install plai-typed with raco:
>
> vishal@witters:~/programming_misc/plangs$ sudo raco pkg install -i plai-
>> typed
>>
>> Resolving "plai-typed" via http://
>> download.racket-lang.org/releases/6.3/catalog/
>> Resolving "plai-typed" via http://pkgs.racket-lang.org
>> Using cached15130507731513050773990 for github://
>> github.com/mflatt/plai-typed/master
>> The following out-of-date packages are listed as dependencies of plai-
>> typed:
>>scribble-lib (have 1.12, need 1.16)
>> Would you like to update these dependencies? [Y/n/a/c/?]
>>
>>
> After trying to install, raco fails to find the appropriate version of 
> scribble-lib:
>
> Would you like to update these dependencies? [Y/n/a/c/?] Y
> Resolving "scribble-lib" via http://
> download.racket-lang.org/releases/6.3/catalog/
> Resolving "scribble-html-lib" via http://
> download.racket-lang.org/releases/6.3/catalog/
> Using cached15130508571513050857401 for http://
> download.racket-lang.org/releases/6.3/pkgs/scribble-lib.zip
> raco pkg install: version mismatch for dependency
>   for package: plai-typed
>   mismatch packages:
>scribble-lib (have 1.12, need 1.16)
>
> Trying to update scribble-lib directly doesn't help:
>
> vishal@witters:~/programming_misc/plangs$ sudo raco pkg update scribble-
> lib
> Inferred package scope: installation
> Resolving "scribble-lib" via http://
> download.racket-lang.org/releases/6.3/catalog/
> Resolving "scribble-html-lib" via http://
> download.racket-lang.org/releases/6.3/catalog/
> No updates available
>
> It can't find anything beyond 1.12, even though the project is currently 
> on version 1.26 (
> https://github.com/racket/scribble/blob/master/scribble-lib/info.rkt).
>
> What's the best way around this? Why isn't raco finding the appropriate 
> versions? If I cloned the latest release and tried to install from that, 
> would raco's package version/checksums be updated appropriately?
>
>
>

-- 
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] Can't update scribble-lib with raco

2017-12-11 Thread Vishal Prasad
Hey everyone,

I'm not sure what to do here. I'm trying to install plai-typed with raco:

vishal@witters:~/programming_misc/plangs$ sudo raco pkg install -i plai-
> typed
>
> Resolving "plai-typed" via http:
> //download.racket-lang.org/releases/6.3/catalog/
> Resolving "plai-typed" via http://pkgs.racket-lang.org
> Using cached15130507731513050773990 for github:
> //github.com/mflatt/plai-typed/master
> The following out-of-date packages are listed as dependencies of plai-
> typed:
>scribble-lib (have 1.12, need 1.16)
> Would you like to update these dependencies? [Y/n/a/c/?]
>
>
After trying to install, raco fails to find the appropriate version of 
scribble-lib:

Would you like to update these dependencies? [Y/n/a/c/?] Y
Resolving "scribble-lib" via http:
//download.racket-lang.org/releases/6.3/catalog/
Resolving "scribble-html-lib" via http:
//download.racket-lang.org/releases/6.3/catalog/
Using cached15130508571513050857401 for http:
//download.racket-lang.org/releases/6.3/pkgs/scribble-lib.zip
raco pkg install: version mismatch for dependency
  for package: plai-typed
  mismatch packages:
   scribble-lib (have 1.12, need 1.16)

Trying to update scribble-lib directly doesn't help:

vishal@witters:~/programming_misc/plangs$ sudo raco pkg update scribble-lib
Inferred package scope: installation
Resolving "scribble-lib" via http:
//download.racket-lang.org/releases/6.3/catalog/
Resolving "scribble-html-lib" via http:
//download.racket-lang.org/releases/6.3/catalog/
No updates available

It can't find anything beyond 1.12, even though the project is currently on 
version 1.26 
(https://github.com/racket/scribble/blob/master/scribble-lib/info.rkt).

What's the best way around this? Why isn't raco finding the appropriate 
versions? If I cloned the latest release and tried to install from that, 
would raco's package version/checksums be updated appropriately?


-- 
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] Racket Echo Server/Client hanging

2017-12-05 Thread Vishal Prasad
Jon,

Thanks!

-Vishal

On Wednesday, December 6, 2017 at 12:19:07 AM UTC-5, Jon Zeppieri wrote:
>
>
>
> On Wed, Dec 6, 2017 at 12:13 AM, Vishal Prasad <vpra...@gmail.com 
> > wrote:
>
>> And this is the client:
>>
>>
>> (define (hello_socket port)
>> (define-values (in out) (tcp-connect "localhost" port))
>> (write "hello socket world\n" out)
>> (display (read in)))
>>
>>
>> The client does not receive any text back, and just hangs on the read. 
>>
>>
>> The `write` is buffered. If you add a `(flush-output out)`, it will work.
>
> - 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.


[racket-users] Racket Echo Server/Client hanging

2017-12-05 Thread Vishal Prasad
 

Really embarrassed I can't figure out what's going on here, but I just 
spent the last two hours banging my head against this going nowhere.


I'm trying to create a simple echo server and client in Racket.


This is the server:


(define (hello_listen port)
(define listener (tcp-listen port))
(define (loop)
(define-values (in out) (tcp-accept listener))
(thread (lambda ()
(copy-port in out)
(close-output-port out)))
(loop))
(loop))


And this is the client:


(define (hello_socket port)
(define-values (in out) (tcp-connect "localhost" port))
(write "hello socket world\n" out)
(display (read in)))


The client does not receive any text back, and just hangs on the read. 

When I write a simple client in Python however, the behavior is fine:


>>> import socket
>>> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
>>> s.connect(('localhost', ))
>>> s.send("hi")   
2
>>> s.recv(500)
'hi' 

What am I missing here in the Racket client code?

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