[racket-users] pkg.racket-lang.org account creation / recovery failing

2020-08-16 Thread Marc Burns
Hi all,

I'm currently getting a stack trace starting with "subprocess: process
creation failed" when I try to get a code to sign up for
pkg.racket-lang.org. The stack trace shows up right after I enter my
email and hit "Email me a code". I've tried a few different email
addresses and browsers.

I've got a few brand new packages here and would love to be able to
publish them :)

(also posted a message on IRC about this)

Marc

-- 
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/a8d18288-16a2-59f4-b0bd-6239ece6defd%40uwaterloo.ca.


0x2E541A315E1B4A75.asc
Description: application/pgp-keys


[racket-users] LinuxCon

2016-08-22 Thread Marc Burns
Hi Racketeers,

Is anyone at LinuxCon this week? Want to meet up during or after events today?

Cheers,
Marc

-- 
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: Racket Docker images from Alpine

2016-07-13 Thread Marc Burns
Hi Juan,

> Great work!. Just a few comments:
> ...

Thank you; I've integrated your suggestions. I'll open a PR to get rid
of these patches when I come back to this tonight.

I've pushed a new image.

Cheers,
Marc

-- 
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 Docker images from Alpine

2016-07-12 Thread Marc Burns

Hi all,

I remember this topic came up on the list a while back. I've made a 
Docker image of the latest Racket from alpine 3.3 with just musl libc. I 
had to monkey patch some Racket internals to get this working, so it 
might be badly and subtly broken. Feedback is appreciated!


Dockerfile etc.: https://github.com/m4burns/racket-docker
Docker repo: https://hub.docker.com/r/m4burns/racket/

The size is a little bit of an improvement over Jack Firth's images (35 
vs 22 mb). I'm not sure it's worth the uncertainty of using musl instead 
of glibc.


Enjoy!

Marc

--
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] Using Racket server in production?

2016-01-24 Thread Marc Burns

Hi David,

I use the Racket web server in production to serve authentication and 
misc. requests that don't play nicely with our main web framework.


There's been no difficulty integrating with outside systems. We use 
nginx in front of Racket for SSL termination and some light request 
processing; nothing unusual was required. Stephen Chang's redis client 
library works well. There were once some issues with file descriptor 
cleanup in the web server, but I haven't encountered any leaks for a 
couple of years.


Load testing:


m4burns@m4burns:~$ ab -n 1 -c 10 http://192.168.1.1:12345/auth/whoami
This is ApacheBench, Version 2.3 <$Revision: 1604373 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.1.1 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 1 requests
Finished 1 requests


Server Software:Racket
Server Hostname:192.168.1.1
Server Port:12345

Document Path:  /auth/whoami
Document Length:28 bytes

