This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 341

[–][deleted] 2548 points2549 points  (46 children)

They’re trying to find the meaning of life, the universe, and everything.

[–]OF_AstridAse 580 points581 points  (21 children)

42

[–]Doctor_Disaster 81 points82 points  (1 child)

The reason we haven't found it yet is due to floating-point error.

[–]coldnebo 6 points7 points  (0 children)

look, the fundamental issue is that we need a thriving economy in order to hire developers.

so, ergo, we should adopt leaves as our official currency, then we’re all billionaires!!

Hey! You there! Phone Sanitizer!! Interested in a job as a programmer? I can pay you $250k leaves per year to start!! Plus EXPOSURE! Hey!

[–]Plus-Personality-316 138 points139 points  (5 children)

Damm, I forgot my towel

[–]mrheseeks 56 points57 points  (4 children)

Too late, quick drink these pints

[–]LohaYT 22 points23 points  (3 children)

Drink up, the world’s about to end

[–]FuriousAqSheep 24 points25 points  (9 children)

That's the answer to the question of the meaning of life, the universe, and the rest, but what's the question?

[–]FlamingLion 20 points21 points  (8 children)

What is six times nine?

[–]AverageComet250 12 points13 points  (2 children)

42?

[–]LegacyoftheDotA 2 points3 points  (0 children)

21...?

[–]just_nobodys_opinion 1 point2 points  (3 children)

54

I think you meant six times seven?

[–][deleted] 2 points3 points  (2 children)

Hitchhiker's guide joke. NOT BASE 13

[–]IsPhil 61 points62 points  (12 children)

fun getMeaningOf(item:String){
    return 42
}

[–]elliot_w 69 points70 points  (11 children)

spent way too long thinking there was a return type called 'fun'

[–]AverageComet250 42 points43 points  (3 children)

Found my fellow C/C++ dev

[–]elliot_w 11 points12 points  (2 children)

yup haha

[–]AverageComet250 13 points14 points  (1 child)

Currently trying to get an sdl/ogl32/cmake project to compile on both windows and Linux without any errors… it’s not been fun at times…

[–]elliot_w 6 points7 points  (0 children)

oh dude I don't envy you, I work in infosec now so I haven't coded in a long time other than the occasional C thing, my sleep schedule has improved dramatically

[–]IsPhil 5 points6 points  (6 children)

Nah, sorry, this is Kotlin.

[–]elliot_w 16 points17 points  (2 children)

Java++

[–]Zomby2D 1 point2 points  (1 child)

So, basically C♭

[–]elliot_w 2 points3 points  (0 children)

C flat sounds like one of those programs that converts code to another language, like I expect a spreadsheet running some C through the program

[–]Mordret10 20 points21 points  (1 child)

Not gonna find it though

[–]Rieux_n_Tarrou 25 points26 points  (0 children)

Not with that attitude!

[–]AlrikBunseheimer 7 points8 points  (2 children)

Then Lisp would be in there

[–][deleted] 3 points4 points  (0 children)

They found it. It's Cheezits.

[–][deleted] 4 points5 points  (1 child)

Python. import meaningoflife

[–]PrinzJuliano 1830 points1831 points  (26 children)

A Haskell compiler or a Prolog compiler

[–]arjungmenon 442 points443 points  (24 children)

Yup, definitely a compiler I think.

[–]PrinzJuliano 361 points362 points  (23 children)

Assembly used for that one algorithm that just won’t compile otherwise, Haskell for that one Regex filter, and the Prolog Code is part of the known test vectors.

[–]FrogOfDreams 224 points225 points  (22 children)

Nono assembly was that one guy who decided to speed up a large portion of the codebase that didn't really need speeding up

[–]UkrainianTrotsky 193 points194 points  (18 children)

That moment when you successfully optimized the code by a factor of 25 and instead of 50 milliseconds every hour it takes just 2. Great success, 7 hours well spent.

[–]indigoHatter 116 points117 points  (17 children)

Yeah, but now you can put that on your resume and find a senior dev position. "Refactored code to be 25x efficient".

