Re: [racket-users] call-as-atomic and garbage collection

2015-10-07 Thread Matthew Flatt
At Wed, 7 Oct 2015 08:40:12 +0200, Berthold Bäuml wrote: > does call-as-atomic block garbage collection? No. > I want to call a C function from > Racket which takes a pointer to a struct as an argument. The struct consists > of a mixture of atomic and pointer fields and one of the pointers

Re: [racket-users] crash in nightly build

2015-10-05 Thread Matthew Flatt
At Mon, 5 Oct 2015 08:32:00 -0600, Matthew Flatt wrote: > You could configure with `--enable-strip` That should have been `--disable-strip`. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and s

Re: [racket-users] crash in nightly build

2015-10-05 Thread Matthew Flatt
At Mon, 05 Oct 2015 17:16:34 +0300, Dmitry Pavlov wrote: > I am going to get you a stack trace. > Am I correct that in order to get the stack trace, I have to rebuild > Racket with -G and run it in gdb? Racket builds with `-g` by default, but `make install` uses `strip`. You could configure with

Re: [racket-users] Redirecting Scribble cross-references for non-core packages?

2015-10-02 Thread Matthew Flatt
The `--redirect-main` flag redirects links that go to documentation in installation scope only. Locally, I imagine you're working from a development build out of the main repo; in that case, a top-level `make` sets installation scope as the default, so "sweep-exp" likely would be in installation

Re: [racket-users] Top-level only-in + rename-transformer

2015-09-30 Thread Matthew Flatt
I think the top level can work better in this case. The current behavior of this example is a result of trying to make some other things work. I have an idea on how to make the other things work without mangling this case, and I'll give it a try. At Tue, 29 Sep 2015 18:46:12 -0400, Asumu Takikawa

Re: [racket-users] Re: send-new-place-channel-to-named-dest usage question

2015-09-22 Thread Matthew Flatt
At Mon, 21 Sep 2015 05:22:34 -0700 (PDT), Tim Brown wrote: > On Sunday, August 9, 2015 at 11:11:00 AM UTC+1, Tim Brown wrote: > > On 8 August 2015 15:13:01 BST, Matthew Flatt <mfl...@cs.utah.edu> wrote: > > >I fixed the minor issue, but I haven't been able to figure out

Re: [racket-users] Re: More Racket Place abuse^H^H^H^H^H issues

2015-09-22 Thread Matthew Flatt
I've tried the "rewind-gc" branch, and I still see the crash. So, the good news is that the problem doesn't seem to be in recent GC changes. The bad news is that I don't yet know the source of the problem. At Tue, 22 Sep 2015 10:54:10 -0600, Matthew Flatt wrote: > It's possibl

Re: [racket-users] Re: More Racket Place abuse^H^H^H^H^H issues

2015-09-22 Thread Matthew Flatt
I found and repaired one bug that would explain all the crashes I've seen so far today. It's not a new bug, so I don't know why it would have escaped detection before. At Tue, 22 Sep 2015 16:13:52 -0600, Matthew Flatt wrote: > I've tried the "rewind-gc" branch, and I still see the c

Re: [racket-users] Problems with building of Racket compiler with multiple threads

2015-09-22 Thread Matthew Flatt
Which version of Racket are you building? The parallel build uses Racket places (as opposed to threads), which is why it can usefully build in parallel. There have historically some bugs in the interaction of GC and places, but I haven't not seen reports of problems with the latest release. The

Re: [racket-users] crash in nightly build

2015-09-20 Thread Matthew Flatt
To try without the recent GC changes, you could build the "rewind-gc" branch of https://github.com/mflatt/racket At Mon, 21 Sep 2015 00:08:43 +0300, Dmitry Pavlov wrote: > Hello, > > I was just able to discover that my program crashes on the > nightly build 6.2.900.17, on Linux. The program

Re: [racket-users] embedded Racket + runtime paths = ?

2015-09-20 Thread Matthew Flatt
At Sun, 20 Sep 2015 16:08:48 -0600, Matthew Flatt wrote: > > I just tried the 32-bit Utah snapshot and 32-bit C app -- build OK, > > but the app crashed right on scheme_main_setup with zero pointer > > access. It did not even enter my "run" function. > > My

Re: [racket-users] Why not ship pre-built Racket libraries in the distribution?

2015-09-20 Thread Matthew Flatt
; > Matthew, > > > > Sure I meant the full distribution. > > Thanks, I hope that the consensus will be reached :) > > > > Best regards, > > > > Dmitry > > > > > > On 09/15/2015 08:06 PM, Matthew Flatt wrote: > >> We left out &q

Re: [racket-users] embedded Racket + runtime paths = ?

