boppreh / structured-editor

Structured editor for general purpose programming languages
9 stars 1 forks source link

Nothing is displayed #2

Closed Kochise closed 3 years ago

Kochise commented 3 years ago

capture_20210910_085030_001

dkoch@DebianGen7:~$ uname -a
Linux DebianGen7 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) x86_64 GNU/Linux

dkoch@DebianGen7:~$ whereis python3
python3: /usr/bin/python3.7-config /usr/bin/python3.7 /usr/bin/python3.7m-config /usr/bin/python3.7m /usr/bin/python3 /usr/lib/python3.7 /usr/lib/python3 /etc/python3.7 /etc/python3 /usr/local/lib/python3.7 /usr/include/python3.7 /usr/include/python3.7m /usr/share/python3 /usr/share/man/man1/python3.1.gz

dkoch@DebianGen7:~$ python3 --version
Python 3.7.3

dkoch@DebianGen7:~$ python3 -m pip freeze
aiohttp==3.7.3
aiohttp-cors==0.7.0
alabaster==0.7.8
appdirs==1.4.4
asgiref==3.3.1
asn1crypto==0.24.0
astroid==2.1.0
async-generator==1.10
async-timeout==3.0.1
atom==0.6.0
attrs==20.3.0
Babel==2.6.0
backports.cached-property==1.0.1
backports.shutil-get-terminal-size==1.0.0
beautifulsoup4==4.7.1
bleach==3.1.2
brew==0.1.3
Brlapi==0.6.7
bytecode==0.12.0
cachelib==0.3.0
certifi==2020.12.5
cffi==1.14.6
chardet==3.0.4
click==8.0.1
clingo==5.5.0.post3
cloudpickle==0.8.0
colorlog==4.6.2
construct==2.10.67
cryptography==2.6.1
cssselect==1.1.0
cycler==0.10.0
decorator==4.3.0
defusedxml==0.5.0
Deprecated==1.2.12
distro==1.3.0
distro-info==0.21
docker==4.4.0
docopt==0.6.2
docopt-subcommands==4.0.0
docutils==0.14
enaml==0.13.0
enamlx==0.4.6
entrypoints==0.3
feedparser==5.2.1
howdoi==2.0.18
html5lib==1.0.1
idna==2.10
imagesize==1.0.0
importlib-metadata==3.4.0
influxdb==5.3.1
iniconfig==1.1.1
ipykernel==4.9.0
ipython==5.8.0
ipython_genutils==0.2.0
ipywidgets==6.0.0
isort==4.3.4
jedi==0.13.2
Jinja2==2.10
jsonschema==2.6.0
jupyter-client==5.2.3
jupyter-console==5.2.0
jupyter-core==4.4.0
keep==2.10.1
keyring==17.1.1
kiwisolver==1.3.1
lazy-object-proxy==1.3.1
line-profiler==2.1
logging-gelf==0.0.26
logging-ldp==0.0.6
logilab-common==1.4.2
louis==3.8.0
lxml==4.3.2
Markdown==3.0.1
MarkupSafe==1.1.0
marshmallow==3.10.0
matplotlib==3.3.3
mccabe==0.6.1
memory-profiler==0.52.0
mistune==0.8.4
msgpack==1.0.2
multidict==5.0.2
musicbrainzngs==0.6
mutagen==1.40.0
nbconvert==5.4.0
nbformat==4.4.0
notebook==5.7.8
numpy==1.19.5
numpydoc==0.7.0
olefile==0.46
outcome==1.1.0
packaging==20.8
pandocfilters==1.4.2
parso==0.3.1
pexpect==4.6.0
pickleshare==0.7.5
Pillow==8.1.0
pipenv==2020.11.15
pluggy==0.13.1
ply==3.11
prometheus-client==0.6.0
prompt-toolkit==1.0.15
psutil==5.5.1
Pweave==0.25
py==1.10.0
pycairo==1.16.2
pycodestyle==2.4.0
pycparser==2.20
pycurl==7.43.0.2
pyflakes==2.0.0
PyGithub==1.55
Pygments==2.3.1
PyGObject==3.30.4
pyinotify==0.9.6
PyJWT==2.1.0
pylint==2.2.2
PyNaCl==1.4.0
pyparsing==2.4.7
pyquery==1.4.3
pytest==6.2.1
python-apt==1.8.4.3
python-dateutil==2.8.1
python-gitlab==2.5.0
pytz==2020.4
pyxdg==0.25
PyYAML==5.3.1
pyzmq==17.1.2
QtAwesome==0.4.4
qtconsole==4.3.1
QtPy==1.3.1
quodlibet==4.2.1
reportlab==3.5.13
reprint==0.5.2
requests==2.25.0
robertson==25303
roman==2.0.0
rope==0.10.5
SecretStorage==2.3.1
Send2Trash==1.5.0
SeproDo==26924
sh==1.14.2
simplegeneric==0.8.1
six==1.15.0
sniffio==1.2.0
sortedcontainers==2.3.0
soupsieve==1.8
Sphinx==1.8.4
spyder==3.3.3
spyder-kernels==0.2.4
spyder-line-profiler==0.1.1
spyder-memory-profiler==0.1.2
spyder-reports==0.1.1
spyder-unittest==0.3.0
terminado==0.8.1
terminaltables==3.1.0
testpath==0.4.2
toml==0.10.2
tornado==5.1.1
traitlets==4.3.2
trio==0.18.0
typing-extensions==3.7.4.3
unattended-upgrades==0.1
urllib3==1.26.2
virtualenv==15.1.0
virtualenv-clone==0.5.4
wcwidth==0.1.7
webencodings==0.5.1
websocket-client==0.57.0
websockets==8.1
widgetsnbextension==2.0.0
wrapt==1.10.11
yarl==1.6.3
zipp==3.4.0
boppreh commented 3 years ago

