Re: [racket-users] test user-interact function dont work

2019-02-17 Thread Joao Pedro Abreu De Souza
Well, there's no imediate return, i need to type exit 0 to finally the test works I am using read-line to read input. Today later I will post more code(of refine-main). Thanks Em dom, 17 de fev de 2019 10:37, Greg Hendershott What does it do? Does `check-equal?` show a failure message? If so,

Re: [racket-users] test user-interact function dont work

2019-02-17 Thread Greg Hendershott
What does it do? Does `check-equal?` show a failure message? If so, what does it say? I don't know what `refine-main` does, but this simple version works for me: #lang racket (require rackunit) (define (refine-main) (display (read-line))) ;echo (check-equal? (with-output-to-string

Re: [racket-users] Running raco setup from within DrRacket?

2019-02-17 Thread Philip McGrath
I've written and use a `find-executable-path*` inspired by Emacs' `exec-path-from-shell` (which I'm pretty sure I learned about from Greg on this list) that gives the same API as `find-executable-path`, but with a special case for Mac OS:

Re: [racket-users] test user-interact function dont work

2019-02-17 Thread Joao Pedro Abreu De Souza
WOW. I finish read the doc about #:final That is so beatiful thing. Thank you to you three Em dom, 17 de fev de 2019 às 22:18, Joao Pedro Abreu De Souza < jp_ab...@id.uff.br> escreveu: > Thanks for the feedback! > I will study this code and make more functional > > Em dom, 17 de fev de 2019

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-17 Thread Will Jukes
I went ahead and added some info on the difference between Racket and Python appends to https://github.com/racket/racket/wiki/Python-to-Racket . Sorry to whoever for the salvo of poorly documented revisions. On Sun, Feb 17, 2019 at 12:21 AM David Van Horn wrote: > I've updated the docs to get

Re: [racket-users] test user-interact function dont work

2019-02-17 Thread Joao Pedro Abreu De Souza
Thanks a lot. Sorry about the simple error. Em dom, 17 de fev de 2019 22:06, Matthias Felleisen > > On Feb 17, 2019, at 6:44 PM, Joao Pedro Abreu De Souza > wrote: > > (check-equal? > (with-output-to-string >(lambda () > (with-input-from-string "input" >(lambda () >

Re: [racket-users] test user-interact function dont work

2019-02-17 Thread Philip McGrath
Well, if you call `(exit 0)`, your Racket program really will exit with code 0 without doing anything else: the function `exit` never returns, so, in your case, `execute` never returns, `refine-main` never returns, and Rackunit never gets a chance to look at any output it may or may not have

Re: [racket-users] test user-interact function dont work

2019-02-17 Thread Joao Pedro Abreu De Souza
(define (refine-main) (display next-string) ;;feito (set! next-command (shell-parser (my-read-line))) ;;TODO my-read-line (execute next-command) ;;TODO execute (refine-main)) ;;feito This is refine-main "shell-parser" is just a PEG-based parser, that return a

Re: [racket-users] test user-interact function dont work

2019-02-17 Thread Matthias Felleisen
> On Feb 17, 2019, at 6:44 PM, Joao Pedro Abreu De Souza > wrote: > > (check-equal? > (with-output-to-string >(lambda () > (with-input-from-string "input" >(lambda () > (refine-main) Your mistake is in the above line. You want to write refine-main not

Re: [racket-users] test user-interact function dont work

2019-02-17 Thread Joao Pedro Abreu De Souza
Thanks for the feedback! I will study this code and make more functional Em dom, 17 de fev de 2019 22:13, Philip McGrath Well, if you call `(exit 0)`, your Racket program really will exit with > code 0 without doing anything else: the function `exit` never returns, so, > in your case, `execute`

[racket-users] Racket 7.2 and racket2nix: when-to-compile logic

2019-02-17 Thread 韋嘉誠
I tried to bump the pinned Racket version in racket2nix from 7.1 to 7.2, and I ran into issues: raco setup: 3 making: /nix open-output-file: cannot open output file path:

[racket-users] Spritely Golem: Secure, p2p distributable content for the fediverse

2019-02-17 Thread Christopher Lemmer Webber
The "fediverse" means the federated (decentralized) social web. And Spritely, as I've said here recently, is a series of demos and writeups which show how to "level up" the fediverse with some new ideas to make it more powerful and resilient. I just finished writing the documentation for Spritely

Re: [racket-users] Re: Autocomplete from a list

2019-02-17 Thread James Platt
On Feb 14, 2019, at 9:22 PM, Alex Harsanyi wrote: > There are two solutions I can think of: > > (1) derive combo-field% and override the on-popup method to construct the > choice menu dynamically based on what is selected in the combo box field. > This has a few disadvantages, namely (a) you