Yes, it's a browser
This is an experimental browser to explore the challenges posed by browsers and what they should be constituted of.
Anyone is invited to contribute and add their own improvement. We can make it go towards + infintiy and it's just the start so you can do a lot of significant contributions.
sudo apt install build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5 libftgl-dev libxi-dev libftgl-dev libxi-dev freeglut3-devcurl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
I have acquired the libftgl if you want to make any font stuff. We can also make it go towards + infinity.
We have to read the specification and implement it properly.
It's not that hard to understand and not that hard to do in my opinion.
For example, the basic properties of CSS are actually very few: https://www.w3.org/TR/CSS2/propidx.html#q24.0
Directions: Generalization and Optimization
Priority: implement some Javascript while the functionalities are small (if it's bigger it will be hard)
=> all the core components of the browser have to be implemented first. Then we'll generalize and optimize progressively all at the same time.
- Replace
postRedisplaywith a more cheap update method- Improve update performance
- Think about how to implement interactivity
- Add the ability to specify own font
- Improve FTGL and Haskell's wrapper of FTGL by making it more efficient and better architectured
- Check this issue that explains the defects
- Fix the fact that you can't modify height of fonts and get its line height directly
- How about getting that info without creating the whole font
- Minimize the creation of fonts and layouts
- Make the display dependent on the window size (make it fast though !)
- Fix the namespacing in the file (no points !)
- Create a default CSS (instead of the unique default style)
- Improve the data structures
- Think about the incorporation of JS
- Tags might be needed for JS manipulation
- Deal with input and buttons (at some point)
- Make sure there is always a value for all properties
- Remove as many
Maybes as possible - Deal with inheritable values and non-inheritable
- Remove as many
- Improve text box height calculation
- We have ftgl so modify it in order to do that
- Leaf => ShallowEmptyNode ?
- margin padding width height min-width min-height elementwise
- how are they actually specified ?
- Add flex and grid
- Add relative units
- Add position and floats
- Improve the map from Selectors to ElementStyle
- Add all selectors
- Create a giga function of type :: css file -> html file -> display tree
- Use better parsing methods
- Don't waste already parsed elements
- Add error messages
- Is there an AST evaluation framework
- Implement dependent parsing (i.e. parsing based on previous values)
- I'm using Monads here (there must be better)
- Add more properties
- Deal with inheritance
- Add all tags
- Tags with numbers (h1, h2...)
- Add attributes
- Deal with ids
- Deal with classes
- Deal with head and body
- Implement forgiveness (not correct don't imply exception)
- Implement the whole spec
- Implement selectors
- Add all properties
- Create default style sheet
- Implement data structure incorporating priority of selector
- i.e. data structure has to be order lexicographically based on (spec priority, precedence)
- Implement forgiveness (not correct don't imply exception)
- Create value parsers and combine them
- Create a map (property -> value types) and build parsers from that
- Last semi colon is OK
- Improve perf
- Deal with units
- Is using a global variable OK ?
- How about tabs ? Why not some context pattern ?
- Is global variable for scroll state ok ?
- why not context pattern ?
- What should the scroll speed ?
- Let's accept tablet ?
- An Haskell mobile app ?
How to implement Javascript ? Let's discuss !