čudan

Extremely comfy textboard.


Daily programming thread

(20)

1

Anonymous:

print "hello prog\n";
print "what are you working on?\n"

2

Anonymous:

I started looking into telnet BBS software. Why da hell is it so monolithic? Oldfag Pascal or C packages, which they call "servers", but in fact they are full fleshed backend.

Oh, and a newfaggot's Enigma is written in fucking JavaScript. I don't mind JavaScript as a language, but why does such simple protocol as telnet need a black hole of NPM to run?

Why can't it be something barebones like that web dev's Sinatra or something? Or is there any?

3

Anonymous:

>>2
I'd imagine that BBS software isn't in very high demand, therefore no one writes a new one when most BBS's (to my knowledge) are already using Mystic or Synchronet.

4

Anonymous:

>>3

Yep, then fuck it.

5

Anonymous:

uou∀ ǝɔıN ǝᙠ

6

Anonymous:

Are there any real benefits Lisp offers comparing to other functional languages? Or does all that praise come from NEET /g/tard hipsters on one side and boomers who are simply used to million smileys)))) on the other?

7

Anonymous:

>>6
It's a meme language, don't bother for serious stuff.

8

Anonymous:

>>6
(lol)
(i (liek))
(2 (program in ("LISP")))
(n (sheeit))

9

Anonymous:

Today I chose to code AWS Lambda in JavaScript instead of Python.

JavaScript is good. I wish it completely replaced Python at least in web related technologies.

10

Anonymous:

>>9
Why do you like JavaScript? I think it's PHP-tier because the lang has so many footguns that it's too easy to make mistakes that are (nearly) impossible in other programming languages.

Like, browsers should come with something like NoScript by default! I think having a blacklist by default would be acceptable behavior. And requiring JS to just show static text is plain evil! These may be web browser issues but browsers are relevant to everything JS because client-side JS is a (huge) thing. Also, there are some issues with the design of JabbaShit. Why are undefined and null different?

There is even a site that has a reasonably good list of bad things in JS (the problem is that the author seems to dislike dynamically typed languages):
https://whydoesitsuck.com/why-does-javascript-suck/
I disagree on the authors conclusion that asm.js is so awesome, though!

11

Anonymous:

>>10

>Why do you like JavaScript?
I like several things, namely:

- C-like syntax
- native functional features
- sane package/module management for Node.js
- tight integration with web technologies
- TypeScript is an option if static typing is ever needed a fine alternative is to use JSDoc type annotations, they can be checked in modern IDEs as type declarations

I'm not an advocate of heavy JS usage on frontend, but I like to work with Node.js on server-side comparing to other available options.
>the lang has so many footguns that it's too easy to make mistakes that are (nearly) impossible in other programming languages
I think lint won't let it happen in most cases. JavaScript is so popular that its tooling is very decent.

12

Anonymous:

>>11
Oops, I forgot about lints, but it sucks that you are forced to use one. Also, I have only written client-side JavaScript for my personal website. I have never tried Node.js or server-side JS but I think I should. How to get started with it? Any recommended tutorials or books?

13

Anonymous:

>>12

>it sucks that you are forced to use one
I'm not forced to, I use them anyway for any language I work with, for both commercial and pet projects. So what's the hassle?
>How to get started with it? Any recommended tutorials or books?
You already know the basics of JS, aren't you? If not, use this for reference: https://javascript.info
In yes, Node.js is pretty simple to start with, install npm and give it a try. There are docs on Node.js website, I never read any guides, only consulted with man npm, web search and ChatGPT.

Some usual commands:

npm init # start the project
npm install $DEPENDENCY # add a dependency to the project
npm install # install all dependencies
node app.js # run the project, app.js is the standard entry-point

14

Anonymous:

I received a task with mostly Scala programming needed. At first I liked this language, it looked like a hybrid of Haskell and Java, seemingly a good compromise between useful exotics and stable practicality.

However, the more I dive into the real-life code, the more I realize it's ugly, unnecessarily overcomplicated, even bloated, and keeps 30 years of JVM legacy in its very nature.

Finally, OOP is so cumbersome, I have no idea why people think it's somehow beneficial to wrap every piece of shit in a "class". And Scala does seemingly nothing to get away from Javish everything is an object approach.

15

Anonymous:

Daily programming: struggled for several days with Spring Security configuration for Spring Boot app, which didn't work with any possible configuration implemented from guides; it appeared that the problem were quotes around predefined username and password in .properties file.

16

Anonymous:

I have a lot of work lately and not that much energy left on hobby projects.

However, I would like to code something. Preferably a small project that I can finish in a weekend and be satisfied that it werks.

What can you suggest, anon?

17

Anonymous:

>>16
CHIP-8 emulator.

>https://multigesture.net/articles/how-to-write-an-emulator-chip-8-interpreter/

18

Anonymous:

>>17
Kinda interesting, but I think it would require more time than two weekend evenings.

19

Anonymous:

>>18
How about writing clones of strlcat/strlcpy in C?

>https://www.openbsd.org/papers/strlcpy-paper.pdf
>https://man.openbsd.org/man3/strlcpy.3
Or how about writing ELIZA clone? Look up the examples in GNU Emacs code and PAIP book example code:
>https://github.com/norvig/paip-lisp/blob/main/lisp/eliza1.lisp (there is a more advanced version in the repo)
>https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/play/doctor.el

20

Anonymous:

I've been learning some machine learning, following this guide http://neuralnetworksanddeeplearning.com/chap1.html. A lot of it sounds like a get rich quick scam (like most things in ai). They tell you some bullshit "simple explanations" which have little to do with what actually happens, and then they tell you to copy their code. However, as long as you refuse to do those, it's a decent guide.