Re: [racket-users] Web server catch exceptions, print stack trace to error-logs, display simple page to user

2016-03-18 Thread Marc Kaufmann
Yep, printing that out is indeed all I want. I hadn't thought about the fact that 'print and 'display will show up in standard output. John, how do you use drrackt's log handlers, are you running the server via Drracket or did you mean something different. I can't use daemontools for reasons to d

[racket-users] Algol 60

2016-03-18 Thread Arthur Nunes-Harwitt
Hi, I'm using Racket v6.4. I tried to run an Algol 60 program (that worked in the past) by selecting the Algol 60 option in the experimental languages section. I got the following error message. for-body43686: unbound identifier; also, no #%top syntax transformer is bound in: for-body4

Re: [racket-users] Web server catch exceptions, print stack trace to error-logs, display simple page to user

2016-03-18 Thread 'John Clements' via Racket Users
> On Mar 17, 2016, at 11:50 AM, Marc Kaufmann wrote: > > Hi all, > > I do not want people to see "Contract violation: massive stack trace > documenting my brilliance as a programmer" every time they hit a bug on my > website. > > Currently I show them simply an error page and redirect the tr

Re: [racket-users] Web server catch exceptions, print stack trace to error-logs, display simple page to user

2016-03-18 Thread 'John Clements' via Racket Users
> On Mar 17, 2016, at 4:48 PM, Marc Kaufmann wrote: > > Yep, printing that out is indeed all I want. I hadn't thought about the fact > that 'print and 'display will show up in standard output. > > John, how do you use drrackt's log handlers, are you running the server via > Drracket or did y

Re: [racket-users] predicate as an atom within a regexp?

2016-03-18 Thread Daniel Prager
Hi Matthew Do you want the leftmost, longest substring matching the predicate? E.g. something like (substring/p string->number "foo-46.3bar12789") returns "-46.3"? Dan -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this g

Re: [racket-users] Racket -> HTML+JavaScript using Urlang and Ractive

2016-03-18 Thread Daniel Prager
Matthew writes: > The idea of a subset of Racket that compiles to this kind of statistically probable subset of JS is very appealing. Agreed. The way Jens has split it up is that Urlang is a thin, cleaned-up Racket-ish syntax for ES5, with a bit of sugar and a macro capability. Then there's rjs,

Re: [racket-users] predicate as an atom within a regexp?

2016-03-18 Thread Andrew Gwozdziewycz
On Thu, Mar 17, 2016 at 4:17 PM, Matthew Butterick wrote: > > On Mar 17, 2016, at 2:05 PM, Andrew Gwozdziewycz wrote: > > I am imagining an API that utilizes SCSH style regexes but allows you to > do something like this (fictional): > > (define-values (area prefix line) (sre-match (: (= digits 3

Re: [racket-users] predicate as an atom within a regexp?

2016-03-18 Thread Matthew Butterick
On Mar 17, 2016, at 2:05 PM, Andrew Gwozdziewycz wrote: > I am imagining an API that utilizes SCSH style regexes but allows you to do > something like this (fictional): > > (define-values (area prefix line) (sre-match (: (= digits 3) (_? "-") (= > digits 3) (_? "-") (= digits 3 Racket's

Re: [racket-users] Racket for web apps

2016-03-18 Thread Jay McCarthy
It's great. Check out the various libraries of the web-server. I'd suggest starting from web-server/servlet-env and web-server/dispatch. Jay On Fri, Mar 18, 2016 at 5:00 PM, Kaylen Wheeler wrote: > Hi, > > I'm new to Racket, but not to lisp. I have been a Clojure user for some > time. I began

[racket-users] predicate as an atom within a regexp?

2016-03-18 Thread Matthew Butterick
What is the best approach to destructuring strings using predicates? For instance "match a substring for which `string->number` is true." I can approximate this using `regexp-match-positions` and stepping through possible substrings, testing until one matches, etc. But I notice that this amou

Re: [racket-users] Web server catch exceptions, print stack trace to error-logs, display simple page to user

2016-03-18 Thread Marc Kaufmann
Hm, it sounded like I needed sudo rights to run daemontools if I want to use it to start racket as sudo (I may be wrong). Either way, the admins told me no, so no it is. Either supervisord or daemontools are of course several steps up from my previous way of doing things (which may justify their re

RE: [racket-users] dynamic-require

2016-03-18 Thread Jos Koot
Ir works fine. I must have overlooked something in the docs. Thanks again. Jos _ From: Scott Moore [mailto:sc...@thinkmoore.net] On Behalf Of Scott Moore Sent: miƩrcoles, 16 de marzo de 2016 18:05 To: Jos Koot; Racket Users Cc: Jos Koot Subject: Re: [racket-users] dynamic-require If t

[racket-users] new #lang sicp

2016-03-18 Thread Neil Van Dyke
Could anyone currently working through or teaching SICP please try out the new `#lang sicp` support, in Jens Axel Sogaard's `sicp` package in the new package system? http://docs.racket-lang.org/sicp-manual/ If you find any problems with this, please let me and Jens Axel know. I'd prefer to sh

Re: [racket-users] predicate as an atom within a regexp?

2016-03-18 Thread Matthew Butterick
Ah, very nice. Do I infer correctly that the predicates are greedy left-to-right? #lang racket (require match-string rackunit) (define (no-digits x) (regexp-match #px"^\\D+$" x)) (check-equal? (match "foo42.3bar" [(string-append (? no-digits) (? string->number x) rest) x] [else 'no]) "