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

is PrettyDiff still alive? #634

Open
panoply opened this issue Feb 26, 2020 · 8 comments
Open

is PrettyDiff still alive? #634

panoply opened this issue Feb 26, 2020 · 8 comments

Comments

@panoply
Copy link

panoply commented Feb 26, 2020

Project seems a little inactive lately. It would be heartbreaking to see it go away. I'd been keen to revamp the site and make things a little more modern, improve the playground etc. I'm launching PrettyDiff in a LSP implementation later this week and know my way well enough around the code base (sparser too) to make minor adjustments and fixes here and there. This project still to this day is by far the most powerful and flexible formatting tool that exists.

@panoply
Copy link
Author

panoply commented Feb 16, 2021

@prettydiff Bumping this. Really want to keep using PrettyDiff.

@prettydiff
Copy link
Owner

The project is very inactive. I appreciate all the interest and support this project has received over the years.

The biggest evil I see plaguing society now is social media. I am spending all my time attempting to solve that problem by creating a social media concept that is privacy focused, peer-to-peer, and has no central service provider. https://github.com/prettydiff/share-file-systems

Social media is problematic for these reasons:

  • Advertisement funded. In any enterprise bias always favors the source of capital. It has to in order to survive, which ultimately results in enterprise corruption until regulation or competition forces necessary limitations.
  • Broadcast. Current social media is most frequently a broadcast of a few people yelling into a void consumed by many mindless followers. That is not a dialogue or a discussion, which many people find distasteful and contend with the madness out of convenience for the absence of something better. This produces all kinds of immediate second and third order consequences that we all see from market manipulation, political influence, social justice, and all kinds of other topics governed by a few voices.
  • Old technology. Most social media is basically surrendering ownership of text and media to a central database, a web form sending to a walled garden. This is 20-25 year old technology desperately depending upon a few lines of law for survival.

I do not have much experience writing services or communication protocols and so this project is proving challenging and slow, but it is moving forward.

Current status

File System Support

In order to be something different I am starting with socializing the file system, because nobody does this. Interconnecting the file system in a Windows like GUI as a social experience is far more complex than just sending text messages, but this work is now mostly complete.

  • File system sharing and file copy is complete amongst personal devices.
  • File system sharing is complete amongst users.
  • File system cut/copy still needs some work between users in accordance with the project's security model.

Text Messaging

This work is started, but is on hold pending completion of the security model and user file copy.

Test Automation

Something that really slowed the project down is the inability to perform end-to-end test automation starting in the browser for a peer-to-peer application. This work is complete. I have written a sub-application that can test anything across various different computers. https://github.com/prettydiff/share-file-systems/blob/master/documentation/test_browser.md

If you need test automation for your single page application you can gut my test automation and use it in accordance with the project's license. The test automation is DOM based so it can test any web application written in any framework and can execute at multiple locations simultaneously as necessary for the complexity of your business requirements. I never had test automation like this with Pretty Diff as the web tool was primitive. In Pretty Diff I just used test automation to perform algorithm tests on the terminal.

Security Model

The basic idea is that a user must be able to communicate between their various personal devices and that communication should be unrestricted. A user should be able to share amongst other users, but sharing between users is opt-in. Furthermore a user must not have any indication of another user's personal devices.

In order to accomplish those goals I have a security model that comprises three tiers of identifiers. Each identifier type is a SHA3-512 hash:

  • shares
  • devices
  • users

A share is a location of a device that is available for reading by other users. A share is read-only by default but can become full-control with a button click. A share belongs to a device and its hash is partially derived from the corresponding device hash.

A device is a computer whether physical or virtual machine. Devices are owned by users and the device hash is partially devised by the user hash.

A user is a person. A person can own multiple devices, but when a user communicates with other users those other users only see the single user on the shares without any visibility of the devices. User hashes are devised from a combination of various factors including clock time, local machine hardware characteristics, user name, and other things.

This model allows a user to delete a share with a single button click without taking any of their personal devices offline. The model poses challenges about how to route data. Reading from a different user's file system is fairly simple. Connect to the remote user, resolve a share to a device, and respond with the requested content. File copy is an order of magnitude more complex, because in a GUI the file source might be one remote device/user and the destination might be a different remote device/user which means information about the transaction must be routed to up to three locations in real time keeping in mind the underlying complications of file system transactions and the limitations imposed by this security model.

What I am working on at the time of this writing

