Live data from Hacker News

Amzi Prolog becomes open source

amzi.com

41–50 of 50 posts

Re: Amzi Prolog becomes open source

#41

Earlier quoted context omitted.

I'm first of all excited by the fact that this made first page on HN. I didn't realise there was that much interest in Prolog news (as in more than two or three people). Also, having more open-source Prolog engines is a very good thing, both for the language and for the project itself. For the project, it's good because it makes it easier for a community to grow around it. Swi has benefited enormously from its popula…

That makes sense. Ensuring compatibility and network effects were key attributes successful software in Gabriel's Worse is Better essays. That Prolog implementations have inadvertently sabotaged that effect probably contributes to them being less niche than they would be. Btw, have you tried Mercury? My last foray into logic programming made it seem like it was killing Prologs in quite a few fronts. Prover work moved…

>> Regarding dissertation, I lost most of life's work when three HD's (main + 2 backups) all died within short time of each other. Encrypted with custom crypto that also fried haha

Ouch. Oh dear, that sounds horrible.

>> Btw, have you tried Mercury?

I've picked it up a few times but I keep coming back to vanilla Prolog. It's great but I'm a bit scared by the tiny amount of adoption. I know it's kind of ironic: low adoption feeds back on to itself.

>> Any ideas on why it's worth keeping around or would you use an alternative today?

I do a lot of nlp for university, and although I use Python for all the machine learning stuff, the text processing capabilities of Prolog are beyond any comparison with anything else.

For instance, everyone uses regular expressions for tiny bits of parsing and string manipulation. Prolog uses a sort of pattern matching, unification, that is like regular expressions except without any special syntax and Turing-complete.

For language processing, most interpreters have something called Definite Clause Grammars. In short, it's syntactic sugar that lets you declare a grammar, except the grammar is also a parser, that recognises and generate strings (because Prolog). They make developing a parser a piece of cake.

Also, Prolog runtimes are essentially fast, in-memory relational databases, with added reasoning (and no SQL). I can think of many applications that could use that sort of thing. Plus, the language itself is the database, so there's no object-relational impedance mismatch and whatnot.

>> Might try to read some of it this week if I get spare time even though idk Prolog anymore

Thanks, I appreciate that. But please keep in mind: 5 years ago and embarrassing :)

Re: Amzi Prolog becomes open source

#42

Earlier quoted context omitted.

Just a note on Nani Quest/Adventure in Prolog: it doesn't work in SWI-pl. I gave it a shot about 6 months ago and got to chapter 7 before stuff stopped working right. It was an excellent tutorial up to that point though.

Porting the rest might make for a nice CompSci project for someone in that niche.

Well you can find versions on github (that's how I realized it was incompatible, instead of me being incompetent) but it's not terribly great pedagogy to have a text book explaining things piece meal and then having to sort of eyeball some one else's full source code and try to guess which bits are necessary changes and which are that persons idiosyncrasies.

Re: Amzi Prolog becomes open source

#44

Earlier quoted context omitted.

Porting the rest might make for a nice CompSci project for someone in that niche.

Well you can find versions on github (that's how I realized it was incompatible, instead of me being incompetent) but it's not terribly great pedagogy to have a text book explaining things piece meal and then having to sort of eyeball some one else's full source code and try to guess which bits are necessary changes and which are that persons idiosyncrasies.

Good points. Maybe just clean slate one in a similar style.

Re: Amzi Prolog becomes open source

#45

Earlier quoted context omitted.

The problem is there are subtle differences between implementations that bite you in ways you never thought possible, and it's just aaaargh hard to get the same program running in the same way on two different Prologs. Or even between versions of the same implementation. E.g., I know of one project that sticks with SICStus 3, because in SICStus 4 findall/3 removes blocked goals from copied variables. This system reli…

>> Or even between versions of the same implementation. E.g., I know of one project that sticks with SICStus 3, because in SICStus 4 findall/3 removes blocked goals from copied variables. This system relies quite heavily on blocked goals and working around this change turned out to be too expensive. When you say "blocked goals" do you mean it like: :-block(a_block). % ... stuff ... :-end_block(a_block). That sort of…

When you say "blocked goals" do you mean it like:

These:

https://sicstus.sics.se/sicstus/docs/latest4/html/sicstus.ht...

https://sicstus.sics.se/sicstus/docs/4.0.7/html/sicstus/Bloc...

Re: Amzi Prolog becomes open source

#46

Earlier quoted context omitted.

I work in academia, where SICStus is usually the most popular besides SWI Prolog. If SICStus went open source, that would be big news for me/us. This not so much. If SICStus went open source or free for academic use, I would probably use that in my research/courses over SWI Prolog. Mostly because of familiarity, performance, and compatibility reasons.

So, that's two votes for SICStus. What do you use Prolog for with what advantages?

I am currently not actively using Prolog. But during my PhD for natural language generation of Dutch, in the Alpino system:

http://www.let.rug.nl/vannoord/alp/Alpino/

Prolog has some nice advantages for such knowledge-based language processing:

- With relatively little work, terms can be used to represent linguistic feature structures. You can build a small type system using meta programming and define operators on feature structures.

- Unification can be used build larger structures, check syntactic constraints, etc.

- Backtracking makes handling ambiguity in parsers/generators much easier

There are two quite elaborate chapters in my PhD thesis about the system mentioned above and the generator:

http://danieldk.eu/Research/Publications/phd-thesis.pdf

Though for the time being, I am working on dependency parsing using deep neural nets (like everyone else ;)).

Re: Amzi Prolog becomes open source

#47

Slightly off topic... How does Prolog compare to Erlang, which was written in Prolog (at least the initial implementation was).

Very late response, and only cursory, but:

Prolog and erlang are not the same, or even particularly similar. Some features (such as unification, which is what erlang uses, not assignment, with the = symbol) are present, and inspired by, prolog. But the underlying computational models aren't the same. Erlang is functional/concurrent/procedural (procedural meaning you write an explicit sequence of steps). Prolog is functional/declarative. You don't (normally) write explicit steps. Rather, you describe the solution you want to find, describe the configuration of a system (essentially propositions and axioms), and let prolog search for your solution. You can do a lot more than that with the operators (declaring order of execution, terminating early, etc.), but the underlying computational model is this search. You would not use them for the same domain.

You can because they're both turing complete and thus capable of expressing the same computations. You won't because erlang excels in its concurrency model (and performance with many concurrent processes), and prolog excels in its declarative/search model. I believe there are some other languages (Oz/Mozart?) that might be suitable if you want a hybrid of erlang's concurrency and prolog's declarative model.

Re: Amzi Prolog becomes open source

#48

Earlier quoted context omitted.

>> Or even between versions of the same implementation. E.g., I know of one project that sticks with SICStus 3, because in SICStus 4 findall/3 removes blocked goals from copied variables. This system relies quite heavily on blocked goals and working around this change turned out to be too expensive. When you say "blocked goals" do you mean it like: :-block(a_block). % ... stuff ... :-end_block(a_block). That sort of…

When you say "blocked goals" do you mean it like: These: https://sicstus.sics.se/sicstus/docs/latest4/html/sicstus.ht... https://sicstus.sics.se/sicstus/docs/4.0.7/html/sicstus/Bloc...

Ah, OK, when/2 -cheers :)

Re: Amzi Prolog becomes open source

#49

Earlier quoted context omitted.

So, that's two votes for SICStus. What do you use Prolog for with what advantages?

I am currently not actively using Prolog. But during my PhD for natural language generation of Dutch, in the Alpino system: http://www.let.rug.nl/vannoord/alp/Alpino/ Prolog has some nice advantages for such knowledge-based language processing: - With relatively little work, terms can be used to represent linguistic feature structures. You can build a small type system using meta programming and define operators on f…

Appreciate the tips and link.

Re: Amzi Prolog becomes open source

#50
post #39

Earlier quoted context omitted.

"I clearly said that "free and commercial software are a FALSE dichotomy" -- meaning that you can have commercial free software." Oh, I apologize. I clearly misread that exact statement. I bet it's because free, commercial, and false in same sentence almost always are arguing against what you said. That the two can't be combined. Whereas, we're arguing in different ways that they can. I must have skimmed it with my b…

> What firms are bringing in billions licensing or selling free software? I work for SUSE, which is a free software company. Red Hat is another, as you mentioned. I found a list on Wikipedia[1] which has quite a few entries (though quite a few of those companies either no longer exist or were bought out by companies that don't exclusively work on free software). > You can sell truly free software but almost nobody wi…

Thanks for a thorough reply. I'll try to address the concerns.

"I found a list on Wikipedia[1] which has quite a few entries (though quite a few of those companies either no longer exist or were bought out by companies that don't exclusively work on free software)."

Appreciate the list. A bunch of those, including yours, are proprietary software companies that also GPL stuff. Or hybrids were a huge chunk of the revenue is support or GPL-component consulting instead of licensing proprietary addons. Still worth considering but not a "free software" company if issuing paid licenses.

" it's also security updates and bug fixes (which are sometimes written by us and contributed back to the community). This sort of business model allows you to sell completely free software, because you're not selling the actual software you're selling licenses and support."

That's true. It's also the model that rarely makes any real money. Red Hat and SUSE are exceptions to the rule, esp Red Hat. That they both license proprietary software on top of that model clouds the issue further. We'd have to have companies with only FOSS offerings plus support and services matching those or proprietary revenues to make the argument. I'll look at your link to see if I find those plus if there's financial data on app/feature vs support licensing to see what split of the revenue/profit they make.

"but you have no practical freedom in that case because you cannot share your improvements to create a community -- one of the goals of the free software movement."

You can do that exactly how I described. You underestimate how powerful of communities that can develop around proprietary software. Microsoft and IBM are extreme examples that had more to do with monopolistic practices. So, maybe Borland's Delphi or even early Solaris are better examples. The community is just limited to those that are willing to pay. That's FOSS's advantage.

" If you don't have the freedom to distribute modified and unmodified copies then you're (practically) at the mercy of the company that gave you the software."

This is a huge problem. It's why I'm working to eliminate it but FOSS has clear advantage here. We saw this with Oracle dropping OpenSolaris followed by others picking it up.

"Proprietary software is distributed in binary form only."

That's not true at all. MCP, the villain in Tron & brilliant OS for Burroughs, was distributed in source form to clients in the 60's with their modifications/fixes often going into new releases. Many proprietary software since were similarly shared source. The high-assurance security kernels even mandated vendors supplying source so you could meet A1-class requirement of inspecting and building it yourself. Even Windows source is available to some partners. There's also dual-licensed model where free software is a byproduct of licensing proprietary, shared-source software. So, proprietary and source available are not contradictory in any way. It's just distribution part as you said where distinctions must be made.

"If you sell support (clients pay for you to develop new features for them, providing security fixes, bug fixes, etc) then you can make money selling completely free software."

This is true. The question is "Do I make the same money at same market share as if I license it for low pricing?" I can imagine a database that cost even $5,000 per organization that's competitive with popular RDBMS on common usage with better reliability or security will probably break even on its development cost after first few dozen or so customers. That's plenty for development with enough left for support and administrative stuff. A $1,000/yr support agreement will take substantially more customers to cover all costs, especially development. Only exception I could see is if the developers were the admins and support people as well with obvious productivity issues.

So, that's the key difference. If it's paid, I can put more into the product to benefit my users while making some good profit along the way. Or hardly any at all depending on my goals. A support-driven organization can't compete unless they have crazy market share. I can also afford better talent, 3rd party solutions to tough problems (eg enterprise integrations), and patents for leverage in suits. Worst case, I can [L]GPL a specific product after a certain number of years to ensure minimum amount of investment recovered with it going to support contracts from there on.

Quite a few possibilities. I contend the only advantage FOSS has... maybe temporarily or maybe inevitably... is network effects of spreading as other benefits can be had in shared-source, paid agreements. Even isolation of risk of company with its charter or license terms.

Post reply on HN