Re: [racket-users] DrRacket crashes on simple pict3d script

2015-12-20 Thread Matthew Flatt
Thanks for the report about the "Remove" button in the "Available for Catalog" panel! I've pushed a repair for the next version. Meanwhile, the "Currently Installed" panel provides another view on installed packages, and the "Remove" button there should work. I think Jay is working on the "mix"

Re: [racket-users] Re: More compile/eval Confusion

2015-12-25 Thread Matthew Flatt
I agree with Robby's explanation on just the `compile` line. When you uncomment both lines, it's the same error as as > (module m racket/base (define x 5)) > (require 'm) > (module m racket/base (define x 5)) define-values: assignment disallowed; cannot re-define a constant constant: x

Re: [racket-users] making games in racket

2015-12-26 Thread Matthew Flatt
At Fri, 25 Dec 2015 22:17:21 -0800 (PST), Taro Annual wrote: > I make "pong" game in big-bang(2hdp/universe). > But, moving a racket(not language!) by keyboard("up", "down", ...), the > racket > freezes in 0.3~0.5s sometimes. > > I think it is due to the beginner's platform. > What

Re: [racket-users] Re: More compile/eval Confusion

2015-12-26 Thread Matthew Flatt
At Fri, 25 Dec 2015 16:58:53 -0700, Leif Andersen wrote: > That's what I thought initially too, but it didn't seem to make a > difference when I used > `expand-syntax-top-level-with-compile-time-evals`, although then I > realized that perhaps a better function to use would be >

Re: [racket-users] making games in racket

2015-12-26 Thread Matthew Flatt
At Sat, 26 Dec 2015 06:52:19 -0800 (PST), Taro Annual wrote: > 2015年12月26日土曜日 21時54分52秒 UTC+9 Matthew Flatt: > > Can you try a current snapshot to see whether it eliminates pauses?: > > > > http://pre.racket-lang.org/ > > > > [...] > > Sorry, it doesn

Re: [racket-users] Re: making games in racket

2015-12-28 Thread Matthew Flatt
At Mon, 28 Dec 2015 18:54:10 +0100, Juan Francisco Cantero Hurtado wrote: > FYI, I also see the pauses in the game when I move the lateral bars > (with Racket 6.3 and git HEAD). I'm using Linux and the output of racket > only shows very small pauses. Aha --- do you mean that bars pause, but the

Re: [racket-users] Confused about the difference between the REPL and the toplevel.

2015-12-22 Thread Matthew Flatt
e the require form, but why doesn't it > evaluate what's needed for compile time? I thought that was the reason for > needing require as a macro instead of a function. Or am I getting the purpose > of compile wrong? > >> > >> Alex Knauth > >> > >>> On

Re: [racket-users] Confused about the difference between the REPL and the toplevel.

2015-12-22 Thread Matthew Flatt
gt;> > >> > >> On Mon, Dec 21, 2015 at 8:24 PM, Alex Knauth <alexan...@knauth.org> wrote: > >>> I get that `compile` doesn't evaluate the require form, but why doesn't > >>> it > evaluate what's needed for compile time? I thought that was th

Re: [racket-users] Confused about the difference between the REPL and the toplevel.

2015-12-22 Thread Matthew Flatt
runtime_ > >>> code, > but I thought it had to evaluate the compile-time code for it to compile the > program? > >>> > >>> Am I misunderstanding what `compile` is supposed to do? Or what > compile-time code is, or? > >>> > >>

Re: [racket-users] reducing pauses with incremental GC

2015-12-21 Thread Matthew Flatt
--- and also whether it increases DrRacket's footprint by too much. If you use a snapshot version of DrRacket, keep an eye on memory use, and let us know if it's a problem. At Wed, 2 Dec 2015 08:44:42 -0700, Matthew Flatt wrote: > The development version of Racket now supports an incremen

Re: [racket-users] how to achieve internal cross-references in scribble/lp2

2015-12-30 Thread Matthew Flatt
With the current implementation of `scribble/lp2`, you could create a "dummy.rkt" module #lang racket/base (define foo 'foo) (define bar 'bar) (provide (all-defined-out)) and use `(require (for-label "dummy.rkt"))` with `@declare-exporting["dummy.rkt"]` to get hyperlinking. But I

Re: [racket-users] Can scribble/lp2 typeset comments within chunks?

2015-12-30 Thread Matthew Flatt
I've adjusted `chunk` to strip away `code:comment`, etc., and so it now works with `scribble/comment-reader`. A better approach in the future might be to add a `chunk` variant that's based on `codeblock` instead of `racketblock`, but I didn't try that. At Fri, 18 Dec 2015 12:20:13 -0800, Matthew

Re: [racket-users] `raco setup` won't build docs when `compile-omit-paths` is 'all?

2015-12-17 Thread Matthew Flatt
Yep. I've already pushed a repair for this as prompted by your question yesterday (but let us know if it still doesn't work right). At Thu, 17 Dec 2015 11:22:38 -0800, Matthew Butterick wrote: > Can't see how this would be a feature, but maybe I lack imagination: `raco > setup` seemingly won't