Concurrency Level:  10
Time taken for tests:   7.261 seconds
Complete requests:  1
Failed requests:0
Non-2xx responses:  1
Total transferred:  227 bytes
HTML transferred:   28 bytes
Requests per second:1377.15 [#/sec] (mean)
Time per request:   7.261 [ms] (mean)
Time per request:   0.726 [ms] (mean, across all concurrent requests)
Transfer rate:  305.29 [Kbytes/sec] received

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:00   0.0  0   0
Processing: 17   8.3  6 194
Waiting:16   7.7  5 193
Total:  17   8.3  6 194

Percentage of the requests served within a certain time (ms)
  50%  6
  66%  7
  75%  7
  80%  8
  90% 10
  95% 15
  98% 18
  99% 20
 100%194 (longest request)


So, it does just fine under heavy load. This service has been left 
running for a couple months at a time and nothing weird has happened.


Regarding deployment speed, Typed Racket is a bit slow to compile right 
now. You can get around this by structuring your program (possibly using 
units) to allow greater build parallelism. Untyped Racket builds quickly.


Unless you go out of your way to implement reloadable components 
(possibly using https://github.com/tonyg/racket-reloadable ), updating 
the system will require bouncing the server. If your server doesn't 
maintain internal state between requests, you can bounce it without any 
interruption. For example, you could set up nginx to use a backup 
upstream server on an alternate port. When you want to upgrade, start 
the new server on the alternate port before you kill the old one. After 
the old one has died, you can move back to the primary port.


The continuation-based framework for managing state is very convenient. 
If you choose to keep state on the server, some care must be taken to 
limit memory use and properly evict unneeded continuations. Keeping 
state on the client works brilliantly.


Using the Racket webserver has always been a breeze for me. It's easy to 
do stuff that requires mucking with HTTP and it's easy to build 
complete, reliable apps. This kind of flexibility really makes my day.


Good luck in your endeavor.

Cheers,
Marc Burns

On 2016-01-23 5:23 PM, David Storrs wrote:
Is anyone here using the Racket web server in production? If so, 
what's your experience with it?  Specifically:


Have you had any difficulty integrating it with outside systems? (e.g. 
Varnish, Redis, load balancer ooling, etc)  Most of this I wouldn't 
expect to be an issue, but I figured I'd ask for unknown unknowns.


What sort of load testing have you done and how has it held up?

What has your general experience been as regards deployment speed, etc?

Can you update the system on the fly without interrupting current 
users, or does it require bouncing the server?


I'm doing my due diligence on a tech startup concept and would like to 
use Racket, but I want to make sure the tools are appropriate. For 
reference, the concept is crowdfunding for artists with a focus on 
campaign growth instead of enablement.


Dave
--
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 
<mailto: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 sto

Re: [racket-users] Store value with unsupported type in Postgres?

2016-01-17 Thread Marc Burns

You can cast first to a supported type:

(query-exec conn "INSERT INTO some_table (ip) VALUES (inet ($1 ::text))" 
client-ip)


On 2016-01-17 7:35 PM, Alexis King wrote:

I would like to avoid interpolating into a query if at all possible,
given that this string is not something I control. I could be very
careful about validating or sanitizing it, but this is a pretty textbook
use case for parameterized queries.


On Jan 17, 2016, at 16:19, Jon Zeppieri  wrote:

How about: (query-exec conn (format "INSERT INTO some_table (ip) VALUES (inet 
'~a')" client-ip))


--
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] Startup times

2015-09-14 Thread Marc Burns
Here’s the result of `strace -c -f -- racket -l racket/base` for Racket 6.1.1.8 
on my Linux workstation:

% time seconds  usecs/call callserrors syscall
-- --- --- - - 
 99.080.004000 571 7   nanosleep
  0.920.37   0   236   read
  0.000.00   0   10323 open
  0.000.00   079   close
…

Does it look similar on the Note 4?

> On Sep 14, 2015, at 9:00 PM, Marc Burns <m4bu...@uwaterloo.ca> wrote:
> 
> Set the environment variable PLTSTDERR=debug to get more verbose output.
> 
> Startup involves traversing all the bytecode files that comprise the base 
> environment. How fast is filesystem access on the Note 4 compared to PC? You 
> could use strace to find the latency on different system calls made during 
> startup.
> 
>> On Sep 14, 2015, at 8:55 PM, John Carmack <jo...@oculus.com 
>> <mailto:jo...@oculus.com>> wrote:
>> 
>> I am experimenting with running racket natively on Android to compare with 
>> my current embedded Chibi scheme implementation.  It would be convenient to 
>> just leave racket as a separate process and communicate over sockets/pipes 
>> so it exactly mimics my remote development case.
>>  
>> The startup time to run a trivial console program is very long.  A one line 
>> program with #lang racket/base takes over seven seconds:
>>  
>> root@trlte:/mnt/shell/emulated/0/Oculus/racket/bin # time ./racket 
>> cmdline2.rkt
>> cmdline2.rkt 
>> <
>> line 1
>> line 2
>> line 3
>> line 4
>> line 5
>> line 6
>> line 7
>> line 8
>> line 9
>> 0m7.96s real 0m7.04s user 0m0.65s system
>>  
>> My first test, which still had the default #lang racket, took almost a 
>> minute to start:
>>  
>> root@trlte:/mnt/shell/emulated/0/Oculus/racket/bin # time ./racket 
>> cmdline.rkt
>> cmdline.rkt  
>> <
>> line 1
>> line 2
>> line 3
>> line 4
>> line 5
>> line 6
>> line 7
>> line 8
>> line 9
>> 0m54.16s real 0m48.68s user 0m4.83s system
>>  
>> On a PC, it only takes a fraction of a second.  This was on a Note 4, which 
>> should not be 100x slower than a PC.  Could it not be using the compiled 
>> library bytecode somehow?  I didn’t see any command line options for verbose 
>> output on startup, is there any way to force some extra information?
>>  
>> 
>> -- 
>> 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 
>> <mailto:racket-users+unsubscr...@googlegroups.com>.
>> For more options, visit https://groups.google.com/d/optout 
>> <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 
> <mailto:racket-users+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <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] Startup times

2015-09-14 Thread Marc Burns
Set the environment variable PLTSTDERR=debug to get more verbose output.

Startup involves traversing all the bytecode files that comprise the base 
environment. How fast is filesystem access on the Note 4 compared to PC? You 
could use strace to find the latency on different system calls made during 
startup.

> On Sep 14, 2015, at 8:55 PM, John Carmack  wrote:
> 
> I am experimenting with running racket natively on Android to compare with my 
> current embedded Chibi scheme implementation.  It would be convenient to just 
> leave racket as a separate process and communicate over sockets/pipes so it 
> exactly mimics my remote development case.
>  
> The startup time to run a trivial console program is very long.  A one line 
> program with #lang racket/base takes over seven seconds:
>  
> root@trlte:/mnt/shell/emulated/0/Oculus/racket/bin # time ./racket 
> cmdline2.rkt
> cmdline2.rkt <
> line 1
> line 2
> line 3
> line 4
> line 5
> line 6
> line 7
> line 8
> line 9
> 0m7.96s real 0m7.04s user 0m0.65s system
>  
> My first test, which still had the default #lang racket, took almost a minute 
> to start:
>  
> root@trlte:/mnt/shell/emulated/0/Oculus/racket/bin # time ./racket cmdline.rkt
> cmdline.rkt  <
> line 1
> line 2
> line 3
> line 4
> line 5
> line 6
> line 7
> line 8
> line 9
> 0m54.16s real 0m48.68s user 0m4.83s system
>  
> On a PC, it only takes a fraction of a second.  This was on a Note 4, which 
> should not be 100x slower than a PC.  Could it not be using the compiled 
> library bytecode somehow?  I didn’t see any command line options for verbose 
> output on startup, is there any way to force some extra information?
>  
> 
> -- 
> 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] postgresql-connect and #:notification-handler

