Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discuss: C++-specific REPL support #27

Open
bbarker opened this issue Apr 4, 2019 · 3 comments
Open

Discuss: C++-specific REPL support #27

bbarker opened this issue Apr 4, 2019 · 3 comments
Labels
C++ Applies to the C++11 target question

Comments

@bbarker
Copy link
Contributor

bbarker commented Apr 4, 2019

My understanding is that by "No C++-specific REPL", it means there's no way to try out purescript-native in a REPL. I'll admit I haven't even used the Purescript REPL for node.js yet, but haven't had a need to as yet. However, I do have an interested in a native REPL.

What needs to be done in order to have a purescript-native REPL running, if anything? Is the existing node.js REPL a good place to start?

Thanks,

@andyarvanitis
Copy link
Owner

I haven't (yet?) tried any approach to a C++ REPL for purescript-native. In the past, for an unrelated project, I experimented with a couple ways to do a C/C++/ObjC REPL based on clang/llvm. I believe I also tried cling at some point. Googling "C++ repl" just now, it looks like a couple options are out there that might be a basis for doing this – it certainly seems feasible.

As for whether the existing js repl is a good place to start, I'd say yes, but maybe more for user experience than implementation help.

If you do give it a shot, I'd be happy to help debug or provide guidance where I can.

@freylax
Copy link

freylax commented Jan 8, 2020

I added support for a native backend to the purs repl.
The idea is to build an executable for each eval, this is essentialy
the same was is done for node js.
The modified purs is here https://github.com/freylax/purescript
and the demonstration can be found here https://github.com/freylax/purescript-native-repl
When shared objects are used one can inspect an running application with the repl,
see #47 .

@andyarvanitis
Copy link
Owner

Neat! I'll try to have a look at it sometime soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ Applies to the C++11 target question
Projects
None yet
Development

No branches or pull requests

3 participants