Re: [racket-users] cannot produce units from syntax transformers

2015-11-28 Thread Matthew Flatt
Your example is similar to (define-syntax-rule (with-x body) (let ([x 5]) body)) (with-x x) ; => unbound identifier That is, `import` is a binding form, just like `let`. Bindings introduced by a hygienic macro do not capture identifiers at the macro-use site. If you want non-hygienic

Re: [racket-users] current-text-keymap-initializer problems in v6.2.1

2015-11-25 Thread Matthew Flatt
I'm not able to replicate that problem, but I'm unclear on where `init-editor-keymap` comes from. Is that something in your code? The function for the `current-text-keymap-initializer` parameter really should accept a single argument, so the contract error in the second case below makes sense.

Re: [racket-users] [racket] Racket 6.3(.0.7) breaks old code

2015-11-29 Thread Matthew Flatt
My guess is that you're running into an incompatibility created by the new macro system. Something like lifting code out of an expanded `module` form and dropping it into a different one? A change related to submodule expansion? Or something related to the top-level namespace? It might be an

Re: [racket-users] RacketCon hotel discount?

2016-06-08 Thread Matthew Flatt
The group code is "RKC", or you can call and mention "RacketCon 2016". At Tue, 7 Jun 2016 15:41:33 -0600, Matthew Flatt wrote: > Yes, I'll ping the hotel again... > > At Tue, 7 Jun 2016 14:21:43 -0700 (PDT), Brian Adkins wrote: > > I noticed that the 20

Re: [racket-users] RacketCon hotel discount?

2016-06-07 Thread Matthew Flatt
Yes, I'll ping the hotel again... At Tue, 7 Jun 2016 14:21:43 -0700 (PDT), Brian Adkins wrote: > I noticed that the 2015 RacketCon had a "RAC" group code for the hotel. I > already booked my hotel, but it's a changeable/cancelable reservation, so is > there going to be a group discount for the

Re: [racket-users] trying to use dump-memory-stats

2016-06-06 Thread Matthew Flatt
The GC's printer for `dump-memory-stats` is broken on Windows. It breaks in different ways depending on the compiler used to build Racket and for 32-bit vs. 64-bit. I've pushed a repair for the next snapshot build --- at least for the Utah snapshot, which uses MSVC. I'll probably have to

Re: [racket-users] I can't open my previous file

