Comments (5)
Dragging two simple files (eg files that have only #lang racket/base
at the top) doesn't seem to cause any issues, so it probably has something to do with what's in those two files.
Do you have the memory limit turned on (in the "Racket" menu, the "Limit Memory..." menu item)? If not, it may be that expanded the contents of the files uses an unbounded amount of memory (or maybe just a lot of memory).
from drracket.
Dragging two simple files (eg files that have only
#lang racket/base
at the top) doesn't seem to cause any issues, so it probably has something to do with what's in those two files.Do you have the memory limit turned on (in the "Racket" menu, the "Limit Memory..." menu item)? If not, it may be that expanded the contents of the files uses an unbounded amount of memory (or maybe just a lot of memory).
I have a (Default?) limit of 128mb. Additionally, having the files open by their own (or having them both as tabs but never switching to the other) does not increase the memory usage abnormally - only when tabbing between the two.
Also, everything seems to work as expected when using my Windows pc.
File 1:
#lang eopl
(define the-lexical-spec
'((whitespace (whitespace) skip)
(comment ("%" (arbno (not #\newline))) skip)
(identifier
(letter (arbno (or letter digit "_" "-" "?"))) symbol)
(keyword ("=") string)
(number (digit (arbno digit)) number)))
(define the-grammar
'(
(program (expression) a-program)
(expression (number) lit-exp)
(expression (identifier) var-exp)
(expression (primitive "(" (separated-list expression ",") ")") primapp-exp)
(primitive ("+") add-prim)
(primitive ("-") subtract-prim)
(primitive ("add1") incr-prim)
(primitive ("sub1") decr-prim)
))
; (define-datatype program program?
; (a-program
; (exp expression?)))
;
; (define-datatype expression expression?
; (lit-exp (datum number?))
; (var-exp (id symbol?))
; (primapp-exp (prim primitive?)
; (rands (list-of expression?))))
;
; (define-datatype primitive primitive?
; (add-prim)
; (subtract-prim)
; (mult-prim)
; (incr-prim)
; (decr-prim))
;;;;;;;;;;;;;;;; sllgen boilerplate ;;;;;;;;;;;;;;;;
(sllgen:make-define-datatypes the-lexical-spec the-grammar)
(define show-the-datatypes
(lambda () (sllgen:list-define-datatypes the-lexical-spec the-grammar)))
(define scan&parse
(sllgen:make-string-parser the-lexical-spec the-grammar))
(define just-scan
(sllgen:make-string-scanner the-lexical-spec the-grammar))
(define stmt1 "5")
(define stmt2 "x")
(define stmt3 "+(3,x)")
(define stmt4 "add1(+(4,x))")
File 2:
#lang eopl
(define the-lexical-spec
'((whitespace (whitespace) skip)
(comment ("//" (arbno (not #\newline))) skip)
(identifier ("=") string)
(number (digit (arbno digit)) number)
))
(define the-grammar
'(
(program (statement) a-program)
(statement (number) lit-exp)
(statement (identifier) var-exp)
(statement ("const" name) stmt-name)
;;(statement ("const" name "(" (separated-list name ",") ")" block) stmt-name)
))
; (define-datatype program program?
; (a-program
; (statement statement?)))
;
; (define-datatype statement statement?
; (lit-exp (datum number?))
; (var-exp (id symbol?)))
;
; (define-datatype name name?
; (stmt-name (id string?))
; )
;
;;;;;;;;;;;;;;;; sllgen boilerplate ;;;;;;;;;;;;;;;;
(sllgen:make-define-datatypes the-lexical-spec the-grammar)
(define show-the-datatypes
(lambda () (sllgen:list-define-datatypes the-lexical-spec the-grammar)))
(define scan&parse
(sllgen:make-string-parser the-lexical-spec the-grammar))
(define just-scan
(sllgen:make-string-scanner the-lexical-spec the-grammar))
(define stmt1 "5")
(define stmt2 "=")
;;(define stmt3 "+(3,x)")
;;(define stmt4 "add1(+(4,x))")
from drracket.
I can't reproduce the problem as well.
Observation: in your screenshot, you have a comment box, which is not preserved when copying over as text. Still, even after adding a comment box to the programs manually, I can't reproduce the issue.
from drracket.
It is possible to attach actual files here; that may matter. I'm not on sonoma yet, so it might be an interaction between that and something in one of the GUI libraries.
If it isn't either of those, then starting from the command-line and hitting control-c in the Terminal window while it is very busy may give us some information. Specifically, if you open a Terminal window and do this:
% /Applications/Racket\ v8.9/bin/drracket
and then open the files in DrRacket as usual, and then make it start going crazy and then hit control-c back in the terminal window, if we're lucky you'll get a stacktrace that'll point to the misbehaving code and maybe we'll then be able to figure out what's going on.
from drracket.
It is possible to attach actual files here; that may matter. I'm not on sonoma yet, so it might be an interaction between that and something in one of the GUI libraries.
If it isn't either of those, then starting from the command-line and hitting control-c in the Terminal window while it is very busy may give us some information. Specifically, if you open a Terminal window and do this:
% /Applications/Racket\ v8.9/bin/drracket
and then open the files in DrRacket as usual, and then make it start going crazy and then hit control-c back in the terminal window, if we're lucky you'll get a stacktrace that'll point to the misbehaving code and maybe we'll then be able to figure out what's going on.
I've just realised that it has been ~8-9 weeks of using DrRacket with no issues until now, right after I updated my MacOS version. Also, I tried with two different files and the same interaction occurs.
from drracket.
Related Issues (20)
- Can't press up to move the caret when there's a word wrapping
- Update "DrRacket support for #lang-based Languages" documentation? HOT 2
- Wrong background color for recycling symbol. HOT 5
- Gtk issue on close-tab HOT 4
- `ffi` in drracket won't use new shared library after modification & recompiling HOT 4
- Error when launching DrRacket HOT 9
- The indentation guide covers the #lang line HOT 3
- Theme selection buggy HOT 6
- Unequal preview box width
- Indent guide should not be shown on word wrapped lines
- Automatic Theme Sync in DrRacket HOT 2
- DrRacket window resizing behaviour
- DrRacket Getting Stuck Auto-saving Files HOT 6
- User defined keybindings should take precedence over installed tools HOT 1
- Program becomes laggy when some cores of the CPU is occupied by other programs. HOT 3
- Wrapping expression with bracket with "automatically adjust opening square brackets" HOT 2
- Hard to use preferences->colors->racket HOT 2
- Syntax highlighting is bad. HOT 6
- classify-position: called on a color:text<%> whose colorer is stopped. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drracket.