These are chat archives for Deskshell-Core/PhoenixEngine

11th
Mar 2015
sihorton
@sihorton
Mar 11 2015 16:52
Yes that would be great. It would not actually be that difficult to implement
there is an ssh2 library for nodejs. So you can connect from phoenix engine app over ssh to the raspberry pi. Nodejs makes it really easy to send and receive text from the command line.
so basically if the user presses an html button then the code can send commands over ssh and then parse the result back.
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 16:54
Actually, Phoenix Engine comes with libcurl - which has ssh2 support built in. So one way or another, it will work. :)
sihorton
@sihorton
Mar 11 2015 16:54
This way you need no "special server/port" running, you are just using ssh and you still get the really nice html interface
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 16:54
i saw libcurl as a mandatory PHP plugin, so I decided to make it a dependency, which also means that the nodejs environment has the native curl module already available
sihorton
@sihorton
Mar 11 2015 16:54
would be a great demo app
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 16:55
totally!
i think that would be an app to showcase during the online presentation.
sihorton
@sihorton
Mar 11 2015 16:55
ah that is great, curl is useful and you can get it to do pretty much anything
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 16:55
since i have a pi to show it.
curl is great. ^^
sihorton
@sihorton
Mar 11 2015 16:55
yes, very good demo since you can make the html really pretty, then you can show the very simple ssh commands and the results
you could just write a simple script on the pi that toggles an led for example, then just trigger the script from ssh
I still have not done gpio programming on my pi, the pi itself came really quickly but some of the other components were not in stock so I am waiting for a breadboard and wires and the like to arrive
hopefully it will only take one more week, then I will be able to play around with it.
I have found some interesting micro boards that supply 2.4ghz and 433mhz radios so I am hoping to be able to create a very cheap wireless communication
also have bought nano arduino which just has 18 pins but is just a little bigger than the chip itself and is very cheap
so hopefully I can have them running and doing simple things and then be controlled from the pi
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:06
the GPIO is really easy
actually you can manipulate the GPIO using a virtual file system
its in /proc/gpio if i am not that mistaken...
And thats a cool project to do!
I have a LED board (PiGlow) attached to mine
so for my demo, I could talk to that board remotely ^^
sihorton
@sihorton
Mar 11 2015 17:07
that would make a great demo
Phoenix engine sounds awesome, I am looking forward to building apps in it!
Let me know when you have that presentation or an early version of it and I will gladly give you feedback
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:11
I totally will
but first i have to get out of the cycle of being ill. I have been diagnosed a bladder infection and am taking antibiotics
i f’kn hope its the last illness im going through. xD
sihorton
@sihorton
Mar 11 2015 17:12
no pressure, hope you get well again soon, I am just looking forward to using it :-)
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:14
The road map is that: Re-writing IceTea’s core logic to use two threads - one to process the script language and another to watch over running commands. Then I have to write all the IceTea build scripts for the various components such as PHP and libcurl - which means I have to convert their autotools based system to mine. And that is a huuuuuge task… Do-able, but reading 5000 lines of code and translating that, that just isnt the nicest. x.x When that is done, I will see if I can build the base framework - so that all the libraries build into the Phoenix Engine shared library and properly link with libchromiumcontents. When that works, then I am so ultra happy - because then, I can start on the real coding! and at that point, an alpha-version is not that far away.
so the steps are only few, but will take me a little, since I also have my BIRD3 project at hand.
sihorton
@sihorton
Mar 11 2015 17:17
can you write some form of plugin to use their autotools at the beginning (e.g. boot it off as a separate command and wait for it to finish)?
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:17
that would require the whole aototools environment to work on all target platforms - and they dont on Windows.
sihorton
@sihorton
Mar 11 2015 17:18
ah yes understood
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:18
and i dont want people who use the engine or want to build it from source to install stuf like MinGW as a requirement
I am keeping all dependencies in the source tree so all the user neds is a copy of IceTea
and off they go. :)
sihorton
@sihorton
Mar 11 2015 17:18
yes that is what I really like about your ideas, it makes it far easier to compile stuff :-)
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:19
building PHP on windows is a PITA. but when I am done with it, its so easy.
so i am even going to go as far as re-writing their „extension builder“ programs. the program phpize prepares an autotools environment for building php eextensions
sihorton
@sihorton
Mar 11 2015 17:20
did I tell you that I found a project for creating encrypted sqlite library on windows?
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:20
but my version of phpize will simply copy some IceTea files into the local .IceTea folder - so they get auto-included - and then the user just needs to type either icetea or icetea clean or even icetea test :)
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:20
I heared about it actually
and i am quite interested in adding encrypted DB functionality
then again, if I can find a way to intercept reading and writing of the SQL data base files, I could run an AES encryption/decryption over it
sihorton
@sihorton
Mar 11 2015 17:21
I tried to compile it all but failed unfortunately, but the problem is the compiler setup, my version of ms compiler is messed up on my machine
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:21
that would be quite a hacky workaround, but it would work.
Oh
well…you should get it fixed. x3
sihorton
@sihorton
Mar 11 2015 17:21
actually that is already supported in sqlite
it has support so that each block that it reads from the device can be encrypted and decrypted
and they have added an sqlite sql command
where you tell it the password to use to decrypt
on linux / mac I think it is quite easy to get working
the problem is on windows you need open ssh and libraries etc
but it is possible as those two github projects show
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:23
Well encrypted db’s are a thing that i want to add to the engine
sihorton
@sihorton
Mar 11 2015 17:24
I have an old virtual machine that I used for building appjs but it is saved on some storage disk somewhere and I have not added yet.
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:24
but im not gonna make a fuss about it now, since id be happy to have an alpha version first.
sihorton
@sihorton
Mar 11 2015 17:24
I would strongly suggest that you use sqlite to add encrypted dbs
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:24
sqlite is already a dependency
using libtrololo (no pun intended) as a C++ wrapper
sihorton
@sihorton
Mar 11 2015 17:25
it is a very good format and has been very successful, it is in process and adding the encryption won't be too difficult for you
perfect for a "password manager" style app.
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:25
Yeah. Well, as said, it definitively is a feature I want in there.
sihorton
@sihorton
Mar 11 2015 17:25
you can have a nice little html5 interface with a list of sites and passwords and as you open the app it requests a password from you.
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:25
But since I am currently troubbled with the foundation, Ill make adjustments to have encrypted databases later
For now, a user can actually access an encrypted archive
sihorton
@sihorton
Mar 11 2015 17:26
sure
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:26
BBQ archives can be encrypted.
so a workaround would be to store the DB in such archive and reading and writing that way.
sihorton
@sihorton
Mar 11 2015 17:26
ah yes, that is really useful
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:26
but ohmy thats a hacky workaround… XD
i still need to finalize BBQ - but that should not take forever, since the base library is ultra convenient.
sihorton
@sihorton
Mar 11 2015 17:27
well if it is just a small amount of data you can actually store it as json and encrypt the file
it will be relatively fast, and there are even in-memory sql that you can use in html
the only thing it is will obviously take up some memory.
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:28
Well, i think nodejs already has the crypto module for encryption and decryption
sihorton
@sihorton
Mar 11 2015 17:28
But for now or for a demo it would work fine
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:28
and PHP also has that
but i am going to make the AES functionality I have available.
sihorton
@sihorton
Mar 11 2015 17:28
yes the nodejs crypto is really easy to use. The nice thing is you can easily implement stream encryption / decryption
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:28
in PHP and AngelScript, that will be in the PhoenixEngine namespace - for Nodejs, it will be within a require-able module
sihorton
@sihorton
Mar 11 2015 17:29
so it is possible to have a file and then pipe it through several objects to get the result out and it does not use much memory as it does it as a stream instead of reading the whole file into memory
that is great, php is really good at connecting to c libraries, it is one of the main reasons that it succeeded and became so popular
since people could add so many commands to it
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:30

