https://github.com/hsk/bulletpl/blob/master/bulletpl/1943_ro...
It is a movement of the rolling fire of CAPCOM shooting game 1943.
Original Bullet ML DSL is XML base, however this version base Edinburgh Prolog format.
61–64 of 64 posts
https://github.com/hsk/bulletpl/blob/master/bulletpl/1943_ro...
It is a movement of the rolling fire of CAPCOM shooting game 1943.
Original Bullet ML DSL is XML base, however this version base Edinburgh Prolog format.
Not a lot of code but a somewhat different use of Prolog than you're likely to see elsewhere. I used my fork of a MQTT library for Prolog ( https://github.com/sprior/swi-mqtt-pack ) to implement the central controller for my home automation system. The system responds to MQTT events and then coordinates the appropriate action by sending MQTT messages to other home services. Recent versions of SWI-Prolog also support…
That is cool! How compact is code that sets groups of behavior? Can you paste any examples? This seems like one of the really powerful aspects of Prolog. That we can work on the microscopic level, and the computer can prove correctness or find solutions to competing constraints.
The send_display_vehicle_id(Id) in the end actually does a lot, it queries redis for previously announced display type devices, then looks up the capabilities (bit depth, resolution) of each device and formats accordingly then sends the display request for each. Also send_android_notification sends the request to some Java code that initiates a push message to my phone and watch.
None of this is rocket science in terms of Prolog message(MQTTPathAsList, MessageBody) is my general predicate for handling an incoming MQTT message once I've subscribed to it and it's convenient to deal with a MQTT topic path as a list.
message(['Smarthome','Notify', 'vehicle','motion'],_):- log('brain saw vehicle motion'), get_short_timestamp(S), atomic_list_concat([S, ' Vehicle Motion'], NotificationMessage), send_android_notification('Smarthome', NotificationMessage), request_image('alibi4').
request_image(Camera) :- publish(['Smarthome', 'Video', Camera, 'brain', 'request']).
message(['Smarthome','Video', _ ,'brain','response'],Image):- store_image(Image, 'brain'), analyze_image(Image, 'brain').
analyze_image(Image, Id) :- publish(['Smarthome', 'Sighthound', 'analyze', Id], Image).
message(['Smarthome','Vehicle', 'Sighthound'],VehicleJson):- vehicle_id(VehicleJson, Id), get_short_timestamp(S), atomic_list_concat([S, ' brain saw vehicle: ', Id], NotificationMessage), send_android_notification('vehicle', NotificationMessage), send_display_vehicle_id(Id), atom_concat(Id, VehicleJson, Description), atom_concat('brain saw vehicle: ', Description, Message), log(Message).
Cheers Hans
Earlier quoted context omitted.
Wow this is the best thing since the Actually Portable Executable source code. https://justine.lol/thun.png How did the author generate those letters?
What color scheme is that? Anyone know?