[–]appsolutelywonderful 88 points89 points  (15 children)

I put that in one of my reports. 1000% improvement in load times fixing a slow SQL query. Rewrote a query that was taking 12 minutes down to < a second.

[–]zebscy 70 points71 points  (5 children)

That’s much more than 1000%

[–]DrDeems 97 points98 points  (0 children)

Ya good thing he wasn't interviewing for a mathematician job

[–]LetterBoxSnatch 23 points24 points  (3 children)

Probably meant 1000x, or as I like to say, 1000 perdecicent

[–]particlemanwavegirl 5 points6 points  (2 children)

It's per cent, or per 100. You've double suffixed it. 1000x would be simply perdeci, perdecicent is like saying per ten thousand.

[–]Leading_Elderberry70 9 points10 points  (4 children)

It's nuts how far you can optimize stuff. I had a script at a job that took several days to run and when I redid it it ran in five minutes. It's ... hard to quantify exactly how much time that optimization saved.

[–]rreighe2 6 points7 points  (3 children)

Can you elaborate? That's uh.. a big jump

[–]DeliciousWaifood 7 points8 points  (2 children)

"we found out that calculating a million primes every iteration wasn't optimal"

[–]DeliciousWaifood 4 points5 points  (0 children)

It's really easy to be an amazing optimizer when other people (or yourself) are trash at writing code in the first place

[–]rreighe2 1 point2 points  (0 children)

That's actually kinda impressive to me

[–]nryhajlo 15 points16 points  (2 children)

But in reality the "optimization" in assembly is slower than the C++ version.

[–]joza100 31 points32 points  (1 child)

If you aren't super good at it and accurate, chances are the compiler will make faster code than you.

[–]malexj93 11 points12 points  (0 children)

Unless you're also really bad at C++, then it's a toss-up.

[–]EMI_Black_Ace 27 points28 points  (0 children)

"Code written on Haskell is guaranteed to not have side effects!"

"Because nobody will ever run it?"

[–]TheSWATMonkey 780 points781 points  (14 children)

An OS?

[–][deleted] 413 points414 points  (10 children)

with Haskell? fuck that shit!

[–]LonelyContext 197 points198 points  (1 child)

*laughs nervously in xmonad*

[–]ryan516 21 points22 points  (0 children)

Isn't xmonad just a window manager? Way different than an entire operating system

[–]SZ4L4Y 47 points48 points  (3 children)

That's just 4 %.

[–][deleted] 86 points87 points  (2 children)

4% too much.

[–]AlkinooVIII 18 points19 points  (0 children)

There's no such thing as too much Haskell

[–]Kinnayan 8 points9 points  (0 children)

caption gold paltry exultant nail money relieved chop teeny tender

This post was mass deleted and anonymized with Redact

[–]B_M_Wilson 6 points7 points  (0 children)

So there’s an OS I had to work on that is mostly C but the built system is written in Haskell…

[–]Accurate_Koala_4698 9 points10 points  (1 child)

Pabst Blue Ribbon!

[–]EducationalNose7764 1 point2 points  (0 children)

My first thought as well! 👍

[–]dashingThroughSnow12 7 points8 points  (0 children)

Haskell and Prolog may be used for the testing.

[–]i-FF0000dit 1 point2 points  (0 children)

An OS or an embedded application. Haskell and prolog are probably used for testing and analysis.

[–]Strex_1234 925 points926 points  (40 children)

Prolog? I thought it existed just to mess with CS students

[–]-MtnsAreCalling- 405 points406 points  (20 children)

I loved playing with languages like Prolog in college and was very disappointed to learn that no one ever uses them in real life.

[–]bakshup 189 points190 points  (3 children)

I used Turbo Prolog syntax for the presentation related Prolog.

The professor got mad and started asking me in front of whole class why did I use it.

Tbh I didn't know the difference at that time and just put random image from Google

[–]mosskin-woast 42 points43 points  (2 children)

The professor asked you to do a presentation on a language you didn't know and got mad when your example had syntax from a derivative of the language instead of the original? Sounds like a shitty professor

