| name | explain-diff-html |
|---|---|
| description | Use when the user asks for a rich explanation of a code change, diff, branch, or PR. Produces HTML output. |
Please make me a rich, interactive explanation of the specified code change.
It should have these sections:
| <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> | |
| <!-- ... --> | |
| <qemu:commandline> | |
| <qemu:arg value='-acpitable'/> | |
| <qemu:arg value='file=/some/path/slic.bin'/> | |
| <qemu:arg value='-acpitable'/> | |
| <qemu:arg value='file=/some/path/msdm.bin'/> | |
| <qemu:arg value='-smbios'/> | |
| <qemu:arg value='file=/some/path/smbios_type_0.bin'/> | |
| <qemu:arg value='-smbios'/> |
| # Livesplit hotkeys | |
| # | |
| "livesplithk Page_Up" | |
| Page_Up | |
| "livesplithk Page_Down" | |
| Page_Down | |
| "livesplithk Insert" | |
| Insert | |
| "livesplithk Delete" | |
| Delete |
It's like creating the front end and back end of a compiler inside Haskell without the need of Template Haskell!
Write your DSL AST as a Free Monad, and then interpret the monad any way you like.
The advantage is that you get to swap out your interpreter, and your main code
| import java.util.*; | |
| import rx.*; | |
| import rx.Observable.Operator; | |
| import rx.Observable; | |
| import rx.observers.TestSubscriber; | |
| import rx.subjects.*; | |
| public class RxEventBus<T> { |
| import rx.Observable; | |
| import rx.subjects.PublishSubject; | |
| import rx.subjects.SerializedSubject; | |
| import rx.subjects.Subject; | |
| /** | |
| * Simple pass-thru event bus with error handling and reconnect. | |
| */ | |
| public class EventBus { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| language: java | |
| env: | |
| global: | |
| - SONATYPE_USERNAME=yourusername | |
| - secure: "your encrypted SONATYPE_PASSWORD=pass" | |
| after_success: | |
| - python addServer.py | |
| - mvn clean deploy --settings ~/.m2/mySettings.xml |