Its really cool that AngelScript is pretty much C++. So actually, things could look like that

```c++
using namespace PhoenixEngine;
int main(string[] args) {
string mycrypt = AES::encrypt(string, password);
}

my markdown got weirded. oh well
sihorton
@sihorton
Mar 11 2015 17:31
yes that is really great
C++ is so powerful but takes such a long time to write, so anything that is a script but is very compatible with c++ is really useful
Did you notice when mozilla started re-writing large parts of the browser in javascript?
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:32
and that is why I want to use AngelScript.
No i didnt know.
all I know is that Firefox still sucks...
sihorton
@sihorton
Mar 11 2015 17:32
They made a really good javascript / c++ bridge for the plugins and everything
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:32
I was made to use it for one week, and it crashed horribly often.
sihorton
@sihorton
Mar 11 2015 17:33
then they started realising that it was easier to write in js
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:33
SpiderMonkey - their JS engine - is actually nice.
sihorton
@sihorton
Mar 11 2015 17:33
yes the problem with firefox has been loading it down with too many plugins, but I too have moved over almost totally to chrome
I still use firebug to debug web pages but otherwise it is all chrome
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:33
and I am even going to use the bare bones of Chrome for the engine.
Firebug is so good. :3
sihorton
@sihorton
Mar 11 2015 17:34
it is not that great actually, if everyone does that and uses chrome then we wont have much competition, but chrome works the way I think now so it is difficult to use other browsers
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:35
Well…I dont see competition. Thats the sad point.
Firefox: Crashes a lot, runs on a single thread and gets really ram-hungry
Opera: … They are using Webkit and - I think? - the v8 javascript engine. If they dont, then they use the JSC engine. So its pretty much a different version of chrome with other features and UI.
sihorton
@sihorton
Mar 11 2015 17:36
yes, and microsoft should never be allowed to become dominant again after what they did with IE so we are kind of stuck at the moment
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:36
IE: you know it.
sihorton
@sihorton
Mar 11 2015 17:37
yes, and safari is also webkit so basically it is one major browser engine now really
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:37
Safari uses the offical Webkit, which uses the JSC engine
Chrome’s fork of Webkit, named Blink, uses v8.
and something i forgot to mention to you
Google is rewriting v8 and making it v8-turbo.
THAT will run the engine. :)
So you get the best of all JS performances.
sihorton
@sihorton
Mar 11 2015 17:38
that is kind of good in that it means compatibility is far easier than it was years ago, but it means it is not really a truly open market place for ideas
it is all open source however so that is the strong point
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:38
Well Webkit works, and nobody really has an innovative idea that would be groundbreaking...
same with smartphones, really. I havent seen a real innovation in a long time
sihorton
@sihorton
Mar 11 2015 17:39
yes, the problem is that everyone starting thinking in the same way and then you only get small improvements
it takes someone that does not have training and does not know that what they want is impossible to just sit down and look at the problem in a totally unique way in order to get another ground breaking development
will be interesting to see what happens now that we have so many small devices that are becoming really powerful
I found this arduino for $4,
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:41
That is what I did with the Phoenix Engine. I looked at this problem, and who is trying to solve the problem…and decided that it could be done much better.
sihorton
@sihorton
Mar 11 2015 17:41
yes, it is lots of related ideas and innovations all together that make it a really good project
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:41
same for IceTea. No build tool really fascinated me - they all looked horrible… xD
sihorton
@sihorton
Mar 11 2015 17:42
:-)
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:42
I think I showed you my lengthy article about build tools that I have written a while ago
Just in case I didn’t: http://ingwie.me/page/projects/icetea
sihorton
@sihorton
Mar 11 2015 17:43
I dont think I have read that version, I can read it now!
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:44
Let me know what you think. :)
sihorton
@sihorton
Mar 11 2015 17:47
your link for object script goes to the russian language page, if you link to http://objectscript.org/en/ you will get english :-)
its a good write up.
would be kind of interesting to try transforming cmake and gyp to icetea, maybe it can be done automatically by a script
so you read in the build file and then output an icetea file.
it could issue warnings if it finds stuff that it does not understand, if it would work or not would depend on how complex and different the various features are and if they can be easily converted to object script.
sihorton
@sihorton
Mar 11 2015 17:53
maybe if you converted to an object script file with certain helper functions to make it simpler to do the conversion.
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 17:56
Actually, you can ask CMake to make IceTea files - I could write an adapter to that.
there are such adapters for Make, Ninja and some IDEs.
For GYP, well I’d need to write Python. But GYP, just like CMake, produces project files. So in theory, I could make GYP output icetea files.
would be an interesting thing to do, really
but thats something for the future when I am bored ;)
sihorton
@sihorton
Mar 11 2015 18:02
so many things to do so little time to do them all in :-)
computing is an interesting field to work in, it is always changing and developing and there are always new things to learn.
Ingwie Phoenix
@IngwiePhoenix
Mar 11 2015 18:06
Computer Science just never gets old. :)
Yes, Indeed.