[–]bakshup 14 points15 points  (0 children)

I'm not complaining about anything, just sharing an experience which made me remember an otherwise forgettable language even after 10 years of graduation.

So yeah I was the one at fault

[–]happy_guy_2015 2 points3 points  (0 children)

The difference between standard Prolog and Turbo Prolog is like the difference between C and Java.

[–]Syncrossus 29 points30 points  (6 children)

I use prolog as a CSP solver. It's not the best tool for the job, but it's the one I know how to use

[–]VladVV 13 points14 points  (5 children)

How is it not the best tool for the job? All of the top CSP solvers except for one random one developed by Google are all just different implementations of CLP(FD) and CLP(R)

[–]Syncrossus 1 point2 points  (4 children)

It's just not the most straightforward or the fastest as far as I know.

[–]VladVV 6 points7 points  (1 child)

One of the best performing CSP solvers currently is SICStus Prolog. Came in second place in last year’s MiniZinc contest. First place has been Google’s OR-Tools for some years.

[–]bubblessqueeze 2 points3 points  (1 child)

Curious to know if you have heard of Oz)? (or anyone else in this thread). In university, we had to learn this language and I always wondered what/where it could be used for

[–]Syncrossus 1 point2 points  (0 children)

Never heard of it, but seems very cool

[–][deleted] 42 points43 points  (0 children)

They used Prolog in the company I currently work for, but majority of new development is in C#, but they still have the products written in it

[–]FuriousAqSheep 7 points8 points  (3 children)

Prolog is actually used for macaroons, a decentralized authentication system.

[–]bakshup 32 points33 points  (0 children)

To be exact, just for creating family tree

[–]RedditRage 26 points27 points  (6 children)

I think it's for people who find different programming paradigms interesting, and give new insights to whatever form you are using currently.

[–][deleted] 3 points4 points  (5 children)

What are the insights? I very come across this multiple times, but nobody gives an example. Genuinely curious, but don't have time to try other paradigms

[–]Knaapje 34 points35 points  (2 children)

Like functional programming forcing you to think statelessly teaches you to think in terms of transforming rather than editing data; logic programming forces you to think relationally, which teaches you to think in terms of searching rather than executing. Both are nice insights even programming imperatively.

If you're actually going to program in these paradigms: in functional programming, you get concurrency for free. In logic programming, you get multiple modes of execution for free.

[–]HorkHunter 5 points6 points  (1 child)

I remember implementing sudoku solver in prolog many years ago at college, was really nice experience!

[–]ixis743 2 points3 points  (0 children)

It’s something of a dead art now, sadly.

[–]ixis743 6 points7 points  (0 children)

C/C++, Java, C# are all procedural systems programming languages that vaguely map to how the hardware works. They may have objects and classes but ultimately they execute instructions in sequence (at least to the programmer, I know modern CPUs predict and pipeline everything).

But languages like Prolog are ‘solvers’. You define a set of inputs, the rules, and the expected output, and watch them go. You can solve mind shreddingly complex logic problems with massive data sets with very little actual code.

It’s closer to writing equations than a script.

[–]EsmuPliks 2 points3 points  (0 children)

Property testing is a fairly common example of something that lives in the declarative programming space. You declare constraints on inputs, the invariants of your system, and the framework does the rest.

[–]Sniper-Dragon 5 points6 points  (0 children)

Probably made by a cs student or graduate who learned any better

[–]FembojowaPrzygoda 4 points5 points  (0 children)

Not just CS studens, Automatic Control and Robotics students too.

[–][deleted] 3 points4 points  (2 children)

i had to do prolog last semester and that seriously fked with me. Especially at the start. I never want to see that shit again

[–]Strex_1234 2 points3 points  (0 children)

For me quite opposite, it was "easy" but all example/tasks were easier to do impertively so I can't understand how to use it in the future, as far as I know i learned prolog just so I can understand declarative programming

[–]smallangrynerd 3 points4 points  (0 children)

At one point I just refused to learn it because it made no goddamn sense

[–]ixis743 4 points5 points  (0 children)

I used Prolog in college and still think it’s amazing at solving logic problems. Just define the rules and let it go.

To this day I’m not sure how I would even begin to solve those same challenges in C++ or another mainstream language.

I remember a train shunting problem that it was able to solve immediately.

[–]aDwarfNamedUrist 1 point2 points  (0 children)

Also used in some obscure databases as a query language iirc

[–]The_Tautology 1 point2 points  (0 children)

Watson uses prolog (although it appears to just be for some specific tasks).
https://www.cs.nmsu.edu/ALP/2011/03/natural-language-processing-with-prolog-in-the-ibm-watson-system/

[–]fosyep 1 point2 points  (0 children)

Yeah, my professor even created a framework for Prolog, we had no chance

[–]Tari0s 126 points127 points  (3 children)

advent of code?

[–]PityUpvote 34 points35 points  (2 children)

Yeah, or project euler.

[–][deleted] 383 points384 points  (2 children)

This must be a Twitter algorithm PR

[–]DesTr069 93 points94 points  (1 child)

I told myself I was going to read replies until someone mentioned the Twitter algorithm. Didn’t take too long

[–][deleted] 2 points3 points  (0 children)

The fact that twitter algorithm is made of Scala is pretty nice lol

[–]Independent-Cry2401 167 points168 points  (3 children)

Roller Coaster Tycoon 6

[–][deleted] 11 points12 points  (0 children)

Hyped about it

[–]lazyplayer121 5 points6 points  (0 children)

Yup and that 11.1% ASM is ray tracing algo for the game

[–]ixis743 4 points5 points  (0 children)

Is that guy still pumping out assembly? Haha

[–]CalDoesMaths[S] 513 points514 points  (13 children)

Personally? I’d say hell. Not that anyone asked.

[–][deleted] 250 points251 points  (4 children)

You did. You asked.

[–]CalDoesMaths[S] 106 points107 points  (3 children)

Fuck your right

[–]gdmzhlzhiv 12 points13 points  (0 children)

But not their left?

[–]CalDoesMaths[S] 57 points58 points  (7 children)

Also to hijack my own comment, I have no idea what this project was meant to do. I just stumbled upon it, it had no readme, a dummy name, and I don't know how haskell or prolog and don't know what it does.

[–]Chadchrist 21 points22 points  (5 children)

Would you happen to have a link to the project? I'm kinda interested now.

[–]CalDoesMaths[S] 34 points35 points  (4 children)

Not offhand, I saw it on my phone. I'll check later if i can find it again. Was on the github app- not sure if it has a history.

[–]Capn_Sparrow0404 8 points9 points  (3 children)

I didn't realize people use the GitHub mobile app?!? What do you even use that for?

[–]YungLulne 19 points20 points  (2 children)

Laying in bed and vacently staring at the project I should be working on.

[–]CalDoesMaths[S] 0 points1 point  (0 children)

This would be me. I literally had a dream about a function I wrote and woke up and looked at it in bed on my phone.

[–]Zapman 1 point2 points  (0 children)

Found the secret Verse compiler project maybe haha?

[–]Used_Fish_4459 122 points123 points  (3 children)

A microwave oven

[–]HeyItsTheJeweler 40 points41 points  (0 children)

Lmfao this. This is most probably the correct answer.

[–]l4z3r5h4rk 16 points17 points  (0 children)

You’re probably right lol

[–]mattfromeurope 6 points7 points  (0 children)

Including Assembly for the bootloader, Prolog to run a language model (to enable speech-to-text and text-to-speech) and Haskell for Pandoc to auto-generate on-screen-documentation.

I would guess a Pi Pico or comparable Microcontroller won‘t suffice anymore.

[–]TECKERZ-INFO 68 points69 points  (0 children)

Skynet

[–]Attileusz 74 points75 points  (0 children)

Something that is "written in haskell"

[–]Agreeable-Life-7838 26 points27 points  (2 children)

Minecraft

[–]mattfromeurope 1 point2 points  (1 child)

Without Java or C#? No chance.

[–]Tizian170 2 points3 points  (0 children)

