Hacker Newsnew | past | comments | ask | show | jobs | submit | xabush's commentslogin

I don't understand (the point of) your example. In all branches of the search `X > 5` will never be `true` so yeah `slow_computation` will not be reached. How does that relate to your point of it being "brute force"

>> but if it did, it would come up with the same result

Meaning either changing the condition or the order of the clauses. How do you expect Prolog to proceed to `slow_computation` when you have declared a statement (X > 5) that is always false before it.


The point is to compare a) evaluate all three lines (member, >5, slow_computation) then fail because the >5 test failed; against b) evaluate (member, >5) then fail. And to ask whether that's the mechanism YeGoblynQueyne is referring to. If so, is it valid to describe b as "the polar opposite" of a? They don't feel like opposites, merely an implementation detail performance hack. We can imagine some completely different strategy such as "I know from some other Constraint Logic propagation that slow_computation has no solutions so I don't even need to go as far as the X>5 test" which is "clever" not "brute".

> "How do you expect Prolog to proceed to `slow_computation` when you have declared a statement (X > 5) that is always false before it"

I know it doesn't, but there's no reason why it can't. In a C-like language it's common to do short-circuit Boolean logic evaluation like:

    A && B && C
and if the first AND fails, the second is not tested. But if the language/implementation doesn't have that short-circuit optimisation, both tests are run, the outcome doesn't change. The short-circuit eval isn't the opposite of the full eval. And yes this is nitpicking the term "polar opposite of" but that's the relevant bit about whether something is clever or brute - if you go into every door, that's brute. If you try every door and some are locked, that's still brute. If you see some doors have snow up to them and you skip the ones with no footprints, that's completely different.


Amazing design! Just joined the mailing list


How does Scallop scale on large knowledge bases (KBs) for doing probabilistic reasoning? I'm currently working on large KB with ~ 12M facts and trying to do probabilistic inference on it. So far I've been using [cplint](https://friguzzi.github.io/cplint/_build/html/index.html) which is based on SWI-Prolog. It works fine for toy examples, however, it doesn't finish running for the large KB - even after waiting for it for more than a week. Does know any Probabilistic Logic Programming (PLP) libraries that are fast and scale to large KBs? Preferably in Prolog ecosystem, but not a hard requirement.



I am surprised you have problems with 12M facts and can't process them in a week, looks like bug in software you are using.


Thanks for the comment. Have you run cplint on a kb of the similar size before and gotten it to finish in reasonable time?


I never used cplint, but I use other software (including I built myself) to process KBs with many billions of facts.


Is the software open-source? If so, can you share a link to it?


IM are legendary! I still listen to them now and then. My favorite tracks from them are - 'Deeply Disturbed', 'Becoming Insane' and 'Where do I belong'. Not exactly the same, but checkout Astrix and Neelix if you haven't already.


I love infected mushroom too. On my Spotify list, I noticed that it was recommending more Offbeat to me. I didn’t know it was called offbeat until I saw it on the guide.


This is an interesting anecdote. I have gotten high several times during my college years and less so since I started my career. In all of the cases I got high, it was primarily for entertainment purposes. However, whenever I am high, I get some sense of clarity about problems that were irking me the week before (I usually do weed over the weekends). This led me to wonder, esp. lately, what if there is actually some connection between productivity and marijuana use (not abuse) and your experience seems to be inline with that. Ofcourse, there are trove of other anecdotes about how weed is used for creative/artistic purposes but I haven't come across ones related to programming.


Jobs always said acid was critical to his success. He dropped a good amount of acid, so that probably really would make you think differently.

People can mock it all they want, but I really do get very creative on weed. There's a reason creative companies don't test for it...

It's not something I've shared, but it always surprises me how often I smell weed on the street (again, "illegal"), how easy it is to get, and how many people I wouldn't expect "abused" it at one point or another. I was scared of telling my parents for a long time but came to find out they were both drug using hippies, anyway.


Youtube, Gmail and Drive pages open in incognito mode but can't sign in. The issue seems with the account manager.


Or use Rust as it fits this particular use case where you need a language that’s low-level and safe.


I mean, sure, but kind of left field there, no? I'm solely quoting the article and pointing out that the statements made, taken together, make the conclusion the guy came to seem very...strange.


This excellent video delves into the economics of nuclear power plants and compares them with the alternatives. https://www.youtube.com/watch?v=UC_BCz0pzMw

Although nuclear energy is profitable of the LONG term, it is financially infeasible over the short-to-medium term.


Very interesting and helpful !


This is great tutorial. I used to be confused by the macros in scheme


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

Search: