Giter Site home page Giter Site logo

drracket's Introduction

drracket

This is the source for the Racket packages: "drracket", "drracket-plugin-lib", "drracket-test", "drracket-tool", "drracket-tool-doc", "drracket-tool-lib", "drracket-tool-test".

Contributing

Contribute to Racket by submitting a pull request, reporting an issue, joining the development mailing list, or visiting the IRC or Slack channels.

License

Racket, including these packages, is free software, see LICENSE for more details.

By making a contribution, you are agreeing that your contribution is licensed under the Apache 2.0 license and the MIT license.

drracket's People

Contributors

alshopov avatar carl-eastlund avatar clklein avatar dfeltey avatar elibarzilay avatar florence avatar ghcooper avatar gmarceau avatar greghendershott avatar jackfirth avatar jbclements avatar jeapostrophe avatar jspiro avatar kazzmir avatar leafac avatar lexi-lambda avatar metaxal avatar mfelleisen avatar mflatt avatar mikesperber avatar psteckler avatar rfindler avatar rmculpepper avatar samth avatar shhyou avatar sorawee avatar spdegabrielle avatar sstrickl avatar stamourv avatar takikawa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

drracket's Issues

Canvas window cannot be closed with keyboard on OS X

I am reading through HtDP/2e and find it annoying that pressing Cmd+W or Esc can't close the canvas windows that appears while using the animate from 2htdp/universe. Cmd+Q, of course, tries to close the whole DrRacket IDE. The only way it seems is to use the mouse pointer to press the red close button.

Create executable via DrRacket menu doesn't work with main module

Consider the following program:

#lang racket

(module* main #f
  (display "hello, world"))

When I create a standalone exe via "raco exe foo.rkt" the program behaves as expected. However, if I use DrRacket to create the executable via "Racket | Create Executable ..." and choose Type=Standalone and Base=Racket, I get no output when running the executable.

I'm on Mac OSX 10.10.4.

The problem seems to be with handling the main module. If I simply have (display "hello, world") by itself, it works fine.

feature request: each tab preserves size / location of interactions window

In each DrRacket tab, you can hide / show the definitions & interactions panes, and these settings are preserved for each tab.

However, for any tab where both definitions and interactions are visible, the size and position of the panes are the same.

It would be great to make these settings independent per tab, so you could e.g., have a small horizontal interactions pane in one tab, and a large vertical one in another.

Full screen DrRacket popups persist (OS X)

If you full screen DrRacket in OS X (mine is El Capitan version 10.11.2) and open a DrRacket pop-up window (like the package manager, or the "Open Require Path" menu), when you close it your focus will return to DrRacket, but there will still be a workspace labeled "DrRacket" where the popup workspace was, except it is all black:
screen shot 2015-12-30 at 12 32 41 pm

These (almost amusingly) build up in your workspaces list over time if your frequently using something like "Open Require Path".

You can manually close this workspace by clicking the little 'minimize' icon [--><--] that appears at the top left of the workspace... so there is a workaround.

Disabling keybindings for overwrite mode

Scenario:

  • overwrite mode is active in the editor
  • overwrite keybindings is disabled in preferences

No the editor is stuck in overwrite mode.

Suggestion: Disabling the keybindings should also turn off overwrite mode in the editor.

DrRacket internal error with Blueboxes

append: contract violation
  expected: list?
  given: #f
  context...:
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/share/pkgs/drracket/drracket/private/syncheck/blueboxes-gui.rkt:444:4: compute-tag+rng method in ...ck/blueboxes-gui.rkt:173:2
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/share/pkgs/gui-lib/framework/private/coroutine.rkt:47:20
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/share/pkgs/gui-lib/framework/private/coroutine.rkt:56:0: coroutine-run
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/collects/racket/contract/private/arrow-val-first.rkt:265:18
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/share/pkgs/drracket/drracket/private/syncheck/blueboxes-gui.rkt:410:4: update-the-strs method in ...ck/blueboxes-gui.rkt:173:2
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/share/pkgs/gui-lib/framework/private/logging-timer.rkt:41:0: log-timeline/proc
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/share/pkgs/gui-lib/mred/private/wx/common/timer.rkt:34:38
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:454:6
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:505:32
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:653:3

Right click errors

When I right click on an identifier in the following file:

#lang racket
(define x 5)
;; (define y 12)

I get this error message:

loop: arity mismatch;
 the expected number of arguments does not match the given number
  expected: 2
  given: 1
  arguments...:
   38
  context...:
   /Users/leif/racket/racket/share/pkgs/drracket/drracket/private/get-defs.rkt:79:4: loop
   /Users/leif/racket/racket/share/pkgs/drracket/drracket/private/get-defs.rkt:36:0: get-definitions
   /Users/leif/racket/racket/share/pkgs/drracket/drracket/private/unit.rkt:1010:5
   /Users/leif/rsrc/gui-doc/gui-lib/framework/private/keymap-global.rkt:51:10: mouse-popup-menu
   /Users/leif/rsrc/gui-doc/gui-lib/mred/private/wxme/keymap.rkt:736:2: core502
   /Users/leif/rsrc/gui-doc/gui-lib/mred/private/wxme/keymap.rkt:648:6: step2
   /Users/leif/rsrc/gui-doc/gui-lib/mred/private/wxme/keymap.rkt:648:6: step2
   /Users/leif/rsrc/gui-doc/gui-lib/mred/private/wxme/keymap.rkt:623:4: for-loop
   /Users/leif/rsrc/gui-doc/gui-lib/mred/private/wxme/keymap.rkt:584:2: handle-mouse-event method in keymap%
   /Users/leif/rsrc/gui-doc/gui-lib/mred/private/wxme/editor.rkt:205:2: on-local-event method in editor%
   /Users/leif/rsrc/gui-doc/gui-lib/mred/private/wxme/editor-canvas.rkt:401:2: on-event method in editor-canvas%
   /Users/leif/racket/racket/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization
   /Users/leif/racket/racket/collects/racket/private/more-scheme.rkt:265:2: call-with-exception-handler
   /Users/leif/rsrc/gui-doc/gui-lib/mred/private/wx/cocoa/window.rkt:800:4: dispatch-on-event method in window%
   /Users/leif/rsrc/gui-doc/gui-lib/mred/private/wx/common/queue.rkt:454:6
   /Users/leif/rsrc/gui-doc/gui-lib/mred/private/wx/common/queue.rkt:505:32
   ...

When I delete the commented line, the error goes away. I'm not entirely sure why this is.

Debugger in ASL doesn't (always) show PITCH

This program, in the language-dialog version of ASL, shows too many frames when you repeatedly click "step" in the debugger (the calls to "f" stack up in the "stack" pane of the debugger):

(define (f x) (if (zero? x) x (f x)))
(f 1)

This program, in contrast:

(define (f x) (f x))
(f 1)

does not have that problem.

Alt-o on US keyboard with US keyboard layout

Alt-o does not insert ø in DrRacket.

In preferences these options are enabled:

  • enable keybindings in menus
  • treat alt key as meta

There are no keybindings for either alt-o nor meta-o that could interfere.

Same problem is present for alt-p which should produce π.
Other alt combinations such as alt-a for å work fine.

Blue Boxes persist between language changes

To Reproduce:

Write file:

#lang racket
(require racket)

Place cursor over require.

Observe that the blue box for require is present.

Change language to ASL.

The blue box for require is present.

Modify program to:

(require racket)

(+ 1 2)

and run program. The blue box for require is still present.

Expected Behavior:

The blue box disappears either after the language changes or after the program is rerun.

DrRacket should not parse whole file when just a comment is being written

Currently, when a block comment is being written, with every keystroke the whole source seems to be parsed - the editor flickers. This is not needed when a comment is being written and serves as a barrier to writing long comments in a program. It would be nice if the source parsing could be made more context aware, so it does not do a lot of heavy lifting when a comment is being edited - possibly just parsing to check if the end of block comment characters have been typed. Thanks!

