Hacker News new | past | comments | ask | show | jobs | submit login
Web Prolog and the Programmable Prolog Web [pdf] (github.com)
125 points by triska 9 months ago | hide | past | web | favorite | 41 comments



The primary author of this system is Torbjörn Lager, the inventor of Pengines:

https://www.gu.se/english/research/publication/?publicationI...

This functionality is the basis of many current web-based Prolog applications.

Web Prolog is a natural successor of Pengines. The book also includes a comparison of the two approaches.

Portability between implementations is a major goal and attraction of Web Prolog. Here is a quote from the book:

An application written in Web Prolog is portable between different node implementations. Indeed, an application written in pure Web Prolog will not only be portable in the normal sense, but we will likely also be able to run it on a node that we do not own nor manage.

The language is described as "based on Prolog, with a pinch of Erlang sprinkled in".

A tutorial-style introduction to Web Prolog is also included in the repository:

https://github.com/Web-Prolog/swi-web-prolog/blob/master/web...



This is certainly intriguing, although I do wonder what "killer app" this might be used for.

The 'ISOBASE' and 'ISOTOPE' profiles seem to be the most useful, for allowing users to submit arbitrarily complex queries to a server, yet this seems to run up against the same social/market pressures as RDF, i.e. it's often more economical to accumulate data into a closed silo with a strictly limited interface.

I can imagine a SaaS company using this as an API for paying clients (perhaps even charging for CPU and memory usage), but such use cases aren't exactly an "open Web".


Hi, and thanks for your comments. I'm Torbjörn - the guy behind the book manuscript and the proof-of-concept implementation.

Well, the book manuscript still needs a chapter dealing with possible use cases - I'm thinking of web-based conversational agents (using an actors as dialogue managers, DCG for grammars and and speech recognition and -synthesis built into browsers). Or a game of some kind perhaps - with game AI using Prolog.

Also, I like to think of the Prolog Web as a killer app. The idea of "wrapping the regular web in logic" appeals to me. Not as a replacement for the semantic web, but as something running alongside it, making it more easily programmable. And the Prolog Web comes with an architecture, something which is not true of the semantic web AFAIK. Of course, the Prolog Web also lacks a lot of features promised by the semantic web - a logic sufficiently expressive to built ontologies for example. The Prolog Web tries to complement the Semantic Web, not to replace it.

You are right that for some applications, only what is offered by the ISOBASE or ISOTOPE profiles will be needed. But something like the IDE in the PoC cannot be be served by those profiles - the ACTOR profile is needed there. Or consider a multiplayer game that requires the server to send periodic snapshots of the world state to the client. This is better handled using push technology, rather than pull, and server push is only offered by an ACTOR node.

I agree that a SaaS company might offer an API to a Prolog in the cloud. (I should talk to the people behind SICStus Prolog about that - one of the few commerical Prolog vendors still in existence. :) And no, that's not an "open Web". But what is usually referred to as the open web is only open by default isn't it, until someone choose to "close" it and charge for access. Hopefully, enough people in the Prolog community would choose to keep the Prolog Web open.


Yeah, I used Prolog in academic tasks. I remember that I have many problems with installation and usage in modern Windows. Web idea looks like a great. Self-hosted is very ok, but cloud app like that "Overlaf.com" probably will be the best


SWI worked always quite well on Windows.


Oh, do you mean SWI Prolog? http://www.swi-prolog.org/


Yes, I was using it without any major issue in 1997 - 1999.


This will be fun to play with


I'm not not sure if Prof. Torbjörn Lager of the University of Gothenburg knows this, but in America "Make X Great Again" has very political overtones. To those of us with colored skin, "MAGA" has been yelled with racial overtones.

Best to keep this kind of stuff away from programming, maybe?


"Make X great again" was once a neutral phrase, and has now been misappropriated and politicized. I say - let's make it neutral again! And kudos to Prof. Lager for doing just that.


> was once a neutral phrase, and has now been misappropriated and politicized

If the phrase was politicized, you'll have to blame Trump for using it as the slogan for his political campaign.


I'm not interested in blaming or praising anyone, I just want to use simple phrases like "let's make math joyful again" without worrying someone might associate it with racism or other things that didn't even cross my mind.

It's not about MAGA anymore, it's just more and more often people's innocuous statements are interpreted in an offensive way, and at some point you just prefer not to speak anymore because you don't know what can be offending, and you don't ever touch important matters, keeping your opinions to yourself, maybe allowing a watered-down version that actually doesn't make any point - and that's the public discourse today.


