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

Non-Windows Support #4

Open
sgoguen opened this issue Feb 4, 2018 · 13 comments
Open

Non-Windows Support #4

sgoguen opened this issue Feb 4, 2018 · 13 comments

Comments

@sgoguen
Copy link
Contributor

sgoguen commented Feb 4, 2018

Hi Gusty!

It's been a while. Work has been crazy, but I managed to spend a little time prototyping some non Windows support. First, here's the WIP branch: https://github.com/steego/FsPad/tree/sockets

Here's an overview:

  1. I substituted out the windows form for the user's default browser. I use a simple Suave server with some web-sockets to push HTML up to the browser and render it as-is.
  2. I was having trouble with TypeShape working on .NET Core, so I created file that converts objects to the PrettyPrint type.

It's late, so I'll try to follow up tomorrow with some more notes.

@gusty
Copy link
Owner

gusty commented Feb 4, 2018

Hi !
That's an interesting feature. I would say it will be a must have very soon in all projects.
What were the problems with TypeShape, can you open an issue there? I can also ask the author directly.
Anyway I'm not for or against using TypeShape.
Currently my main frustration with this project is my poor knowledge of css and html design in general.
Unfortunately because of that, at work I still use the prototype with linqpad.

@sgoguen
Copy link
Contributor Author

sgoguen commented Feb 8, 2018

I hear what you're saying: I too was preferring the LINQPad prototype until now.

I'll work my way around to the TypeShape issues soon. Currently, I've been focusing on providing minimal non-Windows support so I can play with it on my Mac.

So, I've done a cursory update to the project so it supports multiple printers. I too like the LINQPad dumper, so I added a way to print raw HTML as-is. In the README.md of my fork, I have an example
that uses the LINQPad dumper.

https://github.com/steego/FsPad

What I like about using the browser is a few things:

  1. It stays open when I reset my interactive environment and auto-reconnects to the server when it comes back up. There's no need to reposition windows every time.
  2. I can have multiple windows open and send different objects to different URLs. Try out the FsWeb.Web.DumpToPath instance method.

There's still a lot of work to be done and some nasty code I'm not proud of, but I'm enjoying use this.

I'd love to hear your ideas and suggestions.

@gusty
Copy link
Owner

gusty commented Feb 9, 2018

Cool, you added lot of stuff.
I used to dump to a specific file sometimes as it's useful for debugging purposes.
Why do you need Suave?
I see you are adding a lot of infrastructure to this project. But we need to get the html right.
I'm advertising it at work in order to get someone who have good html/css skills interested, then we'll get rid of linqpad.
I'm hoping to get more collaboration in the coming days.

@sgoguen
Copy link
Contributor Author

sgoguen commented Feb 9, 2018

As far as I know, Suave is the only web server I've got running that works on both .NET Core and .NET Framework. I'm not hung up on it, I just already had some Suave websocket code that did this and wanted to have a working web server based prototype quickly.

Ideally, I'd prefer to do something that's just raw OWIN. Hell, I've been thinking about doing a more cross platform version of this simple push server that can accommodate most languages.

What are you thoughts? Are you learning toward a native GUI with an embedded browser? One direction I was considering was using a cross platform library like Eto.

https://github.com/picoe/Eto

@sgoguen
Copy link
Contributor Author

sgoguen commented Feb 9, 2018

I've actually written a socket server that does something similar with TypeScript, but I imagine that would turn off a number of F# guys. You know how much they love using NodeJS. :)

@gusty
Copy link
Owner

gusty commented Feb 10, 2018

I'm fine with Suave, just curious.
I like the idea of using it in a mac as well, but I'm not familiar with the options we have for the GUI there.
I can say I would prefer whichever is easier to get running to the users, an html browser should work just fine as Linqpad already demonstrated.

@gusty
Copy link
Owner

gusty commented Feb 24, 2018

Hi @sgoguen just wanted to let you know that with a colleague at work we were working in improving the pretty printer.
We will contribute back to the project repository soon.

@sgoguen
Copy link
Contributor Author

sgoguen commented Feb 27, 2018

@gusty Good to hear! I've been under the weather the past few days and tremendously busy with work, but I look forward to playing with this soon.

@gusty
Copy link
Owner

gusty commented Mar 13, 2018

Welcome @scrwtp to the open source FsPad project !
Feel free to share your thoughts about this issue here.

@sgoguen
Copy link
Contributor Author

sgoguen commented Mar 14, 2018

Welcome @scrwtp!

I can't wait to get back to this project and collaborate with you guys. Unfortunately, I have some very aggressive deadlines for the end of the month and I've literally been working all my evenings and weekends for it. Hopefully, I'll be able to play in April.

@scrwtp
Copy link
Collaborator

scrwtp commented Mar 19, 2018

Hi @sgoguen - cool, take your time.

I've been talking to Gus about Suave at some point as well, and I'm very much interested in exploring that. Not only it would make it easy to use FsPad on other platforms (or integrate into other tools), but also it would let us handle cyclic/deeply nested/lazily evaluated structures in a uniform way.

So let me know if you need help/advice/whatever in that area.

@sgoguen
Copy link
Contributor Author

sgoguen commented Mar 19, 2018

@scrwtp Absolutely! I have a fork of the project I've been using that uses Suave over here: (https://github.com/steego/FsPad). I'd love to see your spin on it and get your thoughts.

After looking at your FsHtml DSL, I'm inclined to add it tonight at my side-project meetup. I really like the clean approach and clever placeholder/attribute operators. They're very good examples of operators that actually make sense when you first see them.

@scrwtp
Copy link
Collaborator

scrwtp commented Mar 19, 2018

Thanks - though check the other comment, FsHtml is not mine ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants