Giter Site home page Giter Site logo

Comments (5)

rfindler avatar rfindler commented on August 17, 2024

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.

CornFarmerNZ avatar CornFarmerNZ commented on August 17, 2024

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.

sorawee avatar sorawee commented on August 17, 2024

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.

rfindler avatar rfindler commented on August 17, 2024

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.

CornFarmerNZ avatar CornFarmerNZ commented on August 17, 2024

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.
Screenshot 2023-10-18 at 5 51 26 PM

from drracket.

Related Issues (20)

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.