1
0
Fork
You've already forked racket
0

a few #lang rackjure errors within geiser, due to custom #%app? #5

Open
opened 2014年03月17日 19:15:54 +01:00 by jaor · 6 comments
jaor commented 2014年03月17日 19:15:54 +01:00 (Migrated from gitlab.com)
Copy link

Created by: viperscape

I don't know how to explain this properly and may miss the mark, but when running a racket file with #lang rackjure I notice some things do not work and throw an error, as if the rackjure language import never happened. I spoke to @greghendershott and he explained it has something to do with the custom #%app and geiser and suggested I post an issue here. Running the same things directly at prompt in drracket seem fine.

Example:

#lang rackjure
{'k1 "value"}

should return

'((k1 . "value"))

but instead I receive an error both at prompt in geiser and if I evaluate the expression then geiser dbg prints an error.

{'k1 "value"}
Error: struct:exn:fail:contract
application: not a procedure;
 expected a procedure that can be applied to arguments
 given: 'k1
 arguments...:
 "value"
Welcome to Racket v6.0.
racket@> {'k1 "value"}
application: not a procedure;
 expected a procedure that can be applied to arguments
 given: 'k1
 arguments...:
 "value"
 errortrace...:
 stdin::43: ((quote k1) "value")
 context...:
 /home/chris/racket/collects/racket/private/misc.rkt:87:7
racket@> 
*Created by: viperscape* I don't know how to explain this properly and may miss the mark, but when running a racket file with #lang rackjure I notice some things do not work and throw an error, as if the rackjure language import never happened. I spoke to @greghendershott and he explained it has something to do with the custom #%app and geiser and suggested I post an issue here. Running the same things directly at prompt in drracket seem fine. Example: ``` #lang rackjure {'k1 "value"} ``` should return ``` '((k1 . "value")) ``` but instead I receive an error both at prompt in geiser and if I evaluate the expression then geiser dbg prints an error. ``` {'k1 "value"} Error: struct:exn:fail:contract application: not a procedure; expected a procedure that can be applied to arguments given: 'k1 arguments...: "value" ``` ``` Welcome to Racket v6.0. racket@> {'k1 "value"} application: not a procedure; expected a procedure that can be applied to arguments given: 'k1 arguments...: "value" errortrace...: stdin::43: ((quote k1) "value") context...: /home/chris/racket/collects/racket/private/misc.rkt:87:7 racket@> ```
jaor commented 2014年03月17日 19:16:43 +01:00 (Migrated from gitlab.com)
Copy link

Created by: viperscape

I should note that (str "hello") does work in geiser with rackjure, so it is partially working.

*Created by: viperscape* I should note that (str "hello") does work in geiser with rackjure, so it is partially working.
jaor commented 2014年03月17日 19:53:59 +01:00 (Migrated from gitlab.com)
Copy link

Created by: greghendershott

#lang rackjure author here.

My Geiser is rusty but:

  1. I get the same error using geiser-eval-buffer.
  2. However in * Racket REPL * it works fine with ,enter "/path/file.rkt".

The #lang rackjure feature in question is implemented with a custom #%app. So it seems that geiser-eval isn't making use of that, whereas Racket's enter! does do so.

Is this inherent to geiser-eval, or, is there something I could change on my end?

p.s. If you wanted to repo, it's raco pkg install rackjure, then a source file like in the original report:

#lang rackjure
{1 2 3 4}
*Created by: greghendershott* `#lang rackjure` author here. My Geiser is rusty but: 1. I get the same error using `geiser-eval-buffer`. 2. However in `* Racket REPL *` it works fine with `,enter "/path/file.rkt"`. The `#lang rackjure` feature in question is implemented with a custom `#%app`. So it seems that geiser-eval isn't making use of that, whereas Racket's `enter!` does do so. Is this inherent to geiser-eval, or, is there something I could change on my end? p.s. If you wanted to repo, it's `raco pkg install rackjure`, then a source file like in the original report: ``` racket #lang rackjure {1 2 3 4} ```
jaor commented 2014年03月17日 20:11:25 +01:00 (Migrated from gitlab.com)
Copy link

I need to take a closer look. Geiser's ,enter is not Racket's
enter, but an implementation of my own that is also more or less used
in geiser-eval. However, i had to tweak things to (try to) support
typed racket, and that seems to have broken custom #%apps. As a
matter of fact, typed racket's #%app is also giving me grief, although
i managed to correctly use its #%top-level. Greg, are you also
defining your own top level?

I guess if i manage to solve the issue with rackjure, TR will work fine
too :)

I need to take a closer look. Geiser's `,enter` is _not_ Racket's `enter`, but an implementation of my own that is also more or less used in `geiser-eval`. However, i had to tweak things to (try to) support typed racket, and that seems to have broken custom `#%app`s. As a matter of fact, typed racket's `#%app` is also giving me grief, although i managed to correctly use its `#%top-level`. Greg, are you also defining your own top level? I guess if i manage to solve the issue with rackjure, TR will work fine too :)
jaor commented 2014年03月17日 20:21:47 +01:00 (Migrated from gitlab.com)
Copy link

Created by: greghendershott

Greg, are you also defining your own top level?

No, just #%app (to support { ... } for dictionaries and also applicable dictionaries). Code.

Note: For me, your ,enter "file.rkt" does work fine. The file evaluates just fine. At that point I can even do {1 2 3 4} in your * Racket REPL * and it will print '((1 . 2)(3 . 4)).

For me, it's geiser-eval-buffer that doesn't utilize the custom #%app.

I guess if i manage to solve the issue with rackjure, TR will work fine too :)

I think what I'm doing is waaay simpler than Typed Racket. In which case it might be the other way around, that if TR works fine then rackjure will, too. :) But yes there's probably some overlap.

Anyway, please let me know if there's anything I should change, or some way I could help.

*Created by: greghendershott* > Greg, are you also defining your own top level? No, just `#%app` (to support `{ ... }` for dictionaries and also applicable dictionaries). [Code](https://github.com/greghendershott/rackjure/blob/master/rackjure/app.rkt). Note: For me, _your_ `,enter "file.rkt"` _does_ work fine. The file evaluates just fine. At that point I can even do `{1 2 3 4}` in your `* Racket REPL *` and it will print `'((1 . 2)(3 . 4))`. For me, it's `geiser-eval-buffer` that doesn't utilize the custom `#%app`. > I guess if i manage to solve the issue with rackjure, TR will work fine too :) I think what I'm doing is waaay simpler than Typed Racket. In which case it might be the other way around, that if TR works fine then rackjure will, too. :) But yes there's probably some overlap. Anyway, please let me know if there's anything I should change, or some way I could help.
jaor commented 2020年07月20日 07:00:57 +02:00 (Migrated from gitlab.com)
Copy link

changed the description

changed the description
jaor commented 2020年07月20日 07:00:57 +02:00 (Migrated from gitlab.com)
Copy link

moved from jaor/geiser#34

moved from jaor/geiser#34
Sign in to join this conversation.
No Branch/Tag specified
master
0.16
0.14
0.11.2
0.11.1
0.11
0.9
0.10
0.8.1
0.8
0.7
0.6
0.5
0.4
0.3
0.2.2
0.2.1
0.2
0.1.4
0.1.3
0.1.2
0.1.1
0.1
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geiser/racket#5
Reference in a new issue
geiser/racket
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?