Re: [Jprogramming] Logic programming

2020-02-06 Thread Raul Miller
I do not think that I said that 5!:5 produces erroneous results. I think I said that when non-nouns are involved that the result of 5!:5 may not be a suitable ". argument. Here's an example: example=:3 :0 a=:'this' b=:a,' is a' b,y ) With that definition, this works: example i.0 B

Re: [Jprogramming] Logic programming

2020-02-04 Thread Henry Rich
If you know of cases where 5!:5 produces an erroneous result, please put them on the bug list.  I have fixed all that I have seen. Of course, ". cannot produce a non-noun result. Henry Rich On 2/4/2020 12:15 PM, Raul Miller wrote: Perhaps also of note is that J has supports several forms of s

Re: [Jprogramming] Logic programming

2020-02-04 Thread Raul Miller
Perhaps also of note is that J has supports several forms of serialization (as well as similar operations), though they each have their limitations. If you are working with nouns, 5!:5 is probably the best serialization mechanism (and, when working with nouns, 5!:6 is equivalent): X=: i.2 3

Re: [Jprogramming] Logic programming

2020-02-04 Thread 'Pascal Jasmin' via Programming
The way to return a conjunction from a conjunction (which I understand you were struggling with) is to build a string, substituting your initial u and v into the returned conjunction and placing literal u/v into string. A conjunction that returns a conjunction that adds all of its parameters  

[Jprogramming] Logic programming

2020-02-03 Thread Raoul Schorer
Hi, I've been working hard implementing minikanren in J. It's a minimal logic language that at the difference of prolog is purely relational and very well suited to a library due to its shallow embedding. The lib currently can compute on lazy "streams" and does conjunction, disjunction and syntac

Re: [Jprogramming] logic

2014-03-05 Thread Michal Wallace
Heya Pascal: Yep, the binary representation of i.2^n gives you every combination of n bits (n boolean inputs). I'm not sure I understand what you mean by the state of propositions. Are you talking about being able to assert and retract facts and rules, like in prolog? I made a little datalog-li

Re: [Jprogramming] logic

2014-03-03 Thread Pascal Jasmin
? - Original Message - From: Michal Wallace To: programm...@jsoftware.com Cc: Sent: Monday, March 3, 2014 1:06:19 AM Subject: [Jprogramming] logic Here's a library I use quite a bit for talking about and studying logic on IRC: https://github.com/tangentstorm/tangentlabs/blob/mas

[Jprogramming] logic

2014-03-02 Thread Michal Wallace
Here's a library I use quite a bit for talking about and studying logic on IRC: https://github.com/tangentstorm/tangentlabs/blob/master/j/logic.ijs Most of the lines in that file are just assertions demonstrating the laws of propositional logic. The two most interesting lines, though, are the de