2015-09-20 Thread Matthew Flatt
At Mon, 21 Sep 2015 01:04:15 +0300, Dmitry Pavlov wrote: > Matthew, > > On 09/21/2015 12:38 AM, Matthew Flatt wrote: > > At Sun, 20 Sep 2015 23:53:42 +0300, Dmitry Pavlov wrote: > >> On Windows, though, I ran into a problem when linking my app > >> with

Re: [racket-users] embedded Racket + runtime paths = ?

2015-09-20 Thread Matthew Flatt
At Sun, 20 Sep 2015 23:53:42 +0300, Dmitry Pavlov wrote: > On Windows, though, I ran into a problem when linking my app > with pre-built libracket3m_9yy8mp.lib : > > error LNK2001: unresolved external symbol __imp_scheme_get_mz_setjmp > > That is the only unresolved symbol. All the others were

Re: [racket-users] embedded Racket + runtime paths = ?

2015-09-19 Thread Matthew Flatt
() to set the result of `(find-system-path 'exec-file)` so that runtime files can be found in relative to the executable. At Wed, 16 Sep 2015 07:52:11 -0600, Matthew Flatt wrote: > After thinking about this more, it looks more promising to extend `raco > ctool --cmods` so that it can do a

Re: [racket-users] Busy waiting?

2015-09-19 Thread Matthew Flatt
I've pushed a repair that's intended to fix this problem. The bug was in internal handling of file descriptors in the case that poll() is available and epoll() isn't. In case it's useful, I also added `--enable-racket=auto` support`, which automates the step of building a Racket executable for

Re: [racket-users] Building for Android

2015-09-18 Thread Matthew Flatt
/gc2/xform.rkt: [running > body] > > make[4]: *** [xsrc/hash.c] Error 1 > > make[3]: *** [all] Error 2 > > make[2]: *** [3m] Error 2 > > make[1]: *** [3m] Error 2 > > make: *** [all] Error 2 > > > Any suggestions? Android 5.0 won’t run the executable Ma

Re: [racket-users] Building for Android

2015-09-18 Thread Matthew Flatt
/Users/johncarmack/racket-master/racket/src/racket/gc2/xform.rkt: [running > body] > > make[4]: *** [xsrc/hash.c] Error 1 > > make[3]: *** [all] Error 2 > > make[2]: *** [3m] Error 2 > > make[1]: *** [3m] Error 2 > > make: *** [all] Error 2 > > > Any sugg

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] Scribble: line comment swallows paragraph break

2015-09-17 Thread Matthew Flatt
gt; > > World > > } > > Shouldn't produce > > '(stuff "Hello " "\n" "\n" "World") > > Instead of > > '(stuff "Hello " "\n" "World") > > ? > > In other words, should the newline afte

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

2015-09-17 Thread Matthew Flatt
if you can check that). I can't guess offhand what the fix was, and I can't yet suggest a workaround for v6.2. How much do you need a workaround? At Thu, 17 Sep 2015 11:15:40 -0400, Greg Hendershott wrote: > On Thu, Sep 17, 2015 at 10:21 AM, Matthew Flatt <mfl...@cs.utah.edu> wrote: > &

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] 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] 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 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] [racket][FFI] memory management when making io ports in C

2015-09-16 Thread Matthew Flatt
At Wed, 16 Sep 2015 17:16:50 +0800, WarGrey Gyoudmon Ju wrote: > foxpipe.c is a wrapper of libssh2 APIs that suitable to work with (sync) > and custodian. Everything is okay except that the sigfault annoys me a lot. > > typedef struct foxpipe_session { > > LIBSSH2_SESSION *sshclient; > >

Re: [racket-users] embedded Racket + runtime paths = ?

2015-09-16 Thread Matthew Flatt
The most likely solution is to make the executable look enough like a "PLT executable", but I'll have to try it out to pin down additions that will work. Are you interested in this only for Unix variants or for all platforms? I think Windows will be more difficult. At Wed, 16 Sep 2015 14:26:41

Re: [racket-users] Why not ship pre-built Racket libraries in the distribution?

2015-09-15 Thread Matthew Flatt
We left out "libracket3m.a" just to make the distribution smaller, since it wasn't clear that anyone found it useful. The minimal Racket distribution for x86_64 is about 30MB unpacked, and "libracket3m.a" is 5MB by itself. So, the library would be a significant addition for the minimal

Re: [racket-users] Startup times

2015-09-14 Thread Matthew Flatt
Unfortunately, `raco make` may go wrong if its own implementation is not compiled. You probably want `raco setup` or (equivalently) `racket -l setup`, which should be fast if it's just a matter of updating file timestamps. At Mon, 14 Sep 2015 20:20:39 -0500, Robby Findler wrote: > If you run

Re: [racket-users] values considered harmful

2015-09-13 Thread Matthew Flatt
Thanks for the help! When the optimize converts (let-values ([(X ...) (values M ...)]) ) to (let ([X M] ...) ) it incorrectly attaches a virtual timestamp to each "[X M]" binding that corresponds to the timestamp after the whole `(values M ...)`. So, the optimizer loses the

Re: [racket-users] values considered harmful

2015-09-13 Thread Matthew Flatt
I've pushed a repair. At Sun, 13 Sep 2015 07:44:40 -0600, Matthew Flatt wrote: > Thanks for the help! > > When the optimize converts > > (let-values ([(X ...) (values M ...)]) >) > > to > > (let ([X M] ...) >) > > it incorrectly att

Re: Make, in place build, was Re: [racket-users] Racket v6.2

2015-09-10 Thread Matthew Flatt
At Thu, 10 Sep 2015 15:10:27 -0400, Anthony Carrico wrote: > I did a 2 character change to Racket (see > https://github.com/plt/racket/pull/1045), and hit make. For that case, I would use `raco setup` instead of `make` (since it's not a change to the runtime). Or I might use `make as-is`, which

Re: [racket-users] [handin-client] `raco pkg install $URL` vs `raco setup -A $localPath`: getting lost with Racket packages

2015-09-06 Thread Matthew Flatt
:ref master)` > to get the topmost commit hash... if I can store that locally*, I have an > update check :-D, and the package system API does the rest. > > *With my current knowledge, I'd (ab)use preferences for doing that without > writing around the system, but I'm open to better

