Notices


Reply
Thread Tools
Posts: 1 | Thanked: 14 times | Joined on Apr 2010
#1
At least, after long nights of programming, we are ready to present beta version of ET-Prolog. It is a SWI-Prolog extension, created for writing scripts, which control device (phone, computer...) behavior in dependence of state of surrounding world.
The main advantage of the language is that programs like headphone daemon can be written in only several lines of easy to read code. So you can use this language to describe phone behavior which would be the best for your needs.
You can learn more about this language and download it from official site
P.S. This is the first beta-release so this program may have buggy and unexpected behavior. So we don't recommend novice users to test it.
 

The Following 14 Users Say Thank You to dicentra13 For This Useful Post:
Posts: 254 | Thanked: 122 times | Joined on Nov 2009
#2
We have updated ET-Prolog. Now it comes with reasonable examples and we have found and corrected several errors during writing these examples.
Now there is simple GPS logger. Unfortunately n900 built in SWI-prolog does not some needed functions, so time is not written.
And now there is example script, which switches silent profile when user sleeps. You can read more here.
P.S. Your scripts in /home/user/et-prolog would not be overwritten during update, so look in /opt/maemo/usr/share/et-prolog/logic for example scripts.
P.P.S. I'm a little bit scared by absence of posts in this thread. Is this project useless or just not so easy to understand?
 

The Following 4 Users Say Thank You to KiberGus For This Useful Post:
Posts: 478 | Thanked: 165 times | Joined on Apr 2010 @ Manchester
#3
As a noon developer I really like the idea of easily being able to create my own scripts etc. However, this is still a little over my head. I can see that the code is much easier to write, but I do not know what to write still!
__________________
Temporary signature: Real signature removed for cleaning.

Don't forget the thanks button if I helped you
 
Posts: 5,795 | Thanked: 3,151 times | Joined on Feb 2007 @ Agoura Hills Calif
#4
When I see the word Prolog I tend to pull the bedcovers over my head, but this project interests me.
 
Posts: 729 | Thanked: 155 times | Joined on Dec 2009
#5
Is this similar to to the shepherd project?
 
Posts: 254 | Thanked: 122 times | Joined on Nov 2009
#6
Originally Posted by DaSilva View Post
Is this similar to to the shepherd project?
Yes, it is similar. I didn't head about shephered before. But ET-Prolog is more powerful and allows to describe more complex rules. If I'm not mistaken shephered gives you:
  • predicates - which describe device state
  • logic operators over this predicates
  • predefined actions.

Et-Prolog gives you:
  • temporal terms. The same as values of predicates in shephered,
    but you can define your own terms.
  • guards. The same as predicates in shephered.
Additionally you get:
Temporal logic over temporal terms. So you can make decisions, which depend on history of temporal terms changes.
Instead of simple boolean logic over temporal terms you get full prolog power (which includes boolean logic). This is complete language, so you can script any behavior. You can also run any shell command by SWI-Prolog built-in shell/1 predicate, if you need.

So yes, it is similar. Bu shephered is just daemon, that performs actions when conditions are met and ET-Prolog is complete programming language. And I agree, that for most cases shephered could give enough functionality. But example with silent mode during sleeping can't be done with it, unless you would start scripts which would remember their state from shephered. Shephered can't describe things like "if something has happened not more than N minutes ago and some conditions are met now, do something once".

Originally Posted by mornage View Post
As a noon developer I really like the idea of easily being able to create my own scripts etc. However, this is still a little over my head. I can see that the code is much easier to write, but I do not know what to write still!
Actually, had to get used to it too to start writing scripts. But for simple ones you don't need to know much. I know less than ten prolog predicates and this is enough for me.
I believe, that it is possible to write short and clear documentation how to write basic scripts.
 

The Following 2 Users Say Thank You to KiberGus For This Useful Post:
ysss's Avatar
Posts: 4,384 | Thanked: 5,524 times | Joined on Jul 2007 @ ˙ǝɹǝɥʍou
#7
How many lines do I need to write to give my n900 consciousness?

JK. WTG dude. I can't wait to try it out
__________________
Class .. : Power User
Humor .. : [#####-----] | Alignment: Pragmatist
Patience : [###-------] | Weapon(s): Galaxy Note + BB Bold Touch 9900
Agro ... : [###-------] | Relic(s) : iPhone 4S, Atrix, Milestone, N900, N800, N95, HTC G1, Treos, Zauri, BB 9000, BB 9700, etc

Follow the MeeGo Coding Competition!
 

The Following User Says Thank You to ysss For This Useful Post:
Posts: 254 | Thanked: 122 times | Joined on Nov 2009
#8
Originally Posted by ysss View Post
How many lines do I need to write to give my n900 consciousness?

JK. WTG dude. I can't wait to try it out
As written in first article we are not going to make phone consciousness, we don't need it, we need it to look like if it is. And this depends only on your wishes.
 
ysss's Avatar
Posts: 4,384 | Thanked: 5,524 times | Joined on Jul 2007 @ ˙ǝɹǝɥʍou
#9
Originally Posted by KiberGus View Post
As written in first article we are not going to make phone consciousness, we don't need it, we need it to look like if it is. And this depends only on your wishes.
Ok. At least everyone knows not to name their enterprise Skynet now. We don't need to repeat history
__________________
Class .. : Power User
Humor .. : [#####-----] | Alignment: Pragmatist
Patience : [###-------] | Weapon(s): Galaxy Note + BB Bold Touch 9900
Agro ... : [###-------] | Relic(s) : iPhone 4S, Atrix, Milestone, N900, N800, N95, HTC G1, Treos, Zauri, BB 9000, BB 9700, etc

Follow the MeeGo Coding Competition!
 
Posts: 729 | Thanked: 155 times | Joined on Dec 2009
#10
Will this be available in extras-devel and is there a GUI for it?
What is already possible with it?
 
Reply


 
Forum Jump


All times are GMT. The time now is 14:39.