https://kotlinlang.org logo
#random
Title
c

cedric

05/08/2017, 5:58 AM
And you're about to have two.
scala 2
😆 5
g

groostav

05/08/2017, 8:48 AM
cedric: I cant really go into why we're developing in fortran, but regarding prolog, what I'm looking for is a nicely interfaced constraint solver: http://stackoverflow.com/questions/43841996/using-clpr-for-a-system-of-constraints
c
c

cedric

05/08/2017, 2:42 PM
@codeslubber Would have been nice to see a few examples in action. Logic programming can be impressive on small examples but hardly ever scales
c

codeslubber

05/08/2017, 2:46 PM
@cedric no, and I agree, having looked at Prolog in the past, I have almost never seen anything past the quick parlor trick. What do you think about constraint programming? clearly the idea makes sense of describing the solution. Although those types of descriptions seem absurd ‘tell the computer your problem and let it find the solution…’
c

cedric

05/08/2017, 2:47 PM
Writing a unifier is probably the first thing I did when I learned Lisp 30 years ago. You make it run on a few easy problems (equation solving), think it's pretty neat and then move on to other things
c

codeslubber

05/08/2017, 2:48 PM
Isn’t the whole world of programming plagued by different degrees of that same problem though? all the way back to K&R with its single line copy, that includes no error handling (and the intro to the book says ‘don’t take our examples as how you should program..‘)
As much as I like Swift, I haven’t seen a single substantial example in the Apple guides/example projects. Their main project they use to illustrate the platform now is called Lister and it’s a dumpster fire of half-baked stuff, with very little structure, and few impressive language feats..
I was interested in the idea of declarative programming as a potential solution to logic chains with probability.. have you ever seen any probability code that wasn’t simply plowing a pile of data to compute a single score or classification? even something as simple as following a path of a few nodes, navigating by probability of a solution in the given directions, almost never shows up..
g

groostav

05/08/2017, 7:50 PM
My biggest problem is that I'm going to have to solve these problems from an AST. Our users enter math expressions, i build an AST for those expressions, I can dump them into something like prolog source or maybe an IBEX expression, but generating source for a more traditional lanaguage (like swift) is a bridge-too-far.
The other thing is that I'm happy wit ha solver that only gets linear constraints, since I'm not going to be able to find a solver for all functions, so even simply the ability to create a library that generates vectors that satisfy a set of linear constraints (inequalities), uniformly in the space, would make me very happy, so long as I can call it ~10k time per second.
c

codeslubber

05/08/2017, 7:51 PM
interesting…
OMG!!
Well cedric’s complaints did not even address scalability, Prolog as I remember did not fare well in that department either… no?
c

cedric

05/08/2017, 7:54 PM
Yeah it was dog slow. At least last time I wrote Prolog, which was probably 25 years ago
c

codeslubber

05/08/2017, 7:55 PM
Wow, this is an interesting thread though: https://www.quora.com/Does-Prolog-scale-well
well Cedric’s prior arguments might apply though: nothing ever gets great at performance until it has to and maybe there just were never enough large applications.. what would be fascinating would be to get a look at some Prolog ‘applications’ and see if we couldn’t get to the same place much faster with general purpose tools.. would bet heavily that that would be the case..
c

cedric

05/08/2017, 7:58 PM
Keep in mind that Prolog is the language which makes
goto
the norm (the dreaded cut operator). I wouldn’t want to see a 100kloc code base written in that language
🙂 2
2 Views