The last commit is not stable and was made in a hurry when moving computers. I suggest rolling back a few commits.

Sorry for that, I did not expect anyone to use it after so many years.

Unfortunately this project made heavy use of a WebView component in Qt which is not available anymore. There's an Electron-like replacement in newer versions, but last I checked it did not send signals when clicking on links, which made it unusable for this use case.

I want to put this project to work again, but might take some time.

Kochise commented 3 years ago

No problem, I'm writing my own code editor and was interested into your idea. What are you using that is very specific to your rendering ? I advice you to use another UI framework instead. Something like Enaml should do IMHO.

https://github.com/nucleic/enaml https://github.com/frmdstryr/enamlx

Regards.

boppreh commented 3 years ago

Currently it's using a lot of advanced Qt features, like the tear-able toolbars.

The WebView component was used because the Abstract Syntax Tree is converted to HTML, and the user can configure custom CSS files to change colors, fonts, and even add or hide elements (https://github.com/boppreh/structured-editor/blob/4a8bd3fb70855f336191eac4c174fa46e4677d86/config/style.css).

This kind of customization would be extremely hard without CSS, but almost all GUI toolkits are moving away from simple HTML + CSS renderers to embedding full copies of Chromium, which is much heavier and has limited hooks to intercept user actions (like the links mentioned).

Kochise commented 3 years ago

Then go full Node.JS or React, yet the main problem remains the incredibly heavy footprint. I kindly prefer a lightweight framework that doesn't depends on too many dependencies (that might break easily, ie. Qt5, ...). Yes, you may be limited in the hooking mechanism and not be free to do whatever you like. But at this point, if you really need a way to express your creativity, go full berserk with SVG on Canvas.

https://www.bastian.tech/tree/ https://github.com/jagenjo/litegraph.js https://github.com/lutzroeder/netron https://github.com/capnmidnight/Primrose https://github.com/BrandonArmand/Binari ...

Good luck.

boppreh commented 3 years ago

Those are really nice examples, thanks.

I too prefer a lightweight framework. Qt is not the lightest, and has many dependencies, but it's definitely better than Electron, and miles ahead of browser+NodeJS.

I wish I didn't have to sacrifice performance for extensible rendering (CSS).