1847 posts
Location
/home/dannysmc95
Posted 10 February 2016 - 05:48 PM
I have an idea for a web browser, now I know we have a few already made, like Firewolf and Quest, but I want to make one as a team project, and see what we can make of it. The idea is we shall have a markup language, a styling language, a scripting language, (basically jQuery) and a preprocessing language (php). I want to make the pages very powerful, and make it so we can make single page applications, just as you would with the normal HTML, CSS and jQuery.
If you would like to help, please PM me on here, and I shall add you to the current repository, the idea is we shall have the basic markup language and use a nice parser I have for it, then work on the other parts, the Preprocessor engine will be a PHP interpreted language. So this is my idea for each part:
Markup Language:
This will be like basic html with the usual html tags, but I have a parser that should fix all of that for us, and we can make additions to add new bits. I then hope to make a basic language that is simple, not too different but still a change from HTML. I want to be able to support most new image formats, and even see if it is possible to embed videos in it (It's a long shot, but who knows).
Styling Language:
This will be the css of the language, but maybe use a different type of styling… This is up for discussion.
Scripting Language:
This will be like a jQuery type language which will need a custom parser for it, and I have to admit new languages and parsers are not my thing so the help would be very appreciated.
Preprocessor Language:
This will basically be a class, with includes modules, allowing you to use flat file based storage instead of databases, which then store data in your drive. The idea is that you can send a request and the PHP will parse the bits of code and output the result using the provided modules.
I have already setup the system to do so, and have already worked on setting up a DNS and setup a user account type system allowing you to register / login, upload, download files, and then every user gets a unique key, that they can use in the browser to view their pages (like IPs) and then you can contact a domain name server and request a name, you get one name per user, but I plan to allow users to request more names.
Now I have all these ideas, but I would love to get a team involved to work on something big and really make this better, so we can make it work on turtles, computers and even pocket computers.
Anyway please PM me if you want to help out.
Thanks,
Danny
1426 posts
Location
Does anyone put something serious here?
Posted 10 February 2016 - 06:14 PM
Looks an interesting project, though I'm not sure I can commit to helping at all.
Scripting Language:
This will be like a jQuery type language which will need a custom parser for it, and I have to admit new languages and parsers are not my thing so the help would be very appreciated.
Don't make a new language. Just use Lua and allow a very flexible API. All you really need are some sort of XPath/CSS selectors and the ability to iterate over every element magically.
-- Basic event handling. Iterates through each element
-- Add an event handler to all buttons
query("input[type=submit]"):onClick(function(self, event) print("A button was clicked"))
-- Metatable magic to allow setting values on multiple elements
-- Set all paragraphs to red
query("p").color = colors.red
-- And some basic mapping/selection
-- Remove all span elements starting with "foo"
query("span"):filter(function(x) x.text:sub(1, 3) == "foo"):remove()
If you're going to add anything, add some sort of Lambda syntax as I can imagine this being quite function heavy.
Edited on 10 February 2016 - 05:14 PM
1847 posts
Location
/home/dannysmc95
Posted 10 February 2016 - 06:46 PM
- snip -
Thank you, well I can add you to the repo so you can keep an eye on progress?
What is lambda? (Excuse my ignorance)
Hmmm I like the idea of that actually, the plan is the parser will parse it into objects that of course have attributes, so yeah I guess, using Lua would mean it would be easier to manipulate the objects… I shall look into it, thank you!
1426 posts
Location
Does anyone put something serious here?
Posted 10 February 2016 - 07:18 PM
What is lambda? (Excuse my ignorance)
A lambda is just a function (often with an implicit return value). They are just a shorthand for a whole function.
-- Lua
local y = function(x) return x.name == "Hello" end
// C#/Javascript
y = x => x.name == "Hello"
# Python
y = lambda x: x.name == "Hello"
As you can see the lambda form is shorter than the normal function. The are a pain to parse though.
Edited on 10 February 2016 - 06:20 PM
2679 posts
Location
You will never find me, muhahahahahaha
Posted 10 February 2016 - 07:47 PM
Can you add me? I agree with what SquidDev said. Just Lua. If we aim too high, were never gonna acheive anything.
3057 posts
Location
United States of America
Posted 10 February 2016 - 08:14 PM
I won't be able to contribute a ton, but if you need any sort of metatable help, feel free to ask. Metatables are my favorite thing to play with :P/>.
1426 posts
Location
Does anyone put something serious here?
Posted 10 February 2016 - 08:33 PM
If you are going for the server side of things it might be worth considering a templating language such as
Mustache (a
Lua implementation exists) or
etlua. However I'd recommend starting with a simple rednet/HTTP server and then transitioning to dynamic sites later: it isn't a priority.
2679 posts
Location
You will never find me, muhahahahahaha
Posted 10 February 2016 - 08:33 PM
I won't be able to contribute a ton, but if you need any sort of metatable help, feel free to ask. Metatables are my favorite thing to play with :P/>.
I don't disapprove of metatables, but they are slow af.
463 posts
Location
Germany
Posted 10 February 2016 - 09:18 PM
I don't disapprove of metatables, but they are slow af.
Sometimes you need them.
1426 posts
Location
Does anyone put something serious here?
Posted 10 February 2016 - 10:03 PM
I don't disapprove of metatables, but they are slow af.
Sometimes you need them.
Operator overloading is a great example.
I don't think that the code I used above would be much slower than using a manual loop, though I'd have to profile it to see.
Edited on 10 February 2016 - 09:03 PM
1847 posts
Location
/home/dannysmc95
Posted 10 February 2016 - 10:38 PM
Can you add me? I agree with what SquidDev said. Just Lua. If we aim too high, were never gonna acheive anything.
I can do of course, just PM me what you want to help with :D/>
If you are going for the server side of things it might be worth considering a templating language such as
Mustache (a
Lua implementation exists) or
etlua. However I'd recommend starting with a simple rednet/HTTP server and then transitioning to dynamic sites later: it isn't a priority.
It will be done via http, as I don't wish to use rednet servers for the pure fact of chunk loading, and I want it to be like a client that you can just quickly install via pastebin and run, without hassle of setting up anything else. Plus http is a lot easier, as I already have done most of the work for it.
I won't be able to contribute a ton, but if you need any sort of metatable help, feel free to ask. Metatables are my favorite thing to play with :P/>.
Thank you for the offer and I do accept :P/> So we shall call on you when we are stuck! :D/>
@All
Thank you for your support, It seems a lot of good developers seem to want to help and I think this could be amazing, if everyone can PM me an email, I shall add you to slack, as I have a slack thingy setup, so we can all chat in a private channel on there. But thank you for all the help, I really want to make this amazing!
Just one note I want to use my git server so please if you can send me an email and I shall set you up a username and password :D/> It is just like github :P/> I am using this because I would rather keep it on my own server :P/>.
Edited on 10 February 2016 - 10:17 PM
429 posts
Posted 11 February 2016 - 12:39 AM
-snip-
Just one note I want to use my git server so please if you can send me an email and I shall set you up a username and password :D/> It is just like github :P/> I am using this because I would rather keep it on my own server :P/>.
Why? Do you have any special reasons? And if you do, do you plan on accepting git am patches? Because if so the only reason to use your own server is to complicate things.
also pls no html that thing is horribly broken.
1140 posts
Location
Kaunas, Lithuania
Posted 11 February 2016 - 07:53 AM
Since I've made Frames (which I should really finish and post here..) I have expirience with dynamic objects, like in HTML. One thing that should be noted before starting the project: mmake the most lightweight class system you possibly can (you are going to use OOP, right?). The very first version of Frames used a super cool class system but it was so slow that it needed about one second to load and barely handled just 20 objects. In the next version I switched to using a lightweight class system and now it can handle a few hundred objects with no lag.
453 posts
Location
Holland
Posted 11 February 2016 - 08:35 AM
Count me in!
1847 posts
Location
/home/dannysmc95
Posted 11 February 2016 - 09:17 AM
Count me in!
Send us your email and I shall add you! :D/>/>
Since I've made Frames (which I should really finish and post here..) I have expirience with dynamic objects, like in HTML. One thing that should be noted before starting the project: mmake the most lightweight class system you possibly can (you are going to use OOP, right?). The very first version of Frames used a super cool class system but it was so slow that it needed about one second to load and barely handled just 20 objects. In the next version I switched to using a lightweight class system and now it can handle a few hundred objects with no lag.
And send me your email and I shall add you too
-snip-
Just one note I want to use my git server so please if you can send me an email and I shall set you up a username and password :D/>/>/> It is just like github :P/>/>/> I am using this because I would rather keep it on my own server :P/>/>/>.
Why? Do you have any special reasons? And if you do, do you plan on accepting git am patches? Because if so the only reason to use your own server is to complicate things.
also pls no html that thing is horribly broken.
I use my own git server, because it's my project and I do not use github. Like I said you don't have to help but I will use my git server, for my project… Plus I prefer using it over github as I can set it to private so no one else can see the project, where as github I would have to pay. Plus there are many other reasons I plan to use it, but if you end up helping then you will see, otherwise you won't.
Edited on 11 February 2016 - 08:20 AM
724 posts
Location
Kinda lost
Posted 11 February 2016 - 11:04 AM
Your post got me thinking and while i am unable to join something at this time due to time limitations i am facing i just wanted to drop some ideas i had reading this topic.
Markup Language:
This will be like basic html with the usual html tags, but I have a parser that should fix all of that for us, and we can make additions to add new bits. I then hope to make a basic language that is simple, not too different but still a change from HTML. I want to be able to support most new image formats, and even see if it is possible to embed videos in it (It's a long shot, but who knows).
Videos part reminded me about gif apis by BombBloke:
http://www.computerc.../23056-gif-api/and
http://www.computerc...76-blittle-api/Could be used to play gifs in page. But to use that is related to next idea
Scripting Language:
This will be like a jQuery type language which will need a custom parser for it, and I have to admit new languages and parsers are not my thing so the help would be very appreciated.
This i could see using <script></script> html tag. Simply run in sandbox lua code provided inside the tags providing it with some kind of api for modifying site as it goes? By limiting and setting what functions it can use you could really make it a powerful thing. Per example providing it with access to apis mentioned above you could insert gifs into page? It of course would require separating script part from website drawing part so script runs in background of page so to say.
Preprocessor Language:
This will basically be a class, with includes modules, allowing you to use flat file based storage instead of databases, which then store data in your drive. The idea is that you can send a request and the PHP will parse the bits of code and output the result using the provided modules.
This could be even implemented using same idea as one above but using <?php ?> syntax inside the page (and keeping it server-side of course).
EDIT: After reading stuff again i realized you plan to host it on real website. So people would just use real php here. Wopsies ;D
Edited on 11 February 2016 - 10:06 AM
1847 posts
Location
/home/dannysmc95
Posted 11 February 2016 - 11:20 AM
Your post got me thinking and while i am unable to join something at this time due to time limitations i am facing i just wanted to drop some ideas i had reading this topic.
Markup Language:
This will be like basic html with the usual html tags, but I have a parser that should fix all of that for us, and we can make additions to add new bits. I then hope to make a basic language that is simple, not too different but still a change from HTML. I want to be able to support most new image formats, and even see if it is possible to embed videos in it (It's a long shot, but who knows).
Videos part reminded me about gif apis by BombBloke:
http://www.computerc.&#46;&#46;/23056-gif-api/and
http://www.computerc...76-blittle-api/Could be used to play gifs in page. But to use that is related to next idea
@ This is what I had in mind! Using some gif apis and some image apis, to just output images :D/>/>/>Scripting Language:
This will be like a jQuery type language which will need a custom parser for it, and I have to admit new languages and parsers are not my thing so the help would be very appreciated.
This i could see using html tag. Simply run in sandbox lua code provided inside the tags providing it with some kind of api for modifying site as it goes? By limiting and setting what functions it can use you could really make it a powerful thing. Per example providing it with access to apis mentioned above you could insert gifs into page? It of course would require separating script part from website drawing part so script runs in background of page so to say.
@ Yes this is easily done, making it so the parser ignores script tags, and I was thinking when the parser turns it into objects, each object could have methods, to move, change, transform etc the text.Preprocessor Language:
This will basically be a class, with includes modules, allowing you to use flat file based storage instead of databases, which then store data in your drive. The idea is that you can send a request and the PHP will parse the bits of code and output the result using the provided modules.
This could be even implemented using same idea as one above but using <!–?php ?–> syntax inside the page (and keeping it server-side of course).
EDIT: After reading stuff again i realized you plan to host it on real website. So people would just use real php here. Wopsies ;D
@ This is my idea, so I have started working on that when someone connects to a website, it will get all their information, like IP, user agent (Of course this is set on the program), and device (pocket, turtle, or computer), and even use stored cookies / sessions, all of this is sent up with the request meaning that everything is always there for each request and this would be done in the actual browser code :P/>/>/>. If we use xml, we can use a quick checker, to remove any kind of malicious code, and then use basic PHP files with the XML, meaning it would run the PHP and give back the XML. So we could say you could do <?php echo $query("USER")->ip; ?>
and that would echo the IP etc etc.
Edited on 11 February 2016 - 10:25 AM
453 posts
Location
Holland
Posted 11 February 2016 - 01:17 PM
JQuery extends Javascript, and Javascript is like lua, except it implemented OOP in a really wierd way
I would say just use Lua for on page scripting and preprocessing, or even be able to script the server like NodeJS
1847 posts
Location
/home/dannysmc95
Posted 11 February 2016 - 01:19 PM
JQuery extends Javascript, and Javascript is like lua, except it implemented OOP in a really wierd way
I would say just use Lua for on page scripting and preprocessing, or even be able to script the server like NodeJS
We are not using NodeJS not at all. We shall use PHP for preprocessing, but yes we have said we shall use Lua as the scripting language.
429 posts
Posted 11 February 2016 - 03:42 PM
-more snip-
I use my own git server, because it's my project and I do not use github. Like I said you don't have to help but I will use my git server, for my project… Plus I prefer using it over github as I can set it to private so no one else can see the project, where as github I would have to pay. Plus there are many other reasons I plan to use it, but if you end up helping then you will see, otherwise you won't.
Then you're accepting am patches?
1847 posts
Location
/home/dannysmc95
Posted 11 February 2016 - 03:55 PM
-more snip-
I use my own git server, because it's my project and I do not use github. Like I said you don't have to help but I will use my git server, for my project… Plus I prefer using it over github as I can set it to private so no one else can see the project, where as github I would have to pay. Plus there are many other reasons I plan to use it, but if you end up helping then you will see, otherwise you won't.
Then you're accepting am patches?
What exactly is it you wish to patch?
429 posts
Posted 11 February 2016 - 04:00 PM
From that sentence I can deduce you:
- Don't have the patience to read the git-format-patch(1) and git-am(1) man pages
- Aren't very experienced in the open source software world.
A patch is literally just a pull request. It's how people submit changes across repositories.
If you didn't know that, I suggest you stick with GitHub.
1847 posts
Location
/home/dannysmc95
Posted 11 February 2016 - 04:03 PM
From that sentence I can deduce you:
- Don't have the patience to read the git-format-patch(1) and git-am(1) man pages
- Aren't very experienced in the open source software world.
A patch is literally just a pull request. It's how people submit changes across repositories.
If you didn't know that, I suggest you stick with GitHub.
You're extremely rude, but I have never heard of them tbh, but like I said I have had a git server for months now, so I will stick to it, please stop commenting now.
463 posts
Location
Germany
Posted 11 February 2016 - 09:26 PM
From that sentence I can deduce you:
- Don't have the patience to read the git-format-patch(1) and git-am(1) man pages
- Aren't very experienced in the open source software world.
A patch is literally just a pull request. It's how people submit changes across repositories.
If you didn't know that, I suggest you stick with GitHub.
Who said it's open source?
429 posts
Posted 11 February 2016 - 09:56 PM
Nobody. But git is open source. As is basically every git using project ever.
Point still stands.
1847 posts
Location
/home/dannysmc95
Posted 11 February 2016 - 10:09 PM
Nobody. But git is open source. As is basically every git using project ever.
Point still stands.
Well there is a false statement, considering most of the projects I work on for my job are closed source, so that rules out the above statement, but no I looked it up and no we don't allow it, as the code is closed source only people working on it are able to view and edit it, while it is in development :D/>
463 posts
Location
Germany
Posted 11 February 2016 - 10:27 PM
But git is open source.
Git is a "distributed version control system" (as it says on the website). The use (open source, closed source) of this version control system is specificated nowhere on the website, meaning you can use it for whatever kind of project you want.
1847 posts
Location
/home/dannysmc95
Posted 11 February 2016 - 10:29 PM
But git is open source.
Git is a "distributed version control system" (as it says on the website). The use (open source, closed source) of this version control system is specificated nowhere on the website, meaning you can use it for whatever kind of project you want.
Don't start him off, as he is "always right" >.< Not worth it, but I sent you a slack request so jump on :D/>
Edited on 11 February 2016 - 09:30 PM
224 posts
Posted 12 February 2016 - 12:40 AM
I'm ok at making languages i guess, im currently porting Skript (minecraft plugin scripting language) to mcpe
so i could help when that's done
Edited on 11 February 2016 - 11:41 PM
224 posts
Posted 12 February 2016 - 02:00 AM
Should have more than just rednet related servers, I want servers that can be cross-server and public.
1847 posts
Location
/home/dannysmc95
Posted 12 February 2016 - 09:06 AM
Should have more than just rednet related servers, I want servers that can be cross-server and public.
We are not using rednet, we will be using HTTP. So all websites are online, and the client will allow you to view the pages etc. This is so we can allow use of PHP as a preprocessing script.
Edited on 12 February 2016 - 08:06 AM
724 posts
Location
Kinda lost
Posted 12 February 2016 - 10:28 AM
Speaking of keeping websites on server. I would suggest instead of using the <script> tag to instead use custom <luascript> tag and add
luascript { display: none; }
To site css. Also make the CC browser not display contents of both tags by default. This way it would be possible to make website that would be usable from both inside computercraft and in real life browsers. by just providing 2 scripts in code one in lua in <luascript> for cc browser and javascript one in <script> for real world one. Just something that jumped at my head today.
Edited on 12 February 2016 - 09:28 AM
1847 posts
Location
/home/dannysmc95
Posted 12 February 2016 - 10:46 AM
Speaking of keeping websites on server. I would suggest instead of using the <script> tag to instead use custom <luascript> tag and add
luascript { display: none; }
To site css. Also make the CC browser not display contents of both tags by default. This way it would be possible to make website that would be usable from both inside computercraft and in real life browsers. by just providing 2 scripts in code one in lua in <luascript> for cc browser and javascript one in <script> for real world one. Just something that jumped at my head today.
My plan is to allow people to view websites on external servers as well using a few additions I plan to add, but for now I think the script tag will be changed, as I don't think script tag will look good I am thinking doing:
<?lua
print("example");
?>
2151 posts
Location
Auckland, New Zealand
Posted 13 February 2016 - 12:00 PM
Interested to see how this goes. You mentioned using a more basic form of markup, which essentially is what Quest is (although I know you're intending to go further), but why not just try and stick as close to HTML as possible and instead target CraftOS 2?
1426 posts
Location
Does anyone put something serious here?
Posted 13 February 2016 - 02:05 PM
Interested to see how this goes. You mentioned using a more basic form of markup, which essentially is what Quest is (although I know you're intending to go further), but why not just try and stick as close to HTML as possible and instead target CraftOS 2?
Even in CC 1.76+ it might be possible to implement decent headers thanks to the new characters and the
BigFont API.
1847 posts
Location
/home/dannysmc95
Posted 13 February 2016 - 04:55 PM
Interested to see how this goes. You mentioned using a more basic form of markup, which essentially is what Quest is (although I know you're intending to go further), but why not just try and stick as close to HTML as possible and instead target CraftOS 2?
Change of mind… I might look into using something closer to HTML maybe even just parse html but for now I think it would be better to keep our own version of a markup language.
CraftOS 2.0, we will support it but currently we have nothing to test on? Nothing to check the API's or see the screen size and what we can do with it? Unless I have missed something but I don't see the point of making something for a platform that may be completely different? When it is out?
Edited on 13 February 2016 - 04:01 PM
463 posts
Location
Germany
Posted 13 February 2016 - 06:36 PM
CraftOS 2.0, we will support it but currently we have nothing to test on? Nothing to check the API's or see the screen size and what we can do with it? Unless I have missed something but I don't see the point of making something for a platform that may be completely different? When it is out?
I think what oeed meant is that we should try and make it as easy as possible to port it to CraftOS 2.0 when it's released. For example, not setting 51x19 as the hardcoded resolution (CraftOS 2.0 uses 320x200), accepting a 256 color palette, supporting hovering mouse cursors and different cursor designs, etc
Edited on 13 February 2016 - 05:37 PM
1847 posts
Location
/home/dannysmc95
Posted 13 February 2016 - 06:43 PM
CraftOS 2.0, we will support it but currently we have nothing to test on? Nothing to check the API's or see the screen size and what we can do with it? Unless I have missed something but I don't see the point of making something for a platform that may be completely different? When it is out?
I think what oeed meant is that we should try and make it as easy as possible to port it to CraftOS 2.0 when it's released. For example, not setting 51x19 as the hardcoded resolution (CraftOS 2.0 uses 320x200), accepting a 256 color palette, supporting hovering mouse cursors and different cursor designs, etc
Oh okay, yes definitely I think that is a good idea
2151 posts
Location
Auckland, New Zealand
Posted 13 February 2016 - 10:10 PM
CraftOS 2.0, we will support it but currently we have nothing to test on? Nothing to check the API's or see the screen size and what we can do with it? Unless I have missed something but I don't see the point of making something for a platform that may be completely different? When it is out?
I've been developing Silica for the past 8 months, it's quite possible.
You can use the emulator on the Silica
GitHub page, it works just like any other emulator.
1847 posts
Location
/home/dannysmc95
Posted 14 February 2016 - 11:49 AM
CraftOS 2.0, we will support it but currently we have nothing to test on? Nothing to check the API's or see the screen size and what we can do with it? Unless I have missed something but I don't see the point of making something for a platform that may be completely different? When it is out?
I've been developing Silica for the past 8 months, it's quite possible.
You can use the emulator on the Silica
GitHub page, it works just like any other emulator.
But is that what CraftOS 2.0 is? Or is it your guess? Although I could never get your emulator to work when I tried installing it.