|
Symbolic Butt posted:the most surprising part of prolog to me is that it's kind of annoying to do arithmetic in it, I'm still trying to figure out a way for unification to work with some simple maths
|
# ? Mar 10, 2018 19:10 |
|
|
# ? Jun 1, 2024 04:21 |
|
Internet Janitor posted:the idea of prolog is to describe your input and output and the language furnishes a program. The idea of prolog is that well, it's not so much about your input and output but your relationships between data. The idea of prolog is that you describe the constraints of your data, and it works out if those constraints are satisfied. Well, It's a database. You write queries, and you can give some queries names. Kinda, It's a parser. Prolog is about nested grammars. You don't write a program, but do write a grammar. And Yes You can do reversible programming, or program generation. But you do it by specifying the rules and then using prolog as a rules engine. quote:in trivial cases this works. in meaningful cases it's intractable. in practice, the idea of prolog was a complete failure. the idea that prolog had a single idea is kinda laughable given how it was invented twice for different reasons. the french (well, marseilles) team had been writing a generic parser, and had come up with an annotated grammar. the uk (well, edinburgh) group had been working on resolution algorithms independently, and discovered that another group had already implemented it without a formal model. there was the prolog fad in 1980 when we thought machine learning was impossible and so we had to build expert rule systems to solve every problem quote:prolog the actual language is kind of a neat way of thinking about some things, though. the irony is that: the ideas of prolog have been a success, the implementations of prolog on the other hand... i mean that SLD resolution, unification, logic variables show up in other places in various forms. quote:writing programs that are not restricted to a narrow domain is intrinsically, inescapably difficult. we still can't really teach humans how to compose complex programs, so it shouldn't be surprising that we have met with limited success in replacing programmers with programs. i think the best thing to aim for is tools and techniques to help people manage the complexity of software, rather than hoping to hide it or make it disappear via some sleight of hand. the whole 'replacing humans with programs' thing is some weirdo sales pitch from someone desperate for funding
|
# ? Mar 10, 2018 19:26 |
|
gosh this whole 'the program doesn't describe a total ordering for evaluation' is weird *writes a makefile and watches how the runtime sorts the build rules into an order for trying*
|
# ? Mar 10, 2018 19:28 |
|
i am seriously considering prolog for a thing at work
|
# ? Mar 10, 2018 19:29 |
|
Can I suggest: don't
|
# ? Mar 10, 2018 19:30 |
|
Destroyenator posted:http://www.swi-prolog.org/pldoc/man?section=clpfd does everything you would expect from a constraint solving maths thing, you just have to use slightly different operators holy poo poo this is exactly what I needed, thanks a lot
|
# ? Mar 10, 2018 19:33 |
|
We have prolog in our game engine. Don't ask me why
|
# ? Mar 10, 2018 20:21 |
|
Gazpacho posted:Can I suggest: don't just use bash instead
|
# ? Mar 10, 2018 21:07 |
|
Suspicious Dish posted:We have prolog in our game engine. Don't ask me why why
|
# ? Mar 10, 2018 22:17 |
|
for AI i bet
|
# ? Mar 10, 2018 22:24 |
|
Gazpacho posted:for AI i bet my bet is on ~*~interactive fiction~*~
|
# ? Mar 10, 2018 22:31 |
|
Suspicious Dish posted:We have prolog in our game engine. Don't ask me why Procedural generation of instances of some kind of puzzle which have to be guaranteed solvable?
|
# ? Mar 10, 2018 22:38 |
|
Symbolic Butt posted:my bet is on ~*~interactive fiction~*~ ding ding ding
|
# ? Mar 10, 2018 23:09 |
|
i don't know what to make of this like prolog is good because it is bad
|
# ? Mar 10, 2018 23:46 |
|
i only had to look at prolog for like 1 week in college, then i've never seen it again.
|
# ? Mar 10, 2018 23:47 |
|
Yeah, don't ask me how it worked, it was another team that worked on that project.code:
|
# ? Mar 11, 2018 00:31 |
|
that's like a DCG but i guess text generation makes some sense but wheee
|
# ? Mar 11, 2018 00:33 |
|
wow, prolog is hella overkill for that purpose.
|
# ? Mar 11, 2018 00:36 |
|
i assure you the actual actual prolog is a lot more complicated than that. it drove game state.
|
# ? Mar 11, 2018 00:46 |
|
Glorgnole posted:labview doesn't let you zoom because lots of its interpretation of what the blocks in the window are supposed to do comes down to the relative positions of the pixels in the icons and wires jesus loving christ
|
# ? Mar 11, 2018 02:52 |
|
akadajet posted:i only had to look at prolog for like 1 week in college, then i've never seen it again. I had a whole semester with it. All I remember is writing a program to prove a guy was his own grandfather.
|
# ? Mar 11, 2018 04:53 |
|
?-
eschaton fucked around with this message at 10:21 on Mar 11, 2018 |
# ? Mar 11, 2018 10:19 |
|
I prototyped an algorithm in Prolog once before implementing it for real, it worked really well. also re visual programming: it’s a fantastic gateway drug for people who do complicated enough (domain-specific) work that it calls for programming but are intimidated by or disinterested in “programming” as an activity. “oh I’m not programming, this is ‘parametric modeling’.” “oh I don’t know much about programming, this is just a bespoke multimedia controller.”
|
# ? Mar 11, 2018 14:51 |
|
amberpos.css needs to swap that out for a correct gif
|
# ? Mar 11, 2018 15:03 |
|
pokeyman posted:amberpos.css needs to swap that out for a correct gif i think amberpos being ever so slightly broken is the correct behavior
|
# ? Mar 11, 2018 15:08 |
|
I've been playing with prolog lately to see if I get a deeper feel of the language, I'm doing this gameboy z80 assembler thing, that I hope eventually will result in a bespoke artisanal compiler. so from a list of instructions I'm getting a list of assembled code. code:
code:
code:
|
# ? Mar 13, 2018 00:58 |
|
it looks like it's all valid, you just aren't constraining the search well enough when you're going backwards. it's trying to build any list of instructions and then checking if they're a match for the assembled output you're providing if you interrupt it and press g you can see what it's stuck trying to solve, it's just building an ever growing list of "nop"s and then testing that against the output list code:
|
# ? Mar 13, 2018 08:55 |
|
yeah that gives me a much better idea of what's going on now, thanks for the tip
|
# ? Mar 13, 2018 16:34 |
|
Notorious b.s.d. posted:we established long ago that you are too badly damaged by your career to understand the difference between good and bad.
|
# ? Mar 14, 2018 19:37 |
|
Gazpacho posted:btw good tech is what my employer allows me to use. bad tech is what i might wish i could use but would do better to just not think about lest i go mad Notorious b.s.d. posted:we established long ago that you are too badly damaged by your career to understand the difference between good and bad.
|
# ? Mar 14, 2018 20:08 |
|
i wrote a network transparent option parser https://github.com/tef/textfree86
|
# ? Mar 17, 2018 08:28 |
|
i'd post in the job thread or terrible thread but this is kinda an unspeakable horror that deserves to be here, i guess here's the gist if you have a command line program, you can expect some things to work: passing in a file name, and if you're lucky, tab completion: code:
code:
code:
|
# ? Mar 17, 2018 08:42 |
|
1) excellent name 2) in that last example, does it nest after the first command? its hard to tell what machine the commands are on because im dumb
|
# ? Mar 17, 2018 08:45 |
|
Krankenstyle posted:1) excellent name ty quote:2) in that last example, does it nest after the first command? its hard to tell what machine the commands are on because im dumb the last example is ./textfree86.py 'run this ssh command' -- 'then pass these arguments to it'
|
# ? Mar 17, 2018 13:50 |
|
tab completion is so helpful
|
# ? Mar 17, 2018 15:45 |
|
can’t you just do that completely in bash with complete -F and COMP_WORDS
|
# ? Mar 17, 2018 16:05 |
|
rjmccall posted:can’t you just do that completely in bash with complete -F and COMP_WORDS I have no idea. But this post made me think of all the times I developed some cool and complex system and then someone goes "can't you just do this completely obvious already-developed thing that if you had been better at research you'd have known about?" and then i go "well poo poo"
|
# ? Mar 17, 2018 17:36 |
|
Writing your own version of something existent gives it unique flavor, a new take on an old standard. Like a carefully crafted loss edit.
|
# ? Mar 17, 2018 18:02 |
|
TimWinter posted:Writing your own version of something existent gives it unique flavor, a new take on an old standard. yeah that sounds cool and good-- TimWinter posted:Like a carefully crafted loss edit. oh no
|
# ? Mar 17, 2018 18:26 |
|
|
# ? Jun 1, 2024 04:21 |
|
rjmccall posted:can’t you just do that completely in bash with complete -F and COMP_WORDS i mean, it does use COMP_POINT and COMP_LINE because i wanted the setup to be 'add this line to complete' not 'download a bash function script and install it' like i feel like this question comes from maybe not seeing what it's doing, but i guess my point isn't well explained the point is that if i change the script on the remote end, the auto-complete suggestions change on the client without editing my bash config settings or updating textfree86.py
|
# ? Mar 17, 2018 19:58 |