Re: [racket-users] module->namespace doesn't work for module+ ?

2015-09-17 Thread Matthew Flatt
Can you say more about how you're running this program? I get `42` all four times when running this program with `racket` or in DrRacket. At Thu, 17 Sep 2015 00:08:00 -0400, Greg Hendershott wrote: > I'm working on adding better submodule support in racket-mode, which > entails using

Re: [racket-users] Datalog questions

2015-09-17 Thread Jay McCarthy
On Wed, Sep 16, 2015 at 2:50 PM, Eduardo Bellani wrote: > Hello list > > I'm trying to use racket's implementation of datalog as a query language > for a small database (5 gb). I'm running into some problems that I'd > appreciate your help with: > > * Is there support for

Re: [racket-users] Scribble: line comment swallows paragraph break

2015-09-17 Thread Ben Lerner
If a comment can swallow everything up to a single newline, could it swallow everything up to the first non-whitespace character after the current line? (This is what TeX's % does.) So you wouldn't have to change scribble/decode at all, just the @-reader. Effectively, the only added

Re: [racket-users] Serializable Continuations in Sandboxes

2015-09-17 Thread Jay McCarthy
Hi Tim, Your code is a little more complicated than I can grok directly. I believe that you problem does not have to with the web-language, but just with using serialize. The serialize output format is basically an s-expression, but every time a non-prefab struct appears it has a cons of the

Re: [racket-users] Scribble: line comment swallows paragraph break

2015-09-17 Thread Matthew Flatt
Having a line comment swallow a newline is helpful when you want to break up something in the source without a break in the output, as in Hello@; World => "HelloWorld" I imagine that Eli adopted that feature of @-expressions from TeX. At Thu, 17 Sep 2015 10:59:51 -0400, "Alexander D. Knauth"

Re: [racket-users] Serializable Continuations in Sandboxes

2015-09-17 Thread Tim Brown
Jay, Thanks for that response. I was struggling to simplify my demonstration... but I see the same error with your example; so I’m trying to apply the thinking to my code. Regards, Tim On 17/09/15 16:30, Jay McCarthy wrote: > Hi Tim, > > Your code is a little more complicated than I can grok

Re: [racket-users] module->namespace doesn't work for module+ ?

2015-09-17 Thread Matthew Flatt
Ah, I forgot to try DrRacket v6.2, and I do see the problem there. I don't see the problem with DrRacket or errortrace in the current development version, though. I think you're right that it should work, and it looks like the problem has been fixed for the next version (but it would be great if

Re: [racket-users] Scribble: line comment swallows paragraph break

2015-09-17 Thread Alexander D. Knauth
I forgot to include the list: > On Sep 17, 2015, at 10:57 AM, Alexander D. Knauth > wrote: > > Is there any reason why > #lang at-exp racket > '@stuff{ > Hello @; John > > World > } > Shouldn't produce > '(stuff "Hello " "\n" "\n" "World") > Instead of > '(stuff "Hello "

Re: [racket-users] module->namespace doesn't work for module+ ?

2015-09-17 Thread Greg Hendershott
On Thu, Sep 17, 2015 at 10:21 AM, Matthew Flatt wrote: > Can you say more about how you're running this program? I get `42` all > four times when running this program with `racket` or in DrRacket. Well I could have sworn I got the error to happen last night in plain racket.

Re: [racket-users] Scribble: line comment swallows paragraph break

2015-09-17 Thread Matthew Flatt
Scribble can't be changed to match LaTeX without changing @-expression reader at a fairly fundamental way, and I'm skeptical of the change. Scribble's input is handled in three steps: @-expression parsing to produce a syntax object (i.e., enriched S-expression), Racket expansion and evaluation of

Re: [racket-users] Serializable Continuations in Sandboxes

2015-09-17 Thread Tim Brown
On 17/09/15 16:30, Jay McCarthy wrote: > In contrast, this will fail: > >(define my-eval > (make-module-evaluator > '(module m racket/base > (require racket/serialize) > (define-serializable-struct point (x y) > > (define external-point-rep (my-eval '(serialize

Re: [racket-users] Datalog questions

2015-09-17 Thread Eduardo Bellani
Hello Jay, thanks for your time. I'll try the update asap. One question to anyone, what would the the canonical way of fetching such an update in racket's package system? Jay McCarthy writes: > On Wed, Sep 16, 2015 at 2:50 PM, Eduardo Bellani wrote: >> Hello list >> >>

Re: [racket-users] [racket][FFI] memory management when making io ports in C

2015-09-17 Thread WarGrey Gyoudmon Ju
Okay, thank you Matthew. On Thu, Sep 17, 2015 at 10:17 PM, Matthew Flatt wrote: > At Thu, 17 Sep 2015 21:29:35 +0800, WarGrey Gyoudmon Ju wrote: > > On Wed, Sep 16, 2015 at 7:36 PM, Matthew Flatt > wrote: > > > > > But, also, to use either of those, you

Re: [racket-users] Scribble: line comment swallows paragraph break

2015-09-17 Thread Ben Lerner
Yes, in that case.  I meant more the following: #lang at-exp racket '@stuff{ Hello@; John   World } which currently produces '(stuff "Hello" "\n" "  " "World"). On 9/17/2015 2:28 PM, Matthew Butterick wrote:

Re: [racket-users] Datalog questions

2015-09-17 Thread Jay McCarthy
I would do "raco pkg update --clone datalog" from "$PLTHOME/extra-pkgs" Jay On Thu, Sep 17, 2015 at 2:05 PM, Eduardo Bellani wrote: > > Hello Jay, thanks for your time. > > I'll try the update asap. One question to anyone, what would the the > canonical way of fetching such

Re: [racket-users] module->namespace doesn't work for module+ ?

2015-09-17 Thread Greg Hendershott
I made a little repo to have Travis CI run this on various Racket versions back to 5.3.4: https://travis-ci.org/greghendershott/errortrace-submod-namespace/builds/80868223 Apparently it's "never" worked up through 6.2.1. But does now work in HEAD, as you said. As for the desirability of a

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

2015-09-17 Thread Raoul Duke
(why are there 2 racke users groups? confusing.) wait, who needs tests when you have static typing?! sheesh :-) -- 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

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

2015-09-17 Thread Lehi Toskin
On Tuesday, September 15, 2015 at 7:06:40 PM UTC-7, Anthony Carrico wrote: > Unfortunately, rackunit doesn't mix that well with typed/racket (see > problem reports 15153, 15143). I guess this is because of the > typed/untyped boundary. > > The good news is that it is fairly easy to work around

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] module->namespace doesn't work for module+ ?

2015-09-17 Thread Greg Hendershott
On Thu, Sep 17, 2015 at 1:25 PM, Greg Hendershott wrote: > [I do have places where I dynamic-require X with a fallback if it > doesn't exist. That's not too bad; at least it's a > capability-available flavor test. But that wouldn't work in this > case, I'd need to

Re: [racket-users] Datalog questions

2015-09-17 Thread Eduardo Bellani
Hello Jay, Thanks, I've figured out the raco incantation beforehand. I should've read more about the docs before asking. One other question that slipped my mind before, about wildcards. Let's take this example again: (define *db* (make-theory)) (datalog *db* ;; shareholders

[racket-users] Matrices and GPU acceleration

2015-09-17 Thread Anurag Mendhekar
Hi All, I'm embarking on a rather ambitious neural network project and would very much like to avoid python/numpy/theano route and stay within Racket. The only aspect that is giving me pause is that I expect my network will be large enough that I would have to use GPU acceleration for it to

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

2015-09-17 Thread Benjamin Greenman
On Thu, Sep 17, 2015 at 4:38 PM, Raoul Duke wrote: > wait, who needs tests when you have static typing?! sheesh Really though, Typed Racket might benefit from a non-rackunit library that encourages a different style of testing. (Instead of duplicating all the rackunit

Re: [racket-users] documentation files in new package system

2015-09-17 Thread Matthew Flatt
Be sure not to use the name "doc" for the document, but instead a name that is connected to the package (because all documents are rendered to the same place in installation scope). In other words, either make the document source "somepackage.scrbl" or use "somepackage" as the document name in the

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

2015-09-17 Thread Robby Findler
I think that we need to work harder to deemphasize eq?, and warn people that, when eq? returns #f, really you learned nothing (like you need to pretend you just didn't even call eq?). If it returns #t, then you learn something, of course. Robby On Thu, Sep 17, 2015 at 8:03 PM, Sam

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

2015-09-17 Thread Neil Van Dyke
Robby Findler wrote on 09/17/2015 09:18 PM: I think that we need to work harder to deemphasize eq?, and warn people that, when eq? returns #f, really you learned nothing (like you need to pretend you just didn't even call eq?). If it returns #t, then you learn something, of course. What about

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

2015-09-17 Thread Robby Findler
Sounds 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 wrote: > Unfortunately, that's only true when eq? produces #t, which probably isn't > an issue when using eq?

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

2015-09-17 Thread Sam Tobin-Hochstadt
Yes, there is a larger issue here. In general, the typed/untyped boundary may change the eq? behavior. Some types won't (opaque types from the untyped side, monomorphic struct types from the typed side) but in general you won't get stable eq? results. Sam On Thu, Sep 17, 2015, 8:04 PM Anthony

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

2015-09-17 Thread Robby Findler
eq? on symbols is a special part of the specification and that seems benign to me, all things considered. The "giant hash in the sky" that makes sure that works isn't exactly trouble free, but we seem to have it under control. Robby On Thu, Sep 17, 2015 at 8:25 PM, Neil Van Dyke

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

2015-09-17 Thread Neil Van Dyke
Whew. :) I only rarely have a non-symbol use for `eq?`, but I use `eq?` heavily for symbols in everyday application code. Robby Findler wrote on 09/17/2015 09:27 PM: eq? on symbols is a special part of the specification and that seems benign to me, all things considered. The "giant hash in

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

2015-09-17 Thread Robby Findler
FWIW, if you use equal? in those cases, you'll get the same performance behavior and you will have fewer eq?s to audit when things go wonky. ;) Robby On Thu, Sep 17, 2015 at 8:36 PM, Neil Van Dyke wrote: > Whew. :) I only rarely have a non-symbol use for `eq?`, but I use

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

2015-09-17 Thread Neil Van Dyke
Good to know. In that case, "just use `equal?`" is probably good advice for new Racket people. Personally, I'm super-comfortable with `eq?` for symbols (since, as you know, it's a basic thing that's been used very heavily in Lisps for old-school AI and compilers and such). So I might as

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

2015-09-17 Thread Sam Tobin-Hochstadt
I don't know if it's really fixable -- equal? has to check that both arguments are symbols before producing #f, which is work that eq? doesn't do. Perhaps the difference can be reduced, though. Sam On Thu, Sep 17, 2015, 10:13 PM Robby Findler wrote: > Sounds like

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

2015-09-17 Thread Robby Findler
True. Robby On Thu, Sep 17, 2015 at 9:16 PM, Sam Tobin-Hochstadt wrote: > I don't know if it's really fixable -- equal? has to check that both > arguments are symbols before producing #f, which is work that eq? doesn't > do. Perhaps the difference can be reduced, though. >

Re: [racket-users] documentation files in new package system

2015-09-17 Thread Matthew Flatt
At Thu, 17 Sep 2015 18:53:59 -0400, Neil Van Dyke wrote: > Is it OK if I *exclude* the HTML rendering of the docs from the files > included in the packaging altogether (which would give me the below > files)? That sounds right to me. -- You received this message because you are subscribed to

Re: [racket-users] GLIBC >= 2.14, racket extension

2015-09-17 Thread 'John Clements' via Racket Users
> On Sep 17, 2015, at 4:35 PM, Matthew Flatt wrote: > > Our experience is that building shared libraries on a machine with > GLibC 2.12 produces shared libraries that work most everywhere. In > other words, you should rebuild the shared libraries on that ancient > Linux

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

2015-09-17 Thread Anthony Carrico
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 way to make `check-eq?` work that doesn't require > duplicating code. :( Is

Re: [racket-users] documentation files in new package system

2015-09-17 Thread Neil Van Dyke
OK, instead of "doc.scrbl", I'll have ".scrbl". Is it OK if I *exclude* the HTML rendering of the docs from the files included in the packaging altogether (which would give me the below files)? * info.rkt (the usual) * somepackage.rkt (the full implementation with embedded docs, for my

[racket-users] GLIBC >= 2.14, racket extension

2015-09-17 Thread 'John Clements' via Racket Users
Okay, really, this question as not that much to do with Racket, but… As part of the ‘portaudio’ package, there are a number of shared libraries. It turns out that I’m going to be teaching in a room running an ancient Linux (CentOS 6?), and when I try to start portaudio, I get an error message

Re: [racket-users] GLIBC >= 2.14, racket extension

2015-09-17 Thread Matthew Flatt
Our experience is that building shared libraries on a machine with GLibC 2.12 produces shared libraries that work most everywhere. In other words, you should rebuild the shared libraries on that ancient Linux installation, and then you're probably in good shape for the foreseeable future. At Thu,

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

2015-09-17 Thread Anthony Carrico
This exchange fell off the list accidentally: On Thu, Sep 17, 2015 at 8:58 PM, Anthony Carrico wrote: > On 09/17/2015 09:27 PM, Robby Findler wrote: >> eq? on symbols is a special part of the specification and that seems >> benign to me, all things considered. The "giant

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

2015-09-17 Thread Anthony Carrico
On 09/17/2015 11:03 PM, Anthony Carrico wrote: > Really what I'm trying to say is that the language implementation > wants the freedom to adjust your program without having to be > constrained by eq tests that you might do. One example of this is > contracts. I might wish to be accept a function

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

2015-09-17 Thread Raoul Duke
It looks like it is a perennial truth of the universe that math is hard. I don't know of a language ecosystem where "equals" is 'easy', because it is subjective. Seems like offering different kinds of equality testing is a reasonable approach. Having any kind of preferred fundamental equality

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

2015-09-17 Thread Anthony Carrico
>> On 09/17/2015 09:27 PM, Robby Findler wrote: > No, you're not learning something, even in that case. Well, I suppose > you might say that you're learning it didn't return #t, but what that > really means is "try harder". I consider check-eq? and friends a > mistake, symbols I've already

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

2015-09-17 Thread Anthony Carrico
On 09/17/2015 11:03 PM, Anthony Carrico wrote: > Really what I'm trying to say is that the language implementation > wants the freedom to adjust your program without having to be > constrained by eq tests that you might do. One example of this is > contracts. I might wish to be accept a function