[racket-users] Re: What is the best way to daemonize a Racket program on linux?

2018-11-28 Thread Tom Gillespie
If you're not into systemd https://gist.github.com/tgbugs/c2990382b3fdfef86a2a3a1bc0516099 is an example of an openrc init script that I use to daemonize a servlet (running behind nginx) which is an echo server that responds with the ip of the requester and that is initialized like this:

[racket-users] Re: What is the best way to daemonize a Racket program on linux?

2018-11-28 Thread Alex Harsanyi
If your Linux installation has systemd, you can create a service file for your application -- this way, systemd will manage the application as a server or daemon. Systemd will even redirect stderr messages to the system log. Alex. On Thursday, November 29, 2018 at 10:56:25 AM UTC+8, Brian

[racket-users] What is the best way to daemonize a Racket program on linux?

2018-11-28 Thread Brian Adkins
I briefly looked at the daemonize package on Ubuntu linux, but couldn't get it to work properly. I found the following Rosetta Code page: https://rosettacode.org/wiki/Run_as_a_daemon_or_service#Racket So, I just tried the code in that example, and it seems to work fine: (module+ main *

Re: [racket-users] Racket application servers

2018-11-28 Thread Brian Adkins
I finally got a very simple, "hello world", Racket web app up and running, and I'm very encouraged with the performance. I just started a single Racket instance and proxy to it from nginx. I have it running on an AWS EC2 instance, and running the Apache Benchmark (ab) utility on my laptop as

[racket-users] Setting global attributes for in scribble

2018-11-28 Thread David Van Horn
I'm trying to add a lang attribute to all html elements generated by scribble (when rendering to HTML). If I add a style with attributes to the title, this does the right thing but only for the "top" page. The attribute is missing in other sections. (Strangely if I add a js-addition to the

[racket-users] Re: Thanks to Alex

2018-11-28 Thread Jason Stewart
Yep. There was some Python script that used Gnuplot to do the same thing, but the refresh rate was fairly awful. There's also the original Gnuplot hack of putting a reload and timeout in your plot instructions--leading to gnuplot whack-a-mole. Didn't notice that Racket had an incredible

[racket-users] Re: Thanks to Alex

2018-11-28 Thread Alex Harsanyi
On Wednesday, November 28, 2018 at 8:38:04 PM UTC+8, Jason Stewart wrote: > > My first Racket program: > > https://github.com/BourgeoisBear/stdinoscope > > This looks cool. Is this program intended for displaying real time data from some signal acquisition system? I'm also working on an

Re: [racket-users] wrapping C datatypes

2018-11-28 Thread Matthew Flatt
While those declarations do reflect the C code, assuming that `_char` is an alias for `_byte`, I think it's probably not the intent of the library that you look at the data referenced by a `hb_language_t`. The `struct` declaration looks like a placeholder. Probably (define _hb_language_t

Re: [racket-users] cons-specific optimizations?

2018-11-28 Thread Gustavo Massaccesi
The last example should be (when (and (list? l) (pair? l)) (let ([x (cdr l)]) (list? x) ;==> #t )) Gustavo Technical note: The optimizer wants to be sure that (cdr l) is safe before asserting that x is a list?. It should be ok to mark x as a list?, because if there is an error the inner

[racket-users] Re: RacketCon 2018 videos

2018-11-28 Thread Anthony Quizon
Did you get any information elsewhere about this? I too am curious about higher quality racketcon youtube videos. On Tuesday, November 6, 2018 at 8:08:30 AM UTC+11, Eric Haney wrote: > > Hello, > > I noticed that Youtube has a few streams of the recent RacketCon event. I > can get the gist of

Re: [racket-users] cons-specific optimizations?

2018-11-28 Thread Gustavo Massaccesi
Some additional comments about this subject. A big difference is that in Chez Scheme the cons are mutable, and that makes it almost impossible to make any optimization with the lists at the Chez Scheme level. With the current Racket implementation there are a few reductions at compile time for

[racket-users] wrapping C datatypes

2018-11-28 Thread Matthew Butterick
To call my C rusty would be an insult to rust. I'm trying to write an FFI wrapper for certain datatypes in the Harfbuzz library: struct hb_language_impl_t { const char s[1]; }; typedef const struct hb_language_impl_t *hb_language_t; Is this the right interpretation? (define

Re: [racket-users] cons-specific optimizations?

2018-11-28 Thread Matthew Flatt
Right. An alternative would be to set decide eagerly, but `list?` tests are infrequent relative to pair constructions. Then again, a function like `list` can and does set the "is a list" bit eagerly and cheaply on newly allocated pairs. At Wed, 28 Nov 2018 18:16:31 +0100, Robby Findler wrote: >

Re: [racket-users] cons-specific optimizations?

2018-11-28 Thread George Neuner
On 11/28/2018 12:15 PM, Alexis King wrote: > On Nov 28, 2018, at 07:15, Matthew Flatt wrote: > > Yes, that's special handling for pairs in the sense that the > traditional Racket implementation takes advantage of leftover bits in a > pair object, and it uses two of them for "is a list" and

Re: [racket-users] cons-specific optimizations?

2018-11-28 Thread Robby Findler
Also "don't know yet". Robby On Wed, Nov 28, 2018 at 6:15 PM Alexis King wrote: > > On Nov 28, 2018, at 07:15, Matthew Flatt wrote: > > > > Yes, that's special handling for pairs in the sense that the > > traditional Racket implementation takes advantage of leftover bits in a > > pair object,

Re: [racket-users] cons-specific optimizations?

2018-11-28 Thread Alexis King
> On Nov 28, 2018, at 07:15, Matthew Flatt wrote: > > Yes, that's special handling for pairs in the sense that the > traditional Racket implementation takes advantage of leftover bits in a > pair object, and it uses two of them for "is a list" and "not a list". > > Racket-on-Chez doesn't have

Re: [racket-users] cons-specific optimizations?

2018-11-28 Thread Matthew Flatt
At Wed, 28 Nov 2018 03:13:16 -0800 (PST), Tony Garnock-Jones wrote: > On Wednesday, November 28, 2018 at 2:43:26 AM UTC, Matthew Flatt wrote: > > > > The compilers in both cases know some facts about how `cons` relates to > > other primitives, but they also know how structure constructors and >

[racket-users] Thanks to Alex

2018-11-28 Thread Jason Stewart
My first Racket program: https://github.com/BourgeoisBear/stdinoscope Thanks to Alex for help with my window messaging issue! -- 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,

Re: [racket-users] cons-specific optimizations?

2018-11-28 Thread Tony Garnock-Jones
On Wednesday, November 28, 2018 at 2:43:26 AM UTC, Matthew Flatt wrote: > > The compilers in both cases know some facts about how `cons` relates to > other primitives, but they also know how structure constructors and > accessors relate, so it's not as big a difference at that level. > There