[racket-users] DrRacket indentation in the interaction window
Hello! Is it possible to change the way, how DrRacket auto-indents new lines in the interaction window? I can control indents in the definition window by setting drracket:indentation. Is there something like that for the interaction window? -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/4415cb68-233e-4056-a6ad-2a64c851a48dn%40googlegroups.com.
[racket-users] DrRacket & current-compile
Hello! Is it possilble to redefine current-compile inside DrRacket? I want to wrap compiler call for my #lang, but don't know how. I tried racketrc.rktl, but it works only in console Racket. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/f264c15a-5e2a-45d2-884e-babbf8ea2acbn%40googlegroups.com.
[racket-users] Re: Help in understanding 'letrec' example
We are finding a file (or directory) with name "tarzan" inside all directories inside given path upto given depth. Recursion is needed here, because tarzan-near-top-of-tree? calls tarzan-in-directory? and tarzan-in-directory? calls tarzan-near-top-of-tree? for each file in given directory. суббота, 8 мая 2021 г. в 12:50:09 UTC+5, Utkarsh Singh: > Hi, > > First of all I would like to thank Racket community for creating and > maintaining top quality documentation at https://docs.racket-lang.org/ > and even providing a local copy for it. > > Currently I am having some difficulties in understanding this letrec > example from Racket Guide docs > ( > https://docs.racket-lang.org/guide/let.html#%28part._.Recursive_.Binding__letrec%29 > ): > > (letrec ([tarzan-near-top-of-tree? > (lambda (name path depth) > (or (equal? name "tarzan") > (and (directory-exists? path) > (tarzan-in-directory? path depth] > [tarzan-in-directory? > (lambda (dir depth) > (cond > [(zero? depth) #f] > [else > (ormap > (λ (elem) > (tarzan-near-top-of-tree? (path-element->string elem) > (build-path dir elem) > (- depth 1))) > (directory-list dir))]))]) > (tarzan-near-top-of-tree? "tmp" > (find-system-path 'temp-dir) > 4)) > > Problem: > I having some problem on how recursion is working here and what is the > problem we are solving here. Are we finding a file with (name? > "tarzan") or something else? > > -- > Utkarsh Singh > http://utkarshsingh.xyz > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/a3d31da0-c9b7-4aac-a541-15137197d941n%40googlegroups.com.
[racket-users] How to require untrusted module?
I've read about protect-out and current-code-inspector, but I still cannot understand, how to require a module and forbid it to run protected modules. Something like (require untrusted-foo) (foo-proc) but to forbid foo-proc to use ffi/unsafe. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/5f10a124-6aeb-4389-8421-92034e93f8a7n%40googlegroups.com.
Re: [racket-users] How to require untrusted module?
Thank you! Is it possible to safely load untrusted module with dynamic-require? пятница, 22 октября 2021 г. в 22:59:57 UTC+5, Robby Findler: > On Fri, Oct 22, 2021 at 12:43 PM Matthew Flatt wrote: > >> At Thu, 21 Oct 2021 07:37:12 -0700 (PDT), "kalime...@gmail.com" wrote: >> > I've read about protect-out and current-code-inspector, but I still >> cannot >> > understand, how to require a module and forbid it to run protected >> modules. >> > >> > Something like (require untrusted-foo) (foo-proc) but to forbid >> foo-proc to >> > use ffi/unsafe. >> >> If you use >> >> (current-code-inspector (make-inspector)) >> (require untrusted-foo) >> >> > Just in case: I think Matthew as thinking of two subsequent REPL > interactions (or calls to eval or suchlike). If you put those two together > into a file in #lang racket, say, you won't be protected against > untrusted-foo. > > Robby > > >> and assuming that `untrusted-foo` hasn't been loaded earlier, then >> `untrusted-foo` will not be able to use protected binding. >> >> That sequence will also disable the use of protected bindings by >> anything that `untrusted-foo` depends on and that hasn't already been >> loaded. So, if you want those dependencies to be able to use untrusted >> things, you need to load the before `(current-code-inspector >> (make-inspector))`. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Racket Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to racket-users...@googlegroups.com. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/racket-users/20211022114302.3e4%40sirmail.smtps.cs.utah.edu >> . >> > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/004de0e0-b25f-4bae-be79-9bdd561a1e18n%40googlegroups.com.
[racket-users] syntax-case, require, file
Why (define-syntax (require-file stx) (syntax-case stx () [(_ x) #'(require (file x))])) doesn't work (it compiles, but doesn't import identifiers)? (define-syntax (require-file* stx) (syntax-case stx () [(_ x) #`(require #,(datum->syntax #'x (list #'file #'x)))])) works fine. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/f249a370-41ae-4364-adb3-99392cb73758n%40googlegroups.com.
[racket-users] Re: A language and REPL for SRFI 105 "curly infix"
https://pkgs.racket-lang.org/package/sweet-exp It implements curly infix along with other syntax enhancements. Your example works with it (#lang sweet-exp racket) as is. пятница, 31 декабря 2021 г. в 15:42:36 UTC+5, damien...@gmail.com: > Hi, > > i adapted a #lang and REPL for SRFI 105: > > https://github.com/damien-mattei/library-FunctProg/blob/master/racket/SRFI-105.rkt > a simple example can be found here: > > https://github.com/damien-mattei/library-FunctProg/blob/master/racket/examples-curly-infix.rkt > The two files must be in the same directory. > any files using curly infix notation must begin with: > #lang reader "SRFI-105.rkt" > > example at REPL: > Welcome to DrRacket, version 8.2 [cs]. > Language: reader "SRFI-105.rkt", with debugging; memory limit: 128 MB. > > (define a 2) > > (define b -3) > > (define c 5) > > {{b expt 2} - {4 * a * c}} -31 > > Any advice about other enhancements or other way to implement a REPL or > language for SRFI 105 "curly infix" with Racket are welcome. > > Regards, > > Damien > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/6ccb876e-4aa2-4933-b17c-a006277d83b3n%40googlegroups.com.