Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "prolog"
-
If programming languages where weapons...
1. C is an M1 Garand standard issue rifle, old but reliable.
2. C++ is a set of nunchuks, powerful and impressive when wielded but takes many years of pain to master and often you probably wish you were using something else.
3. Perl is a molotov cocktail, it was probably useful once, but few people use it
4. Java is a belt fed 240G automatic weapon where sometimes the belt has rounds, sometimes it doesn’t, and when it doesn’t during firing you get an NullPointerException, the gun explodes and you die.
5. Scala is a variant of the 240G Java, except the training manual is written in an incomprehensible dialect which many suspect is just gibberish.
6. JavaScript is a sword without a hilt.
7. Go is the custom made “if err != nil” starter pistol and after each shot you must check to make sure it actually shot. Also it shoots tabs instead of blanks.
8. Rust is a 3d printed gun. It may work some day.
9. bash is a cursed hammer, when wielded everything looks like a nail, especially your thumb.
10. Python is the “v2/v3” double barrel shotgun, only one barrel will shoot at a time, and you never end up shooting the recommended one. Also I probably should have used a line tool to draw that.
11. Ruby is a ruby encrusted sword, it is usually only used because of how shiny it is.
12. PHP is a hose, you usually plug one end into a car exhaust, and the other you stick in through a window and then you sit in the car and turn the engine on.
13. Mathematica is a low earth orbit projectile cannon, it could probably do amazing things if only anyone could actually afford one.
14. C# is a powerful laser rifle strapped to a donkey, when taken off the donkey the laser doesn’t seem to work as well.
15. Prolog is an AI weapon, you tell it what to do, which it does but then it also builds some terminators to go back in time and kill your mom
All credits go to Vicky from damnet.com5 -
Vacation in Delphi
Prolog:
After a basic cup of java, I wanted to go to the c and meet Ada, who cured her common lisp with a batch of elixir. On the way, I had a swift Smalltalk with Pascal, who has a brainfuck, because he is a wyvern enthusiast.
I also found a shell with a perl in it, but it had a scratch. This reminded me of my friend Ruby, who has a pet python and loved a good scheme à Shakespeare.
I then started my laptop, which already collected rust on its logo of a maple, and browsed the web for groovy songs. I found a song by Julia, performed in a very high octave in F#.4 -
Writing a tic-tac-toe player in Prolog. So much fun solving a problem with only rules and no loop control 😍2
-
Programming Languages are Like Cars:
Assembler: A formula I race car. Very fast but difficult to drive and maintain.
FORTRAN II: A Model T Ford. Once it was the king of the road.
FORTRAN IV: A Model A Ford.
FORTRAN 77: a six-cylinder Ford Fairlane with standard transmission and no seat belts.
COBOL: A delivery van. It's bulky and ugly but it does the work.
BASIC: A second-hand Rambler with a rebuilt engine and patched upholstery. Your dad bought it for you to learn to drive. You'll ditch it as soon as you can afford a new one.
PL/I: A Cadillac convertible with automatic transmission, a two-tone paint job, white-wall tires, chrome exhaust pipes, and fuzzy dice hanging in the windshield.
C++: A black Firebird, the all macho car. Comes with optional seatbelt (lint) and optional fuzz buster (escape to assembler).
ALGOL 60: An Austin Mini. Boy that's a small car.
ALGOL 68: An Aston Martin. An impressive car but not just anyone can drive it.
Pascal: A Volkswagon Beetle. It's small but sturdy. Was once popular with intellectual types.
liSP: An electric car. It's simple but slow. Seat belts are not available.
PROLOG/LUCID: Prototype concept cars.
FORTH: A go-cart.
LOGO: A kiddie's replica of a Rolls Royce. Comes with a real engine and a working horn.
APL: A double-decker bus. It takes rows and columns of passengers to the same place all at the same time but it drives only in reverse and is instrumented in Greek.
Ada: An army-green Mercedes-Benz staff car. Power steering, power brakes, and automatic transmission are standard. No other colors or options are available. If it's good enough for generals, it's good enough for you.
Java: All-terrain very slow vehicle.10 -
It was 1986. I'd just bought a computer because I wanted to make a cool flight sim like I saw a friend at school do by typing in a bunch of code from a magazine. I read a thick book on DOS/BASIC and another on Assembler. As I had no idea what Assembler could possibly be useful for in my life, I went the DOS/BASIC route and made some fun programs. Then it was Prolog followed by C and Smalltalk and then HTML and JavaScript. All by taking classes or reading books and then making something useful or teaching others.
-
> Advice to new coders
Don't worry over picking language A or B.
Just pick A, use it for a month, then move on to B.
In a normal 3 year college degree you'll try multiple languages, some of which you'll never use again, and they'll each teach you something.
I had classes in Java, C, C++, C#, Prolog, Assembler, F#, JS.
Never used F# again and no one uses Prolog. But they were great for learning recursion and logic.
It's not like you take "a step down a bad path" if you pick a language you're never gonna use again.
You'll also learn new stuff on the job. We have one team that uses Go and one that uses Rust. None of the devs ever studied those languages. They were mostly former Java devs who leaned on the job.2 -
It was 1987. I was 13. My first dev project started with a $1,300 IBM PC XT clone I bought from a relative who was a “dealer” of PCs for some company. It took all the savings I had from birthday money and mowing lawns for several summers at $5 a pop.
My mom wanted to encourage me to learn it more in depth, and she also wanted to know more for her job as a librarian, so she bought us a bunch of books about DOS, BASIC, and Assembler.
I first got familiar with DOS and then dove into Assembler without realizing what it really was (and how much easier BASIC would be). After hours and hours of typing in what, to me, then, was complete gibberish, I grabbed the BASIC book to see what it had to offer.
I never went back to the Assembler book.
A kid at school had given me a BASIC program he had typed in from a magazine. It was a flight simulator of sorts but with a helicopter, IIRC. I loaded up that bad boy and got to hacking. I didn’t get much done with it but I did build a few other menu navigation programs to explore the language more.
That led to PROLOG, C, PASCAL, Visual Basic, Perl, ASP, ColdFusion, and now PHP. -
After weeks of feeling useless at work as being the "available tech support", but not actually doing anything, I was finally assigned a new learning task, which is looking into Prolog
Doesn't feel like my cup of tea, but at least I'm putting my head to work again ¯\_(ツ)_/¯4 -
Me after using Prolog for 6 hours because of University...
Sometimes prolog gives me brainfuck (pun intended)3 -
So I just started going to university and have a subject called "programming", we are taught Java, Haskell and Prolog. Every week there is a sheet with homeworks, programming tasks. Often we get something like a boilerplate, so we implement some methods and stuff like that. Those tasks are prepared and created by scientific assistants. They upload the boilerplate and sheets. Take a look at the programming style they follow in Java. Actually I can't find a pattern they follow, except from the spacing between the lines. We are 1000 students in the informatics course, of which probably 10% know how to properly program 😅
So like 900 people see and adapt/learn this real bad coding convention. It really pisses me off, that they basically don't give a shit about convention or teaching them. I have to say that the logic some times is as worse as the conventions 😓
Besides I am not cocky with conventions, but I think at a high-class university they should teach proper convention.17 -
!rant
...i realized i can actually pattern-match like this (as in, sequence of elements (including "whatever") instead of just head::rest in F#...
...from watching a talk about prolog.
like "wait... prolog can do this when pattern-matching? that seems very useful. i think i tried to do that in F# but it didn't work, which seems stupid... I'm gonna go try it again".
and sure enough =D
i think i really am gonna like F# if i find the time and resolve to break through how its different mode of thinking stretches my brain in ways it hasn't been stretched for a long time =D6 -
Taught myself assembler at 13 (this was the mid 1980s) and wondered how the hell people could stand to do this. Then I found out there were more abstract languages like BASIC or COBOL. So I taught myself BASIC and MS-DOS batch scripting. Various other languages came later (PROLOG, Pascal, C, Smalltalk, C++, VisualBasic, etc). But it’s never been easy for me because I suck at math and complicated logic structures. Especially not good with OOP. My brain was ruined by learning procedural coding first. It refuses to incorporate OOP.
-
I spent the whole day coding in python (usually I code in php or perl) and this language is a fucking joke. C'mon, why everything have to be done in such a weird way? And don't say it's python way because it's bullshit way. Want some examples?
", ". join(str(x) for x in array)
to join array of integers. wtf is that?
True|False
why in hell you need the first letter to be uppercase when your own fucking standard says to use lowercase letters in eg. var names and method names. why?
math.isnan(float(x))
to check if a variable (expected to be integer) is NaN. I won't fucking comment that...
Even prolog don't have such stupid things6 -
I saw this site's sticker in the CS Lab. I felt compelled to join. Why? I have a PROLOG midterm in an hour. That's why.1
-
Want to know again how it felt like when programming for the first time? Learn Prolog, it fucking twists your brain inside out. It's pretty cool tho, very very challenging.3
-
If you’re a developer who seek professional growth, there is no better way than learning other languages, even if nobody really uses them.
Pick a language and spend a weekend reading tutorials and most importantly writing code in it, something like game of life, sudoku solver or todo-list app.
The more alien the language feels the better. Try Clojure, OCaml, Smalltalk, Prolog, Erlang, and also weird esoteric languages like Piet.
Writing code that operates on alien concepts you see there is the quickest way of learning that concepts and reusing them in whatever language you’re making money with. Your professional growth will be immense.23 -
Had an AI course in my 3rd year at uni.
Well turns out, we learnt how to reproduce a switch case in prolog.
Hated it. Felt raped by stupidity. Missed 3/4 of classes but was still better than most at reproducing switch lol.1 -
love hate kinda deal with this. But I am creating a program in answer set programming that would help me analyze famous chess matches from legends such as B Fischer, Carlsen, etc in an effort to stop at one point and predict what could have happened differently in the match in order to make the other player win. I am adding limiters as to not propagate into every fucking solution in existence else the processing power required to solve this shit would be all too hardcore. I learned about this programming paradigm in one of my graduate level classes using a tech known as Clingo, which is similar to Prolog. I am doing it cuz I sucked at Clingo and because of my pride I aim to make this project a reality to properly say that I know how to use it.
current status: failing somewhat miserably4 -
Successfully wrote a Prolog DSL in Python with no prior knowledge of interpreting Prolog. Backtracking is implemented using the inspect module.
-
My preprocessor is just generalized kerning, the macros are variations on the single well-known proof for the Turing-completeness of GK, the type system will probably be a Prolog reskin so simple the translator can be a FSM, the type inference algo is the original HM algorithm which I don't even need to change, the core language is Lambda calculus and no more, and the backend might just be Erlang itself if my research confirms that extending LLVM until it consistently beats Erlang is unrealistic.
I invented nothing, I create nothing. All I do is plug circles into square holes and fill the gaps with play dough.5 -
Dude how the hell are u even staying at home, I have been home for like a week now and IDK what to do, im bored as fuck.
Umm okay try writing my code in prolog, u would wish the inverse.6 -
It's getting on my nerve to constantly change from one programming language to another in one semester. We are learning web development (html css js), functional programming (haskell), speech analysis (matlab) and logical programming (prolog). It's driving me kinda mad having to change the approach for each assignment every few days.2
-
In highschool I started by setting up an open tibia (OT) server for which I copied and edited lua scripts to create spells and quests. Didn't do anything remotely difficult in those times.
In university I needed to learn and use Prolog. And soon after that I had an OOP course in Java. Didn't really learn Java during that course. And started to accept I would never like real programming.
During a Datastructures course I actually got the hang of java and started to program in my spare time.
Finished the Datastructures course with a good grade which landed me a job as student assistant for a python course.
That job in turn landed me a part-time job as python developer where I learned most of my programming skills.
Now I'm back to working in Java and I still learn everyday. -
Why is it so hard to find a way to make nice frontend on Visual Prolog. I trully hate interfaces that looks like Windows vista.1
-
In Alpro soy milk range, the original one is often overlooked. There are ridiculously tasty soy vanilla, soy almond and professional coconut. But being THAT sensitive I can always distinguish like yea, here’s the soy and here’s the coconut purée. This always prevented me from focusing on just soy and how complex it really is.
So I tried the original soy milk and yes, the purest form was hidden in plain sight all this time. It’s just soy, pure soy, like a pokimane subreddit meetup. I love it.
It’s a moment of a purist finding a pure thing. This is the IDEA of soy milk, like Prolog is the idea of a declarative language.6 -
When a professor asks an expert system of you, but then when u present the design of it he demands it to be dumbed down cause "it is only for learning purposes", and to top it he adds "I don't want you to make a real expert system"......... Note the system must be built based on rules and knowledge and be done only in prolog. The subject is AI 2, we should be learning something better.....4
-
The troll power to make other developers totally convinced that Prolog is the best language to implement anything in...
I will probably need an undo-power too...1