Programming thread

  • 🐕 I am attempting to get the site runnning as fast as possible. If you are experiencing slow page load times, please report it.
Jane Street, a high-performing trading firm, uses OCaml exclusively in its tech stack, an interesting choice in the worlds of finance and HFT where C++ is the dominant language.
Ocaml is an interesting case study in why a good command of English is essential to being a good programmer.

Ocaml was originally put out by some major university in France. All of its original documentation was in French and I believe each release still updates and maintains the original French documentation.

But like you mention, some guy who runs the tech at a niche Wall Street trading firm got a wild hair up his ass and decided on Ocaml to use in their tech stack, and bam, completely swamped the whole community and infrastructure around the language.

Just one company and now basically everything useful in the language is English first. Even if you're a French speaker, you're probably better off just starting with the voluminous English language guides.

I'm kind of oversimplifying the situation, but yeah.
Has anyone here read the Minix book?

Years ago I had a copy of the 3rd edition and I'm pissed off at myself because I misplaced it somewhere. All the available copies are selling for like $60, $80 or more. I think I bought it for like $40 years ago.
Lol so speaking of this, I actually managed to find a decently priced copy of the 3rd edition of the minix book. Like $40, not bad.

But looking at it, it didn't have the cover I remembered:
20240718_231816.jpg

What's this?
20240718_232310.jpg

Do not redeem!
 
Im trying to set up a contact form for a client using smtpjs and elastic email.

I was testing it by attempting to use my script to email myself. (Yes I used a secure token) It seems to work, because I can see a log that the emails did get to the smtp host and I can read the email from the website, but it won't actually go to my gmail inbox.

What exactly is going wrong here? Is it because I'm running my script on a localhost:3000 server? I wanna make sure this works before I get back to the client and help them set up their elasticemail smtp.

Also, this is my first time doing this so its frustrating and I'm gonna rant about it. I fucking hate this smtp javascript shit. Its so fickle. The fuck does smtp even stand for? Suck my tranny penis?

Btw, what's a good place to learn php? I have been using freecode camp to get introductory knowledge on something then I get good at it by making my own shit. But I didn't see any lessons for php on freecodecamp.
 
Im trying to set up a contact form for a client using smtpjs and elastic email.

I was testing it by attempting to use my script to email myself. (Yes I used a secure token) It seems to work, because I can see a log that the emails did get to the smtp host and I can read the email from the website, but it won't actually go to my gmail inbox.

What exactly is going wrong here? Is it because I'm running my script on a localhost:3000 server? I wanna make sure this works before I get back to the client and help them set up their elasticemail smtp.

Also, this is my first time doing this so its frustrating and I'm gonna rant about it. I fucking hate this smtp javascript shit. Its so fickle. The fuck does smtp even stand for? Suck my tranny penis?

Btw, what's a good place to learn php? I have been using freecode camp to get introductory knowledge on something then I get good at it by making my own shit. But I didn't see any lessons for php on freecodecamp.
Not many people use PHP outside of WordPress development. It's fairly simple. If I may give you some advice, look into nodejs/express, python/flask or Java/spring as they are more performative and have a larger community for support. All of them have support for one templating language or another. Most hosts support node/python as well.

Are you embeddeding the secret in JavaScript? Because that sounds like what you are doing. If you are sending an email via JS as opposed to having your backend do it, yes you are going to fail.
 
Last edited:
Yes. Spam is such a problem nowadays that if there's anything slightly suspect about your e-mail, most mail servers will either ignore it or send it to Junk.
He's supposedly using SMTP though not mail(). He would be connecting to a valid server and sending an email via that server.
 
I may give you some advice, look into nodejs/express,
I use nodejs on everything. Modules and objects are are really useful to keep my scripts organized and easy to change.
Yes. Spam is such a problem nowadays that if there's anything slightly suspect about your e-mail, most mail servers will either ignore it or send it to Junk.
Any way I can rectify this or should I just wait until their website is online to finish setting up the email shit?
 
sorry for triple posting. Here is the function. It goes to elasticemail but the email itself bounces instead of being delivered to my inbox.

JavaScript:
function sendEmail(){
    let name = $("#name").val();
    let msg = $("#msg").val()
    Email.send({
        SecureToken : "",//token here
        From : $("#email").val(),
        To: "",//my email here
        Subject : $('input[type=radio][name=subject]:checked', '#contact-form').val(),
        Body: `Customer Name: ${name}
               Message: ${msg}`
    }).then(
        message => alert(message)
    );
};


$("#contact-form").on("submit", (event) => {
    event.preventDefault();   
    sendEmail()
})
 
The from field should be the address that will be sending the email on the email provider side, not the arbitrary email string from the contact form, this mismatch is probably what is causing your emails to not be delivered.
Also you definitely want something like this to be on the server side or your client will end up with all sorts of spam being sent from their business email, which is a bad look for them and for you.
 
  • Agree
Reactions: Marvin
Any way I can rectify this or should I just wait until their website is online to finish setting up the email shit?
Fuck using third party outlets for things you can do yourself. Setup a backend and have that backend access an email account through SMTP. Send the email on behalf of that account. Your email structure and headers are fine. You just need to port it to NodeJs or Python or whatever.

The from field should be the address that will be sending the email on the email provider side, not the arbitrary email string from the contact form, this mismatch is probably what is causing your emails to not be delivered.
Wrong that works, as long as the email is valid. Any decent SMTP client will check that and throw an exception if the from or to emails aren't usable.
 
Fuck using third party outlets for things you can do yourself. Setup a backend and have that backend access an email account through SMTP. Send the email on behalf of that account. Your email structure and headers are fine. You just need to port it to NPM or Python or whatever.
It seems I'm gonna have to. Any way to get started on that before the website is actually online? This is my first legit website, I know how to make web pages but this will be my first time actually setting one up and hosting it on a server. I'm meeting with my client this weekend, and once I'm done hammering out the details we are gonna get their website up and running.
 
PHP is truly a godless language. You know a language is bad if fucking facebook is able to come in and improve it
At this point I am convinced every language is dogshit.

The only good language is english and unfortunately my computer (much like a mexican immigrant) isn't a human being and it can't understand english.
 
At this point I am convinced every language is dogshit.

The only good language is english and unfortunately my computer (much like a mexican immigrant) isn't a human being and it can't understand english.
Te interficiam tum pedicabo, barbare. Anglicam dixisti sed Latinam cogitavisti! Loquere in lingua virorum, non bestiarum.
 
At this point I am convinced every language is dogshit.

The only good language is english and unfortunately my computer (much like a mexican immigrant) isn't a human being and it can't understand english.
Every language has some inherent flaw, but there definitely is a hierarchy to them, albeit somewhat subjectively
 
Every language has some inherent flaw, but there definitely is a hierarchy to them, albeit somewhat subjectively
Isn't there some inherent benefit to learning Assembly, for example? Of course you cannot do any practical solutions for web design or for a client, for example. But lower level languages seem to have something practical.
 
  • Optimistic
Reactions: Marvin
Isn't there some inherent benefit to learning Assembly, for example? Of course you cannot do any practical solutions for web design or for a client, for example. But lower level languages seem to have something practical.
I think that learning assembly is really useful at a minimum to increase one's understanding of how computers function. Having all of those abstraction mechanisms stripped away does clarify a lot for you as a programmer, bonus points for a RISC architecture like ARM where it really does not hold your hand.
Weirdly, working with BrainFuck of all things is actually a decent preparation for understanding assembly, as BrainFuck is a really good approximation of a pure Turing Machine.
I loathe any kind of black box conceptually, it aggravates my impostor syndrome greatly. Even if I can't fully wrap my head around something, at least I made an effort.
 
Isn't there some inherent benefit to learning Assembly, for example? Of course you cannot do any practical solutions for web design or for a client, for example. But lower level languages seem to have something practical.
Knowing assembly is immensely useful for debugging purposes, as well as for reasoning about problems at a low-level (and for violating EULAs).

Assembly isn't really a "programming language" in that way that we normally think, it's more of class of text representation for different CPU's binary machine code. Every CPU architecture has its own machine language that is then represented as an assembly language for us humans, and then different compiler tooling might have different syntax for their assembly languages. When you learn "assembly" what you are really learning is a certain CPU's interface for units of computational intent.

Traditionally speaking, "high level" languages are programming languages that are at a higher level of abstraction than assembly languages, but at some point we went way too far with layers of abstraction where now, C is considered a "low level" language only relative to languages that are huge abstractions to the actual units of computational intent, which are the instructions within binary machine code (technically it's deeper than that with things like micro-ops and whatnot, but as software folks we tend to draw the line at machine code).
 
  • Like
Reactions: UERISIMILITUDO
Knowing assembly is immensely useful for debugging purposes, as well as for reasoning about problems at a low-level (and for violating EULAs).

Assembly isn't really a "programming language" in that way that we normally think, it's more of class of text representation for different CPU's binary machine code. Every CPU architecture has its own machine language that is then represented as an assembly language for us humans, and then different compiler tooling might have different syntax for their assembly languages. When you learn "assembly" what you are really learning is a certain CPU's interface for units of computational intent.

Traditionally speaking, "high level" languages are programming languages that are at a higher level of abstraction than assembly languages, but at some point we went way too far with layers of abstraction where now, C is considered a "low level" language only relative to languages that are huge abstractions to the actual units of computational intent, which are the instructions within binary machine code (technically it's deeper than that with things like micro-ops and whatnot, but as software folks we tend to draw the line at machine code).
IMO, duck typing applies. All programming languages are Turing Complete, ergo anything that is Turing Complete is a language
 
Back