Re: [racket-users] typecheck error with define-namespace-anchor in 6.1.1

2015-04-19 Thread Sam Tobin-Hochstadt
Unfortunately, I don't think there's an easy way to fix this in 6.1.1. That program works in current snapshots, so you might try that. Alternatively, you could put the namespace anchor in an untyped module, although that can be inconvenient for namespace anchors in particular. Sam On Sat, Apr

[racket-users] First CFP: FLOPS 2016

2015-04-28 Thread Sam Tobin-Hochstadt
, UK Jeff Polakow PivotCloud, USA Marc Pouzet École normale supérieure, France Vítor Santos Costa Universidade do Porto, Portugal Tom Schrijvers KU Leuven, Belgium Zoltan Somogyi Australia Alwen Tiu Nanyang Technological University, Singapore Sam Tobin-Hochstadt Indiana

Re: [racket-users] [racket][off-topic] what's the official meaning of *.rktl and *.rktd?

2015-05-10 Thread Sam Tobin-Hochstadt
.rktl is for files intended to be used with 'load', which is what the l stands for. .rktd is for files used with 'read', and the d stands for data. Sam On Sun, May 10, 2015, 9:40 PM WarGrey Gyoudmon Ju juzhenli...@gmail.com wrote: Sorry it's hard to find the official definition of **.rktl*

Re: [racket-users] strange typed-racket contract error

2015-05-08 Thread Sam Tobin-Hochstadt
This appears to be a bug -- my guess is that the contract isn't actually generated, and thus turns into `#f` -- that's what `require/typed` expands to, before TR inserts the real contract. Sam On Fri, May 8, 2015 at 5:26 PM, Alexander D. Knauth alexan...@knauth.org wrote: I have this file:

Re: [racket-users] Instantiating a module in a meta-language

2015-05-11 Thread Sam Tobin-Hochstadt
One solution would be to use `local-require`: (((let () (local-require (only-in racket/function curry)) curry) + ) 2) Sam On Mon, May 11, 2015 at 3:24 PM, Alexis King lexi.lam...@gmail.com wrote: I’ve written a meta-language that adds function literal syntax to the reader, inspired by

Re: [racket-users] type mismatch: given (Listof Error)

2015-05-11 Thread Sam Tobin-Hochstadt
I think we should at least make `(Listof Error)` turn into `Error`. That would eliminate the error message than Ben reported. Sam On Mon, May 11, 2015 at 4:01 PM, Asumu Takikawa as...@ccs.neu.edu wrote: On 2015-05-11 14:33:51 -0400, Benjamin Greenman wrote: This program gives a confusing

Re: [racket-users] incantation for library module to access a data file in the same directory?

2015-05-12 Thread Sam Tobin-Hochstadt
You probably want to use `define-runtime-path`, like this: ``` (require racket/runtime-path) (define-runtime-path rtd realtime-test-data.rkt) (define (fun-timed-test-2) (define ip (open-input-file rtd)) ... rest of function ...) ``` Sam On Tue, May 12, 2015 at 11:42 AM thomas.lynch

Re: [racket-users] Re: pkg-build report for the v6.2 release candidate

2015-05-15 Thread Sam Tobin-Hochstadt
What happened was a new _documented_ export was added to `racket/match`: `match-define-values`. But yes, creating some dedicated test modules is a good idea so that this doesn't happen every release. Sam On Fri, May 15, 2015 at 3:28 AM Jack Firth jackhfi...@gmail.com wrote: On Thursday, May

Re: [racket-users] free-vars

2015-04-07 Thread Sam Tobin-Hochstadt
The `free-vars` function relies on the binding information added by the macro expander during the expansion process. More precisely, only identifiers whose `identifier-binding` information is `'lexical` are included. All the identifiers you expected to see instead have no binding information --

Re: [racket-users] Type error using in-list on empty list

2015-05-19 Thread Sam Tobin-Hochstadt
What's happening here is that when typechecking a `let loop`, Typed Racket will try to guess the loop argument types from the initial values. Here, it converts `Null` into `(Listof Any)`, and then that choice runs into trouble later. The simplest fix here is to pass something with the type

Re: [racket-users] racket virtual machine

2015-06-05 Thread Sam Tobin-Hochstadt
On Fri, Jun 5, 2015 at 12:37 AM, Neil Van Dyke n...@neilvandyke.org wrote: Thanks, Jens Axel, Raoul, and Robby. Different question... For support for writing polished Web browser (and PhoneGap) apps in Racket, any comments on which of the following two options is better (viable, easier to

Re: [racket-users] Macro-introducing macros with inter-macro communication channel

2015-06-23 Thread Sam Tobin-Hochstadt
dense (and self-referential), so it's not clear what the correct value for that argument is. Thomas Dickerson Brown University Department of Computer Science 115 Waterman St, 4th Floor Providence, RI 02912 802-458-0637 On Tue, Jun 23, 2015 at 3:57 PM, Sam Tobin-Hochstadt sa

Re: [racket-users] TR typed-racket-more library docs

2015-06-26 Thread Sam Tobin-Hochstadt
Thanks for volunteering! I think 2 is the correct approach here. Sam On Fri, Jun 26, 2015 at 8:58 PM, Jordan Johnson j...@fellowhuman.com wrote: Hi all, One thing I’ve noticed in working with Typed Racket is that some of the libraries on the “Libraries Provided with Typed Racket” docs page

Re: [racket-users] Iteration speed

2015-06-01 Thread Sam Tobin-Hochstadt
Unfortunately, Typed Racket typechecking is pretty slow, and so the times you have there are not out of the ordinary. The most significant thing that's slow in Typed Racket is type checking numeric operations, because both the numbers themselves and the operations have complicated types. If you

Re: [racket-users] Iteration speed

2015-06-01 Thread Sam Tobin-Hochstadt
tuning sessions could work without type checking, then turn it back on for structural work. On Jun 1, 2015, at 9:05 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote: Unfortunately, Typed Racket typechecking is pretty slow, and so the times you have there are not out of the ordinary

Re: [racket-users] TR: require/typed and parametric polymorphism

2015-07-02 Thread Sam Tobin-Hochstadt
, 2015 at 2:26 AM, Jordan Johnson j...@fellowhuman.com wrote: On Jul 2, 2015, at 5:15 PM, Sam Tobin-Hochstadt sa...@cs.indiana.edu wrote: No, that's not correct. This program works fine: #lang typed/racket/base (require/typed racket/function [identity (All (A) (- A A))]) (identity 5) Can you

Re: [racket-users] TR: require/typed and parametric polymorphism

2015-07-02 Thread Sam Tobin-Hochstadt
No, that's not correct. This program works fine: #lang typed/racket/base (require/typed racket/function [identity (All (A) (- A A))]) (identity 5) Can you say more about what part of the documentation gave you that impression, so we can correct that? Sam On Fri, Jul 3, 2015 at 1:59 AM, Jordan

Re: [racket-users] Web framework in racket

2015-05-21 Thread Sam Tobin-Hochstadt
There's also the much-older leftparen: https://github.com/vegashacker/leftparen/ Sam On Thu, May 21, 2015 at 9:44 PM, Asumu Takikawa as...@ccs.neu.edu wrote: On 2015-05-21 15:36:56 -0700, Vishesh Yadav wrote: I'm working on racket web server to implement a basic web app. I found myself doing

Re: [racket-users] `divides?` from math/number-theory slow?

2015-08-24 Thread Sam Tobin-Hochstadt
The difference in performance between the two functions when there are no contracts (ie, when there are no types anywhere, or when everything is typed) seems to be just from the extra `zero?` check in `divides?`. Adding that to your program produced something that runs in about the same time as

Re: [racket-users] Re: Garbage Collection of Places

2015-08-18 Thread Sam Tobin-Hochstadt
George, You can see the patch here: https://github.com/plt/racket/commit/641c56b6e95b57881b6fef846fb758ed5cd6e5a8 Sam On Tue, Aug 18, 2015 at 10:40 AM George Neuner gneun...@comcast.net wrote: On Mon, 17 Aug 2015 10:07:11 -0600, Matthew Flatt mfl...@cs.utah.edu wrote: The problem is in the

Re: [racket-users] 6.2 regression in running tests?

2015-07-14 Thread Sam Tobin-Hochstadt
This appears to be a bug in the inliner, which appears in HEAD as well. This program is sufficient to reproduce: #lang racket (define (Y3 outer) (define ((call f) x) ((f f) x)) ((lambda (f) (f f)) call)) I wasn't able to make this any smaller -- in particular, the `outer` parameter is

Re: [racket-users] new dependency on scheme-lib for build of rsound?

2015-07-14 Thread Sam Tobin-Hochstadt
Right above that in the `raco setup` output, you'll see some output which tells you exactly what is missing. Here's what it looks like for one for mflatt's pkgs: http://pkg-build.racket-lang.org/server/built/deps/uu-cs5510.txt Sam On Tue, Jul 14, 2015 at 1:48 PM, 'John Clements' via

Re: [racket-users] package-build status for upcoming release

2015-10-23 Thread Sam Tobin-Hochstadt
Here's Matthew's summary from before, annotated as with the first summary: Summary of failures relative to v6.2.1 -- Fixed: cKanren control java-lexer profj racquel set-exp get-bonus heresy honu jack-mock bystroTeX alexknauth-my-object Failure

Re: [racket-users] package-build status for upcoming release

2015-10-23 Thread Sam Tobin-Hochstadt
There are also two new errors in this run, both of which look like Racket bugs: unicode-properties (out of memory error) midi-readwrite (segfault) Sam On Fri, Oct 23, 2015 at 2:31 PM, Sam Tobin-Hochstadt <sa...@cs.indiana.edu> wrote: > Here's Matthew's summary from before,

Re: [racket-users] raco install says it is already there, raco setup says it doesn't exist ...

2015-11-12 Thread Sam Tobin-Hochstadt
You can set up a package, as opposed to a collection, with `raco setup --pkgs liquid-extensions`. Sam On Thu, Nov 12, 2015 at 2:27 AM Alex Knauth wrote: > As far as I know, raco setup doesn't deal with packages, but with > collections. Assuming the `liquid-extensions`

Re: [racket-users] Embedding Rust in Racket

2015-11-09 Thread Sam Tobin-Hochstadt
Hi Ty, I just tried this out, and it looks like you need to say "target/release/libembed" -- note the added "lib". Once I added that, your program worked fine and printed everything out. I wonder if the problem you're seeing is that DrRacket is sending the Rust output somewhere else. Can you try

Re: [racket-users] Standardizing the threading macro and organizing packages

2015-10-07 Thread Sam Tobin-Hochstadt
A few thoughts: 1. This is a great idea -- one of the reasons that I think Racket has avoided lots of little dialects despite syntactic flexibility is standardizing the community on one thing. I'm glad you're continuing this. 2. When we've standardized on this sort of thing in the core, the

Re: [racket-users] Re: Case for net/url.rkt to read HTTP proxy servers from environment

2015-10-14 Thread Sam Tobin-Hochstadt
I recommend using a promise to avoid referencing/parsing the environment variables until the point where they're needed. That way people who require `net/url` just for URL parsing etc don't pay that cost. Sam On Wed, Oct 14, 2015 at 9:35 AM, Tim Brown wrote: > How

Re: [racket-users] Standardizing the threading macro and organizing packages

2015-10-08 Thread Sam Tobin-Hochstadt
On Thu, Oct 8, 2015 at 6:48 PM, Jay McCarthy wrote: > >>> My opinion is to include something like this in remix along with some >>> nice syntax for cut (what ignorant people call "function literals".) >> >> I admit I can’t really disagree with this point. I’m mostly just

Re: [racket-users] Typed Racket: Byte-Larger-Than-One is half-hidden half-exported

2015-10-06 Thread Sam Tobin-Hochstadt
I think the right solution is just to provide them as real types. Hiding them incompletely doesn't work, and it will be difficult to hide them completely. Sam On Tue, Oct 6, 2015 at 3:37 PM, Vincent St-Amour wrote: > Hi Paolo, > > I agree that the semi-private

Re: [racket-users] Separate compilation vs macros in signatures and compiler stacktraces (crashes?)

2015-10-06 Thread Sam Tobin-Hochstadt
I think there are two issues here: 1. The stack trace in your email is just a result of `raco make` printing its current context when there's a syntax error. If you replace the whole body of the module with just `(lambda)`, you'll see the same stack trace. Probably `raco make` should be changed

Re: [racket-users] Finding an old patch

2015-10-06 Thread Sam Tobin-Hochstadt
Hi Sean, First, we've just fixed the site so that all the old urls should still work. Second, I'm not sure what you mean by "patch". If you mean a particular commit, all of the SHA1 hashes are the same as they were before, so you should still be able to find them on github or with git itself.

Re: [racket-users] Separate compilation vs macros in signatures and compiler stacktraces (crashes?)

2015-10-06 Thread Sam Tobin-Hochstadt
context...: > > /Users/pgiarrusso/AeroFS/Repos/racket-playground-bluevelvet/bug-with-signatures-and-macros/client.rkt > context...: > [ the same ] That sounds like somewhere the source location is getting lost in the unit macro, which is probably a bug. Sam > Cheers, > Paolo

Re: [racket-users] TR + Vector containing opaque struct

2015-09-01 Thread Sam Tobin-Hochstadt
The best solution is usually to avoid using Any when interoperating with untyped code. Presumably you can describe a more specific type for this case, such as an opaque type for the sql-null value. Sam On Tue, Sep 1, 2015, 3:03 PM 'John Clements' via Racket Users < racket-users@googlegroups.com>

Re: [racket-users] Re: typed/racket + rackunit = trouble

2015-09-17 Thread Sam Tobin-Hochstadt
Unfortunately, the problem isn't just macros -- the underlying functions that actually implement RackUnit would have to be copied into Typed Racket. I don't know a way to make `check-eq?` work that doesn't require duplicating code. :( Sam On Thu, Sep 17, 2015 at 4:34 PM Lehi Toskin

Re: [racket-users] Re: typed/racket + rackunit = trouble

2015-09-17 Thread Sam Tobin-Hochstadt
Carrico <acarr...@memebeam.org> wrote: > On 09/17/2015 04:40 PM, Sam Tobin-Hochstadt wrote: > > Unfortunately, the problem isn't just macros -- the underlying functions > > that actually implement RackUnit would have to be copied into Typed > > Racket. I don't know a w

Re: [racket-users] Re: typed/racket + rackunit = trouble

2015-09-17 Thread Sam Tobin-Hochstadt
Unfortunately, that's only true when eq? produces #t, which probably isn't an issue when using eq? directly, but can be when using memq or similar. This benchmark suggests about a 10x speed difference when the symbols are different: http://pasterack.org/pastes/94877 Sam On Thu, Sep 17, 2015,

Re: [racket-users] Re: typed/racket + rackunit = trouble

2015-09-17 Thread Sam Tobin-Hochstadt
unds like something I would try to fix if I had time to really focus > on the eq? semantic question :( > > On Thu, Sep 17, 2015 at 9:01 PM, Sam Tobin-Hochstadt > <sa...@cs.indiana.edu> wrote: > > Unfortunately, that's only true when eq? produces #t, which probably > isn't

Re: [racket-users] Re: typed/racket + rackunit = trouble

2015-09-19 Thread Sam Tobin-Hochstadt
56 gc time: 0 > cpu time: 2996 real time: 2996 gc time: 0 > > Gustavo > > > On Sat, Sep 19, 2015 at 9:22 PM, Sam Tobin-Hochstadt > <sa...@cs.indiana.edu> wrote: >> When I run my original program on my own machine (instead of >> Pasterack), the difference is more

Re: [racket-users] Re: typed/racket + rackunit = trouble

2015-09-19 Thread Sam Tobin-Hochstadt
the > time difference to x2, and with some luck to make it more optimizer > friendly and gain some additional speed. > > Gustavo > > > > On Thu, Sep 17, 2015 at 11:01 PM, Sam Tobin-Hochstadt > <sa...@cs.indiana.edu> wrote: >> Unfortunately, that's only true

Re: [racket-users] Racket poster

2015-09-20 Thread Sam Tobin-Hochstadt
Very cool. I think the github wiki for the racket repository is the best place to keep it. Sam On Sun, Sep 20, 2015, 8:22 AM Jussi Rasku wrote: > I'm organizing a Racket training event, that will be hosted by the local > game development club here at Seinäjoki, Finland.

[racket-users] Racket Package Server Security Vulnerabilities

2015-09-21 Thread Sam Tobin-Hochstadt
Recently, we discovered several security vulnerabilities with how both the Racket package catalog server and the Racket package client work. The vulnerabilities have now all been fixed, and we do not know of any exploitation of them. However, we encourage you to take the following steps: * Change

Re: [racket-users] Typed Racket: Is (- 1 1) equivalent to (- 2 2)?

2015-12-10 Thread Sam Tobin-Hochstadt
On Thu, Dec 10, 2015 at 2:26 PM Klaus Ostermann wrote: > > I don't think any typed language respects this. For example: > > > >(if (= 1 1) #f "not a boolean") > > > > is equal to #f, but many type systems do not let you replace #f with > > that expression. > > But in

Re: [racket-users] begin-for-syntax causes syntax objects to expand to a different #'quote

2015-12-16 Thread Sam Tobin-Hochstadt
Andersen > > > On Wed, Dec 16, 2015 at 6:25 PM, Sam Tobin-Hochstadt > <sa...@cs.indiana.edu> wrote: > > The identifiers are the same, but only when comparing their phase-1 > > bindings. When doing traversal of syntax objects, you need to keep track > of > > t

Re: [racket-users] begin-for-syntax causes syntax objects to expand to a different #'quote

2015-12-16 Thread Sam Tobin-Hochstadt
The identifiers are the same, but only when comparing their phase-1 bindings. When doing traversal of syntax objects, you need to keep track of the phase that identifiers are meaningful at. Here's a version of your paste comparing at the right phase: http://pasterack.org/pastes/95574 Here's some

Re: [racket-users] survey/quiz construction tool?

2015-12-14 Thread Sam Tobin-Hochstadt
I think you're looking for http://people.cs.uchicago.edu/~jacobm/pubs/topsl.pdf for which an extended version appears in the Redex book. Sam On Mon, Dec 14, 2015 at 4:15 PM, 'John Clements' via Racket Users wrote: > I have a pretty clear recollection that someone

Re: [racket-users] warning on use trie functions in #lang racket?

2016-01-05 Thread Sam Tobin-Hochstadt
Yes, I think a warning at the top of the documentation for the `pfds` package would make sense, and probably Asumu would accept such a pull request. You might follow the phrasing in the math/array library. Sam On Tue, Jan 5, 2016 at 1:49 PM 'John Clements' via Racket Users <

Re: [racket-users] typed compilation option again

2016-01-06 Thread Sam Tobin-Hochstadt
On Wed, Jan 6, 2016 at 12:32 PM, JCG wrote: > > One question that concerns me is whether the following statement is correct: > > A typed program that does not have conditions based upon type predicates, > e.g. port? or integer?, should act the same when stripped of its

Re: [racket-users] warning on use trie functions in #lang racket?

2016-01-05 Thread Sam Tobin-Hochstadt
t; <racket-users@googlegroups.com> wrote: >> > Asumu, does this make sense to you? Note that in particular, I think that >> > a warning at the top of the pfds package wouldn’t have helped me; I think >> > a warning at the top of each pfds page would make a lot mo

Re: [racket-users] typed/racket involved in matched (or)

2015-12-30 Thread Sam Tobin-Hochstadt
Unfortunately, the way that `or` patterns work in `match` doesn't allow Typed Racket to figure out that those are always strings. You could try the pattern `(list (or "CBOE" "XCBOE") NAME)` for this specific example, but there isn't a fix in general, aside from not using `or` patterns or using

Re: [racket-users] [racket] suggestions on scribble/example

2016-01-09 Thread Sam Tobin-Hochstadt
We do run the core racket tests without exflonums on Travis; you can see an example here: https://travis-ci.org/racket/racket/jobs/101270780 Unfortunately, building all of Racket + everything else takes more time that various hosted CI systems allow. If there was a build of Racket without

Re: [racket-users] warning on use trie functions in #lang racket?

2016-01-09 Thread Sam Tobin-Hochstadt
r/tr-pfds but got stuck. > > Robby > > > On Fri, Jan 8, 2016 at 9:14 AM, Sam Tobin-Hochstadt > <sa...@cs.indiana.edu> wrote: >> On Fri, Jan 8, 2016 at 10:10 AM, Robby Findler >> <ro...@eecs.northwestern.edu> wrote: >>> I think we must be talking pas

Re: [racket-users] warning on use trie functions in #lang racket?

2016-01-05 Thread Sam Tobin-Hochstadt
ore, a contract that > > uses `hash/c` has to be a chaperone contract, thus causing the > > slowdown John reported. > > > > Sam > > > > On Tue, Jan 5, 2016 at 3:33 PM, Sam Tobin-Hochstadt > > <sa...@cs.indiana.edu> wrote: > >> The overhe

Re: [racket-users] warning on use trie functions in #lang racket?

2016-01-05 Thread Sam Tobin-Hochstadt
On Tue, Jan 5, 2016 at 3:33 PM, Sam Tobin-Hochstadt <sa...@cs.indiana.edu> wrote: > The overhead appears to be a combination of the following: > > - Typed Racket should see that checking whether something is a Trie > is a flat contract, but it doesn't. > - Typed Racket s

Re: [racket-users] warning on use trie functions in #lang racket?

2016-01-05 Thread Sam Tobin-Hochstadt
dfs programmer could just say > "make it eager" and be done with it. > > Robby > > > On Tue, Jan 5, 2016 at 4:08 PM, Sam Tobin-Hochstadt > <sa...@cs.indiana.edu> wrote: >> It's possible; I'm not sure. The essence of the issue is here: >> https://gist.gith

Re: [racket-users] hot reloading code and html templates for web app development

2016-01-06 Thread Sam Tobin-Hochstadt
Matthew, There's a nice package for helping with this here: https://github.com/tonyg/racket-reloadable/ It's maybe not quite as automatic as having the templates be dynamically loaded, so probably we should add a way to do that too. Sam On Wed, Jan 6, 2016 at 2:32 PM, Matthew Eric Bassett

Re: [racket-users] Typed/Untyped cost reduction and experience

2016-01-06 Thread Sam Tobin-Hochstadt
On Wed, Jan 6, 2016 at 2:01 PM, JCG wrote: > > So, two things come to mind, Racket and SBCL because I've used them before, > and the ML family - Haskell, OCaml, and Scala. Having tried Scala, I like > the language but the associated environmental baggage appeared heavy

[racket-users] FLOPS 2016: First call for participation

2015-12-21 Thread Sam Tobin-Hochstadt
Including a paper from our very own McCarthy/New/Fetscher/Findler. :) --- FLOPS 2016: 13th International Symposium on Functional and Logic Programming March 4-6, 2016, Kochi, Japanhttp://www.info.kochi-tech.ac.jp/FLOPS2016/ Call for Participation and Posters/Demos Registration will

Re: [racket-users] Configuration Files

2015-11-18 Thread Sam Tobin-Hochstadt
I usually use a file that I `read` and `write` with racket data, probably a hash table. Sam On Wed, Nov 18, 2015 at 5:19 PM, Christopher Walborn wrote: > I'm looking for a way to read configuration files. The configuration file > format can be anything provided it's easily

Re: [racket-users] warning on use trie functions in #lang racket?

2016-01-08 Thread Sam Tobin-Hochstadt
n for months. The simple suggestion is an easy, immediate > fix, and it will also give us goalposts to shoot for. > > Robby > > On Fri, Jan 8, 2016 at 8:19 AM, Sam Tobin-Hochstadt > <sa...@cs.indiana.edu> wrote: > > I think a better solution is just to add immutable hash table

Re: [racket-users] warning on use trie functions in #lang racket?

2016-01-08 Thread Sam Tobin-Hochstadt
nge to TR. > > But whatever. Do what you want. > > Robby > > On Fri, Jan 8, 2016 at 8:45 AM, Sam Tobin-Hochstadt > <sa...@cs.indiana.edu> wrote: >> This library isn't part of the Racket distribution, so the release schedule >> doesn't really matter here. >

Re: [racket-users] warning on use trie functions in #lang racket?

2016-01-08 Thread Sam Tobin-Hochstadt
I think a better solution is just to add immutable hash tables to TR, and then use them in the trie modules. That would allow TR to generate exactly the contracts that we could write by hand. Sam On Fri, Jan 8, 2016 at 9:06 AM, Robby Findler wrote: > We know there

Re: [racket-users] Typed racket unreachable condition

2016-06-12 Thread Sam Tobin-Hochstadt
Typed Racket warns about this at log level "warning". Do you see that for this program? Sam On Jun 12, 2016 1:32 PM, "antoine" wrote: Hello, 1 #lang typed/racket 2 3 (define-type Abc (U 'a 'b 'c)) 4 5 (define (test [p : Abc]) : 'ret 6 (case p 7 [('a 'b) 'ret]

Re: [racket-users] Learning by doing Typed Racket

2016-06-10 Thread Sam Tobin-Hochstadt
The problem here is that you have a fixed-argument function (taking 3 Boolean arguments) and you're applying it to a list of unknown length. Your program knows that this won't be a problem, because `boolean-tuple` always produces a list of exactly the right length, but Typed Racket doesn't know

Re: [racket-users] Learning by doing Typed Racket

2016-06-10 Thread Sam Tobin-Hochstadt
l.a.pra...@gmail.com> wrote: > Thanks Sam > > I seem to repeatedly come up against this sort of problem, where I can make > inferences that are beyond the ken of Typed Racket. > > Do you have general advice, given TR's "by design" conservatism? > > Dan >

Re: [racket-users] for/list vs map in Typed Racket

2016-05-25 Thread Sam Tobin-Hochstadt
s well > yields more type errors. > > > > Dan > > > > On Wed, May 25, 2016 at 8:14 AM, Sam Tobin-Hochstadt <sa...@cs.indiana.edu> > wrote: >> >> What's happening here is that Typed Racket can't infer what the type >> of `ys` is in the lambda that's an arg

Re: [racket-users] for/list vs map in Typed Racket

2016-05-25 Thread Sam Tobin-Hochstadt
You can write `(NonemptyListof a)` as (define-type (NonemptyListof a) (Cons a (Listof a))) Sam On Wed, May 25, 2016 at 5:08 PM, Daniel Prager wrote: > Thank-you Matthias > > On Wed, May 25, 2016 at 10:46 PM, Matthias Felleisen > wrote: >>

Re: [racket-users] (sixth RacketCon) Opportunity Grants

2016-06-08 Thread Sam Tobin-Hochstadt
I'm very happy to see this initiative. Thanks to Brian for making it possible! Sam On Tue, Jun 7, 2016, 2:39 PM Vincent St-Amour < stamo...@eecs.northwestern.edu> wrote: > > We are pleased to announce that (sixth RacketCon) will provide > opportunity grants. These grants target Strange Loop

Re: [racket-users] putting stx in TR structs

2016-06-21 Thread Sam Tobin-Hochstadt
Yes, that's the problem. Also 3d syntax is a potential problem. Perhaps the new macro expander that Matthew is working on will enable chaperones for syntax. Sam On Tue, Jun 21, 2016, 8:11 AM Robby Findler wrote: > Is the issue that TR's boundary contract can't tell

Re: [racket-users] warning on use trie functions in #lang racket?

2016-01-08 Thread Sam Tobin-Hochstadt
So we should fix pfds now using the technique you suggest. Sorry being confused here, Sam > > Robby > > > > On Fri, Jan 8, 2016 at 8:49 AM, Sam Tobin-Hochstadt > <sa...@cs.indiana.edu> wrote: >> My suggestion did involve changing TR. I think your suggest

[racket-users] Racket Web Server Security Vulnerability

2016-02-08 Thread Sam Tobin-Hochstadt
We recently discovered a serious security vulnerability in the Racket web server, which can lead to unintended disclosure of files on the machine running the web server. This vulnerability is fixed in Racket version 6.4, just released, and we encourage people to upgrade to that version. The

Re: [racket-users] How to profile compilation and macro expansion?

2016-02-10 Thread Sam Tobin-Hochstadt
On Wed, Feb 10, 2016 at 4:58 PM, stef wrote: > I've been trying out nanopass > (https://github.com/nanopass/nanopass-framework-racket) and its tutorial > scheme-to-c compiler (https://github.com/LeifAndersen/racket-to-c). However, > Racket takes easily 20s to bytecompile the

Re: [racket-users] Re: Racket Web Server Security Vulnerability

2016-02-08 Thread Sam Tobin-Hochstadt
On Mon, Feb 8, 2016 at 1:43 PM, George Neuner <gneun...@comcast.net> wrote: > On Mon, 8 Feb 2016 11:16:03 -0500, Sam Tobin-Hochstadt > <sa...@cs.indiana.edu> wrote: > >>The vulnerability affects web servers that serve static files using >>the `#:extra-static-fil

Re: [racket-users] Licensing Details (Is there a Runtime Library Exception?)

2016-02-12 Thread Sam Tobin-Hochstadt
On Fri, Feb 12, 2016 at 9:47 AM, Leif Andersen wrote: >> If the intention wasn't to force programs written in racket to be open >> source, then why wasn't an explicit exemption of the runtime libraries made, >> like other projects have? (As stated, like it was done for

Re: [racket-users] scribble: module->typed-exports ?

2016-02-01 Thread Sam Tobin-Hochstadt
On Mon, Feb 1, 2016 at 1:49 PM, Benjamin Greenman wrote: > Is there a way to get a list of identifiers exported by a typed module, > along with their type signatures? This is just for scribble, in case that > makes it easier. No, there isn't something like this

Re: [racket-users] reading html

2016-02-25 Thread Sam Tobin-Hochstadt
Note that HTML4 is quite out of date (from 1999), the most recent HTML standard from the W3C is here: https://www.w3.org/TR/html/ from 2014. However, if you plan to reference the standard to build software, the most useful spec is https://html.spec.whatwg.org/ which is what browsers and other

Re: [racket-users] reading html

2016-02-25 Thread Sam Tobin-Hochstadt
ly unrelated to old HTML. We could > imaginably have a new html library > > Jay > > On Thu, Feb 25, 2016 at 1:45 PM, Sam Tobin-Hochstadt > <sa...@cs.indiana.edu> wrote: >> Note that HTML4 is quite out of date (from 1999), the most recent HTML >> standard from the W3

Re: [racket-users] "Contracts can have significant overhead" but Typed Racket cannot?

2016-02-29 Thread Sam Tobin-Hochstadt
Hi Nota, The short answer is that Typed Racket generates contracts, and those contracts sometimes have significant overhead at run time. In specific cases, sometimes Typed Racket can generate smarter contracts, because it knows that the typed code won't break the contract. But other times, it

Re: [racket-users] Places performance & channel capacity

2016-01-21 Thread Sam Tobin-Hochstadt
Hi Brian, A few suggestions: 1. You really want to use synchronization to determine when to end, not sleeping. Have each place write a message back to its parent when it is done, and have the parent wait for that message before finishing. 2. Async channels are implemented with threads, and

Re: [racket-users] raco pkg install -> connection refused

2016-02-17 Thread Sam Tobin-Hochstadt
Yes, one of our machines failed to come back properly after a reboot to address the glibc security issue. We're working on fixing it. Sam On Wed, Feb 17, 2016 at 9:02 AM Brian Adkins wrote: > I'm trying to install the html-parsing package, and I'm getting a > connection

Re: [racket-users] Hashtable type inference

2016-02-17 Thread Sam Tobin-Hochstadt
The problem is unfortunately with Typed Racket heuristics that work very badly here. The fix is to add some annotations around the calls to `make-immutable-hash`, as in the version below. Sam #lang typed/racket/base (struct H ([I : (HashTable Integer Number)])) (define J (cast 1

Re: [racket-users] farewell, sweet PLaneT

2016-03-01 Thread Sam Tobin-Hochstadt
This is great, I've now been able to submit several pull requests to use your new packages. One package that I noticed you didn't move was 'htmlprag', which your web page says is obsolete. I mention this only because some packages on the pkg server (such as gut and wrap) still use this library.

Re: [racket-users] Unicode subscripts in code and scribble

2016-03-10 Thread Sam Tobin-Hochstadt
On Thu, Mar 10, 2016 at 10:19 AM, Vincent St-Amour wrote: > I agree, any extension anyone makes should make it into scribble itself. > > The scenario I'm concerned about is: user needs an extra character, but > can't update scribble. Or updating scribble would

Re: [racket-users] Alternatives for installing packages?

2016-03-11 Thread Sam Tobin-Hochstadt
Also, I think it's unlikely to be the specific issue discussed in that Ubuntu bug, since that seemed to be about misconfigured tomcat servers. Can you share the entire output of `raco pkg install ...` that you got? Thanks, Sam On Fri, Mar 11, 2016 at 8:56 AM, phil jones

Re: [racket-users] Re: Alternatives for installing packages?

2016-03-11 Thread Sam Tobin-Hochstadt
Hi Phil, First, which version of Racket do you have, and where did you download it from? Second, can you try running the following: - wget https://download.racket-lang.org/releases/6.4/catalog/pkgs - wget https://pkgs.racket-lang.org/pkgs And report what happens? Third, can you run `raco pkg

Re: [racket-users] Re: Alternatives for installing packages?

2016-03-11 Thread Sam Tobin-Hochstadt
:09 AM, phil jones <inters...@gmail.com> wrote: > DrRacket, version 5.3.6 > > It's the one that comes as standard with Ubuntu 14.04 (LTS) > > Yes, I seem to be able to get both of those pkgs files with wget. > > Phil > > > > On Friday, 11 March 2016 11:33:24 U

Re: [racket-users] Setup/teardown for unit testing

2016-03-09 Thread Sam Tobin-Hochstadt
I think having a built-in way to do something like this would be a good thing, rather than having everyone write their own abstraction for this. One way we've avoided divergence in the Racket community despite Racket's flexibility is by building in the right abstractions in core libraries. But I

Re: [racket-users] drracket / postgresql error when opening connection for syntax

2016-04-06 Thread Sam Tobin-Hochstadt
If you're getting the error in the status line, but not when you hit the Run button, then it's because background expansion in DrRacket is run in a sandbox that can't execute programs (among other things). Sam On Wed, Apr 6, 2016 at 5:05 PM, Tim Brown wrote: > Not so

Re: [racket-users] `equal?`'s unintuitive behavior with parametric contracts

2016-03-23 Thread Sam Tobin-Hochstadt
ions that raise errors. And then the > question is: what does this break in our codebase? > > Robby > > > On Wed, Mar 23, 2016 at 10:54 AM, Sam Tobin-Hochstadt > <sa...@cs.indiana.edu> wrote: >> I think the struct implementing `parameteric->/c` could implement >> `pro

Re: [racket-users] TR exhaustive match?

2016-03-23 Thread Sam Tobin-Hochstadt
On Wed, Mar 23, 2016 at 12:47 PM, 'John Clements' via Racket Users wrote: > Is there a way in TR to ensure that a match is exhaustive at type-checking > time? It seems to me like the right design would be a special TR form that > goes in expression positions and

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

2016-03-24 Thread Sam Tobin-Hochstadt
Right, that's the library that I borrowed for the code I posted. Fortunately the code didn't need to mutate pairs so it seems to work. Sam On Thu, Mar 24, 2016, 8:38 AM rom cgb wrote: > A possible case study: there a scanf procedure in slib, a pseudo standard > library

Re: [racket-users] Can a macro have an affect above/outside its scope?

2016-03-21 Thread Sam Tobin-Hochstadt
Here's what I would do: - Add `(provide (all-defined-out))` at the top of the file (or in a #lang elixir) - Have `(define ...)` just be the regular racket define. - Have `(definep f e)` work like this: (define f* e) (define-syntax f (make-rename-transformer (syntax-property #'f*

Re: [racket-users] `equal?`'s unintuitive behavior with parametric contracts

2016-03-23 Thread Sam Tobin-Hochstadt
I think the struct implementing `parameteric->/c` could implement `prop:equal+hash` appropriately. That wouldn't allow them to compare equal to the unwrapped value, but it would make this program work. Sam On Wed, Mar 23, 2016 at 11:43 AM, Phil Nguyen wrote: > In the

Re: [racket-users] TR exhaustive match?

2016-03-23 Thread Sam Tobin-Hochstadt
` will be hard to figure out. Sam On Wed, Mar 23, 2016 at 12:57 PM, 'John Clements' via Racket Users <racket-users@googlegroups.com> wrote: > >> On Mar 23, 2016, at 9:48 AM, Sam Tobin-Hochstadt <sa...@cs.indiana.edu> >> wrote: >> >> On Wed, Mar 23, 2016

Re: [racket-users] Puzzled by Typed Racket

2016-03-03 Thread Sam Tobin-Hochstadt
On Thu, Mar 3, 2016 at 4:26 AM, Antonio Menezes Leitao wrote: > Hi, > > Here is a MWE for something that is puzzling me. In file testtyped.rkt, I have > > #lang typed/racket > > (provide foobar) > > (struct (T) foo > ([x : (T -> T)])) > > (define (foobar [a :

Re: [racket-users] Standard web server interface?

2016-03-03 Thread Sam Tobin-Hochstadt
On Thu, Mar 3, 2016 at 12:23 PM, Brian Adkins wrote: > On Thursday, March 3, 2016 at 12:15:27 PM UTC-5, antoine wrote: >> There is the fastcgi protocol http://www.fastcgi.com/drupal/ (maybe it >> is underlying rack and wsgi). >> I have done basic tests with it: >>

Re: [racket-users] [racket] typed racket needs editor-snip%

2016-03-29 Thread Sam Tobin-Hochstadt
You can use `Editor-Snip%` by requiring it from `typed/racket/gui`. Sam On Tue, Mar 29, 2016 at 4:09 AM, WarGrey Gyoudmon Ju wrote: > Hello, I am currently building a desktop application (which is a component > of a production system for customer) in typed racket. > > I

Re: [racket-users] opinion needed on best fix for handin-server problem

2016-04-27 Thread Sam Tobin-Hochstadt
The exceptions raised by `match` are indeed not transparent. But I don't understand why they need to be in order for the handin server to handle them properly. Sam On Wed, Apr 27, 2016 at 5:58 PM, 'John Clements' via Racket Users wrote: > >> On Apr 22, 2016, at

Re: [racket-users] the right way to use `syntax-local-introduce`?

2016-05-03 Thread Sam Tobin-Hochstadt
On Mon, May 2, 2016 at 7:34 PM, Matthew Butterick <m...@mbtype.com> wrote: >> On May 2, 2016, at 11:50 AM, Sam Tobin-Hochstadt <sa...@cs.indiana.edu> >> wrote: >>> >>> My initial statement was less precise than my second email. >>> `(synt

Re: [racket-users] the right way to use `syntax-local-introduce`?

2016-05-02 Thread Sam Tobin-Hochstadt
Sam On Mon, May 2, 2016 at 9:53 AM, Matthew Butterick <m...@mbtype.com> wrote: > > On May 2, 2016, at 9:10 AM, Sam Tobin-Hochstadt <sa...@cs.indiana.edu> wrote: >> >> No, `syntax-local-introduce` is not hygenic. It's basically "pretend >> that this identifi

  1   2   3   4   5   >