2015-07-14 Thread Marc Burns
Hi Tim,

I wanted the same thing a few months ago. I couldn’t find a nice way to modify 
`db', so I wrote a small C library that links with libpq and some FFI bindings. 
This was probably not the right thing to do.

http://www.convextech.ca/~m4burns/pqnotify/ 
http://www.convextech.ca/~m4burns/pqnotify/

If nothing else works, this undocumented chunk of code with external 
dependencies will let you do what you want.

Cheers,
Marc

 On Jul 14, 2015, at 10:20 AM, Tim Brown tim.br...@cityc.co.uk wrote:
 
 Folks,
 
 I have an application that would I would like to react immediately to
 changes in a PostgreSQL database. I would like to use a combination of
 TRIGGERs and LISTEN/NOTIFY to achieve this.
 
 I am connecting to my database using:
 
 (define (NH . a)
  (printf NOTIFICATION: ~s~% a))
 
 (define pgc
  (postgresql-connect
#:server my-host
#:user me
#:database the-db
#:password souper secret password
#:notification-handler NH))
 
 Then setting up a “listener” with:
 
 (query pgc LISTEN x)
 ;; (query pgc NOTIFY x, 'woo') ; [1]
 
 If I issue a NOTIFY x; on an psql prompt... nothing happens.
 Until I do a database query (even “SELECT 1” is good enough).
 
 I can therefore “poll” the database for notifications with:
 
 (define (poll-notify)
  (query pgc select 1)
  (sleep 3)
  (poll-notify))
 (thread poll-notify)
 
 But I want NH to be called as soon (as possible) as the “NOTIFY” is
 issued (subject to the caveats in [2]). This either to happen
 automagically OR by being able to obtain an evt that I can sync on.
 
 I can find a place where the handlers are delayed -- I assume due to
 being inside a transaction or lock -- but I cannot find a handle to
 anything syncable.
 
 Any help would be appreciated.
 
 [1] Ironically: if this query is included, NH is called, because the
notifcation is posted before the query returns.
 
 [2] http://www.postgresql.org/docs/9.4/static/sql-notify.html
 
 Regards,
 
 Tim
 
 -- 
 Tim Brown CEng MBCS tim.br...@cityc.co.uk
 
City Computing Limited · www.cityc.co.uk
  City House · Sutton Park Rd · Sutton · Surrey · SM1 2AE · GB
T:+44 20 8770 2110 · F:+44 20 8770 2130
 
 City Computing Limited registered in London No:1767817.
 Registered Office: City House, Sutton Park Road, Sutton, Surrey, SM1 2AE
 VAT No: GB 918 4680 96
 
 -- 
 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] time_t and size_t ffi types

2015-06-16 Thread Marc Burns
What about _size in ffi/unsafe ?

 On Jun 14, 2015, at 1:39 PM, Eric Dobson eric.n.dob...@gmail.com wrote:
 
 I'm currently on working on bindings to a foreign library that has elements 
 in structs that are defined as time_t and size_t. I couldn't find anything in 
 the core ffi types that corresponded to these, so currently I am using 
 int64_t as that was what I found was correct for the system I'm currently 
 working on (OS X), which might not work when I try to port this to other OS's 
 (Linux).
 
 What is the best practice for using such types, is there any core c-type I 
 should use or should I just roll my own?
 
 -- 
 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 
 mailto:racket-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout 
 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] accessing a directory local file to a module

2015-05-12 Thread Marc Burns
Check out define-runtime-path in the docs

 On May 11, 2015, at 10:19 PM, thomas.lynch 
 thomas.ly...@reasoningtechnology.com wrote:
 
 I apologize if this posted before, but given a day I don't see it here..
 
 I have a function with a companion data file (data file is part of the 
 collection).  When I invoke it with a relative path name (just the file 
 name), racket looks for it in the directory the function is invoked from, not 
 the directory the module is in.
 
 This was ok during development, but now that the module is installed it is a 
 problem.  The collects path does not help, as directory install does not move 
 the collection.  I think maybe (get-module-path)  but I haven't been able to 
 get it work.  
 
 Any tips appreciated!
 
 -- 
 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.