Improper indentation of (let ([define-foo \n 'test]) …) with #lang scribble/lp2

In the following program, the expression bound to define-foo is improperly indented

#lang scribble/lp2

@chunk[<*>
       (let ([define-foo
 'test])
         define-foo)]

Using #lang racket, the expression is indented as expected:

#lang racket

(let ([define-foo
        'test])
  define-foo)

This happens only with identifiers that match the "keywords that look like Define" regexp (or list), from the preferences. The actual code I have is binding define-foo with splicing-syntax-parameterize, which explains the otherwise weird name.

I am using today's 6.4.0.8 build (20160226-15f47ef).

Extend Lambda like keywords regex to include all forms of with-

At the moment, the lambda like keyword section of the indentation preferences has a list of several with- statements.

However, I often see DSLs that use new with- forms. And while racket-mode in emacs indents these correctly, DrRacket doesn't until someone adds it to the Extra Regexp form.

Would it make sense to change the default extra regexp form to be:

^(for\*?(/|d$)|with-)

?

Thank you.

The example in hyper.rkt does not work

I found the example in hyper.rkt does not work.

To be more specific, the canvas does not load:

dr-racket-hyper-rkt-example

The following is the code of the example:

#lang racket
(require racket/gui browser framework)

(define f%
  (frame:status-line-mixin 
   frame:basic%))

(define f (new f%
               (label "My Frame")
               (width 400)
               (height 300)))
(define browser (new hyper-panel% 
                     (info-line? #f)
                     (parent (send f get-area-container))))
(send f show #t)

(send (send browser get-canvas)
      goto-url
      ;; The starting URL:
      "http://www.htdp.org/";
      ;; #f means not a relative URL:
      #f)

It seems that goto-url only works if the top-level-window is a hyper-frame%. (See
line 697 of hyper.rkt.)

I am still learning how to use this library, so I am not sure if this should be fixed or is by design. I am willing to help if there are anything I could do.

Thanks! 😄

Latex unicode table should be public somewhere

After discussing how there is no good way to enter unicode, I made a handy little Racket program to enter unicode in any window. But in addition to the long official descriptions of unicode characters, I wanted to use DrRacket's table of Latex-stolen names. So I copied drracket/browser/private/entity-names.rkt into my project (providing the table itself instead of just the access function). But I would really love to just require it from a public place, either in the drracket package itself or in another package they can both depend on.

Context lost when saving new files.

This is probably a minor annoyance, but when saving a new file, DrRacket should probably use the directory of the last open file to save the file, rather than current-directory. (And only use current-directory if it's the only file open.

The reason I say this is because I've now found several times that I am starting a project where I want to create several files, and it's very annoying to constantly navigate to my project directory when saving a new file.

Another option would be to make current-directory be the directory of the last open file, but I don't like that because then it becomes harder to trust where the current-directory is.

missing macro stepper, debug buttons

The row of buttons at the top is missing Debug, Check Syntax, and Macro stepper (though it still has Run and Stop). I'm using Racket version 6.5 on Arch Linux.

Steps to reproduce:

echo -e '#lang racket/base\n"hello"' > foo.rkt
drracket foo.rkt

and the buttons are missing. Then:

rm ~/.racket/racket-prefs.rktd
drracket foo.rkt

and the buttons are usually back. Then:

drracket foo.rkt

and the buttons are gone again (seemingly because racket-prefs.rktd is back).

#lang s-exp <image-literal> leads to an internal error

Type the following into a DrRacket buffer:

#lang s-exp <image-literal>

where <image-literal> is an actual image. This produces an internal DrRacket error like this:

read-char: non-character in an unsupported context
  port: #<input-port>
  context...:
   /home/asumu/plt/racket-git/racket/share/pkgs/syntax-color-lib/syntax-color/module-lexer.rkt:67:21: for-loop
   /home/asumu/plt/racket-git/racket/share/pkgs/syntax-color-lib/syntax-color/module-lexer.rkt:30:0: module-lexer
   /home/asumu/plt/racket-git/racket/share/pkgs/gui-lib/framework/private/racket.rkt:1348:26
   /home/asumu/plt/racket-git/racket/share/pkgs/gui-lib/framework/private/color.rkt:350:4: continue-re-tokenize method in ...rk/private/color.rkt:84:2
   /home/asumu/plt/racket-git/racket/share/pkgs/gui-lib/framework/private/color.rkt:551:4: colorer-driver method in ...rk/private/color.rkt:84:2
   /home/asumu/plt/racket-git/racket/share/pkgs/gui-lib/framework/private/color.rkt:574:4: colorer-callback method in ...rk/private/color.rkt:84:2
   /home/asumu/plt/racket-git/racket/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:454:6

This is of course a pretty silly use case, but doing the same with at-exp results in a normal error rather than an internal error.

DrRacket contour menu both slow, and locks up gui.

If I'm editing a large file in DrRacket (say 2,000-3,000 lines), and I scroll up or down in the countor menu, it moves up and down extremely slowly. Worse still though, while it's moving, it locks up the GUI so that I cannot scroll up or down myself until it stops. (Which will be long after I stopped scrolling.)

text/font should be able to draw outlined (stroked) text

Proposal: text/font should support a 9th argument (boolean), that causes the text to be rendered as white with a colored stroke. I considered overloading the "style" argument, but that seems like an uglier kludge. This change has been implemented (unofficially) in WeScheme (demo at http://192.wescheme.appspot.com/openEditor?publicId=fzUP5QlHU0).

Purpose: obviously, the most important use-case is for kids to make meme images. The second most important one is for adults to do so.

font-picking logic in DrRacket is strange

When you pick a font family in the DrRacket preferences box, it seems that DrRacket chooses as its default style the first style in the family that designates its weight as 400 or more. The problem is that not every monospaced family has a 400 weight. For instance, my Triplicate family starts at 300. Source Code Pro is another. When you select one of these families, DrRacket skips over the base style (because it has a weight less than 400) and defaults to the bold style instead (which reliably has a weight greater than 400).

screen shot 2015-09-04 at sep 04 10 09 09 am

screen shot 2015-09-04 at sep 04 10 09 23 am

The only exception to this behavior is if the font does not have a 400+ weight installed, in which case DrRacket will use the light style. Here, I’ve disabled the bold styles in Source Code Pro, and now it selects the light style:

screen shot 2015-09-04 at sep 04 10 19 12 am

I think the second case should be the preferred behavior: that DrRacket should use as its default the lightest weight available of the font family, not the first one that has weight 400+.

(Another approach would be to add a “default weight” popup picker underneath “Font Name” in the preferences dialog, but that’s an extra moving part.)

Notebook interface for DrRacket

Coming from the IPython Notebook I really miss the user interface for interacting with and exploring this awesome language. I think a notebook GUI is much more productive and engaging than the current editor + REPL interface of DrRacket. Specially when considering the drawing and plotting capabilities of Racket, Maxima interaction, etc.

I do not know how difficult it would be to implement it, but I would appreaciate any pointers and hope that other users feel attracted to the idea.

another DrRacket Internal Error

I get DrRacket Internal Error boxes like this every once it a while:

interval-map-cons*!: bad interval: start 14255 not less than end 14255
  context...:
   /Applications/Racket/2015-08-15/Racket v6.2.900.10/share/pkgs/data-lib/data/interval-map.rkt:66:0: interval-map-cons*!
   /Applications/Racket/2015-08-15/Racket v6.2.900.10/share/pkgs/drracket/drracket/private/syncheck/gui.rkt:855:12: syncheck:add-arrow/name-dup/pxpy method in ...ate/syncheck/gui.rkt:365:10
   /Applications/Racket/2015-08-15/Racket v6.2.900.10/share/pkgs/drracket/drracket/private/syncheck/gui.rkt:1922:10: loop
   /Applications/Racket/2015-08-15/Racket v6.2.900.10/share/pkgs/gui-lib/framework/private/logging-timer.rkt:41:0: log-timeline/proc
   /Applications/Racket/2015-08-15/Racket v6.2.900.10/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:454:6
   /Applications/Racket/2015-08-15/Racket v6.2.900.10/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:505:32
   /Applications/Racket/2015-08-15/Racket v6.2.900.10/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:653:3

Crash when switching from split definitions-only tab to non-split interactions-only tab

Racket version:
6.4.0.8

Steps to reproduce:

  1. Start DrRacket, and open two tabs (Ctrl+T)
  2. Hide interactions in the first tab (Ctrl+E)
  3. Split the first tab (Ctrl+M)
    Screenshot of first tab
  4. Switch to the second tab (Ctrl+PageDown)
  5. Hide the (not split) definitions in the second tab (Ctrl+D)
    Screenshot of second tab
  6. Switch to first tab (Ctrl+PageUp)
  7. Switch back to second tab (Ctrl+PageDown)

Step 7 causes DrRacket to crash with the following message:

collapse: internal error.2
  context...:
   /nix/store/kkxy912zqmz950vc4kdgsq39rfvgpz29-racket-6.4.0.8/share/racket/pkgs/drracket/drracket/private/unit.rkt:2672:6: handle-collapse method in ...ket/private/unit.rkt:1413:4
   /nix/store/kkxy912zqmz950vc4kdgsq39rfvgpz29-racket-6.4.0.8/share/racket/pkgs/drracket/drracket/private/unit.rkt:3198:17: loop
   /nix/store/kkxy912zqmz950vc4kdgsq39rfvgpz29-racket-6.4.0.8/share/racket/pkgs/drracket/drracket/private/unit.rkt:3190:6: restore-visible-tab-regions method in ...ket/private/unit.rkt:1413:4
   /nix/store/kkxy912zqmz950vc4kdgsq39rfvgpz29-racket-6.4.0.8/share/racket/pkgs/drracket/drracket/private/unit.rkt:3023:6: change-to-tab method in ...ket/private/unit.rkt:1413:4
   /nix/store/kkxy912zqmz950vc4kdgsq39rfvgpz29-racket-6.4.0.8/share/racket/pkgs/gui-lib/mred/private/wxme/keymap.rkt:736:2: core502
   /nix/store/kkxy912zqmz950vc4kdgsq39rfvgpz29-racket-6.4.0.8/share/racket/pkgs/gui-lib/mred/private/wxme/keymap.rkt:508:2: chain-handle-key-event method in keymap%
   /nix/store/kkxy912zqmz950vc4kdgsq39rfvgpz29-racket-6.4.0.8/share/racket/pkgs/gui-lib/mred/private/wxme/keymap.rkt:496:4: for-loop
   /nix/store/kkxy912zqmz950vc4kdgsq39rfvgpz29-racket-6.4.0.8/share/racket/pkgs/gui-lib/mred/private/wxme/keymap.rkt:508:2: chain-handle-key-event method in keymap%
   /nix/store/kkxy912zqmz950vc4kdgsq39rfvgpz29-racket-6.4.0.8/share/racket/pkgs/gui-lib/mred/private/wxme/keymap.rkt:459:2: handle-key-event method in keymap%
   /nix/store/kkxy912zqmz950vc4kdgsq39rfvgpz29-racket-6.4.0.8/share/racket/pkgs/gui-lib/mred/private/wxme/editor.rkt:214:2: on-local-char method in editor%
   /nix/store/kkxy912zqmz950vc4kdgsq39rfvgpz29-racket-6.4.0.8/share/racket/pkgs/gui-lib/mred/private/wxme/editor-canvas.rkt:462:2: on-char method in editor-canvas%
   /nix/store/kkxy912zqmz950vc4kdgsq39rfvgpz29-racket-6.4.0.8/share/racket/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization
   /nix/store/kkxy912zqmz950vc4kdgsq39rfvgpz29-racket-6.4.0.8/share/racket/collects/racket/private/more-scheme.rkt:265:2: call-with-exception-handler
   /nix/store/kkxy912zqmz950vc4kdgsq39rfvgpz29-racket-6.4.0.8/share/racket/pkgs/gui-lib/mred/private/wx/gtk/window.rkt:745:4: dispatch-on-char method in window%
   /nix/store/kkxy912zqmz950vc4kdgsq39rfvgpz29-racket-6.4.0.8/share/racket/pkgs/gui-lib/mred/private/wx/common/queue.rkt:454:6
   /nix/store/kkxy912zqmz950vc4kdgsq39rfvgpz29-racket-6.4.0.8/share/racket/pkgs/gui-lib/mred/private/wx/common/queue.rkt:505:32
   ...

Creation of compiled/drracket directory in a read-only system directory

What version of Racket are you using?

6.4.0.15 (20160330-bcacb34)

What program did you run?

#lang typed/racket

The error also occurs with

#lang datalog

And with:

#lang racket/base
(module m racket/base
  (require typed/racket))

#lang racket and #lang racket/base work fine.

What should have happened?

When pressing F5, the interactions window should appear, with the REPL for that language.

If you got an error message, please include it here.

Instead the following error is printed:

../../nix/store/1d9nd30pxir2hiskzvdzihwb77gmwkvm-racket-6.4.0.15/share/racket/collects/compiler/cm.rkt:358:0: make-directory: cannot make directory
  path: /nix/store/1d9nd30pxir2hiskzvdzihwb77gmwkvm-racket-6.4.0.15/share/racket/pkgs/typed-racket-lib/typed-racket/compiled/drracket
  system error: Read-only file system; errno=30

Does the same program work in the command-line racket tool?

The typed/racket REPL works fine using the command-line tool:

racket -I typed/racket
Welcome to Racket v6.4.0.15.
> (+ 1 1)
- : Integer [more precisely: Positive-Index]
2
> 

Syntax highlighting like in The Racket Guide

I am new to Racket and have been learning following The Racket Guide and coding in DrRacket (latest version in Linux). I find it frustrating that DrRacket does not color differently built-in functions and user-defined functions, neither built-in keywords like empty or eof.

I would really like to have the kind of syntax highlighting that is used in the Racket Guide. I checked Color Schemes in the docs, but did not find any pointers to extend the syntax highlighting powers of DrRacket.

@-Expressions should indent like regular S-expressions.

At the moment, the indentation for @-Expressions in Racket is very unusual, and I would expect them to automatically indent similar to S-Expressions.

For example, if I have text on the same line, I would expect it to automatically indent like this:

@emph{Here is
      some text}

Or, if I don't put text on the first line, it should probably indent by some fixed number of spaces, such as:

@emph{
  Here is
  some text}

(For reference, it currently seems to put it at the end of the { like so:

@emph{
      Here is
      some text}

Which has the negative side effect of making the code go significantly more to the right than it needs to, and doesn't match how regular S-expressions indent, which is:

(emph
  "Here is"
  "some text")

)

I'm a little less clear on what a good idea is if the argument uses arguments in [] brackets, but I would expect the {} parts to follow the same rule. So I could do something like this:

@myfunc[#:arg1 val1
        #:arg2 val2]{
  Here is
  Some text}

How hard would it be to make DrRacket do this?

Crash in DrRacket 6.5 on Windows

I don't have a fully reliable repro for this bug, but it seems to occur more often when I use a two-fingered swipe gesture to try to scroll the interactions pane. I'm using DrRacket 6.5, x64, on Win7x64. In any case, something happens and I get a console window pop up that says:

 send: no such method
   method name: is-floating?
   class name: wx-editor-canvas%

The console window is not closable, DrRacket is unresponsive (can't save, can't change focus, etc.), and my laptop fan kicks in (so I think it's going into some infinite loop). The only solution is to forcibly close the main DrRacket window and ask Windows to force-quit the program.

Since I've managed to trigger this a few times in the past few minutes (again, it seems to be while I'm trying to scroll the interactions pane), is there any debug-logging I could enable to get you a more informative report?

Printing a syntax-snip with a cycle hangs DrRacket

It could be that this bug is not in DrRacket, but I couldn't get it to happen otherwise.

This program will hang DrRacket:

#lang racket
(struct m ([x #:mutable]))
(define v (m 0))
(define stx (datum->syntax #'here v))
(set-m-x! v stx)
stx

However, if you do

(require mrlib/syntax-browser)
(render-syntax/window stx)

the window pops up appropriately.

If you do (render-syntax/snip stx) in DrRacket, it hangs again. If you do that in the gracket repl, it doesn't hang (probably because that doesn't print snips interestingly).

DrRacket Internal Error with blue boxes

I required srfi/1, typed append-reverse, and now I'm getting this, and also every time I try to close the DrRacket Internal Error window, another one pops up.

cdr: contract violation
  expected: pair?
  given: '()
  context...:
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/share/pkgs/drracket/drracket/private/syncheck/blueboxes-gui.rkt:928:0: get-blue-box-size
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/share/pkgs/drracket/drracket/private/syncheck/blueboxes-gui.rkt:318:4: get-box-upper-right-and-lock-coordinates method in ...ck/blueboxes-gui.rkt:173:2
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/share/pkgs/drracket/drracket/private/syncheck/blueboxes-gui.rkt:546:4: in-blue-box? method in ...ck/blueboxes-gui.rkt:173:2
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/share/pkgs/drracket/drracket/private/syncheck/blueboxes-gui.rkt:353:4: adjust-cursor method in ...ck/blueboxes-gui.rkt:173:2
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/share/pkgs/gui-lib/mred/private/wxme/editor-canvas.rkt:394:2: on-event method in editor-canvas%
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/collects/racket/private/more-scheme.rkt:147:2: call-with-break-parameterization
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/collects/racket/private/more-scheme.rkt:264:2: call-with-exception-handler
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/share/pkgs/gui-lib/mred/private/wx/cocoa/window.rkt:800:4: dispatch-on-event method in window%
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:454:6
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:505:32
   /Applications/Racket/2015-06-08/Racket v6.2.0.4/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:653:3

Racket -> Enable Tests should be hidden when not in teaching languages.

When using DrRacket in the mode where it uses #lang to determine the language, the menu option Racket -> Enable/Disable Tests shows up. When it is set to have tests disabled, they still seem to run. Including:

  • The test submodule still runs
  • Rackunit tests still run
  • test-engine/racket-tests still run.

This is very confusing as this button doesn't seem to do anything.

There is a button to disable the test submodule in the Language preferences menu, which does seem to work as expected.

It seems to me that we should either remove the button when not using a teaching language, or set it to enable/disable the test submodule.

Line highlting broken on line wrap.

If I have a file with a line that line wraps to multiple files, DrRacket has trouble drawing the arrow that indicates the active line numbers. You end up seeing things like the attached image.

(I am sorry about all of the issues I've reported recently without solutions...)

screen shot 2016-02-18 at 6 04 57 pm

Crash with message SIGSEGV MAPERR si_code 1 fault on addr 0x4

That's the 2th time and possibly more that drracket v6.2.900.10 crashes today with the message SIGSEGV MAPERR si_code 1 fault on addr 0x4 or a very similar one.

On my system, cat /proc/sys/kernel/core_pattern says |/usr/share/apport/apport %p %s %c %P, so the previous core dump(s) probably was discarded by apport. I have overriden it to /tmp in order to get one if drracket crashes again.

Should I enable any other debug options to be able to write a meaningful bug report?

Unicode Acents in DrRacket

In DrRacket (in Windows) this program prints "eé" instead of "ée".
(The acent is in the wrong e.)

#lang racket
"e\u0301e"

Otherwise this HTML shows: ée

<html>
  <head><title></title></head>
  <body>e&#x301;e</body>
</html>

Cycling through tabs moves in the wrong order if tabs are reordered

The changes in racket/gui@9ef883a allow tabs to be reordered on OS X, which is nice! However, it breaks the behavior of the “Next Tab” and “Previous Tab” menu item/hotkeys, which cycle through tabs in the order they were created instead of the current order after moving them around.

I’m not sure if this is an issue with racket/gui, DrRacket, or even framework, but I’m reporting it here since it’s how I ran into the bug, and I don’t see any obvious interface to cycle through tabs programmatically to test it myself.

Text for syntax objects do not increase in size.

When I do C-+ and C-- My text size increases and decreases as I would expect. However, the text associated with syntax objects does not increase or decrease as well. This leads to oddly sized syntax objects. (That I have to use my screen magnifier to see.)

screen shot 2016-01-28 at 4 35 19 pm

"Language" display in interactions window shouldn't show comments

Example, press "Run" on a file like this:

;#lang typed/racket/no-check

#;
(define-type Bank%
  (Class
    (init-field (path Path-String))
))

#lang racket

The interactions window will show something like this:

Language: typed/racket/no-check #; (define-type Bank%   (Class     (init-field (path Path-String)) )) #lang racket; memory limit: 256 MB.

lighter alternative to drracket:indentation?

I know how to use 'drracket:indentation to use a custom indenter in a #lang. But all I’m doing with my custom indenter is handling a few custom keywords, and otherwise relying on the default indenter.

But this amounts to indenting in two passes. Is it possible to accomplish this in a more lightweight manner — specifically, by appending new keywords to DrRacket’s existing classes of keywords?

screen shot 2016-06-03 at 1 54 56 pm

Syntax colorer errors when switching modes

Steps to reproduce:

  • Open DrRacket
  • Enter a buffer with just () (no #lang)
  • Switch the editing mode to "Scheme mode"

That produces the following error on my machine:

skip-whitespace: called on a color:text<%> whose colorer is stopped.
  context...:
   /home/asumu/plt/racket-git/extra-pkgs/gui/gui-lib/framework/private/color.rkt:961:4: skip-whitespace method in ...rk/private/color.rkt:84:2
   /home/asumu/plt/racket-git/extra-pkgs/gui/gui-lib/framework/private/color.rkt:808:12: seq-loop
   /home/asumu/plt/racket-git/extra-pkgs/gui/gui-lib/framework/private/color.rkt:797:4: highlight-nested-region method in ...rk/private/color.rkt:84:2
   /home/asumu/plt/racket-git/extra-pkgs/gui/gui-lib/framework/private/color.rkt:757:6: core706
   /home/asumu/plt/racket-git/extra-pkgs/gui/gui-lib/framework/private/color.rkt:1187:4: after-edit-sequence method in ...rk/private/color.rkt:84:2
   /home/asumu/plt/racket-git/extra-pkgs/gui/gui-lib/mred/private/wxme/text.rkt:763:2: end-edit-sequence method in text%
   ...t/private/kw.rkt:707:9
   set-surrogate method in ...racket/surrogate.rkt:158:14
   /home/asumu/plt/racket-git/extra-pkgs/drracket/drracket/drracket/private/module-language.rkt:2682:6: set-current-mode method in .../module-language.rkt:2667:4
   /home/asumu/plt/racket-git/extra-pkgs/gui/gui-lib/mred/private/mrmenu.rkt:250:14: command method in basic-selectable-menu-item%
   /home/asumu/plt/racket-git/racket/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization
   /home/asumu/plt/racket-git/racket/collects/racket/private/more-scheme.rkt:265:2: call-with-exception-handler
   /home/asumu/plt/racket-git/extra-pkgs/gui/gui-lib/mred/private/wx/common/queue.rkt:454:6
   /home/asumu/plt/racket-git/extra-pkgs/gui/gui-lib/mred/private/wx/common/queue.rkt:505:32
   /home/asumu/plt/racket-git/extra-pkgs/gui/gui-lib/mred/private/wx/common/queue.rkt:653:3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.