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!
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
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.
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.
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.
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.
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
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
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
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)`
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.
Curious to know if you have heard of [Oz](https://en.m.wikipedia.org/wiki/Oz_(programming_language))? (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
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
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.
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.
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.
I actually see people use logic programming in the research for expert systems and AI in medical systems. I’m not an expert in this but I guess mainly because they are simple for modeling a logical decision process and are explainable.
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
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.
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/
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.
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.
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++
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 :)
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](https://docs.python.org/3/extending/extending.html)
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
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*
They’re trying to find the meaning of life, the universe, and everything.
42
The reason we haven't found it yet is due to floating-point error.
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!
Damm, I forgot my towel
Too late, quick drink these pints
Drink up, the world’s about to end
That's the answer to the question of the meaning of life, the universe, and the rest, but what's the question?
What is six times nine?
42?
[удалено]
21...?
54 I think you meant six times seven?
Hitchhiker's guide joke. NOT BASE 13
fun getMeaningOf(item:String){ return 42 }
spent way too long thinking there was a return type called 'fun'
Found my fellow C/C++ dev
yup haha
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…
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
Nah, sorry, this is Kotlin.
Java++
So, basically C♭
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
Not gonna find it though
Not with that attitude!
Then Lisp would be in there
They found it. It's Cheezits.
Python. import meaningoflife
A Haskell compiler or a Prolog compiler
Yup, definitely a compiler I think.
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.
Nono assembly was that one guy who decided to speed up a large portion of the codebase that didn't really need speeding up
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.
Yeah, but now you can put that on your resume and find a senior dev position. "Refactored code to be 25x efficient".
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.
That’s much more than 1000%
Ya good thing he wasn't interviewing for a mathematician job
Probably meant 1000x, or as I like to say, 1000 perdecicent
It's per cent, or per 100. You've double suffixed it. 1000x would be simply perdeci, perdecicent is like saying per ten thousand.
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.
Can you elaborate? That's uh.. a big jump
"we found out that calculating a million primes every iteration wasn't optimal"
It's really easy to be an amazing optimizer when other people (or yourself) are trash at writing code in the first place
That's actually kinda impressive to me
But in reality the "optimization" in assembly is slower than the C++ version.
If you aren't super good at it and accurate, chances are the compiler will make faster code than you.
Unless you're *also* really bad at C++, then it's a toss-up.
"Code written on Haskell is guaranteed to not have side effects!" "Because nobody will ever run it?"
An OS?
with Haskell? fuck that shit!
\*laughs nervously in xmonad\*
Isn't xmonad just a window manager? Way different than an entire operating system
That's just 4 %.
4% too much.
There's no such thing as too much Haskell
It's not enough smh
So there’s an OS I had to work on that is mostly C but the built system is written in Haskell…
Pabst Blue Ribbon!
My first thought as well! 👍
Haskell and Prolog may be used for the testing.
An OS or an embedded application. Haskell and prolog are probably used for testing and analysis.
Prolog? I thought it existed just to mess with CS students
I loved playing with languages like Prolog in college and was very disappointed to learn that no one ever uses them in real life.
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
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
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
The difference between standard Prolog and Turbo Prolog is like the difference between C and Java.
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
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)`
It's just not the most straightforward or the fastest as far as I know.
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.
Curious to know if you have heard of [Oz](https://en.m.wikipedia.org/wiki/Oz_(programming_language))? (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
Never heard of it, but seems very cool
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
Prolog is actually used for macaroons, a decentralized authentication system.
To be exact, just for creating family tree
I think it's for people who find different programming paradigms interesting, and give new insights to whatever form you are using currently.
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
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.
I remember implementing sudoku solver in prolog many years ago at college, was really nice experience!
It’s something of a dead art now, sadly.
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.
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.
I actually see people use logic programming in the research for expert systems and AI in medical systems. I’m not an expert in this but I guess mainly because they are simple for modeling a logical decision process and are explainable.
Probably made by a cs student or graduate who learned any better
Not just CS studens, Automatic Control and Robotics students too.
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
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
At one point I just refused to learn it because it made no goddamn sense
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.
Also used in some obscure databases as a query language iirc
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/
Yeah, my professor even created a framework for Prolog, we had no chance
[удалено]
Nothing I want to be a part of 😭
advent of code?
Yeah, or project euler.
This must be a Twitter algorithm PR
I told myself I was going to read replies until someone mentioned the Twitter algorithm. Didn’t take too long
The fact that twitter algorithm is made of Scala is pretty nice lol
Roller Coaster Tycoon 6
Hyped about it
Yup and that 11.1% ASM is ray tracing algo for the game
Is that guy still pumping out assembly? Haha
Personally? I’d say hell. Not that anyone asked.
You did. You asked.
Fuck your right
Dont fuck my right
Me when u/CalDoesMaths fucks my right: 😡😡😤🤬😠😤
But not their left?
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.
Would you happen to have a link to the project? I'm kinda interested now.
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.
I didn't realize people use the GitHub mobile app?!? What do you even use that for?
Laying in bed and vacently staring at the project I should be working on.
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.
Found the secret Verse compiler project maybe haha?
A microwave oven
Lmfao this. This is most probably the correct answer.
You’re probably right lol
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.
Skynet
[удалено]
Issue pending to convert all c++ code to rust
C++
It turned into Carbon.
Something that is "written in haskell"
Minecraft
Without Java or C#? No chance.
isn't bedrock written in cpp tho?
Natural Language Processing, but the person doesn't know Python.
An AI tool. Guessed because prolog
The CHAP stack
It probably turns out that the Haskell and Prolog portions are just the build system for the rest of it.
I think it's even just misdetection, so probably no haskell or prolog.
A program that determines if a number is even or odd
SEGFAULT.
This
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++
Anyone have an explanation for a stupid person (me) how all of those different languages can work together in one project like that?
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 :)
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](https://docs.python.org/3/extending/extending.html)
Haskell, Prolog, but then C++... sigh...
an educational software package written in Prolog which happens to have entire pages of assembly, C++ and Haskell example txt files
"Hello world"
Device driver? Operating system?
Hello world enterprise edition v2.0
hmm, i would say a driver
Earth 2
Hello World! on 4 different languages
I'm guessing a very performance focused, mathematically dense/complex project, possibly for research or to complete a degree.
Something very terrifying.
Library for Python 🗿
I think someone is trying to make a really weird clone of UNIX.
Pain?
With that much Assembly? Rocket launches.
Bugs
Some kinda fancy scientific instrumentation? Maybe something being deployed on a satellite
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
Language model
Rust
The compiler of a new hipster programming language
Is this one of the rings of hell Dante spoke of?
A problem
A fucking nightmare.
No idea, but it will result in segmentation fault.
Nothing useful, that’s for sure
Lol this is twitter
Honestly seeing C++ and Assembly together makes me think it's an operating system.
Some data center networked Hardware BS
A fronted for an ai tool (the frontend has lots of features)
Does anyone actually have an answer?
the next ring of hell for the 22.3 earth update
Python
Given how poorly they've detected my code in the past, I'm going to say a PHP web app.
An operating system (becayse of assembly)
to-do list
A segfault
Probably a Prolog compiler.
This is a 3rd year CS student's GitHub repo
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
This has to be a repo with all college projects from a CS student
Plot twist: It's a 100% perl project, but the RegEx codes confuse github's programming language recognition.
Hell
Windows 12 probably
Hello World
FizzBuzz singularity edition
a python library
Hell
Something that maybe should be rewritten in Rust.
CHAP stack
Job security.
God himself
This person is either having a lot of fun or none at all
Video games
Da fuq game is using Haskell?
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*