How do you suggest the author replaces the sentiment to make prolog great again in text to cater to your sensibilities?


They could easily remove it. It bothers me that the parent comment has been downvoted so heavily—"MAGA" does have racial overtones and probably doesn't belong in a technical document. I'm sure the author meant it as a joke (especially as a European who isn't familiar with American culture), but that doesn't invalidate the criticism.


I didn't know it had racial overtones. Here in the UK it's usually said with a sarcastic laugh when we want to mock Trump and hit him with a slogan we remember from the US presidential campaign. The inference being he's really not 'great' and he's devalued the USA by being its president.

Good to know, I will avoid in future.


We use it that way as well. As in: "Added $1T to the deficit and still no universal healthcare! #MAGA"

But minorities in this country have to put up with being told to leave now on a regular basis. Hate crimes are on the rise. You're now labeled a racist for standing up to racism. Racists are emboldened and cite the President as the reason for their newfound brazenness. People who simply support the President want to pretend that it's just a slogan, but they're in company with very unsavory people (the KKK aren't Democrats) who use that slogan as a weapon every day. Every. Day. And so to expect to be free from that onslaught in a paper about Prolog I don't think is much to ask. But clearly this is still Trump's world.


It only has ‘racial overtones’ to people trying to disparage a little under half the country. The author should probably remove it, but the continued perverting of people’s arguments and slogans to make them appear racist is not helping anyone.


I see what you're trying to say, but you're extending the OP's comment to address a point he's not making.

If an individual has adopted a characteristic slogan, and that individual makes racist statements, then the slogan can reasonably said to be linked to racist ideas. Note that this analysis doesn't need to include any third parties.


If an individual has adopted a characteristic slogan, and that individual makes racist statements, then the slogan can reasonably said to be linked to racist ideas.

No, that is not a true statement since I can basically make it impossible to say anything by adopting that idea. Number two, your view of what is racist statements if you are talking about the President is skewed. Immigration is a hot button topic, but wanting to reign in immigration is not racist ask anyone fired because their company brought in H1B workers and they had to train them before hitting the road. Heck, the recent hubbub over calling MS-13 animals and then saying its racist shows how screwed these views are.

The professor was obviously having some fun and its a great paper. Stop trying to make people feel bad because you are offended.

I swear, people would claim, "I Like Ike" is racist if it was a 2016 campaign slogan.


The slogan was that of a campaign that was launched on the premise that most Mexicans coming to this country are rapists and murderers, and that by the law of large numbers some end up being good people. Immigration is a hot button issue, but the President has fanned those flames considerably since he came on the scene, and every colored person and minority in this country has felt it. Every KKK member if you ask them will tell you they feel emboldened and empowered by this President in large part due to his rhetoric. If you ask any of your friends of color, they'll tell you things are markedly different now, in large part due to the rhetoric of this President. MAGA is completely tied in with that rhetoric, because what does it imply. What exactly was proposed by the MAGA coalition?

- Build a wall to keep out brown people

- Prevent Muslims from entering the country

- Judges of Mexican descent are unable to do their job because of their race

- Inner cities are hellscapes that require law and order and perhaps the national guard to regain peace

- Homosexuals don't deserve the same rights as the rest of us (ask any Trump supporter if they believe Trump believes in gay marriage and they will tell you no)

- Women deserve to be mocked, disbelieved, assaulted, and their bodies controlled, and there are no repercussions for doing so.

That's what MAGA represents to 50% of the population. So if you want to bring it up in your technical document as a little side quip, and not give a shit about what your readers think, more power to you. But as someone interested in Prolog and would like to see it have a renaissance, I was lost as a reader on the cover page. I don't want to be reminded about the guy at the grocery store telling me to get out of "His" country and go back to where I came from while reading technical documents. MAGA.

> Heck, the recent hubbub over calling MS-13 animals and then saying its racist shows how screwed these views are.

Strange how brown gang members are clearly, unequivocally all animals, but this President has to point out in a group of white torch-bearing khaki-clad Nazis there are still good people! I wonder how many white children in America are separated from their families and held in cages in windowless detention facilities in accordance with official DOJ policy.


ask any Trump supporter if they believe Trump believes in gay marriage and they will tell you no

This basically could be the summary line of everything you wrote. Its about as true as the rest. If you pervert everything and don't actually listen its about as believable as Strange how brown gang members are clearly, unequivocally all animals, but this President has to point out in a group of white torch-bearing khaki-clad Nazis there are still good people!. Go look at some of the pictures of what MS-13 does, and I would hope animal is the least descriptive word.