2016-06-06 Thread Matthew Flatt
Based on Robby's work tracking down the problem, I've pushed a repair for the next snapshot build. (I'm surprised that this bug escaped detection before.) Since the problem was in file reading, the next snapshot build will include a repaired DrRacket that is able to read your original file.

Re: [racket-users] define-serializable-cstruct with versions?

2016-06-07 Thread Matthew Flatt
hence, there is no way to > deserialize the correct, new version of the _pond. > > I think this could only be resolved by changing the serialization so that it > keeps all relevant information also for non-pointer content. > > Berthold > > On 06 Jun 2016, at 19:22, Matthew Flatt

Re: [racket-users] define-serializable-cstruct with versions?

2016-06-07 Thread Matthew Flatt
> I think this could only be resolved by changing the serialization so that it > keeps all relevant information also for non-pointer content. > > Berthold > > On 06 Jun 2016, at 19:22, Matthew Flatt <mfl...@cs.utah.edu> wrote: > > > > Yes, but I think a diffe

Re: [racket-users] define-serializable-cstruct with versions?

2016-06-06 Thread Matthew Flatt
Yes, but I think a different protocol will be needed than for `serializable-struct`. With (serializable-struct pond (depth)) it's clear that the deserializer receives a single value for the single field (or, more generally, N values for N fields). So, it's clear how to make a compatibility

Re: [racket-users] Detecting mouse events on top of picts?

2016-06-06 Thread Matthew Flatt
At Mon, 6 Jun 2016 16:45:33 -0400, David Raymond Christiansen wrote: > I'm looking for a way to check whether a mouse pointer is on top of a > particular pict that has been drawn to a canvas%. > > Right now, the best I've been able to do is to render the pict to two > off-screen bitmaps with

Re: [racket-users] Combining body-id in title with hidden attribute in scribble

2016-06-20 Thread Matthew Flatt
Providing 'hidden as `#:style` is shorthand for (make-style #f (list 'hidden)) When you're already using `make-style`, you can add 'hidden to the list of properties: (title #:style (make-style #f (list 'hidden (make-body-id "beta"))) ) At Mon, 20 Jun 2016 03:47:56 -0700 (PDT), Kathi

Re: [racket-users] Using Futures with FFI functions

2016-06-24 Thread Matthew Flatt
The runtime system currently cannot call a foreign function without suspending a future. Supporting that operation is not out of the question, but I don't think it will be easy. Would using places work in this case --- creating one or more places on start-up to serve data from the C library? At

Re: [racket-users] Interpreting srclocs from lexer-src-loc with unicode characters

2016-01-13 Thread Matthew Flatt
You can adjust a port to count characters instead of bytes by using `port-count-lines!`. At Wed, 13 Jan 2016 12:23:24 -0800 (PST), Ben Draut wrote: > I've been tinkering with a lexer/parser for Lambda calculus expressions. I'm > trying to add a feature to highlight unexpected characters, rather

Re: [racket-users] VS 2015 Community and Racket Embedding

2016-06-26 Thread Matthew Flatt
Can you say more about the problem with VS 2015? I have used VS 2015, and it worked for me, although I haven't used it lately. Did you run `nmake win32-in-place` in the top-level Git checkout, or did you build in some other way? If you build the part of Racket that's in the "src" directory

Re: [racket-users] VS 2015 Community and Racket Embedding

2016-06-26 Thread Matthew Flatt
At Sun, 26 Jun 2016 07:31:14 -0700 (PDT), Diego Rodriguez wrote: > Il giorno domenica 26 giugno 2016 14:33:12 UTC+2, Matthew Flatt ha scritto: > > Can you say more about the problem with VS 2015? I have used VS 2015, > > and it worked for me, although I haven't used it lately. >

Re: [racket-users] (namespace-variable-value) not working with a struct definition?

2016-06-24 Thread Matthew Flatt
If you write (struct point (x y)) then `point` is bound as syntax that both expands to the `point` constructor and provides static information about the point` structure (as used, for example, by `match`). You could avoid the indirection through syntax, sacrificing static information, by

[racket-users] catalog of built packages

2016-02-10 Thread Matthew Flatt
In case it's useful to anyone, the package-build service now provides built versions of packages though this catalog: https://pkg-build.racket-lang.org/server/built/catalog/ Built packages can install faster than the source packages that are provided by https://pkgs.racket-lang.org/ --- as

[racket-users] docs for all packages at docs.racket-lang.org

2016-02-09 Thread Matthew Flatt
The documentation at http://docs.racket-lang.org/ now includes documentation for all packages that are registered at pkgs.racket-lang.org, instead of just the documentation for the main distribution. Package documentation is built and updated daily. This change means that you can search at

Re: [racket-users] Using scribble to print BSL output

2016-02-09 Thread Matthew Flatt
I think the main issue is that `htdp/bsl/runtime` changed the way it configures the printer. Instead of setting `current-print`, it sets `global-port-print-handler`. Meanwhile, `interaction` prints within the sandbox only if `current-print` is changed from its default value, which is

Re: [racket-users] Odd behavior of syntax-case

2016-01-28 Thread Matthew Flatt
The pattern matcher in `syntax-case` is less powerful than the one in `syntax-parse`. The pattern (_ trash-left ... save-the-world . trash-right) can match `save-the-world` only against the last item in a list --- or against the first of the last pair for a non-list. With `syntax-parse`, as

Re: [racket-users] Using local-expand to mostly expand a module?

2016-01-31 Thread Matthew Flatt
I think you need to use a trampoline for the module body's expansion, where you expand only one module-body form at a time and let `#%module-begin` finish up forms like `require` or `define-syntaxes` before you macro continues with later forms. The general pattern is that you have a macro

Re: [racket-users] Odd behavior of syntax-case

2016-01-28 Thread Matthew Flatt
gt; > On Thursday, January 28, 2016 at 6:06:31 AM UTC-7, Matthew Flatt wrote: > > The pattern matcher in `syntax-case` is less powerful than the one in > > `syntax-parse`. The pattern > > > > (_ trash-left ... save-the-world . trash-right) > > > > can ma

Re: [racket-users] Detect version of OS X

2016-02-24 Thread Matthew Flatt
I recommend `find-executable-path` instead of `system` plus "which". At Wed, 24 Feb 2016 13:34:19 +, Stephen De Gabrielle wrote: > Thank you - very good advice - I'll have to change my pull request. > S. > On Wed, 24 Feb 2016 at 10:57, Norman Gray wrote: > > > > >

Re: [racket-users] mutually linking between documentation of different packages

2016-02-23 Thread Matthew Flatt
At Tue, 23 Feb 2016 02:03:55 -0500, Neil Van Dyke wrote: > If there are two packages, "a" and "b", in the package catalog, and the > authors of both packages want their package's documentation to have > hyperlinks to sections of the other package's documentation... > > Will that work? Is it OK

Re: [racket-users] Detect version of OS X

2016-02-23 Thread Matthew Flatt
You could parse the result of `(system-type 'machine)`, but you might just as well use a little `ffi/unsafe` binding to get `NSAppKitVersionNumber`: #lang racket/base (require ffi/unsafe) (define appkit (ffi-lib "/System/Library/Frameworks/AppKit.framework/AppKit")) (define

Re: [racket-users] Re: long (16s) pauses in UI associated with OS X, possibly app nap?

2016-02-23 Thread Matthew Flatt
At Tue, 23 Feb 2016 11:46:37 -0500, George Neuner wrote: > On Tue, 23 Feb 2016 08:06:34 -0700, Matthew Flatt > <mfl...@cs.utah.edu> wrote: > > >At Mon, 22 Feb 2016 18:55:59 -0500, George Neuner wrote: > >> If you suspect App Nap, have you tried disabling it for DrRac

Re: [racket-users] slow rendering for 1000+ lines/arcs

2016-02-23 Thread Matthew Flatt
At Tue, 23 Feb 2016 08:49:11 -0800 (PST), copycat wrote: > If the problem is somehow related to going in and out of the drawing > layer, is it possible to batch the updates without using dc-path% and > draw-path%? Another kind of batching is `draw-lines` instead of `draw-line`, but that one

Re: [racket-users] Process for providing new functions for the standard library

2016-02-24 Thread Matthew Flatt
I think a pull request is the right idea. When requests like that fall in my area of maintenance, sometimes I've merged them, and sometimes I've suggested that a package would be better. I thought the pull request was helpful either way. Matthew At Wed, 24 Feb 2016 19:37:13 -0800 (PST), Brian

Re: [racket-users] long (16s) pauses in UI associated with OS X, possibly app nap?

2016-02-23 Thread Matthew Flatt
At Mon, 22 Feb 2016 18:55:59 -0500, George Neuner wrote: > If you suspect App Nap, have you tried disabling it for DrRacket? That's worth a try, but App Nap should be disabled automatically by the `racket/gui` library that DrRacket uses. The library calls the `setActivationPolicy:` method of the

Re: [racket-users] slow rendering for 1000+ lines/arcs

2016-02-23 Thread Matthew Flatt
I see drawing times of around 60ms for "KCF new FIPG .. .dxf" on my machine. I could reduce the time a little by calling `(get-dc)` just once and passing it through all the drawing functions, but it looks like a lot of the remaining time is spent crossing into and out of the drawing layer at

Re: [racket-users] scribble other-doc

2016-02-24 Thread Matthew Flatt
The easiest way to get the right module path to refer to a documentation section is click the section title. For example, if you click on XML: Parsing and Writing then this text will appear below the title: Link to this document with @other-doc['(lib "xml/xml.scrbl")] It looks like

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

2016-02-17 Thread Matthew Flatt
A second problem is is that the package catalog is not supposed to depend on that machine's uptime. That's a configuration mistake that we will fix, too. Unfortunately, I haven't yet found a way to fix it before the machine is back up. At Wed, 17 Feb 2016 14:21:02 +, Sam Tobin-Hochstadt

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

2016-02-17 Thread Matthew Flatt
At Wed, 17 Feb 2016 10:45:26 -0800 (PST), Brian Adkins wrote: > On Wednesday, February 17, 2016 at 10:28:48 AM UTC-5, Ben Greenman wrote: > > You should be able to install html-parsing now. > > I'm no longer getting connection refused, but now I'm getting a 403. This should be fixed now. --

Re: [racket-users] pict3d trouble

2016-02-18 Thread Matthew Flatt
I see the same problem on my machine with v6.4 and 6.4.0.8, and not with v6.3. Using `pict3d/universe` works for me in all versions, but the Pict3D snip that's shown in DrRacket doesn't. So, I think the problem must be due to a change since v6.3 in `racket/gui` related to GL bitmaps. I'll

Re: [racket-users] pict3d trouble

2016-02-18 Thread Matthew Flatt
cosx "Darwin Miriams-MacBook-Pro.local 14.5.0 Darwin Kernel Version > 14.5.0: Tue Sep 1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 > x86_64" (x86_64-macosx/3m) (get-display-depth) = 32 > > thanks, > > S. > > > > > On Thu, Feb 18, 2016 at 11:3

Re: [racket-users] second->date

2016-02-19 Thread Matthew Flatt
There was an overflow problem in the part that tries to prepare a 64-bit value to put into the 32-bit halves of `FILETIME`. I've pushed a repair. Thanks for the report and help! At Fri, 19 Feb 2016 18:06:55 -0500, Jon Zeppieri wrote: > Er, no. Disregard that. That'll teach me to talk about the

Re: [racket-users] Segfault

2016-02-29 Thread Matthew Flatt
Your C code doesn't cooperate with the "3m" garbage collector, which is the way Racket is built by default. For example, the object that `env` references might be moved by the GC without the `env` variable being updated. See

Re: [racket-users] problems with scribble while trying to document classes

2016-03-10 Thread Matthew Flatt
You need @(require (for-label racket/class)) to connect `object%` as used in your documentation to the `object%` binding that is defined in documentation. At Thu, 10 Mar 2016 08:15:55 -0800 (PST), Axel Schnell wrote: > I was writing some documentation about my experiments with classes and

Re: [racket-users] Are fixnums guaranteed to be `eq?` whenever they are `=`/`equal?` ?

2016-03-14 Thread Matthew Flatt
At Mon, 14 Mar 2016 19:43:51 -0400, Tony Garnock-Jones wrote: > Can I rely on the truth of the following: > > (implies (and (fixnum? x) (fixnum? y) (= x y)) >(eq? x y)) > > ? Yes, that's guaranteed by the docs. > I know I can rely on something similar for symbols. And keywords.

Re: [racket-users] Are fixnums guaranteed to be `eq?` whenever they are `=`/`equal?` ?

2016-03-14 Thread Matthew Flatt
At Mon, 14 Mar 2016 19:59:51 -0400, Tony Garnock-Jones wrote: > On 03/14/2016 07:53 PM, Matthew Flatt wrote: > > [fixnum eqness is guaranteed by the docs. > > [...] And keywords [are also guaranteed]. > > [...] [And] Booleans, void, and characters with a scalar value under

Re: [racket-users] Requiring parent modules within module* forms?

2016-03-12 Thread Matthew Flatt
At Sat, 12 Mar 2016 09:45:57 -0500, Matthias Felleisen wrote: > > > On Mar 11, 2016, at 8:01 PM, Alexis King wrote: > > > > The documentation for module* would seem to indicate that submodules > > declared with module* can require their parent modules: > > > >> Like

Re: [racket-users] ports, custodians, and places

2016-03-12 Thread Matthew Flatt
At Sat, 12 Mar 2016 15:35:14 -0500, Jon Zeppieri wrote: > I have TCP ports that I send from one place to another. I'd like the > receiving place to be responsible for closing them. In particular, I'd like > to make that the responsibility of a custodian in the receiving place. > > If I close the

Re: [racket-users] Re: custom keybindings (AltGr)

2016-03-19 Thread Matthew Flatt
​ ​ > ​Alt+arrowright ​jump to end s-expr > ​ ​ ​ ​ ​ > ​Ctrl+Arrowright > ​jump to end word > ​ ​ ​ ​ ​ > > > I'll look at your code when I have more time tomorrow or this weekend. > > > Thanks again, > > Ber

Re: [racket-users] Re: custom keybindings (AltGr)

2016-03-19 Thread Matthew Flatt
ings. > I also noticed that a "c:m:q" always trumps a "g:q" binding regardless of > order. > and a "g:q" always trumps "c:m:~g:q" (regardless of Ctrl+Alt or AltGr > combination) > > Thanks for the file. For what I want, it works just fine

Re: [racket-users] Re: custom keybindings (AltGr)

2016-03-15 Thread Matthew Flatt
Thanks for looking into this problem in depth! Although I'll suggest an alternate implementation, your patch was helpful for me to understand the problems and goals. To generate an event when AltGr- doesn't produce a character, I think a better approach here is to call ToUnicode(). That seems to

Re: [racket-users] interactive window in slideshow

2016-03-28 Thread Matthew Flatt
At Mon, 28 Mar 2016 11:53:38 -0700, Byron Davies wrote: > I have a single interactive pasteboard on a slideshow slide. For a learning > task, the user needs to click on objects on the pasteboard. There’s a little > glitch, however. The user must first click on the pasteboard to make it the >

Re: [racket-users] Embed Racket in C and call Racket procedure

2016-03-30 Thread Matthew Flatt
You were close with ((dynamic-require 'hw 'hw)) but you're missing a quote: ((dynamic-require ''hw 'hw)) When you make "base.c" as raco ctool --c-mods base.c hw.rkt then it's like (module hw racket/base (provide hw) (define (hw) (displayln "Hello, world!"))) at a REPL, and

Re: [racket-users] racket not W^X?

2016-04-05 Thread Matthew Flatt
At Tue, 5 Apr 2016 08:42:28 -0400, Philippe Meunier wrote: > Matthew Flatt wrote: > >Since, as you note, units of JIT > >generation tend to be smaller than a page, this creates trouble if > >JITted code running in one thread is allocated on the same page as > >JITting in

Re: [racket-users] racket not W^X?

2016-04-05 Thread Matthew Flatt
Pro tip for pirates: jump to scheme_eval(). At Tue, 5 Apr 2016 09:32:04 -0400, Philippe Meunier wrote: > Robby Findler wrote: > >How is it possible to generate code at runtime and also enforce W^X? > > Short answer: using the mprotect system call (see the second paragraph > below). > > Suppose

Re: [racket-users] 6.4 + universe has mouse-based hiccups

2016-04-07 Thread Matthew Flatt
Apr 2016 18:10:05 -0400, "John Clements" wrote: > > > On Apr 6, 2016, at 9:02 AM, Matthew Flatt <mfl...@cs.utah.edu> wrote: > > > > If the problem happens after DrRacket has been running for a while, > > then that's good information and definitely a proble

Re: [racket-users] 6.4 + universe has mouse-based hiccups

2016-04-07 Thread Matthew Flatt
At Thu, 07 Apr 2016 15:05:12 -0400, "'John Clements' via Racket Users" wrote: > > On Apr 7, 2016, at 8:34 AM, Matthew Flatt <mfl...@cs.utah.edu> wrote: > > It looks like it's not a question of running DrRacket for a while, but > > of having multiple tabs in DrRa

Re: [racket-users] Trying to kill process created by process

2016-04-07 Thread Matthew Flatt
When you use `system` or `process`, the immediate new process runs a shell. The shell process then starts another one to run the command that you give it. I recommend using `process*` to avoid the shell process and to avoid encoding issues when passing arguments: (define racket

Re: [racket-users] racket not W^X?

2016-04-05 Thread Matthew Flatt
At Tue, 5 Apr 2016 10:03:59 -0400, George Neuner wrote: > On 4/5/2016 9:50 AM, Matthew Flatt wrote: > > Pro tip for pirates: jump to scheme_eval(). > > Would that be possible if Racket implemented W^X? Yes, as long as an attacker can somehow overwrite a function pointer, W^

Re: [racket-users] Racket change button% coordinates(X and Y axis)

2016-04-11 Thread Matthew Flatt
At Sun, 10 Apr 2016 08:18:50 -0700 (PDT), Theodor Berza wrote: > The purpose of this project is to make a GUI Builder where the user drags > buttons on a frame and the position of the cursor changes in the code the X > and Y axis. I case you haven't found it already, you might want to take a

Re: [racket-users] why `read` vs. `read-syntax`?

2016-04-10 Thread Matthew Flatt
At Sun, 10 Apr 2016 07:49:19 -0700, Matthew Butterick wrote: > 1) When, if ever, is the `read` of a #lang invoked by Racket? That happens if you use `read` on a file that starts `#lang`. In that case, the `read-accept-reader` parameter must be set, as in (parameterize ([read-accept-reader #t])

Re: [racket-users] 6.4 + universe has mouse-based hiccups

2016-04-06 Thread Matthew Flatt
At Wed, 06 Apr 2016 11:56:51 -0400, "John Clements" wrote: > > > On Apr 6, 2016, at 7:35 AM, Matthew Flatt <mfl...@cs.utah.edu> wrote: > > > > I haven't been able to replicate the problem, so far, even though my > > machine and installation is simi

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

2016-04-06 Thread Matthew Flatt
I think `(system-type 'machine)` should use the root security guard when trying to start "/bin/uname". I'll make that change unless someone sees a problem with it. At Wed, 6 Apr 2016 17:08:00 +0200, Sam Tobin-Hochstadt wrote: > If you're getting the error in the status line, but not when you hit

Re: [racket-users] 6.4 + universe has mouse-based hiccups

2016-04-06 Thread Matthew Flatt
I haven't been able to replicate the problem, so far, even though my machine and installation is similar to yours. Do you have a Racket installation on a different machine that you can check? Whatever the problem is, my guess is that it's specific to OS X (but that's just a guess). Does it

Re: [racket-users] mouse selection on a text-field%

2016-04-08 Thread Matthew Flatt
At Fri, 8 Apr 2016 18:50:09 +0200, mazert wrote: > I try to find an easy way to add the general mouse selection system > (double click on a word will select it for example) on a text-field gui > component. In the case of double-click to select a word, you could implement it via the keymap in a

Re: [racket-users] How to manage a Racket package within a Git repo?

2016-03-23 Thread Matthew Flatt
Although it's documented, I can add a note to http://docs.racket-lang.org/pkg/getting-started.html#%28part._github-deploy%29 which currently mentions branches but not subdirectories. Are there other places where you looked that could also use a note? At Wed, 23 Mar 2016 14:16:13 -0400, Jay

Re: [racket-users] How to manage a Racket package within a Git repo?

2016-03-23 Thread Matthew Flatt
Use https://github.com/bennn/foo.git?path=pkg The "path=pkg" part specifies "pkg" within the repo. At Wed, 23 Mar 2016 13:55:06 -0400, Benjamin Greenman wrote: > I have a git repo that contains a Racket package. The repo also contains > other folders related to the package. How do I share

Re: [racket-users] scribble racketresultblock and racketinput

2016-03-07 Thread Matthew Flatt
If you want input and output to be together as an interaction, I recommend using `examples` (from `scribble/example`) with `eval:alts` to provide a result manually. If "the same vertical line" just means "the same style of vertical line", you could use @nested[#:style 'code-inset

Re: [racket-users] scribble racketresultblock and racketinput

2016-03-07 Thread Matthew Flatt
At Mon, 7 Mar 2016 18:55:15 -0700, Matthew Flatt wrote: > (I think the documentation should say that `racketinput` uses the > 'code-inset style, and I'll fix that.) On closer inspection, the missing documentation seems to be that `racketresult` doesn't use the 'code-inset style,

Re: [racket-users] Racket 6.4 very slow

2016-03-02 Thread Matthew Flatt
I see that there's a big difference in the effect of debugging mode for this example in v6.3-v6.4 compared to earlier versions. On my machine: Racket DrRacket with debugging v6.2 ~2500 ms ~3800 ms v6.4 ~2500 ms ~63000 ms In both versions,

Re: [racket-users] Dumb lexical scope question

2016-03-07 Thread Matthew Flatt
At Mon, 7 Mar 2016 03:52:39 -0800 (PST), brendan wrote: > I'm sure I'm missing something obvious here. In the Guide, introducing syntax > objects, it says: > > "Most notably, free-identifier=? determines whether two identifiers refer to > the same binding: > > ... > > (free-identifier=? #'car

Re: [racket-users] Racket 6.4 very slow

2016-03-05 Thread Matthew Flatt
Here's a recap of a few points, now that I've spent some time investigating the issue. Replicating the problem and detecting debugging mode: If you start DrRacket fresh or create a new tab and paste (define (total n) (for/sum ([x (in-range (+ 1 n))]) x)) (time (total 10))

Re: [racket-users] Web server tcp-read: error reading (errno=104), connection reset by peer

2016-03-01 Thread Matthew Flatt
I'm pretty sure this is in the "stuff happens, move on" category. The error happens when a client abandons a connection, for example, and you should expect all sorts of communication interruptions. At Tue, 1 Mar 2016 09:45:03 -0500, Marc Kaufmann wrote: > Hi, > > I am running a live server now,

Re: [racket-users] FFI | Unions

2016-04-04 Thread Matthew Flatt
At Sat, 2 Apr 2016 12:18:45 -0700 (PDT), Pedro Caldeira wrote: > The way you've proposed allocates the union on the heap, is it > possible to declare an union on the stack? No. Racket's evaluation model doesn't include the notion of an allocation stack that is associated with a continuation. You

Re: [racket-users] racket not W^X?

2016-04-04 Thread Matthew Flatt
At Mon, 4 Apr 2016 17:47:15 -0400, George Neuner wrote: > On 4/4/2016 4:57 PM, 'John Clements' via users-redirect wrote: > > FWIW, it appears that the restriction here is much simpler; > > specifically, pages can’t be writable and executable *simultaneously.* > > Moreover, a comment by Matthew

Re: [racket-users] Racket internal error when trying to create an executable

2016-04-01 Thread Matthew Flatt
I've pushed a repair for this problem. For v6.4, I don't have a workaround except to patch "collects/syntax/private/modcollapse-noctc.rkt" by changing line 330 from (normalize-submod `(submod ,(normalize-recur (cadr s)) ,@relto-submod ,@(cddr s)))])] to (normalize-submod `(submod

Re: [racket-users] FFI | Unions

2016-03-31 Thread Matthew Flatt
At Thu, 31 Mar 2016 15:00:35 -0700 (PDT), Pedro Caldeira wrote: > Hello everyone, > > I am trying to use a set of bindings to SDL2 and I am at loss on how to use C > unions. > > If I understood correctly both make-union-type and _union procedures create a > new ctype; but how do you actually

Re: [racket-users] Re: number->string format guarantees

2016-04-25 Thread Matthew Flatt
I agree that the spec for printing inexacts needs to be clarified. The current output format for flonums is consistent with scanf(), at least for non-infinity and non-NaN values, since it's produced by sprintf("%g", ...). Using "%g" means that the number sometimes prints with an "e..." part and

Re: [racket-users] Limiting memory for raco

2016-04-21 Thread Matthew Flatt
At Thu, 21 Apr 2016 08:45:13 -0700, Jordan Johnson wrote: > Is it possible to limit the memory that raco uses for running builds (beyond > whatever reduction I might get by using the -j option to reduce the number of > parallel jobs)? > > If so, how? Mostly, a build with a given sets of

Re: [racket-users] Question about syntax properties and expansion

2016-04-21 Thread Matthew Flatt
At Thu, 21 Apr 2016 11:45:08 -0700 (PDT), Jack Firth wrote: > The documentation for syntax properties states that if a macro sets a syntax > property during expansion then instead of the expanded syntax having only the > set value, it has a cons tree containing that value and any previous values

Re: [racket-users] Compiler question

2016-04-27 Thread Matthew Flatt
The compiler inlines the call to `aux` in `fib2` because that call is readily apparent. It's not so apparent in the other cases that the function `aux` is always called. At Wed, 27 Apr 2016 06:42:03 -0700 (PDT), Jerry Jackson wrote: > Hello all, > > I was experimenting a bit yesterday and

Re: [racket-users] GUI: clipping of controls fails on Linux but not on Windows

2016-05-18 Thread Matthew Flatt
That is indeed in "undefined behavior" territory for the GUI library, because `racket/gui` doesn't pin down what happens when widgets overlap (including panels and buttons). One possible fix is to add the 'hscroll style to the horizontal panel. That change moves the program into "defined

Re: [racket-users] GUI: clipping of controls fails on Linux but not on Windows

2016-05-18 Thread Matthew Flatt
There's not a good way to do this outside the primitives, because it's a matter of selecting the right GTK widgets. I've added 'hide-hscroll and 'hide-vscroll, which are like 'hscroll and 'vscroll (i.e., they allow the panel's size to be smaller than its content) but never show the corresponding

Re: [racket-users] Racket gui choice% enabled #f question

2016-05-18 Thread Matthew Flatt
Are you running on OS X? It's a bug in `choice%`, and I've pushed a repair. Unfortunately, I don't have a good workaround for the current release, other than to ignore and revert changes to the control when it's supposed to be disabled. At Wed, 18 May 2016 11:22:02 -0700, Kevin Forchione wrote:

Re: [racket-users] GUI: clipping of controls fails on Linux but not on Windows

2016-05-19 Thread Matthew Flatt
At Thu, 19 May 2016 14:30:08 +0300, Dmitry Pavlov wrote: > Thank you so much. I am eager to try this new feature. I can not figure > a good way to set it up on my machine. > I have Racket 6.5 release. My first thought was "let me try this new > package system": > > $ sudo raco pkg update gui >

Re: [racket-users] How to write a #%module-begin that inspects a syntax property post expansion?

2016-05-09 Thread Matthew Flatt
At Sun, 8 May 2016 21:40:04 -0700 (PDT), Jack Firth wrote: > I'm writing a series of macros that attach metadata using syntax properties > during expansion, and I'm attempting to write a #lang whose module-begin form > expands the module and then inspects the metadata attached. The problem I'm

Re: [racket-users] Re: Cloud not launch DrRacket

2016-05-13 Thread Matthew Flatt
At Fri, 13 May 2016 07:35:28 -0700 (PDT), James Brown wrote: > I want to build racket myself. Is there a guide for that? Building from source is unlikely to help with the GUI problem, because the build process doesn't depend on the Gtk installation. Instead, Gtk is found and linked at run time.

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

2016-05-03 Thread Matthew Flatt
At Tue, 3 May 2016 12:48:47 -0700, Matthew Butterick wrote: > > Strangely, your Example #4 works the same as example #3, except in > > DrRacket, where it errors. > > It's always nice to share puzzlement ;) The problem is in `expand` and definition contexts. The problem doesn't affect `compile`,

Re: [racket-users] Running racket on a #lang-less module-less file?

2016-05-05 Thread Matthew Flatt
At Thu, 5 May 2016 17:32:20 -0700 (PDT), Jack Firth wrote: > On Thursday, May 5, 2016 at 5:28:06 PM UTC-7, Matthew Flatt wrote: > > At Thu, 5 May 2016 17:14:57 -0700 (PDT), Jack Firth wrote: > > > Suppose I have a file in some custom language, like #lang foo, but it > omits

Re: [racket-users] Running racket on a #lang-less module-less file?

2016-05-05 Thread Matthew Flatt
At Thu, 5 May 2016 17:14:57 -0700 (PDT), Jack Firth wrote: > Suppose I have a file in some custom language, like #lang foo, but it omits > the #lang foo line. Is there a way I can run the racket command line program > in a way where it says "treat this file as if it starts with the line #lang >

Re: [racket-users] Running racket on a #lang-less module-less file?

2016-05-05 Thread Matthew Flatt
libraries that way. At > least for libraries that work within whatever implementation you might have. > > > > > > On Thu, May 5, 2016 at 6:45 PM, Jack Firth <jackhfi...@gmail.com > <mailto:jackhfi...@gmail.com>> wrote: > > On Thursday, May 5, 2016 a

Re: [racket-users] Why no "type checking" for C arrays?

2016-05-10 Thread Matthew Flatt
That's an oversight. I'll push an improvement. Even with the improvement I have now, checking is not as complete as you might like. The check ensures that an array value has (at least) the expected number of elements and that each element's layout (in the sense of `ctype->layout`) is as expected.

<    1   2   3   4   5   6   7   8   9   10   >