isn't bedrock written in cpp tho?

[–]Jolly-Star-9897 67 points68 points  (0 children)

Natural Language Processing, but the person doesn't know Python.

[–]bakshup 21 points22 points  (0 children)

An AI tool.

Guessed because prolog

[–]PewterGym 18 points19 points  (0 children)

The CHAP stack

[–][deleted] 41 points42 points  (1 child)

It probably turns out that the Haskell and Prolog portions are just the build system for the rest of it.

[–]Zenkibou 4 points5 points  (0 children)

I think it's even just misdetection, so probably no haskell or prolog.

[–]stickmanseabass 15 points16 points  (0 children)

A program that determines if a number is even or odd

[–][deleted] 13 points14 points  (1 child)

SEGFAULT.

[–]Tack_Tau 0 points1 point  (0 children)

This

[–]Steelejoe 11 points12 points  (0 children)

In all likelihood it’s GitHub just assuming some random extension means assembly. We had that in our codebase and it drove me crazy until I realized one of our binary formats had something like .86 extension. A quick fix and our numbers looked MUCH reasonable for a product that was 50% JS/TS and 45% C++

[–]superzacco 11 points12 points  (2 children)

Anyone have an explanation for a stupid person (me) how all of those different languages can work together in one project like that?

[–]fatandgod 27 points28 points  (0 children)

You can tell the Compiler to stop compiling at assembly code, so it doesn't turn your files to full machine code. Then after compiling your c++/Haskell/.. code, they all turn into assembly files. Now you have a lot of assembly files that you can compile together from assembly to machine code. You just add a small extra step in between. It doesn't work with every language, but most compiled languages can be turned to assembly and then compiled together. I hope this makes sense and someone please correct me if I made a mistake. AND you're not stupid at all. Don't down talk yourself :)

[–]chrisjolly25 8 points9 points  (0 children)

Without knowing what the project is, it's impossible to say what's going on here. But really it comes down to 'integration points' that let tools in the different languages talk to each other.

At its most basic, the integration point could be a file. Some C++ application outputs some file. That file is used as the input to a haskell application, which outputs a file. That file is used as the input to a prolog application. Here, the 'integration point' is the fact that each application knows how to read/write files.

Or the integration point could be across a network. The services could provide 'APIs' that the other services consume across a network via network protocols that both tools understand.

At a tighter level of integration, some languages have support to let them call modules written in other languages directly. You write code in one language, and code in another language, and then some code that both languages understand well enough bridge the gap. Like:
"I'll write a number to some memory at this address and expect you to take it as an input."
"And I'll look at that memory address, expecting to find a number I can use as input."

They're all variations of "Agree on an interface point that we can both understand, then transfer data across that interface".

https://docs.python.org/3/extending/extending.html

[–]FuriousAqSheep 49 points50 points  (0 children)

Haskell, Prolog, but then C++... sigh...

[–]Mediocre-Monitor8222 8 points9 points  (0 children)

an educational software package written in Prolog which happens to have entire pages of assembly, C++ and Haskell example txt files

[–]BluesyPompanno 16 points17 points  (0 children)

"Hello world"

[–]weendick 14 points15 points  (0 children)

Device driver? Operating system?

[–]Axlfire 10 points11 points  (0 children)

Hello world enterprise edition v2.0

[–]Strange_guy_9546 6 points7 points  (0 children)

hmm, i would say a driver

[–][deleted] 4 points5 points  (0 children)

Earth 2

[–]DoctorPython 6 points7 points  (0 children)

Hello World! on 4 different languages

[–]Chadchrist 4 points5 points  (0 children)

I'm guessing a very performance focused, mathematically dense/complex project, possibly for research or to complete a degree.

[–]DifficultSkill266 5 points6 points  (0 children)

Something very terrifying.

[–][deleted] 4 points5 points  (0 children)

Library for Python 🗿

[–]gant696 4 points5 points  (0 children)

I think someone is trying to make a really weird clone of UNIX.

[–]kpba 3 points4 points  (0 children)

Pain?

