[ home / rules / faq / search ] [ overboard / sfw / alt ] [ leftypol / edu / labor / siberia / lgbt / latam / hobby / tech / games / anime / music / draw / AKM / ufo / 420 ] [ meta ] [ wiki / shop / tv / tiktok / twitter / patreon ] [ GET / ref / marx / booru ]

/tech/ - Technology

"Technology reveals the active relation of man to nature" - Karl Marx
Name
Options
Subject
Comment
Flag
File
Embed
Password(For file deletion.)

Check out our new store at shop.leftypol.org!


File: 1787991049489-4.png (383.11 KB, 526x640, ClipboardImage.png)

 

expectation
>oh i'll learn to code; that means i'll learn the syntax of some language then start building stuff
reality
<oh i'm installing a bunch of libraries and dependencies and package managers and IDEs and other garbage I don't want in order to follow tutorials, and the commands i'm being told to use aren't working and the error messages are really long and impossible to paste into a search engine and full of doxxing details about my file system

Didn't realized this transition was necessary when I first started programing either.
Was writing scheme in vi by reading the standard and SICP (if memory serves).
Barely any tools, no libraries, no search.
Programming for islands.

The only real cost to using proper tooling is the setup/learning cost.
For somethings this can be quite low like for LSPs, or REPLs.
Debuggers or reversible debuggers can be a little more, but are necessary.
This can be fun if you make it so! And it's really worth it!

Likbez can be useful but at the end of the day you've got to learn to search.
Libraries too big or dynamic to read in any other way.
Pulling examples off the shelf where there are no likbez can be a good first step.

You could write a script to replace any instance of $HOME with the literal $HOME.
You could also have a LLM summarize generating a search query.

>>34232
What language are you trying to learn? This hasn't been my average experience

I would suggest you learn another language, one which is simpler and with less externally required tooling and libraries. I would avoid Javascript, Java, C++, Rust etc. as first languages.

I would suggest you look at C, Go, or Python, because they are either very simple, or they have an expansive standard library that won't require huge amounts of external tooling. If you are on Linux or Unix of some sort I would especially consider C, because its entire toolchain is heavily integrated into the system, and most Unixes come with the manual pages for C standard functions already installed.

Most languages have a standard library that will get you far without having to mess around with external dependencies. Most beginner programming exercises should not need anything more.

File: 1788191865703-7.png (1.02 MB, 580x748, turboad.png)

despite its age and cultural irrelevancy in the modern era, pascal is still a great language for learning programming as well as general use and freepascal is available on every OS and compiles very fast to machine code and doesn't have all the weird idiosyncracies and confusing symbol-heavy teletype-influenced syntax that C has and the unit system is a lot less cumbersome and confusing than header files are, and unlike go/rust it also allows for low-level memory management and doesn't abstract it away behind a garbage collector or a borrow checker or smart pointers or other bullshit.

to give an example of why i think pascal is still a good first compiled language, consider the following code:

program Hello;

const
  N = 100;
var
  Msg: string;
begin
  Msg := 'hello';

  if N = 100 then
    WriteLn(Msg);
  end;
end.


the const keyword creates actual compile-time constants, variables have to be declared at the top of scope and the name of the variable is written first rather than its type, strings are a native type with proper stored length and bounds-checking, the assignment operator is ":=" instead of equals sign, the equals sign actually means "equal to", the standard library doesn't need to be explicitly included to use the WriteLn() print function, WriteLn() can print variables directly.

and here is c:

#include <stdio.h>

#define N 100

int main() {
  const char *msg = "hello";

  if(N == 100) {
    printf("%s\n", msg);
  }
  return 0;
}


the standard library has to be explicitly included with the #include directive to have access to the printf function, true compile-time constants have to be declared as #define preprocessor macros because const doesn't actually make things constant, types have to be written before variables as well as functions to specify their return type which is a lot less readable when you have a lot of variables declared in a row, there is no string type even in the standard library and you have to declare a pointer to an array of characters and make it const to make the characters read-only (but not actually a real compile-time constant) to prevent the program from crashing with a segfault should anything try to modify the string, also c's ad-hoc char array strings do not store their length and use an invisible newline "\n" as a terminator which is a nightmare that leads to all kinds of confusing runtime errors and buffer overflows, you have to use "==" as an equals sign because equal sign is used for assignment not equality, the printf() function cannot directly print variables and you have to memorize and use various % format specifiers inside a string literal, followed by the variables as additional parameters, and also the main function has to return an integer for passing exit codes to the OS due to the legacy unix-centricity of the language.

c is still an important language however and is much more relevant and widely used today than pascal is so it would be good to learn it eventually, but learning a language like pascal is a lot more straightforward and everything you learn from writing pascal easily transfers over to c.

>>34245
I started with Pascal, it's pretty cool.

>>34234
>Likbez can be useful but at the end of the day you've got to learn to search.
>Libraries too big or dynamic to read in any other way.
>Pulling examples off the shelf where there are no likbez can be a good first step.
>You could write a script to replace any instance of $HOME with the literal $HOME.
>You could also have a LLM summarize generating a search query.
I've been taking a crack at this a little.
Haven't done the security work or gotten the agent to eat the output correctly yet (in my working tree).
The only thing published so far is the tools and the API thin wrapper.
The idea is to have an agent only for local/remote search, and lock it in a chroot.

https://codeberg.org/jugaad/much-apropos-about-nothing

>>34245
Dawg why didn't you mention Ada at least once? The lack of variable length types makes string handling in Pascal extremely cumbersome, which is why writing games and real-world applications in it is usually way harder than it needs to be. Ada fixes this omission with generics, variable length bounded and unbounded types. Delphi is likely also a significant improvement over Pascal, but i don't know enough about the language to have formed an opinion about it.

>>34307
Published something that seems to work, though the free models are too weak to run it consistently.
Think need subagents to prevent from maxing out the context window too soon.


Unique IPs: 7

[Return][Go to top] [Catalog] | [Home][Post a Reply]
Delete Post [ ]
[ home / rules / faq / search ] [ overboard / sfw / alt ] [ leftypol / edu / labor / siberia / lgbt / latam / hobby / tech / games / anime / music / draw / AKM / ufo / 420 ] [ meta ] [ wiki / shop / tv / tiktok / twitter / patreon ] [ GET / ref / marx / booru ]