I do blame the media because they know the outrage sells, but it comes at a cost.

That's what MAGA represents to 50% of the population. So if you want to bring it up in your technical document as a little side quip, and not give a shit about what your readers think, more power to you. But as someone interested in Prolog and would like to see it have a renaissance, I was lost as a reader on the cover page. I don't want to be reminded about the guy at the grocery store telling me to get out of "His" country and go back to where I came from while reading technical documents. MAGA.

I suppose you have similar objections to the late night comics and Tony awards? Just read the paper about an amazing language and understand that about 50% aren't monsters and don't hate people.


> I do blame the media because they know the outrage sells, but it comes at a cost.

I hardly listen to the media. I listen to the President's words and watch his actions. Trump accused a judge of being unfit due to his racial heritage, not the media. Trump called for a ban of all Muslims entering the US. "Donald J. Trump is calling for a total and complete shutdown of Muslims entering the United States until our country's representatives can figure out what is going on" I believe were his exact words. You claim media bias, whereas I see a string of clearly racist behavior.

> I suppose you have similar objections to the late night comics and Tony awards?

I don't watch late night comedy or the Tony awards. I read scientific papers. I think there is a problem with marginalization of minorities in tech. I'm not the only one.

> Just read the paper about an amazing language and understand that about 50% aren't monsters and don't hate people.

Okay, I'll agree to read the paper and consider what you say, if you'll agree to consider that some people are monsters; said monsters say they feel emboldened by this president (just ask them); and that some people have to face said monsters at a higher frequency than others due to the nature of their skin, religion, sexual orientation, etc.; and maybe these people look toward tech to be a respite from that. Some people face monsters down on the sidewalk, at work, at school, at the dentist, in traffic, and now of all places in a Prolog paper. And despite the fact that tech writ large likes to champion a message of inclusivity, there seems to be a strong under-current with a desire to prop up messages of exclusivity. Just consider it.


Nope, sorry, you said all and I know people who voted for Trump and they are the nicest most helpful people around. You are fear mongering all of them and need the world edited so it doesn't offend you while not acknowledging that the vast array of media offends about 50% out of spite. I don't think you actually are listening to anyone else and certainly the complete shutdown comment comes not from the actual executive orders.

Yeah, there is a problem marginalizing minorities in tech, but it is the fault of awful recruiting practices by the schools tech companies hire from to remain elite. I'm on a rez, and am a bit sick of being an "other".


> I don't think you actually are listening to anyone else and certainly the complete shutdown comment comes not from the actual executive orders.

That language is missing from the executive orders because it would be blatantly and gobsmackingly illegal. Trump went to Rudy Guliani and asked him to make the text of his Muslim ban decree pass legal muster. That's not according to the media, that's from Guliani's own mouth. So we've got a blatantly racist statement getting watered down to an obfuscated racist statement loosely predicated on national security reasoning and some vague call for extreme vetting and terrorist states.... but for those of us on the receiving end of such proclamations, we hear the message loud and clear. There are exactly 0 Muslims who heard his "Total and Complete Shutdown" proclamation and then saw the travel ban and thought "Phew, it turns out Trump isn't anti Muslim after all." No, they recognized that Trump couldn't get what he wanted 100%, but what he did get represented a personal attack on them based on their religion. That attack happened and it hurt people and families, and that doesn't change because he didn't include the phrase "complete shutdown" in the EO.

And your Trump supporting friends may be the nicest people around according to you, but again, we hear the message loud and clear from Trump, and all we hear from Trump's base in opposition to Trump's blatant and sustained racism is hand wringing and capitulation. You included. "All it takes for evil to succeed is for good people to do nothing". We need to start listening to our inspirational posters, because they hold more wisdom than the average American mind.

And by the way, it's not fear mongering when you've personally experienced threatening behavior from people wearing symbols such as confederate flags, nazi swastikas, and more often as of late, red MAGA caps. And these symbols tend to come in clusters. They tend to co-mingle. Why is that? They're not exactly championing the flying spaghetti monster. Maybe it's because the symbols they champion each promise to systematically favor their race by erecting prejudiced power structures? Certainly true of the confederate flag. Certainly true of the Nazi swastika. You don't see how MAGA caps fall right in with a long line of racist symbology?

