Fork me on GitHub
#off-topic
<
2017-03-14
>
csm04:03:08

are auto-scaling groups not working in AWS us-west-2, or is it just me?

qqq10:03:22

why do some articles give the impression taht type checking is difficult?

qqq10:03:30

type checkig seems trivial if you just know the types of all the leaf node variables

qqq10:03:38

then you just "go up the ast tree, and label all the intermedaite nodes"

tbaldridge13:03:41

@qqq sure, for primitive types, but it gets hard when you get into more complicated subjects. See stuff like covariance and contravariance for example

tbaldridge13:03:46

Not to mention stuff like this, what is the return type of this expression (if x 4 4.0)

qqq14:03:23

@tbaldridge: oh, I was thikning (if x 23 "hello world") as illegal

qqq14:03:00

@tbaldridge: if you create a series on type checking on top of the logic video series, I'll consider resubscribing to your video tutorials 🙂

tbaldridge14:03:03

Sadly, (happily?!?) type checking doesn't really interest me at all. Esp, considering that a good enough JIT doesn't care about static typing.

qqq14:03:56

@tbaldridge : one more question regarding videos -- do you have any plans on extending the logic one into one on acl2 / jbob / the little prover / theorem provers ?

tbaldridge14:03:13

not at the moment.

tbaldridge14:03:53

I'm currently working on a custom rules engine (Rete network), so when I get somewhere with that code I'll probably do a set of videos on that, contrasting/comparing with logic engines.

qqq15:03:07

@tbaldridge : I like rule engines. Let me know when you've released all the videos, so I can watch them all in 1 month. 🙂

mike_ananev18:03:01

@tbaldridge how do you estimate a Clara rule engine?

tbaldridge18:03:38

not sure I understand.

tbaldridge18:03:44

Do you mean what do I think of Clara?

mike_ananev18:03:02

yeah, sorry :))

tbaldridge18:03:50

np, Clara is pretty macro heavy, which has turned me away from it in the past. Also, I'm not entirely sure it's an immutable rules engine?

tbaldridge18:03:25

It's hard to tell from the docs if inserting a new fact modifies the existing engine or returns a "new" engine. From what I can tell it's mutable, which I'd also like to see done a bit differently

tbaldridge18:03:10

Also, I don't like learning DSLs, so I'd prefer a engine that used an existing syntax. In my experiments I'm using Datomic's Datalog

mike_ananev18:03:31

hmm, interesting. is it open source? ( custom rule engine)

tbaldridge18:03:44

Well it's only on my local HDD at the moment, lol

tbaldridge18:03:21

It's more like I've spent a few weeks reading stuff and said "heh I can build this" and in the few Fridays I've spent working on it I have something that can ingest Datomic transactions and fire rules when they apply.

tbaldridge18:03:30

All that is about 200 lines of super hacky code.

tbaldridge18:03:16

So yeah, I'd like to OSS it or something, I'm not sure what I'm going to do with it. But it's something I've needed more than once on a client's project, so we'll see.

tbaldridge18:03:31

What does interest me though about the subject of rules engines is that they tend to be a different way of projecting the same problem a logic engine solves. In one (logic engine), the data is static and you crawl the data from different ways.

tbaldridge18:03:46

In the other your query is static and you flow data through the query.

mike_ananev19:03:23

I'm interested about rule engine cause we have anti-fraud project in our bank. There are so many business rules and conditions to detect fraud/not fraud that put them in usual Clojure/Java code is a nightmare. rules engines seems to be a solution for that problem. I'm playing a bit with Clara right now . But I'm newbie in this topic

qqq19:03:33

@tbaldridge : so 'rule engines' == 'streaming queries from db land' ?

tbaldridge19:03:51

@qqq yes, in a sense, you take a static set of "queries" and then feed it a bunch of facts (think Datomic tuples and transactions. The engine then lets you know when rules return new results, or a old result stops being true

tbaldridge19:03:11

It fits really well when you're in a situation where you feel like you need to re-run a bunch of queries every time the DB changes.

tbaldridge19:03:11

The downside is, if you want to add a new rule you almost have to toss out the old engine and re-ingest every fact in your database

qqq19:03:52

yeah, it does seem like "keep track of when something is no longer true" == you have to build some data structure which stores the history

qqq19:03:13

this sounds very cool, looking forward to your series on this

tbaldridge19:03:33

Good starting place for anyone who's interested: https://en.wikipedia.org/wiki/Rete_algorithm

qqq19:03:24

@tbaldridge : I feel like om/next, re-frame, and datascript are sorta converging towards this, but for some reason no one's fully done this yet

qqq19:03:41

a UI is basically static queries + streaming data (user input + network input)

tbaldridge19:03:11

Exactly! I've been thinking the same thing recently

tbaldridge19:03:40

esp with Datascript + these UI libs, why are we re-runing all our UI queries everytime someone transacts a new datom?