Re: [racket-users] [handin-client] `raco pkg install $URL` vs `raco setup -A $localPath`: getting lost with Racket packages

2015-09-06 Thread Matthew Flatt
An easier way is: * Create a Git repo (e.g., at GitHub) for your handin client. It's a good idea to name the repo something specific to your class, as opposed to just "handin". For example, the one for my class is https://github.com/mflatt/uu-cs5510.git * Optionally, register

Re: [racket-users] More Racket Place abuse^H^H^H^H^H issues

2015-09-03 Thread Matthew Flatt
At Thu, 3 Sep 2015 11:12:50 +0100, Tim Brown wrote: > On 28/08/15 20:02, Matthew Flatt wrote: > > I think the sandbox is relevant because `sandbox-memory-limit` remains > > in effect (even though you're disabling the per-evaluation limit by > > setting `sandbox-eval-limit

Re: [racket-users] Interaction between break and custodian-box

2015-09-02 Thread Matthew Flatt
mail.com> wrote: > > Thanks for the quick reply! > > > > On Wed, Sep 2, 2015 at 5:28 PM, Matthew Flatt <mfl...@cs.utah.edu> wrote: > >> That looks like a bug in the scheduler to me. I don't think it's > >> specific to `custodian-box`, but to `sync` a

Re: [racket-users] Interaction between break and custodian-box

2015-09-02 Thread Matthew Flatt
That looks like a bug in the scheduler to me. I don't think it's specific to `custodian-box`, but to `sync` and any event that is not ultimately backed by a channel or semaphore. (For example, `alarm-evt` also seems to trigger the problem.) At Wed, 2 Sep 2015 16:20:56 -0400, Greg Hendershott

Re: [racket-users] custom-print called twice?

2015-09-01 Thread Matthew Flatt
The first call is to detect sharing, and the second time is to actually print. For example, if you change `(constr 'y)` to (define b (box #f)) (set-box! b (constr b)) b then you'll see that the output starts with "#0=", because the first pass detected that a "#0#" will be needed. At Wed,

Re: [racket-users] Help needed with: "cannot instantiate `racket/gui/base' a second time in the same process context"

2015-09-01 Thread Matthew Flatt
The problem is that the documentation-build process cannot support a use (direct or indirect) of `racket/gui/base` at documentation-build time. The @(require teachpacks/racket-turtle) in your ".scrbl" files is the main problem, since that indirectly loads `racket/gui/base`. It looks like you

Re: [racket-users] unclear about this `parameterize` behavior

2015-08-30 Thread Matthew Flatt
The `make-base-namespace` function creates a new namespace, but it attaches the `racket/base` instance of the current namespace to the new one. The `error-print-width` parameter comes from `racket/base`, so it's still the same parameter. You can use `namespace-attach-module` to attach param.rkt

Re: [racket-users] Sync on Distributed Place Channels

2015-08-30 Thread Matthew Flatt
At Sun, 30 Aug 2015 08:19:22 -0400, David T. Pierson wrote: On Mon, Aug 24, 2015 at 10:45:11AM -0700, Konstantin Weitz wrote: I'm trying to receive messages from a place. Receiving the messages with `place-channel-get` works fine, but using `sync` blocks indefinitely. I want to use `sync`

Re: [racket-users] More Racket Place abuse^H^H^H^H^H issues

2015-08-28 Thread Matthew Flatt
I haven't been able to replicate the specific crash, but I have a guess at the problem. I think the sandbox is relevant because `sandbox-memory-limit` remains in effect (even though you're disabling the per-evaluation limit by setting `sandbox-eval-limits`). A sandbox memory limit triggers memory

Re: [racket-users] More Racket Place abuse^H^H^H^H^H issues

2015-08-28 Thread Matthew Flatt
of the space that is shared among all places (which is relatively rare). I've pushed a repair for that bug and for three problems with memory accounting. At Fri, 28 Aug 2015 13:02:12 -0600, Matthew Flatt wrote: I haven't been able to replicate the specific crash, but I have a guess at the problem. I

Re: [racket-users] specifying extra compiled collection paths with info.rkt?

2015-08-22 Thread Matthew Flatt
I've pushed changes so that the set of module suffixes is extensible through a `module-suffixes` definition in a collection's info.rkt. Adding a new suffix affects compilation and testing in all collections. (The suffixes .rkt, .scrbl, .ss, and .scm remain hard-wired in the set.) Module suffixes

Re: [racket-users] Impersonating a 0-arity function

2015-08-21 Thread Matthew Flatt
At Fri, 21 Aug 2015 12:44:08 -0400, Benjamin Greenman wrote: I'd like to change the result of a 0-arity function, but I need help crafting the right magic spell. Here's my attempt -- this even possible? #lang racket/base (struct wrap (vals)) ;; Wrap a list (define (create) '())

Re: [racket-users] specifying extra compiled collection paths with info.rkt?

2015-08-21 Thread Matthew Flatt
It looks like there's not a way currently, although I think it would make sense to add one. For file extensions generally, I think there should be an info.rkt field to add extensions that are recognized by all tools that apply to all collections. That's a larger project, but it's on my near-term

Re: [racket-users] DrRacket rendering issues OS X

2015-08-19 Thread Matthew Flatt
PM.png] On Wed, Jun 17, 2015 at 7:13 PM Matthew Flatt mfl...@cs.utah.edu wrote: At Wed, 17 Jun 2015 12:35:36 -0700 (PDT), Andrew Kent wrote: On Wednesday, June 17, 2015 at 3:10:51 PM UTC-4, Alex Knauth wrote: One data point: I’m using DrRacket version 6.2.0.4--2015-06-08 with OS X

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

2015-08-18 Thread Matthew Flatt
At Tue, 18 Aug 2015 10:40:14 -0400, George Neuner wrote: On Mon, 17 Aug 2015 10:07:11 -0600, Matthew Flatt mfl...@cs.utah.edu wrote: The problem is in the clean-up of OS-level locks. A lock is allocated using a combination of malloc() and pthread_mutex_init(), for example. The clean up

Re: [racket-users] Garbage Collection of Places

2015-08-18 Thread Matthew Flatt
At Mon, 17 Aug 2015 12:21:41 -0700 (PDT), Jack Firth wrote: On Monday, August 17, 2015 at 9:07:15 AM UTC-7, Matthew Flatt wrote: That's an especially basic mistake, and it slipped by because low-level locks are rarely allocated in the run-time system. Place channels are probably

Re: [racket-users] DrRacket rendering issues OS X

2015-08-18 Thread Matthew Flatt
mac w/ OS X Yosemite w/ the 6.2 release as well (just to make sure I wasn't crazy or causing the issue on my machine).[image: Screen Shot 2015-08-18 at 4.07.23 PM.png] On Wed, Jun 17, 2015 at 7:13 PM Matthew Flatt mfl...@cs.utah.edu wrote: At Wed, 17 Jun 2015 12:35:36 -0700 (PDT), Andrew

Re: [racket-users] Redex typesetting

2015-08-18 Thread Matthew Flatt
At Tue, 18 Aug 2015 17:45:28 +0200, Paul van der Walt wrote: I have a bunch of typing judgements and metafunctions which i would now like to typeset, but the ⟦⟧ characters are not showing up correctly. I assume this is some kind of fonts problem? Mind you, at some point in the past (some

Re: [racket-users] Garbage Collection of Places

2015-08-17 Thread Matthew Flatt
The problem is in the clean-up of OS-level locks. A lock is allocated using a combination of malloc() and pthread_mutex_init(), for example. The clean up was usually missing the free() to go along with pthread_mutex_destroy(). That's an especially basic mistake, and it slipped by because

Re: [racket-users] Garbage Collection of Places

2015-08-17 Thread Matthew Flatt
I'm looking into this. I can confirm that the GC thinks there's no leak, but the OS thinks there is. Thanks for the example and info! At Mon, 17 Aug 2015 16:09:00 +0100, Tim Brown wrote: Sam, I don’t see the leak with (display (current-memory-use)) -- sorry for leaving it in the example,

Re: [racket-users] Building on Raspberry Pi - parallel build possible?

2015-08-15 Thread Matthew Flatt
At Sat, 15 Aug 2015 06:37:21 -0700 (PDT), Brian Adkins wrote: The Raspberry Pi has a 4 core CPU, so it pains me to see it pegged at only 25% this whole time. Is it possible to build Racket from Unix Source in parallel to get all 4 cores fired up? You can use make install PLT_SETUP_OPTIONS=-j

Re: [racket-users] How to break a process created with system

2015-08-09 Thread Matthew Flatt
Does `(current-subprocess-custodian-mode 'kill)` combined with Cmd-k (for kill, instead of break) make the subprocess terminate? If so, you could use `dynamic-wind` or catch `exn:break` exceptions, possibly put the subprocess under its own custodian, and so on. At Sun, 9 Aug 2015 15:17:19 +0200,

Re: [racket-users] Re: send-new-place-channel-to-named-dest usage question

2015-08-08 Thread Matthew Flatt
I fixed the minor issue, but I haven't been able to figure out how `send-new-place-channel-to-named-dest` is meant to work, either. (I'll try again to contact Kevin.) At Thu, 6 Aug 2015 11:32:29 +0100, Tim Brown wrote: On 06/08/15 11:29, Tim Brown wrote: (define node (create-place-node

Re: [racket-users] Is there a custodian finalizer?

2015-08-08 Thread Matthew Flatt
I think that's the only safe way to make a thread keep running outside the custodian that will be killed. If starting a program under another custodian is too much of a hassle, you could access the root custodian via the FFI and create a thread owned by it. See the implementation of

Re: [racket-users] Literate programming and submodules

2015-08-08 Thread Matthew Flatt
The problem here is the same as in https://groups.google.com/d/msg/racket-users/H7vilh3KcD4/pGZif3F3dEkJ I still haven't thought about it enough to fine better solution than putting `require (only-in racket/base #%module-begin))` before the submodule declaration. At Thu, 30 Jul 2015 16:46:34

Re: [racket-users] Communicating between macros *without* mutation, problems with multiple modules?

2015-08-08 Thread Matthew Flatt
, anyway. At Fri, 7 Aug 2015 22:36:32 -0500, Alexander D. Knauth wrote: Oh, thanks! That makes sense. On the off chance that you have an idea, is there a good way of doing this that doesn't require b being able to see c? On Aug 7, 2015, at 10:23 PM, Matthew Flatt mfl...@cs.utah.edu wrote

Re: [racket-users] Search code

2015-08-08 Thread Matthew Flatt
At Sat, 08 Aug 2015 16:19:23 +0100, Paulo Matos wrote: Where can I find the code for : http://docs.racket-lang.org/search/index.html It's in scribblings/main/private in the racket-index package: https://github.com/plt/racket/tree/master/pkgs/racket-index/scribblings/main/private -- You

Re: [racket-users] keep everything in each in-place install

2015-08-01 Thread Matthew Flatt
Are you seeing conflicts with different installations that have the same version number? Or different snapshot installations? Two settings can help keep installations separate: * Configure packages for installtion scope instead of user scope by default. You can check the current default

Re: [racket-users] Optimizing closures

2015-07-31 Thread Matthew Flatt
Also, which version of Racket are you using? With v6.1.1 and `in-range`, I get cpu time: 745 real time: 744 gc time: 0 cpu time: 205 real time: 205 gc time: 0 cpu time: 782 real time: 782 gc time: 0 cpu time: 205 real time: 206 gc time: 0 but with v6.2 and `in-range`, I get cpu time: 209

Re: [racket-users] Optimizing closures

2015-07-31 Thread Matthew Flatt
I think you want to use `in-range`. On my machine, adding `in-range` makes each loop run 20 times faster --- which means that the original loops are just testing the performance of the generic sequence case of `for`. (Probably we should make `for` recognize and specialize literal integers, and I

Re: [racket-users] Optimizing closures

2015-07-31 Thread Matthew Flatt
At Fri, 31 Jul 2015 15:03:53 +0100, Laurent wrote: I don't really understand why `in-range` makes such a difference. It looks like the kind of sequence iterator is tested at each step, whereas I was expecting it to be tested only at the beginning of the loop, since this sequence iterator kind

[racket-users] upcoming v6.2.1

2015-07-29 Thread Matthew Flatt
We're preparing a v6.2.1 release, which will go out before August 10. The v6.2.1 build will be a small set of patches to v6.2, i.e., not derived from the current development branch. The patches are for the HtDP teaching languages. The main patch for v6.2.1 is to add an option to restore the old

Re: [racket-users] Macro that does substitution

2015-07-29 Thread Matthew Flatt
At Wed, 29 Jul 2015 06:28:48 -0700 (PDT), Klaus Ostermann wrote: I'd like to have a macro let-cbn which does this: (let-cbn ((x1 e1) ...) body) is transformed to (let ((x1 (thunk e1)) ...) newbody) where newbody is the result of replacing every occurence of x1... by (x1)... . What

Re: [racket-users] Units and macros

2015-07-29 Thread Matthew Flatt
At Wed, 29 Jul 2015 07:00:54 -0700 (PDT), Klaus Ostermann wrote: Units are not allowed to export macros, presumably because the unit wiring takes place after the macro expansion. I have a unit and would like to define a few macros based on the interface of that unit. Right now I

Re: [racket-users] saving a BMP in racket

2015-07-27 Thread Matthew Flatt
I've updated `racket/draw` to restore support for writing BMP files. At Sun, 26 Jul 2015 11:55:51 -0400, 'John Clements' via Racket Users wrote: On Jul 23, 2015, at 2:47 AM, copycat kangren.c...@gmail.com wrote: Yes, i can and will try with the old imagemagick bindings. On Thursday,

Re: [racket-users] UDP bytes?

2015-07-27 Thread Matthew Flatt
At Sun, 26 Jul 2015 22:42:48 -0700 (PDT), Слава ПолноеИмя wrote: Sorry, list, for dumb unprofessional question, but I'm not even amateur programmer) How can I convert string and floats to bytes, that can be passed to udp-send? Tried real-floating-point-bytes and string-bytes/utf-8 but it

Re: [racket-users] continuing after a user break

2015-07-27 Thread Matthew Flatt
At Mon, 27 Jul 2015 19:32:32 +, John Carmack wrote: Is it possible to continue execution after a ^b user break in DrRacket (not debugging)? It would often be useful to be able to ^b, print some global state, set some flags, and continue running. The `exn:break` exception record includes

Re: [racket-users] must manually delete compiled file for tests/racket/package.rkt ?

2015-07-26 Thread Matthew Flatt
Yes, this is a limitation of `raco pkg` that is on my list to repair. It happens when a file is removed from a linked package, such as the packages in pkgs, and only when the corresponding .zo file is not yet deleted. It's not an actual conflict, because `raco setup` will soon remove the .zo

Re: [racket-users] Prebuilt Android NDK racket?

2015-07-25 Thread Matthew Flatt
At Sat, 25 Jul 2015 19:58:05 +, John Carmack wrote: Anyone got one handy? Lazily attempting to avoid the day of frustration that usually comes from touching anyone else's NDK project... Untested, but possibly useful:

Re: [racket-users] Re: Extending list-box functionality

2015-07-25 Thread Matthew Flatt
At Thu, 23 Jul 2015 19:57:52 -0700 (PDT), copycat wrote: On Thursday, July 23, 2015 at 2:50:37 PM UTC+8, copycat wrote: With a list box, i can select multiple items by holding onto my mouse and dragging. I'll like to add on other features to the list box like being able to drag the rows to

Re: [racket-users] Scribble: referencing struct fields

2015-07-25 Thread Matthew Flatt
At Thu, 23 Jul 2015 15:07:53 -0700, Jordan Johnson wrote: What are the appropriate function and the preferred practice for referring to struct fields in a Scribble document? For example, if I’m writing the defstruct* body text and want to say, “the x field is intended for blah blah blah”,

Re: [racket-users] easy question about `free-identifier=?`

2015-07-24 Thread Matthew Flatt
The documentation's intent is to describe about syntax objects that represent an expanded expression. When you write (define stx #'(let ([x 5]) (+ x 6))) then the syntax object `stx` doesn't represent an expansion. Instead, it's a pile symbols and pairs, all with the same lexical context (taken

Re: [racket-users] Re: get the content of an editor% with formattings.

2015-07-22 Thread Matthew Flatt
At Wed, 22 Jul 2015 18:41:14 +0200, mazert wrote: Le 14/07/2015 18:12, Matthew Flatt a écrit : If you're trying to move the text from one editor to another, then it's probably easiest to use the `copy` and `paste` methods. No, I try to convert it into html format. But first i need to get

Re: [racket-users] Macro introduce identifiers in the new expander

2015-07-21 Thread Matthew Flatt
: That fixed the example I gave, but now this fails: (let () (def) (let () (use))) On Mon, Jul 20, 2015 at 2:50 PM Matthew Flatt mfl...@cs.utah.edu wrote: Repair pushed. On Jul 20, 2015, at 11:14 AM, Matthew Flatt mfl...@cs.utah.edu wrote: Thanks for the info. I think

Re: [racket-users] Current snapshot: problem with generic interfaces and contracts

2015-07-20 Thread Matthew Flatt
That was a bug in the revised implementation of `define-generics` for the new expander. I've pushed a repair. At Sun, 19 Jul 2015 22:34:36 -0400, Alexander D. Knauth wrote: This is a simplified example of something that worked in racket version 6.2.0.4 from 2015-06-08, but is now broken in

Re: [racket-users] Macro introduce identifiers in the new expander

2015-07-20 Thread Matthew Flatt
Repair pushed. On Jul 20, 2015, at 11:14 AM, Matthew Flatt mfl...@cs.utah.edu wrote: Thanks for the info. I think it's a bug in the expander, and I have a repair, but I think that repair might point to another bug that I'm still investigating. At Mon, 20 Jul 2015 12:56:49 -0400

Re: [racket-users] Macro introduce identifiers in the new expander

2015-07-20 Thread Matthew Flatt
Thanks for the info. I think it's a bug in the expander, and I have a repair, but I think that repair might point to another bug that I'm still investigating. At Mon, 20 Jul 2015 12:56:49 -0400, Alexander D. Knauth wrote: I don't really know what's going on, but this might help: ;; It seems

Re: [racket-users] Re: set a timeout to tcp-connect

2015-07-17 Thread Matthew Flatt
At Fri, 17 Jul 2015 16:58:50 +0200, mazert wrote: Le 17/07/2015 16:16, Matthias Felleisen a écrit : This actually works. But I am not sure why you'd want to do something like that. Ah yes, letrec is what I was looking for :) . The goal was to test a port with a specific timeout (here I

Re: [racket-users] Problem when using horizontal pane

2015-07-17 Thread Matthew Flatt
At Fri, 17 Jul 2015 15:16:34 +0800, Mianlai Zhou wrote: I have the following code: #lang racket (require slideshow racket/class racket/gui/base) (define my-frame (new frame% [label My chess] [width 300] [height 391]

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

2015-07-16 Thread Matthew Flatt
At Wed, 15 Jul 2015 22:48:26 -0300, Gustavo Massaccesi wrote: But perhaps the problem is in the code that tracks the single_use value. After 'dup' is applied, 'rep' is not long a singled used function. Yes, I think that's the problem. I thunk I have a repair to update single-use tracking

Re: [racket-users] get the content of an editor% with formattings.

2015-07-14 Thread Matthew Flatt
At Mon, 13 Jul 2015 17:58:36 +0200, mazert wrote: I have a text% inside an editor-canvas% object, and I write some text then I apply to it a blue color for example. When i want to get the text with get-text method, i only get the text without formatings. Is there a way to get the text with

Re: [racket-users] Diagnosing a segfault in production

2015-07-10 Thread Matthew Flatt
At Thu, 9 Jul 2015 10:08:53 -0700 (PDT), Scott Bell wrote: On Thursday, July 9, 2015 at 12:27:26 AM UTC-7, Matthew Flatt wrote: At Wed, 8 Jul 2015 18:23:32 -0700 (PDT), Scott Bell wrote: On Wednesday, July 8, 2015 at 4:05:20 PM UTC-7, Scott Bell wrote: On Wednesday, July 8, 2015 at 3:48

Re: [racket-users] Diagnosing a segfault in production

2015-07-09 Thread Matthew Flatt
At Wed, 8 Jul 2015 18:23:32 -0700 (PDT), Scott Bell wrote: On Wednesday, July 8, 2015 at 4:05:20 PM UTC-7, Scott Bell wrote: On Wednesday, July 8, 2015 at 3:48:22 PM UTC-7, neil wrote: Does adding the executable pathname to the `gdb` command line (i.e., format `gdb EXECUTABLE-FILE

Re: [racket-users] Re: scribble/lp and test modules (redux)

2015-07-07 Thread Matthew Flatt
Sorry --- I lost track of this one. The problem here is subtle: `scribble/lp` defines `#%module-begin`, and a `module+` (or `module* test #f`) form picks up that `#%module-begin` for the submodule body, where it isn't wanted and doesn't work. The variant #lang scribble/lp @(chunk *

Re: [racket-users] Rebuild html documentation

2015-07-07 Thread Matthew Flatt
Running `raco setup` should have worked. Can you describe the steps that you tried in more detail (i.e., enough for me to try the same thing and see the result)? At Tue, 7 Jul 2015 20:31:16 -0300, Gustavo Massaccesi wrote: I'm trying a few changes in a .scrbl file of one package and I want to

Re: [racket-users] stops in Macros that Work Together

2015-07-06 Thread Matthew Flatt
At Mon, 06 Jul 2015 23:24:20 -0400, Ryan Culpepper wrote: On 07/06/2015 10:04 PM, Anthony Carrico wrote: I've been working through Macros that Work Together (on my way to working through Sets-of-Scopes). I've come across something that is slightly unclear to me in the section on

Re: [racket-users] garbage collection

2015-07-05 Thread Matthew Flatt
At Sat, 04 Jul 2015 17:55:29 -0400, Neil Van Dyke wrote: Neil Toronto wrote on 07/04/2015 05:29 PM: I don't know, but I want most of these things. I assume this is related to your earlier question about games? :) Partly. :) I've also been dealing with GC for years in non-game HTTP

Re: [racket-users] garbage collection

2015-07-04 Thread Matthew Flatt
I have no plans myself, but I think many applications would benefit from incremental collection. I also think that implementing an incremental GC for Racket is within reach --- as much as for any runtime system. That is, unlike so many other things in our infrastructure, the GC is not so tangled

Re: [racket-users] Re: [racket][system] Web server does not sleep when idling in Solaris/OpenIndiana

2015-06-30 Thread Matthew Flatt
Would using select() instead of poll() avoid the problem? You could try a Racket build that uses select() by changing mzconfig.h as generated by `configure` to not define `HAVE_POLL_SYSCALL`. The `configure` script's check for poll() could be disabled easily on Solaris if using poll() is a bad

Re: [racket-users] try a new macro expander

2015-06-29 Thread Matthew Flatt
.: ; = add matching binding.: ; matching binding.: in: add1 I found this because of this Travis CI build failure: https://travis-ci.org/AlexKnauth/infix-macro/jobs/68245124#L164 On Jun 25, 2015, at 12:31 AM, Matthew Flatt mfl...@cs.utah.edu wrote: Yes, I overlooked `splicing-local`, and I'll

Re: [racket-users] Using ‘except-in’ to exclude identifiers for a single phase level

2015-06-29 Thread Matthew Flatt
You're right that there's not a form that's like `except-out` but constrained both by name and phase. There's also not an export variant of `only-meta-in`, which would get your half-way there. You could implement a new provide expander to do that. Otherwise, in addition to the strategy that you

Re: [racket-users] try a new macro expander

2015-06-24 Thread Matthew Flatt
I rely on it in this macro here: https://github.com/AlexKnauth/my-object/blob/master/my-object/stuff.rkt#L25 And Travis CI was giving me this error: https://travis-ci.org/AlexKnauth/my-object/jobs/68248192#L209 On Jun 22, 2015, at 8:25 AM, Matthew Flatt mfl...@cs.utah.edu wrote: At Thu

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

2015-06-23 Thread Matthew Flatt
Science 115 Waterman St, 4th Floor Providence, RI 02912 802-458-0637 On Mon, Jun 22, 2015 at 11:39 PM, Matthew Flatt mfl...@cs.utah.edu wrote: Probably you don't want to work with namespaces, which are intended more for run-time reflection. For an example of turning internal definitions

Re: [racket-users] drawing with canvas

2015-06-22 Thread Matthew Flatt
The docs here might help elaborate on Matthias's answer: http://docs.racket-lang.org/gui/canvas___.html I'll try adding more links to that information, including from the `get-dc` method. Maybe it also would be better as its own section in the overview chapter. At Mon, 22 Jun 2015 18:07:04

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

2015-06-22 Thread Matthew Flatt
Probably you don't want to work with namespaces, which are intended more for run-time reflection. For an example of turning internal definitions into 'letrec-syntaxes+values', try the implementation of 'racket/block'. On Jun 23, 2015, at 10:06 AM, Thomas Dickerson thomas_dicker...@brown.edu

Re: [racket-users] try a new macro expander

2015-06-22 Thread Matthew Flatt
At Thu, 21 May 2015 07:15:14 -0600, Matthew Flatt wrote: Otherwise, be prepared for me to come back in a few weeks and lobby for moving to a new macro expander. Here's the proposal: let's switch on July 16. Switch means that I'd merge the new macro expander to the master branch

Re: [racket-users] Closing big-bang windows

2015-06-21 Thread Matthew Flatt
The enclosed big-crunch.rkt library provides a `big-bang/big-crunch` form that is the same as `big-bang`, but it closes the window with `stop-when` produces #t. (I wrote it for my son.) ;; isl+ (require 2htdp/image) (require 2htdp/universe) (require big-crunch.rkt) (big-bang/big-crunch 10

<    4   5   6   7   8   9   10   >