HNHacker News
TopNewBestAskShowJobs

ryjo

100 karma · joined December 17, 2018

submissionscomments
ryjo··on Tour of CLIPS (2022)
The only way I've found to back up the claims: try to prove them myself :)

or at least attempt to. I'm fairly convinced CLIPS is an unexplored middle-ground answer to conversations around "does our company really need AI/ML? SQL is enough."

I also see CLIPS as a declarative abstraction around our classic imperative CRUD applications. It exposes abstract concepts within the language that we end up implementing ourselves, like application caches (working memory), pattern matchers (LHS of Rules), and permission systems (in CLIPS, the object-oriented concepts known as "COOL" list User as a separate object inheritance chain from the other objects).

Consider PostgreSQL, a popular database that one could consider a Rules Engine: 1. records stored in tables can be implemented with facts in working memory 2. constraints, foreign keys, views, and other abstractions that come with RDBMSs which we slowly replicate within our application layer over time can be implemented with defrules 3. and you can even add "Rules" (https://www.postgresql.org/docs/current/sql-createrule.html) proper in psql

From this, we could conclude PostgreSQL is an example of an application you can build with a rules engine. However, the ambitions of CLIPS is to be a tool used for creating "Expert Systems." Whenever I bring up that term with other people, I'm met with:

1. blank stares 2. scoffs

regardless of their profession.

However, I argue that ChatGPT and other AI/ML chat bots are highly advanced "jack of all trade" Expert Systems. I also argue that some very successful web applications, such as the Pennie Pennsylvania health insurance application and TurboTax are "specific" Expert Systems. In all of these systems, you interact with someone who is the "expert" and can carry a "conversation" on the topic you specify.

We already use imperative programming languages that query remote databases specifically written to store data. I think Rules Engines (CLIPS) is "low hanging fruit" because, at its core, it's "lower level" than an RDBMS in terms of abstractions provided to the developer, but the implementation of the algorithm that interprets CLIPS code is closer inline with AI/ML. ie: neural networks are built based on inferred rules from the data they're trained on. Rete networks are built based on explicitly defined Rules by the developer. Thus, CLIPS is sort-of like having a formal language for interacting with a simplified neural network.

I hope my efforts are reaching developers on teams who have reached the point in their product's life when CLIPS "would have been a good idea to start with."

The difficult part: forgoing the temptation to reason "we don't need to use Foo, our product doesn't need all of that."

If any of the above resonates with you, I encourage you to read the CLIPS documentation and try to build something fun with it. You might be surprised at what you learn.

ryjo··on Tour of CLIPS (2022)
Thanks for sharing! I really enjoy seeing different implementations of the Rete Algorithm.
ryjo··on Tour of CLIPS (2022)
Wow! That must have been an incredible work environment.

I've got both the 4th edition and Adventures in Rule-Based Programming sitting in front of me now.

ryjo··on Tour of CLIPS (2022)
Is it possible: yes.

Can you write your own home-grown rules engine in Ruby: yes.

Can you use off-the-shelf gems: yes. Here's a few I poked around in my previous explorations into Ruby Rules Engines:

* durable rules - https://github.com/jruizgit/rules?tab=readme-ov-file#ruby

* wongi - https://github.com/ulfurinn/wongi-engine

* rules - https://github.com/azach/rules

* ruleby - https://github.com/Ruleby/ruleby

  - bonus: video of original ruleby author explaining rules engines: https://www.youtube.com/watch?v=qMh2RDL6aBM
edit: It's also possible to write your own Ruby gem in C so that you can pass the handling of the RHS of your rules to a Ruby script.
ryjo··on Tour of CLIPS (2022)
This has been similar to my experience. Rules Engines like CLIPS are just outside of the bounds of "cheap enough to spend time learning on the off-chance it is indeed better than what we've already written."
ryjo··on Tour of CLIPS (2022)
Not to self-promote too much, but the main focus of my programming efforts is currently CLIPS. Over the past few years, I've written articles about and even made some fun projects with CLIPS:

* Stop Writing In-app Caches and Start Writing Inherently Cached Apps with CLIPS - https://news.ycombinator.com/item?id=33342959

* Conway's Game of Life Written in CLIPS - https://news.ycombinator.com/item?id=34428083

* A* Algorithm Written in CLIPS - https://news.ycombinator.com/item?id=34340212

* Run CLIPS in a C++ AWS Lambda - https://news.ycombinator.com/item?id=37322937

* Write a Ruby C Extension to Use CLIPS from Ruby: Part 1 - https://news.ycombinator.com/item?id=35708717

* Write a Ruby C Extension to Use CLIPS from Ruby: Part 2 - https://news.ycombinator.com/item?id=36461022

ryjo··on Ask HN: Could you share your personal blog here?
https://ryjo.codes

I've had various blogs over the years, intermittently contributing to them when the mood strikes. This one is no different :)

ryjo··on Write a Ruby C Extension to Use Clips from Ruby: Part 2
This is the second part in a series for writing Ruby extensions in C. This article focuses on converting Ruby VALUEs into CLIPSValues so that you can assert values from a Ruby program into a CLIPS Rules Engine.
ryjo··on Self-Host All the Things?
Thanks for the info. This all sounds pretty reasonable.
ryjo··on Self-Host All the Things?
Incredible. The usual response to "should I host my own email" is "don't do it; you'll get hacked."

Three questions:

1. Have you heard of this complaint?

2. Do you use a home ISP connection, or a commercial ISP connection? A "home ISP connection" here usually comes with a dynamic IP address; you can't get your hands on a static address without paying a very large amount monthly or getting a commercial connection.

3. You say "I don't expose anything to the public internet unless absolutely necessary." Is your ip address via your domain name one of those "necessary" items?

ryjo··on A Simple TCP Server Written in Go and CLIPS
I just finished writing this article describing how to write a multi-user environment in CLIPS and Go. This article describes how one might write an arbitrary web application that users can connect to and use over TCP/IP.

I hope that it can help some folks out there get the gears turning on what is possible with CLIPS! I'd love to hear feedback on what you all think.

ryjo··on Show HN: Tour of CLIPS
Thank you :) glad you found it helpful
ryjo··on Show HN: Tour of CLIPS
Thanks! Really good feedback. I'll be adding on to this overtime, and this would be a great addition.

Games are the easiest analogy because they describe their features as "rules," but I've seen Rules Engines/Expert Systems reveal themselves organically across multiple domains. Try applying the concept of "Rules" that trigger when data in your system matches a certain pattern.

ryjo··on Build Pong in Your Terminal with Go for Some Reason
Love the other "this is how I learned <language>, too" comments. I'll add mine into the mix :) note this was implemented in 2014: https://github.com/mrryanjohnston/golang-experiments/tree/ma...

I think videogames are a great way to showcase channels in Go.

ryjo··on Show HN: A chat server with no client side scripts
I wanted to try this out, but it looks like it's no longer working. How do you know when others are talking if you don't have client side scripts to load data from the server?
ryjo··on Aerc – An email client that runs in the terminal
I can tell from the video that the interface is quite easy to navigate if you're a vim user. Very impressive work!
ryjo··on Ask HN: What operating system do you use?
Lubuntu. I like the balance it strikes between light-weightness and completeness.
← PreviousPage 2 of 2