A given device likely has many IP addresses. It will likely have at least one IPv4 and IPv6 address. If your computer has multiple network interfaces it will have IP addresses per each interface. Your computer may be in multiple separated networks simultaneously, such as public versus private or different nonroutable networks. I have so far made the simple design assumption that a computer should only need to be identified by a single IP address because traffic will only be directed to a single IP address for that computer. This has proven a broken assumption.

Instead I am now identifying a computer by all their IP addresses and when a computer comes online they will perform a network test against all their shared devices and users to determine which of the listed IP addresses per location is the address that will receive traffic from the given device. This is a minor logical change, but requires a substantial refactoring of the code.

Near future

Here is my current plan:

  1. Finish the current effort described above.
  2. Finish the security model to properly support file cut/copy between the various devices of various users.
  3. Finish text messaging.
  4. Stop. Take a break and reflect on the current project. Work out how to communicate something new and scary.
  5. Found a company to provide supporting services: tunneling, DNS (device/user resolution to IP addresses for portability), certificates (HTTPS and digital signatures), and others

I am trying to solve as many of the foundational technical problems as I can before requesting venture capital money so that I can use that money to grow the business instead of burning runway on experimental concepts and massive refactoring.

@panoply
Copy link
Author

panoply commented May 13, 2021

That’s great stuff. Can’t wait to see where you go with it. Is it fair to say PrettyDiff has been abandoned? Again, I would be happy to breath some fresh life into the project. I really love the engineering fleet you accomplished with Sparser. PrettyDiff is certainly one of the most deeply underrated projects getting around. Would hate to see it fade out. While today folk are using Prettier, PrettyDiff still provides that deep formatting style I prefer.

Of course new projects and endeavors shift focus, I truly respect the work you are doing and hope to see it make impact.

@prettydiff
Copy link
Owner

I can transfer ownership of the project to you. I am not sure how to do this and will require guidance.

@prettydiff
Copy link
Owner

You might see an email about become a github successor. Ignore that, I misunderstand what that meant.

@panoply
Copy link
Author

panoply commented May 23, 2021

Most the heavy lifting is done with Sparser but Sparser is operating under Unibeautify organization? I think it's worth noting that Sparser has some challenging complexities at my knowledge scale, it's not a simple codebase and I would not want to take over without being completely fluent with its architecture as I would not be fully capable of providing maintenance.

What I was offering was more so geared towards an overhaul of the aesthetics and presentation of PrettyDiff (Sparser too). This would entail adopting a new approach to the current auto generated consumer facing website/playground and essentially just giving it a modern look and feel, ie: separating markup, script and style rulesets, bring more modularized exports to the npm registry, provide AST Explorer for Sparser etc etc. I believe that with these minor adjustments, this project would quickly become more widely adopted. I say this because PrettyDiff/Sparser offer formatting styles that are (for the most part) exclusively available within this project.

Given that you have moved onto shared-file-system (which is truly groundbreaking stuff) I totally understand your position on the project. If you do wish to revisit PrettyDiff or if anyone else would like to help me keep PrettyDiff/Sparser alive please make yourself known!

I will continue to use the project and thanks for bringing these tools to us all.

@panoply
Copy link
Author

panoply commented Jan 10, 2022

Hello, just an update on this for anyone interested.

I have a hard forked variation of PrettyDiff currently in private but soon to make public. Unfortunately I have stripped out support for most languages, removed diffing/CLI and overall current logic that is outside of formatting/beautification. Essentially the variation I will publish has been architected to operate purely as a formatter for the Liquid template language. While Sparser has a beautiful way of handling various templating languages with its delimiter algorithm for my use cases were it will be deployed I needed to shave the size as much as I could and thus resulting support and defect fixes will be provided for the following:

  • Liquid + HTML
  • Liquid + CSS, SCSS and LESS
  • Liquid + JavaScript and TypeScript
  • Liquid + JSX
  • JSON (No Liquid)

Big thank you to Austin whos work with this project has taught me a lot. At some point (when I have more time) I will be happy to take over the existing project (which supports all languages) as I am familiar with the overall parsing algorithm employed in PrettyDiff and Sparser but in such a case I would likely strip the CLI and move it over to a formatting focused project. Active users or anyone who is does not want to see PrettyDiff head to archive, please be bare with me and in due time I will work towards breathing in new life.

As aforementioned, PrettyDiff was one of the modules that went widely unnoticed in this nexus. After digging into the source and going over each parse and lexical analysis process written by Austin was truly one of the most rewarding experiences I have had working with programming. Any watchers on this repo, please look at wisdom and his current project Shared File Systems.

@prettydiff
Copy link
Owner

Thank you @panoply

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

No branches or pull requests

2 participants