Every day on the internet you can read a new tweet from a Trump supporter kindly suggesting all brown people to leave the country #MAGA. Please note again they're not attaching #FSM to their Tweet. They chose #MAGA. Why is that? Why are people who want all brown people to leave the country drawn to #MAGA. What does it represent to them? And not just one tweet, you could spend all day reading new tweets saying the same thing, day in and day out. Those attitudes are spilling over into real life. It is pervasive for some people. All day, every day. I would love to edit my world to remove that constant background drone of hate, but I can't do that. I can't have that because every time someone stands up, someone else tells them to sit down, and deal.

What I can do is find little pockets of respite in this world where, I'm less likely to encounter such negativity, and call it out when I see it. Prolog technical documents are no place for riffs on political slogans and especially no place for what many people perceive as coded racist language. No one here is even arguing against those points -- instead the argument seems to revolve around whether or not MAGA is a racist phrase, which seems to sidestep the entire consideration that many people do in fact perceive it as a racist phrase.


It's very likely to be a joke about the Trump campaign. The chance of it being in unironic support of the original use of the slogan is very small.


Prof. Torbjörn Lager was my teacher in a few courses back in around 2005, I even had a beer or two with him. He is a very smart and funny guy - I can say with 100% certainty that he means it as a joke.


No doubt, but that's not the point.

He made the joke in public, and to a portion of his audience it falls flat (to put it mildly.)


That's my point. Some of us will read this paper and not even notice the reference. Some will notice the reference and not be bothered by it.

But then there are those of us who have experienced overt racism connected to this phrase who won't be able to read this paper without thinking about that trauma every other line.

We talk a good talk about making tech more inclusive, but it seems when we have an easy and obvious choice, there is resistance. Taking the MAGA reference out of this paper would do nothing to diminish it on a technical level, and it would cause more people to read it. Perhaps even this thread would have related to the technical merits of the paper, rather than the derailment I caused. Yet there are multiple responses here expressing resistance to the idea on principle. Again, an idea that would result in better outcomes for everyone.


ModernMech says>"...in America "Make X Great Again" has very political overtones..."

Sometimes, but only rarely. Sometimes a cigar is just a cigar.

Your labeling of every possible phrase of the form "Make X Great Again" does violence to the English language by disallowing certain forms of speech. As one other poster states herein, by banning phrases of those you politically oppose, you could eventually circumscribe the entire language and prevent most all free speech.

When I was 4 years old I learned that "Sticks and stones may break my bones but words will never harm me." and I absorbed the concept <b>fully</b> at that age. Were you to not have absorbed that lesson yet or to have rejected that concept, having reached adulthood, would be unfortunate. Indeed, because you do not appear to be stunted intellectually, I do not believe you have not heard and absorbed that lesson. I _do_ however, believe that you, in a Machiavellian manner, are attempting to gain advantage by restricting argumentation arbitrarily.


This comment generalizing a US centric problem to the world is full of imperialist overtones.

Best to keep this kind of comment away from sites with a global audience.


The paper is in English.


Marginalization of minorities in tech is a global problem.


Yes, please do that.


That's completely preposterous, along with this whole "dog whistle" conspiracy theory that they are pushing in the US.


You're saying it's preposterous that people use coded language to affect racist policy goals in order to avoid political backlash for anti-social beliefs? Really, that's preposterous?


Yes, that is preposterous.

Let's assume for the sake of argument that it's true. The people who promote the theory seem to be the only ones capable of hearing this whistle, the theory itself being political backlash, so it clearly defeats its own purpose in that regard. And of course it does nothing to prevent backlash from the actual policy goals.

It's simply an attempt to get away with arguing against straw men. Taking a perfectly reasonable statement, such as "enforce established immigration law" and take it to be "code" for something completely indefensible like "keep out those subhuman spics". It's hard to argue against the former, much easier to argue against the latter. Of course it does nothing to change the mind of your opponent who already knows and agrees that people of any given ethnicity are not less than human, but it does prevent those in your own camp from taking anything your opponent says as a reasonable statement.

Scott Adams described the phenomenon in a recent blog post: http://blog.dilbert.com/2018/06/10/why-democrats-hear-a-secr...


MAGA has nothing to do with race. Ask Larry Elder, Candace Owens, Kanye, Thomas Sowell, or Walter Winchell.


to me, the fact that you're earnestly enumerating individuals is itself noteworthy. if things were so simple and so obvious, i feel like the idea of naming people would be absurd, because the examples would be legion.


It is indeed noteworthy. I respect all of these people hugely and I’m glad you’re willing to lump me in with them


this seems nonsequitur.




Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: