Re: [racket-users] Include link in email: what headers to use?

2016-03-26 Thread Jon Zeppieri
The `extra-header` parameter is a rest parameter, so you're supposed to
pass one string per header, not a single string containing all of them.
And, if you were going to send them all in a single string, you'd need to
separate them with an \r\n sequence, not with semicolons. So pass two
separate strings as the last two arguments:

"Return-Path: "
"Content-Type: text/html; charset=iso-8859-1"

-Jon

On Sun, Mar 27, 2016 at 1:18 AM, Marc Kaufmann 
wrote:

> Hi all,
>
> I am sending out emails with sendmail, and found a PHP thread [1] on the
> headers one should include in order to be able to use html in the emails -
> I want this only to make the links look nice, e.g.  href="i-am-long-and-ugly">Pretty.
>
> Unfortunately, adding "Return-Path: ;
> Content-type: text/html; charset=iso-8859-1;" as the extra-header string to
> sendmail has absolutely no effect and the html gets simply printed as text.
>
> I don't know whether this is due to Racket, sendmail, or the sendmail
> configuration on my system, so let me know if I should look elsewhere for
> solutions.
>
> Cheers,
> Marc
>
> [1]:
> http://stackoverflow.com/questions/15711700/php-mail-how-to-put-an-html-link-in-an-email
>
> --
> 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.


[racket-users] Include link in email: what headers to use?

2016-03-26 Thread Marc Kaufmann
Hi all,

I am sending out emails with sendmail, and found a PHP thread [1] on the
headers one should include in order to be able to use html in the emails -
I want this only to make the links look nice, e.g. Pretty.

Unfortunately, adding "Return-Path: ;
Content-type: text/html; charset=iso-8859-1;" as the extra-header string to
sendmail has absolutely no effect and the html gets simply printed as text.

I don't know whether this is due to Racket, sendmail, or the sendmail
configuration on my system, so let me know if I should look elsewhere for
solutions.

Cheers,
Marc

[1]:
http://stackoverflow.com/questions/15711700/php-mail-how-to-put-an-html-link-in-an-email

-- 
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] Redex pattern for "sequence whose elements match this depth 0 pattern"?

2016-03-26 Thread Robby Findler
I see what you mean and I can agree that rendering that with a D in
this instance would have the meaning that people expect it to have.

Nevertheless, contemplating changing the pattern language in that way
is daunting and since you have a way around this, maybe best to just
take it for now.

Sorry,
Robby


On Fri, Mar 25, 2016 at 11:15 AM, William J. Bowman
 wrote:
> On Fri, Mar 25, 2016 at 07:05:52AM -0500, Robby Findler wrote:
>> I think the right way to approach such questions is to start from a more
>> realistic example and then ask "what do we want the typeset version of this
>> to look like?".
> I like this advice.
> Unfortunate, I think I want the typeset version to look like the same
> pattern variable in two places but at different depths.
>
> For real example, I have a model of a dependent type system with
> inductive type families.
> To check that the declared inductive types are valid, I check that
>   a) the declared constructors actually return the declared type
>   b) the types of the constructors are strictly positive.
>
> Here is a snippet:
>
> (define-judgment-form tt-typingL
>   #:mode (valid I)
>   #:contract (valid Δ)
>
>   [ "Valid-Empty"
>(valid ∅)]
>
>   [(valid Δ)
>(type-infer Δ ∅ t_D U_D)
>(type-infer Δ (∅ D : t_D) t_c U_c) ...
>;; NB: Ugh this should be possible with pattern matching alone 
>(side-condition ,(andmap (curry equal? (term D)) (term (D_0 ...
>;; positive* should probably be a judgment so I can ... it
>(side-condition (positive* D (t_c ...)))
>- "Valid-Inductive"
>(valid (Δ (D : t_D
>((c : (name t_c (in-hole Ξ (in-hole Θ D_0
> ...])
>
> I would prefer to write as this as follows.
> Notice the D_0 in the conclusion has changed to a D, and the
> side-condition that escapes into Racket disappears.
>
> (define-judgment-form tt-typingL
>   #:mode (valid I)
>   #:contract (valid Δ)
>
>   [ "Valid-Empty"
>(valid ∅)]
>
>   [(valid Δ)
>(type-infer Δ ∅ t_D U_D)
>(type-infer Δ (∅ D : t_D) t_c U_c) ...
>;; positive* should probably be a judgment so I can ... it
>(side-condition (positive* D (t_c ...)))
>- "Valid-Inductive"
>(valid (Δ (D : t_D
>((c : (name t_c (in-hole Ξ (in-hole Θ D
> ...])
>
> In this instance, I suppose I could create a new judgment or
> metafunction that checks each constructor's type separately w.r.t. D.
> Since both instances would be at depth 0, this would be fine.
> Maybe even easier to read..
>
> --
> William J. Bowman
>
> PS: You cannot run this email :(

-- 
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] link: bad variable linkage

2016-03-26 Thread Robby Findler
Matthew and I have figured out one way in which DrRacket could go
wrong here and implemented a better strategy. The problem we
identified doesn't explain the symptoms expressed here in this thread
exactly, but it is a complex system and maybe there was some piece
missing from the explanations that I didn't think to ask about.
Finger's crossed that it helps!

In any case, if you are still experiencing the bad symptom after you
get the latest code, please let me know.

Thanks,
Robby

On Mon, Feb 1, 2016 at 9:03 AM, Laurent  wrote:
> I would be so happy if this kind of error could be resolved! (even when all
> files are compiled by DrRacket)
> Usually, I just turn off "populate 'compiled' directories", but then
> DrRacket needs to compile the file on each F5, which can take some precious
> time.
> Thank you both then :)
>
> On Sun, Jan 31, 2016 at 11:19 PM, jon stenerson 
> wrote:
>>
>>
>> The simplest thing I can find: I have three files in two directories.
>> The first directory, called junk, contains a.rkt and b.rkt.
>> The second directory is a sibling to junk called local-libs and contains
>> c.rkt. (local-libs is known to the package manager; it was installed via the
>> DrRacket interface).
>> If I open all three files in DrRacket and try running a.rkt, sometimes it
>> works, sometimes not. By modifiying a, b, c in some order (in the DrRacket
>> editor) I can toggle the work/not work flag. As you say, it's a little
>> non-deterministic.
>>
>> Thanks,
>> Jon
>>
>>
>> a.rkt:
>> #lang racket
>> (require "b.rkt")
>>
>> b.rkt
>> #lang racket
>> (require "../local-libs/c.rkt")
>> (s 1)
>>
>> c.rkt
>> #lang racket
>> (provide (struct-out s) )
>> (struct s (p))
>>
>>
>>
>>
>> On 1/31/2016 4:03 PM, Robby Findler wrote:
>>>
>>> Then it would be helpful to us if you could provide some (hopefully
>>> small) program and instructions to reproduce the problem.
>>>
>>> Thanks,
>>> Robby
>>>
>>>
>>> On Sun, Jan 31, 2016 at 4:51 PM, jon stenerson 
>>> wrote:

 Just using DrRacket 6.3 on Win 10.

 Jon


 On 1/31/2016 3:22 PM, Robby Findler wrote:
>
> The compilation of racket is (not yet) deterministic so things like
> that can throw off internal tables in the .zo files (and a .zo files
> is loaded without checking dependencies, optimistically hoping that
> the files are not changed).
>
> So: are you using "raco make" or somehow mangaging .zo files yourself,
> or are you seeing this with the .zo files that DrRacket maintains for
> your automatically? If the former, then you need to adapt your
> workflow to either not use .zo files or to keep them up to date. If
> the latter, then it is a bug.
>
> Robby
>
>
>
> On Sun, Jan 31, 2016 at 4:17 PM, jon stenerson
> 
> wrote:
>>
>> I have some .rkt files and, depending on which file was edited most
>> recently, either it works fine or it gives a compilation error. (By
>> "edited"
>> I mean just adding or subtracting a blank line to change the
>> timestamp).
>> I
>> can submit a simplified example if nobody else has seen this problem.
>> If
>> this is well-known, what is the fix?
>>
>> link: bad variable linkage;
>>reference to a variable that is not a procedure or structure-type
>> constant
>> across all instantiations
>> reference phase level: 0
>> variable module: 
>> variable phase: 0
>> reference in module:  in: 
>>
>> --
>> 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.
>>
>>
>> --
>> 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.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" 

Re: [racket-users] Re: IO in racket is painful

2016-03-26 Thread Hendrik Boom
On Fri, Mar 25, 2016 at 11:28:25PM -0600, Richard Cleis wrote:
> "Lurking thresholds" are fun:

The Lurker at the Threshold is, of course, a classic horror story written by 
August Derleth and H.P. Lovecraft.

-- 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.
For more options, visit https://groups.google.com/d/optout.