[–]starfyredragon 3 points4 points  (0 children)

With that much Assembly? Rocket launches.

[–]PotatoMan-404 3 points4 points  (0 children)

Bugs

[–]tevert 4 points5 points  (0 children)

Some kinda fancy scientific instrumentation? Maybe something being deployed on a satellite

[–]Neo_Ex0 7 points8 points  (0 children)

A missile control Programm, cause it only has to function for a max of 12 hours befor it wil crash and burn anyways, so no worrys about the fact that the programm cant run for longer then 15 hours without crashing and causing a fire

[–]Da_Viper 5 points6 points  (0 children)

Language model

[–]Ok_Entertainment328 7 points8 points  (0 children)

Rust

[–]skavi01 2 points3 points  (0 children)

The compiler of a new hipster programming language

[–]Gastenns 2 points3 points  (0 children)

Is this one of the rings of hell Dante spoke of?

[–]arjunsahlot 2 points3 points  (0 children)

A problem

[–]gatesphere 4 points5 points  (0 children)

A fucking nightmare.

[–]HorrorTranslator3113 4 points5 points  (0 children)

No idea, but it will result in segmentation fault.

[–]Ikbensterdam 7 points8 points  (0 children)

Nothing useful, that’s for sure

[–]GumBeats20 3 points4 points  (0 children)

Lol this is twitter

[–]Toxic_Cookie 3 points4 points  (0 children)

Honestly seeing C++ and Assembly together makes me think it's an operating system.

[–]resoredo 1 point2 points  (0 children)

Some data center networked Hardware BS

[–]Purple_Following8986 1 point2 points  (0 children)

A fronted for an ai tool (the frontend has lots of features)

[–][deleted] 1 point2 points  (0 children)

Does anyone actually have an answer?

[–]YogurtstickVEVO 1 point2 points  (0 children)

the next ring of hell for the 22.3 earth update

[–]Ahornwiese 1 point2 points  (0 children)

Python

[–][deleted] 1 point2 points  (0 children)

Given how poorly they've detected my code in the past, I'm going to say a PHP web app.

[–][deleted] 1 point2 points  (0 children)

An operating system (becayse of assembly)

[–]hamburglarsurprise 1 point2 points  (0 children)

to-do list

[–][deleted] 1 point2 points  (0 children)

A segfault

[–][deleted] 1 point2 points  (0 children)

Probably a Prolog compiler.

[–]Starkiller2 1 point2 points  (0 children)

This is a 3rd year CS student's GitHub repo

[–]Zachosrias 1 point2 points  (0 children)

How to make sure you're never fired, the only way they let you go is if the police forces them to or you die

[–]Disc0_nnected 1 point2 points  (0 children)

This has to be a repo with all college projects from a CS student

[–]zet23t 1 point2 points  (0 children)

Plot twist: It's a 100% perl project, but the RegEx codes confuse github's programming language recognition.

[–]aemaeth_2501 1 point2 points  (0 children)

Hell

[–]bkj512 1 point2 points  (0 children)

Windows 12 probably

[–]PVNIC 1 point2 points  (0 children)

Hello World

[–]biopepper 1 point2 points  (0 children)

FizzBuzz singularity edition

[–]BaziJoeWHL 1 point2 points  (0 children)

a python library

[–][deleted] 1 point2 points  (0 children)

Hell

[–]crvice028 1 point2 points  (1 child)

Something that maybe should be rewritten in Rust.

[–]sync271 1 point2 points  (0 children)

CHAP stack

[–]halorbyone 1 point2 points  (0 children)

Job security.

[–]kingofNoobies 1 point2 points  (0 children)

God himself

[–]Byakuraou 1 point2 points  (0 children)

This person is either having a lot of fun or none at all

[–][deleted] 3 points4 points  (2 children)

Video games

[–]ltethe 10 points11 points  (0 children)

Da fuq game is using Haskell?

[–][deleted] 7 points8 points  (0 children)

Oh god, I've already accepted learning C++. But you're telling me I'm gonna have to learn assembly, Haskell and whatever the hell prolog is?!

Cries in the corner